concatenation

Excel VBA - Writing multiple userform checkbox values to a single cell

别来无恙 提交于 2019-12-04 20:37:15
I am trying to take the values passed from a userform that has 4 checkbox options and write them to a single concatenated cell. When I select my userform like this: I would like to save it to a single cell like this: I tried accomplishing this with the following code (see below), but it doesn't work quite right with the commas and such if only the 2nd, 3rd, or 4th item is chosen without the first. I am convinced there is a better way but I can't figure it out or find an answer online. Private Sub cmdSave_Click() Dim colors As String If chkRed = True Then colors = "Red" Else colors = colors End

Concatinate unknown number of values in sqlite

别来无恙 提交于 2019-12-04 17:26:51
I am using sqlite 3.15.1 . I have a table master containing master timetable of a college. It looks like : day sem sec hour sub_id ---------- ---------- ---------- ---------- ---------- MON 5 B 4 10IS51 MON 5 B 4 10IS53 MON 5 B 5 10CS54 MON 5 B 6 10CS55 MON 5 B 7 10CS53 MON 3 A 1 10CS33 and many more values.... There are multiple sub_id for same other values , meaning - On Monday 1st hour, 5th B students might have 2 or more lab (sub_id). (Its conducted in batches). To get a proper timetable, I am doing this : select day, max( case when hour =1 then sub_id end ) as 'hour-1', max( case when

Casting an int to a string in Python

喜你入骨 提交于 2019-12-04 14:58:42
问题 I want to be able to generate a number of text files with the names fileX.txt where X is some integer: for i in range(key): filename = "ME" + i + ".txt" //Error here! Can't concat a string and int filenum = filename filenum = open(filename , 'w') Does anyone else know how to do the filename = "ME" + i part so I get a list of files with the names: "ME0.txt" , "ME1.txt" , "ME2.txt" , and etc 回答1: x = 1 y = "foo" + str(x) Please see the Python documentation: https://docs.python.org/2/library

Hypothetical concatenation predicament

荒凉一梦 提交于 2019-12-04 14:06:56
So I am working on a simple micro language/alternative syntax for PHP. Its syntax takes a lot from JavaScript and CoffeeScript including a few of my own concepts. I have hand written the parser (no parser generator used) in PHP to convert the code into PHP then execute it. It is more of a proof of concept/learning tool rather than anything else but I'd be lying if I said I didn't want to see it used on an actual project one day. Anyway here is a little problem I have come across that I thought I would impose on you great intellects: As you know in PHP the period ( . ) is used for string

How to concatenate monthly TRMM netCDF files into a single netCDF file using NCO or R on windows 7?

久未见 提交于 2019-12-04 13:12:26
I have downloaded TRMM monthly precipitation rate in netCDF format from 1998 -2016, so approximately more than 200 files.The names of these files are 3B43.19980101.7.HDF.nc 3B43.19980201.7.HDF.nc 3B43.19980301.7.HDF.nc , and so on. I would like to concatenate all of these files into a single netCDF. I've tried using the NCO operator "ncrcat" which should be able to concatenate a very long series of files along the record dimension, in this case time, but so far no luck. I tried at first simple with only 2 files ncrcat -O -h 3B43.19980101.7.HDF.nc 3B43.19980201.7.HDF.nc out.nc got ERROR: no

Concatenating or cascading multiple pretrained keras models

让人想犯罪 __ 提交于 2019-12-04 11:44:03
I'm trying to build a concatenated or cascaded(actually don't even know if this is the correct definiton) set of models. For the simplicity my base models are looking like below. ----Input---- | L1-1 | L1-2 | Dense | Softmax I got 7 of these models trained with cross-validation and trying to wrap up them in a cascade fashion such as: -----------------------Input--------------------- | | | | | | | L1-1 L1-2 L1-3 L1-4 L1-5 L1-6 L1-7 | | | | | | | L2-1 L2-2 L2-3 L2-4 L2-5 L2-6 L2-7 | | | | | | | |_______|_______|_______|_______|_______|_______| | Concatenated | |___________________Dense Layer____

XPath concat multiple nodes

流过昼夜 提交于 2019-12-04 11:05:02
I'm not very familiar with xpath. But I was working with xpath expressions and setting them in a database. Actually it's just the BAM tool for biztalk. Anyway, I have an xml which could look like: <File> <Element1>element1<Element1> <Element2>element2<Element2> <Element3> <SubElement>sub1</SubElement> <SubElement>sub2</SubElement> <SubElement>sub3</SubElement> <Element3> </File> I was wondering if there is a way to use an xpath expression of getting all the SubElements concatted? At the moment, I am using: /*[local-name()='File']/*[local-name()='Element3']/*[local-name()='SubElement'] This

How to cleanly use: const char* and std::string?

自古美人都是妖i 提交于 2019-12-04 10:35:33
tl:dr How can I concatenate const char* with std::string , neatly and elegantly, without multiple function calls. Ideally in one function call and have the output be a const char* . Is this impossible, what is an optimum solution? Initial Problem The biggest barrier I have experienced with C++ so far is how it handles strings. In my opinion, of all the widely used languages, it handles strings the most poorly. I've seen other questions similar to this that either have an answer saying "use std::string " or simply point out that one of the options is going to be best for your situation. However

Operation overloading in R [duplicate]

守給你的承諾、 提交于 2019-12-04 09:16:34
This question already has an answer here: Making a string concatenation operator in R 5 answers What's the most straight forward way of overloading '+' for characters? I have defined '%+%' <- function(...) paste(...,sep="") : str <- "aa"%+%"bb"%+%"cc" #str="aabbcc" But I don't like the syntax. I think str <- "aa"+"bb"+"cc" would be nicer. (I am building long SQL queries to use with RODBC, the usual paste is not very handy in such situations. Any suggestions?) I think that using two arguments is better than the dots: '%+%' <- function(x,y) paste(x,y,sep="") "a"%+%"b"%+%"C" [1] "abC" If you

Multiplying strings in bash script

删除回忆录丶 提交于 2019-12-04 08:22:38
I know that if I do print ("f" + 2 * "o") in python the output will be foo . But how do I do the same thing in a bash script? You can use bash command substitution to be more portable across systems than to use a variant specific command. $ myString=$(printf "%10s");echo ${myString// /m} # echoes 'm' 10 times mmmmmmmmmm $ myString=$(printf "%10s");echo ${myString// /rep} # echoes 'rep' 10 times reprepreprepreprepreprepreprep Wrapping it up in a more usable shell-function repeatChar() { local input="$1" local count="$2" printf -v myString "%s" "%${count}s" printf '%s\n' "${myString// /$input}"