Are good practices really that opinion based?

I asked  and it was put on hold as opinion based in less than an hour. A few months ago, I asked another question about good practices and it got squashed quickly as well. I didn't realize good practices were so opinion based. I thought it was an agreed upon set of standards (unique to each language) that seasoned programmers agreed on.   I'm trying to learn programming, and the Stack Exchange sites are a big source of help. Books don't offer a lot of help about specific best practices. So I figured this would be a good place to get the information from people that write code regularly and really know what is expected and allowed in production code.  Are questions about best practices on topic for Stack Exchange? And if not, why?


Why are newer generations of processors faster at the same clock speed?

Why, for example, would a 2.66 GHz dual-core Core i5 be faster than a 2.66 GHz Core 2 Duo, which is also dual-core?  Is this because of newer instructions that can process information in fewer clock cycles? What other architectural changes are involved?     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this question. Feel free to edit the answers to add additional details.


Can I let my fake flash USB drive get its real capacity through low level format?

Recently, I bought an USB flash drive which has a cool design.  The seller said it is 256GB however, I've already known that capacity would be fake. Anyway, I bought it cause of its cool design and want to use this USB flash drive anyway.  What should I do?  I've tried to find a proper tool(vid 1908 / pid 1320) but couldn't. Can I repair this through Low level format? Or partitioning this through Linux?


How can the Scarlet Witch break the Mind Stone?

The Infinity stones have existed since the origin of the Universe.   Since the Mind stone is so powerful how can the Scarlet Witch break it in Avengers: Infinity War?


How do I enable/disable Cut/Copy/Paste menu and toolbar items in a generic way?

I have a windows forms application with controls like textbox, combobox, datagridview etc. These controls allow a user to use the clipboad, i.e. cut/copy and paste text. It is also possible to delete text (which is not related to the clipboard).  My application has a menubar with an Edit item containing Cut/Copy/Paste/Delete items, and a toolbar with these items as well. How can I enable/disable these items properly depending in the state of the control having the focus?  I am looking for a generic way, i.e. I look for an implementation I do once, and can reuse for the future independent of the controls my application will use.


XML Error Code - A name contained an invalid character

Can someone please help me with this XML? I keep getting an invalid character error. I'm trying to create an XML map to convert data in Excel.  <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <utilbills-data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">  <record>   <bill name>Broome County Industrial Dev Agency</bill name>   <mailing address>201 Robinson St</mailing address>   <city>Binghamton</city>   <state>NY</state>   <zip Code>13904</zip Code>   <reference>33 Lewis Rd</reference>   <propertyid>1</propertyid>   <bill date>09-30-2019</bill date>   <due date>10-30-2019</due date>   <bill number>24597</bill number>   <memo>Make Checks Payable To Town of Union Water and Sewer</memo>   <meter>1B</meter>   <previous balance>$0.00</previous balance>   <charge>$544.33</charge>   <description>WATER</description>   <previous read date>06-05-2019</previous read date>   <current read date>09-04-2019</current read date>   <previous reading>0</previous reading>   <current reading>10858</current reading>   <usage>10858</usage> </record>


How to get new mail nofications from Thunderbird 68 on Ubuntu 20.04?

I am an old Thunderbird user sticking with it for over 10 years, and I cannot see any new mail notifications on my old Ubuntu 16.04 (Unity) since my last Thunderbird update, which is quite troublesome for my daily work. I tried searching addons but found no Thunderbird 68 compatible addons exist. I finally updated my Ubuntu to latest LTS 20.04 to see if it is resolved in latest release, but the result is still negative. So, does anyone know a solution to this problem: how can I receive new mail notifications from Thunderbird 68 on Ubuntu 20.04?


Insert text from file inline after matching pattern in another file

I'm trying to take the contents of a file and insert it after a matching pattern in another file using sed. My question is very similar to , but I wish to insert the contents of a file inline rather than on a new line. How can I do this?  Using the example question I referenced, the first answer does exactly what I want; however, I want the insertion to happen inline:  sed '/First/r file1.txt' infile.txt    The actual data I want to insert is a JSON file:  [     {         "foo": "bar",          "baz": "biff",         "data": [             {                 "a": 1945619,                  "b": [                     {                         "c": 512665,                          "d": "futz"                     }                 ]             }         ]     } ]


How to do low scale time series prediction?

I have a small time series data with 10 observations Each observation is spaced at 20 days gap For example, I have sales revenue from day 1, day 21, day 41, day 61 till day 221... Now I would like to predict what will be the sales revenue on day 500th day amd 850th day? How can we predict using short timeseries data (which has only 10 observations)? Is there any specific technique that I should follow? Can you guide me on how would you guys do this? What are some of the topics that I should learn to do this? Can someone please help me with list of steps on how to do this?


For some reason, ceil(x) rounds up round numbers to x+1.  For example:  double og_grade = 50; double fact_grade = ceil(og_grade*1.1);   og_grade*1.1 should be 55.0000, but ceil(og_grade*1.1) returns 56.0000  Note that og_grade is always a whole number.


Why is there no gravitational magnetic field? (Or, is there?)

We can think that the electric field and the gravitational field operate similarly in the sense that the forms of their governing laws (namely, Coulomb's law and Newton's law respectively) are strikingly similar. The only difference one can point out is that while the electric charges come in two flavors, the gravitational masses come in just one.  Now, I have read that when a charged particle moves, the electric field lines associated with are distorted in a fashion because of the finite time required for the information about the change in the position of the charge to get propagated. And, I have led to the understanding that this is the cause of the existence of the magnetic field (and that if calculus is used it can be proven mathematically).   So (if this is true then) why doesn't the same thing happen to the gravitational field? Why is there nothing like a gravitational magnetic field? Or, is there?  Note  I have changed the language and the tone of the question massively. Although the question was fairly well received, I believe it was really ill-posed. As pointed out by ACuriousMind in the comment, the ''reason''described here behind the existence of the magnetic field is something that cannot be found a good support for. But still, due to the similarity between the equations describing their static behavior of electric and gravitational fields, one can still ask as to whether a boost would create some sort of a gravitational magnetic field if the original frame only had a static gravitational field. As the accepted answer points out, the answer is, roughly, a yes but the Maxwell-type equations for gravity aren't as well-behaved as are the original Maxwell equations of electromagnetism--one should note. In particular, the equations for gravity take the Maxwell-like form in appropriate weak limits only in some appropriately chosen gauges--and aren't Lorentz covariant.


Why is convexity a requirement for Brouwer fixed points? Shouldn't "no holes" be good enough?

Brouwer's fixed point theorem:     Every continuous function $f$ from a convex compact subset $K$ of a Euclidean space to $K$ itself has a fixed point.   I am wondering why the word "convex" is in there.  It seems to me that it is necessary and sufficient for $K$ to have no holes, which is a weaker condition than convexity.  Necessary: if $K$ has a hole, then the continuous mapping that simply rotates points around this hole has no fixed point.  Sufficient: A unit disk in any number of dimensions has a Brouwer fixed point.  Any compact, hole-less set $K$ is homeomorphic to the unit disk in some number of dimensions.  If we map $K$ to the unit disk $D$ with a homeomorphism $h$, then consider the function from $D$ to $D$ given by $h \circ f \circ h^{-1}$.  This is a continuous function from the unit disk to itself (which is convex and compact), so it has a Brouwer fixed point $x$.  Then $h(f(h^{-1}(x))) = x$, so $f(h^{-1}(x)) = h^{-1}(x)$, so $h^{-1}(x)$ is a Brouwer fixed point of $K$.  What's wrong with this argument?


I just bought a new laptop, it's ASUS TUF FX505DT, here's the specs:  AMD® Ryzen™ 5 3550H Processor DDR4 2400MHz SDRAM NVIDIA® GeForce® GTX 1650 , with 4GB GDDR5 VRAM 256GB PCIe® Gen3 SSD  I was wondering if this would work well if I'd switch my OS to Linux, Ubuntu to be specific. I'm running Ubuntu on my old laptop (it's HP Pavilion), and Linux is working well on it. I figured out to ask others who have the same laptop as mine if Linux does work well in this laptop before I switch Windows to Linux. I also heard that NVIDIA doesn't work well with Linux.


counting working days without counting weekends as workdays in php

I have case in my program user want to count working days is 10 days without counting weekend as workdays. example i choose my first day of working on monday, so if you count normally workdays will ends wednesday because weekend is counted but what i want is 10 workdays not counting weekend as workdays so it should be finish next friday if weekend(saturday & sunday) not counted. so anyone know how to do it using php?  sorry bad english. thanks for help!


Easiest way to alternate row colors in PHP/HTML?

Here's a PHP example of mine. Can anyone find a shorter/easier way to do this?  <? foreach($posts as $post){?>     <div class="<?=($c++%2==1)?‘odd’:NULL?>">         <?=$post?>     </div> <? }?>  <style>     .odd{background-color:red;} </style>   Examples in other languages would be fun to see as well.


Can the determinant of a matrix can be made $0$?

An entry of an $n \times n$ matrix with nonzero determinant is defined as interesting if by changing this entry (and only this entry) the determinant of the matrix can be made $0$.   Is it true that each entry of every matrix with nonzero determinant is interesting? Is it true that there is an interesting entry in each row of a matrix with nonzero determinant?


Multi-threaded 3D renderer crashes with NullPointerException

Here is the main project:  And the required project:  The projects were made in Eclipse. Libraries (all included:)  Gson Xom MigLayout Apache Commons IO (included)  To recreate: 0. Download both projects  Open both projects in Eclipse Run 'Multi Machine Builder' Click 'Play' Watch the console


I like not to know time when I'm using my computer. I found how to turn it off on my desktop but I didn't find how to turn it off before login into my session (it still appears in small on top of my screen) and when I start my computer again after it has gone into standby mode (it then appears in big in the middle of the screen).  I can live with it but now that I've got plenty of time (thx quarantine) I thought it could be the time to fix it! ;)  Any ideas welcome and have a great day!  Guigeek  PS: I'm not really an advanced user of commands, codes and so on, I would probably need some step by step solution.   EDIT: OS is Ubuntu 18.04.01. Question is about lock screen and login screen and not about desktop.


Rails: How can I set default values in ActiveRecord?

How can I set default value in ActiveRecord?  I see a post from Pratik that describes an ugly, complicated chunk of code:   class Item < ActiveRecord::Base     def initialize_with_defaults(attrs = nil, &block)     initialize_without_defaults(attrs) do       setter = lambda { |key, value| self.send("#{key.to_s}=", value) unless         !attrs.nil? && attrs.keys.map(&:to_s).include?(key.to_s) }       setter.call('scheduler_type', 'hotseat')       yield self if block_given?     end   end   alias_method_chain :initialize, :defaults end   I have seen the following examples googling around:    def initialize      super     self.status = ACTIVE unless self.status   end   and    def after_initialize      return unless new_record?     self.status = ACTIVE   end   I've also seen people put it in their migration, but I'd rather see it defined in the model code.  Is there a canonical way to set default value for fields in ActiveRecord model?


How to put a vertical line with derivative

Dear All in attached image how I can put a vertical line with derivative .Any command for this please?


Is it required that multiple verbs in short sentences match tense?

Today a  in English language learners concerning tenses in a short sentence with multiple verbs. Basically it was, which is correct?   I thought you wrote poetry. I thought you write poetry.   My answer (in summary) was that #2 sounded better. Some did not like the answer, thinking the usage to be ungrammatical. We even had a friendly chat about it. Lambie and Gustavson did their best to convince me. I ended up saying that the only basis I could fully agree with them is if tense agreement were grammatically required.  I'm not asking for up-votes (go down-vote the answer, and even this question, if you want), but I chose to escalate the question to the PhD and expert folks here to see if that grammatical requirement actually exists.  Lambie's final comment  was:     OK, call it agreement, that's fine. "I'm thinking I will buy some chicken." She was thinking she would buy some chicken. ...   People had to leave before I saw a difference and could comment on it. In his final example, the chicken buying was a single act. It happened yesterday and has nothing to do with today, except maybe dinner. 🍗 However, if she happens to be a professional chicken buyer, then that remains true.  The state of her professional chicken-buyerhood does not change with midnight.  Nor does the potential poet in the original question. So, today:   I think you write poetry.   Tomorrow, what will be this thought about (tomorrow's) yesterday? Did I think you are an ongoing writer of poetry, or that you were someone who once wrote poetry?  So that is my case as to why two tenses might be grammatically used in a short sentence.  Am I wrong?


How do I type the symbol in attached file?


Error while installing VLC in Ubuntu 16.04

Am getting below error when trying to install VLC:  You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: libvlc5 : Depends: libvlccore9 (>= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1~) but it is not going to be installed vlc : Depends: vlc-bin (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Depends: vlc-l10n (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Depends: vlc-plugin-base (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Depends: vlc-plugin-qt (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Depends: vlc-plugin-video-output (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Recommends: vlc-plugin-notify (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Recommends: vlc-plugin-samba (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Recommends: vlc-plugin-skins2 (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Recommends: vlc-plugin-video-splitter (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Recommends: vlc-plugin-visualization (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   Output of apt-get -f install:  The following additional packages will be installed: libvlccore9 The following NEW packages will be installed: libvlccore9 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 2 not fully installed or removed. Need to get 0 B/472 kB of archives. After this operation, 1,247 kB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 359521 files and directories currently installed.) Preparing to unpack .../libvlccore9_3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1_amd64.deb ... Unpacking libvlccore9:amd64 (3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) ... dpkg: error processing archive /var/cache/apt/archives/libvlccore9_3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1_amd64.deb (--unpack): trying to overwrite '/usr/lib/x86_64-linux-gnu/libvlccore.so.9.0.0', which is also in package libvlccore8:amd64_3.0.0~~git20171210+r73147+99~ubuntu16.04.1 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Processing triggers for libc-bin (2.23-0ubuntu9) ... Errors were encountered while processing: /var/cache/apt/archives/libvlccore9_3.0.0~rc1~~git20171214+r73255+108~ubun tu16.04.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   Can anyone please help me fix this error and install vlc


Is losing money in the stock market exponentionally worse than gaining?

For example,  $FB is $180 today.  If it were to lose 50% of it's value it would be worth $90.  If it was to then gain 50% back it would be worth $135.  So the percentage change was the same but the dollar change was different.  I suppose this presumes that bad news affects the percentage drop in the same way that good news affects a percentage gain, if bad news makes the stock drop less (all other things being equal) than 50% here then it might not be the case.  Does this mean that losing in the stock market is far more destructive to your portfolio than winning and that you should not lose at all costs?


I'd like to include some figures in my LaTeX document just like every other figure but don't have exactly these figures included in the list of figures. Since I couldn't find a solution I have to ask you, is there a way?


Hi,  I am getting "Structs cannot contain explicit parameterless constructor" error during build but i am able to compile the program with errors.  struct Program {     string Name;     string Degree;     string Dpthead;     //Constructor     public Program ()     {        Console.WriteLine("Enter the Program's Name: ");        Name = Console.ReadLine();        Console.WriteLine("Enter the Program's Degree Name: ");        Degree = Console.ReadLine();        Console.WriteLine("Enter the Head of Program : ");        Dpthead = Console.ReadLine();      }      public void PrintUProgramDetails()      {         Console.WriteLine("Program Name: {0} from {1}. Enrolled in {2} degree(s)", Name, Degree, Dpthead);      }  }   What are the possible ways to correct this error? Any help or guidance.


How to Check If A Plugin Is Enabled Through API?

How to find out if a particular plugin is enabled in a sub-blog in a multisite blog?


Ubuntu 12.04 EOL appears in motd after release upgrade to 14.04

I just performed a do-release-upgrade to bring a server from 12.04 to 14.04. The server rebooted at the end of the upgrade. However, when I log in, I am greeted by a contradictory MotD:     Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-117-generic x86_64)         Documentation:           New release '16.04.2 LTS' available.   Run 'do-release-upgrade' to upgrade to it.      This Ubuntu 12.04 LTS system is past its End of Life, and is no longer   receiving security updates.  To protect the integrity of this system, it’s   critical that you enable Extended Security Maintenance updates:    *    /var/lib/ubuntu-release-upgrader/release-upgrade-available only contains the 16.04.2 message (referenced in related question )  I deleted /run/motd.dynamic so that it would regenerate, but this message has more lives than The Doctor and it must be coming from somewhere else that was not cleaned up in the release upgrade process.


How to weld together a cube with a cylinder

I am working on modeling a Turkish mosque and having difficulties modeling this 'merging' of its tower as shown in the picture below:  Here, the cubic shape below the tower merges with the cylinder of the tower, with its middle part shrinking its width and turning into a cylinder as it goes up. I am trying to model the same in blender, however I don't know how to approach modeling this one. As an initial approach, I made a rough model of the below cubic part and upper cylinder part. I left the middle empty as I don't know how to model that connector part. I thought of selecting all the edges that interface each other and tried simply connecting them by pressing F key. But it only ended up creating two faces one below the cylinder and one above the cubic shape. How should I approach this problem?  Note: I have a blender version 2.83


Why must entangled particles communicate their spin instantaneously?

I'm a complete newbie to Quantum Theory, but I want to know more, so I've been watching few YouTube videos (an example below).     All videos I've watched explain, that when an entangled particle has its spin measured, it will instantaneously communicate its measurement with its entangled partner, so that when it too is measured in the same direction, it will have the opposite spin.   Often these videos explain why these particles must be communicating with each other, rather than containing "hidden information" (Bell's theorem), but do not delve into why it must be instant.


Check which IPs or web-sites an app is communicating with?

Usually they do it behind the scenes. So I'd love to know where apps are actually sending data and from whom they are actually getting responses.


Why does this string with a pointer return a random set of symbols?

For a class I am writing a snippet of code to take a pointer that points to a string, reverse it, and set it to another string pointer. I get the code running fine and it reverses the string well. The problem occurs when I try to print the value of the reversed pointer. Here is the code:  char * reverse (char *dest, char *src) {   int length=0;   char c;    while(*src != '\0')   {     src++;     length++;   }   for(int a = 0; a<length; a++){     c=(*--src);     //Print out the value of c     printf("Before dest: %c\n", c);     *dest= c;     //Print out the value of *dest     printf("-After dest: %c\n", *dest);     dest++;   }   printf("Input was: %s\n", src);   printf("Output should be: %s\n",dest);   return dest; }   And here is what it returns with input being "hello" and a pointer that points to a blank array of chars.  Before dest: o -After dest: o Before dest: l -After dest: l Before dest: l -After dest: l Before dest: e -After dest: e Before dest: H -After dest: H Input was: Hello Output should be: ù.█ Reverse ù.█   Before and after dest lines are there for debugging. The reverse line is what is returned from the function The output is different every time. I am completely dumbfounded and my professors say that this should be correct. Any help is appreciated


"Error: invalid signature" on Windows after attempting to delete Ubuntu partition and GRUB - how can I restore Windows' boot loader?

Can anyone help me access Windows again?  I have Windows 10 and Ubuntu running on my machine, with GRUB as the bootloader. I wanted to disable GRUB and remove my Linux partition. Following some online tutorial, I restarted Windows in Command Prompt mode. As a result of what I did there, GRUB doesn't recognise the Windows partition any more and throws an "invalid signature" error. Ubuntu still loads with no issue.  Any clue what's happening? How can I get back to using Windows?  Please consider that   My objective is still to remove GRUB and Ubuntu, so restoring the Windows bootloader would be enough for me I'm probably not as techy as most Linux users... please keep it simple! :)   Thanks a lot for any tip!!


Chat arrangement question: Left or right?

I'm building a small chat. Now I see but in other chats (whatsapp, facebook mobile chat, sms ...) that the arrangement is always the same:  Left: the chat partner. right: myself      Why is that?


I'm trying to change the message users see after creating an account. It currently says:  Thank you for applying for an account. Your account is currently pending approval by the site administrator. In the meantime, a welcome message with further instructions has been sent to your e-mail address.  What's the best way of changing this? Would the String Overrides module help? A Rule, perhaps?  Many thanks.


I am currently installing Ubuntu and I'm using the web-browser the Ubuntu installer has (luckily). I am stuck with the error "ubuntu systemd-resolved[2309]: Server returned error XDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP." Please help, I've been stuck here for I think about 2 hours. (I just got Ubuntu so I don't have any clue what to do...)


A function $f : [a,b] \to [a,b]$ is continuous for all $x \in [a,b].$ Prove that there exists a $c\in [a,b]$ such that $f(c) = c.$


Obtaining marginal distributions from the bivariate normal

Let $(X, Y)$ have a normal distribution with mean $(\mu_X, \mu_Y)$, variance $(\sigma_X^2, \sigma_Y^2)$ and correlation $\rho$. I want to know the corresponding marginal densities.  All I found so far was the well-known density expressions for $X\sim N(\mu_X, \sigma_X^2)$ and $Y\sim N(\mu_Y, \sigma_Y^2)$, but isn't that just for $X \perp Y$? Shouldn't $\rho$ appear in the expressions? How do I calculate the marginals of any $X$ and $Y$? I think using the definition will end up in an integral that cannot be solved analytically…


Is it necessary to put a comma before 'so' here?

I've learned that commas must be put before and, but, so, ect. However, I came across this sentence in a reading test.      Exercise causes blood vessels to open up so blood flows more easily.   Why is there no comma before so? Must I put it there?


Ignoring SSL exception in Jmeter UI Recording

I have to perform a load test on a env whose URL can be accessed as   When I access the URL from browser everything looks fine. However when I proxy it to use for Jmeter recording, I am getting error as below  javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure     at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)     at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)     at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2023)     at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1125)     at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)     at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)     at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)     at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:436)     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)     at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)     at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.open(MeasuringConnectionManager.java:107)     at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)     at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:517)     at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:331)     at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)     at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1146)     at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:240)   I understand the env did not have the proper SSL setup needed. I tried some solutions suggested on how to bypass the SSL setup for recording but I haven't succeeded.   Any suggestions please


The Laplace transform of the first hitting time of Brownian motion

Let $B_t$ be the standard Brownian motion process, $a > 0$, and let $H_a = \inf \{ t : B_t > a \}$ be a stopping time. I want to show that the Laplace transform of $H_a$ is $$\mathbb{E}[\exp(-\lambda H_a)] = \exp (-\sqrt{2\lambda} H_a)$$ by considering the martingale $$M_t = \exp \left(\theta B_t -\frac{1}{2}\theta^2 t\right)$$  There's an obvious argument to follow here: assuming the optional stopping theorem applies, we have $$1 = \mathbb{E}[M_{H_a}] = \mathbb{E} \left[ \exp \left(\theta a - \frac{1}{2}\theta^2 H_a\right) \right] = \exp(\sqrt{2\lambda} a) \mathbb{E} \left[ \exp(-\lambda H_a) \right]$$ where $\theta = \sqrt{2\lambda}$. This is exactly what we wished to show. However, as far as I can tell, the hypotheses of the optional stopping theorem are not satisfied here. Here is the statement I have:     If $(X_n)$ is a martingale and $T$ is an a.s. bounded stopping time, then $\mathbb{E}[X_T] = \mathbb{E}[X_0]$.   I think not all is lost yet. $M_t > 0$ for all $t$, so the martingale convergence theorem applies, and $M_t \to M_\infty$ a.s. for some integrable random variable $M_\infty$. For each $t$, $H_a \wedge t = \min \{ H_a, t \}$ is a bounded stopping time, so certainly $\mathbb{E}[M_{H_a \wedge t}] = \mathbb{E}[M_0]$. But, $$\mathbb{E}[M_{H_a \wedge t}] = \mathbb{E}[M_{H_a} \mathbf{1}_{\{H_a \le t\}}] + \mathbb{E}[M_t \mathbf{1}_{\{H_a > t\}}]$$ and clearly what one wants to do is to take $t \to \infty$ on both sides. But here's where I get stuck: I'm sure I need a convergence theorem here in order to conclude that the equation remains valid in the limit.   Now, $0 < M_{H_a} = \exp \left(\theta a - \frac{1}{2} \theta^2 H_a \right) \le \exp(\theta a)$, so the dominated convergence theorem applies, and so $$\lim_{t \to \infty} \mathbb{E}[M_{H_a} \mathbf{1}_{\{H_a \le t\}}] = \mathbb{E}[M_{H_a} \mathbf{1}_{\{H_a < \infty\}}]$$ and I believe Fatou's lemma gives me that $$\liminf_{t \to \infty} \mathbb{E}[M_t \mathbf{1}_{\{H_a > t\}}] \ge \mathbb{E}[M_{\infty} \mathbf{1}_{\{H_a = \infty\}}]$$ but I think what I need is the equality $$\lim_{t \to \infty} \mathbb{E}[M_t \mathbf{1}_{\{H_a > t\}}] = \mathbb{E}[M_\infty \mathbf{1}_{\{H_a = \infty\}}]$$ and as far as I can tell neither the monotone convergence theorem nor the dominated convergence theorem applies here. Is there anything I can do to rescue this line of thought?


How do I selectively install a package from a ppa?

There is an updated package (coreutils) in a PPA that I am interested in installing on my server.  I added the PPA with:  sudo add-apt-repository ppa:dns/gnu   In addition to coreutils, this PPA has a number other packages that I may not want to install.  Is there a way to configure apt such that only coreutils will get updated from this PPA?  Ubuntu 13.04 if that matters.  Thanks.


We have three particles at the vertices of equilateral triangle of side $d$. At $t=0$ they start moving in such away that at all instant of time each of them has a speed $v$ towards adjacent one. We have to find the time after which they will collide. I know that you can solve this by calculating from reference frame of any one particle, but I want a way to solve this by calculating the total distance traveled first in ground frame and then dividing by speed.


NAT to two different servers on the same port via hostname with Mikrotik RB2011

I have a Mikrotik RB2011 router, running RouterOS which connects to the internet via a static IP. In my lan I have two different servers, one that is on IP 192.168.89.11 and another on 192.168.89.12  My DNS (on cloudflare) resolves both myfirstserver.com and mysecondserver.com to my router's static IP.  Now, what I want to do is to somehow separate the traffic so all traffic for myfirstserver.com goes to 192.168.89.11 and traffic for mysecondserver.com goes to 192.168.89.12 (and both on port 80. I know I could just change ports but if these are servers publicly available, no user would set a different port than 80)  What I have tried so far, is to somehow mark the packets through mangle and then use that mark on NAT to do the proper dst-nat forward.  I try marking packets through either content or Layer 7 protocol regex (they work properly if the action is log. I can see them being logged correctly).  The thing is that after I mark them, it seems that NAT just ignores them and forwards the connection to the server that accepts the non-marked packets.  I think I have mixed up the order of filtering and the chains somehow.  Would someone be able to provide some pointers/assistance on how to accomplish this?  Thanks!  EDIT: My question is very specific, about marking packets in RouterOS on a Mikrotik router and checking the mark in NAT. it is not about whether i need a reverse proxy or whatever. Thanks  EDIT 2: @Cha0s asked my /ip firewall export so here it is:  /ip firewall layer7-protocol add name=haf1a regexp=haf1a  /ip firewall address-list add address=192.168.89.0/24 list=local add address=192.168.88.0/24 list=local add address=www.xxx.yyy.zzz list=local add address=192.168.87.0/24 list=local  /ip firewall filter add chain=input comment="default configuration" protocol=icmp add chain=input comment="default configuration" connection-state=established add chain=input comment="default configuration" connection-state=related add action=drop chain=virus comment="Drop 80 DoS attack" src-address-list=spammer add action=add-src-to-address-list address-list=spammer address-list-timeout=1d chain=input connection-limit=10,32 dst-address-list=!local dst-port=53 protocol=udp add action=drop chain=input dst-port=53 protocol=udp src-address-list=!local add action=add-src-to-address-list address-list=spammer address-list-timeout=1d chain=input connection-limit=30,32 protocol=tcp /ip firewall mangle add action=change-mss chain=forward new-mss=1422 out-interface=all-ppp protocol=tcp tcp-flags=syn tcp-mss=1423-65535  /ip firewall nat add action=masquerade chain=srcnat comment="default configuration" out-interface=ether1-gateway add action=masquerade chain=srcnat out-interface=pppoe-out1 add action=dst-nat chain=dstnat comment="No HAF mark" dst-address=www.xxx.yyy.zzz dst-port=80 packet-mark=!haf1 port="" protocol=tcp src-port="" to-addresses=192.168.89.41 to-ports=80 add action=dst-nat chain=dstnat comment="HAF mark" dst-address=www.xxx.yyy.zzz dst-port=80 packet-mark=haf1 port="" protocol=tcp src-port="" to-addresses=192.168.89.31 to-ports=80   where www.xxx.yyy.zzz is my external ip (static) and 192.168.89.31 and 192.168.89.41 my two servers inside my local network  My goal is to redirect any connections with haf1a in them (eg haf1a.lala.com) to the relevant server (192.168.89.31)


Selenium test throws NullPointerException on login POM

Hi I'm trying to create a simple automation script in POM, but getting java.lang.NullPointerException during execution of the script.Pls any one help me to resolve the issue.  By creating a Browser Factory, return the WebDriver.  package Com.selenium.utils; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class BrowserFactory {                 public static WebDriver BrowserStart(WebDriver driver,String browsername, String url) {          if(browsername.equalsIgnoreCase("Chrome")) {             System.setProperty("webdriver.chrome.driver", "E:\\Eclipse-Java-Kepler\\New folder\\chromedriver\\chromedriver.exe");             driver = new ChromeDriver();         }         else if(browsername.equalsIgnoreCase("Firefox")){         //  System.setProperty("", "");          }                else if(browsername.equalsIgnoreCase("IE")) {         //  System.setProperty("", "");                  }          else {                       System.out.print("Browser is not supported");         }          driver.get(url);         driver.manage().window().maximize();         return driver;       }  }   Below codes are for Base Class  package Com.selenium.pages; import org.openqa.selenium.WebDriver; import Com.selenium.utils.BrowserFactory;  public class BaseClass implements IClass {       public WebDriver WD;     public WebDriver Setup() {                       return BrowserFactory.BrowserStart(WD, "chrome", "https://www.udemy.com/");          } }   Then I created a class, which will contain all the WebElements & methods for perform any action on that page  import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.How; import org.openqa.selenium.support.PageFactory;  public class LandingClass {      public WebDriver WD = null;      public LandingClass(WebDriver driver) {         this.WD = driver;         PageFactory.initElements(driver, this);     }      @FindBy(xpath=".//button[@class='btn btn-quaternary']")       public WebElement LoginButton;       public void Openlgin() {          LoginButton.click();         }   }   Finally I create a TestNG class to run the test case, but getting "NullPointerException" during execution of the test case  package Com.selenium.tests;  import org.testng.annotations.BeforeTest; import org.testng.annotations.Test;  import Com.selenium.pages.BaseClass; import Com.selenium.pages.LandingClass;  public class LoginScenarios extends BaseClass {     LandingClass LC;     @BeforeTest     public void setup() {         super.Setup();         LC = new LandingClass(WD);      }   @Test(priority = 0)   public void OpenLogin() {       try {         Thread.sleep(5000);     } catch (InterruptedException e) {         e.printStackTrace();     }     LC.Openlgin();   } }


Youtube-dl doesn't download the playlist

I'm trying to download    The download starts normally but then, only the specific video gets downloaded and not the whole playlist. I have downloaded entire playlist in the past but this is a particular playlist the Youtube-dl doesn't seem to download in its entirety.  I also tried -   youtube-dl -i $URL youtube-dl --yes-playlist $URL youtube-dl --playlist-start=1 --playlist-end= 35 $URL   What is the solution to this problem?


Why can’t other people join my Minecraft server?

I have made a Minecraft server that I host through my PC. Whenever my friends try to join, they either get this error or it doesn't stop loading. I have everything set up right in my router: I’m hosting from my PC, I have the right 25565 port.   Here is how I set it up: I went into Firewall>PortForwarding then did this:   Here is how I set up Advanced>PortForwarding:  SO I was hoping that when they entered that IP address, it would check to see if they were using TCP or UDP, then route them through that port and into my server. Instead, the loading never stops, or they get this error.  Failed to connect to server io.netty.channel.AbstractChannel$AnnotatedConnectException:  Connection timed out: no further information:    I had one of my friends take a look at it, and he said it seemed fine.   If there is something that I can try to do to fix it, please give me a detailed description on how to do it. I am awful at finding tutorials.


In bash, why is `SHELL=/bin/sh lesspipe"` gramatically correct?

On Ubuntu-like linux, the default .bashrc file contains a line:  [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"   Then why is SHELL=/bin/sh lesspipe grammatically correct? What page of man bash can I know the meaning of this statement? To me, this statement seems the same as, for example,   ls echo   , which is invalid. Also,   abc=hello echo $abc   makes no error but outputs null.  I couldn't find any relevant information in man bash though I tried some /<expression> search command on less. Could anyone please tell me the interpretations of the command?    Note: I've read the post "" but got nothing.


I wanted to have a simple python script to keep repeat typing certain words and send. like have an idle game and need leave it open and using skills. Is there any library can do it?


HTTP Status 500 -with description -The server encountered an internal error that prevented it from fulfilling this request

I am trying to implement listener program in which i get an HTTP status 500 Error once i submit with the index.html form page which redirect it to Servlet1 class.!  Mylistener.java  import javax.servlet.annotation.WebListener; import javax.servlet.*; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener;   @WebListener public class Mylistener implements HttpSessionListener {    static int total=0, current=0;   ServletContext ctx=null;     public void sessionCreated(HttpSessionEvent e)  {          total++;         current++;        ctx=e.getSession().getServletContext();        ctx.setAttribute("total users",total);        ctx.setAttribute("looged users",current);      }      /**      * @see HttpSessionListener#sessionDestroyed(HttpSessionEvent)      */     public void sessionDestroyed(HttpSessionEvent e)  {           current--;            ctx.setAttribute("currentusers",current);       }  }   ![enter image description here][1  Servlet1.java  import java.io.*; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.*; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession;   public class Servlet1 extends HttpServlet {        protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {         res.setContentType("Text/html");         PrintWriter out=res.getWriter();         String n= req.getParameter("nname");         System.out.println("Welcome"+n);         HttpSession session=req.getSession();           session.setAttribute("uname",n);           ServletContext ctx= getServletContext();         int i=(Integer)ctx.getAttribute("total");         int c=(Integer)ctx.getAttribute("current");         out.println("total users"+i);         out.println("Current users"+c);           out.close();     }  }   index.html  <!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> <form action="servlet1" method="post"> Enter your name <input type="text" name="nname"><br> Enter your password : <input type="password" name="npass"> <input type="submit" value="submit"> </form>  </body> </html>   web.xml  <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5"      xmlns="http://java.sun.com/xml/ns/javaee"      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee      http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">    <listener>   <listener-class>Mylistener</listener-class>   </listener>    <servlet>      <servlet-name>First</servlet-name>     <servlet-class>Servlet1</servlet-class>   </servlet>     <servlet-mapping>     <servlet-name>First</servlet-name>     <url-pattern>/servlet1</url-pattern>   </servlet-mapping>   </web-app>     ]  Error:  HTTP Status 500 -    type Exception report  message   description The server encountered an internal error that prevented it from fulfilling this request.  exception  java.lang.NullPointerException     Servlet1.doPost(Servlet1.java:25)     javax.servlet.http.HttpServlet.service(HttpServlet.java:646)     javax.servlet.http.HttpServlet.service(HttpServlet.java:727)     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)   note The full stack trace of the root cause is available in the Apache Tomcat/7.0.59 logs.


How do I bypass the authentication to set another password?

I have an administrative accout with no password yet it still asks for authentication and  it won't except my old password or "user". What should I do?


Prove that field of complex numbers cannot be equipped with an order relation

Please guide me in this problem. I am confused about whether its asking that having the relation $z>0$ does not satisfy the order axioms.  Any help would be really appreciated.  Thanks!


I'm trying to set up OpenVPN to listen on port 443, and then pass all HTTPS traffic to Apache, by using the port-share option. Relevant config snippets are: OpenVPN local ${PUBLIC_IP} port 443 port-share localhost 443  Apache with SSL Listen localhost:443  My OpenVPN client connects just fine, but when opening the HTTPS enabled page, I get errors. Firefox says:  SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long)  Curl says  curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol  The request ends up on Apache, since I see in the error logs the following messages: [Wed Oct 06 01:10:20 2010] [error] [client 127.0.0.1] Invalid method in request \x16\x03\x01 [Wed Oct 06 01:11:04 2010] [error] [client 127.0.0.1] Invalid method in request \x16\x03\x01 [Wed Oct 06 01:11:51 2010] [error] [client 127.0.0.1] Invalid method in request \x16\x03\x01  The messages entry for a HTTPS connection is Oct  6 01:13:21 ns1 openvpn[20154]: Re-using SSL/TLS context Oct  6 01:13:21 ns1 openvpn[20154]: LZO compression initialized Oct  6 01:13:21 ns1 openvpn[20154]: Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ] Oct  6 01:13:21 ns1 openvpn[20154]: Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ] Oct  6 01:13:21 ns1 openvpn[20154]: Local Options hash (VER=V4): 'c0103fa8' Oct  6 01:13:21 ns1 openvpn[20154]: Expected Remote Options hash (VER=V4): '69109d17' Oct  6 01:13:21 ns1 openvpn[20154]: TCP connection established with ${CLIENT_IP}:56203 Oct  6 01:13:21 ns1 openvpn[20154]: TCPv4_SERVER link local: [undef] Oct  6 01:13:21 ns1 openvpn[20154]: TCPv4_SERVER link remote: ${CLIENT_IP}:56203 Oct  6 01:13:21 ns1 openvpn[20154]: ${CLIENT_IP}:56203 Non-OpenVPN client protocol detected Oct  6 01:13:21 ns1 openvpn[20154]: TCP/UDP: Closing socket  Using httpd-2.2.3-43.el5.centos and openvpn-2.1.1-2.el5 . What should I do to make port sharing work?  Update: Using port 443 port-share localhost 10443  and Listen localhost:10443  makes no difference.  Update 2 : some command output [root@ns1 ~]# openvpn --help | grep port-share --port-share host port : When run in TCP mode, proxy incoming HTTPS sessions [root@ns1 ~]# netstat -nltp | grep 443 tcp        0      0 127.0.0.1:10443             0.0.0.0:*                   LISTEN      20088/httpd          tcp        0      0 ${PUBLIC_IP}:443             0.0.0.0:*                   LISTEN      20066/openvpn


$R$-module $M$ which is artinian, but not noetherian

As I' m currently dealing with artinian and noetherian modules, I' m asking myself whether there is an artinian module which is not noetherian.   I think so, but even after I thought a lot about this, I didn't find an example. Does anybody find one?


Is there a Stack Exchange site for questions about finding data?

As the question states, I want to find data about a particular project and I am wondering what the right place is to ask people how they go about searching for it. Would Stack Overflow be it?


Why is "a couple of " often shortened to "a couple "?

I would write a couple of . I often read/hear a couple .  I assumed this was an American English thing (I'm British), and just a convenient shortening of the phrase for speaking. It's easier to say a couple minutes vs a couple of minutes.  On a side note, this doesn't seem to restrict the number of things to two, but just a small amount–less than a few, in my mind.


Thresh's basic attacks are technically ranged since it works with runaan's hurricane. So does that mean that Yasuo wind wall can block.


How to understand python list references

I'm having trouble understanding how python pointers/ references work.  Take for example,  my_list = [1,2,3,4] A = [my_list]*3 print("Before the change", A) my_list[2]=45 print("After the change ", A)   The code will print "After the change [[1, 2, 45, 4], [1, 2, 45, 4], [1, 2, 45, 4]]"  However, if I do my_list = [10,20,30,40], A will not change even though, as I understand it, A points to the reference of my_list. What is actually happening? Is A pointing to the object [1,2,3,4] or to the variable my_list?   Note: I use pointer and reference to mean the same thing(Please tell me if it doesn't...)


Insert data between 30 minute time intervals

I want to divided my to my time interval depending to the start time and end time. To explain it further, let me have this example. I have this table:  User           Elapsed Time        Start Time            End Time User01         01:05               07-02-2015 08:45      07-02-2015 09:50   I want to divide its elapsed time to 30 minute time interval so that i will have an output like this.  Interval From        Interval To         User       Elapsed Time 07-02-2015 08:30     07-02-2015 09:00    User01     00:15 07-02-2015 09:00     07-02-2015 09:30    User01     00:30 07-02-2015 09:30     07-02-2015 10:00    User01     00:20   Thanks in advance


"Good luck at...." or "Good luck with..."?

Which one is correct and why?  "Good luck at your new job" or "Good luck with your new job"?


Why does my custom bash prompt glitch when browsing the history

I have set up a custom bash prompt so I can see stuff like the current git branch, npm package version info, the virtual env I'm in, etc. However, when i press the up arrow key to browse the history, the prompt glitches:  Here's what it is normally:    However, when I browse the history, the space between the lambda sign and the command disappears:    It only happens sometimes, and I don't know why. I guess I'm just being picky about a small space, but after spending a lot of time configuring my bash prompt I want it to look perfect.   This is what my .bashrc looks like. I'm using Git Bash for Windows, btw, if that makes a difference:  bashPrompt() { SYMBOL="λ"  COUNT=(`find ./ -maxdepth 1 -name "package.json"`)  if [ ${#COUNT[@]} -gt 0 ]; then     NPM_PACKAGE_INFO="($(node -p -e "require('./package.json').version"))" else     NPM_PACKAGE_INFO="" fi  if [ ! -z "$CONDA_DEFAULT_ENV" ]; then     ENV=" ($CONDA_DEFAULT_ENV)" else     ENV="" fi  if [ -d .git ]; then     if [ -z "$(git status --porcelain)" ]; then          echo "[\[\e[0;36;40m\u@\H\]\[\e[0;37;40m]\]\[\e[1;34;40m${ENV}\] \[\e[1;31;40m\w\]\[\e[1;32;40m$(__git_ps1)\] \[\e[0;37;40m${NPM_PACKAGE_INFO}\]\n\[\e[0;37;40m${SYMBOL}\] "     else          echo "[\[\e[0;36;40m\u@\H\]\[\e[0;37;40m]\]\[\e[1;34;40m${ENV}\] \[\e[1;31;40m\w\]\[\e[1;33;40m$(__git_ps1)\] \[\e[0;37;40m${NPM_PACKAGE_INFO}\]\n\[\e[0;37;40m${SYMBOL}\] "     fi else     echo "[\[\e[0;36;40m\u@\H\]\[\e[0;37;40m]\]\[\e[1;34;40m${ENV}\] \[\e[1;31;40m\w\] \[\e[0;37;40m${NPM_PACKAGE_INFO}\]\n\[\e[0;37;40m${SYMBOL}\] " fi;   }  PROMPT_COMMAND='PS1="$(bashPrompt)"'


I have been following   I have a dedicated server and in case I have to restore the whole server on a new machine, I'm practicing using a virtual machine in vmware.  I've managed to restore all the files by doing an untar of the backup. However I can't get apache to start:   could not reliably determine the server's fully qualified domain name using 127.0.1.1 for servername   and   The Apache error log may have more information   The problem is that there are no logs since I've excluded them from the backup.   Do I need to first install Apache and then untar the backup ?   Is this the proper way to restore the server ? I have some doubts because things like ip address and host name would be different if I create a new dedicated server, so there is potentially a significant number of files that would need to be updated. Is there a recommended way to do that?


How do you tell when a noodle is done cooking? I have tried throwing it at the ceiling but I don't know if that works can someone please help me find out.


Is it possible to clone a machine by "restoring" the backup of the existing machine to the new machine?

I am wondering if the following is possible and exactly how I should go about it:   I have machine 'A' (dual core i5 2.3 GHz) with Ubuntu 12.04LTS installed and configured just the way I like it.  I use a network drive to backup machine 'A' (using the ubuntu backup tool). I also have a machine 'B' (quad core i5 3.2 GHz). I am thinking of doing a fresh install of Ubuntu 12.04LTS on machine 'B', and then using the backup utility on machine 'B' to restore the backups of machine 'A' on to 'B', thereby cloning machine 'A' on machine 'B'.   Is such a thing doable? Is there a cleaner and/or safer way for me to clone 'A' on 'B'?  Thanks in advance


How does the number of photons hitting relate to the amplitude of a photon bundle/classical wave?

I understand how the energy of an individual photon is $hf$ and how the number of electrons emitted in the photo-electric effect is proportional to the number of photons hitting per unit area.   Hence, my question is that how does this number of photons hitting/passing through relate to the classical amplitude of the electric/magnetic fields of the emergent phenomenon of multiple photons that is the classical light wave/collection of waves.   Any brief overview without incorporating complex Quantum Electrodynamics would be sufficient as I’m seeking for the results of those equations and not necessarily the whole process.


Hochschild cohomology of a formal quantization of an associative algebra

Let $A$ be a commutative associative $k$-algebra and let $A[[\hbar]]$ be the formal deformation of $A$.  I would like to know if there is a relation between the Hochschild co-homologies $HH^{\bullet}(A,A)$ and $HH^{\bullet}(A[[\hbar]],A[[\hbar]])$, respectively. In particular, is it true that $HH^{\bullet}(A[[\hbar]],A[[\hbar]])=HH^{\bullet}(A,A)[[\hbar]]$?


Regular upgrade gives unmet dependency error

Was doing regular update via Ubuntu software got unmet dependency error for Python 3.5.  Tried apt-get upgrade got the error below.   What next?  $ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done E: The package python3.5 needs to be reinstalled, but I can't find an archive for it.  $ apt-cache policy python 3 python 3.5 python:   Installed: 2.7.11-1   Candidate: 2.7.11-1   Version table:  *** 2.7.11-1 100         100 /var/lib/dpkg/status python:   Installed: 2.7.11-1   Candidate: 2.7.11-1   Version table:  *** 2.7.11-1 100         100 /var/lib/dpkg/status python3.5-cups:   Installed: (none)   Candidate: (none)   Version table: python3.5-reportlab-accel:   Installed: (none)   Candidate: (none)   Version table: python3.5-venv:   Installed: (none)   Candidate: (none)   Version table: libpython3.5:   Installed: 3.5.2-2ubuntu0~16.04.3   Candidate: 3.5.2-2ubuntu0~16.04.3   Version table:  *** 3.5.2-2ubuntu0~16.04.3 100         100 /var/lib/dpkg/status python3.5:   Installed: 3.5.2-2ubuntu0~16.04.1   Candidate: 3.5.2-2ubuntu0~16.04.1   Version table:  *** 3.5.2-2ubuntu0~16.04.1 100         100 /var/lib/dpkg/status python3.5-minimal:   Installed: 3.5.2-2ubuntu0~16.04.1   Candidate: 3.5.2-2ubuntu0~16.04.1   Version table:  *** 3.5.2-2ubuntu0~16.04.1 100         100 /var/lib/dpkg/status python3.5-apt:   Installed: (none)   Candidate: (none)   Version table: python3.5-renderpm:   Installed: (none)   Candidate: (none)   Version table: python3.5-doc:   Installed: (none)   Candidate: (none)   Version table: python3.5-dbus:   Installed: (none)   Candidate: (none)   Version table: python3.5-lxml:   Installed: (none)   Candidate: (none)   Version table: python3.5-gdbm:   Installed: (none)   Candidate: (none)   Version table: libpython3.5-stdlib:   Installed: 3.5.2-2ubuntu0~16.04.1   Candidate: 3.5.2-2ubuntu0~16.04.1   Version table:  *** 3.5.2-2ubuntu0~16.04.1 100         100 /var/lib/dpkg/status libreoffice-l10n-3.5:   Installed: (none)   Candidate: (none)   Version table: libpython3.5-minimal:   Installed: 3.5.2-2ubuntu0~16.04.1   Candidate: 3.5.2-2ubuntu0~16.04.1   Version table:  *** 3.5.2-2ubuntu0~16.04.1 100         100 /var/lib/dpkg/status libmwaw-0.3-3v5:   Installed: (none)   Candidate: (none)   Version table: povray-3.5:   Installed: (none)   Candidate: (none)   Version table: N: Unable to locate package 3


How to draw red wavy line under words in RichTextBox c# winform as normally seen in spelling errors( as in MS Word)? I don't want to use underline feature of RichTextBox


Can someone explain how an intereface can be forced to be implemented as private or public. Usually when I define an interface, every method/property are public. In the example, using "IEnumerable" produce a public method "GetEnumerator()" but using the interface "IEnumerable" the method "IEnumerable.GetEnumerator()" is private by default.  public class customEnumerable<T> : IEnumerable<T>, IEnumerable {      public IEnumerator<T> GetEnumerator()     {         throw new NotImplementedException();     }      IEnumerator System.Collections.IEnumerable.GetEnumerator()     {         throw new NotImplementedException();     } }   Thanks!


Prove that the (recursive) sum of the digits of any number multiplied by 9 is 9


Repro:  Logout from all Stack Exchange accounts, open:    After login, I got the Stack Exchange home page instead of careers.stackoverflow.com.


Get Persian texts from database with PHP

I have problem get data from database. Persian words appear as question marks like ???????. How can I avoid this?  Here is my code:  header('Content-Type: text/html; charset=utf-8'); $conn = mysqli_connect("localhost", "somevalue", "somevalue", "somevalue"); $output = array(); $query  = "SELECT * FROM af_home ORDER BY home_id DESC LIMIT 50"; $result = mysqli_query($conn, $query); if (mysqli_num_rows($result) > 0) {     while ($row = mysqli_fetch_array($result)) {         $output[] = $row;     }     echo json_encode($output); }


What game asks "who is most likely to..."?

There is a board game popular amongst students at my university back in the mid 90's that I am trying to identify.  What I remember (or think I remember) about it is that there was a stack of cards asking questions about "who is most likely to" do a certain thing.  Everyone then voted who amongst the game players is "most likely" to do what was on the card.  Everyone has some sort of token they use to select someone else in the game.  Once everyone has voted they reveal their picks.  I think if you voted along with the majority you got to move your token forwards on the board.


I think I've been hacked, what can I do?

I have recently installed Ubuntu 15.xx and I belive my machine has been hacked.  My computer's name has been changed to imatransvestite, and although I can still change passwords, I cannot use sudo without this error: sudo: unable to resolve host imatransvestite  What can I do to fix tis, and what should I do?


$ \lim_{n\to \infty} ( \lim_{x\to0} (1+\tan^2(x)+\tan^2(2x)+ \cdots + \tan^2(nx)))^{\frac{1}{n^3x^2}} $  The answer should be $ {e}^\frac{1}{3} $  I haven't encountered problems like this before and I'm pretty confused, thank you.  I guess we must use the remarkable limit of $ \frac{\tan(x)}{x} $ when $ x $ approaches $ 0 $ by dividing and then multiplaying with $x$.


Log full and an Active_transaction on database

I have limited access to this server eg I cannot SELECT * FROM sys.dm_tran_session_transactions for example  I, perhaps foolishly, ran this query to insert some test data...  begin transaction  update aqt_tblquote  set intVisits = ABS(CHECKSUM(NewId())) % 10  select top 100 intVisits FROM aqt_tblquote  rollback transaction   This sat about for a while and then informed me the log was full. From my experience this is not good news!  I was hoping that given it is in a ROLLBACK that it would just return the table to its previous state and clear the log.  However if I select from sys.databases I get log_reuse_wait_desc = 'ACTIVE_TRANSACTION'  I've closed Management Studio but that didn't do it. How can I kill it? Or do I need to contact the virtually unobtainable DBAs? (I work in a large organisation where there are many layers of bureaucracy to cut through).


How to distinguish 'month' and 'months' in pronunciation?

How to pronounce the two and distinguish them in pronunciation as I almost hear them the same.


How do I remove the warning before deleting a shortcut?

How do I remove the warning before deleting a shortcut in Windows?  Every time I want to delete a shortcut it warns me that I'm not actually deleting the program, just a shortcut.


What does "times" mean in the newspaper "Washington Times"?

What does “times” mean in the newspaper “Washington Times”?  I have always wanted to ask about this, but feared it might be so obvious that I would look like a fool. For that many times, I haven't before experienced that level of hesitation with any other question, but I think now is the right time to ask, anyway.


I would like to provide a horizontal scroll to a textarea in my HTML page. The scroll should appear without wrapping, if I type a long line without a line break. A few friends suggested using overflow-y CSS attribute, which did not work for me. The browsers that I use are IE 6+ and Mozilla 3+.


"I love bike riders." v. "I love the bike riders" Does this sentence need an article?

I love bike riders.   Does this sentence need an article? If it doesn't, why? I'm confused because for generalization we need The. However I feel like in this particular sentence The can't be used.


The files are "ready to download" or "ready to be downloaded"?

Both ways seem to be used quite interchangeably even though the first one doesn't seem grammatical to me (English is, however, my second language so I could be miles off here). What do you think?


Tense when recounting and analysing a literary text

Should I write the substance of a poem In past tense or in present tense?  Here are a few lines of the poem owl:  Downhill I came, hungry, and yet not starved;  Cold, yet had heat within me that was proof  Against the North wind; tired, yet so that rest  Had seemed the sweetest thing under a roof.  Here's the link Vintage Poetry:   Here's the substance written by me: Should I use past tense or Present tense?   The poet comes/came down a hill. He is/was hungry, tired and feeling cold. But he is/was not really starving. He could/can still relish a shelter under a roof, and have/had sufficient warmth within him to resist the cold wind. He gets/got food, fire and rest in an inn. He is/was protected from the darkness and cold that prevailed outside the inn. But he cannot/could not avoid hearing the sad note of an owl coming distinctly from a hill. The cry of the owl seems/seemed to remind him of those soldiers and poor people who have/had not been able to get food and shelter. So, although he gets/got food and rest, he cannot/could not enjoy himself.   I think past and present both tenses can be used but present tense is better. What do you think?  One more question, should I use past tense or present in answer to the following question?   Question: Describe the feelings of the poet on hearing the cry of the owl. Answer:- The owl's cry was/is sad and piercing. It makes/made the poet ponder over the plight of the homeless poor and the soldiers fighting at the front. They have/had to starve and spend the cold winter nights in the open, under the sky. The poet feels/felt sad for the misery of those people. The owl's cry picks/picked his conscience. He cannot/could not enjoy his food and rest?   The question is in my text book with the above answer that is written in past tense. But I think present tense can also be used. What do you think? Which tense would you prefer?  Can any teacher or anyone who knows the language well please answer this?


Who owns authorship when an employee makes a design for their employer?

Let's say Designer X worked full time for Company Y.  While there, Designer X built an illustration to explain how Company Y's product works.  Then, some years later after Designer X left Company Y, a third party requests permission to use said illustration in some educational material it plans to publish, and wishes to cite the author.  Who does the third party cite, Designer X or Company Y?


Prove using Natural Deduction in predicate logic $(\forall x\ P(x))\to Q ⊢ \exists x (P(x)\to Q)$

I couldn't find a proper answer. I am pretty sure the universal quantifier elimination rule can't be applied directly and I tried proving by contradiction, but couldn't complete it.


I have just ran lshw to get some information about  a machine I know nothing about, and I just wanted to confirm something.  Does this basically mean it is a dual core 64 bit processor that is installed?  *-logicalcpu:0     description: Logical CPU           physical id: 0.1               width: 64 bits               capabilities: logical        *-logicalcpu:1                 description: Logical CPU                physical id: 0.2                   width: 64 bits                capabilities: logical   Looking further down I see this    *-cpu:1       physical id: 1       bus info: cpu@1       version: 6.7.6       serial: 0001-0676-0000-0000-0000-0000       size: 3150MHz       capabilities: vmx ht       configuration: id=0     *-logicalcpu:0          description: Logical CPU          physical id: 0.1          capabilities: logical     *-logicalcpu:1          description: Logical CPU          physical id: 0.2          capabilities: logical   Which makes me almost certain it is dual core but not convinced on the 64 bit.  Any help for this n00b would be greatly appreciated!


Calculation of last $2$ digit and last $3$ digit in $\displaystyle 2011^{{2012}^{2013}}$.  $\bf{My\; Try}::$ for last $2$ digit:: which is same as when we divide $2011^{2012^{2013}}$ is divided by $100$  So $\displaystyle 2011^{2012^{2013}}\mod(100) = (11)^{2012^{2013}}\mod(100)$  Now how can i calculate after that  Help Required  Thanks


Why is there a depression in my render even though there is none in the wireframe?

I made a rough model of a 4-legged animal. I did it using a mirror modifier to mirror the left and right sides of the animal. In object mode, I right clicked on my animal and chose "Shade Smooth". Results: Wireframe mode:  Solid mode:  Why is there a discoloration in the center of the animal? Rendered mode:  So there is discoloration in solid mode because there is a ridge and depression in that area... But what is the cause of the ridge and depression? According to my wireframe, there is no depression in that area. The render is wrong. The head is supposed to be smooth.


Using cd command to navigate directories in Ubuntu which have special characters

When I want to navigate into directories having special characters in their names I get an error message.   For example:  aman@desktop:~/Aman$ cd !)e$!gn&(reate bash: !: event not found aman@desktop:~/Aman$    Here !)e$!gn&(reate is the directory name where I want to navigate.  How to rectify this error?  How to use cd command to navigate directories in Ubuntu having directory name with special characters?


Does local martingale have the same mean value as well?

We know that if $\{M_n\}$ is a martingale, we know from definition of martingale that $E(M_n) = M_0$ for all $n \geq 0$. However, if we only know that a sequence of random variables $\{X_n\}$ is a local martingale, do we still have the result that $$E(X_n) = X_0, \forall n\geq 0?$$  And why?


The formalism behind integration by substitution

When you are doing an integration by substitution you do the following working. $$\begin{align*} u&=f(x)\\ \Rightarrow\frac{du}{dx}&=f^{\prime}(x)\\ \Rightarrow du&=f^{\prime}(x)dx&(1)\\ \Rightarrow dx&=\frac{du}{f^{\prime}(x)}\\ \end{align*}$$     My question is: what on earth is going on at line $(1)$?!?   This has been bugging me for, like, forever! You see, when I was taught this in my undergrad I was told something along the lines of the following:  You just treat $\frac{du}{dx}$ like a fraction. Similarly, when you are doing the chain rule $\frac{dy}{dx}=\frac{dy}{dv}\times\frac{dv}{dx}$ you "cancel" the $dv$ terms. They are just like fractions. However, never, ever say this to a pure mathematician.  Now, I am a pure mathematician. And quite frankly I don't care if people think of these as fractions or not. I know that they are not fractions (but rather is the limit of the difference fractions as the difference tends to zero). But I figure I should start caring now...So, more precisely,     $\frac{du}{dx}$ has a meaning, but so far as I know $du$ and $dx$ do not have a meaning. Therefore, why can we treat $\frac{du}{dx}$ as a fraction when we are doing integration by substitution? What is actually going on at line $(1)$?


Kids with superpowers, antagonists with metallic eyes

I'm looking for a short YA series of books about a number of kids with superpowers. Each book focuses on one kid, who at the end meets the other surviving kids and joins them. They are all on the run from a race of supernatural beings, possibly aliens. The mood of the series was somewhat dark, and some of the kids may have died throughout the series.  The most memorable thing I remember was that the antagonists wear sunglasses hiding eyes that seem like dark metallic tunnels, but they otherwise look like normal people. The superpowered kids all had golden blood as well, if I remember correctly. Any ideas?


I've started learning Quantum Computing from the Qiskit Textbook and was able to easily understand or work out everything until it came to the working of   I can understand the procedure of it, but cannot understand why it works and was unable to work out the math of it. I also couldn't find any source that explained this is in a more simplistic manner.  Here's the procedure that I have copy-pasted from the textbook:     Step 1: Alice and Bob create an entangled pair of qubits and each one   of them holds on to one of the two qubits in the pair.      The pair they create is a special pair called a Bell pair. In quantum   circuit language, the way to create a Bell pair between two qubits is   to first transfer one of them to the Bell basis ( |+⟩  and  |−⟩ ) by   using a Hadamard gate, and then to apply a CNOT gate onto the other   qubit controlled by the one in the Bell basis.      Let's say Alice owns  q1  and Bob owns  q2  after they part ways.      Step 2: Alice applies a CNOT gate on  q1 , controlled by  |ψ⟩  (the   qubit she is trying to send Bob).      Step 3: Next, Alice applies a Hadamard gate to  |ψ⟩ , and applies a   measurement to both qubits that she owns -  q1  and  |ψ⟩ .      Step 4: Then, it's time for a phone call to Bob. She tells Bob the   outcome of her two qubit measurement. Depending on what she says, Bob   applies some gates to his qubit,  q2 . The gates to be applied, based   on what Alice says, are as follows :      00  →  Do nothing      01  →  Apply  X  gate      10  →  Apply  Z  gate      11  →  Apply  ZX  gate      Note that this transfer of information is classical.      And voila! At the end of this protocol, Alice's qubit has now   teleported to Bob.


Can a span within an H1 harm bot attempts to identify the text?

I am wondering if this structure can confuse search bots and prevent them from identifying the contents of the H1.  For example, in the code below, can the bot identify "Main Text" as the H1 content?
Main  Text


Conditional Trigonometric Identities on $A+B+C=π$.

If $A+B+C=\pi$ then prove that: $$\tan A\tan B+\tan B\tan C+\tan C \tan A=1+\sec A\sec B\sec C$$  My Approach:  Given, $$A+B+C=\pi$$ $$A+B=\pi-C$$ $$\sin(A+B)=\sin(\pi-C)=\sin C$$ $$\cos(A+B)=\cos(\pi-C)=-\cos C$$  Now,  $$\text{L.H.S.}=\tan A \tan B+\tan B\tan C+\tan C\tan A$$ $$=\frac {\sin A\sin B}{\cos A\cos B}+\frac {\sin B\sin C}{\cos B\cos C} + \frac {\sin C\sin A}{\cos C\cos A}$$  I got struck at here. Please help me to move on.


I was given a proof of this in class, but it does not make sense to me, can someone provide a better proof, or explain the one I have provided, thanks.  Suppose $\gcd(a,n) = 1$, where $a$ and $n$ are natural numbers. Prove that $0$, $a$, $2a$, $3a,\ldots, (n-1)a$, is complete residue system modulo $n$.  Proof given in class:  \begin{align*} ka &\equiv ra \pmod{n}\\ &\Rightarrow  k \equiv r \pmod{n}\\ &\Rightarrow  \text{$k-r$ divides $n$}\\ &\Rightarrow \text{$k=r$ because $0\leq k\lt n$, $0\leq r\lt n$} \end{align*}


Best method to prevent SQL injection in mysqli

I need some suggestions to prevent SQL injections. I've a mysqli query to fetch some names from database.  $con = mysqli_connect( "localhost","my_user","my_password","my_db" );  mysqli_query( $con, "SELECT names FROM my_table WHERE names LIKE '$names' AND DATE_FORMAT(DOB, '%d/%m/%Y') = '$date'" );   I want to prevent my query from SQL injection. I read some articles regarding SQL injections and saw that the following methods can be used to prevent SQL injection;   mysqli_real_escape_string Prepared Statements   But I am confused that which method is more secure. Or any other method is available which is more secure than above methods?  How can I implement this with my sample query?


Package for adding to start time to make an event "running sheet"?

I'd like to form a "running sheet" for an event that is likely to change, so I'd like LaTeX to keep track of the calculations for me if the programme changes.  I imagined storing a "start" time, having a counter "duration" set for each section, and using LaTeX to add these two so that the result is still a valid clock time for the start of the next section. This would continue for each element in sequence. For example, 2pm "start", 10 minute intro "duration", leads to a printed time for the next item of 2:10pm (the pm is not necessary). That way, if someone decides they can/cannot give a speech as part of the opening, we don't have the tedious business of changing all of the timings. I also don't want to have to manually ensure that the passing of 60 minutes actually increments the hour.  I've looked at datetime2 and some other packages, and it's not obvious how you would add to the stored date, but I admit that normally I use R for imposing some requirements on date formats. I'd prefer to not have to have an R script to do this and then import the text to a LaTeX doc. Any suggestions to create something like what I describe are welcome.


How is it possible for a user to start a bounty with low reputation?

In  question, the guy who started the bounty has only 36 reputation. It would mean that he had 86 prior to the bounty, which is below the limit for the action.  What am I missing?


Removed ubuntu, how do I now reset the MBR of windows 7 WITHOUT a Windows Repair Disk

I've removed Ubuntu on my laptop as i need the HDD space, and I'm instead putting Ubuntu on my desktop, I removed GRUB not realising it would take me to grub rescue. I've managed to get onto windows 7 using SuperGrub 2, but now I can't fix the windows boot, and it just keeps booting into Grub Rescue, How can i fix my MBR for windows 7 so i don't have to keep going through SuperGrub 2? I'm pretty new, so don't get all technical.. Thanks for any help in advance


if(class1.getMethod1().subString(0,1) == "1") && !class1.getMethod1().subString(0,1).equalsIgnoreCase(str1.subString(0,1)(shld be 1 or 2 or 3 )   i.e., String value is 1 or 2 or 3, then I should skip the if condition I am not able to give   !class1.getMethod1().subString(0,1).equalsIgnoreCase(str1.subString(0,1) == 1 or 2 or 3   Can someone help me with appropriate logic ?


Multiple Windows10 installations - is it possible to pre-select active and reboot?

I have three Windows 10 installations on separate drives on the same workstation Let's say I boot into Windows install #1 Next, I would like to boot into windows #2   Is there a way to "pre-select" Windows #2 as the active Windows installation after I reboot - WITHOUT having to press F8 to select boot device from BIOS?  Thanks!


Google App Engine: Is it possible to do a Gql LIKE query?

Simple one really.  In SQL, if I want to search a text field for a couple of characters, I can do:  SELECT blah FROM blah WHERE blah LIKE '%text%'   The documentation for App Engine makes no mention of how to achieve this, but surely it's a common enough problem?


Check if two objects are the same with nested arrays of objects in javascript

I am writing a comparison function to check if two objects are identical, including nested arrays.  Note: There is another similar question using angular.equals() but there is no equivalent in Angular 2+. I am using Angular 8.  The purpose is to check if a value has been changed in a form in Angular 8 reactive forms. The  provides an answer on how to compare two objects, however the check function is single-level only. I need to be able to check if two arrays of objects are the same (order does not matter).  Here is a JS Fiddle:   // Check if two objects are the same // TODO: Update to iterate over nested arrays, order of array elements should not matter function checkSame(a, b) {    let isSame = true;    for (let prop in a) {     if (a[prop] !== b[prop]) {       // ISSUE: Returning not the same if value is an array       console.log(`${prop} not the same! ${JSON.stringify(prop)}`);       isSame = false;     }   }    return isSame; }  let a = {   'Title': 'Example title',   'Description': 'Example description',   'Items': [{     'NestedObject1': true   }, {     'NestedObject2': true   }, {     'NestedObject3': true   }] };  let b = {   'Title': 'Example title',   'Description': 'Example description',   'Items': [{     'NestedObject1': true   }, {     'NestedObject2': true   }, {     'NestedObject3': true   }] };  let c = {   'Title': 'Example title',   'Description': 'Example description',   'Items': [{     'NestedObject1': true   }, {     'NestedObject2': false   }, {     'NestedObject3': true   }] };  console.log(checkSame(a, b)); // returns false but should return true, 'Items' array of objects is not the same but it should be the same console.log(checkSame(a, c)); // returns false but should return true


Ubuntu 16.04 Wifi stopped working after 2 years on Dell XPS

I've had a Linux installed on my Dell XPS laptop for 2 years and it has suddenly stopped recognising any Wifi Networks.   In Settings > Networks the options are:   Wired VPN Network Proxy    More Info:   $ sudo lshw -C network   *-network UNCLAIMED             description: Network controller        product: BCM4352 802.11ac Wireless Network Adapter        vendor: Broadcom Corporation        physical id: 0        bus info: pci@0000:02:00.0        version: 03        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list        configuration: latency=0        resources: memory:f7200000-f7207fff memory:f7000000-f71ffff   and  Network controller: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter (rev 03)  $ iwconfig lo        no wireless extensions.  enp0s20u1c4i2  no wireless extensions.  $ grep -R brcm /etc/modprobe.d /etc/modprobe.d/blacklist-bcm43.conf:blacklist brcm80211 /etc/modprobe.d/blacklist-bcm43.conf:blacklist brcmfmac /etc/modprobe.d/blacklist-bcm43.conf:blacklist brcmsmac   Chilli555 - Thanks!  Edit  uname -r 4.15.0-23-generic  David Foeerster-  dpkg-query -Wf '${Status;1} ${Package}\n' linux-* | sed -ne 's/^i //'  Nothing happens  Edit: Elder Geek suggestion:   sudo modprobe wl modprobe: FATAL: Module wl not found in directory /lib/modules/4.15.0-23-generic


Blender Game Engine, python inserting a cube at coordinates

First of all I am a BIG noob at blender but not at python. I want to maker some python games so I thought that blender would be great for this.   I am half way through making my simple game where you move a block around and now I want to make it so when you press the E key, a block appears in front of the cube.  Here is my code so far which I found on-line:  import bpy  bpy.ops.object.add(type='MESH') ob = bpy.context.object me = ob.data   me.from_pydata(verts, [], faces) me.update()   It inserts a mesh at some random coordinates. Does anyonee know how to make it insert a cube at some set coordinates or just simplify my code?  I apologise if my terminology isn't correct but I am new to all of this.


Next.js SEO not appearing in google search deployed to vercel

I recently starting working with next.js to create a SEO friendly Website. I deployed it with vercel but none of my SEO is showing up in google when I search for the website URL. This is my home page which I've done SEO work too import Head from 'next/head' import React from 'react';   function HomePage() {   return (
                 <meta charSet="UTF-8"/>         <meta name="viewport" content="width=device-width, inital-scale=1.0"/>         <meta httpEquiv="X-UA-Compatible" content="ie=edge,chrome=1"/>         <title>Digital Marketing & Media Agency | Calgary | Morissette Technologies Inc</title>         <meta name="description" content="Results-driven Media and Marketing Agency based in Calgary with a focus on Digital Marketing, Web Design, SEO services and Social Media."/>         <meta name="keywords" content="Web Development, Web Design, Digital Marketing, Online Markting, SEO, SEM, Social Media Marketing, Social Media"/>         <meta name="author" content="Cristof Morissette"/>

Hello, we are Morissette Media.

View my work

   ); }  export default HomePage;  This is my package.json "name": "cristof-website2.0",   "version": "0.1.0",   "private": true,   "proxy": "https://nameless-sands-69882.herokuapp.com",   "scripts": {     "dev": "next",     "build": "next build && next export",     "start": "next start"   },   "dependencies": {     "axios": "^0.20.0",     "cross-env": "^7.0.2",     "next": "9.5.5",     "next-videos": "1.4.0",     "nextjs-sitemap-generator": "^1.1.0",     "react": "16.14.0",     "react-dom": "16.14.0",     "react-icons": "^3.11.0",     "react-router-dom": "^5.2.0",     "reactstrap": "^8.6.0",     "yarn": "^1.22.10"   },   "devDependencies": {     "webpack": "^5.2.0"   } }  When I inspect my home page I can see the meta tags I created in the head of the project but it's not being reflected in google when I search for my website. I used the vercel CLI to deploy what am I doing wrong?


Hypervolume of a $N$-dimensional ball in $p$-norm

Suppose I have a N-dimensional ball with radius R in p-norm:  $$ \sum_{n=1}^N |x_n|^p = R^p $$  Is there a closed formula for its (hyper)volume? I can't find anything.  If there isn't, can we at least know how it varies with $R$?


Finding all records related to selected records in ArcGIS Desktop using ModelBuilder?

I have two layers that are related. My current manual process is as follow;  a.  Add the layer 1 to the table of contents  b.  Open the attribute table then Switch selection to select all layer 1 records  c.  Click relates and select layer 2 This will select all layer 2 records related to the layer 1  d.  Switch selection This will display all layer 2 records not related to the layer 1  e.  Export the table to excel  I want to automate this using ModelBuilder.  This is where I am using ModelBuilder;  Layer 1 > Select Layer By Attribute (Switch selection) > Calculate Field (I require a python script that is able select all related layer 2 records) > Select Layer By Attribute (Switch Selection) > Export to Excel


Differentiability at an end point of an open interval.

Suppose that $f : [a,b] \rightarrow \mathbb R$ is continuous on $[a,b]$, differentiable on $(a,b)$, and that $\lim_{x\rightarrow a^+}f'(x)=L$. Show that $f$ is differentiable at $a$, and that $f'(a) = L$.  I have tried starting with the continuity of the function, but I'm still not sure how to even begin or where to go from there.


Suppose a group $G$ has no proper subgroups (that is, the only subgroup of $G$ is $G$ itself and the trivial subgroup $\{e\}$. Show that $G$ is cyclic.


German couple (60,55) want to rent a car in Florida - Is an IDP required and are there maximum age restrictions?

My wife and I are German citizens. I am 60 and my wife is 55. We will be staying in Florida for 1 month and we would like to know if our German driving licence would be good enough to rent a car for 1 month or do we also need an International Driving Permit (IDP)? Are there any maximum age restrictions to rent a car in the USA?


Work performed by a stationary object in a gravitational field "on Earth"

I was thinking about this problem:      How much work is required to hold an object stationary in a gravitational field?    or:      How much energy is required to keep an object stationary in a gravitational field, i.e. how many J/s are required?    and I realized I could not come up with a satisfactory answer.  Let's setup an example to limit our scope: First of all let's consider an mini-copter of mass m=10 kg on earth which uses its' rotor blades to reach altitude of h=1 meter. The work required to get it there is roughly:  mgh = 9.82 m/s  * 10 kg * 1 m.   Which means we spent 98.2 Joules of energy getting it there. So if this work was done under the time t= 2s the effect of the mini-copter engine would be roughly $mgh/t$ ~ 98.2 Joules / 5s ~ 19.64 watt.  Now, obviously the engine would have to keep on running to keep the quadrocopter at the height of 1m, roughly how much effect would be required?  So this is kind of a high-school level question but I can't seem to wrap my head around it.


Can I Use Two Different Speeds of RAM in One Laptop?

I've recently bought a new laptop with 8GB of RAM in it. It has 4 slots inside so I want to put the RAM from my old laptop in it as well. However, they have different frequencies. So if I put the old RAM in there as well, would it have any adverse effects on the system?


For any integer $a$, $\gcd(11a+5,2a+1)=1$.

How would I go by proving this statement?  What I did was I tried using Proposition GCD Of One, so that  $(11a+5)x + (2a+1)y = 1$, and $(11x+2y)a + (5x+y) = 1$.  But I have no idea what to do from here. What can I do?


We know “misogynist” is the word that we use for "a man who hates women”.   Do we have any single word for “a woman who hates men”?


How to display a folder structure in Stack Overflow?

What is the best way to show a folder structure using Stack Overflow formatting?  Here's how I have written it now, I wish I could do it better:  >_rels >customXML >docProps >word //this folder contains most of the files that control the content of yhe document     >_rels          >document.xml.rels //this document tells word where the images are situated     >media  //This folder contains all images embedded in the word     >theme     >document.xml //Is the actual content of the document     >header1.xml //Is the content of the header >[Content_Types].xml


Can I safely uninstall games purchased from Steam?

Can I uninstall purchased games from my computer and then later download them through Steam without having to re-purchase if I'd like to?   I'm running short on space on my laptop, looking to free up some space and wanted to be sure that I can safely re-download anything at a later time similar to how you can with the Xbox Live marketplace.


How do I transfer previous generation Pokémon to X/Y?

How does one go about transferring Pokémon from previous generations this time around? Presumably, due to the 3DS's lack of GBA slot, Gen3 Pokémon would need to be transferred to a Gen4 cartridge. But how does it work beyond this point? Specifically:   Which generations can be used to send Pokémon to Gen6? Can Gen4 (D/P/Pl/HG/SS) send directly to Gen6, or do Pokémon from those cartridges first need to be sent to Gen5 (B/W/B2/W2)? What systems are required to perform this task? Does it need to be two connected 3DS (3DS / XL / 2DS) systems or can the previous generations be hosted on a DS (Phat / Lite / i)? What (if any) in-game tasks must be completed prior to transferring? Of the generation 4 and 5 games I've played, the transfer tools were not unlocked until after the Elite Four were beaten. How, exactly, does it work this time around? The tools for each generation so far have been wildly different; a safari-zone-like minigame, and a shooting gallery minigame. Is there any other information someone looking to transfer Pokémon to generation 6 should be made aware of? For example; PC Box storage limitation issues for anyone looking to transfer their living Pokédex.


Inverse of a function - $f^-(x)$ in a restricted domain

I have a function $f(x) = y = x^2(3-2x)$, $0\le x\le 1$, I would like to find the inverse of this function on this restricted domain. ,This seems to be the answer for one of the problems that I have been scratching my head for a day.  I used online calculators, but the problem is I cannot evaluate the inverse in this domain as part of the function is $\sqrt{(y-1)y}$ and y ranges in $0<y<1$.  Could someone suggest an inverse of this function restricted to (0,1). Any help will be appreciated.


I am currently following a gold tag badge for javascript, it's description says earn at least 1000 total score for at least 200 non community wiki answers in the tag, what I understand from this is I need to earn 1000 reputation by answering atleast 200 questions which are tagged as JavaScript and which are non community wiki.  I am like really earning a lot of reputation daily but my tag score is constant to 581/1000 from past week, but my reputation gain is more then 1000 in the past week (mostly by answering Javascript based questions only).  I think SO Community should bring more clarity on how to earn this bade exactly.  I have a few doubts though:   Non community wiki posts are those which are asked by a normal user and are not marked as community wiki. I think i need to answer these questions and if i will get upvotes my score for gold badge will increase (Which is not increasing at all). Should javascript be one of the tag on that question or it should be the only badge on that question?


How to interpret $\mathbb{P}(B|A)$ when $\mathbb{P}(A) = 0$

$\newcommand{\P}{\mathbb{P}}$Is it valid to interpret $\P(B|A)$ as "infinite probability" when $\P(A) = 0$?


Why did a question suddenly become featured when the last edit was almost a year ago?

I recently saw the following in the sidebar on :  The third question listed there is a site-specific Meta question that I recognized from a while back. Curious as to why it would be featured now, I clicked into the question only to discover that it was featured and unfeatured almost a year ago:  This shows that the last edit, and the one in which the  was removed, occurred in October of 2019. Why, then, is this question showing as featured in August of 2020? I am aware of  from several years ago which may or not be the same underlying issue. That question has no answer, other than the possibility that it's a caching issue (hardly plausible when it's been ten months). Also notable is that in this case it seems like it only started showing as featured very recently (i.e. rather than being stuck as featured for the last ten months). I visit the site in question at least several times a day and I have not noticed it before today.


performance benefits of shrinking a database

I have a database of 1.5 TB, which had only 200 GB free space before.Due to performance issues, business decided to reduce 1 month data retention policy to 1 week.Due to this 3 weeks data was deleted and now it has 700 GB free space.  The 500 GB free space increased due to data delete is no more required, and there no chance to grow data again to occupy this 500 GB space.   I am planning to shrink the database(using shrink file command ) and run index optimization process to  rebuild indexes, if fragmentation is greater than 30%. The released space wont be used by other systems, however can be used for log file and temp db growth efficiently in near future.  Is there any benefits on performance by reducing the size of database, other than space release ?   Previous questions related to shrinking(in stack exchange) does not properly answer to my queries.  Thanks in advance for your kind reply !!!


The more time you spending in measuring your experiment (thus standard deviation will become smaller) the more precisely you will measure energy of this system.... energy time uncertainly principle implies this.... and in most systems (i have seen,or may be all systems ) the lowest possible energy is ground state energy, this energy cannot be removable.. for example in a infinit square well .. Then how can ''universe from nothing'' i would say sentence makes sense? if there is uncertainly how there is something like nothing... if minimum energy possible is ground state energy..how nothing(no energy exist)???


How to have Linux wipe/randomize/sanitize RAM at shutdown?

For mysterious reasons I still double boot sometimes into Windows.  My problem is that I fear that information may leak because the RAM memory is accessible to Windows. (the Linux partitions are encrypted and the bootmedia is not inserted, though).  Is there a way to setup (in a recent kernel and GNU/Linux based system) a way to have the kernel wipe the memory at shutdown?  Also since LUKS plays an important role, does it wipe its memory at shutdown to avoid leakage and also "cold boot attack"?


Is there a term to describe something that highlights what it is not?

I'm looking for a term describing something that highlights what it is not in a dual relationship. So if you have some kind of dualism, what is the name for the role that one half plays in relation to the other half? I want to say somehow that the one half highlights the other half (as a noun). For instance, if there is a canvas where half is blue and half is yellow, and the yellow being there serves to bring out the blue, would there be a term for the yellow's role in that canvas? In a sentence along the lines of "We might think that the yellow is uninteresting in this canvas, but really, it is the X that brings out the blue." Is there a term for the X in a dualistic sense? I've thought of the phrase "yin to x's yang", but I'm sure there must be a single name (like "catalyst", but obviously catalyst is not at all the right word). Thanks!


"Didn't want to do X until Y happened" vs. "hadn't wanted to do X until Y happened"

Which answer is correct?       Tony _______to have children until his little daughter was born. After   she won his heart, he decided he wanted a big family.       A. didn't want.   B. hadn't wanted.   This is a multiple choice question from the Understanding and Using English Grammar Workbook 3rd edition by Betty Azar. To me, both answers are correct as I cannot see the diffrence. Please show me the wrong option to delete.


I downloaded a patch file from mailhandler module and need to apply the changes in order to fix the problem of pop3 accounts not deleting emails after download (import).  How do I install it?


[C]: When a pointer to a pointer to a struct is passed in a function, why can't it change the elements of that struct?

struct Node { int data; struct Node *next; };  void insertAfterHead(struct Node **a, int x) { struct Node *newNode = (struct Node *)malloc(sizeof(struct Node)); newNode -> data = x; newNode -> next = *a -> next; *a -> next = newNode; }   int main() {     struct Node *head = NULL;     struct Node *second = NULL;     struct Node *third = NULL;      head = malloc(sizeof(struct Node));     second = malloc(sizeof(struct Node));     third = malloc(sizeof(struct Node));      head -> data = 5;     head -> next = second;      second -> data = 10;     second -> next = third;      third -> data = 15;     third -> next = NULL;      insertAfterHead(&head, 10);      return 0; }   This is the error message I get on running the code:  error: member reference base type 'struct Node *' is not a structure or union         newNode -> next = *a -> next;  error: member reference base type 'struct Node *' is not a structure or union         *a -> next = newNode;  Please be as descriptive as possible as I'm a beginner to C :)


Photoelectric Effect - Dependence of current on frequency

We all know that the amount of current flowing b/w the plates is independent of the frequency. If I were to ask why doesn't it depend then you'd probably say that it depends on the number of electrons rather than the frequency or you might show me a current vs frequency graph.  But here is my theoretical argument. Electric current is defined as the amount of charge flowing through a point/space/wire per unit time. Let I be current due to photo electrons ejected by photons of some frequency. Now if I would increase the frequency, the kinetic energy of the ejected electron would increases, therefore it will move faster and therefore contribute more current (charge will through the same point many times per unit time) . Thereby, giving a net current greater than I.  What is wrong with my argument?  After thinking a lot, I came up with a possible reason. However fast the electrons may move, but when they hit the metal plate, they would lose their velocity and start moving in drift velocity. Now there is a problem with this argument. If this were to be true then I should expect to see a big chunk of extra electrons getting stuck at the anode.  If my reasoning was correct, then why can't I see a big charge buildup at the anode.