js content

using NReco.PdfGenerator; using System; using System.Text; using System.IO; using System.Text.RegularExpressions; using System.Drawing.Imaging; using System.Drawing; namespace GPSConvertor { public class Program { public static void Main(string[] args) { var g = new GPSPdfGenerator(); g.GenerateToc = true; g.FileName = "test.pdf"; Regex imgSrcRegex = new Regex("img src=\"([^\"]+)\"", RegexOptions.IgnoreCase | RegexOptions.Compiled); for (var n = 0; n < 100; n++) { // fake data var htmlFragment = $"{n} "; var imgUriMatch = imgSrcRegex.Match(htmlFragment); var imgUri = imgUriMatch.Groups[1].Value; if (!string.IsNullOrEmpty(imgUri)) { using (WebClient client = new WebClient()) { var imgS…


Summary by Project Types Found above: Thanks Serge! also had to do this: var view = paList.Views.Add(viewName, viewFields, string.Empty, 100, true, true); view.Scope = SPViewScope.Recursive; view.Update(); web.Update(); because: paList.Views.Add(viewName, viewFields, string.Empty, 100, true, true); paList.Views[viewName].Scope = SPViewScope.Recursive; paList.Views[viewName].Update(); web.Update(); didn't work :-( No wander: paList.Views[viewName] gets a new instance each time it is invoked. So the code above is equivalent to: paList…


$site=Get-SPSite $siteURL $web=$site.RootWeb $list=$web.Lists.TryGetList($listName) if($list -ne $null) { write-host -f green $listName "exists in the site" } else { write-host -f yellow $listName "does not exist in the site"


http://sharein.corp.ponet/innop/Cost-effectiveFuelSystemArchitectureForChinaVI/SitePages/Categories.aspx Add-PSSnapin Microsoft.Sharepoint.Powershell $site = Get-SPSite "SiteURL" $sitelists = foreach ($web in $site.AllWebs) { foreach($list in $web.lists){ $list }} $sitelists |select Title | Export-CSV C:\liststitles.csv Remove-PsSnapin Microsoft.SharePoint.PowerShell # declare an array to store results $results = @() # fetch databases (only configuration and content DBs are needed) $databasesToQuery = Get-SPDatabase | Where-Object {$_.Type -eq 'Configuration Database' -or $_.Type -eq 'Content Database'} | Sort-Object –Property Name # for each database get spshelladmins and add db name and username to result $databasesToQuery | ForEach-Object {$dbName = $_.Name; Get-SPShellAdmin -database $ | Sort-Object $_.username | ForEach-Object {$results += @{$dbName=$($_.username)}}} # …
$(function() { var isCustomerNominated = $("#IsCustomerNominated");; isCustomerNominated.on("change", function (e) {$(this)); }) }); function hideAirline() { var contractedAirline = $("#contractedAirline"); if (":checked")) { contractedAirline.css("visibility", "visible"); } else { contractedAirline.css("visibility", "hidden"); } }

Initializing xslt variable with static content

I had to use a variable in an xslt template. The value for that variable would be returned by a stored procedure at a SQL Server DB. So, I decided to populate the variable with static content:

    <xsl:variable name="hideColumns" select ="'ISBN,author_id,vendor_id'" />

Populated with the static content, the variable proved to be a good replacement for the real-life data. So, as soon as the stored procedure was deployed, my xslt template was readily updated with the appropriate select statement in the hideColumns variable declaration.