In the "Introduction to Cryptography: With Coding Theory" by Trappe and Washington, in the chapter about DES algorithm the authors say that:     "If double encryption is equivalent to single encryption, then the   (single encryption) cryptosystem is much less secure than one might   guess initially"   The authors don't explain what this means and why. Are you able to tell me ?


Subsections dont show up in contents pane of pdf

I would like sub- and subsubsections to be listed in the contents pane of my pdf document, but only the sections are showing up.    Here's an MWE  \documentclass{amsart} \usepackage{lipsum} \usepackage{hyperref} \setcounter{tocdepth}{5} \begin{document} \tableofcontents \section{Section} \lipsum[1] \subsection{Subsection} \lipsum[1] \subsubsection{Subsubsection} \lipsum[1] \end{document}   which produces this:    I can click on the arrow to see the subsections, but I'd like them to show up without having to click.     Thanks for any help!


Execute a command once per line of piped input?

I want to run a java command once for every match of ls | grep pattern -. In this case, I think I could do find pattern -exec java MyProg '{}' \; but I'm curious about the general case - is there an easy way to say "run a command once for every line of standard input"? (In fish or bash.)


Unpairing a Bluetooth device when there is no “i”

I got a Tickr X heart rate monitor. It uses BTLE to interoperate with iPhone and Apple Watch. On the first day I got it, I paired it with my iPhone.  Then I decided to keep it paired with my Apple Watch instead, since that replaces the less-accurate optical heart rate monitor built into the watch.  But, it seems that my iPhone hijacks the Tickr before my Apple Watch can pair with it. When the iPhone shows “Connected” for the Tickr, the watch does not show the Tickr as a health device. When I turn off the iPhone Bluetooth, the Tickr appears on the Apple Watch.  So, to the best of my understanding, I need my iPhone to forget the Tickr and stop auto-connecting to it. But I can’t figure out how to unpair the Tickr from the iPhone — it is the only Bluetooth device that does not have the encircled “i”. How do I make the phone forget this device? Or am I misdiagnosing the situation?


Why question mark instead of text in PDO?

PHP 5.3.3  IF i try PDO i saw Russian text like "?????? ?????????"      $db = new PDO('mysql:host=' . $DBData['host'] . ';dbname=' . $DBData['base'] . ";charset=utf8;",          $DBData['user'], $DBData['pass'], array(         PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION,         PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,         PDO::ATTR_EMULATE_PREPARES   => false,         PDO::ATTR_PERSISTENT         => true     ));      $CONFIG = $db->query("SELECT * FROM `config`")->fetch();   If i try this i saw normal text:      $db = mysql_connect($DBData['host'], $DBData['user'], $DBData['pass']);     mysql_select_db($DBData['base'], $db);     mysql_query('SET NAMES utf8', $db);               mysql_query('SET CHARACTER SET utf8', $db);       mysql_query('SET COLLATION_CONNECTION="utf8"', $db);      $CONFIG = mysql_fetch_assoc( mysql_query("SELECT * FROM `config`") );   Why PDO didn`t work


Why does my object file show up as an orange dot?

I had imported a object file but I cannot see the object. It just show up a dot. I had tried to insert other object and it just showing a dot. Does anyone know how to solve this problem?


LWC - Replace Lightning-input of type file with a icon

<div>  <lightning-button-icon icon-name="utility:attach" type="file"></lightning-button-icon>    <lightning-input  onchange={insertFiles} type="file"></lightning-input>  </div>     How do I replace the upload files in the image with attach utility icon,which invokes the same JavaScript function?


Reading and saving the full HTML contents of a URL to a text file

Requirement:     To read HTML from any website say " ".      Print the retrived HTML      Save it to a text file on local machine .   Code:  import java.net.*;  import java.io.*;  public class oddless {     public static void main(String[] args) throws Exception {          URL oracle = new URL("http://www.fetagracollege.org");         BufferedReader in = new BufferedReader(new InputStreamReader(oracle.openStream()));          OutputStream os = new FileOutputStream("/Users/Rohan/new_sourcee.txt");           String inputLine;         while ((inputLine = in.readLine()) != null)             System.out.println(inputLine);         in.close();     } }   Code above retrieves the data, prints it on console and saves it to a text file but mostly it retrieves only half code (because of line space in html code). It does not save the code further.  Questions:     How can I save the full html code?      Are there any other alternatives?


So I have this command here. It's supposed to spawn a wither skeleton with a custom head and some gear.  Errors: "Data Parsing Failed: Unbalanced curly brackets"   Command:  /summon Skeleton ~0 ~1 ~0 {Equipment:[{id:iron_sword,tag:{Unbreakable:1,ench:[{id:19,lvl:2}, {id:16,lvl:1}]}},{},{},{},{id:skull,Damage:3, tag:SkullOwner:{Id:"5ee854b8-0f30-4ca6-8039-3c0cd74c7d42",Properties:{textures: [{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTk3ZjI4NmRmZTg3YzkyY2VhMjkyODgxNTcxZTgyNjEyNTg2NDM4Y2FiNWMwZjg0N2ZmZTBjOTFhYjlkYmUxIn19fQ=="}]}}}, CustomName:Golem,CustomNameVisible:1,Attributes:[{Name:generic.maxHealth,Base:30}, {Name:generic.movementSpeed,Base:0.7},{Name:generic.followRange,Base:40}, {Name:generic.knockbackResistance,Base:1}], ActiveEffects:[{Id:10,Amplifier:1,Duration:999999}],SkeletonType:1}


Best version if Ubuntu for Lenovo B50-70

I have a Lenovo B50-70 laptop with 1T HDD, 4gig Ram. Hoping to find the right release/version of Ubuntu. Long on Unix, short (zero) on Ubuntu experience, please be gentle. Any advice would be an advantage.  Thanks


Story about group of students trapped in fantasy world by their GM

I'm trying to find book series, which I read few years ago. As title states, it's about group of students playing board RPG and being trapped inside by their GM. Few points I recall:   The setting was typical medival fantasy with magic GM was their teacher One of players was on a wheelchair At the end they had own village.   EDIT  I've read these books no more than 10 years ago, and I think they were not new then. I know that doesn't say much, but that's all I can say. Some more details about history itself:   One of players played as dwarf (I think it was the disabled one) and didn't     really want to come back from there They managed to come back to real world at least once At least one of them died and has been ressurected   It turns out that this series was found . I've browsed related questions but didn't see it. Sorry for duplicate nonetheless.


What programs can I use to burn a Windwos 7 iso on a USB?

WinUSB keeps on freezing. Unetbootin doesn't work, and neither does Tuxboot. I'm running Ubuntu 12.04.


TV show that involves teens/kids going to another world

I remember from the show that the kids are live actors that are transported into another world where they use CGI for that side, or at least I think it is CGI. It is not Code Lyoko or ReBoot: The Guardian Code, but it is like those shows. Another thing I remember from the show is a red wheel on a pipe that I think has some importance in going to the other world.


How to activate iPhone with forgotten details

I brought my uncles old iPhone 4S and I've reset it, but now it's asking for his Apple ID and password and he can't remember it and he has lost his passcode. How can I activate the phone without the passcode?


What does it mean to differentiate in calculus?

I am able to complete the action, however, I am not sure what it really means in calculus to differentiate. I'm just curious as to why I have to to do this.


I am currently running Ubuntu MATE 18.04 on an ASUS x550A and recently read 18.10 has reached EOL, does this mean I need to upgrade and if so to what do I upgrade? I ran Software Upgrader and the System Monitor > System tab still shows 18.04.2  Any help and advice will be really appreciated as I am very much the novice. Hal.


Why did Walt have to teach high school chemistry?

We are given some explanation as to why Walt quit Gray Matter and thereby forfeited his opportunity to make billions (tl; dw --- personal issues with the co-founders).   But is it ever explained why he is teaching chemistry in a high school? Walt is obviously a talented chemist. I am not familiar with the job market for chemists but it seems that he obviously has better job opportunities (e.g. chemistry professor at any university, research scientist, work at a pharmaceutical lab). The pay is paltry and he doesn't seem to take great pleasure out of teaching high school kids. So why does he teach at a high school?  Quote from :     I am an extremely overqualified high school chemistry teacher. When I   can work, I make $43,700 per year. I have watched all of my colleagues   and friends surpass me in every way imaginable


Finding $\int \frac{dx}{a+b \cos x}$ without Weierstrass substitution.

I saw somewhere on Math Stack that there was a way of finding integrals in the form $$\int \frac{dx}{a+b \cos x}$$ without using Weierstrass substitution, which is the usual technique.   When $a,b=1$ we can just multiply the numerator and denominator by $1-\cos x$ and that solves the problem nicely.   But I remember that the technique I saw was a nice way of evaluating these even when $a,b\neq 1$.


How can I tell, how well my graphics card performs on Ubuntu?

I have a pretty beefy graphics card with 4GB of memory etc. But I can see the YouTube videos stutter sometimes and have a poor framerate (although none get dropped).  I feel like with a decent graphics card this shouldn't happen. Is there a way to make sure the gpu I have works properly?  Edit: I'm confident, that the internet connection is not the problem, since the "video stats for nerds" of the videos I am looking at show 0 dropped frames and perfect buffer health.  Edit2: XUbuntu 16.04  $ lshw *-display              Beschreibung: VGA compatible controller              Produkt: NVIDIA Corporation              Hersteller: NVIDIA Corporation              Physische ID: 0              Bus-Informationen: pci@0000:65:00.0              Version: a1              Breite: 64 bits              Takt: 33MHz              Fähigkeiten: pm msi pciexpress vga_controller bus_master cap_list rom              Konfiguration: driver=nouveau latency=0              Ressourcen: irq:43 memory:d7000000-d7ffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:b000(Größe=128) memory:c0000-dffff


Deleting comments under posts in the mod queue should be easier

Ever since mods gained the ability to undelete comments, deleting them has become easier as the confirmation dialog was removed.  However, this is not the case in the mod queue — I still get a confirmation dialog for each comment I want to delete in the queue under a custom-flagged post (single-comment flags can be deleted just fine). And since this is the place from where I delete comments the most, it can be annoying.  In addition, the "purge comments" button, when invoked from the queue, refreshes it, so I have to scroll back down, remember which post I just purged, and mark the flag as helpful. Usually not a big issue but if there are multiple "obsolete comments" flags, then it can get confusing.  Could the workflow for comment thread moderation from within the queue be improved? Ideally, make comment deletion work like everywhere else on the site, and make the purge button AJAX-based like the comment deletes.


Show that $a \star b=a \cdot b+a+b$ is binary operation for the group $\Bbb{ Q} \setminus \{-1\}$

The group $\left(\Bbb{ Q}\setminus\{-1\},\star\right)$ has as its underlying set the rational numbers different from $-1$ and the operation $\star$ is defined as $a \star b=a \cdot b+a+b$ where multiplication/addition are the usual operations with rational numbers.Show that this is a binary operation.  What I did (Please help verify):  identity element has to be 0 since $a\star 0 = a+0+a(0)$ so for $a\star b=0$ we have  $ab+a+b=0$ $$ab+a=-b \\ a(b+1)=-b \\ a=\frac{-b}{b+1}$$ so $b$ cant be $-1$ since that solution is not in $\Bbb{Q}$. Similar question might have been answered here. Is this operation true for all groups? I think so.  Thanks for the tips and help.


Outlook scales the dialog boxes wrong so the controls aren't all visible

On my Windows 7 laptop Outlook 2010's settings dialogs are sized wrong so I can't use them. Here's what it looks like when trying to set up or change email account settings.    I tried changing the font scaling in Windows. (Right-click desktop, Properties, Display in the left sidebar) It was set to Smaller 100% so I changed it to Medium 125% (default). Logged off and back on and it made the problem even worse. The dialog boxes got a LOT bigger and the controls were scaled even farther off the edge of the dialog. In the Change Account dialog the Test Account area wasn't even visible, the text boxes for name and email address ran all the way out the right side of the form.  Any ideas of how to fix this short of reinstalling Windows 7 or accepting Microsoft annoying nagging to upgrade to Windows 10?  My email provider recently changed from non-secure email to secure email. In order to fix it I have to click the off-screen Advanced button below the Text Account check box to get to the advanced settings. Then I have to change the dropdown boxes off the right side of the advanced tab. I can't see what they are so it's just a guess how I set them if I blindly use the arrow keys to change them. Makes it hard to complain to the email host and tell them I know for sure I have it set correctly when I can't ever be sure I set it correctly.


MTG: creature and enchantment triggered to opposite effects

The situation is my  has been enchanted with .  The creature has      when it dies, return it to his owner’s hand   The enchantment says     When enchanted creature dies, return that card to the battlefield under your control with a +1/+1 counter on it.   Who gets the creature? Me or my rival?  Does the creature ability trigger before or after enchantment?


Can you apply for an Indian e-Visa if you have already have a valid Indian visa in your passport?

I am currently traveling out of India but coming back soon. I will have some days left in my current visa by the time I come back, but I will need more time there. I can have enough time if I enter with a new electronic visa (2 months) but I am not sure if I can apply for one if I have one regular tourist visa still valid?


Can unprovability unprovable? Is there an $\omega$-fold unprovability?

I was just thinking about unprovability. I just wanted to know if it is possible to make a concrete boundary between provable problems and unprovable problems in a certain axiomatic system.   We know that there is a statement that is true yet unprovable. Then is it possible that a statement is true and unprovable, but the unprovability is unprovable?  We can extend it to a question of "unprovability of unprovability of unprovability", or any finite number of times, or even $\omega$ times....  I have no clue. Has there been any research on this kind of topic?


I'm writing a program in C to add random numbers to an array. The size of the array is given (say n = 250) and using rand(), I'm generating these numbers (range is 1 to 100).  int main() {     int n = 250;     int array[n];     for (int i = 0; i < n; i++)     {         srand(time(NULL));         int r = rand()%100 + 1;         array[i] = r;     }     printf("Output Size: %lu\n", sizeof(array));      return 0; }   When I run the code, the result is- Output Size: 1000  Expected result is 250. What am I doing wrong?


Why does the group need --x permission on the parent directory?

I was trying to get the user nagios to have access a sub directory in another users home directory /home/alert/NagiosAlerts/.  I was going crazy setting permissions that should have been to high to get this work work (777 type stuff for testing) but was still getting permission denied doing simple touch tests. Started writing up a question here to ask and got linked to  which had the following in its answer:     The directory needs to be searchable to allow users to enter it or its subdirectory "project"   So that is what fixed my issue me as well. I change the group of the folder /home/alert and set the group permissions to --x and I am now able create files in /home/alert/NagiosAlerts/.  Why did I have to assign those rights in the parent directory /home/alert? I would have figured the rights in /home/alert/NagiosAlerts would have been fine?  If I touch /home/alert/NagiosAlert/file should it only matter about the permissions on NagiosAlert? Why would alert matter?


Bringing bitcoin into US, what taxes should I expect?

My friend owns roughly $1M USD worth of Bitcoin. These coins are sitting on a (backed up and encrypted) hard drive in Brasil. He bought these coins legitimately, and has the paper trail to prove it.   He recently moved to the US, and now wants to get his coins and liquidate them.  I've been doing research on this topic, and I am unsure what kinda of taxes he will have to pay on these coins.  I've seen articles talking about capital gains tax from buying / selling coin, but he is not trading them in the US.  My thoughts lead me to think that this would be similar to him bringing over a ton of gold or other assets, and selling them off here, which makes me think of paying a sales tax.  As Bitcoin is still a newer development in the tax world, I am struggling to find any documentation on steps for this, so any feedback / options would be great.


Why do X-wings change wing configuration?

The X-wing fighters can change their wing configuration, from the X shape during battle to flat wings (the wings on the same side fold together) during FTL travel.  I'm guessing that the real world explanation is something like, "it looks cool". But what is the in-universe explanation?  There is no (little) resistance in space, so wing configuration wouldn't make that much difference. I can't see it making much change to performance, e.g. in angular momentum, either.


How to bypass node_access when using EntityFieldQuery?

With the following code, if the current user does not have 'bypass node access' (see  for exact verifications), then the query checks for node_access, even though I do not use the "node_access" tag.  How can I avoid the node_access check with the following query for a non-admin user?   I'm using this code from a module, so I can verify permissions myself, no need for node_access checks.    $query = new EntityFieldQuery;   $result = $query     ->entityCondition('entity_type', 'node')     ->entityCondition('bundle', 'foo')     ->fieldCondition('custom_id', 'value', $custom_id)     ->execute();


Maximum value of any three functions, say f(x), g(x), h(x) ,.

Since there is a strong result that follows for any two functions say f(x) and g(x) , i.e $$\max [f,g] (x)=\dfrac {f(x)+g(x)}{2}+ \dfrac{|f(x)-g(x)|}{2},$$ $$\min [f,g] (x)=\dfrac {f(x)+g(x)}{2}- \dfrac{|f(x)-g(x)|}{2}.$$ How can we derive a similar result by extending it for any three functions ? Do any general result exist ? Any help would be highly appreciated. Thanks in advance .!


I want to sort dictionary list alphabetically by key for example : mylist = [{'name': 'joe', 'age': '23' '}, {' name ':' max ',' age ':' 16 ''}, {'name': 'bella', 'age': '19' '}] I want to sort this dictionary in alpahbetic order relative to the value of 'name', which gives: mylist = [{'name': 'bella', 'age': '19' '}, {' name ':' joe ',' age ':' 23 ''}, {'name': 'max', 'age': '16' '}] ps : I have python 2 help please !


Why would one add a constant to hashCode()?

I'm new to Java, and I've recently learned about hashCode(). On , there is the following example of a hashCode() method:   public class Employee {     int        employeeId;     String     name;     Department dept;      // other methods would be in here      @Override     public int hashCode() {         int hash = 1;         hash = hash * 17 + employeeId;         hash = hash * 31 + name.hashCode();         hash = hash * 13 + (dept == null ? 0 : dept.hashCode());         return hash;     } }   I understand that multiplying by 31 and 13 decreases the chance of collision, but I don't see why hash is initialized to 1 rather than to employeeId. In the end this simply has the effect of adding 17*31*13 to the hashCode(), which is not going to change whether two hashCode() values are equal or not.  Bloch's "Effective Java (Second Edition)" has a very similar example in Item 9 (pages 47 and 48), but his explanation of this additive constant is quite mysterious to me.  Edit: This question was marked as a duplicate of the question  That question is not the same: it is asking whether there is any reason to prefer the number 31 to any other number in the formula for the hashCode() of a String. My question is why it is the case that in many examples of hashCode() which I have found online there is a single constant added to the hashCode() of all objects.   In fact, the example of hashCode() of a String is relevant here, because in that example there is no constant added. If adding 17*31*13 has any effect in the example I gave above, why not add such a constant when computing hashCode() of a String?


What special powers did the Dwarf rings give their users?

I think it's fairly well explained what powers were given to the One Ring, Elves, and Humans, but the dwarf rings are little explained in the series. Why were these rings important, or what kinds of powers did they give?


hi I have this codes in HTML

   .box have 10 line inner text  the CSS of .box is  .box{     width:200px;     height: initial;     overflow: auto;     min-height: 20px; }   I want to get height of .box , I use this  $('.box').css('height');    but giv me 0px  the up codes are the sample for you better understand  the real codes of my element

this is a p tag

   css   .proSliderText{     position: absolute;     top:50%;     left:50%;     margin-left:-15%;     min-height: 40px;     margin-top: -40px;     width:20%;     font-size: 4vw;     height: initial; }   parent tag CSS       .proSlider li{     list-style-type: none;     position: absolute;     top:0;     left:0;     background-size: cover;     background-position: center;     background-repeat: no-repeat; }


Add the "Featured" posts section in the Stack Exchange Android app

Can the Featured posts section be added to the Android app?  I think it would be a good option to make it available.


Why are GND pads often only connected by four traces?

I have seen this everywhere but cannot figure out why it would make sense to essentially compromise the quality of the ground connection. Is this done for visual reasons?  Here is an example:


how to replace multiple characters in a single string using php

I want to import CSV file data into MySql using PHP.I got the code to do this. The data in CSV may contain single quotes and commas within it.I used str_replace to fix the issue.It replaces only one of the characters.But I want to replace both.    example:  Broad Oak Road, Accrington, Lancashire, BB5 2AW United Kingdom.  Road King's College Aberdeen   I have used str_replace("'","\'",$csv_array[0]) to replace single quotes.Is there any way to replace both using a single PHP function? Please help me.Thanks in advance.


I would like to generate author citations in my text, and I have been following the information in . I've got my includes \usepackage[numbers,                         sort&compress                         ]{natbib}       % Sort numerical keys for multiple cites  \section{Example Chapter}  ~\citeauthor{born_population_2003} ~\cite{born_population_2003}  I've got my bib file (with standard citations being referenced correctly) @article{born_population_2003,         title = {Population substructure of North Atlantic minke whales (Balaenoptera acutorostrata) inferred from regional variation of elemental and stable isotopic signatures in tissues},         volume = {43},         issn = {09247963},         url = {http://linkinghub.elsevier.com/retrieve/pii/S092479630300085X},         doi = {10.1016/S0924-7963(03)00085-X},         number = {1-2},         urldate = {2013-08-28},         journal = {Journal of Marine Systems},         author = {Born, {E.W.} and Outridge, P. and Riget, {F.F.} and Hobson, {K.A.} and Dietz, R. and Øien, N. and Haug, T.},         month = sep,         year = {2003},         pages = {1--17},         file = {born2003_1-s2.0-S092479630300085X-main.pdf:/home/ryan/.mozilla/firefox/hauwprbq.default/zotero/storage/PMNU4J6G/born2003_1-s2.0-S092479630300085X-main.pdf:application/pdf}         }  But I'm not sure how I should check the compilation part. I'm using a template provided by my university, which is using a Makefile, which uses latexmk to compile the document default:         #latexmk -jobname=$(builddir) -pdfdvi thesis.tex         latexmk -pdfdvi thesis.tex  The output I'm getting looks like this  Is this some issue with latexmk?


What I am asking here is to please remove the privilege to participate in Meta for MSE.  This privilege is literally useless. You can't really have a meta site for a meta site. There's no Meta.Meta.SE here or any other SE site out there: Meta.SE covers for every site in SE, including itself.     When users find out that you don't really get anything new, it's kinda sad for those people. There is no use for it except just to be there and fill up the space between the first and third privilege. Privileges should be shown only if you earn something new, and this privilege to participate in the meta isn't new because it's where you report problems in all of SE, including Meta.SE.    So please remove the privilege to participate in meta just for Meta.SE.    This is not a dupe as this is a feature-request to remove it, not support on why it is there.


I am a bit confused on what this question is asking me to prove:  Prove $$ \exists z\forall x\in\mathbb{R}^{+}[\exists y(y - x = y/x)\leftrightarrow x \neq z]  $$  Am I asked to prove that there exists a z where the bi-conditional statement is true? Or is z a given and I should just prove the statement in the brackets for some z?  I put that thought aside and showed that the statement in brackets is true when z = 1, but I just want to be sure that I did what the question I was asked.


Copy specific file type keeping the folder structure from remote server

Similarly to  I am looking to copy over only specific file types (or files with names containing specific strings) preserving the folder structure. I only want to add the caveat that the folders in question are located on a different server which I connect to through ssh. Normally that means I use scp or rsync on the local system. However,  we want to be able to run find on the remote system. How would I copy the files and directories in this case? P.S. Would there be a way to estimate the total file size before performing the copy for real.


In this 3d model space multiple camera are placed.  One camera is desired for portrait shot (1200 X 1800 pixels)while other in landscape (1800 X 1200 pixels) shot.    But in blender when one camera setting is changed to the landscape proportion the other automatically changes to landscape (which is not desired).  However there is some workaround that to change the orientation of second camera so that other camera remains undisturbed (but this is annoying to look at). Is there any proper method to resolve the Orientation Issue.


I would like to add this small jQuery code in my wordpress website but no way.  $(document).ready(function(){ $('.flex-active-slide').append('

'); });   I tried many solution on the web like   Create a js file with and call it with wp_enqueue.  <?php wp_enqueue_script("jquery-mycustom-core",'/wp-content/themes/example/mycustom.js', array('jquery'), '1.8.8'); ?>   Also i tried put it on the functions.php.  //this goes in functions.php near the top function my_scripts_method() { // register your script location, dependencies and version wp_register_script('custom_script', '/wp-content/themes/example/mycustom.js', array('jquery'), '1.0' ); // enqueue the script wp_enqueue_script('custom_script'); } add_action('wp_enqueue_scripts', 'my_scripts_method');   Also i trid this :  add_action('wp_head', 'add_scripts'); function add_scripts() { ?>  <?php }   And i also inserted directly on the footer and the header but noway.  but when i execute this code on the browser console it work.  Any help please.    Thanks Alex For help so here is what i did but still didn't work  mycustom.js  j(document).ready(function(){ var j = jQuery.noConflict(); j('.flex-active-slide').append('

'); });   header.php      <?php wp_register_script('myjs',get_stylesheet_directory_uri().'/mycustom.js',array('jquery'),false,true);       wp_enqueue_script('myjs') ?>


Proving that if $a^n+b^n \mid a^m+b^m$, then $n \mid m$

I came across this question in the book An Excursion in Mathematics:     Let $a,b,m,n \in \Bbb{N}, a\gt 1$ and $\gcd(a,b)=1$. Prove that if $a^n+b^n \mid a^m+b^m$, then $n \mid m$.   I have made numerous attempts:   Tried modifying the statement $k(a^n+b^n) = a^m+b^m$. Played around with the expanded forms of $(a+b)^n$ and $(a+b)^m$. Tried finding $\gcd(a+b,a^m+b^m)$.   But all to no avail. Can I have a hint as to how to continue on this problem?


Is it possible to move dialog in the comments to chat when the system doesn't ask? (I want to move existing comments, not create a new empty room.)


The current Stack Exchange's badge image gets displayed on achievements dialog

The badges we earn are displayed over the achievements dialog (top of screen, leaderboards logo), but if we view them over another Stack Exchange site's page, we get shown THAT Stack Exchange site's logo of that badge.    For example, in the picture, I won a badge on Arqade, but when I open the dialog in Movies.SE, I see Movies.SE's (silver) badge, not Arqade's (silver) badge.  How it should look like:    It is nothing big or critical, just a small bug.


What mean path to the icon in *.desktop file?

I have installed VSCode in Ubuntu. I wanna change icon. For this I go to the /usr/share/applications/ and try change Visual Code Studio.desktop with content: [Desktop Entry] Name=Visual Studio Code Comment=Code Editing. Redefined. GenericName=Text Editor Exec=/usr/share/code/code --no-sandbox --unity-launch %F Icon=com.visualstudio.code Type=Application StartupNotify=false StartupWMClass=Code Categories=Utility;TextEditor;Development;IDE; MimeType=text/plain;inode/directory; Actions=new-empty-window; Keywords=vscode;  X-Desktop-File-Install-Version=0.23  [Desktop Action new-empty-window] Name=New Empty Window Exec=/usr/share/code/code --no-sandbox --new-window %F Icon=com.visualstudio.code  What mean path to the icon like this Icon=com.visualstudio.code? How change the icon?


Ubuntu 14.04 Server - WiFi WPA2 Personal

I just installed Ubuntu 14.04 Server and cannot get wifi configured correctly to work with WPA2 personal and could use some help.    There was a simple wizard during install where I selected my SSID from a list and entered my passphrase and that worked great.  Now that the install is done I am having trouble configuring wifi.  My Access Point is setup to WPA2 Personal TKIP or AES. Any advice would be greatly appreciated.  I have been messing around with WPA supplicant ant my /etc/network/interfaces file with no luck.  Thanks


Xml Deserialization with complex elements in c#

I am having some troubles with the deserialization of my xml string to my object. I am not getting any errors but the values aren't populating (the values aren't null they are just ""). I've looked at a few questions that had the same issue but those problems usually consisted of people not having the [XmlRoot] or [XmlElement] defined.   Here is a bit of my xml string:  string xmlString = @"<results><dpv_answer value=""Y"" /><zip value=""95118-4007"" /></results>"   Here is the function to deseralize:  StandardAddress address = new StandardAddress();  using (XmlReader reader = XmlReader.Create(new StringReader(xml))) {     try     {         address = (StandardAddress)new XmlSerializer(typeof(StandardAddress)).Deserialize(reader);     }     catch (InvalidOperationException x)     {         // String passed is not XML, simply return defaultXmlClass     } }  return address;   Here is a bit of the object declaration:  [XmlRoot("results")] public class StandardAddress {     [XmlElement(ElementName = "dpv_answer")]     public string dpv_answer { get; set; }     [XmlElement(ElementName = "zip")]     public string zip { get; set; } }


I know that when a car is taking a turn, the front 2 wheels trace out 2 arcs having the same centre. I also know that the steering angle for the outside wheel is more than that of the inner wheel to prevent the car from skidding. My question is during the turn do the rear wheels trace out the same arcs as the front wheels.


How can I put three author names in the title of a document using svjour3 document class?

I use svjour3 to write my paper, but I can not put all author names in one line, how can I correct it? My code is below. \documentclass{svjour3}     \smartqed  \journalname{Earth Science Informatics} \usepackage{multicol} \usepackage{hyperref} \usepackage{pifont} \usepackage{epsf} \usepackage{graphicx} \usepackage{float}   \usepackage[top=2.5cm,right=3cm,bottom=2.5cm,left=2.5cm]{geometry}   \begin{document} \title{ Earthquake Magnitude ...} \author{{Mahshid Fahandezhsadi, Kamal Aghazade, Hamed Fahandezh Sadi}} \maketitle  .... \end{document}


Ubuntu doesn't boot up and it goes into initramfs. I am writing from a live CD trial session. what should I do?  I understand that the boot flow is broken and that when the files from root are going to be loaded into the ram, it does not find the files in the root directory. Please correct me if I'm wrong.  The following is the output from ashell as I input the "exit" command:  (initramfs) exit /dev/mapper/ubuntu--vg-root contains a file system with errors, check forced. Inodes that were part of a corrupted orphan linked list found.  /dev/mapper/ubuntu-vg-root: UNEXPECTED INCONSISTENCY; Run fsck MANUALLY.     (i.e., without -a or -p options)  fsck exited with status code 4. The root file system on /dev/mapper/ubuntu--vg-root requires manual fsck


Where does this asymptote for $H_n^{(k)}$ come from?

@Claude Leibovici's answer to this  (it's the second answer) gives an asymptote for the generalised harmonic number $H_n^{(k)}=\sum_{i=1}^n \frac{1}{i^k}$:  $$H_n^{(k)}=n^{-k}    \left(-\frac{n}{k-1}+\frac{1}{2}-\frac{k}{12    n}+O\left(\frac{1}{n^3}\right)\right)    +\zeta (k)$$  Heuristically, this is an excellent fit. But can someone please tell me if this is a published result, and more importantly how it is derived?


The function of "young"in these sentence

He left home young He died young  Does the word "young" act as either a predicative complement or a incidental adverbial in those sentences？And how to distinguish them?


How to align text inside the div tag with the links.

I am trying to align the text inside the div tag with the links but I am unable to do it. Please take a look at the fiddle. Images are a little up than the text Page 5 of 6.   <display:setProperty name="paging.banner.full" value='       | Page {5} of {6} |       '/>         <display:setProperty name="paging.banner.first" value='  &nbsp | Page {5} of {6} | &nbsp     '/>         <display:setProperty name="paging.banner.last" value='       | Page {5} of {6} |   '/>   CSS  .pagelinks  { float: right; margin-right: 48%; display: inline-block; background-size: cover; background-repeat: no-repeat; color: #828282; }  .pagelinks a { text-decoration: none; display: inline-block; background-repeat:  no-repeat; }   Thanks


I am using the following code to send mail  but the sent mail are going in spam. How can I mark them to not spam programatically  $this->load->library('email');   if($this->config->item('protocol')=="smtp"){             $config['protocol'] = 'smtp';             $config['smtp_host'] = $this->config->item('smtp_hostname');             $config['smtp_user'] = $this->config->item('smtp_username');             $config['smtp_pass'] = $this->config->item('smtp_password');             $config['smtp_port'] = $this->config->item('smtp_port');             $config['smtp_timeout'] = $this->config->item('smtp_timeout');             $config['mailtype'] = $this->config->item('smtp_mailtype');             $config['starttls']  = $this->config->item('starttls');              $config['newline']  = $this->config->item('newline');              $this->email->initialize($config);         }             $fromemail='jodbaki@gmail.com';             $fromname='Jod Baki';             $subject=$this->config->item('activation_subject');             $message=$this->config->item('activation_message');;              $message=str_replace('[verilink]',$verilink,$message);              $toemail=$this->input->post('email');              $this->email->to($toemail);             $this->email->from($fromemail, $fromname);             $this->email->subject($subject);             $this->email->message($message);             if(!$this->email->send()){              print_r($this->email->print_debugger());             exit;             }   I am sending the follwoing message  Hi,  Thank you for registering with us. Please click below link to verify your email address.  Click Here  or      Copy below link and visit in browser  http://jodbaki.com/exam/?/login/verify/   Thanks


How to change text size and display in index

I would like to ...   decrease the font size -> solved with  and reduce the indent for the second line (numbers 11,13 and 13) -> solved with    This is the code I'm using :  \documentclass{article} \usepackage[paperwidth=140mm,paperheight=210mm,top=25mm,bottom=20mm,left=20mm,right=20mm]{geometry} \usepackage{kantlipsum} \usepackage[xindy]{imakeidx}  \makeindex[columns=2, title=Indeks]  \begin{document}  \kant[1-2] Demetrius\index{Demetrius} is writing something, Dhimitër\index{Dhimitër} finished writing.  \kant[3-6] Demetrius\index{Demetrius} is writing something, Dhimitër\index{Dhimitër} finished writing.  \kant[7-9] Demetrius\index{Demetrius} is writing something, Dhimitër\index{Dhimitër} finished writing.  \kant[10-13] Demetrius\index{Demetrius} is writing something, Dhimitër\index{Dhimitër} finished writing.  \kant[14-17] Demetrius\index{Demetrius} is writing something, Dhimitër\index{Dhimitër} finished writing.  \kant[18-21] Demetrius\index{Demetrius} is writing something, Dhimitër\index{Dhimitër} finished writing.  \kant[22-25] Demetrius\index{Demetrius} is writing something, Dhimitër\index{Dhimitër} is writing something,  \kant[26-29] Demetrius\index{Demetrius} is writing something Dhimitër\index{Dhimitër} finished writing.  \printindex  \end{document}   And this is the result :


Move into nonhostile space attack and move

Moving Around Other creatures      You can move through a nonhostile creature's space [but] you can't willingly end your move in its space.   Is that "end your move" at the end of your turn or if you stop to attack? I had a player who wanted to move into another friendly character's space, attack a hostile, then sidestep behind a wall.


How to make a script which always activates on the startup?

So I'd like to add always a folder to the Path. I'm not a huge linux wizard but I think I would need to always write the "export PATH=$PATH:(directory)" line when I log in. But I need this to be on when I'm starting up, and I don't want to bother with Terminal everytime. So looking into it a little, I found that i should add that to .bash_profile even though I'm not sure what it is or where it's located. In the home directory there's only a .bashrc file. Hope you can help me, thanks


I have just bought a new bike and had it about a month now. I don't really know much about bikes but I do know how to repair an inner tube.  I have had one puncture and just bought a new inner tube. It worked for a few days and then went down again so this time I got a puncture repair kit. I took the inner tube out to check for any punctures and found nothing. I put it in water and pumped it up and there were no bubbles. I went around the entire tube pushing it next to my ear and heard nothing. I checked the tire to see if anything was wrong - there was nothing that I could see.   So I put it all back together and took it for a ride and got about half a mile and the tire was flat. I pumped it up and got about another half a mile and it was flat again.  Do you have any suggestions for me?


java - NullPointerException in linked lists finding char

public class LString{    char data;      //chars stored in this node    LString next;   //link to next LString node     public LString(char newdata){      data = newdata;   }    public LString(char newdata, LString newnext){      data = newdata;      next = newnext;   }    public LString(){   }    //create a front of list   LString front;    //create length of list   int length;    /*Construct an LString object. The LString object will represent the   same list of chars as original. That is, the newly created LString is a   "copy" of the parameter original.*/    public LString(String original){      LString curr = front;      for(int i = 0; i < original.length(); i++){         curr.data = original.charAt(i);         curr = curr.next;         length++;      }   } }  public class test{      public static void main(String[] args){         LString myList = new LString("hi");      } }   The following code should put the string "hi", into a linked list of chars, where each letter of hi, is one node of the list. When ran, it gives a nullpointerexception pointing to the line curr.data = original.charAt(i);. Why is there a null pointer exception there? Thank you


I am a newbie on Perl and I have a problem with the module Statitics::R.  I have to install a software (Sowhat:) on a mac. For this I need Statistics::R. I downloaded it and put the compressed directory on my sowhat directory. After this I decompressed my directory and install my Module. I tried to install my software and then I obtained this answer   Error:       Can't locate Statistics/R.pm in @INC (you may need to install the   Statistics::R module) (@INC contains:   /Users/UMR7205/Documents/sowhat-master/blib/lib   /Users/UMR7205/Documents/sowhat-master/blib/arch   /Users/UMR7205/Documents/sowhat-master/blib/lib/Statistics-R0.34/lib/Statistics/R.pm   /Users/UMR7205/Documents/sowhat-master/blib/lib/Statistics-R0.34/lib/Statistics/R.pm   /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18   /Network/Library/Perl/5.18/darwin-thread-multi-2level   /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2   /System/Library/Perl/5.18/darwin-thread-multi-2level   /System/Library/Perl/5.18   /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level   /System/Library/Perl/Extras/5.18 .) at (eval 4) line 2.  BEGIN   failed--compilation aborted at (eval 4) line 2.   But:   The directory which contains the Statistics/R.pm" is listed here When I checked the installation of Statistics::R I have the same answer I had no error message when I install the package   Could someone help me?


How can I align all my equations to the left?

This is my code but I want it to align to the left, more like the second part. \documentclass{article} \usepackage{mathtools}  \begin{document} \begin{gather*}     \sum F_x = 0 \\     F_{Ax}+F_{AF}+F_{BF}\cos(30)= 0     \\      \\     \sum F_y = 0 \\      F_{Ay}+F_{BF}\sin(30) = 0 \end{gather*}   \end{document}


How do I permanently delete networked printers?

I'm running Ubuntu 15.10 with the latest updates as of 2 Feb 2016.   I use my laptop on my home Wi-Fi network and at at work on our school's Wi-Fi network. I have a Wi-Fi printer at home and a USB printer at my office.   I'd like to delete all the school printers that Ubuntu automatically adds to my list of available printers. I've tried to delete them, but they don't go away.   I've tried: System Settings > Printers > Right-click on networked printer > select Delete. The printer does not disappear from the list.   I've also tried doing the same as above, but pressing the Delete key on the keyboard.  Still no joy.   I don't want to completely turn off Wi-Fi printing because I use that at home. I just want the printer dialog boxes to display only my own two printers.   Thanks!


Repeated labeling of random points within polygon?

I have created 3 random points within each of 27k polygons. I now want to label each of those 3 points as "A", "B", "C" within each polygon.   Is there a quick/automated way to do this?


I'm trying to find  Triangular numbers that are also square. So $m^2=\frac{n(n+1)}{2}$ I don't want the actual answer with the solution but I'd like to  solve the problem myself : I need some clues to take me on the right track.


I want to send an SMS via iPhone code to a selected recipient - I don't want to have to specify the recipient's number in the code. I want the app to take the message and enable me to select recipients from the Contacts in the iPhone device.


$\operatorname{Dom}(f)$ countable $\rightarrow$ $\operatorname{Ran}(f)$ countable

Let $f: X \longrightarrow Y$ a map, if $\:\operatorname{Dom}(f)$ is a countable set, show that $\operatorname{Ran}(f)$ is a countable set.


Is there a Newline constant defined in Java like Environment.Newline in C#?

In C# there is the static property  that changed depending on the running platform.  Is there anything similar in Java?


if my great grandmother was honduran and great grandfather scottish, what does that make me?

my great grandmother was Honduran and she married a Scottish man where they then moved to Jamaica to have my grandmother who married a Jamaican man. what would i say i mixed with?


Does it make sense to 'lift' an obligation?

I want to say that an obligation that was present previously has been removed in a new approach. Can I say that in the new approach, the obligation has been lifted?


Import After Effects camera data to Blender

At this time, there is no way I know of to track live footage in AE and then to export the camera data to Blender as a matter of routine.  But, there is an interesting cheat that works very well in many situations.  I present it here as I know many have asked and the answers are all over the place.  Open the footage in AE and do a normal 3D camera track.  Set up the ground plane, etc. to get the AE camera fully aligned.  AE is ready to go as soon and the tracking is setup to enable a good target layer to be locked down.  Then, make a small (100 X 100 px) solid and lock it on a solid AE track point.  Make several more of these spread near and far and use enough that no frame goes by without at least 8 widely distributed.  Render out the footage and import it to Blender.  Set up the Blender 3D camera track manually with track markers covering each of the little AE solids.  Run the Blender tracker and voila.  Blender 3D camera movement will follow the live action perfectly.  Comments are welcome.  Good luck.


Wild automorphisms of the complex numbers

I read about so called "wild" automorphisms of the field of complex numbers (i.e. not the identity nor the complex conjugation). I suppose they must be rather weird and I wonder whether someone could explain in the simplest possible way (please) how I could imagine such wild automorphisms.  E.g. I suppose they are completely discontinuous. E.g. are the real rational numbers fixed or any other set of complex numbers? Can such an automorphism be pictured in a model?


How to install OS X again with no access to a recovery partition?

I have a Mac running Fedora with no recovery partition and no access to any computer with Mac OS X. How can I reinstall OS X on this computer?


Is the .minecraft folder hidden on a Mac?

I have a friend who is playing with me on a server we've created. Unfortunately, he is on a  Mac whereas I am on a Windows machine. I told him that I should be able to compile and send a .minecraft folder to him so that we can both play. Unfortunately, he can't find his .minecraft folder where it is supposed to be. Is it hidden and how can I unhide it?


When you are performing time consuming operations in bash like installing new software, is it possible to write text that will appear at the prompt when the operation has finished.  E.g   Imagine running:  apt-get install eclipse-platform   Then it will use quite a while to finish while you see the installation log, meanwhile I want to create new folders (workspaces) which Eclipse later will use.  Is this possible without opening a new terminal (or tab)?


Rudin's proof that rationals have no GLB (or LUB)

In Rudin's 3e of Principles of Mathematical analysis, he associates $q = (2p+1)/(p+1)$. How does he create this number? What is the method for discovering this answer?


Denied entry into UK/given temporary administion - anyone entered again without a visa

Wondering if anyone has been denied entry into the UK (because of a small misunderstanding etc) but were able to enter again without having to get a visitor visa/clearance visa?  Previous I held a T5 visa (2 year temporary work visa given to the commonwealth countries), on expiration I left the country, travelled around a bit before coming back to the UK to pick up my things, thinking that I can get in on the Common Wealth 6 months visitor visa as this would kick in. Boy was I wrong. Because of my previous visas, length of stay already, having friends in the UK, no kids, no mortgage to run back to, no job, no dog to look after (being independent is not allowed in certain situations), they thought that I was trying to “overstay”, and as there is no rule that says once held a T5 visa, you have to be out of the country for xx amount of time, it’s really up to the “mood” of the customs officer.  At that time (yes silly me) I didn’t book a return ticket as previously I had always been allowed in without having to show one (ok lucky) and I was going to do further travel to Europe but haven’t decided on where yet, I didn’t have a job (I was taking some time off), I have more than enough money to show customs to prove I can support myself in my travels, my Australian permanent residency to show I am going to Australia, my family in NZ (I am a New Zealand passport holder), my criminals records etc. But because of my “lack of responsibilities to return home”, my visitor request was not granted. Just to be clear - there was no way I was trying to stay, use free healthcare or take a job without proper visa. However, they gave me a “temporary admission for a person who is liable to be detained” entry of 1 day, and I had to leave the next day back to Spain, where it was the last place I flew in from, even though that is not my “home”.   There is now an entry stamp but with a black cross over it and the officer told me the next time I want to return, I need to have stronger proof of “ties” back home (yes that’s what the officer told me as I was leaving/crying/freaking out/stressed like anything after being detained for 9 hours in a windowless room like the criminal I was expected to be, at 5am to wonder the streets of London alone). However reading on the forum, every said to get a visa.   So now (1 year later), I have a full time job in Spain with all my work and resident visa and ID card with a long term rental agreement under my name, still no dog or mortgage yet etc. I want to visit my friends in the UK this summer for a few days, but the cost of the visa will put me out of pocket by 200euro (yes it is the cost+admin fees+extra for the Spanish govt) which is more than the flight itself from Spain to UK (<100euro).  And I was told that it may not even be granted. If thats the case, then I will need to apply again..... Also that having the visa, I could still get denied at the gates.   I was wondering if anyone (maybe from the commonwealth countries) that was given temporary entry (not deported) has entered again (after a period of time) without going through the visa process? But had stronger proof – ie job, rental, kids etc – the second time around to show at customs?  As per the website.   Thanks for listening.


Why has everything only one colour in my final render?

i am new to blender and this amazing 3D community .I was working on a fun project but the fun project become a headed I don't know how .I got wrecking ball , cubes and a base but problem is everything showing same colour in final render .in render mode everything is fine even in camera also but I don't know whey final render is showing only one colour.here are some images of my fun project(which turn into headed .)     this one was rendered mode.this is what I want .    this is what I am getting blender is not even reading emission .  P.S -  this was just a fun project so i did not took much care of textures and lighting as I planned to keep it myself. hope I gave enough details .


In the following code, I expect the if condition to be true, but actually the else condition is true. Can anyone explain the reason behind it?  $a = (float) 0; $b = 0; if ($b === $a) {     echo "$a and $b are equal"; } else{     echo "$a and $b are not equal";  // true }


I was recently given a math question which was stated: "...divisible by 2 OR 3". I believed at that point that this did not include numbers such as 6 as the word OR implies that it is the choice between 2 statements, therefore leading to the conclusion that there when "or" is stated, it does not mean AND. It is true that OR does indeed mean AND as well as just the choice between two statements? I am simply asking for a explanation for what the word OR means; does it include the word AND. Thank you. FULL QUESTION IS, IF YOU WANT IT: How many numbers in a sequence from 0 to 2000 are divisible by 2 OR 3?


double quotation with tilda expansion and backslash

Why is the following wrong?  $ cd "~/my data" bash: cd: ~/my data: No such file or directory  $ cd ~"/my data" bash: cd: ~/my data: No such file or directory  $ cd ~/"my data" # works


I'm trying to condense the size of my comments by using a condensed font however its not working correctly.  The font shape looks fine with ttfamily enabled in basicstyle, however, there is a huge amount of space between the letters for comments. How can I get rid of this spacing?  \documentclass{article} \usepackage[T1]{fontenc} \usepackage{lmodern}  \begin{document}     \begin{lstlisting}[language=Prolog,basicstyle=\ttfamily\footnotesize,commentstyle=\fontseries{lc}\selectfont\itshape]     hello :- world     % This is a comment     \end{lstlisting}     \end{document}   Edit: How do I get the source of this post to compile like I've seen in other threads?


If there exists an epimorphism from a group $G_1$ to $G_2$ that is not one-to-one, then can $G_1$ and $G_2$ be isomorphic?

I am trying to show that two groups are isomorphic only if a certain condition holds. I can show that a specific epimorphism between the two groups is one-to-one only if this condition holds, but it isn't obvious that for infinite groups that this should mean that there can't exist an isomorphism between the two groups.  If there is a non-one-to-one epimorphism from a group $G_1$ to a group $G_2$, does this mean that all epimorphisms from $G_1$ to $G_2$ are not one-to-one?


Swap two registers using only AND, OR, NOT, XOR?

Consider you have a processor with AND, OR, XOR, NOT and 2 registers X & Y. What is the smartest way to swap the values of the 2 registers?


Group Data and show group as separte column


I want to send emails from my Ubuntu PC to other PCs on internet. I also have an account on yahoo.gr,there are some commands like ssmtp or mail or mutt but they don't work for me. Perhaps I should change the files on the folder: /var/mail ?


Copying detail from one side of an object to another?

If I had a cube like object with 6 main faces:     and I added some detail to one side:    How can I copy what's on that one face to the 5 other faces? I know I can mirror to have a copy on the opposite side, but what about the other 4 faces?  While taking screenshots for the question, I managed to figure out how to make it work for uniform/regular shapes. I'm still interested anyone who has an answer for how to do this when the faces are not in regular locations.


Username and password check not working. Eclispse GUI

I have a GUI in eclipse where I enter username and password and if they are correct when I press a Jbutton, the GUI should close. Else say "Wrong username and password". My code is:  if(name == username.getText() && pass == Password.getText()){                     //allow access                     System.exit(0);                 }                 else{                     //deny                     btnLogIn.setText("Wrong username or password");                 }   I keep getting the "Wrong username or password" although the username and password are 100% correct. Where am I going wrong?  Variables:     private JPasswordField Password;     private JTextField username;  private String id = "username"; private String pass = "pass";


NullPointerException on getActivity().runOnUiThread(new Runnable(){

I know there are many different causes for NPE but mine is slightly weird (At least to me).  So I have converted my Activities to Fragments successfully, but my problem appears to be coming from the function that displays the date. When the application is running, everything works just fine. But as soon as you press the back button. The app force closes, then in the log it says I'm getting NullPointerException at line 102. So looking at the code, I did research on this but unfortunately got nothing.   This is the line where the error is coming from when you press the back button.  getActivity().runOnUiThread(new Runnable(){   Also I have tried disabling the back button (As I'm building a launcher and it's not needed). But it doesn't seem to be working.  Here is the code for the whole date displaying method/function.  // (Calendar) Date function - Displays dateview on Card final boolean keepRunning1 = true; Thread thread_two = new Thread(){     @Override     public void run(){          while(keepRunning1){              // Make the thread wait half a second. If you want...             try {                 Thread.sleep(500);             } catch (InterruptedException e) {                 Toast.makeText(getActivity().getApplicationContext(), "Default Signature Fail", Toast.LENGTH_LONG).show();                 e.printStackTrace();             }                  getActivity().runOnUiThread(new Runnable(){                 @Override                 public void run(){                     TextView date = (TextView) getView().findViewById(R.id.date);                     date.setText(DateUtils.formatDateTime(getActivity().getBaseContext(), System.currentTimeMillis(),DateUtils.FORMAT_SHOW_WEEKDAY | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR));                 }             });         }     } };  thread_two.start();   Thanks for your time, hopefully you can shed some light on what I'm doing wrong.  Logcat -  05-23 21:17:33.216: E/AndroidRuntime(6906): java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.app.FragmentActivity.runOnUiThread(java.lang.Runnable)' on a null object reference 05-23 21:17:33.216: E/AndroidRuntime(6906):     at com.activelauncher.fragments.UtilsFragment$2.run(UtilsFragment.java:102)


I have encountered a really weird situation. Im developing a software, to which I want to add a feature to confirm email, so basically, it sends an ajax request to my server and server responds with a key, this key will be also sent in the email within a link. This key is saved as a variable and then I add a setInterval, which runs a link, which by the key responds if the user has clicked the link or not. The data is stored in mysql. That everything works perfectly fine with one little issue. The AJAX responses do not update and just keep the old value although when I open the checking link in my browser the response is indeed different, does anybody have any thoughts what might by causing this issue?         $.ajax({             url: "http://...&em=" + email,             type: "GET",             success: function(rese){                 if(rese === "E1") {                 }else{                     var checker = setInterval(function(){                         $.ajax({                             url: "http://...&key=" + rese,                             type: "GET",                             success: function(resee){                                 alert(resee);                             }                         });                     }, 3000);                 }             }         });  Edit - Server responses: so, the data is updated in the moment, when user does click the link, the value changes to "yes", while normally, it would respond with just "no", but anyway, ajax keeps alerting me with no, even when i just have updated the value straight in the database


MySQL Select rows that from table01 that doesn't exist on table02

I have two tables, table03 have 10 rows and table01 have 21 rows, now I want to get rows from table03 where they don't exist in table01, so far I wrote this query but it shows all rows of table03 even some rows doesn't exist on table01.  SELECT T3.`DateAdded`, T3.`Query_name`, T3.`Fund`, T3.`Ticker`  FROM `table_name03` T3 LEFT JOIN `table_name01` T1  ON T3.`DateAdded` = T1.`DateAdded`  AND `T3`.`Query_name` = `T1`.`Query_name`  AND `T3`.`Fund` = `T1`.`Fund` AND `T3`.`Ticker` = `T1`.`Ticker`   Table03:   Table01:


I am trying to deploy a very simple & my first JSF application (following a ) on glassfish local server. I completed all the steps to create the application. And when I tried to deploy the application on the glassfish server, it just failed with the following exception message:-        cannot Deploy Playground     Deployment Error for module: Playground: Exception while deploying the app :      java.lang.IllegalArgumentException: Invalid URL Pattern: [xhtml]   Could anyone explain where is the fault and how can I amend it ?


Odd behavior on for loop spawning (background) threads

Feel free to run the code  Thread thread; for (int i = 6000; i < 6006; i++) {     //Thread.Sleep(1);     thread = new Thread(() => derp(i));      thread.IsBackground = true;     thread.Start(); }  private void derp(int a) {     MessageBox.Show(a.ToString()); }   It works fine with the thread sleep though, anyone got an explanation?


Is there any connection between distributive lattices and planar graphs?

I'm asking this because there are very similar theroems describing these properties: A lattice is distributive if and only if it does not contain N5 (pentagon) or M3 (diamond) and according to Kuratowski's theorem, a graph is planar if and only if it does not contain a subgraph which is homeomorphic to K5 or K3,3. Can these forbidden sublattices/subgraphs be somehow paired? Is there any reason why these theorems look so similar?  Thank you in advance!


Boy finds cave with ruins of a tiny civilization

About 25 years ago I read a book that for years I've tried to find. I remember nothing of the title or author, but I do remember the plot. My last question about a novel worked out so well I thought I'd try again.  A boy moves and has to live with his grandparents I think? And as he's exploring the outskirts of the new little town he's living in he stumbles across a cave, and in the cave buried in the sand he finds this kind of Native American pueblo type place but at a miniature scale. He thinks it's a model but at some point he comes to the conclusion that it was a real town of little people.  He has trouble at school and I remember at one point some of the bullies from school find and kind of threaten to destroy the place.  Any one read this one?  A few other odd details I remember:  He either bought, or was given a derringer, where the safety was a jewel in the handle of the gun, which at one point saves him as someone that tries to shoot him doesn't know how to deactivate the safety.  There was a "jail" or...cage of some sort in this miniature town made from rattlesnake fangs, which I think continued to have poison and which scratched a kid and nearly killed him.


I want my text to produce exact outcome of 'justify all lines'. i took text, dragged it, created a box (exactly the size i want my paragraph to be in) and then applied 'justify all lines' from paragraph option.  but it creates huge gap/space between words (look at disease and management). and it destroys all aesthetic vibe. if i delete the space my letter gets deleted too. and if i modify the box size it is still not removing all those unnecessary spaces.   what i need to do to get 'justify all lines' result?


Is it possible to have Ubuntu only on the flash stick?

What I mean by that is that I want to try Ubuntu, but I also want to keep my HP Desktop at the same time. Is that possible


Covering a n x n square grid with minimum squares

Given an N x N square grid what is the minimum number of overlapping squares you need to draw such that every line of the grid is covered by the side of a square.  The question can be rephrased as follows (which is how I arrived at the question):  A child wants to draw a NxN square grid in Paint by only drawing squares. Because he is lazy, he wants to draw as few squares as possible. Find the minimum number of squares he needs to draw.  N=1 : 1 You obviously only need one square.    N=2 : 3  One 1x1 square in the top left corner, one in the bottom right and a 2x2 square.    N=3 : 4    N=4 : 6?    N=5 : 8?    I hope you've understood what I mean by now. Is there any formula or algorithm for the general case? I thought about making a quick brute force algorithm but I realised how slow it would be and although it wouldn't be too complicated to write it's pretty tedious. It needs to do around $$\sum_{0 \le x \le n+1, 0 \le y \le n+1} 2^{min(n+1-x,n+1-y)}$$ operations. So before I try to write a brute force algorithm I thought I would ask this here in case anyone comes up with the solution or a more efficient algorithm.


I have a PNG file which is like a film strip of an animation all in 1 file.   Is is possible in Blender to render this file to make the animation work?    If not does anyone know how? The game it's from seems to do it and I've seen other models + animations work in programs like Blender / Photoshop before.  Probably cant but thought I'd ask.  Thanks


Cannot implicitly convert type to ActionResult

I've got some basic code in Mvc Core 2 that is attempting to take advantage of the implicit conversion between T and ActionResult<T>.      public ActionResult<IEnumerable<FrequentlyAskedQuestion>> Test()     {         IEnumerable<FrequentlyAskedQuestion> x = new FrequentlyAskedQuestion[0];         return x;     }   I get this error  2>Controllers\FaqsController.cs(57,20,57,21): error CS0029: Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<Models.FrequentlyAskedQuestion>' to 'Microsoft.AspNetCore.Mvc.ActionResult<System.Collections.Generic.IEnumerable<Models.FrequentlyAskedQuestion>>'   If I allow it to remain as an array it works.      public ActionResult<IEnumerable<FrequentlyAskedQuestion>> Test()     {         var x = new FrequentlyAskedQuestion[0];         return x;     }   I can see the code of AspNetCore has this static implicit operator that would be nice for this to work      public static implicit operator ActionResult<TValue>(TValue value)     {         return new ActionResult<TValue>(value);     }


Problem in installing gimp-plugin-registry

Using Ubuntu 11.04.. Updated gimp 2.6 to gimp 2.7. But have problem in installig gimp-plugin-registry  rajesh@rajesh-System-Product-Name:~$ sudo apt-get install gimp-plugin-registry -y  [sudo] password for rajesh:   Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies.  gimp-plugin-registry : Depends: gimp (<= 2.7) but 2.7.3-2011052002~nn is to be installed E: Broken packages


am tiring to do a multi operation with a soft ware , then   to How do I save each terminal output to a folder?


Let $f: \mathbb{R} \mapsto (0,+\infty)$ be differentiable and satisfy   $|f'(x)-f'(y)|\leq |x-y|$ for any $x,y$. Prove $[f'(x)]^2<2f(x)$ for   any $x$.   Notice that the assumption conditon gives that $f'(x)$ is of Lipschitz continuity, but this seems to be not so easy to use. I guess this maybe need to prove by contradiction.


JavaNullPointer Exception on ArrayList Add Function

Hope you are doing well  i am facing issue while adding object to ArrayList i need your kind assistance in solving this problem each time when i am going to add something to selectedContacts ArrayList i got nullPointerException  ArrayList<ContactInfo> selectedContacts = new ArrayList<>();     public ArrayList<ContactInfo> getSelectedContacts()         {             int i = 0;             while (contacts.get(i).isCheck()==true)             {                 ContactInfo info = contacts.get(i);                 if(info != null)                     selectedContacts.add(info);                 i++;             }             return selectedContacts;         }   ContactInfo.Java  public class ContactInfo {     String name;     String number;     String email;     boolean check;      public String getEmail() {         return email;     }      public void setEmail(String email) {         this.email = email;     }      public void setCheck(boolean check) {         this.check = check;     }      public void setName(String name) {         this.name = name;     }      public void setNumber(String number) {         this.number = number;     }      public boolean isCheck() {         return check;     }      public String getName() {         return name;     }      public String getNumber() {         return number;     }  }


How could a Lich maintain the appearance of being alive without magic?

I'm designing a character for a campaign whose role is to be a recurring antagonist. When the players first meet him, I want him to seem undeniably human. The idea is that the party will "kill" him and his body will be destroyed, only for him to be revived later and come back for revenge as Lich.  The party will be able to check him for magical effects when they first meet and I want it to be a surprise that he is a Lich. If they party detects Transmutation or Illusion magic on him or detect him as Undead it will give too much of a hint to his true nature.   Is there a way the Lich could retain a human form without magic?


I don't like windows 8 without the touchscreen, so what would I need to do to be able to resell the windows 8 disc. cheers alex


If I change the value of a list initialized with 'None', the result seems to be different to when the list is initialized with something else.  myList = [[0,0,0],[0,0,0],[0,0,0]] print(myList) for i,row in enumerate(myList):     for j,num in enumerate(row):         myList[i][j] = 10*i+j print(myList)   It gives:  [[0, 0, 0], [0, 0, 0], [0, 0, 0]] [[0, 1, 2], [10, 11, 12], [20, 21, 22]]   But if the first line is changed:  myList = [[None] * 3 ] * 3 print(myList) for i,row in enumerate(myList):     for j,num in enumerate(row):         myList[i][j] = 10*i+j print(myList)   It gives:  [[None, None, None], [None, None, None], [None, None, None]] [[20, 21, 22], [20, 21, 22], [20, 21, 22]]   Why is the second result different?


I have a table which I want to fill with multiple colors, each cell possibly different from another. Which means, I can't make use of e.g. \columncolor (as in  post).  While the table without any colors looks just fine (code at the end):   ...the table with one or more filled cells overwrites the table grid.   So my question is: Is there a way to, for example, redraw the grid after filling the cells or something?    EDIT: added complete code instead of code fragments Relevant LaTeX code:  \documentclass[11pt]{article}  \usepackage{color} \usepackage{colortbl} \usepackage{multirow}  \newlength{\Oldarrayrulewidth} % Cline redefining to add line thickness \newcommand{\Cline}[2]{%   \noalign{\global\setlength{\Oldarrayrulewidth}{\arrayrulewidth}}%   \noalign{\global\setlength{\arrayrulewidth}{#1}}\cline{#2}%   \noalign{\global\setlength{\arrayrulewidth}{\Oldarrayrulewidth}} }   \definecolor{intnull}{RGB}{213,229,255} \definecolor{inteins}{RGB}{128,179,255} \definecolor{intzwei}{RGB}{42,127,255} \definecolor{intdrei}{RGB}{0,85,212} \definecolor{intvier}{RGB}{0,51,128} \definecolor{intfunf}{RGB}{0,34,85}   \begin{document} % Empty table \begin{tabular}{*{5}{!{\vrule width 1.5pt}p{1.5cm}}!{\vrule width 1.5pt}l} \centering 4 & \centering 10 & \centering 24 & \centering 48 & \centering 72 &\\ \Cline{1.5pt}{0-4}  &  &  &  &  & Optic tectum \\ \Cline{1.5pt}{3-5}  &  &  &  &  & Retina \\ \Cline{1.5pt}{3-5}  &  &  &  &  & Myomeres \\ \Cline{1.5pt}{0-4}  &  &  &  &  & Arches \\ \Cline{1.5pt}{0-4} \end{tabular} \\  \hspace*{1cm}  % Partically filled table \begin{tabular}{*{5}{!{\vrule width 1.5pt}p{1.5cm}}!{\vrule width 1.5pt}l} \centering 4 & \centering 10 & \centering 24 & \centering 48 & \centering 72 &\\ \Cline{1.5pt}{0-4}  & \cellcolor{intnull} &  & \cellcolor{intvier} &  & Optic tectum \\ \Cline{1.5pt}{3-5}  & \cellcolor{intnull} &  & \cellcolor{intnull} &  & Retina \\ \Cline{1.5pt}{3-5}  & \cellcolor{intnull} &  & \cellcolor{intdrei} &  & Myomeres \\ \Cline{1.5pt}{0-4}  & \cellcolor{inteins} &  & \cellcolor{inteins} &  & Arches \\ \Cline{1.5pt}{0-4} \end{tabular}  \end{document}


How can I determine the dimensions of a cone with surface area 1 and maximal volume?


I am using the 3 wire PWM fan. By measuring the signal on the 3rd wire (yellow color) on the oscilloscope, the signal is square wave output. Can anyone tell me how this tach signal indicate the speed of the fan?


How to prove De Morgan’s laws without using contradictions

Is it possible to prove De Morgan’s Laws without showing a contradiction otherwise. I’m actually asking because I’m wondering if it’s possible to prove De Morgan’s law without assuming the Law of Non-Contradiction


I have a primitive root $ \alpha $ of a number $ p = 2^{16} + 1$. How can I show if $ \alpha^{3} $ and $\alpha^{14}$ are primitive roots as well?


can I create a function without brackets?

all php functions need () in the end. However, exit doesnt need that. Can I create a function manually, which I can later execute without () ?  Even more, If I have full access to php installation?  p.s. please dont tell me answers "exit is not function" or etc (My question is not if "exit" is function or not). I want to know HOW TO ACHIEVE like that.


How can you determine whether a journal is indexed in ISI or SCI?

What are the main difference between SCI and ISI Journals?  How  can you determine whether a a journal is indexed in SCI or ISI?


I want to rotate a sprite so that it faces the mouse cursor/screen touch location. Currently I'm using the following method to compute the angle of rotation. The input position is the target point the sprite must face:  - (void) moveToPosition: (CGPoint)pos {     moveTarget = pos;     const float targetX = (moveTarget.x - self.position.x);     const float targetY = (moveTarget.y - self.position.y);     const float angle   = atan2(targetX, targetY);     targetAngle = ClampF(CC_RADIANS_TO_DEGREES(angle), -180.0f, 180.0f); }   Then in the update method, which is called every frame, I do a linear interpolation between the target angle and the current, to ensure a smooth rotation:  - (void) update {     const float currentAngle = self.rotation;     if (currentAngle != targetAngle)     {         const float newAngle = LerpF(currentAngle, targetAngle, [self getTurnSpeed] * Time.deltaTime);         self.rotation = newAngle;     } }   This setup works OK, except when the target angle gets close to 180/-180 degrees. When it gets there the sprite just spins the whole way around in a very wacky manner. I've recorded a  to illustrate.  Which would be the best way to handle these cases, when the angle wraps, and fix this weird spin effect caused by it?


Stretch length of horizontal and vertical springs

If the spring in Figure A is stretched a distance d, how far will the spring in Figure B stretch? The spring constants are the same.  The answer is "by half". I don't get it, to me it's the same.


If every polynomial of degree 2 is reducible then $K$ is algebraically closed?

This  shows that if every polynomial of degree 2 and odd degree has a root in $K[X]$, then $K$ is algebraically closed.   I wonder what examples can I find to see that the condition "odd degree" is necessary so that I cannot prove the statement:     Let $K$ be a field, if every polynomial of degree two is reducible   then $K$ is algebraically closed.   This  seems to give a procedure.  If I start with $\mathbb{F}_p$ then I know that adding a root of an irreducible of degree two over $\mathbb{F}_p$ will give me:   $\mathbb{F}_{p^2}$ by Moore's theorem there is only one field of cardinality $p^2$.  Any other root of an irreducible of degree 2 over $\mathbb{F}_p$ must be here .    The problem is that I do not get the roots of irreducible over $\mathbb{F}_{p^2}$ and therefore this process has to be iterated obtaining at the end the union $\cup_{i \ge 1} \mathbb{F}_{p^{2^i}}$. This does not need to be a fieldso that I shoud take the minimal field over it $\langle \cup_{i \ge 1} \mathbb{F}_{p^{2^i}} \rangle$.   In $\cup_{i \ge 1} \mathbb{F}_{p^{2^i}}$, it is clear that there cannot be a root of an irreducible of degree $3$. However, in principle I could find such a root in $\langle \cup_{i \ge 1} \mathbb{F}_{p^{2^i}} \rangle$. Why is it not the case?


How can I pour a concrete patio under my existing deck without surrounding the deck posts in concrete?

I would like to pour a concrete patio under my deck.  The concrete company said they would just pour the concrete around the posts with a expansion joint around the posts.  I thought that would cause water build up around the posts since the concrete would be on top of the existing footing and not allowing the water to escape.  Also, the existing footings are uneven, with greatest difference being close to 4", so I can't just pour the concrete to the top of the footings.  See the attached picture.  Any suggestions?


I have tried to install qt-5 but I got  E: Malformed entry 11 in list file /etc/apt/sources.list (Component) E: The list of sources could not be read. E: Malformed entry 11 in list file /etc/apt/sources.list (Component) E: The list of sources could not be read.   My sources.list  #------------------------------------------------------------------------------# #                            OFFICIAL UBUNTU REPOS                             # #------------------------------------------------------------------------------#   ###### Ubuntu Main Repos deb http://55.archive.ubuntu.com/ubuntu/ xenial main   ###### Ubuntu Update Repos deb http://55.archive.ubuntu.com/ubuntu/ xenial-updates main  deb-src http://55.archive.ubuntu.com/ubuntu/ xenial-updates   ###### Ubuntu Partner Repo deb http://archive.canonical.com/ubuntu xenial partner deb-src http://archive.canonical.com/ubuntu xenial partner  #------------------------------------------------------------------------------# #                           UNOFFICIAL UBUNTU REPOS                            # #------------------------------------------------------------------------------#   ###### 3rd Party Binary Repos  ## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C6DAEA80 deb http://ppa.launchpad.net/boomaga/ppa/ubuntu xenial main # Boomaga PPA - https://launchpad.net/~boomaga/+archive/ubuntu/ppa  ## Run this command: wget -q -O - http://dano.cu.cc/1Aci9Qp | sudo apt-key add - && sudo apt-get update deb http://repo.daniil.it lenny main # Daniil's Bash Video Download - http://daniil.it  ## Run this command: sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 614C4B38 deb http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial main # Gimp PPA - https://launchpad.net/~otto-kesselgulasch/+archive/gimp  ## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B1510FD deb http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu xenial main # GNOME3 Extra Apps PPA - https://launchpad.net/~gnome3-team/+archive/gnome3  ## Run this command: wget -q https://dl.google.com/linux/linux_signing_key.pub -O- | sudo apt-key add - deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main # Google Chrome Browser - http://www.google.com/linuxrepositories/  ## Run this command: wget -q https://dl.google.com/linux/linux_signing_key.pub -O- | sudo apt-key add - deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main # Google Earth - http://www.google.com/linuxrepositories/  ## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  247510BE deb http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu xenial main # Mozilla Daily Build Team PPA - http://edge.launchpad.net/~ubuntu-mozilla-daily/+archive/ppa  ## Run this command: sudo wget -O - http://apt.mucommander.com/apt.key | sudo apt-key add -  deb http://apt.mucommander.com stable main non-free contrib   # muCommander - http://www.mucommander.com/  ## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F24AEA9FB05498B7 deb [arch=i386] http://repo.steampowered.com/steam/ precise steam # Steam for Linux - http://store.steampowered.com/about/  ## Run this command: curl -s https://syncthing.net/release-key.txt | sudo apt-key add - deb http://apt.syncthing.net/ syncthing release # Syncthing - https://syncthing.net/   Content of /etc/apt/sources.list.d  canonical_partner.list       google.list.save     staticfloat-ubuntu-julia-deps-xenial.list          vivaldi.list.save canonical_partner.list.save  hexinator.list       staticfloat-ubuntu-julia-deps-xensave google.list                  libdvdcss.list.save  vivaldi.list ial.list.save     webupd8team-ubuntu-java-xenial.list google-chrome.list           hexinator.list.save  staticfloat-ubuntu-juliareleases-xenial.list       webupd8team-ubuntu-java-xenial.list.save google-chrome.list.save      libdvdcss.list       staticfloat-ubuntu-juliareleases-xenial.list.


Which is grammatically correct: "Let he who..." or "Let him who..."

Let he who believes in this prophet speak now what he knows.       Let him who believes in this prophet speak now what he knows.


How to get absolute path of current shell in a sourced script?

Suppose one executes either  . some_script   or  source some_script   How can some_script determine the absolute path of the current shell (i.e. the one that is executing the . or source command)?  (Note that, in general, this path is not the same as the value of $SHELL.)  In other words, I'm looking for the "absolute path" counterpart of $$.  I figure that the current shell process must know the executable whence it came, but AFAICT, it's not stored in any environment variable.  The best I can come up with boils down to scraping the output generated by a suitable variant of ps -p $$; for example:  CURRENT_SHELL=${"$( PS_FORMAT=cmd PS_PERSONALITY=linux ps -p $$ -h )"% *}   This is probably not very portable.  (And it's ugly, to boot.)    I'm primarily interested in the case where the current shell is some version of zsh.  (I have a secondary interest in the corresponding answer for bash.)


how to avoid scrolling when we set height of container to 100vh to fit screen height but there is another component on top of it?

Consider the following code-
   Heading element

   Main content
  .header {   height:50px;   border:1px solid black; } .mainContainer {   height:70vh;   border:1px solid black; }   I want mainContainer to take the full height of the screen. But there is another div on top of it which has his own height of 50px. Now if I give the height of 100vh to mainContainer then the scrollbar appears on the screen which is obvious but how to avoid it?


Why doesn't my command work when aliased?

I use ps -ef | grep catalina | grep -v grep to print the tomcat process running on the system:  kshitiz   7099     1  0 May11 ?        00:02:29 /usr/lib/jvm/jdk1.8.0/bin/java -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:38156 -Dcatalina.base=/home/kshitiz/Documents/workspaces/ggts/.metadata/.plugins/org.eclipse.wst.server.core/tmp1 -Dcatalina.home=/opt/tomcat-7.0.42 -Dwtp.deploy=/home/kshitiz/Documents/workspaces/ggts/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps -Djava.endorsed.dirs=/opt/tomcat-7.0.42/endorsed -Dfile.encoding=UTF-8 -classpath /opt/tomcat-7.0.42/bin/bootstrap.jar:/opt/tomcat-7.0.42/bin/tomcat-juli.jar:/usr/lib/jvm/jdk1.8.0/lib/tools.jar org.apache.catalina.startup.Bootstrap start   Then I use ps -ef | grep catalina | grep -v grep | awk -F' ' '{print $2}' to extract the process id:  7099   But when I alias the whole command alias tomcat_id="ps -ef | grep catalina | grep -v grep | awk -F' ' '{print $2}'" and use it via alias, it prints the whole text and awk doesn't seem to work.  type tomcat_id gives:  tomcat_id is aliased to `ps -ef | grep catalina | grep -v grep | awk -F' ' '{print }''


what are some applications of group theory? Group theory seems to be rather abstract.


How can I pairwise sum two equal-length tuples

How can I get the pairwise sum of two equal length tuples? For example if I have (0,-1,7) and (3,4,-7) I would like to have (3,3,0) as answer.


Let $X$ be a r.v. taking values in a separable metric space $(E,d).$ Prove that $X$ is degenerate (i.e. $\exists x \in E;P_X=\delta_x$) if and only if $\forall K \in B(E),P_X(K) \in \left\{0;1 \right\}.$ $\implies$ is very easy. Any ideas for the converse?


parent element not removed with jquery click event

I am trying to remove a the parent of a button, which is a list element, once the button has been clicked.   New to the programming world so it may be something simple, but I cant find a solutution based on what I have found with others posting on stack overflow and the internet. Please can someone point out what I am doing wrong?  I am using a combination of Javascript and Jquery. I am trying to utilise the skills I already know of plus a bit of researching in order to get the job done. I am in the process of learning the techniques and skills that would be required to have a similar remove event using pure Javascript, but for now I am just using Jquery for that side of things.    $(document).ready(function() {    document.getElementById("add").addEventListener("click", function() {      var taskinput = document.getElementById("task").value;      if (taskinput) {        var tasktext = document.createTextNode(taskinput);       var list = document.createElement("li");       list.appendChild(tasktext);       var button = document.createElement("button");       button.setAttribute("class", "completed");       button.innerHTML = "X";       list.appendChild(button);       document.getElementById("task-to-do").appendChild(list);       document.getElementById("task").value = " ";     } else {       alert("Please enter a task");     }    });    $("button .completed").click(function() {     $(this).closest("li").remove();;   });  });

ENTER A TASK BELOW
     <input type="text" id="task">

TO-DO LIST


Interchange of partial derivative and limit

Consider the following expression: $$\frac{\partial}{\partial m} \lim_{T \rightarrow \infty} \gamma(T,m)$$ where $\gamma$ is a function of $T$ and $m$.  My question is just: can I permute the partial derivative and the limit operators? I suppose that I can, given that the concerned variable is different for each operator but I still need a confirmation.


How to get current time in Datetime format PHP?

I need to get current time in UTC to store in in datetime field(2019-08-17 00:00:00) type in MySQL.  How to get it in PHP?  I tried: now(); it gives me milliseconds


How to add a program as a startup application from a terminal?

I am using Ubuntu 12.04 and I know the GUI way to maintain the startup program list but now I want to find out the way to add/remove startup applications using a command line interface (CLI).


Cartesian Product characterization in Rel Category (Category of sets and relations) in simpler terms

The question  explains how a cartesian product of sets are specified. It is difficult for me to follow it; for example, I do not know about "symmetric monoidal category".   Can anybody please explain cartesian product construction using simpler concepts? for example, what set of constraint should be checked to see if an object is a cartesian product of another two objects without looking inside the objects?  PS: Question edited to avoid duplication


How can I get ssh-agent working over ssh and in tmux (on OS X)?

I have a private key set up for my github account, the passphrase to which is, I believe, stored in OS X's keychain. I certainly don't have to type it in when I open a terminal window and enter ssh git@github.com.  However, when I'm running bash over an ssh session, or locally inside a tmux session, I have to type in the passphrase every single time I attempt to ssh to github.   suggests that a similar problem exists with screen, but I don't really understand the issue well enough to fix it in tmux. There's also  which includes a fairly complicated solution, but for zsh.  EDIT:  In response to , from a local terminal I get the following output:  [~] $ echo $SSH_AUTH_SOCK /tmp/launch-S4HBD6/Listeners [~]  $ ssh-add -l 2048 [my key fingerprint] /Users/richie/.ssh/id_rsa (RSA) [~] $ typeset -p SSH_AUTH_SOCK declare -x SSH_AUTH_SOCK="/tmp/launch-S4HBD6/Listeners"   Whereas over ssh or in tmux I get:  [~] $ echo $SSH_AUTH_SOCK  [~] $ ssh-add -l Could not open a connection to your authentication agent. [~] $ typeset -p SSH_AUTH_SOCK bash: typeset: SSH_AUTH_SOCK: not found   echo $SSH_AGENT_PID returns nothing whatever shell I run it from.


PostGIS nearest points with ST_Distance, kNN

I need to obtain on each element on one table the closest point of another table. The first table contains traffic signs and the second one the Entrance Halls of the town. The thing is that I can't use ST_ClosestPoint function and I have to use ST_Distance function and get the min(ST_distance) record but I am quite stuck building the query.  CREATE TABLE traffic_signs (   id numeric(8,0) ),   "GEOMETRY" geometry,   CONSTRAINT traffic_signs_pkey PRIMARY KEY (id),   CONSTRAINT traffic_signs_id_key UNIQUE (id) ) WITH (   OIDS=TRUE );  CREATE TABLE entrance_halls (   id numeric(8,0) ),   "GEOMETRY" geometry,   CONSTRAINT entrance_halls_pkey PRIMARY KEY (id),   CONSTRAINT entrance_halls_id_key UNIQUE (id) ) WITH (   OIDS=TRUE );   I need to obtain the id of the closest entrnce_hall of every traffic_sign.  My query so far:  SELECT senal.id,port.id,ST_Distance(port."GEOMETRY",senal."GEOMETRY")  as dist     FROM traffic_signs As senal, entrance_halls As port        ORDER BY senal.id,port.id,ST_Distance(port."GEOMETRY",senal."GEOMETRY")   With this I am getting the distance from every traffic_sign to every entrance_hall. But how can I get only the minimun distance?  Regards,


Reading data from a relational database into a LaTeX table

I'm using Tex Live 2009 on Debian squeeze. I can upgrade if I really, really  have to, but I'd rather not. I was wondering if it would be possible to do the following.  Given some data in a (relational) database, can I extract it and automatically format it in a LaTeX table, so one would not need to manually recreate the LaTeX table if the data changes? Could one do such a thing with Lua? One would normally use a suitable language database adaptor for this, and I see Lua has . I'd like to use PostgreSQL. I'm currently using version 8.4.  Solutions not involving Lua are also fine. Just to be clear, I don't know anything about Lua and my knowledge of LaTeX programming is also extremely skimpy. I'm looking for a recipe which I can adapt if necessary. While this is not really important for my current use case, it seems like a useful general technique if possible.


I currently have 3 Fairies that I got from a Great Fairy Fountain. However, I've since opened up two other Great Fairy Fountains and neither of those had fairies around them. I've been playing quite a while and I haven't had them respawn at the first great Fairy Fountain either.


From $(1+z)^p(1+z)^q=(1+z)^{p+q}$ show that $\sum\limits_{n=0}^r\binom{p}{n}\binom{q}{r-n}=\binom{p+q}{r}$ without using the Cauchy product

I'm stuck on what was an easy exercise at first sight. It's exercise 18, PSet 15.3, Kreyszig "Advanced Engineering Mathematics" 10th ed. It asks to prove that given $(1+z)^p(1+z)^q=(1+z)^{p+q}$ then  $\sum\limits_{n=0}^r\binom{p}{n}\binom{q}{r-n}=\binom{p+q}{r}$.  Taking for granted that $(1+z)^p=\sum\limits_{k=0}^p\binom{p}{k} z^k$ and from  $$\sum\limits_{n=0}^p\binom{p}{n} z^n \sum\limits_{m=0}^q\binom{q}{m} z^m=\sum\limits_{r=0}^{p+q}\binom{p+q}{r} z^r$$  I should be able to manipulate the indices to get $\sum\limits_{r=0}^{p+q}\sum\limits_{n=0}^{r}\binom{p}{n} \binom{q}{r-n}z^r$ but I can't. My attempt was noticing that there is a constraint for which $n+m=r$ and $m,n>0$:  $$ \sum\limits_{n=0}^p\binom{p}{n} z^n \sum\limits_{m=0}^q\binom{q}{m} z^m=\sum\limits_{n=0}^p\sum\limits_{m=0}^q\binom{p}{n}\binom{q}{m} z^{n+m}=\sum\limits_{n=0}^p\sum\limits_{r=n}^{q+n}\binom{p}{n}\binom{q}{r-n} z^r=\\ =\sum\limits_{r=n}^{q+n}\sum\limits_{n=0}^p\binom{p}{n}\binom{q}{r-n} z^r$$  This is the closest I can get to $\sum\limits_{r=0}^{p+q}\sum\limits_{n=0}^{r}\binom{p}{n} \binom{q}{r-n}z^r$. Can anyone help me?  Thanks, Luca


Proof that $d(x,y) = |\frac{1}{x}-\frac{1}{y}|$ defines a Metric

I am trying to prove that $d(x,y) = |\frac{1}{x}-\frac{1}{y}|$ is a Metric. I already managed to prove:  $d(x,y)\geq 0$ $d(x,y)\geq 0$ iff $x=y$ $d(x,y) = d(y,x)$  But I am stuc at the 4th property:  $d(x,y) \leq d(x,z) + d(z,y)$ (The triangle inequality)  Thus far I came to: $|\frac{1}{x}-\frac{1}{z}| + |\frac{1}{z}-\frac{1}{y}| = |\frac{1}{z}-\frac{1}{x}| + |\frac{1}{z}-\frac{1}{y}|$ But now I am stuk. I understand that this is probably a basic question but I am new to the world of Real Analysis.


Interpretation interaction term with a dummy variable in it


I need to trigger an action (a 30 frames animation) attached to a nurbs path, made by keyframing the "evaluation time" in the curve menu. But it's not listed in the objects of my scene, I checked :      logic.scene = logic.getCurrentScene()      # print all the objects in the scene     for obj in logic.scene.objects:             print(obj.name)   It's confusing because it IS listed in the outliner along with the other objets..?  So how can I access my curve so I can use playAction()? Is there another way to acces an action in the scene?


What are the basic rules to put a logo in your photos without spoiling them?

What are the basic rules to put a logo in photos which are taken by you?  Where to add a logo that makes a picture more beautiful rather than spoiling it?


Why do we have two different types of phonons, ? Why are they called optical phonons?


I want to build my own dev board (mostly to understand some concepts), and I started from some schematics that I found on the internet, but I have some questions about this schematic:   Why do I need those 3 capacitors (C2, C3, C10) on the VCC pin of the atmel? And what is with those values?   If I change the values, will it affect the circuit?   If I remove those capacitors from circuit, will it affect it?


A circular field encloses maximal area for minimal perimeter

Suppose a farmer has a certain length of fence, $P$ and wished to enclose the largest possible area. What shape area should the farmer choose?  Answer is "circle".But, how is it derived?  MY TRY: My book says assume that farmer had to enclose rectangular area, and then proceed. So, I used Lagrangian and supposed that $x$ is length and $y$ is breadth and got that $x=y=\frac{P}{4}$, i.e. the area should be square. But, what if the constraint "rectangular area" is omitted? How to show that "a circular field encloses maximal area for minimal perimeter?"


"Why are there more of them" vs. "why is there more of them"

I was writing this sentence:     Why are there more of them on some nights than on others?   Is is or are correct here? I was told that is is correct, but to me, are sounds better.


What is the most stable/safest way to install MariaDB?


I closed an application, but the process remained in the list. I try to stop in from the task manager, but nothing happens. No error messages, process just stays in the list. I try to debug it, but the debugger says:     Unable to attach to the crashing process. The requested operation is not supported.     This happens with VS2008 and some other programs, sometimes.  How to terminate it?


How to get controls in WPF to fill available space?

Some WPF controls (like the Button) seem to happily consume all the available space in its' container if you don't specify the height it is to have.  And some, like the ones I need to use right now, the (multiline) TextBox and the ListBox seem more worried about just taking the space necessary to fit their contents, and no more.   If you put these guys in a cell in a UniformGrid, they will expand to fit the available space. However, UniformGrid instances are not right for all situations. What if you have a grid with some rows set to a * height to divide the height between itself and other * rows? What if you have a StackPanel and you have a Label, a List and a Button, how can you get the list to take up all the space not eaten by the label and the button?  I would think this would really be a basic layout requirement, but I can't figure out how to get them to fill the space that they could (putting them in a DockPanel and setting it to fill also doesn't work, it seems, since the DockPanel only takes up the space needed by its' subcontrols).  A resizable GUI would be quite horrible if you had to play with Height, Width, MinHeight, MinWidth etc.   Can you bind your Height and Width properties to the grid cell you occupy? Or is there another way to do this?


Why does not the Moon escape from the Earth?

We know that Gravitational Force that is applied by the sun on the moon is greater than that by the earth on the moon.  My Question is then why does not the moon escape from the earth and go towards sun?