I realize this is probably a very simple question, but I have been researching it for literally days on end to no avail. Any help would be much appreciated.  My project structure looks like this:  src   |--Main.java   |--WebScrapper.java  out   |--Main.class   |--WebScrapper.java  lib   |--Jsoup   My WebScrapper.java file imports the Jsoup library utilities like this:   import java.io.IOException; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.select.Elements; import org.jsoup.nodes.Element;   I am using a Java library in my project on the InteliJ IDE. In the IDE I go to "Project Structure -> Modules -> Add Jars or Directories" and my program works by me selecting the "run" button in IntelliJ, however when I compile the Java code, and try to run it with "java Main.class" from the terminal, I get the following error:   Exception in thread "main" java.lang.NoClassDefFoundError: org/jsoup/Jsoup         at WebScrapper.returnPage(WebScrapper.java:12)         at Main.main(Main.java:19) Caused by: java.lang.ClassNotFoundException: org.jsoup.Jsoup         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)         at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)         at java.base/java.lang.ClassLoader.loadClass(Unknown Source)         ... 2 more   I know that this is a problem with the library and not my other class file, because when I changed the other class file to a simple System.out.printl statement, it works perfectly fine. How do I get this dependency to work in my project? Do I need to create a lib folder and do something? Or is it something else? I have browsed many other questions on stack overflow, and have seen solutions like cleaning the build, using a dependency management plugin like maven etc. However, rebuilding the project did not work and I would like to avoid using a dependency management system if possible, however if needed I will do so.   Thanks in advance, Michael

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


Whenever i use include() to load a php file, the £ (pound signs) are converted to the diamond question mark (what's the name for this btw?). The head has UTF-8 specified, and on the main pages everything works, but only on the includes is this happening. A simple fix for me would be to use the HTML codes to load these characters, but i'm more interested in WHY this is happening than trying to find a workaround.  Thanks.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


After upgrade from 16.04 to 18.04 there are different APT repositories disabled.  I see this via app "Stacer".  I can't delete this, and I can't find this when I check in folder:  ls /etc/apt/sources.list.d  So I am not sure how to delete.   I found also from google chrome, even if I never installed it.. pretty strange?  Check this:    The other question suggest to remove from Softare center, but in 18.04 I can't find it. And from source.list directory, the disabled APT is not there.

Please let me know how to remove certain repositories in Ubuntu 11.04. I am getting the following errors while updating.  sudo apt-get update  Err http://ppa.launchpad.net natty/main Sources                                      404  Not Found Err http://ppa.launchpad.net natty/main i386 Packages                                404  Not Found ......  E: Some index files failed to download. They have been ignored, or old ones used instead.


So, I was looking at this problem which asks to show that $x^2 + y^2 + z^2 = 2xyz $ where $ x,y,z \in \mathbf{N}$ has no solution. Viewing the equation as quadratic in $x$ and solving for $x$ gives $$ x = yz \pm \sqrt{y^2z^2-y^2-z^2} $$ From which we can conclude $x$ has integral solutions $\iff y^2z^2-y^2-z^2$ is a perfect square. How do I proceed from here to show that $y^2z^2-y^2-z^2$ can never be a perfect square?

I am working on some of these types of problems for fun, just want to see a couple solved as examples.


In this complex Fourier transform how is the i factored to the top of the fraction?

When I entered the value $$\frac{1}{i}$$ in my calculator, I received the answer as $-i$ whereas I was expecting the answer as $i^{-1}$. Even google calculator shows the same answer (Click  to check it out).  Is there a fault in my calculator or $\frac{1}{i}$ really equals $-i$? If it does then how?


I am using Sender.net for email subscription lists. This site give me some information to add user's emails to subscription list. I want to use WordPress ajax to for this. but it return error 400 bad request. My codes is:  File ajax-news-script.js:      jQuery(document).ready(function($){      // Perform AJAX send news on form submit     $('form#fnews').on('submit', function(e){          $('form#fnews #fsubmit').text(ajax_news_object.loadingmessage);         $.ajax({             type: 'POST',             dataType: 'json',             url: ajax_news_object.ajaxurl,             data: {                  'action': 'ajaxnews', //calls wp_ajax_nopriv_ajaxnews                 'email': $('form#fnews #femail').val(),                   'security': $('form#fnews #security').val() },              success: function(data){                 $('form#fnews #fsubmit').text(data.message);               }             });             e.preventDefault();         });     });   And in ajax-news.php file:      <?php  add_action( 'init', 'ajax_news_init' );  function ajax_news_init() {         global $rf_data;         wp_register_script( 'ajax-news-script', get_stylesheet_directory_uri() . '/js/ajax-news-script.js', array('jquery'), '1.0', true );         wp_enqueue_script( 'ajax-news-script' );          wp_localize_script( 'ajax-news-script', 'ajax_news_object', array(             'ajaxurl' => admin_url( 'admin-ajax.php' ),             'loadingmessage' => __( 'لطفا صبر کنید ...' )         ));          add_action( 'wp_ajax_nopriv_ajax_news', 'ajax_news' );         add_action( 'wp_ajax_ajax_news', 'ajax_news' );     }  // Check if users input information is valid     function ajax_news() {          global $rf_data;          // First check the nonce, if it fails the function will break         check_ajax_referer( 'ajax-news-nonce', 'security' );      $info = array();     $info['email'] = $_POST['email'];      $api_key = "my api key";     $list_id = my list id;     $url = 'https://app.sender.net/api';       $data = array(         "method" => "listSubscribe",         "params" => array(             "api_key" => $api_key,             "list_id" => $list_id,             "emails" => array($info['email'])          )     );  $options = array(     'http' => array(          'method' => 'POST',         'content' => http_build_query(array('data' => json_encode($data)))      ) );   $context = stream_context_create($options); $result = file_get_contents($url, false, $context); $response = json_decode($result);      if (!empty($response['success'])  ){             echo json_encode( array( 'send'=>true, 'message'=>__( 'Yes!' )));         } else {             echo json_encode( array( 'send'=>false, 'message'=>__( 'No!' ) ));         }         die();     }      ?>

I am attempting to create an AJAX call to pass custom taxonomy into my WP_Query but I am getting 400 (Bad Request). I believe my data array is built correctly so I am not sure what's causing it. Does anything look off here? Is there a way for me to get a more detailed error of why it is returning error 400?  $.ajax({     type:'POST',     url:ajaxUrl,     data: {         taxonomy: 'products',         slug: 'shirts'     },     beforeSend:function(xhr){      },     success:function(data){       $('#response').html(data); // insert data     } });   I console logged ajaxUrl and I am getting the correct path to admin-ajax.php so I know that's not the issue. I think it has to have something to do with data.


Everything was working fine just yesterday. Today I wanted to update and it failed with the following error:  Pakketlijsten worden ingelezen... Fout! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/repository.spotify.com_dists_stable_non-free_i18n_Translation-en E: De pakketlijsten of het statusbestand konden of niet ontleed, of niet geopend worden.   I got Dutch localisation, so I'll try to transate here.. (hopefully it makes sense..)   first line: Reading package list... error! Last line: The packagelist or the status file couldn't be parsed or opened.   Does someone know what happened and how I can correct this issue?

The computer gave me this output in a window:  E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages E: The package lists or status file could not be parsed or opened.   How can I fix this?


I have a text mesh in my scene. I don't want the test to show right when the scene starts . I want to text to show up in the scene five or ten seconds later on the screen and than the text disappear after five seconds.  I only got one error . Here is my script :  {       using UnityEngine;    using System.Collections;    using UnityEngine.UI;        public class oik : MonoBehaviour    {        private Text text;        public float timeShown;            void ShowMessage(string message, float timeToShow = 10)        {            StartCoroutine(ShowMessageCoroutine(message, timeToShow));        }                IEnumerator ShowMessageCoroutine(string message, float timeToShow = 10)        {            while (timeShown < timeToShow)            {                timeShown += Time.deltaTime;                yield return null;            }              text.text = " The Reqiure Score is 1700" ;        }    }     }

I know this question has been asked and asked but none of the topics i visited gave me an answer. I'm making a game programmed in c# where you control a boat and i want my UI to appear smoothly by fading in after X seconds. May someone help me?


I just finished the book of Lawrence Krauss "Universe from nothing" and he said that virtual particle can pop to existance from nothing by quantum fluctuations of the field from the vacuum and in the same way our universe can pop to existence, but my question is..  How this quantum fluctuations works? If the space-time began to exist with universe how can this quantum fluctuations generate universe? Doesn t them requer space-time in the first place?? The book doesn t answer that..  I dont get a answer also on Yahoo

In popular physics articles and even some physics classes I've been to, the vacuum of space is described as being constantly full of quantum fluctuations.  Supposedly, all sorts of particle-antiparticle pairs at all scales are constantly appearing and disappearing.  We end up with a mental image of the vacuum as a roiling, choppy sea with all sorts of things going on, rather than a calm, placid background.  However, the vacuum, being the lowest-energy state of a theory, should be an energy eigenstate—which means it is time-invariant (except for a physically-irrelevant phase factor).  So it seems the vacuum really should not be seen as a dynamic entity with all kinds of stuff happening in it, as we're led to believe.   that     A “vacuum fluctuation” is when the ground state of a system is measured in a basis that does not include the ground state; it’s merely a special case of a quantum fluctuation.   So it sounds as if the existence of vacuum fluctuations is contingent on measuring the vacuum—in particular, measuring something that doesn't commute with energy (such as, I guess, the value of a field at a point).  How much truth is there to the idea that vacuum fluctuations are constantly happening everywhere, all the time?  Is that really a useful way to think about it, or just a myth that has been propagated by popularizations of physics?


Yes , this question is little bit vague and any serious programmer would laugh about it ! Although java does not tell about the sizes it assigns to the varibles ,i mean it can give more memory or less memory depending on the situation( that way it is abstracted !)i know that stuff! but what i am asking is ,is there any technique that i can know about the runtime variable size ? i want to find the addresses of the variables too ! This question does not want any answers like ,see java docs it does not provide those functionality you have asked , i want some kind of hack to do this kind of stuff!

I have an application that reads a CSV file with piles of data rows.  I give the user a summary of the number of rows based on types of data, but I want to make sure that I don't read in too many rows of data and cause OutOfMemoryErrors.  Each row translates into an object.  Is there an easy way to find out the size of that object programmatically?  Is there a reference that defines how large primitive types and object references are for a VM?  Right now, I have code that says read up to 32,000 rows, but I'd also like to have code that says read as many rows as possible until I've used 32MB of memory.  Maybe that is a different question, but I'd still like to know.


I am trying to reconcile an apparent contradiction in the results of my regression against three independent variables  $X_1,X_2, X_3 $:  1) For each of the $X_i's$, I regressed  $Y|X_i $ and in every case,the slope coefficient $b_i$ in $Y= b_0+b_iX_i$ was negative.  2) When I regressed $Y|X_1, X_2, X_3 $, only two of the (non-constant, i.e., not including $b_0$ ) $b_i$ coefficients came out negative.  But don't we interpret these $b_i's$ to mean that a change in one unit in   in $X_i$ in $Y=b_0+b_1X_1+b_2X_2+b_3X_3$ , while holding other $X_i$ to be zero, leads to a change in $b_i$ units of output in $Y$, apparently contradicting 1) ?   Also, shouldn't the coefficients in $Y= b_0+ b_1X_1+ b_2X_2+ b_3X_3$ equal to Cov(Y,x_i) , or does this last require that the $X_i's$ are standardized ( so that we would have $b_0=0$, so that the standardized coefficients should all be negative in order to agree with the condition in 1)?  Thanks.

The coefficient of an explanatory variable in a multiple regression tells us the relationship of that explanatory variable with the dependent variable. All this, while 'controlling' for the other explanatory variables.  How I have viewed it so far:  While each coefficient is being calculated, the other variables are not taken into account, so I consider them to be ignored.   So am I right when I think that the terms 'controlled' and 'ignored' can be used interchangeably?


I use Ubuntu 16.04 and I get update problems after installing skype. When I try to install updates by using Software Updater, it stops and gives an      The package system is broken    error. And says:     Check if you are using third party repositories. If so disable them,   since they are a common source of problems. Furthermore run the   following command in a Terminal: apt-get install -f   I disable third party repositories and even remove mendeley from the list but the problem did not solved. I tried apt-get install -f command, it gives also problem and says:  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?   How can I solve this problem?

I get this error whenever I try to install programs using the terminal:  home@ubuntu:~$ apt-get install myunity 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?   Also I'm unable to install updates using the terminal.


How can I list all files that are older than "X"  hours using a python script or bash script in Centos7?  Many thx!

I have this command that I run every 24 hours currently.  find /var/www/html/audio -daystart -maxdepth 1 -mtime +1 -type f -name "*.mp3" -exec rm -f {} \;   I would like to run it every 1 hour and delete files that are older than 1 hour. Is this correct:  find /var/www/html/audio -daystart -maxdepth 1 -mtime **+0.04** -type f -name "*.mp3" -exec rm -f {} \;   I am not sure of my use of the decimal number??  Thanks for any corrections.  EDIT  OR could I just use -mmin 60? Is this correct?  EDIT2  I tried your test, good thing you suggested it. I got an empty result. I want all files OLDER than 60mins to be deleted! How can I do this?? Does my command actually do this?


In November we will be arriving at CDG in Paris from the US on Delta using a US passport.  We have 1 hour 20 minutes before our flight out of CDG to Prague on Air France.  Delta says this is enough time to connect but I am concerned about passport/immigration/customs issues.  Will we have to get our luggage or will it be checked through to the flight out?  Is 1 hour 20 minutes sufficient time to connect to our flight out?

I have a flight booking from San Jose, USA to Frankfurt, Germany. The itinerary has a transit through Charles de Gaulle, Paris. Since this will be my first stop in the Schengen Region, will I have to go through Passport control at Paris?   My concern is that my flight has a transit time of 90 minutes at CDG. Will this be enough to go through whatever administrative steps are required?  EDIT: I'm an Indian citizen with a Long-Term residence visa for Germany.


I use the OPL language for optimization and I’m writing some notes on Latex using "listings". I defined the language and the keywords, so far no problems. However I have a keyword “subject to” and a keyword “to SheetWrite” that I need to be colored differently. The problem is the word “to” that appears in both keywords. Is there a way to define two word keywords in listings or otherwise solve this problem?

I have this pgfplots code that I want to put in a lstlisting environment:  \pgfplotsset{    every axis x label/.append style = {       font = \small    },    every axis y label/.append style = {       font = \small,       rotate = -90,       xshift = 0.5em    } }   How can I convince the listings package that those strings like every axis x label have to be treated as identifiers? I don't like the idea of assigning the role of keyword to the single substrings every, axis, x, label.


What is the best way to verify that $$1+z+z^2+z^3+z^4=0$$ given $z=e^{2\pi i/5}$?  I tried using Euler's formula before substituting this in, but the work got messy real fast.

I have to prove the following statement.     $$1+\cos{2\pi\over5}+\cos{4\pi\over5}+\cos{6\pi\over5}+\cos{8\pi\over5}=0$$   I have tried to use the sum of angles formula for cosine, but didn't get to a point where I'd be able to show that it is equal to $0$.


I am using  to make the fonts in math mode match the roman fonts used in my text body. The “digits” environment in mathspec takes effect for all digits in the document. This means that digits that would normally use a font other than roman, such as those within URLs, also end up using this font, despite loading the mathspec command \setallmonofonts (which I had assumed would override \setmathfont).  \documentclass{article}  \usepackage{mathspec} \setmainfont{Book Antiqua} \setmathfont(Digits,Latin){Book Antiqua} \setallmonofonts{Courier New}  \usepackage[hidelinks]{hyperref}  \begin{document} Some text. Some figures: 123456789\\ \url{http://some.urlwithnumbers/123456789}  $$Some text in math mode. Some figures in math mode: 12345789$$  \end{document}     Is there a way of setting the font for only the digits that occur in math mode? I would like to keep my specified monospace font for digits within monospaced strings (and likewise with sans serif fonts, should I need to use them).

When I use mathspec's \setmathsfont and hyperref, and try to typeset a URL, most of the URL uses monospace, as it should. Good.  However, digits use the maths font. Anyone know how to fix this?  MWE  \documentclass{article} \usepackage{mathspec,fontspec,hyperref}  \setmathsfont(Digits){Minion Pro} \setmonofont{Source Code Pro}  \begin{document} \nolinkurl{abc123def} % same problem with \url{..} \end{document}   Output


Hi I am new so please be gentle. I have AP80R electric Piano with some keys which are intermittent. I have opened it up and it appears that the board has some signs of corrosion.  I have cleaned it and would appreciate next steps. Whether broken tracks can be repaired by applying conductive glue? how to identify where faults are?  I have attached a photo  Thank you  Pit

I've made a couple of PCBs which need the odd few 10 mil tracks, but are mostly 20/30 mil. Unfortunately the etching process isn't fantastic and there are numerous breaks in the traces, most of them small.  I've managed to convince solder lumps to go over the top of the smaller gaps, and have used components legs to bridge some of the larger ones. The solder lumps don't feel particularly reliable though, and there are some gaps which are too small and awkward to get a piece of wire across but too big to be bridged with just the iron.  Are there any standard ways to reliably fix up broken traces?  Update: Thanks for the suggestions everyone!  I found and tried out a silver conductive pen. As a first time user I found it difficult to dispense, and obviously I didn't use enough of it or mix it properly because it didn't even end up being conductive.  It seems like the main problem was that I was trying to use pieces of wire which are too short. I found some small gauge tinned wire and used longer lengths, running it over significant lengths of good track on either side of the fault. That makes it much easier to position, and you can tack them down one end at a time.


When I try to composite this with my cg object it doesn't work. After completing the tracking I have set the tracking scene, but the video behind doesn't works or shows while in render mode(cycles).    but as you can see it does shows the tracker point but both things doesn't composite.  This is my node setup in the compositor.

I tried to add a 3D object to a clip by following a youtube video. But clip doesn't show up in the render or in the compositing tab. It show up even in the camera view. I didn't change any settings. please help. Thank you.    And the  rendered images has only the cube in it like in the picture above.


I was reading the  class and feel confused by how the eidolon "heals"     A summoner can summon his eidolon in a ritual that takes 1 minute to perform. When summoned in this way, the eidolon's hit points are unchanged from the last time it was summoned. The only exception to this is if the eidolon was slain, in which case it returns with half its normal hit points. The eidolon does not heal naturally.   From the way I read this:   Eidolons never recover any HP from resting Eidolons do not regain HP when summoned or unsummoned unless they were killed Eidolons are resummoned with whatever HP they had remaining (provided it wasnt killed)   So my question is, is the only way to have it with full HP be the very first time its summoned or have it healed with magic?

This is a two part question.   Can summons benefit from ? Can  benefit from magical healing? This question treats normal and unchained summoners as equal unless there is a specific difference where it concerns healing.   I have looked at the  spell and it does not say that the monster summoned actually exists (for instance the eidolon specifically states that its an aspect of the creature and not the creature itself) or if its an aspect of a greater creature.  Reading cure light wounds it talks about what happens with living and undead, but nothing else is mentioned.


Is there any way to get the type(format) of the uploading file in java.?   iam able to upload the file of any format .now want to get the file type to be stored into database.  One more thing i dont have file_type field column in the upload form.Have file_type field column only in the database..please help me  thanks all..

How do you get a Media Type (MIME type) from a file using Java?  So far I've tried JMimeMagic & Mime-Util. The first gave me memory exceptions, the second doesn't close its streams properly. How would you probe the file to determine its actual type (not merely based on the extension)?


I want to take an image address from online and put the picture into my Stack Exchange answer.  I used to be able to paste the image URL and it would be uploaded to Imgur and inserted into my post.  Now I don't see how to do this any more.

In the old image uploader (which opened as dialog) there used to be "Upload from web/URL" option. Now in the new uploader embedded inside the editor, such option does not exist:        Can this please be added again? It's very useful when I prefer to not download the picture to my local device first.


I am planning to travel to Canada (Ottawa) from Mumbai. I have Canada immigrant visa (Permanent Residence). I haven't yet received the PR card, and my port of entry is Ottawa.  I have two options, 1. Travel to Ottawa via Toronto 2. Travel to Ottawa via London  I want to know whether I would require a transit visa for for 1st option? Because, I already have a Canadian immigrant visa!  Also, will I require a transit UK visa, if I select option 2? I checked the below website of UK govt.     Here it says the following exemption,     Exemptions      You don’t need a visa if you have one of the following:      a visa for Canada, New Zealand, Australia or the USA (this can be used   for travel to any country)   I believe in my case I don't require a transit visa. Can anyone confirm please?

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


today I was wondering why every sculpting app has the circle widget sticking to the surface normal and Blender does not, I find it to be a quite important visual aid  Retopoflow addon's widget does it already but, as far as I know, there is no sculpting plugin with a similar widget, and don't know if this functionality can be extracted from it being working modal. Is this sort of widget feature be even tackled by an addon (if it doesn't exist already)?  Blender it's already a really powerful tool for sculpting and 2.77 improvement are great, maybe it's just me feeling this need?

I found  in the threads from GSoC 2010 or 2011, but can't find it now in blender. Is there an option somewhere or an addon that project brush circle on top of the surface of your model?


The question is to give and example of Lebesgue measurable set but not Borel measurable.  I know there exists subset of Cantor set that is not Borel measurable, since the cardinality of all Borel sets in $[0,1]$ is $\aleph_1$ while the cardinality of the subsets of Cantor set (defined on $[0,1]$) is $\aleph_2$, so it must contains subsets that are non-Borel measurable.  The problem is, the "cardinality of all Borel sets in $[0,1]$ is $\aleph_1$" requires something that is beyond the scope of first-year graduate level real analysis course. I cannot prove it using what I learned.  Can anyone give another example? Thank you!

While reading David Williams's "", the following statement caught my fancy:     Every subset of $\mathbb{R}$ which we meet in everyday use is an element of Borel $\sigma$-algebra $\mathcal{B}$; and indeed it is difficult (but possible!) to find a subset of $\mathbb{R}$ constructed explicitly (without the Axiom of Choice) which is not in $\mathcal{B}$.   I am curious to see an example of such a subset.


<?php  include ($_SERVER['DOCUMENT_ROOT'].'/header.php'); include ($_SERVER['DOCUMENT_ROOT'].'/adtop.php'); if(mysql_num_rows($deals) > 0){      while($row = mysql_fetch_assoc($deals)){   echo '
';   echo '
'; echo $row['dealdesc']; echo '
'; } ?>   How do I limit $row['dealdesc'] to show a maximum of 200 characters and display a 'read more' button which, when clicked, will display the full length of $row['dealdesc']?

I am looking for a way to pull the first 100 characters from a string variable to put in another variable for printing.    Is there a function that can do this easily?  For example:  $string1 = "I am looking for a way to pull the first 100 characters from a string variable to put in another variable for printing."; $string2 = 100charfunction($string1); print $string2   To get:  I am looking for a way to pull the first 100 characters from a string vari


Can anyone explain me why this is possible ?. I understand that a is the same as &a[0] and for example i also understand that  *(a+1) is second a element and  i am able to use *((a+i)+j) techniques, but first time in my life i saw code like this and i am confused now. I know that output is fourth element of the a array. But can anyone explain me why this is possible ?  #include<iostream> int a[] = {1,2,3,4,5}; std::cout << (3)[a] << std::endl;

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


I'm trying to align this 2 minipage on the top, but it doesn't work.....Any body help?  \documentclass{article} \usepackage{tikz} \usepackage{graphicx}  \begin{document} \begin{minipage}[t]{0.3\textwidth} $2+2=4$ \end{minipage} \begin{minipage}[t]{0.3\textwidth} \begin{tikzpicture} \draw (0,0) circle (3cm); \end{tikzpicture} \end{minipage} \end{document}   It gives me this:   I want this:   How can I get this???

I would like to be able to align two minipage at the top, without worrying about what is in the minipage.  I am aware of the optional [t] parameter, but still have some confusion as to how this all works.  I tend to think of a minipage as a regular page in that whatever is placed on it starts at the top and fills the page going across and then down the page, but this does not appear to be the case.  In the MWE example below, I have color coded the sections for reference purposes.   The first case (black) works just as I would expect. The two minipages are aligned exactly as I want with the [t] specifier.  No question here.  The next case (red) only works if the inner minipage also has the [t] specifier. Why is that necessary?  I would have thought that any content would be placed at the top of this page, and since both the outer minipage had a [t] things should have aligned at the top. I would like to place a graphic in the second mini page, and still have the two aligned at the top.   The simple case (blue) of using \includegraphics directly does not result in the content being aligned at the top.  So, then I attempt to put this in a \parbox (green) and this too does not yield the desired results.  I also try to place the graphic inside an inner minipage (brown) and specify the [t] alignment, and even though this worked in the red section, it does not here.  The only difference between the red and brown being that the red section had text, whereas the brown section has a graphic.  I am aware of question regarding  which suggests to place \vspace{0pt} at the top of the minipage, and that does provide the desired alignment (cyan), but adds vertical space at the top.  So, my second question is why is the \vspace{0pt} necessary when a graphic is included, but not when it is text.  This appears to be a hack and wondering if there is a replacement for minipage that works better without having to worry about exactly what is in the minipage?  Also, why did wrapping the figure in a parbox (green) or another minipage (brown) not solve this problem?   Here is the MWE:  \documentclass{article} \usepackage[demo]{graphicx} \usepackage{lipsum} \usepackage{xcolor}  \begin{document} \section{This Works - Aligned at top as desired} \begin{minipage}[t]{0.6\linewidth}     \lipsum[1] \end{minipage} \hfill \begin{minipage}[t]{0.3\linewidth}     \lipsum[2] \end{minipage}  \color{red} \section{Why does inner mini page required the [t]?} \label{Minipage-in-minipage} \begin{minipage}[t]{0.6\linewidth}     \lipsum[3] \end{minipage} \hfill \begin{minipage}[t]{0.3\linewidth}     \begin{minipage}[t]{\linewidth}% Why is [t] required here         \lipsum[4]     \end{minipage} \end{minipage}  \color{blue} \section{Why are These not aligned at top?} \begin{minipage}[t]{0.6\linewidth}     \lipsum[3] \end{minipage} \hfill \begin{minipage}[t]{0.3\linewidth}     \includegraphics[width=\linewidth]{foo} \end{minipage}  \color{green} \section{Why are These not aligned at top?} \begin{minipage}[t]{0.6\linewidth}     \lipsum[3] \end{minipage} \hfill \begin{minipage}[t]{0.3\linewidth}     \parbox{\linewidth}{\includegraphics[width=\linewidth]{foo}} \end{minipage}  \newpage \color{brown} \section{Why does this not work with the [t] as it did in red section?} This worked fine in Section \ref{Minipage-in-minipage}  \begin{minipage}[t]{0.6\linewidth}     \lipsum[3] \end{minipage} \hfill \begin{minipage}[t]{0.3\linewidth}     \begin{minipage}[t]{\linewidth}% Even with [t] here, this does not work         \parbox{\linewidth}{\includegraphics[width=\linewidth]{foo}}     \end{minipage} \end{minipage}   \color{cyan} \section{Adding a \textbackslash{}vspace\{0pt\} works} \begin{minipage}[t]{0.6\linewidth}     \vspace{0pt}% Hack!! But does do the job     \lipsum[3] \end{minipage} \hfill \begin{minipage}[t]{0.3\linewidth}     \vspace{0pt}% Hack!! But does do the job     \begin{minipage}[t]{\linewidth}% Why is [t] required here         \parbox{\linewidth}{\includegraphics[width=\linewidth]{foo}}     \end{minipage} \end{minipage} \end{document}


$$\lim\limits_{n\to \infty}({2^n\over n!}+2) * {n^2+n\over 2n^2+1} $$ I know that $$lim_{n\to \infty}{n^2+n\over 2n^2+1} $$ is 0.5 and the limit to the first part is 0. Thus is the limit of the whole equation just 0?

Why is     $$\lim_{n \to \infty} \frac{2^n}{n!}=0\text{ ?}$$   Can we generalize it to any exponent $x \in \Bbb R$? This is to say, is     $$\lim_{n \to \infty} \frac{x^n}{n!}=0\text{ ?}$$     This is being repurposed in an effort to cut down on duplicates, see here: Coping with  duplicate questions.  and here: .


I have a domain.co and just bought domain.com and want to use SSL on it.  Having in mind this  for HTTP to HTTPS redirect:  <IfModule mod_rewrite.c>     RewriteEngine On     RewriteCond %{HTTPS} !=on     RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] </IfModule>   Once in place, will it automatically start redirecting all HTTP pages from domain.co to HTTPS pages on domain.com or I have to modify rule to something like this or similar?  <IfModule mod_rewrite.c>     RewriteEngine On     RewriteCond %{HTTPS} !=on     RewriteRule ^(.*)$ https://domain.com/$1 [R=301,L] </IfModule>

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 question regarding Base64.  "Why isn't the code 'hellooo=' a valid Base64 code?"  In which Stack Exchange site should I post such a question? Stack Overflow?

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


I have an HDHomeRun Connect DUO hooked up to an aerial mast to watch over the air television.  I'm trying to record TV shows in a more lightweight fashion than making an all-up installation of MythTV.  VLC has  but it is not quite complete.    The minimum working example of the CLI invocation of VLC that I am using is this:  /usr/bin/cvlc --network-caching=6666 --postproc-q=1 --sout-transcode-deinterlace --sout-transcode-threads=4 -vvv --no-repeat --no-loop http://192.168.0.27:5004/auto/v35.1 --sout='#transcode{vcodec=h264,vb=4096,acodec=mp3,ab=128,scale=1,channels=2}:std{access="file",mux="mp4",dst="CBSTest.mp4"}' --stop-time=60 vlc://quit   In this example I am invoking the headless version of VLC, using a nominal amount of caching due to the latency on my network, post-processing at the lowest intensity level, deinterlacing, using four threads to transcode, not looping or repeating, pull the stream from the box for ATSC channel 35.1, and transcode it to a basic MP4 container named CBSTest.mp4 with the run lasting 60 seconds and VLC then quitting.  During the test run, some errors were kicked back including:  [mpeg2video @ 0x7f653c027380] MPEG motion vector out of boundary (-8 480) [mpeg2video @ 0x7f653c027380] Warning MVs not available [mpeg2video @ 0x7f653c027380] concealing 120 DC, 120 AC, 120 MV errors in P frame [mpeg2video @ 0x7f653c027380] 00 motion_type at 108 21 [mpeg2video @ 0x7f653c027380] Invalid mb type in P-frame at 23 22 [mpeg2video @ 0x7f653c027380] Warning MVs not available [mpeg2video @ 0x7f653c027380] concealing 181 DC, 181 AC, 181 MV errors in P frame [mpeg2video @ 0x7f653c027380] 00 motion_type at 12 39 [mpeg2video @ 0x7f653c027380] Warning MVs not available [mpeg2video @ 0x7f653c027380] concealing 120 DC, 120 AC, 120 MV errors in P frame [00007f65480063b0] ts demux warning: discontinuity received 0xf instead of 0xe (pid=49)   Unless I am getting a lousy over the air signal are there any other settings to fiddle with for caching to prevent such problems?

UPDATE: The previous title for this question was "How To Specify Bitrate, Codec and Demultiplexing for VLC Video Capture or Recording."  I capture video from old TV tuner card - Pinnacle PCTV - using VLC. The video is from the Composite input and audio is from I guess the mixer or Line in. The command I use is:  vlc  v4l2:///dev/video0:normal=pal:width=720:height=576:input=1 :input-slave="alsa://hw:0,0"  In VLC, I have enabled the Advanced Controls toolbar, which allows me to record videos when I want to. However, these videos are uncompressed - very big and play only with VLC. Totem throws the "Could not demultiplex stream" error. I need to convert them using WinFF to reduce their size and make them playable with Totem and other software.  My question is whether I can configure the recording settings - the codecs and the bitrate, and also get the stream demultiplexed. If I pass any -sout parameter with command I get a "Segmentation fault". I use 64-bit Ubuntu 10.10.


I'm trying to add a glossary at the end of my thesis following the guide here:    So I've used:  \documentclass[12pt, a4paper, oneside, openright]{report} \usepackage[T1]{fontenc} \usepackage[ansinew,utf8,latin1]{inputenc} \usepackage[english]{babel} \usepackage{mathtools} \usepackage{float} \usepackage{graphicx} \usepackage{pdfpages} \usepackage{afterpage} \usepackage{enumerate} \usepackage{hyperref} \usepackage[acronym]{glossaries}  \makeglossaries  \newglossaryentry{latex} {         name=latex,         description={blablabla} } \newacronym{gcd}{FIRST}{blablabla} begin{document}  ....  \printglossary[type=\acronymtype] \printglossary[title= Acronyms and Glossary of Terms]  end{document}   without results. Moreover I'd like to have "Acronyms and Glossary of Terms as a numbered line in table of contents but if I add the option [toc] to  \usepackage[acronym][toc]{glossaries}   I obtain an error "missing \begin{document}".

\documentclass{report} \usepackage[acronym]{glossaries} \makeglossary \newacronym{svm}{SVM}{Support Vector Machine} \newacronym{wasn}{WASN}{Wireless Sensor Networks} \begin{document} \printglossaries \newpage using \gls{svm} blah blah \gls{wasn}blah blah.....\gls{svm} \end{document}   I am testing with above MWE. The acronyms are correctly displayed in the document body when compiled, but nothing gets printed where I need the List of Acronyms.  I am using TexMakerX as my IDE on Windows 7.  Once I compile the above code a .glo file is created but it is empty. I think this is the problem but I don't know why it is happening.


toLowerCase() converts the string to lowercase but when i use it in a logic it gives bizarre results. I can do the logic in some other way without even using toLowerCase() but please tell me what's wrong here  char gender = 'M'; System.out.println((gender+"").toLowerCase());          //prints "m" System.out.println((gender+"").toLowerCase()=="m");     //false  if ((gender+"").toLowerCase()=="m") {     System.out.println("if it went through loop"); }

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


Hey I have tried a regex for valid website url, which is as below  @"(?:[A-Za-z0-9-]+\.)+[A-Za-z0-9]{1,3}:\d{1,5}"   But it didn't work, I tried a lot as well which doesn't work.  I am looking for something which will validate some cases like incomplete url's   like   www.yahoo etc.,   more over it should allow all the domians and it should accept url's starts with http or just www.  Please let me know if there is any work around.

How can I check if a given string is a valid URL address?  My knowledge of regular expressions is basic and doesn't allow me to choose from the hundreds of regular expressions I've already seen on the web.


Is "least riskiest" stylistically correct? Can it be considered a double superlative? Would "safest" be a better choice?

I was over exaggerating while writing something for class and I wrote     Welcome to the most wildest show on earth.    Someone pointed out the most wildest and I was wondering if it was OK to use most with a word that ends in -est together.


I see this when I go to delete from the Photos app      "Deleting will remove the photos and videos on your device and also   any backups in your account"   "Cancel"/"Delete everywhere"   is there a way to delete from my device without deleting the backup on my Google+ account Nexus 4 Android 4.4.4

I've been looking all over for a proper explanation of how to delete photos from the device (nexus 5) to reclaim some space, while being sure that the pictures are still in the Google+ backup. Unfortunatley i have not found one, other than "wild claims" it works somehow, while other say it does not. Plus deleting photos via the Pictures app actually warns you (now?) that it will delete the backed up copies too. Do i have to delete them in the Gallery app?  I did delete some photos recently, and i was quite sure they ware still backed up (still showed up on the Google+ website) but looking now i see they are in the trash in the device.  Is there really no way to be able to know for sure if the pictures are backed up savely while i can delete them from the device?  Alternatively i'm also open for alternative solutions to this problem, or i just go back to the "good old copy and paste when plugging the phone".


I have an archive page that displays the number of articles published. Because there were so many, I ran a pagination script:  for 127.0.0.1/archive/2/?p=x&pp=y  where p is the page number and pp is number of articles to display per page.  The pagination looks like this:  Prev  1  2  3  4 ... 12   NEXT   with each item linking to p like x.  I also have the items per page setter: 25 | 50 | 100 (y).  Now I have a PHP script that fixes pp into a session variable. But I am worried about duplicate content (since incrementing pp values will be inclusive) and also content not getting indexed because its not in the pagination link. so in the example above, pages 5-11 will not be indexed.   Any ideas on how to fix this?

Please consider a list of items (forum comments, articles, shoes, doesn't matter) which are spread over multiple pages. Different sort orders are supported (by date, by popularity, by price, etc).  So, an URL might look like this (I use the query style here to simplify things):  /items?id=1234&page=42&sort=popularity  /items?id=1234&page=5&sort=date  Now, in terms of SEO, I think I should be worried about duplicate content. After all, each item appears at least as many times as there are sort orders.  I've seen Matt Cutts talking about the rel=canonical link tag, but he also said that the canonical page should have very similar content. But this is not the case here because page #1 in a non-canonical sort order might have completely different items than page #1 in the canonical sort order. For a given non-canonical page, there is no clear canonical page listing all the same items, so I think rel=canonical won't help here.  Then I thought about using the noindex meta tag on all pages with non-canonical sort order, and not using it on all pages with canonical sort order.  However, if I use that method, what will happen with backlinks that are going to non-canonical pages -- will they still spread their page rank juice, even though the first page googlebot (or any other crawler) is going to encounter is marked as "noindex"?  Can you please comment on my problem and what you think is the best solution?  If you think you have a better solution, please consider that 1) I do not want to use Javascript for this, 2) I do not want all the items to be on one page.  Thank you.


I want to present an "itemize" list as a tree. I.e, the current list is:     Root         Child 1   Child 2   Child 3      And I want it to look something like this (but with continuous lines):     Root      |      |-- Child 1      |-- Child 2      |-- Child 3   I know that there are packages for creating trees in pictures, but I want to keep it a simple list inside the text, just change its appearance. Is this possible?

I'm trying to make a simple directory tree representation in LaTeX. Something like:  spam  |  +-- ham  +-- eggs      |      +-- more spam      +-- dead parrots   The tree won't be that long (say, 10--15 entries or so), with three or so levels, and is a one-off thing. So, quick-and-dirty solutions are welcome. When recommending tikz, please note that I have almost no experience with it, so I'd appreciate a clean simple solution, even if it doesn't look quite perfect.   On Tex.SE tikz is almost like the jquery recurring joke on StackOverflow..    Edit: As per Thorsten's suggestion,  is a nice and easy-to-use solution. The example from above could be written as:  \usepackage{dirtree} ... \dirtree{% .1 spam. .2 ham. .2 eggs. .3 more spam. .3 dead parrots. }


I have search through the answer but could not get what i'd like to have. my table is as below.      No  |    Name            | Relation    1   | A                  | P 1   | B                  | GO 1   | C                  | JB  2   | AH                 | P 3   | TY                 | P 3   | DO                 | JB 3   | DO1                | JB              3   | DO2                | JB 3   | DO3                | JB 3   | DO4                | JB 3   | DO5                | GO 3   | DO6                | GO              3   | DO7                | GO 3   | DO8                | GO 3   | DO9                | GO 3   | DO10               | GO 4   | PA                 | P 4   | PA2                | GO 4   | PA3                | GO              4   | PA4                | GO 4   | PA5                | GO 4   | PA6                | GO 4   | PA7                | GO   Each No will have in Relation only one 'P', max 5 'JB' and max 6 'GO'.   I'd like to get below result.    No  | P    | JB1  | JB2 | JB3 | JB4 | JB5 | GO1 | GO2 |GO3 |GO4 |GO5 |GO6 | 1   | A    | C    | NULL| NULL| NULL| NULL| B   | NULL|NULL|NULL|NULL|NULL| 2   | AH   | NULL | NULL| NULL| NULL| NULL| NULL| NULL|NULL|NULL|NULL|NULL| 3   | TY   | DO   | DO1 | DO2 | DO3 | DO4 | DO5 | DO6 |DO7 |DO8 |DO9 |DO10| 4   | PA   | NULL |NULL |NULL |NULL |NULL | PA2 | PA3 |PA4 |PA5 |PA6 |PA7 |

I know about the PIVOT feature in SQL Server and I've read a few other questions and answers on here but I just can't seem to grasp it in order to do what I need. I'm trying to run some calculations and I have the following:  TABLE office_settings column office_id (bigint not null) column setting_value (NVARCHAR(500) NOT NULL)  office_id    setting_value -------------------------------------------- 4             0.2 4             0.2 4             2 4             3 5             0.2 5             0.2 5             2 5             3   I'd like to convert this using PIVOT (assuming that's the right tool for the job) to this, basically "grouping by" the office_id column, so:  office_id    value_1    value_2    value_3   value_4 ------------------------------------------------------     4         0.2         0.2         2         3     5         0.2         0.2         2         3   I should also mention that I need to CAST the setting_value column values to DECIMAL(4,2) in the process of this - in case that has any bearing on the T-SQL required to accomplish it.  Any ideas?


Every time I run a command I get this back.  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? christopher@christopher:~$   This didn't start happening until I changed my device name.

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


Practioners are used to defining lognormal distributions in terms of P90 and P10 cumulative density function values.  To utilize these esperts' input I need to be able to convert these P90/P10 values into parameters used in software which are mean and sigma.  How do I convert P90 and P10 lognormal CDF values into the distribution's mean and sigma values

I am trying to calculate a mean and standard deviation from 2 percentiles for a lognormal distribution.   I was successful in performing the calculation for a normal distribution using X = mean + sd * Z and solving for mean and sd.  I think I am missing an equation when I try to do the same thing for a lognormal distribution. I looked at  and trying to use ln(X) = mean + sd * Z but I'm getting confused whether the mean and sd in this case are for the normal distribution or the lognormal.  Which equations should I be using? and will I need more than 2 percentile to solve the calculations?


I'm trying here to write a test class for below apex class, I'm getting the below error when in the compilation:  Methods defined as TestMethod do not support Web service callouts   Test class:  @isTest Public  class testPricingSalesforceController{    @isTest static void testCallout() {        // Call method to test.         // This causes a fake response to be sent          //Test.setMock(PricingSalesforceController.class, new testPricingSalesforceController());          //Test.setMock(HttpCalloutMock.class, new YourHttpCalloutMockImpl());              // from the class that implements HttpCalloutMock.          String res = PricingSalesforceController.reqprice('CM','NSA','222Y16C',2);          //return res();         // Verify response received contains fake values                //System.assertEquals('Mock response', res);         // res=getbody();      } }   Apex class      Public class PricingSalesforceController {     @AuraEnabled         public static string reqprice(string famil,string idcom,string partno,integer qty){         HttpRequest req = new HttpRequest();          req.setEndpoint('https://www.goodmsl.com/sdsadd_/price.php?famille='+famil+'&idcompte='+idcom+'&ref='+partno+'&qt='+qty);          req.setMethod('GET');          // Specify the required user name and password to access the endpoint          // As well as the header and header information           String username = '000dwe000';          String password = '0000%';           Blob headerValue = Blob.valueOf(username + ':' + password);          String authorizationHeader = 'BASIC ' +          EncodingUtil.base64Encode(headerValue);          req.setHeader('Authorization', authorizationHeader);           // Create a new http object to send the request object          // A response object is generated as a result of the request         System.debug(req);          Http http = new Http();          HTTPResponse res = http.send(req);       //  String mapString = (res.getbody()).tostring();          System.debug(res.getbody());         // system.debug(mapString);          return  res.getbody();            //Map < String,             //Object > resultsMap = (Map < String, Object > ) JSON.deserializeUntyped(res.getBody());         //  system.debug('resultsMap-->' + resultsMap);             //return resultsMap;         }          }

I have been struggling with this error for a few days now. I get this error every time I try to run a test for a method that has an httpCallout. I followed the architecture from  , but to no avail. I thought it could be something I was messing up in my code, so I copied all three of the classes from the documentation, and I am still getting the error when I try to run the test. All of the classes are on Salesforce API 29. Has anyone run into this before?


Above one is the XML file. I need to get the value for the Google analytics from the above xml file   I need to get the output as      from the above xml. I have tried the following code but it's not showing any output Can you help me on this  Above one is the XML file. I need to get the value for the Google analytics from the above xml file  public class Xml {     public static void main(String[] args) throws SAXException, IOException, ParserConfigurationException, XPathExpressionException {         DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();         DocumentBuilder db = dbf.newDocumentBuilder();         Document document = db.parse(new FileInputStream(new File("C:\\Users\\VAMSIKRISHNA\\Desktop\\Apache Poi\\appConfig.plist")));          NodeList nodeList=document.getElementsByTagName("key");         NodeList nodeList1=document.getElementsByTagName("string");          for (int i=0; i < nodeList.getLength(); i++) {             for(int j=0;j<nodeList1.getLength();j++) {                 Node node = nodeList.item(i);                 Node node1=nodeList1.item(j);                 if (node.getNodeName()=="GA") {                     System.out.println("Nodename"+node1.getNodeName()+" : "+node1.getFirstChild().getTextContent().trim());                 }             }         }     } }

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 have the following set: A={1,2,3,4}    I need to count the number of total partially ordered relations on this set.    I've tried to brute force but I realized there are too many, I have also tried to count separately the reflexive relations and the transitive relations using combinatorics but it didn't work well.   How am I supposed to approach this question?

Suppose I have a set $A$ such that $A$ = $\{1, 2, 3, 4, 5\}$ (or $A$ = $\{1, 2, 3, 4\}$ or $A$ = $\{1, 2, 3\}$ or any other finite small set). How can I find the total number of partial order relations on such a set?    I'm trying to wrap my head around the concept, but I'm still not quite getting it. (My instructor talked about a Hasse diagram, but am I always to use those/would it make it way easier?) If anyone could explain this concept a bit more clearly than my notes, that would be very good!


My OS: Kubuntu 21.04 Non-LTS So, ever since August I've been using Ubuntu and my text editor of choice was gedit. But only just now, a problem occured. On the left side there is now a strange window saying "Documents". Any attempt to get rid of it just gets rid of the gedit window, and restarting gedit doesn't affect it. It's distracting and interfering with my severe astigmatism, so I can barely see what I'm writing because of it.

How do i disable this stupid side panel of gedit, that somehow appeared? There is nothing in the settings or plugins. Tried rm -r -f ~/.config/gedit as well, with no success. I don't have big screen and i find it totally useless and eating up what little free space for editing documents i have. See Screenshot


Me and my family is travelling from San Jose, Costa Rica to New Delhi (India) via following itinerary  San Jose (United Airlines) - Houston (United Airlines) - Frankfurt (Lufthansa) - New Delhi  We have 2 hrs transit at Frankfurt and we have a valid B1/B2 U.S. Visa. I called up German Embassy in San Jose and they said that you require a Airport Transit Visa but seeing in various forums and online on German embassy's website I see that though transit is required for Indian Citizens but an exception is there if you have a valid U.S. visa. I am not sure what type of U.S. Visa are they talking about here. Does my B1/B2 visa hold as an exception for transit in that rule?  I am not sure if I need to get the transit visas or not and feel that embassy guys just didn't listen to me properly before giving me a verdict of getting a Transit Visa.

Do I need an airport transit visa through Switzerland if I have no Schengen visa? Am traveling from Cairo to Moscow via Swiss Air


I am trying to import my vmdk to EC2 as a instance using S3 bucket I am using this syntax   ec2-user@ip-10-0-x-x ~$ ec2-import-instance disk1.vmdk -f VMDK -t m1.xlarge -a x86_64 -b import-raj -o XXXXXXACCESS KEY -w XXXXXXXSECRETKEY -O ACESSKEYXXXXXXX -W SECRETKEYXXXXXXXXXXXXXXXXX Requesting volume size: 90 GB   ERROR: Unable to create signed manifest URL. Bucket import-raj is not in us-east-1 region, it's in eu-west-1   Can you please provide me the exact syntax to be used

I've recently purchased a reserved EC2 micro instance on region eu-east-1e.  I am having trouble importing a virtual machine using ec2-api-tools:  ec2iin -t t2.micro "CentOS 7 x86_64-disk1.vmdk" -g my-launch-config -f VMDK -a x86_64 -p Linux  -b mybucket -o MYID -w MYSECRETKEY +A -s 10  -d importingMinimalCentos764VMDK --region us-east-1e --subnet mysubnetid   output:  Requesting volume size: 10 GB ERROR: Unable to create signed manifest URL. Cannot access/create bucket: mybucket : com.amazonaws.AmazonClientException : Unable to execute HTTP request: mybucket.s3.us-east-1e.amazonaws.com   Which makes sense since the address of my bucket is mybucket.s3.us-east-1.amazonaws.com, but if I choose that region then I get a different error:  Client.InvalidParameter: Subnet 'mysubnetid' is in the availability zone 'us-east-1e'. (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameter; Request ID: 6e6d886f-2932-42f8-b771-b99475371bc6)   If I keep the region us-east-1 and ommit the --subnet mysubnetid then I still got a problem, since apparently I cannot create a t2.micro on us-east-1:  Client.Unsupported: The requested configuration is currently not supported. Please check the documentation for supported  configurations. (Service: AmazonEC2; Status Code: 400; Error Code: Unsupported; Request ID: 91fe5c48-2a0e-45bc-90fb-d7a 581fc3780)   There is no way to create a bucket on us-east-1e region. It is not listed and the command line tool aws s3 mb s3://mybucket --region us-east-1e gives an error, region not found when I try.  How can I fix this? I just want to upload and convert my VMDK to launch the t2.micro I've reserved and I need a bucket on the same region for that! I suppose I can do it in another region, then crate an image, then move the image to my desired region. But will I be able to export any changes to that instance? (when I tried to export an image before I got an error like you can only export imported instances, that's why I am creating a VMDK VM and importing it: so I can export it later, anytime I want)


When you try to head to a page that doesn't exist on chat.SE, it gives you a 404 page, with something like:     We couldn't find the page you requested. We did, however, find some guys with an even more serious problem.      Try searching for a particular message   Browse the available rooms   Occasionally, messages or rooms may be removed for reasons of moderation: spam, off topic, abuse, etcetera.      If you feel something is missing that should be here, contact us.   And this image:    I can recognize Riker, Picard, and Worf in the image, wearing... snow hats?  What TNG episode is this from?

On the three Stack Overflow chat servers, the  page displays the following image:    Is it from an actual episode, or is it a 'shop?


I try to use $~n=2x+1~$ to prove it and $~n^2-1=4x(x+1)~$. I do not know how to prove it.  Really need help here.

Let $\gcd(b,6) = 1$. Prove that $b^2 \equiv 1 $ (mod 24).  Now I have that as $\gcd(b,6) = 1$, we know that  $3\nmid b $ and $2\nmid b$ (else the GCD would be 3 or 2 resp.)  So as $2\nmid b$, $b$ must be odd. Hence $b^2$ is also odd.  Then I'm not sure where to take it from here? Maybe I've gone down the wrong path to start with, and should be looking more along the lines of the Chinese Remainder Theorem? I'm not sure.


If we have a number line of numbers between say -3 and 3 (-3  -2  -1  0  1  2  3) and we multiply by a  factor $k$ then the positive values will become $k, 2k, 3k$ respectively with 0 remaining zero. If the same is done to the negative values we have $(k)(-1) , (k)(-2), (k)(-3)$ which are $-k, -2k, -3k$ respectively since the negative implies they are opposite sides of the $0$.  What I fail to understand is if I multiply by $(-1)$ to all the terms, the positives will become negative (by the additive inverse property of numbers). But how do the values of $(-1)(-1), (-2)(-1), (-3)(-1)$ become $1, 2, 3$? What is the intuition behind this?  I am doing this without knowing that the product of two negatives is positive.

Someone recently asked me why a negative $\times$ a negative is positive, and why a negative $\times$ a positive is negative, etc.  I went ahead and gave them a proof by contradiction like so:  Assume $(-x) \cdot (-y) = -xy$  Then divide both sides by $(-x)$ and you get $(-y) = y$  Since we have a contradiction, then our first assumption must be incorrect.  I'm guessing I did something wrong here. Since the conclusion of $(-x) \cdot (-y) = (xy)$ is hard to derive from what I wrote.  Is there a better way to explain this?  Is my proof incorrect?  Also, what would be an intuitive way to explain the negation concept, if there is one?


I'm searching a way to continue a for-loop until a string matches.  @SuppressWarnings("deprecation") public ItemStack[] loadSecoundtLaserInventory(){     ItemStack pan = new ItemStack(Material.STAINED_GLASS_PANE, 1, DyeColor.BLACK.getWoolData());     ItemMeta panmeta = pan.getItemMeta();     panmeta.setDisplayName("");     pan.setItemMeta(panmeta);     List<ItemStack> content = new ArrayList<ItemStack>();     content.add(pan);     //     for(String str : getConfig().getConfigurationSection("lasers").getKeys(false)){         if(!str.startsWith("2")){          }         String[] amounts = getConfig().getString("lasers." + str + "amount").split(";");         ItemStack is1 = new ItemStack(getConfig().getInt("lasers." + str + ".block-id"));         ItemMeta ismeta1 = is1.getItemMeta();         ismeta1.setLore(Arrays.asList(HiddenStringUtil.encodeString(str)));         ismeta1.setDisplayName(ChatColor.translateAlternateColorCodes('&', getConfig().getString("lasers." + str + ".dname-amount").replace("{amount}", amounts[0])));         ItemStack is2 = new ItemStack(getConfig().getInt("lasers." + str + ".block-id"));         ItemMeta ismeta2 = is2.getItemMeta();         ismeta2.setLore(Arrays.asList(HiddenStringUtil.encodeString(str)));         ismeta2.setDisplayName(ChatColor.translateAlternateColorCodes('&', getConfig().getString("lasers." + str + ".dname-amount").replace("{amount}", amounts[1])));         ItemStack is3 = new ItemStack(getConfig().getInt("lasers." + str + ".block-id"));         ItemMeta ismeta3 = is3.getItemMeta();         ismeta3.setLore(Arrays.asList(HiddenStringUtil.encodeString(str)));         ismeta3.setDisplayName(ChatColor.translateAlternateColorCodes('&', getConfig().getString("lasers." + str + ".dname-amount").replace("{amount}", amounts[2])));         is2.setItemMeta(ismeta2);         if(!content.contains(is1)){             content.add(is1);         }         if(content.size() == 2){             content.add(pan);             content.add(pan);         }         if(!content.contains(is2)){             content.add(is2);         }         if(content.size() == 5){             content.add(pan);             content.add(pan);         }         if(!content.contains(is3)){             content.add(is3);         }         if(content.size() == 8){             content.add(pan);             return content.stream().toArray(ItemStack[]::new);         }     }     return null; }   Basically the Strings i loop over is something like  1panda,2boom,3tnt.  The problem is when the string doesn't starts with 2, i want to continue to the next String. I cannot use the return statement, because it would stop the loop. Any other ideas?

Can anyone tell me the difference between break and continue statements?


I'm really struggling on this question.  I've thought about it for a long time now but I can't seem to figure it out.  I know I am supposed to use the Mean Value Theorem in $[0,h]$ with $h>0$ and use the Mean Value Theorem in $[h,0]$ with $h<0$.   Attempt: I applied the definition of mean value Theorem for both of these and get:  There exists c such that $f'(c)=f(h)-f(0)/h$.  There exists d such that $f'(d)=f(0)-f(h)/-h$.  $f'(c)$ clearly equals $f'(d)$, which implies c=d=0.  Thus f'(0) exists.  I'm not sure if this is correct, but how would I conclude it equals L?  I know that there is some theorem that $f\in C[a,b],  $  f is differentiable in [a,b).  Then if $\lim\limits_{x \to a+} \ f'(x)\in R$, then $L=f'(a)$.    I think then the fact given in the question that $\lim\limits_{x \to 0} \ f'(x)\ =L$, would imply that $f'(0)$ equals L from this theorem, and hence we are finished.  Is this correct?  I'm not sure if I did it correctly, but have given my best attempt.  Any help would be much welcomed.

Let $f$ be a real-valued function continuous on $[a,b]$ and differentiable on $(a,b)$. Suppose that $\lim_{x\rightarrow a}f'(x)$ exists. Then, prove that $f$ is differentiable at $a$ and $f'(a)=\lim_{x\rightarrow a}f'(x)$.    It seems like an easy example, but a little bit tricky. I'm not sure which theorems should be used in here.    ==============================================================  Using @David Mitra's advice and @Pete L. Clark's notes I tried to solve this proof. I want to know my proof is correct or not.  By MVT, for $h>0$ and $c_h \in (a,a+h)$ $$\frac{f(a+h)-f(a)}{h}=f'(c_h)$$ and $\lim_{h \rightarrow 0^+}c_h=a$.    Then $$\lim_{h \rightarrow 0^+}\frac{f(a+h)-f(a)}{h}=\lim_{h \rightarrow 0^+}f'(c_h)=\lim_{h \rightarrow 0^+}f'(a)$$   But that's enough? I think I should show something more, but don't know what it is.


I took complex analysis but I want to re-study it. When I took the class I studied the book written by stein( princeton series).  The book was quite good but the problems were too tough and I had no idea I was solving them in a right way.  I once read a intro. to the complex analysis by Silverman; the problems were not too hard but I think it lacks some rigor.  So anyone would recommend a very good book on the complex analysis? I would really appreciate it.

During this summer break, I want to use my time to broaden my knowledge of mathematics. I am a very motivated high school student searching for some challenging material to learn, and the two subjects I had in mind are complex analysis and probability theory.  For probability theory I already choose a book, but I am struggling a bit with finding the right complex analysis textbook. I already found two textbooks which seem pretty good to me:  by Sara Maad Sasane and  by Zill.  As to requirements for the book:   The textbook must not be too broad, since I only have 6 weeks to study intensively (yes, I know it's a challenge to study most of complex analysis in 6 weeks). The textbook must not require a lot of prerequisities other than knowledge of single variable calculus (not a course in proof writing) and must not be too rigourous (some pictures and intuitive explanations can come in handy).   I hope someone could give some advise as to if the books I found suit my needs, if someone has experience with those books or if someone knows a book other than the two I found which suit my needs better.  Thanks in advance.


Im new to Blender but have some experience with 3dsmax. In blender, when i select some polys and try to scale them, i have no control on the amount and especially relative axis on which the scale would happen, where as with 3ds max i could scale restricted to x, y, z or any combination of using the handy widget. Is there a way to replicate this, or to get any control over the scale ?  thanks,

I want to be able to lock my translation/scale operations to two axes at a time, say xy, xz or yz. It currently takes two operations (one for each axis).  Example, say for a cylinder, I would like to reduce the radius. I currently have to scale on the x axis first, then on the y axis, or I have to manually input the scale values in the object properties panel.  This option is easily accessible in 3dsmax via the axis constraints command bar. Or I can click the intersecting area between the 3d manipulator of the axes in question and move in that plane.


I played around with the WSL last year, but at the time it was not capable of running the neural network project that I wanted to try on it. Apparently had something to do with it having an outdated kernel or something of the sort.   Since then, there's been a lot of updates to the WSL. What are the limitations of running programs that works on Ubuntu on the WSL? Are they essentially equivalent? Is there some piece of information that I can use to determine this ahead of time?

As most of you know, in the Microsoft Store, there are . This means that on Windows I can emulate Ubuntu and have the Ubuntu command line directly on Windows.  The question is very easy: what can’t I do from the Ubuntu command line emulated in Windows that I can do on a proper Linux-based Ubuntu? Is it useful to download this Ubuntu application, install it, and work just with it instead of the real OS? Is it possible to install all the development libraries? Can I write (or not) device drivers? In other words: what are the limits?  What features of Ubuntu Linux-based are missing from Ubuntu-on-Windows?  New answers are welcome: I know that every software is always changing by improving characteristics and features!


Hi so i'm writing some code for class and this for Linear Regression. The values calculated by hand is a=1.7 and b=1.6 for the data you can see in the code.  I've tried separating different parts of the formula into different variables but the answer remains the same (1.6999999999999993).  import numpy as np   x=np.array([2,3,5,6])   y=np.array([4.5,7.2,9.2,11.5])   b=(np.sum((y-np.mean(y))*x))/(np.sum((x-np.mean(x))*x))   a=np.mean(y)-(b*(np.mean(x)))   print(a)    print(b)     The expected result is a=1.7 and b=1.6, but the output is a=1.6999999999999993.

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


I receive the following response when calling a GET to a WCF service using WebClient DownloadString:      <?xml version=\"1.0\" encoding=\"utf-8\"?><string>false</string>   How do I get only false from that?

Is there a simple method of parsing XML files in C#? If so, what?


so I've made made an addon for blender, tested it and installed it on the target computer. On the dev computer, the script still is just loaded into the scripting Worspace and executed. But now I've made some improvements. Do I have to uninstall the addon on the target system and install new version? Or can I just update the *.py files in the addon directory?

I've been developing Blender add-ons for a while now, and one thing that I've always struggled with is how to keep a single copy of the add-on so that I can make changes to the code and quickly test in Blender AND have it all under source control. I don't want my Git repository inside Blender's add-ons directory, as it can easily get deleted by Blender (via the remove add-on button), and it enforces a particular folder structure on the repository.  Currently, I mainly use an external text editor (Sublime text) to work on the add-on, and then zip it up and install when I want to test my changes. As you can imagine, this is slow and laborious, so I'd rather work in a way that allows me to simply reload the scripts and have everything work, but not have to copy changes from the Blender folder back to my source repo.  I'm sure this must be a solved problem, so could someone explain how I can set up my repository so that it's safe from accidental deletion, but can easily be reloaded in Blender.


I'm trying to disconnect my macbook from iCloud, as it's been creating major problems for me. I was told by an Apple Support employee that doing so is only recommended once you've backed up everything from your Mac somewhere, to ensure you don't lose any files - so my goal is to upload everything to Google Drive before turning iCloud off. The problem is, almost none of my projects are truly on my laptop - instead I mostly just have folders full of file names, which are placeholders for the real files that have been sucked into iCloud. This means I have to re-download everything to my computer before uploading it all to Google Drive. Another crucial piece of information is that I only have 1 GB of storage left on my macbook, which means I can't re-download any complete projects/folders at a time. So unfortunately my current method is downloading 1-5 files at a time, uploading these few things to Google Drive, deleting the copies from my laptop and trash... repeat (thousands of times). So, I was wondering if anyone could offer any alternative solutions - for example, is there a way to transfer files directly from iCloud to Google Drive without having to download them to my laptop first? I should probably mention that I've scoured my laptop for duplicated files and applications I no longer use, make sure to empty my trash regularly, etc (I also asked Apple Support to help me make sure I wasn't missing out on any other ways to maximize storage space). The most obvious culprit for my lack of space is the massive 150 GB iCloud folder on my laptop, which appears to contain duplicates of everything on my computer. I can't seem to do anything about it until I've disconnected from iCloud itself. (The reason for its existence in the first place is beyond me but that's beside the point I guess, lol)

I'm trying to disconnect my macbook from iCloud, as it's been creating some problems.  I was told by an Apple Support employee that doing so is only recommended once you've backed up everything from your Mac somewhere, to ensure you don't lose any files - so my goal is to upload everything to Google Drive before messing with my laptop's iCloud settings. The problem is, almost none of the projects that I want to back up to Google Drive are truly on my laptop - instead I mostly just have folders full of file names, which are placeholders for the real files that have been sucked into iCloud. This means I have to re-download everything to my computer before uploading it all to Google Drive. Another crucial piece of information is that I only have 1 GB of storage left on my macbook, which prevents me from re-downloading any complete projects/folders at a time. So unfortunately my current method is this: downloading 1-5 files at a time, uploading these few things to Google Drive, deleting the copies from my laptop and trash, repeat (thousands of times). So, I was wondering if anyone could offer any alternative methods for uploading stuff to Google Drive in this situation - for example, is there a way to transfer files directly from iCloud to Google Drive without having to download them to my laptop first? I should probably mention that I've scoured my laptop for duplicated files and applications I no longer use, make sure to empty my trash regularly, etc (I also asked Apple Support to help me make sure I wasn't missing out on any other ways to maximize storage space). The most obvious culprit of my lack of space is the massive 150 GB iCloud folder on my laptop, which appears to contain duplicates of everything on my computer. I can't seem to do anything about it until I've disconnected from iCloud itself (its reasons for existence are unclear to me in the first place...but that's beside the point lol).


I'm trying to change the background color in a range of a secondary worksheet, using a function. The code is this:   Function pintar(fila As String, colI As String, _                colF As String, celdai As Integer, _                celdaf As Integer, xColor As String) As String      Dim ci, cf, barra As String     Dim micolor As Long     Dim Re, Gr, Bl, fi As Integer      micolor = CLng("&H" + xColor)      Re = CInt(CLng("&h" + Left(xColor, 2)))     Gr = CInt(CLng("&h" + Mid(xColor, 3, 2)))     Bl = CInt(CLng("&h" + Right(xColor, 2)))       'Posiciones      ci = colI & fila     cf = colF & fila     barra = ci & ":" & cf     'Range     fi = CInt(fila)      On Error GoTo ups     Dim ws As Worksheet     Dim rng As Range     Set ws = Worksheets("cronograma")      With ws         Set rng = .Range(.Cells(fi, celdai), .Cells(fi, celdaf))     End With      rng.Interior.color = RGB(Re,Gr,Bl)      pintar = "OK"  ups:     MsgBox (CStr(Err.Number) + ": " + Err.Description)     pintar = "Error"  End Function   When I execute it, I get an runtime error 1004, on the rng.Interior.color = RGB(Re,Gr,Bl) line. Could you please help me with this?

Let's say that I create a Sub (not a function) whose mission in life is to take the active cell (i.e. Selection) and set an adjacent cell to some value.  This works fine.  When you try to convert that Sub to a Function and try to evaluate it from from spreadsheet (i.e. setting it's formula to "=MyFunction()")  Excel will bark at the fact that you are trying to affect the value of the non-active cell, and simply force the function to return #VALUE without touching the adjacent cell.  Is it possible to turn off this protective behavior?  If not, what's a good way to get around it?  I am looking for something a competent developer could accomplish over a 1-2 week period, if possible.  Regards, Alan.  Note: I am using 2002, so I would favor a solution that would work for that version.  Having that said, if future versions make this significantly easier, I'd like to know about it too.


If Kyle Reese was always John Connor's father:   Kyle pops out of nowhere, impregnates Sarah, dies, and then Kyle Reese is born, becomes a member of resistance and he is sent back in time. John Connor was always Kyle Reese's son.    But:   SkyNet sent the Terminator specifically to affect time, (prevent the leader of resistance from being born), and the resistance also sent someone, and they do affect the future: (delaying judgement day, improving SkyNet, killing a bunch of other Sarahs, etc.).   Was Kyle Reese always John Connor's father, or was there a timeline in which someone else fathered him?

The Terminator movies leave us with a sort of "chicken or the egg" problem.  Let's review some key facts   In 2029, Skynet sends a T-800 back to kill Sarah Connor In 2029, John Connor sends Kyle Reese back to 1984 to protect Sarah Connor In 1984, it is heavily implied (though I don't recall any explicit confirmation) that Kyle Reese impregnates Sarah Connor who later gives birth to John Connor. In the final battle, the Terminator is destroyed but one of his processors and hand survive. In 1995, it is revealed that Cyberdyne recovered/acquired the remnants and Miles Dyson is on his way to creating the first version of Skynet.    So, in this scenario, we are led to believe we are in a time loop. John sends Kyle -> Kyle fathers John and inadvertently leaves technology responsible for Skynet -> John sends Kyle... round and round we go.  But much like the chicken or the egg, someone had to have created Skynet before the time loop actually started. Has this ever been addressed?  Corollary: Who was John's father in this original timeline?


I am using HTML-encoded symbols like &mdash; or &amp; inside the meta description field. Will they be displayed properly by Google and other engines or should I correct the text to have only ASCII symbols?

Will Google's SERP show the ampersand (&) or the ampersand HTML entity &amp; in its snippet? Here is my description meta tag:  <meta content="Questions &amp; Answers" name="description"/>


I seem to have come across an unexpected bug. When using the multicolumn package to typeset Arabic text (polyglossia with XeLatex, MiKTeX, TeXworks on Windows 10), I encounter a problem. When Arabic is set as the main (or default) language, there is no problem. The text comes out correctly. But when English is the main language, and Arabic is just another language, the columns are mishandled, and instead of the correct order, they appear reversed in the output. Below is a minimal example:  \documentclass[a4paper]{article} \usepackage{multicol} \usepackage{polyglossia} \usepackage[hmargin=1cm, vmargin=1cm]{geometry} \setdefaultlanguage{english} \setotherlanguage{arabic} \newfontfamily\arabicfont[Script=Arabic]{Lateef}   \pagestyle{empty}  \begin{document} \begin{Arabic}  \begin{multicols}{3} \setlength\parskip{0pt} شنّت القوات العراقية هجوما على مطار مدينة الموصل، أحد أهم أهداف العملية  العسكرية لطرد مسلحي تنظيم الدولة الإسلامية من شطر المدينة الغربي.  كما  اقتحمت القوات معسكر الغزلاني القريب من المطار، والذي شهد اشتباكات عسكرية  عنيفة، بحسب وكالة أسوشيتد برس.  يشار إلى أن تنظيم الدولة قد دمّر بالفعل  ممر الطائرات، غير أن الاستيلاء على مثل هذا الموقع المهم من شأنه مساعدة  الجيش العراقي في السيطرة على الطرق المؤدية إلى المدينة.  واستعادت القوات العراقية والميليشيات الموالية لها الشطر الشرقي  للمدينة، الشهر الماضي.  ويقول مراسل بي بي سي، كوينتين سومرفيل، الذي  رافق القوات العراقية، إنهم وصلوا إلى محيط المطار.  وقال متحدث باسم  الجيش لفضائية "العراقية" إن غارات متزامنة يُجرى شنها على المطار وقاعدة  الغزلاني لـ "تشتيت" مسلحي تنظيم الدولة.  وكانت منشورات قد أُلقيت في وقت سابق، للتحذير من شنّ هجوم وشيك على غرب  المدينة، الذي يقول مسؤولون عسكريون إن شوارعه المتعرجة والضيقة قد تجعل  استعادة المنطقة مهمة صعبة. وعلى الرغم من أن غرب المدينة أصغر بقليل من  شرقها، إلا أنه أكثر كثافة ويضم مناطق يُنظر إليها باعتبارها مؤيدة لتنظيم  الدولة.  وأعربت الأمم المتحدة عن قلقها بشأن الأوضاع المعيشية للمدنيين  المحاصرين في المدينة، وسط تقارير عن أن عددهم قد يرتفع إلى 650 ألفا.   وفرّ بالفعل ما يربو على 160 ألف شخص من منازلهم داخل المدينة وحولها.    \end{multicols}  \end{Arabic} \end{document}   The text is adapted from a beautiful example of kashida / tatweel (). In the original example, Arabic is set as the main language, and the columns are correctly displayed in the output PDF. When Arabic is not the main language, however, the columns are incorrectly displayed, with the third column being the first column.  Any help would be greatly appreciated!

I'm trying to use LaTeX with RTL language. when I set columns count to 2, LaTeX use LTR direction as default.  I try to use \RLmulticolcolumns command but it does not work!  \documentclass{book}  \usepackage{setspace} \usepackage[margin={2cm,2cm}]{geometry} \usepackage{multicol} \usepackage{fontspec} \usepackage{polyglossia}  \setmainlanguage{english} \setotherlanguage{arabic}  \newfontfamily\arabicfont[Script=Arabic,Scale=1.6]{Geeza Pro} \setlength{\columnsep}{1.5cm}  \begin{document}  \RLmulticolcolumns  \begin{multicols}{2}   \begin{Arabic}  \setstretch{1.9}  some RTL text...  \end{Arabic}  \end{multicols}  \end{document}   Any help?


I think this is a simple question. When I build a new node and add some meta-tags on this node, this meta-tags appears normally when I access the node directly (http://www.example.com/node/<id>, for example).  But, when a add this node on a page, and access the url of the page, the meta-tags do not appears on page.  I am using Drupal 7.24 and metatags (quick) module.  Thanks  Update: It's not the same question as asked in  and found a solution for my problem.  I needed to change a configuration in a specific page. So, I went to: Content > Page > Selected the Content > Edit > Variants > Panel > Content. Clicked on gear (right side) > Configuration > Selected Show Full Content.

It doesn't seem I can get my meta tags to appear on the page--front.tpl.php on a Drupal 7 site.  I feel like I have all the correct settings in the Meta tags module configuration, and I have cleared all caches. It works perfectly fine for all pages, just not the front page. This is driving me bonkers.  Any ideas?


I want to add 30 days to today date and here how i tried Thanks in advance!  var date = new Date();     document.getElementById("demo").value = (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear();

How to add days to current Date using JavaScript. Does JavaScript have a built in function like .Net's AddDay?


I want to draw graph of the function abs(\x^3)-3*abs(\x) with pgfplots. I tried  \documentclass[12pt]{standalone} \usepackage{pgfplots} \usepackage{tikz} \usepgfplotslibrary{fillbetween} \usetikzlibrary{patterns} \pgfplotsset{compat=1.9} \usepackage{fouriernc} \begin{document} \begin{tikzpicture} \begin{axis} [ declare function={Y(\x)=abs(\x^3)-3*abs(\x);}, axis line style = very thick,     axis lines = center,     xlabel=$x$,ylabel=$y$,         domain=-2.2:2.2,         ymin=-2.5,         ymax=2.5,         xmin=-2.5,         xmax=2.5,     samples=100,xtick distance=1, ytick distance=2,unit vector ratio*=1 1 1,     width=11cm,     grid=major,     grid style={gray!30}] \addplot [black, ultra thick,name path =B] {Y(x)}; \addplot [black, mark=*,only marks,samples at={-2,-1,1,2}] {Y(x)}; \node at (axis cs:-0.25, -0.25) {$O$} ; \addplot[color=black,dashed] coordinates {(-2,0)         (-2,2)         (2,2) (2,0)          };          \addplot[color=black,dashed] coordinates {(-1,0)         (-1,-2) (1,-2) (1,0)         }; \end{axis} \end{tikzpicture} \end{document}    The graph is not continuous at (0,0).

I have the following code:  \begin{tikzpicture}     \begin{axis}    [         axis lines = {center},         width = {0.6\linewidth},         ylabel = {$y$},         xlabel = {$x$},         ytick distance = {2},         minor y tick num = {1}         ]      \addplot    [                 mark = none, domain= -3:4                 ]                 {abs(x)}; \end{axis} \end{tikzpicture}   That produces the following image, notice close to x=0that there's a strange "break" on the function's plot. What could be the cause? How do I get rid of that?    I noticed the problem also happens if I use a function with conditions say:  {x<0 ? -x+5 : x-2};  On the area near x=0 a weird break happens.


Before publishing a site I have bloat of unused CSS styles. Is there any good tool to detect unused CSS classes, divs?     Related Questions:

A bunch of CSS files were pulled in and now I'm trying to clean things up a bit. How can I efficiently identify unused CSS definitions in a whole project?


Do date-specific hats (such as "'Tis The Season") respect a user's timezone?  I'm guessing not since the only region specific info in the profile is the Location field

During Winter Bash, users can earn hats. But sometimes it seems that a hat was awarded even though its requirements weren't (yet) met, or vice versa.  What could be the reason for this?


I check the value of the object before access it; the class Coordinates have only 2 double parameters (so java primitives). How it could give me NullPointerException???? if(r==null) {     Log.d(TAG, "r is null");     continue; } else if(r.getCoordinates()==null) {     Log.d(TAG, "r.getCoordinates() is null");     continue; } else {     try {         if (r.getCoordinates().getLong() < 0) { //NullPointerException             continue;     } catch(Exception e){           Log.d(TAG, "r.getCoordinates().getLong() gives null "+r.getName());  //this print the r name     } }  It only happens in release mode (with proguard), in debug it is ok. Rules for proguard is -keep class it.mypackage.model.** {     public <fields>;     public <methods>; }  Coordinates and r type are class of model package

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 wanted to know that is there any method available in Java that can do this.Otherwise I may go for Regex solution. I have input string from user that can be any characters. And I want to check that the input string is according to my required date format or not.   As I have input 20130925 and my required format is dd/MM/yyyy so, for this case I should get false.  I don't want to convert this date I just want to check whether input string is according to required date format or not.   I have tried following   Date date = null; try { date = new SimpleDateFormat("dd/MM/yyyy").parse("20130925"); } catch (Exception ex) { // do something for invalid dateformat }   but my catch (Exception ex) block is unable to catch any exceptions generated by SimpleDateFormat.Parse();

I find it curious that the most obvious way to create Date objects in Java has been deprecated and appears to have been "substituted" with a not so obvious to use lenient calendar.  How do you check that a date, given as a combination of day, month, and year, is a valid date?  For instance, 2008-02-31 (as in yyyy-mm-dd) would be an invalid date.


I'm trying to create the following kind of URL:   www.example.com/state:ca/type:apartment,condo/price:0,20000/  or  www.example.com/state/ca/type/apartment/condo/price/0/20000  Is it better to not have ':' or ',' in the URL for SEO?

I'm working for a website to convert the website URL to an SEO friendly URL. I plan to use this:  example.com/category-name/pageid-123-page-name  I looked at some similarly categorized, highly ranked websites. They have the same structure, except for one thing. In one case, the URL format was  example.com/category-name/pageid-123-page-name.html  Another was   example.com/category-name/pageid-123-page-name.php  Now I know the text in URLs help with SEO. Is it more helpful to have a file extension? If yes, which one is better?  Or if my current plan is okay, will it be better with a / at the end?


I was looking at  and I noticed that it specifies the legal types we can always cast to:   byte* char* unsigned char*   But I did not see void* in the list. Is this an oversight? My use case requires a reinterpret_cast because I'm casting from an int** to a void*. And I will eventually cast from the void* back to an int**.

I am little confused with the applicability of reinterpret_cast vs static_cast. From what I have read the general rules are to use static cast when the types can be interpreted at compile time hence the word static. This is the cast the C++ compiler uses internally for implicit casts also.  reinterpret_casts are applicable in two scenarios:   convert integer types to pointer types and vice versa  convert one pointer type to another. The general idea I get is this is unportable and should be avoided.     Where I am a little confused is one usage which I need, I am calling C++ from C and the C code needs to hold on to the C++ object so basically it holds a void*. What cast should be used to convert between the void * and the Class type?  I have seen usage of both static_cast and reinterpret_cast? Though from what I have been reading it appears static is better as the cast can happen at compile time? Though it says to use reinterpret_cast to convert from one pointer type to another?


When I want to move sth or to scale an object, I can't move it just a little bit, it jumps to certain positions and I don't know why...

My cursor is moving by every selection by large increments!  Normally when I use Blender, I am able to select and move objects to any coordinate. Now, all of the sudden, when I select an object or mesh the selection moves by an inch or so in each direction.  How do I reset it to normal?


Whilst voting to close this question:    I received the following alert:     The app submitted invalid meta data. Please let us know in meta.    ... or something along those lines   App Version: 1.4.1 Device: iPhone 6 OS Version: Version 9.1 (Build 13B143)

I wanted to report  on Apple Stack Exchange as off topic, but when I tapped "flag" I get this error message:     I am using iOS 8.1.1 and the latest version of the Stack Exchange App (1.2.1)


On Amazon's RDS, you pay about $0.10 per 1 million I/O requests. I've noticed a very high number (in hundreds of thousands) of I/O requests for a very low traffic database. On seeing this, I did some further research, and found this question which describes that for a 6,000 user website, he was generating 800 million I/O requests a month, which would cost him about $80 / month.  Therefore, I want to know in advance how many I/O operations a MySQL query would generate, and how to optimize / minimize them. Is there any way to estimate how many I/O operations a query would perform, and any general rules I can follow to keep them as low as possible?

I have an InnoDB database that I'd like to migrate onto Amazon RDS.  My current implementation, hosted on my own server, shows roughly 8M queries per month.   say that  I/O Rate    $0.10 per 1 million requests  Does 1 I/O = 1 query?  ie, will I be billed $80/mo for this amount of usage + the RDS fees?


Is there a good software for browsing BibTeX databases? I have a .bib file with roughly 100 entries and it is becoming harder and harder to look up papers to cite. What I would like is something with a graphical interface that lists the entries in a more readable form. (I prefer open source software. :-)  Any suggestions?  User  pointed out there are similar questions  and . If people feel this question is redundant, feel free to delete it.

For my writing I am using MS Word and Zotero as bibliography manager. But now I think I am going to move to LaTeX on a  Linux box. I just toyed with Texmaker to generate my documents and it works fine so far. But I do not know how to manage my citations.  I found BibDesk and  with TexMate, but it's for Mac.   Are there any similar tools which I can use in Ubuntu ?


I setup a MySQL table using Collation latin1_swedish_ci. I have coded my PHP scripts in the UTF-8 character-set. It all worked out well until I discovered that a person entered their first name with a non-swedish character. The name Helén looked strange in the database but looked OK on the webpages.  My question is, can I simply change the Collation of my table from latin1_swedish_ci to UTF-8?  Will it actually cause any problems?

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.