Compare and update values from different source using ArcPy cursors?

Shapefile: "table1.shp"   Field name: "Name" Field name: "Result"   Flat file: "referenceTable"   Field name: "STREET" Field name: "AKA"   I need to compare the value "Name" in "table1.shp" to the value "STREET" in "referenceTable"  If the values are the same then put the "AKA" value into the "Result" in "table1.shp"     Here is my code.  I got stuck on accessing the elements from the array  import arcpy, os, sys, string from array import *   table1 = "G:\\xStreetNew\\table1.shp" table1_column = ['Name', 'Result'] referenceTable = "G:\\xStreetNew\\Test.gdb\\referenceTable" referenceTable_column = ['STREET', 'AKA']  referenceTable_List = [] with arcpy.da.SearchCursor(referenceTable, referenceTable_column) as rCur: for r_row in rCur:     reference_row = r_row[0].split(",")     referenceTable_List.insert(0,reference_row) ##print sorted(referenceTable_List)  Table1_Update_Cursor = arcpy.da.UpdateCursor(table1, "Name") for row in Table1_Update_Cursor:   if row[0] == None:   row[0] = row[0] else:   row[0] = row[0].replace(";",",")   Table1_Update_Cursor.updateRow(row)  table1_List = [] with arcpy.da.SearchCursor(table1, table1_column) as tCur: for t_row in tCur:     row = t_row[0].split(",")     table1_List.insert(0,row) ##print sorted(table1_List)  Table1_row = len(table1_List) Table1_column = len([table1_List]) ref_row = len(referenceTable_List) for i in range(0,Table1_row):  #Table Row   for ii in range(0,Table1_column):   #Table Column     print table1_List[i][ii]   Below was my old post.  Sorry for the confusion.  I have a shapefile named "table1.shp".     I would like to get all values from fielname "Name" from this table and put them into a list. Able to output each element from the list     So far, I'm able to create a list but not too sure how to get to value "AVENUE 33" or "CHAPMAN ST"  This is my code:  import arcpy, os, sys, string from array import *   table1 = "G:\\xStreetNew\\table1.shp" referenceTable = "G:\\xStreetNew\\Test.gdb\\referenceTable" cursor = arcpy.da.UpdateCursor(table1, "Name") for row in cursor: if row[0] == None:     row[0] = row[0] else:     row[0] = row[0].replace(";",",") cursor.updateRow(row) table1_column = ['Name'] table1_curObj = arcpy.da.SearchCursor(table1, table1_column) table1_List = [] for row in table1_curObj:    table1_row = row[0].split(",")    table1_List.insert(0,table1_row)    print table1_List[0]


This is from an exercise (1.2.2) in introduction to algorithms that I'm working on privately.  To find at what point a $n \lg n$ function will run faster than a $n^2$ function I need to figure out for what value $n$  $8n^2 > 64n \lg n$  (with lg here being the binary log) after some elementary simplification we get  $n > 8\lg n$  Playing around with properties of log I can further get this to  $n^8 < 2^n$  or  $n < 2^{n/8}$  While I'm sure it's something very elementary I've lost somewhere over the years, after checking out a few logarithm tutorials I'm just not finding how to get any further on this.  Any help with solving for $n$ would be appreciated.


Trying to install Steam, getting "Package 'steam:i386' has no installation candidate" error

As you can read in the title..      $ sudo apt install steam Reading package lists... Done Building dependency tree Reading state information... Done Package steam:i386 is not available, but is referred to by another  package. This may mean that the package is missing, has been obsoleted, or is only available from another source    E: Package 'steam:i386' has no installation candidate    On a sidenote, I ALWAYS get errors on Ubuntu nowadays when I try to install stuff. I can't install through the Software Center either - nothing happens when I'm clicking the Install button!


Is visa needed at Dublin Airport for a layover of 1 hour connection

My flight is from Chicago to Rome via Dublin Airport. Arriving and departing from the same Terminal 2. Layover is only 1 hour at 5:30 a.m. I'm a US permanent resident card holder with a Colombian passport.    Do I need a visa or transit visa?


What is the difference between \hspace*{\fill} and \hfill?

In the  manual on page 183 ,this example is given:  \begin{figure} \centering \hspace*{\fill} {ILLUSTRATION 1} \hfill {ILLUSTRATION 2} \hspace*{\fill} \caption{Example float with two illustrations} \label{fig:mult1} \end{figure}   I have tried to figure out, what the difference between \hspace*{\fill} and \hfill is!?  The  and  did not help me much.


How to prove this inequality using Taylor approximation?

I'd like to prove the following via Taylor approximation : $$x > 0 \implies \sin x > x-\frac{x^3}{3!}$$ I tried to estimate the error but I found $E_3(x) \leq |\frac{x^4}{4!}| $, which doesn't give information about the sign of the error. Then, I tried to compare the sign of each couple of terms in the error but it gives the right result just when $0<x \leq1 $ because in this case $$(\frac{x^5}{5!} - \frac{x^7}{7!} )+(\frac{x^9}{9!} -\frac{x^{11}}{11!} ) + \dots$$ all the couples are positive. But from here I don't know how to continue to include the case $x>1$. How can I find a way using Taylor approximation ?  (I know other methods like derivatives can be used, but I want just to use Taylor if possible). Besides, Is there a general method to find the intervals where the sign of the error is positive/negative?


Running downloaded Ubuntu on VirtualBox is so very slow? What to do?

I downloaded VirtualBox onto my Windows 7 machine after which I successfully downloaded Ubuntu v 14, which I updated to v.15. However, I find that Ubuntu runs very very slowly and that the @ sign does not seem to be recognized. Do I have to pay a yearly subscription to get Ubuntu to work optimally? If so to whom?


Do spellcasters know when a dismissable spell has been broken?

Do spell casters know how long their spells are active, and can they tell at a glance?  Specifically lets talk about , as I know its a permanent duration and dismissable. Does the spell caster who put someone under this spell know how long it is active? Could they tell automatically just by seeing the person (without any clues like them walking in a maze without difficulty or reacting to a sound)? So could they tell if someone has broken the spell they cast?


Hi All I've been trying to download software from the software centre and it keeps saying Use this Source instead of install. When I try clicking universe source it never installs and gives me an error. Im new to ubuntu. And am on a fresh install. Any help would be appreciated. Thanks.


sed append after a line containing multiple unordered strings

I'm trying to use sed to append appendstring after a line that contains both Hello and World.  Hello something here World World fsf Hello   This works if I do consider order:  sed -i '/Hello*World\|World*Hello/a appendstring' file   But if I have many strings to match and they are not in order, this is definitely not effective.  Then I tried solutions from another link which discussed deleting a line that contains both strings without considering their order.     However,  sed -i '/Hello/!b;/World/d' file   This does not even work for deletion.   The following one, also one of the answers to that question:  sed -i '/Hello/{/World/d}' file   works, so I tried to implement it to append. Using:  sed -i '/Hello/{/World/a} appendstring' file   But received error:  sed: -e expression #1, char 0: unmatched `{'   Update: The post in the link stated the solution with !b, and it was not working in cshell because of the exlamation mark, but it is working in sh and bash. And it can also be easily extended to inserting many lines when running sed inside a script and the appending a large paragraph.  sed -i '/Hello/!b; /World/a \ addline \ addanotherline ' file


Numbering of sections and subsections in LyX

I am using LyX to write my thesis. I use the document class "article", and I really want to continue doing that.  The problem is the numbering of the sections/subsections.  If it is the x. section of chapter y, I want the numbering to be like  y.x  If it is the z. subsection of section x of chapter y, I want the numbering to be like  y.x.z  Is it possible in any way?


When you made a group of objects, how to make array of them?  I know for shift+A to make group instance but I want to control it like array modifier.


Is it good practice to define a function on a code file, but not declare it on the header?

What I want to do is have an auxiliary function inside my .c file that will only be used within another function in the file, and has no use outside that specific case. Therefore, it's not of great use for the interface to contain it, but I'm just wondering whether that is possible and/or a good practice, as well as if there's an alternative that is more elegant.


I'm new to blender and I am trying to create basic shapes/models of few basic objects like - water pot, bottle, tea-cup etc. Now I'm trying to create an iPhone model.  So, when I started modelling, I came to know about precise sizing & other specific dimensions of iPhone. But I see options in XYZ as 0 & 1. My Question is - How can I create an object with specifications like - 4 inch wide, 1 inch tall etc?


How can I inject html after the [x]th widget inside a Sidebar?

I can't provide you with any code since I not really know where to start.  I like to add some programmatically created widgets (or just html) after the 1st Widget inside my sidebar. Right now I have it that I have to include this widgets before all others, that was pretty easy of course.


Is there EVIDENCE (proof) that time dilation actually occurs in the case of relative UNIFORM mottion (i.e., where no acceleration or decelleration occurs)? By proof, I don't mean mathematically but, instead, in observerable reality. No one answered this simple question. I raise this because to say in such a case that, from BOTH reference frames, the "moving" cliock is ticking slower than the "stationary" clock is a LOGICAL CONTRADICTION . Even invoking relativity of simultaneity where one clock begins ahead of the other, the period of supposed dilation is overlapped by both frames.


Allow @-notification by user ID in comments

Although I'm aware that , this is the first time I've come across a question answered by a user with the same display name as the OP ().  The problem this poses is that if I want leave a comment on the answer that notifies the asker, I have to play a guessing game:    There's no clear way for me to tell which Kareem is the real Kareem (short of ) and I wouldn't want to mistakenly .  This is confusing (if infrequent). I can't tell whether it actually breaks notifications but even if a comment using @Kareem would "correctly" notify both users, a system that allows arbitrary identifiers should be prepared to handle collisions a bit more gracefully. How many people read ? (More importantly, how many remember all of the implementation details?)  What I'd like to see is a slightly expanded notification syntax; for example, @: could allow notification by the user ID such that I would use @:2561 to notify the OP in the above conversation.  Being able to type @: to show autocomplete options as Kareem:2561 and Kareem:1661 instead of just Kareem and Kareem would be a nice additional functionality.   I'm assuming here that an arbitrary display name could be 2561 or user2561 but . Another approach that avoids expanding the syntax would be to reserve display names of the format ^user\d+$ to avoid spoofing the "default" display name of another user and then allow @-notification by either of the current and default display names.  One additional benefit of this feature is that it would be much easier to distinguish when a reply is made to a deleted comment vs. a comment from a user whose display name had later changed. Again, this will be infrequent, and it relies on people using the feature - but if user2561 changes their display name on realizing there's an active user already going by "Kareem," the @reply by the other "Kareem" will start to look a bit schizophrenic. It's in just those cases where a user is most likely to want the alternative syntax that it might be expected to carry this added benefit.


How does a cilinder that rolls without slipping lose energy?

Suppose a cilinder that rolls without slipping on a horizontal rough surface. The slipping is prevented by friction, which therefore  slows it down, so it loses kinetic energy. But no dissipative work is done. How is this possible?


How to change IP address to point to localhost?

A sandbox enviroment of a web app is reachable directly by an IP address: http://<my_ip_address> without a login name.  Is there a way to make a virtual host in my local machine, named as <my_ip_address>, and change /etc/hosts so it will "redirect" to my localhost?  127.0.0.1 <my_ip_address>   So when I load the url http://<my_ip_address> the browser will point to my localhost? The way I can already redirect domain names.


How to remove apps which doesn't allow uninstall option without rooting smartphone?

I'm using Samsung J7Max recently I updated MY AIRTEL app and try to uninstall it app uninstalled but leaves an duplicate MY AIRTEL app which tell me download MY AIRTEL app from playstore. I can't remove it or disable it. Don't know what to do. Here is snapshot of duplicate Airtel app.


I'm doing an internship, and they want me to organize their data. I decided to do a script that would create the folders based on user input and stuff so once I'm gone they'll still be able to use it. Everything works really well until I get to maps.  I get error messages, as seen at the bottom of the code. I'd like to have the folder created be the area the map is saved to. It's been a year since I took Python for GIS so I'm a little bit rusty and I can't quite figure out what the problem is.  Could I get some help figuring out exactly what I'm doing wrong?  I've also tried replacing folder in the .saveACopy with (folder_location+folder_name). The process runs, but no map shows up.   import arcpy,os  # Create a folder and geodatabase #local variables folder_location= raw_input("please write where you want the folder to be.") folder_name=raw_input("Please name your folder.")  folder=arcpy.CreateFolder_management(folder_location,folder_name) ##Create GDB:  # Set local variables  out_name = raw_input("Please choose a name for your GeoDataBase.")  # Execute CreateFileGDB arcpy.CreateFileGDB_management(folder, out_name) mxdname=raw_input("Please create a map name.") #Choose the mxd mxd=arcpy.mapping.MapDocument(r"z:/MaryGIS/Testmap.mxd") mxd.saveACopy( folder + mxdname+".mxd")   The error I get is: Traceback (most recent call last):   File "Z:/Python labs/CreatefileGDB.py", line 24, in      mxd.saveACopy( folder+mxdname+".mxd") TypeError: unsupported operand type(s) for +: 'Result' and 'str'


For nonnegative continuous $f$, if $f'(x)-f(x)\leq 0, \forall x\geq 0$ and $f(0)=0$, find the value of $f(1)$.

Let $f(x)$ be a non-negative continuous function such that $f'(x)-f(x)\leq 0, \forall x\geq 0$ and $f(0)=0,$find the value of $f(1)$.   $f'(x)-f(x)\leq 0$$\Rightarrow f'(x)\leq f(x)$$\Rightarrow \frac{f'(x)}{f(x)}\leq 1$$\Rightarrow \int\frac{f'(x)}{f(x)}dx\leq \int1 dx$$\Rightarrow \log f(x) \leq x$.Then could not solve further.Can someone assist me find $f(1)$?


Does more traffic to my website improve SERP?

I have a few very popular blog posts that rank highly on keywords I am not focusing on. My question is does my website's SERP benefits from this high traffic?  Is there an official information out there to inform on this?


What algorithm does Blender's motion tracking use?

I would like to know what kind of algorithm Blender uses in motion tracking?


How to solve the following integral by method of residue?

$$ \int_{-\infty}^{\infty} \frac{dz}{(z^2+a^2)^2}$$ Now this has the poles at  $$(z^2+a^2) = 0 $$  if we consider the contour from -R to +R extending from $-\infty$ to $+\infty$ i get the roots  $z = ae^{i\pi/2},ae^{i3\pi/2}$ that lie in the contour Now how to find the residues of these poles ??


Define a sequence $(a_n)_{n = 1}^{\infty}$ of real numbers by $a_n = \sin(n)$. This sequence is bounded (by $\pm1$), and so by the , there exists a convergent subsequence.  My question is this: Is there any way to construct an explicit convergent subsequence?  Naïvely, I tried considering the subsequence $$\sin(3), \,\sin(31), \,\sin(314), \,\sin(3141),\, \sin(31415),\, \dots$$ hoping it would converge to $0$, but I was unable to prove this (and I think it's probably not even true).


How to generate a dynamic bubble answer sheet for multiple-choice exam

I want to produce a bubble answer sheet where the number of questions are shown by \qCount. It is always below than 100. Is it possible to produce it dynamically? I cannot print the question numbers before each row and cannot show bubbles within the cells.  desired output:   MWE:  \documentclass[a4paper]{article}  \usepackage{tikz}  \newcommand{\repeatntimes}[2]{    \newcount\i    \i=0    \newtoks\ans    \loop       \ans=\expandafter{\the\ans #2}       \advance\i by 1       \ifnum\i<#1\repeat    \the\ans }  \newcommand{\countRepeatntimes}[2]{    \newcount\i    \i=0    \newtoks\ans    \loop       \advance\i by 1       \ans=\expandafter{\the\ans #2}       \ifnum\i<#1\repeat    \the\ans }  \newcommand{\generateTable}[1]{% \countRepeatntimes{#1}{\indent \repeatntimes{4}{\textcolor{lightgray}{\rule{0.9\baselineskip}{0.9\baselineskip}} }\par } }  \begin{document} \def\qCount{80} \generateTable{\qCount} \end{document}


I'm writing a function that is supposed to split a string on "-" and return and array containing the parts from the string, so if the string is: 2017-10-23 I want the array to have three elements populated like: arr[0] = 2017, arr[1] = 10, arr[2] = 23  This is the function:  /*   *  return a array of the parts of date_string   */ int * to_date_array(char *date_string) {         int i = 0;         int f = 0;         char *tokens = strtok(date_string, "-"); /* get initial token */         static int arr[3] = {0, 0, 0};         char *ptr;         int val;          /* init static arr */          for (f = 0; f < sizeof(arr); f++)                 arr[f] = 0;          /* do the split */         while (tokens != NULL) {                 val = strtol(tokens, &ptr, 10);                 arr[i++] = val;                 tokens = strtok(NULL, "-");         }          /*           * for some reason arr becomes 12 elements long?          * I expected it to have 3 elements          */         puts("func: to_date_array");         puts("------------------------");         for (f = 0; f < sizeof(arr); f++)                 printf("arr[%d]: %d\n", f, arr[f]);          return arr; }   The function works but I'm really puzzled by the "arr" array. I expect it to be three elements long but when I iterate through it and print every element, it show 12 elements?   $ gcc -Wall main.c arguments.c -o timespan  $ ./timespan 2015-08-10 2017-10-18 func: to_date_array ------------------------ arr[0]: 2015 arr[1]: 8 arr[2]: 10 arr[3]: 0 arr[4]: 0 arr[5]: 0 arr[6]: 0 arr[7]: 0 arr[8]: 0 arr[9]: 0 arr[10]: 0 arr[11]: 0


Why cant I watch Netflix on this OS (Ubuntu 14.04)

I have just installed Ubuntu 14.04 (64bit) and can't watch Netflix, just wondering if there’s a way round this. Thanks.


How to selectively join lines starting with a pattern

This post may be looked upon as a . This is input file: module ABC    x(a,b,c)   module DEFG   y(d,e,f,   g,h,i)   module HIJKL   z(j,k,l)  And output file should be: module ABC x(a,b,c)   module DEFG y(d,e,f,   g,h,i)   module HIJKL z(j,k,l)   I tried using asterisk as a wildcard character in the solutions provided in the  but it did not work as expected.  Addendum Upon closer examination I found out that indeed the solutions provided earlier work for me as well (as pointed out by @steeldriver).  The problem was that the file originated from a DOS/Windows platform and there was an unexpected ^M character that got inserted into the output, which was messing up down-the-line processing for me.  I have now run dos2unix on the input file and the problem has gone away (i.e. the previous solutions work for me as well). I am recommending that this post be closed as duplicate.


How can I compute the number of lists of the form $(a_1,\ldots,a_k)$, where $a_i \geq 0$ are integers and $\sum a_i \leq n$? What is the easiest way to derive the answer?


Prove that for $n\in\mathbb{N}$ $$n!\leq(\frac{n+1}{2})^n.$$ I've solved base case for $n=1$ $$1\leq(\frac{1+1}{2})^1=1$$ The second step I've made was that I assumed that $n!\leq(\frac{n+1}{2})^n$ And then I have $(\frac{n+2}{2})^{n+1}$. What do I need to do now?


Resized partitions on dual boot, windows 10 won't start now

I was trying to make more room on my Windows 10 partition, so I used Gparted Live to reduce partition size by 6GB of the Ubuntu boot. The Ubuntu will still boot, but the Windows partition boots with a blue, sad face screen. I get the windows error of 0xc0000225 when starting up. I did not move the left side of the Windows partition, only expanded it, and the partition had at least 60Gb of free space in it. There were no errors while partitioning the boots with Gparted Live.  Gparted Live cannot access the partition, although I can access Windows through Ubuntu and all files are accounted for.  I have tried to download a Windows 10 recovery disk onto my USB, though couldn't figure how to run it.  [EDIT] For further information, the grub for dual-boot does open up. Everything works fine, I can see the Windows partition, though when I open it, it crashes. On further note, I am going to also post this on Windows forum ().  [EDIT] Just so you guys know. This is NOT a duplicate. The post you linked as a duplicate is indeed different. The boot works just fine and this is not UEFI. Nonetheless, I think this is more a windows problem then Ubuntu.  [EDIT] This question was solved on the linked page. For summary: The recovery disk was very difficult to download and install for some reason, but in the end it was indeed the answer. Just popped in and "repaired" startup. It didn't appear to have worked at first, but normal Windows startup repaired it further into function. Thankyou all for attempting to help.  As a clarification, this was indeed a Windows problem. However, Downloading and installing the recovery iso onto a usb was an Ubuntu problem (which took me half a week to figure out).


How to copy object with array of objects in javascript without mutation?

I have this object var Obj={  name:"Joe",  cars:[   {    name:"Fiat",    year:"2011"   },   {    name:"Opel",    year:"2018"   }  ] }  How to deep copy Obj to copyObj without mutate cars property? For example: copyObj.cars[0].name="Audi" console.log(Obj.cars[0].name) //I expect it to still be "Fiat"


Copy Editor badge is not included to my account even after I have edited 500 posts

I have a problem regarding the Copy Editor badge. I have edited more than 500 posts in total. Still, I cannot receive Copy Editor badge in my account. And also, Copy Editor badge track (progress bar) also disappears from next badge track window.


I forgot the title: astronaut slowly turns into alien

Does anyone know the story about an astronaut stranded on an alien planet who discovers an alien habitat or some sort, that slowly transforms him into  an alien being in order to survive its toxic atmosphere and to enable him to take in the alien food?


How to cancel setTimeout action after it has been triggered?

In my JavaScript I have some code that is executed when the page is loaded/reloaded. What it does is to click a hidden button so that 30 seconds after the page is loaded/reloaded, a pop-up window appears:  setTimeout(function() {     $('#colorboxpopupform').click(); }, 30000);   The problem is that I also have another button that triggers that same pop-up window. This means that if someone loads/reloads the page and after 15 seconds clicks the button to load the pop-up window, the following code will make the same window to pop-up to be displayed again because the 30 seconds counter is still in process:  setTimeout(function() {     $('#colorboxpopupform').click(); }, 30000);   What I need is that the code above opens the pop-up window after 30 seconds, only if I have not used my other button that triggers that same pop-up window. In other words, if the user explicitly clicks the button that triggers the pop-up window, I want for the code above to not trigger the pop-up window after 30 seconds anymore (cancel the action). How could I achieve that with JavaScript/jQuery? Thank you.  UPDATE 1:  I used the following solution, as Patrick P suggested in his answer, and it works:  if (localStorage.getItem("displaypopup") == "true") {     var ticker = setTimeout(function() {         $('#colorboxpopupform').click();     }, 30000); } $("#headercolorboxpopupform").click(     function() {         clearTimeout(ticker);     } );


One thing that I will be very happy if added in Stack Overflow is a Private Message system like in forums, because there's some things that you want to be in private with your internet friends.


Copying Data from split text into main data storage arrays is returning 'exception in thread "main" java.lang.NullPointerException

This is my code example and all seems to be working with inputting data, however when trying to export the input data to an output the code is returning the error:      "Exception in thread "main" java.lang.NullPointerException       at JavaProject.main(JavaProject.java:50)"   I have included a gyazo snapshot of how it looks and the error:    import java.util.Scanner; import java.io.FileWriter; import java.io.IOException; import java.util.Arrays;  public class JavaProject {      private static char[] input;      @SuppressWarnings("null")     public static void main(String[] args) {          int hrs, mins;         int[] gameCount;         int[] MinutesPlayed = null;         String GamerName, GamerReport;          //Main data storage arrays         String[] GameNames = new String[100];         int[] HighScores = new int[100];           Scanner Scan = new Scanner(System.in);          //formatting for output and input         System.out.println("////// Game Score Report Generator \\\\\\\\\\\\");         System.out.println("     ");          //user enters name and then moves to next line         System.out.println("Enter Your Name");         GamerName = Scan.nextLine();          //user is given an example of input format          System.out.println("Input Gamer Information " + "Using Format --> Game : Achievement Score : Minutes Played");         System.out.println("    ");           System.out.println("Game : Achievement Score : Minutes Played");         GamerReport = Scan.nextLine();           String[] splitUpReport; // an array of string         splitUpReport = GamerReport.split(":"); // split the text up on the colon          int i = 1;          //copy data from split text into main data storage arrays          GameNames[i] = splitUpReport[0];         HighScores[i] = Integer.parseInt(splitUpReport[1].trim() );         MinutesPlayed[i] = Integer.parseInt(splitUpReport[2].trim());          //output to file           try         {             FileWriter writer = new FileWriter("output.txt");             writer.write(GamerReport);             writer.close();         } catch (IOException e)         {             System.err.println("File does not exist!");         }


Where to put the period after a quoted word

Here is the sentence: The result of the moisture-laden air entering window assembly is visible condensation or “fog”.  Doesn't the period go after the g?


So basicly, I made a simple asp.net website which prints out the page when you click on the button. When you are printing out it asks me which printer and which options will be used. My aim is to directly print the page out without asking me printers and options.Thank you for your help.  Im running this program on visual studio 2015.  c# asp.net  function printpage() {     var getpanel = document.getElementById("<%= Panel1.ClientID%>");    var MainWindow = window.open('', '', 'height=500,width=800');    MainWindow.document.write('<title>Print Page</title>');    MainWindow.document.write('');    MainWindow.document.write(getpanel.innerHTML);    MainWindow.document.write('');    MainWindow.document.close();     setTimeout(function ()    {     MainWindow.print();    }, 500);     return false; }   HTML (aspx)  <asp:Button ID="Button1" runat="server" OnClientClick="return printpage();"  Text="Print Page" />   I do not have any errors program is running clearly.


The topic  shows how to successfully change the speed of the pointer. For example, in my case the solution has been xinput set-prop 13 276 0.7. However, the configuration is lost with the restart of the pc. How to make this change permanent?


I am trying to SELECT values from a column in my database in order to perform a PIVOT on those values without hard-coding them.  SELECT * FROM (SELECT ItemType, [Status] FROM [EVAULTTEST].[dbo].EvidenceItems WHERE ItemType IS NOT NULL) AS ei  PIVOT( COUNT([Status]) FOR [Status]      IN (SELECT DISTINCT ei.[Status] FROM [EVAULTTEST].[dbo].EvidenceItems AS ei) ) AS piv   However, the SELECT inside of our IN is giving us the error:  Incorrect syntax near 'SELECT'. Expecting '.', ID, or QUOTED_ID.   How can we use a SELECT inside of a FOR IN statement?


The Flash - Why didn't any meta-humans attack before Barry awakening?

After watching the complete first season, I still don't understand...  Where were the meta-humans and why they didn't appear before Barry Allen awakening ( only nine months after )?


how to show this function is one to one function?

LEt $f:\mathbb{D}\rightarrow\mathbb{C}$ be an holomorphic while $\mathbb{D}$ is convex set and let  $Ref'(z) >0$ show that for every $z\in D$ $\quad$$f(z)$ is one to one function. I was thinking on using the cauchy reiman eqations \begin{bmatrix}\dfrac{\partial u}{\partial x}&\dfrac{\partial u}{\partial y}\\-\dfrac{\partial u}{\partial y}&\dfrac{\partial u}{\partial x}\end{bmatrix} Now this matrix is reversible since $Ref'(z) >0$ and the determinant is not zero. now I wanted to show in some way that $f(z_1) = f(z_2) \rightarrow  z_1 = z_2$ I am trying to think how should I use the fact that $D$ is convex set can help me here.


I have installed ubuntu 13.04 over Windows xp through wubi.exe because i have tried installing ubuntu through usb but it seems like my laptop usb is not supporting it though it shows  SYSLINUX.........  in boot screen and hangs up that's why i quit usb installation and tried wubi.exe.  After installing Ubuntu 13.04 through wubi it seems like xp and ubuntu both are installed in same partition, thats a problem for me...  I want to delete xp without removing ubunutu.


I am using  to JIT compile some looped python functions as part of a larger application. Ideally, everything will run in numba's "no python" mode, such that the loop can be parallelised.  One of these functions involves use of the Beta distribution CDF (the ):  $$I_z(z| \alpha, \beta) = \frac{B(z | \alpha, \beta)}{B(\alpha, \beta)}$$  where  $$B(\alpha, \beta) =\frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha + \beta)}$$  and  $$B(z|\alpha, \beta) = \int_0^{z} u ^{\alpha -1} (1 -u)^{\beta-1} du$$  To run in nopython mode, I would like to implement the above using only functions from python's standard math library and numpy.   Implementing $B(\alpha, \beta)$ is no problem as I can use math.gamma from the python standard library.   The problem is how to evaluate the integral for $B(z|\alpha, \beta)$, which -- based on my admittedly limited knowledge of the problem -- must be performed numerically.  Is there a "standard" way that this is implemented inside most statistical libraries, eg. scipy?  appears to ask a similar question but remains unanswered.  Please note that $\alpha$ and $\beta$ could be varied quite substantially, so a lookup table with interpolation is not an option.  Solution for those searching for similar: I ended up following  linked answer from the comment below by whuber. Doing some further reading lead me to  on Github, along with .


The 'infavorites' search query is broken on Stack Exchange

I'm pretty sure this link worked some day in the past:  It should only display your favorites from all Stack Exchange sites. Instead, the filter is not working, so I consider this to be a bug. This query works on every Stack Exchange site, except for stackexchange.com, itself. If this isn't a bug, I still think this should be the expected behavior. I know a question that I marked as favorite, but I don't remember on which site I've seen the question, since we have many Stack Exchange sites that are related to each other (i.e. Stack Overflow, Super User, etc.)


I've been trying to make a command using JSON for a map, obviously i'm testing commands in case they try and break on me. I tried making a multi-colored tellraw command and it either does one part, or the other here's the command     /tellraw @a {"text":"(YOU!)","color":"blue","Bold":"true","text":"Rawr.","color":"red","bold":"true"}   I've tried making it to were its like      /tellraw @a {"text":"(YOU!)","color":"blue","Bold":"true"},{"text":"Rawr.","color":"red","bold":"true"}   but it still doesn't work, anyone can pick up and show my mistakes i've made?


"allow insertion" or "allow inserting" or "allow to insert"

I have some doubts about using ing-verb in the following case:     Such data structures don't allow insretion/inserting/to insert any   kind of objects.   Is it considered grammatically correct to say that in all three ways? I'm not sure about ing-verb because I didn't find that we can use it in that way. For instance, .


If two sets have the same cardinality, then so do their power sets. Converse can't be answered?

The following is my rewrite of  for the following assertion :     For infinite sets $A, B$, $|A| = |B| \Longrightarrow  \require{cancel} \cancel{\Longleftarrow} |P(A)| = |P(B)|$.    $\bbox[2px,border:1px solid black]{\text{ Proof Strategem : }}$ We are given that $f :A \rightarrow B$, is a bijection. How do we construct a bijection between subsets of A and subsets of B? We need a rule whereby, if we take one subset of A, then we can use the rule to uniquely construct a unique subset of B. My intuition on this is to take all the elements of the subset of A, and map them under $f$ to elements of B, which will form a subset of B.  $\bbox[2px,border:1px solid black]{\text{ Proof : }}$  In mathematical notation, we define $g$ as:  $g : P(A) \rightarrow P(B)$ by means of $\color{#009900}{g(S) = \{f(x) : x ∈ S\}} \; \forall S \subseteq A$.  $\bbox[2px,border:5px solid grey]{\text{ $g$ onto ? }}$ For all $T \subseteq B$, does there exist $S \subseteq A$ such that $\color{#009900}{g(S) = \{f(x) : x ∈ S\}} \; = T$?  Since $f^{-1}$ exists, define $S = \{f^{-1}(x) : x ∈ T\}.$ We must prove $\color{#009900}{\{f(x) : x ∈ S\}} = T$.  $\bbox[5px,border:1px solid grey]{T \subseteq g(S)}$ Take $y \in T \iff  f^{-1}(y) ∈ S \iff  \color{ #FF4F00}{f}[f^{-1}(y)] ∈ \color{ #FF4F00}g[S] \iff y \in g[S]. $  $\bbox[5px,border:1px solid grey]{{g(S)} \subseteq T}$ Take $y \in g(S)$ which means there exists $x \in S \ni f(\color{#C154C1}{x}) = y $. Since $x \in S$ means there exists $t \in T \ni \color{#C154C1}{f^{-1}(t) = x}$, substitute this into the previous equation: $f(\color{#C154C1}{f^{-1}(t)}) = y \implies t = y $. Since $t \in T$, thus $y \in T$.  $\bbox[2px,border:5px solid grey]{\text{ $g$ 1-1 ? }}$ Suppose we have $G,H ⊆ A$ such that: $g(G) = g(H)$ which means $\{f(x) : x ∈ G\} = \{f(x) : x ∈ H\}$.  $\bbox[5px,border:1px solid grey]{\{f(x) : x ∈ G\}  \subseteq \{f(x) : x ∈ H\}}$ Take $g \in G \implies f(g) ∈ \quad g(G) = g(H) \quad \implies f(g) ∈ g(H)$. Thus there exists a $h ∈ H$ such that  $f(g) = f(h)$ $\implies g = h$ because $f$ is a bijection.  Since $g ∈ G$, thus $g ∈ H$.  We can prove the other direction by the same argument, just with $G$ and $H$ swapped around.  $1.$ In the proof for $g$ onto, how would you (fore)know (ie: divine or presage) to define $S = \{f^{-1}(x) : x ∈ T\}$?  $2.$ Would someone please explain the step $f^{-1}(y) ∈ S \iff  \color{ #FF4F00}{f}[f^{-1}(y)] ∈ \color{ #FF4F00}g[S] $?  $3.$ Are there easier proofs? The result seems intuitive but the proof is complex.  $4.$ Are there any pictures?  $5.$ My course doesn't include $ZFC$. So what's the intuition why ?


I am getting a strange error when trying to install mysqlclient on Ubuntu 18.04

sudo apt-get install libsqlite3-dev libmysqlclient-dev -y  Output: After this operation, 10.5 MB of additional disk space will be used. Err:1 http://in.archive.ubuntu.com/ubuntu bionic/main amd64 zlib1g-dev amd64 1:1.2.11.dfsg-0ubuntu2                                                                       Could not connect to in.archive.ubuntu.com:80 (2403:8940:ffff::f), connection timed out Could not connect to in.archive.ubuntu.com:80 (103.97.84.254), connection timed out E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/z/zlib/zlib1g-dev_1.2.11.dfsg-0ubuntu2_amd64.deb  Could not connect to in.archive.ubuntu.com:80 (2403:8940:ffff::f), connection timed out Could not connect to in.archive.ubuntu.com:80 (103.97.84.254), connection timed out E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


I've been studying  lightsabers for a while now, and have tried to recreate the effects in Blender.  The trouble I'm having is with the blade in the compositor.  Keep in mind that I'm also trying to animate it.   First off, this is the lightsaber I've created with help from .  Obviously the color of the glow needs a little more work to be accurate, but that's not what I'm worrying about at the moment.  This is also rendered in Blender Internal, but I'm going to switch to Cycles when I got everything prepared.  The blade model is totally transparent, but its index is fed into the ID mask node.  I'm using two versions of Blender's Gaussian glow.  The glow it creates is, unfortunately, omnidirectional.  This is different than the glows Villanueva puts on his, where the white core continues into the saber emitter.  Also, unlike his, my glow flows over and obscures part of the emitter.  This also means that if prongs were placed on the emitter and closer to the camera than the blade, the glow would engulf them.  What I'm looking for is something like this:   (source: )    Where the parts of the model that are closer aren't affected by the glow, while those that are farther are.  Second, I'm trying to improve on Villanueva's method by having the glow applied to the reflection as well.  A method to have the glow applied to the blade if it's covered partly by glass would be nice, too.  Anyway, help is appreciated for any of these questions.  If there is a different way of going about this and getting the glow, like with Cycles materials, I'd be happy to know.


Resident permit finishes, can I travel on 90 day visa

I am a New Zealander on a resident permit in Holland. When my permit expires I plan to be travelling through France. Is this ok under the 90 day visa? I am exiting the Schengen zone for a weekend in London soon but will re enter to Holland living for another month before leaving to France.. Am I ok?   Dates:  Permit expires 9/9/14 Will be in France 10/9/14 returning home to NZ from Spain on 16/9/14 Travelling outside of schengen zone 18/7/14 for a weekend.


C Programming: How to read the whole file contents into a buffer

I want to write the full contents of a file into a buffer. The file actually only contains a string which i need to compare with a string.  What would be the most efficient option which is portable even on linux.  ENV: Windows


Why is desaturated orange = brown, but desaturated blue is just plain blue?

As per , "brown" refers to long wavelength hues, yellow, orange, or red, in combination with low luminance or saturation. So what about the short wavelength hues? Is there any reason why they are not called differently when desaturated? Specifically, is there any physical reason? That is, is brown in some way qualitatively different from orange in some way, more so than desaturated blue from regular blue?


Send an argument with a pointer to an objects member function?

I'm trying to make a class that queue's up functions to run after a certain amount of time has passed. The class will take a pointer of an address, a pointer to the object of that member function, and also allow up to (currently) a single parameter.  The code that errors:  cfs.taskManager.addTask(500, &GameState::print, cfs.getCurrentState(), temp); //500: (int) time in ms converted later. //&GameState::print: void GameState::print(std::string), takes a string argument. // cfs.getCurrentState(): returns pointer to print object. //temp: std::string   TaskManager.hpp:  class TaskManager { public:     TaskManager();     ~TaskManager();      // float ms: time in milliseconds before event occurs.     // void(C::*f)(): direct pointer to function.     // C* o: direct pointer to object that the function is attached onto.     // A a: Data type copy of spare argument.     template <typename C, typename A>     void addTask(int ms, void(C::*func)(A), C* o, A a);        //  Dump all queued tasks.     void clearTasks();     //  Check if program time has passed currTime+delay of the      void run();      std::vector<Task> task;     sf::Time time; };   This line here from above  void addTask(int ms, void(C::*func)(A), C* o, A a);   I'm led to believe that trying to pass an argument into the function pointer is the issue. I tried to make void(C::*func)(A) expect the same type of data as last parameter. When I remove template A and stop trying to pass an argument, I get no compilation errors.  Here's the compilation error I get:  error LNK2001: unresolved external symbol "public: void __thiscall TaskManager::addTask<class GameState,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(int,void (__thiscall GameState::*)(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >),class GameState *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??$addTask@VGameState@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@TaskManager@@QAEXHP8GameState@@AEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@ZPAV1@0@Z)1  >C:\Users\Honor\documents\visual studio 2015\Projects\CFS\Release\CFS.exe : fatal error LNK1120: 1 unresolved externals   Any help at all would be very appreciated!  Edit: If I'm leaving out any crucial information, let me know I'll update really fast.


Line through the intersection on two conics

Let    $$ax^2+by^2+cz^2+2dyz+2exz+2fxy=0 \\ gx^2+hy^2+jz^2+2kyz+2lxz+2mxy=0$$    be two conics in barycentric coordinates. Can you suggest a way or algorithm to find the equation of a line passing through the point of intersection of  two conics?   I tried solving but this way not giving any progess  Can anybody suggests the way to deal this situation.


In Excel, I need to align on the decimal point a column of numbers that contains a mix of:   numbers, and  numbers followed by x's   For example, the following data should be aligned as:     0.100   0.220 xx  -2.123 xxxxx  20.123 x -30.100   Is there a custom format that allows to format like this?  Many thanks!


How to derive mathematically that derivative of |Ax-y|^2 with respect to A is 2|Ax-y| x^T

How to get transpose part when derive mathematically $$ \frac {\partial|Ax-y|^2}{\partial A} = 2|Ax-y|x^T $$


Where should my data be validated in my ASP.NET MVC app?

I don't want opinions. I want answers to this question below. I know within my Model classes, I can include Data Annotations to validate my forms:  public class Movie {     public int Id { get; set; }     public string Title { get; set; }      [Display(Name = "Release Date")]     [DataType(DataType.Date)]     [DisplayFormat(ApplyFormatInEditMode =true, DataFormatString = "{0:yyy-MM-dd}")]     public DateTime ReleaseDate { get; set; }      public string Genre { get; set; }      [DataType(DataType.Currency)]     public decimal Price { get; set; }  }   However, there are already JavaScript libraries that validate the default behaviors (i.e. @Html.ValidationMessageFor()):
     @Html.LabelFor(model => model.Title, htmlAttributes: new { @class = "control-label col-md-2" })
         @Html.EditorFor(model => model.Title, new { htmlAttributes = new { @class = "form-control" } })         @Html.ValidationMessageFor(model => model.Title, "", new { @class = "text-danger" })   And my question would be... Is it best practice to validate in the models only or within the views itself?? What is more safe in terms of maintaining security?  Please let me know if this is wrong question to ask and I will remove it quickly.  Thank you


Script failing with "command not found: ^M"

When I try to run the following script in zsh, via the command /bin/zsh ~/.set_color_scheme.sh I get the following error:  command not found: ^M   The script has u+x permissions and it used to work on another machine that also had zsh. Any clues why?   Note: This question is related to  (where I am trying to adapt the script for tcsh)  #!/bin/zsh # Contents of set_color_scheme.sh  export LS_COLORS=$( \ ( grep '\w' | grep -v '^#' | sed 's/#.\+//' | perl -lane 'printf "%s=%s:", shift @F, join ";", @F;' ) <<< "  # HUMAN_FORMATTED_DATA # list one per line  # these are basic filesystem items no 00          # normal fi 00          # file di 01 34       # directory ln 00 36       # link pi 40 33       # pipe so 00 35       # bd 40 33 01 cd 40 33 01 or 01 05 37 41 mi 01 05 37 41 ex 00 91       # executable ow 01 34       # other writables   *.cmd 00 32 *.exe 00 32  # archive, compressed things etc *.gz  00 90 *.bz2 00 90 *.bz  00 90 *.tz  00 90 *.rpm 00 90 *.rar 00 90 *.zip 00 90 *.iso 00 90   *.cpio 00 31    # perl & CODE *.c      33 *.h      33 *.sh     33 *.t      33 *.pm     33 *.pl     33 *.cgi    33 *.pod    33 *.PL     33 *.js     33 *.php    33 #*.xs  # strikethrough *.off 00 9 *.bak 00 9 *.old 00 9   # documents misc, html webstuff # really TEXT *.htm    94 *.html   94 *.txt    94 *.text   94 *.css    94   # MOVIE *.avi    96 *.wmv    96 *.mpeg   96 *.mpg    96 *.mov    96 *.AVI    96 *.WMV    96 *.mkv    96  # images & pdf *.jpg    96 *.jpeg   96 *.png    96 *.xcf    96 *.JPG    96 *.gif    96 *.svg    96 *.eps 00 96 *.pdf 00 96 *.PDF 00 96 *.ps  00 96  *.ai  00 91 # adobe ill *.doc 00 91 # msword   # data, such as .db, .csv *.csv    95 *.dsv    95 *.db     95 *.sql    95 *.meta   95 # CONFS *.xml    95 *.yaml   95 *.yml    95 *.conf   95 # [a-z0-9]*rc ")


Boolean Difference function adding new face unexpectedly

In Blender 2.91.0 I am trying to make a cube recess in another cube by using the 'boolean - Difference' function. For some reason blender doesn't take the second cube away cleanly from the first cube. It adds a new face to the front of the remaining cube (see attached pic). I use 'snap to' vertex to ensure the vertices are all aligned- but same problem occurred. I made the cube used to apply the difference a little larger to ensure it was outside the flat plane of the first cube, but same problem. I tried using new cubes, but problem still remains. I then tried a second cube bigger than the entire face of the first cube and applied 'difference' again, but the extra edge remained. I want to apply texture to the front surface but the extra face will make alignment difficult. Besides as far as I can see this shouldn't happen. Any suggestions?


What if a scene calls for an actor to pull out a cigarette and light up? But the actor isn’t a smoker?   Are there fake cigarette props? Vapor cigs that don’t have any nicotine or harm to the lungs?   How does that typically work? Please no “do you know Hollywood culture?” answers. I’m asking for serious answers.


Can One-Way Speed of Light be Instantaneous?

I recently watched  by Veritasium where he talks about the One Way Speed of Light and talks about the limiting case where in one direction the speed of light is $c/2$ while it's instantaneous in the other. He also says this is perfectly fine according to our Physics theories. He also points at Einstein's assumption in his famous 1905 paper where he assumes that the speed of light is same in all directions. This made me ask this question is taking the speed of light same in all directions an axiom of some sort? As I've often read no information can be sent at more than the speed of light but here one-way taking the speed to infinite makes no difference. So are all of our physics theories based on the assumption and what would happen if light turns out to be moving at different speeds in different direction? Will that enable transfer of information faster than the speed of light and is there any way for us knowing that the transfer happens faster than the speed of light? The video takes a Earth Mars case where he says it isn't possible for us to every realize this discrepancy but is there a more general proof which says it isn't possible


As a Green Card holder, can I travel to Iran and come back to the US without restriction?

I am a green card holder and live/work in the US. I want to travel to Iran in July 2021 for a couple of weeks. Am I still exempt from the 14 days quarantine rule in a third country (based on the new ) before entering the US?


Is there a proof that $\pi$ is an irrational number?

Most math texts claim that $\pi$ is an irrational number. However, I'm having a little bit of trouble understanding that.  Since nobody has calculated all of the digits of $\pi$, how can we know that either:   one of the digits repeats (as in $\frac{10}{3}$) the number eventually terminates     Note: Please be very descriptive in your answers... I don't have anything beyond high school math.


How do you start Windows 10 in safe mode?

I've been through the Windows 10 upgrade, and am experiencing a recurring "INTERNAL_POWER_ERROR", which is stopping me from logging in.  I'd like to be able to try to boot to safe mode, but it appears that pressing F8 during boot is no longer enough, so how can I boot in safe mode (or any of the other recovery options) on a Windows 10 PC that doesn't let me log on?


How do I open Ubuntu Software Center via Terminal?

I am a newbie in linux and I don't know how to open the Ubuntu Software Center via Terminal!! Please help


About measurement of pulse using oscilloscope

When I measured the optical pulse using photo-detector and oscilloscope, some negative voltage was measured after strong peak. What did I get negative voltage? How is it possible?


How to add context menu item for files in general, in Windows?

in order to add context menu for directories and explorer background, one can follow instructions .   To add context menu for specific file extensions, one can follow instructions   but I can't seem to find a way to add context menu items for all files?


Which movie/TV show has an evil cyborg harvesting eyes from androids in a hidden town?

I watched it maybe more than 8 to 12 years ago, but as far as I remember there was this place where androids (or maybe they were cyborgs) lived. (I think it was more like a hidden town). This guy finds them by accident (or at least I remember it that way) and tries to help them. I don't remember seeing any aliens or spaceships or anything like that. It was live-action, and I think US-based.  So, what I remember:   The bad guy is a human who has one red flashy robotic eye (not like terminators, it looks like a square eye patch above one of his eyes that functions like a second eye), he is collecting eyes from these androids/cyborgs. He also kills some of these androids/cyborgs but not all of them, some of them he just collects their eyes and doesn't kill (or get to kill). There was this woman who was a sexbot or something, she tried to give pleasure to the bad guy at some point, yet the bad guy added one of her eyes to his collection instead, but didn't/wasn't able to kill her. Towards the end she says something like "I used to give pleasure, now I only want to give pain" The human guy who found them tried to help them defend themselves from the bad guys, but they were in bad shape, many of them needed repair. To repair some of them, they needed spare parts they didn't seem to have, but one of the android/cyborg dudes said something like "we don't really bury our dead" and he brought a box of spare parts (or maybe android/cyborg body parts), they used these parts to repair some of the androids/cyborgs. There was this android/cyborg guy who was an assassin or something, but lost his fingers or hands, they couldn't find any hands compatible to his, but he said something like "I can still feel my trigger finger, just attach the weapons to my hands".   I remember it as a great movie/tv show, but I can't find anything about it. Can someone help me?  Please and thank you in advance...


Name of short sci-fi story involving a musician who is punished for listening to Bach

I read a short story a long time ago and I can neither remember the title nor the author.  The main character is a musician.  He is sequestered and allowed to play all day on some kind of a fantastic instrument; however, he has been barred from listening to any music for fear that it will stifle with his innate creativity.  Someone secretes him some Bach, he listens to it, and is then caught and cast out.  He gets a series of jobs and is inevitably punished for breaking some music-related taboo.  Any ideas?


EDIT: As Bill B. and Caramdir point out in their comments after Bill B. produced his results posted below, more information is needed in order to make a better call. To remedy, my output was produced using MiKTeX 2.8 pdflatex with no special command line flags or switches. My pdf viewer is Adobe Acrobat Pro 9.0. The platform is Windows 7. All software including hyperref is fully up to date against the latest rev levels and patches.  As I'm guessing that this is a pretty normal setup, at least in the Windows world, I'd be very interested (and grateful) in learning whether this problem affects other people or whether it's just some kind of rather weird one-off. My gut feel after seeing Bill B's results (and also after having traversed hyperref's code) is that the culprit is Adobe Acrobat or possibly MiKTeX pdflatex.    Can anyone corroborate? I'd be very grateful to know.    Original question:  I have a problem with hyperref; it "enquotes" Author and Keywords (but not Title or Subject) metadata if the data sent to these contain a comma or semi-colon (but not, say, a full stop or a colon).    I've included some figures and code that show this below.         \documentclass{article}  \newcommand*\metadata{% % uncomment all but one line below %  a  b  c%     <-- no problem    a, b, c%     <-- problem %  a; b; c%     <-- problem %  a: b: c%     <-- no problem %  a* b* c%     <-- no problem }  \usepackage[   pdftitle={\metadata},    % never enquoted   pdfauthor={\metadata},   % enquoted if , or ; is present   pdfsubject={\metadata},  % never enquoted   pdfkeywords={\metadata}, % enquoted if , or ; is present ]{hyperref}  \begin{document}   Press ctl-d (in Acrobat Reader) to see pdf file metadata. \end{document}   Not only is this quite ugly but, more importantly, it interferes with metadata extracting programs used by certain document repositories.   I've worked my way through hyperref's code without much success. Would anyone have a solution for this problem?  Or advice about what I might be doing wrong?


I have attempted multiple times, with multiple different possible solutions from around Stack Overflow to accomplish this task, yet frustratingly, I cannot seem to be able to center the input box in the div.  My code essentially looks like this at the moment:    div {   width: 100vw;   position: relative }  h1 {   text-align: center; }

Title
   <input type='text'>
     As of the moment, the word "Title" is centered on the screen, but the input box is still on the left hand side.   Is there any way to be able to center the  horizontally in the div?


Why does the camera output an image with multi-colors not shown by the naked eye under the projector?

I was shooting in a gallery that used what appears to be a multi-colored projector and had difficulty shooting in that type of scene as the color was not even across the scene. The image shown below is what I mean, you see traces of green, blue, and yellow colors in the picture when it's supposed to be all white/gray as seen by the naked eye.  Why does this occur to the camera's output (DSLR or mirrorless) when shooting a scene that's lit by a projector? Is it the type of projector used? Is there a way to fix this or camera settings wise?


Say there are 3 companies A, B and C. Each company has a quality rating from 0 to 100 and a price in USD.  Company    Quality    Price A          80         7.9 B          70         8.0 C          75         8.1   How do I determine the best quality-price trade-off? What kind of analysis should I use?


Entity Recognition to extract question,options and diagrams from a question paper?

Here is a sample question paper. I want to extract questions, their options and diagrams for the corresponding question(if any). Thinking of doing entity recogntion for the same. But I am not sure if that is possible for diagrams? Can someone help me out. I tried OCR techniques previously but they are not doing well.


Exception within AWS Framework code when attempting to run/debug Java AWS Lambda function locally

I have a very simple AWS Java Lambda function that can be uploaded to an Amazon S3 Instance and successfully run. My code is based on an Eclipse workspace documented by  tutorial. Now I am trying to setup debugging for my Java Lambda function. For that, I am following  tutorial called "AWS Toolkit for Eclipse: Locally Debug Your Lambda Functions and Amazon API Gateway Using AWS SAM Local". It instructs me to install Docker, AWS SAM Local and AWS Toolkit for Eclipse. I have successfully installed all the pre-requisites. Now I am able to run my Lambda function in the Amazon Cloud servers with the context menu item (right click in the source) "AWS Lambda/Run function on Aws Lambda.."  So far so good. But when I choose the menu item "AWS Lambda/Run on AWS SAM Local" things do not work. The build occurs succesfully, the unit tests pass, but running under the debugger fails. I get the following eror details. This occurs for any AWS Lambda java project I create. Can anyone help me diagnose this problem. What part of my setup is incorrect?  Update  After further investigation, it may be the case that the null pointer exception is caused by the lack of a "serverless.template" file in the project. Because creation of an empty one makes the null pointer exception go away but I am on to the next error. So maybe my new challenge is to figure out what the contents of serverless.template are supposed to be for a Lambda function. And I'm not sure why the AWS tutorials do not address this very well.


Is there any grammatical reason why "the" is used in front of acronyms? Such as the UK the US the USSR ?


Ubuntu 13.04 Wireless network adapter won't work (ASUS USB-N53)

I just installed ubuntu on my brand new built computer. I ended up buying ASUS USB-N53 network adapter for wifi but I cannot connect it to internet. I see few wifi selections but when I click on the wifi, it would only attempt to connect but fails.. please help!!


We see figures like "ACMECorp covid vaccine is 90% effective". I guess that this means something like:  In the trial the number of people receiving the vaccine who caught covid is only 10% of the number who didn't receive the vaccine and caught covid.  My question is about the interpretation of the figure "90%". For example it could mean:  90% of people who received the vaccine are completely protected and will never catch covid.  all the people who received the vaccine are 90% protected i.e. will only catch covid once out of every ten exposures to it.  something in between.  the trial doesn't tell us this so we don't know.   Do we know which, if any, of the above apply to the effectiveness figures given by Astra Zeneca, Pfizer, etc? Or is the situation (even) more complicated than I've described above?


Where should I look to start learning about the lore of the Forgotten Realms?

I'm a GURPS oldschool player, playing GURPS 3e since 2000, using GURPS Magic, GURPS Fantasy and the Core Rules.   I have heard a lot of things about D&D and specially about the Forgotten Realms, and I want to migrate from GURPS Fantasy to the Forgotten Realms. (Yeah, I know that I'm really late.)  Searching on the Web about the Forgotten Realms, I noticed that there are a bunch of books about this world. What are the books that I must read to learn about the lore of the Forgotten Realms, and in which order?  To be more specific: I want to play D&D 5e, but my main interest is to play in the Forgotten Realms setting. The lore is my main interest. I know the path to learning the system/rules of D&D; this is the "easy" part. I know I can play in the Forgotten Realms setting using GURPS too, but that is not the focus of the question.


When concurrently connected to wired and wireless ensure Windows 7 uses wired connection

When I am at my desk and my laptop is in its docking station I want to ensure that it uses its wired connection and not my wireless network. I am hoping/guessing that the preference in connection is based on the order of the listed connections in the Network and Sharing Center. I could just switch the wireless off but I'd prefer to not have to go through the trouble.


Create new derived type in constructor of abstract base

Apologies for the awful title, I couldn't think of a better way to phrase it.  Essentially I have an abstract base class Category and whole host of derived classes inheriting from that. Is it possible to do something along the lines of:  List<Category> catList = new List<Category>(); catList.Add(new Category(myCategoryTypeString));   Where myCategoryTypeString will always be the name of one of the derived classes and have it instead create a new object of that derived class (presumably using a switch on the string to determine which class to use).  So that something along the lines of:  catList.Add(new Category("Engineering"));   Would add a new object of Engineering : Category type to the list?  If that is possible how would one go about doing this? My abstract class is defined thusly:  abstract class Category {     private string line;     private bool ToChallenge;     private string[] columns;     private int oppLevel;      protected Category(string line)     {         this.line = line;         columns = line.Split(',');     }      public abstract bool IsAnomoly();     public abstract void CategoriseAnomoly();     public abstract void WriteLine();  }


So the other day I received a message from Google Search Console alerting that one of the websites I host contain malicious code, and I did manage to find numerous encrypted code lines in several files including wp-config.php and inside  which was installed and activated (not by me) and contained some encrypted code in its settings. I've deleted everything I found, installed the Sucuri Security plugin, and after scanning I installed WordFence which found a few more malicious files. I know for 100% that a "nulled" theme is the source of the malicious code. I've replaced the theme with an authentic one and also reinstalled its plugins. My question, is it possible to clean an infected WP website? I mean the malicious code/hacker must have gotten access to the database/other sites on the server which probably doesn't give me any other choice but rebuild am I, right? What's your opinion? I also would like to point out that the infected website has high traffic, which made it valuable for the "hacker", which what probably brought him to insert extra code into the site (which is something I didn't notice in other websites that use the same theme but have less traffic). Let me know if there's a complete procedure I can do that will clean this website & database completely from any malicious code. Thank you and regards.


How can one use multi threading in PHP applications

Is there a realistic way of implementing a multi-threaded model in PHP whether truly, or just simulating it. Some time back it was suggested that you could force the operating system to load another instance of the PHP executable and handle other simultaneous processes.  The problem with this is that when the PHP code finished executing the PHP instance remains in memory because there is no way to kill it from within PHP.  So if you are simulating several threads you can imagine whats going to happen.  So I am still looking for a way multi-threading can be done or simulated effectively from within PHP. Any ideas?


Use variable with TOP in select statement in SQL Server without making it dynamic

declare @top  int set @top = 5 select top @top * from tablename   Is it possible?  Or any idea for such a logic (i don't want to use dynamic query)?


In Grand Theft Auto V, how do you buy special cars? I just went into my garage and it said press right on the d-pad and it showed one special car. I was wondering how to buy more.


Inside an equilateral triangle $ABC$,an arbitrary point $P$ is taken from which the perpendiculars $PD,PE$ and $PF$ are dropped onto the sides...

Inside an equilateral triangle $ABC$,an arbitrary point $P$ is taken from which the perpendiculars $PD,PE$ and $PF$ are dropped onto the sides $BC,CA$ and $AB$,respectively.Show that the ratio $\dfrac{PD+PE+PF}{BD+CE+AF}$ does not depend upon the choice of the point $P$ and find its value.    I have no idea how to proceed. I could not do anything beyond calculating the area of $PDB,PCE,PFA$ but here I get nothing. Please help!


1970s - The seventies; 1980s - The eighties; 1990s - The nineties.  What do you call year 2000 and 2010?  If someone who is older says a joke that was funny in eighties. I mostly hear right after: "You won't get it, it's a nineties thing."  But what if I make a pun over 20 years, that is funny now, but won't be in future? What do I say? "You won't get it, it's __ thing."


I have installed python3.8 to python 19.10:   sudo apt install python3.8   I now want to install pip for python 3.8   python3.8 -m pip install pip  Requirement already satisfied: pip in /usr/lib/python3/dist-packages (18.1)   But the pip 3 is 3.7   pip3 -V  pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)   So that, for example :  pip3 install pyinotify Requirement already satisfied: pyinotify in ./.local/lib/python3.7/site-packages (0.9.6)   Attempting to import pyinotify to a python3.8 script throws a ModuleNotFound error


Projection problem shapefile / layer created with LAS tools

I am a beginner with QGIS and I have been working on creating layers with LAStools and shapefiles of the city of Rio de Janeiro.  Both data are provided by the city, so shouldn't contain any error. My two first layers ("cobertura4618" & "Regiao Metropolitana") are aligning perfectly when I project them on the same system EPSG 4618 - SAD 69. But the last layer "output vector file" (created through lastools and projected on the same system) doesn't overlap with the others even if I have projected it on the same system like the others.          The on-the-fly CRS tranformation is disabled. "Prompt for crs" is selected. I have used always the same method to project the layer on EPSG 4618 - SAD 69 : right click on the layer "save as" > "selected CRS" > ok.  I have read a lot of posts about projection problem but none of them helped to solve my problem.


Split by Attributes tool exporting to DBF files only?

I am using the "Split by Attributes" tool in ArcGIS 10.6 to go through a shapefile, and split it up into new files by an attribute value. The tool runs perfectly, however I notice it only exports to DBF files. Shapefiles or CSVs would be preferable, but I don't see any option to specify the file type.   Can this be changed and, if not, is there a way to split up a shapefile by attribute value, and export it to .shp or .csv files?


I am trying to write an application that communicates with a server via Sockets on windows. I need a reliable way of telling if the connection is interrupted, for example by internet connectivity issues etc. I do not mean the return of connect(), but while the socket has already been esablished.So far the only one that was supposed to work was to send a message to the server with      int issocketclosed = send(socketFd," \b",3,0);   My integer however does not change when the connection gets killed. On the server side i am using "netcat -k -lv PORT" to listen for the connection and to simulate interruption i am CTRL-C -ing netcat .  My Socket code looks something like this:  WSADATA wsa; WSAStartup(MAKEWORD(2,2),&wsa); HANDLE s = socket(AF_INET,SOCK_STREAM,0); struct sockaddr_in connect_info; connect_info.sin_family = AF_INET; connect_info.sin_port = htons( port ); connect_info.sin_addr.s_addr = inet_addr(ipaddr); connect(s,(struct sockaddr*)&connect_info,sizeof(connect_info)); while(1){    Sleep(5000); //Do Stuff with socket    int issocketclosed = send(socketFd," \b",3,0); //Check for connectin error   if(issocketclosed == -1){     connect(s,(struct sockaddr*)&connect_info,sizeof(connect_info)); // Reconnect   } }   I know this is not the first time this question has been asked but i have tried the other ones such as getsocketopt() without success. Any help is appreciated!


I have Ubuntu 12.04.4 LTS (64 bit) server with no GUI. Can anyone tell me how do I install KDE on it? Will that command be okay?  apt-get install kubuntu-desktop -y startx   Or something else has to be done?


¿Which is the fastest way to check if a host is up or down using python?.   I need to perform ~ 120K pings so it doesn't matter if there is a few of  false negatives.  I have 2 different approaches:   ICMP requests with scapy  Execute os.system("ping -c 1 " . ip)


I am asked to compute the limit of the function $(\cos x-1)/(x^2)$, as $x$ tends to $0$, without using L'Hospital. The only thing I am aware of in this case that I have (0/0) is to use DLH and so I found that the result is -1/2. But I am asked to compute it without L'Hospital.I would appreciate of your guidance.


If replicators allowed humans to stop working, why were replicators shut down in the Voyager?

Replicators have been cited as the invention that allowed humans to stop working for a living. This implies that replicators are cheap and even free because they produce food at super-low cost. So low that humans can stop work. However, if replicators are indeed so low-cost, why were they shut down in the Voyager? Cooking replaced replicators in the Voyager. This implies that replicators are more expensive than manual cooking. If so, how can replicators give humans the luxury to stop working?


I was reading some commands on  and find an interesting command:  :(){ :|:& };:   Currently I'm under OSX and the only reference to it that I could find was on builtin man page (man builtin) but that didn't help because it only says whether it's an external, cshell or sh command.         Command       External    csh(1)    sh(1)        !             No          No        Yes        %             No          Yes       No        .             No          No        Yes        :             No          Yes       Yes   So, what does executing : do?  On terminal I've got no output on it:  $ : $


How to enable key repeat on Macbook Pro with Yosemite

I would like to disable the accent characters options you get when you hold down keys.   I have always used holding keys to repeat letters but all of the sudden it shows special characters and won't let me repeat any keys, even if they do not have special characters. I have been using Yosemite on my early 2011 MBP for a while now and this has never occurred before. Did I do some strange keyboard combination? And is there a way to turn it off, to get proper key repeats back? I have searched for this everywhere in the settings and online, but apparently it is not a known thing.   Thank you very much in advance!


I am writing an article for a magazine about my visit to my village. I want to use a better word or phrase for 'my village' or 'my native place'. The following is the part  'When  i heard of stories of hardships and suffering from my grandparents I realized how fortunate I was to live in the city I now call home. When the day came to visit "my village/my native place", I felt uncertain and nervous..'  And better word or phrase to make the content more appealing?


Im using Windows 8.1 and have multiple PDF files that i want to print. At the moment the only way i know to print those PDF files is by opening the file with the default Windows 8 PDF reader and then use the print option. It is a slow procedure when i have tons of PDF files to print.  I remember that on windows XP/7 i had the option to select all the files i wanted to print, right click on the selection and then choose print.. but thats not an option on windows 8.  Does anybody know about an app or way to achieve this on windows 8?


I changed my email on Stack Overflow. And after that, I received back a lot of badges but not all.  For example, I lost Quorum and Constituent.  And I had one more silver badge and one other bronze badge but I don't remember which one.  So my question is: is it a bug, or are the answers to  (last one in 2012) deprecated?  And if it's normal, can we add a warning when we want to change our e-mail?  (I don't want to have my badges back, I just want clarify this thing).


I have a bug where I am getting a current modification exception and I can't find it

I'm creating a simple spellchecking program.  It basically loads in a dictionary and misspelled words.  I have a function aimed at removing repeats, and another function that generates all vowel combinations of a word to be checked. I'm having an issue with my vowel function.  I keep getting CurrentModifcationException, but I feel like it should be able to modify the array its adding words to as the array is statically defined at the top. Basically this function takes in an ArrayList and recursively adds additional words to the ArrayList which are vowel combinations of the word inputted. An example is if 'who' was inputted, it would add 'wha, whi, whe, whu' to the array list. The Code DEFINED AT TOP OF CONTAINER CLASS private static List<String> vowelList = new ArrayList<>(); private static ArrayList<String> checkList = new ArrayList<>();  private static void feedWordsForVowelCheck() {          for(String temp : checkList) {             System.out.println("Checking vowels for: " + temp);           //  createVowelCombosStatic(temp, 0);             createVowelCombos(temp, 0 , checkList);         }         // System.out.println("Does this finish?");     }    private static void createVowelCombos(String word, int start, ArrayList<String> checkList) {         StringBuilder sbAddWord = new StringBuilder(word);         String[] splitWord = word.split("");                   if (start==splitWord.length) {             checkList.add(word);             return;         }                  if (splitWord[start].matches(".*[aeiou]")) {             for (int j = 0; j < 5; j++) {                 sbAddWord.setCharAt(start, vowelList.get(j).charAt(0));                 createVowelCombos(sbAddWord.toString(),start+1, checkList);                 //System.out.println(sbAddWord.toString());             }         }         else             createVowelCombos(sbAddWord.toString(),start+1, checkList);     }


Different number of return values in Python function

Is it okay/good practice to return different number of return values from a function in Python? If yes, how should the caller handle the return values? e.g.  def func():     if(condition_1):         return 1,2     if(condition_2):         return 1     if(condition_3):         return 1,2,3,4   Note: condition_1,condition_2 and condition_3 are local to the function func so the caller has no idea how many values will be returned.


Prove that if  $E[X|\sigma(Y)] = Y$ and $E[Y|\sigma(X)] = X$ then $X = Y$ almost surely. This is my idea:  By assumption, $Y = E[X|\sigma(Y)] = E\left\lbrack E[Y|\sigma(X)]|\sigma(Y)\right\rbrack$, and I would like to show that this equals $E[Y|\sigma(X)]$ which equals $X$.  If I can show that $E[Y|\sigma(X)]$ is $\sigma(Y)$ measurable, then the proof is finished.  But I am not sure how to do this.  Any help would be greatly appreciated.


Should we improve time to first byte or Page Speed Insights score for SEO?

Google posted last summer that "page speed" will impact the search result rankings also on mobile devices. But I think there is a little confusion about the term "page speed".  The test tool which Google offers is called "Page Speed Insights". Many people we are talking with, are thinking that the overall score of this tool for a particular site for example Desktop: 46/100 and Mobile: 45/100 is used for the ranking algorithm.  BUT I found a very interesting article in German language which states that only the TTFB (time to first byte) value is used and this should be optimized not all suggestions which "Page Speed Insights", further called PSI offers. Here is the link to the German article:   In short terms it says that a very large site in this case "The New York Times" has a low overall score of Mobile:41 and Desktop:45. As they are used to sell reader memberships they should  offer a great user experience. So, they should optimize their site. But when I call this site it is amazing fast. The overall PSI score does not reflect this behaviour. But when I believe this article the TTFB for this site is perfect. Also when I call it here from Austria it states 0.881sec.  I really like to know on which value we should focus our work for optimization not to fall in the ranking. Because as many of you already said it is not useful to implement all suggestions from the PSI site for one domain.  So, it would be real  if you could clarify things here or post links to official posts from Google. What I found about this, Google always is talking about "page speed" but what exactly is this?


I have never used octal numbers in my code nor come across any code that used it (hexadecimal and bit twiddling notwithstanding).  I started programming in C/C++ about 1994 so maybe I'm too young for this? Does older code use octal? C includes support for these by prepending a 0, but where is the code that uses these base 8 number literals?


I've just received some SATA 3 6GB/s cables that I ordered last week, and it struck me how ordinary they look when compared to normal standard SATA cables.  My PCI-E SATA3 card is yet to arrive.  My question is, would a standard SATA cable have the same transfer speeds as my SATA 3 6GB/s cables? Question is similar to , but however it doesn't have an answer.  This question isn't asking 'are all SATA cables compatible with SATA 3', it's asking whether SATA 2 and SATA 3 transfer speeds are the same.


Prove that the sum of minimum edge cover and maximum matching is the vertex count

Given a connected graph, how can we prove that the number of edge of its minimum edge cover plus its maximum matching is equal to the number of vertices?


I am trying to get current time of a particular timeZone but when I write this:  Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("America/Boise")); System.out.println(calendar.getTime());   it always prints UTC time followed by "UTC" word maybe because on the server timeZone is set to UTC but still it shouldn't happen as I explicitly specified the timezone here.


NULL value in query_plan column from the sys.dm_exec_query_plan DMV

I've written a query to return data from the sys.dm_exec_query_plan DMV, but for a specific stored procedure the query_plan column which should contain a link to the XML version of the plan is NULL.  select     qs.sql_handle     , qs.statement_start_offset     , qs.statement_end_offset     , qs.plan_handle     , execution_count     , st.text     , substring(st.text, (qs.statement_start_offset/2)+1,         ((case qs.statement_end_offset             when -1                 then datalength(st.text)             else                 qs.statement_end_offset             end - qs.statement_start_offset) / 2 + 1)) as [Filtered text]     , qp.query_plan from sys.dm_exec_query_stats as qs     cross apply sys.dm_exec_sql_text (qs.sql_handle) as st     cross apply sys.dm_exec_query_plan (qs.plan_handle) as qp where st.objectid = object_id('myProcedure') order by qs.sql_handle     , execution_count desc   I've checked the documentation and indeed it says that the columns is nullable, but does not say anything about the reasons why its nullable.    Although the procedure has been ran at least two times, my understanding is that the plan cache should have information saved about this stored procedure and its compiled execution plans, but this query returns NULL.  I've also looked in the procedure code to check if it has the RECOMPILE option both at procedure level and at statement level and it doesn't.  My next assumption is that the query_plan column is NULL because all of the queries from the procedure (and from the above result set) are either inserting or reading data from #temporary tables.  Is my assumption correct and is that the reason why no query plan is stored for these queries? Or is there possibly another reason?  Update:  I've checked based on @Shaky's comment if the procedure is encrypted, by verifying the value in sys.dm_exec_sql_text.encrypted and it's 0.  I've also tested my assumption that the procedure plan is not stored because of the use of temporary tables in the queries and for that I created a dummy stored procedure which stored the result in a temporary table and then displayed the data from that table and its execution plan is returned by my query.


Unable to start activity ComponentInfo, request Permission

I'm trying to request permissions on Android but I have an error.  Unable to start activity ComponentInfo {[...]}:java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.PackageManager android.content.Context.getPackageManager()' on a null object reference     [...]   Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.PackageManager android.content.Context.getPackageManager()' on a null object reference   at android.content.ContextWrapper.getPackageManager(ContextWrapper.java:91)   at android.app.Activity.requestPermissions(Activity.java:4284)   at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:507)   at com.appwifi.Wifi.Wifi.setPermission(Wifi.java:118)   at com.appwifi.Wifi.Wifi.connect(Wifi.java:62)   at com.appwifi.Wifi.Wifi.<init>(Wifi.java:51)   at com.appwifi.Main.MainActivity.onCreate(MainActivity.java:32)     I think i have understood it's a NullPointerException but even with debugger i can't find what is null. Here is the code :  public class Wifi extends Activity {     public static final int WIFI_PERMISSION = 1;     [...]     private void setPermission() {         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M             && (ActivityCompat.checkSelfPermission(mContext, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED             || ActivityCompat.checkSelfPermission(mContext, Manifest.permission.CHANGE_WIFI_STATE) != PackageManager.PERMISSION_GRANTED             || ActivityCompat.checkSelfPermission(mContext, Manifest.permission.ACCESS_WIFI_STATE) != PackageManager.PERMISSION_GRANTED)) {         ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_WIFI_STATE,Manifest.permission.CHANGE_WIFI_STATE,Manifest.permission.ACCESS_COARSE_LOCATION},WIFI_PERMISSION); // Error is on this line     } }   'this' can't be null, a new String and a static number too  I know there is some similar topic but each are very specific and i didn't find any solution. Can't understand please help me.


Suppose the $GCD$ of integers $a$, $b$, and $c$ is 1 when taken in pairs, i.e., they are relatively prime.  Prove that $GCD(ab,c)=1$.    Any hints would be appreciated.


How to remove a value and key without affecting the original array?

When I run the code below, the listData (original data sources) will also be affected.  How can I improve my code so that downloadData can copy the data from listData and remove the id, createdBy, create_at, updatedBy and updated_at in the array but listData's data is being kept and not being altered?  let downloadData = this.listData.filteredData;  let downloadDataNum = downloadData.length;  for( let i = 0; i < downloadDataNum; i++ ) {   delete downloadData[i].id;   delete downloadData[i].createdBy;   delete downloadData[i].created_at;   delete downloadData[i].updatedBy;   delete downloadData[i].updated_at; }


Why is improving tag coverage considered a "non-substantial edit"?

I had recently begun curatorial work here, to improve tag coverage for   I had a number of edits rejected on the grounds they were not substantial. (I actually have an  for the next week)   regards minor grammatical edits and formatting, but not tagging.  I can understand that adding a tag is a tiny addition, in terms of change-delta.. but I'm seeking various perspectives on why it is a conceptually 'insubstantial' difference.    I'm coming at this from the side of a librarian — I want to see good categorization structure.  Is there any way this can be considered in alignment with community policing standards?    Having learned much during my research of this, I think these are the important condensations of the issue:   Re-Tagging Standards:   Editing 'minor' tags with < 2k reputation , which is a waste. En-masse tagging is itself problematic, as it can . Tag additions where the content already contains such keywords is less-substantial than removing a tag on a question .  while yours is pending Excessive editing forces a question into the status of .


How do I prove $F_{n+1}^2 - F_nF_{n+2} = (-1)^n$ using induction?

$F_n$ refers to the $n$ term of the Fibonacci Sequence.  I think I'm supposed to prove this by induction. I already have the base case. I am at: $\text{F}_\text{k+1}^2 - F_k\text{F}_\text{k+2}  + \text{F}_\text{k+2}^2 - \text{F}_\text{k+1}\text{F}_\text{k+3} =  (-1)^k +\text{F}_\text{k+2}^2 - \text{F}_\text{k+1}\text{F}_\text{k+3}$  So it's probably easier to work backwards. Multiply $-1$ in order to get $(-1)^\text{k + 1}$  and then get:  $-\text{F}_\text{k+1}^2 + F_k\text{F}_\text{k+2}  - \text{F}_\text{k+2}^2 + \text{F}_\text{k+1}\text{F}_\text{k+3} =  (-1)^\text{k+1} -\text{F}_\text{k+2}^2 + \text{F}_\text{k+1}\text{F}_\text{k+3}$  So then bring everything to the left side and mess around with the left side.   $-\text{F}_\text{k+1}^2 + F_k\text{F}_\text{k+2}  - \text{F}_\text{k+2}^2 + \text{F}_\text{k+1}\text{F}_\text{k+3} +\text{F}_\text{k+2}^2 - \text{F}_\text{k+1}\text{F}_\text{k+3} =  (-1)^\text{k + 1} $  And so somehow get this to look more like this: $\text{F}_\text{k+1}^2 - F_k\text{F}_\text{k+2}  + \text{F}_\text{k+2}^2 - \text{F}_\text{k+1}\text{F}_\text{k+3}$  ...except I don't know how to do that.   Thanks


into to java assignment - convert RGB to CMYK JAVA

I had to write a program to convert RGB to CMYK. When I tried running the program I received a java.lang.NullPointerException error. After using a debugger it showed me it had to do with when I called the PrintRGB(RGB) method in the main. I am new to coding and am unsure how to fix this. I googled it and across a few answers but didn't make sense to me since this is my first time coding. Please help me understand this error so I can fix my code. Thank you.      //Reads the data from the file , populates RGB and converts the colors to CMYK.     public static void main(String[] args) throws Exception {         Scanner sc = new Scanner(new File("colors.txt"));         PrintStream ps = new PrintStream("ArrayResults.txt");         int[] RGB = new int[3];         double[] CMYK = new double[4];                while (sc.hasNextInt()) {                 RGB[0] = sc.nextInt();                 RGB[1] = sc.nextInt();                 RGB[2] = sc.nextInt();                  if (validateRGB(RGB)) {                     RGBtoCMYK(RGB,CMYK);                     printRGB(RGB);                     printCMYK(CMYK);                 }                  else{                     ps.println("invalid numbers");                 }              }      }      //Receives the array RGB and determines whether the values are valid.     public static boolean validateRGB(int[] RGB) throws Exception {         Scanner sc = new Scanner(new File("colors.txt"));          for (int i = 0; i < 3; i++) {             if (RGB[i] >= 0 && RGB[i] <= 255) {                 return true;             }         }         return false;      }      //Returns the maximum value in array x which is used to determine white.     public static int maximum(int x[]) {         int maximum, i;          maximum = x[0];         for (i = 1; i < 3; i++) {             if (x[i] > maximum) {                 maximum = x[i];             }         }         return maximum;     }      //Receives array RGB and places the converted values into array CMYK.     public static void RGBtoCMYK(int RGB[], double CMYK[]) throws Exception {         double w;          w = Math.abs(maximum(RGB) / 255.0);         CMYK[0] = (w - (RGB[0] / 255.0)) / w;         CMYK[1] = (w - (RGB[1] / 255.0)) / w;         CMYK[2] = (w - (RGB[2] / 255.0)) / w;         CMYK[3] = 1.0 - w;      }      //Receives array RGB and prints the values in the array.     public static void printRGB(int RGB[]) throws Exception {          for (int i = 0; i < 3; i++) {             ps.println(RGB[i]);         }     }      //Receives array CMYK and prints the values in the array.     public static void printCMYK(double CMYK[]) throws Exception {          for (int i = 0; i < 4; i++) {             ps.println(CMYK[i]);         }      }  }


Branch cut for multi valued complex functions

This question is about the so called 'branch cut' for defining multivalued function continuously on complex plane.For example to define inverse of the function $f(z)=z^2$ we consider the domain of the inverse function as the slit plane $C\setminus(\infty,0]$. The case is also similar when defining Log function.  So my question, is there any sort of 'rule of thumb' which guarantees that removing this sort slit assures you that the domain is right for defining inverse function? Also why we are removing straight lines always? Would we get same results if we have removed any arbitary type of curves from C?


mysql 5.6 gtid replication: is log_slave_updates required?

I've read the  saying log_slave_updates is required.  It makes sense for a general promotion situation.    But is that really still required for something you're intending to be a read only slave that will never get promoted?


How to store key/value pairs of different types in C++

I have a system were there will be some config file that I would like to be able to specify some settings, such as:  size: 10 message: "foo" data: 12,12,39   I can parse these just fine as a container of key value pairs, like a std::unordered_map. However, when it comes time to actually apply these settings, I can't exactly figure out the best way to store the types or convert them as neccessary, let me explain.   I can deduce the type of the value based on the string after the : in my config file. But then I would need to store this type along side the value in my key/value pair. So I would end up with:  enum class TYPE {INT, FLOAT, VEC3, STRING, BOOL, FOO}; std::unordered_map<std::string,std::pair<TYPE,std::string>> params;   And from this, when it comes time to actually use my "value", I would need to run it through a switch statement based on the .first member of the pair, so do something like:  for(const auto& m : params) {     auto key = m.first;     auto value = m.second;      auto type = value.first;     auto theActualValue = value.second;      switch(type)     {     case TYPE::INT:         applyAnIntSetting(key,std::stoi(theActualValue));         break;     case TYPE::STRING:         applyAStringSetting(key, theActualValue);         break;     case TYPE::VEC3:         vec3 val;         /* do some string splitting etc */         applyAVec3Setting(key,val);         break;     } }   (this code is just to illustrate my point).  Is there a simpler/better way to do this? I'm sure I'm missing something.


Is a transit visa required for Ataturk Airport, Turkey (flying Islamabad to Olso)

I am planning to book a flight from Islamabad, Pakistan  to Oslo, Norway on Turkish Airlines. The flight is via Istanbul Atatürk airport.   I have a 10 hours and 30 minutes of stay at Atatürk airport. Do I need a transit visa for staying at airport terminal?   I have a Pakistani ordinary passport and Norway study visa.


I have the following summation: $$\sum\limits_{k=7}^{n}  {k-1\choose 6} $$ and apparently it counts the number of subsets of {1, 2, . . . , n} having size 7.  Why is this?


Difference between Serialized and Non Serialized Object?

I'm trying to undertsand what Serialization and De-Serialization means in Java.  I guess every thing we write in Java language becomes set of bytes when code gets compiled and goes to processor to get execute. After compilation, every thing is turned into machine language or bytes. Correct ..?  So object creation is already a set of bytes which sits in memory to be worked, then what does Serialize and Non-Serialize terms do special to object .. ?  I'm not clear to imagine these two terms in computer hardware..!  Can anyone help ..?  Thanks


SQL Server Service Account Configuration - one account per Server?

Planning to re-create new service accounts for our Sql-Servers, I wondered if - from a security perspective - it maybe better to have one domain account per Service and per Server or to create one domain-account per service only and re-use those on the different servers?   DOMAIN\Service-SSRS DOMAIN\Service-SSAS DOMAIN\Service-SSIS  vs.  DOMAIN\Service-SQL01-SSRS DOMAIN\Service-SQL01-SSAS DOMAIN\Service-SQL01-SSIS DOMAIN\Service-SQL02-SSRS DOMAIN\Service-SQL02-SSAS DOMAIN\Service-SQL02-SSIS etc.   We are doing this because we want to have a uniform and consistent configuration on all servers, something that is not yet in place today. I feel like having single accounts for every server might allow more flexibility and so is counterproductive...  Are there specific pros / cons? Is there a lot of usage of having separated service accounts for every server?


Why did the Architect create the Matrix in first place?

Why did the architect build the matrix?  Also, why did the people in the real world agree to be the part of the matrix?


How many squares actually ARE in this picture? Is this a trick question with no right answer?

This is one of those popular pictures on sites like Facebook. I always see a huge variation of answers such as $8, 9, 16, 17, 24, 28, 30, 40, 41, 52,$ etc., yet I've never seen a definitive answer on any website.    I counted $16$ whole squares ($4$ going down on left side, $4$ going down on right side, $8$ small squares in the centre). With this method the answer could also be $17$ if you want to count the entire shape as one big square.  I can also see the answer being $24$ if you count the smaller squares separately, as if they were floating above the main grid instead of intersecting with it.  Is there a right answer, or is it possible that there is no 'right' answer and it just depends on your counting method?


I am trying to work out how good my particular model is at explaining some observed data.  The problem here is that the observed data takes the form of averaged (mean) values for each of my predictive scores.  When performing a simple correlation, I get a really high R-squared value (and this is repeated for independent data sets), which I am assuming means that there is a consistent relationship between my predictive value and the observed data.  However, if I want to estimate how much of the variance in observed data I explain with my predictive score, how would I do this with averaged observed values?  My underlying concern is that although I have a good correlation in all cases, there may be many underlying factors that also drive my observed data that are simply being 'averaged out' within each category, and as such, my r-squared value is meaningless.  Just as an example, if my underlying observed data was: x<-c(3,4,3,2,1,6,5,7,5,4,9,7,8,10,11) And my predictive score for these values is: y<-c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3)  I get r-squared of 0.911.  However, if I average my observed data (which is all I can measure in my case), I would get: x1<-c((13/5),(27/5),9) y1<-c(1,2,3) R-squared = 0.997  Thus telling me that my predictive score explains almost all of the variation in the observed data, when a better representation above (x vs y) tells me I am explaining 91% of the variation.  Thanks.


How can you reset an expire date for Windows?

This is for Windows 10, and I'm nearing the end of the trial.  I do know that there is a way. If this requires administrative access, how can you get that?


VirtualBox does no longer work on Ubuntu 20.04.1

VirtualBox 6.1 works no longer on my Ubuntu 20.0.4.1 LTS. It says:  Kernel driver not installed (rc=-1908) The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please reinstall virtualbox-dkms package and load the kernel module by executing 'modprobe vboxdrv' as root.  I am using the Ubuntu version of VirtualBox. I tried to re-install VirtualBox with the synaptic package manager, but ran into other problems, meaning VB can no longer be installed. It was working properly until the last kernel update a week ago.


Can anyone please help me the following indefinite integral:  $$\int \log(\sin(x))dx$$  Thanks


If $A = LU$ and $B = UL$, the $A$ and $B$ have the same eigenvalues

If $A = LU$ and $B = UL$, where $L$ is a unit lower triangular and $U$ is an upper triangular matrices, then $A$ and $B$ have the same eigenvalues.   The eigenvalues of $A$ are obtained by solving the equation: $\det(A - \lambda I) = 0$. We have  $$\det(A - \lambda I) = \det(LU - \lambda I)= \det(L(U - \lambda L^{-1})) = \det(L)\det(U - \lambda L^{-1}).$$ Now, from the previous equation, we have $$\det(L)\det(U - \lambda L^{-1}) = \det(U - \lambda L^{-1})\det(L) = \det(UL - \lambda I) = \det(B - \lambda I), $$ thus, we have $$\det(A - \lambda I) = \det(B - \lambda I).$$ Does this means that they have the same eigenvalues?