Archive for 'Development'

Rate limiting with Redis

The rate limiter pattern is a special counter that is used to limit the rate at which an operation can be performed.

There are a few classes of rate limiting or velocity checking you can do:

  1.  Per user or API key: ensure that any given user account or API account key holder can only perform (n) actions per minute.
  2.  Per IP address: ensure that any given IP address can only perform (n) actions per minute.
  3.  Per global action: ensure that a particular action can ...
Continue Reading →
0

AngularJS Filter

In this post we’ll analyze the filter functionality provided us by AngularJS.

Filter is a way to format the data displayed. There are several built-in filter but we can create our own filters.

To invoke filters, in the HTML code, we have to use the pipe (|) inside the double braces ( {{ }} )

For example, in this way we’ll capitalize all characters of string:

// result: TODAY IS A BEAUTIFUL DAY
{{ 'Today is a beautiful day' | uppercase }}

Continue Reading →
0

Sharing data between controllers in AngularJS

I wrote this article to show how it can possible to pass data from one Controller to another one.

There are two ways to do it, using a service or exploiting depending parent/child relation between controller scopes.
In this post, we’ll analyze the last one method.

It is possible to send data from parent controller to a child controller and viceversa.
To transmit data from the FirstController to SecondController, which the scope of the first one is parent to the scope of ...

Continue Reading →
0

Create an e-mail attachment by retrieving from the network

During an implementation of an existing project I have had to add a feature to send an e-mail with attachment that has to be a report of reporting services.

The chosen format is pdf so you need to get the parameters to be passed via url querystring to export the report in pdf format.

I have chosen to download the pdf file, and then I have attached them to the email on the fly without saving it to db or ...

Continue Reading →
0

Penetration testing: removing excessive HTTP response headers in Azure/IIS8

Headers response fields like:
1.    Server: the web server software being run by the site (examples: “Microsoft-IIS/7.5”, “Apache”)
2.    X-Powered-By: the collection (there can be multiple) of application frameworks being run by the site (examples: “ASP.NET”, “PHP/5.2.17”, “ ServiceStack/4.011”)
3.    X-AspNet-Version: obviously an ASP.NET only header (examples: “2.0.50727”, “4.0.30319”)
4.    X-AspNetMvc-Version: Again, you’ll only see this in the ASP.NET stack and typical examples include “3.0”, “2.0” and “1.0”.
can revealing critical information that may allow the server machine to become ...

Continue Reading →
0

AngularJS: Custom validation with Directives

Lately I’ve developed Self-Host ASP.NET Web API for our client with AngularJS as JavaScript MVW Framework I had to prepare a page where there was the need to configure the IP addresses and validate them through the control if already entered.

To do this I used a AngularJS directive for a custom validation.

Directive have the following elements:

  • require: this element allows directive to interact with the controller of the page
  • link: this element allows directive to access to the DOM of the page and inside ...
Continue Reading →
0

AngularJs – Call a js function after repeat ends its loop

How often you have to call a javascript function after the page load complete?
JQuery gives a solution that easily allow the user to manage this need and execute some block of code after all items of the page has been loaded.

A script like this, will be executed after the page is loaded:


$(document).ready(function() { ... });

…But…

… but what about calling a javascript function, using angularJs looking for a specific element of the page rendered by an ngRepeat loop?
Continue Reading →

0

Tip of the Day for Visual Studio: Peek Definition

With Visual Studio and Team Foundation Server we have a powerful solution for development and Application Lifecycle Management. In 4ward we use this solution everyday and, you know, there are so many interesting feature to discover! I want to share some useful tips for Visual Studio, in particular Visual Studio 2013 and Team Foundation Server 2013, and this is the first post of “Tip of the Day for Visual Studio” series by 4ward: let’s start!

In Visual Studio you can view ...

Continue Reading →
0

Tip of the Day per Visual Studio: Peek Definition

Con Visual Studio e Team Foundation Server disponiamo di una potente soluzione per lo sviluppo software e per l’Application Lifecycle Management. In 4ward usiamo questa soluzione quotidianamente e come saprai ci sono davvero tante feature interessanti da scoprire! Vorrei quindi condividere alcuni utili “tip” per Visual Studio, in particolare Visual Studio 2013 e Team Foundation Server 2013, e questo è il primo post della serie “Tip of the Day per Visual Studio” by 4ward: si parte!

Con Visual Studio è possibile ...

Continue Reading →
0

Christmas adventure in the ocean of .NET Software Development

This Christmas I made me a gift. Free time to study new technologies! A very difficult task when you’ve to deal with day by day activities.

Here’s as reminder a brief recap of what I’ve learned:

  • ServiceStack: superb WebService stack available on .NET and Mono. I was trying to use WCF Data Service on iOS and having some issues (performance and iOS 5 not supported in Obj-C client), then I found ServiceStack, Wow! Super easy to use, fully customizable, you get ...
Continue Reading →
1
Page 1 of 2 12