Material UI tooltip popper fixed position on increased word length

Question:
I want to achieve the above image feature by overriding the MUI tooltip properties but instead, I am only able to get this feature

I was able to do that by adding a margin to the popper
popper: {
  zIndex: '999999999',
  '&[x-placement*="right"]': {
    marginTop: theme.typography.pxToRem(50),
  },
},

But after I decrease the word length, it shifts to the bottom of the component where the tooltip was added.

Please help me achieve this feature. I want the popper position to be fixed when the word length increases and only the height of the popper goes on increasing downwards based on the increased word length.
Answer: About your question, I think you could remove the popper style setting and you can try to add placement on the popper that to fixed position.

<Popper placement='right-start'>
.....
...
..
</Popper>


nginx: [emerg]: "mail" directive is not allowed here in /etc/nginx/conf.d/default.conf

Question: Trying to get the basic email of mail reverse proxy working on nginx. I'm using the official nginx docker image and I have the following nginx config setup.
error_log /var/log/nginx/error.log info;

mail {
    server_name       mail.example.com;
    auth_http         localhost:9000/cgi-bin/nginxauth.cgi;

    imap_capabilities IMAP4rev1 UIDPLUS IDLE LITERAL+ QUOTA;

    pop3_auth         plain apop cram-md5;
    pop3_capabilities LAST TOP USER PIPELINING UIDL;

    smtp_auth         login plain cram-md5;
    smtp_capabilities "SIZE 10485760" ENHANCEDSTATUSCODES 8BITMIME DSN;
    xclient           off;

    server {
        listen   25;
        protocol smtp;
    }
    server {
        listen   110;
        protocol pop3;
        proxy_pass_error_message on;
    }
    server {
        listen   143;
        protocol imap;
    }
    server {
        listen   587;
        protocol smtp;
    }
}

After staring nginx with the following command
nginx -g 'daemon off;'

I get this error:
2017/11/14 22:54:00 [emerg] 1#1: "mail" directive is not allowed here in /etc/nginx/conf.d/default.conf:9

Any suggestion how to resolve this issue?
Comment: `mail` is a top-level block. Check your `/etc/nginx/nginx.conf` file, but I suspect that files in the `conf.d` directory are included into the `http` block.
Comment: @RichardSmith Thanks for the reply. That is in fact the correct answer. I added the mail block to default nginx.conf and now I am not getting this error. Do you know what is the correct practice here? should I update the default conf?
Answer: Adding the below line to the first line of nginx conf helps me to get rid of this error
load_module /usr/ports/www/nginx-full/work/stage/usr/local/libexec/nginx/ngx_mail_module.so;

you may want to change the path to suit


How to disable default category linkbuilding?

Question: Hello I have a problem with wordpress default category linkbuilding. I want to display category page with link mywebsite.com/products/company/. And I did it, but I can also get to this page witin mywebsite.com/company/. And this is what I dont want, is that a default wordpress linkbulding or am I missing something? Thanks in advantage.
Comment: What is `company`? is it a page slug? Or a category slug? Are you using category archives, or have you repurposed page templates to try and duplicate that functionality? And is it redirecting to the correct URL? Note that this is not normally called link building
Answer: If you're using pretty permalinks - which you are, with this type of URL - WordPress will automatically try to figure out any URL that you type in.
In your example URL, "company" is the slug. So, when you type in example.com/company, WordPress uses that slug to figure out "Okay, I only see one post with the slug 'company,' and that one is a subpage of 'products,' so I'll send them there."
WP does redirect rather than just displaying the page at that URL, so you shouldn't run into issues with search engines indexing the shorter URLs. If you want to be doubly certain, make sure you have canonical URLs set (such as by using an SEO plugin, or a theme that adds them for you) to tell search engines the long URL is the desired one, and don't link to the short version.
Comment: Thank you for making it clear.


How to understand capacitor reading: 0.1uF + 2x2500pF?

Question: I have an old electrical motor from the 1970s. It does not work as it should, and I suspect the capacitor attached to it. It has two legs and reads: 0.1uF+2x2500pF ~250v. I am not familiar with that "+2x2500pF" way of writing it. What should my multimeter read when measuring and what is the idea of the way to write its capacitance? Currently imy multimeter reads something like 0.177uF when connected to the two legs.
Comment: Is there a third connection to the capacitor that looks different? For example, it might be attached to the chassis with a nut.
Comment: There are two cords coming from the capacitor, those were the ones I measured between. But yes, you are right. The capacitors body is made of alloy and it is attached to the motor with a bolt. So it could be that is a "3rd leg"
Comment: Also, just updated the question with a "2x" notation I left out by mistake
Answer:

simulate this circuit – Schematic created using CircuitLab
Figure 1. The internal arrangement.
C2 and C3 shunt high frequency noise to ground.

What should my multimeter read when measuring and what is the idea of the way to write its capacitance? Currently my multimeter reads something like 0.177 uF when connected to the two legs.

Your multimeter reading looks about right. Electrolytics have a very wide tolerance on the capacitance value. The motor fault may be something else.
Comment: It's not electrolytic at such a small value from that period. Paper in oil ("Visconol") was commonly used for 0.1uF : check DC resistance > 10Meg (and to case), they did develop some leakage current.
Comment: Is this kind of capacitor electrolytic? If it is, it would be an unpolarized one, right? Non-electrolytics also have a wide tolerance.


Get the path of the first attached media (single.php)

Question: I'm currently developing a wallpaper website using WordPress and I'm trying to figure it out how to retrieve the path of the first attached media in the post so I can display the path in the post (e.g., /wp-content/uploads/image.png).
I tried a lot of WordPress functions such as get_attached_media() but I had no luck.
Answer: I tried to write some snippet with the help of WordPress codex. Please check below and update it further as per your needs. I hope this helps:
global $post;

$args = array(
    'numberposts' => 1,
    'order' => 'ASC',
    'post_mime_type' => 'image',
    'post_parent' => $post->ID,
    'post_status' => null,
    'post_type' => 'attachment',
);

$attachments = get_children( $args );

if ( $attachments ) {
   foreach ( $attachments as $attachment ) {
      $image_attributes = wp_get_attachment_image_src( $attachment->ID, 'full' );
      echo wp_get_attachment_url($attachment->ID);
      echo 'ID ) . '" class="current">';
}
}

Comment: Ah... my bad. There was some extra code at the end of my code snippet. @Kika - thanks for the edits.
Comment: Thank you for your reply. I tried your code and it gives me a blank page with this error in the error log: http://pastebin.com/nJF0JCkC
Here is an exemple of what I'm tring to do: https://static.dyp.im/jfoq513ojV/84026be18c9e062145d4c41538d43968.PNG
Comment: The pastebin only shows the error message. Can you please update that with the code in your single.php file ? It does not seem the error which you have added in pastebin is from above code. I can take a look at your single.php code and assist further.
Comment: Thank you, the code worked. In fact, that's not really what I'm trying to achieve, because it doesn't give me the path as I showed you in the previous comment (static.dyp.im/jfoq513ojV/84026be18c9e062145d4c41538d43968.PNG). It gives me this: https://static.dyp.im/xpj1D938xa/8ebd5dd2e263e02b7b617cb58ffb26f0.PNG
Answer: So I finally found out how to display the path of the first attached media in the post. Here is the code I inserted in single.php to display the path at the end of the content :
<?php
$image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
$path = parse_url($image_url[0], PHP_URL_PATH);

echo /var/www/wordpress/wp-content/uploads$path;
?>

Result (for exemple):
/var/www/wordpress/wp-content/uploads/2015/12/image.jpg
Hope it will help someone else!


Internal links in Vue.js: Using the vue-router to jump to a specific section in a view with an id

Question: I have a Home view and a Blog view.
Trying to use a <router-link> to jump from the Home view to a specific section in the Blog view.
The section looks like

In html I believe it would work like Jump to specific blog section
How can I replicate this using the vue-router?
Answer: You could use this and use the @click.native property of the router as specified on the top answer. You could also use the vue-scrollto plugin which is much easier. It's as easy as
Scroll to #element

    Hi. I'm #element.

after you setup the plugin.
Answer: Check out the docs for scroll behavior. In particular, the discussion of scrolling to a hash:
If you want to simulate the "scroll to anchor" behavior:

scrollBehavior (to, from, savedPosition) {
  if (to.hash) {
    return {
      selector: to.hash
      // , offset: { x: 0, y: 10 }
    }
  }
}


Which potentiometer to chose for LCD screen contrast?

Question: I recently obtained DEM 16217 SYH-PY 2x16 character screen. Here's the datasheet. As far as I can see, its contrast pin should be connected to voltage source over a potentiometer. How do I pick correct resistance of the potentiometer for this use?
Comment: Wheres the datasheet?
Comment: @Dean For some reason, it wouldn't let me link directly to file. I linked now to the list of the datasheets for their displays.
Answer: I don't think it makes a whole lot of difference. I've used a 10KΩ linear before which works perfectly well.
You're essentially making a potential divider, connecting your pot between your supply and ground, so as long as it's not too low value that it starts to draw more than a negligible amount of current.
Comment: OK. I'll try with that, once I obtain suitable potentiometer.
Answer: I'm working with RT162-7 based on HD44780 (seems compatible to your DEM 16217 SYH-PY).
Connecting the contrast pin (V0) directly to 0 gives very reasonable contrast, even without a potentiometer or a potential divider.
Comment: Most HD44780 LCDs work reasonably well with 0V for constrast, but some will definitely work better (may depend on viewing angle) with a slightly higher voltage, so it is a good idea to include a simple potmeter. (and there are of course LCDs, esepcially wide temperature ones, that require a negative constrast voltage)


Highlight all text between brackets?

Question: set showmatch highlights matching brackets. Is there a way to highlight all text between brackets? I have a black background. When I land on a bracket, I'd like to change the background of the in-between text to dark gray.
Answer: This approach isn't automatic, but v% should show you the text (and conveniently select it in visual mode for further processing).
Alternately, you could use an autocommand or mapping to create a textprop or similar to highlight the region of interest, and then use a timer to clear it (if desired). See :help searchpairpos() for a helpful function to get data about the region to highlight.
Answer: It does what it says to do: show (briefly) matching parens/brace/bracket/anglequote.
What you're asking for (highlight all text within delimiter) is something very different... Maybe activate search highlight with se hls then issue a relevant search?

Highlight all text between brackets?


Getting species geodata (via Lifemapper)

Question: In the search for species occurence data I stumbled on the Lifemapper project (http://lifemapper.org/). For creating biological models they posess a very comprehensive database. Unfortunately it does not seem to be possible to download everything in one time. Instead you can search and download one species at a time (as far I can see). I'm not looking forward spending days download all species one by one. Anyone has an idea what would be the most efficient way to download all the data...?
Comment: Welcome to GIS SE!  Before automating a repetitive process, I think the best thing is to precisely document first how a single iteration is accomplished.  I recommend that you **edit** your question (button beneath it) to describe how "you can search and download one species at a time".
Answer: according to this Lifemapper page:

Lifemapper gets its occurrence data from the Global Biodiversity Information Facility (GBIF).

In that case, you'd be better off getting the data directly from GBIF, which currently has 458,543,199 georeferenced species occurrence records, and tools for bulk downloading data.


Stochastic Gradient Descent vs Online Gradient Descent

Question: I was wondering what the difference between stochastic gradient descent and online gradient descent is?  Or is it the same algorithm?
Answer: Apparently, different authors have different ideas about stochastic gradient descent.  Bishop says:

On-line gradient descent, also known as sequential gradient descent or
  stochastic gradient descent, makes an update to the weight vector
  based on one data point at a time…

Whereas, [2] describes that as subgradient descent, and gives a more general definition for stochastic gradient descent:

In stochastic gradient descent we do not require the update direction
  to be based exactly on the gradient. Instead, we allow the direction
  to be a random vector and only require that its expected value at each
  iteration will equal the gradient direction. Or, more generally, we
  require that the expected value of the random vector will be a
  subgradient of the function at the current vector.

Shalev-Shwartz, S., & Ben-David, S. (2014). Understanding Machine Learning: From Theory to Algorithms. Cambridge University Press.
Answer: As an example, let's place ourselves in the context of Linear/Logistic Regression. Let's assume you have $N$ samples in your training set. You want to use loop once through those samples to learn the coefficients of your model.

Stochastic Gradient Descent: you would randomly select one of those training samples at each iteration to update your coefficients.
Online Gradient Descent: you would use the "most recent" sample at each iteration. There is no stochasticity as you deterministically select your sample. In industry, where datasets are large, we train "live" by using the most recent samples as soon as they arrive to update the coefficients.
Comment: if your sample are ranked on time, otherwise, yes. "online" makes sense when you have a timestamp for each sample
Comment: So by "most recent" does that mean in the order i = 1,2,3,....,N?
Answer: Online Gradient Descent is essentially the same as stochastic gradient descent; the name online emphasizes we are not solving a batch problem, but rather predicting on a sequence of examples that need not be IID.


Can I get the follower perk without completing their quest in Fallout 4?

Question: Do I have to complete each followers quest to get their perk or is it enough to just max out their relationship with little things (like lockpicking for Piper)?
Answer: Some followers have an additional quest after recruitment that needs to be completed before you can get their perk.
These followers include Cait, Curie, Danse, MacCready, and Valentine.
MacCready, Nick, and Cait have all idolized me before I finished their quests, but I didn't get the perk until the quest was finished. Regardless of how many times Danse loves something, he can't idolize you until his quest is finished, at which point the perk is also awarded.
It's also possible to finish a follower's quest and not get the perk, due to insufficient approval. I've finished Cait's quest, but still needed to butter her up some more before I got the perk.
These are the needed quests for each companion:

Cait: Benign Intervention
Curie: Emergent Behavior
Danse: Blind Betrayal
Macready: Long Road Ahead
Valentine: Long Time Coming
Comment: Preston doesn't have a quest.
Comment: @LessPop_MoreFizz Whoops. Typo.
Answer: The vast majority of companions do not have quests which are required to get a perk. You simply need to max out your reputation.
The exceptions are MacCready, Curie, Cait, and Nick Valentine. You'll need to complete each of their quests to receive their respective perks. While the quests are only offered when you reach maximum affinity, it's possible for affinity to decline between when you are offered the quest, and when you complete it, which means you might not get the perk immediately upon completion of the quest, as both requirements must be fulfilled simultaneously. Simply butter them up a little bit once more to get back to max affinity, and you'll gain the perk.
Comment: I don't think you actually need full affinity to trigger all the quests. Pretty sure Cait mentioned her quest to me before that. Might have admired me at the time.


How do I share views on multisite in drupal 8

Question: Is it possible to have a multisite set up in drupal 8 and create view on Site A and have that appear on Site B?  I cant find anything in drupal documentation for sharing views.  I can share users, content, and taxonomy, but nothing else.
Comment: Probably not since views are config entities and not content entities.
Answer: Multisite sharing works by using the same prefix for certain tables. It's dark magic, especially in 8.x, with the automatically created entity and field tables.
Since all config is stored in the same table, that's not possible.
You could write a custom config storage controller that stores certain config in a shared table, but that seems like a very crazy idea to me.
Configuration can be exported/imported and probably doesn't change that often. There will also be modules like features and others that will make re-using configuration easier.
I would also strongly recommend to consider other options to share your content. I can't imagine that this works reliably in 8.x.
Comment: Thanks.  I am just exploring all options.  I know table prefixing is the quick and dirty way to get it done.
Answer: Here's a different approach. With CMI, you could export your view (when it has changed) on site A and import it on site B (using drush config-merge or rsync). I did this already with D8 testing sites and it worked nicely IIRC. Sure it's less flexible and granular than really sharing a 'live' view between 2 sites but chances that you want to update your view frequently are equally low, aren't they?


What were the specific skills of the Pandavas?

Question: Can anyone explain the specific skills of the Pandavas in the Mahabharata? For example Arjuna is known for his bow.
Answer: <code>                            Skills Of Pandavas
</code>
Yudhishtira
He was ingenious, dedicated to the path of Dharma and hence he was called Dharmaraja and a prudent politician.
Bhima
He was Fearless and Brave. His physical power was unmatchable at that time.
In Mahabharat Shambhav Parva:

In fact, those princes were no match for Bhima in pugilistic encounters, in speed, or in skill. Bhima used to make a display of his strength by thus tormenting them in childishness but not from malice.

Arjuna
He was a great archer and most of his archery knowledge was taught to him later by Devas which was unique at that time.Here is a story from Mahabharat Sambhava Parva: The eye of a Bird

O son, stand here with bow and arrow for an instant.' Thus addressed, Arjuna stood aiming at the bird as desired by his preceptor, with his bow bent. An instant after Drona asked him as in the case of others, 'Seest thou, O Arjuna, the bird there, the tree, and myself?' Arjuna replied, 'I see the bird only, but nor the tree, or thyself.' Then the irrepressible Drona, well-pleased with Arjuna, the instant after, again said unto that mighty car-warrior amongst the Pandavas, 'If thou seest the vulture, then describe it to me.' Arjuna said, I see only the head of the vulture, not its body.' At these words of Arjuna, the hair (on Drona's body) stood on end from delight. He then said to Partha, 'Shoot.' And the latter instantly let fly (his arrow) and with his sharp shaft speedily struck off the head of the vulture on the tree and brought it down to the ground. No sooner was the deed done than Drona clasped Phalguna to his bosom and thought Drupada with his friends had already been vanquished in fight.

Nakula
He was a good trainer of animals.He was compared to Kamadeva due to his good looks.
Sahadeva
He had a great knowledge of astrology. He was the main tactical planner among the pandavas.
Here

Sahadeva replied, "I will become a keeper of the kine of Virata's king. I am skilled in milking kine and taking their history as well as in taming their fierceness. Passing under the name of Tantripal, I shall perform my duties deftly. Let thy heart's fever be dispelled.

Here Is the Skills Of Pandavas

Yudhishthir, the eldest son of Pandu, was a man of truth and piety; Bhima, the second, was a stalwart fighter; and Arjun, the third son, distinguished himself above all the other princes in arms. The two youngest brothers, Nakula and Sahadeva, were twins. Duryodhan was the eldest son of Dhrita-rashtra and was jealous of his cousins, the sons of Pandu. A tournament was held, and in the course of the day a warrior named Karna., of unknown origin, appeared on the scene and proved himself a worthy rival of Arjun. The rivalry between Arjun and Karna is the leading thought of the Epic, as the rivalry between Achilles and Hector is the leading thought of the Iliad.
Comment: Well, I just posted another answer.  In any case, the issue isn't whether it's right or wrong, the issue is that answers on this site should be backed up with sources, otherwise it's hard for others to know if an answer is correct.
Comment: You should cite sources.
Comment: _Bhima: He was Fearless and Brave_ **how is that a skill?**
Comment: @learningbrain if you think it's wrong then post a better answer and flag me to delete my answer.
Comment: ok i'm understand  next time i'll care of it.
Comment: @anyone who is downvoting on my answer show me the reason of Downvote if my answer is not eligible then flag it to delete.
Comment: Bhima's physical strength was very comparable
Answer: The skills of each of the Pandavas are briefly described in this chapter of the Adi Parva of the Mahabharata, in reference to their education under Drona:

Two of Drona's pupils became very much accomplished in the use of mace. These were Duryodhana and Bhima, who were, however, always jealous of each other. Aswatthaman excelled everyone (in the mysteries of the science of arms). The twins (Nakula and Sahadeva) excelled everybody in handling the sword. Yudhishthira surpassed everybody as a car-warrior; but Arjuna, however, outdistanced everyone in every respect--in intelligence, resourcefulness, strength and perseverance. Accomplished in all weapons, Arjuna became the foremost of even the foremost of car-warriors; and his fame spread all over the earth to the verge of the sea. And although the instruction was the same, the mighty Arjuna excelled all (the princes in lightness of hand). Indeed, in weapons as in devotion to his preceptor, he became the foremost of them all. And amongst all the princes, Arjuna alone became an Atiratha (a car-warrior capable of fighting at one time with sixty thousand foes).

So Bhima was known for the mace, Yudhishthira was known for his chariot-fighting, Nakuka and Sahadeva for the sword, and Arjuna was good at pretty much everything.
For more details we can turn to one of the people who knew the Pandavas the best, their wife Draupadi.  Once while the Pandavas were living in the forest, Draupadi was kidnapped by the king Jayadratha.  (He was the husband of Dhritarasthtra's daughter Duhsala, whom I discuss here.) When the Pandavas are approaching to rescue Draupadi, Jayadratha asks Draupadi to describe her husbands.  This is what she says in this chapter of the Vana Parva of the Mahabharata (I've split it up into separate paragraphs for each of the Panadavas):

That warrior at the top of whose flagstaff two handsome and sonorous tabours called Nanda and Upananda are constantly played upon,--he, O Sauvira chief, hath a correct knowledge of the morality of his own acts. Men that have attained success always walk in his train. With a complexion like that of pure gold, possessed of a prominent nose and large eyes, and endued with a slender make, that husband of mine is known among people by the name of Yudhishthira, the son of Dharma and the foremost of the Kuru race. That virtuous prince of men granteth life to even a foe that yields. Therefore, O fool, throwing down thy arms and joining thy hands, run to him for thy good, to seek his protection.
And that other man whom thou seest with long arms and tall as the full-grown Sala tree, seated on his chariot, biting his lips, and contracting his forehead so as to bring the two eye-brows together, is he,--my husband Vrikodara! Steeds of the noblest breed, plump and strong, well-trained and endued with great might, draw the cars of that warrior! His achievements are superhuman. He is known, therefore, by the name of Bhima on earth. They that offend him are never suffered to live. He never forgetteth a foe. On some pretext or other he wrecketh his vengeance. Nor is he pacified even after he has wrecked a signal vengeance.
And there, that foremost of bowmen, endued with intelligence and renown, with senses under complete control and reverence for the old--that brother and disciple of Yudhishthira--is my husband Dhananjaya [Arjuna]! Virtue he never forsaketh, from lust or fear or anger! Nor doth he ever commit a deed that is cruel. Endued with the energy of fire and capable of withstanding every foe, that grinder of enemies is the son of Kunti.
And that other youth, versed in every question of morality and profit, who ever dispelleth the fears of the affrighted, who is endued with high wisdom, who is considered as the handsomest person in the whole world and who is protected by all the sons of Pandu, being regarded by them as dearer to them than their own lives for his unflinching devotion to them, is my husband Nakula possessed of great prowess. Endued with high wisdom and having Sahadeva for his second, possessed of exceeding lightness of hand, he fighteth with the sword, making dexterous passes therewith. Thou, foolish man, shall witness today his performances on the field of battle, like unto those of Indra amid the ranks of Daityas!
And that hero skilled in weapons and possessed of intelligence and wisdom, and intent on doing what is agreeable to the son of Dharma, that favourite and youngest born of the Pandavas, is my husband Sahadeva! Heroic, intelligent, wise and ever wrathful there is not another man equal unto him in intelligence or in eloquence amid assemblies of the wise. Dearer to Kunti than her own soul, he is always mindful of the duties of Kshatriyas, and would much sooner rush into fire or sacrifice his own life than say anything that is opposed to religion and morals.

So in Draupadi's view, Yudhisthira is known for his morality, Bhima for his vengeance, Arjuna for his archery, Nakula for his swordsmanship, and Sahadeva for his intelligence.
Answer: Yudhisthira: is best known as a person who has no aggression, and always upheld justice.  His non-aggression came to use when he had to fight with Shalya
who had a unique ability to obtain slightly more prowess then whomever he is about to fight.
Bhima: is a fast runner, has a huge bold body, and is tall.  Like wind he loves and gives freedom.
Arjuna: the most noble and humble and saintly and mostly loved by the lord Krishna.  His saintly attitude allows him to become the master of warriors.
Nakula: apart from his prowess for riding horses and skillfulness in swordsmanship,  he also has the ability to ride his horses in the rain without getting wet.
Sahadeva: is also an expert swordsman, and has the ability to predict the future.  But he's cursed so that if he tells others about the future his mind can blow away.  That's why he has also the ability to sustain in worse situations and remain calm and silent.
Every character in Mahabharata has special qualities.  Not only the Pandavas, but everyone.
Comment: Welcome to Hinduism.SE!  You shouldn't write in all caps, and you should cite sources.


Ubuntu login loop 14.04

Question: so i'm new to linux and i installed ubuntu 14.04 on my old laptop lenovo g50 - i3 -8gb - radeon graphics and it was working fine for around 5 days and then soon every time  i tried to login i got stuck in the login loop. Please help.
Comment: also .Xauthority : no such file or directory turns up
Answer: Some steps you can take to fix the login loop:
Go to terminal from login screen:
Ctl Alt F1
login with user-name and password.
Run updates "sudo apt-get update"
Check all applications "sudo apt-get upgrade"
Check all packages "sudo apt-get -f install"
Update grub "sudo update-grub"
Remove all old applications and packages "sudo apt-get autoremove"
Reboot "sudo reboot"
Answer: I too have had this problem. I would suggest DnrDevil's answer (updating, removing all old application, etc.) and if that doesn't work, to try the following:
Sometimes, the .Xauthority file doesn't belong to the correct owner (you). To fix it:

At the login screen enter runlevel 3 by pressing CTRL+ALT+F3
Type chown 'username':'username' .Xauthority, replacing the 'username' with your username.

If this doesn't work, then I would suggest you follow the first answer at this link: Ubuntu gets stuck in a login loop
I hope this helps!

Ubuntu login loop 14.04


DSA and Public Key Exchange

Question: I am trying to implement a licensing solution with DSA Algorithms for my application. Now here is what I have done:

Generated a hardware key, taken its hash.
Generated public and private keys. And encrypted my hash function with private key.
I forward this encrypted value back to client along with the public key.
At client's system, I use the DSASignatureDeformatter's VerifySignature function to validate my encrypted key, and my hardware key. If equal I validate the client.

Now my problem is that how to send the public key over the network. I tried to store and forward various DSAParameters values e.g., J, G, P in a file but since the sizes of keys change, that is not viable. Please see if anyone can guide.
Updated:
When I try to do this at the client's machine
    DSAParameters KeyInfo;
    using (DSACryptoServiceProvider DSA = new DSACryptoServiceProvider())
    {

        // Import the key information.
        KeyInfo = DSA.ExportParameters(false);
    }

The key size it generates for its various members is different from the public key parameters I have sent it back from server.
Comment: Why are variable key sizes a problem?
Comment: Iridium, please see the updated question. I have put some code to explain. I will be grateful for any help.
Comment: I think you're going to need to show more code and provide more detail on the issue you're having - how are you performing the serialization, how are you transmitting it, what errors occur when you try to use the deserialised parameters at the client. (It's also worth mentioning that the scheme as described doesn't seem particularly secure).
Answer: Okay. A bit late. But maybe other ones will have the same question.
You should just export your key like this:
string publicKey = DSA.ToXmlString(false);

so you can import it like this:
using (DSACryptoServiceProvider dsa = new DSACryptoServiceProvider())
{
    dsa.FromXmlString(publicKey);
    return dsa.VerifySignature()
}

DSA and Public Key Exchange


Logic of 'nothing but'

Question: What is the logical analysis of propositions such as 'Freedom is nothing but a chance to be better'?
Comment: I'm voting to close this question because the question is about the English language, not logic or philosophy.
Comment: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Comment: In your sentence, the use of "nothing but" is clearly metaphorical, so the "logic" (or rather literal semantics) of "nothing but" will not help you. The intended metaphorical meaning is to put emphasis on one opportunity that freedom provides, not to say what it literally "is", despite the surface grammar. Namely, the opportunity to improve, which is deemed the most significant. "Nothing but" is there to suggest that all the rest about freedom pales in comparison.
Comment: "*The largest room in the world is the room for improvement.*" I guess that's why Boeing builds the planes there.
Answer: Interpreted strictly, "A is nothing but B" means that every example of A is an example of B. It is a subsethood relation. "Nothing in A falls outside of B." Sometimes it might be interpreted as strict equality A = B, so that every example of B is also an example of A, but this depends on the context.
However, informal considerations often dominate. Even though someone may say "A is nothing but B," they may not mean it literally; they may mean only that this applies in a certain context they are thinking of and haven't stated, or they may be slightly exaggerating, or they may be saying it's a useful heuristic to treat instances of A as instances of B.

Freedom is nothing but a chance to be better

What the author of this sentence likely means, informally, is that:

Freedom does not guarantee that you will be better, it only gives you a chance.
Freedom only is a chance to be better. So if you have a chance to be worse, that's not freedom. Only if you are using your freedom to be better in the author's eyes is it really freedom in the author's eyes. If you rob someone, and the author doesn't like you doing that, the author will likely say that is not the exercise of freedom, because it is not "being better." Depending on the author, this might even extend to certain political demonstrations, sexual orientation, or basically whatever the author doesn't like; the word "better" leaves plenty of wiggle-room for the author of the sentence to say this or that thing he doesn't like is not freedom.
Comment: @ScottRowe If the chance to be better is out of your control, e.g. up to a roll of the dice, then that's not freedom. I think it is possible to choose to be better, because we aren't the same person from moment to moment. In some moments we feel like doing bad things, in other moments we feel like doing good things, and sometimes the good moments can win and result in long-term changes.
Comment: Gosh, it makes it sound like everything amounts to a bunch of "No True Scotsman" arguments.
Comment: I was wondering if "Every A is nothing but B" could be analyzed as "Every A is B and no A is non-B." Is this incorrect?
Comment: @SimonNoriega-Olmos It is correct, but also know that "Every A is B" is logically equivalent to "No A is non-B." So you only need to specify one of them.
Comment: @causative, thank you so much. I appreciate it.
Comment: So can there be Bs that are not A? Can a chance to be better be not freedom? People say that experiencing difficulty and hardship improves one's character. It wouldn't work if it was something you wanted, enjoyed and could choose. I almost think that one can't choose to become better, it has to be externally imposed? If you could just choose to be better, why haven't you done it already?
Comment: I agree, I'm just mentioning "the non-choice of choice": that we can select from what is there, but we can't make it be there for us to select from.
Answer: The question is at risk to search for a philosophical problem behind a linguistic question.
The linguistic term "nothing but" intensifies a statement, often the term can be skipped, e.g., in the OP's example:

Freedom "is no more than" a chance to be better.
Freedom "is" a
chance to be better.
Answer:
What is the logical analysis of propositions such as 'Freedom is nothing but a chance to be better'?

Your question is not about the logic of the sentence 'Freedom is nothing but a chance to be better', but about what this sentence means in English.
It means that freedom is a chance to be better and it isn't anything else, i.e., anything which is not a chance to be better.
Comment: @ScottRowe I don't think that anyone believing that freedom is nothing but a chance to be better would also believe that there is nothing left for them to lose. I also don't think that anyone believing that there is nothing left for them to lose would also believe that one doesn't really have a choice in the matter.
Comment: I wonder if "a chance to be better" is other words for "nothing left to lose"? At which point one doesn't really have a choice in the matter, but it is a *chance* that a positive effect will occur. Like roll dice, suffer, then maybe be better. Interesting.
Comment: They might not think it, yet it could still be the case. But if we all thought what is really the case, probably no one would get out of bed in the morning. Creative Ignorance.

Logic of 'nothing but'


In depth graphics for mobile development

Question: I am a long time developer with alot of experience in the mobile field.
I feel now that the field I am lacking in is the understanding of the UI internals and performance, maybe more in the traditional computer graphics field.
I am looking for recommended sources for adding understanding in these areas, hopefully without reading through entire bibliography on OpenGL etc.
Is this possible and what are some recommended sources?
Answer: Check http://www.RayWenderlich.com there are a ton of graphics related tutorials there form 2D to 3D including CoreGraphics and OpenGL.
Also the Apple documentation has some good information on graphics performance. You really should just dive in then post specific questions here.


Opening WSP in VS

Question: I am new to sharepoint!. Any help on this would be highly appreciated.I have extracted the wsp file by renaming it to cab. But when I open it as a website in Visual Studio, It does not have master file and CSS files.
Can anyone please explain how to make changes to the wsp file using VS and to build and deploy it.
Answer: You cannot make changes to a already compiled WSP file. You need to have the Visual Studio Project instead. This Visual Studio Project packages all the assets to a WSP add the compiled dlls and every thing else.
I highly recommend tho read the basic information on the MSDN
Create SharePoint Solutions first.
Comment: No this steps won't work you need to have an updated WSP for the new SharePoint Version out of the Visual Studio Project.
Comment: No you have to start the Visual Studio on a Server where SharePoint is install. Shouldn't be a productive server. For this you should check the requirements. https://msdn.microsoft.com/en-us/library/ee231582.aspx
Comment: I am working on sharepoint migration. So I was given a wsp file. I need to make some modifications to it and I need to deploy it. Please confirm me that renaming wsp to cab, then open in VS, modify based on the change needed, deploy it - these steps would work or not.
Comment: It is asking for me to install Sharepoint Server on my machine to create a project.(which I dont have permission). Is there any work around ?.. Kindly advice me !
Comment: In the test environment we are able to open the files and make changes to it directly(to make the system work the way we want it to be). My question is why do we need VS to open it. What is the main role of VS.

Opening WSP in VS


Show Sitecore form dropdown menu based on user logged in status

Question: I have sitecore form with dropdown control that have 8 values coming from sitecore.
i need to show all 8 for anonymous users and only 4 for logged in users.
How to achieve this
Answer: I think it's good to add security on Role instead of user which can give more flexibility. As dropdown values are coming from Sitecore you can restrict read access of role. So if it is coming from OKTA I think still you have mapping roles in Sitecore and you can restrict read access on the role which is applied to your user.
So it will be accessible for Anonymous user but will not render to the for user which is having particular role.
Answer: I think you can achieve it by using Sitecore security. As values come from Sitecore, you can set security on it. If you deny read access to your logged-in users for those 4 items that you don't want to show for logged-in users it will not be visible. Anonymous users who do have read access will still see the all values in the dropdown.
Read more :Assign access rights to a security account
Hope it helps!
Comment: logged users means logged in using some third party tools like OKTA.
Comment: Yes, it should work fine with OKTA user. You need to deny read access on role and map that role to users.
Answer: Another way to do that is to create a custom dropdown list and override the logic where you can get the datasource items and check the current user role like this.
User currentUser = Sitecore.Context.User;

// Determine if the user is in a specific role
bool isInRole = currentUser.IsInRole("YourRoleName");

And check if the user has access to the items.
// Check if the current context user
// have read access to the item
bool canRead = item.Access.CanRead();

And create a datasource for your dropdown by checking the permissions. And pass this new datasource to your control to bind the values.
You can refer to this article to customize your control in Sitecore.
enter link description here
And this to work on security.
Hope this helps.


Smile vs smile on one's face

Question: Could you tell me the difference between these three sentences:
(1) I always remembered his smile.
(2) I always remembered his smile on his face.
(3) I always remembered the smile on his face.
Comment: "The" smile on his face sounds more natural. Using "his" twice seems redundant.
Comment: Where did you find these examples? The second one does not seem like something a native speaker would say.
Comment: In the first he's remembering his smile.  In the second he's remembering the smile **on his face**  In other words the first remembers the smile all by itself.  The second remembers the whole face "lit up" by  his smile.
Comment: You gotta admit, two "his" make the sentence a bit clumsy.
Answer: It sounds as if the speaker is fondly thinking of times past and talking about a person who is no longer with them.
There is no context, so I may be incorrect to assume this, but I think "I will" combined with a present tense "remember" would likely be more natural. If you are writing this sentence, then you are currently remembering. I find that "Remembered" is hard to use naturally outside of "I just remembered" or "I want to be remembered".
1: His smile

I always remembered his smile.
I'll always remember his smile.

This sentence means that when you think of him, you think of those moments when he smiles at you.
2: Smile on his face

I always remembered the smile on his face.
I'll always remember the smile on his face.

This sentence is more about remembering a person as being a happy person who smiles a lot. His face is being characterized as having a smile.

Smile vs smile on one's face


The F-test is a test for variance so why do we use F-test in ANOVA?

Question: To test the mean vector we use ANOVA, and to test two variances we use the F-test, but my question is in ANOVA why we do use the F-test ?
Comment: This is largely a duplicate question, and you can find the answer here http://stats.stackexchange.com/a/78906/16049
Answer: Both the ratio test for equality of variances and the F test in ANOVA (analysis of variance) are actually taking the ratio of two estimates of variance.
In the ANOVA test, if the population means are the same, the group means will still vary due to random variation. We can actually estimate the variance about the common mean from the variation of the group means from their overall mean in that case -- the numerator of the F statistic is that estimate. The denominator is the more usual estimate of variance, one which applies whether the population means are equal or not.
So in the ANOVA test, you tend to more often get larger-than-typical values for F when the population means differ more, because the numerator will be larger than it should be if it's just an estimate of the variance in the data.
Answer: Our goal is to define an estimable quantity that will take on a known value (here 1 or close to 1) if the null hypothesis is true. By taking the ratio of sum of squares over degrees of freedom, we create an F distributed statistic. This is because given $$X_1 \sim \chi^2_{df1}, \,\,X_2 \sim \chi^2_{df2}$$
$$Y =\frac{X_1/df1}{X_2/df2}$$
Then $Y \sim F$.
Answer: The F-test can be used to test the equality of variance and/or to test the differences between means (as we see in ANOVA).
In ANOVA, we use the F-test because we are testing for differences between means of 2 or more groups, meaning we want to see if there is variance between the groups. We do so because doing multiple t-tests can cause something to be significant, even if it isn't. This is where the F-test comes in. ANOVA separates the within group variance from the between group variance and the F-test is the ratio of the mean squared error between these two groups.


How to compile a LaTeX file in WinEdt 6

Question: I downloaded WinEdt 6 but I do not know how to compile and run the file as compiled in previous versions.
Answer: I would recommend to download and install WinEdt 8, since WinEdt 6 is quite old and unmaintained. Moreover WinEdt 8 has a lot of new features compared to v6.
Apart from that, it depends on what compiler you want to use.
You have a list of options under the "TeX" menu:

The same commands are accessible from a drop-down button in the toolbar:

You have also a generic "Compile" entry in the "Accessories" menu which coincides with "PDFTeXify" if you don't change anything in the defaults.
Each one of the above commands can be customised through the "Execution Modes" dialog, which can be found in the "Options" menu:

About the meaning of the "PDFTeXify" command and similar, take a look at this thread: Quick Build commands in WinEdt
Answer: You can either go to the "accessories" menu and choose the right point from the dropdown menu or press F9 to start compiling (with PDFLaTeX).
Answer: You can use compile button at the top or use shortcut key 'F-9'

How to compile a LaTeX file in WinEdt 6


Do data checksums apply to large objects?

Question: PostgreSQL 9.3 introduced the data checksums feature (initdb -k). Do these checksums apply to large objects?
Answer: If enabled, checksums will be calculated for each data page.
you can read more about check some  in the following site: http://michael.otacoo.com/postgresql-2/postgres-9-3-feature-highlight-data-checksums/
or the following website also tell about checksum http://www.postgresql.org/docs/9.3/static/app-initdb.html#APP-INITDB-DATA-CHECKSUMS
Use checksums on data pages to help detect corruption by the I/O system that would otherwise be silent. Enabling checksums may incur a noticeable performance penalty. This option can only be set during initialization, and cannot be changed later. If set, checksums are calculated for all objects, in all databases.


Has anyone successfully installed ubuntu on a Lenovo Y410P

Question: I see lots of posts on here about folks having major issues with installing Ubuntu on a Lenovo Y410P. Has anyone successfully installed Ubuntu with no major issues?
Answer: I have! I decided to go ahead and do it today before waiting on an answer to this question.
I used the top answer to this post: Unable to install Ubuntu on Lenovo Y500.
It's for a Y500 but it applies to the Y410P.
Comment: Yeah, I've installed Ubuntu 13.04 on Y410p successfully last December. What problems do you encounter?
Answer: Yes. I succeeded in installing 13.10, there were some issues with dual-booting with Windows 8 but grub was able to fix it once I can boot into Ubuntu.
I am going to upgrade my 13.10 to 14.04 now. Hope it works out for me!
Answer: I've been successful with Kubuntu 14.04.4 LTS installation in dual boot configuration as of 29 Feb 2016 with nothing more than a 2 GB USB stick that was turned into bootable Kubuntu Live/Install medium using 'UNetbootin'


What is the use of NTP server when devices have accurate time?

Question: Just as the questions says, why there would be an NTP server when the devices already got the internal clock and are accurate.
Comment: How do you know the internal clock is accurate?
Comment: What alternate method would let you deal with keeping your clocks synched ?  Even setting two clocks to the same time, accurate to the millisecond is impossible by hand and they'll soon diverge.  Consumer-grade clocks are kinda rubbish.
Comment: Show me a device with an "accurate" internal clock and after a few months I'll show you how the clock in that device no longer displays the correct time. @vidarlo I've never seen a device that will display its system time where you cannot manually set the system time. So that's how you would tell the devices what time it is. It's about the same amount of work as telling all of your devices what their NTP servers are.
Comment: How do you tell your devices what time it is?
Comment: Is there something wrong with NTP in your environment ?
Comment: @ToddWilcox or even more work... hence my question.
Comment: @vidarlo I've worked with more than 1000 network devices and servers over the last 25 years. I've never found it very much work to set the system time on any of them, and it's always been more work to configure NTP. Which doesn't mean I didn't configure NTP. It's just to say I don't understand your question. Setting system time on devices and servers is super easy. In some cases, NTP won't even work if the system time isn't close to the time at the time source.
Comment: Because internal clock are not accurate. They are precise, but not accurate. Precision is being able to measure time down to fractions of a millisecond. Accuracy is knowing that 2:00am on December 1 2022 is actually 2:00am
Answer: Internal clocks are only so accurate. With an uptime of months or sometimes years, your nodes can drift considerably from correct time. Also, some nodes lack a battery-powered RTC, so they default to some point in time on bootup and need to be set somehow. Incorrect time may cause confusion and even break some protocols.
NTP can provide accuracy within a few milliseconds, so if you e.g. analyze logs from various sources the time stamps will match very nicely.
Of course, you can use alternative protocols for synchronization, with more or less precision. Keeping the clocks manually on dozens or even hundreds of nodes does not look like a viable option.
Comment: Now if only the designers of those battery-less devices would set things up to be able to run  `ntpd -g` (the *just set the clock whatever the difference* option) at boot...
Comment: @ChrisH Now if only NTP didn't have a bunch of dependencies, like network...
Comment: @Aron, of course, but the use cases here tend to be inherently networked and the example that jumped to mind was a NAS drive that broke the timestamps on a backup after a power cut. Network can include cellular which gives you the time on connection (guessing here but NTP to the base station then part of the GSM or later protocol). Without network you could use GPS to set your RTC, but that depends on putting an antenna somewhere useful. In some places there's a good broadcast radio time service - my watch uses the UK one for example.
Answer: Your question is based on a number of inaccurate assumptions.
First off, not all systems actually have an internal clock. The Raspberry Pi is a trivial example of such a system, but there are many others out there. These systems can generally maintain some semblence of accurate time while running, but they can't maintain time while turned off. Such systems need some way to figure out the time when they start up, and it needs to be possible to do so automatically.
Secondly, many systems don't actually keep exceptionally accurate time. RTCs typically found in modern systems are accurate to somewhere within the 1-5ppm range. Worst case, this is about 0.425s of drift in 24 hours. That's actually not horrible, and quite often most systems can keep even more accurate time while running. But these numbers are not guarantees, are almost never constant, and need to be measured against some external standard to be properly quantified and compensated for. Furthermore, it's not unusual for even more accurate time to be required for network protocols to work correctly.
Thirdly, even if you ignore the above two points, you have to get the clock set accurately in the first place for it to be accurate. Humans cannot do this very well by hand (most people can manage no better than about 5-10 seconds of accuracy when setting a clock by hand), so there needs to be some way to set the time properly in the first place. This becomes even more important when dealing with large numbers of systems because of the second point above. If you need accurate time across more than about a dozen systems, you generally need some way to set the time on all of them at the same time, or some way to have them synchronize automatically.
Comment: To add to your point about not all systems having an internal clock, I'm reminded of the important thing a clock that runs when the device isn't powered needs to keep time - it needs a battery. That can become an issue [when the battery dies, as it famously did with Pokemon Gold and Silver](https://gaming.stackexchange.com/questions/233683/why-does-my-pok%C3%A9mon-gold-cartridge-seem-to-forget-saved-gameplay).
Comment: Worse than about 1s setting by hand is either a poor UI or user error - take a typical Casio digital watch from any time in about the last 40 years, wait for your master clock to tick round to the top of the minute, and press the button to zero the seconds - you match to better than a human reaction time because of the rhythm
Answer: A slightly different perspective than the other answers, in the context of information security.
We do not really care about how time is precise. What we want to make sure of is that time is the same everywhere and that this commonality derives from a single source of truth.
NTP is great for that - you set the "true time"* in one place, and then you have it maintained everywhere.
This is particularly important in time-sensitive services (where clocks must not differ by X seconds, but whether they are precise vs the world is not that important). The other typical case for homogenous time is system/services logs that must be correlated, and it is almost always done based on time.
Finally, you ultimately want to synchronize with a commonly agreed standard outside your company (typically ntp.org) because you can be asked to provide logs for a certain time period, and this is one of the most frustrating exercises.
If you have the capacity to answer with logs time-stamped against this standard reference you cut short a lot of discussions.
* this can be for instance the administrator's wristwatch time
Answer: Leap seconds
Nobody likes them, but they are a part of UTC, so if you want your clock to be in UTC ( to be able to have the same timestamps as everybody else on the internet uses ) rather than TAI, you need a mechanism to keep track of them. NTP is one of the options.
Strictly speaking if you are moving fast or are at unusal distances from the earth gravity well your clock might also drift more than allowed from TAI/UTC
Answer: If your device has an internal atomic clock, naturally you don't need it
NTP servers derive their times from atomic clocks, which are accurate to 1 second in 300 million years.
Most devices take their timing from crystal resonators. A really good crystal might be accurate to a millionth of the stated frequency. There are 31536000 seconds in a year. That means your crystal gains or loses 31.5 seconds over a year on average. In normal commercial equipment like PCs, the crystal is unlikely to be that good (because you pay more for better components) and it's likely to be 10 times that error.
If your device has its own atomic clock then sure, you don't need regular updates from an NTP server. With a regular PC though, you're probably going to want more accuracy than that.
Or do it yourself
Of course there are alternatives. NTP didn't always exist. There's nothing stopping you resetting the PC's time at reasonable intervals, and that's what we always used to do, back in the day. If you've got internet access though, it's way more convenient to have the PC do it automatically.
Comment: Even if you have an atomic clock (or, equivalently, a reliable GNSS signal, or some other PPS source), you still have to figure out what time it is supposed to be in the first place, because those can only indicate the passage of time, not the actual time.
Comment: @AustinHemmelgarn GNSS supplies a very accurate absolute time in UTC (derived from International Atomic Time (TAI)) so there's no need to figure out what time it is. Just about every enterprise/telecoms grade NTP server on the market these days uses GNSS as a source of time, and the internal atomic oscillators (usually rubidium) are used to holdover the clocks should the GNSS signal be lost.
Comment: Please also note that at least the GPS time is not following UTC exactly, there is currently a difference of 18 seconds (it is tied to TAI -19 seconds). GST is TAI exactly, not sure about other systems.
Comment: @Darren I'm not claiming it would be, and my comments above were not intended to be about NTP servers, they were addressing the first part of the answer about not needing any external time reference if you have an atomic clock.
Comment: Even if you have an atomic clock and synchronized it, it will start to disagree with other atomic clocks due to differences in altitude and gravity. If you want to have standard time, you need to communicate with other timekeepers.
Comment: @Darren Depends on whether you're actually parsing the GNSS data, or just taking a PPS signal from the transceiver. A lot of home setups take the second option, not the first.
Comment: @AustinHemmelgarn If you're just spewing out 1PPS, it's not an NTP server. Even if you are outputting ToD but it is hand-set and you've just used the GNSS to keep the time sync accurate (why???) it's certainly not a stratum 1 NTP server traceable to UTC, and shouldn't be claiming as such.
Comment: The best atomic clocks are even accurate to 1 second in 15 billion years.
Comment: @AustinHemmelgarn OK. It seemed like it was a direct response to my previous comment due to the mention.
Comment: @PlasmaHH the GPS signal contains information about UTC-GPS time difference and leap seconds.
Answer: NTP server can set the correct/exact time to more than one device. This is very important when you are working with systems that depend on the correct time.
If there is an internal clock it also needs to have starting value, someone has to enter the time at some point. How accurate can that entry be?
I saw a video Why is this PCIe Card RADIOACTIVE? some time ago and I think that it explains very well why exact time is important in specific scenarios.
Comment: Is the information of the video already summarised in your answer? It's not really clear to me whether the video is supportive, auxiliary or additional information. (Disclaimer: I am not able to view the video.)
Comment: Yes, it covers one aspect - the performance of systems if they are kept in time sync. Here is part of the video description:

By using an Atomic Clock the clocks between different computers can be synced to within a dozen nanoseconds, and with that performance can sky rocket.

Check out the Open Compute Project: https://www.opencompute.org/
Build your own Time Card: https://github.com/opencomputeproject/Time-Appliance-Project

And here is forum thread about this video:
https://linustechtips.com/topic/1367776-why-is-this-pcie-card-radioactive/
Answer: In addition to the many cases already mentioned (clocks not really that accurate, startup time, etc.), I've seen many cases of VMs (virtual machines) which keep reasonably accurate time... until the VM is paused, for instance for maintenance, to move it to another host, or other similar operations.
Then when the VM resumes, it continues to keep track of time... As if that interruption wasn't there. A pause of 5 minutes? The VM is now 5 minutes late! I've seen VMs with an hour or two of lag following maintenances. You definitely want NTP to fix that ASAP...
Comment: Fair point. Actually experienced that myself when our mail log jumped back and forth during backup - the dumb ntp implementation on ESXi was broken and needed resetting. And obviously, we set up better monitoring of the hosts.


Im trying to find a 216 point font

Question: I am trying to make Banners for our "Red Granite Labor Day Celebration" It is a volunteer run festival. I cannot find a 216 point font to download. Arial, Times New Roman, any font will do. Any one have any suggestions?
Comment: Do know that, in most software using fonts, you are not limited to the values as they are given in the dropdown menu. You can click in the line to edit the point value as you see fit.
Comment: Fonts don't come in point sizes. You set the point size in the software you are using.
Answer: Arial or Times New Roman should be fine. In fact, pretty much any font should work with this purpose. I just started a blank page in MS Word, typed a few characters in Arial and changed the font size to 216, so really don't see what the problem is on your end.

Im trying to find a 216 point font


Status bar icons, i3 window manager

Question: Is it possible show volume and wireless icons in the status bar, like in the Ubuntu title bar?
At moment I only connect to a unique wi-fi network, but in the future I need to see more networks.
Answer: For WiFi applet, you need the package network-manager-gnome. To check is it is installed, do:
apt-cache policy network-manager-gnome

& check if it is installed.

For volume, you can see the volume percentage in your i3bar. First find the location of your i3status.conf file using the following command:
sudo find / -type f -iname .i3status.conf

Next, copy it to any folder of your choice. But for the sake of simplicity I am going to copy it to ~/.config/i3/
cp /path/to/conffile ~/.config/i3/

Next, edit the .i3status.conf file. For volume these are the edits you should make:

Uncomment this line:
order += "volume master"

Also, uncomment these lines:
volume master {
        format = "♪: %volume"
        format_muted = "♪: muted (%volume)"
        device = "default"
        mixer = "Master"
        mixer_idx = 0
}

Next, open your config file, find this pattern status_command and replace that line with this:
status_command i3status -c $HOME/.config/i3/.i3status.conf

If you want a volume applet instead of just an icon that shows you the volume percentage, then:

Goto this Github page.
Download the zip.
Extract it to the folder of your choice.
Compile it, by following the instructions given here. Or follow these instructions (copied from the link):
Dependencies
============

Those are the dependencies needed to compile pa-applet:

* GLib (libglib2.0-dev in Debian)
* GTK+ >=3 (libgtk-3-dev in Debian)
* libnotify (libnotify-dev in Debian)
* libpulse (libpulse-dev in Debian)
* Xlib (libx11-dev in Debian)
* autoconf
* automake
* pkg-config

Installation instructions
=========================

pa-applet uses autotools. If you're downloading from the Git repository, you might need to run autogen.sh before you compile it:

$ ./autogen.sh

Compiling and installing it is simple enough:

$ ./configure --prefix=/foo/bar
$ make
$ make install

At the end of ~/.config/i3/config, add these lines for the applet to work:
exec_always pa-applet

Also, for nm-applet just below the above line, look for the line:
tray_output primary

And make sure it is commented.
Also, add these lines at the end of ~/.config/i3/config for the applet to show:
exec_always nm-applet

Finally, reboot.
Answer: For volume I am using: pnmixer
And for network manager: nm-applet

Status bar icons, i3 window manager


Simple CommonsMark viewer for Ubuntu (standalone program, not something that requires usage of an internet browser)

Question: I am looking for a CommonMark viewer. It should:

run locally on Ubuntu - be a normal program, not a browser addon, webapp or anything else that requires usage of an internet browser*

Preferable:

simple and lightweight
open source

Viewer as in "view formatted content". It is fine if viewer is also an editor.
See https://stackoverflow.com/questions/9331281/how-can-i-test-what-my-readme-md-file-will-look-like-before-committing-to-github for wider version of this question.
*I give an exception to browsers running in terminal in text mode

CommonsMark is either text format derived from Markdown or Markdown dialect, depending on how one may prefers to describe it.
It is used by GitHub, GitLab, Stack Exchange etc.
Note that it is not a duplicate of Simple Markdown viewer for Ubuntu (standalone program, not something that requires usage of an internet browser) - the best program for viewing Markdown has no CommonsMark support
Answer: It appears that ghostwriter (obtainable via apt-get install ghostwriter) supports CommonMark in addition to Markdown.
Though note that its development is stopped.


Learning MVC 3, Seems better to create custom app and integrate with Orchard rather than build module?

Question: I have been deliberating and deliberating. Orchard is clearly powerful and flexible, contains some very sophisticated code. I need to create some specific Wizard/Workflow functionality. I am also using Entity framework instead of NHibernate. It seems to me that it will be better to write this application seperately using simpler code, which I can refactor, and integrate into Orchard via a Wrapper Module, rather than getting caught up in writing a module afresh for the complete Wizard/Workflow. As I say I am learning MVC3 and do not want to overcomplicate my life, just deliver a solution. I will certainly use Orchard for typical CMS website features.
I also still have an unresolved issue of representing Organisations above users, which I have already resolved outside Orchard. This is only needed for the application rather than content management. So in the short term it may be that I keep the authentication seperate.
Does this sound the most pragmatic approach. If there was a good existing module then the decision would be easier. I think they are considering workflow for 1.7, but we are not there yet.
Many thanks,
Ed
Comment: Bertrand, if you can put comment in answer then I can award mark. I still have a feeling about the use of the rules module, but I think it is too early. I am now looking into ViewModels and WF4.
Answer: It does sound like a safe path, yes.


Excel Macro to extract rows, dependent on previous days value and at 30 items plus a complete category?

Question: I have an excel file, which initially imports stock data from our cloud based accounting program through .iqy web query.
The column headings are:
A1= Quantity B1= Item C1= Description D1= Bin Code

Now I have created a macro which;

Referesh's the data
 Range("A1").QueryTable.Refresh False

Delete's all zero stock items
 Dim intRow
 Dim intLastRow
 intLastRow = Range("A65536").End(xlUp).Row
 For intRow = intLastRow To 1 Step -1
 Rows(intRow).Select
 If Cells(intRow, 1).Value = 0 Or Cells(intRow, 1) = "" Then
 Cells(intRow, 1).Select
 Selection.EntireRow.Delete
 End If
 Next intRow

Auto Sort by Bin Code
 Range("A1:D1").Select
 Selection.AutoFilter
 Range("A2").Select
 Range("A1:D1668").Sort Key1:=Range("D1"), Order1:=xlAscending, Header:= _
 xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
 DataOption1:=xlSortNormal

Save the Master list
 Dim sFileName As String, sPath As String
 sPath = "C:\stock\ms\Master List "
 sFileName = Format(Now(), "dd'mm'yy")
 ActiveWorkbook.SaveAs (sPath & sFileName)

Now this is the tricky bit,
At least 30 items a day need to be checked, however a bin can not be incomplete! So once 30 items have been selected the script needs to check to see if the next item is in the same bin as the 30th item, and include this in the extraction. So lets say item 30 is in bin 10A2, and also item 31, 32, 33, 34, so all in all 34 items (rows) need to be extracted into a new workbook and saved.
This process must start from the previous days sample, so the mechanics should go like this:

look in c\stock\sl\Sample List -1 dd'mm'yy sample list for -1 day, look at the last item bin number, say 10A1,
take the next rows bin number, 10A2,
from the first row which has 10A2, select 30 rows,
Continue till the bin number changes.
save that file as Sample List dd'mm'yy in c\stock\sl\
email Sample List dd'mm'yy to firstname.lastname@example.com

This should be able to repeat. Also on Saturday and Sunday the company is not open, so on mondays it should look back on friday, and so forth, also accounting for public holidays.
Any help with this would be a life saver? I don't mind if you want to change the file names so that this issue with holidays can be addressed. However, somewhere a time stamp needs to be placed for the files.
Answer: You might want to check out the Dictionary object, it would probably help in this task. If you have any questions along the way ask another question. Not sure if someone else would want to give you a more thorough answer to this question.
Your project might be big enough that you would want to work with classes too.
Answer: Please avoid every Select in your code.
For instance,
Range("A1:D1").Select
Selection.AutoFilter

can be replaced by:
Range("A1:D1").AutoFilter


How to avoid rendering the original object when using the geometry node?

Question: I made this object using geometry nodes.

I want red objects not to be rendered.
What node should I use?
Answer: Remove the Join Geometry node by clicking it and pressing Ctrl + X. Only the Realize Instances should be connected to the geometry output.
Comment: Although in the node setup above Ctrl+X would only keep the red object - but of course the instances should be connected to the output.
Answer: If you want to see the red objects in the viewport to see what you're doing while editing but don't want to see them in the final render, you could use a Switch node in combination with the Is Viewport node.
Plug the Is Viewport into the Switch input, the instanced blue objects into the False input and the result of the Join Geometry node into the True input.
This way when Is Viewport is true i.e. watching the object in the viewport, you see both the red and blue objects. When you render the scene, the Is Viewport result is false and you only get the blue objects rendered.

If you don't need to see the red one in the viewport, simply don't join the geometry and plug only the instances in the Group Output.


Detect shift from sports live stream to advertisement using audio

Question: Namaskaram,
I am a software developer. I am trying to build software that mutes the audio or shows a video of wisdom as soon as the advertisement starts during a sport live stream. The live stream generally has commentary or the voice of the crowd and another voice based on the sport being broadcasted and the audio of the advertisement is different. So, I wish to know If there is any property of audio that would help me detect whether the advertisement has started or not. Like noise reduction or something else that you might be aware of based on your experience and knowledge. Is there anything on this link that should be helpful to me?
Pranam,
Kartik Watwani
Comment: I love the euphemism, "video of wisdom"… you mean you want to insert your advert instead of theirs. If that were so simple, it would have been done years ago. Ads used to be more heavily compressed [ie louder, perceptually] than the broadcasts, but the introduction of LUFS monitoring has fortunately put paid to a lot of the loudness war. On a streaming service you could potentially check for the url swap as the adverts may be localised [which any decent ad blocker can do], but really that's all a 'web' issue, not one of 'sound design'
Answer: As the link said : The AudioContext interface represents an audio-processing graph built from audio modules linked together, each represented by an AudioNode. then, it is a needed API used to access the Audio library from a Web client application, but it won't give you information about what is inside an audio stream. As a graph based API, you can stack/merge multiple effect, sources… but not get an information which is not published.
You seem to ask for something like RDS (Radio Data System) to give you metadata, but the main metadata we can get from a podcast seems to be global to the whole stream (not « from xx:xx to xx:xx », ads…)
Comment: RDS is/was very oft misused anyway - leave it 30s before pressing the button… "oops I forgot." The watchdog in the UK I think eventually gave up trying to police it [I long ago stopped listening to commercial broadcasts that used it, so I lost track of how it went… I gave up caring;))
Comment: @Frédéric I am building a browser extension and there is a [chrome.tabCapture](https://developer.chrome.com/docs/extensions/reference/tabCapture/#method-capture) API that gives access to [LocalMediaStream](https://webplatform.github.io/docs/apis/webrtc/LocalMediaStream/). Can that help me?
Comment: As Tetsujin said, the most obvious way to get the information is if the source switch URL or make something observable. If the ad is well embedded in the stream, your PC wont receive the « this is an ad » information, then no API would get you what you want.
Comment: _"but it won't give you information about what is inside an audio stream"_ - This is not _entirely_ correct in this form. While it won't magically describe the audio in plain English, you can do as detailed audio analysis as you want. It has built-in methods not only for time-domain audio analysis, but frequency/spectrum analysis as well. From that, you can make assumptions of what's in the signal. Using it to distinguish an ad from non-ad audio is an entire career's worth of work though.


Did specific countries have special influence in the founding of the UN?

Question: I'm having a presentation on the influence of non European countries in the foundation of the UN. I was wondering was specific points especially China and the US had that got into the foundation of the UN?
Also if you know some other countries outside Europe that had influence in the founding of the UN.
Comment: Sorry sir, but it isnt. Can't find anything on this on Wikipedia!
Answer: The United Nations grew out of the organisation of the Allied side of the Second World War, who were formally known as the United Nations from the beginning of 1942. To join at that stage, a government had to sign the Declaration by United Nations, and declare war on the Axis powers.
The declaration had been drafted by FDR, Churchill and Harry Hopkins, in December 1941, so US influence was present from the beginning. The five permanent members of the Security Council are the five major Allied powers of WWII: the USA, the UK, France, the USSR (later replaced by Russia) and the Republic of China (later replaced by the PRC).


Seafarer transiting through Dubai

Question: I am a seafarer signing off from ship in Turkey, and travelling to India through Dubai. Is it possible for me to stop over in Dubai for a few days? I am an Indian citizen holding an Indian seaman, book valid US C1D visa and a Schengen visa.
Answer: Dubai offers a 96 hours transit visa for airlines and other companies for their crew to utilize.
Seamen can use the same visa for entering Dubai for the purposes of embarking / disembarking. However, this visa must be applied for in advance and from Dubai.
It is not a "visa on arrival" as you may be used to.
Unfortunately your other visas do not offer you any additional privileges as far as entering Dubai.

Seafarer transiting through Dubai


Find the values for n0 and the constant factor c such that f(n) = n log n is Ω(n)

Question: I was recently introduced to big O and big Omega, as well as big theta. I know that big O is the worse case scenario in terms of runtime, big Omega is the best case scenario, and big theta is in between. However, I'm still confused on how I would use it mathematically to prove that n log n = Ω(n). Also, I get that n0 is the lowest possible number for the equation to work, but where does the constant factor c come in? Any advice and help is greatly appreciated, thanks!
Answer: $\log(n) \ge 1$ for any $n>2$. Hence, if we choose $n_0=2$, then for any $n>n_0$ we have $n\log(n)\ge n\cdot 1 = n$. Thus, by the definition of $\Omega$, we have that $n\log(n) = \Omega(n)$.


Reporting Services: Show top N Rows with Grouping

Question: I am trying to show the top 10 rows in my report. I can do this by setting the following expression for the Visibility of the row group:
<code>=IIF(RowNumber(Nothing) <= 10, false, true)</code>
and then sorting the table on the top numbers.
In my query I get two rows for each result, with different results. The problem is that I want to group these rows into one row in the report without losing the count for top X rows. But when I group on the name in my report in Visual Studio, it only shows every row one time and the count for X rows get incorrect. Sometimes I have the same name once and sometimes twice. I have tried to set the expression to 20 rows, but then I might get 12 rows sometimes and 10 rows sometimes, depending on how many rows for each name my query returns.
Thanks in advance,
Sara
Answer: It sounds like you need to top N after you group. Can you group in you query?


Create usercontrol at runtime

Question: I have a situation where user can change the order of controls on a canvas. Then it will be populated with data and many instances will be placed on a flow document. What will be the right approuch to get it. I was thinking that after changes I should create a usercontrol dynamically and then placed the many instances on the flow document. But I dont know how to create a user control dynamically. Please help.
Comment: What kind of control? Have you tried declaring these controls in the C# 'code-behind' and adding to a canvas/stackpanel etc. yet?
Comment: Your question is a little confusing to me, what are you trying to achieve?  What kind of controls are you trying to create in the code behind?
Answer: Every control in WPF is still an instance of a class. Let's say your user conrol type is  SuperControl. Then in order to create it from code you do:
var u1 = new SuperControl(); //create a control's instance

u1.Height = 100; //Optionally assign properties to
u1.Width = 100;  //configure the control

mainGrid.Children.Add(u1); //Place it on a layout element.

Comment: I dont have any usercontrol build before hand. Can I use this method to conver a canvas to a usercontrol?
Comment: You can create anew class, that inherits from Canvas and do customization you need. Lets say you call it MyModifiedCanvas. Then you can create an instance of it and place on a layout element like shown in the example.
Comment: Thanks Maxim. how to place the control at certain position in parent canvas control.

Create usercontrol at runtime


How do aircraft land and take off on an aircraft carrier?

Question: The average aircraft carrier length is 1000 feet, and the runway for a really small airport is around a mile long. How do they take off and land?
Comment: Welcome to aviation.SE! See [this question](https://aviation.stackexchange.com/q/475/62) for landing, and [this one](https://aviation.stackexchange.com/q/44714/62) for taking off. Does that help?
Comment: Even the most basic research would tell you that takeoff uses catapults, landing uses tailhooks & arresting gear.  Don't think you know much about small airports, either :-)
Comment: Welcome to AviationStackExchange. While this is a forum that welcomes the inquisitions of all aviation enthusiasts, there is an expectation that some level of research was done on the subject by the question's poster. You may find it useful to add to your questions the lines of research you have done so far, and even your level of understanding of the subject. Then, ask your question as clearly and concisely as possible to includes the specific areas of your research on which you are confused. Otherwise, overly broad questions of readily accessible information may be deleted.
Comment: A small airport could have a runway or runways with lengths between 3000 and 12,000 feet. What you probably mean is a short takeoff and landing runway. In the US civilian world, a short takeoff and landing surface would be anything under 3000 feet for most people. But, it could be as short as 1200 feet. It really is defined by the aircraft used. I regularly takeoff and land on a runway surface of a little over 3000 feet using normal (not short) landing procedures. There are some private airfields with runways under 1000 feet.
Comment: An awareness of the existence of aircraft carriers, generally, comes packaged with enough supplemental basic information to answer the root question.  Catapults and arresting cables are the short answer.  Plenty of information out there, downvoting for lack of effort.
Answer: the planes are basically thrown down the runway with a steam-powered catapult that boosts them up to flying speed by the time they reach its end. For landing, they use a tail hook on the plane that catches a cable or series of cables stretched across the runway; the cable(s) then bring the plane to a quick halt.
The stresses imposed on the airframe by all this violent action are great, requiring very strong construction. The hazards presented by carrier operations are great too; a malfunction of the catapult which causes the plane to not reach flying speed will throw the plane off the bow right into the path of the ship, which then overruns the plane. And if the tail hook misses all the cables, the plane is at risk of running off the runway and falling into the water.
Answer: There are multiple different systems in place. The most widely-used ones are:

CATOBAR (catapult-assisted takeoff but arrested landing): the airplane spools up its engine(s) to full thrust while being held in place by a restraint system, then gets literally catapulted off the deck with a sled that is attached to the nose wheel gear and "slings" the airplane forward and accelerates it to takeoff speed. For landing, the airplane extends a tail hook that catches a steel wire on the deck which "pulls" the airplane to a stop.

STOL (short takeoff and landing): some airplanes are capable of normal takeoff and landing on the runway lengths provided by an aircraft carrier. This is mostly no longer in use, but it was the way things worked in WW I and WW II. The world records for STOL airplanes at the moment are about 10 feet for takeoff and under 10 feet for landing.

VTOL (vertical takeoff and landing):  some airplanes are able to take off and land vertically. Some examples are the McDonnell Douglas AV-8B Harrier II "Jump Jet" and the F-35B variant of the Lockheed Martin F-35 Lightning II.

STOVL (short takeoff / vertical landing): taking off vertically uses a lot of fuel and limits the weight of the airplane (meaning they cannot take as many weapons with them), therefore it is more efficient to have a short takeoff roll and take off with at least some forward speed.

Ski Jump: at the end of the deck, the very end of the runway is curved upward, this gives the airplane additional upward momentum and accelerates it upwards into the air. Typically used for STOVL airplanes. The most well-known examples are the British aircraft carriers of the last decades.

In all of these different modes, the aircraft carrier can always do two things that an airport cannot do:

The carrier turns directly into the wind (or in case of an angled flight deck at such an angle that the runway points directly into the wind). That means, an airplane never has to worry about taking off with a crosswind or tailwind, it will always have a headwind, which increases the airspeed.

The carrier accelerates to its highest sustainable speed. So, even if there is no wind, the airplane already has some forward velocity relative to the airflow.


Can satire be libel?

Question: Can a clearly marked satirical article claiming someone said something (which they did not) that would seriously damage the person's reputation be considered libel? For example, if Biden actually said what this Babylon Bee article "claims," it would certainly harm his reputation. Could that article be considered libelous?
Comment: @Someone as stated in the linked question, if it is obviously satire from the way it's written, it may still be considered satire. If it isn't, it's just a false news article and follows all the other rules for libel.
Comment: @BlueDogRanch Yes, i think so. So a similar article claiming that someone who isn't a "public person" said that would likely be libel?
Comment: @Someone A defamatory statement must be false. If "Biden actually said what the article claims he said" then the article would be true. The Babylon Bee would have the defence of truth - Biden wouldn't prevail in court, if it got that far.
Comment: @Lag sorry, my question wasn't very clear. O was asking what would happen if Biden did not say it but that article was published but not marked as satire.
Comment: @Someone your question is about a "clearly marked satirical article" and now you say "not marked as satire." which do you intend?
Comment: And how clearly is it "clearly marked" as satire? And is it indeed satire? Or libel with a tag "satire" slapped on it to avoid responsibility?
Comment: @Esther My question was asking what would happen if a site that wasn't a satire site published that same article and called it real news.
Comment: @Esther okay, thank you! That makes sense.
Answer: Something labeled, and indeed intended, as satire can be defamation if

people believe that the statements made are in fact true of the person concerned (the subject), or that the satire implies such statements about subject; and

the statements about the subject made or implied in the satire are in fact false; and

such statements tend to harm the reputation of the subject.

Satire can be, and has been, used as a cover for pointed statements about the subject, and in some cases such statements  can constitute libel (or slander).
In the US a libel plaintiff would have the additional burdens of:

showing actual damage, or else showing that the statements fell into one of the limited categories of libel per se; and
If the plaintiff is a public official or public figure, showing actual malice under the rule of Times v Sullivan.

Those burdens exist in every US libel or defamation action, whether a satire is used or not.
That something is labeled as or treated as a satire may indicate that it is not to be believed. That might go to the intention of the person or entity making the statement. It might also go to whether it is reasonable for people to take the statements as factual. But satire can be used as a thin cover for a factual statement. If (in a given case) it is being so used, or if people might well believe that it is, it can be defamatory.

Can satire be libel?


Best way to organize data: variable number of specific datapoints

Question: I'm writing a soccer simulator for fun, and I'm unsure how to organize my player's attribute ratings.  I know that the number of attributes will change as I improve the game.  I'll need to access each individually, i.e.
SoccerPlayer.getSpeed()
SoccerPlayer.getShooting()

I also know that I'll want to be able to average them with a single function to get an overall rating.
SoccerPlayer.getOverall()

My first inclination is to use a list or array, with constants to define each attribute's index within the array.
static final int SPEED_INDEX = 0;
static final int SHOOTING_INDEX = 1;

static final int NUM_ATTRIBUTES = 2;

int[] attributes = new int[NUM_ATTRIBUTES];

int getSpeed() {
    return attributes[SPEED];
}

int getOverall() {
    int total = 0;

    for (int i : attributes) {
        total += i;
    }

    return (total / attributes.length);
}

That way, whenever I add a new attribute, I only have to change the total constant, and add a new index constant, and the total function will always work.  But is there a better way to do this?
Comment: I'm adding a "Java" tag to this, since one side to the question is "I want to make a class and do something for all fields of the object". The answer would be significantly different in, say, Lisp, from what it is in Java.
Answer: You could use an enum for your attributes and a map for the ratings:
enum Attributes {
    SPEED, SHOOTING;
};

private Map<Attributes,Integer> ratings = new LinkedHashMap<Attributes, Integer>();

int getRating(Attribute attribute) {
    return ratings.get(attribute);
}

int getSpeed() {
    return getAttribute(Attributes.SPEED);
}

int getOverall() {
    int total = 0;
    for (int i : ratings.values()) {
        total += i;
    }
    return total / Attributes.values().length;
}

Then to add a new attribute just add it to the enum.
When you're debugging, the ratings will be easier to understand because the attributes have names instead of numbers.
Also, if you want to add something like a scale factor to the attributes (e.g. speed is weighted twice as much as shooting) the enum is a convenient place to put it.
Answer: I'm surprised that you're ever going to be interested in the sum of a player's attributes. I mean, does it really make sense to add my ability at running to my ability at shooting accurately?
Assuming that you really want to do this, what you've described seems sensible enough.
Answer: From what I see, your system for an overall ranking is functional. There is one thing however, that you might want to check and make sure is correct. For your ranking to be accurate, 1 point of shooting index must be worth the same competitively as 1 point of speed index. If the changes in speed index are much more valuable then the shooting index, or vise versa, the rankings will be inaccurate. It seems like an elegant design so far though, as long as it is properly balanced.
EG: 4 speed 4 shooting might be able to beat 10 speed 1 shooting every time, but would still be ranked lower. You will have to adjust how much bonus each speed/shooting actually gives someone in order to make sure that the higher ranking team will have a better chance at winning.
Comment: My goal here isn't to build a comprehensive sim from scratch.  I just want to be able to start with a flexible enough structure that I can continue to add complexity without continuously having to redo everything.


Why does it take several attempts for my garage door to go all the way down?

Question: It comes back up at different points. Sometimes it won't even start going down. Both my yellow and green lights are on, but it keeps coming back up.
Comment: If your opener has adjustable close and open force, i.e. the resistance at which it reverses, it may need to be adjusted. Otherwise, Solar Mike's suggestion is probably spot on.
Comment: it has to warm up the track and grease with waste heat in order to drive the mechanism with low enough friction as to not freak out the "back pressure" detector.
Answer: The runners are dirty / blocked or the guide wheels / pins are sticking, not rotating and increasing the load so that the safety limits come in causing the motor to stop or be reversed.
Comment: so, clean and grease the tracks, in case that's not obvious from your problem description...
Answer: DO NOT increase the close force.  Find out why the close force is suddenly not enough.
How does the door roll manually?
Garage doors are dangerous and can kill you.  It's vital to keep their mechanisms tip-top.  Problems are easy to detect if you normally operate the door by hand, because you feel the door start to get stiff.  (But if 100% of your door usage is via the motor-drive coughEthiopian302*cough*, then you won't know what manual operation normally feels like.)
The motor won't give you a sign of trouble until things are serious.  On the upside, this is easier to detect by hand since it's more obvious.
So operate the door by hand. It should roll smoothly and be well balanced.  If it hangs up, or drags, figure out why and fix it.  Common problem points are rollers getting sloppy (they wobble, or drag: they're easy to check with the door in the vertical position), and dirty tracks.
Do Not Grease Tracks.   Putting Grease on them will only attract dirt and dust, creating a nasty filth gumbo that will drag the door even more.  Tracks shouldn't need greasing, that's why rollers have ball bearings in them.  If you absolutely must "grease" a door, then use graphite paint.  This is sold as Lubri-Plate, Slip-Plate, EZ-Slide, etc. in quarts, gallons or spray cans. This dries like paint, and leaves a coating of graphite.  You need to shake/stir the daylights out of it, it loves to separate.   It won't attract dust/dirt, won't be disgusting on your fingers, and is less likely to ruin clothing.
Answer: Does this happen only at some times of day? Direct solar light shining into the sensor can cause false detection. If this is happening try shading the sensor with your body's shadow or another object. If this enables the door to close reliably then consider swapping the sensor and the emitter so that the sensor faces away from the sun, or improve the shading on the sensor. Swapping locations is most effective on a door that runs on a north-south line; if the door runs east-west then swapping locations will exchange the solar troubles from morning to evening or vice-versa (which may still be an improvement if it matches your comings and goings better).
Answer: I have had this happen when something was in the way of the electric eye sensor which keeps the door from closing on things.  Something thin like a piece of hay can trip that sensor unpredictably.
Answer: When my garage door opener exhibited similar symptoms, I had to replace a gear inside the box.  It was a plastic gear and over the years, it shredded.  Open the box and look for plastic shavings.  If you find them, examine your gears.  One or more of them will probably be badly worn.
Replacing the gear was not difficult.  Though, I had to order the gear over the internet as no local shops carried that part.