Basically,  What I'm trying to do is have a button which when you click, loads up another .html form  which has a button to the next .html page and so on and so on..  The first part works, and, for the form to be loaded, however, when the next form is loaded the jquery does not work for the button.. For example:  index1.html:  <button id="LoadForm" value="form1.html">Load the form</button>  $(document).ready(function() {     function foo(x) {         $('.content').load(x);     }      $('#LoadForm').click(function() {         var ele = $(this).attr("value");         $(this).hide();         form(ele);     }); });    In form1.html:  <button id="LoadForm" value="index.html">Go to form2..</button>  Where am I going wrong here?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I changed my operating system from windows 8 to UBUNTU by using a usb stick but in the process i lost all of my data. is there any way to recover it? Please help me the data was very important.

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


I can't seem to write this symbol "< >" in Latex.

When typing < or > in LaTeX and compiling with pdflatex, the less than and greater than symbols appear at upside down exclamation points. I'm not in math mode.


Suppose I have a document like this, in ConTeXt:  \define[1]\mymacro{{\it #1}} \starttext     This is some text. There are some key words in this text,     but I need the code to automatically find     and treat it as if `\mymacro{}` was     written around it. \stoptext   Given a list of words, is there a way to have ConTeXt mark those words, such that \mymacro{} is treated as being around them?  E.g. if the list of words was: key, written, as if, then the output would make "key", "written", "as if" in italics.  This will be used for more complex functions, such as automatically placing in pictures with a filename matching those the key words, e.g.:  \define[1]\mymacro{     #1 \externalfigure[#1][width=\paperwidth] }   Is there any way to have ConTeXt automatically treat key words as having a macro on them, even if the macro isn't manually written in?

Is it possible and furthermore constructive to make LaTeX automatically format specific words in specific way? Let's say, for example, I'd like to have every occurrence of the word "hello" in a bold cyan monospaced font, whereas the rest of the document remains normal, sans serif and black.   How can I achieve that without having to do a search&replace to place "hello" into a custom command every time before I compile the .tex file?


In the Dash Home I used to see recently opened files and downloads, I want to delete those recent files so I do not see them again in the Dash Home.  Any help is appreciated, thanks.

I want to delete all the history of the unity dash about files, videos, text files, images, etc. I find it surprising that the best thing that  can do is to delete the history of one week only.


Say you need to change a light bulb, but to do that you need to get a ladder, but to get the ladder you need to get into the tool shed, but to get into the tool shed you need to find the key, etc. This kind of quest where you are being presented a new task at each step before you can even start the previous one. I feel sure there's a phrase that represents this but I can't remember it.  Edit: I think I'm thinking of a story where an adventurer is seeking an object A, so they ask person 1, who is willing to give it but only if they receive object B. So the adventurer goes to person 2, who will only give up object B for object C, etc.

I work in the computer trade and frequently find that when I'm assigned a problem to solve, it invariably happens that other problems need solving before I can work on the real issue. Is there a word for these on-the-way problems?


In Windows CMD I can write some DOS commands in a text file, with *.bat extension, then just calling the file name will execute the commands.   cd c:\myapp dir  Saving the above file, for example, m.bat will make it executable by entering m in the command prompt.  In Linux I tried to wrap the command service network-manager restart in a .sh file named rn.sh after changing its mode chmod +x rn.sh to be executable I always have to enter ./rn.sh to run it.  However, I just need to enter rn to run it. In other words, I need that rn.sh file works like a program or an application. How could I do that?

I'm learning how to create shell scripts on UNIX for a college class. The textbook says I should just be able to type the filename in my terminal and it should run, but so far I haven't been able to get that to work. But it works fine when I type in ./myscript. Currently, I am typing the scripts out on my Mac terminal, but I had FreeBSD loaded onto a virtual box and it was doing the same thing to me.  I think maybe I need to change my environment path? I remember I had to do that when I started writing python files.


My problem is that I have an input field where you type in some degrees and a velocity ( like 44 degrees and 10m/s). Then that runs through some javascript, and it spits out a trajectory.  A jsfiddle showing my problem a little better.     How do i input it as degrees? or convert radians to the exact same amount of degrees?  Edit: I want to convert it to the same amount of degrees. an example of 44 radians would result in 2521 degrees if I straight up convert them instead of 44 degrees (amount of radians = amount of degrees).

I run into this occasionally and always forget how to do it.  One of those things that pop up ever so often.  Also, what's the formula to convert angles expressed in radians to degrees and back again?


I would like to write out names from another worksheet to another worksheet with 6 cells inbetween the names.  Sub names()  Dim i As Integer Dim j As Integer  For j = 2 To 6054 Step 6 For i = 2 To 1010 Worksheets("Worksheet2").Cells(j, 12).Value = Worksheets("Worksheet3").Cells(i, 1).Value Next i Next j  End Sub   When i run the code it writes out the last name to every cell.

I have an Excel spreadsheet with 1 column, 700 rows. I care about every seventh line. I don't want to have to go in and delete the 6 rows between each row I care about. So my solution was to create another sheet and specify a reference to each cell I want.  =sheet1!a1 =sheet1!a8 =sheet1!a15   But I don't want to type in each of these formulas ... `100 times.I thought if I selected the three and dragged the box around, it would understand what I was trying to do, but no luck.  Any ideas on how to do this elegantly/efficiently?


The effect I want to achieve is demonstrated here: where the person is reduced to a single color, but still has shading etc.

I have seen such an effect being used in many places however I haven't figured out how to replicate it via Photoshop.  I have tried desaturating the image, placing it under a layer of solid colour and then lowering the opacity of the colour. I have also tried a couple of blend modes, to no avail. The effect is nowhere near the same.  Can someone please tell me the effect used on these images?


function Person(name) {      Object.defineProperty(this, "name", {         get: function () {             return name;         },         set: function (newName) {             name = newName;         },         enumerable: true,         configurable: true     });      this.sayName = function () {         console.log(this.name);     }; }  var person1 = new Person("Nicholas"); var person2 = new Person("Greg");  console.log(person1.name);    // Nicholas console.log(person2.name);    // Greg  person1.sayName();            // Outputs "Nicholas" person2.sayName();            // Outputs "Greg"   How is that the accessor property name can use the named parameter name to store its value? Isn't a local variable garbage-collected after the execution of its containing context (in this case, the Person constructor)?

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


The other day I've learned that you cannot use "to" in the sentence "I am going (to) home". At the same time, you should use "to" with other place names. For example, I am going to work.    Could someone, please, explain the rule why we cannot use "to" with the word home? Are there any other words that we should use without "to"?

I've encountered different usages of preposition + Home and I want to learn which of them are correct.  Some examples:     Back home   Back at home   Back to home


I just found myself in situation that I am telling about someone who added to me in Skype: because of the nickname I think that it is a girl and used all the time the word «she». But as she didn't say anything yet with exception the "hey :)", I can't even be sure it is a human (it is could be just a bot). So I am afraid that talking about her by using «she» could lead to misunderstanding. Shall I use the word «it»? Or is it wrong? Is there another way?  E.g. in Russian a sex have any noun, so I can say «she» and mean «the person» because the «person» have feminine gender. Either I can say «he», and mean «the one», because it is male gender. So, this way I don't confuse my interlocutor about my knowledge about a person's sex.

I know that one can use "they" / "them" / "their" in place of "he" / "him" / "his" or "she" / "her" / "hers" when the subject's / direct object's gender is not known; for instance, just looking at the default user's about me section on Stack Exchange sites:     Apparently, this user prefers to keep an air of mystery about them   My question is what happens when someone wants to reference the subject using a pronoun instead.  Should the verb be conjugated accordingly to the pronoun? E.g.:     Apparently, they prefer to keep an air of mystery about them   Or should the conjugation be retained? E.g.:     Apparently, they prefers to keep an air of mystery about them   The former looks unclear because it wouldn't allow the reader / listener to understand if the writer / speaker is talking about a single person or about a group of people, however the latter sounds very weird, at least just to the non-native speaker which I am.


Find the minimum value of $$\sum \frac {\sqrt a}{\sqrt b +\sqrt c-\sqrt a}$$   Where $a, b, c$ represent the sides of a triangle   My approach  $$\sum \frac {\sqrt a}{\sqrt b +\sqrt c-\sqrt a}$$ $$=\sum \frac {1}{\sqrt {\frac ba} +\sqrt {\frac ca}-1}$$ By Titu's lemma   $$=\sum \frac {1}{\sqrt {\frac ba} +\sqrt {\frac ca}-1}\ge \frac {9}{\left ( \sum \sqrt {\frac ba}+ \sqrt {\frac ab}\right)-3}$$  Now by Cauchy Schwarz inequality  $$\left ( \sum \sqrt {\frac ba}+ \sqrt {\frac ab}\right)^2 \le \left (\sum \frac ab +\frac ba\right)(6)$$ Hence we have  $$=\sum \frac {1}{\sqrt {\frac ba} +\sqrt {\frac ca}-1}\ge \frac {9}{\left ( \sum \sqrt {\frac ba}+ \sqrt {\frac ab}\right)-3}\ge \frac {9}{\sqrt {\left (\sum \frac ab +\frac ba\right)(6)}-3}$$  Now how to proceed further.

If $a,b,c$ are sides of triangle Find Minimum value of  $$S=\sum \frac{\sqrt{a}}{\sqrt{b}+\sqrt{c}-\sqrt{a}}$$  My Try:  Let $$P=\sqrt{a}+\sqrt{b}+\sqrt{c}$$  we have $$S=\sum \frac{1}{\frac{\sqrt{b}}{\sqrt{a}}+\frac{\sqrt{c}}{\sqrt{a}}-1}$$  $$S=\sum \frac{1}{\frac{P}{\sqrt{a}}-2}$$  Let $x=\frac{P}{\sqrt{a}}$, $y=\frac{P}{\sqrt{b}}$,$z=\frac{P}{\sqrt{c}}$  Then we have $$\frac{1}{x}+\frac{1}{y}+\frac{1}{z}=1$$  By $AM \ge HM$  $$\frac{x+y+z}{3} \ge \frac{3}{\frac{1}{x}+\frac{1}{y}+\frac{1}{z}}$$  Hence  $$x+y+z \ge 9$$  Any way to proceed further?


Which of the following is correct?        Are any of your kids unwell?   Is any of your kids unwell?      The online grammar tool shows both as correct, so I am in a dilemma!

Please log a CIP if ANY of the following is required to make the change:  Please log a CIP if ANY of the following are required to make the change:    I believe it should be are; but am I right?


I can run it from the usb drive, but it can't find the network adapter. Would it be easier to set up and solve this problem after installing the OS on my machine, or what? I would like to dual boot ubuntu and mac mojave if it isn't too time consuming

I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it?


I open My Editform.aspx page with SharePoint Designer and I want to add javascript code to it. This is the code:      <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> $(document).ready(function(){   $("#a").click(function(){     $("#content").hide();   });   $("#b").click(function(){     $("#content").show();   }); }); </script>   How can I add and place  it to one SharePoint page?

I am trying to add this script (Marc Anderson's blog) to AllItems.aspx.  Please guide me where it needs to go and what needs to be done to make it work.  Thank you.  <script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery-1.4.2.min.js"></script> <script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery.SPServices-0.5.4.min.js"></script> <script language="javascript" type="text/javascript"> $(document).ready(function() {     var userDepartment = $().SPServices.SPGetCurrentUser({         fieldName: "Department"     });     $("input[Title='Department']").val(userDepartment); var userPhone = $().SPServices.SPGetCurrentUser({     fieldName: "WorkPhone" }); $("input[Title='Phone']").val(userPhone); }); </script>


I know that the nested quotes are usually punctuated as follows (British usage):  [...] and then he said: 'I will always remember Churchill's "I have nothing to offer but blood, toil, tears and sweat" as the most powerful quote to ever get me through tough times.'  What quotation mark should be used if that is inserted into yet another quote: eg.  Jules Cocovin gave this precise quote: '[...] and then he said: "I will always remember Churchill's #I have nothing to offer but blood, toil, tears and sweat# as the most powerful quote to ever get me through tough times."'  Please, kindly, refrain from advice regarding how I can restructure the sentence. I know how. I don't know what the 3rd level of quotation marks is in English.

I'm quite unsure regarding the usage of single quotation marks (') and double quotation marks (") in English.  I had thought that double quotation marks were usually used to quote sentences from passages/given sources, nouns/things ("Westminster Bridge", "alliteration", or "voice" regarding its usage in poetry), as well as some less common/important uses including being snarky and using them to indicate a sarcastic remark.   Someone had told me today that you were supposed to refer to things with two inverted commas (") instead of one.  Which one is correct? Could someone explain the usages between the two different types of quotation marks?


I was having issue in mysql after ubnutu upgrade so I just followed  like purge first then install new one  sudo apt purge mysql-server mysql-server-5.7 mysql-server-core-5.7  But I am getting these errors while performing installations.   update-alternatives: error: alternative link /etc/mysql/my.cnf is already managed by my.cnf.bak dpkg: error processing package mysql-server-5.7 (--configure):  subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of mysql-server:  mysql-server depends on mysql-server-5.7; however:   Package mysql-server-5.7 is not configured yet.  dpkg: error processing package mysql-server (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                                                                                Processing triggers for systemd (229-4ubuntu17) ... Processing triggers for ureadahead (0.100.0-19) ... Errors were encountered while processing:  mysql-server-5.7  mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)

My overall upgrade went well, but I am left with a critically lingering issue of mysql-server not being able to install itself, and nothing I am trying gets it to work.  This is the error I see when trying to install/reinstall it:  Setting up mysql-server-5.7 (5.7.11-0ubuntu6) ... Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing package mysql-server-5.7 (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of mysql-server:  mysql-server depends on mysql-server-5.7; however:   Package mysql-server-5.7 is not configured yet.  dpkg: error processing package mysql-server (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                    Processing triggers for systemd (229-4ubuntu4) ... Processing triggers for ureadahead (0.100.0-19) ... Errors were encountered while processing:  mysql-server-5.7  mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)   I've tried completely removing it, though doing so attempts to install MariaDB because of dependencies (?). Any suggestions on what I can do to fix this would be most welcome.  EDIT: Looks like I'm not the only one:


I have a string:  x = "abc/xyz/foo/bar/foobar.mp3"   How to extract foobar out of it?  I have done it in this way:  import re re.search(r'\/[a-z]+.mp3', x)   Although, I do not know how to extract the matched string without '.' and without '.mp3'.   I do not want to do Python splits, rplist, partition etc. as it adds extra functions. I want it to be as simple and short as possible.   EDIT:   Yes, it is a path. I do not know the length of the path. As mentioned, I do not want to use splits.

How to get the filename without the extension from a path in Python? For instance, if I had "/path/to/some/file.txt", I would want "file".


How would you formally justify this? Or is it just notationally obvious? (As opposed to 'conceptually' obvious, which is never an excuse in mathematics.)  Edit: For some $c \geq 0$  $\text{sup} \ \{ c \cdot f(x): \text{some domain of $x$} \}$ = $c \cdot \text{sup} \ \{f(x):  \text{same domain of $x$} \}$  To illustrate what I mean, consider $\text{sup}\  \{ 1, 5\} = 5$ which however conceptually obvious can still be proven.      Suppose otherwise, if $\text{sup}\  \{ 1, 5\} < 5$, then the supremum   is less than an element of  set. A contradiction. If $\text{sup}\  \{1, 5\} >  5$, then there exists the number 5 less than the supremum   which nonetheless is an upper bound of the set. A contradiction.   But I'm not sure how I would 'prove' my original assertion.

Suppose that $S\neq\emptyset$ is a bounded set of numbers and that $a$ is a number. Define $aS=\{ax\mid x\in S\}$.   Prove that sup $aS$ = $a$ sup $S$ if $a \geq 0$  I can intuitively see why this is true by just trying out some cases for $a$ and $S$ but I can't seem to prove why this is true.


On Windows, file comparisons are case insensitive operations. However, a truly case insensitive system would be sensitive to locale settings, and would have to deal with three cases, rather than two (at least, according to Unicode). For various reasons, I'd like to replicate the way Windows does this outside of Windows, if possible.  Does Windows use this kind of locale support, or does it follow a more predictable pattern (e.g. somewhat like C#'s OrdinalIgnoreCase settings)?

Does anyone know what culture settings Win32 uses when dealing with case-insensitive files names?  Is this something that varies based on the user's culture, or are the casing rules that Win32 uses culture invariant?


Today I had a discussion with a colleague on whether to test or not to test private members or private state in the class. He almost convinced me why it makes sense. This question does not aim to duplicate already existing StackOverflow questions about the nature and reason of testing private members, like:   Colleagues suggestion was in my opinion a bit fragile to introduce the friend declaration to the unit test implementation class. In my opinion this is a no-go, because we introduce some dependency of tested code to the test code, whereas test code already depends on tested code => cyclic dependency. Even such innocent things like renaming a test class results in breaking unit tests and enforces code changes in tested code.  I'd like to ask C++ gurus to judge on the other proposal, which relies on the fact that we are allowed to specialize a template function. Just imagine the class:  // tested_class.h  struct tested_class  {   tested_class(int i) : i_(i) {}    //some function which do complex things with i   // and sometimes return a result  private:   int i_; };   I don't like the idea to have a getter for i_ just to make it testable. So my proposal is 'test_backdoor' function template declaration in the class:  // tested_class.h  struct tested_class  {   explicit   tested_class(int i=0) : i_(i) {}    template<class Ctx>   static void test_backdoor(Ctx& ctx);    //some function which do complex things with i   // and sometimes return a result  private:   int i_; };   By adding just this function we can make the class' private members testable. Note, there is no dependency to unit test classes, nor the template function implementation. In this example the unit test implementation uses Boost Test framework.  // tested_class_test.cpp  namespace {   struct ctor_test_context   {     tested_class& tc_;     int expected_i;   }; }  // specialize the template member to do the rest of the test template<> void tested_class::test_backdoor<ctor_test_context>(ctor_test_context& ctx) {   BOOST_REQUIRE_EQUAL(ctx.expected_i, tc_.i_); }  BOOST_AUTO_TEST_CASE(tested_class_default_ctor) {   tested_class tc;   ctor_test_context ctx = { tc, 0 };   tested_class::test_backdoor(ctx); }  BOOST_AUTO_TEST_CASE(tested_class_value_init_ctor) {   tested_class tc(-5);   ctor_test_context ctx = { tc, -5 };   tested_class::test_backdoor(ctx); }   By introducing just a single template declaration, which is not callable at all, we give the test implementer a possibility to forward test logic into a function. The function, acts on type safe contexts and is only visible from inside the particular test compilation unit, due to anonymous type nature of test context. And the best thing is, we can define as many anonymous test contexts as we like and specialize tests on them, without ever touching the tested class.  Sure, the users must know what template specialization is, but is this code really bad or weird or unreadable? Or can I expect from C++ developers to have the knowledge what C++ template specialization is and how it works?  Elaborating on using friend to declare unit test class I don't think this is robust. Imagine boost framework (or may be other test frameworks). It generates for every test case a separate type. But why should I care as long I can write:  BOOST_AUTO_TEST_CASE(tested_class_value_init_ctor) {   ... }   If using friends, I had to declare each test case as a friend then... Or end up introducing some test functionality in some common type (like fixture), declare it as a friend, and forward all test calls to that type... Isn't that weird?  I would like to see your pro and cons practicing this approach.

How do I unit test (using xUnit) a class that has internal private methods, fields or nested classes? Or a function that is made private by having  (static in C/C++) or is in a private () namespace?  It seems bad to change the access modifier for a method or function just to be able to run a test.


I have entries with different formats: customer_cpf 12.34.56 1234.56 12-34-56  So I'm receiving only numbers in a form and need to get it's row by comparing avoiding characters excepting numbers. I'm trying this: SELECT * FROM `customers` WHERE customer_cpf REGEXP '^[0-9]$' = "123456";  But it returns nothing. How can I perform this WHERE clause?

I'm looking to find records in a table that match a specific number that the user enters.  So, the user may enter 12345, but this could be 123zz4-5 in the database. I imagine something like this would work, if PHP functions worked in MySQL. SELECT * FROM foo WHERE preg_replace("/[^0-9]/","",bar) = '12345'  What's the equivalent function or way to do this with just MySQL? Speed is not important.


Creating / Re-creating the X,Y,Z mesh Surface function with the (u,v) options using python in Blender 2.8x Does an example exist / anyone have an example of how to reproduce the X,Y,Z mesh Surface functions / ad-don with (u,v) options.  Just using python and Blender 2.8x? I'm trying to do some animation with it using python but I can't find a way to get just those particular functions I would need. This is the functions i'm talking about.  I'm referring to the arrows and highlighted sections below when referring to (u,v) options  (They are connected mathematically)

I would like to know if there is any way to use the "Add 3d Function Surface" addon via the python interface.  I have an equation that describes a surface in the three-dimensional space that I can use to make a mesh object as described in . What I would like to know is if there is any way to do such a thing via the python interface.   As an example, I would like to be able to do something like:  def mysurface(u, v):    return numpy.array([u*v, u-v, math.pow(u, 2)])  add_mesh_from_surface_equation(func = mysurface, urange = [0, 10], vrange = [0, 10], ustep = 0.01, vstep = 0.01)   Is it possible to do something like this?


What are the best free or commercial software for editing LaTeX on Windows machine?

What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc.  This question is undergoing a systematic refurbishment, see  on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question.  List of editors Links to answers.


I have a series of files I need to rename which all have the pattern " (*)" in them.  Eg;  001 (1).txt 002 (1).txt 003 (2).txt   My desired output is to rename the files to 001.txt, 002.txt, 003.txt. Note the real files vary in length and extension type (this is my test batch).  I have searched the net and SE and come up with the following which gives me the desired output in the terminal.   ls *\(*\)* | sed 's/\(.*\)\( (.*)\)\(.*\)/mv & \1\3/'  mv 001 (1).txt 001.txt mv 002 (1).txt 002.txt mv 003 (2).txt 003.txt   However once I pipe it to sh I get the error below.  sh: line 1: syntax error near unexpected token `(' sh: line 1: `mv 001 (1).txt 001.txt'   I know it has to do with the \( (.*)\) section.  I've tried escaping the internal parentheses but then that doesn't give me the desired output.  I've also searched for regex ways to say search for the whitespace followed by any 3 characters but have had no luck.  I know there are easier ways to achieve what I want but I went with sed as thus far it was the only thing I could vaguely understand.  Very much appreciate any input into getting the above line working and then considering easier approaches.

As a follow-up to my , if I have multiple files of the form  sw.ras.001 sw.ras.002 sw.ras.003 …   What command can I use to remove the ras. in the middle of all the files?


I can't seem to find out how to get the thevenin voltage with two parallell voltage sources. I have calculated thevenin resistance to be 2.67Ω. It is my understanding that I need to calculate the voltage between A and B. Could someone please help me out with this one.

I need to find node voltage at A. This seems like a trivial question, but when I set up the resistive voltage divider equations they are not equal to each other. Am I doing something wrong?  My equations are \$V_A = V_1(R3/(R3+R1)) = V_2(R3/(R3+R2))\$      I tried solving this problem with an LTSpice simulation and with the superposition method, but my answers did not match (although very close to each other). Is this because the simulator uses an approximation? Can someone compare results?


How to find a sum of the series?   $$ S=\sum_{n=1}^\infty\left(\frac{\sin nx}{n}+\frac{\cos nx}{n^2}\right) $$   I tried to do something like that: $$ \begin{aligned} &z=\cos x+i\sin x\\ &S=\sum_{n=1}^\infty\text{Im}\left(\frac{z^n}{n}\right)+\sum_{n=1}^\infty\text{Re}\left(\frac{z^n}{n^2}\right) \end{aligned} $$ However, $\sum_{n=1}^\infty\frac{z^n}{n^2}=\text{Li}_2(z)$, and I have no idea what $\text{Re}(\text{Li}_2(z))$ is here.  So, I'd be very grateful if someone pointed out the right way of solving this problem.

Does anyone know what is the sum function $f(x)$ of the series $\displaystyle\sum_{n=1}^\infty \frac{\cos(nx)}{n^2}$? I have no idea how to find a sum function... Any help would be appreciated.


The question refers to a simple Form using POST method to send data to the server.I am interested in some cases:  1] Data come from a Form Textbox  2] Data come from a Form Listbox  3] Data are used to enter new data in the database  4] Data are used in a query after WHERE to filter out results  Question 1: Is a query safe vs SQL Injections in all combination of the above cases? If not what can I do to make sure I did my best in keeping my code as secure as possible?  What makes me sceptical is that I included the  $ComparisonB variable in the mysqli query, using prepared statements though.  Question 2: Assuming we sanitize $ComparisonB vs XSS using the following method:  function xssanitize($data,$encoding='UTF-8') {    return htmlspecialchars($data,ENT_QUOTES | ENT_HTML401,$encoding); }   Is it sufficient or should I do something more?  I KNOW that "Security is a state of mind", but I would like to learn to do things as proper as possible.

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


We all know  Leptokurtic ~ Kurtosis > 3 and Platykurtic ~ Kurtosis < 3  I am bit confused about the shape of the curve. Somewhere I had read that since the area under the curve should be 1, for leptokurtic distributions (since the peak is higher than the Normal distribution), the tails approach the X - axis much earlier than in case of Normal distribution i.e. when the pdf is plotted, the tails in case of leptokurtic lie below Normal curve tail so I guess leptokurtic has got a thin tail.   On the other hand, in case of platykurtic, the peak is less than the normal curve, however it's tail will lie above the Normal curve tail and is fat tailed. This is my understanding and I might be grossly wrong.  However, when I had referred many sites or went through Google images, I came across many instances where the Peak was shown much higher than the Normal distribution and also the tail lying above Normal distribution curve.  So I am very confused now as I am not a hard core statistician but will certainly love to clarify my doubts and learn few things. Also, I am not sure if FAT tail is synonym for HEAVY tail. Can someone explain this in simple words so that a moron like me will be enlightened.

There are two kurtosis types : positive(leptokurtic) and negative(platykurtic). leptokurtic is heavy tailed, and platykurtic is thin tailed. But leptokurtic is more thinner and pointy than platykurtic so I think leptokurtic is thin tailed... But it is heavy-tailed. So I found that I misunderstood the meaning of 'tail'  What does the tail mean?


This question came to my mind when I was reading a theorem on Poisson Processes stating that the sum of two independent Poisson processes, $X_t$ and $Y_t$ is a Poisson process. In the proof, one has to show that $X_t + Y_t$ has independent increments, and in order to prove this one must show the question I posed. Is it true? Are there any counterexamples?

I am asked to give an example of three Poisson-distributed random variables which are pairwise independent, but are not mutually independent.  I thought of the example about the Intersection where cars are coming from one side and they can go to one of three directions left, right or keep straight, with probabilities $p \ $, $q \ $ and $1-p-q$, respectively.  However, I find it hard to prove.


In our Drupal 8 theme we are using the classy base theme. themes/mytheme/mytheme.info.yml:  base theme: classy   Using the information from  I am trying to remove some stylesheets from the base theme - but I cannot figure out the right way to do so. For instance, I want to remove the css/components/form.css stylesheet from the base theme. So far I tried:  libraries-override:   base:     css:       component:         css/components/form.css: false     libraries-override:   core/base:     css:       component:         css/components/form.css: false     libraries-override:   core/classy:     css:       component:         css/components/form.css: false   None of which is working. Removing the stylesheet with stylesheets-remove would work fine - but this is deprecated and I would rather use the new intended way for Drupal 8+.  What is the correct way of removing/addressing/extending a library from the base theme?

I am trying to override the menu.css file in the default Classy theme through my library file. I have read through the documentation, but anything I tried doesn't work.  What would be the correct markup to override or disable this file?


My MacBook Pro is the 250 GB model.  I have a 320 GB external hard drive I am using as a time machine backup disk.  Right now the 320 GB hard drive has 16.14 GB of free space remaining.  The last two backups I tried today both failed because "the disk is full".  I don't see how this can be possible since Time Machine says      The oldest backups are deleted when your disk becomes full.   How do I force it to backup?  Preferably without wiping the whole disk and making a brand new backup (I don't want to lose all incremental history).

I use a Time Capsule for backup and now I want the drive to back up data from an extra Mac. But the drive is filled up with old backups from Mac 1. There simply is not enough space available for the backup for Mac 2.  I get this error message when running Time Machine backup:     Time Machine could not complete the backup.   This backup is too large for the backup disk. The backup requires   28.68 GB but only 626.2 MB are available.      Time Machine needs work space on the backup disk, in addition to the   space required to store backups. Open Time Machine preferences to   select a larger backup disk or make the backup smaller by excluding   files.   I know Time Machine itself is able to remove old backups when it needs more space. But in this case it does not remove any Mac 1 backups to make space for Mac 2.  Question is, how do I do it manually?


Let's say I have have the file asdf.tex which contains the code:  \documentclass{article} \newcommand{\asdf}{blabla} \begin{document}     \asdf is very cool! \end{document}   How can I compile my latex to a version asdf_standard.tex where only the standard latex is used, i.e.:  \documentclass{article} \begin{document}     blabla is very cool! \end{document}   I'm sure the compiler does this kind of procedure at some point anyway, so how can I get this as a file?  Thanks for your replies!

I'd like to know if there's a script that reads a .tex file and replace every instance of a non-standard TeX command with whatever it is replacing. I am not sure if what I want is clear but let me give an example:  Suppose the input is:   \documentclass{amsart}  \usepackage{amsmath,amssymb} \newcommand{\N}{\mathbb{N}} \DeclareMathOperator{\End}{End}  \begin{document} In this lecture we'll study the ring of Endomorphisms of an Abelian group $A$. Let's denote this ring by $\End(A)$. Throughout the lecture, $\N$ will denote the set of natural numbers. \end{document}    Then, a desirable output of such a script is:  \documentclass{amsart} \usepackage{amsmath, amssymb} \begin{document} In this lecture we'll study the ring of Endomorphisms of an Abelian group $A$. Let's denote this ring by $\operatorname{End}(A)$. Throughout the lecture,    $\mathbb{N}$ will denote the set of natural numbers. \end{document}   P.S.: I think I had seen something to this effect but I neither remember the place nor a key word to fire up Google.     I meant to write that, all answers here are awesome, but I miscounted 2 for 4. :(


Question:   Which of the numbers $0,1,2, ..., 60$ is $10 ^ {60 \cdot 2 ^ {100} +2}$ congruent with modulo $61$?  How should you think about this? I know that you should think think that you should break it out a little more like $x ^ {a * b} = (x ^ b) ^ a$ use modolo in the parentheses, so as to always get smaller parts of the number as far as possible, etc, etc. .   But be a little thoughtful if that's how you should do it. also have the idea that you can put all numbers in a list, up to mod 60, and see which numbers are congruent.   But since 61 is the quite high number, it feels excluded.   Also $10 ^ {60 * 2 ^ {100} +2}$ is also a large number.   So need a little push

I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.


Do the following identitities hold: Inf(S+T)=inf(S)+inf(T), where S and T are sets of nonnegative real numbers Also sup(S+T)=sup(S)+sup(T)

Suppose $D$ is a nonempty bounded subset of reals. Let $f:D \to \mathbb R$ and $g:D \to \mathbb R$. Define $(f+g)(x)=f(x)+g(x)$. Prove $\sup(f+g)(D) \le \sup f(D) + \sup g(D)$ (also prove that $\sup (f+g)$ exists).   I understand why this is the case, just not how to prove it. Left side is pretty much $\sup  (f(x)+g(x))$ and right side is $\sup (f(x) + g(y))$ for $x,\,y \in D$. Basically $f+g$ has to use the same variable and $f(D)+g(D)$ use different ones. But I don't know how to go about proving this.     The second part of the question is to find a specific example where strict inequality holds.    Let $D=\{a,b\}$ and $f: a \to 1,\, b\to 0, \,g: a \to 0,\, b\to 1$. $\sup f(D) = 1,\, \sup g(D) = 1,\, \sup f(D) + \sup g(D) = 2.$ $\sup (f+g)(D) = 1$ (if we choose a, $f+g = 1+0,\, b,\, f+g=0+1$).


I want to publish graphic icon (point) into geoserver by using maki style. Below is the coding,  <UserStyle>   <se:Name>streetlight_u4</se:Name>   <se:FeatureTypeStyle>     <se:Rule>       <se:Name>Single symbol</se:Name>       <se:PointSymbolizer>         <se:Graphic>           <se:ExternalGraphic>             <se:OnlineResource xlink:type="simple" xlink:href="file:///maki/park-alt1-15.svg"/>             <se:Format>image/svg+xml</se:Format>           </se:ExternalGraphic>   But, the result turns like below:-    Which is the actual graphic point is like below :-    Can anyone help?

<Rule>     <PointSymbolizer>      <Graphic>        <ExternalGraphic>          <OnlineResource            xlink:type="simple"            xlink:href="glass.png" />          <Format>image/png</Format>        </ExternalGraphic>        <Size>28</Size>      </Graphic>    </PointSymbolizer> </Rule>   I want to use external graphics on my layers. I styled with geoserver admin panel. But external graphics are not working. I put my image into /var/www/geoserver/data/styles folder.  I tried some href options but not worked.   xlink:href="glass.png" xlink:href="file:///glass.png" xlink:href="/var/www/geoserver/glass.png"   I think another issue.


I have a problem with an SQL task (Microsoft SQL Server 2008).   This is the task: Show name and surname of clients in a way that first letters of name and surname are upper case (for example Michael Jackson). I don't know how to write it in SQL. I know that it would be something like this:   select UPPER(name), UPPER(surname) from client ;    But it shows all the letters in an upper form.

What’s the best way to capitalise the first letter of each word in a string in SQL Server.


Basically, the title says it all. I've encountered this issue while reading about http requests in :     The other two verbs, PATCH and DELETE, are designed for updating and   destroying things on the remote server. These requests are less common   than GET and POST since browsers are incapable of sending them   natively, but some web frameworks (including Ruby on Rails) have   clever ways of making it seem like browsers are issuing such requests.       Why is there a need to hack around to issue, for example, a PATCH request? Why aren't browsers able to natively perform such kind of things? Am I missing something?      I've been searching around for quite a while, but couldn't come up with a clear answer to these questions. Thank you in advance.

I've seen a couple questions around here like , which mentions:     Unfortunately that same browser won't allow me to test HTTP PUT, DELETE, and to a certain degree even HTTP POST.   I've also heard that browsers support only GET and POST, from some other sources like:        However, a few quick tests in Firefox show that sending PUT and DELETE requests works as expected -- the XMLHttpRequest completes successfully, and the request shows up in the server logs with the right method. Is there some aspect to this I'm missing, such as cross-browser compatibility or non-obvious limitations?


Class Foo(monobehavior) has a scriptableObject and it is exposed to Inspector. When i change its value on inspector on runtime, it is saved. but when i try to change its value by script on runtime, it is never saved. what the different?  and is there a way to save changed value of scriptableObject on runtime? without using json.. or something.  Thanks and sorry for my bad english.

I was wondering what the "correct" way to save scriptable objects in Unity that are changed during Play mode. So far I have something that works:      // changes     PartyMember Lalala = PartyMemberDictionary.Find("Lalala");     Lalala.HP += 17;     print("Lalala's HP: " + Lalala.HP);     // then saves     AssetDatabase.Refresh();     EditorUtility.SetDirty(Lalala);     AssetDatabase.SaveAssets();   Note: Lalala is a direct reference to a PartyMember scriptable object in my Assets/Resources folder.   I'm still a little shaky on this approach, however. I got this directly from reading this question:     But the commentator did not explain what each of these three lines of code mean.      AssetDatabase.Refresh();     EditorUtility.SetDirty(Lalala);     AssetDatabase.SaveAssets();   Can someone explain these to me? I'm not sure I understand them fully. I assume "dirty" indicates that data changed; please correct me if I'm wrong.  In this link    it asserts that SaveAssets() saves all unchanged asset changes to disk, so why do I need the other Refresh and SetDirty Functions?  In this link    The OP says "as I found out after some trial and error AssetDatabase.SaveAssets doesn't actually save the asset as expected." ... so confused at this point. That leaves me hesitant to continue until I understand what's going on. Perhaps the Refresh and SetDirty cement the job?  Also, in this link    it mentioned that Undo.RecordObject is preferred. Based on your experiences, is this true? Is EditorUtility.SetDirty(); obsolete in this day and age already? I don't want to use it if I have to change my code in the future.  At the end of the day I simply want something that works.


I got below error after rebooting one of my production SQL server 2012 enterprise,     The log scan number (151082:691:0) passed to log scan in database 'master' is not valid. This error may indicate data corruption or that   the log file (.ldf) does not match the data file (.mdf). If this error   occurred during replication, re-create the publication. Otherwise,   restore from backup if the problem results in a failure during   startup.   This seems master database is corrupted, the SQL server service is not starting, I have latest full back of master, where do I restore master when sql service is not running and can I start sql server in single user mode on same server when master corrupt? If I restore master what will happen to user dbs? is there any difference in restoring master and re-installing sql server?  Very much appreciate your replies.  Thanks

Help! My master database is corrupt, I can't even bring the SQL instance online! What are my options to get my server back up?   I do have a backup of master, but the  asks me to start the instance in single-user mode, which I can't do!  (Note: I'm leaving this question unspecified as to SQL version, so as to be a more widely-applicable reference. There are some similar questions on DBA.SE, but none that involve the server unable to start.)


I'm trying to export contour lines from QGIS into standard AutoCAD but I'm not having much luck.  It does not seem to matter what type of file I select as the output during the contour creating (eg. DXF or CSV) all I get is a folder containing 3 files (an SHX,a compiled shape source file and a DBF file all titled as contour. I am then unable to open these files in AutoCAD.  If I then export the contour lines from QGIS as a DXF that file will open in AutoCAD but the lines appear to be missing their Z property.  Is there a simple way to export contours from QGIS that retains their xyz information?

I have a .tiff data file that generates contours in QGIS. I save it as .dxf. The contours don't have any attributes or data. That's bad, because I want to make a 3D landscape in Revit using the information.   How do a save/export the contour lines from QGIS so that they have a z-elevation attribute or at least some information?    I ticked the attributes box when extracting the contours, but the attributes doesn't show in the dxf.


I have a list of file names like   22.75_87.dat 22.75_87.25.dat 22.75_87.5.dat 22.75_87.75.dat 23_86.dat 23_86.25.dat 23_86.5.dat 23_86.75.dat 23_87.dat 23_87.25.dat 23_87.5.dat 23_87.75.dat 23.25_86.dat 23.25_86.25.dat 23.25_86.5.dat 23.25_86.75.dat 23.25_87.dat 23.25_87.25.dat 23.25_87.5.dat   and so on.  Out of these file names I only few files exist. I need to make folders exactly same as the exisitng file names only. How to do this?  I can generate the filenames, but have no idea how to proceed further.

How do I check whether a file exists or not, without using the  statement?


I've noticed this for a while now and am just curious if there is any advantage or benefit to "simplifying" the name.  Example:  var lst = new List<int> { 1, 2, 3, 4, 5 }; string commaLst = String.Join(",", lst);   ReSharper then says     Name can be simplified.   And suggests that I change String.Join() to string.Join()  Is one way better than the other in terms of performance or anything alike? What's the point of simplifying a name?

Example (note the case):  string s = "Hello world!"; String s = "Hello world!";   What are the guidelines for the use of each? And what are the differences?


How many ring homomorphisms are there from $\mathbb Z/12\mathbb Z$ to $\mathbb Z/20\mathbb Z$?   In all cases, describe the image and kernel of the homomorphism.  I am not even sure how to proceed on counting how many homomorphism are there any help appreciated.

I face the problem of finding how many non-trivial ring or group homomorphisms there are from $\mathbb{Z}_m$ to $\mathbb{Z}_n$, where $m<n$. Is there any general formula?   At the moment, I want to know how many ring homomorphisms there are when $m=12,n=28$.  Please help.


If I tap a land, end my turn, and then play an instant allowing me to untap it again, can I tap that land for more mana, and when does that mana get used up. Basically, if I tap mana on my opponents turn, when does it leave the mana pool.

I'm completely new to Magic the Gathering. I've read the basic rulebook pretty thoroughly and have a pretty good grasp of the basic rules, but it's unclear to me as to when you can tap lands to generate mana.  First off,  mana is supposed to dry up after each phase in a turn. Can I untap my land cards and then tap them again in the next phase if I need more mana to power a spell? Or does a land card remain tapped until my next turn like everything else?  Second, the rules mention that I can play instants and activate abilities during my opponent's turn. Does that then mean that I can tap my land cards during my opponent's turn to power those spells?  Third, does my opponent's untap step for their turn only apply to their cards? Or can I untap mine as well? Not closely related to land cards, but when I can tap and untap my land cards would make a huge difference as to how I play.  Hope these questions aren't painfully obvious, but I've just started playing the game. Thanks for your time!


As you can see the code produces a barplot that is not as clear and I want to make the figure larger so the values can be seen better. This doesn't do it. What is the correct way? x is a dataframe and x['user'] is the x axis in the plot and x['number'] is the y.  import matplotlib.pyplot as plt %matplotlib inline   plt.bar(x['user'], x['number'], color="blue") plt.figure(figsize=(20,10))    The line with the plt.figure doesn't change the initial dimensions.

How do you change the size of figure drawn with Matplotlib?


I want to prove that $2^{n+2}+3^{2n+1}$ is divisible by 7 using induction. My first step is replace $n$ with $1$.   $2^{1+2}+3^{2(1)+1}$ $2^3+3^3$ $8+27$ $35 = 7\times 5$   The next step is assume that $2^{n+2}+3^{2n+1}$ is divisible by 7. And the last step is to prove that $2^{(n+1)+2}+3^{2(n+1)+1}$.   $2^{(n+1)+2}+3^{2(n+1)+1}$ $2^{n+3}+3^{2n+3}$ I got stuck here.   How can I prove it using induction?

Expanding the equation out gives  $(3^{2n}\times3)+(2^n\times2^2) \equiv 0\pmod{7}$   Is this correct? I'm a little hazy on my index laws.  Not sure if this is what I need to do? Am I on the right track?


I'm confused about ArrayList with another variable that can change the value from another class. I have two classes and two examples with the ArrayList and Object variables. Can somebody help me to understand why it's different and if there is a solution to make it have the same effect? This is the code with ArrayList: import java.util.List;  public class Test {     private String name = "Fifi";          void fill(List<Test> a) {         a.add(this);     } }  import java.util.ArrayList; import java.util.List;  public class B {     private List<Test> a = new ArrayList<Test>();     //a variable is empty      public B() {         // TODO Auto-generated constructor stub         Test oa = new Test();         oa.fill(a);// After this method is called, a variable has change with name is "FiFi"     }      public static void main(String[] args) {         new B();     } }  And then, I have the same form like that with the object variable, but the result is not the same. public class Test {     private String name = "Fifi";          void fill(Test b) {         b = this;     } }  public class B {     private Test a;     // so a variable is null      public B() {         // TODO Auto-generated constructor stub         Test oa = new Test();         oa.fill(a);// after fill method is called, a still null!     }      public static void main(String[] args) {         new B();     } }  What is different from Arraylist and object variables like above? I do not understand the basics of how it's happening!

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I am getting errors like com.ibm.icu etc are missing from /home/jiewmeng/eclipse/plugins/*. I think it might be because I am working on the project from 2 different computers where the eclipse paths maybe different.

I have installed Skype in Ubuntu, but I do not know where to start the installed the Skype application .Similarly  I have installed Netbeans and other applications but their icons are not appearing in any menus.  Related: how to uninstall already installed applications?


In addition to  I would like to try option 1 from the accepted answer, but I don't know how to protect a folder, i.e. deny rights with ACL. Can anyone provide me step-by-step instructions how to do so in Windows 10?  "Protect" the folder containing the MP3 by creating empty Folder.jpg and AlbumArtSmall.jpg, and then denying write on them with ACL.

I have many MP3's with embedded cover art in them (bought them like that) When Windows Media Player plays one of these, sometimes it displays the correct cover but most of the time, it displays the cover from a song that was previously played, sometimes several days before!  I have had this problem for a very long time! And it survived and recent reinstall of Windows 7 (hard drive crash).   My problem is  but no solution has been posted.  If I try to reproduce the problem at this moment, what happens is that when I double-click on a MP3 in Windows Explorer (Windows 7, WMP12 not already running), the cover that will be displayed is from a MP3 I played earlier in the week, which we'll call (A). The cover display in the status bar of Windows Explorer is correct though. When I change MP3s, (Windows Media Player running this time), sometimes the cover stays stuck still on the cover of (A), sometimes it displays the good one. If I quit at this time and restart Windows Media Player with the same MP3, the cover of (A) is back again...  I do remember having another behaviour closer to the one described in the link, that is, Windows Media Player was lagging always one cover art, displaying the art of the previous song, but maybe that was with WMP11, I can't remember  Did anyone experience this problem and found a solution?


I did this but I got frustrated and quit.

Since asking for tutorials, videos, resources, links to other content or downloads is considered off topic here, this is a specifically created Community Wiki which gathers resources for Blender and it has been approved by the .  Just write in the appropriate answer/section. If you have concerns, questions, post a  question, so we don't clutter the comments, but you can link your meta question from the comments.  Questions regarding such resources are not allowed anymore, except for very specific and on topic requests (ask on  if you're unsure about your question). Follow the instructions made in the question about how to post, what can be posted, etc.  Learning             Assets    (also see: )   Reference Images/Blueprints (also see: )    Tools    (also see: )      Other   Special Interest ()     Also see the .


I have the following component:  <div aura:id="appr">     <ui:button aura:id="approveButton"  press="{!c.handleFirstPress}" label="Approve" /> </div> <div aura:id="subm" class="hide">     <ui:button aura:id="submitButton"  press="{!c.handleSecondPress}" class="hide" label="Submit" /> </div>   And javascript that utilizes the following CSS to toggle the buttons' visibility:  .THIS.hide { display: none !important; visibility: hidden !important; }  .THIS.show  { display: block !important; visibility: visible !important; }   Relevant Javascript:  handleFirstPress : function(cmp) {     var approveBtn = cmp.find("appr");     var submitBtn = cmp.find("subm");      $A.util.toggleClass(approveBtn, "hide");     $A.util.toggleClass(submitBtn, "show"); }   But when I wrap the component snippet in a another div, the CSS is no longer applied and the buttons remain visible even when I try to toggle their visibility.  <div class="foo" >      <div aura:id="appr">         <ui:button aura:id="approveButton"  press="{!c.handleFirstPress}" label="Approve" />     </div>     <div aura:id="subm" class="hide">         <ui:button aura:id="submitButton"  press="{!c.handleSecondPress}" class="hide" label="Submit" />     </div> </div>    Why does this happen?  Is it a lack in frontend knowledge, or lightning component related?  How can I solve it?  Thank you in advance!

I'm trying to hide a div dynamically. This works for me. But when I try to do a nested div. It suddenly doesnt work anymore. Am I missing something?  Component(Working)  <ui:button label="Toggle" press="{!c.toggle}"/>
Now you see me
   Component(Not Working)  <ui:button label="Toggle" press="{!c.toggle}"/>

Now you see me

   Controller  toggle : function(component, event, helper) {         var toggleText = component.find("text");         $A.util.toggleClass(toggleText, "toggle");     },   Style  .THIS.toggle {     display: none; }


I know different versions of this question have been asked a million times, but I can't seem to find a clear cut answer to my question. How do I vertically and horizontally center an h1 in the body of my document? I don't have it in another div or anything, I just want it centered on the page

Best way to center a <div> element on a page both vertically and horizontally?  I know that margin-left: auto; margin-right: auto; will center on the horizontal, but what is the best way to do it vertically, too?


Prove that for each natural number $n$, with $n \geq 3$: $(1+(1/n)^n < n$.  I did the base step, (4/3)^3 < 3 so it holds, but I am confused about the inductive step.  The inductive hypothesis is (1+(1/k)^k < k, and the inductive conclusion is (1+(1/(k+1)))^k+1 < k+1. I can't figure out how to reach the IC from the IH.  I tried multiplying both sides by (1+(1/k), but that just gives (1+(1/k))^k+1 < k+1. Idk what I am supposed to do here?

Show by induction that for all natural numbers n>3  $(1+\frac{1}{n})^n<n$  Let $(1+\frac{1}{n})^n<n$ be true !   We show that $(1+\frac{1}{n+1})^{n+1})<n+1$  $(1+\frac{1}{n})^n(1+\frac{1}{n})<n(1+\frac{1}{n})$   $(1+\frac{1}{n})^{n+1}<n+1$  So now we just need to show that   $(1+\frac{1}{n+1})^{n+1}<(1+\frac{1}{n})^{n+1}$  So here , If I show that :   $(1+\frac{1}{n+1})<(1+\frac{1}{n})$   Does that mean im done with exercise ?


I read that the main difference between a class and a structure is that class is reference type and structure is value type. can anybody explain me what does the value type and reference type means...?

This question was .  Now I'd like to learn the differences between a struct and a class in C++. Please discuss the technical differences as well as reasons for choosing one or the other in OO design.  I'll start with an obvious difference:   If you don't specify public: or private:, members of a struct are public by default; members of a class are private by default.   I'm sure there are other differences to be found in the obscure corners of the C++ specification.


Example: SELECT $1 FROM $2.$3 WHERE $1 = $4  Result: ERROR:  syntax error at or near "$2"  Example: SELECT "$1" FROM "$2"."$3" WHERE "$1" = "$4"  Result: ERROR:  relation "$2.$3" does not exist  If you wonder why all the identifiers are parameterized, it's because I'm designing a database manager tool which dynamically allows me to edit any "cell" in any table.

I would like to create a function that operates on a table, for example  create or replace function test(t table)      returns void language plpgsql as $func$ begin        select * from t limit 10; end; $func$   Then, I can call the function with any tablename, e.g.  select test(myTable);   How would I do something like this?


How to count number of different 3-members-subsets (not ordered) of a multiset {1,1,1,2,2,2,3}? I need a general formula or a general method of solving that problems. Another example: how to count number of defferent 4-members-subsets (not ordered) of a multiset {3,3,4,4,5,5,7,7,7}?

We have a pool of N number of balls.  There are: A number of white balls (W), B number of green balls (G), C number of blue balls (B), and D number of pink balls (P)  In how many ways (combinations) we can pick X number of balls from this pool? Is there a formula for something like this?  This is similar to combinations with replacement, but there are limitations to how many times a certain object can be replaced.


What my thought was that the bijection was a piecewise function:  $f(x) = 1/n+1$ if $x = 1/n$ for some $n \in \Bbb N$ and $x=1/n$ if $x \neq1/n$ for some $n \in \Bbb N$.  However, the textbook says this is incorrect. I don't actually see why. Was it a matter of brackets or the open variable $(0,1]$, which is what I tend to think.

How to define a bijection between $(0,1)$ and $(0,1]$?   Or any other open and closed intervals?   If the intervals are both open like $(-1,2)\text{ and }(-5,4)$ I do a cheap trick (don't know if that's how you're supposed to do it): I make a function $f : (-1, 2)\rightarrow (-5, 4)$ of the form $f(x)=mx+b$ by \begin{align*} -5 = f(-1) &= m(-1)+b \\ 4 = f(2) &= m(2) + b \end{align*} Solving for $m$ and $b$ I find $m=3\text{ and }b=-2$ so then $f(x)=3x-2.$  Then I show that $f$ is a bijection by showing that it is injective and surjective.


If we assume a 1D world, then the divergence of the electric field would read $\nabla\cdot\vec{E} = \partial_xE_x$, since $\partial_yE_y = \partial_zE_z = 0$ in a 1D world. Therefore, Gauss Law reads $\partial_xE_x(x) = \rho/\epsilon_0$, where $\rho$ is still defined in 3D. We can assume a box xyz in which our $\rho$ is and if we apply the Divergence theorem: $\int \nabla\cdot\vec{E} dV = \int \vec{E}(x)\cdot d\vec{S} = E(x)\cdot y\cdot z = E(x)\cdot S = \frac{1}{\epsilon_0}\int\rho dV $, we might get finally $E(x)\cdot S = \frac{1}{\epsilon_0}\int\rho\cdot S\cdot dx \to E(x) = \frac{1}{\epsilon_0}\int\rho dx = \frac{\sigma}{\epsilon_0}$. This expression $E(x) = \sigma/\epsilon_0$ is exactly the same than the electric field created by a flat capacitor, which was answered  that this is in fact what charges look like in a 1D universe. However, if $E(x) = \sigma/\epsilon_0$ then $\partial_xE(x) = 0$ and does not this contradict Gauss Law from which we have started, i.e., $\partial_xE_x(x) = \rho/\epsilon_0$?

From Maxwell equations, Gauss Law read: $\nabla\cdot\vec{E} = \rho/\epsilon_0$ Integrating this divergence over some volume and applying the Divergence theorem leads to: $\int \vec{E}\cdot d\vec{S} = Q/\epsilon_0$ One could think that going into a 2D world (flatland) would change Gauss Law by: $\int \vec{E}\cdot d\vec{l} = Q/\epsilon_0$, but this is not a result we would get from applying this dimension reduction to the differential form of Gauss Law, is it? The same problem applies to a 1D world


My problem is simply that my SQL query takes over 2 minutes to complete and I can't have my application freezing up while it tries to get all that data. I've tried multi-threading but I keep running into an error that I am pretty sure you'll recognize. My code is under that.  Cross-thread operation not valid: Control 'labelEdit1' accessed from a thread other than the thread it was created on.   private void Form_Load(object sender, EventArgs e)     {         startup = new Thread(loadInThread);         startup.Start();                 }  private void loadInThread() {     //getsDataFromSQL() is the method that takes over 2 minutes to do     //it returns a String Array if that is helpful     comboEdit1.Properties.Items.AddRange(getsDataFromSQL());        startup.Abort(); }   If there are better ways to do this then please let me know, all I need is for the application to not freeze up and the data to get loaded into the comboEdit. Also I know the SQL statements could be optimized but that's not what this question is about, so please don't suggest it,.

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


When I'm zooming the compiled document, all brackets and similar figures look like on the screen. I've already installed cm-super, so I don't have troubles with the font, but, I have no an idea why the brackets look like this.  I have two files: the main and the style.  The preamble of the main file is:   \documentclass[10pt, a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T2A]{fontenc} \usepackage[english, russian]{babel} \usepackage{Lections_style}   In the style file kinda preamble looks:   \NeedsTeXFormat{LaTeX2e} \ProcessOptions \RequirePackage{amsfonts} \RequirePackage{amsmath} \RequirePackage{amssymb} \RequirePackage{graphicx} \RequirePackage{babel,blindtext} \RequirePackage{subfigure} \RequirePackage{hyperref} \RequirePackage{fancyhdr} \RequirePackage{cite} \RequirePackage{amsthm} \RequirePackage{xparse} \RequirePackage{mathabx} \RequirePackage{array} \RequirePackage{tabularx} \RequirePackage{multirow} \RequirePackage{makecell} \RequirePackage{mathrsfs}

I have the following LaTeX-document:  \documentclass[a4paper,11pt]{article} \usepackage[utf8x]{inputenc} \usepackage[ngerman]{babel}  \usepackage[T1]{fontenc}  \title{Sample} \author{Litb}  \begin{document}  \maketitle  \begin{abstract}  This is a report about my praxis phase at the company foo bar which I enjoyed. \end{abstract}  \end{document}   Much to my frustration, compiling with pdflatex creates a document with Bitmap-fonts. The reader's font-list shows that it uses Type3 fonts.  If I remove the fontenc loading, then I get a PDF using vector-fonts, but I heard that I should keep it, for having native German Umlauts working.  Does anyone know how I can get vector fonts with T1, and why it keeps using bitmap fonts if I have that package-load line in it?


So I just built a PC with 8 cores (4.0Ghz) and a GTX750. So since I don't have a OS on it yet could I download Ubuntu on a USB and install it as my OS on the BIOS setup? I don't know much about how to install a OS so... Any replies will be greatly appreciated!

I tried to use the usb-creator.exe from Ubuntu 10.10 desktop i386 ISO image and it does create an USB stick that doesn't boot. When I try to boot from it I get:     Operating System not found.   I try to do this from Windows 7 x64. I'm not looking to create a live Ubuntu media, only an installation USB disk.  I repeated the process several times and I even tried to reformat the USB drive (FAT32), no success yet.  The USB stick is a 8GB one.


In first I excuse with you for my English! I have been studying since 2 years!  I have this problem with my function for loading a messagges quote for my website.  The function could work in this way:   Users click on a link like as   Show quote An ajax function get the text quoted. Response text replaces   Show quote  with
text quote found
   All works fine!  Problem is when in the response text, there is another link which shows another quotes.So when I click it, function doesn't work and browser load directly the link quote.   This is the function:  $('a[rel=quote_link]').on('click',function(){   linkQuote = $(this).attr('href');  textQuoted = $.ajax({url:linkQuote,type:"GET",async:!1}).responseText;   $(this).replaceWith( "
" + textQuoted + "
" );   event.preventDefault();  });   I have read on stackoverflow.com that to use jQuery .on(), but function still doesn't work!  Thank you at everyone :).  Sorry for my English and I hope that I understand the rules of posting new question.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I often make espresso with a bialetti moka. I made some espresso martinis for my family at a party earlier this year and I have been asked for some more over Christmas.  How long can I keep espresso coffee made with a bialetti in the fridge? If it can be stored for a long time, can I top it up with more coffee as I make it, or should each batch be stored separately?

How many hours/days would you recommend to drink coffee (after brewed) and consider it safe? (For example if you don't want to waste it). What is the difference if it is refrigerated or not?  The question is not about flavor since (I think) it is probably ruined after at most a couple of hours.


What are the odds Ive met my other half?  Thing is I already know I have with this undeniable experience we had when our souls actually collided together as we were one. I just want to know what others have to say about it but without experiencing what we did here are some crazy coincidences we have in common, any comments are welcomed. Thanks in advance.  Just curious as to the odds off meeting a man unexpectedly whome I now call my soulmate.      Can you help me figure out the odds of having his daughter from another relationship sharing the same birthday as my daughter from another relationship, same month July same day 28th different year one year apart 2007and 2008 also having my son and his Nephew sharing same Birthdays, same month; June same day 5th, different year  2013 and 2018, 5 years apart. Both same sex sharing same birthdays different year. Our Mothers have the same name Debra. We both were born in 87. I was born May 1st 1987 he was born August 25 1987... we are 3 months 24 days apart in age.  I met him August 27th 2016 and he lived one block away from me even tho we had mutual friends we never crossed paths till that day when a mutual friend invited me over. Also all of our Birthdays are in sink month to month Mine May , my son and his nephew June , My daughter and his daughter in July and his in August.

What are the odds of the following:  Great Grandmother was born January 14 (1/14)  My Grandfather was born April 11 (4/11)  I was born on January 14 (1/14)  My son was born on April 11 (4/11)   FYI: My Great GrandMother lived to be 100 years old.  She passed just a few years ago.


#include <iostream>  using namespace std;  int main() {   float a = 6.2;   if (a < 6.2) {     cout << "Yes\n";   }   return 0; }  This code prints yes, Can someone explain why?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I've unlinked all object data, materials and textures. The texture is assigned and visible when I'm in Object mode and Edit mode. But when I switch over to Texture paint mode, I can't see the texture that I want and I have to start from scratch. Thanks for any help you can give me!

Okay, so I've seen the other answers to this here in Blender Exchange. However, as far as I can figure out those textures were not saved when created in texture paint mode. I added an external texture to my object:   ...then I switched to texture paint mode and the texture changes to a complete black texture:   However if I switch back the texture while in texture paint mode it still keeps my object black:     Is this a lighting problem? Or am I not importing the external image correctly? I have tried packing/saving the image after importing it and putting it on my UV Map and then switching to texture paint mode, but it still occurs.


This is a problem from Spivak's Calculus.  If $a_1, \dots, a_n \ge 0$, then the "arithmetic mean"   $$ A_n= \frac{a_1+\cdots +a_n}{n}$$  and "geometric mean"   $$ G_n= \sqrt[n]{a_1 \dots a_n}$$  satisfy $G_n \le A_n$.  Suppose that $a_1 \lt A_n$. Then some $a_i \gt A_n$; for convenience, say $a_2 \gt A_n$. Let $\bar a_1=A_n$ and let $\bar a_2=a_1+a_2- \bar a_1$. Show that $\bar a_1 \bar a_2 \ge a_1a_2$.(This part is easily done). Why does repeating this process enough times eventually prove that $G_n \le A_n$? (This is another place where it is a good exercise to provide a formal proof by induction, as well as an informal reason.) When does equality hold in the formula $G_n \le A_n$?  I don't see how I can generalize this process to achieve the result. I would appreciate any hint, suggestions, or solutions.

This was a mathematical induction question proposed in a textbook, and I've exhausted multiple approaches (proving RHS - LHS > 0, splitting the fraction, fractional exponents, etc.)     The geometric mean of $n$ positive numbers $a_1, a_2,\ldots,a_n$ is $\sqrt[n]{a_1a_2 \ldots a_n}$ and their arithmetic mean is $\frac{a_1+a_2+\ldots+a_n}{n}$. If $a_1, a_2,\ldots,a_n$ are $n$ positive real numbers, prove by induction that their geometric mean is always smaller than or equal to their arithmetic mean, i.e. $\sqrt[n]{a_1a_2\ldots a_n} \leq \frac{a_1+a_2+\ldots+a_n}{n}$


So, I know that there are a lot of questions about good books on quantum mechanics and I have read each one of them, and I go on and bought Griffiths' Introduction to Quantum Mechanics. But the fact is that it did not build me a very good intuition as it emphasized the computational part of it.    So, I want a book that emphasizes on both intuition and mathematical rigor in the same way. I am thinking about the books of Dirac, Shankar, Zettili, Landau and  Claude Cohen-Tannoudji (with Frank Laboe).    So what are your opinions about them and which one strikes the balance on intuition and mathematical rigor?    If you know other books that emphasize on both, tell me.

I'm really interested in quantum theory and would like to learn all that I can about it. I've followed a few tutorials and read a few books but none satisfied me completely. I'm looking for introductions for beginners which do not depend heavily on linear algebra or calculus, or which provide a soft introduction for the requisite mathematics as they go along.  What are good introductory guides to QM along these lines?


Cracking the coding says that to make it somewhat more space efficient, we could use a bit vector instead of a boolean array. Any thoughts about the distinctions between these two? Thanks.

What is more efficient in terms of memory and CPU usage — an array of booleans or a BitSet? Specific BitSet methods are not used, only get/set/clear (==, =, Arrays.fill respectively for an array).


My phone needs to charge for about only 2 and half hour, but I forgot so I charged my phone for about 3 and half hour. Then I noticed that my battery is easy to drain. When my phone is in 14% or below, it will tell me that I already need to charge but when I turn off my phone and turn it on again, it will go back to 16%. Also when my phone is already 100% charged and I turn it off and on again, it will be at 95% left. Can overcharging destroy a Xperia J or Android phone?

I usually disconnect my cellphone from the charger some time after it's fully charged because I'm afraid the battery could lose capacity over time if I don't. However, I believe modern electronics should be able to handle this kind of scenario and automatically stop charging the battery once it's full. Does this apply to modern Android phones? Or do I need to continue disconnecting it all the time?


Is the inverse of an invertible and lower triangular matrix still both lower triangular and invertible?

How can we prove that the inverse of an upper (lower) triangular matrix is upper (lower) triangular?


Is anyone can help me, how can i make my website that google in search list will show the URL like this (www.ask.com › All › Apps, Gadgets, Computers & Games)?   Separated by angle brackets, and any part can separately choosen.  Thank You for help!

I have recently noticed that for some websites, Google is linking to different locations in the site hierarchy instead of just the destination page URL.  For instance, searching for "Malibu Rum Drink Recipes" results in an entry at Bar None Drinks that shows the following:     Drink recipes containing Malibu Rum   Choose from our collection of great drinks made with Malibu Rum.   www.barnonedrinks.com > Drinks > By Ingredient > M   Each of the individual segments between the ">" marks are clickable and take you to that section of the site.  How do I get Google to show this for my site?


What is the meaning of this construction in the following sentence heard in ?     DA's office is pursuing this as a capital case, which means that come   sentencing it will be up to the jury to decide [his] punishment...   Is this a short version of when it comes to or a separate instance of to come usage with the same meaning? That is when the sentencing time comes...

The following is a part of  in FT.com.     Why do estate agents still exist? Travel agents are gone — or going. Estate agents, who were hated long before Tim Berners-Lee gave up train spotting to invent the world wide web, were always going to be the first to go, come the internet age. Instead the reverse is happening: as I cycled through Islington on my way home the other day I counted 17 estate agent shop windows in one street.   I suppose the essence of the sentence including the phrase come the internet age is     Estate agents were always going to be the first to go, come the internet age.   Then, what is the grammatical role of the phrase "come the internet age" in the sentence? Is "come" subjunctive? If so, what is the meaning?


I am struggling to get this problem started. I have looked at similar problems in the book I am using for class (Discrete Mathematics with Applications, 7E) but none of them are seeming to help. Any help on how to solve these types of questions? I understand that I may need to use Fermat's Little Theorem but I am not seeing how to apply it completely.

How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .


Here is my output: im using more foreach loop with different condition and values put into same array name $returnVal[]=  EX:  foreach($val1 as $vals) {       $returnVal[]=$vals; }     foreach($val2 as $vals)   {       $returnVal[]=$vals;   }     foreach($val3 as $vals)   {       $returnVal[]=$vals;    }     foreach($val4 as $vals)    {       $returnVal[]=$vals;    } `   Im getting Output:   Array     (         [0] => Array             (                 [0] => 39705--COLUMBUS--LOWNDES--MS                 [1] =>  39702--COLUMBUS--LOWNDES--MS                 [2] =>  39710--COLUMBUS--LOWNDES--MS                 [3] =>  39701--COLUMBUS--LOWNDES--MS             )          [1] => Array             (                 [0] => Array                     (                         [0] => 39705--COLUMBUS--LOWNDES--MS                         [1] =>  39702--COLUMBUS--LOWNDES--MS                         [2] =>  39710--COLUMBUS--LOWNDES--MS                         [3] =>  39701--COLUMBUS--LOWNDES--MS                     )              )          [2] => Array             (                 [0] => Array                     (                         [0] => 39705--COLUMBUS--LOWNDES--MS                         [1] =>  39702--COLUMBUS--LOWNDES--MS                         [2] =>  39710--COLUMBUS--LOWNDES--MS                         [3] =>  39701--COLUMBUS--LOWNDES--MS                     )                  [1] => Array                     (                         [0] => Array                             (                                 [0] => 39705--COLUMBUS--LOWNDES--MS                                 [1] =>  39702--COLUMBUS--LOWNDES--MS                                 [2] =>  39710--COLUMBUS--LOWNDES--MS                                 [3] =>  39701--COLUMBUS--LOWNDES--MS                             )                      )                  [2] => 57038--JEFFERSON--UNION--SD             )          [3] => 57049--NORTH SIOUX CITY--UNION--SD     )   My Question: remove duplicate values and merge into one level

It's probably beginner question but I'm going through documentation for longer time already and I can't find any solution. I thought I could use implode for each dimension and then put those strings back together with str_split to make new simple array. However I never know if the join pattern isn't also in values and so after doing str_split my original values could break.  Is there something like combine($array1, $array2) for arrays inside of multi-dimensional array?


Stackexchange currently has two travel-related websites:   Travel.SE - ~30th most popular Site on the Network Expats.SE - ~60th most popular Site   The strength of Travel.SE is in having experts in given topics - US visas, UK visas, Schengen visas, experts on rail transport, etc. Visa matters are generally easy to answer and millions of people deal with them every year. Likewise lots of people can answer a general question like 'How to sleep on a train?'.  However Expats.SE is struggling with being useful as it deals with complex immigration matters and only immigration law experts can answer many of those.  of their questions are Unanswered and existing Answers often lack in quality, which makes it hard to attract new visitors.  Could Stackexchange consider hiring some experts to provide answers on struggling sites, in order to help them set-up core user bases? It won't guarantee that a site manages to 'graduate', but it might be worth a try.

IANAL et al. is usually the start of answers to [legal] questions on any SE site (e.g. ). You usually end up with personal opinions which sound sensible and the accepted answer is often the one closest to the OP's hopes. But it's probably often not correct. I know the situation can be rather complicated and even differ by location, but it would be really helpful if the SE team were providing official lawyers (indicated maybe by using a § in the username, forbidden for everyone else, just like the mod ♦) to provide some orientation that one could actually rely on beyond much doubt...


I have a 2 TB disk which I use for data. Running Ubuntu 14.04 from another physical drive and Windows from a third physical drive.  On the 2 TB drive I have (or, had...) one ext4 partition filling out the entire drive.  When booted into Windows 7, and entering its disk tool, I was told that the drive had no partition table (?), giving me the options of gpt and something else, before even allowing me in to the tool. Thinking it was referring to a fourth physical drive in the machine, which did indeed not have any partitions on it, I foolishly opted for gpt, but did nothing else to the drive (didn't create any partitions, etc.).  Back in Linux, when I run gpart, only what seems to be two old (now unused) partitions are found:  $ sudo gpart /dev/sdc  Begin scan... Possible partition(Windows NT/W2K FS), size(0mb), offset(228937mb) Possible partition(Windows NT/W2K FS), size(25497mb), offset(1266234mb) End scan.  Checking partitions... Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): primary  Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): primary  Ok.  Guessed primary partition table: Primary partition(1)    type: 007(0x07)(OS/2 HPFS, NTFS, QNX or Advanced UNIX)    size: 0mb #s(1) s(468863136-468863136)    chs:  (1023/254/63)-(1023/254/63)d (29185/97/1)-(29185/97/1)r  Primary partition(2)    type: 007(0x07)(OS/2 HPFS, NTFS, QNX or Advanced UNIX)    size: 25497mb #s(52219903) s(2593248336-2645468238)    chs:  (1023/254/63)-(1023/254/63)d (161422/62/1)-(164672/199/22)r  Primary partition(3)    type: 000(0x00)(unused)    size: 0mb #s(0) s(0-0)    chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r  Primary partition(4)    type: 000(0x00)(unused)    size: 0mb #s(0) s(0-0)    chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r   Also, fdisk doesn't seem to see it:  $ sudo fdisk -l [...] Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes 256 heads, 63 sectors/track, 242251 cylinders, total 3907029168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00000000     Device Boot      Start         End      Blocks   Id  System /dev/sdc1               1  4294967295  2147483647+  ee  GPT Partition 1 does not start on physical sector boundary.   And neither parted:  $ sudo parted -l [...] Model: ATA ST2000DM001-9YN1 (scsi) Disk /dev/sdc: 2000GB Sector size (logical/physical): 512B/4096B Partition Table: gpt  Number  Start   End    Size   File system  Name                          Flags  1      17.4kB  134MB  134MB               Microsoft reserved partition  msftres   Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only. Error: Can't have a partition outside the disk!                              What am I missing? Is there any way I can recreate the lost partition?

Are there any tools, methods, incantations to recover recently deleted files on Ubuntu?  If it makes any difference, I want to recover a  2.x database file. But would be better to have a method/tool that works on any kind of file.


What algorithm to use to correct (average) the borderline between 2 polygons? All I know is that they have their own borderlines very close to each other. Sometimes they may overlap, otherwise not.  As in the image it's visible the common line is fatter than outside borders so it's not ok. I'd require some average line or just common border - make them adjacent. Those differences are very small so averaging is ok. EDIT Given p1 and p2 as SpatialPolygons I tried the following: sf_p1 = sf::st_as_sf(p1) sf_p2 = sf::st_as_sf(p2) sf_u = sf::st_union(sf_p1, sf_p2) d = gDistance(p1, p2)  The plot remains the same. d takes 3.03 so I guess there's a little gap between them. I'd probably use buffers? But how?

Copied from    The problem  Suppose we have two shapefiles that should border seamlessly. Only, they don't. Is there a way to force them to stick to one another without gaps?      The specific case  I have two shapefiles: one for European regions -- REG, the other for the neighbouring countries -- NEI. Both shapefiles are taken from  and should fit together nicely; but there are small gaps. Also, I need to simplify the polygons, and then the gaps become really notable.       The best I can think of  I've tried several approaches but with no success. The only way to achieve the desired result that I see requires following steps:   create a line sf with just the border between my shapefiles; from this line create a buffer polygon just big enough to cover all gaps; join and dissolve this buffer to the shapefile for neighbours -- NEI; clip off the expanded NEI with the REG shapefile.   Obviously, this is a rather clumsy workaround.    Is there a better way to go?    Reproducible example in     A minimal example  # install dev version of ggplot2 devtools::dev_mode() devtools::install_github("tidyverse/ggplot2")  library(tidyverse) library(sf) library(rmapshaper)  library(ggthemes)   # load data source(file = url("https://gist.githubusercontent.com/ikashnitsky/4b92f6b9f4bcbd8b2190fb0796fd1ec0/raw/1e281b7bb8ec74c9c9989fe50a87b6021ddbad03/minimal-data.R"))  # test how good they fit together ggplot() +          geom_sf(data = REG, color = "black", size = .2, fill = NA) +         geom_sf(data = NEI, color = "red", size = .2, fill = NA)+         coord_sf(datum = NA)+         theme_map()  ggsave("test-1.pdf", width = 12, height = 10)  # simplify REGs <- REG %>% ms_simplify(keep = .5, keep_shapes = TRUE) NEIs <- NEI %>% ms_simplify(keep = .5, keep_shapes = TRUE)   ggplot() +          geom_sf(data = REGs, color = "black", size = .2, fill = NA) +         geom_sf(data = NEIs, color = "red", size = .2, fill = NA)+         coord_sf(datum = NA)+         theme_map()  ggsave("test-2.pdf", width = 12, height = 10)


I fixed the formatting to an answer for  but was unable to proceed as I hadn't changed 6 characters. I added a couple links to utilities mentioned.  I then noticed the links weren't displaying correctly as they were inside ` ` and I was able to remove them successfully.  How come I was able to change only 2 characters this time?

Now, it is easy to workaround this: add 10 characters, plus your one-character change, then remove these 10 characters in the next edit for the same post.  But this can hardly be what the designers intended. Instead, my suggestion is to change it to something like on Wikipedia, where you can mark an edit as "minor". Something like this:     Edits must be at least 6 characters, or select the checkbox "Minor, spelling or punctuational correction."   Edits like that will, of course, not count toward the edit-limit (before it becomes Community Wiki).  The suggestion often seen on Meta Stack Overflow is "just edit more in that post". But sometimes the post is just right, and there aren't any other spelling mistakes to correct. Why force a user to change more than necessary, or use an ugly hack?


On my temporary profile page for Game Development, the height of the privilege box is less than badge box located next to it.

I'll admit that this is a rare case, but when you've earned a new privilege and a badge you've tracked, the dark blue 'banner' which contains the 'Track the next one' button seems to be positioned too high, leaving an 'empty' gray line at the bottom of the widget. I suspect this happens because the height of the badge tracker widget in this case is higher than would be normally.    Tested with the latest Safari and Firefox on macOS Mojave.


So I got this question in my exams.  Find the HCF of $0.5$ and $2.5$.  My friends are saying that answer would be $0.5$.  I wrote $1$ because I couldn't see any factor bigger than it common to both. Moreover, I have one more point that domain of $\gcd$ is positive integers.   So there can be two things, whether, the question is wrong, and even if we extend $\gcd(a,b)$ to rational numbers, answer would be $1$, because $1$ is bigger than $0.5$.  So please clear my doubts.

Disclaimer: I'm an engineer, not a mathematician  Somebody claimed that $\gcd$ only is applicable for integers, but it seems I'm perfectly able to apply it to rationals also:    $$ \gcd\left(\frac{13}{6}, \frac{3}{4} \right) = \frac{1}{12} $$  I can do this for a number of cases on sight, but I need a method. I tried Euclid's algorithm, but I'm not sure about the end condition: a remainder of 0 doesn't seem to work here.    So I tried the following:    $$\gcd\left(\frac{a}{b}, \frac{c}{d} \right) = \frac{\gcd(a\cdot d, c \cdot b)}{b \cdot d}$$  This seems to work, but I'm just following my intuition, and I would like to know if this is a valid equation, maybe the correct method. (It is in any case consistent with $\gcd$ over the natural numbers.)  I'm not a mathematician, so please type slowly :-)


I have seen other towers with the same lines.

I know a power transmission line carries usually two sets of 3 phase conductors. But I have noticed a relatively thin wire at the center-top of the power transmission line. What is the purpose of this thin wire?


In QGIS, I have multiple layers that are not lining up, despite the fact that I have enabled "on the fly" projection and clicked "Save As" to reproject specific layers to CRS EPSG: 26915 (NAD83/UTM zone 15N). I've also tried "Define Current Projection" from "Geometry Tools." No matter what I do, I can't seem to get layers to line up. The oddest part about it is that about half of my shapefiles line up in one part of the map, and the other half line up in a completely different part. All of the previous questions I have found on this topic have not helped me solve this issue, or I'm too dense to understand.  The layers I'm working with are a variety (polygon, point and line), as well as .shp and .kml.

I have a project where I have a few layers (State of Texas, cities, roads, etc.). They are all resaved and projected to NAD83 / UTM zone 14N EPSG: 26914. The project CRS is also NAD83 / UTM zone 14N EPSG: 26914 and on the fly projection is enabled. I added a text delimited file and cannot get them to line up. I checked the attribute table of the delimited file and the coordinates are correct. I cross-checked this with a point close to where a few of the points from the delimited file are and they are very close so in theory they should be lining up. I tried to save the delimited file and save it with the same projection and add the shp file back in and that did not work. Anyone have any ideas? I can't think of anything else to try.


I am very new to unit testing and I am a little confused.  I am trying to do unit testing (using the Boost unit testing framework) on a C++ class called VariableImpl. Here are the details.  class Variable { public:   void UpdateStatistics (void) {     // compute mean based on m_val and update m_mean;     OtherClass::SendData (m_mean);     m_val.clear ();   }   virtual void RecordData (double) = 0;  protected:   std::vector<double> m_val;  private:   double m_mean; };  class VariableImpl : public Variable { public:   virtual void RecordData (double d) {     // put data in m_val   } };   My question is how can I check that the mean is computed correctly? Note that 1) m_mean is protected and 2) UpdateStatistics calls a method of another class and then clears the vector.  The only way I can see would be to add a getter (for instance, GetMean), but I don't like this solution at all, nor I think it is the most elegant.  How should I do?  And what should I do if I were to test a private method instead of a private variable?  TIA,  Jir

How do I unit test (using xUnit) a class that has internal private methods, fields or nested classes? Or a function that is made private by having  (static in C/C++) or is in a private () namespace?  It seems bad to change the access modifier for a method or function just to be able to run a test.


I have a page with a modal. One option in this modal is to print the page using window.print().   This prints the modal and not the page.  How can I print just the page and not the modal?

I have a link on my webpage to print the webpage. However, the link is also visible in the printout itself.  Is there javascript or HTML code which would hide the link button when I click the print link?  Example:   "Good Evening"  Print (click Here To Print)   I want to hide this "Print" label when it prints the text "Good Evening". The "Print" label should not show on the printout itself.