Posts

sql server - SQL reading from a comma delimited field and then bringing data back in comma delimited format -

i have data in string format 3,2,1 in table column. have lookup table tells me file name associated file table looks this id (int) name ------------------ 1 file 1 2 file 2 what want send string 3,2,1 , data file 1, file 2 separate column can refer in displaying. mind addition existing stored procedure that's why want 1 string row back thanks in advance help you may want write code this. below code it's example put on right track. let me know if have questions declare @input varchar(max) declare @index1 int declare @index2 int declare @id varchar(10) declare @str varchar(max) declare @result varchar(max) set @input = '3,2,1'; set @str = reverse(@input) set @index1 = 1; set @index2 = charindex(',', @str) set @id = substring(@str, @index1, @index2 -@index1) set @result = 'file ' + @id + ',' while (@index2 > 0 ) begin set @str = substring(@str, @index2 + 1, len(@str) -@index1) set @id = substrin...

git - No branches in SourceTree -

Image
somehow managed make branches disappear in sourcetree (the section on left lists file status, branches, tags, remotes , stashes). see screenshot: how make them come back? to reveal hidden branches, had drag middle divider on so:

swift - Which files in my iOS Xcode project should I hide before uploading to github? -

in ruby on rails , know there's config/secrets.yml file shouldn't upload github . is there equivalent in ios app? i'm thinking uploading app github before submitting apple app store, , don't want accidentally share secret keys or else should remain private. github maintains public project .gitignore recommendations several languages: https://github.com/github/gitignore for xcode how file looks : # xcode # # gitignore contributors: remember update global/xcode.gitignore, objective-c.gitignore & swift.gitignore ## build generated build/ deriveddata ## various settings *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata ## other *.xccheckout *.moved-aside *.xcuserstate *.xcscmblueprint ## obj-c/swift specific *.hmap *.ipa # cocoapods # # recommend against adding pods directory .gitignore. # should judge yourself, pros , cons mentioned at: # http://guides.cocoapods...

javascript - Using d3 drag, why doesn't dragstart have d3.event.x set? -

i can access d3.event.x inside on("drag"...) x doesn't exist inside on("dragstart"...) ; why? , how can way, preferably not hackish? check console output example: d3.select("body").append("svg").append("rect") .attr("width", 100) .attr("height", 100) .style("color", "black") .call( d3.behavior.drag() .on("dragstart", function(){ console.log(d3.event); }) .on("drag", function(){ console.log(d3.event); }) .on("dragend", function(){ console.log(d3.event); }) ); jsfiddle @lars explains why, how do it? d3.mouse pretty slick: d3.behavior.drag() .on("dragstart", function(){ console.log('relative rect: ' + d3.mouse(this)); console.log('rela...

c# - BinaryFormatter OptionalField with ISerializable -

i create test serializable object: [serializable] public class testobject : iserializable { public string firstname; public testobject() { } public testobject(serializationinfo info, streamingcontext context) { firstname = info.getstring("firstname"); } public void getobjectdata(serializationinfo info, streamingcontext context) { info.addvalue("firstname", firstname); } } and serialize it: var test = new testobject { firstname = "john" }; using (var stream = new filestream(@"c:\temp\test.dat", filemode.create, fileaccess.write)) { var formatter = new binaryformatter(); formatter.serialize(stream, test); } i change class has optionalfied , try deserialize old serialized object: [serializable] public class testobject : iserializable { public string firstname; [optionalfield] public string secondname; public testobject() { } public testobje...

javascript - Liferay set the id of liferay-ui:search-container-row -

i want set id of tr result of tag liferay-ui:search-container-row , how can it? for example, resulting table row is: <tr id="aui_3_4_0_1_350" class="portlet-section-header results-header"> i want attach javascript resulting table , need refer various table row, id="aui_3_4_0_1_350" . use class selector , don't know how set it. it not posible set customized id value search-container-row. because generated based on input list , ids need unique. can access using selector starting search-container itself. depends on trying accomplish. if you're using jquery or similar should easy since there's variety of them: https://api.jquery.com/category/selectors/

Publish Android app to store using Visual Studio -

Image
how can publish android app store in visual studio? i see tools | options | publish android app. however, need tutorial on fields provided. any guidance? there instructions publishing xamarin.android application on xamarin developer portal . specifically, part 2 covers publish android app menuitem mentioned. it's little hard see - @ top-right of page there 'switch' between xamarin studio , visual studio instructions (click on visual studio see correct information , screenshots ide).