Monday, February 2, 2015

Sharpe ratio and leverage


Does leverage affect the Sharpe ratio? If my Sharpe is 2 at no leverage, does it change, fall by half say, at a different leverage?





popup - Discovering new features


I work with a web-based platform with lots of data and various tools to view the data, perform analysis. Users are often impressed by one or two features and stick with them. The platform adds new features regularly; too many and too often for most users (and the sales team) to keep up. We have release notes that are emailed out and the occasional press release, but we're still in search of organic ways for users to discover new features.


One idea we had was a pop-up that included "Did you know?" text and some graphics. We know that most users ignore these. Has anyone been successful with popups like that? Or Are there other interfaces that have seen more success?




adobe illustrator - Making anchor points visible all the time


Now I am working on compound paths and I need to remove all the redundant anchor points: so I press - and click some of them, but other ones are constantly disappearing, so I should click on V and click the path and - again, which is very disturbing.


Is there any way to make ALL the anchor points visible ALL the times? I don't speak about Cmd+H of course.



Answer



The goal of the question was to perform anchor points manipulations without loosing selection of different parts of compound objects or different objects. This type of selection is impossible.


However, I found very handy solution:



After selecting the Instrument (let's say Remove Anchor Point) we can easily temporary switch to Selection tool pressing Command/Control button and selecting the desired object, then leaving the button returning the selecting Instrument. That worked for me.


storyline - Is BDSM becoming mainstream?


Seems that in the last decade there is more and more stories with a BDSM arc.


For instance:



  • The Fifty Shades series

  • The Sword of Truth series

  • The Black Dagger Brotherhood series


I remember when I first read the Wizard’s First Rule and follow-ups; I was mildly shocked that it was a great success in spite of the sexual content.
(Since then I have been thinking that it may be because of the sexual content that the novels were so well received.)



So, is this a trend? Is exploring BDSM mores becoming more conventional?


Or is it just that in the aforementioned cases it is a direct result of cross-genre writing ( i.e. romance+erotica; fantasy+erotica; dark fantasy+detective+romance+erotica and other +s for the rather messy J.R. Ward stories)




Sunday, February 1, 2015

cs6 - Script to automatically snap all points to grid in Adobe Illustrator?


How would you write a script to move all points of all selected paths to the nearest (non-pixel grid) grid point?


Sample before and after alignment


e.g. I want all of the points of each polygon/path to snap to the nearest point on a custom grid. Mine is setup as 1 grid unit = 11.338px or 4mm, but ideally the script would extend to any unit value


MY PSEUDOCODE, v0.1:


// set grid units as pixels - in my case 11.338px = 8mm = 1 grid unit


units = 11.338


// Nested loop through all polygons/paths, then all points in each polygon

For each Polygon {

For each Point P in Polygon {


// move the Point x, y to the nearest grid point in units
P.x = units * Round(P.x/units)
P.y = units * Round(P.y/units)
}
}

Does this make sense? It's been a while since I've done any programming. I've also never scripted for Illustrator, so not exactly sure how to implement this.


LINK: I've looked at the post by @KromStern but not sure how to implement based on that thread. How to align all selected points to a grid?



Answer



Here you go, make sure the paths that you want to snap are selected:



  // jooSnapToDocumentGrid.jsx

#target illustrator

main();

function main(){
var grid = getDocumentGrid();
snapSelectedPathToDocumentGrid(activeDocument.selection, grid);
}


function snapSelectedPathToDocumentGrid(sel, grid){
for(var i = 0; i < sel.length; i++){
try {
var pp = sel[i].pathPoints;
for(var j = 0; j < pp.length; j++){
var p = pp[j];
p.leftDirection = nearestGrid(p.leftDirection, grid);
p.rightDirection = nearestGrid(p.rightDirection, grid);
p.anchor = nearestGrid(p.anchor, grid);

}
} catch(err) { }
}
}

function getDocumentGrid(){
var prf = app.preferences;
var ticks = prf.getIntegerPreference('Grid/Horizontal/Ticks');
var spacing = prf.getRealPreference('Grid/Horizontal/Spacing');
return spacing/ticks;

}

function nearestGrid(anchor, grid) {
return [Math.round(anchor[0] / grid) * grid,
Math.round(anchor[1] / grid) * grid ];
}

adobe illustrator - Cut strokes from other shapes via pathfinder


Im not that good in illustrator but i followed other people answers here with almost the same problems but didn't help. So i want to cut out the stroke from the other 2 path-s. I already made a Outline stroke effect and the other fonts are shapes too but with pathfinder won't cut as is except because this effect cut the full shape not the stroke and yes only the stroke and that other 2 path is selected...


What make i wrong here ? Thank you for the answers.


I want to cut out the stroke from the other 2 shape via pathfinder but won't work




Remove side symmetrically in Inkscape


I wish to draw a rectangle with no fill, but only a stroke. I would like to erase a certain portion of one side, going out from the middle. I have attached a picture of what I would like to obtain at the end:


enter image description here


I know how to make the box in Inkscape, but I haven't figured out how to remove the part in the middle such that it looks symmetric. Does anyone know if it is possible to achieve this latter feature in Inkscape?




technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...