I want to resize my picture, but there is always an error with displaying it.   How can I do it?    public class Panel extends JPanel {      private ImageIcon imgIcon;       public Panel(){         super();         File imageFile=new File("mar.jpg");          try {             BufferedImage bi = ImageIO.read(imageFile);             ImageIcon imgIcon = new ImageIcon(bi);             imgIcon = new ImageIcon(bi.getScaledInstance(400,400, Image.SCALE_DEFAULT));                 } catch (IOException e) {             System.err.println("error");             e.printStackTrace();         }          Dimension dimension=new Dimension(1400,1000);         setPreferredSize(dimension);     }     @Override     public void paintComponent(Graphics g){         Graphics2D g2d=(Graphics2D)g;         g2d.drawImage(imgIcon.getImage(),0,0,this);     } }


Toshiba Satellite P55-A: Cant boot from usb

For a few days now I have been trying to install Ubuntu (also tried Fedora, BackTrack, and Kali) onto an 8GB usb drive. The install always seems to go off without a hitch. Ive used unetbootin, univeral usb installer, lili, and live usb creator. The installs come out without any errors and instructs me to restart and select boot from usb.  That never worked so the next step i took was to reinstall (several times) and tried altering my BIOS setting to rearrange my boot order, disable secure boot, and change to CSM boot mode. I even tried turning off usb 3.0 to see if that could be a compatibility issue.  If anyone has any insight into this issue I would be more than willing to offer all needed information.  My laptop: Toshiba Satellite P55-A running windows 8.1 on 64 bit


How to solve complex resistor combinations like the one given?

What is the equivalent resistance between A and B?  I tried to spot which resistors are connected in parallel and which in series but I just couldn't reform the combination into a solvable one. So, I tried solving this using Kirchoff's current law:   Equation 1: I1 + I2 = I  Equation 2: I3 + I4 = I1  Equation 3: I2 + I3 = I5  Equation 4: I4 + I5 = I  Solving eq 1 and 2, we get  Equation 5: I3 + I4 + I2 = I  Solving eq 3 and 4, we get  Equation 6: I4 + I2 + I3 = I  This obviously gets me nowhere either so I'm stumped. The teacher simply said they are all connected in parallel so the equivalent resistance is R/5. But I don't see how.


Change default permissions for new files and folders

Every time I create a new file or folder in Linux, it is accessible for r/w by myself, not the group. I want to change my system setting such that every new file or folder will be automatically accessible by the group. Is there anyway?


PDO prepared statement with variable SELECT

my question is simple - I want to have variable SELECT but this doesnt work, probably because of param type casting. How can I make it work?  $statement = $pdo->prepare("SELECT :select FROM hp_data"); $statement->bindValue(":select", $_GET['polozky']); $statement->execute(); $rows = $statement->fetchAll();   Or is it safe to simply put SELECT into query? I guess it is not.  $pdo->prepare("SELECT {$_GET['polozky']} FROM hp_data")   Thanks in advance.


windows is not booting after installing ubuntu 14.04.1 LTS

I installed ubuntu 14.04.1 along side windows7. i remember that i gave automatic resizing of parition while installing ubuntu. Now i am unable to boot windows 7. on the boot screen i am having the following..  *ubuntu Memtest Memtest windows 7   Can you please help me to boot windows 7.


Find the value of $\frac{\frac 12 . \frac 22}{1^3} + \frac{\frac 22 . \frac 32}{1^3 + 2^3} + \frac{\frac 32 \frac 42}{1^3 + 2^3 + 3^3}$ upto n terms

For the numerator nth term will be $$\frac n2 . \frac {n+1}{2}$$ $$=\frac{n^2+n}{4}$$  For the denominator, nth term will be  $$1^3 + 2^3 + 3^3 .....n^3$$ $$\frac{(n^2)(n+1)^2}{4}$$  So, the nth term of the whole series will be  $$T_n=\frac{1}{(n)(n+1)}$$  So, it’s sum will be  $$\sum T_n =?$$  I can’t solve further. What should I do now?  EDIT  AS Moustafa Ayaz correctly pointed out, the expression can be written as   $$\sum \frac 1n - \sum \frac {1}{n+1}$$  Had n been in th numerator, it would have been fairly easy to solve, but because it’s not, I am having trouble in simplifying It. What should I do next?


Irreducible polynomial of degree 3 in Z5

I am trying to find an irreducible polynomial of degree 3 in Z5 and then use that polynomial to construct a finite field. I found that the polynomial $x^3 + x^2 + 1$ is irreducible in Z5 (since none of 0, 1, 2, 3,4 are roots). But I'm stuck on how to use that polynomial to construct a finite field.


Two GPU's - one for rendering the game, and one for driving the display

Ok so in my computer I have two GPU's. One of them is the higher performance AMD GPU (which I want to use to render games) and the other is an old low-end NVIDIA GPU which I use to run my monitor (Apple Cinema Display).  Is it possible to run the monitor from the old gpu with the right connectivity, and then do all of the graphics rendering on the card which won't be running any displays?


Preamble \usepackage[style=apa]{biblatex} \defbibheading{bibliography}[\bibname]{\section{#1}} \addbibresource{sources.bib} % replace this with your actual bibfile name \usepackage{csquotes}  Document \parencite{wikiparsing} \printbibliography  sources.bib @misc{wikiparsing, author = {Wikipedia}, title = {Parsing}, howpublished = {\url{https://en.wikipedia.org/wiki/Parsing}}, month = {}, year = {2020}, note = {Zuletzt aufgerufen am 13.06.2020} }  Log  Data structure  Comment I am using TexStudio as editor. Leistungsüberwachung This is BibTeX, Version 0.99d (TeX Live 2020/W32TeX) Capacity: max_strings=200000, hash_size=200000, hash_prime=170003 The top-level auxiliary file: cs_workshop.aux I found no \citation commands---while reading file cs_workshop.aux I found no \bibdata command---while reading file cs_workshop.aux I found no \bibstyle command---while reading file cs_workshop.aux You've used 0 entries,             0 wiz_defined-function locations,             83 strings with 496 characters, and the built_in function-call counts, 0 in all, are: = -- 0 > -- 0 < -- 0 + -- 0 - -- 0 * -- 0 := -- 0 add.period$ -- 0 call.type$ -- 0 change.case$ -- 0 chr.to.int$ -- 0 cite$ -- 0 duplicate$ -- 0 empty$ -- 0 format.name$ -- 0 if$ -- 0 int.to.chr$ -- 0 int.to.str$ -- 0 missing$ -- 0 newline$ -- 0 num.names$ -- 0 pop$ -- 0 preamble$ -- 0 purify$ -- 0 quote$ -- 0 skip$ -- 0 stack$ -- 0 substring$ -- 0 swap$ -- 0 text.length$ -- 0 text.prefix$ -- 0 top$ -- 0 type$ -- 0 warning$ -- 0 while$ -- 0 width$ -- 0 write$ -- 0 (There were 3 error messages)


Making images from single.php pointing to an attachment .php template

I am trying to make the inserted images from a post (single.php) to point to (single-attachement.php) an attachment page. So far I checked a post here on stackexchange and added this code on the top, before the header of single.php, just that it's showing me a link to the last image on the page, instead of modifying the structure of the image link.  if ( $attachments = get_children( array( 'post_type' => 'attachment', 'post_mime_type'=>'image', 'numberposts' => 1, 'post_status' => null, 'post_parent' => $post->ID ))); foreach ($attachments as $attachment) { echo wp_get_attachment_link( $attachment->ID, '' , true, false, 'Link to image attachment' ); }


How can I use Bengali script in an English document?

I am a Linguist and I need to use Bengali script inside an English article which is predominantly English. I have found many answers but they only seem to be useful when the whole document is in Bengali. I should mention that I use the following:  Tex-editor:  Texmaker  Library: MikTex  Package: Tipa  Compiler: LuaLatex  Let me describe the problem: for example when I start my document as:  \documentclass[10pt,a4paper]{article}  \usepackage{tipa}  \begin{document}  x, y, z whatever....   আমি  \end{document}   It doesn't show any error and the pdf looks fine except the Bengali letters just disappear.  Please help.


Comment authors are not getting migrated

Background: when question is migrated from site A to site B and the author doesn't have account in site B, their name will appear "gray" until they log in to site B and associate the accounts, then the avatar show and all is good. No problems here, same for answers and their authors. Problem: if user from site A posted comments while the question was still in site A, their name will stay gray and unclickable even after they logs in and have account in site B:  , but most likely it's global problem, not specific to that one occurrence.


why some php code doesn't have "php" in "<?php"

I know this is probably a noob question but I really can't figure this out.  I was ask to modify the existing php code so I downloaded the code and try running on my machine but i can't get it to work.  from my understand we write php code in  <?php //some code ?>   but this code that i downloaded uses php code like this  <? //some code ?>   It doesn't work on my machine but it works on the production server.  Does anyone know how this works?  Update:  Looking at the code in details, this is example of the code  <?php include $_SERVER["DOCUMENT_ROOT"]."/pages/layouts/summary.php";  ?>   then in summary.php  <? session_start(); require_once $_SERVER["DOCUMENT_ROOT"]."/includes/mysql.php";  require_once $_SERVER["DOCUMENT_ROOT"]."/includes/functions.php";  //more code ... ?>


Connecting an always on LED to a raspberry pi

I'm new to electronics, so I thought I'd start simple and just connect an LED to the GPIO on the raspberry pi, to pin 1 (3.3v) and the ground pin. But I'm having trouble calculating the resistor I need. On many websites it says the resisitor I need is about \$300\Omega\$, such as this one , but none of the websites explain how to get to this value. I did physics at school and used the formula \$V=IR\$, and know that current is the same in all places in a series circuit.   The LED I have didnt come with any data, but looking on the Internet it suggest that the voltage drop across green LEDs is about 2.2v, and the max current is 20mA.  So the resistor will have a drop of 1.1v (the 3.3v from the source minus the 2.2v dropped across the LED), and the current through it should be 0.02A, so I did:  $$R=\frac{V}{I}$$ $$R=\frac{1.1}{0.02}=55\Omega$$  which is nothing like the \$300\Omega\$? what am I doing wrong or misunderstanding?


Theorem 3.37 in Baby Rudin: $\lim\inf\frac{c_{n+1}}{c_n}\leq\lim\inf\sqrt[n]{c_n}\leq\lim\sup\sqrt[n]{c_n}\leq \lim\sup\frac{c_{n+1}}{c_n}$

Here's Theorem 3.37 in the book Principles of Mathematical Analysis by Walter Rudin, third edition:      For any sequence $\{c_n\}$ of positive numbers, $$\lim_{n\to\infty} \inf \frac{c_{n+1}}{c_n} \leq \lim_{n\to\infty} \inf \sqrt[n]{c_n},$$ $$ \lim_{n\to\infty} \sup \sqrt[n]{c_n} \leq \lim_{n\to\infty} \sup \frac{c_{n+1}}{c_n}.$$    Now Rudin has given a proof of the second inequality. Here's my proof of the first.      Let $$\alpha = \lim_{n\to\infty} \inf \frac{c_{n+1}}{c_n}.$$ Then $\alpha \geq 0$. If $\alpha = 0$, then we're done since $$\lim_{n\to\infty} \sqrt[n]{c_n} \geq 0.$$ So we suppose that $\alpha > 0$ and choose a real number $\beta$ such that $0 < \beta < \alpha$. Then by the result analogous to Theorem 3.17 (b), there is an integer $N$ such that $n \geq N$ implies $$ \frac{c_{n+1}}{c_n} > \beta,$$ which in turn implies $$c_{n+1} > \beta c_n.$$   So for each $n \geq N$, we have    $$c_n \geq  \left( c_N \cdot \beta^{-N} \right) \cdot \beta^n. $$   Thus, for $n \geq N$, we have $$\sqrt[n]{c_n} \geq \beta \sqrt[n]{  c_N \cdot \beta^{-N}  }.$$      Then taking the limit inferior of both sides, we get    $$\lim_{n\to\infty}\inf \sqrt[n]{c_n} \geq \lim_{n\to\infty} \inf \left( \beta \sqrt[n]{ c_N \beta^N} \right) = \lim_{n\to\infty} \left( \beta \sqrt[n]{ c_N \beta^N} \right) = \beta \cdot 1 = \beta$$   by Theorem 3.20 (b).       Thus we have shown that for any (positive) real number $\beta$ such that $\beta < \alpha$, we have $$\beta \leq \lim_{n\to\infty} \inf \sqrt[n]{c_n},$$    which implies that $$\alpha \leq \lim_{n\to\infty} \inf \sqrt[n]{c_n},$$ as required.    Is the above proof correct? If so, then is my presentation good enough? If not, then where does the problem lie?


issue when promoting a second server as domain on r2 2008

I'm in an odd situatuion here,  I've upgraded my network to a 2008 domain from a 2003 with out any issue, this works fine and all the FSMO are in one DC,  I was about to install a second domain on a 2008R2 and this error is coming up again and again.  I The problem is I keep getting an area telling me that I need to run adprep /domainPrep /forestPrep, but when I run it on the First DC, it tells me this has already been run and updated and it is aborted. Does anyone have any ideas on why I can't add a Server 2008 machine as a domain controller?


Turn this discord bot piece of code more simple

I'm struggling to get this code more simple but Python is case-sensitive a lot. Is there to turn this code cleaner???? @client.event async def on_message(msg):     if 'Marcelo' in msg.content:         print('Keyword found in message')         await msg.channel.send("oh this shit again!")     if 'marcelo' in msg.content:         print('Keyword found in message')         await msg.channel.send("oh this shit again!")     if 'MARCELO' in msg.content:         print('Keyword found in message')         await msg.channel.send("oh this shit again!")


Fantasy short story, late 1990s, man with magical ability controlled by "Mistress" who serves as his conscience

I read this short story in a fantasy / horror? anthology in 2002, I think the story is from the 1990s.   In a foresty world there is a man who has powerful magic but the mind of a child. He (and others like him) have no conscience. They're not evil, they just do things they shouldn't and think it's funny.   In this world the people (villagers?) have a solution. At a young age they bond boys who have magic to a "mistress" who is like a dominant wife to him and serves as his conscience. She tells him what to do and he obeys her. This way society gets the gift of his magic without the destruction he would cause if he were left to his own devices.   In the story the woman he is bonded to (they have been bonded for many years and she is fond of him) finds out that she is dying. They have sex one last time and she lets him give her a fantabulous orgasm with his magic (she does not normally allow this) and then she kills him. It was poignant and sad but she had to kill him because she couldn't risk him living without her controlling him.   One other scene I remember is when she's gone for a few days and one of the villagers comes and asks him to magic something for him, and he did it but in a maliciously compliant way. I want to say it was fire ants? It was an example of the harm he could do if left unchecked.   The title of the story may have been a made up word for the female character's role - e.g. "Mistrix" (mistress + dominatrix) or something like "goodwife".   This has been bugging me for years I hope someone remembers it!


wordpress register nav menu not showing in admin

I am using the following code to register a menu for my theme. In functions.php I have written the following:  register_nav_menu( 'header-menu', __( 'Header Menu' ) );   When going into wp-admin >appearance > menus, the menu is not showing up.  Can anyone telll me what I am doing wrong?


How do I rotate a group of vertices without deforming its shape?

Does anybody know the hotkey combination to rotate a group of vertices 45° in edit mode without deforming the cylinder shape? I forgot this important tool, I remember that I could constrain the axes with the Alt key.    BTW see below the screen shot to understand better what I would like to achieve:


If the data is not normally distributed and the skewness is = 0.208 SE of skewness is 0.144 , is it acceptable to use t-test?

The sample size is 288 and by Shapiro- Wilk test the data is not normally distributed.


This is the code:  \documentclass[sttt]{svjour}  \usepackage{graphics}  \begin{document} % \title{Title}  \author{Author} % % \institute{Institute} % \date{Received: date / Revised version: date}  \maketitle % \begin{abstract} Like NSSTs, functional NSSTs also allow non-deterministic transitions, but produce the same  output string for every successful run on a given input. Like NSSTs, aaaa aa functional NSSTs also allow non-deterministic transitions, but produce the same  output string for every successful run on a given input.  \end{abstract} % \section{Introduction} \label{intro} Your text comes here. Separate text sections with \section{Section title} \label{sec:1}  \subsection{Subsection title} \label{sec:2}  \end{document}   This is the output:    The text flowing out of the column due to hyphen. What is the solution to this?


How to turn a string into commands in c?

In c is there a way to turn a string into commands? For example:  void x(string n){    //do something } void y(int n){    //do something } void z(int n){    //do something } stringForConvert="z(10);y(2);x(\"Its cool\");"; mysteryCommand(stringForConvert);   Please note that i don't have luxury for writing to another file and compiling it.


How did Peter, the surname, Johnson, and the nicknames for William(Willy) and Richard(Dick), come to mean penis?  Was the first instance of these usages, related to a specific person?  Are there more examples in this area? Is this exclusive to English?


Tic Tac Toe function not defining variable correctly

I'm building a Tic Tac Toe game as practice for an intro-to-Python course I'm taking on Udemy.  I have a series of functions built right now but I can't get two of them to work together.  When I run these two functions I get an error saying the first_player is undefined.  However, first_player is defined in the first function.  Does anyone know why Python won't recognize what first_player is in the second function? If these functions work correctly I'd expect it to as the first player if he/she wants to be X's or O's and then have Python assign X's or O's to player 1 and player 1. In the choose_first player() I've tried printing out the first_player variable and it prints correctly. The code I'm using is below: #Randomly chooses which player goes first. def choose_first_player():     import random     first_player = (str(random.randint(1,2)))      if first_player == '1':         print("\nPlayer " +first_player+ " goes first.")     if first_player == '2':         print("\nPlayer " +first_player+ " goes first.")  choose_first_player()  #Asks first_player if they want to be X's or O's. def player_input():      marker = ''      while marker != 'X' and marker != 'O':         marker = input("\nPlayer" +first_player+ " , do you want to be X's or O's?  Please enter X or O: ").upper()      player1 = marker      if player1 == 'X':         player2 = 'O'     else:         player2 = 'X'         player1 = 'O'      print("\nPlayer 1 is: " + player1)     print("Player 2 is: " + player2)     return(player1,player2)  player_input()


I know the term kite from WoW, there it means letting the enemey move around and prevent it from dealing damage.  Yesterday, someone in LoL said: "omfg udyr kite freakin ezreal!"  I dont get this, I mean you cant kite a  range based damage dealer and anyway, its another online player not an NPC so Id like to know what kite means in LoL?


How well are professors paid at Hogwarts?

Just kind of a curious question that came to mind while looking at  about who gifted Harry the Nimbus 2000 (a fairly expensive broom at the time, I would imagine) which says it was McGonagal who gave it to him (although apparently through the school, while reading more and the linked non-dupe question).    Although I suppose she didn't pay for it herself, it still got me thinking... Compared to other professions in the wizarding world, how well are the professors paid? I cannot recall anything in either the books (which I have not read in some time) or the films, where they ever talk about their salary.


I have a huge table (10 columns and 6000 rows) and I have to make an average of all the rows only if they have the same pattern in column 3 (ko). My table contains numbers and strings.   Here's an example:  pvalue  padj    ko  pathway 17,14   0,01    ko00620 Pyruvatemetabolism 15,76   0,01    ko00620 Pyruvatemetabolism 13,22   0,00    ko00620 Pyruvatemetabolism 12,40   0,00    ko00051 Fructoseandmannosemetabolism 12,03   0,01    ko00051 Fructoseandmannosemetabolism   I would like to obtain something like this  pvalue  padj    ko  pathway 15,38   0,01    ko00620 Pyruvatemetabolism 12,22   0,00    ko00051 Fructoseandmannosemetabolism


Ubuntu 14.04 on Lenovo g400 cannot boot normally

I have been trying to use Ubuntu 14.04; before that I was trying 13.10, but due to the hardware structure of my Lenovo g400 Intel® Core™ i5-3230M CPU @ 2.60GHz × 4 and VESA: Intel® Sandybridge/Ivybridge Graphics I can't get it to work.  I am able to boot only in recovery mode because a normal boot is stopped by few flashes, a black screen and then a "Low Graphics Mode" window from which I can go nowhere.


Young's double slit experiment we can fire only one electron (particle) we can observed interference pattern? or required more than one particle to observed interference pattern?


Finding examples that works for vector spaces over a division ring

Does anyone have examples in mind that following statements are true for vector spaces over a division ring, but need not be true for modules over an arbitrary ring?  Every maximal linear independent set in a free module is a basis. Every minimal spanning set in a free module is a basis. Every quotient of a free module is free.


Confused with BCryptPasswordEncoder and salting

I read about BCryptPasswordEncoder here and I don't understand why this would be used rather than a hash+salt, there is no secret key involved all it takes to for an attacker to crack it is gaining access to the hash and using the algorithm's decode. I thought hash+salting required an external key as the additional layer of security so an attacker would require 2 pieces, the hash and the key.  Or are you suppose to use this then the salt in addition?  All the attacker has to do is run the .match with a password if they obtain the hash  BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); String password = ... // Password entered by user String dbPassword       = ... // Load hashed DB password  if (passwordEncoder.matches(password, dbPassword)) {  }   But with a key not stored in the hash an attacker wouldn't be able to just run a decoder against a string they'd need the external key. So how is this more secure than using an external key?


What is the probability that when you place 8 towers on a chess-board, none of them can beat the other.  Attempt: ${64 \choose 8}^{-1} \approx1$ in $4\ 400\ 000\ 000$  Correct answer: ${64 \choose 8}^{-1} \cdot 8! \approx 1$ in $9\ 000\ 000$.  I disagree with the $8!$. If there's combinations (binomial coefficient) in the denominator, why would there be permutations i.e. the order counts, in the numerator?


What is the difference between an axiom, hypothesis and a postulate?

What is the difference between an axiom, a hypothesis and a postulate? I'm a student of physics and not know much of philosophy. All I know is that axioms (for example, the axioms of Euclidean geometry) cannot be mathematically proved. But so does a postulate and a hypothesis.


How can I ensure my trip to the UK will not have to be cancelled because of Brexit?

I've got a trip planned to the UK in June. Due to brexit, I'm worried what changes may be introduced before my arrival.  I'm traveling on a EU / Polish passport. I'm going for a couple weeks of holiday.  Is there anything I can do right now to make it less likely any changes won't stop me at the immigration? For example, applying for some tourist visa which does not rely on the EU status?


Equivalent resistance of unbalanced Wheatstone Bridge

Equivalent resistance of a balanced Wheatstone Bridge is pretty simple: if the corresponding ratios are equal the just cancel the wire connecting the centre of two wires. But what if they are not equal? What if the cental wire remains in its position? What will be it's equivalent resistance then? I have tried to use the star delta transformation but it is becoming very complex. Can any one of you give a brief formula for calculating the resistance of unbalanced Wheatstone bridge, and of course show it from where it comes? [


How to install MathTime Pro 2 fonts on MikTeX

I have been trying for a long time now to install the  fonts on my system. (I am running MikTeX 2.9 under Windows 7, but what likely matters is "recent MikTeX, under Windows", which is general enough to be of interest to many people.) I've tried various things:   First step:  Merging the "texmf" directory structure into my MikTeX root directory ("C:\Program Files\MiKTeX 2.9") or registering a new root directory ("C:\Local TeX Files") and  putting mtpro2's "texmf" directory directly in there or putting the subdirectories of mtpro2's "texmf" directory in there   Second step: Running initexmf --edit-config-file updmap and adding the lines "# MathTimePro II" and "Map mtpro2.map" to the file. Third step: Running any and all of the following commands in various orders and combinations:  From the command prompt (always in Administrator mode (right-click -> "Run as administrator")): updmap, texhash, mktexlsr, initexmf --admin -u Accessing the MikTeX "Options" dialogue (via running MikTeX 2.9 -> Settings as Administrator) and then choosing both "Refresh FNDB" and "Update Formats"    None of this seems to work. Right now the error messages I get when trying to compile the enclosed sample file "MTPro2 LaTeX test.tex" is the following:     !pdfTeX error: pdflatex.exe (file mt2exf): Font mt2exf at 2400 not found      ==> Fatal error occurred, no output PDF file produced!   I have no clue what's happening. Also I hope I haven't cluttered the hash/database files with incorrect information in this process.  How do I install the MathTime Professional II fonts under MikTeX?


How can I render some things using SpriteBatch?  I tried to do in this way:  Main class  static SpriteBatch batch;  public void render() {     Renderer.drawThing(); }   Renderer class  static drawThing() {     main.batch.begin();     //drawing some things     main.batch.end(); }   And it throws a NullPointerException. What am I doing wrong?


I run this code and core dumped...   #include <string.h> #include <stdio.h> int main() {     char *a= "ls";     char *b= "ls -l";     char *t = strtok(b," \t");     if (!strcmp(a,t))         printf("EQU\n");     else         printf("NOT EQU\n"); }   But after I change char *b="ls -l"; to char b[]="ls -l", it works.  Why?  I know that One is an array, and the other is a pointer. But are they different for strtok?  And the manual page for strtok says that the first argument should be a char*.


Can I add a second 4GB DDR3 RAM on my laptop?

I have 4GB DDR3L RAM on my laptop according to my laptop's information provided by the brand's website. But when I checked using command on Ubuntu 20.04, it shows this is ddr3 ram. Now, my question is: can I add a second 4GB DDR3 RAM on my laptop or I have to add a ddr3l ram on my laptop?


C# How to fix DataGridView Cross-thread operation not valid

I want to populate 1 column with another column decrypted values, the code works once, but when i press the button again i get the error "Cross-thread operation not valid".      private DataTable LoadData()     {         var dt = new DataTable();         DataSet DS = new DataSet();         mySqlDataAdapter.Fill(DS);         dt = DS.Tables[0];         dataGridView1.DataSource = dt;          dt.Columns.Add("Key");         return dt;     }      //Thread - > How i can use the LoadData().Rows to not get the cross thread error ?     public void LoadKeyColumnValues()     {         try         {   //The error is here -> LoadData().Rows             foreach (DataRow r in LoadData().Rows)             {                r["Key"] = Decrypt(r.Field<string>("EncryptedColumn"));             }         }         catch (Exception _ex)         {             MessageBox.Show(_ex.ToString());         }         finally         {             LoadKeyColumn.Abort();         }      }


What does "to be the lowest common denominator" mean?

I'm not English and I never encountered this saying:     In almost all cases, it is possible and within reason to write   completely portable code.       In practice, this means that you shouldn’t assume much about the host   compiler (and Visual Studio tends to be the lowest common   denominator).   What's the meaning of the "to be the lowest common denominator" in a sentence? That it is a concept that applies for all or something else?  Also: I'm not sure  answers my problem, I read it but couldn't figure out the above sentence appropriately


I am not able to understand why the PN junction does not conduct when reverse biased. Can't electrons travel from the N side through the power supply to the P side where they can jump from one hole to other to traverse the P side and then cross the depletion layer back in to the N region ?


I noticed something odd while messing around on my calculator.  $$\lim_{n\to \infty} \cos^n(c)=0.7390851332$$ Where $c$ is a real constant.  With $$\cos^n(c) =\underbrace{\cos \circ\cos \circ\cos \circ \cdots \circ \cos \circ \cos}_{n \text{ times}}(c)$$  My calculator is in radians and I got this number by simply taking the cosine of many numbers over and over again. No matter what number I use I always end up with that number. Why does this happen and where does this number come from?


Is it OK to change mistakes/typos when you are in the minor revision stage of publication?

What I mean is to change mistakes/typos other than the proposed changes your reviewers pointed out to you.  As this article is based on a previous thesis (which had a very similar focus, only it was oriented towards a different cultural context) I've noticed a few paragraphs that could use a clean up (for example it would help to clarify that I use a certain term because it is related to the administrative divisions in my country,etc.).  I also noticed a typo on one of the results on the table that got carried over to the abstract. It doesn't change the results or findings or anything, basically it's just a decimal that should be lower.  My question is, would it be OK to change them now? And in case it was should I let the reviewers know I cleaned it up or go through each change, besides the ones they asked me to do, obviously.


When reading an English sentence containing a word with foreign origin, should one try to read it with pronunciation from the original language?

Say I am reading the following sentence:     Tokyo has served as the Japanese capital since 1869.   For the word Tokyo, if I happen to know how to pronounce it in Japanese (the pronunciation is similar to, but different from, the pronunciation in English), should I pronounce it in the Japanese way or the English way?


Is English the only language that always capitalizes "I"?

Is English the only language where "I" is always capitalized, no matter where it occurs in a sentence? The other two languages that I'm familiar with don't do this.  In German, "ich" is only capitalized at the start of a sentence; the same is true for "yo" in Spanish.  If English is unique in this regard, or even if among a subset of languages that do this, is there a historical reason behind it? A philosopical or cultural one, or...???


How do we know that entanglement allows measurement to instantly change the other particle's state?

I have never found experimental evidence that measuring one entangled particle causes the state of the other entangled particle to change, rather than just being revealed.  Using the spin up spin down example we know that one of the particles will be spin up and the other spin down, so when we measure one and find it is spin up we know the other is spin down. Is there any situation after creation that the particle with spin up will change to spin down?


To download something ON or ONTO a device?

I've seen both these forms used and I was wondering, is either of them incorrect or are they interchangeable?     You can download something ON your device.      You can download something ONTO your device.


How to convert a date String to a Date or Calendar object?

I have a String representation of a date that I need to create a Date or Calendar object from. I've looked through Date and Calendar APIs but haven't found anything that can do this other than creating my own ugly parse method. I know there must be a way, does anyone know of a solution?


Book where wolf like aliens attack a human spaceship and leave them stranded on their home world where gravity is twice as strong as Earth's

There was a book that I read 2 years ago but I can’t remember what it was called!  It starts with a space vessel leaving a sector of space, I think it was a carrier full of scientists? But while they are out the captain knows of a ship that was lost in the sector they are jumping to. As they reach the sector some aliens board the ship, kinda wolf like and they rush around really fast and are twice as strong. As if they were used to a stronger gravity. As they start to take over the ship, making their way to the bridge, the captain quickly orders a ship wide panic, having everyone hide. The unknown creatures take over the ship and order their captain to take them back to the creatures homeland.   They arrive at the homeland and gravity is 2 times as harsher compared to what humans were used to, and they have to fight a lot of the the creatures they don’t even know about as the Wolf like creatures leave them on their planet so they can duel them when they return. I don’t remember anything to much past that in the rest of the series, other than they meet and make peace with a sabertooth like cat on the world, and they start to genetically modify themselves so they can work better on the world, and having children who are used to everything and are twice as fast. The kids learn how to work the alien space ship that was left behind and they all start to rush back to Earth with their new abilities to stop them from attacking the sector before they reach Earth.


Enabling the Comment module, I get WSOD everywhere.  Suspecting insufficient memory, I have added to sites/default/default.settings.php the following statement :  ini_set('memory_limit', '128M');   After stopping/relaunching the MAMP servers, under phpMyAdmin I emptyed every table in the DB, then reimported the latest Backup & Migrate backup,  then trying again to enable Comment : WSOD :-(  The log file is pretty cryptic to me :  [25-Nov-2014 19:50:46 Europe/Berlin] PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /Users/Gil/Documents/MAMP/des_gens_f/includes/database/database.inc:2171 Stack trace: #0 /Users/Gil/Documents/MAMP/des_gens_f/includes/database/database.inc(2171): PDOStatement->execute(Array) #1 /Users/Gil/Documents/MAMP/des_gens_f/includes/database/database.inc(683): DatabaseStatementBase->execute(Array, Array) #2 /Users/Gil/Documents/MAMP/des_gens_f/includes/database/database.inc(2350): DatabaseConnection->query('SELECT expire, ...', Array, Array) #3 /Users/Gil/Documents/MAMP/des_gens_f/includes/lock.inc(167): db_query('SELECT expire, ...', Array) #4 /Users/Gil/Documents/MAMP/des_gens_f/includes/lock.inc(146): lock_may_be_available('schema:runtime:...') #5 /Users/Gil/Documents/MAMP/des_gens_f/includes/bootstrap.inc(424): lock_acquire('schema:runtime:...') #6 /Users/Gil/Documents/MAMP/des_gens_f/includes/bootstrap.inc(446): DrupalCacheArray->set(Array) #7 [internal function]: DrupalCacheArray- in /Users/Gil/Documents/MAMP/des_gens_f/includes/database/database.inc on line 2171   I've edited the Applications/MAMP/Library/support-files/my-*.cnf files (there are five, ignoring the one that applies, I deited each one). Editing the default max_allowed_packet = 1M (thanks Clive for the links), I tried successively 16M, 32M, 64M, 128M, 256M and 512M. Still getting the same log :-(  It's my first Drupal project. Any track from someone more MySQL/PHP savvy than I ? Thanks.


Traveling to Italy with Dual US/DE Citizenship

I haven't been able to find a straight answer on this anywhere. I have dual US/German citizenship. I know that I have to enter and exit the US on the US passport and the EU on the German one. But where exactly do I "exit" the United States?  There is no passport control for departures in the United States. And based on what I've read, airlines send your check-in information to your destination. So when flying to Italy, I'd have to scan my German passport at airline check-in because I'd be using that one to enter Europe. Is that correct? How do other dual US/EU citizens deal with this? I want to be sure I do it the right way on an upcoming trip. It's been years since I've flown internationally, so there was always a person I could show both to at check-in, but I've heard from friends that now it's all just kiosks and that the people at the counters don't check you in - they just direct you back to the kiosks.   Edit: The thing that's confusing me about previous threads on the topic is that many, including the one someone said my question is a duplicate of, say to show both at check-in in the United States. Kiosks only allow you to show one, so which one?


Dependency errors while installing Zoom on Ubuntu 20.04

I just upgraded to Ubuntu 20.04, I am trying to install zoom from , I wasn't able to install it through the "Ubuntu Software"     So I went to terminal using sudo dpkg -i zoom_amd64.deb It gave the following error  Selecting previously unselected package zoom. (Reading database ... 187653 files and directories currently installed.) Preparing to unpack zoom_amd64.deb ... Unpacking zoom (5.0.413237.0524) ... dpkg: dependency problems prevent configuration of zoom:  zoom depends on libgl1-mesa-glx; however:   Package libgl1-mesa-glx is not installed.  zoom depends on libegl1-mesa; however:   Package libegl1-mesa is not installed.  zoom depends on libxcb-xtest0; however:   Package libxcb-xtest0 is not installed.  dpkg: error processing package zoom (--install):  dependency problems - leaving unconfigured Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for desktop-file-utils (0.24-1ubuntu2) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for shared-mime-info (1.15-1) ... Errors were encountered while processing:  zoom   My PC info:  $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 20.04 LTS Release:    20.04 Codename:   focal


I have web hosted a site on Linux server. On server I am getting an error message in the log file as mentioned.  Now my question is how to handle session on Linux server, because on all the pages it's considering Session == null only, not sure why.  For below line: if (sessionUID.equals(rs1.getString("userid")))  Stacktrace:] with root cause java.lang.NullPointerException     at org.apache.jsp.iframehomemiddle_jsp._jspService(iframehomemiddle_jsp.java:544)     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)     at java.lang.Thread.run(Thread.java:745)   This is how I am sending session from Servlet to JSP:  if (rs1.next()) {     HttpSession session = request.getSession();     session.setAttribute("USERID", rs1.getString("userid"));     request.getRequestDispatcher("HomePage.jsp").include(request, response); }   And this is how I am handling session in JSP:  <%     response.setHeader("Cache-Control", "no-cache"); //Forces caches to obtain a new copy of the page from the origin server     response.setHeader("Cache-Control", "no-store"); //Directs caches not to store the page under any circumstance     response.setDateHeader("Expires", 0); //Causes the proxy cache to see the page as "stale"     response.setHeader("Pragma", "no-cache"); //HTTP 1.0 backward compatibility          String sessionUID = (String) session.getAttribute("USERID");     if (null == sessionUID) {         request.setAttribute("Error", "Session has ended. Please login.");          %>  <script>window.location = "LoginPage.jsp";</script><%     } %>


US tourism/business visa from non-resident country

I applied for multiple visas before (not US visa), but all of them were from my residence country. In all of these cases, I can get official paper which support my evidence (bank statement, letter which states I am employed with high salary, marriage certificate, security clearance, ...).  It is the same question as , but I am not residing; I have a business visa.  case-specific details: I am from Egypt, I have business visa for Ireland. While in Ireland, I want to apply for US business visa.  Why not to apply from Egypt? Because the waiting time is too long (75 days). The waiting time in Ireland in only 18 days. Both visits (Ireland, US) are short visits (3 weeks for each).


What methods can I use to create balance and consistency between a group of differing logos?

A regular challenge that I face is balancing two (or more) logos. Whether they need to be equal or one needs to be given priority. Some logos however might be squares, others rectangles, circles, etc...   As a quick sample I snagged a nice high resolution photo from  and pretend its going to be an advertisement that needs to show some footwear brand logos on it. In this case I used Adidas and Saucony.  This is certainly not balanced even though they're height is the same:    Likewise this is not balanced even though they're width is the same:    So then the question becomes when are they in balance, is this balance:    Maybe a little more adjustment, is this balance:    And in these examples I'm only working with two Black Logos. Factor in color and it can get even more difficult to balance. Another issue being when there's tiny text as part of the logo.  So the question is, other than estimating / eye-balling it, what tips, methods or even tools are there to balance different sized logos?


Scale mixture of normals; t-distribution; proving marginal distribution equality

This is a review-type homework question that I'm very much stuck on.  Basically, these are the assumptions:   $\theta|\lambda = N(\mu,\frac{\sigma^2}{\lambda})$ $\lambda = \rm{Gamma}(\nu/2,\nu/2)$ $\theta=t_{\nu}(\mu,\sigma^2)$   Giving us:   $p(\theta|\lambda) = \frac{\sqrt{\lambda}}{\sqrt{2\pi}\sigma} \rm{exp}\{-\frac{\lambda(\theta - \mu)^2}{2\sigma^3}\} $ $p(\lambda) = \frac{1}{\Gamma(\nu/2)} \lambda^{\frac{\nu}{2} - 1} \rm{exp}\{-\frac{\nu}{2}\lambda\}(\nu/2)^{\nu/2}$   Then comes the part I can't seem to prove: obtaining the marginal distribution of $\theta$. Here's what I get so far:   $p(\theta)=\int_0^\infty p(\theta|\lambda)p(\lambda) \hspace1ex d\lambda$ $p(\theta)=\int_0^\infty p(\theta,\lambda) \hspace1ex d\lambda$ $p(\theta,\lambda)=p(\theta|\lambda)p(\lambda)$ $p(\theta|\lambda)p(\lambda)=\frac{\sqrt{\lambda}}{\sqrt{2\pi}\sigma} \rm{exp}\{-\frac{\lambda(\theta - \mu)^2}{2\sigma^3}\} \frac{1}{\Gamma(\nu/2)} \lambda^{\frac{\nu}{2} - 1} \rm{exp}\{-\frac{\nu}{2}\lambda\}(\nu/2)^{\nu/2}$ $p(\theta)=\frac{1}{\Gamma(\nu/2)}(\nu/2)^{\nu/2} \int_0^\infty \frac{\sqrt{\lambda}}{\sqrt{2\pi}\sigma} \lambda^{\frac{\nu}{2} - 1} \rm{exp}\{-\frac{\nu}{2}\lambda\ -\frac{\lambda(\theta - \mu)^2}{2\sigma^3}\} \hspace1ex d\lambda$   And now I'm stuck... The notes say I should be able to obtain the following "after some algebra" but I'm totally clueless:   $p(\theta) = \frac{\Gamma(\frac{\nu+1}{2})}{\Gamma(\nu/2)} \frac{1}{(\pi\nu\sigma^2)^{1/2}} \frac{1}{[1+\frac{1}{\nu}(\frac{\sigma-\mu}{\sigma})^2]^\frac{\nu+1}{2}}$   Any help/clues in the right direction would be much appreciated!


Should Factory Reset return the phone to the original version Android installed on it?

I tried factory resetting a Samsung Galaxy S6.  To my surprise, it left Android 7.0 on it, and didn't reset it to Android 5, which is what was originally installed from the factory.  Is this normal?  Is there a way to make factory reset force the phone to return to the original factory ROM?  UPDATE  For those curious as to why I would want to return to the original factory ROM, it's because when I take photos (even after a Factory Reset), I sometimes get a "Server Error".  I'm thinking that perhaps a bad ROM update is causing this issue, as I've already had the camera replaced by Samsung.  So I was interested in returning to the original factory ROM, and then upgrading it again to the latest version.


I am using Ubuntu 16 to run an old code written in Fortran. I get this error when running the "make" command (I have a "makefile"):  "f77: Command not found"  I have tried installing others such as gfortran or g77, but they do not resolve the issue. I guess I need the exact f77 package to do so, which seems unavailable in Ubuntu 16. Any idea how to get this package?  Thanks,


Is there a difference in the pace of time between the two cases described below?

Imagine a person sitting on a very high chair. To be more specific, on a chair that has the same height as a satellite with a person aboard and which orbits the earth in a circular path. Let's say the (arbitrary) height is 400 kilometer.  The person in the chair feels an upward e.m. force, while the person in the satellite feels no force at all. Is there a difference between the pace of time which the person on the chair experiences and the one which the person in the satellite experiences? Of course, the person on the chair has taken proper precautions. Let's not consider centrifugal forces.  This is not the same as asking for the pace of time in a satellite orbiting the earth in a circular orbit. The satellite is in free fall and tries to maximize the time passed, just like any other object in free fall (this is an approximation for low velocities; at high velocities, the curvature of space also comes into play). As the satellite is moving in an orbit of which every point has the same pace of time (faster as on the surface of the earth), the time moves at the same pace as the time at the height at which the satellite moves.   The extra thing I ask is if the pace of time for the man in the chair is different from the pace of time in the satellite. Since the man stays put at the height of the orbiting satellite, he is finding himself in a point in space where the time has the same pace as in all the points through which the satellite travels, so one is tempted to think there is no difference in the pace of time for both persons.  Is the slowing of time for the person in the free falling satellite due to its speed (if no gravity were present it would travel in a straight line with the same velocity as in the circular orbit) so it would in that case be a special relativistic effect, while the slower pace in time for the man on the chair would be a general relativistic effect? In other words, can you use the special relativistic time dilation formula for a person (in a satellite) traveling in flat space with the same speed as the circular orbiting satellite (for low velocities)?


I asked this question . Some doubts emerged in my mind from the comments. Here they are:  Are time and the arrow of time, the same thing? All of modern physics, seems to treat time as just another dimension, except the very important distinction that time has only one direction. So, if there was no arrow of time but time still existed, would we be able to distinguish such a "time" from the spatial dimensions?


Dim oXL As Object         Dim oWB As Object         Dim oSheet As Object         ' Start Excel and get Application object.         oXL = CreateObject("Excel.Application")         oXL.Visible = True         ' Get a new workbook.         oWB = oXL.Workbooks.Add         oSheet = oWB.ActiveSheet         .........         oXL.Quit()         oWB = Nothing         oXL = Nothing         oSheet = Nothing   I can see the application opened in task manager ... Why ?


If a new question addresses the same issue that another question does, but the answers to the original question is sufficiently outdated, should the new question still be closed as a duplicate?


I have a mathematical proposition of the form "If $A$, then $B$". I'm thinking about this problem from several different perspectives, so I will segment these different perspectives into separate paragraphs as follows.   If I have a statement $A \implies B$ that is true by definition (no proof provided), is it then correct to say that the contrapositive statement $\neg B \implies \neg A$ (NOT $B \implies$ NOT $A$) must also be true, without providing any proof?  In other words, if $A \implies B$ that is true by definition, then does this imply that the contrapositive statement $\neg B \implies \neg A$ is also true by definition? Trying to think of this from the perspective of logic notation and truth tables, would it be correct to write that $(A \implies B) \implies (\neg B \implies \neg A)$? This way, since we know that $A \implies B$ is true, we must logically have (according to truth tables) that $\neg B \implies \neg A$ is also true, right?   I would greatly appreciate it if people would please take the time to clarify this.


ubuntu 18.04 how do I install drivers for my NVIDIA GeForce GTX 1050?

I installed Ubuntu 18.04 After installation, I rebooted the computer, entered the grub menu, pressed e in ubuntu added the nomodeset option and Ubuntu presented the Gnome interface in a resolution of 1024X768 telling me: Unknown Display. So my question is how to install the drivers for my NVIDIA GTX 1050 graphics card


I am a new cyclist who is on my 2nd year of biking. I bought a cheapo Schwinn MTB at Walmart to start with but now I want a real road bike. I currently have $2k saved up and am looking into a Specialized Secteur Exprt Disc which is aluminum. I did pick up a carbon frame bike at the shop and although it is lighter, not by much. How sturdy are these carbon frames? From what I've read they can crack if you get in a tumble, and at that point you are done. Vs an aluminum frame will more likely than not be OK. I'd have to spend over $1000 more to get a carbon frame and as good components (Shimano 105 or above) so I don't know if its worth it or not. I'm just a casual cyclist who likes to go on long solo rides for fitness/fun.


The  is very short and doesn't explain the concept very well, and there aren't any other sites that I can find that give a simple explanation. What does it mean by 100% modulation? I understand the basic concepts behind amplitude modulation, frequency modulation, and pulse width modulation, but I have never really understood what is meant by the "amount" of modulation or modulation depth.   Can somebody please shed some light on the subject?  Thanks!


Options for backing up photos and videos from Compact Flash card to external hard disk without laptops?

I would like to backup photos and videos in the Compact Flash memory card directly to connected USB 2.0 or IEEE1394 enabled portable disk drive.  As I will be photographing in remote region using my EOS 7D, I prefer not requiring a laptop as intermediate CPU to copy the files.


Does D&D Damage math work the same as Normal Math?

Noob Here,  Making a Beast Master Ranger for 5e, from the Revised Unearthed Arcana...thing. I have an ape and it says in the monster manual that he has   2 attacks both with a   Hit: 6(1d6+3) bludgeoning damage.  So math, I assume this means I roll a 1 D6, say I roll a 4, so the equation looks like 6(4+3) so that would equal 42 right?   Now because he's my pal he gets my +2 prof bonus.   so does that mean I  take that 42+2= 44? Or is it then 6(4+3+2) which would be 54?  OR!  does the original equation mean I roll a 1d6, 6 times and add 3 to each roll? And then add 2 to that?   Sorry if this seems a really dumb question, but I wanna get this right.


What happens when a comment is flagged for harassment?

What happens when a comment is flagged for being offensive or harassment, etc., and the flag is deemed helpful? Apparently the comment is deleted. Is there any message to the offending user? Are there any consequences for notorious offenders?  The question  explains how to flag comments, and what happens to flagged comments. It does not cover my questions above.


What is the proper way to change the DNS IP?

I suspect that the name server provided by my ADSL modem/router is buggy. Whenever I browse to a website for the first time in ubuntu, resolving the domain name takes at least 15 seconds.  To work around that problem, I changed the nameserver configuration in /etc/resolv.conf from 192.168.1.1 (my ADSL modem) to 8.8.8.8 (google's primary DNS). This seems to fix the problem, but unfortunately my changes to /etc/resolv.conf are overwritten by "NetworkManager" at each startup.  What is the proper way to configure the name server IP in ubuntu 10.4?


a specific sum of cube property(narcissistic number)

So I am currently doing a problem about narcissistic number and I need to prove that $a^3+b^3+c^3=a*10^{2n}+b*10^n+c$, where $a=1666..666, b=5000..00, c=33...333 $ and $a,b,c$ has $n$ digits. I am trying to do an induction and have observed that $3a+2=b$, $3c+1=2b$ and $a+b+c=10^n$; the difficult part when doing induction is I just cannot write the equation into $b$ and $n$ which would allow me to solve as I know that $b=(10^n)/2$. Is there any idea that is better than induction? Thanks in advance.


How to programmatically send SMS on the iPhone?

Does anybody know if it's possible, and how, to programmatically send a SMS from the iPhone, with the official SDK / Cocoa Touch?


Say I'm in a chat room, and the person I am trying to reach isn't there. I want to ping him and sort of invite him to the conversation. So essentially whenever that person gets logged into the Stack Exchange network he should get a ping notification in his inbox.  Is this possible or not actually possible at the moment?


How to plot clusters in more than 3 dimensions?

I have 100 data points, observed on 15 variables. I want to cluster my 100 observations, but I am unable to visualise 15-dimensional clusters in MATLAB.


Evaluate $\int_0^{\sqrt{5}} \sqrt{4x^4 + 16 x^2} dx$

$$\int_0^{\sqrt{5}} \sqrt{4x^4 + 16 x^2} dx$$  The square root really got me confused here. I've tried using the standard trick with $x = x + \sqrt{x^2+4}$ but failed. That might still be the best approach.  What's the best way to solve this and how to do it?


Unarmed strikes normally do damage equal to (1 + Str mod).  If I punch someone and have a -2 Strength modifier, will I technically heal the target by 1 HP?


Is it possible to wrap text in column headers in print composer tables using QGIS 3.x?

Is it possible to wrap text in the header of an attribute table in print composer in QGIS 3.x?  There are options for wrapping text in the cells within the body, but they don't seem to work for the headers. Other questions on stack exchange indicate it was not possible in previous versions, but all of the questions/answers are several years old, and there has been significant progress since then.  (This question, for example: ) I'm using version 3.8.3 (Zanzibar)  I've tried both adding \n to the attribute heading, and setting the "wrap text on" box to * and adding that to the header.  Both of these approaches work within the body of the attribute tables.


Train passport control from London to Paris

I'm a non-EU citizen, I will be travelling from London to Paris next month, so I was wondering since most countries track entry and leave dates, if I use the train to switch these countries and they don't control it, my UK visa will seem like entry YES but no leaving. Same for the Schengen, I wouldn't have an entry date but I'll be leaving,  Will it be trouble later? Are they controlling this on trains? If not is there anything I should do before?


uppercase greek letters in mhchem formulas gives error when compiling

I tried compiling a ~1 year old document today and noticed that I got an error when using a uppercase greek letter in a chemical reaction.   Here's an MWE (with an example from the mhchem manual):   \documentclass{article} \usepackage{mhchem} \begin{document} $\ce{x Na(NH4)HPO4 ->[\Delta] (NaPO3)_x + x NH3 ^ + x H2O}$ \end{document}   It should produce:   But instead gives an error:   ! Undefined control sequence. <argument> ...r_lower_case:f {Delta}}\prop_get:cV                                                    {l__chemgreek_uppercase_ma... l.4 ...PO4 ->[\Delta] (NaPO3)_x + x NH3 ^ + x H2O}   I've made sure my packages are up to date:   Package: mhchem 2015/11/29 v4.03 for typesetting chemical formulae   I'm guessing this package is important:   Package: chemgreek 2016/01/07 v1.0d interfaceforuprightgreeklettersforuseinchemistry (CN)   It doesn't make any different if I load mhchem in compatibility mode ([version=3]).  Last time I compiled my file correctly, I had version 3.21 of mhchem and chemgreek seem to not have been used by mhchem (not loaded in log file).  Package: mhchem 2015/03/13 v3.21 for typesetting chemical formulae   Can the error be reproduced on other machines?  Is it a known bug? Is there a quick-fix?    Here's the file list as requested by @JosephWright:   *File List*  article.cls    2014/09/29 v1.4h Standard LaTeX document class   size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)   mhchem.sty    2015/11/29 v4.03 for typesetting chemical formulae    expl3.sty    2016/01/03 v6358 L3 programming layer (loader)  expl3-code.tex    2016/01/03 v6358 L3 programming layer  l3pdfmode.def    2015/11/11 v6250 L3 Experimental driver: PDF mode l3keys2e.sty    2015/12/20 v6326 LaTeX2e option processing using LaTeX3 keys  l3regex.sty    2015/12/20 v6326 L3 Experimental regular expressions l3tl-build.sty    2015/12/20 v6326 L3 Experimental token list construction l3tl-analysis.sty    2015/11/09 v6244 L3 Experimental token lists analysis   l3flag.sty    2015/12/20 v6326 L3 Experimental flags l3str-convert.sty    2015/09/26 v6106 L3 Experimental string encoding conversio ns     calc.sty    2014/10/28 v4.3 Infix arithmetic (KKT,FJ)  amsmath.sty    2016/03/03 v2.15a AMS math features  amstext.sty    2000/06/29 v2.01 AMS text   amsgen.sty    1999/11/30 v2.0 generic functions   amsbsy.sty    1999/11/29 v1.2d Bold Symbols   amsopn.sty    1999/12/14 v2.01 operator names chemgreek.sty    2016/01/07 v1.0d interfaceforuprightgreeklettersforuseinchemis try (CN)   xparse.sty    2015/12/20 v6326 L3 Experimental document command parser graphics.sty    2016/01/03 v1.0q Standard LaTeX Graphics (DPC,SPQR)     trig.sty    2016/01/03 v1.10 sin cos tan (DPC) graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live   pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)  ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)   ifthen.sty    2014/09/29 v1.1c Standard LaTeX ifthen package (DPC) supp-pdf.mkii pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO) ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)    ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO) epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf   grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO) kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO) kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)   keyval.sty    2014/10/28 v1.15 key=value parser (DPC) kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO) etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)  ***********


How to enable iptables (instead of firewalld) services on RHEL 7 and Fedora 18?

The newest fedora has firewalld as new firewall aplication. I liked old iptables services. I want them back but have no idea how to do that. I have tried :  systemctl disable firewalld.service systemctl stop firewalld.service systemctl enable iptables.service systemctl enable ip6tables.service systemctl start iptables.service systemctl start ip6tables.service   But it does not work! Didn't find any help on wiki or google.  Disabling firewalld work ok, but when I'm trying to enable iptables.service I get:  systemctl enable iptables.service Failed to issue method call: No such file or directory


biblatex: Tighter integration of \textcite "in the flow of text"

This question led to a new feature in a package:      Many biblatex citation styles feature the \textcite command which is "intended for use in the flow of text, replacing the subject of a sentence" (manual, section 3.6.2). At the moment, this works well for citations of single works -- e.g. (assuming the authoryear style), one may write in the source  The reference work is \textcite{knuth:ct:a}.   which will be typeset as     The reference work is Knuth (1984).   Citing multiple works, on the other hand, is somewhat tedious. If one simply writes (1):  Important works are \textcite{knuth:ct:a,knuth:ct:b,markey}.   the output is rather a list than a correct sentence (2):     Important works are Knuth (1984); Knuth (1986); Markey (2005).   One has to write (3):  Important works are \textcite{knuth:ct:a}, \textcite{knuth:ct:b}, and \textcite{markey}.   to get (4):     Important works are Knuth (1984), Knuth (1986), and Markey (2005).   Can \textcite be modified so that input (1) will yield output (4), hereby achieving a tighter integration "in the flow of text"?  \documentclass{article}  \usepackage[style=authoryear]{biblatex}  \addbibresource{biblatex-examples.bib}  \begin{document}  This is how \texttt{\textbackslash textcite} currently works:\\ Important works are \textcite{knuth:ct:a,knuth:ct:b,markey}.  \bigskip  But I'd like \texttt{\textbackslash textcite} to output the following:\\ Important works are \textcite{knuth:ct:a}, \textcite{knuth:ct:b}, and \textcite{markey}.  \printbibliography  \end{document}


I used the Import Images as Planes addon to import an image. It works fine but how do I change the transparency? I want to animate the plane so that it fades in and out. Here is my current node setup:


Storing files and folders inside 'C:/Users/UserProfile' and accessing from Ubuntu from second hard drive

Windows8.1 is pre-installed in a 500GB HDD and then also installed Ubuntu14.04 in the second 256GB SSD for dual booting. Since planning to use Ubuntu as main OS, I want to store files in the larger space in the HDD while running OS from the SSD.   Now should I make a partition in the 500GB HDD for such storage purpose? If I make a folder, say 'LinuxStorage', as in 'C:/Users/UserProfile/LinuxStorage' and store all Linux files and folders in it, could it cause any problem? Thanks


Problem in moving Clash Royale account from android to iOS

I have installed the latest version of Clash Royale on both my devices (the old device and the new one which is iOS device).  Also both my devices are connected to a stable WiFi and my android is connected to Google Play & Google Play Games. My iOS device is connected to Game Center too.  I want to move my Clash Royale from my old Android device to my new iPhone I tried to follow the steps mentioned in the link below:    But unfortunately both of my devices do not show the Link device button.  My Settings section looks like below:    But the link says that it should look like this:    How can I fix this issue?


I am trying to create a short and simple animation. I have 2 scenes, one a coin with a logo on it, and the other with an abstract background. When I go into the compositor to render it, the coin with the logo is transparent and I don't know to to fix it.


Multivariable/Vector Calculus Textbook Recommendation Please!

S.E friends,  I am a college sophomore with a major in mathematics.  I am trying to self-study multivariable and vector calculus (they means the same, right?) and prepare for Summer course on multivariable calculus.  Our university uses a course packet for the multivariable calculus which is not theoretical enough to satisfy my curiosity.  I am seeking a textbook that covers both theories and applications, with more emphasis on theories.    I have been searching the forum and it seems there are sook good books on multivariable calculus:  Hubbard/Hubbard's Vector Calculus, Linear Algebra, and Differential Forms; Marsden/Tromba's Vector Calculus, Collier's Vector Calculus, and Lang's Multivariable Calculus.  I want to pick only one from them.  Could you help me?


I'd like to restart the GUI in Ubuntu 18 (using the standard Gnome interface), without rebooting. How can I do this?  I've found both these questions ( and ) but none seem to apply to Ubuntu 18 (sddm doesn't even seem to exist anymore).


Let $X$ be an inner product space, let $L\subset X$ be a vector subspace, let $x\in X$, let $d=\inf_{y\in L}\left\|x-y\right\|$, and let $y_1,y_2\in L$.  Could someone please provide a hint of how to show that  $$\left\|y_1-y_2\right\|\leq\sqrt{\left\|y_1-x\right\|^2-d^2}+\sqrt{\left\|y_2-x\right\|^2-d^2}\tag*{?}$$  I have tried the parallelogram law and orthogonal decomposition to no avail. The case where $x\in\overline L$ is straightforward.


Submission status changed to "submitted" after "awaiting reviewer scores"

I submitted my article to a SAGE journal roughly six weeks ago. The status of the submission was "awaiting reviewer scores" for four weeks and few days ago it changed to "submitted". Any idea what this means? Does it mean that the article is with the editor who goes through the reviewer comments? Or does it mean that the article has been sent for new reviewers? I have also checked the typical workflow of the journal, but was not able to find similar situation.


I'm looking for a script that counts files in the current directory (excluding sub directories). It should iterate through each file and if not a directory increment a count. The output should just be an integer representing the number of files.  I've come up with  find . -type f | wc -l   But I don't really think it does the whole counting bit. This is for an assignment so if you only want point me in the right direction that would be great.


writing values to file in C for queuing system

I wrote a piece of code for queuing system for a simulation. And I need to print some values to a txt file after compiling the code. I wrote the code for writing to files but although it creates the file, it does not print the values to my text file. If you can help I will appriciate. Here is the piece of code that I have...  #include<stdio.h> #include<time.h> #include<stdlib.h> #include<math.h>  int main() { float rho_start ; // start value of the utilization factor  float rho_end ; // end value of the utilization factor float rho_step ; // step value of the utilization factor float lambda ; // ratio of customers and time float N ; // mean number of customers in the system float Q ; // mean number of customers in queue float res_time ; // response time float mu ; // service rate , assuming mu = 10 customers/s for this assignment float i ; // for the loop  printf("Please enter the start value of the rho : "); scanf("%f",&rho_start);  printf("Please enter the end value of the rho : "); scanf("%f",&rho_end);  printf("Please enter the step value of the rho : "); scanf("%f",&rho_step);  printf("Please enter the mu : "); scanf("%f",&mu);  printf("RHO \t\t N \t\t Q \t\t RT \n"); printf("--- \t\t --- \t\t --- \t\t --- \n"); for( i = rho_start ; i < rho_end ; i = i + rho_step) {     N = i/(1-i) ;     lambda = i * mu ;     Q = (i*i)/(1-i) ;     res_time = N/lambda ;     printf("%.3f \t\t %.3f \t\t %.3f \t\t %.3f \n", i , N , Q , res_time); }      FILE * f1;      f1 = fopen("sample.txt","w");      if( rho_step == 0.1 )     {             for(i = rho_start ; i < rho_end ; i = i + rho_step)         {             N = i/(1-i) ;             fprintf(f1 , "%.3f \t\t %.3f \n" , i , N);          }     }        if( f1 == NULL )      {            printf("Cannot open file.\n");     exit(1);     }      fclose(f1);     return 0;   }


An OS is not typically I look for in a mobile or a laptop. Since almost a year now, I have been addicted to this game Clash of Clans on my Nexus 4 running Android 5.1. I am looking for experimenting with my Nexus and run Ubuntu Touch on it. Is there any possible way we can run Android apps on Ubuntu touch or Ubuntu mobile OS?


What's the best approach to confirm user email address: sending an email confirmation link or sending a verification code in email?

I see there are number of questions available there about approach for confirming email address with pretty good answers. I have a similar question I can think of two approaches for confirming email address:   Sending confirmation link on the user provided email address, by clicking this link a new page will open showing user account confirmation message. Another approach is instead of providing confirmation link, provide user with the verification code in the email, let's say number 12345 is verification code, then user will read this number and enter it on the Confirmation page.   It would be great if you could provide your views for the above-mentioned approach. I agree that option #2 seems to add a bit of overhead however my priority is for security.  The mobile application integrates with my existing web application (I have developed APIs for it). The mobile application uses those APIs to get data from the web application. Now using the register API, the mobile app can register the user. For registration, the user's email address and password is required. I want to confirm the user's email address before giving him full access to the application. If user's email address is confirmed then he can use all options otherwise user is restricted to certain options. To confirm the email address, should I:   Send the verification link to the user provided email address  Send verification code in the email which user can enter on "verify account" page in mobile app Send deep link + verification code in the email so that when user click on deep link automatically mobile app will get launched with the verification page being open where user can type in (or copy+paste) the verification code   I want to know which is one better approach from usability point view and security point of view (my preference is for security).


Can we say that Int(f(A)) a subset of f(Int(A))?

Then can we say that Int(f(A)) a subset of f(Int(A))? Can we prove or provide counterexample for this claim? The space is (R,d), where d is the absolute value metric, and R is the set of real numbers, f is a continuous function from R to R.  A be a subset of R. If yes, can you extend in for any arbitrary metric spaces I am very new to metric space and topology, so any help will be appreciated.


Spacing objects evenly on a spiral spine

I made a blend of circles that distribute from big to small and chose the replace with spine command. I have noticed the circles are not evenly spaced in the spine. I have changed adding anchor points but did not work. Is there a way to distribute evenly along a spiral path?


Oxidized Avocado: What's Going on & How to Prevent It

So what exactly happens to the flavor of avocados when it oxidizes? I made some guacamole and as many are familiar, it forms that yucky garbage-green color.  Now, it tastes different. I'm not sure if it's necessarily bad though. Maybe it's just an acquired taste. The essence is still kinda there and I feel bad scraping that first 1/8 inch off and just chucking it away. I can't tell if it tastes spoiled because it looks that way, or if it's just undergone a really crappy reconstitution of it's flavors and there's been a quantifiable decrease in yumminess.  Side note: a friend taught me to cover the top layer of guac with sour cream. This works awesome. I just didn't have any on hand for my last batch.


Number of solutions of the equation $3^x+4^x=5^x$ in the set of positive real numbers

I came across the following question:  Find the number of solutions of the equation $3^x+4^x=5^x$ in the set of positive real numbers.  I tried the above question by taking log on both sides and then solving, but it didn't seem to work. Any idea on how to proceed to solve this question?


Using node after pic results in error in TikZ

Consider the following code:  \documentclass[tikz]{standalone}  \begin{document}   \begin{tikzpicture}[corner/.pic = {     \path[pic actions] (0,0) -- (1,0) -- (0,1) --cycle;   }]    \pic[draw] {corner} ++(1,0) node{hi};   \end{tikzpicture} \end{document}   This generates the following error:     I do not know the key '/tikz/pics/hi' and I am going to ignore it. Perhaps you misspelled it. \pic[draw] {corner} ++(1,0) node{hi}   It seems that TikZ interprets the node as a pic, and as a consequence tries to find the definition of a pic called hi instead of using hi as the text inside of the node.  By contrast, \node{hi} ++(1,0) pic[draw] {corner}; works as expected.  Why is this? How can I fix it?


Microcontroller clock speed vs internal oscillator

I'm having a little trouble understanding the difference between an internal oscillator and clock speed of microcontrollers. I was under the impression the the internal oscillator oscillates at a certain frequency which IS the clock speed but I get the feeling that I'm wrong. I've seen the PIC16F690 datasheet that says that the oscillator can run up to 8MHz but the clock speed is 20MHz. Or is that 20MHz a maximum if an external clock is used?


I've installed git-gui tool via sudo apt-get install git-gui. But how do I start it? Trying with search or git-gui command did not find and UI tool for Git.


How should one insert the punctuation in the text below:     We were informed a complete set of dishes consists of these items cups   saucers and plates bowls are not included.


Counterexample to "if $f:A\to A$ induces the identity $\hat f:\operatorname{Spec}(A)\to\operatorname{Spec}(A)$, then $f=\operatorname{id}_A$"

Does anyone know any example that invalidates the following affirmation:     If a morphism $f:A\to A$ induces the identity $\hat f:\operatorname{Spec} \left( A \right) \to \operatorname{Spec} \left( A \right)$ then $f = \operatorname{id} _A $.


All Site hangs until finish the request for the same user

Am using HTML and PHP for my internal web Reporting. The problem is, when an user using report-x and request data and try to open other (report-y) at the same time the report-x is running the query, report-y is hang until report-x is finish, and then report-y respond.  I am using PDO to connect to my DataBase, i use session_start(); but it still hang.  I expect the user can use a second report while the first report is working.


Let $|\mathbb F|=q$ where $\mathbb F$ is a field. Then $|GL_n(\mathbb F)|=(q^n-1)(q^n-q)(q^n-q^2)\ldots(q^n-q^{n-1})$.

Let $|\mathbb F|=q$ where $\mathbb F$ is a field. Now       $$|GL_n(\mathbb F)|=(q^n-1)(q^n-q)(q^n-q^2)\ldots(q^n-q^{n-1}).$$    How it is so?  My attempt  I just viewed in the matrix such that  $\left(\begin{array}{ccccc} a_{11}&a_{12}&\cdots&a_{1n-1}&a_{1n}\\ \vdots&&\vdots&&\vdots\\ a_{n1}&a_{n2}&\cdots&a_{nn-1}&a_{nn} \end{array}\right)$  For the first element I will have q choices and rest of the elements also have q choices. So there are $q^n$ choices and i should neglect $0$ in all at a time. So I removed one choice from the total so for the first row I will have $q^n-1$ choices. But for the second and third i am having confusion how to see the choices. And I am thinking that this will give the number of distinct basis for $GL_n(\mathbb F)$. Is it correct. Give me a diagrammatical explanation.


Show that $\mathbb{T}^1 \cong \mathbb{C}^*/\mathbb{R}_{>0}$

I'm trying to use the First Isomorphism Theorem to show that $\mathbb{T}^1 \cong \mathbb{C}^*/\mathbb{R}_{>0}$ by constructing a surjective group homomorphism from the nonzero complex numbers to the circle group whose kernel is the set of positive reals. I haven't yet taken a course in complex variables, so I did some digging around and could only find a homomorphism from $\mathbb{R}^*$ to $\mathbb{T}^1$ defined by $f(\theta) = e^{i\theta}$. I don't really know what that means, so I'm struggling to construct any homomorphism $\phi : \mathbb{C}^* \to \mathbb{T}^1$, let alone one whose kernel is $\mathbb{R}_{>0}$.  EDIT: Does $f(z) = \frac{z}{|z|}$ work? EDIT2: Probably not. I think the image of this is actually just $\{\pm 1\}$. I really have no idea how to work with complex numbers at all.


How to display the word 'BahnhofstraÃe' unicodes in HTML page?

I having a the Word Bahnhofstraße But in html the word look like 'BahnhofstraÃe'  So How to Support the word in HTML.


What's the difference between substitution and permutation in DES? From my understanding substitution is replacing the data with new data and permutation is just rearranging the data?


Show subgroups of an abelian group isomorphic to each other

I am working on this problem and got stuck:  Let $G$ be a group with three normal subgroups $N_1, N_2, N_3$. Suppose whenever $i$ and $j$ are distinct in $\{1,2,3\}$, $G = N_i N_j$, and $N_i \cap N_j = \{e\}$.  Show that $N_1 \simeq N_2 \simeq  N_3$.  I have shown that $G$ is in fact abelian, hence $N_i$'s are abelian subgroups. In order to show that they are isomorphic to each other, i tried to define an isomorphism between $N_i$ and $N_j$ but I can't come to the conclusion. Is my approach not feasible? Should I try another way?


Prevent string splitting in argument to readlink

I am writing a small script to symbolically link configuration files from my dotfiles directory to another one. I do not have control over the file names and unfortunately one of them is causing me a lot of trouble. The simplest reproducible case I have is as follows: export file_name='My Configuration Text.theme'  readlink -f $file_name  Which predictably returns: /home/me/folder/My /home/me/folder/Configuration /home/me/folder/Text.theme  I need this to not be split. I have also tried readlink -f $(printf "%q " $file_name)  And it does not seem to fix the problem. Is there a solution to this or am I better off rewriting my linking script in something more robust like Python?


Advice on designing databases for things like Posts and categories; and general rule of thumbs

I'm creating my own website with a capability to CRUD posts and other related stuff like category, tags and other things (I believe it's similar to the first two mentioned).  Posts: (current create post query)  id                BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, uid               BIGINT(20) UNSIGNED NOT NULL, title             VARCHAR(50) NOT NULL UNIQUE, content           LONGTEXT NOT NULL DEFAULT '', postname          VARCHAR(255) NOT NULL UNIQUE, posttype          VARCHAR(10) NOT NULL, status            VARCHAR(20) NOT NULL DEFAULT '', created_at        TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at        TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, deleted_at        TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,  FOREIGN KEY(uid) REFERENCES ct_users(id)   Now my additional requirement is to have a category, tags and other future possibilities/properties.  My problem is the design, should I create new tables for each, like category table?  If so, Category would have something like:  id                BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name              VARCHAR(50) NOT NULL UNIQUE, parent_id         BIGINT(20) UNSIGNED NULL   For Tags:  // This will have a relationship table between this and post table. id                BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name              VARCHAR(50) NOT NULL UNIQUE, description       VARCHAR(255) NOT NULL DEFAULT ''   Or should I make a complex relationship table that can support my requirements? Example is wordpress' wp_term, wp_term_relationship& wp_term_taxonomy.  Now for general database question. Rule of thumb.  Is it okay, or is it good to have many tables, possibly few records on some, used in 'your' application? Example is, refer to Categorytable at top.  Or is it much better to do it with things like wp_terms etc? To reduce the number of database tables.  Which one is more optimized? Or good in performance? Good and bad of...  If you could also provide links to good read articles and tutorials, would be much appreciated. As I've been googling, most of the stuff I find are basic queries and more info of features/functions with examples like JOIN, UNION and others.


How to protect or secure java code from decompiling

I got a small doubt here.  While we are generating any new application we used to deliver them as jar files. Now my question is are we able to decompile these jar files...? if yes how can I avoid that...? Please let me know, thanks in advance.


"while read -r LINE; do" is replacing multiple spaces with a single space

I am trying to read in a file using read in bash 3.2, but read seems to be converting any instance of multiple whitespace into a single space.  For example, the code below has two tabs between "hello" and "there", and three spaces between "today" and "world":  while read -r LINE; do     echo $LINE done <<< "hello     there today   world"   However, when run, it outputs with only a space in between each set of words:  hello there today world   Instead, I'd like it to output the lines with whitespace preserved, e.g.:  hello       there today   world   Is there any way to do this? If not with read, then with something else?


How to read Arc/Info e00 vector files (no binaries) with Python?

I can easily read e00 files with QGIS and it seems as if in older versions of ogr there was driver support for the arc/info e00 file format. Nowadays that seems to be deprecated, as running ogrinfo --formats doesn't list arc/info.  I also found this useful , a general description of the file format. Based on that information I would be able to write my own program to put all the pieces together. But hey, this must have been done before, right?  Can somebody point me into the right direction?


How to solve to invoke virtual method and Sqlite giving NullPointerException in android studio?

I am trying to use SQLite DB to store data along with other information in my android app but i am getting this error: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.database.sqlite.SQLiteDatabase android.content.Context.openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase$CursorFactory, android.database.DatabaseErrorHandler)' on a null object reference.  Here is my ViewProductList.java:     RecyclerView recyclerView;     RecyclerView.LayoutManager layoutManager;     RecyclerAdapter adapter;     ArrayList<Contact> arrayList = new ArrayList<>();      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_view_product_list);          //DbHelper dbHelper= new DbHelper(this);         recyclerView = (RecyclerView) findViewById(R.id.recyclerview);         layoutManager = new LinearLayoutManager(this);         recyclerView.setLayoutManager(layoutManager);         recyclerView.setHasFixedSize(true);          adapter = new RecyclerAdapter(arrayList);         recyclerView.setAdapter(adapter);         readFromLocalStorage();      } public void readFromLocalStorage(){         arrayList.clear();         DbHelper dbHelper = new DbHelper(this);         SQLiteDatabase database= dbHelper.getReadableDatabase();          Cursor cursor = dbHelper.readFromLocalDatabase(database);          while (cursor.moveToNext()){             String name=cursor.getString(cursor.getColumnIndex(DbContract.NAME));             String quantity=cursor.getString(cursor.getColumnIndex(DbContract.QUANTITY));             String price=cursor.getString(cursor.getColumnIndex(DbContract.PRICE));             int sync_status =cursor.getInt(cursor.getColumnIndex(DbContract.SYNC_STATUS));              arrayList.add(new Contact(name,quantity,price,sync_status));         }         adapter.notifyDataSetChanged();         cursor.close();         dbHelper.close();     } }  the error is inside readFromLocalStorage() method please help me to solve it! thank you! DbHelper.java public class DbHelper extends SQLiteOpenHelper {      private static final int DATABASE_VERSION =1;     private static final String CREATE_TABLE="create table "+DbContract.TABLE_NAME+             "(id integer primary key autoincrement,"+DbContract.NAME+" text,"+DbContract.QUANTITY+" text,"+DbContract.PRICE+" text,"+DbContract.SYNC_STATUS+             " integer);";     private static  final  String DROP_TABLE="drop table if exists "+DbContract.TABLE_NAME;       public DbHelper(Context context){         super(context,DbContract.DATABASE_NAME,null,DATABASE_VERSION);     }     @Override     public void onCreate(SQLiteDatabase db) {         db.execSQL(CREATE_TABLE);     } }  I am getting this error on readFromLocalStorage() method inside ViewProductList.java. Please help me to solve this error. Thankx in advance!


how to remove the old urls from google search and replace new urls?

I know this question has been asked , and  before ,  But I have problem with  answers, so here is mine :  I have changed my urls structure ( not my domain ), and I want  google to remove the old urls and replace the new ones, and  I can't make redirection because I dont know what is it exactly ( its very dynamic ), How can I do this ?


How do I copy the latest file from one directory to another?

I have 3 zip files in a directory. I want to copy the most recent version to a backup directory.  My code works fine for .sh and other files, but not for .zip. Is there something else I have to do?  cp -p `ls -tr1 /Users/Me/Documents/Coffi\ Work/FTP\ Backup\ Shell\ Script/Original/| tail -1` /Users/Me/Documents/Coffi\ Work/FTP\ Backup\ Shell\ Script/Backup1/    It says: cp: website3.zip: No such file or directory


How do i renable connecting a network drive using SMB1 since Windows 1709

I find today that I can no longer mount my Netgear ReadyNas drive because apparently it is using SMB1 and Windows 10 have disabled since release 1709. This is very problemaic because I need to access these files and because I have lost the admin password for the ReadyNas itself so I cannot login in order to update/reconfigure it to use SMB2 instead.  Microsoft refers me  to  which in turn refers me to  if I really want re-enable SMB1  And I successfully did re-enable SMB1 by running  Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol   from Powershell as Adminstrator.  However even after reboot I still cannot re-establish connection to my Netgear from Windows Explorer, it gives the same error  What else do I need to do ?  PS C:\WINDOWS\system32> Get-WindowsOptionalFeature –Online –FeatureName SMB1Protocol   FeatureName      : SMB1Protocol DisplayName      : SMB 1.0/CIFS File Sharing Support Description      : Support for the SMB 1.0/CIFS file sharing protocol and the Computer Browser protocol. RestartRequired  : Possible State            : Enabled CustomProperties :                    ServerComponent\Description : Support for the SMB 1.0/CIFS file sharing protocol and the Computer                    Browser protocol.                    ServerComponent\DisplayName : SMB 1.0/CIFS File Sharing Support                    ServerComponent\Id : 487                    ServerComponent\Type : Feature                    ServerComponent\UniqueName : FS-SMB1                    ServerComponent\Deploys\Update\Name : SMB1Protocol   Solution  Thanks Bob, SMB 1.0/CIFS File Sharing Support was enabled but within it SMB 1.0 Client was not enabled, checking that box and rebooting fixed the issue.


fp - How to keep running sum in variable?

I have this code in my LaTeX:   \FPset{totalHours}{0}  \newcommand{\entry}[5]{     \FPeval{totalHours}{(totalHours)+#5}     #1 & #2 & #3 & #4 & #5 \\ }   Where \entry is meant to be an entry in a time log. The 5th argument is a number representing the number of hours in that entry. I want to keep a running total of the hours in a variable I can print later on, totalHours.   This seems to do the \FPeval but then totalHours gets reset to 0 by the next time I write \entry. What is the correct way to keep a running total? Thanks.


How to add Google Drive to the Windows Explorer Sidebar

Is there a way to add Google Drive to this sidebar not like a shortcut, but pretty much like how OneDrive is? I know there's a Google Drive link in the favorites, but is there a way to expand this like OneDrive has it expanded? Or is that only for the "OneDrive Windows Integration"?  I don't want to just add a shortcut, I want to have the same functionality. The Windows Explorer tweaking tools I've used don't do this.


I have a CRONTAB entry as below. Can someone tell me what the below statement is exactly doing?  1 0 * * * /vol01/sites/provisioning/MNMS/45627/45627.sh1 >> /vol01/sites/provisioning/MNMS/45627/output/cron.log 2>&1


C++&SFML Moving Sprites Smoothly in Tiles

As a student, I've always wanted to become a game developer. So far I've managed to learn the basics of C++ and SFML 2.1  For my first project, upon deciding to make a 2D RPG-ish game, I encountered a problem that the game loop refreshes so quickly that if I move them by 1 pixel per frame, the sprite will move more quick than I intended to.  I implemented a frame-determined movement system(not sure what it's called) that whatever the fps is, the character moves at same speed.  However, I couldn't solve the problem(which is what I'm asking) that the sprite won't move smoothly. What's happening in my build is that the player will move about 1px per frame, and can be interrupted by other inputs. What I want the sprite to do is move horizontally 32px per second. How can I do this?  Edit: wasn't being clear enough. What I want the program to do is when I press 'Right' key once, sprite moves towards the positive side of x-axis, for 32px. What's currently functioning in my program is the sprite will move only once, 1px  TL;DR : I want to move my sprite like old-school RPG games, moving predetermined pixels(or tiles) smoothly.


Reviewer deleted my comments and i do not think he have enough reason to do so

I saw a question and I think I may also help by answering this question, and my account was banned then, why they have the rights to ban me and what can I do with it?


My laptop configuration  is intel i7 (2nd generation) 64 bit, win 7 service pack 1, with 6 GB RAM and 1 TB HDD (with two partition C (436 GB) and D (547 GB)). C drive contains windows OS. D drive contains all the data.  I don't want win 7 but want to retain all the data in Partition D. when I start installing ubuntu 14.04.3 LTS using somethingelse option. I get the following partiton table /dev/sda /dev/sda1 ntfs 104 MB (Windows 7 loader) /dev/sda2 ntfs 430570 MB ...... likely to be C drive (partition) /dev/sda3 ntfs 546537 MB ...... likely to be D drive (partition) /dev/sda4 ntfs 22988 MB   (Windows Recovery Environment (loader))  so how do I install ubuntu (i.e replacing/removing Windows 7, and also keeping the data of partition D)


Can the Earth's magnetic field be used to generate electricity?

Since the Earth has a magnetic field, can it, in theory, be run through a conductive metal coil to create electricity?


Can a PCIe 2.0 x16 fit into x16 PCIe slot?


How to file transfer between android and iPhone via bluetooth

Why Bluetooth of apple devices doesn't work for transferring data or files with other devices and even with apple to apple devices? Why can't the video or files be directly downloaded in device like iPhone, iPad etc. If possible how to send files to android phones via bluetooth


Could not find required OpenGL entry point 'glGetError' ethier your video card is unsuported or you need to  update open GL. this pops up when i try to open tf2 through steam. I am not using a video card but I am using  amd a10 richland APU please help for i am a complete noob on linux. running ubuntu 14.10  also, when i open steam i get a message saying I don't have direct rendering, i looked at some forums and dont under stand. thanks.  THANK YOU FOR YOUR HELP


How did Tom Riddle first find out about Horcruxes?

How did Tom Riddle find out about what Horcruxes were and what they did before he asked Horace Slughorn?  Hermione wasn't about to find a single thing about them in the library when Harry brought it up and she had never heard of them prior. Where else would Tom have heard of them?


I am trying to prove the following result ($x$ ~ $N_p(m,\Sigma)$): $$\mathrm{var}[x^\top A x] = 2\mathrm{Tr}(A\Sigma A\Sigma) + 4 m^\top A \Sigma A m $$ I have completed most of it except that $E[yy^TAyy^T]=2\Sigma A\Sigma$ where $y$~$N_p(0,\Sigma)$. Any hints for this? I know $yy^T$ follows Wishart$_p(\Sigma, p)$ but not sure if that will help. I only know mean of Wishart will be $\Sigma$. Dont know anything about Variance of the Wishart


I'm currently learning Java and I had a question regarding some code that we say in class today, I was wondering if anybody could tell me why the following code outputs 5 and 33 as opposed to just two 33's.  Aren't we assigning the value of d2 to d1 in the modify function?  public class AClass { Date d1 = new Date (5L); Date d2 = new Date (33L); void modify ( Date x, Date y) {     x=y; } public static void main (String[] args) {     new AClass(); } AClass () {     modify(d1,d2);     System.out.println(d1.getTime());     System.out.println(d2.getTime()); }   }


How to achieve a solid glass/emission material with certain refraction and color

I'm having trouble recreating this material in cycles:      It's a solid glass bulb with a LED inside and copper threaded fabric which gives it a copper colored glow.  I'm not sure how to achieve a similar hue / glow and IOR.  Any pointers into the right direction would be greatly appreciated!  Blendfile:


What are the Undying Lands like, and what sort of lives do Frodo, Bilbo, Gandalf and the Elves find there?

After the events of 'the Return of the King', Frodo, Gandalf the White, Bilbo Baggins, Lady Galadriel and her husband leave Middle Earth and journey to the Undying Lands. Just out of curiosity, what becomes of them, particularly Frodo? I know that, many years later, Sam Gamgee goes to join Frodo, but can anyone tell me what the Undying Lands are? It sounds like some Tolkien version of Paradise to me.  Secondly, what sort of lives do these characters live outside of Middle Earth? Is there, perhaps, a Shire-like haven full of rolling hills and crops? Are there more Elves there than any other race? I'd just like to get a picture of what happens to Frodo once he gets there. What does he do with his time?  I'm aware of the Silmarillion, but I've never read that (not yet, anyway), so I fully welcome info from there! :)


Is IP Anycast helpful for fast loading website?

I'm not sure but before I purchase  IP anyast service I really need to know What is IP Anycast actually and how does this work? Can anyone explain in simple sense?


Let $f:[0,1]\mapsto\mathbb{R}$ be a continuous function. Evaluate  $\lim_{n\to\infty}n\int_0^1x^nf(x)dx$


Proving that $D_{12}\cong S_3 \times C_2$

Prove that $D_{12}\cong S_3 \times C_2$.   I really dont know how I should start this question. My gut feeling says in some way I have to consider normal subgroups of $D_{12}$ but I cannot see how this will lead necessarily to a unique solutions.  No full solutions please hints only (partly because I cannot give any more of an attempt and I dont want this downvoted)  Ideally I would like a non geometric solution so that similar techniques can be used for general groups


How to find out the content of a XML file using Unix Sed/Awk?

I have a XML file(MyXML.xml) like this :  <?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">     <S:Body>         <ns3:GetAllInfoFromRest xmlns:ns2="http://com.lanuk.cfe/b2_7/service/objects" xmlns:ns3="http://com.lanuk.cfe/b2_7/service/operations">             1111,GH43567,Hamburger,GET,278598655,\n000001,                    ,Kunal,Bhyuo,Ramond,856 K. 98 Rd,                                        ,                                        ,Tripura,AGT,INDIA,856987,                    ,S,S,S,8956,\666666         </ns3:GetAllInfoFromRest>     </S:Body> </S:Envelope>   Now i need to strip out the SOAP content and all the tag attributes from this xml and get only the string response 1111,GH43567,Hamburger,GET,278598655,\n000001,                    ,Kunal,Bhyuo,Ramond,856 K. 98 Rd,                                        ,                                        ,Tripura,AGT,INDIA,856987,                    ,S,S,S,8956,\666666.  How can i do it with awk or  sed ?  I tried it in this  way :  $ xgawk -lxml 'XMLATTR["xmlns:ns3"]=="http://com.lanuk.cfe/b2_7/service/operations"{print $2}' MyXML.xml   But obviously I am making some mistake  due to which it is not working.  Can some one suggest any other way around this ?


Exercise sheet with two enumerated columns

Do you have a simple, minimal template to type Exercise sheets with exercises enumerated with two columns (please check image).    Thank you.