I have created my latex code with a "main" tex file, in which I am calling many other sub-files using the below command. \subfile{"Path1"} \subfile{"Path2"} \subfile{"Path3"}  In each subfile, I have written my text and presenting tables and figures. I have stored each table and figure in a separate file in order to keep my subfiles organized. Thus, I am calling the tables and figures using a code like below: \input{"FigPath1"} \input{"TabPath1"}  Some of the figures are created using pgfplots. Although I am asking latex to put the figures exactly where I want (each figure file has a structure like below,) they appear 5 or 6 pages after where they have to appear. What is the problem in your opinion? \begin{figure}[!htbp]     \centering     \subfloat[Constraints]{         \begin{tikzpicture}[scale=0.75, transform shape]               % Some codes here         \end{tikzpicture}     }      \subfloat[Variables]{         \begin{tikzpicture}[scale=0.75, transform shape]               % Some codes here         \end{tikzpicture}     } \end{figure}  Hopefully, my explanations make sense! Thanks in advance.

Is there any package or a method to force LaTeX to keep floating environments like table and figure closer to where they are declared?


Is there a way to enchant a stick in Minecraft Bedrock Edition version 1.9?

In Minecraft, the NBT (Named Binary Tag) format is used to store data of our Minecraft worlds, including block, entity, and item properties. In the Java Edition of Minecraft, you can modify this data by including the data in the command, like so: /give @s diamond_sword{Enchantments:[{id:"minecraft:knockback",lvl:10s}]}  In the Bedrock Edition, on the other hand, NBT is inaccessible from commands. In order to modify NBT, we need to use an external editor. What are some useful item properties that I can modify with an NBT editor, and how can I do so?  Related:


how to add new row to such array   var items = new[] {                          new { Text = "report A", Value = "A" },                                                  new { Text = "report E", Value = "E" }                     };

How to add new item in existing string array in C#.net?  I need to preserve the existing data.


Whilst playing carrom, if only one piece is remaining of each player, e.g. one white and one black and a queen, and I pot a queen, what happens in the following scenario:  While covering the queen with my piece, mistakenly I cover both the remaining pieces, and now there are no pieces on board.  In such a case, who wins the game?

This is intended to be a canonical question regarding possible endings of the game.  For each question, assume a single proper strike was made, and note where an improper strike would change the game outcome (beyond an additional point for the opponent).  If the Queen has been covered:     What happens if I pocket my last C/m and the Striker? What happens if I pocket my opponent's last C/m? What happens if I pocket my opponent's last C/m and the Striker? What happens if I pocket both players' last C/m? What happens if I pocket both players' last C/m and the Striker?     If the shot covers the Queen:     What happens if I pocket my last C/m and the Queen? What happens if I pocket my last C/m, the Queen and the Striker? What happens if I pocket my opponents' last C/m and the Queen? What happens if I pocket my opponents' last C/m, the Queen and the Striker? What happens if I pocket both players' last C/m and the Queen? What happens if I pocket both players' last C/m, the Queen and the Striker?     If the Queen is left on the board:     What happens if I pocket my last C/m, leaving the Queen? What happens if I pocket my last C/m and the Striker, leaving the Queen? What happens if I pocket my opponent's last C/m, leaving the Queen? What happens if I pocket my opponent's last C/m and the Striker, leaving the Queen? What happens if I pocket both players' last C/m, leaving the Queen? What happens if I pocket both players' last C/m and the Striker, leaving the Queen?


Everything was working fine, when I start my laptop today, wifi section was missing and I could connect only from wired connection. But wifi is still missing. Im new to linux, if anything Im doing wrong please help. $ lspci | grep Network 3d:00.0 Network controller: **Intel Corporation Wi-Fi 6 AX200 (rev 1a)**  $ dhclient wlan0 Cannot find device "wlan0"  $ cd Downloads $ cd iwlwifi-cc-46.3cfab8da.0 $ ls iwlwifi-cc-a0-46.ucode    README.iwlwifi-cc.ucode LICENSE.iwlwifi-cc.ucode $ sudo cp iwlwifi* /lib/firmware $ sudo modprobe iwlwifi $ dmesg | grep iwlwifi [    4.589179] iwlwifi 0000:3d:00.0: enabling device (0000 -> 0002) [    5.063474] iwlwifi: probe of 0000:3d:00.0 failed with error -110  And its weird it works on somedays.

I have a problem with my WiFi card on Kubuntu. Sometimes the system doesn't recognise it, but what is strange is that it doesn't happen everytime, but just about one boot on four, and I can't understand why. If I run lshw -C network I get: *-network UNCLAIMED               description: Network controller        product: Wireless 8265 / 8275        vendor: Intel Corporation        physical id: 0        bus info: pci@0000:03:00.0        version: 78        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress cap_list        configuration: latency=0        resources: memory:ef200000-ef201fff   *-network        description: Ethernet interface        product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:04:00.0        logical name: enp4s0        version: 15        serial: 4c:ed:fb:07:64:b1        size: 100Mbit/s        capacity: 1Gbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.2.131 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s        resources: irq:19 ioport:d000(size=256) memory:ef104000-ef104fff memory:ef100000-ef103fff  Do anyone know how to make it work steadly?


I have a SQL Server query on a large table (>17 million rows) that sometimes does not populate all the predicates before performing an index seek, which results in not filtering out enough rows and slowing the query down significantly (hours).   Microsoft SQL Server 2005 database is used and this SQL query is generated by Hibernate.  Here is how the simplified query looks like:  SELECT MAIN_TABLE.FIELD_1,        MAIN_TABLE.FIELD_2,        MAIN_TABLE.FIELD_3,        MAIN_TABLE.FIELD_4,        TABLE_1.FIELD_1,        TABLE_1.FIELD_2,        TABLE_2.FIELD_1,        TABLE_2.FIELD_2,        TABLE_3.FIELD_1 FROM MAIN_TABLE      INNER JOIN TABLE_1 ON MAIN_TABLE.TABLE_1_ID = TABLE_1.ID      INNER JOIN TABLE_2 ON MAIN_TABLE.TABLE_2_ID = TABLE_2.ID      LEFT OUTER JOIN TABLE_3 ON MAIN_TABLE.TABLE_3_ID = TABLE_3.ID WHERE MAIN_TABLE.SOME_ID IN (SELECT SOME_ID FROM PARTITION_VIEW                               WHERE PARTITION_VIEW.SOME_FIELD_1 = [VALUE_1]                              AND PARTITION_VIEW.SOME_FIELD_2 = [VALUE_2]                              AND PARTITION_VIEW.SOME_FIELD_3 = [VALUE_3]) AND MAIN_TABLE.DATE BETWEEN [DATE_RANGE_1] AND [DATE_RANGE_2] AND TABLE_1.STATE = [STATE]   The PARTITION_VIEW is a UNION of materialized views that all have index on columns  SOME_FIELD_1, SOME_FIELD_2, and SOME_FIELD_3.  In the MAIN_TABLE, we have an index on columns DATE and SOME_ID and this is the index that gets utilized which is correct.   When I checked the query plan from the SQL Server Management Studio, I found that in some cases such as when the date range is large (one year), the predicate used is the DATE column only. Then only after all the rows are within the given date range are found, the result set is filtered out by the given SOME_IDs.   It seems like the query optimizer did not pick the best query plan available.   When the exact query is directly executed from SQL Server Management Studio, everything performs correctly. This suboptimal query plan is used only when the query is executed from the application through Hibernate.  One thing I tried was to create actual table PARTITION_TABLE which copied over all the data from the PARTITION_VIEW and retrieved SOME_IDs from the PARTITION_TABLE, then the index on MAIN_TABLE was using all the predicates (SOME_ID, DATE). I want to keep using the view if possible since it automatically reflects the changes.  Is it possible to keep using the union of materialized views and ensure that the index on the MAIN_TABLE will always retrieve the SOME_ID on the where clause first so that it can be used as part of the predicate in the index?

I have a complex query which runs in 2 seconds in the query window, but about 5 minutes as a Stored Procedure. Why is it taking so much longer to run as a stored procedure?  Here's what my query looks like.   It takes a specific set of records (identified by @id and @createdDate), and a specific time frame (1 year starting from @startDate) and returns a summarized list of letters sent and estimated payments received as a result of those letters.  CREATE PROCEDURE MyStoredProcedure     @id int,     @createdDate varchar(20),     @startDate varchar(20)   AS SET NOCOUNT ON      -- Get the number of records * .7     -- Only want to return records containing letters that were sent on 70% or more of the records     DECLARE @limit int     SET @limit = IsNull((SELECT Count(*) FROM RecordsTable WITH (NOLOCK) WHERE ForeignKeyId = @id AND Created = @createdDate), 0) * .07      SELECT DateSent as [Date]          , LetterCode as [Letter Code]         , Count(*) as [Letters Sent]         , SUM(CASE WHEN IsNull(P.DatePaid, '1/1/1753') BETWEEN DateSent AND DateAdd(day, 30, DateSent) THEN IsNull(P.TotalPaid, 0) ELSE 0 END) as [Amount Paid]     INTO #tmpTable     FROM (          -- Letters Table. Filter for specific letters         SELECT DateAdd(day, datediff(day, 0, LR.DateProcessed), 0) as [DateSent] -- Drop time from datetime             , LR.LetterCode -- Letter Id             , M.RecordId -- Record Id         FROM LetterRequest as LR WITH (NOLOCK)         INNER JOIN RecordsTable as M WITH (NOLOCK) ON LR.RecordId = M.RecordId         WHERE ForeignKeyId = @id AND Received = @createdDate             AND LR.Deleted = 0 AND IsNull(LR.ErrorDescription, '') = ''             AND LR.DateProcessed BETWEEN @startDate AND DateAdd(year, 1, @startDate)             AND LR.LetterCode IN ('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o')     ) as T     LEFT OUTER JOIN (          -- Payment Table. Payments that bounce are entered as a negative payment and are accounted for         SELECT PH.RecordId, PH.DatePaid, PH.TotalPaid         FROM PaymentHistory as PH WITH (NOLOCK)             INNER JOIN RecordsTable as M WITH (NOLOCK) ON PH.RecordId = M.RecordId             LEFT OUTER JOIN PaymentHistory as PR WITH (NOLOCK) ON PR.ReverseOfUId = PH.UID         WHERE PH.SomeString LIKE 'P_'              AND PR.UID is NULL              AND PH.DatePaid BETWEEN @startDate AND DateAdd(day, 30, DateAdd(year, 1, @startDate))             AND M.ForeignKeyId = @id AND M.Created = @createdDate     ) as P ON T.RecordId = P.RecordId      GROUP BY DateSent, LetterCode     --HAVING Count(*) > @limit     ORDER BY DateSent, LetterCode      SELECT *     FROM #tmpTable     WHERE [Letters Sent] > @limit      DROP TABLE #tmpTable   The end result looks like this:   Date        Letter Code     Letters Sent    Amount Paid 1/1/2012    a               1245            12345.67 1/1/2012    b               2301            1234.56 1/1/2012    c               1312            7894.45 1/1/2012    a               1455            2345.65 1/1/2012    c               3611            3213.21   I'm having problems figuring out where the slowdown is, because everything runs extremely fast in the query editor. It's only when I move the query to a stored procedure that it starts taking so long to run.   I'm sure it has something to do with the query execution plan getting generated, but I don't know enough about SQL to identify what could be causing the problem.  It should probably be noted that all the tables used in the query have millions of records.  Can someone explain to me why this is taking so much longer to run as a stored procedure than in the query editor, and help me identify what part of my query could be causing performance issues when run as a stored procedure?


My approach is to assume that $f$ is not monotonic and then construct a local extreme by using the fact that $f$ attains its extreme values on a compact set. I can assume that  $\exists c\lt\delta$ with $f(c)\gt f(\delta)$ (or equal). I can do something similar with the fact that $f$ is not decreasing. Still, aside some a vague vision of a torturous proof by cases, I'm stuck. I have a feeling that this proof can be done in a simple way that I am missing. Could someone give me a hint? Assure me that there is a simple proof of this?

Let $f: \mathbb R\to \mathbb R$ be a continuous function such that $f$ attains neither its minimum nor its maximum at any open interval $I \subseteq  \mathbb R$ , then how to prove that $f$ is monotone ?


I don't understand how to use make && sudo make install

I've used git clone to make a local copy of a GitHub repository containing a  I'd like to use. The local copy contains all of the source for the program; but as a newbie to Ubuntu, I've no idea of what tools or steps are involved in compiling and installing the driver.   I'd really appreciate if anyone could provide a step-by-step guide?


Yesterday I learned that it is better to use active voice instead of passive voice in writing.  Well today I had an academic essay test and I used active verbs throughout the whole essay.   She told me the essay was very choppy, and that I used to write better.  So my question is should I use passive voice in essays too? Because my sentences are ending up pretty choppy.

Whenever I create a document in Microsoft Word, it complains about a lot of my sentences being in passive voice. But, when I read that sentence aloud, it sounds fine to me. I am not sure if it is just me and will a statement in passive voice sound strange to a native speaker?  So, my question is, is it considered bad form to use passive voice generally? Or in some specific cases like written communications only?  Edit: If it is ok to use passive voice, then why does MS-Word complain?


I am having trouble with an ImageView that I am using which is returning null. The issue seems to be with findViewById and causes a problem when I ateempt to getX() for the imageView. I have tried everything and still can't get it to work. Any help would be greatly appreciated!  xml:  ImageView     android:layout_width="100dp"     android:layout_height="100dp"     android:layout_alignParentBottom="true"     android:layout_centerHorizontal="true"     android:src="@drawable/character"     android:id="@+id/character"     android:scaleType="fitCenter"     android:clickable="false"     android:longClickable="false" /   Java: package fozard.backuptestapp;  public class Play extends AppCompatActivity {  private GameThread thread; private float charX=0; ImageView character;  public void setCharacter(ImageView character) {     this.character = character; }  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_play);      }  @Override protected void onStart(){     super.onStart();     thread=new GameThread();     thread.setRunning(true);     thread.start(); }  public boolean onTouchEvent(MotionEvent event){     switch (event.getAction()){         case MotionEvent.ACTION_DOWN:             thread.setMovementSpeed(5);             thread.setMoving(true);             break;         case MotionEvent.ACTION_UP:             thread.setMoving(false);     }     return true; }    public void updateCharPos(float movementSpeed){     Log.d("Updating", "Should be able to update");     character = (ImageView)findViewById(R.id.character);     charX = character.getX();     System.out.print(charX); }   }  stack trace:  11-24 09:32:32.918 16706-16706/fozard.backuptestapp D/Updating: Should be able to update 11-24 09:32:32.923 16706-16706/fozard.backuptestapp D/AndroidRuntime: Shutting down VM 11-24 09:32:32.923 16706-16706/fozard.backuptestapp W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41cbc700) 11-24 09:32:32.933 16706-16706/fozard.backuptestapp E/AndroidRuntime: FATAL EXCEPTION: main                                                                       java.lang.NullPointerException                                                                       at fozard.backuptestapp.Play.updateCharPos(Play.java:71)                                                                       at fozard.backuptestapp.GameThread$1.run(GameThread.java:88)                                                                       at android.os.Handler.handleCallback(Handler.java:730)                                                                       at android.os.Handler.dispatchMessage(Handler.java:92)                                                                       at android.os.Looper.loop(Looper.java:176)                                                                       at android.app.ActivityThread.main(ActivityThread.java:5419)                                                                       at java.lang.reflect.Method.invokeNative(Native Method)                                                                       at java.lang.reflect.Method.invoke(Method.java:525)                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)                                                                       at dalvik.system.NativeStart.main(Native Method)

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?


How exactly does the variational approach make it clear that the Euler-Lagrange equations of motion will have exactly the same form no matter what coordinate system we use as long as it is done with respect to an inertial frame?

Suppose I have an inertial frame with coordinate $\{q\}$. Now I define another reference frame with coordinate $\{q'(q,\dot q,t)\}$. I obtain the equation of motion in $\{q'\}$ in two different ways:   First obtain the equation of motion in $\{q\}$ by the Euler Lagrange equation $$\frac{d}{dt}\left(\frac{\partial L}{\partial \dot q}\right)-\frac{\partial L}{\partial q}=0$$ and then rewrite the equation in terms of $\{q'\}$. First transform $L(q,t)$ to $L'(q',t)=L(q(q',t),t)$ and then obtain the equation of motion $$\frac{d}{dt}\left(\frac{\partial L'}{\partial \dot q'}\right)-\frac{\partial L'}{\partial q'}=0.$$   Are the two answers just the same?


Let $ K \subset L$ be a finite Galois extension. Let $G$ be the Galois group.  Let $L^G = \prod_{\sigma \in G} L$ denote copies of $L$ indexed by the group $G$. I want to show that the map \begin{align*} L \otimes_K L &\to L^G\\ a \otimes b &\mapsto (a\sigma(b))_{\sigma \in G} \end{align*} is an isomorphism.  How can I show that?

Suppose that $L/K$ is a finite separable extension of fields and let $M$ denote the Galois closure of $L$. Let $\textrm{Hom}_K(L,M)$ denote the set of all $K$ - algebra homomorphisms from $L$ to $M$. Since $L/K$ is separable we know that the number of elements in $\textrm{Hom}_K(L,M)$ is equal to $[L:K]$. Now I want to prove that we have an isomorphism of $M$ - algebras   $$\varphi : M \otimes_K L \stackrel{\simeq}{\longrightarrow} M^{[L:K]}$$  Proof that they are isomorphic as $K$ - modules : Write $L = K(a)$ for some $ a\in L$ (we can do this via the primitive element theorem). Then  $$\begin{eqnarray*} M \otimes_K L &=& M \otimes_K K[a] \\ &\cong& M\otimes_K K[x]/(f) \hspace{3mm} \text{where $f$ is the minimal polynomial of $a$ over $K$} \\ &\cong& M[x]/(f)\\ &\cong& M[x]/(f_1\ldots f_{[L:K]}) \hspace{3mm} \text{where the $f_i$ are the distinct}\\ && \hspace{1.5in} \text{irreducible factors of $f$ since $M/L$ is Galois} \\ &\cong& M^{[L:K]}\end{eqnarray*}$$  where  the last step was using the Chinese remainder theorem. For the third last step, we consider the ses   $$ 0 \to (f) \to K[x] \to K[x]/(f) \to 0$$  and tensor with the exact functor $-\otimes_K M$ to get $$0 \to (f) \otimes_K M \to K[x] \otimes_K M \to K[x]/(f) \otimes_K M \to 0$$  and so $$\begin{eqnarray*} M \otimes_K K[x]/(f) &\cong& K[x]/(f) \otimes_{K} M \\ &\cong& \frac{K[x] \otimes_{K} M}{f \otimes_K M}\\ & \cong& M[x]/(f) \end{eqnarray*}$$ where $(f)$ is now viewed as an ideal of $M[x]$.          My question is: The tensor product $M \otimes_K L$ is a left $M$ - module, but why is it also an $M$ - algebra? Also why are the isomorphisms above isomorphisms of $M$ - algebras and not just $K$ - modules?


I have noticed that moderators on sites tend to protect questions that hit the top questions lists. This is probably to mitigate the deluge of answers that hot questions are likely to get, mostly because they are common problems or questions people have, or are otherwise interesting.  They also typically already have good (more often, great) answers if they hit the Hot Questions list.  Can Hot Questions be protected automatically?

I noticed today that a request for protection came up due to the the large number of me-too answers on a trending question I answered recently.  This got me thinking, since trending questions get far more attention than the average question, should questions that trend be automatically protected?  On the upside, this does seem to be a common problem and the auto-protection could be put in place only while the question is trending.  On the downside, it would make it more difficult for new people to participate in answering a trending (highly visible) question so it could be a barrier to entry.  Thoughts?


After installing Kubuntu, if I boot into windows 10, I can no longer see Grub and only can boot into the windows. I reinstalled Kubuntu but the same thing happened.  Also Using Boot repair didn't fixt it :   Any help? thanks

I have a Sony VAIO S series with Windows 8 preinstalled, and I installed Ubuntu 12.10 on a new partition. When the PC boots Grub is display, and I can choose between Windows 8 (didn't worked at the beginning, had to change Grub settings) and Ubuntu 12.10. When I select Ubuntu 12.10 everything is OK, but when I use Windows 8, and I restart Grub isn't displayed anymore (Windows 8 boots immediately).  I booted a Ubuntu 12.10 LiveUSB, used efibootmgr, and found out that Windows 8 (each time it boots) changes EFI default bootloader from Grub to Windows Boot Manager.  How do I change this in Windows 8? I read something about bcdedit, but it does not work or I don't know how to use it...


Toying around with triangular numbers, it seems that there are already 4 squares below 1000. At least I get this one:  ?- between(1,1000,N), T is N*(N+1)//2, sqrtrem(T,_,0). N = 1, T = 1 ; N = 8, T = 36 ; N = 49, T = 1225 ; N = 288, T = 41616 ; No   Are there infinitely many square triangular numbers?

I just started to read "Friendly Introduction to Number Theory" but I am getting stuck in the first exercises.     1.1. The first two numbers that are both squares and triangles are 1 and 36. Find the next one and, if possible, the one after that. Can   you figure out an efficient way to find triangular–square numbers? Do   you think that there are infinitely many?     I found how to find out the number which is both square and triangle. (don't know if this is effective way)    However how can I answer "Do you think that there are infinitely many?"? I think I need to find the formula but no idea yet. Can you please help me?


So, on my main domain 'domain.com' I created several subdomains from cPanel, like 'sub1.domain.com' and 'sub2.domain.com'. Their real location on server is in 'domain.com/sub1' and 'domain.com/sub2'.  Now, I want to redirect non www to www with .htaccess and this is what currently what i have:  <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC] RewriteRule ^(.*) http://www.domain.com/$1 [L,R=301] </IfModule>   This works. When somebody enter domain.com it will be redirected to www.domain.com. However when somebody enter sub1.domain.com, he will be redirected to www.domain.com/sub1 - which I don't want, it needs to be in sub1.domain.com.  What shall I add in .htaccess file to accomplish this?

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


I have a flight from Mumbai to North Carolina.  It will start from Mumbai to Frankfurt  Frankfurt to Munich  Munich to Charlotte.  Can I get the boarding pass for all flights from Mumbai airport, if not can I get both the boarding pass from Frankfurt (Frankfurt to Munich and Munich to Charlotte)

I have a flight with three segments, the first is from Bangkok to Cochin (India) with Thai AirAsia, the second from Cochin to Doha with Qatar Airways and the third from Doha to Frankfurt also with Qatar Airways.  Only the flight from Bangkok to Cochin has online check-in.  My question is, whether I can get my boarding pass for the flights with Qatar Airways already in Bangkok at the Qatar Airways booth. Because I don't have a visa for India, so I can't leave the transit area to collect my boarding pass at the regular check-in counters.  I didn't find my option in the answer of this post   Also I didn't understand where the hotel agent in this answer came from or whether I can make use of this option:


I'm trying to update the slug for all the post within a specific custom post type, let's say "music".  Here is the code:  /* Update slug with the latest post title */ function auto_update_post_slug($postId, $after, $before) {     if ($after->post_title != $before->post_title) {         $after->post_name = '';         wp_update_post($after);     } }  /* Check if custom post type music, if true, add action to auto update slug */ function enqueue_music_features( $hook_suffix ){     $my_custom_post_type = 'music';      if( in_array($hook_suffix, array('post.php', 'post-new.php') ) ){         $screen = get_current_screen();      if( is_object( $screen ) && $my_custom_post_type == $screen->post_type ){          /* add custom post type music features */         add_action('post_updated', 'auto_update_post_slug', 10, 3);          echo "<script type='text/javascript'>alert('This has been called');</script>";          }     } } add_action( 'admin_enqueue_scripts', 'enqueue_music_features');   What I do know that the enqueue_music_features only calls the alert in the custom post type music, and that auto_update_post_slug works by itself if you put it outside enqueue_music_features.   I also tried putting the entire auto_update_post_slug inside the hook, that didn't work either.  The main issue is that I'm not able to combine these two parts, even if they work on by themselves.

I'm running a property site where many properties are sold in apartment blocks.  Because of this what the content editors do is create a post/property with all the details and then use a duplicate post plugin to create the others.  Each time they duplicate a post/property they change the title to reflect the property number and maybe change a few bits of meta data E.G price.  What they forget to do is wipe out the slug and let a new one be generated from the title. Here is an example slug from the first property entered:  merle-court-plot-50-182-carlton-vale-nw6-5hh  but then when they duplicate the slugs become:  merle-court-plot-50-182-carlton-vale-nw6-5hh-2 merle-court-plot-50-182-carlton-vale-nw6-5hh-2-2 merle-court-plot-50-182-carlton-vale-nw6-5hh-2-2-2 merle-court-plot-50-182-carlton-vale-nw6-5hh-2-2-2-2 etc   But when they change the titles the slugs would be better like:  merle-court-plot-51-182-carlton-vale-nw6-5hh merle-court-plot-52-182-carlton-vale-nw6-5hh merle-court-plot-53-182-carlton-vale-nw6-5hh merle-court-plot-54-182-carlton-vale-nw6-5hh etc   So my question:     How do I force the slug to be re-generated on post save, after they have updated the property title?   The slug for this CPT should always be auto generated, there is never a need to manually set it.


I would like some help getting a script to run on shutdown and restart.  Following advice I found online, I created the script and placed it in /etc/rc0.d and /etc/rc6.d.   Unfortunately, the scripts are not running and when I run Aptitude, I see the following error appear:  insserv: warning: script is corrupt or invalid: /etc/init.d/../rc0.d/K99-CreateSuccessfulPowerOffFile insserv: warning: script is corrupt or invalid: /etc/init.d/../rc6.d/K99-CreateSuccessfulPowerOffFile   Here are the contents of the script:  #!/bin/sh echo success > /etc/poweroffsuccess.txt exit 0   And here are the permissions:  user@hostname:~$ ls -l /etc/rc0.d/K9* -rwxrwxrwx 1 root root 58 Sep 24 11:11 /etc/rc0.d/K99-CreateSuccessfulPowerOffFile  user@hostname:~$ ls -l /etc/rc6.d/K9* -rwxrwxrwx 1 root root 50 Aug 18 21:09 /etc/rc6.d/K99-CreateSuccessfulPowerOffFile

I'd like to run a .sh file using bash on logout and shutdown of Ubuntu. I have searched up and down the web and have found only fixes for KDE and GNOME. The script is simple, I just need to know if I can add the line of code to the "logoff/shutdown" file or if I need to reference it in another script.


We would never say "I builded my own house", and we would never say "I ment my fences" - as far as I can tell, words either went the d-to-t route, or they went the add-ed route. Gild, for some reason, went both ways. (Progressive, for its time!)  Is there any reason why this word bucked the trend and kept both past tense forms? I've reviewed existing material here on English SE and the interwebs in general and can't find any historical reasoning.

While perusing ShreevatsaR's answer to , it occurred to me that my own verbal usage is out of step with what I see in current American literature. When speaking in the past tense, I prefer to use the following forms:   dreamt (past tense of to dream) leapt (past tense of to leap) swept (past tense of to sweep) lit (past tense of to light)   However, when reading recently written novels, I see the more regular conjugation of the past tenses, which instead yields dreamed, leaped, sweeped, and lighted. Is it a difference of dialect (US - New England), register (university education), or (possibly) my age (early forties)? I am especially irritated by "lighted" because it takes so much more effort to say than "lit".  CLARIFICATION: Given Jon Hanna's answer below, I would just like to clarify the question a bit more. What I was originally after was why these separate verb forms exist in the same past tense. In other words, variations such as "I dreamt" vs. "I dreamed", not the variation between different forms in different pasts. I am not a linguist, so I hope that clears things up a bit.


How do I create empty array of a type given by reflection? I have tried using the Activator.CreateInstance(Type) method:  Type arrayType = typeof(string[]); Activator.CreateInstance(arrayType);   but I get a MissingMethodException exception:  System.MissingMethodException: No parameterless constructor defined for this object.   What am I doing wrong?

I'm trying to deserialize an array of an type unknown at compile time. At runtime I've discovered the type, but I don't know how to create an instance.  Something like:  Object o = Activator.CreateInstance(type);   which doesn't work because there is no parameterless constructor, Array doesn't seem to have any constructor.


In the C++ book I am reading. It gives the syntax for initialisation as  int *pInteger = NULL;   However it also showed the following as an example  int Age = 30;  int* pInteger = &Age;   Why is there a discrepancy? i.e. * after the int and * before the pInteger. Is the following correct?  int Age = 30;  int *pInteger = &Age;

I've recently decided that I just have to finally learn C/C++, and there is one thing I do not really understand about pointers or more precisely, their definition.  How about these examples:   int* test; int *test; int * test; int* test,test2; int *test,test2; int * test,test2;   Now, to my understanding, the first three cases are all doing the same: Test is not an int, but a pointer to one.  The second set of examples is a bit more tricky. In case 4, both test and test2 will be pointers to an int, whereas in case 5, only test is a pointer, whereas test2 is a "real" int. What about case 6? Same as case 5?


I used the Android "Gallery" app and accidentally deleted all my photos.  Can I plug my memory stick into Ubuntu, and DD recover the disk, and somehow recover the files?

I usually back up before formatting and doing a re-installation of Ubuntu, it was in the process and then obviously stopped prematurely but I was thinking all my data was transferred.  After installing formatting the drive and sticking a fresh Ubuntu on there I proceed to transfer the files from my memory stick to my hard drive, some files are there but most of my 6 years worth of pictures are gone. Is there any way I can get these back? I don't know what to do, I feel absolutely crap :/  Any help would be very appreciated.


It's quite usual to read :  "the time needed to factor n by NFS algorithm is exp(...formula with ln(n)...)"  But I can't find to which unit of time this formula refers ? Is it really time ? Or number of operations ?   Thanks

I'd prefer as little formal definition as possible and simple mathematics.


I have tried to convert a java list to a Scala list without success using asInstanceOf, as my returned list from an android call is a java list.  val apList = (wfm.getScanResults:java.util.List[ScanResult])   Wish to do this so that I can use the (new Scala) list in a for comprehension as it doesn't seem to like using a java list in this construct giving me an error.  value foreach is not a member of java.util.List[android.net.wifi.ScanResult]     for (ap<-apList) { .... }          ^   Is their a way to use a Java list in a for/foreach, without coercing it? And if I have to coerce, how? as asInstanceOf invokes a r/t error when used in this way.

I'm writing some Scala code which uses the  API. I would like to iterate over the rows contained in the java.util.Iterator that I get from the Sheet class. I would like to use the iterator in a for each style loop, so I have been trying to convert it to a native Scala collection but will no luck.  I have looked at the Scala wrapper classes/traits, but I can not see how to use them correctly. How do I iterate over a Java collection in Scala without using the verbose while(hasNext()) getNext() style of loop?  Here's the code I wrote based on the correct answer:  class IteratorWrapper[A](iter:java.util.Iterator[A]) {     def foreach(f: A => Unit): Unit = {         while(iter.hasNext){           f(iter.next)         }     } }  object SpreadsheetParser extends Application {     implicit def iteratorToWrapper[T](iter:java.util.Iterator[T]):IteratorWrapper[T] = new IteratorWrapper[T](iter)      override def main(args:Array[String]):Unit =     {         val ios = new FileInputStream("assets/data.xls")         val workbook = new HSSFWorkbook(ios)         var sheet = workbook.getSheetAt(0)         var rows = sheet.rowIterator()          for (val row <- rows){             println(row)         }     } }


I want to add a backslash \ printed between Hello and World in command line using sed. It should show output Hello \ World.  What do I have to do?

I have a file                                bla bla bla bla bla bla bla bla bla bla bla bla bla bla \newcommand{\datestamp}{20180215} bla bla bla bla bla bla bla bla bla bla bla bla bla bla   I need to search for \newcommand{\datestamp} and want to replace a nearby pattern with a new pattern.                          Required output file   bla bla bla bla bla bla bla                                     bla bla bla bla bla bla bla                                                     \newcommand{\datestamp}{20180218}                               bla bla bla bla bla bla bla                              bla bla bla bla bla bla bla     The backslashes are complicating this task. How do I manage?


How is it that when momentum is constant, energy always stays a constant. For Example :- if $P = 0$ kinetic energy will also be 0. But in a explosion (that momentum is conserved) where the object was still before the explosion the momentum still should be 0. By using $E_k=\frac{P^2}{2m}$ energy also return as 0 Jules. If the $E_k=\frac{mV^2}{2}$ is used the kinetic energy comes as $E_k>0$ since kinetic energy is a scalar. How is that?

$K.E=\frac{1}{2}mv^2$ , $P=mv$ thus there is a relation between them. I really can't understand why there is no decrease in momentum when kinetic energy is decreased in an inelastic collision. I am only a high school passed student(ready for college). Should I leave this question until I learn "Lagrangian" and "Noether's Theorem"? Because I literally read most of the answers about these kinds of questions and spend almost half a day on it, BUT I do not get it. Can anyone please answer this question? please help me.


public String replaceVowels(String s){    String replacement = "";    for(int i = 0; i <s.length(); i++){        if(s.charAt(i)=='a' || s.charAt(i)=='A' ||                s.charAt(i)=='e' || s.charAt(i)=='E'||                s.charAt(i)=='i' || s.charAt(i)=='I'||                s.charAt(i)=='o' || s.charAt(i)=='O'||                s.charAt(i)=='u' || s.charAt(i)=='U'){            replacement = replacement + '*';          }else{              replacement = replacement + s.charAt(i);          }     }    return replacement;   }  I want the code to replace vowels by * in the string and here is my test code  @Test public void tests8(){ code.Solution s =  new code.Solution(); String input = "book "; String expected = "b**k"; String actual = s.replaceVowels(input); assertTrue("Expected was" +expected+"but the actual was" +actual  ,  expected == actual);   }  The error is so weird when I run the junit it said that  expected was b * * k but the actual was b * * k  Whats wrong with my code?

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


I'm supposed to show how if $||\cdot||$ is a norm on vector space $X$ then $||x|| - ||y|| \leq ||x-y||$ for any two vectors $x,y \in X$ The properties I have for a norm are  $||x|| > 0$ if $x \neq \vec{0}$ $||\alpha x|| = |\alpha|||x||$ for any $\alpha \in \mathbb{R}$ $||x+y|| \leq ||x|| + ||y||$ for any $x,y \in X$  Here's what I did. $$ \begin{align*}     ||x-y|| &=    ||x   +     (-y)|| \\             &\leq ||x|| +     ||-y|| \\             &=    ||x|| + |-1|||y|| \\             &=    ||x|| + ||y|| \end{align*} $$ Which is certainly true but not what I'm after. Working the other direction I got the following. $$ \begin{align*} ||x|| - ||y|| &= ||x||-||y|| \\               &= ||x|| + (-||y||)  \end{align*} $$ But I believe that's a dead end... Finally I tried multiplying by -1. $$ \begin{align*}   ||x-y|| &\leq ||x|| + ||y|| \\  -||x-y|| &\geq -||x||-||y|| \\   ||x-y|| &\geq -||x||-||y|| \end{align*} $$ But then then I can't change the sign on the $-||x||$ because it may be a large enough increase to make the inequality not true... I feel like this is supposed to be an easy question so I'm embarassed I can't figure it out yet. Help would be appreciaed.

I have already proved Triangle Inequality $\lVert v+w\rVert \le \lVert v \rVert+\lVert w \rVert$ in vector space $\mathbb{R}^n$. However, I'm having difficulties proving the Reverse Triangle Inequality in the vector space.  I have started with   $$\lVert v \rVert^2=v \cdot v-w\cdot w+w\cdot w \le \lVert v-w \rVert+\lVert w \rVert^2$$ $$\lVert w \rVert^2=w \cdot w-v\cdot v+v\cdot v \le \lVert w-v \rVert+\lVert v \rVert^2$$  based on the Triangle Inequality but I don't know if it is correct. If this is right, I think I can go on with proving it the same way I would the normal Reverse Triangle Inequality.


I'd like to sort a list of words according to their lexicographical order using expl3 code. My words are in a seq variable that I access in a stack-like manner (this is not relevant, though). I've learnt of the l3sort package, but it seems as though its functions worked only for numerical variables, because I've had no trouble with my code to sort a list of integers but I've ran into trouble with non-numerical data (meaning "plain" characters; no fancy macros, expandable stuff, or the likes).    Is there a ready-made way to do this in expl3/LaTeX3? On the negative, could somebody possibly provide some hints as to how to do this?

I have currently the Latex code written in the .cls file to display a list of abbreviations as follows:  \newcommand\listnomenclature{Abbreviations} \usepackage{longtable}  \newcommand\listofnomenclature[2]{ \btypeout{\listnomenclature} \addtotoc{\listnomenclature}     \chapter*{\listnomenclature       \@mkboth{           \MakeUppercase\listnomenclature}{\MakeUppercase\listnomenclature}} \begin{longtable}[c]{#1}#2\end{longtable}\par     \cleardoublepage }   It is used in the following way:  \listofnomenclature{ll}{ GHG     &   GreenHouse Gasses \\ CoMP    &   Cooperative Multi-Point \\ ITU     &   International Telecommunication Union \\ }   Is it possible to modify the codes in the .cls file so that the output is sorted alphanumerically without drastically changing the way it is used?


There are two parts I am having trouble getting started.  A. Prove that $n_1, n_2,...,n_k\in\mathbb{N}$ are each at least $2$ then $n=n_1n_2...n_k+1$ is not divisible by any numbers $n_1, n_2,...,n_k$.   B. Prove that the truth of the negation leads to a contradiction. (Use theorem: For all $a,b\in\mathbb{N}$ there exist a unique quotient $q$ and remainder $r$ in $\mathbb{Z^+}$ such that we have both $a=qb+r$ and $0\leq r<q$.)  For part A, I started with, given $k\in\mathbb{N}$ and $n_1, n_2,...,n_k\geq1$, I'll show that $\forall i$, $n_i \nmid n=n_1n_2...n_k+1$ to set it up, but I'm not sure how to actually go about starting it.  For part B, I know that the negation is $\exists n\in\mathbb{N}$ s.t. $\forall m\in\mathbb{N}$ either $m\leq n$ or $m$ is not prime, but again I'm not sure what I should do to start the proof or exactly how to incorporate that theorem.

I've expressed Euclid's proof on the infinitude of primes on Mathematica:  f[x_] := Product[Prime[n], {n, 1, x}] + 1 TableForm[Table[{f[x], PrimeQ[f[x]]}, {x, 1, 20}]]   Which results in:  $\begin{array}{ll}  3 & \text{True} \\  7 & \text{True} \\  31 & \text{True} \\  211 & \text{True} \\  2311 & \text{True} \\  30031 & \text{False} \\  510511 & \text{False} \\  9699691 & \text{False} \\  223092871 & \text{False} \\  6469693231 & \text{False} \\  200560490131 & \text{True} \\  7420738134811 & \text{False} \\  304250263527211 & \text{False} \\  13082761331670031 & \text{False} \\  614889782588491411 & \text{False} \\  32589158477190044731 & \text{False} \\  1922760350154212639071 & \text{False} \\  117288381359406970983271 & \text{False} \\  7858321551080267055879091 & \text{False} \\  557940830126698960967415391 & \text{False} \\ \end{array}$  The proof flaws for all those values, how is it considered a proof then? I guess that there might be infinite prime numbers according to the proof, but what is the guarantee that at some point it won't fail indefinitely?


i have a problem with the the width of a table,this is the code:  \begin{table}     \centering     \begin{tabular}{|cl|c|c|}         \hline         & \emph{\textbf{OWL Syntaxaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}}           & \emph{\textbf{DL syntax}}          & \emph{\textbf{Example}}\\          \hline         & Thing         & $\top$           & \\         \hline     \end{tabular}     \caption{Exemplary table}     \label{ft_tab_ex} \end{table}   This is the result:   How can i do to split the word and start a new line??

I have a table that I want to insert on a page, but at least one (perhaps both) of the following conditions are met:   The table is too wide to fit within the text block or page. That is, I'm exceeding some horizontal restriction. The table is too tall to fit within the text block or page. That is, I'm exceeding some vertical restriction.   What are my options to make this table fit? If it doesn't fit, regardless of my attempts, what other options exist?


While a photon is mass less but when it converts to an electron how mass can come into being ?

In pair production, two gamma rays with > .511Mev can come together to create a positron and an electron.    So two electromagnetic waves E and B fields, with No mass and No gravity and traveling at the speed of light,  can create two objects with Mass, with Gravity and with opposite E fields, and with NO B field.  Is there any theories on how E and B fields go about creating mass?  It seems the resultant objects both have opposite E fields, but the B field has vanished...where did it go?  In slow motion, as this happens, what exactly goes on to create mass from EM fields?  Can we use EM fields to manipulate this process further? i.e. change the rate of pair production?  Or to manipulate the G field of the resultant objects?


Use case : Once contract is inserted with :  record type = B2C AccountId = Case.AccountId ContactId = Case.ContactId GEG_Correspondance_Offre_Produit__r.Type_Energie__c = Case.GEG_Correspondance_Offre_Produit__r.Type_Energie__c  Then relate all cases respecting these criteria ** Here's my Trigger** trigger Contrat_Trigger on Contract (after insert) {   List<Case> cases = [Select id , GEG_Contract_Requete__c , ContactId, AccountId from case where Status ='Clôturée' and RecordType.Name  = 'Demande de Souscription' and GEG_Correspondance_Offre_Produit__r.Type_Energie__c = '0'];  List<Id> ids =  new List<Id>(); for (Contract con : Trigger.new){     ids.add(con.Id);      }  for (Contract con : [select Id , RecordType.Name from contract where Id in : ids]){          for(Case c : cases){                      if(con.AccountId == c.AccountId && con.GEG_Contact_Titulaire__c == c.ContactId && con.GEG_Correspondance_Offre_Produit__r.Type_Energie__c == c.GEG_Correspondance_Offre_Produit__r.Type_Energie__c){                 c.GEG_Contract_Requete__c = con.Id;             }            cases.add(c);          }                       }     update cases; }  My trigger doesn't work as expected , does anyone have an idea ?

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, navigate to the  tag. This question and answer is owned by the community! If you can improve it and make it more useful, you're welcome to edit it. I have a collection of records, like a List<sObject> or the Trigger.new context variable. I need to query other records that are related to these records either directly or indirectly, and I want to use the related data to make further updates. When I write a query in a loop, like for (Account a : Trigger.new) {     Account parent = [SELECT Name FROM Account WHERE Id = :a.ParentId];     // ... }  I keep hitting Salesforce query limits, and I know this is not best practice. What can I do to avoid this problem and bulkify my code?


Here is the integral I want to evaluate:  $$\int_{0}^{2\pi} \frac{dx}{a+b \cos x }, \quad a>b >0$$  Apparently there are limitations as to what values $a, b$ are supposed to take but let us not concern about this. Since using the sub $u =\tan \frac{x}{2}$ (the Weiersstrass sub) results that the integral is $0$ (as it should, since it is not $1-1$ function in this interval) I got down down the way of contour integration. Hence:  $$\begin{aligned} \int_{0}^{2\pi}\frac{dx}{a+ b\cos x} &\overset{x=i \ln u}{=\! =\! =\!} \oint \limits_{|z|=1} \frac{dz}{iz \left [ a + \frac{b}{2}\left ( z+z^{-1} \right ) \right ]} \\   &= \frac{1}{i} \oint \limits_{|z|=1} \frac{dz}{za + \frac{bz^2}{2}+\frac{b}{2}}\\   &=\frac{2}{i} \oint \limits_{|z|=1} \frac{dz}{bz^2 +b +2za} \\   &= \frac{2}{i} 2\pi i \sum_\text{residues} f(z)\\   &= \frac{4\pi}{1+ \sqrt{1-8ab}+2a} \end{aligned}$$  However, judging by intuition this must not be the result. Because this one restricts the integral too much. What i mean is, that for $a=6, b=3$ we have that:  $$\int_0^{2\pi} \frac{dx}{6+3\cos x}= \frac{2\pi}{3\sqrt{3}}$$  My formula cannot derive the result because then radical would be negative. What am I doing wrong here?

How do you integrate $\int \frac{1}{a + \cos x} dx$?  Is it solvable by elementary methods?  I was trying to do it while incorrectly solving a homework problem but I couldn't find the answer.  Thanks!


Whenever trying to install any software and update manger,  I get an error stating    Package operation failed The installation or removal of a software package failed   When I run sudo apt-get update I got this result:   conan51xd@conan51xd-Lenovo-B470:~$ sudo apt-get -f install [sudo] password for conan51xd:  Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. conan51xd@conan51xd-Lenovo-B470:~$ apt-get update E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

I get this error in Lubuntu 12.04 when I try to update in terminal:  $ apt-get update E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?


When I launch the application it does not open. When I try it from command prompt following error message is displayed   $ chromium-browser --disable -extensions [4168:4201:1016/185019.088022:FATAL:nss_util.cc(632)] NSS_VersionCheck("3.26") failed. NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer. Aborted (core dumped)

I upgraded to Chrome 61.0.3163 via ppa on Ubuntu 16.04 but it won't launch because NSS out of date. Launching Chrome in terminal gives:  NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer.   Running   sudo apt-get install libnss3   gives  libnss3 is already the newest version (2:3.21-1ubuntu4)   Should I try to get a newer version of libnss that's not in the repository? I downgraded my version of Chrome for now.  Edit:  apt-cache policy libnss3 libnss3:   Installed: 2:3.21-1ubuntu4   Candidate: 2:3.21-1ubuntu4   Version table:  *** 2:3.21-1ubuntu4 500         500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages         100 /var/lib/dpkg/status  cat /etc/apt/sources.list # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted  ## Major bug fix updates produced after the final release of the ## distribution. # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## universe WILL NOT receive any review or updates from the Ubuntu security ## team. deb http://us.archive.ubuntu.com/ubuntu/ xenial universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu  ## team, and may not be under a free licence. Please satisfy yourself as to  ## your rights to use the software. Also, please note that software in  ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse  ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse  ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. deb http://archive.canonical.com/ubuntu xenial partner deb-src http://archive.canonical.com/ubuntu xenial partner  # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted # deb-src http://security.ubuntu.com/ubuntu xenial-security universe # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse


I'm a bit sketchy on this one but will try and give as much detail as I can remember.  The story is about a group of humans who are on a planet other than Earth. They are being hunted by some kind of robots or artificial life form. The humans have exoskeleton legs to help them run faster. The robots hunting them use human body parts in their tech and also make sculptures/art works from human body parts.

I'm trying to figure out the name of a science fiction novel.  In it there were bands of humans which roamed a world.  The world was controlled by intelligent robots or mechanized creatures I think.  In it the humans all had suits, which produced different smells to warn the humans about different robot/creatures nearby.  In it a particular group was hunted by a very intelligent robot/creature and it made them a deal for freedom in a spaceship.  I know that they traveled in wastelands for part of the novel but ended up going to a robot/creature city at some point in the novel.  Help please!


As far as I know, if I set write permission to a directory (+w), I will be able to copy files inside and the execution permission to a directory (+x) allows me to list the content of it.  I get problems when I set /root directory with rwx----w- permissions (702), and try to copy a file inside. I get and error that says something like:     cp: cannot perform 'stat' on '/root/myfile': Permission denied   Why does this fail?

I am trying to understand the permission usage for the cp command in unix.   What are the permissions required for copying a file into a directory What are the permissions required for copying out of a directory?   I'm assuming for my first question, the directory will need execute permissions to perform the operation and the file will need read permissions to read the binary of the file and then the output file will need write permissions.  For the second the directory itself would need execute permissions to perform the copy operation and the file would need read permissions to extract the data from the file.  Can anyone tell me if my logic is flawed?


I want to find out sum of the following series: $${m \choose m}+{m+1 \choose m}+{m+2 \choose m}+...+{n \choose m}$$ My try: ${m \choose m}+{m+1 \choose m}+{m+2 \choose m}+...+{n \choose m}$ = Coefficient of $x^m$ in the expansion of $(1+x)^m + (1+x)^{m+1} + ... + (1+x)^n$  Or, Coefficient of $x^m$ $$\frac{(1+x)^{m}((1+x)^{n}-1)}{1+x-1}$$ $$=\frac{(1+x)^{m+n}-(1+x)^{m}}{x}$$ But, how to proceed further?  Note: $m≤n$

After reading , the most popular answer use the identity $$\sum_{t=0}^n \binom{t}{k} = \binom{n+1}{k+1}.$$  What's the name of this identity? Is it the identity of the  modified.  How can we prove it? I tried by induction, but without success. Can we also prove it algebraically?  Thanks for your help.    EDIT 01 : This identity is known as the  because, on Pascal's triangle, when the addends represented in the summation and the sum itself are highlighted, a hockey-stick shape is revealed.


I was trying to color just first WORD of sentence
Title Of The Page
   CSS which am using is  .logoS{     padding: 0px;     float: left;     font-family: 'Open Sans', Helvetica, Arial, sans-serif;     color: white;     border:solid 1px black;     font-weight: bold;     font-size: 22px; }  .logoS::nth-word(1) {   margin-right: 20px; }   i just want to color "TITLE" not other words, any solution

This one has me kind of stumped. I want to make the first word of all the paragraphs in my #content div at 14pt instead of the default for the paragraphs (12pt). Is there a way to do this in straight CSS or am I left wrapping the first word in a span to accomplish this?


@PostMapping("/signin")  public ResponseEntity<?> authenticateUser(@Valid @RequestBody LoginRequest loginRequest) {      System.out.println("a"+loginRequest.getUsername()+loginRequest.getPassword());     Authentication authentication = authenticationManager.authenticate(             new UsernamePasswordAuthenticationToken(loginRequest.getUsername(), loginRequest.getPassword()));     System.out.println("a"+loginRequest.getUsername()+loginRequest.getPassword());    // new RuntimeException("Error: cccccc is not found.");     SecurityContextHolder.getContext().setAuthentication(authentication);     String jwt = jwtUtils.generateJwtToken(authentication);    new RuntimeException("Error: cccccc is not found."+ jwt);     //    new RuntimeException("Error: cccccc is not found.");     UserDetailslmpl userDetails = (UserDetailslmpl) authentication.getPrincipal();     List<String> roles = userDetails.getAuthorities().stream()             .map(item -> item.getAuthority())             .collect(Collectors.toList());    // new RuntimeException("Error: aaaa is not found.");     return ResponseEntity.ok(new JwtResponse(jwt,             userDetails.getId(),             userDetails.getUsername(),             userDetails.getEmail(),             roles)); }

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


I have a two different Datatables  datatable1: customer, product, shippedqty datatable2: customer, product, febforecast, marforecast, aprforecast   Here  Customer and product columns are same  I need to compare datatable1 with datatable2  on customer and products columns and i need to get the result set into new datatable as  customer,product,dhipedqty,febforecast,marforecast,aprforecast   This is what i've tried:  var tablesJoinend = from t1 in dt.Rows.Cast<DataRow>()                      join t2 in forecastdatatable.Rows.Cast<DataRow>()                      on new { A = t1["Customer"].ToString(), B = t1["ProductCode"].ToString() }                      equals new { A = t2["customer"].ToString(), B = t2["NDC"].ToString() }                      select t1;   Now i have tried this which it was not worked  var results = from t1 in dt.Rows.Cast<DataRow>()                               join t2 in forecastdatatable.Rows.Cast<DataRow>() on new { A = t1["Customer"].ToString(), B = t1["ProductCode"].ToString() } equals new { A = t2["customer"].ToString(), B = t2["NDC"].ToString() }                               select new                               {                                   CustID = Convert.ToInt32(t1["Customer"]),                                   ColX = Convert.ToInt32(t1["ProductCode"]),                                   ColY = Convert.ToInt32(t1[3]),                                   a = Convert.ToInt32(t1[4]),                                   xx = Convert.ToInt32(t2[4]),                                     qq = Convert.ToInt32(t2[5])                               };

Let T1 and T2 are DataTables with following fields  T1(CustID, ColX, ColY)  T2(CustID, ColZ)   I need the joint table  TJ (CustID, ColX, ColY, ColZ)   How this can be done in C# code in a simple way? Thanks.


I just switched my HP Stream 14 laptop to Ubuntu 16.04 LTS from Windows. I have experienced the same problem as many others: I cannot see any wireless networks. Other threads have pointed to the driver as the issue, and I have tried to fix it as suggested  and , but neither of these worked (I am creating this question because I have yet to find an existing source that can guide me through how to fix my connection issues). It is possible that I did the suggested fixes wrong, as I am relatively new to Ubuntu. Can someone walk me through, step by step, how I can fix this issue? I have spent many hours on it already, and could use some expert help. I have re-installed Ubuntu, so it is the factory version I am working with.   Important info:   lspci -nn | grep Network    returns   01:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)  Under "System Settings" > "Software & Updates" > "Additional Drivers", It says   "Broadcom Corporation: BCM43142 802.11b/g/n  This device is using an alternative driver. Using Broadcom 802.11 Linux STA wireless driver source from bcmwl-kernel-source (open source)"  (This part makes me think the driver is not the issue).  Additionally, this laptop does not have an ethernet port, so I can only use the USB I used to install Ubuntu and a separate computer with an internet connection.

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


The number of functions from $\mathbb{N}$ to itself is $|\mathbb{N}|^{|\mathbb{N}|}={\aleph_0}^{\aleph_0}=\aleph_1$. The number of functions from $\mathbb{R}$ to itself is $|\mathbb{R}|^{|\mathbb{R}|}={\aleph_1}^{\aleph_1}=\aleph_2$. Finally, the number of functions from $\mathbb{R}$ to $\mathbb{N}$ is $|\mathbb{N}|^{|\mathbb{R}|}={\aleph_0}^{\aleph_1}=\aleph_2$. My question is whether the number of functions from $\mathbb{N}$ to $\mathbb{R}$ ($|\mathbb{R}|^{|\mathbb{N}|}={\aleph_1}^{\aleph_0}$) is $\aleph_1$ or $\aleph_2$. Thanks! EDIT: Please note that I assume the generalised continuum hypothesis.

I was wondering what the cardinality of the set of all real sequences is. A random search through this site says that it is equal to the cardinality of the real numbers. This is very surprising to me, since the cardinality of all rational sequences is the same as the cardinality of reals, and it seemed fairly intuitive to me that if cardinality of a set $A$ is strictly greater than the cardinality of the set $B$, then cardinality of $A^{\mathbb{N}}$ should be strictly greater than cardinality of $B^{\mathbb{N}}$. It turns out to be false.  Some technical answers have appeared in this forum elsewhere but I do not understand them. As I am not an expert in this topic, could some one explain me in simple terms why this is happening?  Also is the cardinality of all functions from reals to reals also the same as the cardinality of reals?


I want to be able to export my chat history so I can read it outside of Skype and save it permanently somewhere else. I have seen many suggestion about main.db file in skype directory but unable to find that file in Ubuntu 13.04 or if however i found main.db file so how can i convert in text file.  Please let me know you suggestion.

I'd like to convert my Skype chat history to a collection of text files for archival purposes.  Ideally, I'd like to have a command (e.g. script or app) so that I could do this on a regular basis.  Any one have any idea on how to go about doing this?


I have seen a code written like this:  if __name__ == "__main__":     #...     result = someFunction(someParameter)     sys.exit(result)   and even like this, where you write the call of the function in the sys.exit() function:  if __name__ == "__main__":     #...     sys.exit(someFunction(someParameter))   Which is the most correct option according to style?

I got a message saying script xyz.py returned exit code 0. What does this mean?  What do the exit codes in Python mean? How many are there? Which ones are important?


I'm trying to implement Realm database in my project, I have a class with methods to add items in the database, I use that class to store those methods and call them in my fragment, but when I do that I get an error:  java.lang.NullPointerException: Attempt to invoke interface method 'void io.realm.RealmChangeListener.onChange()' on a null object reference   What am I doing wrong here?  public class Repositorio extends GlobalActivity {       private RealmChangeListener realmListener;     public Realm realm;     private Context context;        public Repositorio() {     }      public Repositorio(Context context) {         this.context = context;         this.realm = Realm.getDefaultInstance();         this.realmListener = new RealmChangeListener() {             @Override             public void onChange() {                 Log.i("realmtest", "some values in the database have been changed");             }         };          this.realm.addChangeListener(realmListener);     }       public void addCliente(String nome, String local, String estado, String telefone, String email, String tipo) {         realm.beginTransaction();          Pessoa mPessoa = realm.createObject(Pessoa.class);         mPessoa.setId(UUID.randomUUID().toString());         mPessoa.setNome(nome);         mPessoa.setCidade(local);         mPessoa.setEstado(estado);         mPessoa.setTelefone(telefone);         mPessoa.setEmail(email);         mPessoa.setTipo(tipo);          realm.commitTransaction();           Toast.makeText(context, "Cliente adicionado com sucesso", Toast.LENGTH_LONG).show();     }      @Override     public void onPause() {         super.onPause();          realm.removeChangeListener(realmListener);      }      @Override     public void onResume() {         super.onResume();          realm.addChangeListener(realmListener);      }       @Override     protected void onDestroy() {         super.onDestroy();         if (realm != null) {             realm.close();             realm = null;         }     }   }   Fragment:   @Override     public View onCreateView(LayoutInflater inflater, ViewGroup container,                              Bundle savedInstanceState) {          final View v = inflater.inflate(R.layout.cadastra_produtos, container, false);          mRepositorio = new Repositorio(getActivity());          novocliente = (TextView) v.findViewById(R.id.novocliente);            novocliente.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                  mRepositorio.addCliente("ZÉ", "LALAAL", "SC", "3333-3333", "teste@teste.com", "Pessoa Física");             }         });          return v;     }   Global:  public class GlobalActivity extends AppCompatActivity {      public Ferramentas mFerramentas;     public Realm realm;       @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);           mFerramentas = new Ferramentas();         realm = Realm.getDefaultInstance();        }   }


Can you tell me how to move a folder? I am trying to use mv but it does not work! I use Ubuntu and I am new.

I need to move my folder with many subfolders to another path.  I'm using putty and this is what I tried: MV -r fromflderpath tofolderpath  What am I doing wrong?


Is it possible to migrate windows 8 license from 1 machine to another. I purchase one license and installed it in my old PC. No i purchased a new one and i want to transfer that license to my new machine, Can anyone please help me to transfer the same in my new machine.

Long story short  I have two computers: a laptop and a desktop computer. Both have Windows 7 on them.  I buy the Windows 8 Pro upgrade. To see if it screws up anything, I install it on my laptop as a guinea pig. I intend to use Windows 8 for my main computer, my desktop, but I want to test it on the laptop, so I know I don’t risk losing access to my desktop and the data on it. I never use my laptop, and only used it, because it already has a Windows 7 installation on it.  The problem  At some point, I must have entered the license key on my laptop, because when I go to the activation screen on my desktop, I get this:    Uh-oh. I can’t use the key on my desktop. Now how the hell do I transfer the key from my laptop to my desktop computer?  Answers and suggestions so far  Let’s just say that I tried everything possible to get some answers on this matter. The best response I got from Microsoft is this:     To install Windows 8 on your desktop, do the following:         Uninstall Windows 8 on your laptop   Afterwards, install Windows 8 on your desktop   If it won’t activate, call product activation at (...)      I am not a fan of that last point. The error message does allude to such a solution, however:     If you’ve reinstalled Windows or made changes to your hardware recently, you may be able to use your current key.   The question  My main question is this: has anyone been in a similar situation, and if so, what did you do to resolve this?  Failing that, what is the proper way to   uninstall the Windows 8 installation on my laptop, and reinstall the Windows 8 installation on my desktop?   Ad 1  I have already tried using the “reset” feature on my laptop, but that only resulted in a new Windows 8 installation that was already activated. But which is the right way to uninstall the installation in a way that allows me to use the license key on the desktop computer?  Ad 2  Which is the proper way to reinstall the Windows 8 installation on my desktop computer? Why do I even have to reinstall it in the first place?  I won’t get around to do this, until my USB key with 3.0 support arrives in the mail, but it is going to be a while, until I find a assuaging response to the best way to go about this anyway.


I am very begginer with blender, as you see when I press F to create faces it creates automaticly creases in that place only, in the upper part that I made before it made everything smooth, what am I doing wrong?

I am relatively new to Blender so please excuse me if this is rather amateur!   The bottom of my torus has poor surface quality, I have scaled the vertices down for a smaller (variable) tubular radius all the way around the torus and at the bottom the surface quality is awful, with inaccurate shading. Any ideas as to what is wrong and/or how I could fix this?  Thanks, itsanate


I am writing a report and I am trying to get a reference to a figure. The code for my fig is:  \begin{figure}[h]     \label{fig:eloss}     \begin{center}         \includegraphics[scale=0.32]{figs/eloss.jpg}     \end{center}     \caption{\small Histogramme} \end{figure}   and to refer to it I use \ref{fig:eloss} The result that I get in a text is ?? but because I use \hyperref when I click on it it gets me to the right figure. But still I want to have the proper text.  The reference command works perfectly for equations.

\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


This is a mistake I've seen many people make, a few physicists included, but I haven't ever seen a satisfactory explanation for what's going on.  Apologies for the lengthy setup.  Setup  Suppose I have a stationary 1 kg weight, and I apply a 1 N force for 1 second.  At the end of the second, it will have a velocity of 1 m/s and have moved .5 meters.  Its initial kinetic energy is 0 and its final kinetic energy is .5.  The force has done .5 Joules of work to the weight (just Force * distance).  Now suppose the weight is initially moving at 10 m/s in the same direction as the force, and I again apply a force of 1 N for 1 second.  After the second it will have a velocity of 11 m/s and have moved 10.5 meters.  Its initial kinetic energy was 50 and its final kinetic energy is 60.5.  The force has done 10.5 Joules of work to the weight.  The work done in either case is not the same, but the result of applying the work to change the velocity is.  So Work is a relative quantity depending on your frame of reference, just like kinetic energy.  It's not an absolute quantity in the same way that mass or distance or time is (assuming classical mechanics).  Suppose my weight is something with stored chemical potential energy.  Maybe a potent chemical or a battery or something like that.  The potential energy for it is measured in either Joules or calories or kilowatt hours or all sorts of things, but ultimately its the same unit as Work.  Suppose I use it to generate a force to accelerate itself.  "Paradox"  If I'm naive and assume that the chemical energy can be plugged in as work to find the final velocity of a weight, I'd get something like:  $$ v_f^2 = v_i^2 + 2 M W $$  M is 1 kg, and lets say my chemical energy is 0.5 Joules.  Let's start with the stationary case, and plug in my chemical energy for W.  I end up with a final velocity of 1 m/s, which is right.  But with the already-in-motion case, I end up with a final velocity of ~10.05 m/s, which differs from the right answer by quite a bit!  Question  So Work isn't the same as chemical potential energy.  The two have the same units but potentially different scales, depending on reference frame, which I think is the answer to this paradox?  But then, how do you convert between the two?  How do you find the impulse a battery or chemical reaction could produce?

Consider a rocket in deep space with no external forces. Using the formula for linear kinetic energy $$\text{KE} = mv^2/2$$ we find that adding $100\ \text{m/s}$ while initially travelling at $1000\ \text{m/s}$ will add a great deal more energy to the ship than adding $100 \ \text{m/s}$ while initially at rest: $$(1100^2 - 1000^2) \frac{m}{2} \gg (100^2) \frac{m}{2}.$$ In both cases, the $\Delta v$ is the same, and is dependent on the mass of fuel used, hence the same mass and number of molecules is used in the combustion process to obtain this $\Delta v$. So I'd wager the same quantity of chemical energy is converted to kinetic energy, yet I'm left with this seemingly unexplained $200,000\ \text{J/kg}$ more energy, and I'm clueless as to where it could have come from.


I'd like to combine the shell bar and the top bar on my desktop for all applications.   I have noted on the screenshot below what I mean by shell bar and top bar.

Just moved from Unity to GNOME with the update to Ubuntu 17.10. There is a HUGE amount of wasted space at the top of the screen, when an application is open.  Evolution and Firefox both have four "bars" with 90% of each empty. Unity, to its credit was able to blend / mix these horizontal bars so there was only one / two.      Four is way too much. If this is GNOME I may carry on with Unity for the next six months.  Can anybody suggest a tweak/change/fix for this?


In MTG (or other games), if one player is dealt a strong hand, and the other a weak one, the first player is likely to win. Unless, of course, the first player plays much worse or is unlucky during the course of the game.  How does one evaluate the strength of a hand in MTG? This is NOT a question about when to take a mulligan (which applies only to the weaker hands), but is a general question about all hands, weak, average, strong, and even "come" hands. (An example of a "come" hand, from poker is four to a straight or a flush, that is weaker than one pair, but will be a very strong hand if it "fills.")  I'm using some examples from bridge, which I know better:   One has a disproportionate number of the most powerful cards (three or all four of the aces in the deck). One has a large number of moderately powerful cards (e.g. face cards, not all aces). One has a hand with only average "raw" strength, but that is highly co-ordinated (e.g. seven or eight cards of a single suit for trumps). This can be combined with having few low cards, and hence few weaknesses, in other suits. One has "position", e.g. by playing after an opponent with a slightly weaker hand, so it is easy to "cancel" or "one-up" him.   What are similar, or analogous advantages in MTG? Are there "standard" evaluation methods, as there are in bridge (with its high card point count), or is it more of a situational thing?

But how can I hone my abilities in that skill? Obviously if I had no/all land I'd probably want to mulligan as the opportunity to actually cast some of my spells are worth the 1 card penalty. But what about when I only have 1 land or 1 spell? Are there any good rules of thumb to help me make this decision? How can knowing my deck make these choices easier? What other elements of my hand should I look at when making this decision?


To facilitate a migration I installed SQL Server 2000 Standard Edition and Service Pack 4 as a named instance on server with an existing instance of SQL Server 2008R2 RTM.  The issue I have is connecting to the named instance outside of the server itself.  This is what worked:   Connecting remotely while specifying the port number in the connection string (SERVER\INSTANCE,PORT) Connecting locally using just SERVER\INSTANCE   The SQL Server Browser service is enabled and running for SQL Server 2008R2. In the event log there is a warning from the browser service that states:    The configuration of the SQL instance *INSTANCE_NAME* is not valid.    I have been troubleshooting this issue for awhile and cannot find any solid information.  Thanks in advance for any help!

Will preface this by saying I am not at all convinced yet this is not the vendor doing something wrong on their application server.  Just looking for new ideas  Instance X is a named instance of SQL Server 2008 R2.  It houses numerous databases and takes in connections from numerous application servers.  Browser service is running and all connections are made by way of server\instance name.  Moved DB from an old 2K5 instance over to it the other day and vendor claims he cannot connect to the DB.  He says he is just putting in the Server\instance name in his connection string and his connection fails. At this time he cannot/has not provided me with any real error message.  Whenever he tries, we see no evidence of success or failure.  As of right now there is no evidence he is even hitting the named instance.  He can hit a test 2008 R2 default instance though.  So, since the named instance appears to be the difference, I am thinking this has something to do with the port number.  We have not explicitly tried the port number because we need it to work with just the name and vendor swears it should.  However, we can connect with his credentials, via SQLCMD and by setting up a basic ODBC.  Application server is 2003R2 and in my opinion, craped up, but replacing it is not an option.  DBNETLIB.DLL version is 2000.86.3959.0 and native client version is 2005.90.3042.  You would have to go quite a ways back to not be able to hit a named instance.  Am I missing anything overly obvious?  From a customer service perspective would prefer to not just say “Works for everyone else!”.  EDIT 9:44PM Central - Should have noted on original post that the firewall is not on on the application server and we do not filter/block anything internal to the network.


The workflow is simple:   You click inside a textarea. The text is copied to the client's clipboard. Display notice to the user.   How do you do it?

What is the best way to copy text to the clipboard (multi-browser)? I have tried: function copyToClipboard(text) {     if (window.clipboardData) { // Internet Explorer         window.clipboardData.setData("Text", text);     } else {         unsafeWindow.netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");         const clipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);         clipboardHelper.copyString(text);     } }  But in Internet Explorer it gives a syntax error. In Firefox, it says unsafeWindow is not defined. A nice trick without using :


The question see above. I thought there is a counter-example but not sure: $A:=\{(x,\sin\frac{\pi}{x}):x\in(0,1]\}$, Then $A'=\{(0,y):y\in [-1,1]\}$. Take $\overline{A}$ and connect $(1,0)$, $(0,1)$ with some arbitrary Jordan curve. It's simply connected, and I think a homotopy contracting it to a point would be impossible due to the continuousness problem at $(0,y)\times 0$ of $H(\vec{x},t)$, but I don't know how to give a strict proof. Any help would be appreciated.

The standard counter example to the claim that a simply connected space might be contractible is a sphere $S^n$, with $n > 1$, which is simply connected but not contractible. Suppose that I were interested in a counter example in the plane - does anyone know of a subset of $R^2$ which is simply connected but not contractible?


I installed SQL Server, I deleted my windows user account, now I'm trying to access SQL Server using administrator account but it could not connect. It throws error like this     The database TEST is not accessible. (ObjectExplorer)

I lost the sa password on a machine, and when I log in to the machine directly using an account in the admin group, SQL Server Management Studio will not allow me to log in using Windows authentication.  My plan was to simply log into the server, connect via Windows Authentication, and reset sa to use a new password. Since I cant' connect via Windows Authentication, this won't work.  How else can I reset the sa password?


Minimal example:  \documentclass{article}  \begin{document}  \begin{enumerate}   \item See below   \item [2\textsuperscript{*}.] This isn't right. Or?   \item [3*.] This neither.   \item [4.*] Even worse.   \item See above \end{enumerate}  \end{document}   Shouldn't instead both the dot and the asterisk be directly at the number?  (I found this answer  but I am not familiar with the \up command. Is it just equivalent with \textsuperscript?)  Edit  I agree that the the title of a question marked as duplicate () can be read to ask the same question. However my question added in the body of the question points to a more particular request that seems neither in the other question nor in any of the answer given to that question. I could change the title of my question slightly but that would render some of the answers given to my question look strange. So I leave it with this edit.  Edit 2  Based on a comment () I prefer as a solution:  \newcommand{\aster}{\makebox[0pt][l]{*}}

I would like to add an asterisk after certain labels in the enumerate environment. So for example  \documentclass{article} \begin{document}  \begin{enumerate}     \item Kuttel     \item* Daddeldu \end{enumerate}  \end{document}   but without the space between 2. und *.


It seems that I'm missing something about this.  First of all, the series is convergent: $\lim_{n\rightarrow\infty}\frac{2^{-n-1} (n+1)^2}{2^{-n} n^2}=\frac{1}{2}$ (ratio test)  What I tried to do is to find a limit of a partial sum $\lim_{n\rightarrow\infty}S_n$ as follows: $S_n=\frac{\frac{1}{6} n (n+1) (2 n+1)}{\frac{1-\left(\frac{1}{2}\right)^n}{2 \left(1-\frac{1}{2}\right)}}$. Still, the limit is $\infty$ and I'm clearly doing something wrong.

Please explain different methods to calculate the sum of infinite series with $\dfrac{n^2}{2^n}$ as it's general term i.e. Calculate   $$\sum_{n=0}^\infty \dfrac {n^2}{2^n}$$  Please avoid the method used for summation of arithmetic geometric series. It is very tedious approach. Does any other simpler approach exist?


Given an ellipse:  $ax^2 + 2xy + by^2 = 1$  how can I calculate the length of the shorter and longer axis?

What is the most accurate way of solving the length of the semi-major axis of this ellipse?    $-0.21957597384315714 x^2 -0.029724573612439117 xy -0.35183249227660496 y^2 -0.9514941664721085 x + 0.1327709804087165 y+1 = 0$    The answer should be extremely close to the correct value of the length of the semi-major axis which is equal to $3.073400961177073$    I already tried to rotate the graph so that the major axis will coincide with the x-axis making the xy term equal to zero, then I made it into standard form, in which I was able to calculate the length of semi-major axis. However, the result differs from the true value by about $0.1$ . This difference is not acceptable since this value will be used many times for the orbit propagation formulas and in our final computation, the result has about 5% error. We could not accept this 5% error since our goal is to have an error of at least 2%. Thank you in advance.


after I type in a command in to the terminal it ask for my password but when  i try to type in my password nothing happens don't know where to go from here

When I'm about to install a program in the terminal it wants the password:  [sudo] password for xxx:   But when I start to type my password nothing happens. What should I do?


Let's say I have a set of i.i.d. samples $X_1,\ldots,X_N \sim N_p(\mu, \Sigma)$. Now define \begin{equation} d^2_i(b)=(X_i - b)'\Sigma^{-1}(X_i-b) \end{equation} which is essentially the Mahalanobis distance, except that it measures the distance from $X_i$ to $b$ (with respect to the principal component axes), rather than the distance from $X_i$ to $\mu$, if that makes any sense.  I know that if $b=\mu$ then we would have $d^2_i\sim \chi^2_p$, but I'm having trouble figuring out what it would be otherwise. Any help would be greatly appreciated. Thanks!

Assume you are given two objects whose exact locations are unknown, but are distributed according to normal distributions with known parameters (e.g. $a \sim N(m, s)$ and $b \sim N(v, t))$. We can assume these are both bivariate normals, such that the positions are described by a distribution over $(x,y)$ coordinates (i.e. $m$ and $v$ are vectors containing the expected $(x,y)$ coordinates for $a$ and $b$ respectively). We will also assume the objects are independent.  Does anyone know if the distribution of the squared Euclidean distance between these two objects is a known parametric distribution? Or how to derive the PDF / CDF for this function analytically?


I want a script to run when I press a keyboard shortcut, but only if I’m using a specific keyboard layout (I have 4 installed). I figured the easiest way to do this was with the keyboard layout environment variable (provided there is one), but I couldn’t find anything of the sort. Any help is welcome.  I’m open to other ideas, I just thought this would be easiest.

I made a cool, little script that will edit my /usr/share/X11/xkb/symbols/pc file automatically. It is useful when I want to switch between a Mac or Windows keyboard.   The one problem I've encountered is that I have to log out and then log back in after editing the file in order for the edited configuration to take effect.   I've tried deleting my xkb cache (/var/lib/xkb/*.xkm), but that did work.  Any help would be greatly appreciated. Cheers.


How Cooper did send a formula through the watch as Morse code in Interstellar?   There are no translations for the mathematical symbols she writes down on the board after getting the "formula" from the watch.

In Interstellar, after young Murph places the watch on the bookshelf in her bedroom, her father - in the same bedroom but from another dimension - moved the second hand and recorded data in a Morse-signal message on it. Many years later, the second hand still signals the message, grown-up Murph finds the watch and takes it with her to NASA and there she translates the message back into the data needed.  If we assume the watch had a long lasting battery, then I still see some problems with this plot:   From what we know from the explanation in the movie itself is that the only thing capable to travel from them in the 4th or 5th dimension to present Earth is gravity. Gravity is a vertical force on Earth. It pulled dust from the air to the floor in a barcode-like pattern. So how can it adjust the horizontal position of the second hand of the watch? Like a magnet? And how is a multiple of those movements of the second hand recorded on the watch? How does it play the message for all these years, again and again. Not only in Murph's bedroom, but still at NASA too?   Normally I would answer this myself by saying that it is film, it is science fiction, everything is possible, and there is no need to question things we cannot explain. But this movie certainly has the intention of being truthful to science, to explain what is going on and this particular director has a reputation of telling stories that in one way or another always has plausible explanations for plot-hole-like aspects.


I have install v4l2loopback and ffmpeg. I want to stream/redirect a video to my virtual camera. How do I achieve this?

I want to send video to webcam device on Ubuntu which is loaded on /dev/video0  I've already seen this command that send desktop to it but is there any way to send video to it?     ffmpeg -f x11grab -r 15 -s 1280x720 -i :0.0+0,0 -vcodec rawvideo   -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0   I should mention that i specifically want to use ffmpeg command.


I've seen several shots where an action sequence is halted and then the camera seemingly moves around while the action is frozen in place. An example of what I'm talking about can be seen in .  I've also seen this used in sports action replays, where the play gets frozen and then the shot transitions to another camera's view of the play.  How are such shots filmed?

I am always amazed by 3D still shots in which the action freezes and a character is able to walk around and the people are frozen like statues. How do they do that?  Some of the famous movies featuring 3D still shots:   The Matrix (1999) Clockstoppers (2002) circus scene in Big Fish (2003) Cashback (2006) The bar scene in The Other Guys (2010) Quicksilver scene in X-Men Apocalypse (2016)   The movie "Clockstoppers" completely revolved around this time stop effect.


A device, circuit, actuator or chemical structure which outputs a fixed voltage level is usually called with one of the following terms.   Voltage Source Voltage Supply Power Supply   Is there any technical difference between these terms or do they imply the same thing?

I am confused by the use of these three terms in conjugation with supplies.  I read somewhere that the prime objective of the circuit is to provide power rather than voltage? What exactly does that mean. Isn't \$Power = IV\$? So saying that you're supplying power rather than voltage is another way of saying supplying a large current. If so why not just say so. Why beat around the bush when saying a current supply is far more intuitive than a power supply?  So what does this cryptic sentence mean: "Supplying power to the load." Do they mean a large current or a large voltage?


How can we interchange union and intersection in   $$\bigcap_{\gamma < \kappa}[\bigcup_{n<\omega}I(\gamma,n)]$$

I found an interesting exercise of other amazing book (Jech's) that I'm not totally sure about how to do it.   Prove the following form of the distributive law:   $$\bigcap_{a\in A} \bigg(\, \bigcup_{b\in B} F_{a,b} \, \bigg) = \bigcup_{f\in ^AB} \bigg(\, \bigcap_{a \in A} F_{a,f(a)}\,\bigg) $$  Assuming that $F_{a,b_1} \cap F_{a,b_2} = \emptyset $ for each $a\in A$ and $b_1,b_2\in B$ and $b_1\not=b_2$.  First of all, I'm not completely sure about what $ F_{a,b}$ really means. I suppose that is  the range of a family with a domain $A \times B$.    And second, I cannot figure out how to do the converse (assuming that the first part it is correct, I used as normal in this kind of proof element chasing)  Proof:  ($\Rightarrow$) ...  ($\Leftarrow$) Suppose that $z\in \bigcup_{f\in ^AB} \big(\, \bigcap_{a \in A} F_{a,f(a)}\,\big)$; then there is $f\in \,^AB$ such that $z\in  \bigcap_{a \in A} F_{a,f(a)}\, $. Let $a \in A$ be arbitrary.   Claim 1 $\, \bigcap_{a \in A} F_{a,f(a)}\subseteq F_{a,f(a)} \subseteq \bigcup_{b\in B} F_{a,b}$.  Proof of the Claim 1:   For the first inclusion: Suppose $z\in\bigcap_{a \in A} F_{a,f(a)}$; then for each $a\in A$ we have that $z\in F_{a,f(a)}$. Then $\bigcap_{a \in A} F_{a,f(a)}\subseteq F_{a,f(a)}$.  For the second inclusion: Now suppose $z\in F_{a,f(a)}$. Clearly $f(a)\in B$ because $f\in ^AB$. Then there is some $b\in B$ such that  $z\in F_{a,b}$ and hence that $z\in \bigcup_{b\in B} F_{a,b}$. $\square$  Since $a$ was arbitrary it follows that $z\in \bigcup_{b\in B} F_{a,b}$ (by claim 1) for each $a\in A$ and hence  that $z\in \bigcap_{a\in A} \big(\, \bigcup_{b\in B} F_{a,b} \, \big)$ as desired.  I really, really would very much appreciate some help with that. Thanks in advance as usual.


I need help in writing this system in LaTeX:       EDIT: I need more help because I am still unable to use the provided solution. My system is:  \begin{empheq}[left=\empheqlbrace]{align} \begin{eqnarray}     \begin{rcases}     \frac{d\phi_{1}(t)}{dt}&= -\phi_{1}(t)-c_{1}\phi_{3}(t),\\     \frac{d\phi_{2}(t)}{dt}&= \alpha_{1}\phi_{3}(t)-(d_{1}+\mu_{1})\phi_{2}(t),\\ \nonumber     \frac{d\phi_{3}(t)}{dt}&= \mu_{1}\phi_{2}(t)-d_1 \phi_{3}(t)-c_{2}\phi_3(t) \tilde{z_2}(t),\\ \nonumber     \frac{d\phi_{4}(t)}{dt}&= \alpha_{2}\phi_{3}(t)\tilde{z_2}(t)-(d_2 + \mu_2) \phi_{4}(t),\\ \nonumber     \frac{d\phi_{5}(t)}{dt}&= \mu_{2}\phi_{4}(t)-d_{2}\phi_{5}(t),\\ \nonumber     \end{rcases} \end{eqnarray} \\ \begin{eqnarray}     \begin{rcases}             \phi_{1}(t^+)&=\phi_{1}(t),\nonumber \\             \phi_{2}(t^+)&=\phi_{2}(t),\nonumber \\             \phi_{3}(t^+)&=(1-\delta) \phi_{3}(t),\nonumber \\             \phi_{4}(t^+)&=\phi_{4}(t),\nonumber \\             \phi_{5}(t^+)&=\phi_{5}(t).\nonumber             \end{rcases} \end{eqnarray} \end{empheq}

Say I had;   \begin{equation}   \begin{cases}      x = 0 \\      y = 0 \\      z = 0     \end{cases}     \qquad \text{and} \qquad     \begin{cases}      x = a \\      y = a \\      z = b     \end{cases}   \end{equation}   How could I insert a brace ( } ) in the second 'cases' to say x and y are equal to a. (i.e. } = a ).   I hope this is clear, if not I can sketch it out - just let me know!  Thanks in advance!


I live in Vancouver on a working holiday visa, from Australia. I got a waiver form to go to the states, but just went for a day at the beginning of the year. This was the 90 day waiver and then "expired" in the beginning of April. I want to go to Seattle for the long weekend and Disneyland in July. Do I have to get a different visa? Or can I renew my visa waiver that was the 90 day one? If I renew it how?

I'm on a New Zealand passport.  From most US Embassy webpages:     The Visa Waiver Program (VWP) enables nationals of certain countries,   including Australia, New Zealand, and the U.K., to travel to the   United States for tourism or business for stays of 90 days or less   without obtaining a visa, if certain requirements are met. Under the   VWP, time spent in Canada, Mexico, and adjacent islands counts towards   the maximum of 90 days stay allowed under the program.   I'll be there on a 1-year working holiday visa starting when I arrive in Vancouver. I'm spending 3 days in Hawaii en route to Vancouver. This seems to imply that 90 days after landing in Hawaii, my time will be up and I won't be able to get back into the US, as my living in Canada will not reset the clock. What if after this time I want to say, pop across the border to Seattle? How can I restart the 90 days, without having to resort to say, flying to Japan and back just to reset it?