layoutit for ui generation

layoutit for ui generation layout it

Leave a comment

Filed under Technical Links

gridster for dashboards

http://gridster.net/

http://manifestwebdesign.github.io/angular-gridster/

 

 

Leave a comment

Filed under Technical Links

querying lucene

http://lucene.apache.org/core/3_5_0/queryparsersyntax.html

Leave a comment

Filed under Technical Links

Lucene example

NuGet Dependencies Lucene.Net and Lucene.Net.Store.Azure

namespace LuceneTest
{
class Program
{
static void Main(string[] args)
{
CloudStorageAccount acct = CloudStorageAccount.Parse(“DefaultEndpointsProtocol = http; AccountName = myAccount; AccountKey = myKey;”);
string catalog = “container”;
var directory = new AzureDirectory(acct, catalog);
var analizer = new StandardAnalyzer(Version.LUCENE_30);
var indexer = new IndexWriter(directory, analizer, IndexWriter.MaxFieldLength.UNLIMITED);

var doc1 = GetPersonDocument(“1224″, “John Doe”, “Main City”);
var doc2 = GetPersonDocument(“1225″, “Jane Doe”, “Other City”);
indexer.AddDocument(doc1);
indexer.AddDocument(doc2);
indexer.Commit();

using (var azureDirectory = new AzureDirectory(acct, catalog))
{
var reader = IndexReader.Open(azureDirectory, true);
var searcher = new IndexSearcher(reader);

Analyzer analizer1 = new StandardAnalyzer(Version.LUCENE_30); ;
string[] fields = new[] { “id”, “name”, “city” };
var parser = new MultiFieldQueryParser(Version.LUCENE_30, fields, analizer1);
string searchQuery = “name:Doe”;
Query query = parser.Parse(searchQuery);
int pageSize = 25;
TopDocs results = searcher.Search(query, pageSize);
var hits = results.ScoreDocs;

var items = hits
.Select(hit => searcher.Doc(hit.Doc))
.ToList();

var c = items;
}
}

static Document GetPersonDocument(string id, string name, string city)
{
Document doc = new Document();
var idField = new Field(“id”, id, Field.Store.YES, Field.Index.NO, Field.TermVector.NO);
var nameField = new Field(“name”, name, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.NO);
var cityField = new Field(“city”, city, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.NO);
doc.Add(idField);
doc.Add(nameField);
doc.Add(cityField);
return doc;
}
}
}

Leave a comment

Filed under Technical Links

Use grunt inside Visual Studio

http://visualstudiogallery.msdn.microsoft.com/359f4304-57d7-4178-9cab-165e2090dce2

Leave a comment

Filed under Technical Links

Controlling Application Pool Idle Timeouts in Windows Azure

Controlling Application Pool Idle Timeouts in Windows Azure

A question I hear from time to time is whether it’s possible to change the idle timeout time for IIS application pools in Windows Azure. It is indeed possible, and fairly easy to do with a startup task.

The default idle timeout value is twenty minutes, which means your app pool is shut down after twenty minutes if it’s not being used. Some people want to change this, because it means their apps are a bit slow after twenty minutes of inactivity.

To change the timeout to zero (which means “never”), add the following startup task declaration to ServiceDefinition.csdef:

<Startup>
  <Task commandLine="startup\disableTimeout.cmd" executionContext="elevated" />
</Startup>

And add disableTimeout.cmd in a folder called startup, with the following line of code (should be one line, split just for formatting):

%windir%\system32\inetsrv\appcmdset config -section:applicationPools
    -applicationPoolDefaults.processModel.idleTimeout:00:00:00

Be sure to mark disableTimeout.cmd’s “Copy to Output Directory” setting to “Copy always”.

Leave a comment

Filed under Technical Links

how to create and search a lucene index

http://www.thebestcsharpprogrammerintheworld.com/blogs/How-to-create-and-search-a-Lucene-Net-index-in-4-simple-steps-using-c-sharp-Step-1.aspx

Leave a comment

Filed under Technical Links