Saturday, August 20, 2016

What's the most natural way to show a passage of time between the prologue and chapter one?


In my current novel, the protagonist is driven forward throughout the plot by events that happened to him in the past. The reader needs to know these events, so I'd like to include them in a prologue. The prologue would take place nearly a year before the events of the rest of the novel.


Here's my question: How can I show how much time has passed between the prologue and chapter one? Is there some technique I can use that will seem natural?



Methods that won't work: Previously, I've included a bold header above the chapter, maybe with a date, maybe with a number of days later. I'm trying to veer away from this method though, because it doesn't lend itself to every kind of writing (this is just my personal opinion).



Answer



I'll refrain from standard cautions about the advisability of prologues vs. weaving the back story into the main story and assume that you've definitely decided a prologue is the way to go. With that in mind:


I think just having the first chunk labelled "Prologue" cues most readers that there's a time separation between Chapter One.


Beyond that, I think your technique will depend on the content of your prologue. If you have Joe getting blown up in the Prologue, in Chapter One you can have Joe testing his scars and musing about how they don't seem to be fading any more a year after the injuries. If Joe watches his true love walk away from him in the Prologue, have him still trying not to think about her in Chapter One, or have a friend mention that it's been a year since Jane left and it's time for Joe to start dating again. etc.


Textual cues, I'd say. But I can't give you more details about what they might be without knowing what happens in your prologue.


Friday, August 19, 2016

Is a cancel button necessary in a web form?


Personally I have never used it. I don't put information in a form and then decide everything needs to be cleared. I would edit one field.


Plus cancel in a UI suggests canceling an action which is in progress. Filling a form is not something in progress.



Would a "Clear All" button be more appropriate?




EDIT: (from merged question)


If "reset" buttons are not redundant, then why so? Give me a case where they are completey accepted, useful and maybe even encouraged/required?


If you feel obliged to put one in; does that imply that your form could be more usable?




correlation - What is the most stable, non-trivial dependence structure in finance?


The highest rated answer to the question on What concepts are the most dangerous ones in quantitative finance work? is this one:




Correlation



Correlations are notoriously unstable in financial time series [...]




My question
My question is a little bit broader than just about linear dependence, it is:
What is the most stable, non-trivial dependence structure in financial data?


With non-trivial I mean that I don't want answers that are about direct connections, e.g. between derivative and underlying.


The dependence structure can be either cross-sectional or through time with univariate time series, it can also be non-linear.


The context of my question is that I am preparing the documentation for a new machine learning R package I wrote and I am looking for a good showcase in the financial sphere. Now this is not a trivial feat given that correlations are notoriously... see above ;-)



Answer



It is hard to find a stable non-trivial dependence structure in financial data. Usually when such is found it is hard to rationalize.


One of my favorite (although I am sure there are others) is the so called "Presidential Puzzle". This is an old finding by Santa-Clara and Valkanov (2003) They find that "




Excess return in the stock market is higher under Democratic than Republican presidencies: 9 percent for the value‐weighted and 16 percent for the equal‐weighted portfolio.



At the time the finding was very robust and did not seem to be explained by anything else. What is more impressive is that 12 years later the result still holds true. We now have a very good out-of-sample period. This is confirmed by Pastor and Veronesi (2017) recent work. More interesting, they racionalize the finding by building a continuous-time general equilibrium model and conclude that:



When risk aversion is high, agents are more likely to elect the party promising more fiscal redistribution. The model predicts higher average stock market returns under Democratic than Republican presidencies, explaining the well-known “presidential puzzle.”



adobe photoshop - How can I upscale my low resolution to hi-res image



I have a low-res image would anybody explain to me the technique to make it high-res image? It would be really helpful if you could show me how can I improve the resolution, quality or bring out the elements from the image clearly.


enter image description here




Photoshop — convert 'overlay' layer to normal


I have 2 layers: first layer is just regular layer with some graphics, and second layer has additional graphics which are on top of the first and it has blending mode set to "Overlay".



What I need is to produce third layer (or just convert second layer) which will have blending mode set to Normal and if it will be displayed together with first layer it will give the same result as I get when first and second (overlay) layer are displayed.


I need this for splitting graphics to separate images for iPad/iPhone application I'm writing. If I just export overlaid layer, I'm getting wrong result in application.



Answer



In order to remove the blend mode and retain the appearance you'll need to do some masking.


Assuming the file is configured like so...


one


Here's what I would do.



  • Create a new layer above [layer 2]
    newlayer


  • Merge visible to this new layer. Hold down Option/Alt and choose "Merge Visible" from the Layer Panel menu.
    merge


  • Command/Ctrl-click the Layer thumbnail for [layer 2] to load that layer's contents as a selection




  • Click the New Mask icon at the bottom of the Layer Panel.
    Mask





You can then turn off visibility for [layer 2] and you'll have the same appearance.
end


Thursday, August 18, 2016

mobile - If all pages are linked in a menu, should a back button be provided?


If full navigation is provided for every page of a simple site, should there be a back button among its options?



Example Scenario: A mobile website has 4 child pages, all accessible via navigation on the home page:



  • Login

  • Contact Us

  • Store Locator

  • Jelly-Of-The-Month


Inside any of these 4 inner pages, a navigation bar is provided that has links to each of the 4 inner pages as well as the logo which returns the user to the homepage. The navigation bar is consist across all inner pages.


In this scenario, should the navigation bar also include a "back" button as the first/left element even though full navigation is always available?



Answer




I'm gonna have to say my answer is a big "no" to this. Check out the images at the top of this post showing a bunch of browser chrome/ device images: http://24ways.org/2011/raising-the-bar-on-mobile


Notice anything? They ALL have a back button - either hardware or software. Back on the web is a familiar action on the web - users know how to do it and expect it to work properly. This may be why the back button is also the most used button on desktop browsers (hence FF making it much larger than the forward button).


The second argument I'd make against this is that you don't know the context of how the website will be viewed. On iOS many apps (twitter apps are the prominent example that comes to mind) have embedded webviews with chrome of their own with a back button at the top. Stacked back like that gets to be pretty clunky and not finger-friendly, but then you also have the added complexity of two buttons in proximity that do very different things (back to the stream or browser back).


illustrator scripting - How to do animation frame pngs?


I wonder if there is any automated way of doing animations like on https://www.dropbox.com/


An image is really a set of frames that is cyckled through with javascript. What I would like to know is if there is an easy way to make each frame in Illustrator. I can of course do each frame manually but it is a very time consuming process.



Answer



You can create animations in illustrator. Its a bit slow, and the tools aren't really meant for that (but nothing a few scripts can not fix), Here is an example of something i did as test a few weeks ago, it took about 15-20 minutes to make.


enter image description here


Image 1: A quick thing I made for fun when I drew a picture for a post on engineering.SE


Here us the process I used I drew each image on a separate layer than then exported them as AI files with a script like this:


#target illustrator


var layers = app.activeDocument.layers
for(var i=0;i layers[i].visible = false;
}

for(var i=0;i layers[i].visible = true;
redraw();
var f = new File("d:\\temp\\test_"+i+".ai");
// hide next line to preview anim

app.activeDocument.saveAs( f );
layers[i].visible = false;
}

Now I wanted to use this in after effects so that i could do it better post processing on the thing if I wanted. So i exported each layer as a separate ai file. But you can directly make png files from illustrator if you want to assemble the thing in Photoshop, or some other tool like imagemagick.


PS: this script can be modified to use it as a preview of animation by commenting the line with save. This can help you anticipate problems.


Does something better exist?


Certainly, you can use after effects you can easily animate stuff in that. Or you could use a animation tool like flash, or indeed any 3D application. Many of the effects are also quite easy to conceive by making the frames with code. Some starter examples can be found for example here


Some related posts with tips:




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...