How do I get a refund after purchasing an app from the Mac App store?

Question: I bought an app and it is so bad despite its low price that I am willing to spend time on getting a refund. How do I get the refunded after an app purchased through the Mac App Store?
Answer: Do the following steps

open up Your Account in iTunes by clicking Account inside iTunes Store
click see all in the Check Your Purchase History row
click the Report a Problem button
select the App from which you want to refund
explain and write a detailed reason why you think you should get a refund for the app
Comment: I did this once, about 6 months ago. When I try now, the "report problem" button sends me to Apple's support website ... did they change this?
Answer: The Mac App Store does not have automatic refund policy. First you have to contact the developer in case of any app issue. But if have bought it mistakenly, then you will not get refund.
For official MAS FAQ : http://support.apple.com/kb/HT4461
Comment: My experience has been an email from the iTunes store, they look you up to see if you've done this alot, asking for refunds--in my case, it was hitting the buy button for a dreadful $10 app in error--and the charge was immediately reversed.
Comment: But this is Mac App Store, not iTunes Store.
Answer: The Mac App store doesn't have an equivalent "Report a problem" link that iOS/iTunes app store customers can use to open a support ticket with the store billing support, so you might need to use general Billing Support for any Apple ID issue:

http://www.apple.com/support/appleid/

You should absolutely be clear (with screenshots if possible) to explain how the application failed to live up to the description that was available to you in the store - if the reviewers at Apple didn't catch a serious problem with the description of the goods as sold, I would expect most people to feel a refund would be a justifiable remedy. You are also free to contact the developer - reputable developers can and do offer refunds of either their share of your purchase and some even refund the entire purchase price - in effect paying Apple's cut even when they refunded your cost.
Lastly, you might use the generic feedback page after you have tried to get a refund to document how you felt about the Mac App store, the purchase tools and the complaint resolution process. I have found that nice but plainly honest complaints work best there.
http://www.apple.com/feedback/
There isn't a neat category for third party App Store purchase feedback - so in this case, you might tie it to either the OS or the Hardware as you see fit.
Answer: Always go to the apple refund. Which is Report a Problem about that. If it doesn't help, well maybe call them which may not actually help at all.


Help identifying part of window sash

Question: we are trying to identify what the beige plastic part of this window sash set up is. We have had a few of the plastic parts break on other windows and are trying to replace them. Our windows are extremely old (40+ years) so we haven't been able to identify the window manufacturer to narrow down what part this could be either. Any help Is appreciated!
Comment: 40 years is hardly _extremely_ old. I had smoothly operating original windows in my previous home from 1952. Those look like the sash supports (lift assist springs), though they're usually hidden when the sashes are installed properly. Do your sashes take a lot of effort to operate, or do they feel well balanced?
Answer: I dealt with similar issue recently.
Start by look in the corners of the glass, sometimes there are id codes there.
Some manufacturers put id stickers - usually on the top or bottom of the upper sash. For example: https://parts.andersenwindows.com/detail_WindowVintage__vintage.html
Usually with that information you can either call the manufacturer, or you can go to HomeDepot (or any other home improvement store) and have their window guy figure out what part you need.
Finally, you can take the plastic part off and check for part numbers - sometimes they are stamped on the part itself.
Good luck.

Help identifying part of window sash


How to design for large scale?

Question: I'm interested to know the processes involved in designing for large scale output i.e. billboards/ banners.
What Illustrator/ Photoshop document size should I work with. Do I work in a scaled size of the final output version? What resolution do I use? If I'm to use photographed images, what resolution should they be?
Would appreciate all the help I can get on this.
Thanks in advance. :)
Comment: Ask your printer. Also see [this post](http://graphicdesign.stackexchange.com/q/4925/23061) and [this one](http://graphicdesign.stackexchange.com/q/26354/23061)
Answer: Usually the printer will have guidelines about picture resolution (for bitmap images like photographs), and you should double check with whoever is producing the final product.
Typically, I've see requirements of 150 dpi on raster images.
When I design large-scale items, I will work on a 1/10 scale mockup (to keep my file sizes reasonable) and after client approval will scale the piece up to actual size before submitting it to the printer. If I'm using any stock photography, I make sure to purchase images of sufficient size to scale up without pixelation. Vector images, of course, don't have these kinds of restrictions.
tl;dr check with the printer, they will tell you what resolution they need in the final artwork

How to design for large scale?


Oil pressure light stays on for 4-5 seconds after cold start

Question: I own a Suzuki Swift diesel. When I start the car in the morning during first time in the day, the oil pressure light stays on for 4-5 seconds after engine has started. Also when I restart the car when engine is hot, light goes off immediately. Is this normal to have light come on during cold start as oil has all settled down to sump.
Answer: It's common for the oil pressure light to stay on longer from a cold start - as you rightly surmise, the oil has all settled down into the sump, and so it needs to build up pressure. Some diesels also use thicker oil than petrol cars, which will take longer to build up pressure (but equally will take longer to drain down).
How old is the car? it might be that the oil pump is starting to get a bit tired and so taking longer to build up pressure. It's also worth making sure you've got a decent filter on it - many cheaper ones don't have an anti-drain-down valve in them, so you also have to fill the filter each time you start from cold, instead of it staying full of oil.
Comment: Just wanted to add that there are cars around where an anti-drain-valve on the filter is neither part of the design nor allowed. Example : opel astra h z17dtj engine. The user manual explicitly states that this behaviour is normal and that the engine is designed for this
Comment: The car is just 1.5 years old. It has Fiat MultiJet 1.3 (1248 cc) engine. How much wear will this put on the engine everytime I start the car? Can it be the issue of oil pressure sensor?
Comment: Also the engine oil used is 15w40.
Comment: Is it synthetic oil?
Comment: Its part synthetic and part mineral oil. It is specified in car manual to use this grade of engine oil.


H5BP Ant Build Script - Event Handler Name Updating

Question: I've read that H5BP Ant Build Script "Updates your HTML to reference [the compiled] hyper-optimized CSS + JS files". Does that include references in the HTML to event handlers whose names have been changed by the minification process?
Answer: The Ant Build Script knows nothing about your inline event handlers. It's built with an eye towards the common method of using a library like jQuery to handle your event binding unobtrusively so even if closure compiler offers some export, you would have to adjust the build script yourself to have some task that rewrites the inline event handlers.
Comment: Since the original names can be exported, it isn't necessary to rewrite the handler calls, right?
Answer: It appears that I can accomplish this by exporting the names from the script (as described at https://developers.google.com/closure/compiler/docs/api-tutorial3#export) while using the ADVANCED_OPTIMIZATIONS flag.


Configure your mail with mail.app on Mountain Lion

Question: I have Macbook Air 2012 model (128 GB SSD) with Mountain Lion (10.8.2) and I am having difficulties trying to configure the mail.app. When I first tried to set-up my gmail account it started to sync my Macbook with my whole gmail account which is very huge (about 10 GB). Is there any way not to sync whole mailbox? Given the limited capacity of SSD I wanted to have something like we have on an iPhone where for instance only 1000 (or less) of emails messages would be stored locally.
Comment: By default Gmail syncs all mail folders (inbox, sent,...) using the IMAP protocol. To change what folders to sync to must enter your GMail account and customize the settings under **labels**.
Comment: this will take a long time, I do not use labels and gmail with google-like search options makes my life easier without them. Is there no possibility to set a message quota like we do on an iPhone?
Comment: No idea, you can right click on a folder in Mail.app to get more details, but I've never seen any options that limit the offline storage.
Comment: It takes about 5 min to define a "do-not-sync" label in Gmail, turn off syncing for it, apply it to all mails and create a rule to auto-apply it all future emails. That's probably easier than mucking around with Mail.app.
Comment: why can't there simply be an option which would allow do decide how many of recent emails to keep offline?.. Most of the time we just need on-going email conversations. If I need to search an older ones I could use internet.
Answer: I suppose that most of the space required by your mails is due to the attachments. In this case you can avoid to store tham.
Indeed, in Mail.app you can configure IMAP for keeping only the text for off-line viewing and not the attachments.

Go to Mail > Preferences
Go to the tab Accounts and select your account
Go to the sub-tab Advanced
In the first combo-box select "All messages, but omit attachments"
Comment: but what if I need an attachment from the letter eventually?
Comment: @ParvizBagirov When you decided to download an attachment it will be saved on your drive. You can later ask Mail to remove it. An alternative is creating a Mail Box where you move a copy of the mails with attachment that you tipically need offline.


Should I use a data.frame or a matrix?

Question: When should one use a data.frame, and when is it better to use a matrix?
Both keep data in a rectangular format, so sometimes it's unclear.
Are there any general rules of thumb for when to use which data type?
Comment: Often a matrix can be better suited to a particular type of data, but if the package you want to use to analyze said matrix expects a data frame, you will always have to needlessly convert it. I think there is no way to avoid remebering which package uses which.
Answer: Part of the answer is contained already in your question: You use data frames if columns (variables) can be expected to be of different types (numeric/character/logical etc.). Matrices are for data of the same type.
Consequently, the choice matrix/data.frame is only problematic if you have data of the same type.
The answer depends on what you are going to do with the data in data.frame/matrix. If it is going to be passed to other functions then the expected type of the arguments of these functions determine the choice.
Also:
Matrices are more memory efficient:
m = matrix(1:4, 2, 2)
d = as.data.frame(m)
object.size(m)
# 216 bytes
object.size(d)
# 792 bytes

Matrices are a necessity if you plan to do any linear algebra-type of operations.
Data frames are more convenient if you frequently refer to its columns by name (via the compact $ operator).
Data frames are also IMHO better for reporting (printing) tabular information as you can apply formatting to each column separately.
Comment: One thing I would add to this answer is that if you plan on using the ggplot2 package to make graphs, ggplot2 only works with data.frames and not matrices. Just something to be aware of!
Answer: Something not mentioned by @Michal is that not only is a matrix smaller than the equivalent data frame, using matrices can make your code far more efficient than using data frames, often considerably so. That is one reason why internally, a lot of R functions will coerce to matrices data that are in data frames.
Data frames are often far more convenient; one doesn't always have solely atomic chunks of data lying around.
Note that you can have a character matrix; you don't just have to have numeric data to build a matrix in R.
In converting a data frame to a matrix, note that there is a data.matrix() function, which handles factors appropriately by converting them to numeric values based on the internal levels. Coercing via as.matrix() will result in a character matrix if any of the factor labels is non-numeric. Compare:
> head(as.matrix(data.frame(a = factor(letters), B = factor(LETTERS))))
     a   B
[1,] "a" "A"
[2,] "b" "B"
[3,] "c" "C"
[4,] "d" "D"
[5,] "e" "E"
[6,] "f" "F"
> head(data.matrix(data.frame(a = factor(letters), B = factor(LETTERS))))
     a B
[1,] 1 1
[2,] 2 2
[3,] 3 3
[4,] 4 4
[5,] 5 5
[6,] 6 6

I nearly always use a data frame for my data analysis tasks as I often have more than just numeric variables. When I code functions for packages, I almost always coerce to matrix and then format the results back out as a data frame. This is because data frames are convenient.
Comment: @YZhang You'd need to store the labels for each factor and a logical vector indicating which columns of the matrix were factors. Then it would be relatively trivial to convert just those columns that were factors back into factors with the correct labels. Comments aren't good places for code, so see if the Q has been asked & answered before and if not ask a new question.
Comment: I've been wondering the difference between data.matrix() and as.matrix(), too. Thanks to clarify them and your tips in programming.
Comment: Thanks for sharing @Gavin Simpson! Could you introduce a bit more about how to go back from 1-6 to a-f?
Answer: @Michal: Matrices aren't really more memory efficient:
m <- matrix(1:400000, 200000, 2)
d <- data.frame(m)
object.size(m)
# 1600200 bytes
object.size(d)
# 1600776 bytes

... unless you have a large number of columns:
m <- matrix(1:400000, 2, 200000)
d <- data.frame(m)
object.size(m)
# 1600200 bytes
object.size(d)
# 22400568 bytes

Comment: the memory efficiency argument is really about `data.frames` offering more flexibility over column types. `data.frame(a = rnorm(1e6), b = sample(letters, 1e6, TRUE))` will be much smaller (6x by my quick calculation) in memory than the `matrix` version because of type coercion.
Answer: The matrix is actually a vector with additional methods. while data.frame is a list.
The difference is down to vector vs list. for computation efficiency, stick with matrix. Using data.frame if you have to.
Comment: Hmm, a matrix is a vector with dimensions, I don't see where methods come in to it?
Answer: I cannot stress out more the efficiency difference between the two! While it is true that DFs are more convenient in some especially data analysis cases, they also allow heterogeneous data, and some libraries accept them only, these all is really secondary unless you write a one-time code for a specific task.
Let me give you an example. There was a function that would calculate the 2D path of the MCMC method. Basically, this means we take an initial point (x,y), and iterate a certain algorithm to find a new point (x,y) at each step, constructing this way the whole path. The algorithm involves calculating a quite complex function and the generation of some random variable at each iteration, so when it run for 12 seconds I thought it is fine given how much stuff it does at each step. That being said, the function collected all points in the constructed path together with the value of an objective function in a 3-column data.frame. So, 3 columns is not that large, and the number of steps was also more than reasonable 10,000 (in this kind of problems paths of length 1,000,000 are typical, so 10,000 is nothing). So, I thought a DF 10,000x3 is definitely not an issue. The reason a DF was used is simple. After calling the function, ggplot() was called to draw the resulting (x,y)-path. And ggplot() does not accept a matrix.
Then, at some point out of curiosity I decided to change the function to collect the path in a matrix. Gladly the syntax of DFs and matrices is similar, all I did was to change the line specifying df as a data.frame to one initializing it as a matrix. Here I need also to mention that in the initial code the DF was initialized to have the final size, so later in the code of the function only new values were recorded into already allocated spaces, and there was no overhead of adding new rows to the DF. This makes the comparison even more fair, and it also made my job simpler as I did not need to rewrite anything further in the function. Just one line change from the initial allocation of a data.frame of the required size to a matrix of the same size. To adapt the new version of the function to ggplot(), I converted the now returned matrix to a data.frame to use in ggplot().
After I rerun the code I could not believe the result. The code run in a fraction of a second! Instead of about 12 seconds. And again, the function during the 10,000 iterations only read and wrote values to already allocated spaces in a DF (and now in a matrix). And this difference is also for the reasonable (or rather small) size 10000x3.
So, if your only reason to use a DF is to make it compatible with a library function such as ggplot(), you can always convert it to a DF at the last moment -- work with matrices as far as you feel convenient. If on the other hand there is a more substantial reason to use a DF, such as you use some data analysis package that would require otherwise constant transforming from matrices to DFs and back, or you do not do any intensive calculations yourself and only use standard packages (many of them actually internally transform a DF to a matrix, do their job, and then transform the result back -- so they do all efficiency work for you), or do a one-time job so you do not care and feel more comfortable with DFs, then you should not worry about efficiency.
Or a different more practical rule: if you have a question such as in the OP, use matrices, so you would use DFs only when you do not have such a question (because you already know you have to use DFs, or because you do not really care as the code is one-time etc.).
But in general keep this efficiency point always in mind as a priority.
Answer:
Matrices and data frames are rectangular 2D arrays and can be
  heterogeneous by rows and columns. They share some methods and
  properties, but not all.
Examples:

M <- list(3.14,TRUE,5L,c(2,3,5),"dog",1i)  # a list
dim(M) <- c(2,3)                           # set dimensions
print(M)                                   # print result

#      [,1]  [,2]      [,3]
# [1,] 3.14  5         "dog"
# [2,] TRUE  Numeric,3 0+1i

DF <- data.frame(M)                   # a data frame
print(DF)                             # print result

#      X1      X2   X3
#  1 3.14       5  dog
#  2 TRUE 2, 3, 5 0+1i

M <- matrix(c(1,1,1,1,2,3,1,3,6),3)   # a numeric matrix
DF <- data.frame(M)                   # a all numeric data frame

solve(M)                              # obtains inverse matrix
solve(DF)                             # obtains inverse matrix
det(M)                                # obtains determinant
det(DF)                               # error

Answer: Here is an interesting result.  Working with matrices vs tibbles is faster but the difference shrinks as the matrix gets larger. Note the overhead of converting a tibble to a matrix is larger than for converting a tibble to a matrix. As a broad generalization, working exclusively (no type coercion) in matrix space is about 20% faster than working in dplyr space.
library(dplyr)

# big (?) matrix
m <- matrix(runif(50000), 10000, 5, dimnames =list(NULL,c(letters[1:5])))
d <- as_tibble(m)

# return a matrix, convert tibble to matrix after operation
bench::mark(
   zm <- apply(m, 2, FUN = \(x) cumprod(1+x)*100),
   zd <- d |>
      mutate(across(everything(),.fns = \(x) cumprod(1+x)*100)) |>
      as.matrix()
)
#> # A tibble: 2 × 6
#>   expression                             min median `itr/sec` mem_alloc `gc/sec`
#>   <bch:expr>                          <bch:> <bch:>     <dbl> <bch:byt>    <dbl>
#> 1 zm <- apply(m, 2, FUN = function(x… 5.49ms 5.66ms      176.    2.52MB     8.67
#> 2 zd <- as.matrix(mutate(d, across(e…  6.9ms 7.05ms      140.    3.54MB     4.17

# return a tibble. Convert matrix to tibble after operation
bench::mark(
   zm <- as_tibble(apply(m, 2, FUN = \(x) cumprod(1+x)*100)),
   zd <- d |>
      mutate(across(everything(),.fns = \(x) cumprod(1+x)*100))
)
#> # A tibble: 2 × 6
#>   expression                             min median `itr/sec` mem_alloc `gc/sec`
#>   <bch:expr>                          <bch:> <bch:>     <dbl> <bch:byt>    <dbl>
#> 1 zm <- as_tibble(apply(m, 2, FUN = … 5.71ms 5.92ms      167.    2.87MB    11.7
#> 2 zd <- mutate(d, across(everything(… 6.72ms 6.85ms      144.  788.62KB     4.18

# small matrix
m <- matrix(runif(500), 100, 5, dimnames =list(NULL,c(letters[1:5])))
d <- as_tibble(m,.name_repair = "unique")

# return a matrix
bench::mark(
   zm <- apply(m, 2, FUN = \(x) cumprod(1+x)*100),
   zd <- d |>
      mutate(across(everything(),.fns = \(x) cumprod(1+x)*100)) |>
      as.matrix()
)
#> # A tibble: 2 × 6
#>   expression                            min  median `itr/sec` mem_alloc `gc/sec`
#>   <bch:expr>                        <bch:t> <bch:t>     <dbl> <bch:byt>    <dbl>
#> 1 zm <- apply(m, 2, FUN = function…  24.1µs  27.2µs    29303.    35.8KB     17.6
#> 2 zd <- as.matrix(mutate(d, across…  1.69ms  1.79ms      548.    19.2KB     17.6
# return a tibble
bench::mark(
   zm <- as_tibble(apply(m, 2, FUN = \(x) cumprod(1+x)*100)),
   zd <- d |>
      mutate(across(everything(),.fns = \(x) cumprod(1+x)*100))
)
#> # A tibble: 2 × 6
#>   expression                           min   median `itr/sec` mem_alloc `gc/sec`
#>   <bch:expr>                      <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl>
#> 1 zm <- as_tibble(apply(m, 2, FU…  111.3µs  126.1µs     7586.    39.9KB     19.2
#> 2 zd <- mutate(d, across(everyth…   1.63ms   1.72ms      565.    15.2KB     17.1

Created on 2023-07-03 with reprex v2.0.2

Should I use a data.frame or a matrix?


Computational Cost of bilinear maps

Question: What is the exact computational complexity in absolute operation numbers (multiplications, exponentiations, etc) of a bilinear map evaluation both for symmetric and asymetric groups. And how this is comparable with exponentiation?
Answer: This question can't be answered exactly, because it depends on a lot of the actual details of the realization. But as a rule of thumb: They cost a lot. In fact they cost so much, that in any protocol they are the sole determinator of the computation time and you can neglect the other operations.
First, keep in mind that usually bilinear maps are realized with elliptic curves. There is no straight forward bilinear maps in $\mathbb{F}_p$, which can be used for cryptographic tasks. Currently the only known constructions for (cryptographically useful) pairings are:

Weil pairing
Tate pairing

So first we need to consider the elliptic group operation, where the number of operations (addition, multiplication, etc.) can vary. Looking at the definition of the Weil pairings, we soon get to the following conclusion:

There is an integer $n$, which is chosen at the setup, but its role isn't that clear to begin with.
There is a function $F$ (on values $P,Q$), which just has to fulfill some property, but isn't specified any further. But the definition of the divisor has a sum, where the number of addends are linear in $n$, so the compuational complexity of $F$ will depend somehow on the choice of $n$.
The function definition $w(P,Q):= F/G$ has the $n$-th roots of unity as its image. Thinking of the bilinear map, this is the target group. And for cryptographic purposes we need a group where the discrete logarithm is hard in the target group, so we can conclude that $n$ has to be large.

This already shows, that unless you specify exactly what kind of elliptic curve and which kind of Weil pairing (or Tate pairing) you have, you can't state an explicit number of operations.
For further information I would suggest reading Pairings for beginners from Craig Costello, which also has plenty of examples with numbers.
Comment: well still this is not clear to me. For example with PBC library you can evaluate a paring in terms of microseconds
Comment: If you want to evaluate any specific implementation, I'd suggest testing it and measuring the timing, possibly with different parametrizations. But with all the possibilities for different implementations and optimizations, I don't think you can state a general rule for exact numbers.
Comment: I want to evaluate the computational cost in terms of algebraic operations

Computational Cost of bilinear maps


What does the phrase "keep fishing" mean?

Question: I found the phrase "keep fishing in this sentence: If you think I love you, keep fishing. What does the phrase "keep fishing" really mean?
Comment: Without additional context it's pure guesswork. Where did you find the phrase?
Comment: "Oh girl, when I'm in love with you
Keep fishin' if you feel it's true"
Answer: Hard to say. It could mean:
If you think I love you, you've caught the wrong idea and should keep trying for a better thought.
If you think I love you, keep trying and I might come around.
If you think I love you, try if you want to but it's hopeless (delivered with sarcasm).
I'd probably go for the first one.


install JRE 1.6 on 1.5 JDK

Question: I have Oracle JDK and JRE 1.5 installed  ubuntu LTS. I want to keep JDK 1.5 and install Oracle JRE as 1.6. please let me know the steps or any clear source where I can get this done
Answer: Take a look at the answer to this question, should be helpful: How to intall Oracle JDK 32bit on Ubuntu 12.04 64bit along side the 64bit oracle jdk
You can use the same script (or ~/.bashrc, ~/.profile) to set JRE/JDK you want. For browsers, you can create symbolic link in ~/.mozilla/plugins to JRE 1.6 (e.g. /path/to/jdk1.7.0_25/jre/lib/amd64/libnpjp2.so) so that Firefox, Chrome, Chromium uses 1.6 instead of 1.5.
BTW: I would recommend using Java SE 7, no point to use 6.

install JRE 1.6 on 1.5 JDK


Where can I find the manual for the Turbografx/Virtual Console version of SimEarth?

Question: I downloaded SimEarth for academic purposes. The problem is that I'm not used to strategic games and I don't get this game (I don't know how to play it and what to do and so on). Is there a detailed manual on the Internet which explains all the options and symbols and which describes to me what I have to do exactly? The Manual in the Wii explains it little bit and also the symbols, but it's very hard to switch between game and manual all the time. Or is there a tutorial?
Comment: The answer to where can I find the manual for X is always [replacement docs](http://www.replacementdocs.com/).  Feel free to ask more detailed questions regarding how to play the game - I don't know if there is a tutorial, but I imagine there are people around here who have played SimEarth in the past.
Answer: Here is the manual for the SNES version, which has different controls but should offer better explanation for the game.
Answer: The manual might give you the controls and a basic overview, but what you may want to look at is a FAQ/Guide or a Let's Play video walkthrough.
For instance, here's a Let's Play of SimEarth:

In addition to watching someone play the game with commentary and sometimes extra information, you'll get an idea as to how to complete particular challenges and where the tough parts are.
GameFAQs is generally a reliable site for game walkthroughs, although for this game they currently only have ones targeting the PC version.  The changes might be minor enough not to make a difference, so you might want to check it out.  A game FAQ is generally going to have more detailed explanations of the game mechanics, and less "funny" commentary which you might not be interested in.


How do I get the URL section to show use a different domain in the WordPress Admin?

Question: I am currently using a headless WordPress with NextJS and making adjustments in custom plugin index.php file.
Within the admin, I am trying to create a better user experience for our content writers and I was able to get the post_row_actions hook to work in swapping out the the main domain...
I was also able to get the icon at the top to view the post with the new domain; however, I am unable to get the actual URL link when you click on it to use the new domain name....
The first screenshot is a popup if you click on the URL on the sidebar and that does not work.

The following code is used to adjust the top two screenshots:
function my_custom_sample_permalink($permalink) {
  $new_permalink = str_replace(home_url(), 'https://preview.domain.com', $permalink);

  // Return the modified permalink.
  return $new_permalink;
}

add_filter('get_sample_permalink', 'my_custom_sample_permalink', 10, 1);

The problem that I am having is that the link outlined in the screenshot by black marker is NOT going to the preview.domain.com page, but is showing the correct domain on the link.
Answer: You can use the post_link filter to do this.
Example:
function modify_post_link( $url, $post, $leavename=false ) {
  if ( $post->post_type == 'post' ) {
    $url = str_replace(home_url(), 'https://preview.domain.com', $url);
  }

  return $url;
}
add_filter( 'post_link', 'modify_post_link', 10, 3 );

In fact, with this you don't even need your previous filter for get_sample_permalink.


Story teller dilemma

Question: Without the ability to use proper grammar and no knowledge of punctuation and the convoluted intricacies of writing techniques will a book reviewer reject a story written in person of no education writing their story
I have written many times in this unorthodox fashion without submitting final versions .
Comment: It's difficult to tell exactly what your question is, as it's written in the style you discuss. Are you looking for advice pertaining to the character or to the writer? IMO questions posted in a writing forum should be as carefully written as anything else you write. A couple punctuation marks would do your question wonders.
Answer: Give me a break - this isn't a "knowledge" issue - if you can write about "the convoluted intricacies of writing techniques," you can at least put a question mark at the end of your sentence.
If you chose to use a non-standard style, you'd better be damn sure you use it WELL. In this case, I don't see how your style added anything to your post, so, no, I wouldn't think a novel written in this style would be successful.
Answer: Are you capable of writing with proper grammar and punctuation and you think this "unorthodox fashion" is more appealing for some reason? Or do you not know how to use proper grammar and punctuation?
If you don't know how, I'd say, "learn". There are times when it is effective to break the rules. But if you don't know what the rules are or what the purpose of the rules is, you are not in a position to say whether breaking them is a good idea or not.
It's not that hard to learn proper grammar. When I graduated high school I had very little knowledge of grammar. My first year of college they made me take a remedial English class. In one semester I learned about 90% of what you need to know. Buy a grammar book and study it. If you made a serious effort you could learn the most important rules in a couple of weeks, I would think. If you said you had a very limited vocabulary or problems with spelling, correcting that would require memorizing a lot of words, something that could take a long time. But something like proper punctuation ... it's not like there are thousands of punctuation marks to learn. There are, what? -- period, question mark, exclamation, comma, apostrophe, quote, colon, semi-colon, hyphen -- nine that are used routinely. Some of those have several uses, but it's not like there are hundreds of rules to learn, more like maybe 20 or so. (Depending on how you count, etc.)
Answer: Short answer: Write in the character's voice and develop your own writing style.
Long answer: If poor grammar and technique are intrinsic to the character/narrator, editors will tolerate it to a point (to what point exactly, though, is a risk you take as a writer). If poor grammar and technique are intrinsic to the writer's abilities, they will most likely reject the story within a few sentences. If they read your cover letter, you could get rejected even quicker. While "outsider art" is welcomed in the visual art world, outsider art in text is very difficult to get accepted unless an editor decides to champion it.
Answer: I had trouble just following this post. Generally, if the book is good and able to hold it's own, if can succeed even without an orthadox style of writing. Otherwise, it won't do well.

Story teller dilemma


how can I align the text of my label in swift so that it starts in the top left corner of the label?

Question: I have a textfield with lines property set to 0, so that when the text is longer it will automatically fill all the necessary space. But when the string is short, it is automatically placed in the middle of the label, it looks like this:

Is there a way (or maybe a property to set) of putting this text in the top left corner? This is my attribute inspector for that label:
Answer: If you are using Autolayout you can try to set only top, left and right constraints without any height constraint. That should work, but if you are not using Autolayout or you are having trouble changing these constraints you can also call label.sizeToFit() after setting the text.
To call sizeToFit, if you are setting the text on viewDidLoad or in the Storyboard itself, you can call it on viewDidLayoutSubviews:
override func viewDidLayoutSubviews() {
    label.sizeToFit()
}

Answer: This really should be a default option in Xcode, you could use the work around in the other answer or alternatively just use a TextView which by default gives you the top left behaviour you're looking for
Answer: you would think this would be easy, but it appears to not be.  There's a good solution outlined here how to set top left alignment for UILabel


App for analyzing installers

Question: Is there an app which shows contents of a .pkg file and shows which files an installer copies to my mac, what scripts it runs and so on?
Answer: You can extract package files and sort through their contents without actually installing them. To do this, you can often just right-click on a .pkg file and select "Show Package Contents" – but that isn't always displayed.
If that option is unavailable, you can extract .pkg files using a command line tool called pkgutil that is bundled with OS X. Launch Terminal.app and enter the following:
pkgutil --expand /path/to/package.pkg /output/destination/

Hint: you can drag & drop items into the Terminal to print their full path, making this tip easier by typing: pkgutil –expand [drop file here] /destination/path/.
After that, you can go to the output path in the Finder and check out the extracted files.
Source
Answer: Yes, there's a shareware app called Pacifist ($20).  I've used it for years, and it works wonderfully well (even on old Macs).

Alternatively, you can download a free QuickLook extension for blazing fast previews of packages.  It's called SuspiciousPackage.
Comment: I see this was edited to say that Pacifist is shareware, but you can use it for an indefinite period of time without purchasing the software.  In a sense it's nagware.

App for analyzing installers


upgrade Ubuntu 16.04 without losing data

Question: I am using Ubuntu 14.04 LTS. I want to upgarde to Ubuntu 16.04 via the software updater application. I have lots of data in my laptop. Also I am having useful softwares related with my work.  Now I wish to upgrade my system without losing any data and software. Ca n I do it?. or else what is the procedure to upgrade Ubuntu without losing old data.
Comment: I do recommend AT ALL COSTS to BACK UP YOUR DATA.  I have worked with so many people with "I lost my data!  Help!" that have been unable to recover it that I always say, "Back up your data!"  The only data you don't need to have backed up - regardless of any updates - is data you want to lose.  That being said, data recovery is one of my favourite arenas - except when it doesn't work.
Comment: It's probably a good idea to wait until the first point release 16.04.1 - then a prompt to upgrade will originate with software updater.  No matter your decision - BACKUP your data first.
Comment: "I have lots of important data" together with "I don't have a backup" should never appear in any phrase... backup. Daily. If it's really important, in two different media.
Answer: As @Mark Kirby says, this is a probable duplicate of "Can I smoothly upgrade from one LTS to next LTS release?". The basic answer, is yes you can upgrade smoothly from one LTS (long term service) release (say 14.04 LTS) to another (say 16.04) without installing intermediates.
You can do this for Desktop LTS releases with the commands:
sudo do-release-upgrade

or
sudo update-manager -d

... and for the Server LTS releases with the commands:
sudo apt-get install update-manager-core
sudo do-release-upgrade

HOWEVER, I would say that I've watched plenty of "tested" software that's relatively widely used break, malfunction, or otherwise work improperly, so I would suggest a basic backup of your home directory to an appropriate form of external storage, i.e.
mkdir /mnt/<external storage>/May_30_2016_Backup_Ubuntu_16_04_Upgrade
cp -rf ${HOME}/* May_30_2016*/ &

This is generally a good practice, as even if everything works perfectly, maybe your hard drive dies tomorrow (also has happened to me).  Now you'll be thankful you have that backup, even if you didn't seemingly need it.


Do solar panels generate more electricity in hot or cold climate?

Question: Do solar panels generate more electricity in hot or cold climate? Who is right (sorry for the messiness, I currently don't know how to take a long screenshot)?
Comment: All I see is a pile of missing images. This is a terrible question. Please add a description or transcript.
Answer: If the amount of radiation stays the same, solar panels produce more energy when they are cooler. Heat causes efficiency to suffer.
However, this is assuming the radiation amount is the same. Usually it isn't. If you consider a place that's very cold, so cold that there's snow, usually there's a reason for that. The reason being that it's winter season and the sun shines for only 5 hours per day if there are no clouds. The sun angle is also very low. The combination of low sun angle and low sunshine amount per day means that in areas that are periodically cold, practically no solar power is generated during the winter season. The summer season on the other hand has very good production figures.
If solar power is heavily seasonal, it's far less useful than it would be if you get about the same energy production every day throughout the year. It means you have to store energy during summer and consume it during winter. The trouble is, no battery or pumped hydro plant has the possibility to store such energy amounts. The only feasible solution is hydrogen but its poor 38% electricity-to-hydrogen-back-to-electricity-again efficiency and the high cost of conversion equipment (electrolysers, combined cycle power plants) and the high expense of storing large amounts of a gas that has low voluminous energy density make using hydrogen for seasonal energy storage very expensive.
Usually in climates that actually get cold in the winter, the preferred power production is wind power. At least you get wind power during all seasons of the year. Solar power is mainly useful in areas where the sunshine amount doesn't vary much between seasons, and so you can charge a battery every day and discharge it every night. That's 365 cycles per year as opposed to 1 cycle per year in seasonal energy storage. Your battery just became 365 times cheaper.
So, although solar panels produce more electricity when they're cold, you really don't want to rely on solar panels in climates where the weather can get cold in the winter.
Comment: I didn't understand this part, please explain: "That's 365 cycles per year as opposed to 1 cycle per year in seasonal energy storage. Your battery just became 365 times cheaper."
Comment: If you have summer that's 182.5 days long and you want to store 2 GWh per day during summer, you need 365 GWh battery. If you have daytime that's 12 hours long and you want to store 2 GWh per day (0.0833 GWh per hour), you need 1 GWh battery. A 1 GWh battery is 365 times cheaper than a 365 GWh battery.
Comment: Your calculations, if I understand correctly, assume there's zero sun during winter in places like Siberia. It's not the case
Comment: In Siberia, there's only few hours of sun every day in winter. Also the sun angle is low. This has two effects: the sunlight has to travel through a large mass of air, reducing its intensity. Also if you orient the solar panels for good production around the year, the low sun angle in winter means the angle of the solar panels is inoptimal.
Comment: Usually it doesn't make sense to mount solar panels on automatically tilting platforms. The reason being that today, the solar panel is cheaper than the platform!
Comment: there are around 8 hours of sunlight in January in the city I'm from (https://ibb.co/6NLdVL6). Is it not enough? Also, why can't the angle be tweaked for winter? Are they really so expensive, the platforms?


Please wait screen in asp.net

Question: The home page of my website and some other page also are taking some time to load, instead of making them load fast, I want some please wait screen or progress bar and mean while the required page would be loaded behind.
Is there any way to do it?
Thanks in advance
Answer: you can try with Ajax Update-Panel

Please wait screen in asp.net


Estimate about interior elliptic regularity!

Question: In the paper Monotonicity for Elliptic Equations in Unbounded Lipschitz Domains - Berestycki - Caffarelli - Niremberg, they use the estimate "obtained by interior elliptic regularity": if $B=B_\rho(y)\subset\Omega$ and $|x-y|\leq\rho/2$, then
$$|u(x)-u(y)|\leq \widehat C\max_Bu\cdot\left(\frac{|x-y|}{\rho}\right)^\gamma+\widehat C\rho^{2-\gamma}|x-y|^\gamma,$$
for $\gamma\in(0,1]$. Someone can help me to obtain this estimate? Thank you.
Answer: I don't know why they write $\gamma$ there. Observe that $\gamma\to a^\gamma$ is a decreasing function of $\gamma$ for any fixed base $0<a<1$. Here we have
$$
\frac{|x-y|}{\rho}\le \frac12
$$
and since the right hand side is
$$
\widehat C\max_Bu\cdot\left(\frac{|x-y|}{\rho}\right)^\gamma+\widehat C\rho^{2}\left(\frac{|x-y|}{\rho}\right)^\gamma
$$
it is a decreasing function of $\gamma$. Thus, it suffices to prove the estimate for $\gamma=1$. Theorem 3.9 in Gilbarg-Trudinger (used with $\Omega=B$) gives the gradient bound
$$
 \sup_{B_{\rho/2}(y)} |\nabla u| \le \frac{C}{\rho}\left( \sup_B |u| + \rho^2 \sup_B |\Delta u|\right)
$$
Recalling that $\Delta u$ is uniformly bounded, and using the mean value theorem, we obtain
$$
|u(x)-y(y)| \le \frac{C}{\rho}|x-y|\left( \sup_B |u| + \rho^2 \sup_B |\Delta u|\right)
$$
for $x\in B_{\rho/2}(y)$.
Comment: The $\gamma$ is used to prove that $u$ is Hölder Continuous. In the paper, we use this estimate to prove this. Can I use this estimate argument for each $\gamma\in(0,1]$? 5PM, you answered an another question to me here: http://math.stackexchange.com/questions/284506/a-problem-about-convergence but I have one more doubt, about the uniform convergence of the Laplacian (the $C^2$-convergence). Do you know what implies this convergence? Thank you very much!!!
Comment: I didn't understand why the right hand side is a decreasing function of $\gamma$. Could you explain it?
Comment: @JoséCarlos I updated my answer with more detail. I'll get back to the convergence question..
Comment: Thank you very much @5PM.
Comment: I am waiting your help in the other question @5PM! Thank you!


Quickly Empty Trash in Mac OS X

Question: Emptying the trash in OS X can be a long process, especially If you have lots of items (like me). This is after 5 minutes:

Is there a way to quickly empty the trash, or make the process a whole lot quicker?
Comment: And why does it take so long in the first place anyway?
Comment: @Thilo: The Finder does some extra work of deleting files from all the devices attached to a computer, overriding permissions if necessary (using a subprocess called Locum), file stats, among others.
Answer: If you do it through the Terminal it is nearly always considerably faster:
rm -rf ~/.Trash/*
However it can be noted that this won't delete files that appear in your Trash from external hard drives, other partitions, etc. Those files are stored at /Volumes/NAME_OF_DEVICE/.Trashes/USER_ID where USER_ID is your user ID. (Usually 501 on a single user system) and you'll have to remove them using a second command. (sudo rm -rf /Volumes/*/.Trashes/501/* should do all of them for you)
As always when using rm -rf be completely sure the path you've typed into the Terminal is correct or you're liable to delete much more than you mean to. (eg. a space before a * is never good)
As to why the Finder takes so long, the Finder does some extra work of deleting files from all the devices attached to a computer, overriding permissions if necessary (using a subprocess called Locum), file stats, among others.
Comment: Okay, this time I did. Depends on the permissions of the files thrown into the trash :)
Comment: sudo rm -rf ~/.Trash/* :)
Comment: I didn't have to use sudo.
Comment: TL;DR: Triple-check your path when using `re -rf`, or you can f*** sh*t up.
Comment: @IvanDurst Tru dat (I'm sure you meant `rm` not `re`!), even better is `cd ~/.Trash` then `rm -rf *`
Comment: rm -rfv     /// verbose model, then ctrl+C to quit
Answer: Check to see that "Empty trash securely" is not set.  This erases files multiple times, so it takes much longer to delete.
The setting is in Finder's Preferences on the Advanced page.  I've heard that sometimes a Snow Leopard upgrade accidentally sets this option.
Comment: This was the solution for me as well: `defaults write com.apple.finder EmptyTrashSecurely -bool false`
Answer: If you need to empty the Trash of a mounted volume when using Finder in root mode (see http://yourmacguy.wordpress.com/2009/09/28/snow-leopard-root-finder/), it seems you can't just press Empty Trash in the Trash folder after pressing the icon (even ensuring the normal Finder isn't open). You will hear the trash emptying sound, but the trash does not get emptied.
Also, when browsing Finder in root mode doesn't show the hidden files and folders, even if you have enabled this option in your own user account.
Following Chealion's rm command with the asterisk at the end didn't seem to work for me. (Perhaps it was due to the double quotation marks at the ends; perhaps it needed the backslash format as demonstrated below.) Instead, I had to manually add the folder name; in my case:
sudo rm -rf /Volumes/Backup\ of\ Macintosh\ HD/.Trashes/0/_CCC\ Archives

(0 is the root user)
Which maps out to this, I guess:
sudo rm -rf /Volumes/[VOLUME NAME]/.Trashes/0/[FOLDER OR FILE NAME]

The asterisk wildcard not working might be a pain if you have many files and/or folders in the root Trash of a mounted volume.

CAUTION: Using Finder in root mode is definitely ill-advised for general use; use it in special circumstances. In my case, I wanted to backup and delete my Carbon Copy Cloner archived files (created in incremental backups), as just copying and pasting the "_CCC Archives" folder to a separate location threw up a load of errors while using Finder in normal user mode. I didn't have much luck with chown or cp under sudo either... so that's why I resorted to using root-mode Finder.

I am on Mac OS X 10.6.8 Snow Leopard, backing up my drive before the impending 10.7 Lion release.
Answer: I use the following bash function to quickly empty trash.
emptytrash() {
    defaults write com.apple.finder EmptyTrashSecurely -bool false
    sudo rm -rf ~/.Trash/*
}

This can be added to your ~/.bash_profile or ~/.bashrc. Instructions on editing your bash files are here.
One benefit of using a bash function, apart from being easy to remember, is that you won't fat finger the rm -rf command.
Note, that depending on the content of your trash you may only be able to empty the trash as root - hence the sudo.
You can also reset the EmptyTrashSecurely back to true if you like.

Quickly Empty Trash in Mac OS X


More with eclipse cdt

Question: What is done when we import an existing project(maybe a visual studio project)?
Which files are used for configuration?
Answer: Try this one, you may get some information.
Migrate Visual Studio C and C++ projects to Eclipse CDT
Answer: Eclipse manages files completely differently than Visual Studio, files are managed by Eclipse and placed into the project workspace. Adding existing files has the aggravating effect of copying the files from their location into the workspace. There are workarounds for this (adding a link to existing file, makefile-only projects) but the default is to copy files around.
This is great if your project is managed by Eclipse alone, not great if you want a VS project AND an Eclipse project for the same codebase.
I'm don't think you can import a VS project into Eclipse CDT, at least not the way you're thinking.
The files used for configuration are stored in (path to workspace)/.metadata, there are a LOT of files that change constantly and can contain absolute paths. Caveat emptor.
Comment: "manages files completely differently" is putting lightly. I'd say more like "aggressively commandeers files". :) Maybe I'm just cranky but I don't like this at all. I'd love to see an answer here that there *is* a way to take control of project contents (i.e. include a specific file into a project from anywhere in the filesystem.)
Comment: Yeah I feel the same way, that's why I went with standalone Makefiles. Eclipse can be taught to call the Makefile and you get a nice debugger without the build chain / project management hassle.
Answer: There is no explicit wizard for importing visual studio project files. What you import is a directory tree full of source code files. Basic information about this is worked out and stored in a file called .project, which contains the settings from Project/properties.
If, when you create or import the project, 'use default location' is specified, the tree is copied into a workspace directory. If not, it is left where it is.
If the project type is 'makefile project', the only real assumption is that there is some external command to be run to build the software. Project properties/C++ build can be used to specify this command - by default, it is 'make'.
DevStudio can export a makefile for one of it's projects - from the Project menu, select 'Export Makefile'. Or you can just write one by hand, or use some other build tool such as ant.
If all else fails, set the build command to 'cat' (e.g. from cygwin) and the build argument to the name of a file that contains the output log from however the software was built.
Answer: Eclipse itself has two kinds of projects - those with makefiles, and those that it manages itself.
Makefile projects have a separate make file that you generally write on your own.
Eclipse managed projects have a <code>.project</code> file that is used by the IDE to create make files on the fly, when you build your project.
Are you asking specifically for visual studio projects, or is that just an example?

More with eclipse cdt


How can I boot Debian from a USB drive from Windows 10?

Question: This question isn't about creating a bootable USB; I already have. I followed Alexander Maru's instructions on this StackExchange post. What I want to know is how to boot Debian from a USB drive. I already have Windows 10 installed; I don't want to dual boot. I want to be able to store files that I create on Debian on the USB as well. If I access the UEFI by doing System > Recovery on Windows, there is no option covering booting a different OS from a USB. How would I do that? I am on a laptop, so I can't access the UEFI by using any function keys while my laptop is starting up.
Answer: Okay, I solved it.
I disabled safe boot and then changed UEFI to Legacy Start, and it worked.
I still have one question, though. When I start the Debian boot menu up if I hit the install button, will it overwrite my Windows installation?
Comment: Not unless you explicitly follow the steps to erase your hard drive and install Debian as you would with any other OS. In fact you could actually shrink your Windows partition, make an EXT3/4 partition and install Debian to that, then you would be dual booted with relatively little effort. Just an fyi in case you change your mind about dual booting.


Avid Media Composer 8 - is it possible to edit two video sessions at same time?

Question: I am editing multiple interviews of people and there is video, graphic and audio components that are shared between these different interviews.   Is it possible to have two edit sessions running at same time and how
Comment: It isn't really clear what you are hoping to accomplish by having two editing sessions open at the same time.  How are you planning to use two separate sessions simultaneously in your workflow?
Answer: Are you talking about having two projects open at one time? As far as I'm aware, Avid MC doesn't let you do that.
But you can import Bins from another project and technically do what you want that way. Otherwise I would just make one project for all the interviews, and separate them with bins if they're all sharing some elements.
EXP:
Interview1 Bin (containing the clips for interview 1)
Interview2 Bin (containing the clips for interview 2)
SFX (Shared sound effects)
Music (Shared music)
GRX  (Shared graphics)


File.ReadAllText and Security in asp.net application

Question: I Like to read the text of the entire file content ,In my case its a Mail Template which i have to read and then apply the object and send the data back. Do i have to give the file read permission explicitly.If So how can do it
Answer: By default the account IIS runs on does not have as many permissions as a user account. As a result, you must either grant the IIS account permissions, or change the user account it uses.
For the first solution, navigate to the file you are looking to read, right click, and go to properties. Go to the settings tab and click modify. Add the IIS user account to the list, and then grant it the permissions you want it to have.
In the second way, go into IIS Management Tool, and click on Application Pools for your server. On IIS7, you will have a minimum of 4. You are probably using the ASP.NET 4.0 AppPool, and as such, should right click, hit Advanced Options, and scroll down and modify the UserIdentity to an account with permissions to access the file.


Maximo Anywhere Eclipse does not show Platform folder and js files of platform folder fater configuring

Question: I have to modify a class which is Platform folder in Maximo Anywhere where but eclipse does not show this folder and related classes.
Answer: This is a setting in eclipse. Right click on the application and select properties. Then Resource, and Resource Filters. Remove the exclusion and it will be visible.


How to add a content type field to a SPList using PowerShell

Question: This the scenario:
I have created a new LookupField (Content Type) called MyLookupField which derives from SPFieldLookup as shown below:
<code>public class MyLookupField : SPFieldLookup
{
  ...
}
</code>
Here's my question: With PowerShell how do I create a SharePoint list column using my new content type MyLookupField which derives from SPFieldLookup?
The method to add column to a list in PowerShell expects an enumeration which is obviously does not have my derived MyLookUpField field.
<code>$myList.Fields.Add("MyLookup", [Microsoft.SharePoint.SPFieldType]::?????,$true)
</code>
With PowerShell how do I create a SPList column and associate it to a content type?
Answer: <code>$web = Get-SPWeb <url>

$childList = $web.Lists["Employees"]
$parentList = $web.Lists["Countries"]

$childList.Fields.AddLookup("Country", $parentList.ID, $true)

$field = $childList.Fields.getfield("Country")

$fieldLink = New-Object Microsoft.SharePoint.SPFieldLink($field)

$ctype = $childList.ContentTypes["MyLookupField"]

$ctype.FieldLinks.Add($field)

$ctype.Update()
</code>


Continue task on Virtual Machine when VirtualBox is minimized

Question: I'm running Ubuntu on a VirtualBox Virtual Machine, and I'm downloading a large file on this virtual machine. This download would take more than 30 minutes, so I would like to minimize VirtualBox and continue working on my primary system. But when I minimize VirtualBox, then the virtual machine actually pauses and then the download also pauses. How can I make sure that VirtualBox doesn't pause my virtual machine when VirtualBox is minimized? I'm using VirtualBox 4.2.16.
Comment: I persoally don't have this problem.  You sure this isn't a setting you have enabled?
Comment: @Ramhound: I don't know whether there is a setting like that. That's why I'm asking this question.
Answer: Updating my VirtualBox from 4.2.16 to 4.3.6 solved my problem. Looks like this was an issue of VBox 4.2.16.
Answer: As far as I can find, there is no reason why this should happen.
Check that whatever method you use for minimizing the window does not collide with another hotkey, button, method or similar activity that would result in the virtual machine being paused.


So, I lost the entire Xcode Project for my app

Question: So I did something really stupid... I got a new MBP, and gave my old one to a friend. Before I did that, I transferred all of the contents of my big folders (Documents, Downloads, etc...) to my new Mac, and then I deleted the user on my old Mac. Unfortunately, I neglected to transfer the folder that contained the entire Xcode Project for my app that is currently on the App Store, as it wasn't in one of those folders, and I'm the only one who had it. The only way of being able to retrieve it that I thought of was that since I had to upload the binary to iTunes Connect to submit the app, Apple might still have it. Otherwise, I guess I'll have to completely start from scratch if I ever want to update it again. I just contacted Apple via iTunes Connect, but I was wondering if anyone has any idea of what I am able to do now, mainly, if Apple will actually give me all the files back. Thanks.
Comment: all software development should use a source revision control system (preferably with offsite secure storage). I sympathise with you; happened to me years ago (dark ages) at a company who didn't use SCC. It's a hard lesson, but once learned I doubt you'll make the same mistake twice.
Answer: Any chance you've got a backup via timemachine?
Timemachine can't help you in the case of a fire (see http://github.com for what you can do about fires, hurricanes, tornadoes, volcanoes, or thieves), but maybe it can save your bacon right now. :)
Answer: Yeah, you pretty much lost it. I'd recommend looking at some source control - for example Github. It's built into XCode, and Github is pretty cheap for Private Repositories, and free for public ones.
Answer: You (nor Apple) won't be able to retrieve it from the binary.
No revision control system?!
Answer: You wiped your data or only simply deleted?
Because, here is a possibility retrieve data from the HDD (or at least some parts) when only simply deleted them. Delete usually does not wipe the data.
If you can get your old HDD, you should:
- insert it into external usb-HDD enclosure
- attach to your new MAC
- make an image from it to one big file (with the command "dd") (assuming than your new HDD is bigger than your old)
- and with several tools you can "try" recover some data
every use of the old HDD drastically lowering the chance recovering something from it.


How can I touch up a marred furniture paint job?

Question: I recently repainted some night stands using benjamin moore advanced paint. They look great, except that I noticed some debris on the top and removed it with tweezers. I attempted to smooth over it with a brush, but the paint had already started to dry. So, there's a slight mar to my finish in a few places. Can I lightly sand that area, and just put a very light coat on top? Or, am I stuck with a light sand and repainting the entire top?
Answer: You didn't say how large the entire top was. Over brush snagging looks terrible, unfortunately. If you really want a smooth consistant finish, don't attempt to just touch up the flaw areas. I would sand the top again, making sure the snags are very smooth, then put a thin coat on the entire top. Dust control is the key to doing furniture. If there is minor dust on the finish, leave it alone until the piece is cured completely. You can then buff if with a polish compound or ultra fine automotive finishing paper that won't scratch the gloss, but will remove minor dust flaws.
Comment: +1 to refinishing and dust  The BM Advance paint is a new, water based alkyd.  As such, its drying (and leveling) time is extended, compared to latex.  Much harder film when dry.  If, after your sanding is complete and you didn't break through to wood or primer, you can top coat with a water based poly of the same sheen.  These dry quicker than the alkyds.  Light sanding @600 grit between coats will net you a very smooth surface.  Try turning off furnace during the initial dry if you recoat with the Advance.
Comment: @HerrBag - I just tried the advance, this is my first attempt at painting furniture. I had originally tried the Behr Ultra Premium, and it looked awful, even after multiple coats. Thanks for the tips
Comment: @shirlockhomes - can you recommend a polish compound or finishing paper? Thanks for the detailed answer
Comment: Dupont auto paste polishing compound, or 3M 1200 or finer auto paper. You should find either at an auto supply store. the paste is common even at WalMart.


Can BeEF hooking be stopped with Content Security Policies

Question: I know that using strict values for default-src and scripts-src are a popular way to prevent (or at least limit the impact) of XSS attacks. But I was just wondering it CSPs can be used to stop attackers/pentesters from hooking browsers using the BeEF framework.
Comment: Do I understand you correctly, that you want to stop someone from using the BeEF framework against your website by sending a CSP directive?
Answer: Yes. The Beef hook is just an advanced payload for an XSS attack that relies upon the script-src tag. If you have a healthy Content-Security-Policy, victims browser will refuse to load the external beef hook.
CSP is a secondary line of defense in case you have a HTML-injection vulnerability.
Comment: @atdre Bypasses to CSP are actually security bugs in the browser in some cases or just an incorrectly implemented CSP on the web application. The defense mechanism is there, whether it's well implemented is a different problem
Comment: well, except for bypasses to CSP, such as -- http://ruxcon.org.au/assets/slides/CSP-kuza55.pptx -- and the more-recent work on the subject.


How do you handle developer access to windows servers?

Question: When it comes to code launches how do you handle developer access to the server?  Do they have RDP access to the machines to deploy code and make changes?  Are they only given ftps access to the servers docroots and any .NET configuration changes are handled by the sysadmins?  Do the developers even have access to the production docrooots for deployment or do the sysadmins handle any code launches to the live servers?
Answer: The best setups I have worked with has a 3 level hierarchy:

DEV - Developers have complete access to these server(s).
STAGE - This is for developers and
QA.
LIVE - Only sysadmins and build
engineers touch these.

This will also depend on the company's budget and mindset.
Answer: It depends, at our workplace the developers do everything.
No systemadministrator says anything (since i am the systemadmin and a developer)
Bad part though is, lots of testing is occuring on the live enviroment which i am against and trying to stop but no luck yet.
My last workplace it was handle also by developers but in stages, lots of stages before going live.
Answer: I've seen some of each over the years, and by far the best results have emerged when the developers have full access.  Of course, all changes should still be documented and committed in version control and tested on a test system before deployment, and all that.  The payoff in letting the developers into the production servers is when things go wrong.  The developers are the ones who can see through the problem the fastest.  In situations with heavy restrictions, I've seen critical one-line bug-fixes take days to deploy.
Answer: We use a mix of approaches.  For applications where I am the primary developer and it is hosted on a dedicated server (or VM) I have full access to the web server.  For applications where I am only developing a piece of a larger application, or the application fits within a larger frame work I get access to a directory where I can publish.  For testing environments (or prototyping new services), it is typically full access.  I have my own dedicated QA box that I have full access to for QA work.  SQL servers are handled differently.  I have a full install of SQL server locally that I develop against.  I typically interact with a DBA to get a database set up on testing and production servers, but have full administrative access to the database, but not the server.
Answer: I have full and complete access to every production server my company houses. But we are an extremely small company and I do a lot of the sysadmin work as well as all the development work.
Answer: I have full access to most of our production systems.  There are a lot of problems that are easier for me to resolve than for IT.  Though usually I don't make change to production unless absolutely necessary.  If I do make a change I tell our admins so they can make note of it.  We've tried doing it with limited access, but I work as part of a really small team so it isn't an option.  Right now if we only gave the admins access 2 people would have to cover production problems.  That is difficult with an oncall schedule.


Derivation of $\sin(90^\circ+\theta)$, $\cos(90^\circ+\theta)$, etc

Question: How are the trigonometric functions
like $\sin(90^\circ+\theta)$, $\cos(90^\circ+\theta)$, $\tan(90^\circ+\theta)$, $\cot(90^\circ+\theta)$, $\sec(90^\circ+\theta)$, $\csc(90^\circ+\theta)$ derived?
Comment: Related (duplicate?): [When the trig functions moved from the right triangle to the unit circle?](https://math.stackexchange.com/q/145616/409)
Comment: @Blue im asking for the derivation...
Comment: [My answer](https://math.stackexchange.com/a/145828/409) to that question discusses the derivation, at least for sine and cosine. If that doesn't help, this kind of question has been asked many times on Math.SE; try searching the site.
Comment: Derivation based on what? If trig functions are defined only on angles from $0$ to $90$ degrees, they simply aren't defined anywhere else and you can't "derive" their values anywhere else. If you have a definition of each function that is valid on angles outside the range $0$ to $90$ degrees, you can derive formulas for things such as $\sin(\theta + 90^\circ).$ But you need a definition first. Is the unit circle definition acceptable?
Comment: Yeah, unit circle will work @David K
Comment: here's the one for $\sin(90+x)=\cos(x)$. draw a right angled triangle, marking one of the angles as $x$. then what's the third angle? well, it's $180-(90+x)$. then notice, by trigonometric rules, that $\sin(180-(90+x))=\cos(x)$. finally,  since $\sin(x)=\sin(180-x)$ - we arrive to $\sin(90+x)=\cos(x)$. other identities follow in a similar manner
Answer: [I looked for questions like this but so far have not found one that is really the same question, although the one cited in the comments under this question is certainly relevant. So instead of attempting to link to a duplicate, I'm answering.]
If you use the unit circle definition, to make things simple it's better for all angles to be expressed in radians, so $90$ is just $\frac\pi2.$
Then for a positive angle $\theta$ you can simply start at the point $(1,0)$ on the unit circle (on the positive $x$ axis) and travel counterclockwise along the circle until the total distance you have traveled along the arc of the circle is $\theta.$
Then $\sin(\theta)$ is the $y$ coordinate of the point you reached at the end of that path, and $\cos(\theta)$ is the $x$ coordinate of that same point.
Now let's try to find the sine of $\left(\frac\pi2 + \theta\right)$ radians,
that is, the sine of $90$ degrees plus $\theta$ radians.
One way to do this is, first we travel a distance $\frac\pi2$ counterclockwise from the point $(x,y)=(1,0).$ That gets us to the point $(x,y)=(0,1).$
Then we travel an additional distance $\theta$ from that point.
Let's give a name to the point at the end of that arc where we stop;
call it $P$.
Now let's lay down some alternative coordinates on the plane:
two new axes that go through the same origin as the $x$ and $y$ axes.
The $x'$ axis is identical to the $y$ axis.
The $y'$ axis is concurrent with the $x$ axis, but goes in the opposite direction;
that is, points with positive $x$ coordinates have negative $y'$ coordinates.
In fact, if $y'_P$ is the $y'$-coordinate and $x_P$ is the $x$-coordinate of some point $P,$ then $y'_P = -x_P.$
The point with coordinates $(x,y)=(0,1)$ in the original coordinate system has coordinates $(x',y')=(1,0)$ in the new system.
In fact, the figure composed of the $x'$ axis, $y'$ axis, and the arc of length $\theta$ from
$(x',y')=(1,0)$ to $P$ is exactly congruent to the figure composed of the $x$ axis, $y$ axis, and the arc of length $\theta$ from $(x,y)=(1,0)$ a point $Q$ at which we would measure $\sin(\theta).$
So just as $\sin(\theta)$ is the $y$-coordinate of $Q,$
$\sin(\theta)$ is also the $y'$-coordinate of $P.$
That is, $\sin(\theta) = y'_P.$
But remember that $P$ is the point we reach by traveling
$\left(\frac\pi2 + \theta\right)$ radians along an arc starting at $(x,y)=(1,0).$
So $x_P,$ the $x$ coordinate of $P$, is the cosine of
$\left(\frac\pi2 + \theta\right)$ radians.
Also remember that $y'_P = -x_P,$ or equivalently $x_P = -y_P.$
Putting these facts together, we have
$$
\cos\left(\frac\pi2 + \theta\right) = -y_P = -\sin(\theta).
$$
Looking at the $y$ and $x'$ coordinates of $P,$ using the same facts about sines and cosines of the unit circle and about the congruence of the figures,
we can show that
$$
\sin\left(\frac\pi2 + \theta\right) = y_P = x'_P = \cos(\theta).
$$
All the other trigonometric functions can be derived from these.

The related question which one also ought to be able to answer is why we accept the unit circle definition as a good definition for sine and cosine.
That question is better addressed by
this answer,
which shows some ways in which the formulas we get by using the unit circle are consistent with the ones we have for angles between zero and a right angle.
Comment: @Blue That may be the question and answer I was looking for before making my own attempt. (Actually the answer is more relevant than the question, since you generalized the question.)
Comment: See also: [How to remember a particular class of trig identities](https://math.stackexchange.com/q/737212/409), and in particular, [my answer](https://math.stackexchange.com/a/737353/409).
Answer: Write $f(\theta)=(90+ \theta)$
Then for $g(\theta)$ any trigonometric function, your question is to find $(g(f(\theta)))'$.
By the chain rule we have $(g(f(\theta)))'=g'(f(\theta))\cdot f'(\theta)=g'(f(\theta))$, since $f'(\theta)=1$.
As an example $(\sin(90+\theta))'=\cos(90+\theta)$
Comment: This is interpreting the word "derived" as "having a derivative taken." I think the intent was probably rather to ask how it was decided that the function itself (not its derivative) should have a particular formula.


Why do some things cost Willpower and others Blood Points?

Question: In Vampire: The Masquerade, why do some abilities cost Blood Points while others cost Willpower? Is the distinction arbitrary, or is there a reason?
Answer: Vampires in V:TM use blood to fuel most of their supernatural abilities.  Blood points are spent to heal, wake up from a day's sleep, power some disciplines,  and to increase physical attributes, amongst other things.  It means spending the blood to activate the inherent power contained within the blood.  Spent blood means you later on need to refill and spending is limited to how much blood your vampire has in his body and by generation -- most neonates and PC vampires will only ever get to spend 1 blood point per round.
Blood pool is generally filled up very quickly and easily -- an average human vessel contains 10 blood pool, more than enough to fill up almost any PC vampire of average generation (12 or 13) after a single feeding.
Willpower is a measure of a vampire's inner drive and competence; in other words, it is a measure of a vampire's ability to achieve its goals.  It can be spent to do things such as avoid succumbing to the Beast or Rötschreck, to temporarily overcome a flaw or weakness, to temporarily suppress a derangement from manifesting, and to gain automatic successes.  It is probably the single most used character resource in VTM.  A vampire's current (not max) willpower score is also used as the difficulty for Dominate levels 1-4, among other things.  Willpower is representative of a vampire's own emotional, physical, and spiritual (if such can be said about a vampire...) state and is not necessarily powered by anything supernatural.
Spent willpower is a measure of how mentally fatigued a vampire has become after resisting or overcoming such effects, and is restored through confidence in his or her own abilities. Willpower generally restores at a much lower rate (depending on your Storyteller), because it is awarded when a vampire PC acts true to her Nature, achieves a goal, or when a Story (not a session) is completed.   Upon waking, each vampire also regains one willpower point. Awarding of willpower points is largely at the discretion of the Storyteller but it's also not unheard of to ask or nudge your ST if you think you've acted in accordance with your Nature, completed a goal, or overcome some obstacle and you think a willpower point may be due.
Comment: A note about the differences in how quickly the two resources can be replenished might also be in order.
Comment: @ObliviousSage Added info on how each is regained and the differences in how quickly they might replenish.  Bloodpool is easier to refill, but willpower is highly dependent upon Storyteller -- I've noted as much in my edit.
Comment: "Vampires in V:TM use blood to fuel all of their supernatural abilities" -- however Chimerstry costs WP even at level 1 in 1st and 2nd editions (don't remember Revised and I haven't seen 20th). So do quite a few of the silly-high-level powers. It's not entirely clear whether this is solely because that discipline calls for more inner drive and competence than other disciplines, or whether it's basically an attempt at game balance.
Comment: Cool. I'll leave the comment anyway, because I think it's significant to the question that there are a few odd abilities where it probably could have gone either way, and so in those cases if the distinction *isn't* arbitrary then the reasons behind it are certainly quite subtle. Basically there are some vampiric abilities (and rituals) that are spiritually draining for whatever reason.
Comment: @SteveJessop Huh, thought I had already edited that to "most."  Well, it's fixed now anyway.


Am I obligated to give maaser if

Question: I was/am going through financial hardships and I promised Hashem that I will give maaser on any and all income that I receive, because it is a required mitzva. I have been keeping my word. My daughter receives disability  of $733 and as soon as it is put in my bank account, I go straight to the computer to donate $74 to a Jewish cause, mostly to help poor people in Israel. Here is my problem; doing so leaves me in a position where I cannot afford my rent (700) or my bills. Thankfully, buying food is not a problem because I receive assistance for that. I don't want to break a promise to Hashem; Do you have any advice on what I can do?
Comment: Welcome to Mi Yodeya! Can you [edit] your question to make it less personal? We [try to avoid practical halachic questions](//meta.judaism.stackexchange.com/q/1734). You might also want to see "[Why is it necessary to ask a rabbi?](//judaism.stackexchange.com/q/9146)" for more info. We hope to see you around!
Answer: Welcome to J.SE; we prefer broader questions, but let's speak in more general terms.

and I promised Hashem that I will give maaser on any and all income that I receive, because it is a required mitzva.

That's the key right there. See this source sheet from Rabbi Mordechai Torczyner, citing Pit'chei Teshuva YD331:12 and many other sources that maaser is a very meritorious custom and practice, but not an all-out requirement.
Now on to the promise. If I promised God not to eat chocolate because I think all chocolate is non-kosher, that promise was made under faulty premises and is easier to undo. (If I said "I know chocolate is often kosher, but I'm promising not to eat it because I'm on a diet", that's a lot trickier.)
But promise aside, tithing is a wonderful practice, but first and foremost is the obligation not to impoverish ourselves in the process. (Emergency responders have far too many stories of the random bystander who tried to rescue someone from drowning/electrocution/etc. and wound up another victim instead.) You're still obligated to give a few dollars a year to tzedaka, but not all that much. Please find a rabbi you trust, and you can discuss what's reasonable to give. (There are various ways of computing maaser; some deduct a lot of things, some argue it's only on your net profits.)
Comment: +1 Just for the record Rabbi David Feinstein also tells people lichatchila to give maaser after paying all living expenses, that is to only give from money put away for savings.

Am I obligated to give maaser if


What is the purpose of this concert equipment?

Question:
What is the purpose of that equipment and how is it called? I have noticed they always have them in concerts with electronic instruments.
Answer: They are called "Stage monitors". Basically they are speakers so that the band members can hear themselves and their fellow musicians more clearly. When the stage is big, it is hard to listen to the amplifiers (both of your instrument and of the others), so the sound techs set up some of those monitors and the musicians can listen to what is being played.
To borrow from Wikipedia:

A stage monitor system is a set of performer-facing loudspeakers called monitor speakers, stage monitors, floor monitors, wedges, or foldbacks on stage during live music performances in which a sound reinforcement system is used to amplify a performance for the audience. The monitor system allows musicians to hear themselves and fellow band members clearly.
Comment: @BruceWayne Stage monitors can't block out external sound in any way, so you can definitely hear the crowd, and you often have to turn the monitors up quite loud to overpower the crowd (and the drums). making the overall stage volume quite loud. In-ear monitors tend to be safer and provide more clarity, because they actually do block out external sound so you don't need to turn them up so much.
Comment: I've always wondered (not a musician myself) - How clear are the monitors? Can the band hear the roar of the crowd, or is the audio relatively isolated so the band can hear clearly? (Are there any videos showing examples of using monitors vs. no monitors perhaps?).  Is it just a noise war of the monitor volume vs. audience? [Perhaps a new question?]
Answer: Adding to the existing answers - monitor or foldback speakers - so-called because they literally fold the sound back to the band. Often, especially in open air gigs, the sound is fed to the audience through large p.a. speakers which are in front of the stage, therefore out of earshot of the players/vox.
This results in the sound being lost to those on stage. They might have their own amps/speakers behind them (although what we see are sometimes empty cabinets for publicity purposes), but often their sound is fed directly to the p.a., which then gets mixed by the sound engineer so the audience gets the best sound. That doesn't help the guys on stage, who may only then hear themselves and/or others, through the house p.a., vaguely, hence foldback.
Problem is, there may already be a lot of sound pressure on stage, drums, although mic'd up, still sound loud; guitarists like their volume, etc. And that sound, on a wide, deep stage, gives nothing like the mix the audience hears. But maybe the drummer wants to hear more vox, but the bass wants to hear more drums. That's where individual mixes come in. With many monitors, as in your pic., each can have his own individual mix, tailored by the sound engineer, and that mix, as mentioned earlier, will be very different, often, from the mix sent out front of house.
Unfortunately, all that extra sound can make the stage a very noisy place, in some ways defeating the objective of having foldback and side fills. This is where IEMs come into the equation. In Ear Monitors, 'hearing aids for performers', if you like. They do the same job, but not only make listening to separate mixes easier, better, and more effective, but work to a degree as ear defenders too.
All this often needs extra guys to man the p.a., as the sound not only needs balancing for the audience, but for each individual on stage, separately, at the same time. Meaning very comprehensive p.a.systems which can have many different foldback mixes available, one for each of the foldback speakers and performers.
Comment: They serve zero purpose without being "tailored by the sound engineer" +1. The musicians have no direct control over them; they have to ask nicely for adjustments, ideally during the sound check. It's a good sound guy if you never hear feedback and the band doesn't have to stop six times during the show asking for changes because they can't hear each other.
Comment: @Mazura "_they have to ask nicely for adjustments, [...] stop six times during the show asking for changes because they can't hear each other._" As epitomised by Ritchie Blackmore and Ian Gillan's requests for ["Everything louder than everything else"](https://www.thehighwaystar.com/news/2014/05/28/everything-louder-than-everything-else/) on Deep Purple's _Made in Japan_ live album.
Comment: @Mazura - oh, so true. I've been at both ends, and sometimes as performer, I've just given up with foldback. The 'expert' sound guys know what they like, and like what they know. Unless they're musos themselves, there's often little empathy.
Comment: This next song's called, *Shots for the Band.* (cough). And one for the sound guy, please.
Comment: @Mazura "*The musicians have no direct control over them; they have to ask nicely for adjustments*" This is not always the case with newer equipment: for example, my church uses Yamaha TF/CL/QL-series mixers which allow performers to control their individual mixes using [a smartphone app](https://usa.yamaha.com/products/proaudio/software/monitormix/index.html).
Answer: These are called monitors speakers or stage monitors or floor monitors in this case.  In your picture there are more on either side of the stage).  Monitors are speakers aimed at the performer to make sure they can hear what they need to hear.
The typical example is the singer: With the loud drum and guitar amps on stage, they would not hear themselves anymore and start singing out of tune.  So, their monitor would send back their own voice directly aimed at them.
It is not a perfect solution, as it makes a loud situation even louder and increases risk of feedback loops (unpleasant high pitched tones). So it needs to be carefully balanced.
Usually the sound engineer behind the mixing panel can customize the monitor sound signal for each musician individually. For example:  the singer wants hear him/herself and maybe a bit of bass, whereas the bass player wants to hear more hi-hat etc…
See also https://en.m.wikipedia.org/wiki/Stage_monitor_system
Comment: An alternative that  solves some of the feedback problems is "in-ear monitoring," in which the musicians wear what amounts to high-powered earbuds. It takes some getting used to the "artificial," isolated nature of working that way, but I've grown to love it.
Answer: Those are stage monitors - basically, general-purpose loudspeakers with built-in amplifiers, designed to sit on the floor and be audible to people standing in front of them. Their purpose is for each musician to hear clearly and reliably what they and their bandmates are playing.
Sometimes in big concerts, you can see a sound engineer standing at a mixer at the side of the stage, adjusting the monitor mix (the volume of each instrument) for each musician. This is not an easy problem: on stage, you have the direct sound from the drums (which can be deafening) and from the guitar and bass amps (whose speakers are sometimes very directional, i.e., they are horribly loud in one spot and barely audible a few steps away). Then you have keyboards and vocals, which don't come with their own amplification, but it's absolutely crucial that the performers hear themselves clearly (especially for vocals); and you have some of the sound of the P.A. system that is directed at the audience reflected back onto the stage. The stage monitors allow to mix and amplify each instrument such that the musicians are not completely lost in the din.
Comment: They certainly all don't have built in amps.
Comment: I seem to remember that each of the members of U2 had their own separate studio under the stage for their monitor mix, when they performed in large arenas. However, I can't verify that claim.
Comment: You may be thinking of under-stage keyboardist/engineer Terry Lawless.  Photos of his lair, including four mixing consoles: https://www.garritan.com/u2-in-concert/


What is the name of this element?

Question: I was wondering if anyone could tell me the name of this design element - I've seen it used for quotes, such as in Yahoo News Digest, but also in other places. It came up on github, and I'm not sure what it means there, but I know I've seen it used to differentiate importance on elements in a list before. They could be different elements too, but it seemed to me they were both being used to adjust margin to call attention to content.
Comment: It's a vertical line... Pull quotes don't usually need a background of some kind, this is just an extra attention grabber.
Comment: Yeah, I don't think it has any actual name. Though I admit it's often commonly used to highlight text, especially blockquotes, in web articles or e-mails. Maybe something like an "indentation bar"?
Answer: Its called a "rule." In this particular case a "vertical rule."
A "ruler" may be a tool, but a ruler is also someone who draws lines.
When people find out you are an artist, they always say they can't even draw a straight line. That's what rulers are for.
Google: ruling pens
Comment: :) good point (and i have an old french-british set of ruling pens i am well fond of. For some jobs there is no way around :)
Comment: This is the most technically correct answer (although the other answers bear looking at as well). Rule lines, both vertical or horizontal, are used to break up sections of content or to provide visual emphasis.
Answer: Graphic Terminology: Left Side: Border | Right Side: Blockquote
Your two particular examples look to be handled by CSS and markup through browsers:
Left Side:
<code>.somestyle{ border-left: 1px solid #000000;}</code>
You can also wrap containers/elements/objects entirely:
<code>.somestyle { border:1px solid #000000; }

.somestyle2 {
 border-top: 1px solid #000000;
 border-bottom: 1px solid #000000;
 border-right: 1px solid #000000;
}
</code>
Right Side:
Typically considered a blockquote. Through browsers the styles of these vary. In simple form it is only an indent. Your image appears as if the style has a little more css applied.
<code>.someblockquotestyle {
 padding: 10px 20px;
 margin: 0 0 20px;
 font-size: 17.5px;
 border-left: 5px solid #000000;
}
</code>
Comment: Well you can use a CSS border to construct it, doesn't necessarily means it's the name of this design element.
Answer: It depends in where those vertical lines are located.
If it is for the quotes, so it will be "Left blockquote border", but if it is in a list for handling something, it will be "Reorder control" and it could be just lines or any symbol.

What is the name of this element?


Black-Scholes formula and implied vol

Question: Is the Black-Scholes formula the only way "implied volatility" is calculated/defined in markets?
Comment: By de facto convention when people say "implied volatility" they mean "implied volatility according to Black Scholes". You can assume so whenever you hear "implied volatility".
Comment: in the context of interest-rate derivatives (e.g caps) implied volatility can also refer to the normal model rather than the log-normal model.
Comment: @noob2 how do you think about the fact that the number that VIX has, should represent the yearly change the stocks might experience with some probability. But still the options are 30 day options?
Comment: By convention, volatilities are always just quoted in annualised (root-time) terms, irrespective of the actual period to which they refer. IE 30 days with VIX, but the same is true for eg 3 month FX vols.
Answer: Unless otherwise stated, when people talk about implied volatility, they indeed mean the implied volatility under the Black-Scholes-Merton (BSM) model. In practice, it is quoted on a yearly basis and it's the information you would get from data sources such as RiskMetrics. It is also what people mean when they talk about estimating model parameters by (quasi) maximum likelihood using option prices: they are fitting the BSM-implied volatility surface.
I am not an expert on this, but I do recall an exception burried in the asset pricing literature. A very famous paper by Bakshi, Cao and Chen (1997) diagnose the capacity of models to improve on the BSM model by seeing if the volatilities they imply across moneyness and maturities is flatter (since you have just the one underlying, at some point in time, you have just the one volatility). It's an awkward way to put the problem which is probably why later papers that I have read seem to focus on matching the BSM smirk and not on finding a way to get a flatter one.
In other words, it's very unusual to run into other model implied volatilities -- at least as far as equity options are concerned.

Black-Scholes formula and implied vol


Getting "specified DSN contains an architecture mismatch between the Driver and Application" running Tomcat via Sysdeo under eclipse

Question: Windows 7, eclipse Kepler; I have an existing application which I believe to be compiled with 32-bit java.  In any event, it won't work with 64-bit, that failed first.
So I downloaded and installed 32-bit eclipse and 32-bit java, set the path variable to pick up the java bin directory first (64-bit java was installed in \Windows\System32, and I don't want to try to uninstall it from there).  Rebooted several times; finally established that, on a command line, java -version gives the 32-bit version ins of the 64-bit.
So I can run eclipse and I can run Tomcat, no error.  I have double-checked the tomcat settings under Sysdeo to ensure they point to the newly-installed 32-bit version of java.
However, when I run the web application, I get "specified DSN contains an architecture mismatch between the Driver and Application".  From googling that message, I gather it means I have a 64-bit driver and a 32-bit application.  So how do I reset things to use the 32-bit driver?
I noticed that a message on Tomcat startup: "The APR based Apache Tomcat Native library which allows optimal performance in production enviornments was not found on the java.library.path:", and then it gives the following in a one-line harder-to-read form:
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:
<code>C:\Program Files\Java\jre7\bin
C:\Windows\Sun\Java\bin
C:\Windows\system32
C:\Windows
C:/Program Files (x86)/Java/jdk1.7.0_55/bin/../jre/bin/client
C:/Program Files (x86)/Java/jdk1.7.0_55/bin/../jre/bin
C:/Program Files (x86)/Java/jdk1.7.0_55/bin/../jre/lib/i386
C:\Program Files (x86)\Java\jdk1.7.0_55\bin\
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Program Files\ThinkPad\Bluetooth Software\
C:\Program Files\ThinkPad\Bluetooth Software\syswow64
C:\Program Files\Broadcom\WHL\
C:\Program Files\Broadcom\WHL\syswow64
C:\Program Files\Broadcom\WHL\SysWow64\
C:\Program Files\Broadcom\WHL\SysWow64\syswow64
C:\Program Files (x86)\Common Files\Ulead Systems\MPEG
C:\Program Files\Common Files\Lenovo
C:\SWTOOLS\ReadyApps
C:\Program Files (x86)\Intel\Services\IPT\
C:\Program Files (x86)\Common Files\Lenovo
c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\
C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\
C:\Program Files\Microsoft SQL Server\100\Tools\Binn\
C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\
C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\
c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\
C:\Program Files (x86)\Symantec\VIP Access Client\
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\
C:\Program Files\Microsoft\Web Platform Installer\
C:\Program Files (x86)\nodejs\
C:\Program Files\Java\apache-ant-1.9.2\bin\
C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\
c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\
c:\Program Files\Microsoft SQL Server\110\DTS\Binn\
C:\Program Files (x86)\eclipse
</code>
So the first line indicates, perhaps, that another 64-bit version of java is STILL getting referenced, this time from "c:\program files\java\jre7\bin".  But I can't find where that's set, or where to unset it from.
Keep in mind that I don't have a project involved yet.  This is all to set up running tomcat from within eclipse using sysdeo, so I don't have "Project / Properties / Build Path".  I have "Windows / Preferences / Build path"; I have made sure the 32-bit version is the default JRE and has its correct path, but the Preferences / Java / build path / classpath variables are either deprecated or don't refer to java runtime at all (there's one pointing to 32-bit), and the only user library is xerces, hardly relevant to all this.
Can anyone please help me out on the correct settings for making this work, or methods for figuring it out?
Answer: It turns out that altering the path variable is not enough -- I found both a 64-bit and a 32-bit install of Java under Windows / Control Panel / Uninstall a Program; I uninstalled the 64-bit version, and now the application starts correctly.


Usage ddrescue with -d option?

Question: I am learning to use ddrescue and I would like to know what the -d (direct) option is for and in what scenarios it is recommended to use.
Comment: Have you read the documentation for it? `man ddrescue`
Comment: @roaima Yes, it just says "use direct disc access for input file" but it does not say what it does specifically to know in which situations to use it.
Answer: In some circumstances -d (or --idirect) allows you to rescue more data.
It's true man ddrescue shortly says it means

use direct disc access for input file

and this may not explain a lot. However there's also GNU ddrescue Manual online:

11 Direct disc access
If you notice that the positions and sizes in mapfile are always multiples of the sector size, maybe your kernel is caching the disc accesses and grouping them. In this case you may want to use direct disc access for infile, or read from a raw device, to bypass the kernel cache and rescue more of your data.
NOTE! Sector size must be correctly set with the --sector-size option for direct disc access to work.
NOTE: Direct disc access can copy arbitrary domains by reading whole sectors and then writing only the requested part. This is the only case where ddrescue will try to read data outside of the rescue domain.
Try the --idirect option first. If direct disc access is not available in your system, try raw devices. Read your system documentation to find how to bind a raw device to a regular block device. Some OSs provide raw access through especial device names, like /dev/rdisk.
Ddrescue aligns its I/O buffer to the sector size so that it can be used for direct disc access or to read from raw devices. For efficiency reasons, also aligns it to the memory page size if page size is a multiple of sector size. On some systems, ddrescue can't determine the size of a raw device, so an explicit --size or --complete-only option may be needed.
Using direct disc access, or reading from a raw device, may be slower or faster than normal cached reading depending on your OS and hardware. In case it is slower you may want to make a first pass using normal cached reads and use direct disc access, or a raw device, only to recover the good sectors inside the failed blocks.

Usage ddrescue with -d option?