Tab Vs Space preferences in Vim

Question: Vim is very accommodating when it comes to tab Vs. space preferences. As I understand it, the tabstop setting indicates the width of a tab character. The shiftwidth setting specifies how many columns to increment/decrement when using the << and >> commands, whereas the softtabstop setting influences the amount of whitespace to be inserted when you press the Tab key in insert mode. If expandtab is on, the tab key inserts softtabstop number of space characters. Whereas with expandtab switched off, pressing the Tab key inserts a the smallest possible number of tab+space characters that matches softtabstop. (Please correct me if I'm wrong.)
This final point makes me wonder: is there a practical case where you wouldn't want shiftwidth == tabstop && tabstop == softtabstop? I can't think of one. As far as I am concerned, it would be most convenient if I could set all 3 of these to the same value, in one single assignment. e.g. calling:
:set stab=4

which would be equivalent to running:
:set tabstop=4 softtabstop=4 shiftwidth=4

Can anyone suggest how this could be done?

UPDATE
Thanks for the replies so far from too much php, hobbs and kaiser.se. Rather than reply to each individually, I'm updating the question here.
Softtabstop with expandtab switched off
I said above that with expandtab switched off, pressing the Tab key inserts a the smallest possible number of tab+space characters that matches softtabstop. I stand by that, but I think I need to explain what I meant. I shall attempt to do so by way of a few examples. To follow along, run :set list so that you can see tab characters.
tabstop=4 softtabstop=2 shiftwidth=4 noexpandtab
In insert mode, pressing the tab key inserts 2 space characters. Press the tab key a second time, and instead of inserting two more space characters (for a total of 4 space characters) it replaces the previous 2 spaces with a single tab character. Tabstop is set to 4, so a single tab character has the same width as 4 spaces.
tabstop=4 softtabstop=6 shiftwidth=4 noexpandtab
In insert mode, pressing the tab key inserts 1 tab character plus 2 spaces. The tab character has a width of 4, so the total width is 6, and this is achieved using 3 characters. Pressing the tab key a second time inserts two tab characters, and removes the two spaces that were inserted previously. The total width is 12, and this is achieved using 3 characters.
In both of these examples, Vim inserts the minimum possible number of tab+space characters that matches softtabstop.
If I am working with expandtab switched off, I can't see myself wanting the extra granular control that can be achieved by setting softtabstop to a different value from tabstop. It would still be useful for me to be able to set tabstop, softtabstop and shiftwidth to the same value with a single command.
Does expandtab make softtabstop redundant?
tabstop=4 softtabstop=0 shiftwidth=4 expandtab
In insert mode, pressing the tab key inserts 4 spaces. Pressing the delete key deletes a single space - so you have to backspace 4 times if you hit the tab key by accident.
tabstop=4 softtabstop=4 shiftwidth=4 expandtab
In insert mode, pressing the tab key inserts 4 spaces. Pressing the backspace key deletes 4 spaces.
If I am working with expandtab switched on, I would prefer the delete key to remove the same amount of whitespace as the tab key inserts. So in this case, too, I feel that it would be useful to be able to assign the same value to tabstop, softtabstop and shiftwidth simultaneously.
A shortcut would still be useful
It's great that Vim provides so much flexibility, but I can't see myself needing it. I just want to be able to choose the width of a tab, and whether it is a 'hard' tab (using a tab character) or a 'soft' tab (made up of spaces). Toggling between hard and soft tabs is easy enough (:set expandtab!), but I wish it was more straightforward to set the width of tab, without having to fiddle with 3 different parameters.
So my proposed suggestion for something like :set stab=4 still sounds good to me.
Comment: This seems like an RFE rather than a question. As such, you should probably propose to the VIM community: http://www.vim.org/community.php -- or simply write a patch. Other than that, VIM has an extensive macro facility that allows you to define new operations, so it's very likely that you could simply create a macro that does what you want.
Comment: It appears as though you have two different questions here, perhaps you should split your question into two.
Comment: You're right! I've moved the second question into a topic of its own.
Comment: @nelstrom In regard to your question `is there a practical case where you wouldn't want shiftwidth == tabstop && tabstop == softtabstop?`, Vim's own source code uses `set shiftwidth=4  tabstop=8 noexpandtab`.  Yes, one typically wants `shiftwidth == softtabstop`, but that's independent of what value `tabstop` has.
Answer: Creating a stab option in Vim itself would not be easy, but I've whipped up this command/function that you can drop in your .vimrc (or a plugin file if you're super-organized). Use :Stab and you will be prompted for an indent level and whether or not to use expandtab. If you hit enter without giving it a new indent level, it will just print the current settings.

" put all this in your .vimrc or a plugin file
command! -nargs=* Stab call Stab()
function! Stab()
  let l:tabstop = 1 * input('set shiftwidth=')

  if l:tabstop > 0
    " do we want expandtab as well?
    let l:expandtab = confirm('set expandtab?', "&Yes\n&No\n&Cancel")
    if l:expandtab == 3
      " abort?
      return
    endif

    let &l:sts = l:tabstop
    let &l:ts = l:tabstop
    let &l:sw = l:tabstop

    if l:expandtab == 1
      setlocal expandtab
    else
      setlocal noexpandtab
    endif
  endif

  " show the selected options
  try
    echohl ModeMsg
    echon 'set tabstop='
    echohl Question
    echon &l:ts
    echohl ModeMsg
    echon ' shiftwidth='
    echohl Question
    echon &l:sw
    echohl ModeMsg
    echon ' sts='
    echohl Question
    echon &l:sts . ' ' . (&l:et ? '  ' : 'no')
    echohl ModeMsg
    echon 'expandtab'
  finally
    echohl None
  endtry
endfunction
Comment: Thanks for the script! It does more than I asked for - I think I'd prefer to keep expandtab out of it - but I can easily customise it to my liking. You've provided me with a small crash course in Vimscript, so I'm very grateful. The 100 point bounty is yours!
Answer: This is my first attempt at writing VimScript, but here goes:
function! Stab(value)
    let &shiftwidth  = a:value
    let &softtabstop = a:value
    let &tabstop     = a:value
endfunc

If I put this in my .vimrc file, I can call it by running :call Stab(X), where X is the desired tab width. This is an adequate solution for now, but if anyone can suggest a way of making it easier to call I would be grateful.
I've also created a function that quickly summarizes the current settings, which I have mapped to ctrl-Tab:
nmap <C-Tab> :call TabParams()<CR>
function! TabParams()
    echo "tabstop:     ".&tabstop
    echo "shiftwidth:  ".&shiftwidth
    echo "softtabstop: ".&softtabstop
endfunc

Well, I put up a 100 point bounty for this answer, and now I've half solved it myself. Not sure if I can accept my own answer...
Comment: You'll probably want to use let &l:shiftwidth, etc to set the local versions.
Comment: +1 yeah, but if this is what you really want, it's still an ok answer.
Answer: You can in edit mode also use Ctrl-T to indent and Ctrl-D to deindent to the next indentation level as set by shiftwidth, regardless of the tabstop, softtabstop or expandtab settings. Vim will automatically add/remove spaces or tabs to bring you to the right column.
If you use these commands to control indentation instead of Tab/Backspace you don't have to worry about all these tab settings fitting together and always get to the correct indentation level.
Answer: If expandtab is set then (as too much php points out), softtabstop becomes redundant. The only reason you might set shiftwidth differently from tabstop would be to cater to an odd habit; for instance, you use four-space indents but you prefer tab to insert eight spaces.
If expandtab is unset then things get fuzzier. If you want your code to look the same in with cat and non-vim editors as it does in vim, then tabstop should always be set at 8; in this case you would set softtabstop and shiftwidth both to your preferred indent level. If you instead prefer that every "physical tab" in the file represents one indent level, you would set tabstop and shiftwidth to your preferred indent level and leave softtabstop at zero (setting it equal to tabstop is equivalent except that if you change tabstop it will get out of sync, while zero just means "ignore this please").
Comment: I think this is wrong because only with `softtabstop` set to the right value, will backspace delete a spaced indent as if it was a tab. which is a must for sane use.
Answer: Your understanding of softtabstop and expandtab is wrong - so the stab option you suggest wouldn't be very useful.
expandtab is for when you want to use spaces instead of tabs for everything. If you set expandtab, then Vim ignores the softtabstop option and uses tabstop and shiftwidth to work out how many spaces to insert.
softtabstop is only for when you would like to use a mix of tabs and spaces, allowing you to indent with fine control (2 or 4 spaces), while keeping tab width at a higher value (usually 8) so that text appears in the other applications. Setting softtabstop=tabstop doesn't accomplish anything because Vim will always use tabs for indenting.
Update: As kaizer.se has pointed out, if you are using expandtab, then you still need to set softtabstop if you want Vim to backspace multiple spaces as though they are a tab.
Comment: I think this is wrong because only with `softtabstop` set to the right value, will backspace delete a spaced indent as if it was a tab. which is a must for sane use.
Comment: While you're right that `tabstop` and `softtabstop` become one variable too many when `extpandtab` is set, I think you're wrong on the priority. Just try it: set `ts=8 sts=4 et` and press tab; the cursor will be in column five, and four spaces will be inserted, just as if you had set `ts=4 sts=0 et`.
Answer: Are you changing your white space settings so often you really need a function to manage that?  If you are messing with tabstop a lot and also setting expandtab, you are probably going to have a mess over time as you change files with different values passed to stab.  Today I use :call stab (4), tomorrow it's :call stab (2) and last week it was :call stab (8).  Sounds like even if you write it, you'll soon stop using it.
If you plan to always pass the same value to stab, why not just edit your global settings?  In vim:
:e $MYVIMRC

and add the following:
set tabstop=4
set shiftwidth=4  "tabs are 4 spaces wide (default = 8)
set expandtab     "Convert tabs to spaces

This is how my .vimrc is setup.
Answer: One useful option is softtabstop=-1 which will set it to the value of shiftwidth.
You can also set shiftwidth to 0, in which case the tabstop value will be used.

Tab Vs Space preferences in Vim


how to interpret a scatter plot below?

Question: Below is the scatter plot of Brightness temperature on Y axis and corresponding Rainfall rate from TRMM satellite image on the x-axis. I want to know if there is a relationship between the two. If yes, how to get a regression equation from it and if not, how to know the reason for it?
Comment: Is this work for some subject? If not, how does it arise?
Comment: yes it is a project related work.
Comment: is this time series data ? Sounds like it might be. If it is perhaps Y should be conditioned on auto-regressive/time effects in order to assess the importance of X
Answer: Just from eyeballing the scatter plot, it doesn't look like there is much of a relationship. You could improve the plot by choosing a different symbol for the dots - one that takes up less room or is translucent would be good. You might also want to transform the rainfall rate, perhaps using log (if the rate is always positive) or square root.
Then you could try fitting a loess line or other smooth line to the data.
Then you can try regression; how to do regression depends on the package you are using (and questions about code are off topic here) but this plot looks like Excel - I, personally, would avoid using Excel and use a statistics package instead, because they have more options and so on.
If you decide not to transform the data, then you are likely to have some influential points. You might try a robust regression or a quantile regression.
Answer: Given that it is chronological data the scatter plot between two series may not be inferential. It is well known that if a series is auto-correlated the cross correlation is of limited value. When someone views the scatter plot trying to extract "guidance" time series data may not be amenable as the cross-correlation  is functionally related to the slope of a Least Squares model.
Initially "torturing the data until it confesses" by attempting to power transform the data based upon visualization may not only be anachronistic but inappropriate when dealing with chronological data.
As an example of this consider the GASX problem from Box & Jenkins we have the following XY plot which is somewhat despiriting as there is only a hint of possible success due to obfuscations. With thorough time series analytics , we can develop a model like this  with statistics like this  with an eye-popping r-squared .. all without unnecessary and unwanted power transformations (data torture !) .
In summary the things we were taught in the first course in statistics , i.e. eye the data first ... may only be applicable to certain types of data like cross-sectional data without gaussian violations. Chronological data analysis presents not only problems but opportunities to develop what might be a useful modelala GEP Box.
Certainly influential observations, changes in variance , changes in parameters etc. also need to be seamlessly incorporated into the model formulation which is an iterative process.

how to interpret a scatter plot below?


Softmax function for skipgram model

Question: In a skipgram model, the output of the j node of the c output word is given by this formula:

In this context, what is $w_{I}$?
Answer: Given an input, word $w_I$, Skipgram learns the probability distribution of words which are likely to co-occur with it in a context window of a given size. The $j$'th node on the output layer gives the probability of observing word $w_j$ in word $w_I$'s context window.
You seem to have same strange notation in your formula. $u$ for example is referenced with both one and two subscripts.
I think this is a better way to see it:
Skip-gram models the probability of a word $w_o$ being observed within word $w_i$'s context window as:
$p(w_o | w_i) = y_o$
$y = Softmax(z)$
$z = W_i C^T$
where $W$ is the word vector matrix ($|V| \times d$) and $C$ is the context vector matrix ($|V| \times d$), given vocabulary of size |V|. $z$ is going to be a $|V|$ dimensional vector which corresponds to the dot product of the input word's vector $W_i$ and every context word vector. $y$ transforms this into a probability distribution using the $Softmax$, also a $|V|$ dimensional vector, which is indexed at position $o$ to get the probability of observing word $w_o$.
This makes it very clear that the goal is to align word and context vectors of words which tend to co-occur, and similarly to spread apart those of pairs of words which do not co-occur.
Hope that helps!

Softmax function for skipgram model


Share posts to other user's wall in Sense/Net

Question: I am working on Sense/Net community edition. I need to share my posts to another user's wall but when using share command with the post, there are "My Wall" and "Current Workspace" options only. I can't browse other user's wall to choose. Please Help!
Answer: If you are using the old webforms UI, when you click the Share link you should see a button at the end of the 'target wall' line in the pop-up dialog window (top rigth corner). That should open a content picker window that will let you browse to pretty much anything in the repo.
Note: the picker will open at different roots, depending on the currently chosen target - but you can always change the root of the tree by selecting it from the dropdown in the top left corner of the picker.
Note2: if you see the button, but the picker is empty, it is likely a permission problem: the user that you are currently logged in may lack some permissions on the target subtree.
Comment: Thank you very much for your answer, @ Miklós Tóth! . I am in the case of your "Note2". Could you please help me in details about which permissions I have to get and which permissions of the user who will be shared my posts have to get in order to share posts between two of us?


Selectbox in wordpress theme options

Question: I am currently creating some theme options in wordpress & I am trying to create a select box so the user can select a skin to use for the theme. I am new to wordpress theme options so I don't know a lot about them.
I am in need of some help with the php so that when the user selects one of the options it updates that option with selected="selected" & saves it and then the value of that option is sent to the header.php file so i can use it from there.
HTML Select I am using
<select>
    <option value="" selected="selected">Select a skin</option>
    <option value="light.css">Light Skin</option>
    <option value="dark.css">Dark Skin</option>
 </select>

Thanks for any help!
Answer: Could not create a query to add the selected="selected"
for example:
<select>
    <option value="">Select a skin</option>
    <option value="light.css" <?php if($theme == $themename):?>selected="selected" <?php endif; ?>>Light Skin</option>
    <option value="dark.css">Dark Skin</option>
 </select>

You would add this to all <option> elements

Selectbox in wordpress theme options


How do I make a path from selected anchors points in illustrator?

Question: I have Illustrator cs6. I would like to make a path from selected vertices (anchor points) in different objects created with the pen tool. Is this possible? All the path-from-selection methods I've seen on this site seem to be for Photoshop.
Answer: If these anchor points are unconnected or have at least one open end, then you can simply use the Join command (Object > Path > Join).
If these anchor points already have 2 paths connected to them, no you won't be able to connect a third path to the anchor points. Illustrator anchors have an "in" and an "out" direction and that's all they can do. In other words you can never make a "T" joint with one anchor point. It's simply not possible in Illustrator.
Answer: Scott hit the nail on the head by saying this isn't possible. You can work around this, however, by making clever use of the Smart Guides.

Ensure your Smart Guides are switched on (View > Smart Guides or Ctrl / Cmd+U and that snapping to all kinds of grid is turned off. Turn Snap to Point on (View > Snap to Point or Ctrl / Cmd+Alt+".
Choose the objects you want to use anchors from and collect them in a single layer in the Layers palette (F7 or Window > Layers).
Lock the layer. You can do so by clicking the empty square in the Layers palette, next to the eye icon. A lock icon should appear there.
Create a new layer to draw on.
Use the pen tool to draw your path. The Smart Guides should help you find the exact positions of the desired anchors, they will be mentioned as 'anchor' in green once you hover close enough.
Comment: without locking any layer, you can start drawing in any white space and continue drawing snapping to any anchor with smart guide on.


Mark mandatory fields on form, if not filled with valid value

Question: if you create a new dataset, mandatory fields which are not set yet are marked with a wiggly red line.
it seems, that only string-values ( or several fields, but at least no integers ) are marked this way.
if integer-references are used ( 1-based ), the regarding fields are filled with 0 per default which causes the red line to disappear.
is there any way to leave those fields empty per default?
thanks for hints!
Answer: For integer and real fields you could set the ShowZero property to No (on the control or extended data type). Then zero values will appear with a red wave line.
For new base enums leave a blank zero enum value (by convention name it None).
Answer: Dynamics Ax does not have an "null" concept for fields. It uses some "zero" values for all data types - so you need to use some other NoYes field to express what you want if 0 is not empty


Can't join my friends' world on Minecraft Pocket Edition

Question: I can't connect to my friends' world on Minecraft Pocket Edition version 0.15.3. I can see their name pop up, I press it and it tries to load. Then it says: you need to authenticate to XBox Live. Please help!
Comment: Are you playing on the same WiFi? Did you try authenticating with Xbox Live?
Comment: Yes we are playing on the same wifi, they can connect to me but I cant connect to them?? I don't know how to authenticate to xbox live, I don't have an xbox live account?
Comment: @Jadthelad01 I have the same issue, and I couldn't solve it. Maybe someone will answer it :/
Answer: Get Xbox app installed and log in the Minecraft then log in the Xbox app. I think this should remove the authentication problem. If you don't have an account then sign up. In the realms option you see "sign in" tap it. I assume that you already have email registered in your phone . Use that and sign up
Answer: How to connect in Minecraft:

Turn on Hotspot on the host.
Connect a second phone to the other phone.
Open world (1st phone)
connect to world on second phone(right tab)
Comment: Hi Elijah!  Can you add some more information to this? What do you mean on 2. (Is the hotspot on the same phone running as host?) - Also, do you mean hotspot like cellular-wifi hotspot, or just allow other phones to connect to the first one in a network? (so that a hotspot could be like the same wifi?)


A little music theory question regarding chord progressions

Question: I am currently writing a piece of music for fun. In it I use a I-IV-V (C-F-G) chord progression but then I looked up other good chord progressions that began with C and found (C-G-Am-F) and was wondering if I could combine them to make (C-F-G-Am-F).
Comment: Well... what does it sound like?  That should answer your question in this case.
Answer: If you're new to writting music and music theory in general, one important thing to realize is that music theory is not a set of rigid rules that you must follow at all times. It is simply a set of guidelines that can help you understand what's going on in music and it can also provide certain formulas that sound good in general. However, if you write something that seems to break certain theoretical guidelines but you like the way it sounds then that's ultimately all that matters.
So to answer your question, if you really like the way it sounds then you can use it. Period. :)
From a purely theoretical perspective, you are also on solid ground here as well. (I IV V vi IV) Each chord leads nicely to the other one. You could even add another G at the end of it because the V chord leads back to the I chord very nicely (I IV V vi IV V), but it's not necessary. Try both and see which one fits best for your song.
Answer: Yes, you certainly can combine them. What's more, you are about to make a big discovery that can at least double the number of chord progressions you know, in one fell swoop.
That A minor is what's known as a substitute for the C major chord. Any time you see C major and feel like a change, try A minor and it's likely to sound good.
This is called substituting the relative minor of a major chord.
It also works in reverse: you can substitute a major chord for its relative minor.
But how do you find the relative minor? Just count down three semitones. C to B is one semitone; B to B flat is another semitone and B flat to A makes the third semitone.
So, taking your chord progression, you can substitute D minor for the F major and E minor for the G major. When you do the math you'll find that your choices for chord progressions have just gone through the roof.
Comment: A minor contains two notes out of three in common with C major.  Which means it won't jar too much when used in a situation where C major would bean obvious choice.  But this doesn't make it a C major substitute, it just puts it pretty near the top of the list of  'chords that fit well in a song in C major'.   You could be more adventurous and add Ab major to the list.  It includes the note C.  When the melody leads to C, try using an Ab chord rather than C chord.  It's a quite different effect, not a 'substitute'.  It doesn't take you home, it takes you somewhere surprising!  But it works.
Answer: Starting with C, the following sequences are available:
C Am F G
C F G Am
C Am G F
C F Am G
C G F Am
C G Am F
That's six ideas, without repeating any chord.
Most songs will have many more chord changes than that, so hopefully it becomes apparent that the number of sequences grows exponentially. One of the reasons so many songs have been written with very few chords. Obviously, once notes and their durations are put into the equation, it becomes even more apparent. More tunes than the stars in the sky, possibly?
Answer: Music is about melodic and harmonic movement, and what you choose will depend on the effect that you want.  The standard chord progressions work so well because the movement from chord to chord pushes forward until it ends and relaxes at the final cadence. When choosing your own chord progression, listen to how the chords interact with each other.  Does the progression seem to intensify and gain energy, or does it relax or even seem like a letdown?  This will give you a clue what chords you want, even if they do not follow a standard progression.  You don't need to follow the "rules", but you do want to really listen to what your progression is doing in terms of push/pull, tension/relaxation in the music.


Making embedded YouTube videos start loading before playing

Question: I am embedding a YouTube video in my website. Is it possible to make the clip start loading before the user presses play?
(I would not like the video to start playing automatically.)
Answer: You'd probably have to write your own YouTube player to do it. They have coded it this way on purpose; it really cuts down on the bandwidth on YouTube's servers. Think about all the people that might visit a site, but not click the button...they would still download the file anyways, wasting both their and Google's bandwidth.
Answer: Make start automatically and after a second pause it. I don't know how to do it but there's a chrome extension or firefox addon which does it.


How do incorporate a LOCAL MLS (Multiple Listing Service) database into my website?

Question: Has anyone created a website with MLS search/listing functionality?
Currently, brain storming how something like this is done and would like to see how others have implemented this.
Any advice is appreciated.
Thank You.
(in ASP.NET 3.5)
Answer: MLS is fragmented and local, there is no one uber-MLS to rule them all nationwide.  Contact your local market MLS provider and ask them for rates on a subscription to their database, if they offer one.  A local Realtor would have the contacts to get you in the door.  If you're looking to provide national listings, the aforementioned fragmentation makes this a tall order.
Answer: Tommy,
As Dave said, the MLS "system" is very much "local" and as I discovered myself, a shambles with no agreed standard. When you say local, where are you talking about? In California, you can use the ezRETS ODBC driver:
http://www.crt.realtors.org/projects/rets/ezrets/
Check out the CRT Center for Realtor Technology:
http://www.crt.realtors.org/
Hope this is of use :-)


Is there a single word for the quality of doing good works for others without any selfishness?

Question: Can anyone give the exact single word for the feeling/quality of doing good works for others without having any selfishness?
Comment: Are you looking for an adjective or a noun?  You ask for "the feeling/quality" and then tag "adjective".  Single word requests require an example sentence.
Answer: "selflessness"

Having, exhibiting, or motivated by no concern for oneself;
    unselfish

American Heritage Dictionary

Quote:

Twenty-five million veterans are living among us today.
  These men and women selflessly set aside their civilian lives to put
  on the uniform and serve us.
  - Steve Buyer
Link

Also "altruism"

Unselfish concern for the welfare of others; selflessness.
American Heritage Dictionary

Quote:

"Every man must decide whether he will walk in the light of creative
  altruism or in the darkness of destructive selfishness." ― Martin
  Luther King Jr
Link

There is also "philanthropy", but I think this word is less suitable, as not all philanthropists might act out of complete selflessness.
Answer: Doing good without a selfish motivation is called 'altruism'.

Disinterested or selfless concern for the well-being of others, esp. as a principle of action. Opposed to selfishness, egoism, or (in early use) egotism.

OED

The gift of giving: How does altruism improve teens' lives?

Medical News - 25 Dec 2017

New research finds that altruism - and social media - can help corporations cultivate trust with consumers

PhysOrg - 20 Feb 2018


Are dev downloads as complete as their regular counterparts?

Question: I was wondering, are dev downloads always as complete as their regular counterparts?
Answer: I assume you're referring to package names like seen in Debian and Ubuntu.
The -dev suffix for packages signifies that it contains files related to development using the non-suffixed package.
For example, the package zlib1g-dev contains the files you need to create applications using zlib1g. zlib1g just contains the library so existing applications can use the functionality within. Compilation requires the -dev files, because the compiler has to know where the functions come from, but once the program is compiled, only the regular package is needed, because the compiled application knows to load the library and use the functions within.
Unless you're manually compiling applications that use a library, you generally have no use for the -dev packages - you will want the non -dev packages instead. However, if you are compiling applications, you will want them both - the -dev package doesn't contain the library itself (but it usually depends on the library, so you'll get it that way).
Comment: But would it suffice to just download the dev?
Comment: No, sorry for not making that clear enough. If you're compiling an application, you need both -dev (to compile it) and the actual library (to run it). If you're just running an application, you just need the library iteslf.
Answer: The packages ending in -dev contain the headers and static libraries used when building an application that makes calls to that library. This may be enough for you if you are building an application from source, and you want to compile the library in statically.
However all the applications you install from packages will be using the shared libraries, which are not provided by the -dev packages, so you will need to install the base package as well.
Almost all library packages which end in -dev have a dependency on the base package, so if you select libpng-dev and choose to install it, your package manager should download libpng automatically. If you download libpng-dev yourself, and try to install it, the install will probably fail since it needs libpng specified as well. There are usually command-line switches to force an install without checking the dependencies, but they are rarely used and not recommended.
In summary: You should really download the base package as well as the -dev one, but usually the package manager will take care of that for you.


Difference between DVD-R and DVD+R discs

Question: What is the difference between DVD-R and DVD+R discs?
I usually buy DVD+R just because it's a plus. Does it make difference for archivists? The price is almost the same for both formats.
Answer: In prior readings, and analysis that I've read, DVD-R has a GREATER compatibility than DVD+R - for example, on older DVD Players (for example, 2004 and earlier), DVD-R would work in 90% of systems whereas DVD+R would work in 80%. (These are numbers from memory and could be off, but I'm 99% certain that -R was MORE compatible than +R.)
In addition, -R has 6.625 MiB more usable space. See: http://www.videohelp.com/dvd
Comment: This information is really interesting and useful. Thanks!
Answer: From About.com:

Standards Differences
1) The DVD-R (pronounced "DVD dash R")
  and -RW media formats are officially
  approved by the standards group DVD
  Forum. The DVD Forum was founded by
  Mitsubishi, Sony, Hitachi, and Time
  Warner, so it has tremendous industry
  support for its technical standards.
2) DVD+R ("DVD plus" R) and +RW
  formats are not approved by the DVD
  Forum standards group, but are instead
  supported by the DVD+RW Alliance. The
  DVD+RW Alliance is supported by Sony,
  Yamaha, Philips, Dell, and JP, so it
  also has tremendous industry support
  for its technical standards. Note that
  Sony supports both organizations.
Technical Differences
The main functional differences
  between DVD-R and DVD+R are:
1) the
  DVD recorder's built-in defects
  management
2) the way the recorders
  format and rewrite DVDs
3) the price.
Comment: DVD6C officially accepted DVD+R and DVD+RW on Jan 25 2008. see wikipedia: http://en.wikipedia.org/wiki/DVD%2BR
Answer: My understanding is that DVD+ is the better system, especially now that virtually all drives will handle both media.
http://www.cdfreaks.com/article/203-Why-DVDRW-is-superior-to-DVD-RW/
Comment: An old but very informative article. Thanks!
Comment: That article is highly relevant, but please avoid link-only answers.
Comment: Read the dates.
Answer: Um... just because there's a "+" in the name doesn't make it better.
Read Wikipedia (link) for a simple explanation:

Recordable format compatibility
DVD drives from 2004 should be able to
  read either of the competing
  recordable formats, older drives may
  favour DVD-R discs. Modern drives
  (certainly at time of writing in 2007)
  typically allow writing to both
  DVD-R[W] and DVD+R[W] discs making the
  difference largely irrelevant to the
  average consumer.
DVD-R for Authoring: a special-purpose
  DVD-R used to record DVD masters,
  which can then be duplicated to
  pressed DVDs by a duplication plant.
  They require a special DVD-R recorder,
  and are not often used nowadays since
  many duplicators can now accept
  ordinary DVD-R masters.
DVD-R (strictly DVD-R for General):
  can record up to 4.7 GB in a similar
  fashion to a CD-R disc. Once recorded
  and finalized it can be played by most
  DVD-ROM players.
DVD+R: can record up to 4.7 GB
  single-layered/single-sided DVD+R
  disc, at up to 16x speed. Like DVD-R
  you can record only once.


Moshe sees Hashem's back

Question: Hashem tells Moshe that he can see His back not His face (Shemot 33:23),some interpret this to mean that we cannot understand the future but we are at times able to understand things with hindsight, can someone provide a source for this interpretation? What source explains the verse this way? Thank you!
Comment: Can you tell us where you heard that interpretation?
Comment: I saw it a bunch online but with no source
Comment: on sites like this? https://torah.org/torah-portion/torah-thoughts-5767-kisisa/
Comment: yes exactly, you dont think theres a source?
Comment: I think that if that is a place where you saw it, asking them might be more direct.
Answer: It's the Chasam Sofer on the posuk (among other possible sources I've heard the vort so many times that I doubt the Chasam Sofer is the only source but it is the only one that I know of)
Note: It's not an interpretation of the posuk. The Chasam Sofer says it is a remez (hint)
Comment: thank you so so much!!
Comment: Source: https://www.sefaria.org/Chatam_Sofer_on_Torah%2C_Ki_Tisa.38?lang=he

Moshe sees Hashem's back


Limiting number of calls using Yahoo YQL in C#

Question: I'm a bit new to C# and i'm running into a problem with YQL limiting the number of calls to 10,000 an hour.  I keep getting my temp ban everytime I try to run my app.  I read that Yahoo has a limit of 10,000 calls per hour but i'm a little confused about what exactly constitutes a "call."  The code I"m using to get the XML from YQL is below:
<code>    public static string getXml(string sSymbol)
    {

        XDocument doc = XDocument.Load("http://www.google.com/ig/api?stock=" + sSymbol);

        string xmlraw = doc.ToString();
        string xml = xmlraw.Replace("'", "");

        return xml;

    }
</code>
Where sSymbol is a value that is returned from my SQL DB.  I have roughly 2,000 stocks in my Database.  I have also read that some people are saying 1,000 calls per hour so I have has misunderstood what I was reading.
The question I guess is two-fold:  What constitutes a calls?
How can I avoid this rate limit if I want to download each of the 2,000 quotes per hour?  Is it as simple as asking yahoo for 200 quotes per Load and calling the Load 10 times?
Answer: For this case a call is a request. If you want to make single stock requests you need 2000 calls. Fortunately you can make one call requesting more than one stock as with Yahoo.
http://www.google.com/ig/api?stock=MSFT&stock=IBM


Recover poorly backed up gpg secret keys

Question: I have just restored my data from a borg backup repository after a computer failure.
My ~/.gnupg folder seems fine, private keys are there, and permissions look correct. Usually borg does a good job at this. When I cat the private keys files, there is no sign of data corruption.
However I cannot list or use the private keys. I can only interact with a public key that was imported by pacman during the installation process.
I came across a few posts with similar issues of private keys not recognised after being copied from one machine to another, and usually the problem gets solved following recommendations of repeating the transfer using gpg —export-key and then importing them with the opposite command.
Unfortunately I do not have that luxury since my old machine has crashed and is not recoverable. I was aware of importing and exporting keys, but I always assumed it was just a safe procedure to move keys around.
So I have two questions:
Do I have to review my backup scripts and use the export command for my gpg secret keys?
Can I recover my secret keys nonetheless?
======= Edit ======
I found a post on arch forum with a user having exactly the same problem I have, so I got more leads to follow.
What I tried so far:
gpg --version
> gpg (GnuPG) 2.4.5

ps aux | grep gpg-a
>  /usr/bin/gpg-agent --supervised

#About ownership:
chown -R $USER:$USER .gnupg

# Checking UID/GID with show a result of `1000` both on filesystem # # and backup archive.
ls -vn .gnupg/private-keys-v1.d

gpg --export-secret-keys
> gpg: WARNING: nothing exported

gpg -v --list-secret-keys
> gpg: enabled compatibility flags:
> gpg: using pgp trust model

# Most relevant results of:
strace -f -o /tmp/gpg.strace gpg --list-secret-keys
cat /tmp/gpg.strace
> 76220 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
> 76220 access("/home/$USER/.gnupg/secring.gpg", F_OK) = -1 ENOENT (No such file or directory)

# Listing public keys
gpg --list-keys
> Returns one public key imported by pacman during install

gpg -K
> Returns nothing

ls -ln .gnupg/
.rw-r-----   12 1000 13 Mar 10:45 common.conf
drwx------    - 1000  6 Sep  2023 crls.d
.rw------- 2.0k 1000 13 Sep  2023 gpg-agent.conf
.rw-------  703 1000  5 Mar 18:48 gpg.conf
drwx------    - 1000 30 Aug  2023 private-keys-v1.d
drwxr-x---    - 1000 14 Mar 19:27 public-keys.d
.rw-r--r--    0 1000 24 Aug  2023 pubring.gpg
.rw-r--r-- 7.7k 1000  5 Mar 12:13 pubring.kbx
.rw-r--r-- 7.0k 1000  7 Sep  2023 pubring.kbx~
.rw-------  600 1000  8 Mar 07:20 random_seed
.rw-r-----  676 1000 30 Aug  2023 sshcontrol
.rw------- 1.6k 1000  2 Sep  2023 trustdb.gpg

Comment: Please update your question with the output of `ls -l ~/.gnupg`; that will help us understand the current state of things. Also, does `gpg -K` produce no output, or are you getting an error?
Comment: (Assuming 2.1 up) do you have valid `pubring.kbx` and is `gpg -k` (or `gpgsm -k` if you use smime) correct? gpg (and gpgsm) uses the publickey ring to identify the keys and won't list or use a secret=privatekey that doesn't have a matching publickey.
Comment: Thanks for the interest.`gpg -K` returns nothing, the `pubring.kbx` is present, I have no idea if it is valid though. I added all the new info I could gather in the EDIT section at the end of my original post.
Comment: I forgot; gpg 2.4.5
Answer: I am trying a garuda kde install at the moment, and it turns out it comes with some default gpg settings I have not yet completely figured out.
Anyway, it turns out some process is constantly recreating a basic .gnupg folder. It does not look like it is to blame on gpg agent since I was able to disable all gpg related systemd services (mainly gpg-agent.service and gpg-agent.socket) as both user and root and then killall gpg-agent.
What was happening is that I would never actually restore my own gpg folder from backups, but merging it with an automatically created and for some reasons it would not work.
Finally just to make sure I found the culprit, I could rm -rf the folder and restore it from backup using a script so that whatever process xas recreating it would not have the time to do so.
It has been working fine since.


R: I need to understand the mechanism behind reading a subset of a file in R (e.g., via sqldf) or other data-science-centered programming language

Question: By reading only a subset of the records of a file into R (or Python), one can speed up performance tremendously. I am curious about the mechanism behind this kind of file input. To read only a small part of a file, my guess is that I have to somehow access the file, load it in memory and filter out that small part that I am interested in (Otherwise how else would I be able to query the subset of the records that I want?). In otherwards that should then mean I have anyway had to read the whole file into memory. So if it was a 20GB file, it means I have had to read 20GB so as to filter off the 1GB that I want. Where do the performance benefits come from then?
Answer: There are multiple aspects to performance when it comes to reading a portion of the file. I am going to discuss the two most common one based on functions that are available in the base R.
What is R doing at the time of reading?

Establish a connection with the file.
Open the file
Read the data sequentially
Load the data in memory
Close the connection
dump the object into a variable if assigned, else render the output in some gui.

While it is doing all these steps, it is also trying to:

Understand how big the data is so that it can allocate appropriate memory
What are the data types or classes so that it can (again) allocate appropriate memory.

Sub bullet 2 is important here because unless R reads the entire dataset, it cannot determine the datatype. Providing this information alone at the time of the read makes processing much faster.
By reading a subset of the data, R makes it easier to interpret the datatype and then assigns it to the subsequent sets without worrying about what the actual datatype is.
Does R really loads all the data every time?
Functions that allow filter at the time of read, really target the third step of reading data sequentially.
Each row is compared against the filter criteria and the result stored as a binary logical index. This index is then used to determine, what remains when the connection closes. I could not find specific reference in the documentation if the discard happens immediately or post entire read, but I will assume that the R collects the garbage automatically as it reads with a filter criteria and makes the memory available to a subsequent line of data.
May be there are other experts who can throw more light on the real inner workings here and either validate or correct my assumptions, but hope my context helps.
Answer: It was not clear when you said "reading only a subset of the records of a file into R". If head(dataset, 100) is the subset that you intended, it doesn't read the entire file into memory. It just reads the first 100 rows into memory.


Word definition request

Question: I am searching for a word that describes a person who complains about people who complain. I have tried numerous synonym blogs, but cannot find anything satisfactory.
Comment: I don't think such a word exists, but I feel a need for it, too. Can I try to invent some? Or is this forbidden by the rules?
Comment: @user626528 not as an answer, but I usually will do so in a comment, for example: metacomplainer, comcomplainer.
Comment: Can you provide a sentence where you would use it?
Comment: You could call them a hypocrite.
Comment: But if you invent such a word, user626528, what will we call people who complain about such souls?
Comment: @JeffSahol, Ok. I'd call them meta-whiners.
Comment: Or "derivative whiners". Does this sound understandable enough?
Comment: "kvetcher-kvetcher"
Comment: @user626528 "whine connoisseur"...or, by extension, "oenophobic"
Comment: Good question: Jim.
Answer: Truly the behavior you describe is most often designated by the adjective "hypocritical," while the actor noun is, of course, a "hypocrite." If the term is too harsh-sounding, you can add a modifying adverb ie, "unconsciously, unintentionally, or inadvertently hypocritical," or an adjectival modifier with the noun, hypocrite. And, it is well worth noting, we all have our blind-spots and are, to a greater or lesser degree, possessed of this same character flaw. Much like the person you seek to describe, what we find disagreeable in another, we are often blind to in ourselves.

Hypocrite noun
1. a person who pretends to have virtues, moral or religious beliefs, principles, etc., that he or she does not actually possess, especially a person whose actions belie stated beliefs.
2. a person who feigns some desirable or publicly approved attitude, especially one whose private life, opinions, or statements belie his or her public statements. See, Thesaurus.com LINK

Or, the less common designation, a "dissimulator," or one who "dissimulates"

Dissimulate verb (used with object), dissimulated, dissimulating.
1. to disguise or conceal under a false appearance; dissemble:
  "to dissimulate one's true feelings about a rival."
  verb (used without object), dissimulated, dissimulating.
2. to conceal one's true motives, thoughts, etc., by some pretense; speak or act hypocritically. See, Thesaurus.com LINK
Comment: These words are very general, not specific to complaining about complaining.
Comment: @Barmar - no such English word exists.
Answer: If the complainers are continually complaining then they could be described as whingers; and since you disapprove of such behaviour then you are an anti-whinger. If you want to declaim your disapproval then you could be a whinge-denouncer or a whinge-decrier or a whinge-deplorer or a whinge-censor ...

Word definition request


Does Cycles work with wave optics?

Question: You know how raytracers pretty much just trace geometrical rays? I was wondering if Cycles has any wave optic features, where it would act as an actual electro-magnetic wave. Some really useful features would be diffraction, Interference, and polarization. Is there a method to getting/tricking Cycles into working this way?
Answer: I don't believe Cycles simulates light as waves. But Dispersion (Diffraction) effects are on the way, and can already be 'faked' in many ways.
If you are interested in optics experiment with cycles, take a look at the pinhole camera and
shaped bokeh.
Comment: +1 Interesting. Thanks. Do you have any idea when dispersion is coming out?
Comment: I have been trying for so long to get nice iridescent materials.. can't wait for dispersion and diffraction (+ absorption, opalescence and all the rest too, why not? ;) )
Comment: unfortunately not really.
Answer: As Cycles is a RGB-based raytracer, not a spectral raytracer, it's based on single paths for all colors(with the colors changing at every bounce/transmit). Therefore, dispersion cannot be simulated directly.
You can fake it, though, by separating shaders by color and mixing them, though this would often require changes to the entire scene. It can be done, though, by mixing a red refraction/glass, a blue refraction/glass, and a white refraction/glass at the necessary IORs.  One can also do a small amount of reflection for the coating seen on some glasses or lenses.
Comment: interference and polarization would _really_ be cool.. :D
Comment: Strictly speaking Cycles wouldn't need to be a spectral renderer to support dispersion, it can be fit in without that. At the same time spectral renderers usually do not support effects such as interference and polarization, I've only seen that in research code, not in any production renderer.
Comment: @3pointedit You could possibly use two render layers, each of which renders the contribution of each of two orthogonal polarizations, and then finally combine them.
Comment: Is there a way to fake polarisation? I guess you could use normal and camera rays?

Does Cycles work with wave optics?


How to compile to wasm and deploy a custom pallet instead of an ink! smart contract to the Contracts module/pallet?

Question: I enjoy writing custom pallets so I would like to know if instead of writing an ink! smart contract and then compiling it to .wasm and deploying it to the Contracts module/pallet of a Substrate-based chain, would it be possible to instead write the same logic in a custom pallet and then compile that to .wasm, and then deploy it to the Contracts pallet/module of a Substrate-based chain?
Comment: there is currently a sol2ink repository to convert Solidity to ink! https://github.com/Supercolony-net/sol2ink. so maybe one option could be to create a similar pallet2ink repository to allow for easy migration from a custom pallet to an ink! smart contract that could then be compiled to .wasm and deployed to the Contracts module/pallet of a Substrate-based chain.
Answer: From the ink! docs:

ink! is just standard Rust in a well defined "contract format" with specialized #[ink(…)] attribute macros. These attribute macros tell ink! what the different parts of your Rust smart contract represent, and ultimately allow ink! to do all the magic needed to create Substrate compatible Wasm bytecode!

In my opinion is a very interesting question, I hope to see some good ideas answering your question. Here is mine:
As far as I know there is not a direct way to do that, as Luke suggested in the comment one option would be to create a tool that translate the pallet runtime code into the ink! code, and then we will be able to generate a Wasm binary, a metadata file (which contains the contract's ABI) and a .contract file which bundles both.
A few months ago I did that exercise manually, I built a pallet and I convert it into a smart contract in ink!.
I was able to reuse  most of the code and replace the FRAME Macros  with the ink! macros was not a big deal. However I found a couple of stoppers where the translation was not that trivial:

ensure_root in ink!. (It is possible now. The ink! team implemented a few weeks ago).
BoundedVec on ink!. (A workaround in the answer).

So keep in mind that some of the things that you can do on pallets will need a very special treatment using ink!, and example might be interacting with other pallets in the runtime.


Can an asteroid have a molten core?

Question: Most natural satellites in our Solar System are expected to contain fission furnaces at their cores, and some of these moons do have a striking resemblance to an asteroid. I'm wondering if we could establish a colony on an asteroid and harvest the "aster-thermal" energy (if there is a proper term for it) or rather create a space tourism hotspot for people to enjoy a relaxing bath in the hot spring. Is it possible for an asteroid to contain a molten core or do I need to look elsewhere to locate my "colony"?
Comment: This question is suitable for Physics.SE, I think..
Comment: Haha.. Seriously? Hot spring bath in nearly zero G?
Comment: what happens why did the migration took place automatically and unauthoris-tically? I learnt a moment ago that these two genres/categories are at two extreme end of the spectrum! Anyway please keep the answers coming as they are good scientifically, theoretically and logically speaking.
Answer: Yeah, entirely possible.
There are a couple of examples of asteroids that we've identified which may have, or recently had, molten cores. 21 Lutetia is a notable example. Vesta is another.
The main issue is that because of their size, the ratio of surface area to volume is higher than the average planet. This means it cools much faster. So while some may have molten cores, they won't stay that way for as long as a planet might. Additionally, most aren't very near large gravity wells like a moon might be, so they don't have the same tidal forces adding energy to their interiors.
All this makes it less likely to find an asteroid with a molten core, but it's not impossible.
Comment: @PiminKonstantinKefaloukos Note that the surface area of a sphere is given by $4\pi r^2$ while the volume is given by ${4\over 3} \pi r^3$. The volume grows much faster than the surface area for an increasing radius. Thus for a smaller radius the surface area to volume ratio is higher than for a larger radius.
Comment: @JDługosz ha ha, what was I thinking. Thank you for referencing the principle that was stated by Galileo Galilei. Nice to learn something cultural.
Answer: Ceres is the largest asteroid (or smallest dwarf planet, whatever); the core isn't molten based on best current data and modeling, but new data is forthcoming soon, in the sense of Earth, Io; but it may be warm enough to have liquid water. Note that Mars also doesn't have a molten core and that Io and the Moon, etc. have molten cores due not to nuclear decay or to primordial heat but gravitational energy primarily.
Comment: Suggest you wait a few months before making blanket statements about Ceres :-)
Comment: true, we should have more information on it in the near future.

Can an asteroid have a molten core?


iPhone Storage Space Inaccuracy (No Storage Space)

Question: I have an 8GB iPhone 4s and it always says I have no space. However when I go into Settings > General > Usage It says that I have 1.3GB of free space. I only have 5 photos and 3 Apps downloaded on my iPhone. Why does it constantly say I have no space when it should?
Comment: Depending on the apps they can gobble space pretty bad. How much space are the apps using?
Answer: Sometimes I have seen a lot of space taken up with the "other" category in the graph of space taken up on your iPhone in iTunes. Fixing that is not actually that difficult.

Back up your iPhone to your computer (I would encrypt the backup as the backup will then save all your passwords too, which it does not do if you don't encrypt the backup.)
Once done go into Settings > general > reset and erase all settings and data. (you may have to first turn off Find My iPhone, if its on, under iCloud)
When the phone reboots, plug it back into the computer, launch iTunes and restore the phone from the backup you just made.

Usually when you do this, if there is a lot of temporary or unneeded data on the phone this will do some house cleaning and free up some space. No guarantee this is your issue but it is easy enough to do and you won't lose anything except maybe an hour (or less) of your time.
Comment: A less invasive way could be [logging out of iCloud and back in again](https://apple.stackexchange.com/a/325212/49438)
Answer: you can see what is eating up storage space: In your Settings app, go to General > Usage > Manage Storage.
Your phone will compute the space used by each application and their respective data.
Note: Hope I'm right with the menu names as my phone is in french...  ;)
Answer: I had the same exact problem where the storage would not add up, after so much researching, I found out that Telegram app caches all the datas but does not show it in the Settings > General > Usage > Manage Storage. If you are using Telegram App, go to it's Settings > Data and Storage > Storage Usage and there you can Clear Cache and free up some space.


channel gain calculation

Question: I want to calculate the SINR term in an up-link of wireless communication system but there is different models for simulation. I want to know what is the exact meaning of $|h|^2$ in this formula:
$\text{SINR} = \frac{p|h|^2}{\text{Interference+Noise}}$
Is this a Rayleigh fading envelop? If yes, what about path loss? Isn't any difference between near and far users? How can I simulate the channel gains correctly?
Thanks
Answer: In your definition of the SINR, $h$ is the channel coefficient. What it means is this: if we send a signal $x(t)$ and model our channel as stationary and frequency-flat then the signal we receive is $y(t) = h \cdot x(t)$ (plus noise) so that its power is $P_y = E\{|y|^2\} = |h|^2 \cdot P_x$. This is why $|h|^2$ appears in your SINR expression: the channel coefficient scales your received signal and therefore $|h|^2$ scales your received power.
Now, in practice, $h$ would contain all the effects that can happen to a signal: (free-space) path loss where $h$ is proportional to $1/d$ where $d$ is the distance (near/far users); small-scale fading, where $h$ varies rapdily so it's best described statistically (e.g., via a Complex Gaussian, which then leads to $|h|$ being Rayleigh distributed); shadowing which can be modeled as a slow variation of the variance of $|h|^2$, e.g., via a log-normal distribution; and more.
Whenever you start modeling $h$ randomly, your received SINR will become a random variable as well. This makes sense though: when you're in a fade, you have little power and as soon as you drop out of it, your power is back to being high. You can then look at statistical moments of the SINR or the quantities derived from it (such as the capacity, leading to things like ergodic and outage capacity, respectively.

channel gain calculation


Poincare Inequality on compact Riemannian manifold

Question: I'm studying Jurgen Jost's Riemannian geometry and geometric analysis, in the appendix there is a version of Poincare's inequality on compact Riemannian manifold: if $M$ is a compact oriented Riemannian manifold, if $f\in H^1(M)$ (the Sobolev space) satisfies $\int_M f=0$, then $$||f||_{L^2(M)}\leq C||Df||_{L^2(M)}.$$ Here $C$ is some positive constant depending on $M$ only.
I googled but could not find a reference for this result. It doesn't seem to follow directly from the version on open sets of $\mathbb{R}^n$ because when you take partition of unity $\phi_\alpha$, the derivative on the right hand side messes things up. Can someone give me a reference or point out how to proceed? Thank you!
Answer: The usual references are the books from Emmanuel Hebey: Nonlinear Analysis on Manifolds: Sobolev Spaces and Inequalities and Sobolev Spaces on Riemannian Manifolds.


How do I prevent a branch from being pushed to another branch in BZR?

Question: We use a dev-test-prod branching scheme with bzr 2. I'd like to setup a bzr hook on the prod branch that will reject a push from the test branch. Looking at the bzr docs, this looks doable, but I'm kinda surprised that my searches don't turn up any one having done it, at least not via any of the keywords I've thought to search by. I'm hoping someone has already gotten this working and can share their path to success.
My current thought is to use the pre_change_branch_tip hook to check for the presence of a file on the test branch. If it's present, fail the commit.
You may ask, why test for a file, why not just test the branch name? Because I actually need to handle the case where our developers have branched their devel branch, pulled in the shared test branch and are now (erroneously) pushing that test branch to production instead of pushing their feature branch to production. And it seems a billion times easier to look for a file in the new branch than to try to interrogate the sending branch's lineage.
So has someone done this? seen it done? or do I get to venture out into the uncharted wasteland that is hook development with bzr? :)
Answer: your approach should work and the plugin will be quite simple: just raise an exception if the file is present.
(For some sample code you can look at a plugin I wrote that can prevent commits on some conditions https://launchpad.net/bzr-text-checker)


ERC721: How to get the owned tokens of an address

Question: There is a balanceOf function, but it only displays one uint (the token identifier)
I see most ERC721 tokens doing this so I am confused on how to view all owned tokens.
Answer: Per https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md, there's an optional "enumeration extension". If this is implemented for the token you're interested in, then you can just call balanceOf to get the number of tokens owned by the account, followed by tokenOfOwnerByIndex in a loop to get each owned token ID.
If it isn't implemented, then there's no well-defined way to discover all of a user's owned tokens, but there may be a non-standard way to do it for the specific token you're interested in.
Comment: This is the correct answer, the enumerable extension was created explicitly for this purpose. The only correction is that it's `tokenOfOwnerByIndex` not `byAddress`.
Comment: Cheers for the help :)
Comment: what is an .md file? What application front-end do you type `balanceOf` into?
Answer: The function balanceOf actually returns the number of owned tokens and not the identifier of an owned token.
Therefore I'd assume the process could go something like this:
1) Find out how many tokens an address has (balanceOf). If this is more than zero, continue the process.
2) Find out which tokens exist in the contract. The standard offers no direct functionality for this so this depends on the implementation. Or, as is probably the case, simply start enumerating from zero upwards hoping that the tokens are enumerable in that way (and not assigned for example to random numbers). So you would check "does someone own token 0? does someone own token 1? .."
3) Once you have found all the tokens owned by the address you can stop the process.
Comment: See also my answer. I believe most tokens implement the optional "enumeration extension" which does allow for efficiently finding a user's tokens.
Answer: There is basically no way to easily view all owned tokens. My Ethereum wallets own probably lots of random worthless tokens which someone has airdropped and I don't even know about it.
Some services (wallets) display many of the owned tokens. I'm unsure how exactly they do that but most likely they simply have a database of known token contracts and they check whether a certain address owns those known tokens.
If I now created a new token and donated some of it to random wallets nobody would probably know about it unless I somehow tell wallet creators "please include my token contract in your checks".
At least myetherwallet used to display all (known) ERC20 tokens still about a year ago but the quickly they gave up and last I checked you had to manually enter the contract address to see those tokens. The amount of different token contracts exploded a year ago and it was probably too much hassle to try to keep track of them (to store them all in their database).
Comment: I am looking at a specific token, I don't see a easy way to check this from the token's contract
Comment: Ah, sorry, I had misunderstood the question. My answer is not so relevant in that case.
Answer: Unfortunately the best practices way is not a 1-liner.
You'll need to comb through the events that involved the account in question.
Here's some code that would work.  Disclaimer: i'm only grabbing the Transfer events that involve incoming transfers your address in question.  If tokens were transferred out of this address then you'll need to comb through those transfer events as well.
I hope this helps.  I think all of us have asked this question at one point or another. I wish the answer was a little more straight forward.
let toAddr = '0xBc25A51F63AA4Db0FFff0C34467c8EE6DCb2d0FC';
let incomingTokenTransferEvents = await book.getPastEvents('Transfer', { filter: {'to': toAddr}, fromBlock: 0, toBlock: 'latest'})
incomingTokenTransferEvents.forEach( (event) => console.log(event.returnValues.tokenId));

Answer: This can be done by query the logs. Ususally When an nft is minted, the Transfer event is triggered from 0 address to msg.sender. Using this, we can query the blockchain for the specific address containing the required address that you want to get.
Comment: As it's currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


Asp.NET Principal WebORB HttpHandler

Question: I have a Flex-WebORB-Asp.NET application. When logging in, there's an AuthenticationHandler which implements a WebORB interface:
IPrincipal CheckCredentials(string username, string password, Request message);

So I create a Principal and return it. WebORB uses the Principal to check for Authentication and Authorization of remote method calls.
var principal = new GenericPrincipal(new GenericIdentity(user.id.ToString()), new[] { "admin" });
return principal

Now, at this point, if I check what HttpContext.Current.User.Identity is, it's a WindowsIdentity.
So far so good. When later on, a remote call is done through WebORB, I get the id of the logged in user by calling:
Thread.CurrentPrincipal.Identity.Name

So I guess WebORB makes sure the Identity of the Thread is set with each remote call.
Problem is that when I call a HttpHandler (to retrieve an image), I also try to get the id of the logged in user with Thread.CurrentPrincipal.Identity.Name, but that doesn't work. Probably because with a HttpHandler, WebORB doesn't come into action.
How would you solve this so that I can get the id of the logged in user the same way in both cases? Put it in a session object? Can you change the HttpContext.Current.User.Identity? Shouldn't the HttpContext.Current.User.Identity be the same as the Thread.CurrentPrincipal.Identity.Name?
ps: The users are not in Active Directory.
Answer: No, they are different.

Asp.NET Principal WebORB HttpHandler


Children of Men - title meaning?

Question: What's the meaning of the title "Children of Men"? There are no men giving birth to babies, obviously.
Comment: All live births are children of both men and women (unless they are virgin births). So there is no particular problem in calling newborns "children of men".
Answer:
According to Cuarón, the title of P. D. James' book (The Children of Men) is an allegory derived from a passage of scripture in the Bible. (Psalm 90 (89):3 of the KJV: "Thou turnest man to destruction; and sayest, Return, ye children of men.")
  James refers to her story as a "Christian fable" while Cuarón describes it as "almost like a look at Christianity": "I didn't want to shy away from the spiritual archetypes," Cuarón told Filmmaker Magazine. "But I wasn't interested in dealing with dogma."

Wikipedia
Comment: @Val This passage means that humans became destructive, and God wants them to return to him. Humans are merely children to God, children of men(humans).
Comment: @Val Bible, god, people dying en masse, women giving birth to child that is a saviour of whole huMANity. I don't know if you know but bible is very male centered. As Men are people and that's all. So by writing "Men" author of the psalm had in mind "every single human".
Comment: The implication of the title is that mankind has been divinely made sterile as a punishment from God.  And that the children one can hear playing as the final scene fades to black are like Noah and his family - as the old order slips away, God allows a small number of innocents to survive to take over the ruins.
Comment: I didn't understand any of that, to be honest. How is that quote related to the plot of the book/film?
Answer: "Men" does not necessarily mean male
The classic (now a bit archaic?) meaning of the word "men", especially when referring to large groups, includes all humans, not only male humans. So it's reasonable to assume that the title essentially means something like "Children of mankind".
Comment: I don't feel this actually answers the question, and is not much more than a comment.
Answer: The phrase "Children of men" from the psalm in the bible implies a belonging and origin from God or ones original nature (similar to the phrase "Son of God").
In the novel it is the found in the hopefulness of the story which runs within a backdrop of bleakness and inhumanity. I believe there the title implies that it is inherent in humanity(man) to find its way back to its essential humanity (or God in the Christian sense).
Psalm 90 (89):3 of the KJV: "Thou turnest man to destruction; and sayest, Return, ye children of men.
Comment: @OldPadawan I feel this answer actually does a better job (or, rather, a job at all) of explaining it.
Comment: Hi there, welcome to Movies & TV. I don't see some significant difference between your answer and the top-voted one, quoting same bible references. Could you please clarify this?
Comment: @OldPadawan I agree with Joachim, top voted answer doesn't really answer the question. The phrase 'children of men' does come from the Bible reference so repetition can't be helped in that sense. However I think it adds by describing the structure of the phrase and why it applies to the novel. I also didn't want to put too much interpretation as it is also up to the reader to define for themselves to some degree, so there is a balance.
Comment: @Joachim and @ Potentially: I don't disagree with what you say, but was expecting clarification in order to distinguish between these two answers. As they're written, I have to take a little of each one of them without clearly understanding, but that's maybe just me :)
Answer: Plot of the movie is:

In 2027, 18 years of human infertility have left society on the verge
  of extinction. When one woman miraculously gets pregnant, Theo, a
  bureaucrat, must transport her to safety.

In my opinion, the title is Children of Men, since the book states that male infertility is the reason why no one is able to produce any children in this fictional world. Hence named Children of Men.

Children of Men explores the themes of hope and faith in the face
  of overwhelming futility and despair. The film's source, P. D.
  James' novel The Children of Men (1992), describes what happens when
  society is unable to reproduce, using male infertility to explain this
  problem. In the novel, it is made clear that hope depends on
  future generations.

Source
Comment: How does the book explain anything with male infertility. And how does the movie refer to male infertility? I didn't catch any reference whatsoever.

Children of Men - title meaning?


Actionscript 2: MovieClipLoader.onLoadProgress not firing in production

Question: I'm working in Flash CS3, targeting Actionscript 2, and I'm writing an image preloader.  When I test the movie with the download simulation turned on everything works just fine, and my preloader successfully updates the download progress bar I've made. When I upload the movie to my web server though, it almost behaves as though the MovieClipLoader.onLoadProgress event isn't firing until the very end of the upload, because the movie sits there for several seconds downloading with no notification and then there is a sudden burst of activity and my preloader goes from 0 to 100% very rapidly.  Has anyone encountered this behavior before, and if so what am I doing wrong?
Answer: I'd suggest using a debugging proxy like Charles (http://www.charlesproxy.com/) to see how the file is being downloaded from your server (e.g. is there a high latency before the download begins, how many seconds does it actually take to transfer the data). That way you can better see if the preloader is accurately reflecting the data transfer from the server.
Answer: Have you tried it in different browsers?  I believe Flash will, at least in some cases, use the browser to download the file.  It's possible Firefox is downloading the file w/o notifying Flash, and then sending it all to flash in one big burst.  I haven't seen FF do this myself, but it's possible an extension is intercepting the download.
The only time I believe I've seen the progress happen in an burst like that before is when I was getting a cached copy instead of it redownloading.  But since you're seeing an actual download happen I'm guessing that's not what you're getting.
Try it in IE and see if you get the same behavior.
Comment: As far as I know Flash always uses the browser to download content (unless it's a over a socket). The standalone browser on windows even shares a cache with Internet Explorer.
Answer: Thank you for the quick reply Matt.  I had never heard of Charles before, but it seems like an incredibly powerful tool.  For my purposes I can also see the file get requests and progress using Firebug's Net tool in Firefox.  Both Charles and Firebug show that the images are being requested and downloaded successfully, and all images are completed several seconds before the flash movie appears to respond and update the loading bar/fire onLoadProgress.
Answer: After much testing, I ended up completely restructuring/rewriting how the preloader works, and this fixed my issue.  What I thought was some lag between the loading of the final image and the firing of the event was actually (for reasons that I still don't fully understand) the code that updated my preloader clip wasn't being run as the events were being fired, but instead was waiting until the last image in the series began loading to start working.  I moved the code that updates the loading progress from inside the preloader movie clip (which was looking at some _root level progress variables and updating itself on enter frame) into the onLoadProgress event itself.  Everyone who commented thank you very much for the quick responses, and as soon as I reach my 15, I'll vote up both of your answers as they were helpful, if not exactly the answer I was looking for.


Is it legitimate to use sensitivity and specificity next to more proper performance measures to compare classifiers?

Question: Clearly, Brier Score and AUROC are better performance measures to compare classifiers. However, besides that, I am interested in a let's call it more economic view. I could imagine a classifier being much more accurate than the other. Nevertheless, the other classifier dominates in the ROC space for some sensitivity and specificity values. In introducing costs for misclassification, I might prefer exactly these values since the overall costs will be lower. I would like to point that out in the master thesis I'm writing right now. Is this correct and a legitimate point to make?
Comment: It is not clear to me that  Brier score and AUROC are "better".  I think it depends on what you are trying to do with the classifier.
Comment: @ Peter Flom. I guess, I wasn't so clear about that. But when I'm comparing two classifiers in general (threshold-independent), sensitivity and specificity are not well-suited since maybe for one classifier I get higher sensitivity/specificity for a threshold of 0.5 and for another one I get better values for 0.4. This is why I used AUROC and Brier Score.
Answer: Any method that uses thresholds is problematic.  And note that the measures you listed do not compare classifiers; they compare predictions.  Use a proper accuracy scoring rule such as Brier score or pseudo $R^2$ to get the best results.


Is mindfulness meditation banned in Eastern Orthodoxy?

Question: Is focusing on your breathing to meditate banned in the Orthodox church, in particular the Serbian Orthodox church?
I know that it's not allowed to not focus on anything at all, because the devil will enter the mind in such cases.
However what if I just focused on my breathing instead, and in case that it's not allowed either, is there an Orthodox alternative to it, which gives the same or better benefits?
Comment: "I know that it's not allowed to not focus on anything at all, because the devil will enter the mind in such cases." How do you know this? Are you sure this is Orthodox teaching?
Comment: "I know that it's not allowed to not focus on anything at all." I would be interested in seeing a source on this, as well. In the case of breathing, it's a fundamental part of hesychastic practice, so far from being "not allowed", acceptance/belief in it is almost *required* on a quasi-dogmatic level due to the Fifth Council of Constantinople.
Answer: Being Eastern Catholic, I'd say you need to be aware that because of the similarities between some eastern spiritual practices and the practices of the orthodox there is sensitivity amongst the Eastern churches of west's accusations that we engage in pagan meditation techniques.
I think we need to get over our hang ups with the west's accusations.
Our traditions; including the Jesus prayer is built around the breath.
As long as you remain theologically sound, practice mindfulness as you will.
Comment: Ding Ferreira, I understand where you are going, but could you be a little bit more clearer and perhaps add a few linked sources would improve your post. You have a good point to make here.
Answer: Is mindfulness banned in the Eastern Orthodox church? No.
As is often the case, I don't think there is a concrete "Eastern Orthodox opinion" on this. You should consult with your priest, as his opinion will matter most, but here is the opinion of other Orthodox people.
Mindfulness itself is very important, as long as it's practiced in a Christian way. There is actually a Greek word that could be comparable to "mindfulness," "nepsis" (νῆψις). Steadying your thoughts is part of asceticism:

A mind that is left to its own devices will remain untrained. An untrained mind is impossible to control. It will remain jumping from one thought to another just like a butterfly in a field of flowers. It will quickly jump from one flower to the another in what seems like a random pattern. To develop mindfulness or watchfulness requires ascetic disciplines, such as prayer and fasting, as well as help from the Holy Spirit.

--Being Watchful, from St. George Greek Orthodox Cathedral in Greenville, SC, USA.

I know that it's not allowed to not focus on anything at all, because the devil will enter the mind in such cases.

Not sure about that, see below.

is there an Orthodox alternative to it, which gives the same or better benefits?

My goodness, yes, the Jesus Prayer: "Lord Jesus Christ, Son of God, have mercy on me, a sinner."

There is also the type of meditation and contemplation done totally in silence, without any words or images or thoughtful activity at all, not even psalmody. The person merely sits in silence, often in the presence of holy icons, and emptying his mind of all thoughts, imaginations and desires, listens to God in silence, the divine "language of the Kingdom of heaven" (Saint Isaac of Syria). This type of meditation, for a person of unceasing prayer, will be the "prayer of silence," with the "bubbling spring" of the Jesus Prayer as its only foundation and background. In such contemplative prayer and prayerful contemplation, the spirit of man becomes one with the Spirit of God (cf. 1 Cor 6.17).

--The Orthodox Faith by Fr. Thomas Hopko
I think it's fine to focus on your breath, you could even pray "Lord Jesus Christ, Son of God" while breathing in and "have mercy on me, a sinner" while breathing out.
Answer: In the Eastern Orthodoxy there is a short prayer "Lord Jesus Christ, Son of God, have mercy on me, a sinner". It is an accepted practice to repeat this prayer many times, while focusing fully on the words and their meaning (instead of breath).
The primary point is to clear your mind from any thoughts besides this one, so the technique is similar. I think the primary difference between this prayer and "breathing techniques" is the fact that by praying you  then can attribute all the improvements in the spiritual life to God. In contrast, if you focus on breathing, in your mind you eventually attribute any changes to yourself, so it does not guard you from pride. This is why it's considered imperfect, as prayer additionally has a chance to shield you from pride as you do not attribute the effects to yourself. I won't go as far as to say breathing meditation is banned, it's just that prayer technique is considered to be better as is solves the issue with pride.
Mindfulness is not "banned", to the contrary, it's the primary point of "ascesis" - to observe your thoughts carefully and reject thoughts that might harm you - to the point you no longer have them (which was achieved by just a handful of people).
Also my personal opinion: saying things like "if you do X, then the devil will enter your mind" sounds like and extremism and magical thinking to me - it's kind of similar to believing that by performing some ritual (like casting a spell) we can free ourselves from the influence of the devil, which I think is foreign to the Orthodoxy and Christianity overall. Eastern Orthodoxy believes that only God fully controls the devil and allows him to affect us only if it's for our benefit in the long run (so that means the devil does good against his will, thinking he is harming someone - which shows the ultimate cleverness of God), so it's not up to us to try to influence that, we should just focus on doing our best to maintain our moral values, lead a good life and be mindful.
Answer: Saint Vyacheslav Krasheninnikov was against deep breathing methods, needle therapy, massages, etc. Yogis levitate because demons lift them. Similarly, the antichrist flies quickly because demons carry him fast; deceived people say: "Christ is here; Christ is there!".
Comment: Welcome to Christianity SE and thank you for your contribution. When you get a chance, please take the [Tour](https://christianity.stackexchange.com/tour) to understand how the site works and [how it is different than others](https://christianity.meta.stackexchange.com/a/1809/50259).


Is Dark Matter evenly spread out in the universe?

Question: Is Dark Matter evenly spread out? If no, could we ever find a correlation between the amount of dark matter and matter in a specific place?
Answer: The existence of dark matter comes primarily from gravitational evidence - in other words, we predict some behavior because of the force of gravity, but we don't observe that behavior and infer that dark matter is to blame. Thus, most predictions for dark matter come from locations in the universe where there are massive objects which we can observe - for instance, Galaxies. Thus, the observational evidence is that dark matter is lumped in galaxies, galaxy clusters, and other conglomerations of matter.
The distribution of dark matter in galaxies is also not uniform - dark matter is generally denser in the center of galaxies then at the outer edges. So also in this sense dark matter is not evenly distributed.
If you mean on cosmic scales, then yes, there is not "more dark matter" in one large region of the universe then in any other. It is evenly distributed over the universe but in little globs where galaxies are. Think about sprinkling salt evenly across a table - the salt is evenly distributed but if you look closer there are regions where there is salt, and regions where there is none.
So in short, dark matter and luminous matter are generally found in the same location.
Answer: Dark matter is not evenly distributed. It clumps together under its own graviational pull. In fact, it clumps first and normal matter clumps later. Look at the 3rd image on this site
http://www.astronomynotes.com/galaxy/s10.htm
To see an example for dark matter distribution.
Answer: Dark matter doesn't have "gravity" but is simply a theory to explain Gravitational abnormalities in the universe.  Gravity itself is a theory with several holes that need to be addressed most importantly why the universe is still expanding "speeding up even " when gravity should have it collapsing back on itself billions of years ago. The interaction of weak and strong forces isn't completely understood either. Here is a good write up with a new theory of gravity that doesn't call for a dark (undiscovered and unproven ) particle to close holes in its theory. It is just a theory as well so "FLAME OFF" .


What is the reason to introduce and study logarithmic functions?

Question: I don't understand why logarithms exist when we have exponential functions. Exponential functions seem to be an easier and less convoluted way to write something. Why invent logarithms to do something that exponents already do just fine.
Comment: It is rumored that _Old MacDonald_ suggested its use: $$e-i-e-i-\text{little o}$$
Comment: @ozo, whoever told you that mathematicians don't really care for applications lied to you. Moreover, we can define lots of things that we do not study...
Comment: Why invent subtraction to do something that addition already does fine?
Comment: logs "undo"/"invert" what exponential functions do.
Answer: There's a lot of uses for logarithms
There are things you can solve without logarithms. Take for example:
$$4.9^x=34.185$$
Without logarithms you might try taking the $x$'th root, and really just end up going in circles, with logarithms, we can solve this with logarithms this way.
$$\log 4.9^x=\log34.185$$
$$x\log 4.9=\log34.185$$
$$x=\frac{\log34.185}{\log 4.9}$$
Answer: Logarithms put numbers on a human-friendly scale, such as the Richter scale, the Decibel scale, etc... For example consider the following data, and see how it is easier when dealing with logarithms to compare the different distances:
$$\begin{array}{|l|c|c|}
\hline & \text{Distance }x & \log_{10}(x) \\ \hline
\text{Earth to Alpha Centauri} & 4.1 × 10^{16}\,\rm m & 16.61 \\ \hline
\text{Earth to Pluto} & 5.9 × 10^{12}\,\rm m & 12.77 \\ \hline
\text{Toronto to Vancouver} & 3.4 × 10^6\,\rm m & 6.53 \\ \hline
\text{Height of average adult male} & 1.78\,\rm m & 0.25 \\ \hline
\text{Thickness of a human hair} &  1.0 × 10^{-4}\,\rm m & –4.00 \\ \hline
\text{Bohr radius} &  5.0 × 10^{-11}\,\rm m & –10.3 \\ \hline
\end{array}$$
See: Logarithmic scale.

But if logarithms have lost their role as the centerpiece of computational mathematics, the logarithmic function remains central to almost every branch of mathematics, pure or applied. It shows up in a host of applications, ranging from physics and chemistry to biology, psychology, art, and music.  — Eli Maor in e: The Story of a Number
Comment: The decibel scale is logarithmic precisely because we hear volume logarithmically. To give another example, we hear pitch logarithmically as well.
Answer: Given any $b > 0$ then $f: \mathbb{R} \to (0, \infty)$ by $f(x) = b^x$ is a bijective, that is one-to-one and onto, function. This means $f^{-1}:(0, \infty) \to \mathbb{R}$ exists. Further more we denote this inverse function by $f^{-1}(x) = \log_b(x)$. That is $\log_b$ is exactly the inverse function to the exponential function with base $b$.
So, why do logarithmic functions exist? It is because exponential functions are one-to-one. Whether you want to use logarithms or not they exist because a bijective function has an inverse.
Answer: Logarithms were originally invented to make multiplication (as in, actually computing the product of two numbers by hand) easier. They were developed by one man, John Napier, in the 16th century, specifically as a method for doing by-hand multiplication.
The reasoning was as follows. It had already been noticed at the time that if you consider the sequence of powers of a number, say $1, 2, 4, 8, 16...$, then multiplying any two numbers in that sequence can be done simply by adding together their positions in the sequence. This is simply another way of saying $x^ax^b=x^{a+b}$. Unfortunately, most numbers are not in the sequence $1, 2, 4, 8...$, so the trick isn't very useful.
Napier's original idea was to simply use a very small base, say $1.000001$. Then the sequence of its powers will grow very slowly, and so even though not every number is in the sequence, every number will at least be close to an element of the sequence. So if you need to multiply together two numbers, you can just approximate them by elements of the sequence and then use the trick discussed in the previous paragraph.
Using the concept of fractional exponents, which I'm sure you've seen if you're studying logarithms, we can do away with having to use a small base by effectively filling in the gaps between the elements of the sequence.
That's why logarithms were originally investigated. Nowadays we don't need to resort to tricks like that just to do multiplication. But once they had a name, they started showing up in all kinds of places. This is why we teach students about logarithms today. For example, in order to integrate $\frac 1 x$ in calculus, you "need the logarithm". Of course, you could just numerically integrate it, but it's useful to know that the result of that integration is actully a function with certain algebraic properties and which turns up as the answer to other problems as well.
Answer:
Why invent logarithms to do something that exponents already do just fine.

Exponents do the exact opposite of logarithms, so this question is a non-sequitur. However, if you are inquiring about practical uses of logs, they can range from banking (interest rates, for instance) to computing the age of the Earth (based on the half-lives of various radioactive elements), biology (since our sense organs perceive the surrounding world in a logarithmic manner), to engineering (the so-called logarithmic scale, which makes the study of many processes so much easier), etc. I would also suggest reading the following section.


Type of sentence, its structure and its parts

Question: I uttered these sentences in the class."First of all I will read a story for you people. Side by side I will give you the story map and you will do this activity in pairs."Is this utterance grammatically correct, if not why not?
Comment: Why do you think it might not be correct?
Answer: Strictly speaking, I would not say that your sentences are grammatically incorrect, however, their punctuation may be improved. They could be written as follows:

First of all, I will read a story for you people. Side by side, I will give you the story map, and you will do this activity in pairs.

'First of all' and 'Side by side' are introductory phrases, i.e. their purpose is to set the context for the main independent clauses that follow them. Most writers recommend that such phrases should be followed by a comma. However, some writers say that this is not always necessary, especially for short introductory phrases. Such writers would say that the use of commas in these situations is a matter of style, with the decision to use them or not being best left to each writer. I suggest that you Google 'introductory phrases', read several of the articles that are presented, and then decide for yourself how you will punctuate such phrases in the future. I generally tend to use use commas in such situations, as I think it makes it easier to understand what is written.
The comma between the words 'map' and 'and' is a different matter. In this case the word 'and' joins two independent clauses. The two clauses:

I will give you the story map

and

you will do this activity in pairs

are independent clauses because they are able to stand by themselves as separate sentences. When two independent clauses are joined together using a coordinating conjunction (e.g. and, but, yet, for, so, etc.), that coordinating conjunction should be preceded by a comma.
My main objection to your sentences is that they are logically inconsistent. If you start out saying, 'First of all', then the reader is lead to expect that a second step will follow, and possibly additional steps after that. However, the use of the phrase 'side by side' implies that the two actions will be occurring simultaneously, not in a stepwise progression.
If you intended these activities to take place in a stepwise manner, you could have said something like:

First of all, I will read a story to you. Then, working in pairs, fill in the story map that I will give you.

If you intended these activities to take place simultaneously, you could have said something like:

I will read a story to you. As I do so, working in pairs, fill in the story map that I have given to you.
Comment: I will add one point to the excellent answer by @James. You used the word 'will' three times. For the first two, You can have enough certainty to use 'will' because the actions of 'read' and 'good' are things you intend to do. For the third, you cannot be certain the class will obey your instructions. I would prefer 'should' or 'must' instead of that 'will'.


what are the glider stats?

Question: When I scroll through the glider options in the kart selection, I find no difference in the gliders except a small acceleration/weight tradeoff. I recognize that this is probably due to the gliders having no effect on driving speed, but do some gliders fly faster than others?
Comment: I don't think so, they're purely aesthetic imho.
Answer: Gliders give one of two boost, acceleration or speed.
Super glider, Waddle Wing, Plane, Wario Wing and Gold will increase your speed in air.
Flower, Peach Parasol, MKTV Parasol, Bowser Kite and Cloud will give better acceleration
Non give more stats then the other so the rest is just cosmetic. hope this helps.

what are the glider stats?


How to change the column headers in quicksight programatically?

Question: I have multiple reports to publish in quicksight. Each report is getting generated from a different dataset that i have added to the dashboard. In total there are 10 datasets so there are going to be 10 reports. Most of these reports have a lot of repeated column headers. Is there a way to change the name of the column headers programmatically so that I can copy it for all the other reports ?
Below is an example of the columns in the datasets. The real dataset is pretty heavy so cannot share here.
Dataset 1 -
      user_id, user_name, user_country, user_city, number_of_jobs_finished

Dataset 2 -
      user_id, user_name, user_country, user_city, number_of_interactions
.
.
.
Dataset 10 -
      user_id, user_name, user_country, user_city, number_of_movies_watched

-Thanks,
Vinit
Answer: You should use the CLI

Use the Dataset CLI / API
CustomSql -> (structure)
A physical table type built from the results of the custom SQL query.

DataSourceArn -> (string)
 The Amazon Resource Name (ARN) of the data source.

Name -> (string)
 A display name for the SQL query result.