Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.
Your profile
Tag cloud
.net ajax asp.net asp.net mvc c# chrome firefox google html ie8 iis internet explorer javascript jquery jtable mvc nancy node.js perl php rails razor ria ruby rubymine signalr silverlight sql server 2008 vb.net webmatrix
Authors
- Christiaan Baes (chrissie1) (86)

- SQLDenis (42)

- Eli Weinstock-Herman (tarwn) (17)

- Alex Ullrich (17)

- thatrickguy (12)

- Rob Earl (9)

- ca8msm (7)

- Naomi Nosonovsky (4)

- kaht (3)

- rwaters (2)

- pmch22 (2)

- David Forck (thirster42) (2)

- damber (1)

- emtucifor (1)

- Jes Schultz Borland (grrlgeek) (1)

- More...
Main Categories
Search
Google Ads
Latest Comments
In response to: Adding a jQuery Date Picker to Sharepoint
sam [Visitor]
will this this date picker a default if the date picker control is added .
Coz the current date picker doesnt serve itz purpose.coz you cant change the year like windows 7 date control.
Coz the current date picker doesnt serve itz purpose.coz you cant change the year like windows 7 date control.
In response to: Trying out Angularjs
Jason Lee [Visitor]
Ive googled this all day and haven't been able to get around this error. Closest Ive gotten was using jsonp instead of $http. Is there something I need to configure or set up to get this to work in local development and on a server.
I tried adding delete $http.default.headers.common 'x-requested-with'. Ive also tried writing the angular side about 50 different ways :)
XMLHttpRequest cannot load http://localhost:12116/plants. Origin http://localhost:51532 is not allowed by Access-Control-Allow-Origin.
I tried adding delete $http.default.headers.common 'x-requested-with'. Ive also tried writing the angular side about 50 different ways :)
XMLHttpRequest cannot load http://localhost:12116/plants. Origin http://localhost:51532 is not allowed by Access-Control-Allow-Origin.
In response to: There are now Visual studio project templates for Nancy
Danny [Visitor]
I just love Nancy and I think the templates are gonna be very useful. I can't wait to start using them.
In response to: Adding a jQuery Date Picker to Sharepoint
Mario [Visitor]
and in the newform.aspx code sets?
Thank You
In response to: Trying out Gibraltar's Loupe with Nancy
Christiaan Baes (chrissie1) [Member]
I don't lay patio's anymore, to much hard work. But I can still advice about how to do it right and even ask more money than the people that are going to do the hard work.
In response to: Trying out Gibraltar's Loupe with Nancy
Rachel [Visitor]
Thank you for checking Loupe out, Christiaan. Much appreciated. Like Kendall says, hopefully when Loupe Server is complete you'll take a look at that and see what you think.
On to other matters. I need some help laying a patio in my garden. Does the same sentiment for refusal apply in this case too? ;)
~ Rachel.
On to other matters. I need some help laying a patio in my garden. Does the same sentiment for refusal apply in this case too? ;)
~ Rachel.
In response to: Trying out Gibraltar's Loupe with Nancy
Kendall Miller [Visitor]
I'm from Gibraltar Software, the folks working on Loupe - Thanks for taking the time to check Loupe out!
The issue you saw where a live session is listed twice is a defect in the preview versions and we've fixed that for our next preview build. Typical ASP.NET applications would get their unhandled exceptions caught and logged, no ELMAH necessary but since we do that through the ASP.NET health system I'm guessing it didn't work out of the box with Nancy. Knowing that folks are looking to use Loupe with Nancy we may create an agent just for it to make it easier to get up and running.
Finally, Loupe Desktop is just the beginning of the story - I'd encourage you to give Loupe Server a try when we release the final version to see what it adds to the picture.
The issue you saw where a live session is listed twice is a defect in the preview versions and we've fixed that for our next preview build. Typical ASP.NET applications would get their unhandled exceptions caught and logged, no ELMAH necessary but since we do that through the ASP.NET health system I'm guessing it didn't work out of the box with Nancy. Knowing that folks are looking to use Loupe with Nancy we may create an agent just for it to make it easier to get up and running.
Finally, Loupe Desktop is just the beginning of the story - I'd encourage you to give Loupe Server a try when we release the final version to see what it adds to the picture.
In response to: Visual Studio 2005 error - "Project type is not supported by this installation"
Gustavo Gudinho [Visitor]
Thanks, this is a solution excellente, congratulations from Mexico.
In response to: Copying Buckets With The Amazon S3 API
Mesarim Vaher [Visitor]
Thanks for this inspiring piece of code. I like the way you use LINQ and your insightful discussion along the article. This is an excellent article! Thumbs Up.
Regards,
Messy V
Regards,
Messy V
In response to: Export HTML table to Excel with grid lines
Jerome [Visitor]
so helpful.. thx..
xmlns:x="urn:schemas-microsoft-com:office:excel // this line.. important too
xmlns:x="urn:schemas-microsoft-com:office:excel // this line.. important too
In response to: Export HTML table to Excel with grid lines
Per Hyyrynen [Visitor]
Thanks a lot! I was looking for a solution for this problem. Now I don't need to write an xlsx on top of our html exporter :)
In response to: Automated Web Testing with Selenium WebDriver
Abu Hamzah [Visitor]
How would it work with using dropdown (select)? let say if you want to change the text/value of an select how will you do? any thoughts?
In response to: Trying out Angularjs
TYler Brinks [Visitor]
One feature worth elaborating on is Angular's HTML5 mode. That allows any browser supporting the history API to ditch the hashbang and use standard URL paths with the option to gracefully fall back.
Having built a couple medium to large scale SPAs with Angular, I'd say it scales better than most of today's popular MV(*) JavaScript frameworks. It's on par with Ember, no doubt.
Having built a couple medium to large scale SPAs with Angular, I'd say it scales better than most of today's popular MV(*) JavaScript frameworks. It's on par with Ember, no doubt.
In response to: Angularjs and ng-grid
Petr [Visitor]
Please try add paging, sorting and filtering using Odata.
In response to: Trying out Angularjs
Hadi Hariri [Visitor]
IF you use $resource instead of $http, you get a higher-level abstraction and you don't have to deal with any of the HTTP calls.
@SQLDenis,
Yes, back in the old days it was just CGI or ISAPI, but things are also different. Back then it was very much client-server with HTTP. This is all about being client with server only acting as data and processing, thus improving the experience with a more fluid and responsive design.
@SQLDenis,
Yes, back in the old days it was just CGI or ISAPI, but things are also different. Back then it was very much client-server with HTTP. This is all about being client with server only acting as data and processing, thus improving the experience with a more fluid and responsive design.
In response to: Trying out Angularjs
Jonathan Channon [Visitor]
Nice work. I've been reviewing Angular myself. One thing you could do is make a separate service or repository if you will and that can get injected into your controllers!
In response to: Trying out Angularjs
SQLDenis [Member]
Yep, back in the year 2000 or so there was none of this stuff....no libraries, 2 browsers, php, asp, jsp, coldfusion or perl were the webstack technologies and that was pretty much what 93% of the world used
In response to: Trying out Angularjs
Christiaan Baes (chrissie1) [Member]
Oh yeah. I wish someone had a monopoly and take over this damn mess we call programming.
In response to: Trying out Angularjs
SQLDenis [Member]
Framework fatigue didn't kick in yet?
In response to: One Second Caching, Brilliant Or Insane?
ThatRickGuy [Visitor]
I would totally do it, and I would do it at the output level (squid). This isn't just limited to web interfaces, you can leverage this even in high volume applications as well. My current company has a data driven distributed application, and I'm looking to migrate as much of the data driven logic to generated code logic as possible. Anything we can do to drop data access, even cached data access, results in a massive performance increase. And seeing as how the data is static once the application is distributed, there's no reason to even make data access calls.
In response to: Nancy and jtable
Halil İbrahim Kalkan [Visitor]
Hi,
I'm the author of jTable. I'm very glad to see such a tutorial.
I put links to this posts on jTable.org: http://jtable.org/Home/Documents
Thanks a lot for this good tutorials ;)
I'm the author of jTable. I'm very glad to see such a tutorial.
I put links to this posts on jTable.org: http://jtable.org/Home/Documents
Thanks a lot for this good tutorials ;)
In response to: Making an interface for plugwise with nancy
Steven Robbins [Visitor]
Or a Raspberry Pi... :-)
In response to: Nancy and returning a pdf
peter [Visitor]
Kudos on using sumatra, not that daily-update-nightmare that is adobe reader.
Also note that itextsharp has its own licensing quirks.
Also note that itextsharp has its own licensing quirks.
In response to: Nancy and returning a pdf
Christiaan Baes (chrissie1) [Member]
@Steven I fixed it.
@Phillip I'll try to remember ;-).
@Phillip I'll try to remember ;-).
In response to: Nancy and returning a pdf
Phillip Haydon [Visitor]
Freaking out that you did a C# post!
I would change:
var isInteger = int.TryParse(parameters.id, out result);
if(isInteger && tree != null)
to
var id = parameters.id.Default(0);
if(id > 0 && tree != null)
It's much nicer to read :)
.Default is method defined on DynamicDictionary and allows you to specify a default. If you're unsure if the value would be parseable you can do.
var id = parameters.id.TryParse(0);
Which will give you 0 if it can't parse the value.
I would change:
var isInteger = int.TryParse(parameters.id, out result);
if(isInteger && tree != null)
to
var id = parameters.id.Default(0);
if(id > 0 && tree != null)
It's much nicer to read :)
.Default is method defined on DynamicDictionary and allows you to specify a default. If you're unsure if the value would be parseable you can do.
var id = parameters.id.TryParse(0);
Which will give you 0 if it can't parse the value.
In response to: Nancy and returning a pdf
Steven Robbins [Visitor]
You CanProcess method is wrong - not caring about the model is fine, but you need to be checking the media range that's passed in to see if it matches application/pdf. You current processor says "I am an exact match for every content type in existance" :)
In response to: Nancy and C# uploading and showing an image
Eli Weinstock-Herman (tarwn) [Member]
I'm not sure why, but while I was reading this I had a flashback to what this code would have looked like 10 years ago w/ classic ASP and it reminded me just how far we (web, .Net, LTD-ers) had come.
And the post content was neat also :)
And the post content was neat also :)
In response to: Nancy and C# uploading and showing an image
Jonathan Channon [Visitor]
Nice work! :)
In response to: Nancy and VB.Net: The bootstrapper
TheCodeJunkie [Visitor]
Also updated the Nancy.Testing documentation with information that you should always keep test in a separate assembly and why
https://github.com/NancyFx/Nancy/wiki/Testing-your-application
"Note! You should always keep your tests in a separate assembly than that of your application. The reason for this is the auto-discoverability that is used by Nancy to find and wire up a lot of things, including the Bootstrapper. If you keep your tests in the same assembly then isolation is going to be a lot more difficult."
https://github.com/NancyFx/Nancy/wiki/Testing-your-application
"Note! You should always keep your tests in a separate assembly than that of your application. The reason for this is the auto-discoverability that is used by Nancy to find and wire up a lot of things, including the Bootstrapper. If you keep your tests in the same assembly then isolation is going to be a lot more difficult."
In response to: Nancy and VB.Net: The bootstrapper
TheCodeJunkie [Visitor]
There is a much easier solution to your lifetime "issue". By convention, TinyIoc will treat interface dependencies as singletons and concrete dependencies as multi-instance
https://github.com/grumpydev/TinyIoC/wiki/Registration---lifetimes scroll down to the "Lifetime" section to read more about this
So what you should do is have an ITreeService and take a dependency on that. You are going to want that anyway for unit testing ;)
Hope this helps
/@TheCodeJunkie
https://github.com/grumpydev/TinyIoC/wiki/Registration---lifetimes scroll down to the "Lifetime" section to read more about this
So what you should do is have an ITreeService and take a dependency on that. You are going to want that anyway for unit testing ;)
Hope this helps
/@TheCodeJunkie
In response to: Nancy and VB.Net: the razor view engine
Phillip Haydon [Visitor]
The parameter is dynamic and has some extension methods off it.
You can do:
Dim poo As Int32 = parameter.id.TryParse(123)
If it can't parse to an int, it will return 123.
There's also Default(Of Int32)() Default(123) TryParse(Of Int32)()
Etc.
https://github.com/NancyFx/Nancy/blob/master/src/Nancy.Tests/Unit/DynamicDictionaryValueFixture.cs#L473
You can do:
Dim poo As Int32 = parameter.id.TryParse(123)
If it can't parse to an int, it will return 123.
There's also Default(Of Int32)() Default(123) TryParse(Of Int32)()
Etc.
https://github.com/NancyFx/Nancy/blob/master/src/Nancy.Tests/Unit/DynamicDictionaryValueFixture.cs#L473
In response to: Nancy and VB.Net: getting data in your page
Phillip Haydon [Visitor]
I think most Nancy users are using the Razor view engine so little effort has gone into explaining the SuperSimpleViewEngine.
Good to know though so we can make a better effort to flesh them out.
Good to know though so we can make a better effort to flesh them out.
In response to: Nancy and VB.Net
Phillip Haydon [Visitor]
Finally you got around to Nancy!!!
You don't need to put each Route* in it's own class. You can put the routes in related modules.
i.e an AccountModule, ProductsModule, etc. Then in there define all routes related to that module.
Products may have a /products/{id} and /products, which does listing and view.
You don't need to put each Route* in it's own class. You can put the routes in related modules.
i.e an AccountModule, ProductsModule, etc. Then in there define all routes related to that module.
Products may have a /products/{id} and /products, which does listing and view.
In response to: Taming RSS Feeds with XML::RSS and Template::Toolkit
Ngan Tengyuen [Visitor]
this tutorial is just what i've been searching the internet for, thanks for wirting. cheers
In response to: SignalR, Quartz.Net and ASP.Net
ton snoei [Visitor]
Ever thought of 'long polling' or comet programming.
In response to: SquishIt Integration with Amazon S3 / Cloudfront
Alex Ullrich [Member]
Glad to hear its working well for you! I didn't even think about the region thing, but the problem you ran into makes me happy that I didn't make any assumptions about how people are using the amazon services.
Thanks for sharing your experience - this post has basically become the readme for the library so it will probably save someone from running into the same issue you encountered :)
Thanks for sharing your experience - this post has basically become the readme for the library so it will probably save someone from running into the same issue you encountered :)
In response to: SignalR and VB.Net: Hubs and objects
Prasannanjaneyulu.K [Visitor]
Good
In response to: SignalR and VB.Net: Hubs and objects
Christiaan Baes (chrissie1) [Member]
Thanks I fixed that. Sorry.
In response to: SignalR and VB.Net: Hubs and objects
Someone [Visitor]
"Ass you can sse I use Clients.All.addMessage to send a message to all Clients with the id that was requested."
Can you please check the spelling before publishing . Instead of "As" you have written as "Ass"
Can you please check the spelling before publishing . Instead of "As" you have written as "Ass"
In response to: SquishIt Integration with Amazon S3 / Cloudfront
Daz Bradbury [Visitor]
Absolutely awesome.
I was hosting on Appharbor, and had a world of pain with RequestReduce, so switched to Squishit as the architecture is a lot more straight forward.
Initially, there were a few problems, as with multiple workers, I had the choice of putting things in the cache, or creating each bundle on application startup such that each worker would know how to process it.
Then I saw this article, and I have to say, it was a breeze to implement - I forked the repo thinking I would need to make some changes, but that worry was ill-placed.
I made a few modificiations to your initial config which were needed, namely:
a) When creating an s3client, if you're using a different region to the default US, you'll need to specify it as such (in this case, EUWest):
var s3client = new AmazonS3Client("accessKey", "secretKey", Amazon.RegionEndpoint.EUWest1);
Otherwise, Amazon will throw:
“Maximum number of retry attempts reached”
b) Part of the point in doing this, for me at least, was so static code is easily cacheable in production. As such, most users will probably want to add the following line to the renderer creation:
.WithHeaders(Amazon.S3.Util.AmazonS3Util.CreateHeaderEntry("Cache-Control", "public, max-age=3153600"))
Otherwise, this worked perfectly, injected my cloudfront url, and was a breeze!
Thanks for sharing!
I was hosting on Appharbor, and had a world of pain with RequestReduce, so switched to Squishit as the architecture is a lot more straight forward.
Initially, there were a few problems, as with multiple workers, I had the choice of putting things in the cache, or creating each bundle on application startup such that each worker would know how to process it.
Then I saw this article, and I have to say, it was a breeze to implement - I forked the repo thinking I would need to make some changes, but that worry was ill-placed.
I made a few modificiations to your initial config which were needed, namely:
a) When creating an s3client, if you're using a different region to the default US, you'll need to specify it as such (in this case, EUWest):
var s3client = new AmazonS3Client("accessKey", "secretKey", Amazon.RegionEndpoint.EUWest1);
Otherwise, Amazon will throw:
“Maximum number of retry attempts reached”
b) Part of the point in doing this, for me at least, was so static code is easily cacheable in production. As such, most users will probably want to add the following line to the renderer creation:
.WithHeaders(Amazon.S3.Util.AmazonS3Util.CreateHeaderEntry("Cache-Control", "public, max-age=3153600"))
Otherwise, this worked perfectly, injected my cloudfront url, and was a breeze!
Thanks for sharing!
In response to: Using PostSharp and log4net to Set Up Controller Logging in ASP.net MVC
James [Visitor]
Great tutorial. Curious if you have an updated code base for the latest release? Code is throwing errors for latest build of PostSharp.
In response to: Programatically create a sharepoint calendar entry
clem [Visitor]
If the list has SP Designer or other worklows associated with it, will they be executed when an item is added?
In response to: Create HTML from output of Perl::Critic
Jeff Thalhammer [Visitor]
Nice work -- this looks really sharp! I have lots of ideas to improve the perlcritic.com website, including inline violation reporting, like yours. Get in touch with me if you'd like to collaborate.
In response to: Taming RSS Feeds with XML::RSS and Template::Toolkit
Rob Earl [Member]
That'll teach me to make formatting changes at the last minute, thanks for pointing it out!
In response to: Using Multiple jQuery UI Sliders on a Single Page
Aniket [Visitor]
Hi,
Thanks for the code. Is it possible to display a label instead of the value? eg: When I slide to 4, it should display Good instead of 4.
Thanks for the code. Is it possible to display a label instead of the value? eg: When I slide to 4, it should display Good instead of 4.
In response to: Taming RSS Feeds with XML::RSS and Template::Toolkit
Dave Cross [Visitor]
Hi,
One little bug in your code and one suggestion for an improvement.
The bug: You're using single quotes around the end marker for your heredoc. That means that the heredoc will be treated as a single-quoted string and the \t won't be expanded to a tab character. Better to use double quotes there.
The improvement: If you use XML::Feed instead of XML::RSS then very similar code will be able to cope with Atom feeds as well as RSS feeds.
[Interesting. When I included examples of the heredoc syntax in this comment it caused a problem in your blog software. I've had to remove the examples in order to post this comment.]
One little bug in your code and one suggestion for an improvement.
The bug: You're using single quotes around the end marker for your heredoc. That means that the heredoc will be treated as a single-quoted string and the \t won't be expanded to a tab character. Better to use double quotes there.
The improvement: If you use XML::Feed instead of XML::RSS then very similar code will be able to cope with Atom feeds as well as RSS feeds.
[Interesting. When I included examples of the heredoc syntax in this comment it caused a problem in your blog software. I've had to remove the examples in order to post this comment.]
In response to: Using a Perl Singleton to Share Values Between Objects
Christiaan Baes (chrissie1) [Member]
So you will be divorcing soon and then go to Portugal again for your second wedding?
In response to: Using a Perl Singleton to Share Values Between Objects
Rob Earl [Member]
Portugal, near Lagos. I'd never been before, but I'll definately go again!
In response to: Using a Perl Singleton to Share Values Between Objects
SQLDenis [Member]
Congratz on getting married, where did you go on honeymoon?
In response to: Using a Perl Singleton to Share Values Between Objects
Alex Ullrich [Member]
And on the new blog post too ;)

LTD Social Sitings
Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.