Frequently when I open a Unity C# script in Visual Studio, the built-in Unity Engine types aren't recognized, so I don't get syntax highlighting or code completion hints for things like MonoBehaviour.    Sometimes if I delete the script and create a new one it works, but lately nothing I do solves the problem.  Is there something I can do?

The strange thing is that opened scripts or newly opened ones are working fine. It's the new created C# scripts that are not working.  With not working, I mean the MonoBehaviour is not in light blue color it's in black color. In this screenshot I took, I marked it with a red circle.    What have I tried so far? I have closed Visual Studio and started over again.  Since it didn't solve it, I closed the unity editor and started it over again, to no avail.  I pressed 'clean solution', I pressed 'rebuild solution', I pressed 'build solution'.  What else can I do ? And why are the other scripts working fine? If I type gameo...it will auto complete it to GameObject but in this specific script it's just not working.  This is a screenshot of the editor. I have in the Hierarchy a Ladder object.  In the Assets I created a folder name Ladder and a script name Ladder. But this Ladder script is not working.    This is the Ladder script and this script was working before but once I created another script inside the ladder folder name Raise empty script the Raise script didn't work and now the Ladder is not working either. But other scripts are working fine.  using System.Collections; using System.Collections.Generic; using UnityEngine;  public class Ladder : MonoBehaviour {     public Transform charcontroller;      private bool inside = false;     private float heightFactor = 3.2f;      private void OnTriggerEnter(Collider other)     {             inside = true;     }      private void OnTriggerExit(Collider other)     {             inside = false;     }      private void Update()     {         if (inside == true && Input.GetKey("w"))             charcontroller.transform.position += Vector3.up / heightFactor;     } }


Is there a way to get statistical information in Blender for an individual object, not all objects in the scene, how to view statistics of a separate selected grid, each time switch to the mode editing, even with the TAB hotkey, is very inconvenient ... It is also not clear why the transition to the local view with the key - /  also does not help to see the statistics of a separate object, only the editing mode how so?

I am trying to access the triangle count of an object with Python. All other python code displays itself when I hover my mouse over the corresponding button in the interface. When I go to the info bar and hover my mouse over the triangle count, nothing appears. When looking in the documentation around data, there doesn't appear to be any clear function to call to get this info.


Saldana—Choi’s lawyer—started the argument.  Saldana (Choi's lawyer) started the argument. Saldana, Choi's lawyer, started the argument.   Sometimes I have trouble figuring out which one I should use. Can someone please explain to me when I should each one of these? The definitions I've found online are very similar to each other.

When do you use commas and when do you use parentheses to provide more detail about something?  For example:   The suspect, Tom Wilson, is now being charged with murder. The suspect (Tom Wilson) is now being charged with murder. John Smith, a member of the jury, agreed with the verdict. John Smith (a member of the jury) agreed with the verdict. The first example, the one about the fox, is the more valid one. The first example (the one about the fox) is the more valid one.   I realize that the first example, the one that uses parentheses, is probably more valid in this case (if anyone has a better example, please include it), but when, if ever, would you favor parentheses?  Update: I realize that dashes are sometimes used for similar situations, so I'd appreciate information on these as well.  For example:   The children—who are wearing shoes—will go on the trip The children, who are wearing shoes, will go on the trip The children (who are wearing shoes) will go on the trip


Let's say I have the following df:  import pandas as pd  df = pd.DataFrame({'A':['1^','2','3'],                    'B':['1^','2','3'],                    'C':['1^','2','3']}) df      A   B   C 0   1^  1^  1^ 1   2   2   2 2   3   3   3   I want to remove the '^' from the entire dataframe, so I thought using the .replace() method would work:  cols_to_check = ['A','B', 'C'] df[cols_to_check] = df[cols_to_check].replace({'^':''}, regex=True)   However, this is the output:  df      A   B   C 0   1^  1^  1^ 1   2   2   2 2   3   3   3   Nothing happens! This works with any character other than the carat symbol and it's frustrating me. Here is an example:  df[cols_to_check] = df[cols_to_check].replace({'2':''}, regex=True) df       A   B   C 0   1^  1^  1^ 1            2   3   3   3   Why is the carat symbol so stubborn? Is there a way I can fix this? It would be really helpful. Thanks!

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


If I were to abbreviate the word university, I would most likely write uni — or would uni’ be more correct?  If I wanted to say universities, would I write unis or uni’s?  My gut instinct would be to go with unis, but are there any particular rules regarding this?

When I was in high school back in the 1970s, I was taught that to make a plural of an acronym, a letter, or a number, one should add an apostrophe and "s". Like I would have written this sentence, "... back in the 1970's ..." I would write "one CD, two CD's". Etc. I followed this rule faithfully for years until a co-worker told me it was wrong. Now I can't find any source that agrees with what I was taught.  Is this a rule that has changed over time? Was the convention in the 70s that one should use an apostrophe but this has changed and now we do not? Or were my high school English teachers just confused?


Show that $\prod_{1\le p\le n}p\le4^n$ using the fact that $\prod_{m+1\le p\le 2m}p\le {2m\choose m}$ where $p$ are prime.  I managed to show that $\prod_{m+1\le p\le 2m}p\le {2m\choose m}$, and I sort of know how this $4^n$ is achieved by similar processes, but I am having a problem making my way to those expressions exactly.  Attempt(which I hope you could relate to): Let us denote the set of prime numbers in $[m,n]$ as $\pi(m,n)$. Then: $\pi(1,n)=(\pi(\lfloor{n\over 2}\rfloor+1,2\lfloor{n\over 2}\rfloor)\cup\pi(2\lfloor{n\over 2}\rfloor+1,n))\cup(\pi(\lfloor{n\over 4}\rfloor+1,2\lfloor{n\over 2}\rfloor)\cup\pi(2\lfloor{n\over 4}\rfloor+1,\lfloor{n\over 2}\rfloor))\cup...\cup(\pi(\lfloor{n\over 2^i}\rfloor+1,2\lfloor{n\over 2^i}\rfloor)\cup\pi(2\lfloor{n\over 2^i}\rfloor+1,\lfloor{n\over 2^{i-1}}\rfloor))\cup...$.  Where $\pi(2\lfloor{n\over 2^i}\rfloor+1,\lfloor{n\over 2^{i-1}}\rfloor))$ is a singleton: for $i=1$ it is clear because if $a=2b+1$ then $2\lfloor{a\over 2}\rfloor+1=a=\lfloor{a\over 2^0=1}\rfloor$, and it keeps that way inductively.   First, let us agree that for a set $S$ with no prime numbers,  $\prod_{p\in S}p=1$, so as to enable partitioning the intervals. Then $\prod_{1\le p\le n}p=\prod_{p\in\pi(\lfloor{n\over 2}\rfloor+1,2\lfloor{n\over 2}\rfloor)}p\prod_{p\in \pi(\lfloor{n\over 4}\rfloor+1,2\lfloor{n\over 4}\rfloor)}p...\le{2\lfloor {n\over 2}\rfloor\choose \lfloor {n\over 2}\rfloor}\cdot {2\lfloor {n\over 4}\rfloor\choose \lfloor {n\over 4}\rfloor}\cdot {2\lfloor {n\over 8}\rfloor\choose \lfloor {n\over 8}\rfloor}\cdot...$.   Here, I am kinda stuck, and not being fully sure of what I have done so far, I am going to need some guidance, thank you in advance.

This an interesting problem my friend has been working on for a while now (I just saw it an hour ago, but could not come up with anything substantial besides some PMI attempts).  Here's the full problem:  Let $x_{1}, x_{2}, x_{3}, \cdots x_{y}$ be all the primes that are less than a given $n>1,n \in \mathbb{N}$.   Prove that $$x_{1}x_{2}x_{3}\cdots x_{y} < 4^n$$  Any ideas very much appreciated!


   Check-In   <input type="date" name="checkin" class="form-control" id="checkin" />

   Check-Out   <input type="date" name="checkout" class="form-control" id="checkout" />

How do I get the number of days between two dates in JavaScript? For example, given two dates in input boxes:  <input id="first" value="1/1/2000"/> <input id="second" value="1/1/2001"/>  <script>   alert(datediff("day", first, second)); // what goes here? </script>


So I have a question which goes like this:  Find the equation of a plane containing the line: $$\left\{\begin{align*}x &= 1 + k\\ y &=1\\ z &= -2k\end{align*}\right. ,\quad k\in\Bbb{R}$$ and lying at distance one from the point $(-1,0,1)$.  I wouldn't even know how to start this as I am used to having questions which are usually simpler than this.  Any help would be appreciated.  Thank you very much.

I need to find the equation(s) of the plane containing the line  $$ \left\{  \begin{array}{c} x=1+k \\ y=1 \\ z = -2k \end{array} \right.  $$  lying at distance 1 from the point (-1,0,1).  I was trying to use "Distance from point to a plane" formula and compose a system, given that I know collinear points on the plane (from the line), however, I apparently miss something to finalize the solution.


I am new to c programming I am trying to understand structs concept in c in many tutorial they explained how to declare structs with this below example   struct node     {       int data;       int value;     }   I under stand the above case ,but in the case below case they declared a struct inside it   struct node {     int data;     struct node *next;  \\ what is this?  why they declared like it ? }

How can I have a pointer to the next struct in the definition of this struct:  typedef struct A {   int a;   int b;   A*  next; } A;   this is how I first wrote it but it does not work.


I'm running Ubuntu 18.04 minimal fresh install with dual boot Windows 10 on a Samsung 850 EVO SSD.  $ systemd-analyze time               Startup finished in 17.129s (firmware) + 3.573s (loader) + 3.058s (kernel) + 22.988s (userspace) = 46.750s graphical.target reached after 22.981s in userspace  $ systemd-analyze blame | head -n 10          20.674s plymouth-quit-wait.service           5.077s bolt.service           3.252s NetworkManager-wait-online.service           1.483s docker.service            863ms dev-sda4.device            820ms snap-gnome\x2dlogs-31.mount            787ms fwupd.service            742ms systemd-resolved.service            690ms snap-gnome\x2dsystem\x2dmonitor-39.mount            546ms dev-loop2.device   Any ideas why boot time takes so long? Even my Windows 10 partition boots up faster.

There is a long time where SSD does nothing.   How can I find the fault and fix it ? Already checked /etc/fstab, no swap or anything wrong there (32GB of RAM, no swap)     [    2.173492] usb 2-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [    2.173497] usb 2-1.6: Product: DW375 Bluetooth Module [    2.173501] usb 2-1.6: Manufacturer: Dell Computer Corp [    2.173511] usb 2-1.6: SerialNumber: 7CE9D3C0713B [    2.323728] ata4: SATA link down (SStatus 0 SControl 300) [    2.441062] input: AlpsPS/2 ALPS GlidePoint as /devices/platform/i8042/serio1/input/input6 [    2.640309] ata5: SATA link down (SStatus 0 SControl 300) [    2.954947] ata6: SATA link down (SStatus 0 SControl 300) [    3.068090] clocksource: Switched to clocksource tsc [   36.584826] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) [   36.726117] ip_tables: (C) 2000-2006 Netfilter Core Team [   36.732610] systemd[1]: systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +AC L +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid) [   36.751996] systemd[1]: Detected architecture x86-64. [   36.753867] systemd[1]: Set hostname to <latitude-e5520>. [   36.868561] systemd[1]: Started Forward Password Requests to Wall Directory Watch. [   36.868594] systemd[1]: Reached target Remote File Systems. [   36.868751] systemd[1]: Created slice User and Session Slice. [   36.868869] systemd[1]: Created slice System Slice. [   36.868948] systemd[1]: Listening on udev Control Socket. [   36.868957] systemd[1]: Reached target Slices. [   36.868996] systemd[1]: Listening on udev Kernel Socket. [   36.895156] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro [   36.898185] lp: driver loaded but no devices found [   36.903941] ppdev: user-space parallel port driver


Consider a series $\sum_{n \geq 0} a_n$. How can I show the following?  $$\lim_{n \to \infty} |a_n|^{\frac{1}{n}}=l \implies \lim_{n \to \infty} \frac{|a_{n+1}|}{|a_n|}=l$$

Let consider the power series $$ \sum_{k=1}^\infty a_kx^k. $$ We know that it converges when  $$\lim_{n\to \infty }\sqrt[n]{|a_n|}|x|< 1\quad\text{or}\quad |x|< \frac{1}{\lim_{n\to \infty }\sqrt[n]{|a_n|}}$$  But D'Alembert test tells us that it converges if $$|x|< \frac{1}{\lim_{n\to \infty }\left|\frac{a_{n+1}}{a_n}\right|},$$ so since the radius of convergence is unique, we should have that $$\lim_{n\to \infty }\sqrt[n]{|a_n|}=\lim_{n\to \infty }\left|\frac{a_{n+1}}{a_n}\right|.$$  I tried to prove it, but this result looks strange to me. So if it doesn't work always, how can we have those to limit as radius of convergence? I guess the equality of those two limit should be true most of the time.  So under what conditions is it true?


I am studying the effect of expression of a specific gene signature on patient survival, dividing patients into Low, Mid, and High expression of Signature X. The survival curves for these patients all look very different from each other, and I'm trying to get a statistical value to support this statement (patients with Low, Mid and High expression have different survival trends).  I used the coxph function in the survival package in R and obtained this:      > coxph(Surv ~ Sig.X.Group, data = data)                     coef      exp(coef)   se(coef)    z      p     Sig.X.Group     1.0310    2.8039      0.0795      13     <2e-16   If I had divided patients into Low and High expression of Sig.X I understand that: "High" expression of Sig.X is associated with a 2.8 increase in risk of death compared to "Low" expression (or something along those lines).  But what is the English explanation to an HR of 2.8 when I run the coxph function on 3 groups rather than 2?  EDIT: Fixed. The problem was my Sig.X.Group was coded as a number. Fixed the issue when changed Sig.X.Group to a factor, which gave me two individual HRs:                    coef       exp(coef)   se(coef)    z        Pr(>|z|)     Sig.X.Group2  0.5821074  1.789806    0.1696     3.4318    0.0005993     Sig.X.Group3  1.9186438  6.811714    0.1550     12.3753   0.0000000

If a factor variable (e.g. gender with levels M and F) is used in the glm formula, dummy variable(s) are created, and can be found in the glm model summary along with their associated coefficients (e.g. genderM)  If, instead of relying on R to split up the factor in this way, the factor is encoded in a series of numeric 0/1 variables (e.g. genderM (1 for M, 0 for F), genderF (1 for F, 0 for M) and these variables are then used as numeric variables in the glm formula, would the coefficient result be any different?  Basically the question is: does R use a different coefficient calculation when working with factor variables versus numeric variables?  Follow-up question (possibly answered by the above): besides just the efficiency of letting R create dummy variables, is there any problem with re-coding factors as a series of numeric 0,1 variables and using those in the model instead?


I create new element with js like this:  $("#vorschau_tr").append('	');   And try to just alert something like that:  $(".js_is_a_broken_time_wasting_piece_of_garbage").on({     mouseover: function () {         alert('enter');     },     mouseleave:function () {         alert('leave');     } });   I know it was asked multiple times but every time it says the solution is to use on which I do but it's not working so how to do that?  $(".js_is_a_broken_time_wasting_piece_of_garbage").live( click, function(){     alert('js_inventor_is_a_pos'); });   isn't working too

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


I've decided I don't want to be a part of any Stack Exchange communities, as it's drawing my focus away from more important things (work, family, friends, etc.), so I'd like to delete all of my accounts. I've sent requests for each account individually, but is there a way to ensure that every account of mine is removed? Not the questions and answers, just the accounts? If I ever decide to come back and use the same email to log in, I want to start fresh, and I don't want it to be associated with any accounts.

How can I delete my Stack Exchange account(s)? Also,  What happens to my content? Can I request it be deleted as well? What if I'm suspended, rate-limited, or banned from posting questions or answers? What will happen to my votes? Will other users be impacted? Why wasn't my account deleted immediately after the timer expiring? What will happen to my pending bounties and close, reopen, delete, or undelete votes? I want my account deleted on all Stack Exchange sites. How do I do this? Will my profile on chat be removed once I delete my site account?   For more information, see "" in the .


I use QGIS print layout to create atlas with many features. I am tring to find a way to show page number left, right, up and down of atlas feature. Is there any way to insert these page numbers to print layout? Example is on a picture below. I need to show page number 4, 6, 8 at atlas with page number 5 as is seen at atlas overview. Unfortunately, script described at post below doesnt work.https://gis.stackexchange.com/questions/214300/how-to-determine-neighbouring-tile-ids-in-qgis

I was asked in a recent training course if QGIS could automatically calculate the next/previous and above/below page numbers for a map book created using the atlas generator. I managed to work out a fairly reasonable label expression for a regular grid if you know the width and height of the grid.  But we then started to think of realistic examples where we don't want to draw pages that don't contain our district of interest, such as this one of my home county:    So this afternoon I had a play at a python script to work out the 4 neighbours I was interested in for each grid cell and added those values to my grid (this is heavily based on Ujaval Gandhi's ):  for f in feature_dict.values():     print 'Working on %s' % f[_NAME_FIELD]     geom = f.geometry()     # Find all features that intersect the bounding box of the current feature.     # We use spatial index to find the features intersecting the bounding box     # of the current feature. This will narrow down the features that we need     # to check neighboring features.     intersecting_ids = index.intersects(geom.boundingBox())     # Initalize neighbors list and sum     neighbors = []     neighbors_sum = 0     for intersecting_id in intersecting_ids:         # Look up the feature from the dictionary         intersecting_f = feature_dict[intersecting_id]         int_geom = intersecting_f.geometry()         centroid = geom.centroid()         height = geom.boundingBox().height()         width = geom.boundingBox().width()         # For our purpose we consider a feature as 'neighbor' if it touches or         # intersects a feature. We use the 'disjoint' predicate to satisfy         # these conditions. So if a feature is not disjoint, it is a neighbor.         if (f != intersecting_f and             not int_geom.disjoint(geom)):             above_point = QgsGeometry.fromPoint(QgsPoint(centroid.asPoint().x(),                centroid.asPoint().y()+height))             below_point = QgsGeometry.fromPoint(QgsPoint(centroid.asPoint().x(),                centroid.asPoint().y()-height))             left_point = QgsGeometry.fromPoint(QgsPoint(centroid.asPoint().x()-width,                centroid.asPoint().y()))             right_point = QgsGeometry.fromPoint(QgsPoint(centroid.asPoint().x()+width,                centroid.asPoint().y()))             above = int_geom.contains(above_point)                below = int_geom.contains(below_point)                left = int_geom.contains(left_point)             right = int_geom.contains(right_point)             if above:                 print "setting %d as above %d"%(intersecting_f['id'],f['id'])                 f['above']=intersecting_f['id']              if below:                 print "setting %d as below %d"%(intersecting_f['id'],f['id'])                 f['below']=intersecting_f['id']              if left:                 print "setting %d as left of %d"%(intersecting_f['id'],f['id'])                 f['left']=intersecting_f['id']              if right:                 print "setting %d as right of %d"%(intersecting_f['id'],f['id'])                 f['right']=intersecting_f['id']      # Update the layer with new attribute values.     layer.updateFeature(f)  layer.commitChanges()   This works just fine.     But to be honest the whole creating a test point to the North and then testing all the possible neighbours seems wrong. However after an afternoon of wracking my brain I can't think of a better way to determine what is a particular grid cell's northern neighbour?  Ideally I'd like something simple enough to put in a print composer text box, but I suspect that's too much to ask for.


I bought an unlocked 5c for my kid to use without data etc as an iPod to later use as phone when older but it wants a SIM card to activate the phone what do I do

I just purchased an unlocked iPhone 5 from the Apple store today, and I can't activate it to use it because it says "please" insert a valid SIM card to use it. I'm not using this phone as a "phone" to make calls. I'm a developer and am just looking to use it for development purposes. How can I go about using the iOS 5?


This is (a small part of) my struct: ` struct BASE { struct s {      //...  };   template<typename T> struct DerivedTemplate : public s {      struct SW     {         short   ndx = 0;         double  val = 0;         bool    glch = false;          SW(short ndx, double val, bool glch){this->ndx = ndx;this->val = val;this->glch = glch;}     };      static vector<SW> SW__BIGGR;  };  };` Then I seek to initialize the vector "SW__BIGGR" in the following way: template <typename T> vector<BASE::DerivedTemplate<T>::SW> BASE::DerivedTemplate<T>::SW__BIGGR = BASE::DerivedTemplate<T>::SW(0, 0, false);  And I get this compiler error: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Alloc> class std::vector’  vector<BASE::DerivedTemplate<T>::SW> BASE::DerivedTemplate<T>::SW__BIGGR = BASE::DerivedTemplate<T>::SW(0, 0, false);                                          ^ [...] note:   expected a type, got ‘BASE::DerivedTemplate<T>::SW’  When I do the same operation with a vector of simple type such as "int", everything works fine. What am I doing wrong? Thank you! EDIT: After adding "typename" before "BASE:: ..." as I was kindly told to do in a comment, I get this error: error: expected unqualified-id before ‘=’ token vector<typename BASE::DerivedTemplate::SW> typename BASE::DerivedTemplate::SW__BIGGR = typename BASE::DerivedTemplate::SW(0, 0, false); ^ Obviously, the vector cannot be initialized like that (as I am doing without problem with an "int" or "double" vector), but how can it? EDIT 2: After deleting "typename" before " ... SW__BIGGR" as kindly suggested, I now get this error for which I could not find an answer googling ("sgnl__01" is a struct based on the struct template "DerivedTemplate"): "error: conversion from ‘BASE::DerivedTemplateBASE::sgnl__01::SW’ to non-scalar type ‘std::vectorBASE::DerivedTemplate<BASE::sgnl__01::SW, std::allocatorBASE::DerivedTemplate<BASE::sgnl__01::SW> >’ requested vector<typename BASE::DerivedTemplate::SW> BASE::DerivedTemplate::SW__BIGGR = typename BASE::DerivedTemplate::SW(0, 0, false);" Lost again :-(

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


“Bullshit” is often a slang verb used when writing essays to mean that you are writing things without much deep thought or care.  I'm looking for a more formal definition of the word “Bullshit”.  I need something that means the same thing as “to Bullshit” but for a more formal setting.  That actual use-case is that I’m trying to tell a professor in a teacher evaluation that “it’s not an easy class where you can just bullshit your way through it”, but I want to use a more formal synonym and something less explicit/slang-like.  Thanks

What is a reasonable formal alternative to 'bullshit'?  For example:     Bob isn't making a very good argument. In fact everything he says is bullshit.   What can 'bullshit' be replaced with that is a reasonable facsimile of what is intended without being tendentious?    Bullshit -      "eloquent and insincere rhetoric," 1915, American English slang; see bull (n.1) + shit (n.), probably because it smells. But bull in the sense of "trivial or false statements" (1914), which usually is associated with this, might be a continuation of Middle English bull "false talk, fraud" (see bull (n.3)).    spending the first 20 of 67 pages not even coming to a definition.  His definition of 'bullshit' was statements of potential facts about which the utterer does not care of its truth. That is, bullshit is somewhere off to the side from truth and lies, where the speaker knows what is correct and either says something concordant or not with that. Bullshit can be true or false; the point, to the speaker, is that they don't know or care about its truth value, just that it convinces someone (it may end up convincing the speaker!).  Others have slightly different ontologies for the word, maintaining the lack of knowledge, but instead of trying to convince others, it is merely uttered to sound a certain way, to sound like it is has import, but fails to do so on inspection. Late-night THC enhanced pseudo-intellectual conversations, Sokal hoax texts, and AI chatbot conversations. Meaningful at first glance but meaningless on inspection.   Either way, the term bullshit is used to call someone out on their statements without accusing them of something so intentionally heinous as lying.  The difficulty with the term 'bullshit' is that it points to very useful concepts but is somewhat taboo. I am looking for a term that captures the meaning but not the taboo, can be used in formal or otherwise taboo-adverse situations.  There are many possible alternatives but they all seem to fall short in   There are the quaint folksisms and minced oaths of:      , , , , , , , , , , , , , , , , , , , , , , , , , , , , , .   These are all nonsense words - they don't just mean nonsense, they -are- nonsense. They stand out like twee bowdlerizations of nothing that take you right out of the discourse into a drunk undertaker at a wedding's cash free bar. They all sound like they're from the same Lewis Carroll poem, but if he grew up in Kansas in the 1890's.  There are the waste/offal/excrement metaphors of:     , , , , , , , , , , , , , , , , , , , .   implying empty worthlessness, which bullshit certainly is, but these words connote something less taboo but still noticeably informal.  And then there is the single, literal:     .   The latter is the go-to for replacing 'bullshit' in polite company. It certainly fits the second definition, words that sound meaningful but on reflection are not. But many things called bullshit these days is of the first kind, intended to convince whatever the truth value. Very meaningful, just not with any belief on the speaker's part.  Is there an alternative to 'bullshit' that fills all these (admittedly negative) criteria? Works in formal situations, is not cutesy or metaphorical, is truth-agnostic, is not one of the above words?  Of course, one may suggest one of the above words in case I am wrong about them, but in any case give a justification as to why. And noun, verb, adjective, interjection, whatever, is OK as long as it fits in meaning.  Please, no malarkey. That is, no words from the malarkey list. They are awful.    As usual a single word is nice but not necessary, but a proverb is too much.


(cnt1 == 0) ? { maj1 = arr[i]; cnt1++; } : {maj2 = arr[i]; cnt2++; }  basically it's same as writing (expression) : { statement 1; statement 2 } : { statement 3; statement 4 };  can I use ternary operator in this way actually when I am running this an error is appearing. Can't we use multiple statements for one condition enclosed within {} or () in ternary operator in C++.

I've always wondered how to write the "A ? B : C" syntax in a C++ compatible language.  I think it works something like: (Pseudo code)  If A > B    C = A Else    C = B   Will any veteran C++ programmer please help me out?


I am looking for coordinates (longitude and latitude) of each state of Brazil. Where can I find that?  I have found a file for the US states here: , I am now looking for something similar for Brazil.

After learning about the  datasets I've working with the following layers, from the USA data   Country boundaries State boundaries County boundaries City boundaries ZipCode/Postcode boundaries   What I am trying to find is the equivalent (where appropriate) of the same data for various countries.  Is there any free administrative boundaries available as shapefiles for other countries?


Let's assume:    the feather has a mass of $0.006$kg the mountain has a mass of $6 \times 10^{15}$kg the earth has a mass of $6 \times 10^{24}$kg no air resistance both objects released at the same time with an initial velocity of $0$ both objects released at a height of $10,000$m   Would the mountain hit first, as it itself would exert a gravitational pull on the earth?

The common understanding is that, setting air resistance aside, all objects dropped to Earth fall at the same rate. This is often demonstrated through the thought experiment of cutting a large object in half. The halves clearly can't then fall more slowly just by being sliced in two.  However, I believe the answer is that when two objects fall together, attached or not, they do "fall" faster than an object of less mass alone does. This is because not only does the Earth accelerate the objects toward itself but the objects also accelerate the Earth toward themselves. Considering the formula: $$ F_{\text{g}} = \frac{G m_1 m_2}{d^2} $$  Given $F = ma$ thus $a = F/m$, we note that the mass of the small object doesn't seem to matter as when calculating acceleration the force is divided by the $m$ term, its mass. However, this overlooks that the force is actually applied to both objects, not just to the smaller one. The acceleration on the second, larger object is found by dividing $F$, in turn, by the larger object's mass. The two objects' acceleration vectors are exactly opposite, so closing acceleration is the sum of the two:  $$ a_{\text{closing}} = \frac{F}{m_1} + \frac{F}{m_2} $$  Since the Earth is extremely massive compared to everyday objects, the acceleration imparted on the object by the Earth will radically dominate the equation. As the Earth is $\sim 5.972 \times {10}^{24} \, \mathrm{kg} ,$ a falling object of $5.972 \, \mathrm{kg}$ (just over 13 pounds) would accelerate the Earth about $\frac{1}{{10}^{24}}$ as much, which is one part in a trillion trillion.  Of course in everyday situations, we can for all practical purposes treat objects as falling at the same rate because of this negligible difference—which our instruments probably couldn't even detect. But I'm hoping not for a discussion of practicality or what's measurable or observable, but what we think is actually happening.  Am I right or wrong?  What really clinched this for me was considering dropping a small Moon-massed object close to the Earth and a small Earth-massed object close to the Moon. This made me realize that falling isn't one object moving toward some fixed frame of reference, but that the Earth is just another object, and thus "falling" consists of multiple objects mutually attracting in space.


Let $f:\mathbb{C}\to\mathbb{C}$ be an analytic function. Show that $g(z)=\overline{f(\overline{z})}$ is analytic and find its derivative.   $f$ is analytic then C-R equations hold. Suppose $f=u+iv$.  Then $g(z)=u(x,-y)+i(-v(x,-y))$. We can observe that C-R equations hold for $g$ as well since if we set $\hat{u}(x,y):=u(x,-y)$ and $\hat{v}(x,y)=-v(x,-y)$ we get $$ \hat{u}_x=u_x=-v_y=-\hat{v}_y \\-\hat{u}_y=u_y=v_x=-v_x $$ But this is not enough for to show that $g$ is analytic.

I'm doing a bit of self study, but I'm uncomfortable with a certain idea. I want to show that $f(z)$ is analytic if and only if $\overline{f(\bar{z})}$ is analytic, and by analytic I mean differentiable at each point. Here $f$ is a complex valued function.  What I do is write $f(z)=u(x,y)+iv(x,y)$, where $u$ and $v$ are real functions of two variables. Then $\overline{f(\bar{z})}=u(x,-y)-iv(x,-y)$.  These two forms look very similar, in the sense the one function being differentiable should immediately imply the other is differentiable, since the only thing really changing might be a $-$ sign popping out due to the chain rule.   How can I more rigorously express that $f(z)$ is analytic iff $\overline{f(\bar{z})}$ using this? Many thanks.


I have a few objects with the same structure; some of them have null values for some fields, whereas one of the objects (here obj2) has values for the field which has null values in other objects; I want ro merge them and cosider the one which has value:  var obj2 = {     options: [         null     ],     name: "name1", }  var obj1 = {     options: [         {"option": "option1"}     ],     name: "name1", }  desiredOutput = {     options: [         {"option": "option1"}     ],     name: "name1", }   My attempt: I tried lodash; but the prpoblem with lodash is that the order has effects; that is, whichever object comes last that one overwrites the previous ones for the mentioned field:  I tried lodash; here myArray is an array of obj1, obj2,...      var newResults = {};     for (var i = 0; i < myArray.length; i++) {         newResults = lodash.extend(newResults, myArray[i]);     }   What is the cleanest solution for this one? Thanks

I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.


The world population is ~7 billion  Social Classes:   Top .001% is ~70,000 Second .01% is ~700,000 Next .1% is ~7 million Rest 99.9% is ~6,993,000,000 (billion)   The odds of 1 person in the Rest grp meeting 1 person from the Top  grp is it approx: 1 in 100,000 meets?  What are the odds of 1 person in the Rest grp meeting 2 people from the Top grp? is it: 1 in 100,000^2 or 1 in 10,000,000,000?  What are the odds of 1 person in the Rest grp meeting 2 people from the Top grp on the same year?   (Assuming in a lifetime of 100 years.)

The world population is ~7 billion  Social Classes:   x: Top .001% is ~70,000 y: Second .01% is ~700,000 z: Next .1% is ~7 million r: Rest 99.9% is ~6,993,000,000 (billion) p: population ~7,000,000,000   The odds of 1 person in the Rest grp meeting 1 person from the Top  grp is it approx: 1 in 100,000 meets?  What are the odds of 1 person in the Rest grp meeting 2 people from the Top grp? is it: 1 in 100,000^2 or 1 in 10,000,000,000?  What are the odds of 1 person in the Rest grp meeting 2 people from the Top grp on the same year?   (Assuming in a lifetime of 100 years.)


Why wouldn't Picard have his male pattern baldness cured?  Surely they can do this in the 24th Century.  Maybe people are way less vain in the 24th Century, but I think I remember Picard showing Beverly a picture of his younger self in Nemesis, and he was very bald in it.  So it seems he was afflicted by unusually early pattern baldness.  So why wouldn't he have had that corrected?

Was the fact that Captain Picard has no hair just a random artefact of the fact that Patrick Stewart was the best/chosen actor for the role?  Or was the choice of Patrick Stewart influenced in any way by the fact that the show creators/casters preferred the bald look for some reason before Stewart was cast?  I'm looking for authoritative info, not guesses.


I want to connect to an external hard drive. It's an easystore HDD. I'd like to run desktop-style files on it thru Ubuntu. I'm new to Ubuntu, though, and not very computer savvy, but I'm really interested in learning. Any suggestions on what I should use for operating systems on it? This is the machine I have Samsung - Galaxy 13.3" 4K Ultra HD Touch-Screen Chromebook Intel Core i5 8GB Memory 256GB SSD

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I was given an argument in a conversation today and I don't know how to respond to it:  H( k || m || k ) should be a better choice of MAC than the traditional HMAC. The person's rationale was that: "You don't know where to pick up extending from, and you don't know what to finish extending into. Sure using k twice looks ugly, but HMAC also uses the key twice, except it also hashes twice. This only hashes once and therefor is faster."  I couldn't refute this on the spot and now the more I think about it the more it bothers me. Are they right? I'd imagine that the cryptographers who decided on HMAC had way more experience when they made their decision. But then why?

I understand how for hash functions which are vulnerable to length extension attacks (such as SHA1 and SHA2) it is safer to use a HMAC construction.  What I don't understand is, how or why is $\operatorname{HMAC\_SHA256}_\mathrm{key}(\mathrm{message})$ safer (in terms of resistant against certain attacks) than $\operatorname{SHA256}(\mathrm{key}_1 \mathbin\| \mathrm{message} \mathbin\| \mathrm{key}_2)$, assuming that all key strings are sufficient in length and entropy?


I edited a wiki on Woodworking.SE Meta. It was an old post so I got the excavator badge for it. The notification for the badge came while I was reading a Science Fiction & Fantasy post.   So I checked my notification and saw that I got the badge for WW but it had the SF logo.     Refreshing the page then displayed the beta badge icon which was correct.   No, I don't think we need to torch and pitchfork the doors of StackOverflow to get this fixed. Just thought it was worth bringing up.   If it matters I am using Chrome Version 46.0.2490.86 m

It's so cool that the notification reminds you of the colour of badge you've earned. But I am a little puzzled by the symbols:      Is it feasible to use the symbol from the earned site? At the moment it uses the symbol from the site I happen to be on (as you can see by looking to the left of the dropdown in each case.)


I need to install Tally.Server 9 on a Ubuntu 12 server.  Tally is a accounting software and a multi user application where the main application is installed on the server and users have the client side version installed in the users PC.

I am looking for a step by step instruction to guide me in the ways of installing, configuring and debugging many of the issues new users have when dealing with Wine in Ubuntu.  What is the recommended way of installing Wine, some of the key issues that it has and how to solve them?  If I have a specific problem with an App in Wine, how do I go about solving it? What are the recommended steps to ensure that I can fix a problem related to an app I wish to use?


Is there any explanation about how the paintings are connected, so that people can walk from one painting to another? How can these imprints of dead people be transferred between paintings? If imprints can be moved away from their painting (frame as physical object), can they be bound to other objects as well (which are not paintings)? Must they be moved by a wizard/witch or is there a space (in another dimension) that connects them?

I'm not sure whether this happens in the books - it's been a while since I've read them - but in the films at least, there's occasions when subject(s) of a given painting venture outside of its frame. In Prisoner of Azkaban, the Fat Lady goes into another painting after being scared off by Sirius Black. In Order of the Phoenix, Filch 'empties' paintings of their subjects, by shaking the frames hard enough. In Deathly Hallows - Part 2, subjects are seen rushing from painting to painting, seemingly 'getting out of the way' as the preparations take place for what is about to be the Battle of Hogwarts.  But how does this work?  Is there any explanation given by JK Rowling inside the canon, or in interviews on this?  Where did the subjects go during Umbridge's time as Headmistress - where did they 'hang out' during this short-lived exile from Hogwarts? Are they in their own alternate 'world' or 'space' and can travel to any adjacent painting and thus theoretically wherever they want to, within the painting 'world'? To find some other home, if kicked out of their (original) portrait?  Thanks.


I am trying to write a code that compares the users string to the string 'm' or 'f' and repeating the loop if the users answer doesn't match either letter      public static void main(String[] args) {      String om = JOptionPane.showInputDialog("I will calculate the number of chocolate bar you should eat to maintain your weigth\n"             + "Please enter letter 'M' if you are a Male\n"             + "'F' if you are a Female");     JOptionPane.showMessageDialog(null, om.equalsIgnoreCase("m")); // if i don't do this, it says the variables have not been initialized     boolean m = true;     boolean f = true;     if (om == "m"){      m = om.equalsIgnoreCase("m");     } else if ( om == "f"){      f = om.equalsIgnoreCase("f");     }     JOptionPane.showMessageDialog(null, "The m is: " + m);     JOptionPane.showMessageDialog(null, "The f is: " + f); //if the user enters one variable the other variable becomes false, thus   // activating the while loop     while (m == false || f == false){         om = JOptionPane.showInputDialog("Please enter letter 'M' if you are a Male\n"                 + "'F' if you are a female");       }   /* i tried using '!=' to compare the string that doesn't work, i tired converting the strings to number to make it easier something like the code below:  int g = 2; if (om = "m"){ g = 0 } while (g != 0){  }   that doesn't work either  So i tried using boolean which worked but if the user doesn't enter one letter the other letter becomes false and activates the while loop

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?


package Practice_KingAllProg;  import java.util.concurrent.TimeUnit;  import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver;   public class Crmpro_Iframe_King2410 {      public static void main(String[] args) {         // TODO Auto-generated method stub          try {             System.setProperty("webdriver.chrome.driver",                     "C:\\Users\\Sahil\\selelniumPratice\\Webdriver_PracticeKing\\src\\test\\resources\\BroWser_PracticeKing\\chromedriver.exe");             WebDriver driver = new ChromeDriver();             driver.get("https://www.crmpro.com/index.html");             Thread.sleep(5000);             driver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);             driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);             driver.manage().window().maximize();             driver.findElement(By.name("username")).sendKeys("sa12");             driver.findElement(By.name("password")).sendKeys("vi123");             driver.findElement(By.xpath("//*[@id=\'loginForm\']/div/div/input")).click();             driver.switchTo().frame("leftpanel");             Thread.sleep(5000);             driver.switchTo().defaultContent();         String Actualtext = driver.findElement(By.xpath("//html//body//table[1]//tbody//tr[1]//td//table//tbody//tr//td[1]")).getText();         //html/body/table[1]/tbody/tr[1]/td/table/tbody/tr/td[1]         System.out.println(Actualtext);         String Exceptedtext="sanjay spear";         if(Actualtext.equalsIgnoreCase(Exceptedtext))         {             System.out.println("Pass");         }else         {             System.out.println("Fail");         }              driver.quit();         } catch (InterruptedException e) {             // TODO Auto-generated catch block             e.printStackTrace();         }      }  }

How to Handle Dynamic Changing IDs In XPath? for example :   //div[@id='post-body-3647323225296998740']/div[1]/form[1]/input[1]   In this xpath id "3647323225296998740" is changing every time when reloading the page.   Is there any way to handle this type of situation in Selenium?


Complex numbers contain imaginary numbers as we all know but often it is used for solving real life practical problems such as taking the impedance of a capacitor, inductor etc.  Even in Signals and systems we use complex form of Fourier series,in AC circuit analysis we use complex numbers and i guess there are still more applications to come in my coming semesters.  How an imaginary number in real life can have a practical significance?  So what really makes complex numbers such a powerful tool in electronics?  In layman's term why do we use it?How does it helps us?

I was just wondering how complex numbers can be applied in electrical engineering and why we use complex numbers over regular, real numbers for this application (e.g what capabilities does the complex number have that real numbers do not in electrical engineering)?  I have done some research concerning impedances and understand how they are written in complex form, however I am still confused why complex numbers are necessary in this field over regular numbers.


When I plot two curves on the same graph with Pgfplots, I would like the second to be placed above the first. However, if the first has lines+points and the second only lines, then the point from the first go above the lines of the second. Here is a MWE  \documentclass[crop,tikz]{standalone} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}     \begin{axis}[]         \addplot[red,mark=*,line width=2pt] coordinates {(0,0) (1,1) (2,2)};         \addplot[blue,line width=2pt] coordinates {(0.5,0) (1.5,2) (2,0)};     \end{axis} \end{tikzpicture} \end{document}   The output is    As you see, the blue lines goes above the red one, but the red point is above the blue line. I would like all that is in red to be placed below the blue.  I think I can do what I want with two axis environments overlaying, each one with one curve. But is there a solution in the same axis environment?

I have gone through previous questions [,,], but I still couldn't figure out how to draw plots on different layers and change their order of drawing.  For this MWE, I would be grateful if I could figure out how to change the order of appearance of the three plots in such a way that the legend entries have the same order while keeping the plots commands/definitions in the same order as much as possible.  \RequirePackage{luatex85} \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest}  \begin{document}  \begin{tikzpicture}     \begin{axis}[             legend style={                 at={([yshift=30pt]0.5,1)},                 anchor=north},             legend columns=-1,             xmin=0, xmax=10,             ymin=0, ymax=10,         ]         %         \addplot [red,      line width = 5pt,   domain=0:10]    {x}; \addlegendentry{$x$}            \addplot [black,    line width = 5pt,   domain=0:10]    {(x-5)^2}; \addlegendentry{$(x-5)^2$}         \addplot [yellow,   line width = 5pt,   domain=0:10]    {10-(x-5)^2}; \addlegendentry{$10-(x-5)^2$}     \end{axis} \end{tikzpicture}  \end{document}


I play minecraft on PC, I have two accounts and I am giving one to my friend.  She loves minecraft but only plays on xbox at the moment, but I want to play with her and I refuse to play on xbox.  How can you make the PC version closer to the XBox version. I am specifically looking for controller support and an easy crafting method. like the example below

Am I able to use a controller to play the PC version of Minecraft? If so, can I just plug it in and play or do I have to do something else before being able use one?


There seems to be a lot of question regarding Pantheon, but they all somewhat contradict each other. Is there a simple way to install it?

Pantheon desktop doesn't install on recent versions of Ubuntu, but is there a way to install it now?  Are there any workarounds?


this is my code:  private void Method1() {     int i = 1;     foreach (string file in Directory.EnumerateFiles(ImagesPath))     {         if (Path.GetExtension(file).EndsWith(".png"))         {             string image = (Path.GetFullPath(file));             i += 1;                         }     } }   The imagesPath is a string that binds to a folder which contains images,  Image1.png, Image2.png . . . . Image10.png, Image11.png . .   I want to iterate from Image1.png--->Image2.png, but the foreach iterates Image1.png-->Image10.png-->Image11.png and so forth.  Is there any way to override this?

Anyone have a good resource or provide a sample of a natural order sort in C# for an FileInfo array?  I am implementing the IComparer interface in my sorts.


Suppose $A, B\in S^n$ and $A\succeq B$. Further suppose the eigenvalues of $A$ in non-increasing order are $\lambda_1, \lambda_2, ..., \lambda_n$, and $B$'s are $\mu_1, ..., \mu_n$. Does it imply $\lambda_1\ge\mu_1, ..., \lambda_n\ge\mu_n$? By $A\succeq B$ I mean $A-B\succeq 0$, i.e. $A-B$ is positive semi-definite.

If $B\succeq A$, show that $\lambda_n(B)\ge\lambda_n(A)$, where $\lambda_n$ is the $n$th largest eigenvalue.  It is Theorem 6 in  but the proof is only given as "by characterization." Do they mean the min/max characterization of eigenvalues, $$\lambda_k=\min\max\frac{x^TAx}{x^Tx}$$ and if so, how is that applied?  Thanks.


Is the model $$ y = \gamma_0 + \gamma_1 + \sqrt x + \varepsilon $$ linear in parameters? ( $\varepsilon$ is the error term.)

If polynomial regression models nonlinear relationships, how can it be considered a special case of multiple linear regression?  Wikipedia notes that "Although polynomial regression fits a nonlinear model to the data, as a statistical estimation problem it is linear, in the sense that the regression function $\mathbb{E}(y | x)$ is linear in the unknown parameters that are estimated from the data."  How is polynomial regression linear in the unknown parameters if the parameters are coefficients for terms with order $\ge$ 2?


I have a table in Excel.  There are a few attribute columns for each "thing", the "thing" being the first column.  I want to quickly just add colours to everything of the same type to help visually differentiate them.  For numbers, I'll add a Conditional Formatting rule with a colour scale, and that's sufficient.  In this case though, the attribute field is text.  Sample values include: "Active", "Inactive", "Needs Review".  I don't care what value gets which colour.  I'm just looking for a simple option to automatically apply some colours without having to add a new Conditional Formatting rule for each possible text value.  The following table should have 3 colours for the Status column.  Client, Status Bob's Burgers, Active Lucy's Salad Bar, Inactive George's Existential Crisis, Active Other George's Pub, Needs Review   EDIT: I reference Conditional Formatting twice in my question.  This question is specifically to do it automatically for a spread of text values, without one rule per text value - no updates for new possible values, no picking individual colours, etc.  This is an optimization for the Conditional Formatting rules already described, and not a question about how to use the feature itself.

I have a column of cells where each cell contains one of the following text values  Optimal Normal High-Normal Mild Moderate  Severe   I would like the cell colour to be a set depending on what the value in the cell is.  For Optimal I'd like a green and for Severe I'd like a red, and for the others I'd like a different colour in between.  How do I do that?


I have an undergrad in mechanical engineering. My Masters, PhD was in Mechanical too. However, I have never been academically strong (grades were majorly C and B+). I had to retake advanced mathematics, continuum mechanics and Finite element analysis course during my undergrad as I had flunked the courses.  However, I always enjoyed the field of computational mechanics, how materials behave is something I enjoy thinking about. I pursued the field in my Masters and PhD, inspite of not taking any grad level course during the programmes. My committee never instructed me to take the courses, I thought self study would suffice.  I have a PhD in application of computational mechanics, I have 3 first authored papers in materials science journals, not mathematics intensive journals. I am worried about my future in the field. I am continuing with a postdoc under my PhD advisor for a year and am searching for other positions.  I shouldn't have pursued higher studies, atleast not in a field I have theoretical deficiency. I still love my field, but I am still afraid of the theoretical papers in my field. My work (application focused) is not mathematically intensive and is pretty straightforward. I can argue that given a direction, one doesn't need a masters or PhD to do what I do.  I know, there won't be anyone who had experiences similar to mine. It is always expected that people go for highers studies in subjects they are good in. I did the other way round. What should be my course of action now to have a potential academic career? I think I am up for a dissappointing career outcome, but still I want to give it a try.

I did my PhD in computational materials science. I used molecular dynamics simulations and finite element method to carry out my research investigations. I have published several publications and about to defend my thesis next month.  But, I did not take any classes on finite element analysis or molecular dynamics during my undergraduate or graduate school. Whatever theory I know about them is through self study and through work experience. I understand the concepts of the methods, but I never got a chance to have a formal course with exams and assignments on the subjects. So, my self study hasn't been very meticulous.  Now, I feel like a charlatan, and don't feel like I deserve a PhD degree. I am also feeling lost and like a loser. Saddest thing is that, I passed all my qualifiers, proposals and no one questioned my abilities.   I don't know what can I do to feel confident again. I am 31 years old. I always thought that by the end of PhD I will be a confident researcher.


Consider this question on Super User:    Essentially, mapping an exported  list towards creating a whitelist for cookie management.  Should I formulate an approach/ script/ program via...?        It could possibly be a mix/ mid point between them?  Or another Stack Exchange site?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I confuse that the difference of Residuals deviance between binary and count data of the same data, by logistic regression in R. I'd like to know the way to calculate the both Residual deviance. Please give me some advice.  binary data  x<-c(2,2,2,2,2,3,3,3,3,3,5,5,5,5,5,6,6,6,6,6) yesno<-c(1,1,0,0,0,1,0,0,0,0,1,1,1,0,0,1,1,1,1,0) modelb<- glm(yesno~x,family=binomial) (resultb<-summary(modelb)) #            Estimate Std. Error z value Pr(>|z|) #(Intercept)  -2.0608     1.3486  -1.528    0.126 #x             0.5152     0.3147   1.637    0.102 #    Null deviance: 27.726  on 19  degrees of freedom #Residual deviance: 24.744  on 18  degrees of freedom #AIC: 28.744  deviance(modelb) #[1] 24.74444 -2*logLik(modelb) #'log Lik.' 24.74444 (df=2)   count data  x<-c(2,3,5,6) yes<-c(2,1,3,4) no<-c(3,4,2,1) modelc<- glm(cbind(yes,no)~x,family=binomial) (resultc<-summary(modelc)) #            Estimate Std. Error z value Pr(>|z|) #(Intercept)  -2.0608     1.3486  -1.528    0.126 #x             0.5152     0.3147   1.637    0.102 #    Null deviance: 4.2576  on 3  degrees of freedom #Residual deviance: 1.2762  on 2  degrees of freedom #AIC: 13.096  deviance(modelc) #[1] 1.276154 -2*logLik(modelc) #'log Lik.' 9.096343 (df=2)

In R, there are three methods to format the input data for a logistic regression using the glm function:    Data can be in a "binary" format for each observation (e.g., y = 0 or 1 for each observation); Data can be in the  (e.g., y = cbind(success, failure)) with each row representing one treatment; or Data can be in a weighted format for each observation (e.g., y = 0.3, weights = 10).   All three approach produces the same coefficient estimates, but differ in the degrees of freedom and resulting deviance values and AIC scores. The last two methods have fewer observations (and therefore degrees of freedom) because they use each treatment for the number of observations whereas the first uses each observation for the number of observations.  My question: Are there numerical or statistical advantages to using one input format over another? The only advantage I see is not having to reformat one's data in R to use with the model.   I have looked at the , searched on the web, and this site and found one tangentially related , but no guidance on this topic.   Here is a simulated example that demonstrates this behavior:  # Write function to help simulate data drc4 <- function(x, b =1.0, c = 0, d = 1, e = 0){     (d - c)/ (1 + exp(-b * (log(x)  - log(e)))) } # simulate long form of dataset nReps = 20 dfLong <- data.frame(dose = rep(seq(0, 10, by = 2), each = nReps)) dfLong$mortality <-rbinom(n = dim(dfLong)[1], size = 1,                               prob = drc4(dfLong$dose, b = 2, e = 5))  # aggregate to create short form of dataset dfShort <- aggregate(dfLong$mortality, by = list(dfLong$dose),                       FUN = sum) colnames(dfShort) <- c("dose", "mortality") dfShort$survival <- nReps - dfShort$mortality  dfShort$nReps <- nReps dfShort$mortalityP <- dfShort$mortality / dfShort$nReps  fitShort <- glm( cbind(mortality, survival) ~ dose,                   data = dfShort,                   family = "binomial") summary(fitShort)  fitShortP <- glm( mortalityP ~ dose, data = dfShort,                    weights = nReps,                        family = "binomial") summary(fitShortP)  fitLong <- glm( mortality ~ dose, data = dfLong,                  family = "binomial") summary(fitLong)


I just created a bootable USB Linux Mint image. Everything worked fine but now i cannot format my USB pend drive. I tried to use dd if=/dev/zero of=/dev/sdb and udo mkfs -t vfat /dev/sdb but these gives me an error:unable to open /dev/sdb: Read-only file system. I also tried to use the command sudo hdparm -r0 /dev/sdb , and this gave me the following output:   /dev/sdb:  setting readonly to 0 (off)  readonly      =  0 (off)   But didn't solve the problem.  Do you have any suggestion to help me?

I recently made my pen-drive bootable with Ubuntu 14.04. But I need to unboot my pen-drive now. I formatted my pen-drive once,But the size of the pen-drive still shows 2.25 MB. Whereas,this is an 8GB pen-drive. How can I get rid of this problem. I'm still using Windows 7.


vector erase function brings up an error whereas clear function works. What is the reason for this..?      #include <algorithm> #include <vector> #include <iostream> struct person_id{     person_id() = default;     person_id(int id) : p_id (id) {}      bool operator==(const person_id& other) { return p_id == other.p_id; }     int p_id; }; using std::cout; using std::endl;  int main(int argc, char* argv[]) {     std::vector<person_id> people;      person_id tmp_person;     tmp_person.p_id = 5;     people.push_back(tmp_person);      people.erase(5); // error : “No matching function for call 'erase'     people.clear(); // works      return 0; }

I want to clear a element from a vector using the erase method. But the problem here is that the element is not guaranteed to occur only once in the vector. It may be present multiple times and I need to clear all of them. My code is something like this:  void erase(std::vector<int>& myNumbers_in, int number_in) {     std::vector<int>::iterator iter = myNumbers_in.begin();     std::vector<int>::iterator endIter = myNumbers_in.end();     for(; iter != endIter; ++iter)     {         if(*iter == number_in)         {             myNumbers_in.erase(iter);         }     } }  int main(int argc, char* argv[]) {     std::vector<int> myNmbers;     for(int i = 0; i < 2; ++i)     {         myNmbers.push_back(i);         myNmbers.push_back(i);     }      erase(myNmbers, 1);      return 0; }   This code obviously crashes because I am changing the end of the vector while iterating through it. What is the best way to achieve this? I.e. is there any way to do this without iterating through the vector multiple times or creating one more copy of the vector?


I've written a proof that $f\left(x\right)=\frac{1}{x}$ is not uniformly continuous on the interval $(0,1)$ and would like to know if it is correct. Here's what I've got.      In order to show a function $f$ is not uniformly continuous on $A$, it   suffices to show there exist two sequences $(x_n)$ and $(y_n)$ in $A$   and an $\epsilon_0>0$ satisfying $\lim(|x_n-y_n|)=0$ but   $|f(x_n)-f(y_n)|\ge\epsilon_0$.      Let $x_n=\frac{1}{n}$ and $y_n=\frac{2}{n}$, with $n\ge3$, and set   $\epsilon_0=\frac{3}{2}$. Then $\lim(|x_n-y_n|)=0$, but       $\left|\frac{1}{x_n}-\frac{1}{y_n}\right|=\left|n-\frac{n}{2}\right|=\frac{n}{2}\ge\epsilon_0=\frac{3}{2}$,   as desired.

My questions are about the reasoning made in the note  (which is in Norwegian).   To prove that $f(x)=\frac{1}{x}$ is not uniformly continuous, the authors use the following "result" (Sats 2.12 in the note, which I translate below):  Result 2.12: If for every $h>0$ we have that $|f(x+h)-f(x)|$ is unbounded on $I$, then $f$ is not uniformly continuous on $I$.  Proof: The result follows directly from the definition of uniform continuity.   In Example 2.14 (Eksempel 2.14), the authors look at  $$|f(x+h)-f(x)|=\left|\frac{1}{x+h}-\frac{1}{x}\right|=\left|\frac{h}{x(x+h)}\right|.$$ They then claim that the above quantity is not bounded for any $h>0$, since   $$\lim_{x\rightarrow 0}\left|\frac{h}{x(x+h)}\right|=\infty.$$  Question 1: Is it not possible to choose $h=x^2$, thereby obtaining   $$\frac{h}{x(x+h)}=\frac{1}{\frac{x}{h}(x+h)}=\frac{1}{x(1/x+1)}=\frac{1}{x(1/x+1)}=\frac{1}{1+x}\rightarrow1 \text{ as }x\rightarrow 0.$$  Therefore, |f(x+h)-f(x)| is not unbounded, so we cannot use the result "Result 2.12". Is my argumentation correct?? Is it OK to choose $h$ like I have done?   Question 2: However, it seems correct to me that my argumentation is all you need to prove that  $f(x)=\frac{1}{x}$ is not uniformly continuous on (0,1). Here $x_1=x,x_2=x+x^2$, so that $|x_1-x_2|$ can be made arbitrarily small. However $|f(x_1)-f(x_2)|=1$, which stays the same regardless of how small we make $|x_1-x_2|$. Is this correct?


Can I run this on a usb hard drive on my desktop that is currently running windows xp I do not have enough space to partition my drive ?

I am new to ubuntu and i would like some help. I have a laptop with windows 7 installed but i would love to have ubuntu too because it's a great OS. So i would like to install ubuntu on an external usb hard drive (320 - 500 GB) and i have some questions about that :   Do i need a usb external hard drive which will be compatible with ubuntu - linux ? or i can do it with any hard drive  If i make a partition on it for ubuntu staff will i be able to use it and save other staff in the usb hard drive (movies,songs,documents etc) ? If i have ubuntu installed on the usb hard drive will i be able to boot ubuntu from any pc ? Are my changes going to be saved normally or my settings will be lost after shut down ?   Waiting for your answers, if something is not explain well tell me to try explain it better . Thank you!


Two point masses m1 and m2, separated initially by distance d, move towards each other under mutual gravitational force. Find the time they take to collide? The main problem I'm having is to solve the differential equation...

My friend and I have been wracking our heads with this one for the past 3 hours... We have 2 point masses, $m$ and $M$ in a perfect world separated by radius r.  Starting from rest, they both begin to accelerate towards each other. So we have the gravitational force between them as:  $$F_g ~=~ G\frac{Mm}{r^2}$$  How do we find out at what time they will collide?  What we're having trouble with is this function being a function of $r$, but I have suspected it as actually a function of $t$ due to the units of $G$ being $N(m/kg)^2$.  I've tried taking a number of integrals, which haven't really yielded anything useful.  Any guidance?  No, this is not an actual homework problem, we're just 2 math/physics/computer people who are very bored at work :)


(Note: another similar question from a few years ago yielded nought but speculation. I have at provided some detailed observations in the hope that the community can come up with something rigorous as an explanation...) We disassembled an electronic product and found this interesting pattern of dust on the plastic (ABS, HDPE or similar material)...  Observations:  The dust is easily wiped off. There is no cooling fan in the product and it was situated in an unventilated cupboard.  Any airflow would be a result of thermal convection for the most part. It's an old broadband/DSL router which ran from a 12V wall wart ("double insulated" so no Earth-ground connection). The patterns seem to congregate around some of the minor injection-moulding features (known as "ejector marks", the 4 small circular features are almost co-planar with the main surface surrounding them, they are extremely shallow and have a slightly different surface finish to the rest of the plastic). The appearance of the features ("lightning" springs to mind) suggests to my mind that this is some sort of electromagnetic / electrostatic effect. The plastic is not coated with any kind of electrically conductive EMC coating. The circuitry housed within doesn't seem to indicate any particular correlation between the placement of electronic components and the locations of the dust patterns.  The features of the plastic case seem to be a more significant catalyst for the formations.  Questions:  How do these interesting patterns form? What is the composition of the dust likely to be (e.g. metallic or something else?). Why does the shape of the plastic seem to catalyse these weird shapes? Why the lightning / fractalline appearance?

I took apart my cooling platform Something like this :  And I found something like this inside :       I wonder why around the hollows are the "canyon like" structures.  PS: I also drop this platform on the floor, maybe this could be a reason ?   EDIT :  Everybody seems (except Brandon Enright answer) to ignore the word "dust" in this question. Those structures are not in the plastic itself. It is dust ON the plastic.  Proof :     Completely wiped out with my finger :


I have a btn that when clicked its open popover with three other btn. One of them should trigger Ajax. I'm using data-html="true" in order to set the btn inside the popover. I added a onclick to the delete btn in the popover, but when running the page its just wont appear in the tag, the same with href="javascript:function()".  Any Idea what I can do to call Js function from the btn inside the popover? Html:  <a href="#" class="secondary" role="button" id="mealbtn" data-toggle="popover" data-placement="top" data-content='
 c.mealId == item.mealId).First().RecipeId" class="btn btn-info btn-sm">
' data-html="true" title="@Model.recipesCon.Where(c => c.mealId == item.mealId).First().Recipe.name" >   Js try:  $('#delete-meal-btn').click(function () {         alert('btn clicked');   });

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


I had a lot of opportunities to meet many different people and listen to their stories.  Always I am confused whether I have to use "to Verb" or "Verb+ing". I guess that sentence is the past tense, so I have to use meeting instead of to meet?  And could you tell me if you have a better idea to make that sentence sounds more natural?

As a native speaker of English, the gerund version of this sentence sounds better:  infinitive:     When used together in chains,   extension methods are an unprecedented   tool to produce extremely concise   code.   gerund:     When used together in chains,   extension methods are an unprecedented   tool for producing extremely concise   code.   But how can I explain to someone learning English how to decide in situations like these whether to use the infinitive or the gerund?


I have to draw a table where I need to color the cells brown and the borders with red. After reading a few similar questions, I have figured out how to properly color the cells and have resolved some issued with my pdf viewer. But I have not found a way to change the borders from black to red. Please suggest a way to do this. Thank you. Edit: Adding the packages I have used. For writing my document I saw a YouTube video and just copied all the packages they had used: \usepackage[latin1]{inputenc}   \usepackage{amsmath}   \usepackage{amsfonts}    \usepackage{amssymb}   \usepackage{graphicx}   \usepackage[table]{xcolor}   \usepackage{array}   \usepackage{multirow}

how to make some border lines of a table thick and colored (either vertical lines or horizental lines)?I tried Xcline but could not color it. Also I tried make the cline thick but failed.


As I place an image texture onto a cube, the cube renders transparent, you know those black & white checkerboards.


I have a wordpress with 47 unique posts, also adding new posts 2 times in weeks. Unfortunately my impression and clicks are very low which they use to be higher. I have to mention 2 months ago we were hacked and every page that google crawled was getting redirected to another site which we recovered from that situation but those links are all 404 now (around 3k links) which I made my 404 page to return a 410 header. After we recovered our impression and clicks were growing but then suddenly they start to fall. now my impression is never higher than 100 and clicks are around 2 , 3 MAX. Google and other search engine bots are checking the site, I am asking google to crawl each new post manually and we do have a sitemap too. for plugins I use yoast seo,wordfence,wp super cache and some irrelevant plugins. does these plugins effect my seo in any negative way ? where should I start to look ? are we penalized by google ? if so how can I know for sure and how I can fix it ? I'm completely clueless at this point Thanks for any help

There has been a significant drop (90%) in traffic from Google to one of my well-established sites (6+ years) in the last week. Searches show that the top 3 wide keywords all dropped 4 spots. Searches for other keywords do not show ANY results in the first 10 to 25 pages of results, while previously one 1st or 2nd page at most.  Since there are , the question really is:  What steps are necessary to figure out what caused such a drop?  There have been no major changes during this period or the last month on the site and certainly not in the homepage which has dropped in rank. Over all the years of running this site and plenty of others, I have never experienced this. There are is duplicate content on my site and I have rigorously used canonical links for the last few years to ensure it is not misinterpreted as such.


Is it intentionnal that the chatroom 'frame' eats any text around?

Whenever you post some link that usually converts into one-box, if there's any text after it (space character between the link and text) then it doesn't get converted. Except for chat room links.  Try posting http://chat.meta.stackexchange.com/rooms/89/tavern-on-the-meta asdfasd  I think it's a bug that has to do with user-friendly room titles included in the link, which gets cut off with the rest of the message, without checking first if there is text after the link.


Which one is the better choice at the beginning of a sentence:     Imagine there is ...     or      Imagine that there is ...

He will understand that I was not joking.   He will understand I was not joking.  Which of the sentences is correct? Are there any specific rules about the use of "that" in the sentences I reported as example?


I have this string var a = toNormal("sdf45sdf4sdf45sd4f5s4df"), b = toNormal("fg45df4g5dfg5df"), c = toNormal("s5d4f5sd4fsdfdd5c"); ... other code  how to get "sdf45sdf4sdf45sd4f5s4df", "fg45df4g5dfg5df" and "s5d4f5sd4fsdfdd5c"? my try $pattern = '/a = toNormal("(.*)");/'; preg_match($pattern, $html, $matches);

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


In my answer .  - How can I have "long =" so that the length of the word "de morgan" is equal the length of "="? Thank you.

I have a command that has been floating around in my standard preamble for a while:  \newcommand{\xeq}[1]{\stackrel{\;#1}{\cleaders\hbox{=\!}\hfill}\:}   It is meant to mimic the AMS-LaTeX extendible arrow symbols \xleftarrow and \xrightarrow.   It's not perfect for two reasons:   It does not take the optional lower argument like the AMS \xrightarrow[down]{up} The overlap of the constituent equals signs is slightly visible.   Does anyone have a better command or know of a package with such a command?


This is returned as the last row, the group record ID looks cut off Group_Member__c:{Id=a181K000005jd11QAA, Contact__c=0031K00002tTqaQQAS, Group__c=a171K00000  Query is             list<group_member__c> gmm = ([SELECT id, contact__r.mobilePhoneString__c, group__c from group_member__c where (is_sms_group__c = true and status__c = 'Active')]);         system.debug(gmm);    Maybe the ID is correct and the discrepancy is at system.debug? Edit - just realized the query isn't returning all of the records I need. Double-checked data by creating an equivalent report. Very weird

For the longest time I have been using System.debug(JSON.Serialize(o)) to output objects to the debug log for troubleshooting purposes. This has worked up until my most recent project. Even existing code seems to be having this behavior.  I've tested API versions 41-45 with no luck. The actual line of code I'm using is:  system.debug(json.serialize(accountsToInsert)); // This is a map   I have also tried:  system.debug(json.serialize(accountsToInsert.get(Key)));   AND   Account test = accountsToInsert.get(Key); system.debug(json.serialize(test));   The code is called from a method defined in a VF page action attribute.  Is this just a thing that we have to live with now? Is there another way to get a  full look into the state of an object at run time?


I using typeof to identify the type of an element.  Here is my code:  <script> alert("before = " + typeof test); function test(i) {} alert("after = " + typeof test); </script>   In output I am seeing as:  before = function after = function   When the page loads then the function is not yet defined, then the first alert should say undefined. So why it says function in my output?

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


The vote count in the  itself tells me it has 2 upvotes and 0 downvotes.      But the "achievements" drop-down pane shows +8, which would typically indicate 2 upvotes and 1 downvote.      Indeed, the reputation section of my profile says 2 upvotes and 1 downvote.       I remember that prior to posting this question, I had 1990 reputation. So it looks like the downvote hasn't been counted in my reputation.  But I remember that it was counted at one point, because my reputation went from 1995 to 1993.  I was doing several edits to this question, so it's possible that the downvoter changed his/her mind and removed it or upvoted.  Does this have something to do with caching or something? I wouldn't guess that, since I'm used to votes appearing in all three places immediately.   Feel free to tag this with  if it's appropriate.

A question in my reputation tab shows two downvotes, and my reputation total reflects this:    However, the question itself shows only one downvote:    The downvotes were cast several hours ago, so I don't think I should blame caching.  What's going on?


So i have this application in which I am storing Sockets in an ArrayList on the Server side. When the client closes its application the socket must close as well but It doesnt reflect the changes in the ArrayList in the server.  class arrays {     public static ArrayList<Socket> online_buyer=new ArrayList<Socket>();      public static ArrayList<Socket> online_seller=new ArrayList<Socket>();          public static ArrayList<String> buyer_prod=new ArrayList<String>();  }      public void seller_display()     {         while(true)         {                  if(flag==1)             {                  synchronized(sock)                 {                 for(int i=0;i<arrays.online_buyer.size();i++)                 {                 System.out.println(arrays.buyer_prod.get(i));                 }                 flag=0;                 }             }               check2();          }      }       public void check2()     {         for(int i=0;i<arrays.online_buyer.size();i++)         {             try              {             Thread.sleep(1000);             }              catch (InterruptedException e)              {             e.printStackTrace();             }             **while(!arrays.online_buyer.get(i).isConnected())**              {                 arrays.online_buyer.remove(i);                 arrays.buyer_user.remove(i);                 arrays.buyer_add.remove(i);                 arrays.buyer_prod.remove(i);                 arrays.time.remove(i);                 arrays.buyer_no.remove(i);                 flag=1;                 System.out.println("RECORD DELETED");             }           }      }   public void run()     {     get_details();      } }   Now the statement while(!arrays.online_buyer.get(i).isConnected())  must be while(!false)=true. When i close the socket from the client side as isconnected()method must return false. But this statement never runs to be false even if i close the socket from client.

As a follow up to a , I wonder why it is impossible in Java, without attempting reading/writing on a TCP socket, to detect that the socket has been gracefully closed by the peer? This seems to be the case regardless of whether one uses the pre-NIO Socket or the NIO SocketChannel.  When a peer gracefully closes a TCP connection, the TCP stacks on both sides of the connection know about the fact. The server-side (the one that initiates the shutdown) ends up in state FIN_WAIT2, whereas the client-side (the one that does not explicitly respond to the shutdown) ends up in state CLOSE_WAIT. Why isn't there a method in Socket or SocketChannel that can query the TCP stack to see whether the underlying TCP connection has been terminated? Is it that the TCP stack doesn't provide such status information? Or is it a design decision to avoid a costly call into the kernel?  With the help of the users who have already posted some answers to this question, I think I see where the issue might be coming from. The side that doesn't explicitly close the connection ends up in TCP state CLOSE_WAIT meaning that the connection is in the process of shutting down and waits for the side to issue its own CLOSE operation. I suppose it's fair enough that isConnected returns true and isClosed returns false, but why isn't there something like isClosing?  Below are the test classes that use pre-NIO sockets. But identical results are obtained using NIO.  import java.net.ServerSocket; import java.net.Socket;  public class MyServer {   public static void main(String[] args) throws Exception {     final ServerSocket ss = new ServerSocket(12345);     final Socket cs = ss.accept();     System.out.println("Accepted connection");     Thread.sleep(5000);     cs.close();     System.out.println("Closed connection");     ss.close();     Thread.sleep(100000);   } }   import java.net.Socket;  public class MyClient {   public static void main(String[] args) throws Exception {     final Socket s = new Socket("localhost", 12345);     for (int i = 0; i < 10; i++) {       System.out.println("connected: " + s.isConnected() +          ", closed: " + s.isClosed());       Thread.sleep(1000);     }     Thread.sleep(100000);   } }   When the test client connects to the test server the output remains unchanged even after the server initiates the shutdown of the connection:  connected: true, closed: false connected: true, closed: false ...


I made an array containing 24 elements. I want to iterate a loop 24 times, each time taking all the elements from the array and making a unique sequence.   For example:  for(int i=0; i<4 ; i++)   array = [a,b,c,d]   The output I want is:    iteration1: abcd iteration2: acdb iteration3: bacd iteration4: dcab  The specific order is not important. What's important is the sequence for each iteration must be unique.   Can somebody recommend a way to this? Perhaps there is some function for randomisation in C#?

What is the best way to randomize the order of a generic list in C#? I've got a finite set of 75 numbers in a list I would like to assign a random order to, in order to draw them for a lottery type application.


I need to read a file given to me in a script i made, the file can be any name, the input is as follows     ./Naloga1.sh tocke < somefile.txt   This is the code i have:   while read line do   echo $line done <    The problem is, firstly if i put the script name at the done, it will read all the lines in my file - the last one. And secondly how can i acess the files name to then output it? If i echo $1 $2 $3, $1 comes as tocke and $2 and $3 dont exist

I have a complex command that I'd like to make a shell/bash script of.  I can write it in terms of $1 easily:  foo $1 args -o $1.ext   I want to be able to pass multiple input names to the script. What's the right way to do it?    And, of course, I want to handle filenames with spaces in them.


Here we encounter a strange thing about waves; a very simple thing . . .namely, we cannot define a unique wavelength for a short wave train. Such a wave train does not have a definite wavelength; there is an indefiniteness in the wave number that is related to the finite length of the train. . .$^\text{1}$   Now, why can't we define a unique wavelength for a wave packet?  $^\text{1}$ Lectures on Physics by Feynman, Leighton , Sands.

My textbook and the following extract from feynman's lectures present the same idea regarding wavetrains and uncertainty in their wavelengths. Why is it that a wavetrain confined to some space has an uncertainty in its wavelength or the wave number? Is not a confined wave-train equivalent to a burst of successive pulses which can have a definite wavelength according to their origin or nature of origin.   Next, i understand that the De Broglie relation relates the uncertainty in wavelength to the uncertainty in momentum but what links the finiteness of the wave-train to the uncertainty in position?


I'm using lstinputlisting to include code examples in my thesis, but as I'm working on the text and the code simultaneously, the code is not yet fixed in length. Is there any way that I can define a range of lines in my code dynamically so that the imported lines will be updated if I change the code (somehow as I'd do in iPython)?  At the moment I'm only using  as in this script example:  \lstinputlisting[language=Python, firstline=135, lastline=145]{code/inv1.py}   But when I add a line to my script, the range is out-of-phase with some funny results.   A dream scenario would be something like this pseudo code:  \lstinputlisting[language=Python, firstline=label{#loop2}, lastline=label{#end_loop2}]{code/inv1.py}   Can minted or another listing package be the solution? My code and scripts are in C# and Python.

Is there a way to input particular sections of source code using \lstinputlisting (from the listings package) in a flexible way?  It's possible to use the firstline and lastline options to input particular line ranges, but this isn't robust to changes to the source file.  For example, suppose that the input source file is:  int square(int x) {   return x * x; }  int cube(int x) {   return x * x * x; }   In my LaTeX document, I can include the cube procedure using the command \lstinputlisting[firstline=5,lastline=7]{source.c}.  But suppose I later decide to rewrite the cube procedure.  The input source file becomes:  int square(int x) {   return x * x; }  int cube(int x) {   int x2;   x2 = square(x);   return x * x2; }   Now my LaTeX document will not show the final two lines of cube because the listing uses only lines 5-7.  I could manually update the line range, but this is tedious and error-prone.  Is there a way to mark sections of source code with some kind of label so that the listing will be robust to these sorts of changes?  For instance, perhaps the input source file would be something like  int square(int x) {   return x * x; }  /**\beginlabel{lst:cube} **/ int cube(int x) {   int x2;   x2 = square(x);   return x * x2; } /**\endlabel{lst:cube} **/   so that I could use something like \lstinputlisting[lines=lst:cube]{source.c} to include the section that I want and remain robust to changes.  I am open to using other packages for source code listings (e.g., minted) if helpful.


R1  = 2Ω R2 >= 22kΩ D2 = 1N4148, or 1N400x (x is a number) U1 =  (MIC4452YN is the through-hole version) Q1 =    So basically I want to run the circuit from a NE555 timer because I don't have the MIC4452 to drive the MOSFET. I will be using an  MOSFET. I have no clue how to wire everything up ... and other components I need. If someone could walk me through the connections for the circuit... ?

Hi I am trying to run a slayer exciter using a MOSFET.     Tells to use these parts    R1 = 2Ω R2 >= 22kΩ D2 = 1N4148, or 1N400x (x is a number) U1 =  Q1 =    Except I don't have a MIC4452 to drive the MOSFET.  I think I might be crazy - I have no idea what I am doing. Can a NE555 run a MOSFET? How would I do that? Maybe another way without using a gate driver?


I'm writing this with a throwaway account, for obvious reasons; if this is inappropriate or runs counter to the rules of the site in some way, please let me know. I'm an undergraduate student in the UK, and am planning on applying to PhD programs next year. For context, I'm looking primarily at programs in the US, and am hoping to specialize in applications of model theory to algebra and geometry. For the past year or so, I have been a reasonably active contributor on ; at present I am self-studying some material, and so have been asking occasional questions when getting stuck on a proof or exercise in the textbook I'm reading, but for the most part I enjoy answering questions on the site, generally in algebra or logic. (I'll avoid specificity, again for obvious reasons.) Most of the questions I've answered are pretty standard, with a handful of (at least for me) less obvious ones, but my activity on the site has been largely well-received, at least as far as I can tell. So, in short, my question is whether a stackexchange profile can be a worthwhile inclusion in graduate school applications. I see a few pros and cons; on the one hand, I'm (embarrassingly) a bit proud of my contributions here! I really enjoy sharing my love of math and helping people resolve questions (teaching is one of the things I'm most excited for in the future), especially questions that are particularly interesting or thought-provoking. I also enjoy mathematical writing, and one of my favorite parts of the site is that it's an excellent venue for sharpening one's expository abilities. These are important things to me, and I feel that including the math.SE profile in an application would be a good way of indicating this. I also believe (read: hope) that the questions I've posted are worthwhile, and indicate a good understanding of and level of thought about the material I'm studying. On the other hand, I'm concerned an application committee might see the time spent on the site as frivolous or wasted, somehow; the site is certainly a source of procrastination for me, and my involvement may give an undesirable impression of being too vested in virtual things. Furthermore, while I'm generally happy with my contributions to the site, I'm also aware that one's own view of such things may be very different than the view of an experienced mathematician; what if my answers seem overcomplicated or my questions seem silly? In any case, these are some of the things I've been thinking about; any thoughts would be greatly appreciated.

I think contributions to StackExchange constitute a valuable thing for an academic to do. In many cases such contributions are directly related to the aims of an academic department: community engagement, building new knowledge, etc. This is particularly clear for sites that directly align with a particular academic discipline (e.g.,  , , ).  However, many people in academia have not heard of StackExchange. They often won't have heard about the reputation system. They may not be aware of the high quality content that often appears.  Thus, as an academic, how should you share your achievements on the StackExchange network in contexts where how your performance is evaluated has material consequences? (e.g., a CV, job interview, grant application context, promotion context)


My battery is broken, so it's always at 0%. How can I remove the annoying notify-send with beep warning about low battery?  Things I've tried so far:   Altering /etc/UPower/UPower.conf dconf-editor → org → gnome → settings-daemon → plugins → power (which  seems to save settings to file UPower.conf) service upower stop service acpid stop Various GUI power related options in System Settings   Nothing seems to stop the damn popup.

I have the low battery alarm disabled in the BIOS settings on my Lemur laptop, but the alarm still sounds when the battery is low.  The sound is a very loud and annoying beep that repeats every couple seconds. The laptop will last another 20 minutes without being plugged in so the battery level isn't properly being detected anymore anyways. I found that if I mute my audio then the beep stops but I obviously cannot listen to anything anymore. If i turn the volume back on even to just 1% the battery alarm is audible again at full volume.  I remember there used to be a mixer somewhere that could control the internal speaker and so if I could find that again then maybe i could mute that and fix this problem.   I have Ubuntu 14.04.  Note that I'm not talking about a low battery notification, which is something through gnome; as opposed to a low battery ALARM which is this very loud beep every couple seconds coming through the internal speaker.  Nevertheless, here are my gnome power settings:  $ gsettings list-recursively org.gnome.settings-daemon.plugins.power org.gnome.settings-daemon.plugins.power button-power 'interactive' org.gnome.settings-daemon.plugins.power critical-battery-action 'nothing' org.gnome.settings-daemon.plugins.power percentage-low 1 org.gnome.settings-daemon.plugins.power priority 0 org.gnome.settings-daemon.plugins.power lid-close-suspend-with-external-monitor false org.gnome.settings-daemon.plugins.power idle-dim false org.gnome.settings-daemon.plugins.power button-hibernate 'hibernate' org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend' org.gnome.settings-daemon.plugins.power button-sleep 'suspend' org.gnome.settings-daemon.plugins.power button-suspend 'suspend' org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0 org.gnome.settings-daemon.plugins.power time-low 1200 org.gnome.settings-daemon.plugins.power lid-close-ac-action 'nothing' org.gnome.settings-daemon.plugins.power notify-perhaps-recall true org.gnome.settings-daemon.plugins.power percentage-critical 1 org.gnome.settings-daemon.plugins.power percentage-action 1 org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend' org.gnome.settings-daemon.plugins.power time-action 120 org.gnome.settings-daemon.plugins.power lid-close-battery-action 'nothing' org.gnome.settings-daemon.plugins.power idle-brightness 30 org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0 org.gnome.settings-daemon.plugins.power time-critical 300 org.gnome.settings-daemon.plugins.power active true org.gnome.settings-daemon.plugins.power use-time-for-policy false $