I'm curious about the JQuery html selector limitation. For a test, I wrote a simple code that add before/after an element something else. And I found that the new element isn't detected by the selector.              $("li").dblclick(function() {                 $(this).before("
*****
");                 $(this).after("
*****
");             });   I add two
 when I click on a
 (one before and one after). The code work for all of them excepted the new one. If I click on a
*****
 nothing happen.  Does JQuery use a list of all html tags and forget to update it when adding some code ?  If someone can explain that for me, I dind't find anything useful on the web :/  EDIT: I don't ask how to use it, I want to find documentation on why there are a difference between previous element and new one


I just fresh installed 13.10, but now the teamviewer.deb file won't install due to an unresolvable dependency: lib32asound2. I found a download link  but also this package won't install due to an unresolvable dependency: libasound2 (= 1.0.25-4ubuntu4)  and help ??


In the default installation, settings.php is located at sites/default/. There are no recommendations in the official Drupal website about changing the location of this file. Doesn't it pose a potential problem of security? I have seen Apache webservers eventually failing to interpret PHP files, and serving the content of the PHP file in pure plain/text format, instead of the supposed HTML content. That would completely expose the database connection user and password, which is not even encrypted. Why does it work this way?


Dealing with floating points: With numpy python in particular

I wanted values like -  1,1.02,1.04,1.06,1.08 etc... So used numpy in python:  y = [x for x in numpy.arange(1,2,0.02)]   I got the values-  1.0, 1.02, 1.04, 1.0600000000000001, 1.0800000000000001,   I have three questions here:    How do I get exactly values 1,1.02,1.04,1.06,1.08 etc.... Why correct values for 1.02, and 1.04, and not for 1.0600000000000001,  How reliable our programs can be when we can't trust such basic operations in programs that can run into thousands of lines of code, and we do so many calculations in that? How do we cope with such scenario?   There are very similar questions that address problems with floating points in general and numpy library in particular -       While they address why such a thing happens, here I'm concerned more about how do I deal with such scenario in everyday programming, particularly in numpy python? Hence I've these questions.


I do not know hoe to type this sigma symbol  in latex. Anyone has idea?


What is the .Trash Folder on the NTFS partitions?

When using a dual-boot Windows and Ubuntu. I see that there is a folder created with the name .Trash-1000  in the NTFS partitions.   Could someone explain to me :   What does this folder mean ? For what it is used? Maybe Trash related?  Is it necessary to keep this folder ?


Let $G$ be a non-nilpotent and supersoluble finite group.  $G=Q\ltimes P$ and $|Q: C_{Q}(P)|=q$ is prime, Where $P$ is a group of prime order $p\neq q$.   $Q$ is noncyclic group of order $|Q|=q^{\alpha}$ where $\alpha >2$ and all maximal subgroup of $Q$ diffrent from $C_{Q}(P)$ are cyclic Then every $2$-maximal subgroup of $G$ permutes with all $3$-maximal subgroup of $G$.  I dont have idea ?  What i do? Maximal subgroup of $G$ is not clear for me.    A subgroup $H$ of a group $G$ is called $2$-maximal (or second maximal )in $G$ if $H$ is a maximal subgroup of some maximal subgroup $M$ of $G$.


Can I substitute two wires for one heavier-gauge wire?

Can I substitute two 14-gauge wires together for one 10-gauge wire? Using it from the generator RB-30 remote box, to the transfer switch inside a 6', 10-3 whip in the basement.


If $X$ and $Y$ are iid N(0,1) what is the pdf of $V=XY/\sqrt{(X^2+Y^2)}$.  I have found out the distribution of $1/(X^2)$. So will that be any useful and if yes how ?


nullPointerException for set Alarm Manger in killed application

I want to start my service via Alarm manager. i wrote below code. this code works good when my application to be in background or foreground but when i kill my application (I mean swiping application from recent apps) the program get an error. I don't know what is my problem and how can solve this.  Error:  Caused by: java.lang.NullPointerException at com.company.test.helper.ServiceSchedular.startService(ServiceSchedular.java:74)   I have a class that extends from Application like below:  public class KITILApplication extends Application{  private static Context context; @Override public void onCreate() {     // TODO Auto-generated method stub     super.onCreate();     ACRA.init(this);     ORMDroidApplication.initialize(this);     KITILApplication.context=getApplicationContext(); }  public static Context getappContext(){     return KITILApplication.context; } }   and my ServiceSchedularService for scheduling alarms for starting service is in below:  public class ServiceSchedular {      //Called from my main activity      private ServiceSchedular() {         alarmManager = (AlarmManager) KITILApplication.getappContext().getSystemService(Context.ALARM_SERVICE);      }      private static void startService(Date startDate) {     uniqueIdForStart = (int) Calendar.getInstance().getTimeInMillis();     //PlEASE NOTICE: I checked my application via both of startintent(comment startIntent and startIntent)     Intent startIntent = new Intent(KITILApplication.getappContext(), LocationService.class);     //Intent startIntent = new Intent("com.company.test.START_SERVICE");     PendingIntent startPendingIntent = PendingIntent.getService(KITILApplication.getappContext(), uniqueIdForStart, startIntent, PendingIntent.FLAG_UPDATE_CURRENT);     //I get error from below line !! Line = 74     alarmManager.set(AlarmManager.RTC_WAKEUP, millisToStartDate, startPendingIntent);     stopService(startDate); }    public static void checkNextPeriod() {       .        .          startService(new Date(millisDate));  }  }   I have a broadcastReciever that called checkNextPeriod and in checkNextPeriod, i called startService method.  AndroidManifest.xml:  <service android:name=".Service.LocationService">         <intent-filter>             <action android:name="com.company.test.START_SERVICE"></action>         </intent-filter>     </service>   I don't know my problem is for alarmManager object or intent object or application context or another thing. Please help me.


I oneboxed  that contained tags. The result is . But the tags in the onebox don't go to the tags on the site, they go to: https://chat.stackexchange.com//codegolf.stackexchange.com/questions/tagged/number-theory  Can tags in oneboxed messages please link to the actual tags?


Differences between tetrachoric and Pearson correlation

Currently I'm analysing around 300 items in the field of education.  I'm interested in the dimensionality of the dataset. So I compute a matrix of tetrachoric correlation. The goal is to do a factor analysis on this matrix.  By curiosity I compare to a matrix of Pearson correlation, and the results are different. When I compute differences between the matrices I have slight differences : no null mean with min and max ranging from $-0.3$ to $0.3$.  Any idea? Usually you read that, for dichotomous item, values are closed.  Further, I have missing values because, due to very hard and very easy items, some modalities are never observed together. In this case do you have any good proposition (and reasons) to handle this problem? Suppress these items, Imputation, ...


How to replace string in files except with a line begins with #

I've looked at some other questions related to using sed to replace strings, but I'm having trouble figuring out how to apply it to my particular need.  In a case like the snippet below, I want to change the string only on lines that do not begin with a "#":      #####################################     # Blah blah blah string blah blah     #####################################      PKG_NAME="string"     PKG_DESC="string-foo"   I would like the output to read like this:      #####################################     # Blah blah blah string blah blah     #####################################      PKG_NAME="newString"     PKG_DESC="newString-foo"   From what I have gathered, I think I can use find and sed to change all of the strings in all of the files  find . -type f -exec sed -i 's/string/newString/g' {} +   But I am just having trouble figuring out how to add an exception for lines beginning with "#". I'm open to other ways of doing this other than sed, so if there is an easier way please feel free to share.  After reading , I see how to change a string in cases where a line starts with a certain pattern, but what I need is to change lines where the pattern is not found.


NullPointerException at Writer at at org.apache.log4j.helpers.CountingQuietWriter.write

I am getting the below error from a simple line of code having log.info statement   java.lang.NullPonterException     at java.io.Writer.write(Writer.java:157)     at org.apache.log4j.helpers.CountingQuietWriter.write(CountingQuietWriter.java:45)     at org.apache.log4j.WritingAppender.subAppend(WriterAppender.java:310)     at org.apache.log4j.RollingAppender.subAppend(RollingAppender.java:276)     at org.apache.log4j.WritingAppender.append(WriterAppender.java:162)     at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)     at org.apache.log4j.helpers.AppenderAttachbleImpl.appendLoopOnAppenders(AppenderAttachbleImpl.java:66)     at org.apache.log4j.Category.callAppenders(Category.java:206)     at org.apache.log4j.Category.forcedLog(Category.java:391)     at org.apache.log4j.Category.info(Category.java:666)     at com.bizcase.Helper.showTip(Helper.java:32)   Can anyone advice if this issue is encountered?  I am using log4j version 1.2.17 and normal rolling appender .  Its not a NullPonterException for null object.Its coming from log4j library and beyond my control to figure out which log4j property or code is causing this issue.


change in temperature vs change of temperature

The change in temperature may be as much as 200' C.   The change of temperature may be as much as 200' C.     What is the difference  between the change in temperature and  the change of temperature?


How do I share variables between two functions?

So...here is part of my code for a plugin.  I'm a newb of sorts so be kind.  I've read up on global variables but I can't seem to get it to work and I've read you shouldn't use them anyway.  So what would be the best way to write the code below without having to re-declare the variables for each function?  Here is the  if necessary.  // Display the product badge on the shop page  add_action( 'woocommerce_after_shop_loop_item_title', 'wc_simple_product_badge_display_shop', 30 ); function wc_simple_product_badge_display_shop() {     $title = get_post_meta( get_the_ID(), '_wc_simple_product_badge_title', true ); // badge title     $class = get_post_meta( get_the_ID(), '_wc_simple_product_badge_class', true ); // badge class     $duration = get_post_meta( get_the_ID(), '_wc_simple_product_badge_duration', true ); // badge duration     $postdate = get_the_time( 'Y-m-d' ); // post date     $postdatestamp = strtotime( $postdate ); // post date in unix timestamp     $difference = round ((time() - $postdatestamp) / (24*60*60));  // difference in days between now and product's post date      if ( !empty( $title ) && empty( $duration ) || !empty( $title ) && $difference <= $duration ){ // Check to see if there is a title and the product is still within the duration timeframe if specified         $class = !empty( $class ) ? $class : '';         echo '' . $title . '';     } }  // Display the product badge on the single page  add_filter( 'woocommerce_single_product_image_html', 'wc_simple_product_badge_display_single' );     function wc_simple_product_badge_display_single( $img_html ) {     $title = get_post_meta( get_the_ID(), '_wc_simple_product_badge_title', true ); // badge title     $class = get_post_meta( get_the_ID(), '_wc_simple_product_badge_class', true ); // badge class     $duration = get_post_meta( get_the_ID(), '_wc_simple_product_badge_duration', true ); // badge duration     $single_opt = get_post_meta( get_the_ID(), '_wc_simple_product_badge_single_page_option', true ); // badge on single page     $postdate = get_the_time( 'Y-m-d' ); // post date     $postdatestamp = strtotime( $postdate ); // post date in unix timestamp     $difference = round ((time() - $postdatestamp) / (24*60*60));  // difference in days between now and product's post date      if ( !empty( $title ) && empty( $duration ) && $single_opt === 'yes' || !empty( $title ) && $difference <= $duration && $single_opt === 'yes' ){ // Check to see if there is a title and the product is still within the duration timeframe ()if specified) and the checkbox is checked to show on single page view         $class = !empty( $class ) ? $class : '';         echo '' . $title . '';         return $img_html; }      elseif ( $single_opt === 'no' ) { // Check to see if the checkbox is unchecked to show on single page view         return $img_html;     }  }


SharePoint 2010 - How to print InfoPath form for list item

I edited the form for a list item in InfoPath, and when I print, I just want to print the form itself.  It seems when I use the browser's print function, it still pulls up some elements from the page and it cuts off the content if it's longer than the popup window. Also, some of the elements of the form are hidden when I print, so that is not a good option.  I have read that others have attempted to create a custom action that resides in the InfoPath Ribbon, but I have yet to find one that works?  Thoughts?


I don't understand why su - is preferred over su to login as root.


Source:  by Douglas Crockford (2008) Example:  My goal here is to help you to learn to think in JavaScript. I will show you the components of the language and start you on the process of discovering the ways those components can be put together.  Although it is usually the case that you mostly hear people say something like "this will help you become a better person", is there any particular reason as to why he chose not to leave out the to and say help you to learn instead? If you've got something interesting to say, could you please elaborate on it as well? I would very much like to receive some coherent explanation and get this thing finally straight. The only time I know of, though, that you would use the to is when you say it like this:  It helps a lot to think of the rather difficult concept of classes used in modern software development as mere blueprints that architects and builders use to build houses. In life, it really helps to know your times tables by heart because not all the time do you have a calculator on you.  Because the aspect of the verb "help" is a little bit different here. But in all other cases, help do or help you do something is by far more common.


What does this pronoun "them" refer to here?

Lately, I stumbled across a historical source text from Victorian England (Henry Mayhew, London Labour) which had following sentence:      'He told me, at the commencement of his statement, that he was of oppinion that his people were far more speculative than the Gentiles, and therefore the English liked better to deal with them.'    My question is what does the pronoun 'them' refer to? Is it the 'Gentiles' or 'his people'?


jQuery on click function not working after appending list items

I have a simple click event using the on function:  $('#listnav li').on({     click: function(event) {         console.log('hello world')                   },      mouseover: function(event) {         // do something     }  });   This is working for the ul list with id "listnav". But when I am adding new entries to the ul using jQuery's append function, this function is not called on the new added list items. How can I fix this?


Getting PEAR to work on XAMPP (Apache/MySQL stack on Windows)

I'm trying to install , an open-source Microblogging application on my Windows development server using XAMPP as per the . The website cannot find PEAR, and throws the below errors:  Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampplite\htdocs\laconica\lib\common.php on line 31 Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='.;\xampplite\php\pear\PEAR') in C:\xampplite\htdocs\laconica\lib\common.php on line 31   PEAR is located in C:\xampplite\php\pear phpinfo() shows me that the include path is .;\xampplite\php\pear  What am I doing wrong? Why isn't the PEAR folder being included?


Ubuntu 20.04 there is no ksnip in the list of possible applications

I want to open an image in ksnip that is installed as snap package but there is no such program in the list of possible options. What do I do?


Is there a substance that doesn't reflect OR absorb light from the visible light spectrum?

Is there a substance that doesn't reflect or absorb visible light but may reflect light from another spectrum? Is there a theoretical substance that would have these properties?  EDIT: Sorry I wasn't quite clear with my original question. I've updated it to express more what I was thinking. Would a substance be "invisible" if it didn't reflect or absorb light? Does a real or theoretical substance like that exist? I assume we can see glass and so on because it refracts light and to a certain extent reflects it.


If "errored" is not a valid word, then how should I say:     The program errored at line 44   I guess I could say:     The program threw an error at line 44   But why is "errored" wrong? Is there a better alternative?


How can I make usual phone calls using a connected mobile phone?

I have Ubuntu 10.04 installed as a desktop OS and a Symbian-based smartphone (Nokia N79). How can I use my desktop system with a headset to make and receive usual mobile phone calls using a connected (via cable or Bluetooth) smartphone?  Thanks.


F710 lost my nano reciever, can I connect to Logitech unifying receiver?

Hi my problem is exactly as the title says, I'm planning to buy a Logitech unifying receiver so I could use my Logitech F710-Gamepad again. But to play it safe, I need to know first if it would really work before going to the store.


Removing green Xs and red lines in QGIS?

I'm using QGIS 2.18.15 and have somehow ended up with the following on my screen. I've deselected every layer and these green X's and red lines persist. I cannot "undo" to remove them.   What are they & how do I get rid of them?   They may have originally been related to a duplicate node or something like that, but I have no idea what's going on.


Scratch org creation if failing with these 2 symptoms today - why?

The failures are occurring for both our Continuous Integration (CI) builds and out interactive creates. The CI output is:  Run sfdx force:org:create -f config/project-scratch-def.json -a scratch-org -s -d 1 ERROR running force:org:create:  We couldn't find a template with the ID specified in the scratch org definition. If you’re sure the ID is correct, contact Salesforce Support. Error: Process completed with exit code 1.  and when I look at the corresponding Scratch Org Info records I see:  Status: Error Error Code: C-1020  The scratch def is: {   "orgName": "MyOrg",   "edition": "Developer",   "language": "en_US",   "features": ["SharedActivities"],   "settings": {     "opportunitySettings": {       "enableOpportunityTeam": true     },     "lightningExperienceSettings": {       "enableS1DesktopEnabled": true     }   } }  I've found nothing useful Googling both:  We couldn't find a template with the ID specified in the scratch org definition. C-1020  PS Found the C-1020 here in  documentation:  C-1020: Template not found. Either the template doesn't exist (or it was deleted).


Let be $u$ a numerical function defined over $\Omega$, with $u$ measurable, and let $(O_i)_{i\in I}$ be a family of all open sub-sets $O_i$ of $\Omega$, such that $u=0$  almost always except on a set of measure $0$ in $O_i$. Let $O = \cup_{i\in I}O_i$ (Then $u=0$ almost always except on a set of measure in $O$). How can I define in explicit form the set $\Omega\setminus O$?   I trying this ...  $\Omega\setminus O = \{x\in \Omega; (u(x)=0 \text{ and } x\in K\subset \Omega, \text{ where } K \text{ is closed}) \text{ or } (u(x)\neq 0)\}$.  This is correct?


Operation that makes the negative real numbers, $\mathbb{R}_{<0}$, a group

The real numbers with addition, $\left( \mathbb{R}, + \right)$, and the positive-real numbers with multiplication, $\left( \mathbb{R}_{>0}, \cdot \right)$, both are Abelian groups. For reasons of symmetry, I think that it should be also possible to construct the group of negative-real numbers.  How does the operation $$ \ast : \mathbb{R}_{<0} \to \mathbb{R}_{<0} $$ have to look like to make $$ \left( \mathbb{R}_{<0}, \ast \right) $$ an Abelian group?


End user cannot open a .xls report exported from Salesforce KB3115455

Again we are back at ... Removing KB3115455 will resolve this issue. I thought SalesForce fixed this, but appears Microsoft fixed it as well and both solutions are causing the same issue as KB3115262. Can we get these ducks in a row with either one ...


"XXX is hashed" meaning from type command?

I realized that you can use windows dir in ubuntu terminal, when I tried to dig deeper into its implementation, type command tells me it is hashed, I read some  but it didn't explain what "hashed" means


How can I force a \hspace at the beginning of a line?

My code is this:  \setlength{\parindent}{0ex} \texttt{ x\hspace{1ex}\hspace{1ex}\hspace{1ex}y \newline \hspace{1ex}\hspace{1ex}\hspace{1ex}\hspace{1ex}y }   What I'd like to see is:  x   y     y   What I actually see is:  x   y y   I've tried various other ways of inserting a space. So far, they've all resulted in leading whitespace being ignored.  I've also tried using \verbatim and \alltt but they eat too many of the other commands that I need preserved (not shown in the example above).  I suppose I could (in the script that emits the LaTeX) count the leading spaces in each line and use different \parindent values. I'm looking for something more elegant first.


How many mls of vodka should i add to 400ml of beer so that the resulting mixture contains 12% alcohol?

Assuming that beer contains 5% alcohol while vodka contains 40%


Turn off the link hover statusbar in Google Chrome

I want to turn off the feature where whenever I hover over a hyperlink and in the bottom lefthand corner it shows a light blue hover tooltip about where that link goes.   Why do I want to turn it off? It's annoying to me. I am distracted as I work. None of the other browsers do it. Besides, it serves little purpose because it can be spoofed with the onmousedown event on a link. Take for instance ads on Facebook -- those spoof.   I really don't care where a given link goes and wish I could turn that feature off, even if I have to install a Google Chrome Extension.   So, is there a fix to turn the annoying link hover tooltip feature off?


Would the 40mm pancake or 50mm prime be better for street photography with a Canon APS-C camera?

I have a Canon EOS 600D, and I already have 18-55mm,55-250mm.  I plan to buy a new lens for street photography.  I already have picked out one of the following lenses:   40mm STM(pan cake).  EF 50mm f/1.8.   Which is best one to buy for street photography use?


I have a url:   and I Rewrote it to  successfully. But When I browse , it wont redirect to . Is there anyway to both redirect and rewrite it?  My .htaccess:  RewriteEngine On RewriteCond %{QUERY_STRING} ^c=([a-zA-Z][a-zA-Z])$ RewriteRule ^/index.php$ /%1%2? [R=301,L] RewriteRule ^([a-zA-Z][a-zA-Z])$  i.php?c=$1$2 [NC,L]   Thanks  Update #1: I want to redirect from domain.com/i.php?c=PT -> domain.com/PT.  I don't have index.php file.


How to prove that both f(x) and its derivative decay to zero, as x grows to infinity,

The problem statement is:  Prove: If $f(x)$ is differentiable for x>0 and   $$\lim_{x \to \infty}  (f(x)+\frac {df}{dx}(x)) =0$$  and if   $$\lim_{x \to \infty} f(x)$$ exists, then    $$\lim_{x \to \infty} f(x) = \lim_{x \to \infty} \frac{df}{dx}(x)=0$$  My work:  I don't see how the differentiability assumption on f can be used (or is even needed?), but I have that, for every $\epsilon$>0, there exists M = $max(M_1,M_2)$, such that x>M implies that  $$|f(x)+ \frac{df}{dx}(x)| < \epsilon$$ $$\implies-\epsilon < f(x) +  \frac{df}{dx}(x)  < \epsilon$$ $$\implies -\frac{df}{dx}(x) -\epsilon < f(x)   < -\frac{df}{dx}(x) +\epsilon$$  and since by assumption we know that the limit at infinity for f(x) exists, then the limit must be $-\frac{df}{dx}$, by the last inequality above.    Now I think the goal is to just show that the limit at infinity of $|\frac{df}{dx}|=0.$  Then we would have the desired equality, by the Squeeze Theorem.  But what can I say about the limit of $|\frac{df}{dx}|$?  Thanks,


I am currently reading what functions are in c++. It says that they are "artifacts that enable you to divide the content of your application into functional units that can be invoked in a sequence of your choosing.A function, when invoked, typically returns a value to the calling function."   It then goes on to say that main() is recognized by the compiler as the starting point of your c++ application and has to return an int (integer).  I don't know what is meant by 'has to return an integer'. From my (extremely limited experience) int main () is the start of your application. But what is meant by 'has to return an int'?. This is also intertwined with me not understanding 'typically returns a value to the calling function'


The title pretty much states my question here. I've held a T6i (very smooth feeling, good autofocus) and a 5D2 (definitely higher build quality, a full-frame which I would prefer). Never held a 1Ds3 but I did get an opportunity to play with a 1D2 and it felt old and clunky, although well built.  I'm not too concerned about video quality, or even whether video is possible - I don't shoot video seriously whatsoever. I do enjoy good resolution (20MP or above seems to be comfortable) and subject tracking/AF during continuous fire. I'm also definitely going for a Canon since I can adapt my dad's professional M42 lenses - no AE/AF but buying new lenses that cover the same breadth of focal lengths would cost thousands.  I was leaning towards the 5D2 for it's full-frame sensor and high ISO capability and current price point. However, a recent trip to a camera shop where I got to play with a T6i and a 1D2 made me reconsider - the T6i focused much faster, and the 1D2 definitely felt like I would damage the floor more than the camera if dropped. I don't have a particular area of photography I'm interested in, but I'd like the camera to last and take high quality images. What's a good choice here?


Seeing own posts that have been flagged in the 10k tools

I was able to see , which has been flagged as not an answer, while going through the review tools. Is this supposed to be possible, or is this a glitch? If it's meant to be possible - what's the point of it? Surely being the OP I'm going to be biased and most likely wish to choose to disagree with the flags...    update:   I've been able to select "flag or disagree" and then say "I disagree"...   So, would there be some gaming involved here, if I was to agree with the flag, then delete my own answer (would I get a helpful flag for that), then undelete it (still leave my answer there)...?  However, as expected, it now appears to have disappeared from the queue as expected (or at least I assume it has, as it hasn't appeared in the 50 from multiple page reloads anyway...)  And here it is in flag history:


Old science fiction movie where main characters are launched into a star or some sort of anomaly and die

A couple years ago, I watched an old movie (Made a little before or a little after Star Wars) about these people who were in this large ship, and I remember that there was only other one human on it, directing an army of physically altered human slaves. There was something about that human being one of the main characters’ parent’s friend, or something like that. The slaves turned on the main characters. I remember specifically a scene where one of the main characters is thrown into a hole that electrocutes and kills them. Also, at the end, there was something about the main characters being launched from the ship into a star or something.


I have a Samsung Galaxy J3 prime.it was factory reset and now won't let me log in to the internet. I don't have the Google account email address


Working for Stack Exchange, who and how?

I would like to know, how can a user become a Stack Exchange employee? What if I've asked a lot of questions and earned good badges and a lot of points? How is it possible? I've read Stack Exchange employs some users to post questions and answer answers. Is this true? What about other jobs with Stack Exchange, what are they, and how could it be possible to get them?  Thanks.


Equation of plane containing the line and lying at a distance from the point

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've got an app where users can place orders for recurring delivery of a particular service.  The orders table has columns service_id and state, where service_id links to the service the user has ordered and state can be active or inactive, reflecting whether the user currently wants to receive that service or not. Users can toggle orders on and off as they please.  When a user turns an order on or off (active/inactive) I need to track this, and I need to be able to query for whether an order was active or inactive on a given date.  My question is: What's the best way to to model something like this, specifically so that I can easily write a query like "all orders that were active on (date)"?  I've thought about making a orders_states table with order_id, state, and date, where each change create a row with the state that was set and the date it was set, but I'm not 100% sure about how I'd query it to get the past state on an arbitrary date, or if there's a better way to model this.  I'm testing / prototyping on this now, but I'm obviously not a SQL expert and would love some suggestions from the pros here. Thanks!  (I'm using Postgres 9.4.1.2 in case that matters, but I figure this is more of a generic SQL modeling question)


Why does 64-bit Windows need a separate "Program Files (x86)" folder?

I know that on a 64-bit version of Windows the "Program Files" folder is for 64-bit programs and the "Program Files (x86)" folder is for 32-bit programs, but why is this even necessary?  By "necessary", I don't mean "why could Microsoft not have made any other design decisions?" because of course they could have. Rather, I mean, "why, given the current design of 64-bit Windows, must 32-bit programs have a separate top-level folder from 64-bit programs?" Put another way, "what would go wrong if I somehow avoided the redirection mechanism and forced everything to install to the real C:\Program Files\?"  There are plenty of questions on Super User and elsewhere that assert "one is for 32-bit programs, one is for 64-bit programs", but none that I can find give the reason. From my experience, it doesn't seem to matter whether a 32-bit program is installed in the correct place or not.  Does Windows somehow present itself differently to a program running out of "Program Files (x86)"? Is there a description that shows exactly what's different for a program installed in "Program Files (x86)" instead of "Program Files"? I think it's unlikely that Microsoft would introduce a new folder without a legitimate technical reason.


I have a winform in vs2008 that contains a DataGridView. The datagrid contains a list with several columns. These are fixed width, exept one that I have set up to take whatever space is left and fill the width of the view. The winform is resizeable in all directions.  The issue I am trying to solve is that when I increase the vertical size of the window the scrollbar disappears and the columns snap to the right to fill the extra space. What I would like to happen is that the vertical scrollBar never disappears. Setting ScrollBars to vertical in the properties of the DataGridView does not do this.  Is this at all possible to achieve? And, if so, how do I get the vertical scrollbar to always be visible?


Please suggest me any particular unnecessary file that I can clean to back everything to normal condition(temporarily). (i.e. any log or archieve or anything ). My var/log has only 40MB and Home directory has 3GB of space(so I believe that's not a problem). Other than that what I can clean up to make space.   [user@host]$ df -h Filesystem            Size  Used Avail Use% Mounted on /dev/mapper/vg_inamivm-lv_root                        18G   17G     0 100% / tmpfs                 1.9G     0  1.9G   0% /dev/shm /dev/sda1             485M   71M  389M  16% /boot   I am in a debian machine.   UPDATE1:  output of  cd /; du -sxh *  6.1M    bin 61M     boot 156K    dev 22M        etc 3.3G    home 306M    lib 18M     lib64 16K     lost+found 4.0K    media 4.0K    mnt 408K    opt du: cannot access `proc/18605/task/18605/fd/4': No such file or directory du: cannot access `proc/18605/task/18605/fdinfo/4': No such file or directory du: cannot access `proc/18605/fd/4': No such file or directory du: cannot access `proc/18605/fdinfo/4': No such file or directory 0       proc 208K    root 9.7M    sbin 0       selinux 4.0K    srv 0       sys 8.0K    tmp 536M    usr 187M    var   Update2  Output of ls -la /  dr-xr-xr-x.  22 root root  4096 Aug  7 08:42 . dr-xr-xr-x.  22 root root  4096 Aug  7 08:42 .. -rw-r--r--.   1 root root     0 Aug  7 08:42 .autofsck dr-xr-xr-x.   2 root root  4096 Mar 28 16:53 bin dr-xr-xr-x.   5 root root  1024 Mar 28 16:54 boot drwxr-xr-x.  16 root root  3580 Sep  9 03:13 dev drwxr-xr-x.  69 root root  4096 Aug 23 09:19 etc drwxr-xr-x.   9 root root  4096 Jun 29 16:10 home dr-xr-xr-x.   8 root root  4096 Mar  7  2012 lib dr-xr-xr-x.   9 root root 12288 Mar 28 16:53 lib64 drwx------.   2 root root 16384 Mar  7  2012 lost+found drwxr-xr-x.   2 root root  4096 Sep 23  2011 media drwxr-xr-x.   2 root root  4096 Sep 23  2011 mnt drwxr-xr-x.   3 root root  4096 Mar  7  2012 opt dr-xr-xr-x. 355 root root     0 Aug  7 08:42 proc dr-xr-x---.   5 root root  4096 Aug 17 18:27 root dr-xr-xr-x.   2 root root  4096 May  2 09:13 sbin drwxr-xr-x.   7 root root     0 Aug  7 08:42 selinux drwxr-xr-x.   2 root root  4096 Sep 23  2011 srv drwxr-xr-x.  13 root root     0 Aug  7 08:42 sys drwxrwxrwt.   3 root root  4096 Sep 13 03:37 tmp drwxr-xr-x.  13 root root  4096 Mar 28 17:53 usr drwxr-xr-x.  18 root root  4096 Mar  7  2012 var


Waves are oscillating so the term frequency is associated with them, but what is meant by the frequency of a photon as an equation says $E=hf$? Does this mean that photon also oscillate in a particular direction?


I have a large dataset of global .nc files and I am trying to clip them to a smaller area. I have this area stored as a .shp file. I have tried using GDAL from QGIS but needs to do this by converting each variable and I must select each variable and same shape for all files one by one and with 400 files going trough each variable seems not the best idea. Also this returns .tiff files separated and not the .nc file that I am aiming for. I had this little script but its not doing what I need: import glob import subprocess import os      Shapefile = 'NHAF-250m.shp'  # Create output directory OutDir = './Clipped_Rasters/' if not os.path.exists(OutDir):     os.makedirs(OutDir)  for Image in ImageList:     print('Processing ' + Image)      OutImage = OutDir + Image.replace('.nc', '_BurnedArea_Clipped.tif') # Defines Output Image      # Clip image     subprocess.call('gdalwarp -q -cutline /Users/path/to/file/NHAF-250-vector/ -tr 0.25 0.25 -of GTiff NETCDF:'+Image+":burned_area "+OutImage, shell=True)       print('Done.' + '\n')  print('All images processed.')  I have also tried with import geopandas  import xarray import rasterio import glob  shapefile = 'NHAF-250m.shp'  def shapefile_mask(shapefile) -> np.array:            import pyproj          with fiona.open(shapefile, 'r') as src:             collection = list(src)             geometries = []             for feature in collection:                 geom = shape(feature['geometry'])                 geometries.append(geom)             mask = geometry_mask(                 geometries,                 out_shape=(1440, 720),                 transform=(1.0, 0.0, 0.0, 0.0, 1.0, 0.0),                 all_touched=True,                 invert=True)             shape_mask = xarray.DataArray(mask , dims=("lon", "lat"))             return shape_mask           ImageList = sorted(glob.glob('*.nc'))     print('number of images to process: ', len(ImageList))  shape_mask = shapefile_mask(shapefile)  file_list = sorted(glob.glob('*.nc'))  for file in file_list:     nc_file = xarray.open_dataset(file)     # Then apply the mask     masked_netcdf_file = nc_file.where(shape_mask == True, drop=True)     # store again as netcdf or do what every you want with the masked array     masked_netcdf_file.to_netcdf(OutImage)  But it is returning NaN or 0 for all values in all bands.


Passing array to function with generic data type argument

Why does this work  public E a; public MySortedArray(E asdf){     a = asdf; }   and this doesn't?  public E[] a; public MySortedArray(E[] asdf){     a = asdf; }   How can I achieve the second when let's say I do      MySortedArray<Integer> test = new MySortedArray<>(integersArray);


Knights Tour - What is the relationship between board size and number of tours?

I understand that the total number of Knights tours is known for boards up to 8 x 8.   These are: 1, 0, 0, 0, 1728, 6637920, 165575218320, 19591828170979904  As found here: ""  Could some please explain the relationship between those numbers, or how they are increasing in relation to how board size increases.   Thanks.


In my project I'm sending requests to an api. One of the parameters that I send is datetime. Its format should be like this 2016-05-15T00:00:00.000+0300. I'm taking exactly this as a string and convert it to datetime with this code  var startDate = DateTime.ParseExact("2016-05-15T00:00:00.000+0300", "yyyy-MM-dd'T'HH:mm:ss.fffzzz", System.Globalization.CultureInfo.InvariantCulture); However when I used this, the output becomse 2016-05-15T00:00:00.000+03:00. How can I turn this into a datetime without putting colon in gmt part?


Not getting email notifications on answers and comments

I have read many people that wrote about this but nothing helped so far. I never get any email notification about answers or comments to my questions although my settings are set up to receive them. What am I missing?


How does scope work with try and except blocks in python?

So I am a bit confused about the scoping of variables with try and except blocks. How come my code allows me to use the variables outside of the try block and even the while loop for that matter even though I have not assigned them globally.  while True:         try:             width = int(input("Please enter the width of your floor plan:\n   "))             height = int(input("Please enter the height of your floor plan:\n   "))         except:             print("You have entered and invalid character. Please enter characters only. Press enter to continue\n")         else:             print("Success!")             break print(width) print(height)   Again I am able to print the variables even if they are defined within a try block which itself is within a while loop. How are they not local?


Google Sheets split into new rows while duplicating surrounding row entries

I am creating a spreadsheet for a service drive my non-profit is doing. As people sign up through a Google Form, the information comes in like this:  However, to make it easier on our volunteers, it would be beneficial to have the information split up into a smaller pieces and be more uniform. I need a way for the sheet to do the following:  A way to copy the Parent's First and last name, as well as their Phone Number and Building Pickup number (I.e. Columns A-D), while giving a separate row for each of their children (+their needs on the same row.) A process that can handle a variable amount of children An automated process of handling this information.  The sheet should look like this:  I would greatly appreciate your help!


Why does Ridders' method work as well as it does?

I've just read section 9.2.1 in Numerical Recipes Ed. 3 (Press et al. 2007), which describes Ridders' method of root finding. I understand that allowing for some curvature of the function by linearizing three points with an exponential will probably get you a better approximation and more rapid convergence, but I have no idea how they get that it converges quadratically, and the motivation behind choosing an exponential (rather than e.g. a polynomial) is not clear to me.  So, specifically, I'm wondering (1) why linearize with an exponential, and (2) why the method converges quadratically.  I tried looking for Ridders' original paper "A new algorithm for computing a single root of a real continuous function", but the only copy I could find was in a journal that my school's library does not give me free access to.  UPDATE:  I've realized that the fact that an exponential is strictly positive means that weighting the three points with an exponential won't change their signs. Hence, the root of the linearization will have to land inside the original bracket.  Polynomials, rationals, sinusoids, and logarithms all have positive and negative bits, so using them probably runs the risk of getting bad interpolated roots. One of these squared might be usable, but maybe non-monoticity gives some sort of undesirable effect. Since this is a complete list of all simple functions that I am aware of, exponentials seem to be the only easily available weighting function with this property.  A constant function is also technically single-signed and monotone, but it can't be used to linearize stuff.


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


I'm trying to increase the height of a div to follow the bottom of the page, so far I've tried using height: 50vh but this causes the height to increase proportionally and not in parallel.  If you increase the height of this snippet (in full screen), you'll see what I mean. I basically want the bottom of the coloured div just above the word 'Portfolio', at the bottom of the screen, no matter how much height the page has.    #header-bg {   height: 50vh;   background-color: peachpuff; }  #portfolio {   width: 100%;   text-align: center; }

     Portfolio


Which is the best App Cleaner for Mac. I'm using  at the moment.  Have you other preferences?


Xelatex try lo load russian package if I use only ukrainian

I was preparing several texts in xelatex in Russian, everything was fine. But today I needed to prepare in Ukrainian. Here is an example of a file.  \documentclass[a4paper, openright, 12pt]{extreport} \usepackage[left=15mm,right=85mm,top=15mm,bottom=20mm]{geometry} \usepackage[ukrainian,english]{babel}    %% загружает пакет многоязыковой вёрстки \usepackage{fontspec}                         %% подготавливает загрузку шрифтов Open Type, True Type и др. \usepackage{indentfirst} \usepackage{titlesec,titletoc} \usepackage[final]{microtype}   % -------------- Настраваем шрифты ----------------------------- \setmainfont[StylisticSet=1]{Old Standard}% Основной шрифт текста \defaultfontfeatures{Scale=MatchLowercase}  \selectlanguage{ukrainian} % ================ Настройка некоторых параметров =================| \parindent=25pt %------------------------------Отступ первой строки| % -----------------------------------------------------------------|  \clubpenalty=10000 \widowpenalty=10000 \tolerance=600  \hfuzz=0.2pt %\makeatletter %\renewcommand{\@chapapp}{Розділ} %\makeatother  \overfullrule=1mm \begin{document} \author{Богдан Тертишний} \title{Зимові розповіді}  \chapter{}  Але щоб ви з....  Але ми цураємось....  \end{document}   At compilation I receive an error.      ! Package babel Error: Unknown language `russian'. Either you have   It is unclear why xelatex loads the Russian language?


Is there a rule to determine to which word is a pronoun related?

In the following sentence:     Dogs hate cats as they are naughty.   does the pronoun "they" refer to dogs or cats? In other words, who is naughty here?


Why isn't my dwarf's strange mood being satisfied?

My clothier dwarf has gone into a strange mood and has taken over my clothier's shop. He is demanding the following:   bars... metal cloth... thread blocks... brick   Well, I'm pretty sure I've provided all that, but the dwarf still isn't budging.     In this picture you can see my strange mood dwarf in the clothier shop, a row of plant fiber cloth beneath him, some stone blocks to the right of that, some metal bars above, and some yarn cloth to the right.  So why isnt the dwarf grabbing the materials and starting on his mysterious craft?


How to predict the top microRNAs that bind to 3`UTR of a specific gene

I would like to know whether someone could tell me   1) some of the online programs that will predict the top microRNAs that bind to 3`UTR of a specific gene (for eg-GAPDH).   I am relatively new to the field.  thanks


Questions around the number of subgroups of a $p$-group

Let $G$ pe a $p$ group. I have to show that         the number of nonnormal subgroups is divisible by $p$       the number of subgroups differs from the number of normal subgroups by a power of $p$.   Are there any theorem that can help me to prove this ? We have discussed the Sylow theorems but I don't know how to apply them - if those are the theorems I need. (Does this theorem also hold for infinite groups $G$ ?)


How do I install the latest versions of Firefox and Thunderbird on my PC?

Currently I have Firefox 45.02 and Thunderbird 38.6.0 installed on my PC.  I have downloaded Firefox 55.0.3 and Thunderbird 52.3.0 from the respective websites but how do I run and install these applications.  If I click on the downloads, all I get is a list of files but I do not see a setup-exe file anywhere.  I am not familiar with Linuc commands but what do I need to run and install.  I am running Ubuntu 16.04.  All responses would be appreciated.


Why do non-constant periodic functions have no limit at infinity?

Why do periodic functions (like $\cos$ or $\sin$ or $\tan$) have no limit at infinity?    I can guess that it is because their values don't converge but repeat over and over, but I would like to know what is the formal analytical (that is with $\epsilon$'s and $\delta$'s) proof of the statement.


How can I convert a string length to a pixel unit?

I have a string like this:  string s = "This is my string";   I am creating a Telerik report and I need to define a textbox that is the width of my string. However the size property needs to be set to a Unit (Pixel, Point, Inch, etc).  How can I convert my string length into, say a Pixel so I can set the width?  EDIT:  I have tried getting a reference to the graphics object, but this is done in a class that inherits from Telerik.Reporting.Report.


How do I convert a binary string to a number in Perl?

How can I convert the binary string $x_bin="0001001100101" to its numeric value $x_num=613 in Perl?


What are system, active and boot partitions in terms of microsoft?

I decided to reinstall Windows, but on the step "Choose a Physical Location to Install Windows On" I appeared to doubt which partition to choose. There were System Reserved partition and partition where Windows resides (where Program Files, Windows and other directories are located).   So it made me think, which partition is active. But there's this Microsoft's alternative terminology. What do they even mean by these terms?


Proof for $\epsilon$ closeness to $\sqrt{2}$ for all values of $\epsilon$

I am trying to understand the proof above, Proposition 7, given by the author, but I got stuck at some points.   My explanation:  Now, suppose for contradiction there is an $\epsilon > 0$, for all $x > 0$ such that  $NOT (x^2 < 2 < (x+ \epsilon)^2)$,  Since $NOT (x^2 < 2 < (x+ \epsilon)^2) \ \ iff \ \ (x^2 \geq 2 \ \ OR  \ \ (x+ \epsilon)^2 \leq 2)$,  We must show that for some $\epsilon>0$ and for all $x > 0$, the statement $x^2 \geq 2 \ \ OR  \ \ (x+ \epsilon)^2 \leq 2$ leads to a contradiction.  I think in the proof above, author tries to get a contradiction using right hand side of $OR$ clause, namely $(x+ \epsilon)^2 \leq 2$. But no contradicition is achieved by him for the left hand side side of $OR$ clause namely, $x^2 \geq 2$.  First Question is, am I correct at this point, i.e. the need for a contradiction for the left hand side side of $OR$ clause?  Second question is, I don't understand how he derived the following sentence in his proof above,     Since $0^2 < 2$, we thus have $\epsilon^2 < 2$, which then implies $(2 \epsilon)^2 < 2$ and indeed $(n \epsilon)^2 < 2$   Why does he feel a need to multiply $\epsilon$ constantly by $n$


Relating to this question;    My query is if this would work in the following order(below) and if so, how would i achieve that?    enum compassDir {     S = 0, SE = 1,     E = 2, NE = 3,     N = 4, NW = 5,     W = 6, SW = 7 };


Apache htaccess redirect http/www to https/non-www

To redirect from   - http://www.domain.com  - http://domain.com  - https://www.domain.com   to   im using the following (apache)htaccess:  <IfModule mod_rewrite.c>    RewriteEngine On    RewriteCond %{HTTPS} !=on    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] </IfModule>  <IfModule mod_rewrite.c>     RewriteEngine On     RewriteCond %{HTTPS} !=on     RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]     RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L] </IfModule>  # BEGIN WordPress  <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>  # END WordPress   This works, but I think it's not the best way. The first two sections would still be to combine, but I don't know how.


Often, when overheard from far away, I find myself saying/thinking:     [S]he has the ears of a hawk!   Which doesn't really make sense as hawks aren't particularly well known for their sense of hearing.  Is there a common saying, equivalent to "eyes of a hawk", relating to someone's sense of hearing?


NEWID() In Joined Virtual Table Causes Unintended Cross Apply Behavior

My actual work query was an inner join, but this simple example with cross join seems to nearly always reproduce the problem.  SELECT * FROM (     SELECT 1 UNION ALL     SELECT 2 ) AA ( A ) CROSS JOIN (     SELECT NEWID() TEST_ID ) BB ( B )   With my inner join I had many rows for which I added to each a GUID using the NEWID() function, and for about 9 out of 10 such rows the multiplication with the 2-row virtual table produced the expected results, just 2 copies of the same GUID, while 1 out of 10 would produce different results. This was unexpected to say the least and gave me a really hard time trying to find this bug in my test data generation script.  If you take a look at the following queries using as well non-deterministic getdate and sysdatetime functions, you won't see this, I don't anyway-I always see the same datetime value in both final result rows.  SELECT * FROM (     SELECT 1 UNION ALL     SELECT 2 ) AA ( A ) CROSS JOIN (     SELECT GETDATE() TEST_ID ) BB ( B )  SELECT * FROM (     SELECT 1 UNION ALL     SELECT 2 ) AA ( A ) CROSS JOIN (     SELECT SYSDATETIME() TEST_ID ) BB ( B )   I'm currently using SQL Server 2008 and my work around for now is to load my rows with GUIDs into a table variable before finishing out my random data generation script. Once I have them as values in a table as opposed to virtual table, the problem goes away.  I have a workaround, but I'm looking for the ways to workaround without actual tables or table variables.  While writing this I tried without success these possibilities: 1) placing the newid() into a nested virtual table:  SELECT * FROM (     SELECT 1 UNION ALL     SELECT 2 ) AA ( A ) CROSS JOIN (     SELECT TEST_ID     FROM (         SELECT NEWID() TEST_ID     ) TT ) BB ( B )   2) wrapping the newid() within a cast expression such as:  SELECT CAST(NEWID() AS VARCHAR(100)) TEST_ID   3) reversing the order of appearance of the virtual tables within the join expression  SELECT * FROM (     SELECT NEWID() TEST_ID ) BB ( B ) CROSS JOIN (     SELECT 1 UNION ALL     SELECT 2 ) AA ( A )   4) using uncorrelated cross apply  SELECT * FROM (     SELECT NEWID() TEST_ID ) BB ( B ) CROSS APPLY (     SELECT 1 UNION ALL     SELECT 2 ) AA ( A )   Just before finally posting this question, now I tried this with success it seems, a correlated cross apply:  SELECT * FROM (     SELECT NEWID() TEST_ID ) BB ( B ) CROSS APPLY (     SELECT A     FROM (         SELECT 1 UNION ALL         SELECT 2     ) TT ( A )     WHERE BB.B IS NOT NULL ) AA ( A )   Anyone have any other more elegant, simpler workaround? I really don't want to use cross apply or correlation for a simple row multiplication if I don't have to.


Error Message : System.DmlException when tring to insert an record in Test class

My test is failing when I am trying to insert an record in test class. I am not sure why it is happening. Can someone help. The error message I get is:     System.DmlException: Insert failed. First exception on row 0; first error: MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): Shipping_Address__c, original object: UserRole: []   @istest public class Test_SalesrepMapping{     static testMethod void testMethod_SalesrepMapping(){     test.startTest();        //Inserting an user1     Profile pId =[Select id from Profile where name = :'System Administrator'];     User u=new User();     u.LastName='Test';     u.Alias='testuser';     u.Email='test.user@stemcell.com';     u.Username='user.test@stemcell.com';     u.CommunityNickname='UserA';     //Inserting a Role      UserRole r = new UserRole(DeveloperName = 'MyCustomRole', Name = 'My Role');     insert r;     u.EmailEncodingKey='ISO-8859-1';     u.TimeZoneSidKey='America/Los_Angeles';     u.LocaleSidKey='en_US';     u.LanguageLocaleKey='en_US';     u.ProfileId = pId.Id;     insert u;     System.runAs(u){     //Inserting an user2     Profile pId1 =[Select id from Profile where name = :'Outside Sales'];     User u1=new User();     u1.LastName='Test1';     u1.Alias='tuser1';     u1.Email='test.user1@stemcell.com';     u1.Username='test.user1@stemcell.com';     u1.CommunityNickname='UserB';     //Inserting a Role      UserRole r1 = new UserRole(DeveloperName = 'CustomRole', Name = 'Rep Role');     insert r1;     u1.EmailEncodingKey='ISO-8859-1';     u1.TimeZoneSidKey='America/Los_Angeles';     u1.LocaleSidKey='en_US';     u1.LanguageLocaleKey='en_US';     u1.ProfileId = pId.Id;     insert u1;      Territory__c territory = Test_CustomObjectUtil.createTerritory();       /*Inserting a Territory      List<Territory__c> terrList= new List<Territory__c>{          new Territory__c(Name = 'USABC', Fiscal_Year__c = '2017'),          new Territory__c(Name = 'USXYZ', Fiscal_Year__c = '2017')     };     insert terrList; */       //Insert a SalesRepMapping record     Sales_Territory_Mapping__c SRM = new Sales_Territory_Mapping__c();     SRM.Role__c='ISALM';     SRM.Sales_Rep__c=U.id;     SRM.SoldInTerritoryId__c=territory.id;     insert SRM;      SRM.Sales_Rep__c=u1.id;     update SRM;     }      //Inserting a Shipping Address (Test class in failing here)     Shipping_Address__c ShipAd = new Shipping_Address__c();     ShipAd.Name = 'CAWEST';     ShipAd.Country__c='CANADA';     ShipAd.State__c='BC';     insert ShipAd;     //ShipAd.City__c='Vancouver';     //update ShipAd;      test.stopTest();     } }


Non-EU citizen Schengen visa via NYC Swiss embassy

I am applying for Schengen visa via Switzerland embassy in NYC.  One of their requirements is :     A copy of your confirmed flight reservation.   How do I purchase temporary tickets to meet this requirement?


Given is one single datapoint $\vec{x}$, which contains the same feature twice, hence $\vec{x} = (x,x)$ and a label y. We have to add the regularization term $\lambda*||\vec{\beta}||^2$, $\lambda > 0$ to the regular linear regression problem,  solve this problem, as well as explain what relationship the components of the solution $\vec{\beta^*}$ satisfy. I would use the following equation to solve the problem by hand: $(X^TX)*\vec{\beta} - \lambda*\vec{\beta}= X^Ty$, specifically for our problem:  $\begin{bmatrix} x^2 & x^2\\ x^2& x^2\end{bmatrix} *\begin{bmatrix}\beta_1 \\ \beta_2 \end{bmatrix}+\begin{bmatrix}\lambda\beta_1 \\ \lambda\beta_2 \end{bmatrix} = \begin{bmatrix}xy \\ xy \end{bmatrix} $   Is this correct so far? I know for ridge regression, the closed form solution always exist (the added regularization allows for invertibility), but I am not sure what I can conclude for the solution and the components in this particular case.


I want to create dynamic html links with data from AIPIFLICKR, I get the data from flickr so I just need to make the links with invisble date from author_id and when clicked on I need to get this in JS back my code (it works but not the links):  var output = ""; $.each(flickrresponse.items, function(index, value) {   //console.log(index);   output += '
 ' +     value.author + '

' +     value.author + '

'; }) $('#output').html(output)   and then I need somthing like this:  $(document).ready(function() {    $('a').on('click', function(e) {     e.preventDefault();     extrafeatures(datafromlink);   }); });


Noting  on a 1000 qubits quantum computer had me wondering...  Does the number of qubits nonlinearly change the speed/rate at breaking a SHA256 hash?  If someone makes a say 10,000 qubit processor, does this speed up cracking the hash more than 10 times (linearly) faster?


I cannot find the error in my Python Code

I am (attempting) to make a hacking game like Hack Run or Hacknet. But only the terminal. I get this error when I try to print the variable 'currentip' at line 86 ("print("You are currently at " + currentip + ".")"):  UnboundLocalError: local variable 'currentip' referenced before assignment   This looks like a simple error but I cannot figure it out. I have assigned it. Multiple times. Maybe I am reading the order execution wrong but I can't find any info that says I am doing it wrong...  Any ideas for cleaning up and making it neater/better is also very much appreciated.  import os import random from time import sleep os.system("cls")  save = {} ips = {"1337.1337.1337.1337": "Cheater's Stash"} shells = [] storyips = ["Bitwise Test PC"] currentip = "1.1.1.1" homeip = "1.1.1.1"  def resetip():   ip1 = random.randint(1, 999)   ip2 = random.randint(1, 999)   ip3 = random.randint(1, 999)   ip4 = random.randint(1, 999)   homeip = str(ip1) + "." + str(ip2) + "." + str(ip3) + "." + str(ip4)   if homeip in ips:     resetip()   else:     ips[homeip] = "Your Computer"     currentip = homeip  def storyreset():   for x in storyips:     ip = (0, 0, 0, 0)     ip1 = random.randint(1, 999)     ip2 = random.randint(1, 999)     ip3 = random.randint(1, 999)     ip4 = random.randint(1, 999)     ip = str(ip1) + "." + str(ip2) + "." + str(ip3) + "." + str(ip4)     if ip in ips:       storyreset()     else:       ips[ip] = x  def start():   os.system("cls")   print("Python 3.5, HackSim 1.1")   print("")   print("Loading modules...")   print("")   sleep(1)   print("OS Loaded.")   sleep(0.5)   print("HELP Loaded.")   sleep(0.5)   print("FILE USE Loaded.")   sleep(1)   print("CONNECTIONS Loaded.")   sleep(0.5)   print("UTILS Loaded.")   sleep(0.5)   print("HACKS Loaded.")   print("")   sleep(1)   print("Initiating command line...")   sleep(1)   commandline()  def usecommand(c):   if c == "reboot":     print("Rebooting...")     sleep(3)     start()   elif c == "clear":     os.system("cls")   elif c == "quit":     quit()   elif c == "forkbomb":     del ips[currentip]     if homeip in ips:       currentip = "Your Computer"     else:       resetip()       currentip = "Your Computer"   elif "connect " in c:     if c[8:] in ips:       connectip = ips[c[8:]]       print("Connecting to ", connectip, " ", c[8:], "...")       currentip = connectip     else:       print("This ip does not exist.")   elif c == "connect":     print("You are currently at " + currentip + ".")     print("The syntax of this command is: connect <ip>.")   else:     print("Invalid command. Either the command does not exist or check the required syntax.")  def commandline():   while True:     command = input("> ")     usecommand(command)  storyreset() resetip() start()   Thanks!


List column (number) custom validation - whole/half values

Using SharePoint 2013, I have a list column of type Number, and I'd like to restrict it to either whole / half numbers, i.e. 0.5, 1, 1.5, 2, 2.5. But values such as 3.4, 2.6 wouldn't be allowed.   A choice column is unsuitable as the range users will input could go into the 100's.  Can I use custom validation on the column for this and if so how?


Revisit: Format the site content according to the window width

The Stack Exchange website is a annoying to view at anything but the Stack Exchange Official Window Width. (Which is .) Use a narrow window, and you get truncated text. Use a wide window and you get a lot of blank space. (Except for a few moderator tools which are exclusively available from the otherwise blank left margin and are not visible at all unless you make your window wider than the SEOWW!)  Please let us get a comfortable experience at our choice of window width, chosen to suit our monitor setup, eyesight and window placement habits. Browser window size affects every site you use, so "fixing" it for SE can just break something else.  The window width is a user choice, not a site choice.   was declined, apparently on the basis that if you have a wider window than the SEOWW, it's not too bad. But for those of us who have a preferred window width narrower than the SEOWW, it's much worse: there's some stuff we have to keep scrolling horizontally for, and even stuff that we cannot access at all.  A lot has changed since that request was made in 2009 and declined in 2013, and it's time to revisit this issue.


If every proper subgroup of a group is finite, does it follow that the group is finite?

Suppose that every proper subgroup of a group is finite.  Does it imply that the group is finite?


Drupal Rest Service - Create node problem

I'm using POSTER add-on (Firefox) to create a node.(REST service). I couldn't able to create node having select/checkbox item. Getting following error in response.  ["An illegal choice has been detected. Please contact the site administrator"]  How to resolve this? I'm able to create node if post data doesn't contains select/checkbox data. My problem is exactly related to the following link. But I couldn't find solution.    If I replace 'und' to 'en' in json format, the node is being created but with null values.  I've found following messages under Recent log messages.  Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() Warning: Illegal offset type in isset or empty in list_field_validate()  Illegal choice in LABEL element.  Here 'LABEL' is the label(name) of the filed


Why are off-topic questions put on hold, rather than migrated?

I posted  which a moderator put on hold for the following reason:     Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow. – Sven   Why do moderators with enough reputation put on hold rather than migrate to what they think is the correct site?  Additionally, why can't users move their own questions?


What do you guys think of Hawking's last paper "A Smooth Exit from Eternal Inflation?"  according to him there's no such thing as infinite multiverses so he concluded there are many universes, although not infinite with nothingness or space outside of them. He even said he's not a fan of the multiverse theory but in Science there should be no favouritism. Do you think the whole universe is really finite, and do you think outside of those multiple universes there is just absolute nothingness outside of them?


Short story where people could live 'forever' by buying themselves new host-bodies

I read this sci-fi short story a while back - here's what I remember of the plot:   People could live 'forever' by buying themselves new host-bodies for a certain amount of money (a million dollars, I think). For some reason everybody was rich or at least they could afford a host body every X or so years so virtually everybody lived forever. People are spending their lives learning new skills, like playing the piano, science, sports, etc... The protagonist lives many lives and becomes an expert at 'everything'; after a while he gets tired of 'living-to-learn' and decides to transfer his mind into the body of an infant (who never ages?), thereby living a life of complete ignorance (and bliss).   The story is part of a 3-story 'series' written by a not-so-famous American author. It was quoted in an article in the New Yorker - a couple of years ago, perhaps.


The final number after $999$ operations.

I wanted to know, let the numbers $1,\frac12,\frac13,\dots,\frac1{1000}$ be written on a blackboard. One may delete two arbitrary numbers $a$ and $b$ and write $a+b+ab$ instead. After $999$ such operations only one number is left. What is this final number.  I tried, let $*$ be an operation $a*b = (1+a)(1+b) - 1$, and $(a*b)*c = (1+a)(1+b)(1+c) -1$. by induction we can show that for $N$ such no.s we have $(1+a)(1+b)(1+c)\dots(1+d) - 1$, where $n\{a,b,c,\dots,d\} = N$. In the question we have numbers $1,\frac12,\frac13,\dots,\frac1{1000}$. plugging in we get the final number $1000$, but the answer given is $100$.  What am i doing wrong?  Any help appreciated.  Thanks.


Database Table to Html Table (drag and drop rows / edit & update rows / insert rows / delete rows) Update SQL table

So I have 2 sql tables current and previous.    I am looking to show 2 tables and enable users to drag and drop items from the previous table into the current table.    On top of that I am looking to allow the user to edit the rows of each table/ insert and delete these as well then save the changes back the the DB.    What I have done is found 2 separate projects and merged them together. github.com/drale/DBTableViewer  github.com/dbunic/REDIPS_drag  One allows for 2 tables to interact and the other pulls data from the database generates the tables and paginates them.    I have this working so I am now moving onto the next step of inserting rows and making them editable.  I have it working but whenever I insert a row I cannot move that new one I inserted.  If you guys could check it out I'd appreciate it.  Been looking at it and the code is the exact same...  What I am seeing  Row that I can move:

	 Something	 something else>
   Row I inserted and can't move:

	 Data	 Data
   The only reason the 2nd one that doesn't work has :style="border-style: solid; cursor: move; in it is because in the elements container I saw that come up on the other rows.  Even with it not there it doesn't work.  The function I am using to insert the rows is :  function myFunction() {     var table = document.getElementById("tbl1");     var row = table.insertRow(2);     row.className = "rd";     var cell1 = row.insertCell(0);     console.log(cell1);     cell1.className="redips-rowhandler";     var cell2 = row.insertCell(1);     var cell3 = row.insertCell(2);     cell1.innerHTML= "

";                     //

	      cell2.innerHTML = "Data";     cell3.innerHTML = "Data"; } </script>   I also created a public github for this project so if anyone ever wants to use something like this it will be available to them!  Feel free to help if you'd like.


traffic to openvpn server not using tunnel

I set up an OpenVPN server on a Debian 9 server, and everything seems to work fine: I can access Internet through that VPN. However, I figured out that any traffic targeting the server is still using either eth0 or wlan0 instead of tun0. For example, if I am on a local network that does not allow ICMP:  ping google.com will work as expected (using tun0as output interface)  ping myvpn.com (if myvpn.com is my vpn server) will not work, as it uses eth0 or wlan0 as output interface and so is blocked by the network firewall.  I looked at the routes and found that when connecting, OpenVPN client is adding an entry in the routing table: 1.2.3.4 via 10.0.0.1 dev wlp7s0 proto static metric 600 (where 1.2.3.4 is my vpn public IP)  I understand what this route is for: when OpenVPN client send packets to the OpenVPN server to be then rerouted to Internet, it has to send them through a physical interface.  However, I would like that when I ping or SSH to the server, packets are send through the tun0 interface.  Is there an option to give to OpenVPN client or maybe an iptables rule so that only OpenVPN generated packets are sent through a physical interface?  EDIT: Everything is working fine for outgoing traffic: it goes all through the VPN, except for the traffic that has for destination the server itself. I think the problem may be on the client side, where the route to the server is being added Here is server config file:  port 443 proto tcp dev tun  ca /path/to/ca.crt cert /path/to/server.crt key /path/to/server.key dh /path/to/dh.pem  server 10.8.0.0 255.255.255.0 keepalive 10 120 comp-lzo persist-key persist-tun status openvpn-status.log verb 3  push "redirect-gateway def1 bypass-dhcp" push "route 10.8.8.0 255.255.255.0"   I tried to modify this line:  push "redirect-gateway def1 bypass-dhcp"   to this:  push "redirect-gateway autolocal def1 bypass-dhcp"   as suggested in answers, but result is still the same: I can ping google.com but not my VPN public IP


How to disable the Keyboard Layouts Choosing screen in Gnome?

On Ubuntu 17.10, When try to switch layouts by clicking Super + Space, I get the current window losing focus for a moment, which -usually- make the first letters I try to type missing.  The reason -as I think- is the popup screen appears with Layouts Choices, which get completely visible, if I continued holding the Super key after hitting the Space.  Example:   So, Is there a way to disable that popup ?  Thanks.


The reply buttons in chat shouldn't reposition themselves on pinged messages

The chat is pretty great. But it has an obscure and frustrating phenomenon. When I get pinged, the message gets highlighted, which shoves the icons over to the left a little for some reason.    Since I'll very often want to reply to a message that pings me, I'll move my mouse to that reply icon...    ... and it just so happens that the amount of time it takes to position my mouse on that small icon is the same amount of time it takes for the highlight to end, so the margins shift over to the right again just when I'm ready to click.  The culprit!  This line of CSS appears to be the troublemaker:    With it disabled, I think the phenomenon would disappear.    (I'm using Firefox 26.)


Prove that a connected graph with $n$ vertices is a tree iff it has $n-1$ edges.

What are different ways of proving this theorem, using different definitions for a tree (e.g. maximally acyclic graph, minimally connected graph, there's a unique path between any two vertices, etc.)


Is it possible to colour or put textures on Bevel curves?

So with my model, I've been struggling to create hair because it always looked weird or off and recently I discovered the "Bevel Curve" addon and it's an absolute lifesaver.   So I converted the bevels into mesh to colour it, except it lags blender like crazy and I need this model for a video game I'm currently developing called Candles(so I can't upload the model, sorry) but I was wondering, is it possible to put a texture on a bevel curve like you would mesh or any other method or giving it colour?


Efficiency of postincrement v.s. preincrement in C++

I usually think that . But when I read the book  recently, there is a section says that postincrement is prefered than preincrement in for loop. Because, as I quote, "preincrement introduces a data dependency into your code -- the CPU must wait for the increment operation to be completed before its value can be used in the expression." Is this true? (It is really subverted my idea about this problem.)  Here is the quote from the section in case you are interested:     5.3.2.1 Preincrement versus Postincrement      Notice in the above example that we are using C++’s postincrement operator,   p++, rather than the preincrement operator, ++p. This is a subtle but sometimes important optimization. The preincrement operator increments the contents of the variable before its (now modified) value is used in the expression. The postincrement operator increments the contents of the variable after it has been used. This means that writing ++p introduces a data dependency into your code -- the CPU must wait for the increment operation to be completed before its value can be used in the expression. On a deeply pipelined CPU, this introduces a stall. On the other hand, with p++ there is no data dependency. The value of the variable can be used immediately, and the increment operation can happen later or in parallel with its use. Either way, no stall is introduced into the pipeline.      Of course, within the “update” expression of a for loop (for(init_expr;   test_expr; update_expr) { ... }), there should be no difference between   pre- and postincrement. This is because any good compiler will recognize that   the value of the variable isn’t used in update_expr. But in cases where the   value is used, postincrement is superior because it doesn’t introduce a stall   in the CPU’s pipeline. Therefore, it’s good to get in the habit of always using   postincrement, unless you absolutely need the semantics of preincrement.   Edit: Add "the above example".  void processArray(int container[], int numElements) {     int* pBegin = &container[0];     int* pEnd = &container[numElements];     for (int* p = pBegin; p != pEnd; p++)     {         int element = *p;         // process element...     } }  void processList(std::list<int>& container) {     std::list<int>::iterator pBegin = container.begin();     std::list<int>::iterator pEnd = container.end();     std::list<inf>::iterator p;     for (p = pBegin; p != pEnd; p++)     {         int element = *p;         // process element...     } }


Hermitian Conjugate in Spherical Coordinate System

Help me find $\hat{B^\dagger}$, when we know that $$\hat{B}=i\frac{d}{dr}$$ with the condition that $\hat{B}$ is defined in spherical coordinates. My approach: $$ \langle\psi|\hat{B}\psi\rangle=\int_{0}^{\infty} \psi^* i\frac{d}{dr} \psi dr=\psi^*\psi|_{0}^{\infty}-\int_{0}^{\infty}\psi i\frac{d}{dr}\psi^*dr=\langle\hat{B}\psi|\psi^*\rangle$$ And so I get $ \hat{B^\dagger} = -i\frac{d}{dr} $. Could someone confirm if this is correct?


Give the power to the community to revert back a tag synonymization

Most actions are reversible: delete/undelete, edit/rollback, close/open, protect/unprotect, vote, etc. But tag synonymization isn't. There are cases where the community thought an idea  just to discover years later that . This can only be addressed by a moderator, which can take time and effort from the team. Since moderators are supposed to do as little as possible, community shouldn't bother them if they can clean up their own mess.


Probability of area being greater than 0.5 with random lines

Take the square $[0,1]^2$ we take $n$ random lines through the square. You can choose random lines by choosing a point on one of the sides of the squares and randomly choosing a different point on any of the other three sides and then drawing a line connecting them.   What is the probability that after $n$ of these random lines the largest region is greater than or equal to $0.5$?  Any tips or cases help, thanks.


I want to estimate 95% C.I. for RMSE(Root mean square error).  However, i have a difficulty in estimating C.I. due to RMSE equation  (there is a root in RMSE equation)


I have a class  class Class<T> {      public Class(T arg)      {          print(arg.ToString());      } }   Pls Correct me: How to create an instance from this generic class  Type t = typeof(Class<>).MakeGenericType(typeof(string)); Activator.CreateInstance(t,"test");


Basic mathematical induction regarding inequalities

These are just the examples from my textbook, but I don't think it did not explain well.  One of the problem was to prove the inequality   $$n<2^n$$  for all integers $n$.  I understand we assume if $P(n)$ is true, $P(k+1)$ is true.  Thus $k+1< 2^{k+1}$  But in the text book, they added one more line that I don't understand:  $$k+1<2^k+1 \le 2^k+2^k=2\cdot2^k=2^{k+1}$$  I understand  $$k+1<2^{k+1}$$  But how do I know $2^k+1$ is larger than $k+1$, and smaller than $2^{k+1}$?  I have one another example just in case,  proving $2^n<n!$ using induction.  $$2^{k+1}=2\cdot 2^k<2\cdot k!<(k+1)k!=(k+1)!$$  I understand we should start with $2^{k+1}<(k+1)!$, but  Where did $2\cdot k!$ come from? Textbook says it came from inductive hypothesis, but I still don't get it.  Please advise.


Java regex pattern to find 3 letters palindrome in a input string

Im trying to find regex pattern in java to find if a string includes a 3 letter palindrome like :     goingforeyecheckup   nan means not a number.


How do use elytra wings in minecraft java edition. I’m in1.14.30

When I’m in survival I double click jump like the way you fly in creative mode. But I just stay on the ground. Am I doing something wrong?


"Disk is likely to fail soon" on Ubuntu 18.04 LTS

Recently I installed, in dual boot, Windows 10 and Ubuntu. I installed Windows on my 120 GB SSD. I use my 500 GB HDD for Windows storage and also installed Linux there. Every time I boot in Ubuntu, there's a pop up that says "disk is likely to fail soon". I run smartctl and get .  I'm a newbie and i don't know what to do. Is my disk really damaged?


How do I get the ς (final sigma) symbol?

I am trying to get this Symbol   I already tried using Detexify, but to no avail. Any pointers would be really appreciated.


How do I upgrade to Windows 10 if I have less than 8 GB free?

I have an ASUS X205TA with MS Windows 8.1.  This has a 32 GB drive, but it also uses WIMBoot and has a recovery partition.  I am unable to get more than 7.5 GB of free space.  Microsoft offer a Windows 10 media creation tool to allow people to create a USB stick to upgrade from Windows 8.1 to Windows 10.  I place a newly formatted 16 GB USB stick in. I download the tool from Windows. I start the tool.  The tool doesn't ever ask me where to download the stuff.  I step through the tool, it gathers info, and it stops with the error message "We need 8 GB of disc space. Remove any files or apps that you no longer need, or use Disk Cleanup to create some space, then try again".  How do I upgrade to Windows 10 with the limited amount of drive space I have available? Especially if the media creation tool can't do it.


How to manually add an application to favorites in 17.10?

I am trying to pin an application to the 'launcher'. In Ubuntu 17.10 it is called 'add to favorites'.   With most applications it works by:   Launch the application Right-click its icon on the launcher Add to favorites   However, for some applications, the "Add to favorites" choice is not there:    I tried following the solution from  but failed, probably because 17.10 uses a new desktop (whatever that means).  Is there some way to add an application to the 'launcher' manually?


Visual Studio's output not showing all significant digits for float and double with C++ code

I'm testing the significant digit lengths for float and double in Visual Studio's C++ compiler and it's only showing 6 significant digits for float, double, and long double even though C++ Primer describes float as showing 6 significant digits and double/long double as 10. Why is this the case? Here's the code using random numbers: #include <iostream>  int main() {     float dec=12.789346;     long double dec2=12.98746359;                std::cout << dec << std::endl               << dec2 << std::endl;      std::cin.get();     std::cin.get();     return 0; }  My output is 12.7893 12.9875


Before sending bitmap image to server, I compress it. And upload image operation is always successfull. But after some moment application crash  Exception:  java.lang.OutOfMemoryError: Failed to allocate a 230412 byte allocation with 168272 free bytes and 164KB until OOM   Code:          HttpPost httpPost = new HttpPost(url);         HttpClient httpClient = new DefaultHttpClient();         MultipartEntity reqEntity = new MultipartEntity();         Charset charsUTF8 = Charset.forName("UTF-8");          HttpResponse httpResponse;          ByteArrayOutputStream stream = new ByteArrayOutputStream();         BitmapUtils.getBitmap(context,url).compress(CompressFormat.JPEG, 10, stream);         byte[] byteArray = stream.toByteArray();         ByteArrayBody body = new ByteArrayBody(byteArray, name + ".jpg");          reqEntity.addPart("photo", body);          httpPost.setEntity(reqEntity);         httpResponse = httpClient.execute(httpPost);         HttpEntity httpEntity = httpResponse.getEntity();         String stringData = EntityUtils.toString(httpEntity);   BitmapUtils class:      private static Uri getImageUri(String path) {         return Uri.fromFile(new File(path));     }     public static Bitmap getBitmap(Context context,String path) {         Uri uri = getImageUri(path);         InputStream in = null;         try {             in = context.getContentResolver().openInputStream(uri);              //Decode image size             BitmapFactory.Options o = new BitmapFactory.Options();             o.inJustDecodeBounds = true;              BitmapFactory.decodeStream(in, null, o);             in.close();              int scale = 1;             if (o.outHeight > 1024 || o.outWidth > 1024) {                 scale = (int) Math.pow(2, (int) Math.round(Math.log(1024 / (double) Math.max(o.outHeight, o.outWidth)) / Math.log(0.5)));             }              BitmapFactory.Options o2 = new BitmapFactory.Options();             o2.inSampleSize = scale;             in = context.getContentResolver().openInputStream(uri);             Bitmap b = BitmapFactory.decodeStream(in, null, o2);             in.close();              return b;         } catch (FileNotFoundException e) {             e.printStackTrace();         } catch (IOException e) {             e.printStackTrace();         }         return null;     }   Please can you explain what is problem? How to detect java.lang.OutOfMemoryError exception.


Is there a working io_export_batch_obj.py for Blender 2.83+?

i just stumbled across this information about a script for multi export, and there has to be an import too. But all the scripts from the answers here don't work for me:  I guess it's because of the new design and layout?! But is someone working on a newer version of these multi export and import scripts?!


How to prevent Windows 8 of erasing GRUB?

I'm doing dualboot with Ubuntu and Windows 8 on my DELL Laptop. EFI is enabled, secure boot is not. My partitions are GPT.  Everything seems to work for some time. After some normal use, GRUB stops working. The "ubuntu" EFI entry is still there on top of everything else. But the computer boots directly into the Windows Bootloader, skipping GRUB.  Any clues on why is that happening or how can I prevent that?  My current partiton setup is:  - /dev/sda1    NTFS    Windows recovery - /dev/sda2    FAT32   UEFI boot (with boot flag) - /dev/sda3    unknown (msftres flag) - /dev/sda4    NTFS    Windows Drive C - /dev/sda5    ext4    /home - /dev/sda6    ext4    /   I usually reinstall GRUB through chrooting from a Live Session and doing a apt-get install --reinstall grub-efi-amd64.


Could anyone help me on arranging the files? I want to skip every three lines based on the example below using awk. Current file: a a a a b b b b c c c c  Desired output: a b c


Difference between MYSQLI/PDO for bind query

From the point of view of performance / safety, it is better to use PDO or mysqli for queries with bind?


Insert a commit before the root commit in Git?

I've asked before about how to  in a git repository.  While the solutions are rather interesting and not really as mind-warping as some other things in git, they're still a bit of the proverbial bag of hurt if you need to repeat the procedure many times along the development of your project.   So, I'd rather go through pain only once, and then be able to forever use the standard interactive rebase.   What I want to do, then, is to have an empty initial commit that exists solely for the purpose of being the first. No code, no nothing. Just taking up space so it can be the base for rebase.  My question then is, having an existing repository, how do I go about inserting a new, empty commit before the first one, and shifting everyone else forward?


What is the difference between "tall and high?"

When can we use them? Are they the same or different?   "How tall is that building?" Can I use "high" in that sentence or not?  "This is the tallest mountain in Japan." Can I use "highest" in that sentence instead of "tallest"?


What does it mean by "the age or our universe"?

I am always puzzled by the notion "the age of our universe" because, correct me if I am mistaken, the universe is the entirety of the spacetime.  So how can we measure how much time has the entire spacetime has evolved if the spacetime has already included "all time"?   Allow me to use a bad analogy, it is as if, in the pre-relativity sense, asking what is the position of the entire space, if the space has already contained all the possible positions.  Such question only make sense if we imagine that the entire space is actually embedded in another, again allow me to  create my own term, "hyper-space" so that we can find the "position" of the entire spaces referencing such "hyperspace".   That's why I always wants to know what exactly do physicist/mathematicians mean what they use the notion "the age of our universe".


How do I force Excel (and other Microsoft Office products) to stop opening files in the same application?

Whenever I "double click" on an Excel file and another Excel file is open, the newly opened file automatically opens in the same application window as the previously opened Excel file. This isn't limited to just Excel, as I've seen Word do this as well. This poses a problem when wanting to compare documents side by side.    The current solution I have for this is to actually open another Excel or Word instance, and then open the file from within that application window itself. Is there a way to force Office to open a new instance of the application when double clicking on the file icons?  I'm currently using Office 2007 and Windows XP, but I've seen this on Office 2010 and Windows Vista and 7. I'm looking for an overall solution if possible.


I've got the following finite sum: $s_{n}=\sum\limits_{k=0}^{n}\binom{n}{k}^2p^k$ (esp. if $p$ is a function of $n$, like $p=\frac1{n}$), which can be rewritten as $s_{n}=\sum\limits_{k=0}^{n}\binom{n}{k}\sqrt p^k\binom{n}{k}\sqrt p^k$. Using the generating function approach (from Graham, Knuth and Patashnik) with each of the polynomials in the sum, I get the expression $(1+\sqrt p x)^{2n}$ and the coefficient at the n-th term $x$ turns out to be $\binom{2n}{n} \sqrt p^n$. But comparing this result to the computational value, it turns out to be incorrect. Where did I make a mistake? Are there certain limitations on the generating function method?


Chances at Going to a Math Grad School with 3.5 Math GPA

I am a 3rd year at UChicago, and I'd really like to try and get a math PhD. Currently I have a 3.75 GPA (3.5 Math GPA—but if you remove the one B I got during CoVid that goes up to a 3.6). I've taken Real Analysis, Linear Algebra, Algebra, and Topology and got B+/A- in them. I expect to have taken a few more higher math electives (i.e. Measure Theory, ODEs, etc.) and 3 grad classes. I've also done an REU and some (3-5) reading programs in all sorts of fields with my specialty being in Geometry and Topology. I think I'll have decent recs. What kinds of PhD programs could I realistically get into? Now I'd really like to go to a school like UMich, NYU, UChicago (again), Northwestern, CUNY, Brown, Cornell, CUNY etc. Would any (and if so which) be possible? Also, I consider myself Agender. Would this hurt/help me in anyway in my application? I don't know any non-cis mathematicians so I figured I'd just ask that here.


Finding the remainder when a polynomial is divided by another polynomial.

Find the remainder when $x^{100}$ is divided by $x^2 - 3x + 2$.  I tried solving it by first calculating the zeroes of $x^2 - 3x + 2$, which came out to be 1 and 2.   So then, using the Remainder Theorem, I put both their values, and so the remainder came out to be $1 + 2^{100}$.  But the correct answer is $(2^{100} - 1)x + (2 - 2^{100})$.   Can you please explain the exact process to reach the solution?  Thanks in advance. :)


Is it possible to play the Tower of Hanoi with fewer than $2^n-1$ moves?

The Tower of Hanoi game consists of three identical upright pegs and n rings all of different diameters that can be stacked over any of the pegs. Initially, all of the rings are stacked around one of the pegs in order of decreasing diameter with the largest ring on the bottom. The object of the game is to transfer all the rings, one at a time, until they are stacked in the same order around another peg, but at no time may any ring be placed above a ring of smaller diameter.  Prove that, for any number of rings, the transfer can be made in exactly $2^n-1$ moves.   We need to use induction...   Basis Step  IF we let $n=1$, then the left hand side must be 1 and the right hand side must be one as well.   $1 = 2^1-1$  $1 = 1$  Induction Step.  If $P(k)$ is true, then we can move $k$ disks in $2^k-1$ moves.  If $P(k+1)$ is true, then we can move $k+1$ disks $2^{k+1}-1$  Let $2^k - 1 $ be the number of moves for $k$ disks. Then,  $2(2^k-1)+1$  Using our induction hypothesis, we have   $2(2^{k+1}-1)$.  For any $ k \geq 1$, $P(k)$ and $P(k+1)$ is true.  Edit: This isn't right at all... it's just fluff...I need to start over.   Can the Tower of Hanoi be played in less than $2^n-1$ steps?   This is where I'm stuck... My guess is that unless you break the rules of the game, then you can't play  in fewer steps. Do I use induction to prove that it's impossible or possible?


How to make the container center throughout all media queries?

How do I make it so when my webpage is viewed on mobile, the container is centered in the middle. Like at 545x600, it looks centered but at 575x600 it slightly off.   @media only screen and (max-width: 600px) {   .a2c {      margin: 0px 0px 80px 115px !important;      width: 350px !important;     height: 380px !important;   }    .img1 {     width: 100% !important;     height: 75% !important;   }    .bgimg-1 {     height: 75% !important;   }     .titletext {     font-size: 15px !important;   }    .text {     font-size: 12px !important;     margin-top: 5px !important;   } }

 Blog Title

 Sub Text


Is the reason why lipid-soluble molecules can pass through membrane because

I have been studying about cell membranes and how water molecules are able to pass through it. ()  It is clear that the water molecules can squeeze through openings in the bilayer. My questions are:   1) Do small, non-polar molecules also enter through these gaps?  2) It states that the whole structure moves when vibrating. Does that mean the hydrophobic tails also move? If so, how do the non-polar molecules dissolve?  3) The top of the membrane is hydrophilic. How do non-polar molecules get past these hydrophilic heads into the hydrophobic interior core where they can be dissolved?  Thanks a lot!


Is there any way to leave an information layer view active while switching to another tool to build?

Not sure if I'm just missing something in the UI or if there's a Mod that might enable this functionality, but it seems like it would be really useful to be able to leave one of the views active while you're laying out roads / zones / districts.


I need to be able to search for SQL objects (logins, etc). With a smaller number of servers, I would connect to them all via a registration group in SSMS and do the search.  Does anyone have a better way with a large number of instances?  Thanks


What is causing the Exception in thread "pool-1-thread-2" (NullPointerException)

I am creating a multi-threaded web server. When I run the client I receive a NullPointException. Why is this happening and what can be done to solve it?     Concerning the suggestions that I should read the mentioned tutorial.  I have   tried to solve the problem with the help of it. I created a   constructor, but then I didn't know how to call the class:    theExecutor.execute(new Broadcaster (connection);      I also created a setter:  public void setQuestions(String[]   questions) {               this.questions[1] = questions[1];}      That didn't help either. The String is initialized at the same place   as questions[0]. I can print out questions[1] in the console. It   get's its value from the ArrayList, but I do not know how to pass that   value to the HandleValidation class. That seems to be the problem.   If I have missed something in the tutorial that is an obvious solution, please tell me!   Here you can read exception message and the stack trace:  Exception in thread "pool-1-thread-2" java.lang.NullPointerException at HandlleValidation.run(QuizServer.java:121) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745   Here I am initializing the Executor which are handling the threads:  public class QuizServer { public static void main(String[] args) throws IOException {  ExecutorService theExecutor = Executors.newFixedThreadPool(10000);     ServerSocket quizSocket = new ServerSocket(serverPort);      try {         while (true) {  //Skriver ut While True             Socket connection = quizSocket.accept();             theExecutor.execute(new Broadcaster(connection));             theExecutor.execute(new HandlleValidation(connection));         }   The origin of the String questions[1] is in the Broadcaster class:  I am using a get and set method to make it possible for the other inner class to work with   String questions[];  static class Broadcaster extends Thread {      String quizFile = "src/qa.txt";     private Socket connection;      private PrintStream write;     private String answer;     private String questions[];     int points = 0;      public String[] getQuestions() {         return questions;     }      Here are the Strings questions[0] and questions[1]created:   while (true) {                      for (String string : questionsList) {                         String[] questions = string.split("/");                         write.println(questions[0]);  //Printing out in client.                         try {                             Thread.sleep(4000); //"Sleeping" between the lines.                         } catch (InterruptedException e) {                             e.printStackTrace();                         }   The NullPointerException occurs in the HandleValidation class:      class HandlleValidation extends Thread {   The problem is caused by this line:    if (answer.equals(questions[1])) {                 points++;                 writer.println("RÄTT SVAR! Du har " + points + " poäng");   The Setter:  public void setQuestions(String[] questions) {     this.questions = questions;      I have tried to include as little of the code as possible to describe   the problem. I may be able to give more information if requested!


Modify the SSH welcome message to include system IP address

I have had a couple of occasions where I was unable to remember the IP address for a given system but was, at the time, able to connect using the hostname.  As an example, just now I wanted to set up port forwarding on my router and couldn't remember the IP for the target system.    I am wondering if it is possible to add the system's IP address to the welcome message that gets displayed on an SSH connection.  The default welcome message that I am trying to modify, in case that term is ambiguous, is"  Linux [hostname] 2.6.35-32-generic #64-Ubuntu SMP Tue Jan 3 00:47:07 UTC 2012 x86_64 GNU/Linux  Ubuntu 10.10  Welcome to Ubuntu!     * Documentation:  https://help.ubuntu.com/   Somewhere in there I think I'd like to add the IP address of the system I just logged in to.  Any suggestions?  Other than trading in my brain for a newer model with more RAM?


Reading a column from CSV file using JAVA

Hi I am trying to read a CSV File called test.csv in JAVA . Below is my code :   import java.io.BufferedReader; import java.io.FileReader;  public class InsertValuesIntoTestDb {      @SuppressWarnings("rawtypes")     public static void main(String[] args) throws Exception {                 String splitBy = ",";         BufferedReader br = new BufferedReader(new FileReader("test.csv"));         String line = br.readLine();         while(line!=null){              String[] b = line.split(splitBy);              System.out.println(b[0]);         }         br.close();    } }   This is my CSV File (test.csv):  a,f,w,b,numinst,af,ub 1RW,800,64,22,1,48:2,true 1RW,800,16,39,1,48:2,true 1RW,800,640,330,1,48:2,true 1RW,800,40,124,1,48:2,true 1RW,800,32,104,1,48:2,true 1RW,800,8,104,1,48:2,true 1R1W,800,65536,39,1,96:96,true 1R1W,800,2048,39,1,96:96,true 1R1W,800,8192,39,1,48:48,true   I am trying to print the first column in the csv ,but the output I get is only a in an infinite loop . Can anyone please help me fix this code to print the entire first column. Thanks.