Is it possible to display related fields in a lightning-datatable in LWC?  For example, I want to show the recordtype name.  I am querying RecordType.Name in the Apex.  When I set the columns in my javascript I just enter the name the same way but it does not display in the table.  Here is the javascript for creating the columns: const columns = [ {label: 'Record Type Name', fieldName: 'RecordType.name'}, {label: 'Line_of_business', fieldName: 'Horizon_Product__r.Line_of_business__c'}, {label: 'Name', fieldName: 'Name'}  ]; Thank you!!!

Working with a prototype of a lightning web component, I get that the datatable, just like its Aura brother, needs the columns to be manually specified.   That being said, I have the following specification for a datatable that receives pricebook entries:  const columns = [     { label: 'Name', fieldName: 'Product2.Name' } ]   The names do not display on the component, but if I use a forEach to list the data retrieved by the component, I get the products names, like in:  connectedCallback() {     getProducts({ pricebookId: this.pricebookId, countLimit: 4 })         .then(result => {             this.products = result             this.products.forEach(p => {                 console.log(p.Product2) // Proxy {} object is displayed                 console.log(p.Product2.Name) // The name is displayed             });             this.tableIsLoading = false         })         .catch(error => {             console.error(error)         }) }     If the datatable component does not support this, then the correct way of dealing with this is to work with the retrieved data, and build a new list with direct access to the data (no parent-child objects), or to edit the current data and include fields that I can access?   For example, should I iterate the result data and add a productName attribute to the elements, and then set 'productName' as the attribute on the column variable?  Edit: just noticed that you can't iterate the data list and create a new productName property. You end up with a TypeError: 'set' on proxy: trap returned falsish for property 'productName'.


I have table name "info" with column "lastupdated" (datatype is datetime),I just want to update all  record where "updatedOn" is not equal to currentdate/today's date  Here is my table "info"  id      status      lastupdated 1       1           2010-01-01 13:25:02  2       NULL        2010-01-03 14:05:02 3       1           2010-01-02 13:30:01   I tried with following query but not working,Where i am wrong ?  UPDATE info SET status = NULL WHERE lastupdated != '2020-01-03'

I need to do a date comparison in Mysql without taking into account the time component i.e. i need to convert '2008-11-05 14:30:00' to '2008-11-05'  Currently i am doing this:  SELECT from_days(to_days(my_date))   Is there a proper way of doing this?


I have a constructor:      private String name;     private int price;     public Fruit (String name, int price){         this.name = name;         this.price = price;          System.out.println("NAME/PRICE SET");                if (getCheapestFruit() == null){             setCheapestFruit(name, price);             System.out.println("CHEAPEST NAME/PRICE INITIALIZED");         } else {             if(getCheapestFruit().price> price){                 setCheapestFruit(name, price);                 System.out.println("CHEAPEST NAME/PRICE SET");             }                    }     }   And I want to set the cheapestFruit.  public Fruit cheapestFruit = null; public Fruit getCheapestFruit(){     return this.cheapestFruit; } public void setCheapestFruit(String name, int price){     this.cheapestFruit.price = price;     this.cheapestFruit.name = name; }   And this die at  this.cheapestFruit.price = price; with null pointer exception. How can I set it correctly?

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


While rendering a mesh with smooth shading on, I get a dark region/shadow on certain faces. The effect is more evident when smooth shading is applied to a mesh containing ngons, with the ngons turning black when rendered.   The blackening effect is visible in the viewport too.  How can I solve this problem?


I updated my Ubuntu 16.04 xenial and rebooted the system, but after the reboot no launcher and panel appear in screen. Mouse right click is working, even I can start any applications from terminal it's working fine, but no menu bar for applications are being displayed and many shortcuts are also not working(ex-ALT+TAB to switch between application). I googled it and got so many solutions but none of them worked for me. I installed CCSM tool, tried to delete .config/compiz-1/compizconfig directory, tried some Intel Graphics driver tricks but eventually I end up with no solution.  I created other accounts, for new accounts it's working fine.

This  forced removal of unity and ubuntu-desktop on my 16.04 Ubuntu system.   The offending package that is missing, but unity needs, seems to be compiz-core-abiversion-20151010. It seems to be a , and I can't find it to download.    As it happens, I mostly use LXDE on this system, but I'd be very unhappy if I used Unity...  Since I do occasionally use the Unity desktop, is there a fix for this?  Edit: related questions are rolling in. Looks like a major quality escape          Edit 2:


Let a,b and c be the three sides of a triangle. Show that $\dfrac 1a+\dfrac 1b+\dfrac 1c\le \dfrac 1{a+b-c}+\dfrac 1{a-b+c}+\dfrac 1{-a+b+c}.$ When does equality occur? I have used the Ravi-transformation and obtained $\frac{1}{x+y} + \frac{1}{x+z} + \frac{1}{y+z} \leq \frac{1}{(x+y)+(y+z)-(x+z)} + \frac{1}{(x+y)-(y+z)+(x+z)} \\ +  \frac{1}{-(x+y)+(y+z)+(x+z)} \Longleftrightarrow  \frac{1}{x+y} + \frac{1}{x+z} + \frac{1}{y+z} \leq \frac{1}{2x} + \frac{1}{2y} + \frac{1}{2z}.$ But I get stuck here. Does anyone have an idea to proceed?

If $a,b,c$ are the sides of a triangle then show that- $\frac{1}{(b+c-a)} +\frac{1}{(c+a-b)} +\frac{1}{(a+b-c)} \gt \frac{1}{a} +\frac{1}{b} +\frac{1}{c}$  I got this problem from an old book on algebra. I've been trying for a long time but can't reach the answer.  My try on the question-  We know that in a triangle, the sum of two sides is always greater than the third side  $b+c\gt a$ $\implies$ $b+c-a \gt 0$  $c+a\gt b$ $\implies$ $c+a-b\gt 0$  $a+b \gt c$ $\implies$ $a+b-c\gt 0$  Also,  $\frac {1}{(b+c)} \lt \frac{1}{a}$  $\frac{1}{(c+a)} \lt \frac{1}{b}$  $\frac{1}{(a+b)} \lt \frac{1}{c}$  Adding,  $\frac{1}{(b+c)} + \frac{1}{(c+a)} +\frac{1}{(a+b)} \lt \frac{1}{a} + \frac{1}{b} + \frac{1}{c}$  How do I proceed further? All genuine answers are welcome :)


I accidentally ran cat on a binary.  (It happens). Usually, I witness a flood of random unicode characters in which I hit Ctrl+C. Sometimes I hear random bell noises because the file has '\' 'a' characters next to each other.    This time, it changed my entire character mapping (I think): (image shows part of a cat'd file before hitting ctrl+C and typing ls)   The problem is easily fixed, but I'm left wondering what caused this. What can I type into my terminal to produce the same effect?  If relevant, I'm using gnome-terminal and my shell is zsh.

I'm on OSX 10.11.1 and occasionally my bash terminal gets mangled. It often happens when I accidentally cat a binary file. The result can be seen on the image below. The output becomes weird, and I can't type ascii characters anymore.    Even though this happens occasionally, I couldn't find a way to consistently reproduce the issue. Online search recommends doing cat /bin/*, but that works sporadically, only after a couple dozen tries.  I want to do this so I can find an easy solution how to handle this in tmux.  How do I consistently get bash to a "mangled" state? Is there maybe a magic unicode character that can do this?


I'm an intermediate blender user, and I am working on a scene myself. I just don't know how should I achieve the lighting effect in the image on the right below (left one is mine). I also need assistance on how to add volumetrics in this scene. I am using a transparent hdri in my scene. EDIT: With help form the comments, I have changed a few settings and achieved close to what I want. The volumetrics (I added a rectangle with a principled volume shader) look good, but I still don't know how to achieve that sharp lighting effect I have shown with arrows in the picture above so I will wait for answers. I haev reached the end of my scene almost, so here's what I have done uptil now: EDIT 2: After doing some research about this topic, I finally achieved the effect I wanted. Thanks for the help in the comments!

I have to have a spot lamp strength VERY VERY high to have these light rays come through 300000.0 and look good.  Sounds crazy doesn't it.  Maybe it doesn't matter but it doesn't feel right.  Will I start to have problems if add other elements?   Lamp Size: .2 Lamp Strength: 300000.0 World Volume: Volume Scatter World Volume Density: .05  World Volume: Homogeneous: True Render Sampling Settings Clamp Indirect: 3.0  Rendering No Caustics: True


Comments are not for extended discussion; this conversation has been moved to chat. It seems that moving the comments to chat hasn't helped - can you please move some more? We can only move once. After that, the only way to get them there is for somebody to copy them there one at a time. That's why we just purge new comments that aren't about improving the post.  Given that outright deleting comments ticks people off, and rightly so, how about improving the move-comments-to-chat feature so that it can be done more than once to the same chat?

Moderators can move comments to a chat room associated with the post, and now we don't even have to wait for 20 comments to be posted in a short period of time -- we can do this at any time .  This is great; it gives people a place to have that tangential discussion that might be valuable but isn't about the post any more and doesn't belong on the main site.  Here's the problem: we move comments to chat, which leaves an auto-generated comment saying "comments have been moved to chat (link)".  And then some people continue the discussion in chat but other people .  Sometimes there are so many new comments that the "moved to chat" comment gets buried so people don't even notice.  (I've had several cases where dozens of new comments came in after a move to chat.)  When more (non-clarification-seeking) comments appear after a chat migration, our choices are:   delete the comments (failure to follow directions), but users think this is mean and it's also tedious to do (have to either delete them individually or purge and then dig through the big pile to undelete the "moved to chat" comment buried in the middle) leave it alone, but then we're being inconsistent (why did those have to move but not these?) and thus inviting the unwanted behavior hand-copy them into the chat room, which is a lot to ask of moderators, especially to serve people who didn't take the initial hint (translation: no we are not going to do that)   The "move comments to chat" feature is single-use; once it's been used on a post it's grayed out on the menu, presumably because bad things would happen if it tried to create the same chat room a second time.  Would it be possible for that option to remain (optionally renamed "add comments to chat" if you think that's valuable), with later invocations adding new comments to the existing room?  It could find the comment with the link to the room (which might or might not be the earliest comment on the post), and then send everything after that comment to the existing room.  (It wouldn't need to generate a new auto-comment, but it would need to make sure those users can chat in that room, same as the current behavior.)  One might ask why we shouldn't instead just shut down comments after a move to chat -- once there's a chat room, force everything there and take away the "add comment" link.  Attractive as that idea is to me, it also prevents the (few) comments that are actually what comments are for -- requests for clarification.  If we can come up with a practical way to add some friction for post-migration comments that'd be cool, but we're always going to end up with some comments that should be in the chat room but aren't.  I'd like to have a way to send them there.


I'm trying to concatenate some creditcards data I have on my customers.   For example I'm having the next table (call it Table A):   custNum  totAmount  creditCardType   10        100        Visa   10        250        Mastercard   27        350        Visa   10        500        AmericanExpress    27        100        AmericanExpress   etc...  and I'm trying to concatenate this data in the next format:       custNum   totAmount    creditCardType       10        850        Visa,Mastercard,AmericanExpress        27        450        Visa,AmericanExpress    is there a smart and simple way of doing it?   Thank you in advance!

Consider a database table holding names, with three rows:  Peter Paul Mary   Is there an easy way to turn this into a single string of Peter, Paul, Mary?


I'm Solving (or at least trying to solve) 4 Klein Gordon equation with sources (Maxwell equations) with the Green function method, therefore I have  $$ \Box G(x,x')= \delta^4(x-x') \tag{1}$$  Where $G$ is the green function and the arguments of the functions are 4-vectors.  To Find the Green function we use the Fourier transform, and here there is my problem, which is mainly a terminology problem. We write  $$ G(x-x') = \frac{1}{(2 \pi)^4} \int d^4k \tilde{G}(k) e^{-ik \cdot (x-x')} \tag{2}$$  Now to my definition of Fourier Transform which is $$ (F f)(x)= \tilde{f}(x)= \frac{1}{(2 \pi)^{n/2}} \int \,\tilde{f}(k) e^{-ix \cdot k} d^nk \tag{3}$$  I have that $G$ is the Fourier transform of $\tilde{G}$, apart from a factor $(2\pi)^{1/2}$ missing in equation $(2)$ which i cannot explain.   Is my view right? Both my book and my notes says that $\tilde{G}$ is the Fourier transform of $G$ while in my opinion $\tilde{G}$ is the inverse Fourier transform of $G$.   I mean in $(2)$ I'm Fourier transforming  the inverse Fourier transform of $G$ and that's why I obtain $G$, which is by means of the inversion equation: $$ f=(F(\overline{F} f)  \tag{4}$$  Where $\overline{F} f$ is the inverse Fourier Transform.  I'm probably missing something and the answer may be banal, but, if I am, where am I wrong? And why is there a missing factor of $(2\pi)^{1/2}$ ?   Hoping that someone enlighten me, thanks in advance for any help.

I'm very confused about the definition of the inverse Fourier transform between time and frequency spaces. In many places, including , the Fourier transform pairs are defined by:  \begin{align} f(t)=&\int_{-\infty}^\infty\tilde{f}(\omega)e^{i\omega t}\frac{d\omega}{2\pi} \\ \tilde{f}(\omega)=&\int_{-\infty}^\infty f(t)e^{-i\omega t}dt \, . \end{align}  In other sources, such as "Many-body quantum theory in condensed matter physics" by Bruus and Flensberg, or , they are instead defined by:  \begin{align} f(t)=&\int_{-\infty}^{\infty}\tilde{f}(\omega)e^{-i\omega t}\frac{d\omega}{2\pi} \\ \tilde{f}(\omega)=&\int_{-\infty}^\infty f(t)e^{i\omega t}dt \, . \end{align}  Why are there these two different definitions? I thought maybe they mean the same thing, but this would only seem to be the case for $\tilde{f}(\omega)=\tilde{f}(-\omega)$ and I don't see why this should be true in general.  Indeed, I originally noticed this discrepancy when I tried to calculate the impedance of a capacitor using the second definition above, and obtained: $$Z=-\frac{1}{i\omega C} \, ,$$ and when I looked up the solution, found that it is generally accepted to be: $$Z=\frac{1}{i\omega C} \, ,$$ which is what I obtain using the second definition above. I don't understand how these two functions could have the same physical interpretation. That's why I asked here instead of the math stackexchange, because I'm sure they can be defined either way formally, but it seems like if we want to think physically about time and frequency, one must be correct.  Can anybody tell me which one is correct, or explain why they are equivalent?


This is from an exercise in Bredon's Topology and Geometry:  Let $G$ be a compact topological group (assumed to be Hausdorff). Let $g\in G$ and define $A=\{g^n:n=0,1,2...\}$. Then show that the closure $\bar{A}$ is a topological subgroup.  Note if the assumption of compactness is dropped, then the statement is false. A counterexample is $\mathbb{N}\subset \mathbb{R}$ as additive sets. Note: if we add the assumption of $G$ being 1st countable, this question is easy to answer. So, if the set $A$ is finite, then it is a cyclic group and it is already closed. In the infinite case, I can only think of the example of an infinite subgroup of the circle group, which is dense in compact group. I am not sure how to proceed with the proof of this general fact. Any hint will be appreciated.

Suppose that $G$ is a compact Hausdorff topological group and that $g\in G$. Consider the set $A=\{g^n : n=0,1,2,\ldots\}$ and let $\bar{A}$ denote the closure of $A$ in $G$.  Is it true that $\mathbf{\bar{A}}$ is a subgroup of $\mathbf{G}$?  From continuity of multiplication and the fact that $A\cdot A\subseteq A$ it is clear that $\bar{A}\cdot\bar{A}\subseteq\bar{A}$. therefore, $a,b\in \bar{A}$ yields $a\cdot b\in \bar{A}$. However, I am having trouble showing that inverses of elements in $\bar{A}$ are also in $\bar{A}$.


Given $(a_n)$ consider $(s_n)$ given by $s_n = \frac{1}{n}(a_1+a_2+\cdots+a_n)$ for $n \in \Bbb N$. Show that $a_n \rightarrow a$ implies $s_n \rightarrow s$.   Further find a divergent sequence $(a_n)$ for which $s_n$ converges.    I've been told to use the Stolz-Cesàro theorem to prove this. However, I'm new to analysis so I couldn't figure out the proof. Is there a more basic way?

I wanted to prove the following:  if $x_n \to x$ then $y_n \to x$ where $$ y_n = {x_1 + \dots + x_n \over n}$$  Please can you tell me if my proof is correct? My proof is this:  Let $\varepsilon > 0$. Fix $N$ such that $n > N$ implies $|x_n - x| < {\varepsilon \over 2}$.   Then $\left |{1 \over n} \sum_{k=N+1}^{N + n} x_k - x \right | < {\varepsilon \over 2}$. Now let $M$ be such that ${|x_1 + \dots + x_N | \over M} < {\varepsilon \over 2}$ and $M > N$. Then  $$ \left | \sum_{k=1}^M {x_k \over M} - x   \right | \le  \left | \sum_{k=1}^N {x_k \over M}   \right | +  \left | \sum_{k=N+1}^M {x_k \over |M-N|}  - x   \right | < \varepsilon $$ Here the proof is finished. But one can observe:  It is possible that $y_n$ converges even if $x_n$ doesn't: If $x_{2n} = 0$ and $x_{2n + 1} = 1$ then $x_n$ does not converge but $y_n \to {1 \over 2}$.


English is my second language. I've learned all tense rule. Problem is every day I'm facing a huge confusion between Past simple and Past Perfect. According to grammar rule, we can you use Past perfect when talking about some point in the past and want to reference an event. But sometimes I notice people use  Past Perfect sentence without any reference event. Can you please give me some example with explanation and clear my confusion for a life time.

I have never had this problem before. But after seeing some questions posted on ELU, I started to doubt. I have been through links1, pages of grammar books2, a lot of questions3 posted here and ELU. I now still can't seem to understand how the past perfect is exactly used. The references sometimes even contradict each other.  What I had understood so far was      The past perfect is not necessary if we are not 'going back' to the earlier past, and simply moving from one event to another.   but I then saw a lot of other 'rules' including      If the sequence is clear, the past perfect is not needed.   which is slightly different, less 'narrow' and can be applied in more situations than the first ruleA, and      The past perfect is optional only when talking about an action at a specific time.   This is confusing. Can anyone here clarify things out please?    A For example, for  Doing the survey [completed] -> Showing the result      We showed the result of the survey we did.      If the second rule is applied, the sentence above is fine (the sequence is clear), but not if the first rule since we are not moving from any event to the next and possibly even going back.    1  and   2 Practical English Usage (2005) by Michael Swan, Collins Cobuild Student's Grammar (1991). Upper-Intermediate Cutting Edge.  3 including , , ,  etc.


I was changing the chain on a bike with a Shimano gear shifter and when I was trying to push the pin in it broke off after only getting the front section in.   How can I recover and attach the chain?

My previous chain snapped weeks ago and only got a new one sorted.  I've cut the chain to the right size, fed it through the derailleurs and onto the bike correctly.  The last step was to use the reinforced Shimano pin to connect the new chain together.  Unfortunately the reinforced pin snapped as it was being put into its slot.  My wife was doing it so I'm not 100% sure what happened but she said it snapped very easily and unexpectedly. My only guess is that the chain tool wasn't going straight?  Anyway, the actual link that you'd want to stay in and connected, wasn't far enough in yet so it fell out, the 'snapping' bit is now stuck pertruding out of the chain.  I've never replaced a chain like this before so I'm slightly weary of doing damage.  It'll be tricky, but should I be able to use the already snapped pin to connect the chain and hopefully it'll help push out the snappable portion?  Should I attempt to get another reinforced pin instead of attempting the above and start again?  I could attempt to pull out the 'snappable' portion with pliers but again slightly worried about causing damage!


I forgot to put prepared food I received in the refrigerator. It sat out over night at room temperature. The food were in containers. I put them in the refrigerator in am. Is it safe to eat?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


I run 18.04 on my boat computer and wanted to try 19.10 on my desktop, but three download attempts have all failed after downloading 2.0 GB out of 2.3 GB.  Is this a problem with the download or with my computer which is currently running Windows 10 Professional?

I am trying to download the 64-bit Ubuntu 12.10 ISO over an extremely unreliable connection. By unreliable, I mean that every time I finish downloading the ISO and compare the MD5 hashes, I end up with an error about a mismatch.  I am using Ubuntu 12.04 to perform the download. Is there a tool that can somehow work around a very unreliable connection?


I have a bunch of LINESTRINGs and need to classify them based on how strait they are. My idea is to compare the length of the LINESTRING to the distance between the first and last POINTs.   I'm thinking of something along these lines (assume the srs units are in meters):  ST_Length_Spheroid(geom) - ST_Distance_Spheroid(ST_PointN(geom, 1), ST_PointN(geom, St_NumPoints(geom)))   Is there a better way to do this?

is a fairly straightforward concept. How can this be calculated in postgis given a series of linestrings that represent the path?


Suppose $d$ is a metric on $\mathbb R^2$,then suppose $B(x,r)$ denote open ball with centre $x$ and radius $r$.Is this set always a convex set irrespective of what $d$ is?   Actually whenever I work with a metric in $\mathbb R^2$,I check how its open balls look,so far I have found that all of them (those I have seen) are convex sets.I do not yet know whether it is true for any metric $d$.Can someone help me on this?

I'm studying point set topology and looking for a counterexample of "Balls are convex".   We say set $K \subset \mathbb{R}^n $ is convex if $\forall x, y\in K$ implies $\lambda x + \left(1-\lambda y\right)\in K, \forall \lambda \in \mathbb{R}$.   A counterexample has been found in $\mathbb{Q}$ (where the definition of convex has been specialized to "$\lambda\in\mathbb{Q}$") by using p-adic metric. E.g. consider ball $B_{\text{2-adic}}\left(0, 1\right)$.


I'm new to coding so apologies for the really basic question. I have made a javascript function called ErrorType that checks whether my variables 'correct' and 'response' equal 70 and 68 respectively. If they do, then I want to set 'correct_rule_wrong_resp' to 1. My problem is that when I call the function, it has no effect on the value of 'correct_rule_wrong_resp'. Where am I going wrong?     correct = 70;     response = 68;     correct_rule_wrong_resp = null;      function ErrorType (a, b, c){         if (correct == a && response == b){             c = 1         }     }      ErrorType (70, 68, correct_rule_wrong_resp)

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


I am new to mobile development and I have a question concerning developing an app for iPhone. Is there a way to develop an app for iPhone using Windows?

Is there any way to tinker with the iPhone SDK on a Windows machine? Are there plans for an iPhone SDK version for Windows?  The only other way I can think of doing this is to run a Mac VM image on a VMWare server running on Windows, although I'm not too sure how legal this is.


I have my page encoding set to utf8 and even in the meta tag as utf8.  However, when i'm taking a value from a database it's putting a diamond with a question mark instead - im assuming doesnt know the character.  The character is a é. If i do a echo é; it displays as normal on the page. Also if i write it manually in html. However, when i grab the same value from a database call using PDO i get a �  I'm assuming its a PDO setting. I've tried:  $db->exec("SET NAMES 'utf8';");   but this doesnt resolve it.  Any suggestions?

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 will be moving to Singapore and since the country has very strict rules I wonder if it is possible to take one sex toy with me in checked-in luggage?    I want to respect all local rules and avoid any issues (it is a pink vibrator - not very realistic design packed in its original metal case). I can not find any official information regarding this online. If any of you knows about any official website where I can read more I will be thankful. Singaporean Airlines don't provide any information.

I'll be taking a flight from Tokyo to Singapore. If I take a "pocket pussy" (artificial vagina) as carry on, will it be confiscated? Also will it be removed from my bag? I'm traveling with my family and don't want any embarrassment.


I have list of objects like     actors = [Person('Raj' ,'Hindi'),           Person('John',  'English'),           Person('Michael' 'Marathi'),           Person('Terry','Hindi'),           Person('Terry', 'Telugu')]   I want to sort this list of peoples depending on their mother tongue. In sequence Marathi, English, Hindi, Telugu. Means i want to sort objects in customized logic rather than in ascending or descending order.   I am using python 3.7.  Could you please help me how can this be done ?

I've got a list of Python objects that I'd like to sort by an attribute of the objects themselves.  The list looks like:  >>> ut [<Tag: 128>, <Tag: 2008>, <Tag: <>, <Tag: actionscript>, <Tag: addresses>,  <Tag: aes>, <Tag: ajax> ...]   Each object has a count:  >>> ut[1].count 1L   I need to sort the list by number of counts descending.  I've seen several methods for this, but I'm looking for best practice in Python.


I have a form on an HTML webpage that sends a user's comment and name to a MySQL database table, where it is stored, and then included back onto the page. The problem is, if the user's name has an apostrophe in it, the server (I pay for hosting, it's not my server and I can't change the configuration on it) is sending them to a error page that says:  "The requested URL was rejected. If you think this is an error, please contact the webmaster. Your support ID is: 13509873612934211694"  UPDATE:  I just completely rewrote the page using a different php format. Now the apostrophe issue and the server error is fixed. However, the page is sending blank entries to the database on every page load. Any ideas?    <?php    $servername = "my_server";   $username = "my_username";   $password = "my_password";   $dbname = "my_database";   $users_name = htmlentities($_POST['name'], ENT_QUOTES, 'UTF-8');   $users_request = $_POST['requests'];   if ($_SERVER["REQUEST_METHOD"] == "POST") {      }   try {      $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username,      $password);      $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);      $conn->beginTransaction();      $conn->exec("INSERT INTO submissions (requests, name)      VALUES ('$users_request', '$users_name')");      $conn->commit();          header("Location: clv3.php");      }  catch(PDOException $e)      {      $conn->rollback();      echo "Error: " . $e->getMessage();      }  $conn = null;  ?> <form method="POST" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"> Make A Request:
 <textarea name='requests' id='requests'></textarea>
 Your Name (a-z only):
 <input type='text' name='name' id='name'/>
 <input type='submit' value='Send' class='button'>   </form>

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


I threw it away but was told later that someone else (a professional cook/chef) had said that, as it was (supposedly) vacuum-packed, it was safe to use a few days later than the use by date.

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


If you increase the h (=height), potential energy will be increased given by U=mgh.  Where does the energy go, into atoms?

I have a problematic question for which I have been unable to attain a satisfactory answer. What is  truly?   -  I have read about how potential energy can be seen as the "highering" of an object within a field, be it gravitational, electromagnetic, etc.   In a way, an object is lifted to a higher position, and when it eventually falls down again energy is released back.  The object does not even have to be "lifted" beforehand, as with the case of asteroids.   However, since energy cannot be destroyed, it must somehow be stored, yet how does energy truly store itself within a field? It seems hard for me to grasp that energy can physically be stored within the positioning of an object?  I can't really get my head around how a field conserves energy within it. Kinetic energy on the other hand, can be, for me, intuitively understood, as the object really is "moving" and energy manifests itself through motion.  Can anyone elaborate on this, perhaps give reasoning as to why a field can in fact "store" energy? Please point out any fallacious or naive views I seem to hold.


I currently have Ubuntu 18.04 installed and recently discovered Ubuntu 19.04 already released. But when I get to  it suggests downloading Ubuntu 18.04. Why not 19.04?

What are the differences between an Ubuntu Long Term Support release (LTS) and a normal release?


I read this story many years ago and now can't remeber who wrote it or even what it was called. The story was about a group of elite humans who had access to a headdress that allowed them to control another human, even if they were thousands of miles away.  They could use this ability to commit crimes, etc.  I think the cover may have been yellow like those published by Gollancz.

The setting of the story is about that any human being might be controlled/possessed at any time by unknown forces. Society as a whole seems to have adapted, there are even laws governing such incidents. Nevertheless, life is quite gruesome. I remember one scene in which it is described that people are killed by jumping to their deaths (into oversized meat grinders? I am not quite sure) while possessed.  The protagonist is a man who raped or molested a woman while possessed. Nobody believes him though, since such a thing never happened before. Although innocent, he is found guilty and becomes a "Liar" mark, maybe as tattoo or branding.   After some adventures he discovers that the possessions are in fact a technical feat by some group (or whatever).


I tried to install skype following many of the commands shown in the sloution page of askubuntu for "how to install skype". But finally the output is coming: E: Package 'skype:i386' has no installation candidate. Please help ASAP.

I want to install Skype, but I can't locate it in Software Center or by using Synaptic Package Manager. Can anyone help me?


There is a problem 3.3 in :     Ambiguities in the energy-momentum tensor:      (a) If you add a total derivative to Lagrangian ${\cal{L}} \rightarrow {\cal{L}} + \partial_\mu X^\mu$, how does the energy-momentum tensor change?      (b) Show that the total energy $Q = \int d^3x \; {\cal{T^{00}}}$ is invariant under such changes   Given the definition of energy-momentum tensor:  $$ {\cal{T}}^\mu{}_\nu = \sum_n \frac{\partial{\cal{L}}}{\partial \left( \partial_\mu \phi_n \right)} \partial_\nu \phi_n - g_{\mu\nu} {\cal{L}} $$  It changes as:  $$ \delta {\cal{T}}^\mu{}_\nu =  \sum_n \left( \partial_\rho \frac{\partial{X^\rho}}{\partial \left( \partial_\mu \phi_n \right)} \right) \partial_\nu \phi_n - g_{\mu\nu} {\partial_\rho X^\rho} $$  $T^{00}$ changes as:  $$ \delta {\cal{T}}^{00}= \sum_n \left( \partial_\rho \frac{\partial{X^\rho}}{\partial \dot{\phi_n}} \right) \dot{\phi_n} - \partial_\rho X^\rho $$   From this point I’m stuck. The first term doesn’t seem to disappear at all after integration over space, and the second disappears only partially:  $$ \int d^3x \; \dot{X^0} $$  So even if I’d have assumed that $X$ depends on position, and not on the fields - the total energy doesn’t seem to be invariant under it.  What is the best way to proceed forward with this?

I've been trying to find how the energy-momentum tensor changes if we add a total derivative to the lagrangian: $$L\to L+\mathrm d_\mu X^\mu.\tag{1}$$   From the answer key:  $$T^{\mu\nu}\to T^{\mu\nu}+\partial_\lambda F^{\lambda\mu\nu}\tag{2}$$ Where $$F^{\lambda\mu\nu}=\frac{\partial X^\lambda}{\partial(\partial_\mu\phi)}\partial^\nu\phi -\frac{\partial X^\mu}{\partial(\partial_\lambda\phi)}\partial^\nu\phi.\tag{3}$$ Is the above answer right? I'm not able to get this result! any help?


I have the following sentence. Is my commma usage appropriate, or should it be placed within the quotation marks?     On cultural awareness day in first grade, when asked what nationality   I was, I proudly proclaimed “American”, to everyone’s surprise.

The American convention in quotations is (typically) to place punctuation inside quoted text. But I always run into situations where the punctuation of the quote interferes with the punctuation of the sentence. How would you punctuate this (American, non technical)?     When my friends ask, "What do you want for your birthday?", I never know how to respond.   It seems odd to place the last comma outside the quote simply because of the question mark. Is that the preferred (i.e. most often accepted) standard?


I have a table inside a table. To make the table column width match the table header, I use spans with set widths. I'd like to transition to RowSpans and ColSpans to solve this issue in a more elegant way, but I still wonder why I have this problem.  Why is the div set to height: 0px when I use style float:left?  This causes the div with the red background to overlap with the first 'row' of the table inside the table. I can manually set the div height, for example to 40px, but I don't know how high the first div is in the application.

           Some Text           Some More Text           Some Multiline
Text

           BIG ELEMENT
       	                <input type="text"/>       	                Stuff

I have the age-old problem of a div wrapping a two-column layout. My sidebar is floated, so my container div fails to wrap the content and sidebar.

   There seem to be numerous methods of fixing the clear bug in Firefox:
 overflow:auto overflow:hidden   In my situation, the only one that seems to work correctly is the
 solution, which is a little bit scruffy. overflow:auto gives me nasty scrollbars, and overflow:hidden must surely have side effects. Also, IE7 apparently shouldn't suffer from this problem due to its incorrect behaviour, but in my situation it's suffering the same as Firefox.  Which method currently available to us is the most robust?


i am trying to count account and contact record from campaign object by grouping by external unique field and created campaign account member junction object which has look up relationship with campaign and account .Below is batch class which sending me exception email  (Apex script unhandled exception by user/organization: xxxxxxxxxxxz7Tb/xxxxxxxxxxxCqPg Source organization: xxxxxxxtmhf (null) Failed to process batch for class 'BatchCountCampaignMember' for job id '7070S00000HnM0U' caused by: System.StringException: Invalid id: SUPPLIER_LEVELS-LEVEL_2   global class BatchCountCampaignMember implements      Database.Batchable<sObject>, Database.Stateful {          // instance member to retain state across transactions     global Integer recordsProcessed = 0;     public Map<Id,Integer> mapExternalIdToNumberOfRecord = new Map<Id,Integer>();     public  Set<String> setExternalIdsUniques = new Set<String>();      global Database.QueryLocator start(Database.BatchableContext bc) {         return Database.getQueryLocator(             'select Id,Campaign_External_Id__c,(Select Id,Campaign__c,Customer__c  from Campaign_Account_Members__r) '+             ' from Campaign');     }      global void execute(Database.BatchableContext bc, List<Campaign> scope){         // process each batch of records           Map<Id,Integer> mapAccountIdToNumberOfContact = new Map<Id,Integer>();         Set<String> setExternalIds = new Set<String>();         Set<Id> setAccountIds = new Set<Id>();         for(Campaign  objCamp : scope){             for(Campaign_Account_Member__c objCampaignAccountMembers : objCamp.Campaign_Account_Members__r){                 setAccountIds.add(objCamp.Campaign_External_Id__c);                   setAccountIds.add(objCampaignAccountMembers.Customer__c);             }            }                  List<Account> listAccounts = [Select Id,(Select id from Contacts) from Account Where ID IN : setAccountIds limit 50000];         for(Account objAccount : listAccounts){             if(!mapAccountIdToNumberOfContact.containsKey(objAccount.Id)){                 if(objAccount.Contacts.size() != 0)                 mapAccountIdToNumberOfContact.put(objAccount.Id,objAccount.Contacts.size());                 else                 mapAccountIdToNumberOfContact.put(objAccount.Id,0);                 }           }         list<Campaign> listCampaignUpdate = new list<Campaign>();         for(Campaign  objCamp : scope){             Set<Id> setTempAccountIds = new Set<Id>();             Integer numberOfContacts= 0;                          for(Campaign_Account_Member__c objCampaignAccountMembers : objCamp.Campaign_Account_Members__r){                 setAccountIds.add(objCamp.Campaign_External_Id__c);                   setTempAccountIds.add(objCampaignAccountMembers.Customer__c);                 if(mapAccountIdToNumberOfContact.containsKey(objCampaignAccountMembers.Customer__c))                     numberOfContacts =  numberOfContacts + mapAccountIdToNumberOfContact.get(objCampaignAccountMembers.Customer__c);             }             objCamp.Number_of_Account__c = setTempAccountIds.size();             objCamp.Number_Of_contacts__c = numberOfContacts;             listCampaignUpdate.add(objCamp);         }         if(!listCampaignUpdate.isEmpty())             update listCampaignUpdate;             }          global void finish(Database.BatchableContext bc){         System.debug(recordsProcessed + ' records processed. Shazam!');         AsyncApexJob job = [SELECT Id, Status, NumberOfErrors,              JobItemsProcessed,             TotalJobItems, CreatedBy.Email             FROM AsyncApexJob             WHERE Id = :bc.getJobId()];         // call some utility to send email             }       }

I want to update the field in multiple records based on the unique_pile_id__c that is unique for all the multiple records. I am trying to write trigger like this:  trigger opMetricsTrigger on Operational_Metrics__c (before insert,before update)  {     Operational_Metrics__c[] op=null;     Set<Id> opIds = new Set<Id>();     public static boolean run = true;      if(run)     {         run=false;         for (Operational_Metrics__c e : Trigger.new)          {             if(e.Unique_Pile_ID__c != null)                 opIds.add(e.Unique_Pile_ID__c );         }          Map<Id, Operational_Metrics__c> y =              new Map<Id, Operational_Metrics__c>([select Unique_Pile_ID__c,unique_id__C,                  Project__c,Composting_Method__c,Pile_Monitoring_Date__c,Average_Temperature__c,                 Moisture_Test__c,Pile_Monitoring_Action_Taken__c,Other_Action__c,                 Pile_Input_Register_Date__c,Total_Waste_Input_on_the_Pile__c,                 Pile_Completion_Stage__c,Date_Pile_COmpleted__c,Curing_Batch_Register_Date__c,                 No_of_Days__c  from operational_metrics__c                  where Unique_Pile_ID__c in :opIds]);          for (Operational_Metrics__c oc : [select Unique_Pile_ID__c,unique_id__C,              Project__c,Composting_Method__c,Pile_Monitoring_Date__c,Average_Temperature__c,             Moisture_Test__c,Pile_Monitoring_Action_Taken__c,Other_Action__c,             Pile_Input_Register_Date__c,Total_Waste_Input_on_the_Pile__c,             Pile_Completion_Stage__c,Date_Pile_COmpleted__c,Curing_Batch_Register_Date__c,             No_of_Days__c  from operational_metrics__c where Unique_Pile_ID__c in :opIds])          {             System.debug('oc '+y.get(oc.Unique_Pile_ID__c));         }       } }   But when I am saving a record it is throwing:      execution of BeforeUpdate caused by: System.StringException: Invalid id: 10-Ber1: External entry point    Here 10-Ber1 is the unique_pile_id__c. Could anyone help me out?


I have seen wine glasses being filled up with water and played as an instrument. I would like to know the physics behind how these are played. Links and explanations are much welcome. Thanks!

A wine glass filled with water (approximately half or a quarter), when you use a wet finger and rub the top of the wine glass, the wine glass will produce a sound. I heard that it is because of the "stick and rub" effect ... Can you explain this effect or other principal that cause this sound to be produced?  how much water is least needed to produce a sound? What and why is the relationship between the quantity of the water and the pitch of the sound? Will the sound produced be greater if we use a denser or less dense liquid than water?  Thx for explaining :D


Given set $A = \{1, 2, 3, ..., 256\}$, find the cardinality of the biggest subset $A'$ of $A$ such that elements $x, y$ of the form $x = 2y$ do not belong to $A'$  Attempt  Split $A$ into odd and even integers.   $128$ odd integers belong in $A'$. Even integers which are divisible by $2$ but not by $4$ are out.   Then take $32$ integers divisible by $4$ but not by $8$. They belong in $A'$. Those divisible by $8$ but not by $16$ are out.  Same with $8$ integers divisible by $16$ but not by $32$  Same with $2$ integers divisible by $64$ but not by $128$  Same with $1$ integer divisible by $256$  Answer: $128 + 32 + 8 + 2 + 1 = 171$.  How do I prove formally this is indeed the max cardinality?

We are given a set $A = \{1,2,3 \:...\:256 \}$. I'm obliged to find such A', so:    $A' \subset A$  A' has the maximal possible cardinality A' contains no elements x,y which satisfy the following equality: $x = 2y$   I came up with some thoughts, but I'm not sure that my answer is correct, and I'm sure that the task could be solved in a more mathematically beautiful style.    My reasoning was the following:  1. First, pick up all odd numbers from set A. It makes 128 elements.  2. Then, pick all even numbers, which are large enough to not comply with the equation $x = 2y$. They are $\{130, 132\:...\: 256\}$. It adds 64 elements.  3. Then we note, that half of those 64 elements could be divided by 2 and some odd number from set A'. So we should only use those elements from previous step, which comply x div 4 = 0.  4. Also, we can include some even numbers, which are small enough to not have and greater match. They are $\{2, 4\:...\: 64\}$. We have to skip every second of them, to not create new matches. It gives us another 16: $\{4,8,12\:...\: 64\}$. Though, we have skip every second of them again, since they build pairs with themselves. It's 8 now: $\{4,12\:...\: 32\}$  5. Thus, we have 128 + 32 + 8 = 168, which is the maximal cardinality of A'.  I believe this solution lacks proof of maximality. So I would appreciate if you guys could prove my solution correct or erroneous or suggest more mathematically advanced way of approaching this problem (for example, I tried to look at elements of A as sequences of 8 bits, but it didn't help me much).


How to force the windows SEARCH to FIND ALL FOLDERS, containing "test" part? This is demonstration, how it is not working:  8 folders    only 7 folders    What is wrong or how to correctly input the search words? Or I have to reconfigure something?  This is "C:\Users\User\Desktop\New folder (2)" And search is inside only this folder.

When using a new Windows 8 search bar:    What is the syntax of the search expression? Is it possible to use wildcards like "*", "?" or any other special symbol?  For example, when searching with Google i can use:   '-' (minus) for excluding certain words; "quoted phrase" for exact phrase matching.


I recently became US citizen and going to travel back to Vietnam. Is it possible to travel to Vietnam with an unexpired Vietnam passport instead of applying for a Vietnam visa?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


I have been trying to download wine through  and I keep on getting this error when adding the repository using this command: Sudo add-apt-repository 'deb  groovy main' i have tried everything I have found online and nothing has worked. Logs: Hit:1 http://dl.winehq.org/wine-builds/ubuntu artful InRelease Hit:2 http://au.archive.ubuntu.com/ubuntu focal InRelease                       Hit:3 http://au.archive.ubuntu.com/ubuntu focal-updates InRelease               Hit:4 https://dl.winehq.org/wine-builds/ubuntu focal InRelease                  Hit:5 https://dl.winehq.org/wine-builds/ubuntu groovy InRelease                 Hit:6 http://au.archive.ubuntu.com/ubuntu focal-backports InRelease             Hit:7 http://dl.google.com/linux/chrome/deb stable InRelease                    Hit:8 http://packages.microsoft.com/repos/code stable InRelease                 Get:9 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]       Ign:10 http://repo.vivaldi.com/stable/deb stable InRelease                      Hit:11 http://repo.vivaldi.com/stable/deb stable Release                        Hit:12 http://ppa.launchpad.net/lutris-team/lutris/ubuntu focal InRelease Hit:14 http://ppa.launchpad.net/numix/ppa/ubuntu focal InRelease                Ign:15 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu focal InRelease Ign:16 http://ppa.launchpad.net/webupd8team/java/ubuntu focal InRelease Err:17 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu focal Release   404  Not Found [IP: 91.189.95.85 80] Err:18 http://ppa.launchpad.net/webupd8team/java/ubuntu focal Release   404  Not Found [IP: 91.189.95.85 80] Reading package lists... Done E: The repository 'http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


Anyone knows?   root@fsdfssfewgfdgfng1:~# su www Cannot execute /sbin/nologin: No such file or directory root@fsdfssfewgfdgfng1:~# id www uid=1000(www) gid=1000(www) groups=1000(www)

I am trying to use the su command to run an application as another user  In this case I am trying to run irssi  blah@ubuntu: su - [username] irssi (enter password)  blah@ubuntu: (nothing happens)  blah@ubuntu: su - [username] -c irssi (nothing)   I run gksu and set same parameters and it works, and doesn't ask me for the user password. What is the issue? And how do I solve it?  I should note the user was created like this  adduser --system --disabled-login [username]   if it makes any difference....sigh.


I have Ubuntu 16.04.1 on a usb drive and I have no hard drive. Can I install ubuntu on the usb and then move the system off of my usb into a hard drive when I get one?

I currently have Ubuntu 10.04 server running on a portable HDD. Want to move it to internal sata HDD. I've got 3 partitions /, /home and swap. On the new HDD I plan to have different partition sizes. What's the correct way of doing these two things (move and resize)?


I am trying to draw the line x = 0.9375 but getting an error on this line. My document is as follows: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{pgfplots}   \title{Reservation pictures} \author{santanu } \date{July 2020}  \usepackage{natbib} \usepackage{graphicx}  \begin{document}  \maketitle  \begin{tikzpicture} \begin{axis}[     axis lines = left,     xlabel = $J$,     ylabel = {$\pi_{d}$},     xmin=0, xmax=1,     ymin=0, ymax=1, ] \addplot [    color=red, ] {1-01.6*x}; \addlegendentry{$J\,=\,k_{g}\pi_{g}$} %Here the blue parabloa is defined \addplot [   color=green, ] {x}; \addlegendentry{$\pi_{d}\,=\,J$} %Here the blue parabloa is defined \addplot [   color=blue, ] {1-1.06667*x}; \addlegendentry{$J\,=\,k_{d}\pi_{g}$} %Here the blue parabloa is defined \addplot [   color=black, ] {x = 0.9375}; \addlegendentry{$J\,=\,k_{d}$} \end{axis} \end{tikzpicture}

I just started to use pgfplots and I'm trying to plot the line x=3 (a line parallel to the y axis where x is 3). I've tried to find an answer on the net, but all the examples always show how to ploy cases of y=..., and not the other way around.  I should point out that the graph contains more than one plot (if it matters).


I find myself asking a lot of questions (like 500 or so over the past 5 years). Honestly, I feel like I abuse it. My backgroud though is that I code but I manage off-site developers in technologies that I'm not so familiar with.   Also, I often have to analyze something to see how well it would work in an environment (like today I've asked about 5 questions on Ember.js which I'm evaluating). I usually Google for an answer but often it's really difficult to find something that matches exactly what you're looking, especially when you don't have a deep understanding of the technology to start with. I guess my question is "Is this behavior ok?" Or is this really frowned upon?

I have used the websites of SO a lot the past few months because I am busy with a large scale web project. I feel I get better answers here on SO than when I just do a Google search, maybe because I can be more specific here with my problem, and the responses are really fast.  Occasionally when I am not working I try to answer some questions, but the question almost always has an answer which is 'as good as' or 'better' than the answer I would supply.  So my question/answer ratio is about 20/1 something, if not more. When I look at my profile page I see a bucket-load of questions and almost nothing I answered myself.  Is this considered bad behaviour? I can see that this looks a little egoistic.  : One devoted to one's own interests and advancement.


I am using include method to include the menu page on every pages, code below:  <!--#include virtual="include/menu/Menu.html"   This Menu.html page has a static title <Title>ABC</Title>. Note that the Title for current viewing page does not show its Title, but only show the Title for the included Menu.html page, which is "ABC".  Is there a way to change the <Title><Title> for the menu page (not the Title on the current viewing page) by using JavaScript, jQuery, or any trick you can think of?

I have a webpage that implements a set of tabs each showing different content. The tab clicks do not refresh the page but hide/unhide contents at the client side.  Now there is a requirement to change the page title according to the tab selected on the page ( for SEO reasons ). Is this possible? Can someone suggest a solution to dynamically alter the page title via javascript without reloading the page?


I use Ubuntu 16.04 LTS with new SSD (4 months old), I had boot time like 5-8 seconds.  But some time ago my boot time increased to around 1 minute.  Can you help me please what is the problem and how to fix it?  Result from systemd-analyze critical-chain:  graphical.target @1min 36.464s └─multi-user.target @1min 36.464s   └─esets.service @1min 30.419s +6.044s     └─network.target @1min 30.415s       └─wpa_supplicant.service @1min 30.781s +34ms         └─basic.target @1min 30.176s           └─sockets.target @1min 30.176s             └─snapd.socket @1min 30.174s +1ms               └─sysinit.target @1min 30.171s                 └─apparmor.service @749ms +403ms                   └─local-fs.target @728ms                     └─run-user-1000.mount @1min 52.381s                       └─local-fs-pre.target @724ms                         └─lvm2-monitor.service @138ms +585ms                           └─lvm2-lvmetad.service @206ms                             └─systemd-journald.socket @130ms                               └─-.slice @114ms   Result from systemd-analyze blame:    6.044s esets.service   5.507s NetworkManager-wait-online.service   3.673s apt-daily.service   1.845s dev-sda1.device   1.144s snapd.service    875ms apt-daily-upgrade.service    826ms ufw.service    585ms lvm2-monitor.service    403ms apparmor.service    291ms ModemManager.service    265ms console-setup.service    260ms binfmt-support.service    246ms accounts-daemon.service    245ms dev-loop0.device    226ms dev-loop1.device    203ms systemd-logind.service    202ms dev-loop2.device    200ms dev-loop5.device    199ms dev-loop3.device    192ms grub-common.service    185ms upower.service    184ms dev-loop4.device    169ms irqbalance.service    163ms systemd-udev-trigger.service    163ms ondemand.service    158ms systemd-rfkill.service    157ms networking.service    141ms user@1000.service    128ms qemu-kvm.service    126ms virtualbox.service    125ms NetworkManager.service    124ms keyboard-setup.service    115ms systemd-user-sessions.service    115ms pppd-dns.service    112ms iio-sensor-proxy.service    111ms packagekit.service     99ms thermald.service     97ms systemd-journald.service     92ms bluetooth.service     88ms avahi-daemon.service     85ms rsyslog.service     77ms snap-core-4917.mount     71ms snap-core-5145.mount     66ms snap-kde\x2dframeworks\x2d5-27.mount     66ms snapd.seeded.service     62ms snap-kde\x2dframeworks\x2d5-13.mount     59ms systemd-udevd.service     58ms systemd-tmpfiles-clean.service     52ms snap-kde\x2dframeworks\x2d5-16.mount     52ms systemd-modules-load.service     51ms snap-core-5328.mount     47ms systemd-tmpfiles-setup.service     41ms gpu-manager.service     40ms resolvconf.service     39ms proc-sys-fs-binfmt_misc.mount     34ms wpa_supplicant.service     33ms polkitd.service     32ms udisks2.service     31ms alsa-restore.service     30ms plymouth-quit-wait.service     28ms plymouth-quit.service     26ms dev-hugepages.mount     23ms systemd-timesyncd.service     22ms systemd-tmpfiles-setup-dev.service     20ms kmod-static-nodes.service     18ms systemd-remount-fs.service     18ms sys-kernel-debug.mount     18ms rtkit-daemon.service     17ms systemd-update-utmp.service     16ms dev-mqueue.mount     16ms systemd-sysctl.service     16ms plymouth-start.service     15ms systemd-journal-flush.service     14ms plymouth-read-write.service      9ms sys-fs-fuse-connections.mount      9ms ureadahead-stop.service      8ms sddm.service      8ms systemd-random-seed.service      7ms systemd-update-utmp-runlevel.service      6ms systemd-backlight@backlight:acpi_video1.service      5ms sys-kernel-config.mount      5ms systemd-backlight@backlight:acpi_video0.service      4ms rc-local.service      4ms systemd-backlight@backlight:intel_backlight.service      4ms setvtrgb.service      1ms snapd.socket   UPDATE: My problem solved:

After upgrading to 15.04 , one computer is very, very slow to boot -several minutes, instead of ~20sec.  I do not know if this helps:  graphical.target @1min 40.961s └─multi-user.target @1min 40.961s  └─kerneloops.service @1min 36.392s +16ms  └─network-online.target @1min 36.391s   └─network.target @1min 30.948s     └─wpa_supplicant.service @1min 31.430s +6ms       └─basic.target @1min 30.414s         └─sockets.target @1min 30.414s           └─acpid.socket @1min 30.414s             └─sysinit.target @1min 30.412s               └─networking.service @1.941s +49ms                 └─apparmor.service @1.383s +555ms                   └─local-fs.target @1.381s                     └─media-andre-6564\x2d3236.mount @2min 17.386s                       └─local-fs-pre.target @1.375s                         └─systemd-remount-fs.service @1.328s +41ms                           └─systemd-fsck-root.service @1.197s +129ms                             └─system.slice @324ms                               └─-.slice @323ms  andre@andre-Latitude-E5520:~$ systemd  Failed to create root cgroup hierarchy: Permission denied Failed to allocate manager object: Permission denied


A polynomial with integer coefficients is an expression of the form: $$f(x)=a_nx^n+a_{n−1}x^{n−1}+\cdots+a_1x+a_0,$$ where $a_n, a_{n−1},\ldots,a_1,a_0$ are integers and $a_n\ne 0$.  A zero of the polynomial is a $c\in\Bbb R$ such that $f(c)=0$.  A real number is said to be algebraic if it is a zero of some polynomial with integer coefficients  1) Show that every rational number is algebraic.  2) Show that if $a$, $b$ and $k$ are positive integers, then the $k$th root of $a/b$ is algebraic.  I have no idea what to do, this is an advanced problem, I'm just curious to the solution.

A polynomial with integer coefficients is an expression of the form: $f(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0$  where $a_n$, $a_{n-1}, \ldots, a_1, a_0$ are integers and $a_n$ is not equal to $0$.  a zero of the polynomial is a $c \in \mathbb{R}$ such that $f(c)=0$  A real number is said to be algebraic if it is a zero polynomial with integer coefficients  1) Show that every rational number is algebraic  2) Show that if $a$, $b$ and $k$ are positive integers, then the $k$-th root of $a/b$ is algebraic  I don't even know where to start on this.  What is a zero of a polynomial with integer coefficients?


I'm trying to do exactly what the title say, insert an emoji into a string in Delphi 2007, just like the example below :  procedure TForm1.Button1Click(Sender: TObject); var s : string; begin s := 'This is my original string (y)'; s := ansireplacestr(s,'(y)','👍'); showmessage(s); end;   I can even paste the emoji into IDE's code, but in runtime showmessage results in this :  This is my original string ????  Is there a way to achieve this task in Delphi 2007 ? Due to several reasons i can't upgrade Delphi right now.  Someone said my question is solved on this topic :    But this topic just says to use third-party components, without telling exactly how to do it.  EDIT : After suggested, i tried to use the functions pos, delete and insert and a widestring var :  function addEmoji(mystring : widestring) : widestring; var r, aux : widestring; p : integer; begin r := mystring; while pos('(y)',r) > 0 do   begin     aux := r;     p := pos('(y)',aux);     Insert('👍',aux,p);     delete(aux,pos('(y)',aux),3);     r := aux;   end; result := r; end;   But the result is the '(y)' replaced by '????'.

Background: This question relates to versions of Delphi below 2009 (ie without Unicode support built in). I have a specification that requires me to transmit a Unicode encoded string over a TCP connection but I do not have Delphi 2009.   Question Is there a single function or very small library (I don't need too much bulk) that I can use to encode a single string into UTF-8 immediately prior sending over the wire? As a second part of my question: if there are UTF-8 encoded strings being sent back as a response, I guess I would then need another function to get it back into a Delphi string format. I understand the limitations of such Unicode support in this way.


I accidentally removed Python 3 from /etc and now I lost many important folders, programs and also the Gnome shell. I know, I'm stupid.  I can still log in with my user but now everything is like this:    I believe the right solution is to install ubuntu 18.04 again.   Since my $HOME folder is undamaged (everything I had there remained: see screenshot below) I want to copy it to a flash drive so I can install Ubuntu again without losing my personal files.    But when I put my USB flash drive in, it shows me this message:  [ 264.065197] sd 6:0:0:0: [sdb] Asking for cache data failed  [ 264.065242] sd 6:0:0:0: [sdb] Assuming drive cache: write through   How can I solve this to copy my home to a flash drive using this terminal?  I don't know if there is a way to restore everything again. I think reinstalling it should be better, but if there is another solution to this without reinstalling Ubuntu again it feel free to share.

I am a new Ubuntu user running Ubuntu 13.04.  I've been trying to install and use a DeDRM tool, but I've been having problems doing so. I was following some directions that said I needed a version of Python 2.7, but not anything Python 3.0 or later (because 3.0 versions are missing some necessary libraries?). I tried to install Python 2.7.5.6, but it didn't work. I thought it was probably because I had the later version of Python, so I went through terminal and removed Python 3.3, so I could install the earlier version of Python.  Now that I've uninstalled Python 3.3, a lot of applications no longer work, including the terminal and the Ubuntu Software Center. I have no idea how to fix this problem now.


like this post    I can't edit the answer to show a previous archived version of the site or anything like that. there is no flagging because of the status of the Question(thread)  no way to comment or bring it to anyone's attention other than here.  I saw a couple of others on there  I know that this question is just there for historical purposes but how should we handle these, if at all?

One of the most popular questions on Stack Overflow,  has recently been deleted. Why was this done, rather than migrated to programmers.SE?  Does this not fall into the broad purview of Programmery questions, or is it really off topic?  I'm somewhat neutral on this myself, as I usually oppose "fun" questions that are there simply for fun's sake, but this is a rather old SO question and historically other similar questions from SO's infancy have been tolerated with grandfather status. Can anyone make a strong argument for or against?


This is a little theory question that has been confusing me for a pretty long time.  Basically, if we are inside of a private LAN, and we want incoming packets to reach, for example, an HTTP server located on one of the machines, we forward ports so that incoming packets reach exactly that computer.  Now, I'm quite confused as to how 'response' packets reach their destination inside of a LAN, like, when we open a web page or so. Can't really find any useful information on that topic.  I hope someone can give me a couple of clues or link me to some information that might explain it. Thanks.  EDIT: I think I should clarify. An example of what I'm asking would be something like this: 1. A computer inside of a LAN with a single external IP tries to load a web-page from a web-server outside of this LAN (Basically on the Internet) 2. The web-server responds and sends the web-page back to that computer.  What quite confuses me at this point is, how does the router know what computer to send the incoming data (given the router is connected to a LAN with multiple computers) without previous port forwarding.

If several computers with local addresses (192.168.0.#) are connected to a router and each computer opens a web browser and requests a page over HTTP, when these TCP:80 packets are sent out, the router switches the local address with the static IP of the router (i.e. Provider given IP) so the server can reply to the appropriate address.   But how does the router know to which computer to forward the HTTP reply, since the TCP header does not contain the local IP address (does it?), and all computers are using port 80?  Does this have anything to do with the MAC addresses?   How exactly does this work?


I would like to ask help for my project. I am a newbie programmer and I don't get this error "exception in thread main java.lang.nullpointerexception"   this is my code:      public class Slumbook{      public String codeName;      public Slumbook(){         //     }      public Slumbook(String codeName){         this.codeName = codeName;     }      public String getCodeName(){return codeName;}      public void setCodeName(String codeName){this.codeName = codeName;}    }   And the Driver Program code is:-  import java.util.*;  public class SlumbookD{     public static void main(String[] args){          Scanner sc = new Scanner(System.in);         Slumbook[] slum = new Slumbook[20];          for(int n=0; n<10; n++){             slum[n].setCodeName(sc.nextLine());         }     } }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


The train arrives at Chicago. The train arrives in Chicago.     Chicago is a big city, so we use 'in' before a big city. However, what about the sentences above? Do we have to use 'at' or 'in'? If we think of a particular point, we use 'at'. As the train arrives at a particular point, do we have to use 'at' here? Later the train will leave Chicago. Or are both prepositions possible?

Fight 707 arrives at Washington D.C. in ten minutes. Fight 707 arrives in Washington D.C. in ten minutes.     Do we have to use 'at' or 'in' in this case? Washington D.C. is a big city, so we have to use 'in' normally. However, because the plane leaves the city soon, the city can be a particular point on a map. So, can we use 'at' in this case?


The title of the question might be misleading because I'm not an expert and I'm trying to learn the proper terminology.  That being said, I'm wondering if it's possible to setup a wildcard DNS record for any number of dot separation in domain names and have them all point to the network root.  This is for WordPress multisite, users will have the option of choosing a mapped domain name, I want to configure my DNS so that both mysite.co.uk.network.com and mysite.com.network.com are valid (I realize this is a but ugly, but WordPress multisite requires that each site have a unique site_url and I'd prefer to preserve the period-delimited appearance if it's possible).

Is it possible to set up a wildcard domain like "*-test.example.com"?  The main reason I'm asking is because I'm in the process of setting up Continuous Integration with Jenkins, and we'd like to automate the setting up of QA sites to test out specific branches of the codebase.  Say user A is working on a feature in a branch called 'awesome-feature-one', and user B is working on 'boring-code-cleanup'.   What I'd like to have is the DNS setup with something like '*-test.example.com' so that we have domains like 'awesome-feature-one-test.example.com' and 'boring-code-cleanup-test.example.com' without having to set up a DNS record for each and every one.  This way, we don't have to bug our network admin each time we start working on a new feature, it's already set up and we just have to make sure our web server is set up to point them to the proper place -- ie, 'awesome-feature-one-test.example.com' points to the folder /var/www/awesome-feature-one, etc, etc.  Lastly, part of the reason is that these sites use SSL, but our SSL cert is only set up to do wildcard for "*.example.com", so in order to set up wildcard for "*.test.example.com" we'd have to get another SSL cert ( which I may float as a solution if "*-test.example.com" won't work for DNS ).  So, is this possible, or am I looking at a pipe dream?


How the mobile phones sending and receiving signals from the satellites? who is providing these services at free of cost?

I assume it doesn't connect to anything (other than the satelite I guess), is this right? Or it does and has some kind of charge?


In theory, let's say I have several copies of  on several different players. Would multiple copies of Fraying Sanity activate at once or does one copy activate first, then another?

I had several humans on the battlefield.  On turn three, I played . On turn four, I played . On turn five, during my upkeep, this question came up.  At this point, I need to draw/reveal three cards. If I reveal a human, Descendants' Path will allow me to cast it without paying its mana cost.  So, does it matter when I draw the human?  The static abilities state "at the beginning up your upkeep..." which leads me to believe that those two draws/reveals would happen before my normal draw. If that's the case, does the draw order happen in the same order that I played the enchantments?  In the end, that's how we decided to do it. I drew first for Triumph of Ferocity, then I revealed for Descendants' Path, then I drew for my turn. Did we do it right?


I queried   SELECT Id, Name FROM User LIMIT 10   It generates list of 10 users in some order randomly.  On what basis does Salesforce give these 10 records?  Ordered by CreatedBy ASC? DESC? Name ASC? DESC? But no, it doesn't satisfy any of these conditions!!  But to my surprise every time I execute this, I get the same results.  So, there must be some default ORDER BY.  Can anyone please let me know!

In the absence of an  in a SOQL query, what order will Salesforce return results in?  Clearly if ordering is important then Order By should be specified, but I recently encountered a question about what the order would be if it was undefined.  My initial thoughts were Salesforce would return them in whatever order suited them. Much like .  For simple queries this would typically line up with the creation date descending and the Id ascending. For more complex queries it would depend on the joins being performed.


I am very new to the concept of regression. While going through an R output for a multiple regression I came across a set of estimates for the slope and got interested to solve for the same. for 2 independent variables the formula derived from  the covariance matrix works fine but the trouble starts while solving it for more than 2 variables. Can some one help me with how the formula is extended in case of more than 2 IVs? Sorry for this naive question.But I am very curious about the fact. The formula that I have been following is- β1=Cov(y,x1)var(x2)−Cov(y,x2)Cov(x1,x2)/var(x1)var(x2)−Cov(x1,x2)2  For three IVs, does the following formula make any sense? β1=Cov(y,x1)var(x2)var(x3)−Cov(y,x2)Cov(y,x3)Cov(x1,x2)Cov(x1,x3)cov(x2,x3)/var(x1)var(x2)var(x3)−{Cov(x1,x2)Cov(x2,x3)Cov(x1,x3)}2  It will be of huge relief if someone could correct me. Thank YOU.

For simple linear regression, the regression coefficient is calculable directly from the variance-covariance matrix $C$, by  $$ C_{d, e}\over C_{e,e} $$ where $d$ is the dependent variable's index, and $e$ is the explanatory variable's index.  If one only has the covariance matrix, is it possible to calculate the coefficients for a model with multiple explanatory variables?   ETA: For two explanatory variables, it appears that $$\beta_1 = \frac{Cov(y,x_1)var(x_2) - Cov(y,x_2)Cov(x_1,x_2)}{var(x_1)var(x_2) - Cov(x_1,x_2)^2} $$ and analogously for $\beta_2$. I'm not immediately seeing how to extend this to three or more variables.


Code Example:      $(document).ready(function() {  txtchangefunction();  });  function txtchangefunction(  $(".textCssClass").change(function () {  ....});  or $(".textCssClass").bind('change', function())   both work for Chrome etc. but not IE8.  Can everyone help on that?? no console error comes out. Thanks a lot.

I'm using jQuery to hide and show elements when a radio button group is altered/clicked. It works fine in browsers like Firefox, but in IE 6 and 7, the action only occurs when the user then clicks somewhere else on the page.  To elaborate, when you load the page, everything looks fine. In Firefox, if you click a radio button, one table row is hidden and the other one is shown immediately. However, in IE 6 and 7, you click the radio button and nothing will happen until you click somewhere on the page. Only then does IE redraw the page, hiding and showing the relevant elements.  Here's the jQuery I'm using:  $(document).ready(function () {   $(".hiddenOnLoad").hide();    $("#viewByOrg").change(function () {     $(".visibleOnLoad").show();     $(".hiddenOnLoad").hide();   });    $("#viewByProduct").change(function () {     $(".visibleOnLoad").hide();     $(".hiddenOnLoad").show();   }); });   Here's the part of the XHTML that it affects. The whole page validates as XHTML 1.0 Strict.
   View by:
       <input type="radio" name="viewBy" id="viewByOrg" value="organisation"       checked="checked" />Organisation

       <input type="radio" name="viewBy" id="viewByProduct" value="product" />Product

   Organisation:	        <select name="organisation" id="organisation" multiple="multiple" size="10">       <option value="1">Option 1</option>       <option value="2">Option 2</option>     </select>

   Product:	        <select name="product" id="product" multiple="multiple" size="10">       <option value="1">Option 1</option>       <option value="2">Option 2</option>     </select>
   If anyone has any ideas why this is happening and how to fix it, they would be very much appreciated!


I was trying to play a video on my laptop using SSH command from my android phone(JuiceSSH). but the video started playing in bytes in my phone's terminal. the player was VLC player. how can I make it run the movie on the laptop not on my phone terminal.

I have two computers (a desktop and a laptop) running linux connected to my local area network. I like to ssh from my laptop over to my desktop and run programs there, and sometimes listen to music on my desktop, which is connected to my stereo system. Lately, I've been wanting to play movies on the desktop and desktop screen, but cue them from my laptop across the room.   Unfortunately, I cannot play a movie in the current X session running on my Desktop on from my laptop. What is odd about this is that I can listen to the audio coming from the speakers that are hooked up to my desktop, by playing the audio files over ssh! This tells me that there must be a way to send the movie to that Xsession, from the ssh shell that I am connected to.  Does anyone have any ideas about this?


I was trying to make a check disk for my Drive C but it gave me a message that the disk will be checked in the next restart and this what really happened.  Where can I find the results or log of this check in my Windows 10?

I scheduled and ran CHKDSK after restart, but it took a long time, so I left it to run all night. In the morning, it had finished and the computer had logged in, but I had no way of knowing if it found bad sectors or anything.  Is there a log file I can look at?  This is what CHKDSK looks like when running before login:


Within my mounted partitions the  is mounted.  debugfs on /sys/kernel/debug type debugfs (rw,relatime)   What does Ubuntu use the debugfs for: any userland functions, or crash reporting? I understand the linux kernel default uses, and how to disable, and unmount debugfs. What are the implications of disabling debugfs for ubuntu, rather than general debugfs information not pertaining to ubuntu?

I have two Ubuntu 16.04.1 servers providing DHCP and DNS services on my network. Today, on one of my servers, I discovered a new filesystem mounted at /sys/kernel/debug/tracing. The other server, which is configured almost identically, does not have this filesystem mounted.  Why did this filesystem get mounted? How do I get rid of it?  > uname -a Linux net-services-02 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux  > cat /proc/cmdline BOOT_IMAGE=/vmlinuz-4.4.0-47-generic root=/dev/mapper/net--services--02--vg-root ro  > cat /etc/fstab # /etc/fstab: static file system information. # [... more comments ...] # <file system> <mount point>   <type>  <options>       <dump>  <pass> /dev/mapper/net--services--02--vg-root /               ext4    errors=remount-ro 0       1 # /boot was on /dev/sda1 during installation UUID=363b849e-4574-410a-acf9-e84c95d7d879 /boot           ext2    defaults        0       2 /dev/mapper/net--services--02--vg-swap_1 none            swap    sw              0       0


I don't think my pan is cast iron which is why I am posting this here. I revived my cast iron pan and it performs beautifully. I use the cast iron pan for doas/pancakes.  The iron pan is lighter but defintely made of iron and does not have a non stick coating on it. It is commonly used in india for cooking flatbreads. I bought it at a local shop a few years ago. It looks very similar to .   When I cook rotis/flatbreads on it, it flakes. Little black bits come onto the bread.   My method of cooking is this.   Heat pan. Place flatbread on it for a while. Flip it, brush some oil on cooked side. Flip again, brush some oil on other cooked side, keep away.   If I brush oil directly on the pan, it smells weird.  I scrape and wipe the flakes off with a piece of cloth when it gets bad. But yeah, this pan has a huge flaking problem. What's causing it?

My cast iron pan has started to give off tiny black flakes after 3 months of use.  Are these dangerous in any way?  Are we ingesting iron?  There are patches on the skillet that are now a little lighter than their surrounding areas.


When writing small documents and drafts for my own reference or quick sharing I often leave the bibliography building for a later stage. In this intermediate stage I still want to use the \cite (or variants of it) to keep track of bibliography, that will later reference the appropriate entry.  The problem is that when I compile the document I get "[??]" as placeholders. This is distracting and it doesn't even give any information of what is missing. Is is possible to get a reasonable content in this placeholder that is not "[??]" from the \cite command?  For example if the code is bla \cite{Einstein1905} bla, and Einstein1905 is not in the bibliography yet, I would like to get at least "bla [Einstein1905] bla", until more information is available in the bibliography database (after which it may just appear as "bla [3] bla" o "bla [Eins05] bla" depending on the style.  Also (and ideally) the fallback result "[Einstein1905]" could be typeset in typewriter style or something to still indicate that something is missing.  I know of the package showkeys but it doesn't do exactly this, not at least by default.

When a reference is undefined, LaTeX shows simply [??] which doesn't give much information. I would like it to show the label instead. This is useful when more collaborators work on the same preprint and the references are yet to be done.  I'm using neither biblatex nor natbib. I do use bibtex but it is irrelevant for this question.  MWE:  \documentclass{article}  \begin{document}  This: \cite{undef} should look like: [{\bfseries ?? undef}]  \end{document}


How to efficiently merge two lists efficiently? Following is the code which gives incorrect results. Not sure. Why?  a = [[]] * 5 b = [[1], [] , [], [2], []] for i in range(0, len(a)):     if b[i]:         a[i] += b[i]   Expected output:  [[1], [], [], [2], []]   Acutal output:  [[1, 2], [1, 2], [1, 2], [1, 2], [1, 2]]   Result can be corrected by rewriting a[i] += b[i] to a[i] = a[i] + b[i]. However, I believe it would highly inefficient as it will result in creating a whole new list. FYI, each list will traversed a large numbers to need to be cache friendly if possible.

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I'm writing a thesis class file and I'd like to delay the running of code to after a specific package is loaded:  \AtEndOfOtherPackage{listings}{%   \lstset{language=Python}}   Is there a command that already exists for the task? If there isn't, how could it be effected?

In  I ended up with  \DeclareMathSymbol{:}{\mathpunct}{operators}{"3A}   But now I'm using the fontspec package which redefines : with \AtBeginDocument itself. So as my own definition comes before fontspec is loaded, even putting it in \AtBeginDocument won't help.  Is there a way to say “Execute this after fontspec has loaded!” or “Execute this at the very end of \AtBeginDocument!”?


Let's say I have a makefile with a recipe called hour_long_recipe, which as its name suggests takes an hour to run. At random points throughout the recipe it asks yes/no questions. Let's say it asks 10 questions in total. One possible (and often recommended) way to run it is: yes | make hour_long_recipe  which answers all questions with y. However, from my understanding, yes keeps outputting to its stdout at  regardless of whether make is actually using that data from its stdin. Even if it was just 10 MiB/s (much slower than any implementation of yes if that reddit thread is to be believed), during the course of an hour it would add up to over 35 GiB, of which just 20 bytes will be read. Where does the data go? It's possible to save it to disk but that's wasteful, and if the disk fills up fast enough it can even cause make to fail. Presumably the operating system will stop it from getting to that, but how? What is the limit, and what happens when that limit is reached?

As a comment in  user  wrote:     Another reason to avoid | true is that if the command produced enough output to fill up the pipe buffer, it would block waiting for true to read it.   Do we have some way of finding out what the size of the pipe buffer is?


Is there a way to play with another character without having to start all over again in Borderlands 2?

I would like to play with the same level and questlines as my friend's characters, which are mostly Level 30+ and in True Vault Hunter Mode, but some of my characters that I'd like to play are in a low level and are not yet in True Vault Hunter Mode. I would also like to have all weapon slots unlocked.     I'd rather not play through the game again to be near the same level as them.  I've checked out  but I am unsure on what fields to edit or toggle to make my characters be like what I described.


I am working on CentOS 7. I have already exported my Active directory database from windows server 2012. Now I need to import it to my new solution in OpenLDAP! I tried to import my file : ldapmodify -Y EXTERNAL -H ldapi:/// -f exportuser.ldf I got an error: SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 adding new entry "dc=sis,dc=infra" ldap_add: Invalid syntax (21)         additional info: objectClass: value #2 invalid per syntax  This is a part of my ldif file: dn:dc=sis,dc=infra changetype: add objectClass: top objectClass: domain objectClass: domainDNS distinguishedName: DC=sis,DC=infra instanceType: 5 whenCreated: 20140903112404.0Z whenChanged: 20200710114957.0Z subRefs: DC=ForestDnsZones,DC=sis,DC=infra subRefs: DC=DomainDnsZones,DC=sis,DC=infra subRefs: CN=Configuration,DC=sis,DC=infra uSNCreated: 4099 dSASignature:: AQAAACgAAAAAAAAAAAAAAAAAAAAAAAAAFZdkFLMGb0aPv8u9xkFAiw== repsFrom::  AgAAAAAAAADwAQAAoQQAAEk0WhMDAAAArh8ZFQMAAADZBgAA2AAAABgBAABwAAAAERERERERERERER  ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER  ERERERERERERERERERERAAAAAKpXAQAAAAAAAAAAAAAAAACqVwEAAAAAAK5eK8JSo2VLj8lZCMtB4q  W2BWGS+bZXS5Ih2qP3nk/NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAEAABgAAAAAAAAAkAAAAAAA  AAAAAAAAYwAyADIAYgA1AGUAYQBlAC0AYQAzADUAMgAtADQAYgA2ADUALQA4AGYAYwA5AC0ANQA5AD  AAOABjAGIANAAxAGUAMgBhADUALgBfAG0AcwBkAGMAcwAuAHMAaQBmAGEAcwB0AC4AaQBuAGYAcgBh  AAAAAAAAAAAAYwAyADIAYgA1AGUAYQBlAC0AYQAzADUAMgAtADQAYgA2ADUALQA4AGYAYwA5AC0ANQ  A5ADAAOABjAGIANAAxAGUAMgBhADUALgBfAG0AcwBkAGMAcwAuAHMAaQBmAGEAcwB0AC4AaQBuAGYA  cgBhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== repsFrom::  AgAAAAAAAADwAQAAblMAAJkvBQ8DAAAAWh8ZFQMAAAC6BgAA2AAAABgBAABwAAAAERERERERERERER  ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER  ERERERERERERERERERERAAAAALrDDAAAAAAAAAAAAAAAAAC6wwwAAAAAANGWjIQnKUVChkMTYKaH0u  6nIrWbtxGPSZF02Z788HncAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAEAABgAAAAAAAAAkAAAAAAA  AAAAAAAAOAA0ADgAYwA5ADYAZAAxAC0AMgA5ADIANwAtADQAMgA0ADUALQA4ADYANAAzAC0AMQAzAD  YAMABhADYAOAA3AGQAMgBlAGUALgBfAG0AcwBkAGMAcwAuAHMAaQBmAGEAcwB0AC4AaQBuAGYAcgBh  AAAAAAAAAAAAOAA0ADgAYwA5ADYAZAAxAC0AMgA5ADIANwAtADQAMgA0ADUALQA4ADYANAAzAC0AMQ  AzADYAMABhADYAOAA3AGQAMgBlAGUALgBfAG0AcwBkAGMAcwAuAHMAaQBmAGEAcwB0AC4AaQBuAGYA  cgBhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== uSNChanged: 88191049 name: sis objectGUID:: L2ettnpuxEaavgfWpC5gUQ== replUpToDateVector::  AgAAAAAAAAACAAAAAAAAALYFYZL5tldLkiHao/eeT83zVwEAAAAAAEk0WhMDAAAApyK1m7cRj0mRdN  me/PB53MzDDAAAAAAAiiEFDwMAAAA= creationTime: 132388553973680553 forceLogoff: -9223372036854775808 lockoutDuration: -18000000000 lockOutObservationWindow: -18000000000 lockoutThreshold: 0 maxPwdAge: -36288000000000 minPwdAge: -864000000000 minPwdLength: 7 modifiedCountAtLastProm: 0 nextRid: 1001 pwdProperties: 1 pwdHistoryLength: 24 objectSid:: AQQAAAAAAAUVAAAAyCaS81zYH0PmTWik serverState: 1***  Some help please

I'am tryin to migrate from active directory windows server to Openldap i found a problem while importing .ldif database exported from AD to my new Openldap ! when  i try to do : ldapmodify -Y EXTERNAL  -H ldapi:/// -f exportuser.ldf i got : dn:dc=si,dc=infra changetype: add objectClass: top objectClass: domain objectClass: domainDNS distinguishedName: DC=si,DC=infra instanceType: 5 whenCreated: 20140903112404.0Z whenChanged: 20200710114957.0Z subRefs: DC=ForestDnsZones,DC=si,DC=infra subRefs: DC=DomainDnsZones,DC=si,DC=infra subRefs: CN=Configuration,DC=si,DC=infra uSNCreated: 4099 dSASignature:: AQAAACgAAAAAAAAAAAAAAAAAAAAAAAAAFZdkFLMGb0aPv8u9xkFAiw== repsFrom::  AgAAAAAAAADwAQAAoQQAAEk0WhMDAAAArh8ZFQMAAADZBgAA2AAAABgBAABwAAAAERERERERERERER  ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER  ERERERERERERERERERERAAAAAKpXAQAAAAAAAAAAAAAAAACqVwEAAAAAAK5eK8JSo2VLj8lZCMtB4q  W2BWGS+bZXS5Ih2qP3nk/NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAEAABgAAAAAAAAAkAAAAAAA  AAAAAAAAYwAyADIAYgA1AGUAYQBlAC0AYQAzADUAMgAtADQAYgA2ADUALQA4AGYAYwA5AC0ANQA5AD  AAOABjAGIANAAxAGUAMgBhADUALgBfAG0AcwBkAGMAcwAuAHMAaQBmAGEAcwB0AC4AaQBuAGYAcgBh  AAAAAAAAAAAAYwAyADIAYgA1AGUAYQBlAC0AYQAzADUAMgAtADQAYgA2ADUALQA4AGYAYwA5AC0ANQ  A5ADAAOABjAGIANAAxAGUAMgBhADUALgBfAG0AcwBkAGMAcwAuAHMAaQBmAGEAcwB0AC4AaQBuAGYA  cgBhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== repsFrom::  AgAAAAAAAADwAQAAblMAAJkvBQ8DAAAAWh8ZFQMAAAC6BgAA2AAAABgBAABwAAAAERERERERERERER  ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER  ERERERERERERERERERERAAAAALrDDAAAAAAAAAAAAAAAAAC6wwwAAAAAANGWjIQnKUVChkMTYKaH0u  6nIrWbtxGPSZF02Z788HncAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAEAABgAAAAAAAAAkAAAAAAA  AAAAAAAAOAA0ADgAYwA5ADYAZAAxAC0AMgA5ADIANwAtADQAMgA0ADUALQA4ADYANAAzAC0AMQAzAD  YAMABhADYAOAA3AGQAMgBlAGUALgBfAG0AcwBkAGMAcwAuAHMAaQBmAGEAcwB0AC4AaQBuAGYAcgBh  AAAAAAAAAAAAOAA0ADgAYwA5ADYAZAAxAC0AMgA5ADIANwAtADQAMgA0ADUALQA4ADYANAAzAC0AMQ  AzADYAMABhADYAOAA3AGQAMgBlAGUALgBfAG0AcwBkAGMAcwAuAHMAaQBmAGEAcwB0AC4AaQBuAGYA  cgBhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== uSNChanged: 88191049 name: si objectGUID:: L2ettnpuxEaavgfWpC5gUQ== replUpToDateVector::  AgAAAAAAAAACAAAAAAAAALYFYZL5tldLkiHao/eeT83zVwEAAAAAAEk0WhMDAAAApyK1m7cRj0mRdN  me/PB53MzDDAAAAAAAiiEFDwMAAAA= creationTime: 132388553973680553 forceLogoff: -9223372036854775808  Some help please .???


For the following print statement  std::cout << 10.1 / 0.1 << " " << (int)(10.1 / 0.1) << std::endl;   My understanding is that (10.1/0.1) is 101.0 hence after typecasting as an int the result should be 101. Instead I received 101 100. Can somebody please explain me why it is so???

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


We know that the probabilty of having boy is $\frac{3}{4}$ and every family has kids until they have boy, after boy they have no children, what is the ratio between boys and girls in population?  I suppose we want to calcualte this using expected value.  Every family has 1 boy so $E(boys) = 1 $  However i am not sure how to calculate expected value of girls. The boys have exponential distribution. So we can calculate probabilty of 0..1... inf girls by calculating "what is the probability that xth child is boy" e.g  $\sum_{i = 1}^{\inf} (\frac{1}{4})^{i-1}*\frac{3}{4}$  and expected value by   $\sum_{i = 1}^{\inf} i* (\frac{1}{4})^{i-1}*\frac{3}{4}$  my question is, this formula basicly tell us expected value of of boys e.g $x *P(x)$ where x is on what attempt family had boys * probability that it was on that attempt.  This does not tell us nothing about girls. So if i modified it to  $\sum_{i = 1}^{\inf} i* (\frac{1}{4})^{i}*\frac{3}{4}$  This should tell us $x * P(x)$ where x = number of girls and P(x) = probability that family had boys on i + 1 attempt = probability that family had i girls.  And just adjusting it to   $\frac{1}{4}*\sum_{i = 1}^{\inf} i* (\frac{1}{4})^{i-1}*\frac{3}{4} = \frac{1}{4} * E(boys) = \frac{1}{4} * \frac{1}{\frac{3}{4}} = \frac{1}{4} * \frac{4}{3} =\frac{1}{3}$  So boys:girls should be $1:\frac{1}{3} = 3:1$  But i am not sure if logic behind this is correct. Can i adjust the formula this way for it to make sense?  Thanks for answers.

Puzzle  In a country in which people only want boys, every family continues to have children until they have a boy. If they have a girl, they have another child. If they have a boy, they stop. What is the proportion of boys to girls in the country?  My solution (not finished)  If we assume that the probability of having a girl is 50%, the set of possible cases are:  Boy (50%)  Girl, Boy (25%)  Girl, Girl, Boy (12.5%)  ...  So, if we call G the number of girls that a family had and B the number of boys that a family had, we have:  $B = 1$  $P(G = x) = (1/2)^{x+1}*x$  So  $G = \Sigma (1/2)^{x+1}*x$  I feel like the sum of this infinite serie is 1 and that the proportion of girls/boys in this country will be 50%, but I don't know how to prove it!  Thanks!


In Matthew Schwartz's QFT text, he derives the Schrodinger Equation in the low-energy limit.  I got lost on one of the steps.  First he mentions that   $$ \Psi (x) = <x| \Psi>,\tag{2.83}$$  which satisfies  $$i\partial _t\Psi(x)=i\partial_t< 0|\phi (\vec{x},t)|\Psi>=i<0|\partial_t\phi(\vec{x},t)|\Psi>.\tag{2.84}$$  That was all fine and good, but he lost me on the next part, going from the first line (i) to the second (ii).  (i)$$i<0|\partial_t\phi(\vec{x},t)|\Psi>=<0|\int \frac{d^3p}{(2\pi )^3} \frac{\sqrt{\vec{p}^2+m^2}}{\sqrt{2\omega _p}}(a_pe^{-ipx}-a_{p}^{\dagger}e^{ipx})|\Psi>$$ (ii)$$=<0|\sqrt{m^2-\vec{\nabla}^2}\phi_0(\vec{x},t)|\Psi>.\tag{2.85}$$  He apparently uses:  $$\partial _{t}^{2}\phi_0=(\vec{\nabla} ^2-m^2)\phi_0$$  to get the following term  $$\sqrt{m^2-\vec{\nabla}^2}$$  in equation (ii) above, but not quite sure how.  Can anyone help me out?   This is on page 24 for those that have the text.

In the book "Quantum Field theory and the Standard Model" by Matthew Schwartz, , the position space wavefunction is defined as   $$\psi(x)=\langle 0|\phi(x)|\psi\rangle, \tag{2.82+2.83}$$  where $|\psi\rangle$ is any state in the Fock space. Then he uses the equations (i) $\partial_t^2\phi_0=(\nabla^2-m^2)\phi_0$ (i.e., the Klein-Gordon equation for the free massive scalar field $\phi_0(\textbf{x},t)$) and (ii) $[H,\phi_0]=-i\partial_t\phi_0$ to derive Eq. 2.85, in following 3 steps:  $$i\langle 0|\partial_t\phi_0(\textbf{x},t)|\psi\rangle=\langle 0|\int \frac{d^3\textbf{p}}{(2\pi)^3}\frac{\sqrt{\textbf{p}^2+m^2}}{\sqrt{2\omega_\textbf{p}}}(a_p e^{-ip\cdot x}-a^\dagger_p e^{ip\cdot x})|\psi\rangle\\ =\langle 0|\sqrt{m^2-\nabla^2}\phi_0(\textbf{x},t)|\psi\rangle.\tag{2.85}$$  This equation is used to successfully derive the Schrodinger equation in quantum mechanics for the state $\psi(\textbf{x},t)\equiv \langle 0|\phi_0(\textbf{x},t)|\psi\rangle$.   The first equality follows from differentiation of $\phi_0(x)$ w.r.t $t$. How does the second equality follow from the first? How are the inputs (i) and (ii) are utilized to derive the second equality from the first? Is it true that the operator $$i\partial_t\sim\sqrt{m^2-\nabla^2}~?$$ If yes, what is the use of doing the middle step?


I have been using the following linkify code for a while:  return str.replace(/(\s|^)(mailto\:|(news|(ht|f)tp(s?))\:\/\/\S+)/g,'$1$2') .replace(/(\s|^)@(\w+)/g, '$1@$2') .replace(/(\s|^)#(\w+)/g, '$1#$2');   I now have a scenario where a user can add images, youtube iframes, etc. So I need to wrap links around strings outside these tags.  Side note: I can limit what tags can be added and control the format of these tags.  Any suggestions?

I am using the function below to match URLs inside a given text and replace them for HTML links. The regular expression is working great, but currently I am only replacing the first match.  How I can replace all the URL? I guess I should be using the exec command, but I did not really figure how to do it.  function replaceURLWithHTMLLinks(text) {     var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/i;     return text.replace(exp,"$1");  }


What are the differences and common points between a variable and an indeterminate ? Is an indeterminate also a variable ?  Thank you  EDIT : I am not trying to solve anything in particular, it was just by reading the definition of both on Wikipedia and wanted some direct comparison. From what I understand, indeterminate enables you to compare two expressions directly while with a variable you would have to care about the values x might take...

From Wikipedia-     In mathematics, and particularly in formal algebra, an indeterminate is a symbol that is treated as a variable, but does not stand for anything else but itself and is used as a placeholder in objects such as polynomials and formal power series.   So, how it is different from variable which is also used as a placeholder? What is the use of the indeterminate?


Can anyone explain this? I'm new to this topic. Prove that for all integers a, b, c , if a | c and b | c , then ab | c² .

I just need to check the reasoning in my proof is correct, I think it is valid although I'm not totally convinced because I can't follow the logic; does proving that $x$ is an integer prove that $ac|bd$?  Theorem: Let $a$, $b$, $c$, $d$ be integers. If $a|b$ and $c|d$, then $ac|bd$.  Proof: $aj=b$ and $ck=d$ for integers $j$, $k$. Then, $ac|bd$ implies $acx=ajck$ and thus $x=jk$ for some $x$. Since the product $jk$ is an integer, $x$ is an integer and thus $acx=ajck$ and thus $ac|bd$.