There is an Standard Object is Account.  I need to not allowed a duplicate Account Name Object.  I know the Custom Object to handled but I need to Standard Object.

I need to see an apex code of trigger, on say object 'Account' to prevent any new records from saving. Existing records do have duplicates but we cannot clean/ remove the data, as the requirement has come midway.  The unique feature applies to 2 fields say A(picklist) and B(text) of object Account, (concatenated) where A is a picklist, having values 1,2,3,4 where we need only values (TEXT) 1,2,3 of A to be unique alongside (concatenated with) text field B, and not the value 4.  Again, the requirement is to prevent any new records from saving which match any of the existing records. Duplicates within the existing records can be ignored.  Thanks in advance.


How can I photograph the moon so that I see detail of the craters and mountains?   I have a Canon EOS 550D (T2i) and tried "No Flash", "P" as well as creative auto mode, but to no avail. Every time I get a completely white moon.

I would like to know whether it is possible to photograph moon without any flaws with a canon EOS 550d..   Also to get an image of the moon as close as the following image, what kind of equipment(lens,etc) is need to be used with the 550d Body


Should "building blocks" be hyphenated? I am using the two words (or perhaps one word) as a noun. E.g.,     These axioms serve as the building-blocks of the English language.   I understand that hyphens should be used to avoid ambiguities, but in this case, a hyphen makes the sentence easier to read, rather than lessen the ambiguity of it. The actual sentence I'm using the words (or word) in is quite long, and consists of many clauses, so one might accidentally read the sentence incorrectly the first time, but once the sentence is read entirely, the reader will understand what is meant. I know this is a stretch.

Some compound words are written without hyphens (nonaggression, nonbeliever), some with hyphens (well-intentioned), and others with spaces (post office).  Is there a rule or good guide as to which option should be used?


I would like to have the variables (defined in Latex3) aligned in a table with the decimal point. Of course, without using the "trial and error" extra space ",". Is there any possibility? Thank you very much. \documentclass{article} \usepackage{xparse} \usepackage[version=4]{mhchem}  \usepackage{siunitx,booktabs}  % \ExplSyntaxOn \NewDocumentCommand{\calcnumd}{o m}   {\IfValueTF{#1}      {\num[round-mode = figures, round-precision = #1, round-integer-to-decimal]{\fp_to_decimal:n{#2}}}      {\num{\fp_to_decimal:n{#2}}}   } % data \fp_set:Nn \dhfbiox {33.18} \fp_set:Nn \dhftetrox {9.16} \fp_set:Nn \dgfbiox {51.31} \fp_set:Nn \dgftetrox {97.89} \fp_set:Nn \cpbiox {37.20} \fp_set:Nn \cptetrox {77.28} % calculations % \ExplSyntaxOff % \begin{document}  \begin{center} \begin{tabular}{l|ccc}    & $\Delta_f H^{\ominus}$ & $\Delta_f G^{\ominus}$ & $C_P$ \\    & \si{\kilo\joule\per\mole} & \si{\kilo\joule\per\mole} & \si{\joule\per\kelvin\per\mole} \\ \midrule \ce{NO2} & \calcnumd{\dhfbiox} & \calcnumd{\dgfbiox} & \calcnumd[4]{\cpbiox} \\ \ce{N2O4} & \,\,\,\calcnumd{\dhftetrox} & \calcnumd{\dgftetrox} & \calcnumd{\cptetrox} \\ \bottomrule \end{tabular} \end{center}  \end{document}

I want to align two numbers in two different rows the decimal point.    I do see a link for that here:   However, I don't understand how to incorporate that into my code.  What follows is a reduced version of my code.  \documentclass[12pt,english]{article} \usepackage{longtable} \usepackage{fullpage} \usepackage{times} \usepackage[flushleft]{threeparttable} \usepackage[font=large,labelfont=bf,tableposition=top,textfont=bf]{caption} \usepackage{tabularx} \usepackage{booktabs} \newcolumntype{C}{>{\centering\arraybackslash}X}  \begin{document}  \clearpage \newpage \begin{table}[!ht] \caption{Table Title} \def\arraystretch{1.05} \vspace{-0.2cm} \begin{threeparttable} \small \begin{tabularx}{\textwidth}{l*{10}{C}} \hline \hline \addlinespace & (1)  \\   Variable Name & 0.1234566  \\ & (0.1234566) \\ \hline \hline \addlinespace  \end{tabularx} \begin{tablenotes} \vspace{0.1cm} \footnotesize{  \item \noindent \hspace{-1.8mm} Notes:    \noindent Sources:   } \end{tablenotes} \end{threeparttable} \end{table}  \end{document}


It could have been a pilot or a tv movie. I think it aired on broadcast tv mid to late 90s. The main plot point I remember (It has been a while so some may be a bit off):   Starts with Military Ball, Jr officer approaches Lady, who turns out to be his commanding officer. All hands on deck, heading to space battle far away. All humans (no aliens). Ship breaks down en-route to battle. Engineer goes inside giant horizontal cylinder engine cavity. One of the crew turns on the engine. Engineer gets fried. Space Trial! Vote by dropping black or white marble into a vase. One lady is not shy about which marble goes in the vase. All black marbles, saboteur dumped out the airlock. Engine fixed, head back to giant space battle.

Years ago (mid 90's) I saw a show on network TV, and I'm trying to figure out what the name of it was. The parts of the plot I remember are:   The crew consisted of 20-year-olds (half were women). They were on some mission when they lose their commander. They must then try to get back home, while being tracked down by a foe in a faster, more powerful ship. One of the main characters turns traitor. He's locked up in the brig pending a decision on his fate. He hangs himself, and his body is incinerated by the crew. One of the main characters plays a video game that basically looks like a visor over his face. While playing the game, he's given an idea on how to outwit their foe by using the laser cannon on their ship to create a holographic projection of a larger ship. In the end, they are about to be destroyed by a torpedo launched from the enemy ship.  The torpedo is destroyed by a laser beam from a friendly capital ship that arrives at the last moment.  I remember there being some sort of romance sub-plot to the show as well between two crew members.    Other non-plot details:   This was live action, not animated. I remember the special effects being quite high-end.   The guns on the ships were manipulated by a person sitting in a gunnery chair. This chair projected a holographic view of the fight in front of him/her. From there the gunner used a joystick and a keypad to control the weapons on the ship.  All the crew wore simple Star-Trek style uniforms throughout the entire program, so no jumpsuits or helmets.    I don't know if this was a movie or a TV show, because I never actually saw the beginning of it. I think I saw at least 45 minutes worth, so it could be either as far as I know.   That's all I remember, other than I think the name of the show was fairly generic (something like "Star Command"). I loved the show as a kid even though I only saw it once. I would like to watch it again and see how lame it really was.


Background  Let $A^{\mu}$ be a 4-potential that satisfies the Lorenz condition $$\partial_\mu A^\mu =0$$ We can make a gauge transformation $$A_\mu \to A'_\mu=A_\mu + \partial_\mu \Lambda$$ such that $$ \partial_\mu A'^\mu =\partial_{\mu}\left(A^{\mu}+\partial^{\mu}\Lambda\right)=0 $$ and still stay in the Lorenz gauge. Since $\partial_{\mu}A^{\mu}=0$, this condition for $\Lambda$ is \begin{equation} \partial_{\mu}\partial^{\mu}\Lambda=0\tag{1} \end{equation} This possibility to do some gauge transformations while having fixed the Lorenz condition is called residual gauge freedom.  Claim  We want to remove this residual gauge freedom by fixing another condition on $A_{\mu}$. My book claims that \begin{align} \begin{aligned}A_{3}(0,\vec{x}) & =0\\ \partial_{t}A_{3}(0,\vec{x}) & =0 \end{aligned} \tag{2} \end{align} is such a condition.   Proof  The solution to (1) is uniquely determined by its initial conditions \begin{align*} \Lambda(0,\vec{x}) & =\Phi_{1}(\vec{x})\\ \partial_{t}\Lambda(0,\vec{x}) & =\Phi_{2}(\vec{x}) \end{align*} so it is sufficient to prove that the conditions (2) imposed on the transformed 4-potential uniquely determine $\Phi_{1}$ and $\Phi_{2}$. Since $$ A'_{3}=A_{3}+\partial_{3}\Lambda $$ they read \begin{alignat*}{2} A_{3}(0,\vec{x})+\partial_{3}\Lambda(0,\vec{x}) & = & A_{3}(0,\vec{x})+\partial_{3}\Phi_{1}(\vec{x}) & =0\\ \partial_{t}A_{3}(0,\vec{x})+\partial_{t}\partial_{3}\Lambda(0,\vec{x}) & = & \partial_{t}A_{3}(0,\vec{x})+\partial_{t}\partial_{3}\Phi_{2}(\vec{x}) & =0 \end{alignat*} So we can choose an antiderivative wrt $x^{3}$ of the given functions $A_{3}(0,\vec{x})$ and $\partial_{t}A_{3}(0,\vec{x})$ to find the $\Lambda$ we're searching for.  Question  It seems to me that this antiderivative is not uniquely determined, as you can add to it an arbitrary function of $x^{1}$ and $x^{2}$. So $\Lambda$ is not uniquely determined either. Is then the residual gauge not removed? Or am I missing something?

I'm having a bit of trouble understanding how the gauge condition is found.  Consider the potentials $V$ and $\vec A$ and $V'$ and $\vec A'$ so that $$\vec E = -\vec\nabla V -\frac{\partial\vec A}{\partial t} = -\vec\nabla V' -\frac{\partial\vec A'}{\partial t}$$ $$\vec B = \vec\nabla \times \vec A=\vec\nabla \times \vec A'$$  The 2 sets of potentials are then related like this:  $$\vec A' = \vec A+\vec\nabla\theta$$ $$V' = V-\frac{\partial\theta}{\partial t}$$ For a function $\theta$.  The equations for the potentials are the following:  $$\vec\nabla^2\vec A-\varepsilon\mu\frac{\partial^2 \vec A}{\partial t^2}=-\mu\vec J+\vec \nabla(\vec \nabla.\vec A+\varepsilon\mu\frac{\partial V}{\partial t})$$  $$\vec\nabla^2V -\varepsilon\mu\frac{\partial^2 V}{\partial t^2}=-\frac{\rho}{\varepsilon} -  \frac{\partial}{\partial t}(\vec\nabla . \vec A+\varepsilon\mu\frac{\partial V}{\partial t})$$  They can be decoupled by choosing the right potentials so that $(\vec\nabla . \vec A+\varepsilon\mu\frac{\partial V}{\partial t})=0$  The above part is the theory in general.  Now to find the correct potentials where this is the case, let's say that this last part is true for potentials $\vec A'$ and $V'$, i.e.   $$\vec\nabla . \vec A' + \varepsilon\mu\frac{\partial V'}{\partial t}=0$$  Filling in the relations between the 2 sets of potentials from earlier gives:  $$\vec\nabla . \vec A + \nabla^2\theta + \varepsilon\mu\frac{\partial V}{\partial t} -\varepsilon\mu\frac{\partial^2\theta}{\partial t^2}=0$$  Yet my book tells me that this means that  $$\nabla^2\theta - \varepsilon\mu\frac{\partial^2\theta}{\partial t^2}=0$$  I don't see why this is the case.


TL;DR: I know a program creates and then deletes files in /tmp. How can I intercept them for examination ?  Context:  There's a particular .jar file, which I don't trust; for some reason its source code contains an ftm method and has capability to make connections, which is evident from network-related syscalls in output of strace (and when I mean connection, I don't mean unix domain sockets, it's AF_INET6). I've examined with Wireshark and saw no outgoing TCP or UDP connections during it's use.   However, I still don't quite trust it. From the output of strace I've seen that it's creating temporary files in /tmp and then deletes them. Is there a way to intercept those files to examine their contents ?

I've script which is connecting to remote host via SSH, creates temporary file and executing the following command:     Calling system(mysql --database=information_schema --host=localhost < /tmp/drush_1JAjtt)   Each time it's creating different file (pattern: drush_xxxxxx).  I've tried couple of times manually running on the remote:  tail -f /tmp/drush_*   but my connection is too slow and most of the time I've end up with the error:     tail: cannot open `/tmp/drush_*' for reading: No such file or directory   Is there any trick accessing such file straight after it's being created to show it's content?


Given $n$, consider the following figure:   which is formed by placing $n$ equally spaced vertices along the edges of an equilateral triangle and connecting them. The intersection of the lines created will be called the vertices of the figure; the ones in red below:       Question: How many triangles can we make out of the vertices of this figure?   It is more-or-less straightforward to count them for smaller values of $n$. Let $T_n$ be the number of triangles. If we order the vertices by $P_1,P_2,\ldots,P_{\frac{n(n+1)}{2}}$, we can just check for each $P_i,P_j,P_k$ with $i<j<k$ if they are colinear or not. So in the general case we should just count the number of three choices among $P_1,\ldots,P_{\frac{n(n+1)}{2}}$, but then discard the colinear ones.  The problem is that we might have some colinear points as below, which I do not know how to deal with (in green):    The original question was asked to me for $n=3$, which is easy to count: $T_3=17$. I though I would at least be able to come um with a recurrence relation for $T_n$ in terms of $T_{n-1}$ and $T_{n-2}$, but I can't (or at least I think such a recurrence I could come up with would be too complicated to be useful).  But I do not know how to tackle the general problem.    Remark: in , there is an answer when only considering the "upwards" or "downwards-pointing" subtriangles, but we allow for subtriangles such as the one below (in blue):

I saw this question today, it asks how many triangles are in this picture.    I don't know how to solve this (without counting directly), though I guess it has something to do with some recurrence.  How can count the number of all triangles in the picture ?


I'm trying to parse something from the contents of a website using a Python3 script, and I'm running into a 'UnicodeEncodeError':  import urllib.request  myurl = "https://stackoverflow.com/" with urllib.request.urlopen(myurl) as url:     html = url.read()     print(type(html))     content = html.decode("UTF-8", "ignore")     print(type(content))     print(content)   This produces:  <class 'bytes'> <class 'str'>   File "C:\Python3\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u200b' in position 688: character maps to <undefined>   Now, it's not the decoding per se that fails (as the second print call still went through), but the decoded string somehow still contains the unicode characters that should have been ignored?  Have I read  wrong?

When I try to print a Unicode string in a Windows console, I get an error . UnicodeEncodeError: 'charmap' codec can't encode character .... I assume this is because the Windows console does not accept Unicode-only characters. What's the best way around this? Is there any way I can make Python automatically print a ? instead of failing in this situation? Edit:  I'm using Python 2.5.  Note: @LasseV.Karlsen answer with the checkmark is sort of outdated (from 2008). Please use the solutions/answers/suggestions below with care!!  is more relevant as of today (6 Jan 2016).


I am using 13.04 Ubuntu. I want to make order on multiple wireless access.  Is there any way to do this?

I'd like to move up and down available wireless access points, setting priorities as we can do in Microsoft Windows. I can't remember to have ever succeeded in this since using network-manager. Maybe something with conf files is possible...  I'm not interested in different network managers.


I´ve made a contact form, but since I´m not English I use characters such as "á","ň","š" etc. But when I fill my form with those characters, I submit the form, and I recieve email, where all of these "unknown" characters are replaces with characters like "@-". The website is .html, not .php. I don´t store anything in the database.  I´ve put  <meta charset="UTF-8"> and also <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> in the . Also I modified <form> attribute to <form id="contact-form" action="send_me" enctype="multipart/form-data" accept-charset="utf-8"> And I added header('Content-type: text/html; charset=utf-8'); into my php file. But nothing helped.  This is a piece of HTML:  <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   ...  <form id="contact-form" action="send_me" enctype="multipart/form-data" accept-charset="utf-8">

             Name             <input id="name" class="text form-input" type="name" name="name"/>

         Message         <textarea id="message" class="text form-input" type="message" name="message">         </textarea>

         <input role="button" type="submit" name="submit">

 </form>    JS:  $(".form-input").focus(function() {     let parent = $(this).parent();     if (!parent.hasClass("active")) {         parent.addClass("active")         }  });  $(".form-input").blur(function() {     let self = $(this);     let parent = self.parent();     if (parent.hasClass("active") && self.val().length === 0) {         parent.removeClass("active")     }  });  $("#contact-form").submit(function(e) {     e.preventDefault();     const url = "sendMailB.php";     messageHolder = $(".contact-form__message");     messageHolder.removeClass();     messageHolder.text('');     const successMessage = 'Successfully sent!';     const errorMessage = 'Oops, try later';     $.ajax({         type: "POST",         url: url,         data: $("#contact-form").serialize(),         success: function(data) {             console.log(data);                         messageHolder.addClass("success");                                     messageHolder.text(successMessage);         },         error: function(error){         console.log('error');         messageHolder.addClass("error");         messageHolder.text(errorMessage);             }     });  });    PHP:  header('Content-type: text/html; charset=utf-8'); $to = "paula@soulmates.sk"; $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $message = $_POST['message']; $extra = "From email: $email\r\n Answer to email: $email\r\n";
 $subject = "Mail from ".$name.""; $odkaz = $message; $mess = "Name: ".$name."\nEmail: ".$email."\nPhone: ".$phone."\nMessage: ".$odkaz." \n";  $too = $email; $subjectt = "Thank you for contacting us"; $messs = "Thank you message"; $extraa = "From email: $to\r\n Answer to email: $to\r\n";   mail ($to, $subject, $mess, $extra) mail ($too, $subjectt, $messs, $extraa);  ?>   I just need every infromation, that user puts into form to receive just the way they are. I need "Safaládka" to stay "Safaládka" in the received email, not to turn into for example "SafalˇA-dka"

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I've just seen a question in the new Reopen queue that needed editting - the user had added code, but it was missing linebreaks.  I clicked on Edit and Reopen. I got the 'Nominate this question for reopening' popup; clicked on OK; and my vote was then counted without me getting the Edit box.

This is rather difficult to describe with fancy pictures with red circles but it's easily reproducible.  Whenever I click Leave Closed in the re-open queue on MSO the "nominate this question for re-opening" pop-up appears. I normally press escape out of shock and a leave closed vote is recorded.  This is the latest review it's happened to me on:   You can also test it on , I clicked reopen this time and a leave closed vote was recorded but I also got a red popup stating that an error had occurred.  This is also occurring when the Edit & Reopen button is clicked, the edit box opens for a second before being overridden by the popup.


How can I create subdomains in PHP? I want every user that signs up on my site to instantly have their own subdomain.  EDIT  I have this working now. First I allowed wildcard subdomains in my server. I achieved that in JustHost by creating a subomain manually named * and specifying a folder called subdomains as the document root for wildcard subdomains. I added this to my .htaccess file in my subdomains folder:  RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.website\.com$ RewriteCond %{HTTP_HOST} ^(\w+)\.website\.com$ RewriteCond %{REQUEST_URI}:%1 !^/([^/]+)/([^:]*):\1 RewriteRule ^(.*)$ /%1/$1 [QSA]   Finally, I created a folder for my subdomain and place the subdomains files.

I am looking to create a system which on signup will create a subdomain on my website for the users account area.   e.g. johndoe.website.com  I think it would be something to do with the .htaccess file and possibly redirecting to another location on the website? I don't actually know. But any information to start me off would be greatly appreciated.  Creating a sign up area is not the problem - I have done this many a time. I am just unsure where to start with the subdomain.


I simply have the line as follows:     int player = 1, i, choice;   My question is, what is assigned to i and what is assigned to choice? I was always taught that a variable could not be assigned to multiple values.

How does the comma operator work in C++?  For instance, if I do:  a = b, c;     Does a end up equaling b or c?   (Yes, I know this is easy to test - just documenting on here for someone to find the answer quickly.)  Update:  This question has exposed a nuance when using the comma operator.  Just to document this:  a = b, c;    // a is set to the value of b!  a = (b, c);  // a is set to the value of c!   This question was actually inspired by a typo in code.  What was intended to be  a = b; c = d;   Turned into  a = b,    //  <-  Note comma typo! c = d;


What is right?  1) "well know"  or "well-know"  2) "non central"  or "non-central"  There some general rule?

Possible Duplicates:                In the sentence "Portland is known to be one of the most bike friendly cities in the US", is a hyphen necessary in "bike friendly"? As far as I know, the hyphen is only required when leaving it out would cause ambiguity. Wikipedia uses the example of "a small appliance factory" vs "a small-appliance factory".   As far as I can tell, the sentence above is pretty clear. A quick google search for "bike friendly city" brings up instances of both hyphenated and non-hyphenated usage. Thoughts?  Please excuse the poor formatting, sent from my iPhone.


I had created a sample check boxes dropdown, I facing an issue in hiding the dropdown by clicking outside the dropdwon. Below is the code    var expanded = false;  function showCheckboxes() {   var checkboxes = document.getElementById("checkboxes");   if (!expanded) {     checkboxes.style.display = "block";     expanded = true;   } else {     checkboxes.style.display = "none";     expanded = false;   } } $('#checkboxes').click(function(e) {   e.stopPropagation(); }); $(document).click(function() {   $('#checkboxes').style.display = "none"; }); .category {   width: 250px; }  #checkboxes {   width: 250px;   display: none;   border: 1px #aaa solid;   overflow-y: scroll;   background-color: white; }  #checkboxes label {   display: block; }  #checkboxes label:hover {   background-color: #bbb; } <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <select class="category" onclick="showCheckboxes()">   <option value="">Select cities   </option> </select> <div id="checkboxes">   <label>      <input type="checkbox" /> Bangalore   </label>   <label>       <input type="checkbox"  /> Hyderabad   </label>   <label>       <input type="checkbox" /> Delhi   </label>   <label>       <input type="checkbox" /> Mumbai   </label>   <label>       <input type="checkbox" /> Chennai   </label>   <label>       <input type="checkbox"  /> Panaji   </label> </div>     I want the drop down to get close by clicking outside any where. kindly help me on this i tried the script to make the display style none, but its not working

I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area.  Is something like this possible with jQuery?  $("#menuscontainer").clickOutsideThisElement(function() {     // Hide the menus });


I recently merged two sets of data in a single attributes table. To my surprise I can not opperate the variables or observations because, for some reason, it recognized the numbers in different columns as text entries. How can I change the type of data from text to rational number?

I want it to know how to convert string field values to integer values in QGIS Dufour... there are numbers and strings in the same field, when I use toreal(string) it stops and it won´t create the field.


This problem is happening when downloading multiple GIS files from different sites. I downloaded 2012.zip from  to see the precinct maps for 2012 in Washington state.  Everything looks normal, so I extract the data from the zipfile so I can upload it into QGIS with no problems. I go to add a shapefile to my new project, and select the shp file.  I leave everything in default, and go to add the shapefile.  Once I've done so, I see that a layer name "Statewide_Prec_2012" has been added but nothing shows up. The area where the map should be is completely blank, despite the layer being selected. I "zoom to layer" and the screen stays the same. I open the attributes table and it's blank. Now, if I go and look at the extracted data from earlier, this is what I find.  Does anyone have any clue what is happening? I never ran into this issue using ArcGIS but switched to using QGIS so I can work on projects on both of my computers.

I'm new to QGIS and I'm using QGIS 3.14. I was following the tutorials, and I got stuck in adding my very first new vector layer. Every time I tried to do the option new Vector layer, no map appears and the the attribute table is empty.  I tried using other shapefiles, the same thing happens, no map and no attributes. I have also tried using older versions but none works. What do I do?


I have a question for which I have set a 50 point bounty. What happens if I don't award anyone my bounty? Will the points be credited to my reputation? Or will they be wasted since I have not used them?

It's possible to offer and award bounties of reputation on questions.   What is a bounty? How can I find questions that have a bounty attached? How do I start a bounty? When can I start a bounty? Why is the system requiring me to choose a bounty amount that's higher than the minimum? Can I use Markdown formatting in the bounty remarks? Can I edit the remark? How long is the bounty period? How do I award a bounty? Can I award a bounty to my own answer? Can I award a bounty to an old answer? If I offer a bounty on someone else's question, can I award the bounty to their answer? After awarding the bounty, can I remove it or move it to another answer at a later time? What happens if there's no answer after the bounty period? What happens if I feel my question is still unanswered? What is automatic awarding? Are bounty awards exempt from the 200 points/day reputation limit? How does Community Wiki mode affect bounties? How does user deletion or post dissociation affect bounties? Can I award a bounty to an answer from a deleted user or one where the author was dissociated? Can I offer a second bounty after the first one has expired? Can I raise my bounty? What happens if a bounty question is closed or deleted? Why can't I vote to close or migrate a bounty question? What happens if I delete my account while I have an active bounty? Do I keep an awarded bounty when I delete my answer? What happens if a question where I awarded a bounty later gets deleted or migrated? Can I cancel my bounty? Can I affect / divide / share part of my bounty to two (or more) users? How many outstanding bounties can a single user have?      See also:  in the Help Center


I have a very simple page with an Iframe of a different web page inside it. The main page looks like this:  <button type="button" id="btnStart">   Start Simulation </button>

   And assuming that this is the main content of the webpage inside the iframe:  <form>   <select name="level">     <option val=1>One</option>     <option val=2>Two</option>     <option val=3>Three</option>     <option val=4>Four</option>   </select>   <button type="submit">Go</submit> </form>   Is it possible with jquery on the main page to select 'One' then click Go and after 3 sec, select Two then Go and then 3 sec, select Three then Go. Each page when Go is click has the same form elements so clicking through each select option should be doable? If so, how can I do it? I hope you understand my question if you need more details please comment.

I would like to manipulate the HTML inside an iframe using jQuery.  I thought I'd be able to do this by setting the context of the jQuery function to be the document of the iframe, something like:  $(function(){ //document ready     $('some selector', frames['nameOfMyIframe'].document).doStuff() });   However this doesn't seem to work. A bit of inspection shows me that the variables in frames['nameOfMyIframe'] are undefined unless I wait a while for the iframe to load. However, when the iframe loads the variables are not accessible (I get permission denied-type errors).  Does anyone know of a work-around to this?


I'm a little bit confused which version is correct:   New version available New version is available

Is there a particular term for the abbreviated language used in headlines (the removal of at least articles and conjunctions)?


I am trying to run a python script in a number of files, and read the output for. Currently it only checks if the file exists by:  if file == "output":   But this output dosn't confirm if the run is finished properly. When the run is finished properly, the last-but-one line of the file is: " This run finished at "  How can I read this last-but-one line file? With my current knowledge in python (novice), I have managed to do:  #!/usr/bin/python3 import os input = "FeMnPSi_EOS_10." for subdirs, dirs, files in os.walk(input):     for file in files:         if file == "out-Dy-eos2":             print("file found")             ifile=input+"/"+file             with open(ifile, "r") as if1:                 for line in if1:                     if "This run finished at" in line:                         print("Ends Properly")   The problem with this code is:   It does not know, if the "This run finished at" line is the penultimate line of the file.   I am not sure, but guess, here python has to read the file sequentially....for this 10000+ lines for each file.   So, can I make it better in checking if the line do exist, and among last two line, without reading the whole file?

I'm writing a log file viewer for a web application and for that I want to paginate through the lines of the log file.  The items in the file are line based with the newest item at the bottom. So I need a tail() method that can read n lines from the bottom and support an offset.  This is hat I came up with: def tail(f, n, offset=0):     """Reads a n lines from f with an offset of offset lines."""     avg_line_length = 74     to_read = n + offset     while 1:         try:             f.seek(-(avg_line_length * to_read), 2)         except IOError:             # woops.  apparently file is smaller than what we want             # to step back, go to the beginning instead             f.seek(0)         pos = f.tell()         lines = f.read().splitlines()         if len(lines) >= to_read or pos == 0:             return lines[-to_read:offset and -offset or None]         avg_line_length *= 1.3  Is this a reasonable approach?  What is the recommended way to tail log files with offsets?


I’m trying to run my virtual machine with some good response times, and I thought I should use more cores, but i’m worried something would go wrong if I used 4 cores on my VM even though my host machine has 4 cores, would anything go wrong?

VirtualBox, and possibly other VM software, allows the user to specify the number of CPUs exposed to the VM. In my particular case, I have a dual core CPU, with Windows 7 64-bit running natively, and Ubuntu 9.04 64-bit as the VM.  The help file suggests not setting this above the number of physical cores available. This makes sense. So, is it best allocating 1 or 2 CPU cores? Does this depend entirely on the native CPU load?


Made spring rolls but still got loads of wrappers left, they came frozen so can I refreeze them?

What are the general rules regarding when can you refreeze food that was frozen and then thawed in the fridge? and what are the reasons behind them? (Hygiene? Food quality?). Let's assume for the sake of the argument that the items were in a non-frozen state only a few hours.  To be more specific, I'm interested in the application of these rules for  - Ginger garlic paste - Dough - Indian Curries - Green Chilly paste - Frozen green peas


If Spaceship 1 is traveling at speed $.5c$ relative to Earth, and Spaceship 2 is traveling at speed $.3c$ relative to Earth in the same direction, what does Spaceship 2 see Spaceship 1's speed as?  I don't think it is quite as simple as $.5c-.3c = .2c$.

Let's say I fire a bus through space at (almost) the speed of light in vacuum. If I'm inside the bus (sitting on the back seat) and I run up the aisle of the bus toward the front, does that mean I'm traveling faster than the speed of light? (Relative to Earth that I just took off from.)


Using array m{} to vertically align cells in a tabular, and changing row height with \\[] the last cell is not properly aligned:  \documentclass{article} \usepackage{array}  \begin{document} \begin{tabular}{|m{.3\linewidth}|m{.3\linewidth}|m{.3\linewidth}|}   \hline   A & B & C \\[1cm]   \hline   1 & 2 & 3 \\[2cm]   \hline \end{tabular}  \end{document}   Can't understand why. Any idea?

Unfortunatly, I have a problem with m-columns (array package) in tables with adjusted row height. Somehow in the last column (only there) the text is not centered vertically.  Check it out:    \documentclass{article} \usepackage{array}  \begin{document}  \begin{tabular}{|m{0.18cm}|m{0.18cm}|m{0.18cm}|} \hline a & b & c  \\[2ex] \hline 0 & 0 & 0  \\ \hline \end{tabular}  \end{document}


I have a list with two columns: Name and ID. I have the ID value what is a unique field. I would like to get the Name value from the same row using javascript.  Thank you for your help!

I need to get item from list sharepoint by Id I use this code and it give me all the items of the list :     so how can I get only the considered item ?


Silly question, let me know if this should be on Meta, but should you say "a Ubuntu (computer, LiveUSB, etc.)," pronouncing Ubuntu as "You-boon-too", or should you say "an Ubuntu (computer, LiveUSB, etc.)," pronouncing Ubuntu as "Oo-boon-too"?  Note: I just tagged it as 19.04 because no tags fit.

I have never been good at deciphering the pronunciation guides:     ubuntu |oǒ'boǒntoō|   What is the best way to describe the pronunciation with like sounding words for each syllable?  "oǒ": ?  "boǒn": like Boone as in Daniel or like bun as in hamburger?  "toō": like too as in also?


Currently I have this and it works:  var markup = '
';     markup += '
This is a title
';     markup += '
This paragraph is really meaningful.
';     markup += '
'; var div_list = document.getElementById('div_list');         div_list.insertAdjacentHTML('beforeend', markup);   I want to move the markup to an html file (text.html). Then I want to assign the html from that file to a variable in my script.js file. The html file is located in the same folder as my script.js file. The main reason I'm doing this is to separate out my html into a file where I can work in html instead of adding all of the markup in my javascript file.  text.html contains the following:

This is a title

This paragraph is really meaningful.

   I simply want to assign that text to a variable in my script.js file. This way I can do something like  var textFromFile = //whatever I have to do to assign the text from text.html var div_list = document.getElementById('div_list');     div_list.insertAdjacentHTML('beforeend', textFromFile);

I need to do an  request in JavaScript. What's the best way to do that?  I need to do this in a Mac OS X dashcode widget.


In a chemistry class, students were learning about boiling point of various elements.Reuben has compiled a table that gives boiling points of each of various elements. The lowest boiling point is of Element X: – 200 degrees Fahrenheit. The highest boiling point is of Element Y: 550 degrees Fahrenheit Find the difference between the lowest and highest boiling point.    I know how to calculate the difference. -200 – 550 = -750. I am not sure if the answer is written as a negative or positive. Will the answer be – 750 F or 750 F ? Would greatly appreciate if you could explain what the correct answer is.

**In a chemistry class, students were learning about boiling point of various elements.Reuben has compiled a table that gives boiling points of each of various elements.  The lowest boiling point is of Element X: – 200 degrees Fahrenheit. The highest boiling point is of Element Y: 550 degrees Fahrenheit  Find the difference between the lowest and highest boiling point**    I know how to calculate the difference. -200 – 550 = -750.  I am not sure if the answer is written as a negative or positive. Isn’t difference in temperature always written as its absolute value? Will the answer be – 750 F or 750 F ?  Would greatly appreciate if you could explain what the correct answer is.


Let $V$ be a finite-dimensional vector space and $T$ be a linear map from $V$ to itself (in other words, it's an operator on $V$).      I need to prove that $T$ is a scalar multiple of the identity (i.e. $T(v)=cv$ for all $v \in V$ and for some $c \in F$, the underlying field) if and only if $ST=TS$ for all operators $S$ on $V$.   Note that $ST=TS$ does not necessarily mean that they are both equal to $I$, the identity operator. The only if part is trivial. But I cannot see how to attack the if part. Any help would be greatly appreciated.

The question is from Axler's "Linear Algebra Done Right", which I'm using for self-study.  We are given a linear operator $T$ over a finite dimensional vector space $V$. We have to show that $T$ is a scalar multiple of the identity iff $\forall S \in {\cal L}(V), TS = ST$. Here, ${\cal L}(V)$ denotes the set of all linear operators over $V$.  One direction is easy to prove. If $T$ is a scalar multiple of the identity, then there exists a scalar $a$ such that $Tv = av$, $\forall v \in V$. Hence, given an arbitrary vector $w$, $$TS(w) = T(Sw) = a(Sw) = S(aw) = S(Tw) = ST(w)$$ where the third equality is possible because $S$ is a linear operator. Then, it follows that $TS = ST$, as required.  I am, however, at a loss as to how to tackle the other direction. I thought that a proof by contradiction,  ultimately constructing a linear operator $S$ for which $TS \neq ST$, might be the way to go, but haven't made much progress.   Thanks in advance!


I have:   2018 15" MacBook Pro. A  A simple usb-c to hdmi adapter   I am currently using the dock to run 2 monitors + the macbook screen. I was hoping I could hook up the adapter to the dock and a 3rd external monitor, doing this did nothing. I then tried connecting the 3rd monitor directly to the macbook with the adapter... still nothing.  If I unplug the dock, the monitor connected via the adapter works! ... but when I connect the dock back in... only one of the 2 monitors connected to it will turn on.  It's like after it identifies 2 monitors, it decides it doesn't want to connect another.  Is there any way for me to get 3 external monitors working?

I looked for 20 minutes for a post similar to mines, and couldn't find one. Which is interesting to me, because I don't understand why people want to use the display to HDMI instead of using thunderbolt USB-c port natively instead. Before I get to this...I shall ask my question.  I plan on buying a MacBook Pro-2018 15 inch for my home-based business. I need to connect 3 monitors to this laptop. I understand the 15 inch MacBook Pro comes with 4 thunderbolts 3 ports. I plan to buy 3 24-27 inch monitors that are 4k display. Also, I understand that the charger for this laptop uses a Thunderbolt 3 port, which leaves me with 3 left. Will connecting 3 monitors that have Thunderbolt 3 ports leave me with performance issues? Will the refresh rate lower?  Finally, why do I see a lot of post with people using old 2.0 display port to HDMI; why they can use Thunderbolt 3 port natively?


Basically as the title says. I'm not able to find a polyhedron with Euler characteristic equal to $3$.

I read a little introductory book to topology.  It basically said that for any two-dimensional manifold (well maybe just the closed ones, as I think about it) its topology can be unambiguously defined by the Euler's characteristic and orientability.  Consequently it is very nice that any convex polyhedron has its Euler characteristic $\chi=2$ which means that the global topology is the same as for the sphere.  What about the examples below? In fact $\chi>2$ which occurs in these cases do not correspond to any global topologies I know.


I have a problem with concatenating dictionaries. Have so much code so I show in example what my problem is.  d1 = {'the':3, 'fine':4, 'word':2} + d2 = {'the':2, 'fine':4, 'word':1, 'knight':1, 'orange':1} + d3 = {'the':5, 'fine':8, 'word':3, 'sequel':1, 'jimbo':1} = finald = {'the':10, 'fine':16, 'word':6, 'knight':1, 'orange':1, 'sequel':1, 'jimbo':1}   It is prepering wordcounts for wordcloud. I dont know how to concatenate values of the keys it is puzzle for me. Please help.  Best regards

I have two Python dictionaries, and I want to write a single expression that returns these two dictionaries, merged (i.e. taking the union).  The update() method would be what I need, if it returned its result instead of modifying a dictionary in-place. >>> x = {'a': 1, 'b': 2} >>> y = {'b': 10, 'c': 11} >>> z = x.update(y) >>> print(z) None >>> x {'a': 1, 'b': 10, 'c': 11}  How can I get that final merged dictionary in z, not x? (To be extra-clear, the last-one-wins conflict-handling of dict.update() is what I'm looking for as well.)


So whenever I launch a game that uses game-center I get a message on the top of the screen that says "Welcome Back (My Game Center username)". How do I remove this? It's really annoying and it stays there for like 6 seconds.

As per  I've found banners to cause slowdown on iOS 5, it turns out the "welcome, you have been signed in" Game Center message does this too, and on occasion it will interupt me several times in a game if I switch in/out of the app while playing as it logs be in/out repeatedly.  Is there a way to disable this notification while leaving Game Center enabled? I tried revoking the banner notification rights from Game Center but the pop up still appears.


Is there any better way of getting the right length of array containing digits?  I have an array of digits: 0, 0, 1 and I try to get length of it. It obviously breaks and returns 0. I am new to C but I tried to make custom strlen function:  int custom_strlen(char *str) {     for(int i = 1; ;i++) {         if (str[i] == 0) {             return i;         }     }     return -47; }   but it is not that efficient and in some cases returns unexpected values as well. The expected out put would be 3 in this case.  Is there any function to use?

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


How to connect a T12V-10L-30LED-W LED strip to an Arduino?     is the strip specification. And here the actual image of the strip:   The package says: VCC: RED GND: WHITE DAT: GREEN  My question now is: Does the DAT input take 12V or something else? And how to wire this with an external 12V power source?

Background I am building a scale RC helicopter and ordered a bunch of 3mm LEDs to give it some nice navigation and strobe lights which I plan to drive with an Arduino Nano. Problem is that I goofed and didn't notice that the LEDs are 12v until they arrived.  I know that the Arduino Nano can accept 12V on pin 30, but I think the voltage output on any of the "D" or "A" pins is always 5v (correct??). Question If the voltage output of the Arduino pins is 5v, then how can I drive the 12v LEDs using the Arduino, or is it impossible?


I want to insert special character & in my insert statement. My insert is:  INSERT INTO STUDENT(name, class_id) VALUES ('Samantha', 'Java_22 & Oracle_14');   If I try to run this query I am getting a popup and it asks me to enter value for Oracle_14.   How can I enter special characters like & in the insert statement for oracle db?

I have a SQL script that creates a package with a comment containing an ampersand (&). When I run the script from SQL Plus, I am prompted to enter a substitute value for the string starting with &. How do I disable this feature so that SQL Plus ignores the ampersand?


I'm currently testing TexMaker and whenever I compile my .tex file these are the files that appear in the folder:    I'd like to have only .tex and .pdf files in my folder. Are the extra files necessary? Also, are they exclusive to TexMaker or would I have the same problem in another editor?

When compiling with pdflatex we need the *.aux files in a separate folder.


Total newbie, I can download programs, but how do I make the program executable? Using 13.10   Thank you   John

How do I mark a file as executable using a graphical interface (GUI)?


I am learning about PCA, regarding PCA I need to know that given a dataset is it always necessary to use centering? what if I don't center the variables used in PCA?

I keep reading about instances where we center the data (e.g., with regularization or PCA) in order to remove the intercept (as mentioned in ). I know it's simple, but I'm having a hard time intuitively understanding this. Could someone provide the intuition or a reference I can read?


Is $\log(n!) \in\Theta(n \log n)$?  I know it is $O(n \log n)$ because $\log(n!) \leq \log(n^n)$ which is the same as $\log(n!) \leq n \log n$.  But how can I show it is also $\Omega(n \log n)$?

I can't seem to find a good way to solve this.  I tried using L'Hopitals, but the derivative of $\log(n!)$ is really ugly. I know that the answer is 1, but I do not know why the answer is one.  Any simple way to go about this?


friends around the world!  I need to show the following:  Let $f(z):\mathbb{C}\rightarrow \mathbb{C}$ an analytic function such that  $$|f(z)-1| < 1$$  in $\Omega \subset \mathbb{C}$  Then  $$ \int_{\gamma} \frac{f'(z)}{f(z)}dz = 0 $$  IDEAS:  There is some result that might be helpful:  Theorem: The integral   $$ \int_{\gamma} pdx + qdy  = 0$$  iff the integral defined in $\Omega$ depends only on the end points of $\gamma$  iff there is a function $U(x,y)$ in $\Omega$ with the partial derivatives $\frac{\partial U }{\partial x} = p$, $\frac{\partial U}{\partial y} = q$.  However I am not sure how to use the hypothesis $|f(z)-1| < 1$.   Can anyone help me?

Assume that $f(z)$ is holomorphic and satisfies the inequality $|f(z)-1|<1$ in a region $|z|<R$. Show that $$\int_\gamma\frac{f'(z)}{f(z)}dz=0$$ for all closed curves $\gamma$ in $|z|<R$. (The continuity of $f'(z)$ is taken for granted.)   The anti-derivative of $\dfrac{f'(z)}{f(z)}$ is just $\ln(f(z))$, which is holomorphic as long as $\ln(f(z))$ avoids the log branch cut. The log branch cut is the negative real axis, $a\leq 0$.   I want to use the fact that: If $f$ is the derivative of a holomorphic function in the region $\omega$, then the integral $\int_\gamma fdz$ depends only on the endpoints of $\gamma$.  To use this, we only need the condition that $f(z)$ is not a non-positive real number. The condition $|f(z)-1|<1$ seems like an overkill. (Of course it does imply that $f(z)$ is not a non-positive real number.) But am I misunderstanding something?


After the BLOB columns of Oracle (11g r2) tables are migrated into a Postgres (9.4.5) table such as using Ora2Pg, I have two questions:  1) Which data type will the new column assume, is it BYTEA or OID?  2) Will the (BLOB) data be copied over correspondingly?  Or I need to do a separate migration of the data?

I use the data type BLOB in an Oracle table to store images and document files.  Now for Postgres(9.4.5), I have two options, i.e., BYTEA or OID.  With consideration of passing the params (SAVING) from the Java side as follows:  DiskFileItemDeepy file  =  myFile;   InputStream is = null; long fileSize = 0; if (file != null && file.getFileSize() > 0){    is = file.getInputStream();    fileSize = file.getFileSize();    call.setBinaryStream(1, (InputStream)is,  (long)fileSize); } ... call.execute();   //When retrieve the data use:  java.sql.Blob blob = (Blob) resultSet.getBlob(tableColumnName);     For the purpose mentioned above, which Postgres data type is a better candidate for replacement of the BLOB, is it BYTEA or OID?


I am new to LaTeX and I would like to know which are the good editor for a beginner user like me, who has no previous experience with this. I'm interested in writing a report on my project and thesis in LaTeX. I'll be using Windows.  I did find in this link  people agreeing that emacs and vim are good, but  I have no idea how to install them. I be grateful if someone can help me out in this regard. Or suggesting an editor which can be used without much complication for basic use of creating a simple document.

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.


Similar to the Fate Fudge dice, sometimes a DM might "Fudge" a dice roll (without using the actual Fudge dice). I.e., they might make a roll pass/fail, regardless of what is on the actual dice.  For example, if a PC is low on health, and the DM rolls a critical hit on that PC they might "Fudge" it to lower it from a critical hit so the player might not die outright.  In what situations should a GM "Fudge" a dice roll, and how should it be handled?

When I started my first D&D campaign as a DM, I accidentally rolled and confirmed a crit on a PC from a goblin. It was an instant kill as our campaign had no cleric. That time I decided to fudge the dice. Now, there's a similar problem, but this time the PCs are at 3rd level and they are dealing with a very important NPC. If they fail this one diplomacy check, the entire game world will fall apart, as the king would then send his entire army against the PC's homeland and will destroy it, plunging my entire game world into chaos, at which time drow that I wanted to save for a later adventure will have to come out, which will instigate a wizard's guild to release their secret ultra-deadly virus, and everything in my game world, including the PCs, will die. So should I fudge the dice roll? When is it good to fudge it?


If i have completed all the research work and compiled a research article then why should I present that paper in a conference and not submit it to a good journal for publication ?

There are two ways of treating conferences that are commonly mentioned on this site:   Conferences are publication venues for papers (or similar). Submissions will be subjected to a serious peer review, are citable as evidence, and are a relevant achievement. Submitting the same material to two different conferences or a journal and a conference would be considered self-plagiarism.  This applies to computer science and engineering (or at least some subfields thereof) – for details, see:  Conferences are not publication venues. The material presented there is typically also published in journals, books, and similar – but this process is not tied to the conference; it may occur before the conference, later, or even not at all. Submissions are only subjected to minimal review¹, are not citable as evidence, and not considered a big achievement. Participating in conferences is still considered important though. It is common that authors present the same material at different conferences.  This applies to the majority of fields.  ¹ to weed out utter crap or to decide what should be a talk and what a poster   In light of , I am interested whether the above two cases are the only two. To me, it would not be surprising if this actually is the case, as the two categories have a self-preserving mechanisms. For example, for a conference belonging to the first category, weakening the criteria for submission would usually be a bad move. On the other hand, I am very well aware that I do not know every field’s customs. Hence, I am asking: Are there conferences that hold a status not described by the two categories above? Please answer only if you can name and describe such a conference – if this question remains unanswered, this would be an acceptable and meaningful outcome.  Note that this is only about what is submitted directly to the conference for the purpose of being presented there. Whether articles corresponding to the presented material will be collected for a book, special issue of a journal, or other form of proceedings – be it with separate peer review or not – is irrelevant for the purposes of this question.


gives the following proof without words for the identity  $(1 + 2 + \cdots + n)^2 = 1^3 + 2^3 + \cdots + n^3$.    I find it interesting but have trouble seeing the proof behind it.  Could anyone could give me a formal proof based on this animation?

How can I prove that     $$1^3+ 2^3 + \cdots + n^3 = \left(\frac{n(n+1)}{2}\right)^2$$    for all $n \in \mathbb{N}$? I am looking for a proof using mathematical induction.  Thanks


I'll start this off by saying I'm not the most knowledgeable person with Python, or Blender's API. I'm trying to write a script that loops through all the mesh objects in a scene and does the following:  Creates an image designated to be the baked texture for the object Inserts image texture nodes into every material in that object Does a Lightmap Pack on the object Does a Diffuse bake with Color only After that it saves the baked texture image and an exported fbx of the current object mesh to a given file path  Here's what I have so far: import bpy  scene = bpy.context.scene  # deselect all to make sure select one at a time bpy.ops.object.select_all(action='DESELECT')  for obj in scene.objects:       if (obj.type == 'MESH'):         imageName = "Texture" #Just a filler name for now         img = bpy.data.images.new(imageName,1024,1024)                  for m in obj.data.materials:             m.use_nodes = True             nodes = m.node_tree.nodes              # Add a image texture node and set its location:                 tex = nodes.new("ShaderNodeTexImage")             tex.location = (100,100)             tex.image = img           bpy.context.view_layer.objects.active = obj         obj.select_set(True)          bpy.ops.object.shade_flat()                  lm =  obj.data.uv_layers.get("LightMap")         if not lm:             lm = obj.data.uv_layers.new(name="LightMap")                      lm.active = True         bpy.ops.object.editmode_toggle()         bpy.ops.mesh.select_all(action = 'SELECT') # for all faces          bpy.ops.uv.lightmap_pack(PREF_CONTEXT='SEL_FACES', PREF_PACK_IN_ONE=True, PREF_NEW_UVLAYER=False, PREF_APPLY_IMAGE=False, PREF_IMG_PX_SIZE=1024, PREF_BOX_DIV=12, PREF_MARGIN_DIV=0.24)         bpy.ops.object.editmode_toggle()         bpy.context.scene.render.engine = 'CYCLES'         bpy.ops.object.bake(type='DIFFUSE', pass_filter={'COLOR'}, save_mode='EXTERNAL')          img.save_render(filepath='C:\\Users\\TestUser\\Desktop\\TestImage.png')           So far I've only been testing it in scenes with 1 object so not how it works for multiple, but it's sort of working. It creates a proper (or at least proper looking) baked texture image from all the materials and properly saves it to the desktop. No exporting the obj as an FBX yet as I haven't been able to figure out the chunk of code for that. One issue is that the texture map doesn't properly apply to the object, it winds up looking tiled. Here's a photo to show what I mean:  The biggest issue however is that it doesn't seem like UV map is actually being "connected" to the object. I'm not a pro at Blender so I don't know exactly how to word this, but I've manually exported the obj as an FBX before and tried inserting into a game engine, only to have it error telling me the texture couldn't be found. Very important note is if I do all this manually everything works properly, so my code is definitely off. Here's a reference photo for what the end result is supposed to look like (this is one material with it's base color set to be the baked image texture):  Any help is much appreciated!

I use Blender 2.83. For a addon (accessible from the 3D-View) I want to bake texture maps. I am perfectly able to do it without scripting. But with python I was not sucessful sofar. To reduce my problem to the barest minumum I start with a selected object with valid UV. I then execute the following python script: import bpy  obj = bpy.context.active_object  # Creating a texture node, linked with a new image mat = obj.data.materials[0] mat.use_nodes = True texImage = mat.node_tree.nodes.new('ShaderNodeTexImage') img = bpy.ops.image.new(name= obj.name + '_BakedTexture') texImage = img  # !!! No image is linked to the texture node !!!  # Baking to the newly created image # The following part works if I create the texture node and the assigning of the image by hand bpy.context.view_layer.objects.active = obj bpy.ops.object.bake(type='DIFFUSE', save_mode='EXTERNAL', filepath='C:\\TEMP\\baked.png', use_automatic_name=True, width=512, height=512)  I think what I am missing is the correct linking of the image to the texture node. I consulted similar questions such as  but their answers did not help (code for Blender 2.7 that is not compatible anymore, i guess).


I want to take a screenshot. The default screenshot app (16.04) works fine, but I need to open gimp to cut the image. I just want a part of the window.  It would be great if there is a simple screenshot app which loads fast and which allows me to cut the image directly, without staring gimp.  Note: PrtScn button doesn't work on my keyboard

I want to take a screenshot of a whole desktop with Applications Menu selection.How to do this?


Does your commander still count as being your commander if it is turned face down?  For example, I have my commander on the battlefield and my opponent plays . Ixidron then turns my commander face down.  From Gatherer:     Creatures turned face down by Ixidron are 2/2 creatures with no text,   no name, no subtypes, no expansion symbol, and no mana cost.   Will my face down commander still:   deal commander damage? enable "Lieutenant" abilities?   Is the result different if my commander is turned face down by another means?

Once and for all: Is there anything that can possibly be done to my commander that would cause it to cease being my commander?    All of these questions ask the same thing, but aren't general enough to be marked as a duplicate.      Is a commander still a commander if it gets turned into a forest?     Is a commander still a commander if it gets turned face down?


There are two similar questions as the comment notified:   I could see two points there:  compactness of the space limited by potential.  symmetry requirement such as angular symmetry of atom, Lorentz symmetry, etc.   But I don't see the explanation of why there arise the quantized quantities such as mass, charge, and magnetic moment I explained below. (If I missed the answer, guide me please.) The free electrons are not in the compact space and not in the symmetry requirement except the translation. Lorentz invariance would not be the point as we can talk of a non-relativistic electron. But we can observe the quantized charge and mass. So I think my question is still not answered.  When I was a physics student, I remember to solve the Schrodinger equation with the well potential. And because of the boundary condition which the equation has to satisfy, only the solutions resonating with the well can survive. And this leads to the quantization of energy level even though Hilbert space is continuous in terms of energy level. I also remember a similar logic when I was introduced into the quantum field theory. One of my teachers explained the quantization with the resonance. He starts with the finite box and increases the box size infinite to get the quantization of free particle. However, how about the electric charge? The electric charge of electrons can exist as the multiples of a unit charge only(I remember some particles with different charge units though.). Also, the mass of fundamental particles are fixed and can exist as the multiples of unit mass. And there is spin whose size is fixed as giving rise to the multiples of the unit magnetic moment. In the view of classical mechanics, those quantities (mass, charge, and magnetic moment) are assumed to be the continuous number. Do we understand the origin of these quantized quantities? If we do, could you explain the reason for the layman?

What is the most essential reason that actually leads to the quantization. I am reading the book on quantum mechanics by Griffiths. The quanta in the infinite potential well for e.g. arise due to the boundary conditions, and the quanta in harmonic oscillator arise due to the commutation relations of the ladder operators, which give energy eigenvalues differing by a multiple of $\hbar$. But what actually is the reason for the discreteness in quantum theory? Which postulate is responsible for that. I tried going backwards, but for me it somehow seems to come magically out of the mathematics.


Maybe I am not explaining what I have here There are 3/4 AWG WIRES leaving the meter and Running to a 100A disconnect with a neutral bar no grounding wires in the box just 2 hot and 1 for the neutral there are 3/4Awg wires running from there down the pole into a  junction box there they are polaris spiced   4Awg to 6Awg for 1 hot same for the other hot and 4(4 for neutral from there they run 30 ft. Underground to the 50 amp 4 terminal receptacle  and a  6/3 8/1 cord that is pigtailed into my service panel the green is on the ground bar but is actually not really connected to anything just happened to be in the cord my service panel has a 100amp main but no ground wires there any ground  rods it has mixed neutral and ground wires on both bars that are bonded basically all I have is neutral bond to equipment grounds with no other path My 2 bedroom 2 bath manufactured home is 1000 sq ft  is all electric with a  60 amp  furnace  no gas service that 50 amp receptical box and 50 amp cord would not be enough to supply my home nor do I think are the 2 6awg hot feeder wires The park owner has said he will repair this What should actually be done Sorry for the grammer and rambeling just trying to explain the situation I have been trying to tell you the main disconnect breaker is feeding the wires going to the service panel in  My home Both are 100Amp ma  List item  in breakers one is located at the meter and the other is in my house There is definitely 100Amp  Feeding the WIRES leaving the outside disconnect they are 4/3 those wires  leave the disconnect box and run to a junction box at ground level of meter pole and splice into 6/2 4/1  those run underground and come to the 50amp rated receptacle box and from there the 50amp Rated cord that pigtailed into my house panel that feeds  a 100amp main breaker witch feed the panel I have been trying to tell you is I basically have ls 100amp service feeding Spliced wires 2 4/6  for hot wires and 1 4/4 wire for neutral that 4/4  neutral goes into the receptical box and  where the wires are now going to the 6/3 8/1 cord that 8/1ground in the plug is in the cord but is not  going to anything in the receptical box as it only has 2 hot and 1 neutral coming into the 4wire receptacle So are you following me What I have is 100Amp service feeding the 6AWG wires And 4 AWG Neutral that spilts to a 8AWG neutral  So I have a 100amp service on 6 awg wire with no grodund do you understand So if you know what I mean what should be done to keep it safe Sorry if my Grammer and sentences give you a hard time following message

I  have 3 feeder wires coming up underground from the meter and main disconnect. They tie in to a 50amp receptacle box and a 6 AWG cord With 8Awg ground all in one. That cord goes into my electrical panel where the grounds and neutrals are mixed and bonded. As far as I know the green ground connects to the RV type receptacle box and goes nowhere except that it came with the cord. There is no ground at the meter or disconnect. The house has no grounding system, as I can not locate as much as a grounded water pipe. I can install 2 ground rods or maybe the ground wire to the water pipes was disconnected or cut. The 3 wire feeders leave the disconnect in conduit and I see no conduit coming out, just three wires. Perhaps the conduit is below the ground somewhere. It is a 30 foot run with 6AWG wire. What I need to know is: what Would be the best way to waterproof the connections and get them into my panel, not just replacing the RV type of box and 50 amp cord that lays on the ground with just loose wires running into it? That is why it was damaged in the first place  when the sewer backed up and corroded the receptacle and cord. It was fine for years, but what are my options? The disconnect is 100 Amp, as is my service panel. The home was installed in 1978. Can I just put conduit over the wires that come out of the ground and use a weather tight box. Should I replace the whole cord or just cut it and replace the plug end. Where should I install the grounds at. The meter disconnect or at my home. I think someone changed out the main panel as it is tag as being a sub panel with a main disconnect outside  not a service  entrance. I just checked the furnace it is 55amp minimum the water heater is 30Amp with a electric range and dryer and lights and receptacles also A 220a/c and 2 120A/C s in the summer time. I would not want to use a 50Amp power cord would i Would I be able to use the 100Amp service disconnect and 100amp panel  I believe the  service entry cables are6/2 4/0 with no ground in sight  no grounding rods nothing.  I rent the lot but own the home Would I or the landlord be responsible for the upgrade in lima,ohio. Should I upgrade to a 150amp panel with a 200amp disconnect outside how do I calculate the loads in the home to figure out what I need The flood and the over current has burned one side of the 50 Amp cord completely out I don't know what year the home was installed on this lot or if it was inspected as it is not even properly set up on it's foundation piers  it's just one mess after another. Thanks guys for your patience


My Opera browser has been unable to display Stack Overflow webpages properly since the other day. See the image. I don't know why. But there is no problem when it opens other webpages like Super User, Stack Exchange. Has anyone ever encountered such a problem?

Stack Overflow seems to be having some CSS issues right now. At first, it presented as CSS disappearing when refreshing in Firefox (though hitting Enter from the address bar seemed to restore it - I'm thinking that's a cache issue though). I loaded my blank Firefox profile and discovered CSS wasn't rendering on Stack Overflow at all (Meta seems fine; haven't checked other SE sites).  I've since checked the site in Chrome and Opera, and can repro in both.


Let $\sum_{n=0}^{\infty}a_n^2$ a convergent series. Prove that $\sum_{n=0}^{\infty}a_n/n$ converges or give a counter-example. I know that there is already a post concerning this statement with a lot of answers, but i did't find a similar approach to mine in that post and an answer to my question. After a long searching for a counter-example (failed), i started to prove the statement. First, i tried to prove it by comparaison but didn't succeed. So, i tried to pass by Cauchy definition. I'm not sure at all if it holds what i did. If someone could give a feedback and point to my errors, i would really appreciate it. Proof As $\sum_{n=0}^{\infty}a_n^2$ exists, then $\lim_{n\to \infty}a_n^2=0$. Thus, $\forall \epsilon>0 \ \exists N \ \forall n\ge N:$ $|a_n|<\sqrt{\epsilon}$ Let's proof that $\sum_{n=0}^{\infty}\dfrac{a_n}{n}$ is Cauchy. By definition of Cauchy we have to satisfy the following: $\forall \epsilon>0 \ \exists N' \ \forall n\ge N'$: $\Big|\sum_{k=N'}^{n}\dfrac{a_k}{k}\Big|<\epsilon$ But, $\Big|\sum_{k=N'}^{n}\dfrac{a_k}{k}\Big|\le \sum_{k=N'}^{n}\dfrac{|a_k|}{k}\le \sqrt{\epsilon}\sum_{k=N'}^{n}\dfrac{1}{k}$ Let $(x_n)=\frac{1}{n}$. As $\lim_{n\to\infty}x_n=0$ we have by definition that: $\forall \epsilon>0 \ \exists N'' \ \forall n\ge N'':$ $|x_n|<\sqrt{\epsilon}$. Therefore, $\sqrt{\epsilon}\sum_{k=N'}^{n}\dfrac{1}{k}<\sqrt{\epsilon}\sqrt{\epsilon}=\epsilon$. So, if we choose $N'=\max\{N,N''\}$, we satisfy Cauchy definition. Edit: As $x_n$ is a converging sequence: $\exists M>0$: $|x_n|\le M \ \forall n \in \mathbf{N}$. We could then take $|a_n|<\frac{\epsilon}{M(n-N)}$. Thus, $\Big|\sum_{k=N'}^{n}\dfrac{a_k}{k}\Big|\le \frac{\epsilon}{M(n-N)}\sum_{k=N'}^{n}\dfrac{1}{k}\le \frac{\epsilon}{M(n-N)}\cdot M(n-N')$ If we take $N'=N$, we have then: $\Big|\sum_{k=N'}^{n}\dfrac{a_k}{k}\Big|\le\epsilon$ Does it hold this way?

Let $a_1,a_2,a_3,\ldots$ be reals. Prove that if $\sum_{n=1}^{\infty} a_n^{2}$ converges, then so does $\sum_{n=1}^{\infty} \frac {a_n}{n}$.   For this I have shown the case for when $ a_n^{2} \le\frac {|a_n|}{n}$ $\Rightarrow$ $ |a_n|\le\frac {1}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le \frac{1}{n^{2}}$ and we know that $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges and hence $\sum_{n=1}^{\infty}\frac {a_n}{n}$ converges by the comparison test. Now considering $ a_n^{2} \ge\frac {|a_n|}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le a_n^{2}$ $\rightarrow$ combining the two cases for any n we have: $\frac {|a_n|}{n}\le\frac{1}{n^{2}}+a_n^{2}$ Hence using the comparion test again we know that $\sum_{n=1}^{\infty} a_n^{2}$ converges and $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges hence the sum converges so we can conclude that $\sum_{n=1}^{\infty} \frac {a_n}{n}$ is absoluetly convergent $\Rightarrow$ convergent.  Not to sure if this is correct, any help would be much appreciated, many thanks.


I'm trying to vertically center a span or div element within another div element. However when I put vertical-align: middle, nothing happens. I've tried changing the display properties of both elements, and nothing seems to work.  This is what I'm currently doing in my webpage:  <!DOCTYPE HTML>
Test

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


I have several jobs. For each job, I often open few browser tabs with known URL. So, job 1 (http://sth,http://sth2,http://sth3) job 2 (http://sth4,http://sth5,http://sth6,http://sth7) Each time opening the browser, how could we restore a specific group of tabs? Is there any way to save a number of tabs into a group and I could open them with correct order by just a click?


When I try to do a dowhile loop in Java with a string it just terminates the program without an error not giving me a chance to enter if I would like to continue.  How do I make my program loop if requested using a string?  public static void main(String args[]) {             Scanner user_input = new Scanner (System.in);     Maths math = new Maths();      double firstNum, secondNum;     String calcAgain = null;      do{       System.out.println("Enter First Number: ");     firstNum = user_input.nextDouble();     System.out.println("Enter Second Number: ");     secondNum = user_input.nextDouble();      System.out.println("Please select an operation! (+,-,*,/)");      String operation = user_input.next();      if (operation.equals("+")) {         System.out.println(math.add(firstNum, secondNum));     }      else if (operation.equals("-")) {         System.out.println(math.subtract(firstNum, secondNum));     }      else if (operation.equals("*")) {         System.out.println(math.multiply(firstNum, secondNum));     }      else if (operation.equals("/")) {         System.out.println(math.divide(firstNum, secondNum));     }      else {         System.out.println("Invalid Function!");     }      System.out.println("Would you like to do another calculation? ");      calcAgain = user_input.nextLine();   }while(calcAgain == "yes");

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I am very new to any form of Latex and markdown coding but I am trying to assist my student as much as possible. He is visually impaired and is finding markdown, with maths in LaTex, really accessible so I am formatting his work as best as I can using that. However today I came across the attached example and I really don't know where to start! I can provide it in hard copy braille ok but I would like to know how it can be done in code Can anyone help please....this is for an almost complete novice]

I want to write a conditional expression such as the following.    What is the best way to express such conditional expressions in Latex?


In Episode V Luke drops his lightsaber from cloud city into Bespin, a gas giant. In VII it is seen recovered on Takodana held by Maz Kanata. How did anyone find and retrieve it?

In The Force Awakens:      Maz Kanata tells Rey that the lightsaber she just picked up and had visions from belonged to Anakin and Luke and now it's hers.   The lightsaber that Luke got from Obi-Wan Kenobi in A New Hope was lost/destroyed when Luke fought Darth Vader in Star Wars: The Empire Strikes Back.  In Return of the Jedi Darth Vader compliments Luke on building a new lightsaber and tells Luke that his skills are now complete.   How could that possibly be the lightsaber that Anakin used originally, and that was then passed on to Luke, when that lightsaber no longer exists?  Writers notes, director's notes, interviews, cast interviews, etc. are welcome. Thanks.


What are the dimensions for the cheapest possible rectangular box with a volume of $490 cm^3$  if the material for the bottom costs $\$6/cm^2$, material for the sides costs $\$7/cm^2$, and material for the top costs $\$14/cm^2$ ?  I can't seem to get anywhere close to the answer in $x,y,z$ form.

A rectangular box is to have a square base and a volume of 40 ft3. If the material for the base costs \$0.31 per square foot, the material for the sides costs $0.05 per square foot, and the material for the top costs \$0.19 per square foot, determine the dimensions of the box that can be constructed at minimum cost.  Ive been trying to solve this for a while but I can't figure out what the cost function should be. or even how i should construct the volume equation.


I was given feedback on an answer I gave I want to know if I can comment on my own answer even if I don’t have 50 reputation.

Across the Stack Exchange network you may leave comments on a question or answer.  How do comments work? What are comments for, and when shouldn't I comment? Who can post comments? Who can edit comments? How can I format and link in comments? My comment doesn't contain some of the text I typed in it; why? My comment appears to be long enough, but I can't post it because it's too short; why? Who can delete comments? When should comments be deleted? Why can't I comment on specific posts even if I have enough reputation to comment? When can comments be undeleted? What are automatic comments? How can I link to comments? Anything else I should know about comments?  Also see the FAQ articles on  and .


I know two definitions of uniform integrability:   (Rudin - Real and Complex Analysis). Let $(X,\mathfrak{M},\mu)$ be a positive measure space. A set $\Phi\subset L^1(\mu)$ is called uniformly integrable if to each $\epsilon>0$ corresponds a $\delta>0$ such that $$\left|\int_E fd\mu\right|<\epsilon\tag{1}$$ whenever $f\in\Phi$ and $\mu(E)<\delta$. (Royden & Fitzpatrick - Real Analysis) Same thing except that $(1)$ is replaced by $$\int_E|f|d\mu<\epsilon.$$   Are the two equivalent? Clearly 2. implies 1., but I am not sure whether or not 1. implies 2.   The second one a lot more convenient to use in proofs, but sometime I don't know if "uniformly integrable" only assumes the first one.

Let $(X,\mathcal{M},\mu)$ be a measure space and $\{f\}$ be a sequence of functions on $X$, each of which is integrable over $X$. Show that $\{f_n\}$ is uniformly integrable if and only if for each $\varepsilon \gt 0$, there is a $\delta \gt 0$ such that for any natural number $n$ and measurable subset $E$ of $X$, if $\mu(E) \lt \delta$, $$ \left|\int_E f_n~d\mu\right| \lt \epsilon.$$     I think one direction $(\Rightarrow)$ is clear. Since $f_n$ being uniformly integrable imply that for every $\varepsilon\gt 0,~\exists \delta \gt 0$ such that for any $E\in \mathcal{M},~\mu(E)\lt \delta$, $\int_E |f_n|~d\mu$ for every natural $n$. But then   $$ \left|\int_E f_n~d\mu\right|\le \int_E|f_n|~d\mu \lt \varepsilon.$$    Any suggestions for the other direction?   Edit:  Following Davide's suggestions, I have   $$ \begin{align*} \int_E |f_n|~d\mu & \le \int_{E\cap [f_n \ge 0]} f_n~d\mu + \int_{E\cap [f_n \lt 0]} (-f_n)~d\mu\\ & = \left| \int_{E\cap [f_n \ge 0]} f_n~d\mu \right| + \left| \int_{E\cap [f_n \lt 0]}f_n~d\mu \right| \\ & \lt \varepsilon + \varepsilon = 2\varepsilon. \end{align*} $$


I want to draw a plan with measurements, trees, entries, North sign, paths, something similar to AutoCad but for lands.  What would you recommend?

Just that. By good I mean something at the level of SolidWorks, AutoCAD, or similar. This is a complete limitation for me (and many others) to use Ubuntu.


As in ,the distance function is         I don't know how to get this formula, I mean how to prove it.

While looking for an expression of the hyperbolic distance in the Upper Half Plane $\mathbb{H}=\{z=x +iy \in \mathbb{C}| y>0\},$ I came across two different expressions. Both of them in Wikipedia.   In the page  it is explicitly stated that the distance of $z,w \in \mathbb{H}$ is: $$d_{hyp}(z,w)= Arccosh(1+ \frac{|z-w|^2}{2 Im(z) Im(w)}).$$ While in the page  it is stated that the metric on the Upper Half Plane is : $$\rho(z,w)=2 Arctangh(\frac{|z-w|}{|z-\bar w|}).$$  At the beginnning I thought it would have been an easy exercise to prove the equivalence of the two expressions. But first I failed in doing that, and then I found, using Mathematica, a counterexample (i.e. $z=2i$ and $w=i$).  Question: If they are not equal, which of the two expressions is the right one? Then, how is the metric related to the induced distance?  The question is probably silly, but I'm often confused about the relationships between "metric" objects.   Thank you very much for your time!


I forgot the answer to my security question and no email to rescue mail received.  How can I change my rescue email? Or is there a way to change the answer to something like "used code for mobile No."?

I forgot the answers of the security questions. Not that I seriously need to do it now, but there might be a problem if I need to answer those in future.  I still remember my password.  How can I reset the answers of the security questions?


I know that equivalent capacitance of multiple capacitors in series is $$ C = \left(\frac{1}{C_1} + \cdots + \frac{1}{C_n}\right)^{-1} $$ and in parallel is $$ C = C_1 + \cdots + C_n. $$ But there are circuits that are neither in parallel nor series.   So what is the canonical definition of equivalent capacitance?   This question sprung to mind when I tried to find equivalent capacitance in this circuit:    Apparently, there are some techniques known as Y-Delta transforms. But I wouldn't understand it without a clear definition of equivalent capacitance.  This is not a question about calculating capacitance/resistance in parallel or series, but the very definition of "equivalent capacitance."   For example, the definition of equivalent resistance goes something like this. If we replace all the individual resistors with one of equivalent resistance, we get the same current/power (provided constant voltage). In effect, the equivalent resistance is really defined by the ratio $$\Delta V / I$$.   So what is the analog for capacitance? For only one capacitor, its capacitance can be defined as $$\Delta V/Q.$$ But for a network of multiple capacitors (not necessarily in parallel or series), what is the quantity Q here?  Thank you!

I'm trying to understand how to calculate resistance in simple mixed parallel and series resister circuit.  Below is a question from  I've been playing with to better understand the topic (Question 5 ->Figure 6).    I can see the 220Ω and 100Ω resistors are in parallel, but I do not understand how to break out and calculate the 470Ω and 330Ω resistors.    The answer given is 80.54 Ω, but I cannot seem to reach this on my own.  How do I calculate the resistance between points A and B?  Source:


How to find an equation of a plane when 2 lines lying on the plane are given ? Q)Find the equation of plane which contains the lines    $$(x-4)/1 = (y-3)/-4 = (z-2)/5$$ and  $$(x-3)/-2 = (y+3)/8 = (z+2)/-10$$

Determine an equation of the plane containing the lines $\frac{x-1}{2}=\frac{y+1}{-1}=\frac{z-5}{6}$; $r=\lt1,-1,5\gt+t\lt1,1,-3\gt$.   I calculated the cross product between the directional vector of both lines to find the normal vector $n$, but when I looked for an intersection point $r_0$ to apply the formula: $\lt r-r_0\gt \bullet \ \ n$, I did not find any.  Can I use the point $\lt1,-1,5\gt$ given in the line $r$? Or is it not possible to find an equation of the plane containing two lines that do not intersect?


Let $n\in\mathbb{N}$ and $x_1,x_2,x_3.....,x_n \in\mathbb{Q}$ with $x_i > 0$ and $\prod_{i=1}^{n} x_i = 1$  prove that $\sum_{i=1}^{n}x_i \geq n$ (hint:use induction).  Been stuck on that for hours. It seems as if the terminology of the question is not well defiened because they use "Let $n\in\mathbb{N}$" and not "For each $n\in\mathbb{N}$"   Could I get some insight and help please?

Please give me the proof for the following: Let $a_1,\,a_2,\,\dots\,a_n$ be $n$ positive real numbers whose product is equal to $1$. Prove that $$a_1+\cdots+a_n \geq n$$ and that the equality sign holds only if every $a_k$ is  equal to $1$.


Consider data $x ∈ R^3$ that is represented in a 3D space, i.e., using 3 coordinates $(x^1, x^2, x^3)$. Consider that we observe a large dataset $x_1, x_2, · · · , x_n$, where n = 100. Suppose each datum $x_i$ is known to be such that its coordinates exhibit a functional relationship such that $ax_1^i + bx_2^i + cx_3^i + d = 0$, for the same $a, b, c, d ∈ R$. Thus, although the data lies in a 3D space, the underlying degrees of freedom in the variability of the data is lower than 3. Your goal is to represent each datum using just as many coordinates as the number of degrees of freedom, without any loss of information, i.e., the mapping from the 3D space to the lower-dimensional space should be linear and distance preserving (Euclidean distance between any 2 points in the original 3D space should equal Euclidean distance between the mapped points in the lower-dimensional space).  • How many degrees of freedom are present in the variability in the dataset ?  • Give a detailed algorithm to find the lower-dimensional representation of the 3D data.  I understand that the algorithm is PCA algorithm. But how to actually find the dimension of the lower subspace using the given constraint?

I have a correlation matrix of security returns whose determinant is zero. (This is a bit surprising since the sample correlation matrix and the corresponding covariance matrix should theoretically be positive definite.)  My hypothesis is that at least one security is linearly dependent on other securities. Is there a function in R that sequentially tests each column a matrix for linear dependence?  For example, one approach would be to build up a correlation matrix one security at a time and calculate the determinant at each step. When the determinant = 0 then stop as you have identified the security who is a linear combination of other securities.  Any other techniques to identify linear dependence in such a matrix are appreciated.


An initramfs, as opposed to an initrd, is built-in to a kernel file. How do I go about extracting and unpacking an initramfs from a given kernel file?

I have a kernel in which one initramfs is embedded.  I want to extract it.  I got the output x86 boot sector when I do file bzImage  I have System.map file for this kernel image.  Is there any way to extract the embedded initramfs image from this kernel with or without the help of System.map file ?  The interesting string found in System map file is: (Just in case it helps)  57312:c17fd8cc T __initramfs_start 57316:c19d7b90 T __initramfs_size


I attempted to load Windows 8 and Ubuntu alongside each other and it was working well until my Ubuntu installation completed and I restarted the computer. Now I can't get past this error:  Minimal bash-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions. Grub>   How do I fix this? I'm not a computer person. Talk me through it. I'm using GNU GRUB version 2.02 beta 2-9.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


So I have my targets array which is a bunch of IP read from a file, now I am trying to cat a file that contains my IP and results from ssh command, ut because I am trying 3 different passwords on every target I will get 2 denials and one job scheduled result. So I figured, I will check if a job was scheduled for a particular result and I will print "$ip OK, if not then I will print "$ip failed" here is what I have : #!/bin/bash for ip in "${targets_array[@]}" do    cat "$output_file" | awk -v ip="$ip" '/$ip/&&/job/ {result="OK"} END {      !result?result="failed":result=result;}'  done   Pseudocode of what I am trying to do: 1.cat from output file line of the file where you can find desired ip and the word "job"  2.1. if you found it print append to a string variable "$ip OK" 2.2 if not found append to a string variable "$ip failed" 3. override output file with the result stored in the variable  but when I run it in debugging mode I see that the value was never passed to the awk script. How can I pass it? + awk -v ip= '/$ip/&&/job/ {result="OK"} END {      !result?result="failed":result=result;}'  the file I am cutting from: unwantedString 124.131.8010 Permission denied, please try again. unwantedString 125.124.90.134 Permission denied, please try again. unwantedString 145.120.100.8 Permission denied, please try again. unwantedString 145.101.100.158 Permission denied, please try again. unwantedString 124.131.80.2 Permission denied, please try again. unwantedString 125.124.90.134 job 32 at 2020-12-16 23:30 unwantedString 145.120.100.8 Permission denied, please try again. unwantedString 145.101.100.158 job 27 at 2020-12-16 23:30 unwantedString 124.131.8010 Permission denied, please try again. unwantedString 125.124.90.134 Permission denied, please try again. unwantedString 145.120.100.8 Permission denied, please try again. unwantedString 145.101.100.158 Permission denied, please try again.

Here is my script (to find the files that contain a specified pattern):  find . -type f \     -exec awk -v vawk="$1" '/'"$vawk"'/ {c++} c>0 { print ARGV[1]; exit 0 } END { if (! c) {exit 1}}' \{\} \;   I would like to use my script with an argument §:  MyScript.sh pattern   My problem is that I don't manage to put the $1 variable in awk.  When I try to debug my script  bash -x MyScript.sh pattern   Here is the output :  + find . -type f -exec awk -v vawk=pattern '// {c++} c>0 {print ARGV[1] ; exit 0 } END { if (! c) {exit 1}}' '{}' ';'   The $vawk variable seems to be empty.  Any idea?


My math professor told the class that  For a positive integer $N$, if $N$ is not divisible by prime less than $|\sqrt{N}|$, then $N$ is prime.  For example, for $139$,  $12>|\sqrt{139}|>11$. But $139$ is not divisible by $2, 3, 5, 7, 11$ so $139$ is prime. Why is it necessary that it has to be $\sqrt{N}$? Is the same property applicable for some other $f(N)$ (here $f(N)=\sqrt{N}$. I am asking if there is some other $f(N)$ besides that)?

I'm reading an algorithms book and I came across a code example for a primality test. The problem is that I couldn't understand the condition for the :  public static boolean isPrime( int N ) {         if (N < 2) return false;         for ( int i = 2; i * i < N; i++ ) {             if ( N % i == 0 )                 return false;         }          return true; }   If we multiply i by itself we would miss a lot of numbers to check. So if we want to check if n=10 is prime or not, then we would quickly end the loop by i=3. I know that the idea is finish the loop as early as possible, but how do we guarantee that by using that condition we are actually checking all possible divisors and the rest that we omitted are never going to be divisors?  This condition seems quite common and popular but I really wasn't able to understand it or find an interpretation. I understood the condition i < n/2 but not that one. I hope I'm not stupid!


As my girlfriend who is a permanent resident of Germany invited me to come to her country for a short visit, I applied to the visa section in Kolkata. As I am a first time visitor to Germany I got all information and submitted the forms along with "Formal Obligation Letter" and as I am a self employed I did not need to submit employers certificate. To my utter surprise, my visa was refused stating that:      the information submitted regarding the justification for the purpose and condition of the intended stay was not reliable   and     your intention to leave the territory of the Member States before the expiry of the visa could not be ascertained   Now in this situation what should I do when already 5 days passed that my visa was refused? Should I reapply stating my willingness to return back to my home country before the visa expire or should I submit any evidence to justify the two reasons? Please suggest after how many days is it better to reapply? Can I get my visa approved if I can produce my justification with a proof?

My husband is in Switzerland for 6 months with L permit.  I applied for visitor visa.  I submitted all documents with his entrance visa in which date of his coming back to India was not mentioned but later on after submission of visa documents to VFS office, I submitted his L-permit through mail.  But my visa got rejected stating " your intention to leave the territory of the member state before the expiry of visa could not be ascertained".  I also got confused on the answer of extension of my husbands visa permit during answering to the embassy council.  I have only 7 days left to reapply for visa.  I don't know what should I do?  Will I able to get visa again within 7 working  days??


I saw in some code we have a signed value being passed to function (which takes unsigned value). The returned value is again converted back to signed (with the intention of getting the original signed value).. Even though it works currently.. My doubt, will original signed value is retained in this case, in all possible scenarios?   I was told casting is bad, and should be avoided as much as possible.. Can some computer science experts let me know, when this code can be broken?

Suppose I have the following C code.  unsigned int u = 1234; int i = -5678;  unsigned int result = u + i;   What implicit conversions are going on here, and is this code safe for all values of u and i? (Safe, in the sense that even though result in this example will overflow to some huge positive number, I could cast it back to an int and get the real result.)


I apologize if this is a silly question, but...  From what I've been told, , because time slows to nearly stopped as matter approaches the event horizon. Instead, a new black hole is really an approximation of a black hole, with matter so close to the event horizon that it behaves like a black hole. Nevertheless, true black can exist, provided they have existed since sufficiently early in the universe. (I hope that's somewhat close to accurate.)  My question is: is it known (or could it even be determined) which of these scenarios describes the black hole at the center of M87? Is it a true black hole that has always existed, or an approximate black hole that formed at some point?

The well-known fable of an astronaut sending signals out to an external observer while falling toward an event horizon states that the time lapse between such signals becomes greater even if in the astronaut sends them out periodically (as judged in his inertial frame). When viewed from earth and weighing time-dilation due to the gravitational field of the collapsing star, how is it possible that a black hole can form in finite time (for any external observer) if it takes an infinite amount of time to "see" events occurring at the event horizon?


First of all: this is not a duplicate of the all the " questions.  Problem:  When booting, the system will not boot unless the installer USB flash drive is present. If I boot without the USB drive, the screen goes black AFTER GRUB lists the different configurations available - so GRUB is on the correct disk, its what it does next that seems to be the problem.  With the USB drive inserted, its access light starts flashing while the system boots in a normal manner.  And yes: I have tried booting from the USB drive directly and then I get the "live" version, so I have not installed the OS on the flash drive by mistake :)   I have tried sudo grub-install /dev/sda and sudo update-grub just for fun, but nothing changed.  System in short:  Ubuntu 12.04 64-bit. i3 processor. UEFI bios. 128Gb SSD drive. The SSD has a 47 Mb EFI partition and the rest mounted as '/' (XFS).

I had Ubuntu 12.04 Beta installed on my computer. When 12.04 was finally released, I made a bootable USB Flash Drive using Startup Disk Creator.  Then I decided to check if this drive works properly and to reinstall the system on my desktop. I must add, my desktop behaves a bit strange when it comes to bootable USB's, it recognizes them as HDD.  In BIOS I changed priority of boot so USB Flash Drive (recognized as HDD) was first. Successfully booted, I installed Ubuntu. Everything worked fine, but...  Now I cannot boot from my real HDD. Every time I want to boot, I put the USB Flash Drive into my computer, boot, safely remove it and everything works.  What do I need to do to repair boot?


I'm doing this problem from LeetCode:  My original answer is as follows, which works well and passes all tests. class Solution {     public ListNode reverseKGroup(ListNode head, int k) {         if (head == null) return null;         int length = 0;         ListNode tmp = head;         // use tmp to traverse the linkedlist to count the number of nodes         while (tmp != null) {             tmp = tmp.next;             length++;         }         // times indicates the number of time we need to traverse         int times = length / k;         ListNode dummy = new ListNode(0, head);         ListNode before = dummy, cur = head;                  for (int i = 0; i < times; i++) {             // h represents the head of the current group before traversed             ListNode h = cur;             ListNode prev = null;             for (int j = 0; j < k; j++) {                 // traverse list in the group of k nodes                 ListNode tmp1 = cur.next;                 cur.next = prev;                 prev = cur;                 cur = tmp1;             }             // connect last traversed group's tail to current traversed group's head             before.next = prev;             before = h;         }         before.next = cur;         return dummy.next;     } }  However, when I was trying to create a void method as reverse(ListNode cur, ListNode before, int k) and then copy and paste the entire part for reverse in the for loop directly to the void method as follows, I couldn't get the expected output anymore.         for (int i = 0; i < times; i++) {             reverse(cur, before, k);         }         before.next = cur;         return dummy.next;     }          private void reverse(ListNode cur, ListNode before, int k) {         ListNode h = cur;         ListNode prev = null;         for (int j = 0; j < k; j++) {             ListNode tmp1 = cur.next;             cur.next = prev;             prev = cur;             cur = tmp1;         }         before.next = prev;         before = h;     }  The compiler yields with java.lang.NullPointerException when I ran the test case: [1, 2, 3, 4, 5], k = 2 I also tried to figure it out by tracking the entire process in IntelliJ with the debugger. My intuition is that it fails because of the pass-by-value property in Java, but I was not sure and couldn't find a clear reason to persuade myself. Any answer will be appreciated!

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?