concatenation

Hypothetical concatenation predicament

ε祈祈猫儿з 提交于 2019-12-06 06:44:46
问题 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

XPath concat multiple nodes

僤鯓⒐⒋嵵緔 提交于 2019-12-06 06:12:46
问题 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

xslt concatenate text from nodes

二次信任 提交于 2019-12-06 04:55:25
I have an xml file that looks like this: <args> <sometag value="abc" /> <anothertag value="def" /> <atag value="blah" /> </args> keep in mind that tag names within args could be named anything (I don't know ahead of time) Now i have this xml file stored in a variable called $data which I loaded using a document() call in the xslt stylesheet (its not the backing data for the xslt file) I want to take that data and produce the following output: sometag=abc&anothertag=def&atag=blah so (a very simplified verison looks like this: <xsl:template> <xsl:variable name="data" select="document('/path/to

Concatenated SMS extended symbols at segments border - what is correct split method?

喜夏-厌秋 提交于 2019-12-06 04:20:43
For concatenated SMS messages (in GSM encoding), if extended table symbol (one of these: }{[]|~^\€) is placed at the end of segment, what is correct way to split such message: Leave first byte of symbol (0b) at the end of segment and put second byte to the beginning of next one, and so fill all available bytes of UD (which seems logically correct) OR Move whole symbol bytes to the next segment and leave unused byte at the end? I didn't found any clarification neither in SMPP 3.4 specs or implementation guide nor in GSM 03.38 specs, so assume that method selection is up to content provider or

How to save a plot in R in a subdirectory of the working directory

本秂侑毒 提交于 2019-12-06 04:12:06
问题 Is it possible to save a plot in R into a subdirectory of the current working directory? I tried the following, but that doesn't work. I'm not sure how to concatenate the working directory to the file name I want. wd <- getwd() png(filename=wd+"/img/name.png") counts <- table(dnom$Variant, dnom$Time) barplot(counts, main="Distribution of Variant and words of time", xlab="Temporal nouns", col=c("paleturquoise3", "palegreen3"), legend = rownames(counts)) Also, what's the default save directory

Concatenate two big numpy 2D arrays

隐身守侯 提交于 2019-12-06 03:15:27
I have two big numpy 2D arrays. One shape is X1 (1877055, 1299), another is X2 (1877055, 1445). I then use X = np.hstack((X1, X2)) to concatenate the two arrays into a bigger array. However, the program doesn't run and exit with code -9. It didn't show any error message. What is the problem? How can I concatenate such two big numpy 2D arrays? Unless there's something wrong with your NumPy build or your OS (both of which are unlikely), this is almost certainly a memory error. For example, let's say all these values are float64 . So, you've already allocated at least 18GB and 20GB for these two

Operation overloading in R [duplicate]

ぃ、小莉子 提交于 2019-12-06 03:11:14
问题 This question already has answers here : Making a string concatenation operator in R (5 answers) Closed 5 years ago . 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?) 回答1: I

Concatenating a string using Win32 API

心已入冬 提交于 2019-12-06 01:11:13
What's the best way to concatenate a string using Win32? If Understand correctly, the normal C approach would be to use strcat , but since Win32 now deals with Unicode strings (aka LPWSTR ), I can't think of a way for strcat to work with this. Is there a function for this, or should I just write my own? lstrcat comes in ANSI and Unicode variants. Actually lstrcat is simply a macro defined as either lstrcatA or lstrcatW . These functions are available by importing kernel32.dll . Useful if you're trying to completely avoid the C runtime library. In most cases you can just use wcscat or _tcscat

MS Access - How do I display two fields from separate records on the same line based on their ID and Date?

孤人 提交于 2019-12-06 00:33:51
I don't know if this is even possible or perhaps my database is designed poorly and I could have done it a better way? Anyway here goes, I have database with two tables as follows " General Data " and " Assessment Data " - they're set up so that a patient can have a few basic details entered into "General Data" and then each time they have an assessment they have data relevant to that assessment entered into the "Assessment Data" table Sorry about the dodgy formatting! Not enough reputation points to upload images :( General Data **ID -- Age (Years) -- Gender -- Town ------ Referral Source --

mysql concat_ws without duplicates

女生的网名这么多〃 提交于 2019-12-05 23:15:55
I am trying to concatenate a few fields into a single one, but only keep unique values in the resulting string. Example: title_orig | title_fr | title_de | title_it --------------------------------------------------------------------- KANDAHAR | KANDAHAR | REISE NACH KANDAHAR | VIAGGO A KANDAHAR SCREAM 2 | SCREAM 2 | SCREAM 2 | SCREAM 2 With CONCAT_WS(', ', title_orig, title_fr, title_de, title_it) AS titles I would get titles ------------------------------------------------------------ KANDAHAR, KANDAHAR, REISE NACH KANDAHAR, VIAGGO A KANDAHAR SCREAM 2, SCREAM 2, SCREAM 2, SCREAM 2 But I