I have a table with the structure below :  Table(customer_Num  int , Channel_Id  Varchar(50) ,  Branch_Code  int)   and some example data for this table is :                    Table __________________________________________ customer_Num  |  Channel_Id  |  Branch_Code      1         |    'I'       |     1000     1         |    'Y'       |     1001     1         |    'L'       |     1002   and the final result I want in the output is :                            Result_table __________________________________________________________ customer_Num  | I_branch_Code |  Y_branch_Code  | L_Branch_Code     1               1000             1001             1002   is there a better solution rather than using continuous Insert  queries? Cause with this query  I will have many nulls in my final table!And I also won't have the result in one record.   insert into Result_table (customer_Num  ,I_branch_Code )  select customer_Num   , Branch_Code   from Table  where Channel_Id   = 'I';   insert into Result_table (customer_Num  ,Y_branch_Code  )  select customer_Num   , Branch_Code   from Table  where Channel_Id   = 'Y';   insert into Result_table (customer_Num  ,L_Branch_Code) select customer_Num   , Branch_Code  from Table where Channel_Id  = 'L';

I have a SQL Server instance that has a linked server to an Oracle server. There is a table on the Oracle server called PersonOptions which contains the following data:  ╔══════════╦══════════╗ ║ PersonID ║ OptionID ║ ╠══════════╬══════════╣ ║        1 ║ A        ║ ║        1 ║ B        ║ ║        2 ║ C        ║ ║        3 ║ B        ║ ║        4 ║ A        ║ ║        4 ║ C        ║ ╚══════════╩══════════╝   I need to pivot that data so the results are:  ╔══════════╦═════════╦══════════╦══════════╗ ║ PersonID ║ OptionA ║ Option B ║ Option C ║ ╠══════════╬═════════╬══════════╬══════════╣ ║        1 ║       1 ║        1 ║          ║ ║        2 ║         ║          ║        1 ║ ║        3 ║         ║        1 ║          ║ ║        4 ║       1 ║          ║        1 ║ ╚══════════╩═════════╩══════════╩══════════╝   Any suggestions?


I noticed that when I was cooking stir fry, I used the same flipper throughout. This means when I put the meat in, the flipper came in contact with the uncooked meat and got some blood on it. Is this a problem considering it touches vegetables that go in much later? Should a different flipper be used half way through the cooking process?

So, being new to cooking, I tried cooking a pan-seared ribeye steak for the first time recently.  I'm just getting new cooking utensils, and the idea of flipping the steak is something I'm not sure about.  Last time, I used the same utensil the whole way through.  I know, many are likely cringing at the thought.  But I was afraid of over-cooking so I was as attentive as possible to the steak.  I'm wondering if this is "safe".  I'm guessing most will say it is not, and that's fine.  I'd like to do better if it's not safe.  I bought a pair of tongs since then (I was using a spatula to flip before!) but I still only have one pair.  So, should I be placing the steak in the pan with the spatula, flipping with the tongs, and removing it from the pan with...something else?  Is it safe enough to use the tongs, and rinse them each time they touch meat before it's finished?  Should I be scrubbing them with soap each time?  Should I simply stick to different utensils?  (In which case I might just stop cooking--I don't have that many utensils, don't plan on buying more for this purpose, and quite frankly I don't wish to clean so many utensils when I'm finished cooking)  I know there are other topics, but they haven't been quite as specific as the questions I'm asking here, so I hope I can get a good response on the subject.


I am using SQL Server 2014, and I have two tables:  number        id ------------------ 36-23         1 36-23         2  id         value ------------------ 1          asia    2          europe            The number column is of type varchar. I want to write a query to return the following results:  number       Name    --------------------------- 36-23        asia,europe   I am wondering how can I do this with the help of query or functions in SQL Server.

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


I'm writing a simple bash scripts and I would like it to accept parameters from the command line in any order. I've browsed around the web and wrote a simple function with a case statement in a while loop. Right now, the 'any order' part works - but it only picks up the first parameter I set. I'm certainly doing something wrong but scripting is quite new to me and I hadn't been able to figure it out - your help would be greatly appreciated. The flags part of the script is as follows:     #Parameters - source,destination,credentials,bandwidth,timeout,port,help flags () {         while test $# -gt 0; do                 case "$1" in                         -s|--source)                                 shift                                 if test $# -gt 0; then                                         export SOURCE=$1                                 else                                         echo "No source directory specified!"                                         exit 1                                 fi                                 ;;                         -d|--destination)                                 shift                                 if test $# -gt 0; then                                         export DESTINATION=$1                                 fi                                 ;;                         -c|--credentials)                                 shift                                 if test $# -gt 0; then                                         export CREDENTIALS=$1                                 fi                                 ;;                         -b|--bandwidth)                                 shift                                 if test $# -gt 0; then                                         export BANDWIDTH=$1                                 fi                                 ;;                         -t|--timeout)                                 shift                                 if test $# -gt 0; then                                         export TIMEOUT=$1                                 fi                                 ;;                         -p|--port)                                 shift                                 if test $# -gt 0; then                                         export PORT=$1                                 fi                                 ;;                         -h|--help)                                 shift                                 if test $# -gt 0; then                                         echo "Help goes here"                                 fi                                 ;;                         -l|--compression-level)                                 shift                                 if test $# -gt 0; then                                         export COMPRESS_LEVEL=$1                                 fi                                 ;;                         *)                                 break                                 ;;                 esac         done } flags "$@" echo "source is $SOURCE, destination is $DESTINATION, credentials are $CREDENTIALS, bandwidth is $BANDWIDTH, timeout is $TIMEOUT, port is $PORT"  Ideally, some of those parameters would be mandatory, and others optional - but that's not a must. How can I fix this script to accept any of those parameters (both long and short forms, ideally) in any order? Thanks!

Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile  or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile   What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and  $d will all be set to true and $outFile will be equal to /fizz/someOtherFile?


We commonly write 4-vectors as $x=(x^0,x^1,x^2,x^3)$, where $x^0=ct$ rather than $x^0=t$. The only reason I can think of why this was done is to write everything in spatial dimensions. That is dimensional analysis of $ct$ gives $\frac{[m]}{[s]}\cdot[s]$, such that it is easy to define invariants like $(\Delta s)^2$. I'm curious however, is there another reason why it is convenient to use such notation?

When we deal with Special Relativity and we start considering spacetime instead of space and time each at once, we usually see books saying that we consider a space with four coordinate $x^\alpha$ with $x^0 = ct$. We also consider this manifold to be $\mathbb{R}^4$ and give to it the metric tensor $g = \operatorname{diag}(-1,1,1,1)$. Now, why $x^0 = ct$ and not just $x^0 = t$? One possible answer might be "so that all coordinates are measured with the same units", but isn't there any deeper meaning?


I'm going to meet a big scientist. What should I say in the first meeting? I want to impress him and become a friend of him so that I can do common projects with him.   Please help me. It is the most important meeting in my life.  Information about the meeting:  He is going to attend a conference in his country and I'm going to attend the conference, too. I want to go to him, say hello, and speak about his works. I'm a Ph.D. student in physics.

I know that they are "just as human as we are", but I feel somewhat uncomfortable to talk nonchalantly with the top-notch math researchers and professors in my department because of their social position, their extremely superior knowledge and talent, and also because of their age.   Still, I feel that it is like a waste to have such interesting mind-expanding people around and not to interact properly and talk about maths when I meet them in the department (outside the lecture hall).    So my question is: according to your experience, what is the best (where best means: most polite, appropriate, acceptable, but also profitable) way to interact and make the most of the presence of such awesome professors? Can I discuss "lower" [mathematical and non-mathematical] subjects with them even though their actual (research) interests lie in much more abstruse topics?  Any suggestion (even in the form of a comment) is really appreciated.


I know the question how to correct a malformed line in sources.list has been asked.  I tried to follow the instructions on the posted answer but I can't access sources.list when I enter sudo -H gedit /etc/apt/sources.list I get the following:  o protocol specified Unable to init server: Could not connect: Connection refused  (gedit:18598): Gtk-WARNING **: cannot open display: :0 bill@bill-GA-880GA-UD3H:~$

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


I already asked this question but because I didn't sign up it won't let me respond to anyone, but here it is again *with more info.  I made the mistake of installing Yosemite without backing up my HDD. Fortunately, I do have most of my actual files and programs saved to my external HDD, but that leads to another problem.  I use a lot of 3rd party apps to make music, and they are not compatible with 10.10 i.e. Pro Tools etc. I formatted my HDD in an attempt to start over but it keeps reinstalling Yosemite from the Internet.  I've made several USB boot drives but when they go to load up it just gives me "international no" sign (see image below).  Can someone please help me as my work/life is tied in to my studio. Oh also my external HDD is now all of a sudden read-only NTFS instead of Mac read/write enabled.  *****I made the USB several different times using first an app that was recomended and the second time using disk utility and the restore option with the dmg as my source and the usb as my destination...  I also tried several different versions of mavericks.  PLEASE HELP.

I made the biggest mistake of my adult life and installed Yosemite without backing up my HDD. Fortunately, I do have most of my actual files and programs saved to my external HDD, but that leads to another problem.  I use a lot of 3rd party apps to make music, and they are not compatible with 10.10 i.e. Pro Tools etc. I formatted my HDD in an attempt to start over but it keeps reinstalling Yosemite from the Internet.  I've made several USB boot drives but when they go to load up it just gives me "international no" sign (see image below).  Can someone please help me as my work/life is tied in to my studio. Oh also my external HDD is now all of a sudden read-only NTFS instead of Mac read/write enabled.


8. Let $n\ge3$. Let $A=((a_{ij}))_{1\le i,j\le n}$ be an $n×n$ matrix such that $a_{ij}\in\{1,-1\}$ for all $1\le i,j\le n$. Suppose that $$a_{k1}=1\quad \forall1\le k\le n$$ $$\sum_{k=1}^na_{ki}a_{kj}=0\quad\forall i\ne j.$$ Show that $n$ is a multiple of $4$. Yesterday this question was asked in an examination. I could not solve this problem but intuitively this is correct. A proof is needed.

It's known that Hadamard matrices can only exist for orders $1$, $2$ and $4k$. It's easy to show that there are no Hadamard matrices of order $2k+1$. But what is the proof that there are no Hadamard matrices of order $4k+2$?


I'm pretty sure the way to go is with a contradiction, letting $x = \sup E$. Then I think I need to either show that $x < x^2\in E$ (contradicting $x = \sup E$ in that an element of E is greater than x) or show that $({x^2})^2 > 2$ (contradicting the terms of E). As I wrote this I realized showing $({x^2})^2 > 2$ would be redundant since that would only mean something if $x^2\in E$ in the first place... anyway, I'm not sure how to go about this proof.

Suppose $A$ is the set of all rational numbers $p$ such that $p^2 <2$ and $B$ is the set of all rational numbers $p$ such that $p^2 > 2$. We want to show that $A$ contains no largest element and $B$ contains no smallest element.  In Rudin's Principles of Mathematical Analysis, he associates $q = p- \frac{p^2-2}{p+2} = \frac{2p+2}{p+2}$. Did he just come up with this using trial and error?


I'm trying to convert a large Shapefile (120 MB) to GeoJSON.  OGR converter gives an error that says process time took over 15 seconds, so process was cancelled.  Mapshaper gives the following error: File size of .shp doesn't match size in header  What can I do now?  I'd prefer not installing any desktop software to do a simple conversion.

I'm trying to convert Shapefiles from the  website into a GeoJSON file for use with Google Maps API. I'm using QGIS to facilitate but I can't get the projection/coordinates right. So far I've tried Google Mercator (EPSG:900913) and WGS 84 (EPSG:4326) with no luck. I'm using the OpenLayers to verify results and it keeps placing Texas near the  Gulf of Guinea (0 lat, 0 lng).


One of the last episodes of Dragon Ball Super raised me this question.  Trunks fights alongside Goku against Black and Zamazu in Super Saiyan 2 state. But how strong he really is? In the fight Goku is Super Saiyan Blue and black Super Saiyan Rose, but he is able to score some succesful punches/attacks to Black and Zamazu, even though it doesn't hurt them. At the beginning of his appearance in Dragon Ball Super he is shown to fight Dabura. Later he is knocked in a training match against Goku Super Saiyan 3 (did he have a zenkai boost there?), and later he is knocked by Vegeta when training with him in Super Saiyan Blue (did he have another zenkai boost there?). And I've heard that in the manga he's a match for Goku in Super Saiyan 3, plus some mental training he has made since his appearance. Is Trunks now stronger than a Super Saiyan 2, may be at the level of a Super Saiyan 3? Or is he fighting alongside Blue and Rose super saiyajins just a plot-hole?  We've seen a super saiyan 2 can be at the level of a super saiyan 3 already when Beerus tell to Vegeta that he made he uses more of his power in his fight (1% he says) than Goku in Super Saiyan 3.

When Trunks arrived from the future, he was easily defeated by Goku and Vegeta. His strongest form is SSJ2 (or Possibly USSJ in the anime). This form at best is on par with SSJ3 Goku.  When Goku, Vegeta, and Trunks go back to the future, Goku Black knocks out Vegeta, who is in SSJ Blue form, easily. Then, Goku is also handily defeated.   Despite this massive power difference, Trunks steps in and fares far better than either Vegeta or Goku. How is this possible?


Let $F$ be a finite collection of binary strings of finite lengths, and assume that no two distinct concatenations of two finite sequences of codewords result in the same binary sequence. Let $N_i$ denote the number of strings of length $i$ in $F$. Prove that$$\sum_{i}{\frac{N_i}{2^i}}\le{1}$$

I am trying to solve as many problems as I can but I am a little confused on this one. It is in chapter 1, problem 9 (Probabilistic method, Alon & Spencer). The problem says   Let $F$ be a finite collection of binary string of finite lengths and assume that no two distinct concatenations of two finite sequences of codewords result in the same binary sequence. Let $N_i$ denote the number of string of length $i$ in $F$. Prove   $$\sum_i \frac{N_i}{2^i}\leq 1$$  The problem that I have is that I understand the problem as if $w_1w_2=w_3w_4$ then we must have $w_1=w_3$ and $w_2=w_4$, but if this is what they mean then let $F=\{1,0,100\}$ then the possible contatinations are: $11,00,10,01,1001,1100,0100,1000,100100$, so no two are the same, but then we would have $N_1=2,N_3=1$, so $N_1/2+N_3/2^3=2/2+1/8>1$. I assume I must be understanding the condition incorrectly.


I was trying to find a global minimum for the function $$(a + b) z + (a + c) y + (b + c) x $$ according to the following constraint: $$(xy + xz + yz)(ab + bc + ac)=1.$$ By lagrange multipliers I found $2$ as a critical point, but how  calculating the  Bordered Hessian?Please help me to calculate a  Bordered Hessian.

I was trying to find the global minimum for the function $$(a + b) z + (a + c) y + (b + c) x $$ subject to the following constraint: $$(xy + xz + yz)(ab + bc + ac)=1.$$ By Lagrange multipliers I found $2$ as a critical value, but calculating the  I did not find the answer. Could anyone there help me, please?


I am using Firefox (Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.15) Gecko/2009101601 Firefox/3.0.15 (.NET CLR 3.5.30729)). I want to be able to clear the search terms in the search box when I close a tab. I am using Google as my search provider.   Is this possible with Firefox about:config or do I have to write a plugin?

I often select something I want to google with the mouse (no [ctrl-c], I'm on X11/Linux), so I can paste it into the search engine box in firefox. However, there's usually already something in there from a previous search, so I can't just paste it. This sits in my way all the time, so here's my question:  Is there a way to clear the search form as soon as I hit [enter]? So it'll be empty for the next time I search for something?  On Linux, I find that the [ctrl-c] ... [ctrl-v] should not be neccessary in that case, as it forces me to move the hand back to the keyboard (i'm left-handed).  This would also be helpful in cases I did google something that I don't want others to see. It's easy to forget that your last search is still up there, despite you closed the tab already.


Brand new to Blender here and not sure what I'm doing wrong. Have a texture as a plain emission with a white color but if the mesh it's attached too isn't visible to the camera, it doesn't emit any light.

The closest I can get to making mesh lights affect their environment in Blender Eevee is giving them an Emission material and turning on "Bloom". But this isn't emitting proper light, it just looks like it is, but it doesn't light the surroundings whatsoever.     I would like to be able to light a scene with meshes without having to put point lamps everywhere just to make them emit light.


I am trying to install Ubuntu One but here showing an error message.   I've no idea what does it mean and how to handle it.  Anybody please help me.

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


Do Android devices contain a BIOS? If not, how does it boot up? What is the software that actually boots it up and can you replace it?

I have a solid experience of installing different OS (Linux, Windows,...) on PC. I would like to try just for fun to install Linux on a unbranded Android low cost tablet acquired in 2015. I spent some time browsing the web and as far as I understood there is a risk that during the flash procedure the device could be potentially damaged. So I read extensively on how to backup the ROM using TWRP and all related matters. I would like just to have some explanations on the below topic:    Scenario #1: I have a PC, if I want to try another OS I can just format the hard disk and install it, in no way there is the risk of damaging the BIOS motherboard. Motherboard and hard-disk are separated, so no problems may arise.  Scenario #2: I have a tablet, want to wipe out Android and install an upgraded version of Android or a Linux distro suitable for mobile devices.     Why in this scenario there is a risk to get an unusable device?   Is this because in this case motherboard and unit memory are bundled together? So wiping the memory will also erase the configuration settings of the motherboard?   Do we have here the equivalent of BIOS settings?


So i have an answer here, but i need to know how to ask question for that answer:     ans:he is his 3rd son.      que: which son is he to him??   Is that question framing correct? Thanks.

How to ask the position(?) of a president (like 10th) of a country, correctly?


Sorry if it's a stupid question. I would like to free up some space and /var/log is full of logs. I do not intend to use any of the log files, so I don't care if they get deleted or not. But I afraid that it may affect the functionality of the services that produce logs. I understand that it may depend on the program that produces the logs. but Do you think it would be safe to remove regular services and system log such as:  alternatives.log auth.log boot.log                  mail.log      syslog dmesg dpkg faillog fontconfig.log kern.log wtmp nginx/* apt/* btmp

( deals with a similar issue, but it talks about a rotated log file.)  Today I got a system message regarding very low /var space.   As usual I executed the commands in the line of sudo apt-get clean which improved the scenario only slightly. Then I deleted the rotated log files which again provided very little improvement.  Upon examination I find that some log files in the /var/log has grown up to be very huge ones. To be specific, ls -lSh /var/log gives,   total 28G -rw-r----- 1 syslog            adm      14G Aug 23 21:56 kern.log -rw-r----- 1 syslog            adm      14G Aug 23 21:56 syslog -rw-rw-r-- 1 root              utmp    390K Aug 23 21:47 wtmp -rw-r--r-- 1 root              root    287K Aug 23 21:42 dpkg.log -rw-rw-r-- 1 root              utmp    287K Aug 23 20:43 lastlog    As we can see, the first two are the offending ones. I am mildly surprised why such large files have not been rotated.  So, what should I do? Simply delete these files and then reboot? Or go for some more prudent steps?  I am using Ubuntu 14.04.  UPDATE 1  To begin with, the system is only several months old. I had to install the system from scratch couple of months back after a hard disk crash.  Now, as advised in ,  I first checked the offending log files using tail, no surprise there. Then, for deeper inspection, I executed this script from the .  for log in /var/log/{syslog,kern.log}; do    echo "${log} :"   sed -e 's/\[[^]]\+\]//' -e 's/.*[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}//' ${log} \   | sort | uniq -c | sort -hr | head -10 done   The process took several hours.  The output was in the line of,   /var/log/syslog : 71209229  Rafid-Hamiz-Dell kernel:  sda3: rw=1, want=7638104968240336200, limit=1681522688 53929977  Rafid-Hamiz-Dell kernel:  attempt to access beyond end of device 17280298  Rafid-Hamiz-Dell kernel:  attempt to access beyond end of device    1639  Rafid-Hamiz-Dell kernel:  EXT4-fs warning (device sda3): ext4_end_bio:317: I/O error -5 writing to inode 6819258 (offset 0 size 4096 starting block 54763121030042024)        <snipped>  /var/log/kern.log.1 : 71210257  Rafid-Hamiz-Dell kernel:  attempt to access beyond end of device 71209212  Rafid-Hamiz-Dell kernel:  sda3: rw=1, want=7638104968240336200, limit=1681522688    1639  Rafid-Hamiz-Dell kernel:  EXT4-fs warning (device sda3): ext4_end_bio:317: I/O error -5 writing to inode 6819258 (offset 0 size 4096 starting block 954763121030042024)    (/dev/sda3 is  my home directory. As we can find,   lsblk /dev/sda NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0 931.5G  0 disk  ├─sda1   8:1    0 122.1G  0 part / ├─sda2   8:2    0   7.6G  0 part [SWAP] └─sda3   8:3    0 801.8G  0 part /home    Why a process will want to write beyond the limit is actually outside the scope of my comprehension. Perhaps I will want to ask a different question in this forum if this continues even after a system update.)  Then, from  (you may want to check  for a deeper understanding), I executed,   sudo su - > kern.log > syslog   Now, these files have zero sizes. The system is running fine before and after a reboot.   I will watch these files (along with others) in the next few days and report back should they behave out-of-line.  As a final note, both  the offending files (kern.log and syslog), are set to be rotated, as inspection of the files (grep helped) inside  /etc/logrotate.d/ shows.  UPDATE 2  The log files are actually rotated. Looks like the large sizes were attained on a single day.


I am currently using this in the preamble:  \theoremstyle{plain}% default \newtheorem{thm}{Theorem}[section] \newtheorem{lem}[thm]{Lemma} \newtheorem{prop}[thm]{Proposition} \newtheorem*{cor}{Corollary} \theoremstyle{definition} \newtheorem{defn}{Definition}[section] \newtheorem{conj}{Conjecture}[section] \newtheorem{exmp}{Example}[section] \theoremstyle{remark} \newtheorem*{rem}{Remark} \newtheorem*{note}{Note} \newtheorem{case}{Case}   On the whole, this works exactly as I want it to.  However for cases within a proof, I want the numbering to start at 1 again within each theorem: eg it should read:  Thm 1: blah blah Proof: Case 1: Case 2:  Thm 2: blah blah blah Proof: Case 1: Case 2:   Rather than in the second theorem the cases starting from 3 which is what currently happens.  Google suggested using something to do with numbered_within but I haven't managed to get the formatting right for this to work yet.. any ideas?

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


Is there any way to automatically print en dashes whenever an em dash (the UTF character, not threes dashes ---) is used?

I am using the Neo keyboard layout, which uses all kinds of modifier keys to input all kinds of characters (e.g. Greek letters and mathematical symbols). It also has shift+Mod3+space mapped to Unicode 0A, no-break space. From time to time it happens that I mistakenly press these buttons (while entering a space between other symbols with the same modifier keys).  Unfortunately [Lua|Xe]TeX obeys these spaces as unbreakable spaces both in normal text and in mathmode (using fontspec and unicode-math). However my editor (vim) shows the symbol like a normal space, so it is impossible to see where I made a mistake.  Is there an easy way to tell [Lua|Xe]TeX to treat no-break spaces like normal spaces?


Why, after seeing Rogue One, in New Hope, does Leia send the plans to Obi-wan and not just send R2 back to the Alliance.

I know that there is a sort of similar question about how Princess Leia knew about Obi-Wan , but I'm curious as to why and how Princess Leia thought an aging Obi-Wan Kenobi would be of any help to the Rebellion worth risking herself and her crew in addition to the stolen Death Star plans (which apparently the Rebellion only had stored on R2-D2 physically, and no other copies)?   See  for the scene in question.  Things to consider:   Obi-Wan as a resource to the Rebellion didn't even have his own ship or own resources to contribute (not even enough to pay for passage for a smuggler to transport him). Obi-Wan as a fighter did not do any extensive amount of fighting in A New Hope (he cut off a guy's arm in a bar, and sacrificed himself vs Darth Vader, that's it) Obi-Wan as a Jedi didn't have an apprentice yet, and was probably not going to have a shot at taking on Darth Vader or the Emperor. Princess Leia risked near everything just to visit in person the place where she thought Obi-Wan still lived (he could have been dead for years assuming that she said "years ago" in her message to Obi-Wan regarding how she knew of him). She risked herself, her ship, her crew, her cause (if she had been tortured into giving up the Rebellion) and the stolen plans themselves (next time stormtroopers, shoot down the empty escape pod, if for no other reason than to improve your atrocious aim and shooting during the original trilogy), just to see if Obi-Wan might be interested if still alive to maybe (somehow) help the Rebellion.   Possible answers I've considered (I'm curious for more though):   Obi-Wan might have some sort of wisdom or knowledge about attacking the Death Star and he may have been able to analyze the stolen Death Star plans for weaknesses (but the Rebels did a good job of this anyway). Obi-Wan would have been exceptional at espionage and infiltration (took out the tractor beam on the Death Star, successfully avoided almost every stormtrooper he encountered, and Jedi mind tricked the ones he couldn't avoid -- think "these aren't the droids you're looking for"), although Obi-Wan's stealth would not have been needed inside the Death Star had Leia not gotten herself captured and in need of a rescue from the Death Star in the first place, which happened as a result of trying to visit Obi-Wan.


let's say I have these two commands:  $ cat file1 file1_a file1_b file1_c file1_d   And:  $ cat file2 file2_a file2_b file2_c file2_d   How can I combine these outputs using a custom separator (e.g. ...) so that I get the following output:  $ # some fancy command like { cat file1 & cat file2 } | combine --separator='...' file1_a...file2_a file1_b...file2_b file1_c...file2_c file1_d...file2_d   ?

Standard cat concatenates files line by line (row by row, if you will). I find myself needing a horizontal cat command more and more often recently; i.e. a command that takes a list of files and concatenates them horizontally, column by column. So far I’ve used ad-hoc workarounds but I’d like to know if there exists a good solution for this.  To clarify, consider the following comparison between cat and hcat of two files:  $ cat a.dat 1.dat a b c d 1 2 3 4 $ hcat -s ' ' a.dat 1.dat a b 1 2 c d 3 4   (Unlike for cat we need to specify a separator since by convention UNIX files don’t have a column separator at the end.)


I'm new to Unity but not new to development so I'm wondering what the standard way of doing this in with Unity.  In the scene from the start is an empty GameObject that has a script that contains all of the items in the game. Once the game starts, chest prefabs are going to be spawned in the game and upon interaction they will reveal some random loot from the items script.  Is it better practice to have a script on all of the chests that accesses the items script or should I create another empty GameObject as a sort of a chest manager that accesses the item script and keeps track of all of the chests in the game and what all of their loot is.

Does a C# script added to a parent object work more efficiently and effectively (in terms of both memory and performance) on all objects, in my case lighting, or adding script components to each lighting/GameObject object? This goes for other GameObjects parented in the hierarchy.


Let $A \in M_n(\mathbb{C})$ such as $A^m=I_n$ or $A^m=-I_n , m\ge1$. Show that A is diagonalizable.

Let $A$ be an $n\times n$ complex matrix. If $A^m=I_n$ for some positive integer $n$. How to show that $A$ is diagonalizable?


I keep getting this message when running an update: The repository '[http://ppa.launchpad.net/landscape/19.10/ubuntu  Release][1]' does not have a Release file Updating from such a repository can't be done securely, and is therefore disabled by default.  See apt-secure(8) manpage for repository creation and user configuration details.

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


Is there a way I can automatically disable sound on my PC after a certain time?   Scenario: I go to sleep. Someone calls me on Skype or my Gmail Notifier plus application makes an alarm notification for new email.   Intended use-case: PC is still running as I forgot to put it into sleep mode Since it is now after 11:00 PM, any sounds are muted.

I always used to wake up to my favorite radio station on my alarm clock. However, I have moved and can no longer get that radio station over the air. To solve this problem, I would like to stream the station on my laptop, but have it muted overnight, then set it to unmute at a specific time in the morning, so that it will act as an alarm clock. Is there a way to schedule my laptop (Windows 7 64-bit) to unmute at a specific time?


I use the following method to connect vSphere API with .NET C#. I am able to connect but the constructor for new VimService() takes too much time to be initialized.  I have two questions regarding this?   What can be the possible reason for this latency(servers are in the same network)? How can I make this initialization faster?     public void Connect(string url, string username, string password) {      if (_service != null) {         Disconnect();      }      _service = new VimService(); // it takes almost 1 minute to respond      _service.Url = url;      _service.Timeout = 600000;       _service.CookieContainer = new System.Net.CookieContainer();       _sic = _service.RetrieveServiceContent(_svcRef);       if (_sic.sessionManager != null) {         _service.Login(_sic.sessionManager, username, password, null);      }       _state = ConnectionState.Connected;      if (AfterConnect != null) {         AfterConnect(this, new ConnectionEventArgs());      }   }

I'm doing some experiments with Microsoft Dynamics CRM. You interact with it through web services and I have added a Web Reference to my project. The web service interface is very rich, and the generated "Reference.cs" is some 90k loc.   I'm using the web reference in a console application. I often change something, recompile and run. Compilation is fast, but newing up the web service reference is very slow, taking some 15-20 seconds:      CrmService service = new CrmService();  Profiling reveals that all time is spent in the SoapHttpClientProtocol constructor.  The culprit is apparently the fact that the XML serialization code (not included in the 90k loc mentioned above) is generated at run time, before being JIT'ed. This happens during the constructor call. The wait is rather frustrating when playing around and trying things out.  I've tried various combinations of sgen.exe, ngen and XGenPlus (which takes several hours and generates 500MB of additional code) but to no avail. I've considered implementing a Windows service that have few CrmService instances ready to dish out when needed but that seems excessive.  Any ideas?


I have a class that saves a name, and for each name can record a telephone number and an e-mail address:  class address_book:      def __init__(self,name):         self._name=name         self._info=dict()      def name(self):         return self._name      def add_number(self,number):         self._info['phone']=number      def add_email(self,e_mail):         self._info['email']=e_mail      def __str__(self):         return f'Name: {self._name}\nInfo:{self._info}'   First of all I wantto ask you if it is correct, since it is the first class that I write in Python.  Second, I want to ask you if there is any way to print at the same time all the elements that this class contains. For example:  a=address_book('James') a.add_number(8975436) a.add_email('James11@xxx')  b=address_book('Carl') b.add_number(96543436) b.add_email('carl128@xxx')  c=address_book('Ann') [...]   If I want to print them all, I have to write:  print(str(a),'\n',str(b),'\n',str(c))   and that's ok since there are just 3 names saved in my address book, but what can I do to see them all at once, when there are many names saved or when I don't know the exact number?

With a class in Python, how do I define a function to print every single instance of the class in a format defined in the function?


Err:16  precise-backports InRelease   The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5  W: GPG error:  precise-backports InRelease: The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5  E: The repository ' precise-backports InRelease' is not signed.  N: Updating from such a repository can't be done securely, and is therefore disabled by default.  N: See apt-secure(8) manpage for repository creation and user configuration details.  W: GPG error:  precise Release: The following signatures were invalid: 630239CC130E1A7FD81A27B140976EAF437D05B5  E: The repository ' precise Release' is not signed.  N: Updating from such a repository can't be done securely, and is therefore disabled by default.  N: See apt-secure(8) manpage for repository creation and user configuration details.  I got these errors please help

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I'm trying to calculate the trigonometric sum : $$\sum\limits_{k=1}^{n}\cos(k x)$$  This is what I've tried so far : $$\renewcommand\Re{\operatorname{Re}} \begin{align*} \sum\limits_{k=1}^{n}\cos(k x) &= \Re\left(\sum\limits_{k=1}^{n}e^{i k x}\right)\\ &= \Re\left(e^{i x}\frac{1 - e^{inx}}{1 - e^{ix}}\right) \end{align*}$$  How can I go on ?

I am being asked to prove that $$\sum\limits_{k=0}^{n}\cos(kx)=\frac{1}{2}+\frac{\sin(\frac{2n+1}{2}x)}{2\sin(x/2)}$$ I have some progress made, but I am stuck and could use some help. What I did: It holds that $$\sum\limits_{k=0}^{n}\cos(kx)=\sum\limits_{k=0}^{n}Re(\cos(kx))=\sum\limits_{k=0}^{n}Re(\cos(x)^{k})=Re(\sum\limits_{k=0}^{n}\cos(x)^{k})=Re\left(\cos(0)\cdot\frac{\cos(x)^{n}-1}{\cos(x)-1}\right)=Re\left(\frac{\cos(x)^{n}-1}{\cos(x)-1}\right) $$ For any $z_{1},z_{2}\in\mathbb{C}$ we have it that if $z_{1}=a+bi,z_{2}=c+di$ then $$\frac{z_{1}}{z_{2}}=\frac{z_{1}\overline{z2}}{|z_{2}|^{2}}=\frac{(a+bi)(c-di)}{|z_{2}|^{2}}=\frac{ac-bd+i(bc-ad)}{|z_{2}|^{2}}$$ hence $$Re\left(\frac{z_{1}}{z_{2}}\right)=\frac{Re(z_{1})Re(z_{2})-Im(z_{1})Im(z_{2})}{|z_{2}|^{2}}$$ Thus, $$Re\left(\frac{\cos(x)^{n}-1}{\cos(x)-1}\right)=\frac{(\cos(nx)-1)(\cos(x)-1)-\sin(nx)\sin(x)}{(\cos(x)-1)^{2}+\sin^{2}(x)}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{\cos^{2}(x)-2\cos(x)+1+\sin^{2}(x)}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{-2\cos(x)+2}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{-2(\cos(x)-1)}= \frac{=\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{-2(-2\cdot\sin^{2}(x/2))}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{4\sin^{2}(x/2)}=\frac{\cos(nx)\cos(x)-\cos(nx)-\cos(x)+1-\sin(nx)\sin(x)}{4\sin^{2}(x/2)}=\frac{\cos(x(n+1))-\cos(nx)-\cos(x)+1}{4\sin^{2}(x/2)} $$ This is the part where I am stuck, I would appriciate any help or hint on how to continue. Edit: Given the corrections by André I get: $$(\cos(nx+x)-1)(\cos(x)-1)+\sin(nx+x)\sin(x)=\cos(nx+x)\cos(x)-\cos(nx)-\cos(x)+1+\sin(nx+x)\sin(x)$$ so $$\cos(nx+x)\cos(x)+\sin(nx+x)\sin(x)=\cos(xn+x-x)-\cos(nx)=0$$ Edit 2: I found anoter mistake in the above, I will try to correct Edit 3: When multiplying correctly the above it works out :-)


Given a 1D sequential categorical input variable, e.g. [rainy, sunny, rainy, cloudy, cloudy], with a small domain {rain, sunny, cloudy}, what encoding methods (e.g. one-hot, dummy, binary) and what scaling methods (e.g. standardisation, min-max scaling) are appropriate specifically for use with RNNs such as LSTM and GRU given their logistic activation functions in comparison to other NNs which tend to use ReLU?  In Yann A. LeCun et al - Efficient BackProp Chapter in Neural Networks: Tricks of the Trade: Second Edition, pages 9–48, LeCunn states that preprocessing of data should be performed in such a way so as to ensure that the activations of the neurons have unit variance and mean zero (which is of course not possible for sigmoid activations) to ensure backprop is efficient, and presumably to ensure that signals to later layers lie approximately in the region [-1, 1] where in the gradient of the logistic functions is greatest.  I believe this is of particular significance to LSTM/GRU RNNs since if one uses one-hot encoding (or some other binary style encoding) the distribution of the responses will not be distributed with unit variance (sigmoid and tanh) as per LeCun's directions.   addendum - This has nothing to do with the convolution operation (as per the tagged duplicate) in the context of a categorical variable. This is a question about what are the appropriate encoding and scaling methods for GRU/LSTM RNNs which are likely specific to these types of networks due to the logistic type activation functions they use.

Convolution Neural Network (CNN) has been very successful in numerical features / inputs / independent variables, such as computer vision or or audio signal. And It can be viewed as extracting the useful information in frequency domain. (See )  But would it be useful in categorical feature. For example, suppose all of our features are categorical: a person's gender, race, education level, etc., what is the convolution mean on the data matrix (one-hot encoded) like that?    More background, my data are not images or audio, but more similar to , with the increasing popularity in deep learning and CNN, I am curious if it is also useful in non-images.


There is something I fail to understand involving Leonhard Euler's identity:  It is well known that $(e^{2π})^i = 1$.  That means $\sqrt[i]{1} = e^{2π} ≈ 535.49 $.  But there's a rule that states $ \sqrt[a]{1} = 1$ , that means $\sqrt[i]{1} = 1$.  Applying this rule here: if $ a = b, a = c $ it means $ b = c $.  That means $ 535.49 = 1 $?

I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


So I have a shell script math.sh which takes a number as an argument and echos one added to it and one subtracted from it: #!/bin/bash  echo "Add: "$(($1 + 1)) echo "Subtract : "$(($1 - 1))  and my other shell script execute.sh is basically taking math.sh and a textfile as an argument and writing the output of math.sh to the text file. #! /bin/sh echo $1 > $2  However, the two echos are outputting to the text file on the same line as: Add: $(($1 ++)) Subtract : $(($1 --)) when I need it on separate lines like: Add:$(($1 ++)) Subtract:$(($1 --)) How would I do this without editing math.sh? Because my execute.sh needs to be able to output any shell script to the text file, not just math.sh, on separate lines.

Currently I have a shell script which logs messages to a log file like this:  log_file="/some/dir/log_file.log" echo "some text" >> $log_file do_some_command echo "more text" >> $log_file do_other_command   When executing this script, there is no output to screen, and, since I'm connecting to the server via putty, I have to open another connection and do "tail -f log_file_path.log", because I can't terminate the running script and I want to see the output in real time.  Obviously, what I want is that the text messages are printed on screen and into file, but I'd like to do it in one line, not two lines, one of which has no redirection to file.  How to achieve this?


I have a simple Python script here:  #! /usr/bin/python import os  os.system('notify-send Hello "This is a message"')   When I, as a normal user, run the script in terminal as ./notification.py, a desktop notification is displayed on the screen with the contents Hello This is a message. However, when I (normal user) run sudo ./notification.py, no desktop notification is shown. I am unable to understand this behaviour and how to go about solving it or working around it.  PS:   OS - OpenSUSE Leap 42.1   DE - KDE Plasma v5.5.5

I am using Arch Linux with KDE/Awesome WM. I am trying to get  notify-send to work with cron.   I have tried setting DISPLAY/XAUTHORITY variables, and running notify-send with "sudo -u", all without result.  I am able to call notify-send interactively from the session and get notifications.  FWIW, the cron job is running fine which I verified by echoing stuff to a temporary file. It is just the "notify-send" that fails to work.  Code:  [matrix@morpheus ~]$ crontab -l * * * * *  /home/matrix/scripts/notify.sh  [matrix@morpheus ~]$ cat /home/matrix/scripts/notify.sh #!/bin/bash export DISPLAY=127.0.0.1:0.0 export XAUTHORITY=/home/matrix/.Xauthority echo "testing cron" >/tmp/crontest sudo -u matrix /usr/bin/notify-send "hello" echo "now tested notify-send" >>/tmp/crontest  [matrix@morpheus ~]$ cat /tmp/crontest testing cron now tested notify-send  [matrix@morpheus ~]$    As you can see the echo before & after notify-send worked. Also I have tried setting DISPLAY=:0.0   UPDATE: I searched a bit more and  needs to be set. And after hardcoding this using the value I got from my interactive session, the tiny little "hello" message started popping up on the screen every minute!   But the catch is this variable is not permanent per that post, so I'll have try the the named pipe solution suggested there.   [matrix@morpheus ~]$ cat scripts/notify.sh #!/bin/bash export DISPLAY=127.0.0.1:0.0 export XAUTHORITY=/home/matrix/.Xauthority export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-BouFPQKgqg,guid=64b483d7678f2196e780849752e67d3c echo "testing cron" >/tmp/crontest /usr/bin/notify-send "hello" echo "now tested notify-send" >>/tmp/crontest   Since cron doesn't seem to support notify-send (at least not directly) is there some other notification system that is more cron friendly that I can use?


I'm trying to modify an array of char declared in main (tab). So i send it to modify_tab and i modify it. But it doesn't work and send me a Segmentation Fault. Here's my code :    1│void    my_putstr(char *str)   2│{   3│  int   i;   4│   5│  i = 0;   6│  while (str[i] != '\0')   7│    {   8│      write(1, &str[i], 1);   9│      i++;  10│    }  11│}  12│  13│void    modify_tab(char *tab)  14│{  15│  char  *map;  16│  17│  map = tab;  18│  map[3] = 'a';  19│  my_putstr(map);  20│}  21│  22│void    main()  23│{  24│  char  *tab;  25│  26│  tab = "0123456789\n\0";  27│  my_putstr(tab);  28│  modify_tab(tab);  29│}

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


Consider a domain $G\subseteq \mathbb{C}$ and $f_1,...,f_n: G\rightarrow\mathbb{C}$ holomorphic functions, such that the sum $|f_1|+...+|f_n|$ assumes a local maximum in $G$. I am trying to show that $f_1,...,f_n$ are all constant in $G$. As $|f_1|+...+|f_n|$ assumes a local maximum, there is a $z_0\in G$ such that $|f_1(z)|+...+|f_n(z)|\leq|f_1(z_0)|+...+|f_n(z_0)|:=M$. So $|f_i|\leq M\ \forall i\in\{1,...,n\}$. Now I tried to use the Maximum principle for holomorphic functions, which tells me that a holomorphic function $f:G\rightarrow \mathbb{C}$ is constant if $|f|$ assumes a local maximum for a $z_0\in G$. The problem is, I know that $|f_i|$ are bounded, but I do not know if they assume a local maximum, so I doubt I can use the Maximum principle for holomorphic functions here. Any hint would be highly appreciated. Many thanks in advance.

Let $f_1,f_2,\ldots,f_n $ be  analytic complex functions in domain $D$. and $f = \sum_{k=1}^n|f_k|$ is not constant.  Can I show the  maximum of $f$ only appears on boundary of $D\,$?


I got a weird problem on using spread operator to clone nested obj.  The constant of a local scope is copy from a const in global scope using spread operator. If I change a value of a property in 1 level deep. The change will appears on the global variables too.    const foo = {     a: {         a1: 'a1',         a2: 'a2',     },     b: 'b', };  (() => {     const bar1 = { ...foo };     bar1.a.a1 = 'changed'; })();  console.log(foo);     How could I prevent this behavior?

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


What makes us formulate  based on ?  Isn't the real quantum world based on unknown laws to us?  Is it possible that results of an experiment will be measurable in another way but not ?

In a recent publication,  (Gerhardt 2011) (), the statistics of quantum mechanics is faked using classical light sources.  But if it is possible for physicists to fake an experiment to imitate QM, how can we be sure that nature doesn't do the same trick on us? Can it be that QM is a fake, and in the end QM turns out to be an artifact of our imperfect measurement devices?


(like others asking similarly to myself) I'm just getting started with Blender. I'm following  and thought to give myself something more interesting than creating a single donut, why not three donuts? I'm trying to switch to edit mode for my frosting on my donuts to pull down and create the drizzle, but I can only go into edit mode for a single frosting object. Frosting.002 (selected in the scene collection) is allowing me to enter edit mode:  But I cannot enter edit mode for the other two, even though I have them selected in the scene collection (as pictured below)   I'm not sure what I'm not doing correctly, as it seems this is usually remedied by selecting the appropriate object first (which I thought I did) or restarting Blender. Neither have worked for me, unfortunately. This leads me to believe I've set my objects into a state that needs to be un-done, but I'm not sure what that would be or how to go about fixing it.

I tried to follow the new Blender 2.8 tutorial from Blender Guru.   When entering "Sculpting" with the icing there were suddenly alot of holes in it. Why is this?


I will be traveling to Europe and Asia with my Hong Kong passport (tickets were booked with my previous legal name) and coming back with my US passport (I will be booking the ticket with my Hong Kong passport, since it has my previous legal name).  Will I get into trouble with US immigration when coming back? Since the US doesn't check passports going out of the country, how do they know who went out? Or doesn't it matter?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


Ok this one is hurting my mind now.  Most details I can remember are:   Giant Living 'city' made from Purple material Main Character can speak to/control the 'city' Magic is 'Will'? Remember there being multiple books,but couldn't say how many   Sorry I can't be more detailed, but it's hiding in the corner of my mind, just out of sight, and I'm just getting flashes.  (City may be called 'Kethinica', but I guessed the spelling)

I'm looking for a science fiction novel that I would've read from a library in the early 2010s. I'm fuzzy on the plot, but it was in a setting with space travel, and I believe the view shifted around to follow the separate characters.  I do recall two distinguishing characteristics in particular:  Some people use a brain upload/backup to restore themselves to a new body after an accidental death, maybe retrieving the recorder if possible to include memories immediately before death. However, this may not be an accessible service for everyone due to cost/coverage, and I think a large corporation handled it. People might've kept identical clones on hand or opted for a brand new body, but I think it meant very little fear of death. At least one character, maybe an investigator/reporter/mercenary, died in an explosion (?) and was restored midway through the book.  Some others chose the (less common) option of linking several bodies together to form a group consciousness, where a single unified mind inhabited all of the bodies at once. They could purchase more bodies to connect, and gained similar immortality since any body dying would not affect the whole.  I remember that at one point, a character entered a store and was irritated when the employees carried on a conversation as she moved to the right aisle, only to realize they were a group mind and thought she'd noticed. She entered into a relationship with them later and, at the end of the book, ended up buying more bodies to become a group herself.  I've googled around for this book for a while and looked through Wikipedia's  and , but I didn't recognize the plot anywhere. Hope a detail stands out to someone out there, I'll try to answer any more questions!


I am in the final stages of writing a paper to submit at an IEEE conference. I am the primary author, in the sense that I did most of the work and most of the writing. I have three other co-authors who have contributed a significant amount of advice and proofreading (one of whom is my supervisor).  Last week, my supervisor told me I should add person X as a co-author (in addition to myself and my three existing co-authors). I have never met X and they have contributed absolutely nothing. It's not even clear if X has looked at the work we have done!  My response was as follows: "Fine, if X at least looks at section Y to make sure it has no errors, I'll put them as the last author." This has not yet happened, with less than a week to go before the deadline. My supervisor is still insisting that I add X as an author.   What should I do in this circumstance?

My first advisor wants me to include my second advisor's name in a paper that I worked on before she (2nd advisor) came along.   Should I include her name even though she didn't do anything in that paper? I don't think she even read it.


I want to do the following:  Supose you have a written document, with sections, subsections, subsubsections, figures, equations, bibliography, etc. With reference among themselves.  I would like to create "in an automatic way", a graph diagram that express the relations (references) in between all the elements of the document.  I know I can use TiKz to create the graph. My question is how could I can obtain the information off all the objects and their references to draw this graph.  This document is an example of what I would like to achieve   Thank you !

I have quite a lot of labels and references (around 250 labels, 600 references to those) in my document. As I need to re-arrange parts of the document, I'd like to know which labels are referenced from which parts (and, transitively, which are referenced by the referenced label etc.). In other words, I'd like to have a graphical representation of my document which only shows the names/numbers of the environments (proofs, lemmas, etc.) and the corresponding labels and references.  Example:   Lemma 2 -> Proof A, Proof B, Lemma 1 Proof B -> Proof C Lemma 3 -> Lemma 2   How can I generate such a graph? I am only interested in the information conveyed by the graph, the graph itself will not be published and does not need to look nice.


On Ubuntu 17.04, I had CompizConfig set up so that Ctrl+Alt+Key pad number would place the current window into the appropriate quarter/half of the screen.  This is not working after upgrading to 17.10.  I've tried changing the Grid and Put settings in Compiz but nothing seems to take effect.  In addition, I have an external monitor connected to my laptop and now Ctrl+Alt+4 and Ctrl+Alt+6 move the window from one monitor to the next.  I want the window to remain on the current monitor.  How can I get this back?  Update: I'm using GNOME display environment. I had Wayland setup by default after the upgrade but disabled it due to another issue I was experiencing.

By default, instead of doing something useful, the Ctrl-Alt-Numpad key combination in Gnome 3 shoves a window in the specified direction across the entire workspace. These shortcuts do not show in the Gnome 3 keyboard settings panel; they're just there, and they're in the way.  How can I get this behavior back in Ubuntu 17.10?


I'm building a Movie Rating CRUD application and whenever I click on the 'Categories' link, which is supposed to access the database and display the categories and the list of movies available, I receive an error message: java.lang.NullPointerException Database.ConnectionPool.freeConnection(ConnectionPool.java:40) Database.ItemDB.getItems(ItemDB.java:59) Controllers.CatalogController.processRequest(CatalogController.java:33) Controllers.CatalogController.doGet(CatalogController.java:86) javax.servlet.http.HttpServlet.service(HttpServlet.java:622) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)  ItemDB.java public static ArrayList<Item> getItems() {          ArrayList<Item> items = new ArrayList<Item>();          ConnectionPool pool = ConnectionPool.getInstance();     Connection connection = pool.getConnection();     PreparedStatement ps = null;     ResultSet rs = null;           String query = "SELECT * FROM Item";                  try {         ps = connection.prepareStatement(query);         rs = ps.executeQuery();                  while(rs.next()) {             Item item = new Item();             item.setItemCode(rs.getString("itemCode"));             item.setItemName(rs.getString("itemName"));             item.setCatalogCategory(rs.getString("CatalogCategory"));             item.setItemDescription(rs.getString("descript"));             item.setItemRating(rs.getString("itemRating"));             item.setImageUrl(rs.getString("imageURL"));             items.add(item);         }         return items;              } catch (SQLException e) {         System.out.println(e);         return null;     } finally {         DBUtil.closeResultSet(rs);         DBUtil.closePreparedStatement(ps);         pool.freeConnection(connection);     } }  ConnectionPool.java public void freeConnection(Connection c) {     try {         c.close();     } catch (SQLException e) {         System.out.println(e);     } }  Context.xml <Resource            auth="Container"            driverClassName="com.mysql.jdbc.Driver"            logAbandoned="true"            maxActive="100" maxIdle="30" maxWait="10000"            name="jdbc/MovieThoughts"  removeAbandoned="true"            removeAbandonedTimeout="60" type="javax.sql.DataSource"            url="jdbc:mysql://localhost:3306/root"            username="MovieThoughts" password=[my_password] />  I've tested the connection in my MySQL workbench and it can establish the connection in there.

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


I was taught that it is correct to say "between you and I," instead of "between you and me." Which is correct?  I forgot to mention that my father said if you left out the other person. the correct word will be "I" not "me'.  A person doesn't said "me" went to the store. A person would say "I" went to the store.

When the phrase is used as an object, why so many native speakers are saying "you and I" instead of "you and me"? I'm not a native speaker but I thought "you and me" is correct. Not sure if this falls into the same category, but "Just between you and me" sounds more natural than "Just between you and I".


Do any one knows online free tutorial in Introduction to GIS, where i can find the below topics. 1.Coordinate sysem 2.Georelational Vector Data model 3.Raster Model 4.Data Input 5.Geometric transformation 6.Spatial Data Editing

This Q&A lists free as in $0 workshops in GIS and related fields that have their material available to view or download online. The list is not limited to FOSS GIS, as GISers usually use a combination of open and closed source tools to accomplish their tasks. Some of these tools are easier than others and some are better documented. This list will be a great benefit to the community especially for new comers to the field. General GIS   from   from   from   from   Open-source GIS   from   from   from   from   from   ESRI Products   from   from   Transportation These links include either theoretical or applied transportation knowledge in transportation planning          Disaster Management    Databases   from   Geo Statistics    from


I am going to meet a potential supervisor for honours project in 1 week. Its first of a kind meeting for me. I would appreciate any advice on what to expect, would it be a formal or informal meeting and how I should prepare for it.? I am new to this forum, so sorry if this is a repetitive question.

I am meeting with a biology professor to discuss opportunities for an undergraduate research assistantship. I initiated the contact by introducing myself via email and sending him my CV and general areas of interest. He agreed to meet with me to discuss research opportunities, but I am wondering what is the expected length of a meeting like this? Also, are there any materials (e.g. printed copy of my CV) that I should bring? Should I come prepared with questions about his research (which would require hours and hours of critical reading, because while his work seems interesting to me, it's also very difficult to fully understand) or simply honestly tell him that I'm not as knowledgeable about his work as I would like to be but it sounds very interesting to me and I want to be involved? Lastly, is casual clothing appropriate?  Any answers are appreciated. Thank you.


When I scroll the 'similar questions' box the text of the items overlaps making them unreadable. See screenshot (this site) and screen cast (SO).  I keep coming across this recently. I'm using Firefox 72 (but it's been happening for a month or so, so expect some earlier version(s) too).

Originally posted on Stack Overflow:   Requirements to reproduce:  Windows 7 x64  Firefox 71.0 x64  Steps to reproduce:   Go to the ask question section Write something to the title field Start scrolling similar questions Change the title field Start scrolling the similar questions again


Find the smallest $k$ for which the inequality  $$|\sin^2 (x)-\sin^2 (y)| \leq k|x-y|$$  holds for all pairs of $(x,y)$.  I do not know how to proceed to solve this type of problem. Any hint or help would be appreciated.

Find the smallest positive number K for which following inequality   $$|\sin^2x-\sin^2y|\le K|x-y|$$  Holds for all x and y  1.2  2.1  3.$\pi$/2   No value of K is possible   My attempt: the way inequality is, it reminds me of lagrange mean value theorm.so k shud be 1, I think. I need suggestion here thanks.


I was checking for the uniform convergence of the series $\sum_{n=1}^{\infty} \frac{1}{((x+\pi)n)^2}$ for $x \in (-\pi,\pi)$.  How to think of a bound for $\frac{1}{((x+\pi)n)^2}$ where $x \in (-\pi,\pi)$?, we know $(x+\pi) \in (0,2\pi)$ and for $1\leq(x+\pi)<2\pi $ we have $\frac{1}{((x+\pi)n)^2} < \frac{1}{4\pi^2 n ^2}$ and we are done by the Weierstrass criterion but for $x \in (0,1)$ we have $\frac{1}{((x+\pi)n)^2} > \frac{1}{n^2}$, so its not true for all $x \in (0,2\pi)$ . ?  The true for all $x$ is required as per the definition of Uniform convergence.

Check that given series converges uniformly for $x\in(-\pi,\pi)$ or not  1) $\sum_{n=1}^{\infty} (\frac{x}{n})^n$  2) $\sum_{n=1}^{\infty}\frac{1}{((x+\pi)n)^2}$  first series is power series so I find the radius of convergence that comes $R=e$ which is inside the given set so I am not able to give the final conclusion. after this I were thinking to apply $M_n$ test , but I am not able to find $M_n$. Please help to solve this problem.


I'm using Oracle VirtualBox to run a CentOS7 VM. I then normally ssh into the VM and do all work through my terminal. Thus I don't really need the GUI and I'd like to disable it to improve performance.  Is there a way to start a VM in VirtualBox without GUI?

I was wondering if it's possible to run an Ubuntu virtual machine using VirtualBox in background, I mean, without any window open.  The idea is to connect via SSH to the Linux host, that would be running in background.  Has anyone ever done something like this? Is it possible?


My hardware specifications is as follows. I would like to seek your assistance in knowing what version of Ubuntu I took a look at the current version of Ubuntu and it said that it required 4GB of RAM for the hardware. I am not sure which way to go. I would like to seek your guidance to proceed forward. I would want to use this system only to surf the web and possibly work on google sheets google docs etc. AMD Athlon 2650e (1.6GHz, 512K ) 2GB DDR2 SDRAM AT 800MHZ no MXM Graphics w / ODD,Blk Thanks and Regards. Ravi

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I wrote a small script in anonymous window in dev console to reset password for all users in the org apart from two. But it keeps throwing a error like -   System.InvalidParameterValueException: INSUFFICIENT_ACCESS: insufficient access rights on cross-reference id   List<User> userList = new List<User>();  userList = [SELECT Id from User WHERE IsActive = true and ID not in ('00561000000cdef','00561000001abcd')];  for(User u : userList)  {     System.setPassword(u.Id, 'hello2017');  }

I am getting the error:     INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []   Scenario is, I am inserting an Opportunity and then Opportunity Line Item from a VisualForce page using controller. When I am doing this I am logged in as user whose profile license is "Authenticated Website".  Strange thing is, when on another org logged in as user whose user profile license is Customer Portal Manager the same code work fine. Both orgs have Opportunity OWD "Read Only" and Opportunity line item "Controlled By Parent".  To resolve this problem I've used "without sharing" on class which executes the insertion code, and it works fine from "Authenticated Website" user. As this may be a security issue when we try to list the app on AppExchange, is there any other way to resolve this problem?


def genfunc(func):     memory=0     def modify_memory(x):         print('before:',memory)         memory=func(x,memory)         print('after:',memory)     return modify_memory  @genfunc def addby(x,mem):     return mem+x  addby(5) addby(5)  The code above receives the following error:  UnboundLocalError: local variable 'memory' referenced before assignment  But if we change it to the following (just change memory to a list and use its first element only): def genfunc(func):     memory=[0]     def modify_memory(x):         print('before:',memory[0])         memory[0]=func(x,memory[0])         print('after:',memory[0])     return modify_memory  @genfunc def addby(x,mem):     return mem+x  addby(5) addby(5)  it runs successfully and outputs: before: 0 after: 5 before: 5 after: 10  Why is that?

The following code works as expected in both Python 2.5 and 3.0:  a, b, c = (1, 2, 3)  print(a, b, c)  def test():     print(a)     print(b)     print(c)    # (A)     #c+=1       # (B) test()   However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons:   Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error?   The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists.  Could someone please explain this behavior?


My brother and I play this game using 8 white checkers and 8 black checkers on opposite sides of the board. We take turns flicking the checkers across the board to knock the opponent's checkers off the board. Once all the opponents checkers are gone, you win that round. We called this game "Chinese Checkers", but apparently Chinese Checkers is a different game using a hexagonal board rather than a square one  . So, what is this game supposed to be called?

My brother and I play this game using 8 white checkers and 8 black checkers on opposite sides of the board. We take turns flicking the checkers across the board to knock the opponent's checkers off the board. Once all the opponents checkers are gone, you win that round. We called this game "Chinese Checkers", but apparently . So, what is this game supposed to be called?


I am presented with an issue where we are hitting an API limitation, and its consuming a lot of overhead to get this done.  So I've been tasked with finding a SQL solution. Here is my example data:  Here are my desired result:  I've tried using XML and stuff() but ultimately I just can't figure out how to approach the problem.

How do I get:  id       Name       Value 1          A          4 1          B          8 2          C          9   to  id          Column 1          A:4, B:8 2          C:9


I'm writing this PHP function that sends a record to mySQL database. I heard that inserting variables into SQL statements can lead to SQL injection attacks. How can I fix my code to make it immune? My current code is:  <?php     $id= 1;     $message=json_decode(file_get_contents('php://input'),true)["message"];     $event="Message";  $servername = "localhost"; $username = "dev"; $password = "somepassword"; $dbname = "sampledatabase";  $dateModified = gmdate("Y-m-d h:i:s a"); // Create connection $conn = new mysqli($servername, $username, $password, $dbname);  // Check connection if ($conn->connect_error) {     die($conn -> connect_errno. " : ".$conn -> connect_error); }  $sql = "INSERT INTO queries (ID, name, message, dateModified) VALUES ('{$id}', '{$event}', '{$message}','{$dateModified}')";  if ($conn->query($sql) === TRUE) {     echo "New record created successfully".$event; } else {     echo "Error: " . $sql . "<br>" . $conn->error; }  $conn->close(); return $event;  ?>   The message comes from a HTML form.  Also how do you hack this code to do something to this table? Say truncate?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I'm trying to create new enemies from their own class. I try to pass World from another class as parameter however when trying to add new body to world it results a nullpointer. Here's the constructor from Enemy-class  public Enemy(float x, float y, World world){     enemyTexture = new Texture(Gdx.files.internal("ball.bmp"));     BodyDef myBodyDef = new BodyDef();     myBodyDef.type = BodyDef.BodyType.DynamicBody;     myBodyDef.position.set(x, y);      FixtureDef enemyFixtureDef = new FixtureDef();     enemyFixtureDef.density     = 1.5f;     enemyFixtureDef.restitution = 0.1f;     enemyFixtureDef.friction    = 0.5f;      CircleShape circleshape = new CircleShape();     circleshape.setRadius(enemyRadius);      enemyFixtureDef.shape = circleshape;     enemyBody = world.createBody(myBodyDef);     enemyBody.setUserData("enemy");     enemyBody.createFixture(enemyFixtureDef); }

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


At the moment I am writing a document which will include a lot of screenshots. When I save and use the Screenshots as jpeg you can clearly see a loss of image quality.   What is the best method for this?  Print the screenshot as PDF? But then I would have to trim the pdf for each picture to it's actual size.

I have a .png screenshot and I want to insert it in a  LyX document.    However, the screenshot needs scaling to fit in my column width. Downscaling (or upscaling) the image, if done wrong, gives all kinds of bad, unprofessional results.  How do you embed screenshots properly? Is there a way to change the interpolation mode, or disable it altogether (and does it acually help)?


I got my question closed ( I don't agree with the reason - but was flagged as "off-topic" because not enough details supplied by me)  Now -after much research - I have great answer I want to contribute back to the community - including details and examples - but the question is closed - I can't answer myself.  Tried to contact few people that voted to close it - none replied.  Is it ok to Post a new question that describe the problem - and answer it self, and flag it as an answer?

Since , I am planning to document a few things I unnecessarily retype from time to time (answering other questions). These are general (though focused) questions and I would like to write a longer answer to have everything in one place. Let's say that the question is "what is the optimal length of a password?", posted on Information Security SE. In the body of the question, I would have just mentioned the context:  that the question is about passwords in specific operating systems and web applications, threat model etc. I believe that the whole part of "what research have you done / what have you tried  so far", is neither needed, nor useful (as I do not want to show that I did some efforts, that will come in the answer). Is it OK per the rules to keep a trimmed-down body of such self-answered-to-be question? EDIT: I edited this question to mention the actual question I would be asking, instead of a general one ("what is the best height of a chair"). Apologies if this is not understandable because too technical -- I took into account the comments about "too broad" expressed in the answers.


I was wondering what could be a possible reason/reasons because of which we cannot break the speed of light barrier. I was reading  where they stated that, Quantum Action Is 10,000 Times Faster Than Light.  I am not from a physics background, but if quantum particles interact faster than speed of light, why dont they go back in time? (i had read it that if we can travel faster than the speed of light, we go back in time) so my two questions are  Why cant we break the speed barrier, is there a reason, or its just a fact that we have to accept? if quantum particles move faster than light, then why dont they travel back in time?  PS: i have read the possible duplicates, but i did not understand the possible reason for not being able to break the speed barrier.

This question is about why we have a universal speed limit (the speed of light in vacuum). Is there a more fundamental law that tells us why this is? I'm not asking why the speed limit is equal to $c$ and not something else, but why there is a limit at all. EDIT: Answers like "if it was not.." and answers explaining the consequences of having or not having a speed limit are not--in my opinion-- giving an answer to whether there is a more fundamental way to derive it from a law to explain this limit.


Can someone tell me why should I use the painful .prototype method when the constructor feels so easy and nice to me. parrot.presentation() and parrot.secondPresentation() are both working. I just want to know if it's like old vs new or if one is really needed 1% of the time or I don't know but I really want to understand or get a good example of the differences. Thanks a lot   function Animal(name, paws, weight) {   this.name = name;   this.paws = paws;   this.weight = weight;    // By Constructor   this.presentation = function() {     console.log("I am a " + this.name + " and I have " + this.paws + " paws");   } }  // By .prototype Animal.prototype.secondPresentation = function() {   console.log("Hello, I use prototype to present myself: " + this.name + ", now gtfo"); } /////////  function Bird(name, wingLength, paws, weight) {   Animal.call(this, name, paws, weight);   this.wingLength = wingLength; }  // By .prototyte Bird.prototype = Object.create(Animal.prototype); Bird.prototype.constructor = Bird; ////////  function Mammal(name, hairType, paws, weight) {   Animal.call(this, name, paws, weight);   this.hairType = hairType; }  var parrot= new Bird("Parrot", "large", 2, "5kg"); console.log(parrot);  parrot.presentation(); parrot.secondPresentation();

What's the difference between  var A = function () {     this.x = function () {         //do something     }; };   and  var A = function () { }; A.prototype.x = function () {     //do something };


Firstly, what is the name of this kind of proof, title is free to edit and image to embed, I couldn't find it on the specification and didn't expect it to come up on the paper, I have no clue how to solve it, I'm used to numbers and all I get is letters :( I could've done more research had I have known the name of this kind of proof but, through many google's I couldn't get anything. Thanks if you can help :)

I tutor GCSE maths and I am stumped by this question:   Let XBYA be a quadrilateral The diagonals AB and XY intersect at point M  Given that the area of triangle AXB = the area of triangle AYB   Prove that XY is bisected by AB.  (I am guessing that students are expected to use the area of a triangle = 1/2 ab sin(C) but I cannot show XM=MY? )


I would like to build a modular document in latex. My main directory (in which I put the main file "thesis.tex") is called "tesi". Inside "tesi" i have another directory named "capitoli" where I woluld like to store my chapters named "chapter1.tex","chapter2.tex", and so on. Also I woluld like to compile either from my main file or directly from my subfiles, and so I used the subfile package.  Also I'm using a style file named mystyle.sty placed in the main directory "tesi". There is also a directory called "immagini" (where i store my images) inside the main directory.   If I use the following code  % main file "thesis.tex" in the main directory "tesi" % \documentclass[a4paper,12pt]{memoir} \usepackage{./tesi/mystyle.sty} \begin{document} \subfile{../tesi/capitoli/chapter1.tex} \end{document}  % subfile "chapter1.tex" in the subdirectory "capitoli" % \documentclass[../thesis.tex]{subfiles} \begin{document}   \begin{figure}   \centering   \includegraphics{../immagini/image1.jpg}   \end{figure} \end{document}   I can compile from subfile "chapter1.tex" but can't compile from main file "thesis.tex"  (error messages refers to the path of the image files)  If I use the following code ( just changed the relative/absolute paths of mystyle.sty and image1.jpg)  % main file "thesis.tex" in the main directory "tesi" % \documentclass[a4paper,12pt]{memoir} \usepackage{../tesi/mystyle.sty} \begin{document} \subfile{../tesi/capitoli/chapter1.tex} \end{document}  % subfile "chapter1.tex" in the subdirectory "capitoli" % \documentclass[../thesis.tex]{subfiles} \begin{document}   \begin{figure}   \centering   \includegraphics{./immagini/image1.jpg}   \end{figure} \end{document}   I can't compile from subfile "chapter1.tex" (error message cannot find mystyle.sty) but can compile from main file "thesis.tex".  Someone could fix this issue, thanks.  Edit  I also post mystyle.sty     \usepackage[T1]{fontenc}         \usepackage[utf8]{inputenc}     \usepackage[italian]{babel}     \usepackage{subfiles}    \usepackage{graphicx}

Following the  and , I've built the following project structure:  ./mydocument.tex ./mystyle.sty ./tex/mysubfile.tex ./img/   mydocument.tex looks like:  \documentclass{report} \usepackage{mystyle} \begin{document} \subfile{./tex/mysubfile.tex}  \end{document}   mystyle.sty looks like:  \ProvidesPackage{mystyle} \usepackage{subfiles} % other packages % command declarations   mysubfile.tex looks like:   \documentclass[../mydocument.tex]{subfiles} \begin{document} % stuff goes here. \end{document}   I'm using (1) the subfiles package because I'd like to compile mysubfile.tex by itself and (2) mystyle.sty because I'd like to modularize this project a bit and split package and command declarations into their own .sty file. The problem is that when I try and compile mysubfile.tex by itself it can't "see" mystyle.sty.   Q: Is there some way I can still satisfy (1), (2), and the project structure outlined above and get things working? Some sort of option or command in the subfiles package?  I've tried: (1) moving mystyle.sty to different directories, (2) moving the subfiles declaration \usepackage{subfiles} to different parts of the document, (3) checking the subfiles documentation. All no dice.   I suppose that the second best option would be to stick all project files in the same folder and get rid of my .\tex folder. At least then, I can get things to compile. But I'd rather not sacrifice the project structure.


I am a newbie in Ubuntu. I want to use poweroff in my terminal, for traditional shut down of my computer. First of all, is this correct? Secondly, I am forced to use sudo poweroff and then enter a password. Is there a way to make the poweroff command such that, specifically poweroff command will no longer ask for sudo privilege, just commanding poweroff will work.  Thank you for your support

I have desktop edition of Ubuntu.  I like the Terminal so that that I prefer to shutdown my computer with the shutdown command.  However when I type shutdown now it prompts me to enter my password.Is there any way I can shutdown my computer using this command without entering my password?


There is no message/button on the job search listing page to indicate - "you have already applied for this job". We need to open one page each job posting to check "applied/not applied" message.  A simple message on the job listing page can save one click and bandwidth per job posting.

When showing the job-search results, it would be incredibly useful if there was an indication for which of those jobs I've already applied for.  As it stands, I risk thinking I already applied for a position that I didn't, or re-applying for a position, potentially irritating the company.  I know , but some companies have more than one similarly titled positions, and it isn't always clear if a position is one I've applied for, or just another position within the same company.


I'm trying to complete this dialogue but I've encountered a bit of trouble with the usage of 'all the more'. The dialogue is below.     Our bond is based on trust. We have no contract.   Trust? Then all the more ___ for me to break it.    Should I put the word: easy, easier or easily in the blank space?

Here is a sample context:     As you might expect, the framework also provides some convenience   classes to make the task of writing custom validators all the more agreeable.   (Emphasis added.)


The constant of integration only seems to be used at the very end of integration by parts despite the use of integrals beforehand.  An example of this would be: $$∫ x\sin  \left(x\right)\ dx = x∫ \sin \left(x\right)\ dx - ∫ x'\left(∫ \sin \left(x\right)\ dx\right)\ dx$$ Ordinarily, the right side of the equation would be simplified to: $$x\left(-\cos \left(x\right)\right) - ∫-\cos \left(x\right)\ dx$$ And further to: $$-x\left(\cos \left(x\right)\right) + \sin \left(x\right)$$ Then finally arranged and given the constant of integration: $$\sin \left(x\right) - x\cos \left(x\right)+ C$$  What I am confused about is why $C$ is only added at the very end of this instead of at each integral.  I would be more inclined to use try something more like this: $$x\left(-\cos \left(x\right) +C_1\right) - ∫ -\cos  \left(x\right) + C_2\ dx$$ Which would simplify to: $$-x\left(\cos \left(x\right) -C_1\right) - ∫-\cos \left(x\right)\ dx + ∫ C_2\ dx $$ And further to: $$-x\cos \left(x\right) +C_1x +\sin \left(x\right)+ C_3 + C_2x + C_4 $$ Which finally arranges itself as: $$\sin \left(x\right) - x\cos \left(x\right) + C_5x + C_6$$ Where $C_5=C_1 + C_2$ and $C_6=C_3 + C_4$  I also feel I should probably mention I am a bit of an oblivious idiot so if the answer is completely obvious or my math is full of errors, I apologize.

After finishing a first calculus course, I know how to integrate by parts, for example, $\int x \ln x dx$, letting $u = \ln x$, $dv = x dx$: $$\int x \ln x dx = \frac{x^2}{2} \ln x - \int \frac{x^2}{2x} dx.$$  However, what I could not figure out is why we assume from $dv = x dx$ that $v = \frac{x^2}{2}$, when it could be $v = \frac{x^2}{2} + C$ for any constant $C$. The second integral would be quite different, and not only by a constant, so I would like to understand why we "forget" this constant of integration.  Thanks.


I have hourly data for 365 days, and I would like to train a neural network model for 7 days and predict 8th day hourly data. It is a time series 24-h ahead regression problem. I am also applying such an approach instead of predicting all day data I am predicting each hour, so my neural network model has 1 output and 6 inputs. We can think that each days and each hours are features. I am training the model as follows Xtrain = Day-1 Hour-1, Day-2 Hour-1 ... Day-6 Hour-1 (6 sample,1 feature), Ytrain = Day-7 Hour-1, after training I am giving Day-7 Hour-1 to predict Day-8 Hour-1  Xtrain = Day-2 Hour-1, Day-3 Hour-1 ... Day-7 Hour-1 (6 sample, 1 feature), Ytrain = Day-8 Hour-1, after training I am giving Day-8 Hour-1 to predict Day-9 Hour-1  After I predict all hour-1 values I am repeating this for Hour-2, Hour-3 ... Hour-24. This procedure goes up to 365 days. First of all, Is this approach valid?  The problem is, the model predicts the exact same values of previous day.    Why do you think this happens, what might be the issue?  I have also tried training with l2 regularizer, but results are almost same.  NN --> 6 Inputs -> 12 Hidden Neuron -> 1 Output. Using Adam optimizer, 5k Epochs and RandomUniform Initializer.  EDIT: Same happened if I use choose 8 random hourly value as feature for each day as Xtrain = D1-h6 D1-h8 D1-h10 D1-h12 D1-h14 D1-h16 D1-h18 D1-h20 ... D2 ..... D6 Ytrain = D7 h1 to h24 Xtest = D2-h6 D2-h8 D2-h10 D2-h12 D2-h14 D2-h16 D2-h18 D2-h20 ... D3 ..... D7 Predict = D8 h1 to h24  D8 values are exactly the same with D7 values.

I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see:


Often when PCA is performed on exam results where all variables (dimensions) have the same $0$ to $100$ scale, scaling is none the less applied. For different scales I can see the purpose of it, but not in this case. Why is it done?

What are the main differences between performing principal component analysis (PCA) on the correlation matrix and on the covariance matrix? Do they give the same results?


Find the last digit of $22^{23^{24^{25^{26^{27^{28^{\cdot^{\cdot^{\cdot^{67}}}}}}}}}}$ in base-$10.$  Just to clarify, I want to find the last digit of the power tower of consecutive numbers starting at $22$ and ending at $67.$ I was just wondering if there was some general method that could be used to solve this?  I don't know if Euler's Theorem might be useful for solving this problem, but it seems there might be a very simple approach.

How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .


I went to sleep, and now it seems that everything, from program folders to images, have blue arrows on the top right of their thumbnails. Naturally this has spooked me a little. Is there a way to mass reverse this, and are the integrity / quality of my files or images at risk?

On some icons I am seeing a two blue arrows at the top the right pointing towards each other. I first noticed it on the icons on folders which I archived which happened randomly. I archived the folder and the text went blue as expected, then when I went to the folder again the text was black and the folder icon has these arrows. When I just recently installed Office 2007, I noticed the same arrows on the icons for the programs. OS: Windows 10 Pro 64-bit (the latest update: 1115) Application: Microsoft Office 2007 suite and file explorer


Acordding to Einstein's Relativity, while  Space-man lives for 1 day(just a number for example , not an exact number calculated from the corresponding relative speed),  Earth-man can live for 1000 years (just an example number too). But from the view of Space-man, while Space-man lives for 1 day, Earth-man lives for 1 second. So while Space-man lives for 1 day, then how long does Earth-man live ? 1000 years or 1 second? Or 1000 years = 1 second actully ?！  Thank you in advance!!

I've very recently started to try to understand special relativity. I'm want to get a decent understanding of the twin paradox. I'll post what I've done so far and highlight what's gone wrong for me.  The situation is that Alice and Bob both begin at point $x_1$ in Alice's coordinate system $(x,t)$ (we have orientated the axis so that y and z will not matter). Bob then instantaneously moves off with velocity $v$ in the positive $x$ direction. Bob's coordinate system is now $(x',t')=(\gamma (x-vt), \gamma (t-v\frac{x}{c^2}))$. In Alice's coordinates, Bob reaches point $x_2$ after having moved distance $d$, then instantly turns around and travels back to Alice at $-v$. I want to show that Alice's space time interval $\Delta s_A^2$ is greater than Bob's $\Delta s_B^2$, as each path's space time interval is proportional to the proper time passed along that path.    According to Alice: $\Delta s_A^2=-c^2\Delta t^2 + \Delta x_A^2$ where $\Delta t=\dfrac{2d}{v}$ and $\Delta x_A=0$ as she didn't move, but the time elapsed is the time it took bob to travel the distance and then come back. Thus $\Delta s_A^2=-\dfrac{4c^2d^2}{v^2}$  Still according to Alice, Bob's $\Delta s_B^2=-c^2\Delta t^2+\Delta x_B^2$, where the change in time is the same, but now bob has moved distance $d$ twice, thus $\Delta x_B=2d$ ($\Delta x$ refers to total distance traveled rather than displacement which is 0 in this case). Now we have $\Delta s_B^2=-\dfrac{4c^2d^2}{v^2}+4d^2$.     The |size| of Bob's spacetime interval now definitely smaller than Alice's, and this would be all OK, except that when I do the calculations in Bob's frame, they don't agree. This is contradictory to the fact that $\Delta s^2$ is conserved under Lorentz transformations.    According to Bob: $\Delta {s'}_A^2=-c^2\Delta t'^2 + \Delta {x'}_A^2$ where $\Delta t'=\dfrac{2d'}{v}$. I'm not sure if I'm right in saying that $v$, the relative velocity of the two frames, is the only velocity upon which both Alice and Bob will agree on, other than the speed of light. Anyway, $d=\gamma d'$ as lengths contract by $\gamma$ i.e. $d'$ is smaller than $d$ by factor $\gamma$. Also, $\Delta {x'}_A=2d'$, so we have $\Delta {s'}_A^2=-\dfrac{4c^2d'^2}{v^2}+4d'^2=-\dfrac{4c^2d^2}{\gamma ^2 v^2}+\dfrac{4d^2}{\gamma ^2}=4d^2\dfrac{v^2-c^2}{\gamma^2 v^2}\neq \Delta s_A^2$  Although I haven't included them here, my calculations for $\Delta {s'}_B^2$ and $\Delta s_B^2$ agree. Sorry for the ultra-long post, but any help would we well appreciated!


Here's my code:  #include<stdio.h>  struct parent_structure {     char pe_1 = 'a';  };  struct child_structure {     int ce_1 = 1;     int ce_2 = 2;     int ce_3 = 3;     struct sample_structure     {         int ss_1 = 1 ;         char ss_2 = 'a';     } ce_4 ;     struct parent_structure ce_5; };  int main() {     struct child_structure c_1;     printf("size of element : %d",sizeof(c_1));      return 0; }   ERROR:  test.c:5:15: error: expected ':', ',', ';', '}' or '_attribute_' before '=' token      char pe_1 = 'a';                ^ test.c:10:14: error: expected ':', ',', ';', '}' or '_attribute_' before '=' token      int ce_1 = 1;               ^   PROBLEMS:  * If i initalize value at the time of defining structure   it gives the error shown above.   I was trying this question for a while and if I initialize values to members of structure like at the time of declaration of structure it shows an error.  Please tell me what is wrong with this?

I want to initialize a struct element, split in declaration and initialization. This is what I have:  typedef struct MY_TYPE {   bool flag;   short int value;   double stuff; } MY_TYPE;  void function(void) {   MY_TYPE a;   ...   a = { true, 15, 0.123 } }   Is this the way to declare and initialize a local variable of MY_TYPE in accordance with C programming language standards (C89, C90, C99, C11, etc.)? Or is there anything better or at least working?  Update I ended up having a static initialization element where I set every subelement according to my needs.