concatenation

How to concatenate variable and string in following scenario in PHP?

≯℡__Kan透↙ 提交于 2019-12-06 15:26:35
问题 I've following PHP code: <?php $rebate_no = 2; echo "<table id='blacklistgrid_$rebate_no' class='table table-bordered table-hover table-striped blacklistgrid'> <tr id='reb$rebate_no_1'> <td> <div class='btn-group'> <select name='product_id_$rebate_no[1]' id='product_id_$rebate_no_1' class='form-control prod_list'> <option value='1'>Alabama</option> <option value='2'>Alaska</option> <option value='3'>Arizona</option> <option value='4'>Arkansas</option> <option value='5'>California</option> <

Oracle : String Concatenation is too long

自闭症网瘾萝莉.ら 提交于 2019-12-06 14:18:08
I have below SQL as a part of a view. In one of the schema I am getting " String Concatenation is too long " error and not able to execute the view. Hence I tried the TO_CLOB() and now VIEW is not throwing ERROR, but it not returning the result as well it keep on running.. Please suggest.... Sql: SELECT Iav.Item_Id Attr_Item_Id, LISTAGG(La.Attribute_Name ||'|~|' || Lav.Attribute_Value ||' ' || Lau.Attribute_Uom, '}~}') WITHIN GROUP ( ORDER BY ICA.DISP_SEQ,LA.ATTRIBUTE_NAME) AS ATTR FROM Item_Attribute_Values Iav, Loc_Attribute_Values Lav, Loc_Attribute_Uoms Lau, Loc_Attributes La, (SELECT *

concatenate a column on one line depends on a id

一笑奈何 提交于 2019-12-06 12:36:56
I've again a basic question : If I do : SELECT DISTINCT id, date, doctext, docline, from documentation where date in (02/14/2017) doctext is a char(80) and I cannot change it. The problem of this columns is the size, I cannot save a value > 80 characters, If the doc is > 80 char, it will save two lines in SQL and upgrade the docline So my result is, for example : 0 2017-02-14 this is a basic test to show you the result 0 1 2017-02-14 this is a new basic test to show you the result 0 2 2017-02-14 this is a long basic test to show you the result 0 2 2017-02-14 when the documentation have

Problem concatenating Python list

拟墨画扇 提交于 2019-12-06 11:00:51
I am trying to concatenate two lists, one with just one element, by doing this: print([6].append([1,1,0,0,0])) However, Python returns None . What am I doing wrong? Use the + operator >>> [6] + [1,1,0,0,0] [6, 1, 1, 0, 0, 0] What you were attempting to do, is append a list onto another list, which would result in >>> [6].append([1,1,0,0,0]) [6, [1,1,0,0,0]] Why you are seeing None returned, is because .append is destructive, modifying the original list, and returning None . It does not return the list that you're appending to. So your list is being modified, but you're printing the output of

PDO: Difference between binding params and concatenating string

三世轮回 提交于 2019-12-06 10:45:01
I have this weird problem. Why do these two implementations return different results? $db = DbBase::getInstance(); $stmt = $db->prepare('SELECT round(round(9.50 * :amount, 2) * 23 * 0.01, 2)'); $stmt->execute(array(':amount' => 1)); echo $stmt->fetchColumn(); Result: 2.18 $db = DbBase::getInstance(); $stmt = $db->prepare('SELECT round(round(9.50 * 1, 2) * 23 * 0.01, 2)'); $stmt->execute(); echo $stmt->fetchColumn(); Result: 2.19 When I bind the amount it gives me different result. I'd rather not concatenate the string because of the SQL injections. When you are using the array to pass the data

How to shift a std_logic_vector by std_logic_vector using concatenation

扶醉桌前 提交于 2019-12-06 10:44:34
问题 Say I have 2 std_logic_vectors: inputA : std_logic_vector(31 downto 0) inputB: std_logic_vector(31 downto 0) How do I shift inputA by inputB using concatenation? I know how to shift left or right by 1 place but can't figure out how to shift N places to the right (or left). Note: this is a clockless circuit, and can't use standard vhdl shift operators. Other techniques or ideas other than concatenation would be appreciated as well. 回答1: I prefer wjl's approach, but given you asked specifically

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

时光总嘲笑我的痴心妄想 提交于 2019-12-06 08:59:30
问题 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

PHP - Concatenating two variables

我只是一个虾纸丫 提交于 2019-12-06 08:42:48
I'm a newbie stumped on the following. If I'm including an external file on a page that contains the following variable: $blurb_78 = "Lorem ipsum dolor."; How can I echo $blurb_78 on the local page? (where the 78 part is a generated article ID set to a variable labeled, $id ) The following doesn't work: echo $blurb_.$id; Thanks much for your help. I think you mean a variable variable name like it is mentioned at the Variable variables page on the PHP site. In your case this should work fine: echo ${'blurb_'.$id}; But I highly doubt your approach on this one. Try making an array: $blurb = array

Trying to concatenate Sass variable and a string

こ雲淡風輕ζ 提交于 2019-12-06 08:09:44
I'm trying to concatenate a Sass variable with a string. How do I do it? Below there is a code example. @mixin setIcons($pathImages:$pathImages, $extensionIcon:$extensionIcon { @each $class-icon in $class-icons-30 { .snw-tui-icon-#{$class-icon} { @include icon($class-icon, $pathImages, $extensionIcon, 30px); } .snw-tui-icon-**#{$class-icon} + "selected"** { @include icon(**$class-icon + "selected"**, $pathImages, $extensionIcon, 30px); } } You want to interpolate. $sidebar-width: 20px; .target { width: calc(100% - #{$sidebar-width}); } Hope this helps More info into it here: https://webdesign

count lines with same value in column in python

旧时模样 提交于 2019-12-06 07:12:53
I'm trying to reproduce the R aggregate() function in python but without concatenating. For each line, I just want to count the number of occurrences of lines with a similar value in a given column. I'm trying to work it out from a piece of code taken here: http://timotheepoisot.fr/2011/12/01/the-aggregate-function-in-python/ The modifications I implemented are indicated by ### . The problem I am currently having is that the first column [0] contains character strings and the code seems to work only with floats. import numpy as np import scipy as sp def MSD(vec): return [np.mean(vec),np.std