My Gis Client Program, using OpenLayers, and my GeoServer were running on the same server, everything worked fine.  Now, I started a new instance of My Gis Client Program on another server. There, I get the following Problem:  WMS Layers work fine, but for the WFS Layer I get: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://mygeoserver/mylayerr. This can be fixed by moving the resource to the same domain or enabling CORS.  What can I do about that?

I hope somebody has already figured this one out. I just installed Geoserver 2.9 on a vanilla Ubuntu 16.04 distro. The Geoserver 2.8 method of enabling CORS with the shanbe.hezoun class does no longer work with Jetty 9.2.13.  There are mentions that CORS support is already packaged with Jetty 9.2.13 in the jetty-servlets.jar.  The Jetty lib which is compiled with Geoserver contains a jetty-servlet-9.2.13.v20150730.jar in geoserver/lib but not jetty-servlets.9.2.13.v20150730.jar. Are these supposed to be the same jar with a different name?  It should be possible to enable CORS either in geoserver/etc/webdefault.xml or in geoserver/webapps/geoserver/WEB-INF/web.xml.  My understanding is that the webdefault.xml is applied first and the web.xml thereafter.  I have tried following filter in both xml. I haven't got as far as adding a filter mapping. Adding the filter alone will cause the Geoserver/Jetty service to not start proper.  <filter>     <filter-name>cross-origin</filter-name>     <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class> </filter>


Recently I have decided to move my site form a .rs domain to a .com one. With that I also upgraded my software (OpenCart 1.5 to 2.0). Both the .com and .rs sites are currently operational. What I have noticed that in a matter of days Google has indexed the .com version of the site and in most cases is ranking it higher than the .rs one that has been operational for some two years.  I am confused to why this has happened, is it related to the domain, or does it have to do with the new software? I am pretty new to SEO and this has me puzzled.

I want to get a domain for my site. The site's topic would be about Vienna, but the content will be in English.   I was thinking, if I should get .com domain or .at domain. .at is both much cheaper and easier to get (there is less chance that my desired phrase is already registered).   Is there any disadvantage in terms of SEO and page rank, if my domain does not end with .com? The site will be in English and targeted not just for Austria, but globally, mostly foreign tourists.  I don't care if it's easy to remember the address, I expect most traffic to be from search engines anyway.


Is there any way I can clear the X clipboard from a cron job? The usual commands for xclip don't seem to work.  echo -n | xclip -selection clipboard   doesn't work from cron.

Once upon a time,  DISPLAY=:0.0 totem /path/to/movie.avi   after ssh 'ing into my desktop from my laptop would cause totem to play movie.avi on my desktop.  Now it gives the error:   No protocol specified Cannot open display:    I reinstalled Debian squeeze when it went stable on both computers, and I guess I broke the config.   I've googled on this, and cannot for the life of me figure out what I'm supposed to be doing.   (VLC has an HTTP interface that works, but it isn't as convenient as ssh.)  The same problem arises when I try to run this from a cron job.


I want to detect when someone is building a lever, then replace it with another lever that has the canplaceon tag so it can be placed on a redstone_lamp  How can I clear the crafting item and replace it with one that has a canplaceon tag?

In a map I'm making the player has to survive while locked in a maze. To stop them from breaking out, they will be in adventure mode. However, I still want them to be able to craft items and use them with specified blocks. I have tried several methods already but they all have a flaw.  One method is to have a scoreboard objective called item and giving certain item entities a specific score using something like:  /scoreboard players set @e[type=Item] item 1 {Item:{id:"minecraft:sapling"}}   Then it is possible to select these items with:  /entitydata @e[type=Item,score_item=1,score_item_min=1] {Item:{tag:{CanPlaceOn:["dirt"],HideFlags:24}}}   This works but it requires the item to be dropped, which isn't a problem for saplings, but for tools and other craftable items, it becomes a hassle.  To fix this, I'm currently clearing tools without damage and giving the player a slightly damaged tool in return:  /clear @a minecraft:stone_axe 0 1   /give @a minecraft:stone_axe 1 1 {CanDestroy:["log","log2","leaves","leaves2"],HideFlags:24}   This doesn't work for items without damage values (e.g. torches), but I don't mind these having to be dropped as there aren't too many of these. However, there is another problem. In the nether, the player will have access to an enchantment table and an anvil. This means they can repair enchanted tools, which will cause them to be cleared and replaced with unenchanted ones as soon as they go back to the overworld.  I also thought about using a stat.craftItem scoreboard objective and giving them the usable item if they craft it. However, this would result in the player having a duplicate of every item they crafted, as I think it is impossible to select an item without NBT-data in the /clear command.  Is there any way to make this work? And if not, would it be better to have the player drop all crafted items or have duplicates of them all?


I have the following circle and header. I want the h4 to be centered inside the animating-circle div. I cannot put inside because I will rotate the circle, and I do not want the text to rotate. I have the following CSS. Currently, all circles are stacked into each other. I want them to have their own spacing. Thanks!   .animating-circle {   position: absolute;   min-width: 250px;   min-height: 250px;   box-sizing: border-box;   border: 1px solid black;   border-radius: 50%;   border-top-color: #f1c40f;   border-right-color: skyblue;   border-bottom-color: violet;   border-left-color: lightgray; }  .animating-circle+h4 {   position: relative;   top: 120px; }

Title is here

How can I horizontally center a
 within another
 using CSS?

Foo foo


I am looking for a way to launch a terminal session from the command line on Ubuntu, something like this:  #/usr/bin/env bash  terminal -c 'node server.js'   if there is some cross-platform tool that also works on MacOS that'd be nice.  So I tried this:  gnome-terminal -- 'echo "foo" | bash'   and I got this:    And when I try this:  gnome-terminal --tab -- echo 'ts-node /home/oleg/codes/typeaware/doc-gen/lang/typescript/api/src/.test/express.test.ts' | bash   nothing happens, the gnome-terminal never opens.

I preface this by saying I am pretty much a complete noob when it comes to script writing.  Anyway, I am looking to create a script that opens a terminal in the GUI environment of Ubuntu, and when it does, shows the output of the other commands running in the script.   The reason for this is I am looking to take the script, throw it into the directory that runs scripts on log in and have it opening a terminal, run my normal update scripts and then keep the terminal open to allow me to continue after.  My reason is basically to just get more experience, and I figured to automate something I do every time I login.


Given a connected graph $G=(V,E)$, a theorem states that edge covering number + size of a maximum matching = total number of vertices in $G$.  I'm just wondering how I can prove this theorem? The proof was never given in class.

Given a connected graph, how can we prove that the number of edge of its minimum edge cover plus its maximum matching is equal to the number of vertices?


I installed the Ubuntu subsystem with 18.04 on Windows 10. The installation was apparently stuck at ~"Installing...", but when I pressed Enter the output ~"Please enter a new UNIX username:" was shown and the key press was taken as confirmation for an empty username. The installation then hang further and I had to close the window with CtrlC.  When I start the Ubuntu subsystem I get a prompt for root which makes me think that the initialization didn't succeed. How can I complete/restart it?

Many websites says I should use lxrun /setdefaultuser, but this command is deprecated:  C:\WINDOWS\system32>lxrun /setdefaultuser foo Warning: lyrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.  How can I change the default username which is in my case root. I would like it to be the same username as I use with my Windows account. Btw I am using mintty to run WSL: %LOCALAPPDATA%\wsltty\bin\mintty.exe --WSL= -h err --configdir="%APPDATA%\wsltty" -~


I need to attach a dynamic click on a dynamically added element .may inside a setTimeout function. How can I use setTimeout on this element?  $('.btn').on('click', function (){   setTimeout(function(){      $('.may').click();   }, 3000); });

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


I am readying in this website for a long time today similar questions and the answers provided about the issue I am asking now but I have to say I am more baffled than I was originally.  My original question would be:  I have read in many textbooks when they teach integration that they emphasize not to treat dx as a quantity but only as a notation that shows which is the variable of integrations. The same textbooks after a while they start talking about differentials and based on the following expressions  $$ df = f'(x)dx\quad df = f_{x}dx+f_{y}dy $$  they say that now that differentials have been introduced we can treat them as independent variables and use them freely as fractions.  Now I was always working with that idea, but after some digging I start seeing a lot of different answers, especially in here, and most of them were conflicting.  There were people mentioning Non-Standard Analysis and Differential Forms and were trying to justify that we can treat differentials as fractions. Also there were other people saying that every time we treat them as fractions we actually apply other theorems and so we don't actually treat them that way.   So the questions I have to ask now is:   Can we actually treat differentials as fractions in EVERY framework, or is there today a debate about it?  I don't want personal opinions or what we can do in a specific framework. I saw a lot of people mentioning that in single variable calculus you may treat them like that because you won't do mistakes. Can you actually treat them like that strictly mathematically in EVERY framework or you can just do it for ease but you actually apply different theorems behind the scenes? If differentials can't be treated in EVERY framework as a fraction then is it defined and proven that they can be always treated as a fraction in some frameworks? Given that we have defined differentials as  $$ df = f'(x)dx\quad df = f_{x}dx+f_{y}dy $$  then didn't we automatically defined than they can be used as independent quantities, so they can be seen as fractions also? Shouldn't we accept them as fractions from the moment of that definition existed?

In the book Thomas's Calculus (11th edition) it is mentioned (Section 3.8 pg 225) that the derivative $dy/dx$ is not a ratio. Couldn't it be interpreted as a ratio, because according to the formula $dy = f'(x)dx$ we are able to plug in values for $dx$ and calculate a $dy$ (differential). Then if we rearrange we get $dy/dx$ which could be seen as a ratio.   I wonder if the author says this because $dx$ is an independent variable, and $dy$ is a dependent variable, for $dy/dx$ to be a ratio both variables need to be independent.. maybe?


Questions that are marked as duplicates are now distinct from those closed for quality reasons.  However, they are both still found using closed:1 in searches.  As a moderator I want to look at lists of each type of question separately.  If there is not already a way I am requesting a duplicate:1 search tag for the purpose of separating these results.

I often search for closed questions and sift through the ones that are not duplicates to see if any of them need to be killed. Technically, closure is the first step towards deletion and the only closed posts that are actually useful are duplicates (unless it's a crappy one).  For the rest, if the community hasn't bothered to reopen it after a while or if the OP has made no effort to edit their question, I delete it if it has no redeeming content. For example, the only closed posts seen on  are exact dupes.  But this does become tedious when there are several results for various close reasons with duplicates interspersed between them. I'd like to be able to search as:  closed:1 duplicate:0   so that it gives a list of questions closed as OT/NaRQ/NC/TL. This will be similar in behaviour to migrated:0|1.   This will also be useful for 10k+ users on all sites (2k+ in beta) in the network, especially SO, so that they can search for questions to spend their delete votes on— especially closed, non-dupe questions in the tag they specialize in. More often than not, I hesitate to vote on questions that are outside my area of interest (unless it is crappy).


Consider the following code:  class A { public:     virtual void hello() { std::cout << "Hello from A" << std::endl; }     void hi() { std::cout << "Hi from A" << std::endl; } };  class B : public A { public:     void hello() { std::cout << "Hello from B" << std::endl; }     void hi() { std::cout << "Hi from B" << std::endl; } };  int main() {     A foo = B();     foo.hello();    // prints "Hello from A"     foo.hi();       // prints "Hi from A";      A *bar = new B();     bar->hello();   // prints "Hello from B"     bar->hi();      // prints "Hi from A" }   I'm aware that since hello() is declared as a virtual function in class A, any object of class B should have overridden behavior. However, why doesn't the object foo call the overridden hello()?  In other words, in what ways are the two object construction methods different? A foo = B(); v/s A *bar = new B()?  Thanks!

Someone mentioned it in the IRC as the slicing problem.


I followed tutorial on codelabs developer google for Google vision api, it's worked fine for me There is a method called ONTAP, when the user clic the camera screen TexttoSpeech, speak the text loud. Here is the method:   private boolean onTap(float rawX, float rawY) {         // TODO: Speak the text when the user taps on screen.         OcrGraphic graphic = mGraphicOverlay.getGraphicAtLocation(rawX, rawY);         TextBlock text = null;         if (graphic != null) {             text = graphic.getTextBlock();             if (text != null && text.getValue() != null) {                 Log.d(TAG, "text data is being spoken! " + text.getValue());                 // Speak the string.                 tts.speak(text.getValue(), TextToSpeech.QUEUE_ADD, null, "DEFAULT");             }               else {                 Log.d(TAG, "text data is null");             }         }         else {             Log.d(TAG,"no text detected");         }         return text != null;     }   NOW what i want to do is when the camera detect the sentence string:  I LOVE YOU I want it to make in action in a TOAST for example to say: Ok this sentence has been detected.  I tried this its not working:  private boolean onTap(float rawX, float rawY) {         // TODO: Speak the text when the user taps on screen.         OcrGraphic graphic = mGraphicOverlay.getGraphicAtLocation(rawX, rawY);         TextBlock text = null;         if (graphic != null) {             text = graphic.getTextBlock();             if (text != null && text.getValue() != null) {                 Log.d(TAG, "text data is being spoken! " + text.getValue());                 // Speak the string.                 tts.speak(text.getValue(), TextToSpeech.QUEUE_ADD, null, "DEFAULT");             }             else if (text.getValue()=="I love you"){                  // Speak the string.                 Toast.makeText(this, "Ok this sentence has been detected", Toast.LENGTH_LONG).show();             }              else {                 Log.d(TAG, "text data is null");             }         }         else {             Log.d(TAG,"no text detected");         }         return text != null;     }   Please somebody helps me. Thanks you.

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


Regarding a UK spousal visa, if I live with my husband and he owns the property do I need to provide deeds of the property for supporting documents or is there no need?

I am married to an EU citizen, I am confused about what to submit on "home address" supporting documents. I don't have a mortgage or property deed simply because I live with my husband. So what should I fill with the missing supporting documents of home address if I am currently living with my husband?


I get the Oops! code message when submitting the question below, any idea why?  Oops! Your question couldn't be submitted because: Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon.  Moq throws a TypeInitializationException when using Moles with the [HostType("Moles")]. Code example and exception below.        [TestMethod]     [HostType("Moles")]     public void TestMethod()     {         var mock = new Mock<IAnything>();     }  The exception:  <pre> System.TypeInitializationException occurred   Message=The type initializer for 'Moq.Extensions' threw an exception.   Source=Moq   TypeName=Moq.Extensions   StackTrace:        at Moq.Extensions.IsMockeable(Type typeToMock)        at Moq.Mock`1.CheckParameters()        at Moq.Mock`1..ctor(MockBehavior behavior, Object[] args)        at Moq.Mock`1..ctor(MockBehavior behavior)        at Moq.Mock`1..ctor()        at BP.DFR.Common.Services.Network.DfrNetworkQueryTests.MyTestMethod()   InnerException: System.Security.VerificationException        Message=Operation could destabilize the runtime.        Source=Moq        StackTrace:             at Moq.Extensions..cctor()        InnerException: </pre>   The link below suggested it might be a moq version issue, but it happens in both version 3.1 and 4.0 for me.  http://code.google.com/p/moq/issues/detail?id=344  I'm using VS 2010 Premium SP1. Anybody had any luck resolving this?

I just tried to post a question containing the following text:    I'm building a music app, which has an ongoing notification. I meet the text color problem of notifications:   1. On Galaxy S with Android 2.3.3, the notification background is black, and also the texts are. That makes Galaxy S users hard to read the texts.  2. On Motorola Droid with Android 2.2.2, the notification background is white, and so the texts are. That also makes text hard to read.  My current code is:   ### Layout XML ###     <LinearLayout android:layout_width="fill_parent"         android:layout_height="wrap_content" android:orientation="vertical">          <TextView android:id="@+id/notifbar_trackname"             style="@style/NotificationTitle"             android:focusable="true" android:singleLine="true"             android:layout_gravity="left" android:layout_width="wrap_content"             android:layout_height="wrap_content" />          <TextView android:id="@+id/notifbar_artist"             style="@style/NotificationText"             android:layout_gravity="left" android:scrollHorizontally="true"             android:ellipsize="end" android:layout_width="wrap_content"             android:layout_height="wrap_content" />          <TextView android:id="@+id/notifbar_queue"             style="@style/NotificationText"             android:layout_gravity="left" android:scrollHorizontally="true"             android:ellipsize="end" android:layout_width="wrap_content"             android:layout_height="wrap_content" />      </LinearLayout>  ### styles.xml in values/ ###     <style name="NotificationText">         <item name="android:textColor">?android:attr/textColorPrimary</item>     </style>     <style name="NotificationTitle">         <item name="android:textColor">?android:attr/textColorPrimary</item>         <item name="android:textStyle">bold</item>     </style>  ### styles.xml in values/v9/ ###     <style name="NotificationText" parent="android:TextAppearance.StatusBar.EventContent" />     <style name="NotificationTitle" parent="android:TextAppearance.StatusBar.EventContent.Title" />  Does anyone know what's wrong in my code? Thank you!   When I try to confirm, the system says:     Oops! Your edit couldn't be submitted because:      Your post appears to contain code that is not properly formatted as code. Please indent all   code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more   editing help, click the [?] toolbar icon.   I totally have no idea what the system is complaining about. I have all code indented by 4 spaces.  Can anyone help?


I am dealing with a numerical problem with cubic spline, but I am a little bit confused while using them because of terms spline and b-spline.   In simple words, what is the difference between the cubic spline and cubic b-spline? Are these both terms the same, or is the b-spline another name for cubic spline?

What is the relationship between cubic B-splines and cubic splines?


Does this integral converge when $p<0$?  $$\int\limits_0^\infty \sin(x^p)\ dx$$

Consider the $\displaystyle \int_0^\infty $sin$ (x^p) dx$. Does it converge when $p<0$? Does it converge when $p>1$?    My Work:  Let $x^p=y$, then $\displaystyle \int_0^\infty $sin$ \displaystyle (x^p) dx=\frac{1}{p}\sum_{n=1}^\infty \int_{(n-1)\pi}^{n\pi} \frac{\text{sin}  \; y}{y^r} dy$ , where $r=\frac{p-1}{p}>1 $when $p<0$ and $0<r=\frac{p-1}{p}\leq 1 $when $p>1$. I know that $\displaystyle \int_0^\infty $sin$ (\frac{1}{x}) dx$ diverges which is a special case of first case. But failed to show it generally. Can anyone please give me a hint to preceed?


This is the first time I got this error.  This code basically gets the sum of each item sold in a particular date.  Any tips on resolving this problem? Thanks.          Statement statement = connection.createStatement();        String query = "SELECT itemcode, SUM(quantity) AS 'Total Sales Per Day' "                + "FROM sales "                + "WHERE real_pur_date = '" + date + "' "                + "GROUP BY itemcode ";        ResultSet rs = statement.executeQuery( query ); // this line gets the error / exception        while( rs.next() ){            Vector row = new Vector();            row.add( rs.getString( "itemcode" ) );            row.add( rs.getInt( "Total Sales Per Day" ) );            dailyData.add( row );        }        statement.close();    Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError at com.mysql.jdbc.Util.handleNewInstance(Util.java:431) at com.mysql.jdbc.ResultSetImpl.getInstance(ResultSetImpl.java:383) at com.mysql.jdbc.MysqlIO.buildResultSetWithRows(MysqlIO.java:3140) at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:491) at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3118) at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2627) at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1556) at posinventory.Controller.StatisticEngine.getDailyData(StatisticEngine.java:20) at posinventory.Statistic.refreshTableDailyStat(Statistic.java:36) at posinventory.Statistic.refreshTableDailyStat(Statistic.java:37) at posinventory.Statistic.refreshTableDailyStat(Statistic.java:37) at posinventory.Statistic.refreshTableDailyStat(Statistic.java:37)

What is a StackOverflowError, what causes it, and how should I deal with them?


For the sentence mentioned below, which verb form (singular or plural) of "cost" fits correctly into the blank space and what is your reason for it:  "Every pale tomato slice, wilted pickle, and brown lettuce leaf [cost/costs] an extra 25 cents at Bernie's Burger Emporium."  I'm aware that "every" would take a singular verb in every case. However, does this still hold true when multiple entities are connected by the coordinating conjunction "and"?  Would your answer change if I write something like this:   "Every item 1, every item 2, and every item 3 [cost/costs] an extra . . ."

Which sentence is correct?   Every apple, every orange, and every pear is good for you. Every apple, every orange, and every pear are good for you.


I'd like to contribute to Ubuntu development, but after  I'd like to avoid using them.  Are there other ways to share?  BitCoin? Check?

PayPal won't accept the card I have, and I wanted to say "thank you" for all the work on Ubuntu with, well, some cash.  How else can I pay?


Lemma 15.43 in Jech's "Set Theory" states that if $V \subseteq M \subseteq V[G]$ where $G \subseteq \mathbb{P}$ is some $V$-generic filter and $M$ is a transitive models of ZFC, then $M = V[D \cap G]$ for some complete subalgebra.  In the proof, he states that since $M$ models choice, for every $X \in M$, there is a set of ordinals $A_X$ such that $X \in V[A_X]$.   I do not see what this set $A_X$ should be and how to construct $X$ in $V[A_X]$. I believe the idea should be that the axiom of choice can be used to show that $X$ is in bijection with some ordinals. However, it is not clear why the coding of this set by ordinals is necessarily in $V$ or $V[A_X]$ for an appropriately chosen set.   Is this the correct approach?

I'm reading the proof of lemma 15.43 of Jech's Set Theory:     Let $G$ be generic on a complete Boolean algebra $B$. If $M$ is a model of $\mathsf{ZFC}$ such that $V\subset M\subset V[G]$, then there exists a complete subalgebra $D\subset B$ such that $M=V[D\cap G]$.   In the proof of this theorem the author states the following fact: "First we note that since $M$ satisfies the Axiom of Choice, there is for every $X\in M$ a set of ordinals $A_X\in M$ such that $X\in V[A_X].$"  My question is, why is this fact true?  Thanks


I have this very simple piece of code that calculates the number of days between to given timestamps:  $timestamp1 = strtotime("2017-01-01"); $timestamp2 = strtotime("2017-01-05");  $timeDiff = abs($timestamp1 - $timestamp2); $numberDays = $timeDiff/86400; $numberDays = intval($numberDays);   It is working perfectly, but I am wondering if there is a way to exclude weekends in the calculation.  I have looked around online and found some alternative options but there is alot more code than what I have above so I am asking if there is an option with minimal code like my above example?

I need a method for adding "business days" in PHP. For example, Friday 12/5 + 3 business days = Wednesday 12/10.  At a minimum I need the code to understand weekends, but ideally it should account for US federal holidays as well. I'm sure I could come up with a solution by brute force if necessary, but I'm hoping there's a more elegant approach out there. Anyone?  Thanks.


Hi all I'm stuck on a homework question. The question is as follows:  "For $a,b\in\mathbb R$ we define $a∗b:=a+b+ab\in\mathbb R$. Furthermore let $G =\mathbb R\setminus\{-1\}$.  Show  that  $G$  together  with  the binary  operation $G × G → G, (a, b)  → a ∗ b$, is a group"  I know I must show that it's associative, there exists a neutral element and there exists an inverse. So far I've managed to show it's associative and I think the neutral element is letting $b=0$ but I don't know what the inverse element would be so that $a*b=0$. Any help would be very much appreciated.

So basically this proof centers around proving that (S,*) is a group, as it's quite easy to see that it's abelian as both addition and multiplication are commutative. My issue is finding an identity element, other than 0. Because if 0 is the identity element, then this group won't have inverses.  The set explicitly excludes -1, which I found to be its identity element, which makes going about proving that this is a group mighty difficult.


Problem: $\{a_n\}_{n\in \mathbb N}, \quad a_{n+1}=\sqrt{2+a_n}, \quad \forall n\geq 1, \quad a_1=\sqrt{2}$  Solution:  We assume $a_n$ converges. Then is $\lim_{n\to\infty}a_n=\lim_{n\to\infty}a_{n+1}$  So we get  $$$a_n=\sqrt{2+a_n} \Rightarrow a_n^2-a_n-2=0$$  which is solved by $a_n=-1$ and $a_n=2$ but since $a_n\geq 0 \forall n$ we only find 2 to be a limit point.  Question: Is that argument okay? I'm not sure, the main part I don't like about is, is the assumption of convergence. Does it work?   I know there are differet solutions, but how good is the one above? Is it valid?

I need to "study the limit behavior of the following sequence" and then compute the limit. I can compute the limit and prove the monotonicity, but I am having trouble proving boundedness. I tried to understand from other similar posts how this could be done, but since I didn't understand I'm asking it as a new question. The sequence is $x_{n+1}=\sqrt{\alpha +x_n}, x_0=\sqrt \alpha, \alpha>0$.  It seems to be monotonically increasing.   Proof:   It can be shown by induction that the sequence is monotonically increasing.   Claim that $x_{n+1}\geq x_n$  $$x_1=\sqrt{\alpha+\sqrt\alpha}>\sqrt\alpha=x_0$$ $x_{n+1}\implies x_{n+2}$ $$x_{n+1}=\sqrt{\alpha+x_n}<\sqrt{\alpha+x_{n+1}}=\sqrt{\alpha+\sqrt{\alpha+\sqrt\alpha}}=x_{n+2}$$ Boundedness:  Because the sequence is monotonically increasing and $x_o=\sqrt\alpha$, it is bounded below by $\sqrt\alpha$. Now comes the part where I have to prove that the sequence is bounded above. The problem is that I don't know how to start, so if anyone could give me a bit of a push I'd be grateful.  The limit:  I know that $\lim\ x_n=\lim \ x_{n+1}$, so letting $\lim\ x_n=x$ then $$x=\sqrt{\alpha+x}$$ and solving would give $x=\frac{1+\sqrt{1+4\alpha}}{2}$.  May somebody please confirm my proof thus far, and help me prove the upper bound? Thanks!


So i have a list          List<String> names = new ArrayList<String>();         names.add("Mike");         names.add("Matthew");         names.add("Kelly");         names.add("Elon");         names.add("Paul");         names.add("Paul");         names.add("Paul");         names.add("Paul");         names.add("Kelly");   I need to count all the names and then print out 3 most popular ones in descending order  Output: Paul : 4 Kelly : 2 Mike : 1   What have i tried? I tried from most basic stuff that i have learned to Maps, treemaps and hashmaps. With last 3 i have had some success but this i could not put them into descending order. I found some tutorials from google but they were all so complicated, yes i could just copy them and get my code working but i prefer learning from it.   Got any suggestions what would be most clearest approach. Since i have never worked with maps before i do not know much about them at the moment i am writing this.  In the end the output should look like this:  Output: Paul : 44,44% Kelly : 22,22% Mike : 11,11%

Input: A positive integer K and a big text. The text can actually be viewed as word sequence. So we don't have to worry about how to break down it into word sequence. Output: The most frequent K words in the text.  My thinking is like this.    use a Hash table to record all words' frequency while traverse the whole word sequence. In this phase, the key is "word" and the value is "word-frequency". This takes O(n) time.  sort the (word, word-frequency) pair; and the key is "word-frequency". This takes O(n*lg(n)) time with normal sorting algorithm.  After sorting, we just take the first K words. This takes O(K) time.    To summarize, the total time is O(n+nlg(n)+K)， Since K is surely smaller than N, so it is actually O(nlg(n)).  We can improve this. Actually, we just want top K words. Other words' frequency is not concern for us. So, we can use "partial Heap sorting". For step 2) and 3), we don't just do sorting. Instead, we change it to be  2') build a heap of (word, word-frequency) pair with "word-frequency" as key. It takes O(n) time to build a heap;  3') extract top K words from the heap. Each extraction is O(lg(n)). So, total time is O(k*lg(n)).  To summarize, this solution cost time O(n+k*lg(n)).  This is just my thought. I haven't find out way to improve step 1). I Hope some Information Retrieval experts can shed more light on this question.


"><style>.ask-title-cell-value input {background:black;color:white;}</style>  This first line is just to demonstrate the XSS.  Related bug:   There seems to be unescaped HTML in the question suggestions. I noticed this when  popped up in my suggestions, and all of a sudden the entire page turned red.  You can check this out by either putting "CSS3 selector for “not A and not B”?" as question title on non-meta SO, or "XSS security problems" on here (and then waiting for the suggestions to load). The "Questions that may already have your answer" box will then load any HTML in the question title, and on the first lines of the question's content (since that's loaded into the link's title="" attribute).  Demonstration picture:

I was entering an issue on Stack Overflow and one of the auto-suggestions had HTML in the title, and it seemed to break the rendering in my browser.  I'm using the latest stable FireFox for Windows 8.1.  Title of question to reproduce the issue:  Showing m.bing.com in the WebBrowser control   See screenshot:


Is there a way to Add autocomplete to Node Titles?  This way I could display duplicate content to users before they add a new post.  Any suggestions?

how to prevent user creating a duplicate node title for a content type?  I already try uniqueness module () but it's only list out the duplicate content title but not return any error message when user save the new content. Any suggestion module or code? :)


In middle school (ca. 1976) I read a science fiction book with a title similar to "Psi Phi."  Unfortunately, I wasn't familiar with the Greek alphabet at the time, so the title never made sense to me, so I can't recall it accurately. Based on my vague memory of the title, I'm thinking it may have been an anthology or a series of science fiction novelas.  The story was about a man who, while experimenting on "a block of tungsten," learned how to travel to a different universe at will.  He described the process of learning to travel there as "knowing where the latch on a secret drawer was."  While in the other universe, his surroundings were uninterpretable, "like swirling shapes and colors." He noticed his own body was (consistent with everything else in this universe) a confusing mass of swirling shapes and colors.  Eventually, a being from the other universe followed him back to his universe.  It was a woman with purple eyes.    That's about all I remember. Except that I enjoyed the story and read it 3 or 4 times.  One of the reasons I kept coming back to it, was that it did refer to a number of things (like different elements, such as tungsten) that I was just beginning to learn about.  I didn't understand all the connections the story made, but they intrigued me.  I'd like to read the story again as an adult.  Would anyone know the name of the book, the name of the story, or the author's name?

In the 1960s I read book--an older children's book, I think--which I loved, and still remember, roughly.  I have no idea what the title is or who the author is, and I'm wondering if anyone knows this one:  Scientists had invented a device which they didn't fully understand, and which had puzzling effects.  For example, when a pencil was put into the machine, it disappeared, and then reappeared inside out: The lead was on the outside.  When people went into the machine, they came back dead, having died from fright.  Finally they sent a very open-minded person into the machine.  She was an artist, I think.  She was able to return alive, and described an alternate universe in which geometry was very different.  I distinctly remember that there were supposedly square triangles or four-sided triangles--or was it three-sided squares?  (This is, of course, a literally contradictory claim, but I didn't see the matter as clearly then.)  Thanks!


I have an arraylist called election(). Why isn't code this reassigning the name variable like it should.  private static void replaceName(String oldName, String newName){     Candidate c;     for(int i = 0;i<election().size();i++){         c = election().get(i);         if(c.name == oldName){             election().get(0).name = newName;             System.out.println(election().get(0).getName());         }     } }

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


im not really good in c++ so i wondering if someone can help me with this.                      std::vector<std::string> vocations;                 for(VocationsMap::iterator it = Vocations::getInstance()->getFirstVocation(); it != Vocations::getInstance()->getLastVocation(); ++it)                 {                     if(it->first == it->second->getFromVocation() && it->first != 0)                         vocations.push_back(it->second->getName());                 }                  msg << "What would you like to be... ";                 for(std::vector<std::string>::const_iterator it = vocations.begin(); it != vocations.end(); ++it)                 {                     if(it == vocations.begin())                         msg << "{" << *it << "}";                     else if(*it == *(vocations.rbegin()))                         msg << " or {" << *it << "}.";                     else                         msg << ", {" << *it << "}";                 }             }   I want to make (*it) in lowercase

I want to convert a std::string to lowercase. I am aware of the function tolower(). However, in the past I have had issues with this function and it is hardly ideal anyway as using it with a std::string would require iterating over each character. Is there an alternative which works 100% of the time?


Given this class:   public class Wrapper<T> {     public Wrapper(T value)     {         Value = value;     }      public T Value { get; }      public static implicit operator Wrapper<T>(T value)     {         return new Wrapper<T>(value);     } }   This code snippet doesn't compile:  IEnumerable<int> value = new [] { 1, 2, 3 }; Wrapper<IEnumerable<int>> wrapper = value;      error CS0266: Cannot implicitly convert type 'System.Collections.Generic.IEnumerable< int>' to 'Spikes.Implicit.Wrapper< System.Collections.Generic.IEnumerable< int>>'. An explicit conversion exists (are you missing a cast?)   But the compiler is perfectly happy with this:  Wrapper<IEnumerable<int>> wrapper = new [] { 1, 2, 3 };   Why?

I have a generic class that I'm trying to implement implicit type casting for.  While it mostly works, it won't work for interface casting.  Upon further investigation, I found that there is a compiler error: "User-defined conversion from interface" that applies.  While I understand that this should be enforced in some cases, what I'm trying to do does seem like a legitimate case.  Here's an example:  public class Foo<T> where T : IBar {     private readonly T instance;      public Foo(T instance)     {         this.instance = instance;     }     public T Instance     {         get { return instance; }     }     public static implicit operator Foo<T>(T instance)     {         return new Foo<T>(instance);     } }   Code to use it:  var concreteReferenceToBar = new ConcreteBar(); IBar intefaceReferenceToBar = concreteReferenceToBar; Foo<ConcreteBar> concreteFooFromConcreteBar = concreteReferenceToBar; Foo<IBar> fooFromConcreteBar = concreteReferenceToBar; Foo<IBar> fooFromInterfaceBar = intefaceReferenceToBar; // doesn't work   Does anyone know a workaround, or can anyone explain in a satisfactory way why I shuouldn't be able to cast interfaceReferenceToBar implicitly to Foo<IBar>, since in my case it is not being converted, but only contained within Foo?  EDIT: It looks like covariance might offer salvation.  Let's hope the C# 4.0 specification allows for implicit casting of interface types using covariance.


I was trolling on around on  when I got a notification on the StackExchange Banner from .  Even though the badge was issued for Stack Overflow, the sprite was pulled from the site I was currently on:    This is not the behavior I would expect.  Since the Stack Exchange banner is universal to the Stack Exchange network experience, I would expect a standardized version to be used. A more robust solution might even to pull in the appropriate sprite from the site that is showing the notification, but that might require loading too many resources.  Here are the sprites in question:

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


Could you help me to find an arrow symbol I found it in   using as items in blue (at the first page):

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I know that there is definitely module and vector space these two objects are similar. see the quotation below:      A module is abstractly very similar to a vector space, although in modules, coefficients are taken in rings that are much more general algebraic objects than the fields used in vector spaces. A module taking its coefficients in a ring is called a module over , or a R-module.   Question 1: I did not understand the meaning of line "general algebraic objects " in the above paragraph.  Question 2: What are other things that are similar or not similar  between module and vectors space in terms of geometry?

Linear algebra is a very well-behaved part of mathematics. Soon after you have mastered the basics you got a good feeling for what kind of statements should be true -- even if you are not familiar with all major results and counterexamples.  If one replaces the underlying field by a ring, and therefore looks at modules, things become more tricky. Many pathologies occur that one maybe would not expect coming from linear algebra.  I am looking for a list of such pathologies where modules behave differently than vector spaces. This list should not only be a list of statements but all phenomena should be illustrated by an example.  To start the list I will post an answer below with all pathologies that I know from the top of my head. This should also explain better what kind of list I have in mind.


I am reading Michael Aschbacher's Finite group theory textbook. Exercire 1.6 makes me confused.   1.6 Let H is normal subgroup in G. Then the map L->L/H is a bijection between the set of all subgroups of G containing H and the set of all subgroups of G/H. Normal subgroups correspond to normal subgroups under this bijection.  It is not clear for me what is L. I perused previous paragraphs but didn't find any relevnt information. I will be really thankful if someone would help me to understandhow to solve this exercise.

I had studied group theory a year ago, but still could not understand the proof involving The Correspondence theorem.  let $G$ be a group and let $N⊴G$, where  $N⊴G$ indicates that $N$ is a normal subgroup of $G$. Then there is a bijection from the set of subgroups $A$ of $G$ that contain $N$ onto the set of subgroups $\overline A $=$A/N$ of $G/N.$  Can anyone explain the steps to me in:  $(1.)$ a very easy-going manner so that I understand importance of each step. $(2.)$I don't require the proof but only how the step follow each other .  I'll be thankful if there is anyone kind enough to do this....


i'm trying to add an AnchorPane to my fxml file, after loading it in main through a method i defined in the controller, but i'm getting this error  Exception in Application start method java.lang.reflect.InvocationTargetException     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)     at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767) Caused by: java.lang.RuntimeException: Exception in Application start method     at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)     at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$154(LauncherImpl.java:182)     at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException     at sample.Controller.addAnchor(Controller.java:20)     at sample.Main.start(Main.java:16)     at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)     at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)     at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)     at java.security.AccessController.doPrivileged(Native Method)     at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)     at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)     at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)     at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)     ... 1 more Exception running application sample.Main   Controller.java  public class Controller {     VBox vBox;     public void addAnchor(){         AnchorPane user = new AnchorPane();         user.setPrefHeight(50);         user.setPrefWidth(200);         Label test = new Label("test");         test.setLayoutX(113);         test.setLayoutY(15);         test.setCursor(Cursor.HAND);         user.setCursor(Cursor.HAND);         user.getChildren().add(test);         vBox.getChildren().add(user);     } }   Main.java  @Override     public void start(Stage primaryStage) throws Exception{         FXMLLoader loader = new FXMLLoader(getClass().getResource("sample.fxml"));         loader.setController(new Controller());         Controller controller = loader.getController();         controller.addAnchor();         Parent root = loader.load();         primaryStage.setTitle("Hello World");         primaryStage.setScene(new Scene(root, 800, 600));         primaryStage.show();     }   GridPane  <GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="572.0" prefWidth="755.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.Controller">   Vbox  <VBox id="vBox" maxHeight="1.7976931348623157E308" prefHeight="444.0" prefWidth="252.0" style="-fx-background-color: #C3B091;">     I've been stuck here for a day, any help would be very much appreciated.

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


A cancer test is 90 percent positive when cancer is present. It gives a false positive in 10 percent of the tests when the cancer is not present. If 2 percent of the population has this cancer what is the probability that someone has cancer given that the test is positive?   I multiplied the 90 by 10 divided by 90 times 10 plus 2.

A test for a certain disease has a probability $\frac{4}{5}$ of detecting the disease when it ispresent and a probability of $\frac{1}{10}$ of falsely \detecting" it when it is not present.   The proportion of people afflicted by the disease for a given population is 15%.   If a person from the population is randomly selected and gives a positive result to the test, what is the probability that this person really has the disease? (Answer: 24/41).  I'm struggling to get that answer. I honestly just don't know how to approach this question.


This is the DB manager, and it shows only the history of the statements that were used, but it does not show the records of the modified data in a table. How do I see the history of the statements made in the database when modifying records?

Is there a ways to  - make QGis log its generated SQL Statement or to - force POSTGIS to log all interaction with QGIS?  There is something strange happening to the WFS layer I retrieve in QGIS, since it does  not select all data available in the respective database table. I need to find out, what criteria QGIS chooses in order to narrow down the select set.


I have a pdf file that I'm positive was originally set up in TeX. Is there a way to extract the original markup from this?  If it's any help, I work with Windows 7 and MikTeX 2.9

I know that hardly any information is passed to the PDF when a .tex file is compiled.  But is there a tool that can convert a PDF document back to (La)TeX?


My teacher said  $1\over n$ is not element of $\ell^1$ .I know if $\sum_{i=1}^\infty|{1\over n}| < \infty$ , it is element of $\ell^1$. Let's consider the series $(x_i)=(1,{1\over 2}, {1\over 3} , . . .)$ .It seems to me  if i sum  all the component of the series up , it will be smaller than $2$  so it is finite.       Is it right ? Thank you for your help.

I am struggling understanding intuitively why the harmonic series diverges but the p-harmonic series converges. I know there are methods and applications to prove convergence, but I am only having trouble understanding intuitively why it is. I know I must never trust my intuition, but this is hard for me to grasp. In both cases, the terms of the series are getting smaller, hence are approaching zero, but they both result in different answers. $$\sum_{n=1}^{\infty}\frac{1}{n}=1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\cdots = \text{diverges}$$   $$\displaystyle \sum_{n=1}^{\infty}\frac{1}{n^2}=1+\frac{1}{2^2}+\frac{1}{3^2}+\frac{1}{4^2}+\cdots =\text{converges}$$


Hope someone can help I know the basics of DNS setup, am having an issue with my hosting company. Have several domains hosted, DNS settings are basically setup by the hosting company using their nameservers.  There is this one domain that was setup recently in a new environment (other nameservers) and my client has problems reaching certain e-mail addresses from this domain, they bounce (Sender address rejected: Domain not found) Tried many dns lookup tools to find out what could be happening, resulted in using  which returns 'no nameservers found'  The dig option from the same online tool returns a SERVFAIL when using Google's DNS, when I use the hoster's nameserver these resolve correctly...  Dig from command prompt gives the same result  dig mydomain.com @8.8.8.8  ; <<>> DiG 9.10.3 <<>> mydomain.com @8.8.8.8 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 30575 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1   I reported this to the hoster and eventually they responded that they couldnot find any issue that would explain this behavior. They provided a link to www.intodns.com showing that everything was setup correctly and resolves fine...  Feel like I am left hanging a bit, I don't know why Google doesnot resolve, but it seems an obvious problem that could cause lots of issues. Could someone explain to me what this probably means and how this could be rectified.  edit as per request domain name is: dwc-amsterdam.com

I am receiving some reports from different clients in Spain, US and France that they cannot access my website, . They get a ERR_NAME_NOT_RESOLVED error saying the server cannot be found.  Personally, I do not get any error and most visitors don't experience it, but one of my clients has been kind enough to send me their traceroute outputs - below. He uses Google DNS in his browser.  I have a shared IP address which made me think it was blocked by an ISP, but it doesn't seem like it is the case. I have contacted Telefonica (which is the last server reached by my client) to ask if they blocked my IP address just in case, but it has been nine days and no response so far.  All website testing programs I've tried cannot seem to find the error. The only red flag I found was that my MX records points to a CNAME. But this is the standard mail settings of my host, .  Could anyone tell me if they cannot access the website and send me the traceroute or do you have any suggestions as to why this is happening? Should I change host just in case?  traceroute to ultreyatours.com (160.153.74.24), 64 hops max, 52 byte packets  1  192.168.1.1 (192.168.1.1)  7.887 ms  2.594 ms  2.378 ms  2  192.168.144.1 (192.168.144.1)  51.844 ms  42.309 ms  41.189 ms  3  * * *  4  26.red-80-58-89.staticip.rima-tde.net (80.58.89.26)  55.877 ms     65.red-81-46-3.staticip.rima-tde.net (81.46.3.65)  54.211 ms     26.red-80-58-89.staticip.rima-tde.net (80.58.89.26)  54.896 ms  5  216.184.113.116.nuevatel.com (216.184.113.116)  51.841 ms  51.221 ms  51.849 ms  6  xe0-0-0-8-grtlontlw1.red.telefonica-wholesale.net (94.142.125.246)  88.292 ms     xe6-1-0-0-grtlontl1.net.telefonicaglobalsolutions.com (213.140.36.254)  94.572 ms     xe-2-0-2-0-grtparix1.net.telefonicaglobalsolutions.com (94.142.117.174)  115.531 ms  7  xe2-0-1-0-grtwaseq6.net.telefonicaglobalsolutions.com (94.142.116.209)  164.105 ms     xe-3-1-4-0-grtwaseq6.red.telefonica-wholesale.net (213.140.36.242)  148.022 ms     xe0-0-1-0-grtnycpt3.red.telefonica-wholesale.net (94.142.126.73)  185.685 ms  8  xe-0-0-2-0-grtnycpt3.red.telefonica-wholesale.net (94.142.126.69)  150.588 ms     dcp-brdr-03.inet.qwest.net (63.235.40.197)  157.253 ms  151.465 ms  9  phn-edge-08.inet.qwest.net (67.14.40.50)  218.708 ms     dcp-brdr-03.inet.qwest.net (63.235.40.197)  163.898 ms     xe3-1-1-0-grtwaseq6.net.telefonicaglobalsolutions.com (5.53.6.145)  178.165 ms 10  xe6-0-6-0-grtwaseq6.net.telefonicaglobalsolutions.com (94.142.116.102)  183.294 ms     phn-edge-08.inet.qwest.net (67.14.40.50)  218.202 ms     63-232-81-254.dia.static.qwest.net (63.232.81.254)  235.276 ms 11  be39.trmc0215-01.ars.mgmt.phx3.gdg (184.168.0.73)  224.855 ms     63-232-81-254.dia.static.qwest.net (63.232.81.254)  255.575 ms     phn-edge-08.inet.qwest.net (67.14.40.50)  227.479 ms 12  be39.trmc0215-01.ars.mgmt.phx3.gdg (184.168.0.73)  230.942 ms     be38.trmc0215-01.ars.mgmt.phx3.gdg (184.168.0.69)  230.278 ms     63-232-81-254.dia.static.qwest.net (63.232.81.254)  235.399 ms 13  * * be39.trmc0215-01.ars.mgmt.phx3.gdg (184.168.0.73)  243.940 ms 14  * * be39.trmc0215-01.ars.mgmt.phx3.gdg (184.168.0.73)  239.542 ms 15  * * * 16  * * * 17  * * * 18  * * * 19  * * * 20  * * * 21  * * * 22  * * * 23  * * * 24  * * * 25  * * * 26  * * * 27  * * * 28  * * * 29  * * * 30  * * * 31  * * * 32  *


Why does my LIDAR dataset show up ~500 meters to the east of the correct position even though a spatial reference/coordinate system is provided?  Some background:   The LIDAR data were downloaded from the USGS website as .zip files Unzipped, the .las files have an associated .xml file with correct coordinates for tile position (UL Corner, UR Corner etc.)  Projected coordinate system (State Plane NAD 1983 Florida East Meters) is listed in .xml The FL County layer in the image below is in the correct location.   How can I permanently bind the projection/spatial information to the .las file (not need the separate manually created .prj file)? I'm trying to use the LAStools (from lastools.org). When I use the LASclip, the clipping polygon is in the correct location but arcmap thinks the .las file is 500 meters east still, so nothing (or everything) gets clipped.

How can one change a coordinate system for a .lasd (Lidar) dataset?  The file is currently in UTM_Zone_15N and I am trying to convert it to IL_East.


for(i = 0; i < data.length; i++) {     timesheets.i =  { name, day, month, date, year, time }; }   When I run this code, it just overwrites the values for timesheets as it loops.  How can I name the different objects within timesheets using the variable i?  edit:  The first comment helped a ton. But when I try and create different object using  timesheets[name] = { name, day, month, date, year, time };   it overwrites the values instead of adding an additional object. When I try and use  timesheets[name] += { name, day, month, date, year, time };   It console logs as   {   'Pres Trump': 'undefined[object Object][object Object]',   'Pres Obama': 'undefined[object Object][object Object]' }   What could I be doing wrong?  edit:  fixed with  if(timesheets[name] == undefined){                 timesheets[name] = [ dateOutput, time ]             }else{                 timesheets[name] +=  [ dateOutput, time ];             }

All the documentation I've found so far is to update keys that are already created:  arr['key'] = val;  I have a string like this: " name =  oscar "  And I want to end up with something like this: { name: 'whatever' }  That is, split the string and get the first element, and then put that in a dictionary. Code var text = ' name = oscar ' var dict = new Array(); var keyValuePair = text.split(' = '); dict[ keyValuePair[0] ] = 'whatever'; alert( dict ); // Prints nothing.


so i know why this happens it's because the sockets on the front of the Case are not placed properly and it feels like there is some electricity is going on within it. i will send it to repair it but till then Asus Realtek Audio HD keeps popping up literally every time my handsfree's cord moves ever so slightly. and think that i'm plugging/unplugging it every second. i tried to search around but none of the guides had what I HAVE. it looks like this and i just can't find the automatic pop up setting or whatever. if you could tell me how to disable the automatic pop up as a temporary solution it would be wonderful. PLEASE HELP

I have a headphone jack with a broken sensor. The headphones are normally supposed to turn on when they're plugged in. Because the jack is broken, however, my computer only detects that my headphones are plugged in when I push or tilt the plug, and that's the only time I can get sound out of them. Therefore I'd like to control this feature manually and force the sound to come out of my headphones all the time.   I've found registry keys that can be edited for Windows 7 and 8 which give this functionality, but none for Windows 10.  Realtek's HD Audio Manager has a "Disable Front Panel Jack Detection" option which gives this functionality, but Realtek's skin for Dell motherboards, which my computer has, does not include this option.  So I was thinking: Perhaps this Dell skin is only cosmetic. If I could find out which registry key is changed when someone else checks the "Disable Front Panel Jack Detection" box in their Realtek Audio Manager, I could edit that same key on my computer, and achieve the same functionality.  Does anyone know which key this is?


Using titletoc, is it possible to not only hyperlink the section name, but also the section number and the page number?  Solution:

I am currently writing my PhD thesis, and I have trouble defining a common style for my global TOC and the partial TOCs generated by titletoc.  Basically if you check the following MWE, I like the general style of the global TOC, in particular the fact that hyperref links include the labels. However, I find that the dotted lines in the global TOC are not dense enough, and prefer those of the partial TOCs.  \documentclass[12pt,a4paper]{book}  \usepackage{caption} \usepackage{titletoc} \usepackage[colorlinks]{hyperref} \usepackage{lipsum}  \renewcommand{\cleardoublepage}{\clearpage}  \newcommand{\PartialToc}{\vspace*{0.5pc}\vbox{\bf\large\noindent Chapter contents}\vspace*{0.3pc}\startcontents[chapters]\vspace*{0.3pc}\printcontents[chapters]{p}{1}{}\vspace*{0.3pc}}  \begin{document}  % Custom style for partial TOCs \titlecontents{psection}[3.6em]{\small\bfseries}{\contentslabel{1.8em}}{}{\mdseries\titlerule*[0.25pc]{.}\contentspage\hspace*{1.8em}}{} \titlecontents{psubsection}[6.0em]{\small}{\contentslabel{2.4em}}{}{\titlerule*[0.25pc]{.}\contentspage\hspace*{1.8em}}{}  \tableofcontents \listoffigures \listoftables  \chapter{Chapter 1}  \vfill \lipsum[1-2] \vfill\PartialToc\clearpage  \section{Section 1} \lipsum[1]  \begin{figure}[t]     \caption{Figure 1} \end{figure}  \section{Section 2} \lipsum[1] \subsection{Subsection 2.1} \lipsum[1] \subsection{Subsection 2.1} \lipsum[1] \section{Section 3} \lipsum[1]  \begin{table}[t]     \caption{Table 1} \end{table}  \end{document}   Therefore, I tried to increase the density of the dotted lines in the global TOC, by adding the following titletoc style declarations after \begin{document}:  \titlecontents{section}[3.8em]{}{\contentslabel{2.3em}}{\hspace*{-2.3em}}{\titlerule*[0.25pc]{.}\contentspage}{} \titlecontents{subsection}[6.2em]{}{\contentslabel{2.9em}}{}{\titlerule*[0.25pc]{.}\contentspage}{}   However, in this case, the hyperref links are changed, which I would like to avoid (no I am not a maniac...). Is there a way to achieve this ? And can this also be used to make the hyperref links in the partial TOCs include the labels ?  And as a subsidiary question, how do I assign the same style to entries in the List of Figures and List of Tables ?  Thank you for your help


Let's suppose I have a dataset with classes A and B, with class A occurring in 1% of cases and class B occurring in 99% of cases. Perhaps class A is a loan default.  Suppose I want to "understand" what factors make one class A vs B by fitting a logistic regression to dependent variables X and then looking at model coefficients. Does it make sense to put a higher class_weight on class A, such as putting a weight of 99 on class A and 1 on class B? Or does the intercept already take care of this?  What if the logistic regression has a regularization parameter, would class imbalance matter more in this scenario? (because the model would be more inclined towards a constant "Predict B" model to reduce the penalty on coefficient size).   I've seen many economics papers in which a unregularized logistic regression is run on data and then the authors interpret coefficient sizes and significance, just wondering how valid this is.

Okay, so I think I have a decent enough sample, taking into account the 20:1 rule of thumb: a fairly large sample (N=374) for a total of 7 candidate predictor variables.   My problem is the following: whatever set of predictor variables I use, the classifications never get better than a specificity of 100% and a sensitivity of 0%. However unsatisfactory, this could actually be the best possible result, given the set of candidate predictor variables (from which I can't deviate).   But, I couldn't help but think I could do better, so I noticed that the categories of the dependent variable were quite unevenly balanced, almost 4:1. Could a more balanced subsample improve classifications?


I can export files to cad (i use ArcGIS 10.2), but the converted file does not involve labels,.  Then i tried to use another option, right click to layer name in Table of Contents then click Convert Labels to Annotation then export to cad but still same problem.  The result is a useless vector data without labels, so how can i export a layer to cad with labels?

I have a new task where the client is asking for a .dwg file of layer labels. My first thought would be to create an annotation of the labels and then try and use the Export to CAD tool in ArcMap. Does this sound like an appropriate workflow?  I am using ArcMap 10.1  Ultimately I would like to create a model and tool to do this.


Assume there are no other forces acting and the rocket+fuel described do not weigh anything. Also, by rocket I mean engine/thruster, not space shuttle.  Suppose you have a planet, say of mass 1,000,000,000 kg and you push it with a rocket which exerts a force of 1 N. This will accelerate the planet by $10^{-9}\, m/s^2$.  Then, suppose you have a feather of mass 0.005 kg and push it with the same rocket which exerts a force of 1 N, accelerating it by $200\, m/s^2$.  It follows that the feather will traverse a distance of 1 m much faster than the planet and thus spend much less rocket fuel to do so. So, the energy used to propel the planet must be much more than the energy used to propel the feather.  But, work done = force × distance, $1 \times 1 = 1\, J$ for both the planet and the feather. I think I have misunderstood something. How is this possible?

The change in energy of an object can be determined by the work equation, where work is the change in energy:  $$ W = F \cdot d $$  I conceptualize the transfer of energy as simply a series of small "packets" of energy being transferred at every Planck length. These small "packets" of energy add up to the total energy transferred (i.e. work). I'm not sure if this conceptualization is correct, so correct me if I am wrong.  However, it makes me wonder why the amount of energy transferred is dependent on distance and not time.  $$ m_1 = 10~kg \\ m_2 = 20~kg \\ W_1 = (10~N)\cdot(5~m) = 50~J \\ W_2 = (10~N)\cdot(5~m) = 50~J \\ W_1 = W_2 \\ t_1 \neq t_2 $$  If I apply a constant force on an object, why isn't the energy transferred at a constant rate with respect to time? The energy transfer rate varies dependent on how long it takes to cover the set distance.  In other words: why is the energy transferred consistent per unit of distance, and not per unit of time?


I have a C program that opens a serial port. The code is not the issue here. When I run the program as sudo it works fine and opens the port. When I run it as myself (normal user) it fails to open the serial port.  The serial port is:  crw-rw-rw-  1 root  wheel   18,   5 Dec 26 17:34 /dev/cu.usbmodem1421   I am running Mac OSX 10.11.6 (El Capitan). I have added myself to the 'wheel' group, and that did not help. So I am wondering why I cannot open it if I am a member of the 'wheel' group? Is there something else that I am missing.  <

I've connected a USB to Serial bridge dongle, and running dmesg | grep tty outputted the following:  [    0.000000] console [tty0] enabled [603199.380677] usb 2-2: cp210x converter now attached to ttyUSB0   So now I'm trying to write to it as per  by running the following:  cat hello.txt > /dev/ttyUSB0   and   sudo cat hello.txt > /dev/ttyUSB0   But both result in the following error:  bash: /dev/ttyUSB0: Permission denied   What am I doing wrong?  Thanks


I have opened the game with old save today to discover that my science cap has dropped from 1.7 M to 1.1 M and that I have 4 paragon now.  How did I get that 4 paragon? I never reset the game before.

I was playing kittens-game, and suddenly I noticed I had 3 paragon, instead of 1. I only reset once, over a month ago, and I had 1 paragon the whole time. I didn't do anything with the console, no jerking around with my savegame or anything. I can't find anything in the changelog that has anything to do with gaining paragon. Where does it come from?  (Bloodrizer, if you are reading this: please do not punish me and set me back to 1 paragon!)


I am bit confused for the use of will & would, still not understanding where is it necessary or where we can use one or other.  Following examples for your kind perusal:  A) What will be your answer?     (indicates casual manner) B) What would be your answer? (indicates formal manner)  I believe both are correct and can be used as per the situation.

I hope someone, once and for all, can clarify (with examples) the difference in usage of will vs. would vs. would have vs. will have.


How to check the array list has contains value??  for example:  var number = [1, 9, 9, 4];  if(number == [1, 9, 9, 4]){ //true} else if(number == [2, 1, 5, 4){ //false;} else if(number == [9, 1, 4, 9){ //false;}   if there any method to see to check the array list has contains value eg"1994"?? Thank you very much!!!!

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


Yet, apt-get update/upgrade shows perfectly.

Today I received an update notification for three updates but update manager doesn't say what updates are they.    Does anyone have a clue what this is about? How am I to check what is to be updated?


When $abc=1$ find the minimum of $a^2+b^2+c^2$.  My attempt:I put $\frac{1}{bc}$ for $a$ and then I used AM-GM inequality.  $(\frac{1}{bc})^2+b^2+c^2\ge 3$  But finally we should get the answer $a+b+c$.  Where am I wrong?

This is supposed to be an application of AM-GM inequality.     if $abc=1$, then the following holds true: $a^2+b^2+c^2\ge a+b+c$   First of all,  $a^2+b^2+c^2\ge 3$  by a direct application of AM-GM.Also,we have  $a^2+b^2+c^2\ge ab+bc+ca$  Next,we consider the expression  $(a+1)(b+1)(c+1)=a+b+c+ab+bc+ca+abc\le a+b+c+a^2+b^2+c^2+1$  but that hardly helps.I know that  $3(a^2+b^2+c^2)\ge (a+b+c)^2$  From the first derived inequality,we know that the left hand side of the above inequality is greater than or equal to 9.But I can't see how that can be used here.I know that we can get $a+b+c\ge 3$ using AM-GM but that does not take me a step closer to finding the solution(from what I can understand).Also,  $a^3+b^3+c^3\ge a^2b+b^2c+c^2a$  $(a+b+c)[(a-b)^2+(b-c)^2+(c-a)^2]\ge a^2b+b^2c+c^2a$ A hint will be appreciated at this point.


very new to java and wondering why this while statement won't end even when the input from the scanner is "N" thus evaluating the expression to false.  import java.util.*;  public class addSongs {      public static void main (String[]args){          Scanner songAdd = new Scanner(System.in);         Scanner addContinue = new Scanner(System.in);         String ceaseAdd = new String();         ceaseAdd = "Y";          while(ceaseAdd != "N")             System.out.println("Enter track title");             String newSong = songAdd.nextLine();             MP3_catalogue.title.add(newSong);             System.out.println("Enter artist name");             String newArtist = songAdd.nextLine();             MP3_catalogue.artist.add(newArtist);             System.out.println("Enter duration");             String newDuration = songAdd.nextLine();             MP3_catalogue.duration.add(newDuration);             System.out.println("Would you like to add another song? Y/N");             ceaseAdd = addContinue.nextLine().toUpperCase();     }  }

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


Many years ago, while in my earliest 20's, I read a short story that has haunted me since. I am 70 now, and keep looking for this one story. My husband had a small collection of paperback books featuring short sci-fi stories. All I can remember of this story was a man marooned on (Mars?). He was without food or water, and was dying because of this. He wandered into a long deserted city? settlement? seeking shade as well as food and water. There was a terrible noise, a clanging noise invading his senses. He found a room that had a low trough-like place. He suspected food had come from a faucet device attached to the trough. In his final weakness, he lay down in the trough and passed out. Then he came to, hearing glorious music where the awful, strident clanging noise had once been, and the trough he lay in delivered food to his waiting and upturned snout.  So, in some way he was transformed by the planet, devices on the planet, something, to make him part of the society that used to be, and saved his life. Does ANYONE know the story I speak of?

This is a story that was read on BBC radio about thirty years ago, and this is about as right as I can remember it: The human pilot of a spacecraft is doing some reconnaissance on an alien planet. He crashes but survives. For some reason, no one will know where to look for him. He sees something in the distance that looks like a building of some sort. When he gets there, it seems to be a home. Very much like a human home. There's furniture, but it's strange and uncomfortable . There's food, but it's inedible. There's a faucet but what comes out of it seems more like acid. Everything looks as though it should be right, but it's not. He leaves the house, wanders and after a few days is desperate for water. But there isn't any water anywhere. He's close to death, crawling on the ground and then something happens. There are cracks in the soil and there appears to be water bubbling up from perhaps some underground stream. The water revives him. He goes back to the house and tries the food again. It's delicious and he eats enough to gain back his strength. Then he decides to try the water again. It's pure and wonderful. He takes a shower and the last line of the story is how refreshing the water is on his skin and something about him lifting his tail.


How can I help LaTeX with the linebreak?  \documentclass{scrartcl} \usepackage{url}  \begin{document}  I hace a book\footnote{\url{http://www.mazon.de/product/publikationen/hochschulschriften/standard-for-die-exakt-calculation-uncollered-uninfinite-word-finding-smaschinen-28-3-2014.html}}.  \end{document}

This question led to a new package:      I wish to typeset some relatively long URLs in a piece of text, and when I use \url{..}, the resulting text does not respect the margin boundaries that govern the main text body, instead going all the way to the edge of the paper before wrapping around.   For reference, my preamble looks like this:  \documentclass[12pt]{article} \usepackage{mathptmx} \usepackage{fullpage} \usepackage[pdftex]{hyperref}   and example of the url I'm including is:  \begin{itemize} \item Some text  \url{very-long-url} ... \end{itemize}   I'm compiling using pdflatex, although I doubt this makes a difference.


If I have a string of variable length and I want to return only first 3 characters of the string.  str[:3]  this works but I want to know if the string is of lesser length, suppose 2, "ab" or just "a", will this slicing work for that too? Thanks in advance

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I have an app, where I have different fields based on the device location.  Until now, I've always changed the location via Debug -> Location -> Custom Location However, it seems Appled has update XCode Simulators and now you can no longer access custom location from the Debug options.  Before:    After:     Any idea where I can access the Custom Location from now on?

How can I set the location (as it's picked up in CoreLocation services) in the iPhone Simulator?


I am using some images (among others: Laser niveaus) in my thesis. I am drawing them myself with tikz, but as a guidance I use images and data from papers and books. Should I reference them, and if yes, how?

In the field I work in, it is customary to use a graphical representation of some mathematical concepts. For my thesis, I have been creating a batch of figures containing these representations. These figures are very similar to those in one of my sources. I am wondering if I should cite that source in some way.  Some of my considerations:   The general form of the images is widely used in the field I am making all figures myself, so no direct copying


I am testing the sizeof operator. In two cases in my code, I get the size of the pointer (I think). In the other cases I get how many bytes the arrays occupy. How can I get the size of the array in bytes when I pass it to a function? Isn't the sizeof operator enough? Am I doing something wrong?  #include <stdio.h>  /*Testing the operator sizeof*/  void test (char arrayT[]); void test2 (char *arrayU);  int main(int argc, char *argv[]){      char array1[7];     printf("array1 size is:%d\n", sizeof array1);     /*array1 size is: 7*/      char array2[] = { '1', '2', '3', '4', '5', '6', '7'};     printf("array2 size is:%d\n", sizeof array2);     /*array2 size is: 7*/      char array3[] = "123456";     printf("array3 size is:%d\n", sizeof array3);     /*array3 size is: 7*/      unsigned char array4[] = "123456";     printf("array4 size is:%d\n", sizeof array4);     /*array4 size is: 7*/      char arrayX[] = "123456";     test(arrayX);     /*arrayT size is: 4*/      char arrayY[] = "123456";     test2(&arrayY[0]);     /*arrayU size is: 4*/      return 0; }  void test (char arrayT[]){     printf("arrayT size is:%d\n", sizeof arrayT); }  void test2 (char *arrayU){     printf("arrayU size is:%d\n", sizeof arrayU); }

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


I want to add a python script to startup using another python script. Is there a way to do that?

I have a shell script. I want to configure my script to run automatically during startup. I know how to do this from GUI. But I wanted to do this from terminal. How can I do this?  On a primary research I found that the file needs to be moved to /etc/int.d/ directory. But this operation needs sudo permission. I wanted to do this without super user permissions.   I also found that there are files under ~/.config/autostart/ which are having some settings regarding the startup applications. But I don't know how to edit them to achieve this.   Can someone tell me the exact procedure to achieve this?


I'm trying to do a really simple task.   Check if a file exists If not, make it    the files should be named like : M0 M1 M2 and so on. Here's the code that I've written. It works for M0 after that I get segmentation fault error:  #include <stdio.h> #include <stdlib.h> #include <unistd.h>  int main (){      unsigned int fileIndex=0;     char* fileName="M0";     FILE* recordFile = NULL;     while((access(fileName,F_OK)!=-1)) {         fileIndex++;         sprintf(fileName,"M%d",fileIndex);         printf("%s\n",fileName);     }      recordFile = fopen(fileName,"wb+");      fclose(recordFile);     return 0; }   any idea what I'm doing wrong here? thanks in advance!

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


In a certain population, 15% of the people have Rh-negative blood. A blood bank serving this population receives 100 blood donors on a particular day.   (a) What is the probability that 15 to 20 (inclusive) of the donors are Rh-negative?  I got an answer of 0.4939 by subtracting the z scores of p(z<1.54) and p(z<-0.14). I also rounded 15 and 20 to 14.5 and 20.5 when inserting the values in the z-score formula.   My mean I got was 100 *0.15 = 15. And my standard dev is 3.5707 from the square root of npq.   I was wondering if someone could confirm my answer?

In a certain population, 18% of the people have Rh-negative blood. A blood bank serving this population receives 95 blood donors on a particular day.  So my teacher posted a solution to a problem below which solves the probability of getting 10 or less donors that are Rh-negative. I was wondering if I wanted to instead find the probability of 10 or MORE donors that are Rh-negative, how would I do so?  This was my attempt from following the teacher's logic  p(x≥10) = p(x>9.5) = 1 - p(Z>((9.5-17.1)/3.745)) = 1 - (Z>-2.03) = 1 - 0.2118 = 0.7882  Can someone confirm if I did this right, and if not, teach me how? I'm still a little lost.


I'm a Linux novice experimenting with setting up a DNS cache server on a  on . I'm trying to set up a static IP-address with a a local Bind9 DNS-server. I've followed this , and looked at several others.  However, I'm having trouble with getting the changes in /etc/resolv.conf to stick. /: When I reboot, the settings in /etc/network/interfaces are not written to /etc/resolv.conf.  This is my /etc/network/interfaces:  # interfaces(5) file used by ifup(8) and ifdown(8) # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d  # Disable wlan1 by default (8723bs has two intefaces) iface wlan1 inet manual  # Loopback interface auto lo iface lo inet loopback  # The primary network interface auto eth0 iface eth0 inet static         address 192.168.0.18         netmask 255.255.255.0         gateway 192.168.0.1         dns-nameservers 192.168.0.18         dns-search green.intra   This is my /etc/default/bind9:  # run resolvconf? RESOLVCONF=yes  # startup options for the server OPTIONS="-4 -u bind"   From those two files, I was under the impression that the /etc/resolv.conf should become this (automatically, upon booting):  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 192.168.0.18 search green.intra   ...but instead it becomes this:  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 83.255.255.1 nameserver 83.255.255.2 search home   If I add my desired settings to /etc/resolv.conf, everything works as I expect, until I reboot.  What am I doing wrong?  Edit: I have RTFM in trying to figure this out:      Edit: ifup and ifdown fail: As suggested in the answer to the proposed duplicate question, using service networking restart might not be reliable in this situation. Instead, I tried the following:  ubuntu@pinex:~$ sudo ifdown -v eth0 Reading directory /etc/network/interfaces.d Parsing file /etc/network/interfaces.d/eth0 ifdown: interface eth0 not configured   and:  ubuntu@pinex:~$ sudo ifdown -v eth0 Reading directory /etc/network/interfaces.d Parsing file /etc/network/interfaces.d/eth0 ifdown: interface eth0 not configured ubuntu@pinex:~$ sudo ifup -v eth0 Reading directory /etc/network/interfaces.d Parsing file /etc/network/interfaces.d/eth0 Configuring interface eth0=eth0 (inet) /bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d run-parts: executing /etc/network/if-pre-up.d/wpasupplicant  /sbin/dhclient -1 -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df /var/lib/dhcp/dhclient6.eth0.leases eth0 Internet Systems Consortium DHCP Client 4.3.3 Copyright 2004-2015 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/  Listening on LPF/eth0/36:c9:e3:f1:b8:05 Sending on   LPF/eth0/36:c9:e3:f1:b8:05 Sending on   Socket/fallback DHCPREQUEST of 192.168.0.18 on eth0 to 255.255.255.255 port 67 (xid=0x79b015c0) DHCPACK of 192.168.0.18 from 192.168.0.1 RTNETLINK answers: File exists bound to 192.168.0.18 -- renewal in 5280 seconds. /bin/run-parts --exit-on-error --verbose /etc/network/if-up.d run-parts: executing /etc/network/if-up.d/000resolvconf run-parts: executing /etc/network/if-up.d/bind9 run-parts: executing /etc/network/if-up.d/openssh-server run-parts: executing /etc/network/if-up.d/upstart run-parts: executing /etc/network/if-up.d/wpasupplicant Configuring interface eth0=eth0 (inet) /bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d run-parts: executing /etc/network/if-pre-up.d/wpasupplicant /bin/ip addr add 192.168.0.18/255.255.255.0 broadcast 192.168.0.255       dev eth0 label eth0 RTNETLINK answers: File exists Failed to bring up eth0.   ... which led me to the answer (see below).

After updating /etc/network/interfaces with something very similar to below, how do I get /etc/resolv.conf to update?  I tried (as root) resolver -u, service networking restart but they didn't work. I also fixed the symlink for resolv.conf and tried resolver -u again. Finally in frustration I rebooted, which did fix the problem by rebuilding /etc/resolv.conf.  Ubuntu 12.04, 64bit server, all the latest patches installed.  Example /etc/network/interfaces:  iface eth0 inet static     address 192.168.3.3     netmask 255.255.255.0     gateway 192.168.3.1     dns-search example.com     dns-nameservers 192.168.3.45 192.168.8.10


I was somehow confused encountering this sentence: Didn't you USED TO work with Annie at Macy's?. Should we use USE TO here since we are using Did which needs the base form of the verb.

Which is the correct sentence, if there is a correct one?     I use to be a hitman.        I used to be a hitman.   I've read the second sentence recently in a book, but I was sure it should be I use to be a hitman.


I want to rum 125ft of wire through my attic then go to conduit for 20 ft to mt shed. What size and type wire do I need.

I am installing a 60 amp subpanel in a workshop in my backyard and I will have 2 - 20 amp services with 4-5 outlets on each and 1 - 15 amp service for lighting. The length from the main panel to the workshop is about 105 feet. I will be using a double pole 60 and GFI circuit breaker in the main panel to a 60 amp pull out on outside of work shop then inside to the subpanel. What would be a good size wire. I may run one saw at a time or a couple of saws.


I was away from Linux for quite some time(around 3 months or so)...haven't even booted...but my grub menu was working fine...i believe during last 3 weeks or so some Windows 10 update happened and now i am not seeing any grub screen which can give me the option to boot into Linux. After boot - it straight away goes into Windows 10.  Just wanted to tell I had Windows 10 only(not upgrade from Windows 7 or Window 8.1 to Windows 10).  I used to just try out this command:  bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi   I forgot last time what i used in place of {bootmgr} etc... Please help me try to recall and fix this issue.  I just need to create the live USB for Ubuntu Desktop 16.04 LTS and then try ubuntu and follow the steps after wards, right? Please let me know.  Update If i follow the above question. I have some doubts about step # 2 and # 3  Determine the partition number of your main partition. GParted (which should      already be installed, by default, on the live session) can help you   here. I'm going to assume in this answer that it's /dev/sda2, but make   sure you use the correct partition number for your system! Mount your   partition: sudo mount /dev/sda2 /mnt  #Replace sda2 with your   partition number      I have two hard drives and my entire Ubuntu is on second drive /dev/sdb. /dev/sdb also contains windows. /dev/sda is all windows.  So what should be the commands for me for:  sudo mount /dev/sda2 /mnt #Replace sda2 with your partition number

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


If $f: [0, a] \to \mathbb{R}$ is continuous and $1$-to-$1$ with $f(0) = 0$, how do see that $$\int_0^{f(a)} f^{-1}(t)\,dt + \int_0^a f(t)\,dt = af(a)?$$

Suppose $f$ is a continuous, strictly increasing function defined on a closed interval $[a,b]$ such that $f^{-1}$ is the inverse function of $f$. Prove that,   $$\int_{a}^bf(x)dx+\int_{f(a)}^{f(b)}f^{-1}(x)dx=bf(b)-af(a)$$   A high school student or a Calculus first year student will simply, possibly, apply change of variable technique, then integration by parts and he/she will arrive at the answer without giving much thought into the process. A smarter student would probably compare the integrals with areas and conclude that the equality is immediate.  However, I am an undergrad student of Analysis and I would want to solve the problem "carefully". That is, I wouldn't want to forget my definitions, and the conditions of each technique. For example, while applying change of variables technique, I cannot apply it blindly; I must be prudent enough to realize that the criterion to apply it includes continuous differentiability of a function. Simply with $f$ continuous, I cannot apply change of variables technique.  Is there any method to solve this problem rigorously? One may apply the techniques of integration (by parts, change of variables, etc.) only after proper justification.  The reason I am not adding any work of mine is simply that I could not proceed even one line since I am not given $f$ is differentiable. However, this seems to hold for non-differentiable functions also.  I would really want some help. Pictorial proofs and/or area arguments are invalid.


Voldemort was a descendant of Salazar Slytherin and Cadmus Peverell. Is there any source stating when the two families joined?

Were the Peverell brothers and Slytherin related or not?  In the books it is mentioned that both were ancestors of Voldemort, but I couldn't find their mutual relation.


I am a beginner here as well as programming in Python, and I am currently using code academy to help me learn. So I decided to venture off and make a program on my own and keep getting stuck with error message: can't multiply sequence by non-int of type 'float'  The program is very simple, a tip calculator where it asks the user to input information to have the program determine the amount of tip and total amount of bill. And it does ok up until the point of the math. I know it's not "pretty" but it's just me really trying to figure out how to work it. Any help would be greatly appreciated!  Here is what I have so far:  print ("Restuarant Bill Calculator") print ("Instructions: Please use only dollar amount with decimal.")  # ask the user to input the total of the bill original = raw_input ('What was the total of your bill?:') cost = original print (cost)  # ask the user to put in how much tip they want to give tip = input('How much percent of tip in decimal:') tipamt = tip * cost       print "%.2f" % tipamt  # doing the math totalamt = cost + tipamt print (totalamt)

How do I have a Python script that a) can accept user input and how do I make it b) read in arguments if run from the command line?


I have a right censored data set and want to fit a distribution to my observations. How does maximum likelihood estimation work on censored data and are there any issues that I need to consider?

Apologies in advance if any of the terminology I use is incorrect. I'd welcome any correction. If what I describe as a "cut-off" goes by a different name, let me know and I can update the question.  The situation I'm interested in is this: you have independent variables $\bf{x}$ and a single dependent variable $y$. I'll leave it vague, but assume that it would be relatively straightforward getting a good regression model for these variables.  However, the model you're aiming to create is for independent variables $\bf{x}$ and dependent variable $w = \min(y,a)$, where $a$ is some fixed value within the range of $y$. Equally, the data you have access to does not include $y$, only $w$.  A (somewhat unrealistic) example of this would be if you were trying to model how many years people will collect their pension for. In this case, $\bf{x}$ could be relevant information such as gender, weight, hours of exercise per week, etc. The 'underlying' variable $y$ would be life expectancy. However the variable you'd have access to and be trying to predict in your model would be $w = \min(0, y-r)$ where r is the retirement age (assuming for simplicity it's fixed).  Is there a good approach for dealing with this in regression modelling?


I am trying to overload the << operator for my C++ class called Box. It is not trivial and inside the definition I have to access the stdout object of type FILE* which is corresponding to the std::cout. I need exactly this object since the interface of another code I will use in my operator (GNU MPFR library) requires this particular one. How can I extract it? Simplified version below: std::ostream& operator<<(std::ostream &os, const Box &box) {     x = ??? // get the stdout from os     mpfr_out_str(x, 10, 0, box.number, MPFR_RNDN);     return os; }

Is there a (cross-platform) way to get a C FILE* handle from a C++ std::fstream ?  The reason I ask is because my C++ library accepts fstreams and in one particular function I'd like to use a C library that accepts a FILE*.


What is the problem inside my work, I tried to use a UI Thread.    private void btn_Call_Click(object sender, EventArgs e)     {         MakeCall();     }  private void MakeCall()     {         try         {             //Get the IP we want to call.             otherPartyIP = new IPEndPoint(IPAddress.Parse(txtCallToIP.Text), 1450);             otherPartyEP = (EndPoint)otherPartyIP;              //Get the vocoder to be used.             if (cmbCodecs.SelectedText == "A-Law")             {                 vocoder = Vocoder.ALaw;             }                else if (cmbCodecs.SelectedText == "u-Law")             {                 vocoder = Vocoder.uLaw;             }             else if (cmbCodecs.SelectedText == "None")             {                 vocoder = Vocoder.None;             }              //Send an invite message.             SendMessage(Command.Invite, otherPartyEP);                      }         catch (Exception ex)         {             MessageBox.Show(ex.Message, "VoiceChat-Call ()", MessageBoxButtons.OK, MessageBoxIcon.Error);         }               }   That returns the error:     Cross-thread operation not valid: Control ‘btn_Call’ accessed from a   thread other than the thread it was created on

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


Are  var movies = from m in db.Movies              select m;  movies = movies.Where(s => s.Title.Contains(searchString));   and  var movies = from m in db.Movies              where String.Equals(m.Title,searchString)              select m;   equivalent?  And if so, why use one over the other?  The syntax of the former seems more cryptic than the latter.

I'm trying to get a handle on if there's a good time to use standard linq keywords or linq extension methods with lambda expressions.  They seems to do the same thing, just are written differently.  Is it purely a matter of style?  var query = from p in Products     where p.Name.Contains("foo")     orderby c.Name     select p;  // or with extension methods: var query = Products     .Where(p => p.Name.Contains("foo"))     .OrderBy(p => p.Name);   They're very similar with the second example being a bit more terse, but perhaps less expressive if you don't know what the => is doing.  Other than writing terse code, are there other advantages to using the extension methods as opposed to the LINQ syntax?