How to get the intersection of two CGPath?

I am using CAShapeLayer.path and CALayer.mask to set up image mask, i can achieve “difference set” and “union” effect for CGPath by setting

maskLayer.fillRule = kCAFillRuleEvenOdd/kCAFillRuleZero

However, how can i get the intersection of two paths? I cannot achieve it with even-odd rule

Here is an example:
enter image description here

let view = UIImageView(frame: CGRectMake(0, 0, 400, 400))
view.image = UIImage(named: "scene.jpg")
let maskLayer = CAShapeLayer()
let maskPath = CGPathCreateMutable()    
CGPathAddEllipseInRect(maskPath, nil, CGRectOffset(CGRectInset(view.bounds, 50, 50), 50, 0))
CGPathAddEllipseInRect(maskPath, nil, CGRectOffset(CGRectInset(view.bounds, 50, 50), -50, 0))
maskLayer.path = maskPath
maskLayer.fillRule = kCAFillRuleEvenOdd
maskLayer.path = maskPath
view.layer.mask = maskLayer

read more

Link executes twice – First time no variables initialized, second time intiliazed

UPDATE

It appears that the controller itself is only executed once, however, the following url is executed twice!

<a class="th" style="width: 64px;" href="#details/{{user.id}}">
    <img src="http://localhost:8080/project/show/{{user.id}}.png"/>
</a>

Apparantely, my end controller (Spring) first sees {{user.id}} as a parameter and then the actual value. Why is this executed twice???

Link executes twice – First time no variables initialized, second time intiliazed

Create JSON in swift

I need to create JSON like this:

Order = {   type_id:'1',model_id:'1',

   transfer:{
     startDate:'10/04/2015 12:45',
     endDate:'10/04/2015 16:00',
     startPoint:'Ул. Момышулы, 45',
     endPoint:'Аэропорт Астаны'
   },
   hourly:{
     startDate:'10/04/2015',
     endDate:'11/04/2015',
     startPoint:'ЖД Вокзал',
     endPoint:'',
     undefined_time:'1'
   },
   custom:{
     startDate:'12/04/2015',
     endDate:'12/04/2015',
     startPoint:'Астана',
     endPoint:'Павлодар',
     customPrice:'50 000'
   },
    commentText:'',
    device_type:'ios'
};

read more

How do I set an alternate color in a SSRS Grouped Table?

I have a table with a [Name] Group and an [IDGrouping] that will output the following:

Table Description
Table Results

How do I set alternate colors to the table? For example, I want Adam to be green whereas Matt will be white and then Sam will be set to Green? Note: I want the rows adjacent to the names to be set to the respective colors too.

A secondary question as a follow up, how do I set the value rows to have different alternating rows? So for the [SummedNum] values for Sam, the first row will be red, second row will be white, third row will be red.

read more