Hebrew characters doesn't shown correctly

I have a PHP script that takes data from MySQL database and write it with echo, the problem is that it shows Hebrew as just a weird string and not the actual content, on the phpMyAdmin database it shows the Hebrew characters fine and it is encoded there to utf8_general_ci, but when it transferred to the PHP it doesn't work.  On the PHP code I tried to encode is:  <?php  header('Content-Type: text/html; charset=utf-8');  ?>   but it didn't work, the PHP code is:  $conn = mysqli_connect($host,$username,$password,$db);  $result = mysqli_query($conn,$sql);  $response = array();  while($row = mysqli_fetch_array($result)) {     array_push($response,array($row[0],$row[1],$row[2],$row[3],$row[4],$row[5],$row[6])); } $str = json_encode(array($response)); $str = clean($str); echo $str; mysqli_close($conn);  function clean($string) {     $string = str_replace(' ', ' ', $string);     $string = preg_replace('/[^a-zA-Z0-9,: -]/', '', $string);     return preg_replace('/-+/', '-', $string); } ?>


How to deal with unknown genders in English?

When I start a sentence with words like "someone" or "somebody", I don't know how to choose the right pronoun at the end of the sentence.  Examples:      If anybody asks you about the money, tell (Him - Her - It - Them) that it is in my bank account.     I felt that somebody was in the garden but I did not see (Him - Her - It - Them).     Speaker 1: A friend of mine helped me a lot.      Speaker 2: You should thank (Him - Her - It - Them).     Congratulations on your new baby! What's (His - Her - Its - Their) name?    Those are the cases or situations that I can think of. If you have any other different situations, please let me know.


How to make a see through silk material?

I have tried a couple of things now but can't seem to get the material just right. I am trying to create a white blouse material that looks like the picture below. Has anybody got some tips or maybe some samples that are close to it?


Create an SSH user who only has permission to access specific folders

I installed SSH, but I found if I use my original account to login to Ubuntu, it has too many permissions.  I want to constrain the user to only have permissions for specific folders in Ubuntu. How can I configure such a user?


What is the meaning of higher order derivatives like d²y/dx²

I know velocity and acceleration are higher order derivatives of the position vector. Any other examples? What is the physical significance of higher order derivatives.?


My 8GB SD card somehow holds 70GB worth of data?

I have just dug out an old 8GB SDHC card which was used in my Cowon D2 MP3 player and my old car radio - it's filled to the top with various music files. When I tried copying all of this data to my computer, nothing happened. So I checked the size of all the files on the SD card, and it said 70GB ! I can vouch for the fact the SD says it is 8GB capacity. So I located which files were the heaviest with treesize, and it showed a bunch of garbage within one of the folders (the last one, but it may be a coincidence) which took the remaining 62GB. I can't delete this folder, I'm presently copying everything else and planning a full format.  What happened, what is this, how is this possible ?


How to prevent an application from connecting to a network with iptables?

I have read the manual page of iptables in terminal, but it has complicated syntax and I don't fully understand how to use options like: user, user ID, UUID and so on.  Suppose my username is foobar and I want to prevent an application from connecting to any kind of network. How do I do this?


About '' get injured '' and '' be injured ''

How do you use '' get p.p.''and"be p. p. "differently? For example" get injured "and" be injured". Is there any difference between them?


I created a path connecting different segments and than I created the 3D effect using the command extrude & bevel Do you know how I can fix the imperfections (in the 3d effect and in the connections among the segments) you see in the screenshot?


my first frame jig - a customized one - which addons and features to add?

i am currently workin on the Bicycle-Frame-Building-Jig that is designed by tanner W at Instructables  which bottom bracket assemblies should i work out: The question is - which bottom bracket-assembly-types would you suggest!?which axles and dummy shells should i drill see  well at the moment i am musing bout the extras and features  what should i add which features should i add eg some dummy axles for the bottom bracket assembly - what do you suggest!?  i think as long as we can get a standard English bb in both 68 and 73, we should be fine. afaik: It's hard to deal with the press fit sizes because AFAIK nobody is selling facing/reaming tools for them. As far as i know: Paragon has a ton of bb shells available, so we could match what they sell. but I think the two most standard sizes will probably do for now. the tanner w fixture is adjustable for width, so we only need one set of blocks see here:  and also see the bottom bracket shells:  well at the moment i am musing bout the extras - what should i add ?


My grandma left a 50K inheritance and I'm looking for advice about the best way to use it. My husband and I have 3 kids (11, 3, 1) and are in our early 30s.  We have:   60K in student loan debt 15K car loan pay 1300/month in rent and utilities have about 5K in other debt   and make about 2K/month and own nothing.  One good thing is that my husband is in grad school and will be done in 2019 and will then make about 75K/yr with his degree profession.  In the meantime, we're living paycheck to paycheck and I don't know what to do with the 50K I have inherited (I don't want to squander it).  BTW, we can't buy anything just yet because our credit scores are about 550! Any advice would be appreciated.  I live in California.


Why do file transfers over USB slow down my whole computer?

Whenever I transfer large files, or large amounts of files, over USB to or from an external drive, the whole computer slows down to a crawl during the transfer. I'm using Ubuntu 14.04, but I've had this problem before in earlier versions. Why does this happen? I want to be able to file a bug report to stop this from happening.  Cheers, Reid


IEEEtran class: how to achieve "small caps" font effect?

In the IEEEtran class, how can I achieve the "small caps" font effect used for e.g. stating the names of IEEE societies and publications, and the section titles (see example below)?   Thanks and regards, Jorge.  P.S. The class can be found .  Example font I'd like to achieve:   Example code:  \documentclass[journal]{IEEEtran} \begin{document}  \section{This is a dummy section} % Some sample text I'd like to put in small-caps font: How to, for example, put \emph{this text} in the same font as the section title?  \end{document}    Output of example code:


wpf - how to keep a control from being selected through tabbing

Is there a way to prevent a control from receiving focus when tabbing through elements?  I'd like to do this in XAML.  Here's an example, where I'd like to keep the second textbox from receiving focus when tabbing through controls:  <StackPanel>     <TextBox Name="tb1"></TextBox>     <TextBox Name="tb2"></TextBox> </StackPanel>


Can two streamlines in a fluid be tangential to each other not crossing each other?

A streamline cannot cross other one in steady state of a fluid but can they be tangent to each other ?  What I mean is consider fluid in steady state. if let us say particle A has its own path in fluid and at point B it has velocity x. But let us say another particle C has its own path and has to cross ppoint B it must also have same velocity and hence the two streamlines are tangent at B. Is this possible otlr is it only valid if particle A and C both have the exact same trajectory fro the beginning ?


May I ask what font is being used in this document?  I am new to latex and I am used to the default font. I am making a lecture not and I wanna know also how to typeset my whole document using this font. Will the symbols get affected too? Any help is appreciated. thanks


Getting nauseated from air travel, but it's not motion sickness... what to do?

My sister is not particularly inclined to air travel—she regularly throws up, and the feeling of nausea is evident well before motion sickness could occur (i.e. inside the terminal).   I suspect some of it is due to a reverse-placebo psychological effect—she likely associated motion sickness with airports/airplanes/air travel at an early age and it's unfortunately carried through. It's probably not entirely the odor of burnt jet-fuel (although she does mention that as contributing) since she's fine when she's going to the airport to say bye to relatives.   Also of note—my sister is only 11 years old, so that limits what can be done to help her as far as medication is concerned.  Unfortunately, neither Dramamine, Benadryl, nor Sea-Bands have been of any help, as we discovered two days ago. We're going to consult her doctor when we get back to the US, but the slight problem with that is that there is a 12 hour plane ride back to the US, and the preferable option would be to go back with as little vomit as possible.  What could be done to help alleviate her nausea?


Equivalence between Dirac delta of a function to a usual Dirac delta

Let $f_1(s,\tau)=\delta(e^{(\tau+s)} \sinh \tau )$.  This should be equal to $0$ everywhere unless $\tau=0$, but I think there should be some constant multiplying the delta, i.e. it should be equivalent to $f_2(s,\tau)=c(\tau,s)\delta(\tau)$ where $c(\tau,s)$ is a constant.  How can I manipulate $f_1$ to resemble $f_2$?  Thanks.


Received a possible malware .vbs on Skype and ran it

I received a vbs file on Skype from someone I thought I knew and against my best judgement I ran it. Can someone please tell me what it does? Here's the vbs file code -  I have already deleted the file it added to the startup folder. I have also checked that the file C:\Windows\Microsoft.Net\Framework\v2.0.50727\MSBuild.exe has not been modified recently. Anything else I need to check or any other action I need to take? Any help would be greatly appreciated!


Compiling for Windows NT using Visual Studio 2005

I need to create an executable for Windows NT ( yes, Windows NT still exists ). The problem that I have is that VS2005 uses CRT/MFC 8.0, therefore after running the application using the CRT 8.0 libraries I will get an error complaining that GetlongpathnameW doesn't exist on the target environment, which should be fixed by going back to MFC 7.1 CRT libraries.  I have the libraries that I acquired from somewhere else (mfc71.dll, msvcp71.dll, msvcr71.dll....) but how do I get VS to use those instead of the default ones (MFC80.dll....)?  Here is the link of a person with the similar problem:   Thanks!


How to calculate impulse force of body hitting water?

I'm calculating the force of a body hitting water from a high height. So far I've figured out the velocity at the time of collisions would be 40 m/s. The body is 78 kg. I seem to need the time it takes for it to accelerate to a stop after hitting the water but I can't find any concrete numbers for that, what would be a good estimation?


Could someone please give an example of when the likelihood function does not sum up, or integrate to $1$? I have seen  question with the first answer but it really confused me - why are we integrating the likelihood function and not summing it up with the $\sum$ sign? Since it is a Bernoulli distribution (discrete). If someone could clarify my confusion and maybe provide more example(s), that would help I think.


How to trigger function when elements are from ajax call

This is test.html File as follows    $(document).ready(function(e) {     $("#get").click( function() {      $.ajax({       type: 'GET',       url: 'temp.html',       success: function(data){        $(".month").html(data);       }      });     });          $("#month").change( function() {      alert($(this).val());     });         });  <button id="get">Get Months</button>

     This is temp.html file as follows    <select id="month">  <option>--Select Month--</option>  <option value='1'>Janaury</option>  <option value='2'>February</option>  <option value='3'>March</option>  <option value='4'>April</option>  <option value='5'>May</option>  <option value='6'>June</option>  <option value='7'>July</option>  <option value='8'>August</option>  <option value='9'>September</option>  <option value='10'>October</option>  <option value='11'>November</option>  <option value='12'>December</option> </select>     When user click on button, it will get dropdown button for months I just want to get alert when user change month from dropdown. I could not change temp.html as it is from other server.


Here I am thinking ...  Why do I see much more often the use of #define instead of enum in other people's code when defining error codes for the return value of functions?  Is there a reason for this, or is it just a matter of taste? As far as I know, enums are much more safer and debugger friendlier.


Doctor asked me how much did I weigh.  Should I say it is "50 kg" or "500 N" ? Though the unit of weight is Newton, I have seen people mentioning their weight only in terms of Kilogram. Why is it so?


If the product of two continuous functions is zero, must one of the functions be zero?

Suppose that I have two continuous functions  $$f : \left[ a, b \right] \rightarrow \mathbb{R} \quad \text{and} \quad g : \left[ a, b \right] \rightarrow \mathbb{R}$$  and they have the following property   $$f(x) \times g(x) = 0 \space , \forall x \space \in \left[ a, b \right]$$  Can I say that one of the functions necessarily has to be equal to $0$?    For example, $f(x) = 0 \space , \forall x \space \in \left[ a, b \right]$.  UPDATE: Ok, I can see from the counterexamples that the affirmation is not true, but now I cannot see in which cases it is true. If I let the function $g : \left[ a, b \right] \rightarrow \mathbb{R}$ be any continuous function, then in that case must I have $f(x) = 0$ ?


How to create a "heat distortion" effect with a cycles procedural node set up without compositing

I know how to do a heat distortion effect in compositing.   What I am looking for is a way to do the same effect with a material set up in cycles.   What would be the best way to create a procedural material that can be placed in front of any object and make it look like heat is rising in front of it (without compositing)?  Any ideas would be greatly appreciated.


Linux: id: cannot find name for group ID 999

When I try to run a new bash instance [egg@localhost ~]$ bash  I receive id: cannot find name for group ID 999  In /etc/group there is no group with that Id #. Where is this ID being referenced from?


Is there a multinomial version of the DeMoivre-Laplace theorem?

The DeMoivre-Laplace theorem says that in the limit for large $n$, the distribution tends to a Gaussian.  Can we say the same for multinomials? Can someone give me a reference as well?


Can level 1 characters survive a fall of several miles?

I'm going to start a new campaign soon, and I thought it would be fun to scare my players in the first session by having them start the game falling from the sky.  The thing is, I don't wanna kill them in the very first session, but the only ways I can think of for a level 1 character to not take damage from a fall that high up is feather fall (no spellcasters), or that feature monks get until 4th level.   Should I just scrap that idea entirely?  I feel like there has to be a way of dropping them from that high up without killing them, but I also don't want to just have them conveniently fall on hay or something like that. I want them to be the ones to figure out how not to die, but I can't even figure it out myself.


What does "5k1" in the given schematic mean?

What does the "5k1" stands for it is a normal 5k Ohm resistor?   (Marked with "A" in the picture)   The chip is an  LIN-transceiver.


Let $x$ and $y$ be integers such that $2x+3y$ is a multiple of $17$. Show that $9x+5y$ must also be a multiple of $17$.  So $2x+3y \equiv 0 \pmod{17}$. Adding $7x$ and $2y$ we have that $9x+5y \equiv 7x+2y \pmod{17}$, thus we would need to show that $7x+2y \equiv0 \pmod{17}$. How should I approach this? I cannot see to be able to show the last congruence...


Is a proof still valid if many people say that is true?

A proof is some explanation to convincing others that a statement is true (or false in case of a counterexample). As Yuri Manin once wrote: "A proof becomes a proof only after the social act of accepting it as a proof".   Since Mathematics is not comprehensively 'connected' to the nature, I am trying to compare it with another situation: there were many beliefs in history that every body was convinced their truth, it could even be as far as a superstition. But as time passed their validity changed.   My question is: Do we need other type(s) of intelligent creation (like intelligent aliens) for final check whether our proofs are true or not? Or, human mind is enough for checking their truth?  Note - My question is especially focus on non-empirical Mathematics.   EDIT - Also, there have been many mathematical proofs that had very subtle inconsistency detected by smart people; checking Fermat Last Theorem's proof by a colleague of Wiles came up with a subtle mistake is an example; Is it possible that a 'proof' has that type of mistake but not easy enough to 'see' even by nowadays' people for a long long time? any historical story?    PS - migrated from math.SE


I'm trying to set up Tamil phonetic in Edubuntu 14.04. I cannot get Tamil phonetic in the text entry list.  How can I fix this?


Apparently Google wants to break Gmail again: They switched off the old editor today for everyone and made  their new editor (see ) mandatory which does top-posting and allows no fixed text font.  How can I get the old plain text editor back? I found no config option for that.


Wifi not working after a short time with RTL8723BE, not able to switch to other network before restart

I am using Ubuntu 14.04 on my HP 15-r204TX. When I start Ubuntu Wifi works fine but after 2-3 mins the browser shows no internet connection. Turning WiFi off and back on doesn't fix it and I'm not able to switch networks - it shows "connecting" and never gets connected. If I restart, it works again for 2-3 minutes.  $ lspci -knn | grep Net -A2 0a:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]     Subsystem: Hewlett-Packard Company Device [103c:2231]     Kernel driver in use: rtl8723be


Why am I being forced to change methods and varibles to static when calling them from my main method?

For some reason when I'm trying to call methods using a main method or try changing variables declared outside the main method I get forced into having to change everything to static. This is fine in places but when it comes to needing to change values later in the code for example using a Scanner for input the main method just takes it to a whole new level trying to make me change the Scanner library etc.       I have never faced an issue like this before when writing java code I've tried recreating the classes/ project files etc but nothing works. I've tried looking everywhere for a solution but I can't seem to find one probably due to the fact that I don't know what to search for. I've probably made myself look like a right idiot with my title haha! Any suggestions people?? Thanks in advance!  Maisy


I wonder if there is the ability to print / export the schema builder?  If so, where can I find? If not, would be a great idea to implement this feature for future releases.


Understanding the logic behind proof by contradiction.

I'm having some trouble grasping the validity of the logical underpinnings of the proof by contradiction method.  The following is the basic structure I've been presented with:   To prove a statement $P$, assume $\lnot P$. From $\lnot P$, derive some statement $R$ that is contradictory to some known fact or assumption we made in the proof. Thus, the contradiction $C: R \land\lnot R$ is true. Thus, $\lnot P \implies C$ is t true. However, since $C$ is a contradiction and always false, it must be that $\lnot P$ is false, thus $P$ is true.  My questions are as follows:   I thought that the definition of a contradiction is something that is always false. Thus, how can we say that $C$ is ever true? Is it the case that the proof exists within its own logical "universe" as it were? If we are able to say that $C$ is true and thus $\lnot P \implies C$ is true, how are we then able to say that $\lnot P \implies C$ remains true when we then say that $C$, being a contradiction, must be false? I would think that $C$ being false would abrogate the validity of the implication as well.


Switching language from French to English in Solaris 8

I have Solaris 8 OS installed in French.  I have a computer with Solaris 8 OS and French language installed. This computer isn't in my office; to access it I use Exceed. I have to switch the installed language from fr_FR.UTF-8 to en_US.ISO8859-15  How can I do that?   P.S :Even when i try to edit /etc/default/init and reboot : nothing happens.


Proving trigonometric identity: $ \frac{\sin (y+x)}{\sin (y-x)} = \frac{\tan y + \tan x}{\tan y - \tan x} $

Prove that    $$ \frac{\sin (y+x)}{\sin (y-x)} = \frac{\tan y + \tan x}{\tan y - \tan x} $$    This is my working -   $$\text{LHS} = \frac{\sin (y+x)}{\sin (y-x)} = \frac{\sin y \cos x + \cos y \sin x}{\sin y \cos x - \cos y \sin x} $$  I used the compound angle relations formula to do this step.   However , now I'm stuck.   I checked out the answer and the answer basically carried on my step by dividing it by $ \frac{\cos x \cos y}{\cos x \cos y} $   If I'm not wrong , we cannot add in our own expression right? Because the question is asking to prove left is equal to right. Adding in our own expression to the left hand side will be not answering the question, I feel .


I am trying to perform a recovery operation on a btrfs image file that I have extracted using  # dd if=/dev/sda1 of=/mnt/sda1.img   The file seems to be properly extracted:  $ file sda1.img  sda1.img: DOS/MBR boot sector   Reading it with parted is a bit opaque though  $ sudo parted sda1.img GNU Parted 3.2 Using /run/media/robert/exthdd2/sda1.img Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p                                                                 Model:  (file) Disk /run/media/robert/exthdd2/sda1.img: 240GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:   Number  Start  End  Size  Type  File system  Flags   Trying to mount it results in an errors  $ sudo mount -o loop -t btrfs sda1.img /mnt/ mount: mount /dev/loop0 on /mnt failed: Operation not supported   However, I can run a btrfs check on the image file, so it's not broken ...  What can I do to mount such an image file?


Where is the Windows Security Button or what does it look like?

Log in says Press CTRL + Alt + Delete or use the Windows Security button to unlock this computer. Nothing happens when I press CTRL Alt Delete.  So, where is the Windows Security Button?


Display selected row for match in any columns from a dropdown list in Google Sheets

I'd like to create a lookup from a dropdown with all unique sheet data that finds a match within any column and returns the selected row items.   Let's say that each row represents a single device with multiple components described in each column with a unique ID for all. How could I search for any ID and get all column IDs associated with that row selection?  I can do this for a specific single column or row with QUERY, VLOOKUP or INDEX, MATCH but perhaps there is a way to make this work for all without a single parent key.


I'm trying to create an activity that presents some data to the user. The data is such that it can be divided into 'words', each being a widget, and sequence of 'words' would form the data ('sentence'?), the ViewGroup widget containing the words. As space required for all 'words' in a 'sentence' would exceed the available horizontal space on the display, I would like to wrap these 'sentences' as you would a normal piece of text.  The following code:  public class WrapTest extends Activity {     /** Called when the activity is first created. */     @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         LinearLayout l = new LinearLayout(this);         LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(                 LinearLayout.LayoutParams.FILL_PARENT,                 LinearLayout.LayoutParams.WRAP_CONTENT);         LinearLayout.LayoutParams mlp = new LinearLayout.LayoutParams(                 new ViewGroup.MarginLayoutParams(                         LinearLayout.LayoutParams.WRAP_CONTENT,                         LinearLayout.LayoutParams.WRAP_CONTENT));         mlp.setMargins(0, 0, 2, 0);          for (int i = 0; i < 10; i++) {             TextView t = new TextView(this);             t.setText("Hello");             t.setBackgroundColor(Color.RED);             t.setSingleLine(true);             l.addView(t, mlp);         }          setContentView(l, lp);     } }   yields something like the left picture, but I would want a layout presenting the same widgets like in the right one.        Is there such a layout or combination of layouts and parameters, or do I have to implement my own ViewGroup for this?


The Area 51 ads shouldn't really look like that. It seems like the image is cropped, changing the sizes in the HTML code won't exactly fix it.  Even resizing doesn't work:


Probability of a player winning again after i games

I'm in a computer algorithms course and have a question about basic probability. My math background includes no more than discrete math and a little calculus, so this probability question left me completely stumped. I checked for similar questions but didn't see any. If this question has been answered already I apologize in advance but I don't even know the correct terms to search to find an answer.  The question goes like this:   Suppose you're playing a set of games and the first to win 10 games  wins the set. Each player has an even chance (1/2) of winning a  game. What is the probability that the first player will win if she  has already won i games and the second player has already won j  games? How do you calculate this for different values of i and j?    Please word the explanation for a non-maths student. I need to provide a recursive formulation for a function that computes this probability then solve it using dynamic programming. No worries on recursion or dynamic programming. I can solve that once I understand how to solve for probability.


Downvoting on questions that are on hold

I don't see why we should continue to allow people to downvote once a question is put on hold.  Perhaps one can argue that we should still be able to upvote, but even that is questionable.  It seems that we should give the OP some time to fix the question before it gets downvoted into oblivion.  Especially for new users, I don't think it helps them to see their question get put on hold and for them to continue to get downvoted.  I can't see why this would be a bad feature to implement.  Anyone else have thoughts on the topic?  If you feel the need to tell OP that their question is incredibly horrible, doing so in a constructive manner via a comment seems more useful to me than downvoting once the question is on hold.


Sniff/Capture where windows hotkeys are coming from

There are some shortcut keys on my windows computer that must be coming from some program. I know that I've installed a couple of "productivity" programs, but for the life of me I can't figure out what's causing some of these shortcuts.  Is there a generic program/way for me to hit some hotkey, and then know where it's coming from? For example, suppose that I have an autohotkey exe running which always prints a message when I hit ctrl+alt+m. Is there a way to hit ctrl+alt+m, and then know that the autohotkey program is binding that keystroke to something?  If there isn't an easy way to do this (I'm betting there's not), then what possible places are there to check? Are there known ways to bind hotkeys via registry? If so, are there common places in there? Are there keyboard settings in Windows OS somewhere?  I know this is an abstract and hard question, but I think it's very practical for "super users", has objectivity, and so belongs here.


$(g_1 g_2)^m = g_1^m g_2^m \Leftrightarrow g_1 g_2 = g_2 g_1$ -- Question from Mac Lane and Birkhoff (Chapter II, section 3, problem 7)

I'm still working through Mac Lane and Birkhoff and I have another question. The question is: In a group $G$, show that $$ (g_1 g_2)^m = g_1^m g_2^m $$ for all integers $m$ if and only if $g_1 g_2 = g_2 g_1$.   It's pretty clear that if we assume that $g_1$ and $g_2$ then the above is true. However, I'm getting stuck trying show in the other direction. What I've been trying is to start with  $$ (g_1 g_2)^m = g_1 g_1 g_1 \cdots g_2 g_2 g_2 $$ and then somehow cancel terms to arrive at the desired result of $g_1 g_2$ on the LHS and $g_2 g_1$ on the RHS (as this is pretty clear and works nicely when $m =2$). Is this the way to go about it, or is there another way?


Dual Boot Windows 10 and Linux Ubuntu on Separate SSD

I am brand new to Ubuntu. I have just build my new PC, it has 2 separate hard drives installed in it. I would like to install Windows 10 on the first SsD (They are both 250GB Samsung 850 EVO) and i would like to install Ubuntu on the other and be able to choose to use either one or the other on dual boot. As i said I am brand new to Ubuntu. In fact, I have not downloaded or installed it as yet. I would like to know if this dual booting from separate hard drives is possible.


i learn about work and most book define force x distance. The definition given not very informative and the book don't describe much about it. All they do is give above definition and then a lot of example. Later i learn that this concept are related to energy. So basically the are some fact regarding conservation of energy. From this point of view, i know that energy is an abstract quantity store in system/object and those energy can be use to do change on other object/system by transfer its energy. In order to do change on other system the first object must do work on them [what i can recall the only thing can cause change to a system are force and heat. is there anything else?]. And i believe some might define work as transfer of energy. From here i got two definition where subjectively work is transfer of energy and objectively work is Force x distance. So can i said that work is when a system cause change to other static system (subjectively/qualitatively) which value of change can be quantify and measured by Force x distance (objectively/quantitatively). Plus work are done when a change had been made to the system which result either loss or gain in energy. If this really the case can i make a statement where the energy and work concept is actually how physicist trying to discuss about interaction between two system which, when change occur, the interaction will cause one to gain some quantity while other loss in the process of interaction and such quantity are constant when we add them together. In addition, do this concept trying to explain to us that to cause some change to other system one need loss something in order to add something to them. Am i in the right direction?  Another question is why distance? In the formula the work is define by Force X distance. I accept that force are used due to they are the cause of change or i can say they are way/agent of energy transfer. But why we use distance as a unit to quantify work. And most of explanation using a example to explain distance. Do the formula cannot be explain but it just make sense when think logically?


Are  practically possible to exist? if they are how can we harness them? I have already tried finding answers but none are satisfactory. please help.


Multivariate Polynomial Division Question

I am trying to solve the following question: ``Let $F$ be a field and let $F[x, y]$ denote the ring of  polynomials in the variable $x$ and $y$ with coefficients in $F$. Suppose $f(x,y)$ belongs to $F[x, y]$. Apply the Factor Theorem to the ring $F[x]$ to show that $f(x, x) = 0$ if and only if $(x-y)$ is a factor of $f(x, y)$. More generally, show that $y - g(x)$ divides $f(x, y)$ if and only if $f(x, g(x)) = 0$, for $g(x)$ in $F[x]$.'' If $(x-y)$ is a factor of $f(x, y)$ then obviously $f(x, x) = 0$. But how do I prove the converse? Is there a version of the Factor Theorem for $F[x, y]$ that I need to use?


How to Give all the powers Of Root account to another user account? With full command and detail.


I am a beginner in XML language.  I am learning XML in Android studio at school.  Example,   <Person>  <sex ="female"></sex>  <firstname = "Hani"></firstname>  <lastname = "Jeong"></lastname> </Person>   in this case, all the values are hidden from users, right?  What I am really confused about is that I understood that attributes must always have values.   Which common situations do you hide the values or show the values to users?


How to create ZIPs with the content of every folder

I have several folders and I need to compress the content of each folder in a separate ZIP file. However, every ZIP should only contain the content of each folder and not the folder itself.   The following code creates a file with the folder included. It is close to what I'm looking for, but I'm not there yet.  for /d %%X in (*) do  "c:\Program Files\7-Zip\7z.exe" a "%%X.zip" "%%X\"   What I get: XXX.zip > XXX(folder) > content What I want: XXX.zip > content  How can I do this?


I want to find the highest number not in the list. The break should end the last for loop and leave me with Ans = highest number not in list. Why doesn't it work  A = [1,3,5,9,11]  u = A[0] for i in range(1, len(A)):     if A[i] > u:             u = A[i]     if u <= 0:         Ans = 1      else:         for j in range(u ,0, -1):             if j not in A:                 Ans = j                 print(Ans)                 break


Modify voting button alt text on Meta sites

We've had  by the nature of Meta voting. This guy proposed a pretty good idea, though... change the voting button alt text on Meta from the standard "shows research effort/clear & useful" to something that explains how voting works on Meta. My personal suggestion is "I (dis)agree with this concept/policy change", but I'm sure we can think of something better than that. Thoughts?


Let $f,g$ be continuous on $\mathbb{R}→\mathbb{R}$ and $f(r)=g(r)$ if $r∈\mathbb{Q}$, is it true that $f(x)=g(x)$ for all $x∈\mathbb{R}$  I think it should be true, but I have no idea how to prove it, anyone could help me? Thanks.


How to read package description or man page without installing?

How can I get information about a package before installing it, from the terminal?  I mean something like man pages, but accessible even before the package is installed.


I am working on an illustration for a client who needs it to be very photorealistic. I used illustrator to get as close to his expectation as possible but its not quite there yet.  Can anyone help me with any notes or recommendations on software and/or tools to use to achieve this?  Any help would be greatly appreciated.  This is what I came up with:   This is what the client needs it to be like:


I tried many type of solution like:  -htmlentities -> When using this, all words have ñ will not display  -htmlspecialchars -> all words have ñ will be "?"  -utf8_encode ->all words have ñ will be "?"  -html_entity_decode(htmlentities($test)); ->When using this, all words have ñ will not display  my code what just a simple select, this is my code:  if (isset($_GET['cityname1']))  {  $cityname = strval($_GET['cityname1']); $cname = mysql_query("SELECT cityname FROM city WHERE provinceid = '$cityname' ORDER BY cityname ASC");  echo "<option value='0'>Select Territory</option>";    while($provincerow = mysql_fetch_array($cname))   {   $pname = htmlentities($provincerow['cityname']);   echo "<option value='{$pname}'>{pname}</option>";   } } else { echo "Please Contact the technical team"; }


How to disable GNOME 3.26.1 snapped windows coupling

So I have noticed that when windows are snapped in Gnome they act as if they are one window when focused on. In other words, if I have a terminal partially on top of two snapped windows, like this:  If I click on any of the two snapped windows to bring it into focus, both windows will be brought into focus (both firefox and sublime in the example above). How do I disable this behavior? I want only the window that I clicked to be brought into focus.


Why does internet suddenly fail on both wired and wireless connections (Ubuntu 16.04)?

NOTE: This is not a duplicate of . That question dealt with a system (running 15.04, kernel 3.19) that did not connect via wireless at all (but presumably could connect via ethernet). The present issue deals with a system that can connect via wifi and ethernet, but the internet connection drops randomly on both wireless and wired (when either is used). In addition, both answers (which recommended upgrading to kernel 4.2) on that previous question cannot be applied to solve this issue. 16.04 already uses kernel 4.4 out of the box.    QUESTIONS: Why does the internet drop from wired and wireless even though they appear to remain connected? Where can I look to begin figuring this out? What diagnostics can I run to probe the wired issue?  SUMMARY: Internet drops every 1-30 minutes when connected via wired or wireless (i.e., this is a problem on both wired and wireless) even though connection icon indicates the computer is still connected.   Disconnecting and reconnecting via the connection icon resets internet temporarily until the next random drop.  Dropped internet is discovered with "The site can't be reached" screens in Chromium, or error messages when downloading/updating in Terminal, or stalled syncing in Insync application.  Internet drops more frequently on wireless than on wired.  It seems to disconnect more frequently with heavier internet use (e.g., downloading multiple files, opening several webpages in quick succession).  This is on a fresh install (yesterday) of Ubuntu 16.04 on a Dell Inspiron 15 5567 (dual boot). The issue also occurs when running on Live CD.   Ethernet and WiFi both work without disconnecting in Windows 10 on the same machine, and ethernet and wifi work on other machines running Ubuntu and Windows with the same router, so it is not a hardware or router issue.  This change from this  did not work:  sudo tee /etc/modprobe.d/iwlwifi-opt.conf <<< "options iwlwifi disable_11n=1"   This change did not work either:  sudo sed -i 's/wifi.powersave = 3/wifi.powersave = 2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf   Output from   sudo lshw -class network    *-network                       description: Wireless interface        product: Wireless 3165        vendor: Intel Corporation        physical id: 0        bus info: pci@0000:02:00.0        logical name: wlp2s0        version: 79        serial: 58:fb:84:55:21:52        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless        configuration: broadcast=yes driver=iwlwifi driverversion=4.4.0-62-generic firmware=17.352738.0 latency=0 link=no multicast=yes wireless=IEEE 802.11abg        resources: irq:283 memory:df100000-df101fff   *-network        description: Ethernet interface        product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:03:00.0        logical name: enp3s0        version: 07        serial: 18:db:f2:3c:d5:37        size: 100Mbit/s        capacity: 100Mbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8106e-1_0.0.1 06/29/12 ip=192.168.1.13 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s        resources: irq:279 ioport:d000(size=256) memory:df000000-df000fff memory:d0300000-d0303fff   Output from:  lspci -knn | grep Net -A2  02:00.0 Network controller [0280]: Intel Corporation Wireless 3165 [8086:3165] (rev 79)     Subsystem: Intel Corporation Wireless 3165 [8086:4410]     Kernel driver in use: iwlwifi   Wireless info script pasted .  I don't know what other diagnostics I can run for the wired connection.


Failed upgrade from Ubuntu 19.10 to 20.04 "Please update the microcode"

While installing the Ubuntu 20.04 updates during upgrade from 19.10 to 20.04, my screen suddenly went completely white and displayed a message saying  Please logout and try again.  But I could not locate my cursor and so I switched off my laptop. After restarting it again, it was showing an error message saying  Please update the microcode  Why did this happen? How can I solve this problem?


Do the wires having AC current emit EM waves?

When ac current is passed through a wire, the electrons in the wire oscillate to and fro in the wire (due to change in polarity of current in the wire). If the ac current is of frequency, say 50Hz, then will the wire emit electromagnetic waves of the same frequency?


Am I being scammed by a sugar daddy? Please help!

I’m going through a tough time financially and decided to find someone who can give me money. Within 3 days of talking, this man paid me. He's asking me to send money to his daughter through Cash App and I’ve seen a lot of stories of people being scammed in that way. He does not have my banking information but he made me send a picture of my ID to make sure I wasn’t scamming. I did, but crossed out all personal info, leaving just my face and name. Should I trust him?


Question!     Show that the pair of positive integers $n$ and $n+2$ are twin primes if and only if $$4[(n-1)! + 1] + n = 0 \ (\text{mod} \ n(n+2)),$$ where $n$ does not equal $1$.


How can I add "Show desktop" to the GNOME dash or Ubuntu Dock?

I am migrating from Unity to GNOME. One item I am missing is a "Show desktop" button (aka "minimise all windows") in the dash. How can I add this functionality to the GNOME dash (or Ubuntu dock in Ubuntu 17.10 and later), even if it means making a custom .desktop file?  (I know that I can use the Ctrl + Super + D   and that I can install , but I specifically want a button in the dash.)


I am a college senior with 3.2 math gpa, who aspire to go to math grad school. I cannot stay in college any longer due to financial difficulties. My junior year I lost focus and got bunch of C's. Tried so hard my remaining two years and did well on analysis I/II, math stats, and complex, and some other applied math classes. But got C in abstract algebra I again (this time was really due to my father passing suddenly, I was quite depressed for months). My application right now is:   gpa:3.2 three summers of research one in physics, one in applied, one in pure math I got two good, one excellent LOR to expect still have chances to take GRE twice some teaching and tutoring experience for the math dept.   What are my chances of getting to good grad school?  Or do I have to do Masters program and detour a bit?  Should I even apply next fall?  Thank you for all insights.


Can Traveling into the past really change the future?

Remembering one of two Original Star Trek series, Spock said that the past couldn't be change, Yet in the other one a science ship mate made it back to the time of WW II and the Enterprise was No longer there in there time  on that planet that had a Rock WormHole.


How are local variables kept in memory when instantiating a function?

function MyFunc() {      var msg = 'hello';      this.speak = function() {          console.log(msg);      } }  var obj = new MyFunc(); obj.speak();     The weird thing about the above code is that it works. Yet 'msg' is not part of the object. So how is 'msg' kept in memory. I would more understand if I did:  this.msg = 'hello'; console.log(this.msg);   because then it's a part of the instantiated object. but how are regular variables like 'var msg' getting saved with this object?  edit: this question is not the same as closure because this is a specific use case.


Where is the apply option in modifiers for 2.9?

As you can see this is a simple question of how to apply a modifier in blender 2.9.  From the image there is no apply option, so where is it?


I am new to Ubuntu, and I am having difficulties with it being the only OS on my laptop. I would like to go back to Windows 10 and install Virtual Box, where I will be able to use Ubuntu occasionally. How could I do that?


Is there some way in Safari, possibly via a third-party extension, to save the running contents of a Web page as a PNG image?  I understand I could print the page to PDF and use Preview to export it as a PNG image. However:   I’d prefer not to create a temporary PDF file and then manually open Preview to export the PDF contents to PNG; I’d like the contents to be running instead of paginated, i.e., no page breaks; When the PDF file contains multiple pages, Preview seems to export the current page only to PNG.   I don’t have any experience with OS X automation but I suspect it could be used for this, though I want conditions 2 and 3 to be met.  I’m running Safari 5.1.1 on OS X Lion.


I am the only person who uses my PC. Is there a way to disable the need to enter my password whenever I add a program, change settings, or sneeze? (my attempt at humour...sorry) I understand laptop users on the go need it a lot more, but to a person like me, it's more of a pain. Plus 20.04 won't let me use my 4 digit pin. I'd be happy hearing that plans for future releases might make it a built in option, rather than tweaking and possibly hurting something. Thanks.


Which is correct: Most information and knowledge is false; Most information and knowledge are false;

I followed the discussion of the use of "Most" and it is evident that if the noun is plural, the verb takes the plural. Most companies are .... But in the example above "Most information and knowledge are false" sounds wrong.


Installation of Ubuntu 14.04 shows error about /boot/efi and takes forever

I'm trying without success to install Ubuntu 14.04 on my Toshiba Portege.   I want to remove Windows 7 and I tried with the automatic partitioning from the USB installer (I found that compared to previous Ubuntu's version it is getting more complicated).   When it finally started installing (first time without any bar of progress, very annoying, then I shut down and tried again and the progress was shown), it is stack on   Creating ext4 file system for / in partition #2 of SCI1 (0,0,0) (sda)   and in the details there are many errors like  /usr/lib/ubiquity/frontend/gtk_components/nmwidgets.py:18: Source ID 86689 was not found when attempting to remove it Glib.source_remove(self.timeout).   I let it run all the night but it is still there.  I also got the error:  The attempt to mount a file system with type vfat in SCSI2 (0,0,0), partition #1 (sda) at /boot/efi failed You may resume partitioning from the partitioning menu.


What good resources exist for an inexperienced user to explain how to safely upgrade Ubuntu Mate to 18.10 from 18.04?

Firstly let me apologize for, what to many will be a very basic question, but I am an 81 year old newbie, who really enjoys using 18.04 MATE on my X550 ASUS laptop (12Gb RAM) without a great depth of knowledge.   I'd like to keep up to date via 18.10 to 19.04 and so on, but have been reading that I must save my home folder, make changes to PPA's etc., which concern me as I'm not confident enough. My real concern is loss of data and the setup I'm using.  I'm sure this has been dealt with before so could somebody direct me to some how to do it sites please, the simpler the better. I hate to be restricted through the fear of breaking something that is working well for me.


Can't seem to upgrade to 20.04 from 18.04 due to held back packages: libsensors4, libsensors-config, colord

I tried to upgrade from 18.04 to 20.04 however there are some held back packages that seem to be blocking me and i don't really understand how to fix them properly. The log file says   2020-04-24 17:38:44,134 ERROR Dist-upgrade failed: 'Broken packages after upgrade: colord'   Checking the apt.log as the instructions mention i see a few with errors  Broken colord:amd64 Depends on libsane:amd64 < none | 1.0.29-0ubuntu5 @un umH > (>= 1.0.24)   Considering libsane:amd64 15 as a solution to colord:amd64 37   Added libsane:amd64 to the remove list   Fixing colord:amd64 via keep of libsane:amd64  Broken libsensors-config:amd64 Conflicts on libsensors4:amd64 < 1:3.4.0-4 @ii gK >   Considering libsensors4:amd64 34 as a solution to libsensors-config:amd64 1   MarkKeep libsensors-config:amd64 < none -> 1:3.6.0-2ubuntu1 @un umN Ib > FU=0   Holding Back libsensors-config:amd64 rather than change libsensors4:amd64  Investigating (3) libsensors5:amd64 < none -> 1:3.6.0-2ubuntu1 @un umN Ib > Broken libsensors5:amd64 Depends on libsensors-config:amd64 < none | 1:3.6.0-2ubuntu1 @un umH >   Considering libsensors-config:amd64 1 as a solution to libsensors5:amd64 2   MarkKeep libsensors5:amd64 < none -> 1:3.6.0-2ubuntu1 @un umN Ib > FU=0   Holding Back libsensors5:amd64 rather than change libsensors-config:amd64  Investigating (3) lm-sensors:amd64 < 1:3.4.0-4 -> 1:3.6.0-2ubuntu1 @ii umU Ib > Broken lm-sensors:amd64 Depends on libsensors5:amd64 < none | 1:3.6.0-2ubuntu1 @un umH > (>= 1:3.5.0)   Considering libsensors5:amd64 2 as a solution to lm-sensors:amd64 0   MarkKeep lm-sensors:amd64 < 1:3.4.0-4 -> 1:3.6.0-2ubuntu1 @ii umU Ib > FU=0   Holding Back lm-sensors:amd64 rather than change libsensors5:amd64  Investigating (4) libsnmp35:amd64 < none -> 5.8+dfsg-2ubuntu2 @un umN Ib > Broken libsnmp35:amd64 Depends on libsensors5:amd64 < none | 1:3.6.0-2ubuntu1 @un umH > (>= 1:3.5.0)   Considering libsensors5:amd64 2 as a solution to libsnmp35:amd64 7   MarkKeep libsnmp35:amd64 < none -> 5.8+dfsg-2ubuntu2 @un umN Ib > FU=0   Holding Back libsnmp35:amd64 rather than change libsensors5:amd64  Try to Re-Instate (4) lm-sensors:amd64   MarkKeep lm-sensors:amd64 < 1:3.4.0-4 -> 1:3.6.0-2ubuntu1 @ii umU Ib > FU=0  Investigating (5) libsane:amd64 < none -> 1.0.29-0ubuntu5 @un umN Ib > Broken libsane:amd64 Depends on libsnmp35:amd64 < none | 5.8+dfsg-2ubuntu2 @un umH > (>= 5.8+dfsg)   Considering libsnmp35:amd64 7 as a solution to libsane:amd64 15   MarkKeep libsane:amd64 < none -> 1.0.29-0ubuntu5 @un umN Ib > FU=0   Holding Back libsane:amd64 rather than change libsnmp35:amd64   There are some more errors but they seem to be coming back to these same ones. I tried to update/upgrade, fix broken packages, there is nothing to be done according to the feedback.  Does anyone have any ideas?


How to install MATLAB in Ubuntu 14.04? I searched in USC, but it only has some extension for MATLAB.


i want to know what app an icon belongs too... how can I find out

I would like to know how I find what app an icon relates to on top left of android phone please. Thanks :)   Looking for the second icon


$\int_{0}^{\infty} f(x) \,dx$ exists. Then $\lim_{x\rightarrow \infty} f(x) $ must exist and is $0$. A rigorous proof?

Let $f: \mathbb R \rightarrow \mathbb R $ be a continuous function such that $\int_{0}^{\infty} \,f(x) dx$ exists.  Then Prove that incase   (i) $f$ is a non negative function, then $\lim_{x\rightarrow \infty} f(x) $ must exist and is $0$.  (ii) $f$ is a positive differentiable function , $\lim_{x\rightarrow \infty} f'(x) $ must exist and is $0$  $Attempt$: For the first part, i don't have a rigorous proof except for the fact that the given condition can be visualised geometrically. Since, the definite integral is actually calculating the area beneath the non negative function, the only way the given limit can exist when limit of f(x) itself tends to 0 at infinity.  Please give me a direction so that i can make this proof rigorous enough.  For the second part, i took an example. We know that ( leaving out the finite integration parts from $0$ to $1$ ..) $\int_{1}^{\infty} e^{-x^2} dx \leq \int_{1}^{\infty} e^{-x} dx$ and the latter converges.  But the derivative of $e^{-x^2} = (-2x)e^{-x^2}$ whose integration does not exist when x $\in~[1,\infty)$ as it's a monotonic function after a finite $x$.  Any help in providing rigor to the above proof will be very helpful  Thanks


Array its not printing its size inside function

It's printing 0 but I expect 1. The size of first dimension in array is omitted because I want to pass multiple arrays entries in this same method how to get this for iteration void printValues(char hotelData[][3][50], int n);  char hotelData [1][3][50] =       {     "unidadeid1Fk", "john fernandes", "executiveRoom"     };  int main( void ) {     printValues(hotelData, 0);     }  void printValues(char hotelData[][3][50], int n) {             int arraySize = sizeof (hotelData) / sizeof (hotelData[0]);     printf("ArraySize: %i ", arraySize); }  Output is  ArraySize: 0  And this code is returning this warning that I don't know what means and how to solve it:  teste.c: In function 'printValues': teste.c:29:32: warning: 'sizeof' on array function parameter 'hotelData' will return size of 'char (*)[3][50]' [-Wsizeof-array-argument]          int arraySize = sizeof (hotelData) / sizeof (hotelData[0]);                                 ^ teste.c:27:27: note: declared here      void printValues(char hotelData[][3][50], int n)


How to proof this equation given a substitution?

I need to proof that $$\int_{0}^{\pi}xf(\sin(x))dx=\frac{\pi}{2}\int_{0}^{\pi}f(\sin(x))dx$$ The problem says that the substitution $u=\pi-x$ is useful. Following their advice $u=\pi-x,du=-dx$ $$-\int_{0}^{\pi}(\pi-u)f(\sin(\pi-u))du$$ What do I do next, this the first time I encounter integrals writeen like this and I am not that familiar with proof thanks in advance !


I am trying to write a quick script that will update a spans text every 1 second to add a random amount of money to the amount. This issue I am facing is the randomNumber variable returns lots of decimal places and doesn't seem to be doing what I want. I just want to add a random number of £0.03 pence to £6.43 added on to the existing number. Is there a way to stop it outputting decimal numbers like 10.333333333333333333 and so on? and possibly just make it more robust and output the correct value.  var number = 0; setInterval(function(){      var randomNumber = Math.floor(Math.random() * (6.43 - 0.3 + 1)) + 0.3;     number += randomNumber;     document.getElementsByClassName("currency")[0].textContent = "£" + number; }, 1000);


Does anyone know how to make Blender remember fbx export settings? Specifically Face Smoothing in the Geometry tab. It keeps defaulting to Normal but I need to to be Face:


Area of parallogram in two dimensions using cross product

I was shocked to find that the area of parallelogram in two dimensions can be found by cross multiplying two adjacent vectors.   I understand that in three dimensions the area of parallelogram is the cross product of two adjacent vectors $$|a \times b|$$ but no text books have explained why in two dimensions cross product of two adjacent vectors are the area of a parallogram. Could someone explain?


Prove that $R$ is a commutative ring if $x^3=x$

Let $R$ be a ring satisfying: $\forall x\in R, \; x^3=x$. Prove that $R$ is a commutative ring.


I've read an answer about traveling via a third country in case dual citizenship might not to be OK, and I don't know whether it is technically possible. I'm a citizen of Germany and Saudi Arabia, and I want to travel via UAE. Once I arrive in Saudi Arabia, I'll try to enter with KSA pass but a Saudi official may see from passport that I live in Germany, and in that point is there a risk that he may ask me for German residence permit or stamps or a visa? How can I possibly tackle this situation?


Depending on my collaborators I use many with my MacBook Pro different videomeeting systems (zoom, google meeting, teams, blackboard, etc). I would like to be able to add a logo during the videocalls and more important, a countdown timer. I know there is not an universal way to do this, since each app has its specifics. Therefore I wonder if I can somehow "overlap" or put on top of my videosignal whatever picture/video I want. I googled a bit but found nothing. Do you know how to do this?


Is it possible to write the Coulomb Hamiltonian in terms of creation and annihilation operators similar to harmonic oscillator?

Is it possible to write the Coulomb Hamiltonian in terms of creation and annihilation operators similar to the harmonic oscillator so that we can have the same commutations relations similar to that of the harmonic oscillator?


Differentiating an inner product w.r.t matrices

Let $M_n(\mathbb{R})$ denotes the space of all $n \times n$ matrices identified with the Euclidean space $\mathbb{R^{n^2}}$. Fix a column vector $x \neq 0$. Define $f:M_n(\mathbb{R}) \rightarrow\mathbb{R}$ by \begin{equation} f(A)= \langle A^2x,x\rangle \end{equation} I am trying to prove $f$ is differentiable.  It looks like you have to find the derivative w.r.t the matrix $A$. How do I do that? Any help is appreciated.


If $k>0$ is a positive integer and $p$ is any prime, when is $\mathbb Z_p[\sqrt{k}] =\{a + b\sqrt k~|~a,b \in\mathbb Z_p\}$ a field.

If $k>0$ is a positive integer and $p$ is any prime, when is $\mathbb Z_p[\sqrt{k}] =\{a + b\sqrt k~|~a,b \in\mathbb Z_p\}$ a field? Find necessary and sufficient condition.   Attempt: Since we know that a finite integral domain is a field and since $\mathbb Z_p[\sqrt{k}]$ is finite, it suffices to find the condition when $\mathbb Z_p[\sqrt{k}] =\{a + b\sqrt k~|~a,b \in \mathbb Z_p\}$ forms an integral domain.  The given set forms a commutative ring with unity. Hence, the only condition that needs to be satisfied is the absence of any zero divisors.  $(a_1+b_1 \sqrt k)(a_2+b_2 \sqrt k) = (a_1a_2+b_1b_2k)+(a_1b_2+a_2b_1)\sqrt k$  Case $1$: When $k$ is not a perfect square  $(a_1+b_1 \sqrt k)(a_2+b_2 \sqrt k)=0 \implies (a_1a_2+b_1b_2k) \bmod p=0~~ \& ~~ (a_1b_2+a_2b_1) \bmod p =0$  Case $2$: When $k$ is a perfect square $ = u^2$  $(a_1+b_1 \sqrt k)(a_2+b_2 \sqrt k) = 0 \implies (a_1a_2+b_1b_2 u^2 + (a_1b_2+a_2b_1)u ) \bmod p=0 $  Both the above cases can have many cases and seems a bit complicated. Am I missing out on something? The book which I am reading (Gallian) hasn't introduced Quadratic Residues as of yet. Thank you for the help.


Getting rid of questions with tags in title

and I usually go out of my way to search for those and edit them, since this seems to be very common with iOS questions, which is where I usually live. What is interesting is that several of the questions using the form "[tag]: Why shouldn't I foo the bar?" or other similar forms aren't even tagged with [tag].  For this particular case, the fix is usually straightforward:    Remove the tag term from the title Add it as an actual tag.   Would it be possible to figure out the usual patterns in which tags in titles occur and batch edit the ones that fall under those cases?


What's the correct pronunciation for Luffy or Rufi?

What's the correct pronunciation of his name? Luffy or Rufi?  , it says "Monkey D. Luffy (モンキー･D･ルフィ Monkī D. Rufi)".


If I have a 58% chance of winning a point, what's the chance of me winning a ping pong game to 21, win by 2?

I have a bet with a co-worker that out of 50 ping pong games (first to win 21 points, win by 2), I will win all 50. So far we've played 15 games and on average I win 58% of the points, plus I've won all the games so far. So we're wondering if I have a 58% chance of winning a point and he has a 42% chance of winning a point, what's the percent chance that I would win the game? Is there a formula that we can plug in difference % chances?  We've googled all over and even asked the data scientists at our company but couldn't find a straight answer.  Edit: Wow, I am blown away by the thoroughness of responses. Thank you all so much!!! In case people are curious, I have an update to how my bet is going: I've now won 18 out of 50 games, so I need to win 32 more games. I've won 58.7% of all points and my opponent has therefore won 41.3% of points. The standard deviation for my opponent is 3.52, his average score is 14.83, and his median score is 15.50. Below is a screenshot of the score of each game so far. I can keep updating as the bet goes on, if people are interested.  Edit #2: Unfortunately we've only been able to play a few more games, below are the results. I'm just going to keep replacing the picture so I don't have a bunch of screenshots of the score.  Final Update: I finally lost to my co-worker on game #28. He beat me 21-13. Thanks for all of your help!


While trying to compile my latex document, I get the following error:  "Unicode char \u8:‒ not set up for use with LaTeX."   The line number associated to the error seems meaningless. It points to a line where there is definitly not the erroneous charachter. Even if I remove the line the error points to, the error still appears (at the same line number, even though the line content has changed due to the deletion).  So my question is: How can I find the erroneous character in my file? The file is huge, so I can't look manually through all lines.


Windows Lost Partition Recovery [Emergency]

I accidentally deleted my E drive partition and i did not know. I extended my C drive, hence E drive's unallocated space was extended in the C drive. Now how can i get my files back of E drive? Its kind of emergency, can someone help me?


How can I find out if the Bootloader is locked or not?

Is there a direct way to find out if the bootloader on a new unrooted device is currently locked or not? I would like to do this without the risk of clearing or bricking the device. I am looking for some command in adb or fastboot that will just provide this information.  The reason I ask this, is because all my rooting attempts have failed so far. I suspect a locked bootloader.


Is there a name for "uncentered covariance matrix"?

If I have an $n\times p$ data matrix $X$ with $n$ observations, one in each row, and $p$ variables, one in each column, then I can call $XX^T$ "gram matrix", but is there also a name for $X^TX$ or $\tfrac{1}{n-1}X^TX$?


How can I change the centre of rotation of objects during an animation?

I have developed several puzzles in Blender, and to test them I wanted to animate them.   The first problem I encountered was the rotation of an object around a central hub.   Between keyframes the object would cut across rather than follow the circular path.   To solve this I moved the origins to the centre of rotation, and that worked fine.   The next problem was to move the rotation of one or more of the objects to another hub.   This is where it gets a bit tricky!   It's not practical to have to keep changing individual origins for every keyframe.   I've tried parenting to the hubs but this doesn't make it any easier.   Perhaps there is a way with armatures?   Maybe I've missed something very basic.  I made a small demo to illustrate the kind of rotation I mean:   Keyframe 1.   Keyframe 2.   Keyframe 3.  At this stage there are three answers to my question, and all of them require constraint influences to be turned on or off for each object that needs to change its centre of rotation. Multiply this several times and it becomes a bit of a nightmare!  I'm thinking that to position the 3d cursor at the centre of the wheel and then select all the objects required to turn for each rotation might be easier than the answers so far, but I was hoping for something more straight forward than that.  Don't get me wrong, I do appreciate the effort you guys have put in so far, thanks. :)


How do I see a list of all suspended users?

Can users be filtered by their "suspended" status? I'd like to see a list of all users who are currently suspended.


I'm trying to prove that  $$ \sum_{k=1}^{\infty} 7^{-k!} $$  is irrational but I'm so lost. Any tips for where to begin, thanks in advance.


Is there a equivalent application to Everything search engine (Windows) on Ubuntu?

IMO,  is the best desktop search software on Windows and I wonder if there is an equivalent utility on Ubuntu ?


Discreteness of Spacetime and Violation of Lorentz symmetry

It is usually said that existence of discrete spacetime violates Lorentz symmetry. What quantity is used to quantify such violation? I mean could someone points a reference for a derivation that shows such analysis.  My other question is: if Lorentz symmetry is violated, does that imply space-time is discrete? or not necessarily?)


How to solve "Temporary failure in name resolution'' in Ubuntu 20.04?

I am using Ubuntu 20.04. I just faced an error "Temporary failure in name resolution". I am unable to access the internet. At first, it was just happening in the terminal. If I ran a command in the terminal, it was displaying the error. But browsers were working, but a bit slow. But now, nothing is working. I can't access any website. And the terminal is displaying the same error. I have disconnected the modem, rebooted the device, but nothing works. I am dual-booting Windows 10 and Ubuntu 20.04. And the internet is working fine on Windows. So, I don't think there is a problem with my Grammenphone Modem. What should I do now? How to fix the problem? Update 14/08/20: Now, Terminal can fetch files from some sources, but not all. Mainly, it can't fetch files from "archive.ubuntu.com". Actually it is "bd.archive.ubuntu.com" as I am in Bangladesh. It also fails to fetch files from some other sources. Such as "dl.winehq.org" and "debrepo.freedownloadmanager.org".


Predefined Coordinate Systems missing in QGIS 2

in QGis 1.8 were lots of predefined coordinate systems (national projections). Where have they all gone in qgis 2.0? I specifically need the Gauß-Krüger-Projections Zone 1 to 5.  Is there any plugin to load those coordinate systems?


Find out trace of a given matrix $A$ with entries from $\mathbb{Z}_{227}$

Let $A$ be a $227\times 227$ matrix with entries in $\mathbb{Z}_{227}$ such that all of its eigen values are distinct. What would be its trace? I think it is zero by adding all 227 elements but i am not sure.  Edited: Here I have assumed that eigenvalues are in a base field.


How to call a function in another cpp file in mex file?

I am testing to call another function in my mex file. But I came across a building error.  " "void __cdecl transferarray1(struct mxArray_tag const *,class std::vector > &)" (??$transferarray1@H@@YAXPEBUmxArray_tag@@AEAV?$vector@HV?$allocator@H@std@@@std@@@Z) test.mexw64 : fatal error LNK1120" My code is below: test.cpp:  #include "mex.h" #include <vector> #include "inoutmex.h" using namespace std; void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { vector<int> idx; transferarray1(prhs[0],idx); }   inoutmex.cpp  #include "mex.h" #include <vector> using namespace std;  template <typename T>  void transferarray1(const mxArray *ix, vector<T>&V) {     mwSize num = mxGetNumberOfElements(ix);     mxDouble *ptr;     ptr = mxGetPr(ix);     for (int i = 0; i < (int)num; i++)     {         V.push_back(T(*ptr++));     } }   inoutmex.h  #include "mex.h" #include <vector> using namespace std; template <typename T>  void transferarray1(const mxArray *ix, vector<T>&V);   These 3 files are all under one directory. I think it must be related to link problem.  I ran the command mex test.cpp in matlab command line. It gives the link error. Any suggestion will be appreciate.


Confusing message when I try to award a bounty

When awarding a bounty to the , I got this message:    I clicked OK and expected that the bounty will get immediately awarded. Instead, I got this orange box:    I suppose the reason is that to award bounty, at least 24 hours must pass from the moment it was started. That's cool, but in cases like mine, I would expect to see the orange box only - the "Are you sure" dialog should be displayed only if it is actually possible to award the bounty.


Cannot access web server at my house when I share an external IP

For years I've used Comcast and have had port 80 open to a web server at my house, without issue. I switched to CenturyLink fiber last week and port 80 forwarding works and my server is also visible to the outside world.  If I am at home and on the same local network as the web server (everything connected to the same router), I cannot access the sites by using the domain names. If I sign onto a VPN or turn wireless off on my phone, I can see the site by using the domain name.  I'm at a loss. Does anyone have any idea why this would happen?   CenturyLink fiber connection C2100Z modem/router combo


Is there any way to define separate redirects for Cancel button and Save button on record creation screen?

I've built a lightning component that runs when the user clicks the standard 'New' button on the Opportunities related list on Account. My component invokes e.force.createRecord meaning it shows the Opportunity record creation modal when ran.   The Opportunity record creation modal has 3 buttons (Cancel, Save and New, and Save). Is there a way to define separate redirects for Cancel and Save? Currently I can define one redirect that gets applied to both the Cancel and Save button, via the following code:  var createRecordEvent = $A.get("e.force:createRecord");         createRecordEvent.setParams({             "entityApiName": "Opportunity",             // Prepopulate values:             "defaultFieldValues": {                  "AccountId" : recordId //,                  // Add more default values here if desired:             },             "panelOnDestroyCallback": function(event) {                 window.location.href = "https://www.google.com";             },             "recordTypeId":rtDet.id         });         createRecordEvent.fire();   Here's an image to better illustrate my dilemma:


Copyright, Outright Copying and Client Requirements

I've been asked to recreate some vector artwork based on an image supplied by my client "from the internet". I told them I cannot copy it exactly but can create something of a similar nature.  "Oh if we just change it 10% it's fine", was the response. Mmmhmm.   I've investigated further and found the image was created by an artist craftsman who does some amazing work, so obviously I'm not prepared to recreate it but what are my options here?  She's hell bent on the supplied design. Do I suggest something completely different?  Do I leave it completely alone?     Any suggestions welcome. Thanks


How to determine highest power of $2$ in $3^{1024}-1$?

Highest power of two that divided $3^{1024}-1$     Q: I did from binomial and expansion but is there a smarter way ?   My approach : $ 3^{1024}-1 $ can be $(3^{512} + 1)$ and $(3^{512} – 1)$ $\quad $Again $( 3^{512} – 1 )$ is written as $( 3^{256} + 1 )$ and $( 3^{256} – 1)$ $\quad \quad $Again $( 3^{256} – 1 ) $ is written as $( 3^{128} + 1 )$ and $( 3^{128} – 1)$ $\quad \quad \quad $Again $( 3 ^{128} – 1 )$ is written as $( 3^{64} + 1 )$ and $( 3^{64} – 1)$ $\quad \quad \quad \quad $Again $( 3^{64} – 1 )$ is written as $( 3^{32} + 1 )$ and $( 3^{32} – 1)$ $\quad \quad \quad \quad \quad $Again $( 3^{32} – 1 )$ is written as $( 3^{16}+ 1 )$ and $( 3^{16} – 1)$ $\quad \quad \quad \quad \quad \quad $Again $( 3^{16}– 1 )$ is written as $( 3^{8}+ 1 )$ and $( 3^{8} – 1)$ $\quad \quad \quad \quad \quad \quad \quad $Again $( 3^{8} – 1 )$ is written as $( 3^{4} + 1 )$ and $( 3^{4}– 1)$ $\quad \quad \quad \quad \quad \quad \quad \quad $Again $( 3^{4}– 1)$ is written as $(3^{2} + 1)$ and $( 3^{2} – 1)$    $\quad \quad \quad \quad \quad \quad \quad \quad \quad $Again $( 3^{2} – 1)$ is written as $( 3^{1} + 1 )$ and $( 3^{1} – 1)$ $\quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad $or $ 2^2 $and$ 2^1$          Now it can be observed that each of $( 3^{512} + 1), ( 3^{256} + 1) , ( 3^{128} + 1) , ( 3^{64} + 1)$ , $( 3^{32} + 1)$ , $(3^{16} + 1) , (3^{8} + 1)$ , $(3^{4} + 1) , ( 3^{2} + 1)$ is divisible by $2$ but not by $ 2^{2}$.              In other words, maximum power of $2$ that can divided each of $( 3^{512}+ 1), ( 3^{256}+ 1) $ , $ ( 3^{128} + 1) , ( 3^{64}+ 1)$ , $( 3^{32} + 1) , (3^{16} + 1) , (3^{8} + 1) $,$ (3^{4} + 1)$ and $( 3^{2} + 1)$ is $1$.           As they are total $9$ terms hence expression is divisible by $2^9$ and rest two terms $2^2$ and $2^1$ will be divisible by $2^3$. Hence, maximum power of $2$ that can divide $3^{1024} – 1$ is $12$.


The distribution of the initial point of an AR process

Consider a stochastic process $\{X_t, t = 1, 2, \ldots\}$ following the model $$X_t = \alpha X_{t-1} + e_t,$$ where $e_t \thicksim f$.  Can I say that the distribution of the initial point, $X_1$, is the same as $f$? Can I say that the stationary marginal density, if it exists, of $\{X_t\}$ is same as $X_2 (\stackrel{D}{=}\alpha X_1 + e_2)$?  I think that the stationary marginal density, if it exists, of $\{X_t\}$ is the same as $X_2$, but not necessarily same as $X_1$.


When is it okay to not use a comma before an 'and' or 'or' followed by an independent clause?

I punched him and he cried.   or   I punched him, and he cried.   Are both acceptable? Is one better than the other? Personally, I like the first one best, as it better shows the cause/effect relationship of the two clauses, but I am not confident that it is gramatically correct.  He told me to do it or I would have to leave.   or  He told me to do it, or I would have to leave.


A word for delight at someone else's failure?

Is there a word for the selfish kind of (possibly humourous) delight felt at someone else's failure?  e.g.     No matter how I tried, I couldn't complete the seemingly simple task. So feeling like an idiot I gave up and asked the expert. But to my ______, he couldn't do it either!   Edit  I don't feel like schadenfreude really fits - it seems to be more about a sadistic sort of pleasure in someone else's bad fortune. Whereas I'm looking for a sort of combination of humour, a touch of triumph and maybe even relief - and a little bit of, as Walt said, "it's not just that I'm an idiot" (if applicable).


Hello! Is there a way to modify a string from user raw_input in python?

I am a beginner python programmer and am trying to figure out how to modify input from a user.   y=raw_input("Enter the date in this format 'yyyy-mm-dd'") #user enters  x=y-2 #I know this isn't how you would do this just trying to show an example of  #what I am attempting.    I am trying to set a second variable x equal whatever date the user enters minus 2 days. I am later trying to pass the second variable in a datetime format in apscheduler. Is there any way to do modify a string like this?


I just started learning ML myself in python. I didn't understand a passage in the code and would be happy if you made it clear to me what he was saying. Plus I don't know what [:, -1] and [:,: - 1] do  inputs = training_data[:,:-1] outputs = training_data[:, -1]


Does anyone know how to use apt links on Lubuntu with Opera? I've found tutorials that work on Opera Ubuntu and Firefox Lubuntu, but none for Opera Lubuntu.  Thanks


Moving wp-config.php outside root folder where we have multiple wordpress websites for enhanced security

I have moved wp-config.php but my file structure is as given below:  public_html --abccom --applecom --wp-config.php   abcom and applecom folder has  wordpress websites both As advised, I have moved wp-config.php outside abccom for security, but now when I need to do the same for applecom, how can I achieve it?


How to pass getContext to Java class not working?

I am creating common java class for ProgressBar i getting error like below  java.lang.NullPointerException: Attempt to invoke virtual method 'void app.bridgecenterandstaffmanagament.com.bridgecenterandstaffmanagament.CommonClass.Singletonclass_obj.showProgressBar(android.content.Context)' on a null object reference                                                                                at app.bridgecenterandstaffmanagament.com.bridgecenterandstaffmanagament.Fragments.NotificationFragment.onCreateView(NotificationFragment.java:41)   Fragment   public class NotificationFragment extends Fragment {       public NotificationFragment() {         // Required empty public constructor     }      RecyclerView recyclerView;        @Override     public View onCreateView(LayoutInflater inflater, ViewGroup container,                              Bundle savedInstanceState) {         // Inflate the layout for this fragment          View v = inflater.inflate(R.layout.fragment_notification, container, false);           recyclerView = v.findViewById(R.id.recylierview_notification);           // Singletonclass_obj.getInstance().showProgressBar(getActivity());         Singletonclass_obj.getInstance().showProgressBar(getContext());        // print();          return v;     }   }   Java class  public class Singletonclass_obj extends Application{     private  ProgressBar progressBar;     private static Singletonclass_obj singletonclassobj;        public static Singletonclass_obj getInstance() {         return singletonclassobj;     }      @Override     public void onCreate() {         super.onCreate();         singletonclassobj = this;     }      public void showProgressBar(Context context)     {       //  Toast.makeText(context, "welcometoindia", Toast.LENGTH_SHORT).show();         progressBar = new ProgressBar(context, null, android.R.attr.progressBarStyleSmall);     }      public void hideProgressBar()     {         if (progressBar !=null && progressBar.isShown())             progressBar.setVisibility(View.INVISIBLE);      }  }   Same codeing working fine my last Project..please help me any one.


High pitch noise when monitor displays anything in table form

I've come across a lot of posts handling noises of batteries, computers, chargers,... but what I'm experiencing, I've never seen before.   I'm working on a LG Ultrawide monitor 29UM65 (ratio 21:9). Whenever I display anything with lines on a regular distance (f.e. excel, other table-based applications or webpages), my monitor starts making a high pitch noise. It's very noticable for me, but the majority of the people in the office don't notice this.  What I'm curious about is what could be the cause of this, technically? It's as if the refresh rate of the monitor could make a difference, although I haven't found how to change that for this one (probably not possible at all).  Any ideas what could be causing this behavior and if there's something that could be done to resolve it?


about to install linux, full format or partition?

I'm about to switch from windows to ubuntu but I'm pondering if I should do a whole format when installing ubuntu or keep windows on the side. I'm saving some files that I care about on an external hard drive but I'm anxious I might miss some of those. I don't save everything because it's too large (and larger than my hdd).  My question is whether I should do a full format or install ubuntu in another partition :   Since I might miss some files and I'm planning to install ubuntu and let the windows install intact (until I'm sure there is no file I forgot to save). I'm planning to remove the windows files in the upcoming months. I'm wondering if making an install "next to" windows is not as clean as doing a full formatting ? In other words, ubuntu will be installed in another partition (I guess) then the windows partition will be deleted, will ubuntu then take the whole hard drive for itself ? Will there be any residual garbage from windows ?   If it's indeed cleaner to remove everything and install ubuntu I'll take the risk of missing some files.


Diablo games tend to be very click heavy - click to move, click to attack, click to loot.  Diablo 3 appears to be continuing this tradition.  I find this problematic for a couple of reasons:   Clicking is overloaded - I might move when I want to attack, for instance. Clicking hurts - I have a RSI that means that trying to play a click-heavy game for more than a short while causes pain.   Is there any way I can do less clicking in this game?  Can I move using WASD, for example?  If not, what other things can I do to reduce the number of clicks it takes to play?  What settings or other strategies can I employ to reduce my dependence on clicking?


How can I make functionality accessible directly from my package (not a module within that package)?

I'm really interested in creating a package in python. To do so, I watched and read several tutorials but there is always something that doesn't want to work. What I'm doing I created a folder package__tutorial in which I have another folder which corresponds to the name of my package - mypackage. Folder mypackage contains two files:  __init__.py - file which indicates where the package is functions.py - file which contains functions to be included into the package  In functions.py have some one basic function: def average(x,y):     return (x+y)/2  To summarize - my file structure is the following package__tutorial containing mypackage containing __init__.py and functions.py. Now - to load my package I just need to use: from mypackage import functions  Then to use function average from this package we just need to use: functions.average(2, 8)  However importing a file containing functions it's not so convenient for me. Is there any possibility to make this import in a standard way as to other packages ? For example - import numpy as np np.linspace()  I would prefer to have exactly the same: import mypackage as mp  mp.average()  Is there any possibility to do so ? To do not import specific file containing functions, but just a package. EDIT I read the post you have given me, and in __init__.py I included: from .functions import *  and it solved the issue. Thanks!


Here is my script:  #!/bin/bash  echo "Digite o local em que deseja instalar o IGRAFU(pressione enter para  instalar em  ${HOME}/IGRAFO):" read caminho if test -z $caminho then caminho="${HOME}/IGRAFO" fi echo "O IGRAFU será instalado no diretório: $caminho" mkdir -pv $caminho  mv -v ./* $caminho echo "Pronto!"   At 'read caminho' I may receive from the user a path like ~/somefolder. When the script receives that kind of path both mv and mkdir won't make tilde expansion, so it will try to create a ~/somefolder and not /home/username/somefolder and therefore fail.  How do I ensure that the tilde will be converted into the HOME variable?


Title of space opera novel where they implant a parasite on people who have died

I read this great book a while ago and have not been able to find it since.  It's a space-opera novel involving a society in which a parasitic organism is planted in people who have died, reviving them but they're not the same once revived. I remember that on the back of the book it was advertised with a catchy quote "The dead are dying" because the parasite would eventually die itself as well so it didn't guarantee eternal life.  Not everyone got the parasite, you had to do something special to earn it. It also involved a female politician who was against the process because the life extension process was too heavy a burden on society. It also involved a war hero who underwent some horrendous torture as a POW. He and the politician hook up. The story also pulls in a woman warrior from an all-female society. This is probably enough information for anyone who has read this novel before and can remember the title or even the author would be enough.


10 parameters separated by comma. How can I do it?


How to count number of positive solutions of an equation $x_1 + x_2 +...+ x_n = s$ where $0 < x_i \le c $.

I want to solve the equation: $$ x_1 + x_2 +...+ x_n = s \\ \text{where }\ 0 < x_i \le c  $$ Or to rephrase the question count number of ways to break number $s$ in to $n$ numbers where each number is between $1$ to $c$. Without upper bound $x_i < c$ I can use stars and bars method. But since i have upper limit can i still use same method with some modification? Or can you reference me to some other method which can help me solve this.


Banach Matchbox Problem:   Suppose a mathematician carries two matchboxes at all times: one in   his left pocket and one in his right. Each time he needs a match, he   is equally likely to take it from either pocket. Suppose he reaches   into his pocket and discovers for the first time that the box picked   is empty. If it is assumed that each of the matchboxes originally   contained $n$ matches, what is the probability that there are exactly $k$   matches in the other box?   I'm wondering whether the following reasoning is right, because it doesn't match up with the correct probability. But here goes my reasoning:  Assuming there are $k$ matches left in the other box, we have had to take $2n-k+1$ matches to notice there are none left. The total number of ways in which we could have picked those is $2 {2n - k \choose n}$, for either the matchbox in the left or right pocket has $k$ matches left inside, and in the $(2n-k+1)$th pick we would have found an empty box.   The total number of possibilities, taken over all possible sizes $k$, would then be $\sum_{m=0}^{n} 2{2n-m \choose n}$. So I'd assume the overall probability would be $\frac{2 {2n - k \choose n}}{\sum_{m=0}^{n} 2 {2n-m \choose n}} =\frac{{2n - k \choose n}}{\sum_{m=0}^{n} {2n-m \choose n}}$.  However, the mentioned solution is ${2n - k \choose n} (\tfrac{1}{2})^{2n-k}$. Where is my reasoning wrong? Thanks in advance.


Getting a refund From Cancelled TAP Air Portugal flight due to COVID-19

Our TAP Air Portugal flight From San Francisco to Barcelona, scheduled for Apr 28, 2020, was canceled by the airline. We called TAP Air Portugal and asked for a full refund to our credit card, which was the original form of payment. The airline representative confirmed that a refund to a credit card would be issued. However, a few days later we received "TAP Vouchers" from the airline, which expire in March 2021, and which were not what we asked for. We called the airline again and asked for a refund to a credit card once more, but we got a reply "Vouchers are how we handle flight cancellations due to COVID-19 policy". Any attempts to get more information led to the same phrase repeated again. We filed a complaint on  but still didn't get any reply from the airline.  We believe we have a right to get a refund according to , Article 8, which is confirmed by .  Do you know what we can do next to get our money back to the credit card?


How to make xargs handle spaces and special chars from cat?

I have a file that contains a list of names. i.e.:  Long Name One (001) Long Name Two (201) Long Name Three (123) ...   with spaces and some special characters. I wanted to make directories out of these names, i.e.:  cat file | xargs -l1 mkdir   It makes individual directories separated by spaces, i.e. Long, Name, One, Two, Three, instead of  Long Name One (001), Long Name Two (201), Long Name Three (123).  How can I do that?


Confused About Trigonometric Substitution

I'm learning Trigonometric Substitutions, they gave us the following example in the book:    I'm confused about how exactly we make the substitution $x= a\sin(\theta)$  In regular substitution we have to take something from the integrand and substitute it for u. Why is it in this case we can use $a\sin(\theta)$ when I do not see it in the integrand?


ssh: connecting through localhost port 22

Hey so whenever I try connecting ssh through port 22 I get this error,  ssh: connect to host localhost port 22: Connection refused  The linux computers have a static IP of 192.168.2.128/129   I reinstalled ssh fresh and still get this error, I've been able to get  access to my device but without privileges Can someone help or guide me in sucessfully connecting both linux terminals, any help is appreciated. Thx  When i ssh -v pwnie@localhost 192.168.2.128 from my laptop I get a permissions token error  OpenSSH_7.4p1 Debian-6, OpenSSL 1.0.2h  3 May 2016 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: Connecting to localhost [::1] port 22. debug1: connect to address ::1 port 22: Connection refused debug1: Connecting to localhost [127.0.0.1] port 22. debug1: connect to address 127.0.0.1 port 22: Connection refused ssh: connect to host localhost port 22: Connection refused


iOS app consecutive Expedite review Request

I just made an "Expedite review" request to apple for a major bug yesterday and Apple approved the app in few hours.  Now (Today) I want to request Expedite review again of-course for a major reason.  What is the chance of approval again?  Will that affect my future requests?


proving logical equivalence $(P \leftrightarrow Q) \equiv (P \wedge Q) \vee (\neg P \wedge \neg Q)$

I am currently working through Velleman's book How To Prove It and was asked to prove the following  $(P \leftrightarrow Q) \equiv (P \wedge Q) \vee (\neg P \wedge \neg Q)$  This is my work thus far  $(P \to Q) \wedge (Q \to P)$  $(\neg P \vee Q) \wedge (\neg Q \vee P)$ (since $(P \to Q) \equiv (\neg P \vee Q)$)  $\neg[\neg(\neg P \vee Q) \vee \neg (\neg Q \vee P)]$ (Demorgan's Law)  $\neg [(P \wedge \neg Q) \vee (Q \wedge \neg P)]$ (Demorgan's Law)  At this point I am little unsure how to proceed.   Here are a few things I've tried or considered thus far:  I thought that I could perhaps switch some of the terms in step 3 using the law of associativity however the $\neg$ on the outside of the two terms prevents me from doing so (constructing a truth table for $\neg (\neg P \vee Q) \vee (\neg Q \vee P)$ and $\neg (\neg P \vee \neg Q) \vee \neg (P \vee Q)$ for sanity purposes)  I can't seem to apply the law of distribution since the corresponding terms are negated.  Applying demorgans law to one of the terms individually on step 2 or 3 doesnt seem to get me very far either.  Did I perhaps skip something? Am I even on the right track? Any help is appreciated


Newton's methods vs. Newton's method in optimization

In my applied regression course I was given the following equation for the Newton-Raphson's method: $$b_{n+1}= b_n - \frac{\nabla f(b_n)}{\nabla^2 f(b_n)} $$ Reading further, I found that the Wikipedia article  defines it as $$b_{n+1}= b_n - \frac{ f(b_n)}{\nabla f(b_n)} $$ I was quite confused why they would give me a different equation than what seems usual and then found a different article  which provides the first formula. What are the differences between these two? When do I use which?


Determine the value of the angle $\alpha$ of the figure below.


Careers: What does "allows remote" mean?

When a posting is marked "allows remote", does it mean work in the office some days, work from home some days?  Or does it mean you could actually live out of town and maybe fly in as needed?  The reason I ask is I'm really interested in public facing software rather than internal/enterprise stuff, and most of that seems to happen in a few very expensive cities.  Given it's so hard to hire in places like SV/NYC, it seems like it could be a good scenario for companies if a developer had a really solid list of accomplishments, but I don't know how many companies think this way.


I jailbroke my old iPod Touch 3rd Generation, with IOS 5.1.1, using the latest version of absynthe. It worked for several months, but then it randomly stopped. It went into safe mode, but the touch screen wouldn't work. It showed the lockscreen, but nothing worked at all, except for the physical buttons. The only way to reboot is to follow the same steps as DFU mode (Hold power button 3 sec, then home button AND power for 10, then just home for 8)... However, it always boots right back into Safe mode.  I had to restore, and once rejailbroken, it worked fine, until I installed SBsettings. Then it did the EXACT same thing, and I had to restore and re-jailbreak AGAIN! The other day, I finished installing ALL of my extensive list of tweaks, and got it to about where I wanted it, when lo and behold, it booted to safe mode again. I have spent so much time on this, and I do not want to do it again. Does anybody here have any knowledge on the topic? Is there a program I can run from my computer to manually control the device or kick it out of safe mode? Is there some other method of doing this? I am looking for any solution OTHER than restoring. I have done that several times.  Also, I know the problem isn't with my jailbreak. It worked for several months before, then one day stopped. Now, it has the problem within a day of rejailbreaking, OR instantly if I install SBsettings. I re-installed the jailbreak, and applied the new one as well, and that didn't work. I have given up, and don't want to go through the painful process of restoring, rejailbreaking, and re-installing all of those tweaks again.  Also, because I can't get into my iPod, I can't provide a list of tweaks. I would if I could, but it just can't happen unless I can get in there.


jQuery validate: How to add a rule for regular expression validation?

I am using the  validation plugin. Great stuff! I want to migrate my existing ASP.NET solution to use jQuery instead of the ASP.NET validators. I am missing a replacement for the regular expression validator. I want to be able to do something like this:  $("Textbox").rules("add", { regularExpression: "^[a-zA-Z'.\s]{1,40}$" })   How do I add a custom rule to achieve this?


What is the need to include the "additive identity exists" axiom in the set of vector space axioms?

A vector space is a set V along with an addition on V and a scalar multiplication on V such that the following properties hold, according to S. Axler's Linear Algebra Done Right:  Commutativity Associativity Existence of additive identity Existence of additive inverse Multiplicative identity Distributive Properties  Now, by definition, an addition of two elements in the set V should also be a member of V. Using that fact, and (4) from the list above, shouldn't (3) be provable? Note: A few more moments of thought made me question my statement. What is $0$? Unless (3) is taken, does (4) make any sense? Am I on the right track? Also, S. Axler says, about subspaces, that they have to satisfy three conditions for them to be considered a subspace (excluding the condition that they have to be a subset of a vector space, which would ensure that the other properties (distributive, commutative) are satisfied $\forall v \space \epsilon\space Subspace$).  $0 \space\epsilon\space Subspace$ Scalar multiplication is closed. Addition is closed.  In addition to this, he also says we can replace (1) here with a similar condition:  The subspace is non-empty.  He says that since scalar multiplication is closed within the subspace, and that $0v = 0$ (the proof of this involves the additive inverse axiom and the fact that the "Zero" produced by the inverse CAN be added to a vector from $V$; Does this zero have to exist within $V$ for us to define "addition" between this zero and a vector from $V$?) for any $v\space\epsilon\space Subspace$, this would imply that $0\space \epsilon \space Subspace$. So here, is this replacement possible only because (3) from the vector space axioms defines "zero"? Note: I tried my best to organize my thoughts and questions, but something seems amiss. I know my questions aren't sequential and coherent but I am struggling to understand which part of this is the head and which one's the tail.


I need to prove that $n^2 < 2^n$ for all natural numbers $n$ greater than $4$.  I understand that you start by proving the base case of $n = 5$ and then prove the inequality substituting the inductive hypothesis for $n + 1$, but I am unsure about how to do this.


How do I display more decimals in the output console?

I want to output the value of a double in it's full precision. However, when using the cout function, it only displays the first 6 digits even though there is around 15-16 digits of precision.   How do I get my program to display the entire value, including the magnitude (power) component?