Posts

sql - Select most recent InstanceID base on max end date -

i trying pull memberinstance table based on max dateend. if null want pull still ongoing. using sql server. select memberinstanceid table group memberid having max(isnull(date_end, '2099-12-31')) this query above doesnt work me. have tried different ones , have gotten return separate instances, not 1 max date. below table looks like. memberid     memberinstanceid     datestart     dateend      2                      abc12                 2013-01-01   2013-12-31      4                      abc21                ...

tibco - Need Inputs on the XSD Schema -

i looking suggestions create xsd structure handle following xml format processing logic more efficient.the looping logic managed in tibco bw <line> <shipmentlinenumber>1</shipmentlinenumber> <salesorderlinenumber>1.1</salesorderlinenumber> <purchaseorderlinenumber>1</purchaseorderlinenumber> <partnumber>1ch162-510</partnumber> <modelnumber>st1000dm003</modelnumber> </line> <package packagetype="p" packagelevel="1"> <packagenumber>pwn34332</packagenumber> <shipmentnumber>105909390</shipmentnumber> <shipmentlinenumber>1</shipmentlinenumber> <partnumber>1ch162-510</partnumber> <quantity>1000</quantity> <ssccnumber>00176364909402100165</ssccnumber> </package> <package packagetype="c" packagelevel="2"> <packagenumber>cwx612432660<...

xslt - Validating xml attribute value with dynamic length -

i have following xml part: <column customerfield="title" companyfield="2241" datatype="alphanumeric" length="17" customervalue="manager sales compensation head office" companyvalue="manager sales compensation head office" remark=""/> i check xslt 2.0 customervalue doesn't exceed specified length (that present in xml). what have far this <xsl:template match="column[@companyfield='2241' , @datatype='alphanumeric' , @companyvalue[string-length()>number(@length)]]"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:attribute name="companyvalue"> <xsl:value-of select="substring(@customervalue,1,17)"/> </xsl:attribute> <xsl:attribute name="remark">string value long.</xsl:attribute> </...

svg - Exporting Treemap chart -

we have 4 options highcharts exporting. png, jpeg, pdf & svg. when export , print image, scaling not consistent other charts. have set exporting sourcewidth 2000. exporting:{ sourcewidth:2000 } this prints image in landscape mode labels , legend hard read. there better way scale chart pdf , png image type better looking , easier read?

amazon web services - create empty folder S3 ruby SDK -

i want create empty folder in amazon s3 using ruby sdk. ive read there no folder concept in s3, theoretically create folder create empty object trailing "/" s3 = aws::s3::client.new( region: 'eu-west-1', credentials: creds) s3.put_object(bucket: "my_bucket", key: "my_folder/") doing creates empty object on bucket, if try upload file this: s3.put_object(bucket: "my_bucket", key: "my_folder/myfile") it doesnt create file in my_folder. maintains old empty object, , creates folder , file. after 2 commands bucket structure is: my_bucket/ my_folder my_folder/ my_file why happening? why create object my_folder twice? how should create empty folder later use? the amazon s3 virtual folders spring existence when key contains '/'. when browsing bucket in s3 console, scans object keys common prefixes , uses prefix show subset of bucket. given ...

asp.net - c# .Net Can I somehow format a DataSet to send as a repsonse from a website -

scenario: have c# windows desktop application request customers in database. validate on server , query database server returns either datatable or dataset. there way convert/encode datatable or dataset , send response? plan client application convert datatable or dataset , have way it! can done? you might want serializing dataset. (xml version: https://msdn.microsoft.com/en-us/library/58a18dwa%28v=vs.110%29.aspx ). search here and/or msdn options, converting json.

javascript - Get values from multiple arrays -

i've got hex colours in array. $.each(["#ff0000", "#000", "#ff6600", "#00e641"], function(i, c) { $('<input class="btns" type="button">') .css("background-color", color) .on("touch", $.proxy(funcnew, null, color)) .appendto("#subdv"); }); i want pass colour mood along hex value. how do it? ["red", "black", "orange", "soft shade"] e.g.: when #ff0000 selected want able pass word red . when #ff6600 selected want able pass word orange . you do: var ma = [["#ff0000", 'red'], ["#000", 'black'], ["#ff6600", 'orange'], ["#00e641", 'soft shade']]; $.each(ma, function(a, b){ b[0]; //hex b[1]; //color name });