My coworker uses this sentence to explain to our patients about our HIPPA Policy: "We cannot give your information out to no one."  The "no one" part catches me every time. I'd like to know if it's grammatically correct. I don't want to correct her when I don't even know if I'm correct. Is it "We cannot give your information out to no one", or "We cannot give your information to anyone" or "anybody"?  Please help!! It's driving me nuts!!!!

Is "not unpleasant" a double negative, and hence bad grammar?  See the first answer (by Ham and Bacon) to , for the basis of this question:     "Did you enjoy the movie?"      "Well, I didn't not enjoy it, but..."   Are all "not un..." forms incorrect?  They are very widely used, much more so than the blatant "not not" or "didn't not", etc.


We know lagrangian L(q,v)=T-V, and Hamilton is H(p,q)=T+V, why we need Hamiltonian , isn't Lagrangian enough?

I've just finished a Classical Mechanics course, and looking back on it some things are not quite clear. In the first half we covered the Lagrangian formalism, which I thought was pretty cool. I specially appreciated the freedom you have when choosing coordinates, and the fact that you can basically ignore constraint forces. Of course, most simple situations you can solve using good old $F=ma$, but for more complicated stuff the whole formalism comes in pretty handy.  Then in the second half we switched to Hamiltonian mechanics, and that's where I began to lose sight of why we were doing things the way we were. I don't have any problem understanding the Hamiltonian, or Hamilton's equations, or the Hamilton-Jacobi equation, or what have you. My issue is that I don't understand why would someone bother developing all this to do the same things you did before but in a different way. In fact, in most cases you need to start with a Lagrangian and get the momenta from $p = \frac{\partial L}{\partial \dot{q}}$, and the Hamiltonian from $H = \sum \dot{q_i}p_i - L$. But if you already have the Lagrangian, why not just solve the Euler-Lagrange equations?  I guess maybe there are interesting uses of the Hamiltion formalism and we just didn't do a whole lot of examples (it was the harmonic oscillator the whole way, pretty much). I've also heard that it allows a somewhat smooth transition into quantum mechanics. We did work out a way to get Schrödinger's equation doing stuff with the action. But still something's not clicking.  My questions are the following: Why do people use the Hamiltonian formalism? Is it better for theoretical work? Are there problems that are more easily solved using Hamilton's mechanics instead of Lagrange's? What are some examples of that?


I am a Indian passport holder and have booked a single ticket from New Delhi to Port of Spain via Amsterdam and Curaçao. From New Delhi to Curaçao, I am traveling by KLM and from Curaçao to Port of Spain, by Insel air. Although I booked single ticket, The KLM authorities told me that I will receive my luggage in Curaçao and I will have to get boarding pass for Curaçao to Port of Spain in Curaçao. I don't have any visa for Curaçao. Do I need to pass through immigration for getting my luggage for recheck in or it will be automatically transferred to Insel Air at Curaçao?

I am Indian passport holder travelling to Port of Spain. Routing is Mumbai to Amsterdam via Abu Dhabi on Etihad. In Amsterdam, my connection time is 20 hours before the KLM flight to Curaçao; from Curaçao to Port of Spain is on Suriname Airways. All together, I have three separate tickets on three airlines.   I don't have a visa for any country. I will get a visa on arrival at Port of Spain (Trinidad).  Q.1 : Will Etihad allow me to board at Mumbai Airport?  Q.2 : Indian passport holders don't need a transit visa at Schiphol Airport, but is 20 hours transit time okay as long as I stay in the airport?  Q.3 : Do I require transit visa for Curaçao? My connecting flight is 6 hours  before the flight to Port of Spain.  This will be round trip ...  Yes ....i will have checked bag of 23kg ~ 1pc


Question Show that the only symmetric $\alpha$ stable distributions with $0<\alpha\leq 2$ are $\phi_{\alpha}(t)=\exp(-|t|^\alpha)$ and their scaled versions (where $\phi$ denotes the characteristic function).  For this question we say that $X$ has a symmetric $\alpha$ stable law  if $\phi_{X}(t/n^{1/\alpha})^n=\phi_{X}(t)$ for all $t$ and $n\geq 1$ and if $\phi_{X}$ is real. It is shown in Durrett that $\phi_{\alpha}$ is a characteristic function for $0<\alpha\leq 2$ and by the definition given above it is clearly a symmetric $\alpha$ stable law. Indeeed, $\phi_{\alpha}$ is real and moreover $$ \left(e^{-|ct/n^{1/\alpha}|^\alpha}\right)^n=e^{-|ct|^\alpha} $$ for any $c\in\mathbb{R}$ which implies that the scaled versions of $\phi_{\alpha}$ are symmetric $\alpha$ stable laws for $0<\alpha\leq 2$. My problem is how to deduce the reverse inclusion i.e. supposing that $\phi_{X}(t/n^{1/\alpha})^n=\phi_{X}(t)$ for all $t$ and $n\geq 1$ , $\phi_{X}$ is real and $0<\alpha\leq 2$, how to deduce that $\log\phi_{X}(t)=-|ct|^\alpha$ for some $c$?. Any help/hints are appreciated.

Suppose $X,X_1,X_2,\ldots$ are independent and identically distributed random variables with a symmetric distribution $F$. We say $F$ is symmetric $\alpha$ stable  where $0<\alpha\le 2$, if   $$X_1+X_2+\cdots+X_n \stackrel{d}{=} n^{1/\alpha}X, \ \ \mbox{for all} \ n\in\mathbb{N}$$   I wish to show that the characteristic function of $F$ is given by $\psi(t)=e^{-c|t|^{\alpha}}$.  Breiman's probability book solve the general version of this problem (consider stable only, not symmetric). However, it uses infinite divisible distributions and lot of calculations.  So I was wondering if there is a short argument for the symmetric case.   My try: Note that using the equal in distribution relation  $$\psi(t)=\psi\left(\frac{t}{n^{1/\alpha}}\right)^n$$ Enough to take $t>0$ as $\psi(t)=\psi(-t)$. Now taking limit we have $$\psi(t)=\lim_{n\to\infty}\psi\left(\frac{t}{n^{1/\alpha}}\right)^n=\exp\left(-\lim_{x\to 0^+}\frac{1-\psi(tx^{1/\alpha})}{x}\right)=\exp\left(-t^{\alpha}\lim_{z\to 0^+}\frac{1-\psi(z)}{z^\alpha}\right)$$  So it is enough to show that $\displaystyle \lim_{z\to 0^+}\frac{1-\psi(z)}{z^\alpha}$ exists and is non zero. However, I don't have any clue how to proceed from here. Any help/suggestions.


It's mentioned that tampering with past events is illegal in the Wizarding world. Hermione even states "We’re breaking one of the most important wizarding laws!" when they are using it.   The thing is, if tampering with the past is illegal, how does the ministry enforce it? For example, if a wizard were to travel back in time, effect a change, and then return to his origin place, with everything around him changing, wouldn't he be the only one who would have been aware of the change in the first place?  Obviously the Ministry seems oblivious to its use, as it was used illegally to make a change to the past and free an extremely "dangerous" criminal (Sirius), also a big no no, with no repercussions to its users.   Furthermore, if an official from the Ministry were to detect illegal use of a Time Turner somehow, could the wizard or witch who was caught not simply use the Time Turner once again, travel back in time, and do something in order to stop the official from noticing the use of a Time Turner? How would they even punish the user for breaking the law if they were to detect it, if the user could just time turn his/her way out of being apprehended.

Since Hermione already admitted that they were breaking the Law. Would it be safe to conclude that the Ministry cannot instantly (by magic) detect illegal time-tampering?  (Both before and during the events of Prisoner of Azkaban.)     “Hermione,” said Harry suddenly, “what if we — we just run in    there and grab Pettigrew —”       “No!” said Hermione in a terrified whisper. “Don’t you understand?    We’re breaking one of the most important wizarding laws!    Nobody’s supposed to change time, nobody! You heard Dumbledore,    if we’re seen —”       — Prisoner of Azkaban, chapter 21 (Hermione’s Secret)


Quote recently, I have trying to understand this confusing idea of Hypothesis testing. Although I am pretty much clear with the way it works, that is:  Choosing a test statistic Then choosing a Null Hypothesis (H0) & an alternative hypothesis (H1) Finding out the P-Value If the p-value is greater than the significance level (assuming 0.05 for this question), then accepting H0, otherwise rejecting it  But I am still highly confused with the last step. Let me throw some light on my confusion with 2 examples. The 1st example is to check whether a coin is biased towards heads or not. So, we design an experiment in which we flip the coin 5 times, and the number of heads we obtain is the test-statistic and the coin is unbiased is our Null Hypothesis. Now, let's say we flip the coin 5 times, and we obtain 5 heads. So, P(5 heads | The coin is unbiased) = 1/32 ~ 0.03 (< 0.05), and hence we reject H0. The intuition behind it is pretty simple as well since the probability of obtaining 5 heads in 5 tosses, from an unbiased coin is very less, hence we concluded that the coin is biased. Now, comes the 2nd example, which puts me into great confusion. In this example, we need to determine if the heights of students from 2 different classes C1 & C2 follow the same distribution or not. So, we choose the test statistic (X) as the difference between the means of the heights u1 & u2, and we choose the null hypothesis as there being no difference in the means. Now, let's say that we performed an experiment and found out X to be 10cm. Now, we try to determine the p-value, that is P(X >= 10cm | H0), and let's say we obtain it to be 0.01 (< 0.05), and hence we reject the null hypothesis. Now, here is my doubt, if the p-value mentioned above is very less, then shouldn't it mean that there is no difference in the heights of students of C1 and C2? In simple words, if the p-value is 0.01, then shouldn't it mean that it is very less probable that the difference in the means of C1 and C2 is big, i.e. no difference in the heights of C1 and C2 (exactly the same as our Null Hypothesis), but it happens to be completely opposite? P.S. - This is my first question on any discussion forums, so let me know if I am missing some information that I need to add. Thanks in advance :)

After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?


Im Windows 10 user. Today it stopped suddenly and stopped booting. I prepared Window 10 rescue pen drive and boot from it. I did automatic fix (no results) plus entered 3 commands from rescue console:  bootrec /RebuildBcd bootrec /fixMbr bootrec /fixboot Exit   but still no good results.  When I re-entered rescue console I found that disc C is empty (no files) but it's almost full (70 MB free of 1 GB disc).  How to restore booting and data?;) THanks;).  Update 1: disc has been connected to other machine with windows 8 and partition is visible there. I will do backup and try solution proposed by Tim.

I installed Ubuntu on a system that has Windows 10 installed. I can boot to Windows or Ubuntu normally using GRUB. I want to delete Ubuntu partition, but first I must restore the Windows 10 MBR.  In  (applies to Windows 7 and Windows Vista) they say to use Bootrec.exe with options /FixMbr /FixBoot, but when I type "bootrec.exe /FixMbr" in a command prompt, Windows says:     'bootrec.exe' is not recognized as an internal or external command.   I say I can boot to Windows 10 and run a command prompt from there (I don't need to use an installation medium), but I don't know what to enter.


I have less experience in coding. I have a requirement to send Salesforce record to External system whenever we create a record in SF, create an incident in External system. I wrote a class and a trigger and calling the method in trigger from class to POST. When I execute the code in anonymous window , it throws me error "System.QueryException: List has more than 1 row for assignment to SObject". The code is executing in trigger when i call method however it is passing only one record to external system not the one which we create in salesforce. Any help is appreciated. I think I'm doing something wrong on my Soql query because it is not picking new Record and loops on with one record in salesforce. Can someone help me correct this? I know code is little messy. Posting both apex class and trigger.Thank you!  public class RadarUpdate { @future (callout=true) public static void postcallout(string id) {    Patient_Satisfaction__c c = [select id, Name, Reporter_First_Name__c,  Reporter_Last_Name__c, Reporter_Phone__c, Description_of_Feedback__c from  Patient_Satisfaction__c limit 1] ;  // working when Limit 1 clause is added // JSONGenerator gen = JSON.createGenerator(true); gen.writeStartObject(); gen.writeObjectField('First name ', c.Reporter_First_Name__c);   //Salesforce to External system gen.writeObjectField('Last name',c.Reporter_Last_Name__c);       //Salesforce to External system gen.writeObjectField('Phone',c.Reporter_Phone__c);               //Salesforce to External system gen.writeObjectField('description',c.Description_of_Feedback__c);//Salesforce to External system gen.writeObjectField('Name',c.Name);         //External system required field gen.writeObjectField('incident_group_id',7387);//External system requiredfield gen.writeEndObject(); String jsonS = gen.getAsString();  System.debug('jsonMaterials'+jsonS); Http http = new Http(); HttpRequest request = new HttpRequest(); request.setEndpoint('https://api.radarfirst.com/incidents'); request.setMethod('POST'); request.setHeader('Content-Type','application/json;charset=UTF-8'); request.setHeader('User-agent', 'Salesforce-integration-client'); request.setHeader('Authorization','Bearer 123'); request.setBody(jsonS); // Set the body as a JSON object HttpResponse response = http.send(request); if (response.getStatusCode() != 201) { System.debug('The status code returned was not expected: ' + response.getStatusCode() + ' ' + response.getStatus()); } else { System.debug(response.getBody()); } } }   trigger RadarFirst on Patient_Satisfaction__c (before insert, before update) { for (Patient_Satisfaction__c cc : Trigger.new) { if (cc.Referred_to_Privacy__c = true) { RadarUpdate.postcallout(cc.id); } } }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, navigate to the  tag.  This question and answer is owned by the community! If you can improve it and make it more useful, you're welcome to edit it.  I have a specific JSON structure in mind. I need to either deserialize this structure that's coming in from a web service, or I need to serialize data into this structure to transmit it to another system. How should I get started on this project in Apex?


I need to do a Bat file (or something like that) that do a Incremental Backup of some especified folders when, and just when, the Ethernet Cable is connected.  How can I do it? I have no idea how can I start..

I have a wifi connection that requires to authenticate using a web form once the wireless link is established. I know how to automate the authentication with a script that uses curl/.  But how can I ask Windows to call my script every time I connect to a particular network connection?  I would be also interested in receiving the name of the wireless profile or the ESSID on the command-line of my script.


I want move unity launcher to bottom. I tried   sudo add-apt-repository ppa:paullo612/unityshell-rotated  sudo apt-get update  sudo apt-get install unityshell-rotated libnux-1.0-0 compizconfig-settings-manager   Console say "unityshell-rotated" and "libnux-1.0-0" packate not found.  What should i do ?  EDIT:  I want be like this

I can’t get used to the new Unity system. I’d like to move the left Unity panel to the bottom of screen (like Windows 7 – more similar is better).  But I can't find a way. Is it possible?


sudo apt install python3-pip [sudo] password for it:  Reading package lists... Done Building dependency tree        Reading state information... Done  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.  The following information may help to resolve the situation:  The following packages have unmet dependencies:  gsettings-desktop-schemas : Breaks: mutter (< 3.31.4) but 3.28.4+git20200505-0ubuntu18.04.2 is to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

I am not sure what caused this error, but here is what the whole error says, and also this is sitting as a notification, and preventing me from updating any software using Update Manager - Please provide some assistance or tell me how to figure out what to do to fix it.  Could not calculate the upgrade  An unresolvable problem occurred while calculating the upgrade.  Please report this bug against the 'update-manager' package and include the following error message: 'E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.'


Lets say I have a custom style in GeoServer and after I created a new layer, I want to add the style to that layer. I am using  link for documentation.  function editLayerStyle(layerName, body) { url = `http://admin:geoserver@IP:PORT/geoserver/rest/layers/{layerName}/styles`  return new Promise((resolve, reject) => {     request.post(url, {         body,         headers: { 'content-type': 'application/vnd.ogc.sld+xml' }     }, function (error, { statusCode }, body) {         if (error) {             return reject({ success: false, statusCode: statusCode, message: body })         }         if (statusCode === 201) {             return resolve({ success: true, message: 'Style added to layer' })         } else {             return reject({ success: false, statusCode: statusCode, message: 'Unknown Error' })         }     }) }) }  let layerName = 'layer_name' let body = ` <styles>     <style>         <name>{style_name}</name>    /// name of my style         <filename>{style_name.sld}</filename>  /// format of style     </style> <styles>`  try {     await editLayerStyle(layerName, body) } catch (error) {     console.log(error) }   I get the error even I tried to change the style and the content type.

I have a function which publishes a layer in GeoServer with the REST API. Now I want to add an existing style in the layer while publishing it.  Anyone has any idea where I write the style name or call the 'style.sld' while publish the layer?  const publish = function (layerName) { return new Promise((resolve, reject) => {     axios({         method: 'POST',         url: `http://${GEOSERVER_IP}:${GEOSERVER_PORT}/geoserver/rest/workspaces/workspaceName/datastores/datastoreName/featuretypes.xml`,         auth: {             username: `${GEOSERVER_ADMIN_USER}`,             password: `${GEOSERVER_ADMIN_PASS}`         },         headers: {             'Content-Type': 'text/xml'         },         data: `<featureType>                 <name>${layerName}</name>                 <srs>EPSG:4326</srs>             </featureType>`     })         .then(response => {             resolve({                 ok: 1,                 message: `Layer has been published.`             })         })         .catch(err => {             reject({                 ok: 0,                 message: err.response.data,             })         })  }) }


In answering a  I found myself in need of a term for alliteration but including the first vowel sound, as in "Costa Coffee". An ideal term would be more specific than assonance. I've seen head rhyme used but Wikipedia at least says that's just the same as alliteration. Does such a term exist?

In Anne Tyler’s , one character comments on the name of another     Carla Carlucci: alliteration. Or something more than alliteration, but I don’t know the term for it.    is     the use of the same consonant (consonantal alliteration) or of a vowel, not necessarily the same vowel (vocalic alliteration), at the beginning of each word or each stressed syllable in a line of verse, as in around the rugged rock the ragged rascal ran.   Collins    is      the use of word-endings that are similar or the same, either intentionally for rhetorical effect or by mistake during copying of text.   Collins  An example is found in Ursula K. LeGuin's      He arrived at ideas the slow way, never skating   over the clear, hard ice of logic, nor soaring   on the slipstreams of imagination, but slogging,   plodding along on the heavy ground of existence.   Obviously there is alliteration present in Ms. Tyler’s example, but it does seem like something more, deserving of its own nomenclature. Is there a standard term for the repeated use of a syllable at the beginning of successive words?


I tried to install Ubuntu 18.04 LTS in my laptop. Even though the installer ran without errors, I failed to boot. I tried it 8 times, both in Legacy and UEFI mode. Still nothing. It shows only: No boot device found. Press any key to reboot machine.  Update: I have identified the problem. Outdated microcode of my CPU was causing the problem. Reinstalled Windows and applied the update. Previous version: 20090330 Update version: 20180425

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


The following code gives this error:   ! Use of \@icentercr doesn't match its definition. <argument> \def   l.18 \maketitle  ?    The goal is to create a title like  FOO BAR BAZ FOO FOO BARBAZ FOO   from   \title{Foo bar\\baz foo foo\\barbaz foo}   so I can control the line breaks and get the text upper case. How can I get the code to work?  Here is the faulty code:  \documentclass{book} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc}  \title{Hello with\\crlf}  \makeatletter \renewcommand\maketitle{\begin{titlepage}%     \raggedright     {\MakeUppercase{\@title} \par}%   \end{titlepage}% } \makeatother   \begin{document} \maketitle \end{document}

I have a document with a title that is spread over several lines using hard line breaks. To configure the title formatting, I use the titling package with code adapted from its documentation:  \documentclass{article}  \usepackage{titling} \pretitle{\begin{center}\LARGE\sffamily\bfseries} \posttitle{\par\end{center}\vskip 0.5em}  \title{Higgelty Pigglety Pop! \\ or \\ There Must Be More to Life}  \begin{document} \maketitle \end{document}   …and it works perfectly.  I now want the title additionally to be in all caps and therefore change the \pretitle command:  \pretitle{\begin{center}\LARGE\sffamily\bfseries\MakeUppercase}   …and I get the following error message:  ! Use of \@icentercr doesn't match its definition. <argument> \def  l.12 \maketitle   This only happens with a title that includes hard line breaks.  What does this error message mean? How can I fix it?


I am trying to cite using square bracket in beamer.  This is what it currently looks like    Good, now is there a way to change it so it looks like:    or some variation of it? Much thanks  \documentclass{beamer}  \usepackage[utf8]{inputenc} \usepackage[style=authortitle,backend=bibtex]{biblatex} \addbibresource{bib.bib}  %Information to be included in the title page: \title{Sample title} \author{Anonymous} \institute{ShareLaTeX} \date{2014}  \begin{document}  \frame{\titlepage} \begin{frame} \frametitle{Sample frame title} This is a text in first frame \footcite{abramov_gordon_feldman_chavarga_2012} \end{frame}  \end{document}   bib.bib:  @article{abramov_gordon_feldman_chavarga_2012, title={Sex \& vision I: Spatio-temporal resolution}, volume={3}, DOI={10.1186/2042-6410-3-20}, number={1}, journal={Biology of Sex Differences}, author={Abramov, Israel and Gordon, James and Feldman, Olga and Chavarga, Alla}, year={2012}, pages={20} }

Is it possible to change the \footnotemark style created by \footcite (from biblatex) so that it looks more like a citation symbol?    I want to keep my references as footnotes, but I would like them to look more like actual citations.  MWE:  % arara: pdflatex % arara: bibtex % arara: pdflatex % arara: pdflatex % arara: clean: {files:[temp.aux, temp.bbl, temp.bib, temp.blg, temp.log, temp.nav, temp.out, temp.run.xml, temp.snm, temp.toc, temp-blx.bib]}  \documentclass{beamer}  \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @article{greenwade93,     author  = "George D. Greenwade",     title   = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",     year    = "1993",     journal = "TUGBoat",     volume  = "14",     number  = "3",     pages   = "342--351" } @book{goossens93,     author    = "Michel Goossens and Frank Mittelbach and Alexander Samarin",     title     = "The LaTeX Companion",     year      = "1993",     publisher = "Addison-Wesley",     address   = "Reading, Massachusetts" } \end{filecontents}  \usepackage[english]{babel} \usepackage[backend=bibtex, style=verbose]{biblatex} \addbibresource{\jobname}  \begin{document}  \begin{frame} Bla bla bla \footcite{greenwade93} Ble ble ble \footcite{goossens93} \end{frame}  \end{document}   NOTE 1: There are many questions on tex.stackexchange.com about changing the style of the footnote style. This is about the footnotemark itself.  NOTE 2: I don't use footnotes for anything else, so I don't mind changing the footnotemark directly, ignoring whether it was created by footcite or not. I just could not find how to customize footnotemarks this way...


enSO ():        This block:
   On localized sites ():        But on localized sites this div has additional classes which cause this issue:
         Could you fix it?

In any tag's info page, the Tag Info box is overlapped with the above horizontal line. Adding some space in between them or adding margin-top to the tag info div will improve the page design.  For example, in the  tag info page.  Current UI:        Expected UI:


Via panda the values in the table below are read with non existing decimal place e.g.: 0.6 is read as 0.59999999999999998 (see code below)  I would have expected to read 0.6 as 0.6.  Why is it interpreted like this and what do I have to code to get the expected behaviour?  ldcSc = pd.read_csv(os.path.join(basepath, 'kmod_table.csv'), skiprows=2) ldcSc      LDC             1        2        3 0   permanent      0.6      0.6     0.50 1   long-term      0.7      0.7     0.55 2   medium-term    0.8      0.8     0.65 3   short-term     0.9      0.9     0.70 4   instantaneous  1.1      1.1     0.90  print(ldcSc.get_value((ldcSc.LDC[ldcSc.LDC == 'permanent'].index[0]), '2')) print(ldcSc.get_value((ldcSc.LDC[ldcSc.LDC == 'short-term'].index[0]), '1')) print(ldcSc.get_value((ldcSc.LDC[ldcSc.LDC == 'medium-term'].index[0]), '3'))   prints to:  0.6 0.9 0.65  BUT:  ldcSc.get_value((ldcSc.LDC[ldcSc.LDC == 'permanent'].index[0]), '2')   0.59999999999999998  ldcSc.get_value((ldcSc.LDC[ldcSc.LDC == 'short-term'].index[0]), '1')   0.90000000000000002  ldcSc.get_value((ldcSc.LDC[ldcSc.LDC == 'medium-term'].index[0]), '3')   0.65000000000000002

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


I'm programming a code that writes an array of integers to a file. However, it keeps giving me a NullPointerException. Which I think is in one of two methods that I have, I know it's somewhere in there, but I can't spot it. Here's the code.  public static void WriteToFile (int[] n)throws IOException{     try{         BufferedWriter bw=new BufferedWriter(new FileWriter("C:\\sortfile2.txt"));         for(int i=0;i<=25;i++){             bw.write(sortArray(n)+" ");         }         bw.flush();         bw.close();     }     catch(IOException e){         System.out.println("Could not write to file");     } }   This is the first method that the error could be located in. The second is here:  public static int sortArray(int[] a){     int sort=0;     for(int i=0;i<a.length;i++){         int max=IndexOfMaxInRange(a,i,a.length-1);         sort=SwapElement(a,max,max++);         a[i]=sort;     }     return sort; }   Where IndexOfMaxInRange is a method that finds the highest integer of an array, and where SwapElement is a method that implements IndexOfMaxInRange, and swaps the highest number in the array, with the lowest.

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?


I have a UI application in which I consume a WCF service like this  public MainWindow() {     ....     mServiceClient = new ServiceClient("EndPointTCP"); }   Should I create the client as a member of class and close the client along with exit of my application or Should I create a new client whenever its required in a method and close there itself.

When working with WCF services, is it better to create a new instance of the service every time you use it?  Or is it better to create one and re-use it?  Why is either approach better?  Is it the same for asynchronous proxies?


This may be a stupid question but I just want clarification about the use of the name of this rule. Well, most of the time what I see is L'Hospital's Rule, like in Baby Rudin and many other places. Occasionally, though, I do see what seems to be the "more correct" form L'Hôpital's Rule (like in Wikipedia). I believe the latter is the correct version, because the rule was indeed named after Guillaume de l'Hôpital. (see the ).   But why is the former version so commonly used (much more than the latter I think)?  The only reason I can imagine is the popularity of the English language. However, though hôpital does mean hospital in English, isn't it totally ridiculous to translate Règle de L'Hôpital into L'Hospital's Rule (just because the corresponding English word hospital happens to make sense)? What's more, how are we supposed to pronounce L'Hospital? In an English way or in a French way? In the first place, I think it is confusing to combine a French article with an English word, and in the second, it is even more confusing to use l' in place of le/la since in English the h in hospital isn't even mute. Anyway L'Hospital makes little sense to me..

I know this is not strictly a mathematical question, and I considered putting it on Linguistics SE, but I decided that seeing as this is most probably a mathematical history question, it would be better placed here on math SE.  My question is:     Why is "L'Hôpital's rule" often referred to as "L'Hospital's Rule" in english mathematical literature?   I am aware that the translation from French to English of "L'Hôpital" is "The Hospital", but I haven't seen any cases of other french names which correspond to proper nouns being translated into english, so why the special case here?  Again, sorry if this is completely the wrong place to put this question, and moderators feel free to migrate this question to a more appropriate SE board if one exists, but as I said, I believe this to be the most appropriate board.


I have a Samsung galaxy s5. Its screen has gotten smashed and now it displays nothing (black). I can turn on the phone, and also I can enter recovery mode (by pressing home+power+volume up). I have ADB installed on my laptop. But ADB can not access my phone and it shows it is unauthorized after typing adb devices, because it needs debugging mode to be enabled on the phone and I can not do that because the screen is smashed and black. I have read that after entering recovery mode in your phone you can access it with ADB without USB debugging being enabled. So I entered recovery mode in my S5 then I connected it to my laptop, in my laptop I typed adb devices but nothing was shown. Does somebody know how to do it? Is there any better solution?

My Galaxy S7 Edge has a broken screen (totally black, and doesn't respond to touch). However, the phone does turn on and is recognized by Kies 3 and SmartSwitch. I am also able to unlock the phone via thumbprint (sometimes), or via OTG USB keyboard input (always).  The problem is that the USB connection mode is PTP, and I can't see the screen to change it to MTP so that SmartSwitch can retrieve data from the device.  I don't have USB debugging enabled on the device, so I can't change the settings that way.  And since the S6, there's no video output, so I can't buy an MHL+OTG adapter to view the output on a TV and change the settings via mouse.   I've tried booting into recovery mode by holding volume down + power + main button for 30 seconds, but nothing seems to happen. Even if I get into recovery mode, I'm not sure if I can enable ADB, and if that setting would persist after a restart.  I've also called Samsung support, which was useless.  Are there any options for me to either enable ADB, change the USB connection mode, or send video output to another display?


In this sentence, should there be two apostrophes to denote discrete possession, or should there be an apostrophe just after the second subject to denote joint possession?  He said he didn't know anything about John and Jenna's deaths.  Or should it be this:  He said he didn't know anything about the deaths of John and Jenna.

Which option is grammatical?        There will be readings from Nikki Giovanni’s and Alice Walker’s writings.   There will be readings from Nikki Giovanni and Alice Walker's writings.      Saying it out loud the latter sounds right, but looking at it the former looks better.


Let A $\subset$ S, B $\subset$ S prove the following:  A $\subset$ B if and only if A $\cup$ B = B  I don't know how to prove this.....

I am trying to define a proof for  $A \cup B = B$ if and only if $A \subset B$  I started with:  $$A \cup B$$ $$x \in A \lor x \in B$$   but I am unsure on how to continue.


I have at least 75 rep. I don't see any link underneath the comments to start a bounty:

The first time I started a bounty I was able to choose 50, but every bounty since then the minimum is 100.  I still see other bounties of only 50.  Any idea of why I don't have the 50 option any more?  (This is across Stack Overflow and Programmers, at least.)  This is the latest answer I considered placing a bounty on    That particular question does have an answer from me.


I have a list of Dictionaries. Say   [{'name':'Homer', 'age':39, 'desg':'A'}, {'name':'Bart', 'age':10, 'desg':'A'}, {'name':'Lucy', 'age':27, 'desg':'C'}, {'name':'John', 'age':18, 'desg':'B'}, {'name':'Aryan', 'age':20, 'desg':'C'}]   I want to sort this list with desg in order of A,C,B.  I can sort it in A,B,C by sorted(list, lambda x: x['desg']) and reverse by using reverse=True flag, but unable to sort it in the above mentioned pattern.

I have a list of dictionaries and want each item to be sorted by a specific value. Take into consideration the list: [{'name':'Homer', 'age':39}, {'name':'Bart', 'age':10}]  When sorted by name, it should become: [{'name':'Bart', 'age':10}, {'name':'Homer', 'age':39}]


Finding value of $\displaystyle \frac{e^n\cdot n!}{n^n\sqrt{n}}$   Try: Using Stirling Approximation result $$n!\approx\bigg(\frac{n}{e}\bigg)^n\sqrt{2\pi n}$$  So $$\lim_{n\rightarrow \infty }\frac{e^n\cdot n!}{n^n\sqrt{n}}=\sqrt{2\pi}$$  Could anyone explain me How can i prove that result, Thanks

I was searching for the reason why Stirling's Approximation holds true. I found the website  which apparently shows why this is the case. Does this part of the equation make sense in the proof? If so why?  $$\int_{1}^{n}\ln(x)dx\approx\sum_{k=1}^{n}\ln(k)$$


when i render at the end of rendering everything becomes black

A scene I made is not rendering, at all. This grey screen stays the same and nothing changes.  Here are my settings:  [


Say if I have about 25 tabs open in my browser. Is there a way I could:   a) save all those URLs to a file and  b) Start a browser instance to load all of these URLs/   Browsers: Firefox/chrome (latest versions as of today).   If there's a browser that can do this, please do point that out as well

If I have a Firefox window open that contains 10 tabs, is there a way in Firefox or by a plug-in to get the URLs of those 10 tabs as a text file or some other format?  Right now if I want to do this I need to copy the URL of tab A, paste it somewhere, move to tab B, and repeat.  I could also bookmark all the tabs into a folder and export that, but that seems like such a hassle.  If there is no such method, could someone point me to some documents that describe the basics of writing a Firefox plug-in.  I am willing to write this myself if there is no "standard" way.


StackOverflow engine treats backslash character \ as an escape symbol for string literals. But backslash is NOT an escape symbol in SQL. So, simple statement select '\' from dual produces incorrect syntax highlighting.    Please fix the problem.

I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange?


I am looking to know about a package and what version is it across various distributions. I thought distrowatch might be the answer, but I found it tracks only 224 packages at the most. See . Does anybody know of any site/service which I could use for the same?  It would be nice if the site has curl support on the lines of curl wttr.in/pune, not really a deal-breaker but would be nice if there is.

From the search results I was able to get so far my question seems unlikely, although I don't know why ;-)  I'm writing an installation guide for a program and need a “compatibility matrix” for several packages on the different distributions. So what I need is the information in which distributions and releases a given package X is available, optionally together with the version.  Of course each distribution has a package index like  from where I can get the information for this distribution. But is there an index or a search engine anywhere that can give me this information for many (all?) distributions?


Recently I watched Star Wars Episode 4 and 5 and I noticed that on Darth Vader's ships (the Death Star, the Executor) and other Empire ships there are only human species as crew.   There are no aliens or other species on board, other than the brief scene with the bounty hunters.  Is there any special reason behind this?

Throughout the , we exclusively see human Empire officers, while the rebels’ staff seems to be composed from a large range of species. While a non-human rebel officer is only shown in the  (specifically ), I don't remember any non-human Empire officer. There is the notable exception of , but if I remember from the  (I read those about 15 years ago), it was stated that this was something unusual. There is also , who was not human, but it was before the Emperor's rise to power. Although "racist" is probably not the correct word, as it's the human versus non-humans species, was the Empire, and so the Emperor, racist?


if you are see this question again, it means i am posting this again because nobady gave a replay to it I need help to mount an network folder between Ubuntu 20.04 focal fossa (Home network server for me but using normal Ubuntu desktop) and my windows 10 version 1903. I don't know how to configure samba. I also followed lots of YouTube tutorials but nothing worked for me. Is there is any way by which I can easily share a network folder between Windows (want to share my documents folder with Ubuntu) without complications?

I have a desktop (Ubuntu 13.04 & Win 7 Home Premium) and a Laptop (Ubuntu 12.04), both having WiFi adapters. I also have a WiFi router connected to internet which both my computers can access.  I want to share files between my desktop and my laptop using WiFi (similar to Homegroup on Windows 7 but without using Ethernet cables).  How do I set-up that?  I want to share files using both OSs, if anyone have have information about sharing files with any of the OS please answer!


I installed Ubuntu 14.04 last night on my Lenovo X200, Dual Core 2.4GHz 3GB RAM and 250GB HDD. Everything was working fine, and this morning when I powered it up to double check everything, it was all good.   I came into work and all booted up fine.   However, when I tried to login (password protected user); only user on the computer - It logged in fine but was stuck straight away, with the blank screen (the background of the login screen) and just my cursor. Nothing else.   I left it for a few minutes thinking it was just being a little slow, but to no avail nothing happened. I have tried a reboot and nothing happened.

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


I have an document using the article class using the fullpage package. The appendices take up the last 15 pages and contain pdf images using the graphicx package.  I want to change the margins of these pages so that the pdf images can take up as much space as possible; my top margin is rather large for the main body of the text and is not suitable for the appendices.  How can this be achieved?

I set my \textwidth and \textheight in the preamble and would like to change both for some pages. How can this be done? E.g., the following example for \textwidth appears to work for the page number, but not for the text:  \documentclass{article}  \textwidth=5cm \textheight=5cm \begin{document} A \hfill B \eject \textwidth=10cm A \hfill B \end{document}   Output (true to scale):


String[] prompts = {"Describe to me in a sentence why this is a cool program.",                      "Describe to me in a sentence how your day was.",                      "Describe to me in a sentence what programming means to you.",                      "Describe to me in a sentence why food is neccessary for humans."}; System.out.println(prompts);   I want to call a random string from the array how should I report it?

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


Can anyone relate an exact, foolproof method of steaming eggs, to yield hardcooked eggs? I'd appreciate whatever clear, concise instructions are available on the process, including what not to do.

I find I always have trouble scaling the amount of time the eggs should be boiled, cooled, etc. for different-sized batches of hard-boiled eggs.  I've heard a variety of "folk lore"-type rules for how it should be done, but what's really the right way?


I bought Minecraft for ps3 and two days later I had accidently broke my ps3 so Im buying another ps3 tomorrow, will I be able to still play it on my new ps3? Like redownload it from psn?

If I buy a game from PSN, will I be able to play it without Wi-Fi?


Just what the title asks. What are the applications of it?

I've just finished a Classical Mechanics course, and looking back on it some things are not quite clear. In the first half we covered the Lagrangian formalism, which I thought was pretty cool. I specially appreciated the freedom you have when choosing coordinates, and the fact that you can basically ignore constraint forces. Of course, most simple situations you can solve using good old $F=ma$, but for more complicated stuff the whole formalism comes in pretty handy.  Then in the second half we switched to Hamiltonian mechanics, and that's where I began to lose sight of why we were doing things the way we were. I don't have any problem understanding the Hamiltonian, or Hamilton's equations, or the Hamilton-Jacobi equation, or what have you. My issue is that I don't understand why would someone bother developing all this to do the same things you did before but in a different way. In fact, in most cases you need to start with a Lagrangian and get the momenta from $p = \frac{\partial L}{\partial \dot{q}}$, and the Hamiltonian from $H = \sum \dot{q_i}p_i - L$. But if you already have the Lagrangian, why not just solve the Euler-Lagrange equations?  I guess maybe there are interesting uses of the Hamiltion formalism and we just didn't do a whole lot of examples (it was the harmonic oscillator the whole way, pretty much). I've also heard that it allows a somewhat smooth transition into quantum mechanics. We did work out a way to get Schrödinger's equation doing stuff with the action. But still something's not clicking.  My questions are the following: Why do people use the Hamiltonian formalism? Is it better for theoretical work? Are there problems that are more easily solved using Hamilton's mechanics instead of Lagrange's? What are some examples of that?


Math Stack Exchange was much better before the top bar was made a floating header, always in the way of reading the site especially when scrolling up and down.  Is there a way to remove this remedial nuisance; the information the banner holds is not needed so often that it has to always be on the screen.

Following a global preference for , as of now, the preferences for enabling keyboard shortcuts and disabling the fixed topbar are network-wide* as well.  If you had either checked off on any site in the network, that setting has been preserved and applied to the whole network for your account already. Future changes will also apply to all* Q&A sites.  Find them in their usual spot as previously on the  pages.    * With the exception of , which will support the fixed topbar after the .


I have a Dell XPS 13 9360 laptop (late 2017 model) (Core i7 8550U, 16GB Ram and 1 TB SSD, BIOS Version 2.1.0, BIOS Mode UEFI). I wish to dual boot it with Ubuntu 16.04.   My hard drive as shown in the Windows File explorer is a 1TB chunk(940 GB to be precise) and I wish to re-partition the drive into multiple drives (with appropriate spaces allocated to them).   What are the exact (working) steps to be followed to  have a successful dual boot system with the above configuration(including driver/software updates and bug fixes)?   I know similar questions have been asked, but they are for different processors and some steps are not very clear (I am a novice and clear working steps  will be much appreciated) and they seem to vary.  Some helpful answers which I referred to before asking the question:   The user has some problems with windows shutting unexpectedly and going blue screen and the steps are for an i5 processor released in 2016.  Answer for Ubuntu 15.04 and not 16.04 (not sure how the steps would vary). The answer was difficult to follow as it had many links. Efforts much appreciated.  No answers.

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


I am using workbench module to show the entry made by some particular user with some role when user is logged in he redirect to my workbench page and  as the user log out it redirect to home page and after pressing back button it redirects to my workbench page

I have a requirement in which the user should not be able to see the books in the site unless he is logged in. And the user is not able to see the content.  The problem is when a user logs in, views a book and its child pages, and logs out; he is still able to view the pages he opened before when he was logged in, by pressing the back button of the browser. He is not able to make any changes though.  This may create problems when users visit the site from a public computer, log off, and go away without closing the browser window.  Is there a module or any setting change I can use to solve this issue?


The original problem was for the special case of $n=5$ and $k=3$. But I'm curious about the general solution. Let $X_i$ be the Bernoulli variable at $i$th toss and $X = X_1 \bigotimes X_2 \bigotimes ... \bigotimes X_n$. I'm considering the set $\{{A_i}\}_{i=1}^{m}$ with $m = n-k+1$ and $A_j=\{{x\in X : x_j=x_{j+1}=...=x_{j+k-1}}=1\}$. And I am thinking about solution how to solve for $|\bigcup_{i\in I\subseteq [m]}A_i|$ and use that to compute for probability. But it seems quite tedious; is there any elegant solution?

I know if you flip a coin $7$ times, the odds of getting $7$ heads in a row is $1$ in $2^7$ or $1$ in $128$.  But if you flip a coin $40$ times, what are the odds of getting $7$ heads in a row in those $40$ tries? I only want to know the first time there are $7$ heads in a row and not count duplicates. Thanks.


Einstein predicted that gravity bends spacetime such that travelling through time is possible; but only forward in time. According to General Relativity we can travel in the future, but not backwards in past. Closed timelike curves are possible, i.e. we can travel in future and than come back to our origin.  Can we also travel backwards in time according to some physical theory? I have heard that antiparticles move backwards and not forward in time. Also I know about Tachyons (they have imaginary mass and travel backwards in time), but I think Tachyons are still not observed in experiments.    My question: Is there a physical theory that predicts also that particles can travel backwards in time? Or are such things still impossible due to natural laws?  Every answer would be greatly appreciated!

I read somewhere that according to relativity, it is possible - involving black holes and other stuff - to jump into the past. Is it possible for anything to go back in time either continuously or by jumping?


I've got a profile loaded on to my 5D for use when we're shooting video for our clients. The profile gives us a very flat, almost desaturated image that we can dress up in post. When I shoot RAW photos with the profile and import them into LR4, the image looks like it should with the profile applied for about 3 seconds then it pops to a higher contrast image that's too saturated.  Is there a way to get LR4 to respect the profile I've shot the image with? I would prefer to have the flatter contest profile I used when shooting. I've tried switching to a flatter profile in LR, but it's still not what I'm looking for.  Thanks in advance for any help.

I'm a novice shooting in RAW and find that half the time my camera JPEG images come out better than my Lightroom tweaks to RAW files.  So to give myself a better start I'd like to apply the JPEG settings that are applied automatically by the camera to my RAW files in lightroom so that initially my RAW files look exactly like the JPEG files.   How can I do this?


So I know from memory that a for loop that looks like:    for( int i = 0; i > N; i++)    Will have an O(N) and for every inner loop added you just multiply it by N -- assuming it's the same for loop with just a different initial. My question is,  for a loop like    for( int i = 0; i < N; i *= 2)     for( int j = 0; j < N; j++)    I know from memory that the first loop would be lnN and the second would be N so O(NlnN) is the answer. But I don't want to memorize these big O's, I want to know how to actually compute them by hand, iow how to trace it with a given N. Could someone please show me some process on how to do this? I've looked at slideshows from college lectures, but they usually do basic loops. Thanks for the help and guidance!    I can trace it and find the iterations, but when it comes to actually getting Big O is where I crash

Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales.   But I'm curious, how do you calculate or approximate the complexity of your algorithms?


I am reading from a txt file the names, price and quantity of 3 peoples sales. (Emma, 3, 13) So I need to multiply the quantity and price to a variable. However, the names appear more than once. I am trying to separate the values based on the names, multiply and then have a variable being incremented by the 'total value' and print the total values at the end with the name. I think my problem is the values from my if statements are local and so it isn't coming outside of the function and I'm having trouble printing it. Sorry if this seems like a stupid question but I'm really not sure how to fix it! Any help would be amazing, thank you! This is my code: public static void main(String[] args)  throws FileNotFoundException {     String name;     int value = 0;     int quantity = 0;     int price = 0;     int eValue = 0;     int sValue = 0;     int oValue = 0;          File file = new File(".\\src\\oosd2\\pay.txt");     Scanner sc = new Scanner(file);     System.out.println("Income");     while (sc.hasNext()){         String[] split = sc.nextLine().split(" ");         name = split[0];         if (name == "Emma"){             price = Integer.parseInt(split[1]);             quantity = Integer.parseInt(split[2]);             value = price * quantity;             eValue += value;         }         if (name == "Sofia"){             price = Integer.parseInt(split[1]);             quantity = Integer.parseInt(split[2]);             value = price * quantity;             sValue += value;         }                  if (name == "Olivia"){         price = Integer.parseInt(split[1]);         quantity = Integer.parseInt(split[2]);         value = price * quantity;         oValue += value;         }     }     System.out.println("Emma: $" + eValue);     System.out.println("Sofia: $" + sValue);     System.out.println("Olivia: $" + oValue); }

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


I'm trying to install drush on my local macbook. Drupal runs fine but when I try to run drush from cli:  jackBook:drupal-7 jack$ drush status  I'm getting the following response in the cli:
Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000] [2002] Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/Applications/MAMP/tmp/mysql/mysql.sock&amp;#039; (2) in drupal_is_denied() (line 1847 of /Users/jack/Sites/drupal-7/includes/bootstrap.inc).

Additional

PDOException: SQLSTATE[HY000] [2002] Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/Applications/MAMP/tmp/mysql/mysql.sock&amp;#039; (2) in system_list() (line 165 of /Users/jack/Sites/drupal-7/includes/module.inc).

 Drush command terminated abnormally due to an unrecoverable error.   what did I do wrong?  I followed these steps:     Download drush.tar.gz to your desktop (or wherever) Jump across to the Terminal cd ~/Desktop Extract it with tar -zxf drush.tar.gz Move it to /usr/local/lib sudo mv drush /usr/local/lib/ Make it executable sudo chmod u+x /usr/local/lib/drush/drush Then stick it in /usr/bin/ so that you can run it from anywhere sudo ln -s /usr/local/lib/drush/drush /usr/bin/drush   And added alias drush='/path/to/drush/drush' to my .profile  phpinfo file:  jackBook:php jack$ php -i    as you can see pdo is enabled for mysql / mysqllite (if that is somewhat related and I'm not wrong )

I installed Drush for the first time (so it may be a configuration error) and I'm trying to update to the latest core version of Drupal.  Drush is giving me this error - I'm on an OSX box.  dev5:clientnamedirectory my.name$ drush pm-update projects drupal-7.25
Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000] [2002] No such file or directory in drupal_get_installed_schema_version() (line 155 of /Users/my.name/Sites/proface/includes/install.inc).

Additional

PDOException: SQLSTATE[HY000] [2002] No such file or directory in system_list() (line 165 of /Users/my.name/Sites/clientnamedirectory/includes/module.inc).

  Drush command terminated abnormally due to an unrecoverable error.


I'm somewhat new to C++, and I'm trying to write a function that takes two arguments: a string, and a vector of an unknown type.  Right now in my cpp file I have:  template <typename T> int Database::dbExecSql(std::string sql, std::vector<T> values) {     ... }    and inside my header file:  template <typename T> int dbExecSql(std::string sql, std::vector<T> values)  I want to write this execute function like this as the vector I am handling will either be of type string, or of type int, and instead of writing two seperate functions this seems like a good way to do it.  Inside my unit test I am attempting to pass a string and a vector of type int, however it keeps giving me the error and I am not sure how to get around this:  src/unitTest/databaseTest.cpp:140: undefined reference to `int Database::dbExecSql<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >)'    My Boost Unit Test:  BOOST_AUTO_TEST_CASE(insertMultipleExec){     BOOST_TEST_MESSAGE("Execute SQL and Insert MULTIPLE INTO Table Inside DB");      int rc = -1;     std::string tableName = "ENCODER3";     std::vector<std::string> testTableDataType = {"INTEGER", "BIGINT", "INTEGER", "BIGINT", "INTEGER", "INTEGER", "INTEGER", "INTEGER", "INTEGER"};     static std::vector<std::string> insertColumns = {"ID", "RECORDTIME", "TYPE", "TIMESTAMP", "ENCODER1", "ENCODER2", "ENCODER3", "ENCODER4", "ENCODER5"};     std::vector<int> insertValues = {1,2,3,4,5,6,7,8,9};      Database database;     database.dbCreate();     database.dbExecSql(database.dbCreateTable(tableName, insertColumns, testTableDataType),testTableDataType);      for(int i = 0; i < SQL_MAX_BUFFER_SIZE; i++){        rc = database.dbExecSql(database.dbTableInsert(tableName, insertColumns, insertValues), insertValues);         if (i==10) BOOST_CHECK(rc == 0);     } }   All my database.dbTableInsert(...) function does is take the table name, table value types, and values and creates an SQL query out of them.  Any help will be appreciated.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


package javagain;  public class Gender_interest {     public static void main(String args[]) {          if((args[0] == "Female") && (Integer.parseInt(args[1])>=1) && (Integer.parseInt(args[1])<=58)) {             System.out.println("Percentge of Interest is 8.2%");         }          else if((args[0] == "Male") && (Integer.parseInt(args[1])>=1) && (Integer.parseInt(args[1])<=58)) {             System.out.println("Percentge of Interest is 8.4%");         }          else if((args[0] == "Female") && (Integer.parseInt(args[1])>=59) && (Integer.parseInt(args[1])<=100)) {             System.out.println("Percentge of Interest is 9.2%");         }          else if((args[0] == "Male") && (Integer.parseInt(args[1])>=59) && (Integer.parseInt(args[1])<=100)) {             System.out.println("Percentge of Interest is 10.5%");         }          else {             System.out.println("Enter correct values.");          }     } }


I am doing some crud operations on db, And there is a situation that i cant understand how it works. Im selecting records by a repository which extends JpaRepository Sample code is below. DBEntity currentrecord = entityrepository.findById("2"); currentrecord.setName("DEMO"); DBEntity test=entityrepository.findById("2");         Test object 'name' has been changed as DEMO without flushing previous changes,Why second findById query is not taking values from database? My entity class and repository interface are below @Entity public class DBEntity implements Serializable {     @Basic     @Column(name = "name", nullable = false, updatable = true)     @NotEmpty(message = " name is mandatory")     @Size(max = 50, message = " name the max value should be 50")     private String name;          public String getName() {         return name;     }      public void setName(String name) {         this.name = name;     } }   @Repository public interface EntityRepository extends JpaRepository<DBEntity, String> {         @Query(value="SELECT t FROM DBEntity t where and t.id = ? and t.value = 1")     Optional<DBEntity> findById(String id);      }

I want to compare the current value of an in-memory Hibernate entity with the value in the database:  HibernateSession sess = HibernateSessionFactory.getSession(); MyEntity newEntity = (MyEntity)sess.load(MyEntity.class, id); newEntity.setProperty("new value"); MyEntity oldEntity = (MyEntity)sess.load(MyEntity.class, id); // CODEBLOCK#1 evaluate differences between newEntity and oldEntity sess.update(newEntity);       In CODEBLOCK#1 I get that newEntity.getProperty()="new value" AND oldEntity.getProperty()="new value" (while I expected oldEntity.getProperty()="old value", of course). In fact the two objects are exactly the same in memory.  I messed around with HibernateSessionFactory.getSession().evict(newEntity) and attempted to set oldEntity=null to get rid of it (I need it only for the comparison):  HibernateSession sess = HibernateSessionFactory.getSession(); MyEntity newEntity = (MyEntity)sess.load(MyEntity.class, id); newEntity.setProperty("new value"); HibernateSessionFactory.getSession().evict(newEntity); MyEntity oldEntity = (MyEntity)sess.load(MyEntity.class, id); // CODEBLOCK#1 evaluate differences between newEntity and oldEntity oldEntity = null; sess.update(newEntity);   and now the two entities are distinct, but of course I get the dreaded org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session.  Any idea?  EDIT: I tried the double session strategy; I modified my HibernateSessionFactory to implement a map of session and then...  Session session1 = HibernateSessionFactory.getSession(SessionKeys.DEFAULT); Session session2 = HibernateSessionFactory.getSession(SessionKeys.ALTERNATE); Entity newEntity = (Entity)entity; newEntity.setNote("edited note"); Entity oldEntity = (Entity)session1.load(Entity.class, id);  System.out.println("NEW:" + newEntity.getNote()); System.out.println("OLD: " + oldEntity.getNote()); // HANGS HERE!!!  HibernateSessionFactory.closeSession(SessionKeys.ALTERNATE);   My unit test hangs while attempting to print the oldEntity note... :-(


I would like to understand how could I pull out a list of users that have been added with certain privileges to a Unix system over a certain period of time.  Now, I understand one way to go about would be to check for creation of home directories of the specific users, but I understand users could be created with specific already existing directories as their home directory. In which case we may not be able to pull the exact time of creation of the users to the system.

For compliance purposes there is the need to fetch information regarding local (user and non-user) accounts creation date on UNIX machines.  Is there any way (even if it's not the most reliable or accurate method) for collecting that kind of information?  For instance, as an alternative, I went searching for home directory creation date (for user accounts), but I discovered that for POSIX-compliant systems timestamps for file creation are not available.


I want to know if anyone has a code to count +1 starting at a certain number for Field Calc. ArcGIS. (I.e. 04312, 04313) It also must keep the 0 in front.  rec=0 def autoIncrement():  global rec  pStart = 040150117669  pInterval = 1  if (rec == 0):    rec = pStart   else:    rec = rec + pInterval   return rec      str(autoIncrement( )).zfill(12)   parsing error syntaxerror:invalid token (line 4)

I am in ArcMap and I want to sort the records based on a field and then do a Calculate Field with an auto-incrementing value with the sort in-place. Any ideas?    It looks like I could get an update cursor on the feature class then do an auto-increment, but I would still like to see if there is a way to do this in the Field Calculator in ArcMap.


I am trying to learn Java and want it so you input your name, and if name input matches your name it will print Hello [your name], I am doing this using an if statement and make if so if the input is equal to a string equal to my name it will print hello plus the input. However it doesn't... the else statement is what confuses me because I got it to print the two value to see if they where equal and they both where... help would be appreciated thanks.  package AgeTester; import javax.swing.JFrame; import javax.swing.JOptionPane;  public class HelpSystem {  public static void main(String args[]) {   String inp = "Jono";   JFrame frame = new JFrame("Input Dialogue");    String name = JOptionPane.showInputDialog(frame, "What is your name?");    if (inp == name) {    System.out.printf("Hello", name);   } else {    System.out.println(inp + name);   }   System.exit(0);  } }


In Windows there is a category of apps called "Portable Apps".  What makes these apps categorized as a "Portable App"?   Is it the fact that you don't need to install them to run them?

I've recently been trying to 'install' stuff a lot less on my Windows machine (I hate installers - I need to know where programs put stuff...), choosing to use portable or standalone versions of applications instead.  I put them all in a 'Programs' dir on a drive separate from my Windows partition, so whenever I reinstall, I have all my applications available with minimal effort and on the plus side, I get a nice clean setup.  Applications like Office and Creative Suite still require me to go through a horribly long installation process where a thousand random libraries and tools are thrown across my system.  Why do Windows apps still need installing? Why can't we just drag Photoshop to a folder à la OSX and just have it work? Does anyone else focus on portable apps, or am I just being OCD about the whole thing?


Which form of wood is actually the most efficient in furnaces? I would appreciate if there is a descending list of efficiency.  This includes any thing that can be made from wood, including charcoal though if it requires another unit of fuel to make it, do subtract from its efficiency.   I am aware of the similar question that is the fuel ranking. However, this question is specifically asking for a least-input greatest-output analysis for wood-only materials, to minimize the resource cost of getting efficient furnace fuel.  Its also to resolve a common argument of sticks vs planks and sticks vs crafted alternative.  So as mentioned by Schism, this is a input vs output question.

What's the order of "best fuels"?  Example: Coal cooks less than lava and blaze rods, wood cooks less than coal, etc.  What's the order of fuels based on their 'cooking quantity'?


Say I play a Cleric 14/Paladin 6. I have the spell slots of a lvl 17 spellcaster, but can I cast the 9th level spells of the Cleric, or am I limited to 7th? Would this also work with other classes like Sorcerer or Wizard?

The "Your Spellbook" sidebar for the wizard includes the following line:  Copying a Spell into the Book. When you find a wizard spell of 1st level or higher, you can add it to your spellbook if it is of a level for which you have spell slots and if you can spare the time to decipher and copy it.  Does this mean that a Wizard 1/Cleric 19 can copy any wizard spell they find into their spellbook? Is there anything preventing them from casting these spells?


Right now, I have dual boot with Windows 7 and elementary OS(Linux), but my internet connection isn't working on Windows. I used to play Portal 2 a lot on Windows, and now I want to play it on Linux too, as it does have a version for Linux. But, when I ran the game, it didn't load my saved game, but it should, since Portal 2 supports Steam cloud.     Do I have to open Portal on Windows so it can sync? Shouldn't it be stored on the cloud? How do I force it to sync? After I closed Portal on Linux, it was written "Syncing" near Portal 2 on my games library, but nothing changed.

I've been playing a couple of games on my Surface Pro 2 while travelling. When I launched a game on my desktop after I got home, I noticed my savegames did not sync.  While I realize Steam couldn't sync while I didn't have access to the internet, I did turn my Surface on after I got back home. Steam simply didn't bother syncing then, so I was forced to launch each game I had played so Steam would sync.  Having to launch every game while an internet connection is available is quite inconvenient, especially when some games have unskippable intro videos. Is there an option where I can tell Steam to sync all savegames without having to launch a game?


I am creating a gridcell class which is basically a multi array of cells. I want this gridcell to have any number of dimensions. This means that in the declaration of the boost::multiarray variable I cannot specify the second argument of the template. Concretely, my code looks as follows:  #include "cell.h" #include <iostream> #include <vector> #include <boost/multi_array.hpp>  class GridCell { public:      GridCell(); // Default constructor not used.     GridCell(const std::vector<int> dims, const float leafsize);     virtual ~GridCell();      friend std::ostream& operator << (std::ostream & os, const GridCell & c);  private:     std::vector<int> dims_; // Vector containing the size of each dimension.     float leafsize_; // It is assumed that the cells in the grid are cubic.     boost::multi_array<Cell,ndims> * grid; };   Concretely, boost::multi_array * grid; The number of dimensions I want it to be specified in the Gridcell class constructor.  Any advice or alternative?  Thank you very much!

What is the accepted/most commonly used way to manipulate dynamic (with all dimensions not known until runtime) multi-dimensional arrays in C and/or C++.  I'm trying to find the cleanest way to accomplish what this Java code does:  public static void main(String[] args){  Scanner sc=new Scanner(System.in);  int rows=sc.nextInt();  int cols=sc.nextInt();  int[][] data=new int[rows][cols];  manipulate(data); }  public static void manipulate(int[][] data){    for(int i=0;i<data.length;i++)    for(int j=0;j<data[0].length.j++){          System.out.print(data[i][j]);           }     }   (reads from std_in just to clarify that dimensions aren't known until runtime).  Edit:I noticed that this question is pretty popular even though it's pretty old.  I don't actually agree with the top voted answer.   I think the best choice for C is to use a single-dimensional array as Guge said below "You can alloc rowscolssizeof(int) and access it by table[row*cols+col].".  There is a number of choices with C++, if you really like boost or stl then the answers below might be preferable, but the simplest and probably fastest choice is to use a single dimensional array as in C.  Another viable choice in C and C++ if you want the [][] syntax is lillq's answer down at the bottom is manually building the array with lots of malloc's.


The question is quite similar to  and I was trying to rely on the top answer, but still am a bit confused, so any explanation and help will be much appreciated.  Assume I have a bunch of ciphertexts with the same key. I need to decipher one of them. At the moment I understand that I need to XOR the desired one with each of the rest, but I am confused whether I should do it one by one or XOR it will all at once?  Where do I go from there checking whether there's been a space or no, surely all of them will have spaces in different places? How do I recover the symbols then? Thank you so much.

My question might appear the same as the question , but actually I did read all the answers and none of them helped me with the details I need.  I am new to cryptography and my problem is with two time pad attacks on OTP. The problem I had in my course was that I have 10 ciphertexts encrypted with the same key $K$. I am then given another ciphertext that I should decrypt.  I know that XOR-ing two ciphers gives me the XOR of their original messages.  My question is what is the correct thing to do after that?  I tried to take 3 ciphertexts $C_1, C_2$ and $C_3$.  Then get $S_1 = C_1 \oplus C_2  \oplus $' ', also get $S_2 = C_1 \oplus C_3 \oplus$ ' '.  After that I compared all corresponding characters in $S_1$ and $S_2$,  and if $S_1[i] = S_2[i]$ then I calculate $S_1[i] \oplus C_2[i]$ to get $K[i]$.  I tried this on paper before coding and it worked, but I might be missing something.  Is this the right approach? Why does it work?


This is an exercise from Tom Leinster's Basic Category Theory. It asks:     1) What are the subcategories of an ordered set? Which are full?      2) What are the subcategories of a group? Which are full?   I'm self studying and I couldn't discuss this with someone, so I'm curious for what the solution is.  For the second one I think, if you have a one object group category, no subcategories are full, as they all consist of the group object with fewer morphisms. Also all of them are monoids, but only the ones that contain the inverse of every morphism remain groups, with less elements than the original.  Also a related question:      Is there a functor $Z:\mathbf{Grp}  \to \mathbf {Grp}$ so that $Z(G)$ is the center of the group $G$?   (I'm guessing there is one, and also that the center of $G$ is a full subcategory of $G$, and also an Abelian group.)

The category $\mathbf{Set}$ contains as its objects all small sets and arrows all functions between them.  A set is "small" if it belongs to a larger set $U$, the universe.    Let $\mathbf{Grp}$ be the category of small groups and morphisms between them, and $\mathbf{Abs}$ be the category of small abelian groups and its morphisms.    I don't see what it means to say there is no functor $f: \mathbf{Grp} \to \mathbf{Abs}$ that sends each group to its center, when $U$ isn't even specified.  Can anybody explain?


I'm thinking of rooting my android phone (HTC Desire 300) and was wondering if doing so would affect the internet security with stuff like online banking. Is it still secure to do my banking on a phone that has been rooted? Does it make any of my other online passwords or details vulnerable or unsecured?

I see lots of tutorials telling me how to root my phone (Motorola Droid), but none of them mention any potential "side effects."  Aside from a few relatively minor issues that seem to require rooting to fix, I'm basically happy with the phone and therefore a little leery of messing with a device that cost me a lot of money and is only a few months old.  Assuming that I'm just talking about rooting, and none of the typical post-root actions (like installing a custom ROM), am I taking any risks by choosing to root?   Does it have the potential to brick the device? Will it void my warranty? Will I stop getting updates? Will the cops show up at my front door the next day? (Yes, I'm being facetious.) Anything else I should be aware of?   (See also: )


I stumbled across  today which said:     It’s bad practice to delete images from your SD cards since it can   lead to corrupted data. Instead, you want to format (or re-format)   your cards between shoots or once they’re full.   Really? Is that true?  (In fairness I normally format my card as it's quicker, easier and I'm guaranteed to recover all possible space. I would never have considered that there is a chance of corrupted data.)

What is the most correct way to delete all photos from a camera after they all have been copied to a computer:    to format memory card using the camera menu,  or simply Select All and Delete photo files from the card using a computer as if it would be just a usb flash drive,  or maybe some other way?   Or no difference at all?


Guys here is my simple code I don't know why I am getting exception  I just want to set patient age if it is less than 122.   Please help me to figure the problem out.  Patient.java  public class Patient {         int Age;         String Gender;          public int getAge() {             return Age;         }         public void setAge(int age) {             Age = age;         }         public String getGender() {             return Gender;         }         public void setGender(String gender) {             Gender = gender;         }          public Validation v;           public void patient(int Age, String Gender) {              if(v.age(Age, Gender)) {                 this.Age = Age;                 this.Gender = Gender;                        };         }        }   Validation.java  public class Validation {   public boolean age(int Age, String Gender) {     // TODO Auto-generated method stub      if(Age>122) {         System.out.println("age is high");         return false;     }     else     {          return true;     } } }   Main.java  public class Main { public static void main(String[] args) {         // TODO Auto-generated method stub  Patient p = new Patient(); p.patient(23, "Male"); System.out.println(+ p.Age + p.Gender); } }   error  Exception in thread "main" java.lang.NullPointerException at Patient.patient(Patient.java:24) at Main.main(Main.java:5)   at Patient.patient(Patient.java:24) : if(v.age(Age, Gender)) at Main.main(Main.java:5) : p.patient(23, "Male");

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?


Its common misinterpretation of a 95% confidence interval to say that that 95% of the time the true value lies within that interval.  However, in Bayesian statistics, the 95% credible interval contains 95% of the probability  from the probability density function. And if I repeat the experiment many times, I'm wondering if I can learn something about my prior?  So say I do an experiment to measure a parameter 100 times and I know the true value for each experiment. Then I calculate the credible interval for each experiment. Should expect 95% of the time the credible interval contains the true value? And if its lower, say only 85% of the time the credible interval contains the true parameter, then perhaps the prior is strongly influencing the results and should be changed?

I'm a frequentist but have been exploring Bayesian techniques lately. One thing that bothers me is that I'm never completely sure that I've implemented them correctly. To be specific, I'm not talking about convergence, burn-in time, or autocorrelation. I'm talking about, 'did I code the formulas correctly?'.  What I do now is to jack up the sample size and watch for the posterior to hug the true parameter values (with simulated data). But that's completely ignoring the power of the prior and the great small sample properties that Bayesians love to talk about.   Frequentist techniques make testable predictions in the form of relative frequencies. But in the Bayesian context, we lose the relative frequency-based interpretation of probability. So how does one programmatically test a Bayesian method's software implementation?


$\newcommand{\Reals}{\mathbb{R}}$I have an equation of a line: $4x - 3y = 0$. Let $S : \Reals^2 \to \Reals^2$ be reflection through that line, and let $P : \Reals^2 \to \Reals^2$ be projection onto that line.  I want to find a vector that represents the reflection through that line and a vector that represents the projection onto that line. Are there any formulas for these?

Let $L$ be the line given by the equation $4x − 3y = 0$. Let $S : \mathbb{R}^2 \rightarrow \mathbb{R}^2$ be reflection through that line, and let $P : \mathbb{R}^2 \rightarrow \mathbb{R}^2$ be projection onto that line.  Determine, geometrically without doing any computations, whether there exist non-zero vectors $x$ such that: $$ a) \qquad S(x) = 1 · x $$ $$ b)\qquad P(x) = 1 · x $$ Can someone tell me how to solve this? Does anyone know what kind of arithmatic this is? I wanna look it up on google but I don't know what it's called. Looks a bit like eigenvectors to me but I'm not entirely sure...  All help is appreciated.


Not sure if my code is working, but the error I'm seeing is "'result' is declared but its value is never read.ts(6133)"  This is just an introductory exercise, so I'm open to suggestions/guidance on how the same thing can be accomplished. The way I've done it is three IF statements for the event type with nested IF statements for each temperature range.  let eventType = window.prompt("What type of event are you going to?"); let tempFahr = window.prompt("What is will the temperature be?");   if (eventType=='casual') { // casual event      if (tempFahr < 54) { // temp less than 54         let result = 'Since it is ' + tempFahr + ' and you are going to a ' + eventType + ' event, you should wear something comfy and a coat';     } else if (54 < tempFahr < 70) { // temp between 54 and 70         let result = 'Since it is ' + tempFahr + ' and you are going to a ' + eventType + ' event, you should wear something comfy and a jacket';     } else { // temp more than 70         let result = 'Since it is ' + tempFahr + ' and you are going to a ' + eventType + ' event, you should wear something comfy and no jacket';     } } else if (eventType=='semi-formal') { // semi-formal event     if (tempFahr .. (Etc.)...   ``````````````      {         let result = 'Since it is ' + tempFahr + ' and you are going to a ' + eventType + ' event, you should wear a suit and no jacket';     } }      console.log(result);

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I stopped to use Ubuntu a few years ago. If I Install the new version 18.04, will it be possible to leave Nautilus with address bar instead path bar? Does dconf still work for such tasks on new Ubuntu Bionic Beaver? Nautilus open terminal it's out of Ubuntu 18.04 , because was a good tool?

As most of you know, you can switch between the visual location entry, and the text based one in Nautilus, by hitting Ctrl+L.   When I tried to set this value permanently in gconf-editor, it doesn't exist. When I tried to do it via the terminal, this is the message that I receive:  No value to set for key: /apps/nautilus/preferences/always_use_location_entry  I can still switch between the two via the Ctrl+L, but I'm stumped about the fix.


I am trying to figure out how to not to exports the private functions when using functions in the objects.  For example, in modules.js I have the following:  const modelType1 = require('./Message/type1');  module.exports = {     Type1: modelType1 }   type1.js look like this:  const Message = {     publicFunction: function() {         return 'hello!';     },      privateFunction: function() {         return 'hello!';     } }  module.exports = Message;   How to not to export privateFunction?  When I tried to different approach without using an object which I have got it to work, for example:  const modelType2 = require('./Message/type2');  module.exports = {     Type2: modelType2 }   type2.js look like this:  function publicFunction() {     return "Hello" }  function privateFunction() {     return "Hello" }  module.exports = {     publicFunction }   Which is best practice to use type1.js or type2.js and what the difference between them two?

To make a JavaScript class with a public method I'd do something like:  function Restaurant() {}  Restaurant.prototype.buy_food = function(){    // something here }  Restaurant.prototype.use_restroom = function(){    // something here }   That way users of my class can:  var restaurant = new Restaurant(); restaurant.buy_food(); restaurant.use_restroom();   How do I create a private method that can be called by the buy_food and use_restroom methods but not externally by users of the class?  In other words, I want my method implementation to be able to do:  Restaurant.prototype.use_restroom = function() {    this.private_stuff(); }   But this shouldn't work:  var r = new Restaurant(); r.private_stuff();   How do I define private_stuff as a private method so both of these hold true?  I've read  a few times but it doesn't seem like "private" methods can be called by public methods and "privileged" methods can be called externally.


This question is in two parts.  Q1.  How does a mobile phone get an IP address over 3G? Like, would it get the same IP for a shortish period of time (Eg. 1 day, etc)? Because my phone is constantly going in and out of buildings and underground car parks, i'm jumping between cell hotspots/receiver towers, so would I be getting a new IP each and every time? I feel like this is back to the old modem days -> every time i 'ring in/jump onto the interwebs' I get allocated a new number.  Or does it have some mac address and the Telco's mobile phone DHCP server keeps reusing the last IP based on the mac, for a specific perioud of time (eg. TTL for an IP, like a normal DHCP which has an expiry setting for the allocated IP).  Q2.   If the previous answer is that mobile's keep getting different IP's, does this mess with google analytics and the unique visitor's value? So if i'm getting 5 IP's for a day on my mobile, would that mean i'm 5 unique visitor's for the website i'm tracking?

When my cellphone accesses a website via the tower and its GPRS gateway, NAT ensures that the sites receive a public IP. Would all phones using a single tower have the same IP?    If yes, then how can the mass of received HTTP data routed to the correct cellphone? And how can websites differentiate between cellphone visitors? Is there additional HTTP header data? If no, then how are these unique IPs assigned? Based on availability or location? Would each tower have a fixed set of IPs?


Surprisingly it seems no one asked this before.   Not long ago I asked a question on the site, and in a comment I was asked "what version of jQuery are you using?". The answer is obviously less than 15 characters. So I had to do something like this "I am using version 1.9.1" instead of just "1.9.1".  I see this a lot, so why not allow shorter comments?   I guess the idea is to force people to give more thorough comments and not just small quirks, but I think it reasonable to allow users with a ceratin amount of reputation to give shorter comments, because sometimes it just makes more sense and you don't really need 15 characters

I understand that there is an upper limit. But why do you have to type at least 15 characters to post a comment? It is easy to work around it anyway (like adding dots or other useless things).


I have a list which has always even item count.  I need an algorithm to find all two member combinations.  For instance if item count is 4, output will be;  Items:  {1, 2, 3, 4 }  ResulSet:  {12}, {34}  {13}, {24}  {14}, {23}  Order makes no difference, {12} covers {21}.  For item count 6, output will be;  Items:  {1, 2, 3, 4, 5, 6}  ResulSet:  12 34 56  12 35 46  12 36 45  13 24 56  13 25 46  13 26 45  14 23 56  14 25 36  14 26 35  15 23 46  15 24 36  15 26 34  16 23 45  16 24 35  16 25 34  Could you show me a way please?  Thank you.  Edit:  Question is really short to read, and if you take 1 minute to read question you can see it is not duplicate like most of people think (probably they are semi-illiterate)  Combination of {1, 2, 3, 4, 5, 6} is  123456 and as you see at top, this is not what I'm looking for. Read question if you want to help or just get off.  Have a nice day.

I want to write a function that takes an array of letters as an argument and a number of those letters to select.   Say you provide an array of 8 letters and want to select 3 letters from that. Then you should get:  8! / ((8 - 3)! * 3!) = 56   Arrays (or words) in return consisting of 3 letters each.


Let z1=x1+iy1 and z2=x2+iy2 be two complex numbers. The dot product of z1 and z2 is defined by z1,z2=x1x2+y1y2 For non zero z1 and z2   prove the following  $$<z1,z2> =|z1||z2|\cosθ ~~\hbox{where $0≤θ≤π$ is the angle between z1 and z2.}$$  $$⟨z1,z2⟩ = Re(z1¯¯¯z2)$$  $$⟨z1,z2⟩ = 12(z1¯¯¯z2+z1z2¯¯¯)$$ $$z1⊥z2⟺θ=π2$$

Let $z_1 = x_1 +iy_1$  and $z_2 = x_2 +iy_2$   be two complex numbers. The dot product of $z_1$ and $z_2$ is defined by $\langle z_1 , z_2 \rangle = x_1x_2+y_1y_2$ For non zero $z_1$ and $z_2$ prove the following  $ \langle z_1, z_2 \rangle = |z_1||z_2|\cos\theta$ (where $0 \le \theta \le \pi$ is the angel between $z_1$ and $z_2$.) $\langle z_1, z_2 \rangle$ = $Re(\overline{z_1}z_2)$ $\langle z_1, z_2 \rangle$ = $\frac{1}{2}(\overline{z_1}z_2 + z_1\overline{z_2})$ $z_1 ⊥ z_2 \iff \theta = \frac{\pi}{2}$


I took a backup of one database using expdp utility. Unfortunately, this database had been corrupted. I have another oracle server installed on another machine. I want to import available dump to this database. But this available database is in lower version 12.1.0.2.0. ORA-39001: invalid argument value ORA-39000: bad dump file specification ORA-39142: incompatible version number 5.1 in dump file "D:\DB Administration\Backup Guides\Oracle Docs\dump\BACKUP_FULL_20200625.DMP" I have tried expdp and sql developer to import in oracle 12.1.0.2.0. Found not a valid export. OS: Windows server 2016 Utility : expdp

I have .dmp files exported as version 5.1 and I need to import them on an Oracle 12c. I have no access to the original database to re-export setting the VERSION parameter.   This is the error I get:  ORA-39001: invalid argument value ORA-39000: bad dump file specification ORA-39142: incompatible version number 5.1 in dump file "/media/sf_Data /DUMP_MS/mydumfile.dmp"   What can I do?


I am trying to prove $${\sum_{k=0}^r} {{n+k}\choose{k}}={{n+r+1}\choose{r}}$$ with combination formula.

Let $n$ and $r$ be positive integers with $n \ge r$. Prove that   Still a beginner here. Need to learn formatting.  I am guessing by induction? Not sure what or how to go forward with this.  Need help with the proof.


For some obscure reason, which seemed like a good idea at the time, I installed Kubuntu onto an external USB 1TB drive. It never worked.  Now, I would like to use that drive as storage but cannot delete any of the installation or boot files. I also cannot upload any other files onto it.  How would I reformat the whole drive so it can be used as general storage which can be read by linux, android and windows devices  Many thanks

In Windows there is a straightforward "Format" option in a flash drive's right-click pop-up menu. Where's that in Ubuntu?


I am trying do use tikz to (re-)produce the followning figure:   But it seems impossible to insert multiline text into a rectangle. I tried \newline, \\, and array without success. What else can be done?

How can I insert a line break in a TikZ node? Simply putting \\ where I want the break doesn't work (see MWE).  Is there a way to make lines break automatically at some specified width?  And can I control the alignment of the text (left, right, centered, justified)?  \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node {First line\\second line}; \end{tikzpicture} \end{document}


Hey is Huawei matebook d 14 ryzen 5 2500u running well on Ubuntu? Or any other Linux distribution?I couldn't find information online just that there are some problems with ryzen 5 2500u.

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


If two points $P$ and $Q$ on the hyperbola $\frac{x^2}{a^2} -\frac{y^2}{b^2} = 1$ whose centre is  $C(0,0)$ are such that $CP$ is perpendicular to $CQ$ , $a<b$ , then prove that  $$\frac{1}{(CP)^2} +\frac{1}{(CQ)^2} = \frac{1}{a^2} -\frac{1}{b^2} $$

If   two points $P$ and $Q$ on the hyperbola $\frac{x^2}{a^2}-\frac{y^2}{b^2}=1$ whose center is $C$ be such that $CP$ is perpendicular to $CQ$ and $a<b$,then prove that $\frac{1}{CP^2}+\frac{1}{CQ^2}=\frac{1}{a^2}-\frac{1}{b^2}$.    I let $P(a\sec\alpha,b\tan\alpha)$ and $Q(a\sec\beta,b\tan\beta)$,Center $C$ is $(0,0)$. $CP^2=a^2\sec^2\alpha+b^2\tan^2\alpha$ and $CQ^2=a^2\sec^2\beta+b^2\tan^2\beta$ We need to prove that $\frac{1}{a^2\sec^2\alpha+b^2\tan^2\alpha}+\frac{1}{a^2\sec^2\beta+b^2\tan^2\beta}=\frac{1}{a^2}-\frac{1}{b^2}..........(1)$ We are given that slope of $CQ\times$ slope of $CP=-1$ $\frac{b\tan\beta}{a\sec\beta}\times\frac{b\tan\alpha}{a\sec\alpha}=-1..........(2)$ I am not able to prove equation $(1)$ from the given equation $(2.)$


Today while I was searching for an answer to a question I noticed a site, . Is it a part of Stack Exchange or what?

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


I am having trouble changing latitude/longitude data (from spreadsheet dataset) from NAD27 to NAD83. I am using R. The spreadsheet has 2 million coordinates so I can't upload the data for you all to work with. This is the code I have so far:  lat=c(dataset$Latitude[which(dataset$Projection=="NAD27")]) lon=c(dataset$Longitude[which(dataset$Projection=="NAD27")]) d=data.frame(lat, lon)  coordinates(d)=c("lat", "lon") proj4string(d)=CRS("+init=epsg:4267")  CRS.new=CRS("+init=epsg:4269") Nad27to83_projection=spTransform(d, CRS.new)   However, after the proj4string line, I receive the following error:     Error in proj4string<-(*tmp*, value = new("CRS", projargs = > "+init=epsg:4267 +proj=longlat +datum=NAD27 +no_defs +ellps=clrk66 +nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat")) :      Geographical CRS given to non-conformant data: -9.8732102099e+10  3.8108480000e+06 -1.0300835057e+02  3.7622300000e+05   In addition, after the spTransform line, I receive this error:     Error in spTransform(d, CRS.new) :      No transformation possible from NA reference system   I am stuck. Please let me know if anyone can help!

I have a list of suburbs in Queensland, Australia along with their lat/longs.   However, when I try to read in the file in R and assign a CRS, R is giving the following error message:      Error in proj4string<-(*tmp*, value = ) :     Geographical CRS given to non-conformant data: 153.53332931   Here are relevant lines of the code,  # Loading suburb list  qs <- read.csv(file = '../data/Australian_Post_Codes_Lat_Lon.csv',                 header = TRUE,                stringsAsFactors = FALSE)  suburb <- qs %>%    filter(state == 'QLD') %>%    select(postcode,          suburb,          lat,          lon)   coordinates(suburb) <- c('lat', 'lon') # Assigning proper Coordinate Reference System (CRS) to Lat/Long. proj4string(suburb) <- CRS("+init=epsg:4326")   I am using the csv file provided


True or false? If $G$ is a group with the property that $g=g^{-1}$  for all g element  $G$, then $G$ is abelian .prove   true ,inverse exits which is in G,for it to be abelian ,it means that it is commutative that is $ab=ba$

How can you prove that if each element of group is inverse to itself then the group is commutative?