How can I get my players to ask the right questions so that I can tell them important stuff?

I GM a campaign for a newbie party. For now everything is fine: they roleplay well, they don't solve their problems with violence, etc.  In their scenario, they came from a relatively small city sealed off from the world for a long period of time — one day the seal just vanished and their adventure began. The city was attacked by enormous, highly organised ants, and the City Council sent various parties, including one made up of the player characters, to search for allies. I imagine being cut off from the world for so long, the player characters would be a bit interested in what the outside has to offer them.  They're curious and ask questions about local lore. For example, they met a tribe of evolved ape druids who used the tactic of fleeing and hiding to survive these ants (not ideal allies for fighting, but good for scouts), befriended them, asked them to be allies, and upon learning of their tactics they just carried on with the search. They hunted with them though, exchanged presents, participated in rituals, formed blood bonds and so on, which went really well. They asked about gods, way of life, and so on.  However, the problem is they aren't asking the right questions. They didn't ask about the ants, or about other tribes, and so are missing out on information about those things. I fear them repeating this and continuing to miss out on this information.  (I've spoken to one player: it seems they forgot they came from an isolated community, so next session I'll remind them of this, and explain the standard mind-set of a normal citizen of the City. I'll repeat this on the beginning of every session until they understand -- they are really forgetful and don't write anything down.)  How can I get my players to ask the right questions to find out this information, so they don't miss out altogether?  (Note this is separate to , given they're not having trouble asking questions altogether)


I know that $a \neq b$, then $\frac{a}{b}+\frac{b}{a}$ would not equal to $m$ (an integer) so I set them into one that wasn't a fraction by squaring. So I got $\frac{a^2+b^2}{ab}$. How can I show that $a^2+b^2$ is not divisible by $ab$?


How do I go back to home using Javascript?  I am here...     localhost/Home/Alpha/Beta.aspx   if i use this windows.location("Home.aspx"); it gets an error.  Thanks in advance!


My server is running Apache and I used .htaccess for my basic auth. However, I want my users be able to cancel the auth (log out) with a button. Is it possible and how to do that?


Show that the heisenberg group is nilpotent

This time I want to show that $H(R)$ ( the heisenberg group attached to a conmutative ring $R$ is nilpotent). But I dont know how to proceed, I was thinking in first serch the normal subgroups if the Heisenberg group and then try to figure out the quotient group of that, from there get the centre, etc, but I dont think it would be a good idea (In fact I thought to use Gap, but I dont know how to ask this questions in Sage), Is there a better way to do this? Thanks a lot.   For me   $H(R) = \left \{ \begin{pmatrix} 1 & a & c \\ 0 & 1 & b \\ 0 & 0 & 1 \end{pmatrix}: \ \ a,b,c \in R \right \}$  For a conmutative ring $R$


convergence on sequences using cauchy's criterion

I have the following sequence   $$x_{n+1}=\frac12\left(x_n+\frac2{x_n}\right),~n>1,~x_1=1$$  How can I prove the sequence is Cauchy, and get the limit?


I am trying to make a share on linkedin link on my lightning component of community like this :    <a href="https://www.linkedin.com/shareArticle?mini=true&amp;url=my_url_here;&amp;title="+{!v.SingleBlog.Title__c}+"&amp;summary=sdfsjf"   target="_new" >  Linkedin      </a>    But When I am saving this its giving me an error :  Getting   Field Integrity Exception :  Failed to save undefined: markup://c:BlogDetail:70,162: ParseError at [row,col]:[71,162] Message: Element type "a" must be followed by either attribute specifications, ">" or "/>".:    I know its because of the variable {!v.SingleBlog.Title__c} whose value I want to append in share url at runtime.   How to put this variable's value in url?


SQL Server 2016 SP1 - Unable to execute R code

I have SQL Server 2016 SP1 installed, with R Services. I believe I configued everything based on what I understood to be correct and the output below.     I have restarted SQL Server services and the Launcher services. When I attempt to execute the following test code:  EXEC sp_execute_external_script     @language =N'R',       @script=N'OutputDataSet<-InputDataSet',         @input_data_1 =N'SELECT 1 AS hello'       WITH RESULT SETS (([hello] int not null));     GO      I get the following error:  Msg 39021, Level 16, State 1, Line 1 Unable to launch runtime for 'R' script. Please check the configuration of the 'R' runtime. Msg 39019, Level 16, State 1, Line 1 An external script error occurred:  Unable to launch the runtime. ErrorCode 0x80070057: 87(The parameter is incorrect.).   If it helps, my rlauncher.config files looks as follows:  RHOME=D:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\R_SERVICES MPI_HOME=C:\Program Files\Microsoft MPI INSTANCE_NAME=MSSQLSERVER TRACE_LEVEL=1 JOB_CLEANUP_ON_EXIT=1 USER_POOL_SIZE=0 WORKING_DIRECTORY=C:\Temp   I'm at a bit of a loss to determine how to fix this.


What file formats, file names, image sizes, and meta tags should my website have for its icon?

I looked through my website access log files and I saw lots of requests for icon files (with counts):  49146 /apple-touch-icon-precomposed.png 45836 /apple-touch-icon.png 40287 /favicon.ico  6752 /apple-touch-icon-120x120-precomposed.png  6669 /apple-touch-icon-120x120.png   886 /apple-touch-icon-152x152-precomposed.png   876 /apple-touch-icon-152x152.png   318 /apple-touch-icon-76x76-precomposed.png   317 /apple-touch-icon-76x76.png    71 /apple-touch-icon-57x57-precomposed.png    70 /apple-touch-icon-57x57.png    46 /apple-touch-icon-114x114-precomposed.png    44 /apple-touch-icon-114x114.png    30 /apple-touch-icon-72x72-precomposed.png    30 /apple-touch-icon-72x72.png   How should I create icon files to satisfy all these requests?   What file formats, and image sizes should I create?   What meta tags should I include in my pages for site icons?  I'd like my site's icon to show up:   In the browser's URL bar When a user bookmarks my site When my site is added to the mobile home screen on iPhone or Android When my site is shared on Facebook and other social media sites


Reference request: Standard textbook for first-order predicate logic in english

I am writing my bachelor thesis in english, but I have studied logic in my different native language. Since a rely on elementary results from first-order predicate logic (especially satisfaction in structures), I should reference the reader to a textbook for details.   Is there a standard textbook that starts with elementary propositional logic and goes to Incompleteness theorems?


Grub Customizer doesn't change image background

I use  the latest version of Grub Customizer (3.0.2) and Ubuntu 12.04. On appearance settings I changed the background image and the font, but once I reboot the system they don't appear; there's always the default Ubuntu background image and the font seems a bit changed but not as expected. I tried to resize and crop the image as described here:  but it doesn't work in any case. On /etc/default/grub: # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT="0" #GRUB_HIDDEN_TIMEOUT="0" GRUB_HIDDEN_TIMEOUT_QUIET="true" GRUB_TIMEOUT="10" GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL="console"  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE="640x480x15"  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID="true"  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"  export GRUB_MENU_PICTURE="/home/attilio/Immagini/grub/1366.jpg" export GRUB_COLOR_NORMAL="white/black" export GRUB_COLOR_HIGHLIGHT="light-cyan/black" GRUB_FONT="/boot/grub/unicode.pf2"  Thank you very much in advance.


I was tutoring today and came across a question that I was incapable of explaining sufficiently. It stems from the following false string of equalities... $$-12=(-12)^1=(-12)^\frac{6}{6} =((-12)^6)^\frac{1}{6} =((-1)^6 12^6)^\frac{1}{6}=(12^6)^\frac{1}{6}=12$$ If anyone can explain the false step (Im assuming the third “=“), why this string of equalities is wrong, and how to avoid making it that would be most helpful for when I need to explain it again.


mySql - find non-Ascii character in html

I'm trying to find all non-asci characters I have in my DB in a specific table and column. In that column are stored Html description, and in some of them I've exotic or non-existing characters (for example:  Hà¶ganà¤s ).  I'm triyng to match them with this query:  SELECT * FROM project_version WHERE description REGEXP '[^()\x00-\xFF\,\.-\<\>="\' /:;&=]'   But I think I'm missing something, cause it returns all of my records. Does anyone any advice?   Thanks in advance


I am trying to port some code from an older version of QGIS. I have managed to get the map setup fairly to my liking, and can export some content via a command like   iface.mapCanvas().saveAsImage("example.png")   However, I want to export to PDF, and also add a legend for my graduated color scale.  I've been rummaging around the documentation online for some time but I can't figure out how these new classes work together.  @JoshC helped me to understand that I need to use the QgsLayout and QgsLayoutExporter classes, not mapCanvas, however I'm not clear on how to use those classes to get out a PDF with a legend.


How to inform if Javascript is disabled in the browser

I want to inform a user if javascript is disabled in the browser and tries to access my website. My information will be like: "Please enable javascript in your browser for better use of the website". So how to do this?


Is there a way of knowing if a certain path is a directory path

I have a string var (path) that represents a path:  printfn "Please enter a path" let path = System.Console.ReadLine()   Is there a way of knowing wheter this path is for a directory or a regular file?


Flask update divs created using a for loop using jquery

I am generating some bootstrap cards using for loop on my flask template. On each card, there is a button which runs an ajax query. What  I want to do is show the content retrieved on the card body. The ids of the card body are dynamic since I am generating them via a for loop.

Results - Men

           {% for gen in ev_list %}             {% for evt in gen.boys %}

                     {{ evt }}                     <button class="btn btn-outline-secondary evt float-right" data-event="{{ evt }}" data-id="{{ meet.meetid }}" data-gender="-men">                                            </button>

Special title treatment

With supporting text below as a natural lead-in to additional content.

             {% endfor %}           {% endfor %}

   jquery:  $('.evt').on('click', function() {         var event = $(this).attr('data-event');         var id = $(this).attr('data-id');         var gender = $(this).attr('data-gender');           var p_text = $('#result_'+$(this).attr('data-event')).text();         console.log('#result_'+$(this).attr('data-event'));         console.log(p_text);          $.ajax({             type: 'POST',             url: '/process',             data: JSON.stringify({ "event" : event, "meetid":id, "gender":gender} ),             contentType: "application/json; charset=utf-8",             dataType: "json",         })         .done(function(data){             $('#result_'+$(this).attr('data-event')).text(data);         });     });   The html on the browser looks as follows:    The console output on the browser from the js script is as follows:    Although the id of the P tag and the id that I am targeting looks similar it seems that the correct element is not picked up by jquery. How can I fix this?


I would like to read a graph from the input file and store it in list of arraylist.First list of the input file contains no.of vertices followed by number of edges. then the next line contains edges of the graph. I tried the following code and i'm getting error which is added at the end  import java.io.File; import java.util.Scanner; import java.util.ArrayList; import java.util.List; public class ReadGraph {      public static void main(String[] args) {          try {             int vertices,edges;             Scanner input = new Scanner(new File("in.txt"));             vertices = input.nextInt();             edges = input.nextInt();             List<Integer>[] tree = new List[vertices];             for (int i = 0; i < edges; i++) {               tree[input.nextInt()].add(input.nextInt());             }             System.out.println(vertices);             System.out.println(edges);             input.close();             System.out.println(tree);          } catch (Exception ex) {             ex.printStackTrace();         }     }  }   Error  java.lang.ArrayIndexOutOfBoundsException: 2 at ReadGraph.main(ReadGraph.java:30)


What does Anakin Skywalker look like as a ghost in canon?

Under Disney canon, what does the Force ghost Anakin Skywalker look like? The 19 year old Anakin, before he was consumed and "killed" by Darth Vader, or the 45 year old un-Mustafar'ed version of Anakin had he remained in the light?


I want to install g++. But I got error  sanket@sanket-Inspiron-N5110:/opt/objdir$ sudo apt-get install g++ Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  g++ : Depends: g++-4.8 (>= 4.8.1-4~) but it is not going to be installed E: Unable to correct problems, you have held broken packages.   Please Help me


Non Anglo and older grad school applicant

I am 49 years old, Psychologist with MA in Psych, PhD in Public Health and postdoc at University of Toronto. However,all my academic background here stated is from Brazil and I have been facing some stumbling blocks to enter Academia in Canada. Therefore, I decided to apply for a Masters in Counselling. Would my age and an already extensive academic past with a long research history [non North American] hurt my application? lastly, would I face institutionalized racism due to my non-anglo surname and academic history? My GPA's are: BA= 8.1 ; MA= 9,1 ; PhD= B. Thank you!


Where could I find the dll/exe/process that handles the Bluetooth tray icon?

Where could I find the exe/process/dll that handles this colored tray icon of Bluetooth tray icon.    I am very customized person, so I want to customize it, break it open and replace those resources with my redesigned ones to make that Bluetooth icon in line with that other Windows 10 tray icons. Where I could find it? Thanks


How do we construct the coslice category $C / \bf{C}$ given $\textbf{C}/C$ and prove that the two are equal?

The coslice category $C/\bf{C}$ under an object $C \in \bf{C}$ has as objects arrows $f$ in $\bf{C}$ such that $\textbf{dom}(f) = C$ and as arrows, arrows $a: f \to g$ which are arrows $a$ in $ \bf{C}$ such that $af = g$.  So I want to construct this coslice category from the slice category $\textbf{C}/C$ and the $\textbf{op}$ operator (opposite or "dual" categories).  $\textbf{C}/C$ is the same thing as $C/\bf{C}$ except in the definition $\textbf{cod}(f) = C$ and $f = ga$.  So my guess is that $\textbf{C}^{\text{op}}/C = C/\textbf{C}$ since $(\textbf{C}/C)^{\text{op}}$ would first discard some arrows, namely those strictly coming from $C$ (not going to).  But intuitively we need take the $\textbf{op}$ of the whole thing: $(\textbf{C}^{\text{op}}/C)^{\text{op}}$ since otherwise all of our objects would be arrows pointing at $C$ not under $C$.  Therefore that is my final guess.  Now what would suffice as a proof that the two are equal: $(\textbf{C}^{\text{op}}/C)^{\text{op}} = C/\bf{C}$?


Why no zoom lenses with a maximum aperture wider than f/2.8?

I can understand that a zoom lens with a maximum aperture wider than f/2.8 would be difficult and costly, but it seems like something pros would kill for.  Surely it can't be more expensive (if its possible) than some of the $10k+ lenses and they exist to sell in limited quantities.  Is it just near impossible or is there another reason we don't see zoom lenses faster than f/2.8?


Does viewing own profile count to profile views?

I have not seen an answer to this in other questions.  So, if I visit my own page over and over with an interval of, let's say, 60 min. will my profile views counter grow?  Is the counter for unique views only?


How to divide scattered points among multiple curves?

I have the following scattered points graph:    To me, it seems that the points describe 2 (maybe 3) logarithmic curves. Is there a way to say which point belongs to which curve?


How to move /var to another existing partition?

I have a / partition which contains /var and is too small. I have another existing partition with enough space.  Here is my df:  File system          Size. Occ. Avai. %Ful. Monté sur /dev/sda1             5,0G  4,5G  289M  95% / tmpfs                 242M     0  242M   0% /lib/init/rw udev                   10M  2,7M  7,4M  27% /dev tmpfs                 242M     0  242M   0% /dev/shm /dev/sda2              15G  406M   14G   3% /home   How can I move the /var folder from sda1 to sda2 ?


Can I mention professors' names in the statement of purpose?

For PhD applications, I have mentioned that I am interested in some research areas. Besides, I am thinking about mentioning some professors' names, so that it shows I have read their websites and I am not just sending out generic statements applicable to many schools.  But is it good to mention some professors' names in the statement of purpose, if I don't know them personally? In what cases is it good, and in what cases it isn't?  For example, is it good to only mention    those whose research directions are aligned with my research interests, or/and those whose books or notes I have heard of, or better, might have read some parts of, or/and those who are already established and famous (such as having certain titles), or/and those that are directing the PhD graduate programs, or/and those that are heads of the departments?    What will other professors who are not mentioned think? How will you do, if it were you?


How to remove duplicates from object list based on that object property in c#

I've got a problem with removing duplicates at runtime from my list of object.  I would like to remove duplicates from my list of object and then set counter=counter+1 of base object.  public class MyObject  {    MyObject(string name)     {       this.counter = 0;       this.name = name;    }    public string name;    public int counter; }  List<MyObject> objects_list = new List<MyObject>(); objects_list.Add(new MyObject("john")); objects_list.Add(new MyObject("anna")); objects_list.Add(new MyObject("john")); foreach (MyObject my_object in objects_list)  {     foreach (MyObject my_second_object in objects_list)      {         if (my_object.name == my_second_object.name)          {            my_object.counter = my_object.counter + 1;            objects_list.remove(my_second_object);         }     } }   It return an error, because objects_list is modified at runtime. How can I get this working?


I am getting lots of "Underfull \hbox" warnings that point to the *.bbl file. It looks like these messages appear only when URLs are very long, like in the below example:  @techreport{nistguidesec,   author    = {Wayne Jansen and Timothy Grance},   title     = {Guidelines on Security and Privacy in Public Cloud Computing},   month    = {January},   note     = {Draft Special Publication 800-144. Available at \url{http://csrc.nist.gov/publications/drafts/800-144/Draft-SP-800-144_cloud-computing.pdf}}, }   In the produced PDF text is correctly hyphened and links are correctly split over several lines (I am using hyperref package)  How can I avoid annoying warning messages about "underfull \hbox" pointing to bibliography?


I tried to install RStudio after installing R in Ubuntu. When I clicked to install via Ubuntu software, clicking the install button does nothing. But sometimes when I click it, it starts loading and after a while it says rstudio installed. But it's not really installed.   So I installed it via terminal using:  $ sudo dpkg -i rstudio-0.99.902-i386.deb  Selecting previously unselected package rstudio. (Reading database ... 175645 files and directories currently installed.) Preparing to unpack rstudio-0.99.902-i386.deb ... Unpacking rstudio (0.99.902) ... dpkg: dependency problems prevent configuration of rstudio:  rstudio depends on libjpeg62; however:   Package libjpeg62 is not installed.  rstudio depends on libgstreamer0.10-0; however:   Package libgstreamer0.10-0 is not installed.  rstudio depends on libgstreamer-plugins-base0.10-0; however:   Package libgstreamer-plugins-base0.10-0 is not installed.  dpkg: error processing package rstudio (--install):  dependency problems - leaving unconfigured Processing triggers for shared-mime-info (1.5-2) ... Processing triggers for gnome-menus (3.13.3-6ubuntu3) ... Processing triggers for desktop-file-utils (0.22-1ubuntu5) ... Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160415-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for mime-support (3.59ubuntu1) ... Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ... Errors were encountered while processing:  rstudio   What are the steps to rectify this error?


How to start in a specific directory after ssh login?

I have a shortcut as follows:  Exec=gnome-terminal -e 'sshpass -p "mypass" ssh myuser@123.456.789.214'  Question: how can I directly change the starting directory, eg to /var/log? I tried myuser@123.456.789.214:/var/log but that did not work.


Can we add the triple backticks feature for code formatting in markdown?

Disclaimer: My request is about using the same markdown format used in GitHub for code blocks and syntax highlighting.  In most recent markdown formatters, other than the 4 space indentations, we can create code samples by  before and after the code block, for example:  ``` this would become a code block ```   On the top of my head, I can think of 2 advantages:  Line length  Using backticks instead of the current format would allows us to gain 4 extra characters for each line of code inside the editor. I find this really advantageous as the editor currently allows 79 characters per line and 78 when the scroll bar is showing on the right. This is just around the 80 character limit which most programming languages suggest. Thus giving us back those 4 extra characters would be quite nice in my opinion.  I'm currently using Firefox on Ubuntu, but I don't believe the character count per line would be much different on a different browser/OS, probably 1 extra or less character per line.  Syntax Highlighting and ease of use  Also, I find this style of formatting much simpler for use, especially when explicitly specifying the language for syntax highlighting.   Currently in SE, when we need to specify the language, we need to prepend the code block with the following unindented line <!-- language: js --> followed by empty line. Example:  <!-- language: js -->      // JavaScript code   In contrast, using the triple backticks format, we would use the much simpler:  ```js // JavaScript code ```   In my opinion, the format of the latter is much easier to remember.  P.S. I'm not asking to replace the current format with backticks, I'm asking if we can add this feature thus having 2 ways of formatting code.


how to get Product name using product2 from opportunitylineitems

here is my code in which i am trying to get the product name from opportunity line item but its returning back NULL value. can anyone please help me to get that product name. I can get id from product2 but i want the name of product so that i can abbreviate it and can store it in Order_Name__c field of orderItem. After adding the product only i am firing this trigger.     public class Procuct_Adding_To_Order{  public static void productOrder(List<OpportunityLineItem> oli){     system.debug('-----------------------');      set<id> prodset = new set<Id>(); for(OpportunityLineItem item : oli) {   prodSet.add(item.product2id); } // collect products Map<Id, product2> prodMap = new Map<Id, Product2>([select name from product2 where id in :prodSet]);   // create a map for OLIid & corresponding Product Name Map<Id, string> OLIprodMap = new Map<Id, string>();  for(OpportunityLineItem item : oli) {  OLIprodMap.put(item.id, OLIprodMap.get(oli.product2id).name); //getting Error in this line. }      set<Id> setOppId = new set<Id>();      for(OpportunityLineItem obj: oli){          setOppId.add(obj.OpportunityId);      }      list<opportunity> needed = [Select Master_Opportunity__c from opportunity Where Opportunity.id =: setOppId];         List<OrderItem> orderIt = new List<OrderItem>();     for(Order ord: [Select id from Order where opportunityId =: needed[0].Master_Opportunity__c])       {        for(OpportunityLineItem o : oli)        {           OrderItem op = new OrderItem();          op.Opportunity_del__c = needed[0].Master_Opportunity__c;          op.orderId = ord.id;         op.Order_Name__c = o.product2Id;         system.debug('-----------------------3333333333333333333333'+ o.Product2Id);         op.PriceBookEntryId = o.PriceBookEntryId;         op.Quantity = o.Quantity;         op.UnitPrice = 100;         orderIt.add(op);            }          }     upsert orderIt;  } }


Unexpected result using ModelBuilder in batch?

I am running a model which I created with ModelBuilder at 10.3. The model is supposed to make a selection by attribute on a feature layer, and use that layer to clip a raster. The model is working fine when I run it, however if I try to use it in batch mode it gives unexpected results: I have many files with the same extent and content as the first line of the loop (of the batch).  The parameters of my models are:   the input feature layer against which a selection is specified the input raster (.BIL)to be clipped with the selected feature the SQL expression for the selection (of the type "FIELD" = 'value') the output folder and filename (with .BIL extension)   Basically, in the batch window the feature and raster parameters are fixed, I am only changing the SQL expression to point a different 'value', so that the output raster is clipped on different areas each time, and the filename name of the output.  Below is my model:


What to reply to a person saying "Good Morning" when my time zone is different?

When I'm talking to a person in opposite time zone and the person greets with "Good morning" or Good evening/afternoon as per his time, is it ok to reply "Good afternoon" (as per my time-zone) when he said "Good Morning", and similarly replying as per my time zone, at other times?


How to calculate Network Service Areas in QGIS?

Is there any way in QGIS to apply service area buffers e.g if I have a point on a map I wish to show the service coverage of 1 mile, 2 mile, 3 mile, breaks using  the road network?


I am stuck with this utf-8 loading. Previously, when loading utf-8 adding this mysql_query('SET NAMES utf8'); worked but this time its not working. This is the code and some photos:  <?php } else {?>     <form action = "" method = "post">
             <?php                 $korisniklog = mysql_fetch_array(mysql_query("SELECT * FROM `korisnici` WHERE `Ime` = '$klogiran'"));                 if($korisniklog == '0')                 {                     $logiran = false;                     header("Location: index.php");                 }                 mysql_query('SET NAMES utf8');                 $imeprezimelog = $korisniklog['ImePrezime'];             ?>             Добредојдовте назад <?php echo $imeprezimelog; ?>             <input type="submit" name="odjava" value="Одјави се" class = "loginboxovi"/>
     </form>  <?php } ?>   This is the row in mysql:  And this is how it shows on web:


An example to show that convergence of Cesaro sum to $0$ does not imply the original sequence converges to $0$.

I'd like construct a non-negative sequence $\{a_{k}\}_{k=0}^{\infty}$ with $a_{0}=0$ such that the Cesaro sum $\frac{1}{n}\sum_{k=0}^{n-1}a_{k}\longrightarrow 0$ but $a_{n}$ does not converge to $0$.   I have a really bad attempt:  Define $a_{0}=a_{1}=0$, and $a_{k}:=\log(\log(k))$ for $k\geq 2$, then $a_{k}\longrightarrow\infty$. But $$\dfrac{1}{n}\sum_{k=0}^{n-1}a_{k}=\dfrac{\log\Big(\prod_{k=2}^{n-1}\log(k)\Big)}{n}$$ and Wolframalpha told me that this series converges to $0$ as $n\longrightarrow\infty$.  However, I have no idea about how to show this convergence to $0$. Also, I wish to have a sequence as simple as possible, since at some stage I need too how $f(k):=a_{k}$ is positive semi-definite.   Is there any simpler example?   Thank you!


Apt-get update with an @ in password error

I want to update ubuntu 11.04 throught apt-get. So I added the following lines in apt.conf  export http_proxy=http://username:password@proxyserver.net:port/ export ftp_proxy=http://username:password@proxyserver.netport/  export http_proxy=http://deepak:Deepak@123@12.1.1.1:3128   My question is: how do I insert special characters to a username or password?  For instance: my password for proxy is Deepak@123 and it is getting an error.


Find the App_Data path from a WCF service

I'm trying to write a WCF function that gives me back the URI of an image in the App_Data folder so I can display it in a silverlight application.  How do I get the location of the App_Data folder so that I can search inside it to find the Image I want to display?


Can Fallback Strategy be used to reroll a natural 1 on an attack?

The spell  has this condition:     you may reroll one attack roll, combat maneuver check, or skill check   before the result of the roll or check is known.   It seems at first glance that the "result" of rolling a natural 1 on a d20 for an attack roll is always known because a natural 1 is always a miss. My question is, does this mean that Fallback Strategy (and all spells with equivalent wording, like Lucky Number) cannot be used to reroll a natural 1 attack roll?


When I try to add this line of code :  onclick="document.getElementById('part3').style.display='';return false;"   Into a link it disables the other function for some reason.. This is the code in which i would like to add the above code:  a href="javascript:DecreaseQuantity('PROD_VK_1.4')">   Works fine until i add the code, then only the onclick function works not the javascript part.  How can I fix this?


Make TimePickerDialog wait for input; Code after runs results into NullReferenceException

I got an issue I that have been struggling already for a while. I created a Fragment class, TimePickerFragment, that extends DialogFragment which is being called in the MainActivity to show the Dialog. After the TimePicker is shown it should wait for user input, otherwise the code after it runs directly, starting an IntentService. This will then results in a NullReferenceException because enteredTime is null. Btw, I am calling the the button.PerformClick() because I directly want to show the the TimePicker after a user clicked on a notification.  I'm fairly new to Android, and have only decent knowledge in Java. There might be something that I am missing completely because simply don't know. Thanks!  The MainActivity is set up like this:  public void onCreate(Bundle savedInstanceState) {      if (btnShowTimePickerDialog != null) {             btnShowTimePickerDialog.setOnClickListener(new View.OnClickListener() {                 @Override                 public void onClick(View v) {                     showTimePickerDialog(v);                 }             });         } final ResultReceiver verifyTokenReceiver = new ResultReceiver(new Handler()) {             @Override         protected void onReceiveResult(int resultCode, Bundle resultData) {                if (resultData == null) {                     return;                 }              if (resultCode == Keys.SUCCESS_CODE) {                     //TODO: GET VALUES FROM TIMEPICKER                 if (previousActivity.equals(Keys.MAINSERVICE_CODE)){                      btnShowTimePickerDialog.performClick();                       final Intent createSessionIntent = new Intent(MainActivity.this, CreateSessionService.class);                     createSessionIntent.putExtra(Keys.RECEIVER_KEY, createSessionReceiver);                     createSessionIntent.putExtra(Keys.TOKEN_KEY, token);                     createSessionIntent.putExtra(Keys.PREFERENCE_KEY, preference);                     createSessionIntent.putExtra(Keys.ACTIVITY_KEY, previousActivity);                     createSessionIntent.putExtra(Keys.TIME_KEY, enteredTime);//insert time startService(createSessionIntent); }   public void showTimePickerDialog(View v) {     FragmentManager mFragmentManager = getSupportFragmentManager();     TimePickerFragment tpf = new TimePickerFragment();     tpf.show(mFragmentManager, "TimePickerDialog");   }  The TimePickerDialog has been created in a Fragment:  public class TimePickerFragment extends DialogFragment implements TimePickerDialog.OnTimeSetListener { TimePickerDialog.OnTimeSetListener mCallback; public TimePickerFragment() {  super(); }  public Dialog onCreateDialog(Bundle savedInstanceState) {     // Use the current time as the default values for the picker      final Calendar c = Calendar.getInstance();     int hour = c.get(Calendar.HOUR_OF_DAY);     int minute = c.get(Calendar.MINUTE);      // Create a new instance of TimePickerDialog and return it     return new TimePickerDialog(getActivity(), this, hour, minute, DateFormat.is24HourFormat(getActivity())); }   @Override public void onTimeSet(TimePicker view, int hourOfDay, int minute) {     ((MainActivity)getActivity()).SomeRandomMethodToGetTheEnteredTime(hourOfDay, minute); }   @Override public void onAttach(Activity activity) {     super.onAttach(activity);      // This makes sure that the container activity has implemented     // the callback interface. If not, it throws an exception     try {         mCallback = (TimePickerDialog.OnTimeSetListener) activity;     } catch (Exception e) {         throw new ClassCastException(activity.toString() + " must implement TimePickerDialog.OnTimeSetListener");     } }  @Override public void show(FragmentManager manager, String tag) {     super.show(manager, tag); }   }


Running processes: "perl /tmp/dd" - what is this?

I have a LAMP server with about 50 virtual domains, and am using Webmin/Virtualmin to manage the server.   When looking at running processes (top) I see one domain's username is running a couple of perl processes, and ps gives me the full command line:  perl /tmp/dd.  Note that this domain is a wordpress installation.  There is no dd file in the /tmp directory, so I can't tell what it's doing.  These processes have been running for about 3 days.  I can't kill them with standard kill [pid], but must use kill -9.   Is this an exploit, or is it most likely part of webmin/virtualmin's maintenance scripts?


Finite automaton that recognizes the empty language $\emptyset$

Since the language $L = \emptyset$ is regular, there must be a finite automaton that recognizes it.  However, I'm not exactly sure how one would be constructed.  I feel like the answer is trivial.  Can someone help me out?


I want to get random rows from a table in SQL. I'm trying to do this in C# but i see i will have a problem with IDs and I would need to make another column called row number to order IDs.   protected void ibtnPrintInventory_Click(object sender, ImageClickEventArgs e) {     Random rng = new Random((int)DateTime.Now.Ticks);     var inv = Inventario.GetDefaultConfigs();    int filtro = inv.Filtro;    int localizacoes_max = inv.LocalizacoesMax;     int userID = Utilizador.GetUserID();      int armazemID = Armazem.GetArmazemByUserID(userID);     // Total rows to apply random    int localizacoes_armazem = Inventario.GetInventarioCount(armazemID);     // Loop Flag    int etiquetas_soma = 0;     int[] localizacoes_array = new int[localizacoes_max];     while(etiquetas_soma <= filtro)    {        for (int i = 0; i < localizacoes_max; i++)        {            localizacoes_array[i] = rng.Next(1, localizacoes_armazem);        }    }  }   I was wondering if this is possible to do directly in SQL, a query that returns a number of rows based on a variable from a table and selects random rows.  EDIT.  The objective is to get random rows from a table and sum those rows column values and if the sum is higher than the filter it will break the loop.  Also I have to use a parameter to how many rows i want to get


JS Function not called from dynamically loaded elements

I've a
, in which I'm adding <input> and an  dynanically using jQuery.  Like this:
 is getting filled when addServicePanel() is called:  function addServicePanel() {     var wrapper = $(".main_wrapper"); //Fields wrapper     var add_button = $(".add_ele_button"); //Add button ID     var x = 1; //initlal text box count     $(add_button).click(function (e) { //on add input button click         e.preventDefault();         if (x < max_fields) { //max input box allowed             $(wrapper).append('

                                 Pipeline
                                     <input id="pipeline" name="pipeline" type="text"/>
                                     Add Board (+)

             '); //add input box         }     }); }   Function I've already written to work with .add_field_button:  function addSubPanel() {     var max_fields = 40; //maximum input boxes allowed     var wrapper = $(".input_fields_wrap"); //Fields wrapper     var add_button = $(".add_field_button"); //Add button ID      var x = 1; //initlal text box count     $(add_button).on("click", this, function (e) { //on add input button click         alert(" cliked"); // THIS IS NOT GETTING CALLED         e.preventDefault();     });  }   When I click on the  tag, I want a function to be called, which I've already written in my js file.  Issue I'm facing is that fucntion is not getting called when I click .  I think it is because on page load, the element is not rendered yet, so nothing is binded with that function.  How can I fix it?  Thanks


can someone show me how I can add conditons to my code to if file does not exits, it cannot go further however if file exits then they add can?  This is what I have so far?  def students():   enter = input("Enter text file: ")   print ("File found")    f=open(enter,'a+')   t=' '.join(f)   Username = input("Enter Username: ")   f.write(Username+",")   password = input("Enter password:")   f.write(password)   f.write(t)   f.write('\n')   f.close()


I've just come across the << command, used like so:  cat > outfile.txt <<EOF Multi-line content that will be written to outfile.txt EOF   Now, I've no idea what this is called, but I'd quite like to know it's name, primarily so I can go and search and find out more about its syntax. Sadly, Googling for "<<" just doesn't work.


Cant weld object edges on polygonal design (Illustrator)

I created a polygonal logo using many shapes, which I'm exporting for web in SVG format.  My problem is that, although the edges of each polygonal face/shape is at the same position on illustrator (snapped), when I export for web, a small space appears in between the edges.  In Illustrator, at max zoom:    On the web browser:    It seems that each face is disconnected, and that there is a gap between them. On the second image, you can see a bit of white beneath it because the white part extends underneath the shape. You can see it live at   How can I solve this? I am using Illustrator CS6. Can I attribute facets to the same shape and color them individually?


How many distinct postitive integers satisfy the identity $x+y+z+w = 100$?

Let's say we have $4$ positive integers $x$, $y$, $z$, $w$ that satisfy the property： $$x+ y+ z+ w = 100$$ How many possible distinct answers are there?


I'm trying to change my server's timezone.  I was following  tutorial but I can't get it to change to Pacific Standard Time.  ln -sf /usr/share/zoneinfo/EST localtime   Will work, but   ln -sf /usr/share/zoneinfo/PST localtime   will not.  What's going on here?


Why does this Java program has infinites loops?

Why does the boolean conditions like condition always return true ? Even if the variable reponse is equal to constants OUI or NON;          final String OUI = "O";        final String NON = "N";        String reponse = OUI;        // some code was omitted        do {         // some code was omitted         // true        boolean condition = false;         do {            System.out.println(MSG_SOL_TRONCON);            reponse = mScanner.nextLine();            // Debug            System.out.println("Reponse:" + reponse + ":fin");            /*            // Boucle infinie, problème avec la condition            // Infinite Loop            condition = !((reponse == NON) || (reponse == OUI));            System.out.println("Condition : " + condition);            if (condition) {                System.out.println(MSG_ERR_TRONCON);            } // if            */        } while(condition);      } while (reponse != NON);


Combining various AC-providing clothing and armor

Are there any rules for combining different clothing/armor for providing AC? For example, can an adventurer wear full plate and bracers and get the AC bonus from both? Can an adventurer wear a Cloak of Protection over plate? Can an adventurer wear a helm or crown and also plate armor, or does the plate armor include a mandatory helmet and preclude any other headwear?   I understand that ultimately this is up to the DM and what makes sense, but I would appreciate if there were some rules I could use as a foundation for rulings.


The Internet Just Disappeared on its own [Ubuntu 20.04 LTS]

Using an Ubuntu VM on VMWare. The internet just stopped working out of the blue and even experts don't know why. Some stats: sudo lshw -C network   *-network DISABLED                description: Ethernet interface        product: 82545EM Gigabit Ethernet Controller (Copper)        vendor: Intel Corporation        physical id: 1        bus info: pci@0000:02:01.0        logical name: ens33        version: 01        serial: 00:0c:29:d7:ef:66        size: 1Gbit/s        capacity: 1Gbit/s        width: 64 bits        clock: 66MHz        capabilities: pm pcix bus_master cap_list rom ethernet physical logical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=7.3.21-k8-NAPI duplex=full latency=0 link=no mingnt=255 multicast=yes port=twisted pair speed=1Gbit/s        resources: irq:19 memory:fd5c0000-fd5dffff memory:fdff0000-fdffffff ioport:2000(size=64) memory:fd500000-fd50ffff   Tried  ,  and  (from this forum) Can't find ifup and ifdown commands installed  I also reset the network settings on my VMWare but that was of no help. It is very urgent and I would be grateful for any help!


Booming Blade says the following:  If the target willingly moves 5 feet or more before (the start of your next turn), the target takes 1d8 thunder damage, and the spell ends.  Is “willingly” an actual game term? Or is it just meant to be taken for the obvious meaning, that being compelled to move magically, or being shoved doesn’t count? What are some other examples of “Willingly” being used in D&D?


$$\sqrt{1+\sqrt{2+\sqrt{3+\sqrt{4+\sqrt{5+\sqrt{ \dots }}}}}}$$   I don't understand how to solve that. I mean I don't know where to begin. Tell me if this infinite radical has a solution or converge to a number. Thanks.


Why is it not true that if $\Phi \models \exists x \phi$ then there is a term $t$ with $\Phi \models \phi \frac{t}{x}$?

On  in XI Free Models and Logic Programming of Ebbinghaus' Mathematical Logic:  In general, the following statement is false: (*)  If $\Phi \models \exists x \phi$  then there is a term $t$  with $\Phi \models \phi \frac{t}{x}$ We  get  a  counterexample for  $S  = \{R\}$  with unary $R$,  $\Phi = \{\exists x Rx\}$,  and  $\phi  =  Rx$.  In the counterexample, why if $\{\exists x Rx\} \models \exists x R x $, then there is no term $t$   with $\{\exists x Rx\} \models R t $? Thanks.


How many 6-letter permutations can be formed using only the letters of the word, MISSISSIPPI? I understand the trivial case where there are no repeating letters in the word (for arranging smaller words) but I stumble when this isn't satisfied. I'm wondering if there's a simpler way to computing all the possible permutations, as an alternative to manually calculating all the possible 6-letter combinations and summing the corresponding permutations of each. In addition, is there a method to generalize the result based on any P number of letters in a set with repeating letters, to calculate the number of n-letter permutations?  Sorry if this question (or similar) has been asked before, but if it has, please link me to the relevant page. I also apologize if the explanation is unclear, or if I've incorrectly used any terminology (I'm only a high-school student.) If so, please comment. :-)


Let $V$ be an inner product space, finitely generated over $\mathbb{C}$, $T\in \operatorname{End}(V)$ that satisfies $TT^*=T^2$, show that $T$ is self-adjoint.    I know that $TT^*$ is positive so has positive square-root, thus the square root is positive definite. But I don't feel like this is a proof. Can anyone prove it without considering square root?


Nested IF AND statements for number ranges

I am working on an IF AND statement in google sheets where the return is one of five words. However, I would like the statement to run only if the value in another cell - in my case, in column J, same row - is "Yes"  I've got the basic IF AND working, but I don't know how to tell Google sheets to only perform the statement if J2, J3, J4, etc is "Yes"   I also need this statement to not return anything until there are values in the row...I think that's probably just another IF AND part to what I have and a "" at the end for the if false part - but I modified a nested IF AND I found here to get what you see below so I'm not sure what if any parenthesis would need to be added  Here's what I have:   =IF(AND(X2 > 0,X2 < 14),"Developing",IF(AND(X2 > 13,X2 < 27),"Emerging",IF(AND(X2 > 26,X2 < 40),"Expanding",IF(AND(X2 > 39,X2 < 53),"Accomplished","Transferred"))))  Here's my google sheet:   I'm sure this is simple, but I'm completely new to Nesting IF AND statements, so help is appreciated.


MYSQL Laravel Product Variations structure

I'm developing a new eCommerce platform as a service, and I have some struggles with product variations database. So I want basically to build Shopify like platform, and I'm still on database design, and here is what I did. Schema::create('products', function (Blueprint $table) {             $table->id();             $table->string('name');             $table->longText('description');             $table->set('type', ['Single Product', 'Variation']);             $table->unsignedBigInteger('price_id')->nullable();             $table->unsignedBigInteger('category_id');             $table->timestamps();         });                  Schema::create('product_prices', function (Blueprint $table) {             $table->id();             $table->float('real_price', 8, 2);             $table->float('sale_price', 8, 2)->nullable();             $table->float('delivery_price', 8, 2);             $table->timestamps();         });          Schema::create('variations_attributes', function (Blueprint $table) {             $table->id();             $table->string('name');             $table->timestamps();         });          Schema::create('variations_attributes_names', function (Blueprint $table) {             $table->id();             $table->unsignedBigInteger('attribute_id');             $table->string('name');             $table->timestamps();         });          Schema::create('product_variations', function (Blueprint $table) {             $table->id();             $table->unsignedBigInteger('product_id');             $table->unsignedBigInteger('price_id');             $table->string('image');             $table->string('variation_name');             $table->string('sku_id');             $table->string('variation_ids'); // 123/Color, 321/Size, etc...             $table->timestamps();         });          Schema::create('products_sku', function (Blueprint $table) {             $table->id();             $table->unsignedBigInteger('product_id');             $table->unsignedBigInteger('product_variation')->nullable();             $table->integer('sku')->unique();             $table->integer('qty');             $table->timestamps();         });  (This is still unfinished database, and there will be more added later, as well foreign keys are not correctly formed, but you still get the idea) So now, what is my idea to structure variations. Client will have options in front end and select as many as he likes from variations_attributes (Size, Color, Ships from etc...) depends what he add there, and in variations_attributes_names would be (Red, Green, M, L, XXL, China, Russia, etc...). Just like in Shopify form, when he select attribute, and add attribute names it will create him a form like (for example he selected all 3 attributes, with Color Red and Green, Size M and L, and Ships from Russia and China) form will look like: RED/M/China - price (custom price) and sku RED/M/Russia - price (custom price) and sku RED/L/China - price (custom price) and sku RED/L/Russia - price (custom price) and sku GREEN/M/China - price (custom price) and sku GREEN/M/Russia - price (custom price) and sku GREEN/L/China - price (custom price) and sku GREEN/L/Russia - price (custom price) and sku  So basically it will multiple all options that he selected and give him option to add custom prices for all variations. So in that case my idea for product_variations database for field variation_ids is to get ids of selected attributes and store them like 1(attribute id)\1(attribute name id);1(second attribute id)\1(second attribute name id);1(third attribute id)\1(third attribute name id)  So in this case, when he select on front end attribute value it will select him the value he wanted. But in that case if he select first size and not color, it will give an error, and that would be a problem. Any ideas how to structure that database?


Is there a Python equivalent of PHP's $_GET[] and $_POST[]?

I'm using python and apache2.  I'd like to write a script called test.py that when accessed at , prints the string 'bar'  I'm thinking it should be like this:  def index(req):      return idontknow.foo   The idontknow.foo is the part I'm asking about.


How do I go to boot settings In Ubuntu 16.04?

I want to change my Ubuntu architecture from x32 to x64 thus wanted to boot from a live disk. Pressing F2 takes me to a screen giving Ubuntu Advanced Options and memtest


Is it possible to infer overfitting or underfitting from an accuracy vs epoch curve like the one below ? If yes, How?

In this curve, there's a pretty big difference between validation and training accuracy in the end. Does that mean it's overfitting?


How to remove the first element in an array?

I have an array:    arr[0]="a"   arr[1]="b"   arr[2]="a"     I want to remove only arr[0], and keep arr[1] and arr[2]. I was using:    arr= arr.Where(w => w != arr[0]).ToArray();     Since arr[0] and arr[2] have the same value ("a"), the result I'm getting is only arr[1].    How can I return both arr[1] and arr[2], and only remove arr[0]?


Dart regex html extraction prints nothing

I am trying to make a Regex pattern that will get anything within the  tags in some html. I have made a small example of what I have tried:  void main() {   Iterable<Match> matches = extractHTML.allMatches(example);   for (Match m in matches) {     String match = m.group(0);     print(match);   } }  final RegExp extractHTML =     RegExp(r"]*>(.*?)"); //r"]*>(.*?)");  final String example = """ \r\n\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=us-ascii\">\r\n<meta name=\"Generator\" content=\"Microsoft Word 15 (filtered medium)\">\r\n\r\n\r\n\r\n
\r\n
Good morning,
\r\n
&nbsp;
\r\n
 The telephone in Reception is not working properly this morning and I have no CCTV coverage either.&nbsp; Could someone possibly come and have a look?&nbsp; I have turned the system off and on again but still the same.\r\n Help!
\r\n
&nbsp;
\r\n
\r\n\r\n """;   I am expecting that this code will print the data within the tags but the console doesn't print anything. I have tried using this same RegExp on  using the same RegExp and string and it does as I expect it to. Is this something to do with me not escaping characters correctly? I thought the r before a string implied the string was literal.


Possessive pronouns and verb with -ing form

I'm looking for the rules concerning when you use possessive pronouns combined with a verb of "-ing" form. What's the combination called and how does it work?  Examples:    Thanks to my going to school I know a lot of things. I object to his going to the dentist.   Can you also say this?   Thanks to me going to school I know a lot of things. I object to him going to the dentist.


What is the difference between web application and website in asp.net? and if it have a difference which best from all sides?


How can I send non-default log files to remote rsyslog server?

Yes, I see that you want to mark this as a duplicate, and I appreciate that, but please read to the end.  I've found this question several places, and the answers are either too vague for a noob to rsyslog to understand...like   Waaay too difficult to possibly be an easy to understand way to do what I want to do....like   Or very close to what I'm looking for, but not quite....like   Anyway, to the specific question.  Server X = Centralized syslog server, running rsyslog.  Server Y = A server that runs   I have already configured Y to send the default log files to X.  I used  instructions, combined with some others.    X /etc/rsyslog.conf :  #  /etc/rsyslog.conf    Configuration file for rsyslog. # #                       For more information see #                       /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html # #  Default logging rules can be found in /etc/rsyslog.d/50-default.conf   ################# #### MODULES #### #################  $ModLoad imuxsock # provides support for local system logging $ModLoad imklog   # provides kernel logging support #$ModLoad immark  # provides --MARK-- message capability  # provides UDP syslog reception $ModLoad imudp $UDPServerRun 514  # provides TCP syslog reception $ModLoad imtcp $InputTCPServerRun 514  # This one is the template to generate the log filename dynamically, depending on the client's IP address. $template FILENAME,"/var/log/logs/%fromhost-ip%/syslog.log"  # Log all messages to the dynamically formed file. Now each clients log (192.168.1.2, 192.168.1.3,etc...), wil    l be under a separate directory which is formed by the template FILENAME. *.* ?FILENAME   # Enable non-kernel facility klog messages $KLogPermitNonKernelFacility on  ########################### #### GLOBAL DIRECTIVES #### ###########################  # # Use traditional timestamp format. # To enable high precision timestamps, comment out the following line. # $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat  # Filter duplicated messages $RepeatedMsgReduction on  # # Set the default permissions for all log files. # $FileOwner syslog $FileGroup adm $FileCreateMode 0640 $DirCreateMode 0755 $Umask 0022 $PrivDropToUser syslog $PrivDropToGroup syslog  # # Where to place spool and state files # $WorkDirectory /var/spool/rsyslog  # # Include all config files in /etc/rsyslog.d/ # $IncludeConfig /etc/rsyslog.d/*.conf   As you can see, the logs that are being sent to X are put into a directory named after the IP address they come from.  Y /etc/rsyslog.d/10-rsyslog.conf  *.* @192.168.1.X:514   This all works, and I get everything just fine.  What I'd like to do is have the redmine.access.log file located at /var/log/apache2/redmine.access.log also sent to the syslog server X  Like I said, I've read lots about this.  I'm just not following it, and I need a more simple example.   I'd like to keep the log files on X and Y, so piping them straight anywhere, isn't what I want.  The instructions that I've found that looked the simplest, that I could almost follow were .  The problem with those, is that nothing is really explained, and I'm really wanting to understand how this works.  I don't care if the redmine.access.log gets thrown in with the syslog stuff (although I'd prefer it didn't), or if it gets written somewhere else all together (obviously on X though).  If someone could write up what they think I should do, I'll update my question to have my final config that works, so hopefully other noobs can benefit from my silly questions.  EDIT  This edit is to explain why this isn't a duplicate.  This is a duplicate....There I admitted it.  But I'd really like to see something so simple, to have an actual complete example.  So, if this gets marked as duplicate, and removed, that's fine, but I'm going to edit it with a working example at the end anyway.


How can I take a photo with everything in focus with my DSLR?

I am quite new to DSLRs and one of the first things I noticed was the incredible focus points and appearance of depth that you can achieve. That is great in a lot of scenarios, but not in all. When filming a landscape as a whole, I do not want to have the focus on that single tree, but on the whole skyline.  Is there a way by which you can sort-of "disable" the focus, so that the raw image is recorded without any added blur? I suppose something as simple as this is only a small function you can turn off, but I can't seem to find it in the manual of my camera.


Locked posts not showing up in search - is this intentional?

Forwarding  from CGCC meta: We have a meta tag , which is an annual category for our site. It's basically a competition, and so we have a meta post to vote for nominations. The voting post gets locked for historical significance after voting is done, most likely to lock the votes in place more than it being off-topic. However, when searching for this tag, these posts don't show up, even though it would be better (for our site) that they do. Searching with is:q makes them show up though. My question is: is it intentional that locked posts don't show up? The only discussion I can find relating to this here is  asking for closed/locked posts to be hidden, which would imply that they once did show up, and there is no indication that this change actually went through. If so, is there a way to change it per site (since we have a good amount of posts that are locked but that people will want to search for)?


I am creating a site that I expect to receive DDoS attacks on occasion.  I have created two EBS AMIs on Amazon EC2. One AMI for a MySQL Database and one for the web host.  I have added an elastic IP to the web host server and have attached an A DNS record to it via Route 53 so I can access my domain.  If I were to create a load balancer, would I have to change the DNS record for the website to the load balancer's ip address? And then simply start as many instances of the web hosting ami under the load balancer as the DDoS calls for?  Is this thinking even somewhat correct?


What is the Twitter hashtag for Stack Overflow?

I tweet useful Stack Overflow questions so I can find them again easily. Is there a common hashtag for Stack Overflow like #stackoverflow or #so?


Is there any way to instruct Windows to ignore the “write-only” mechanical switch on SD cards?

I have a bunch of SD cards that do not have the little plastic switch for the read only setting. so Windows thinks it’s write protected or something. The card is not write protected by the software lock present on the SD card standard.  I’m using one with tape over the notch and it’s ugly. Also, the Thinkpad slot drags on the tape all the time so I’m afraid it will might loose in there eventually.  So, is there any way to tell Windows to ignore this lame write-protect feature?  I’m not interested on the SD card itself as it’s irrelevant for the issue at hand. Read this question as being about a 5.25” floppy disk drive instead of an SD card if you wish. I’m pretty sure the Windows settings are the same for both, really.  I’m  that there are 3 ways to secure an SD card. I’m talking about only the mechanical switch, which is the responsibility of the host to handle.


I'm especially terrible with Regex, but reworked one I found online to suit my needs, but it keeps throwing the "no viable alternative at character '\'" error. This pattern works when tested in regex101.com, regexplanet.com, and rubular.com. I thought I had escaped everything that needed escaping. Right, now  I'm out of my depth with this. Hopefully someone here can give me some insight.  In case anyone needs to know, the regex needs to find the first email address in an the email body (which is from a submitted form) that immediately follows the word "From:" (at this point I'm unsure if there will be a space after "From:" or not), since there could be multiple email addresses in the text.  Thanks in advance to anyone who can help!  Here's my code:  if (email.Subject.Contains('xxxx') || email.fromAddress == 'xxxx'){         Pattern myPattern = Pattern.compile('From:(\\s(?:[a-z0-9!#$%&'*+\\/=?^_'{|}~-]+(?:\\.[a-z0-9!#$%&'*+\\/=?^_'{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\]))');         Matcher myMatcher = myPattern.matcher(email.plainTextBody);         Set<String> emails = new Set<String>();         while(myMatcher.find()) {             emails.add(matcher.group(1));         }     }


StackOverflowError when calling method of subclass object?

Executing the Test class gives a StackOverFlow error :(   Parent class :   package Pack;  public class Alpha {   protected void sayHi() {     System.out.println("Hi...from Alpha");   } }   Child class :   import Pack.Alpha;  public class AlphaSub extends Alpha {   AlphaSub sb=new AlphaSub() ;    void hi() {     sb.sayHi() ;    } }   Test class :   public class test { public static void main(String[] args) {      AlphaSub ob=new AlphaSub() ;     ob.hi() ; }   }


Is it possible to hook up a MySQL database with python program if the MySQL database is made in PhpMyAdmin?


Cannot sort an object which fetch returns

i cannot sort an array in React. Im fetching data like this: function AllMeetupsPage() {   const [isLoading, setIsLoading] = useState(true);   const [loadedMeetups, setLoadedMeetups] = useState([]);    useEffect(() => {     setIsLoading(true);     fetch("https://reacttesty-2fbdf-default-rtdb.firebaseio.com/api/book.json")       .then((response) => {         return response.json();       })       .then((data) => {         const meetups = [];          for (const key in data) {           const meetup = {             id: key,             ...data[key],           };            meetups.push(meetup);         }          setIsLoading(false);         setLoadedMeetups(meetups);       });   }, []);  And then i want to render it. Here im trying to sort loadedMeetups, i tried several diffrent thing but it don't work. F.e simple loadedMeetups.reverse() works fine. return (

All Meetups
       <MeetupList meetups={loadedMeetups.sort(         (a, b) => b['title'] - a['title']       )} />   {/* Here im trying to sort loadedMeetups, i tried several diffrent thing but it don't work.        F.e simple loadedMeetups.reverse() works fine.*/}       <button onClick={handleClick}></button>
   ); }  It don't work. Here is the object console.log  in browser 0: author: "Lewis Carroll" description: "Alicja w Krainie Czarów to powieść napisana przez Carroll'a" genre: "Powieść" id: "-MbN_UVuJJvfCjonq6E1" image_url: "https://cdn.bonito.pl/zdjecia/7/8723-alicja-w-krainie-czarow.jpg" release_date: " 2000-12-31" title: "Alicja w Krainie Czarów" __proto__: Object 1: author: "J.K Rowling " description: "Książka o czarodzieju" genre: "Fantastyka" id: "-MbNbGx4MlJY5VafwuzN" image_url: "https://cdn-lubimyczytac.pl/upload/books/308000/308630/494238-352x500.jpg" release_date: "2002-08-20" title: "Harry Potte  I know that the problem is somewhere in fetching the data, because i tried to sort it on some dummy_data array i created on my own and it works. But i am not very familiar with fetch and currently dont really understand it, i just had to use it to connect to the api.


$A^n=0$ for $A$ nilpotent without the use of minimal polynomial

I want to use the fact that for a $(n \times n)$ nilpotent matrix $A$, we have that $A^n=0$, but we haven't yet introduced the minimal polynomials -if we had, I know how to prove this.  The definition for a nilpotent matrix is that there exists some $k\in \mathbb{N}$ such that $A^k=0$.  Any ideas?


Global variable not changing with Python and MQTT

I am trying to run an MQTT client that receives and publishes messages at the same time. What I am trying to do is to stop the while loop responsible for publishing when I receive a message. But running never becomes False for the while loop and the loop is never broken. What should I do? I just want to break the loop when a message is received. Here's my code:  running = True def on_message(client, userdata, msg):      print(msg)      running = False      print(running) # it becomes False here  client.on_connect = on_connect client.on_message = on_message client.connect(HOST, 1883, 60)  client.loop_start() # used to receive on_message events while the while loop is true   while running:     #publish and do something until running is False


Composing functors with natural transformations

So I'm doing a project in Category Theory. I fully understand natural transformations and functors, but what does it mean to compose them, for example in the monad axioms where you have something like $GF\eta \circ G\epsilon F = 1$ etc. What exactly is $F\eta$? Thanks


Replace website with newly redesigned and developed site without effecting SEO

We are currently finishing off a development site dev.example.com for a business who currently have a website that needs updating www.example.com.   We want to display all the content from the dev site on the main site's domain but do not want to affect the main website's SEO score.  Well when we asked the hosting company to point the main site to the dev site they said there would be a negative SEO impact. The whole URL structure will change and Google will notice 30+ page errors. They suggested replacing the files on the live domain and setup the necessary 301 redirects but not sure what they mean by this entirely


How do I mix ö with \hl{} using [utf8x]{inputenc}

Say I'm writing about Schrödinger's cat. I would like to be able to put use soul's \hl{} function to make the cat yellow.  This should work, but it doesn't:  % Minimum working example of UTF-8 ö problem \documentclass[12pt,twoside]{report} \usepackage{soul} \usepackage{color} \usepackage[utf8x]{inputenc} \begin{document}  First try: Schr\"odinger's cat.  Second try: Schrödinger's cat.  Third try: \hl{Schr\"odinger's cat.}  Fourth try: \hl{Schrödinger's cat.}  \end{document}   I get this error:  This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex)  restricted \write18 enabled. entering extended mode (./mwe1.tex LaTeX2e <2018-04-01> patch level 2 Babel <3.18> and hyphenation patterns for 84 language(s) loaded. (/usr/local/texlive/2018/texmf-dist/tex/latex/base/report.cls Document Class: report 2014/09/29 v1.4h Standard LaTeX document class (/usr/local/texlive/2018/texmf-dist/tex/latex/base/size12.clo)) (/usr/local/texlive/2018/texmf-dist/tex/latex/soul/soul.sty) (/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/color.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-cfg/color.cfg) (/usr/local/texlive/2018/texmf-dist/tex/latex/graphics-def/pdftex.def)) (/usr/local/texlive/2018/texmf-dist/tex/latex/base/inputenc.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/ucs/utf8x.def)) (/usr/local/texlive/2018/texmf-dist/tex/latex/ucs/ucs.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/ucs/data/uni-global.def))  (./mwe1.aux) (/usr/local/texlive/2018/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) (/usr/local/texlive/2018/texmf-dist/tex/latex/ucs/ucsencs.def) (/usr/local/texlive/2018/texmf-dist/tex/latex/ucs/data/uni-0.def) ! Argument of � has an extra }. <inserted text>                 \par l.14 Fourth try: \hl{Schrödinger's cat.}  ?   Clearly, I could use \"o everywhere instead of ö, but that seems like a real pain.


Why are eigenfunctions which correspond to discrete/continuous eigenvalue spectra guaranteed to be normalizable/non-normalizable?

These facts are taken for granted in a QM text I read. The purportedly guaranteed non-normalizability of eigenfunctions which correspond to a continuous eigenvalue spectrum is only partly justified by the author, who merely states that the non-normalizability is linked to the fact that such eigenfunctions do not tend to zero at infinity.  Not a very satisfying answer. What I'm really after is an explanation based in functional analysis. I believe there is a generalized result about inner products being finite for discrete spectra but infinite for continuous spectra.  Can anyone shed some light on this?


The shell theorem states that a spherically symmetric body $S$ of mass $m$ has a gravitational field identical to that of a point particle $P$ of mass $m$ located at the center of $S$.  We can ask the converse question: suppose there is a force $F$ between masses $M$ and $m$, separated by a distance $r$ of the form $$F = M m f ( r )$$  such that any spherically symmetric body affects external bodies as if its mass were concentrated at its center. Then what form can the function $f$ take?  According to Wikipedia: , the general solution is   $$f(r)=a/r^2+br$$  where $a$ and $b$ are constants.   I attempted to demonstrate this. Replacing the gravitational force with the general force $F=Mmf(r)$ in the calculations to prove the shell theorem, I got that for all distances $r \ge R > 0$, $f$ satisfies:  $$\int_{r-R}^{R+r} (r^2-R^2 +s^2) f(s)\ ds = 4r^2Rf(r).$$  We can take the second derivative of both sides with respect to $r$ to get rid of the integral (we'll need to differentiate inside the integral), and we get the following nasty differential equation:  $$2Rrf''(r)+6Rf'(r)=f'(r+R)(r+R)+2f(r+R)-f'(r-R)(r-R)-2f(r-R).$$  I don't think this really helps. We can easily verify that $f=ar^2+br$ is a solution of this equation, so I didn't make any mistakes thus far (note the equation is linear so it suffices to check it for $f=r$ and $f=1/r^2$).  So how can we demonstrate the result?


chmod 001 or 111? Unix Permissions for executable files question

I am confused as to what this question is asking me to do. For context, hello is a c++ file.     "Use chmod command again to make hello an executable, but not readable   and not writeable for all users."   Using an online chmod calculator, my best guess would be chmod 001 hello, which is executable by the public, but not readable nor writeable by the public.   Is this correct?


I am an indian citizen. I will go to Bloemfontein, South Africa for postdoctoral research  at the end of August. I have to stop at Dubai International airport for 4.35 hours for my next connecting flight. I will be travelling through Emirates flight. My question is - Do I need any transit visa at dubai airport for 4.35 stopover time?


Probability of putting m balls into $N$ compartments.

Suppose that $n$ balls are randomly distributed into $N$ compartments. Find the probability that $m$ balls will fall into the first compartment. Assume that all $N^n$ arrangements are equally likely.  Attempt. My idea:  Notice we can place $m$ balls out of the n balls into the first compartment in ${n \choose m}$ ways. Now we want to distribute $n-m$ balls in the remaining $N-1$ compartments. The first ball can go into any of $N-1$ compartments. So, the second ball can go to any of $N-2$ remaining comparment and so on... so we have in total $$ (N-1)(N-2)(N-3)...(N-n-m) = \dfrac{(N-1)!}{(N-n-m)!} $$ Therefore, the required probability is $$ \dfrac{ {n \choose m} \dfrac{(N-1)!}{(N-n-m)!} }{N^n } $$ Now, here is where I get puzzled. The solution key gives answer to be ${n \choose m} (N-1)^{n-m} / N^n $ What am I doing wrong? did I misunderstood the problem?


I have around 15,000 JPG files that need to be watermarked. Is there any way to process these images en masse and add a watermark?  The images may be different sizes, I want the watermark placed in the center of the images.


Block cipher fixed points (plaintext equal to ciphertext)

A block cipher is a bijective map from the set of possible plaintexts to the set of ciphertexts, which are the same size and might as well be considered the same thing: $\theta: S\to S$. In this there must exist a fixed point m $\in S$ such that $\theta(m) = m$ (alternatively you could consider encryption to be a binary operator acting on the set $S$ then you could write encryption under key $k$ as $m \odot k = m$, with $m,k \in S$. Unfortunately this cannot form a group since there is no unit $e$ that makes $e \odot k = e$ for all $k \in S$).  It is clear that when the block size is equal to the key size a single fixed point will exist when you hold the plaintext message constant and permute the key. The key allows you to select one of all the possible possible unique mappings, of which one must surely be a fixed point (am I right about my use of the word unique here?).  What I don't understand is how a key that is longer than a block size provides any extra security. From what I understand this would suggest the existence of many fixed points, or equivalently many different keys that will decrypt a ciphertext.  Note: I would also be interested to see articles that apply algebra to the study of block ciphers. Specifically constructing groups to aid analysis that also consider the fact that a block cipher is a composition of several round functions.


\autoref{} printed "Theorem 2.1" instead of "Lemma 2.1". How to change?

I labeled my lemma with \label{lem1} and referred to it later using \autoref{lem1}. However, what was printed was "Theorem 2.1" where it should really say "Lemma 2.1". How do I fix this?  \documentclass[a4paper, 12pt, twoside]{thesis} \usepackage{verbatim}  \usepackage{amssymb,amsmath} \usepackage{amsthm,amsfonts,amscd,amsrefs} \newtheoremstyle{component}{}{}{}{}{\itshape}{.}{.5em}{\thmnote{#3}#1}     \theoremstyle{component}     \newtheorem*{component}{}  \begin{document} \begin{lemma} \label{lem1} This is a lemma. \end{lemma}  By \autoref{lem1}, we have..  \end{document}


Copy file via scp from a remote machine that need root access (with remote root access disabled)

I'm on the machine A, and I want to run a bash script from A to copy some files from B via scp. Those files are stored in a path that needs root access to be accessed but root remote access is disabled for ssh in B. I cannot change that configuration.  Standard scp statements do not work since I'm not asked to type B's root password during scp execution on A.  How can I do?


IPTables: Allow outgoing MySQL connections but not incoming connections

I have a server which doesn't allow connections to mysql from external sources - all of my databases and connections take place on localhost.  The default policy of iptables is to drop connections for any ports that I don't specify (currently I don't have port 3306 specified in my iptable rules, so all connections to this port are dropped).  That's fine, but now I'd like to connect to a mysql database located externally on Amazon RDS.  Port 3306 can be opened up to the outside world as follows:  iptables -t filter -A INPUT -p tcp --sport 3306 -j ACCEPT iptables -t filter -A OUTPUT -p tcp --dport 3306 -j ACCEPT   This allows me to connect to the database on Amazon RDS, however it also allows remote connections to databases on my server.  What do I need to do to allow my server to connect to the database on Amazon, but restrict external connections to the databases on my server?  Also bear in mind that the IP address of my Amazon RDS instance can change periodically I believe.


How to invoke the mirror modifier object eyedropper command with python?

I'm creating a simple script where once executed it adds a mirror modifier to an object. The next step would be to invoke this button through the script and then I click on the object I want to mirror my selected object around:    But the command doesn't show up on the last executed command list and I can't find anything about it on the net. I just want to execute the command this button invokes.  my code:  import bpy from bpy.types import Menu   class MirrorPicker(bpy.types.Operator):     bl_idname = "mirror.picker"      bl_label = "Mirror Picker"       def execute(self, context):          bpy.ops.object.modifier_add(type='MIRROR')          # the eyedropper code goes here somewhere         return {'FINISHED'}   def register():      bpy.utils.register_class(MirrorPicker)   def unregister():      bpy.utils.unregister_class(MirrorPicker)   if __name__ == "__main__": register()


Error: "Failed to open \EFI\BOOT\grubx64.efi..." (Dual-Booting)

Today after I installed Ubuntu 16.04 via USB on my pre-installed Windows 8 machine, I was required to restart my computer. After doing so I wasn't offered to select an OS, so after searching the internet, I came across Boot-Repair which I ran using the Try Ubuntu option in my Ubuntu installation USB. Following the boot repair I got a message saying,  If your computer directly reboots into Windows, try to change the boot order in your BIOS. If your BIOS does not allow to change the boot order, change the default boot entry of your Windows bootloader. For example, you can boot into Windows then type the following in an admin command prompt: bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi   After I rebooted my PC, I am receiving the following error message for about 3 seconds, after which it boots automatically into Windows 8, without letting me access Ubuntu. Error received while booting after manufacturer's logo, before grub: Failed to open \EFI\BOOT\grubx64.efi - Not Found   Failed to load image \EFI\BOOT\grubx64.efi: Not Found     start_image() returned Not Found    So I tried the other solution of typing that command in the cmd, to which my surprise, worked, and I am now prompted a window (grub) to choose my OS each time I turn on my PC, but unfortunately, I still receive an error each time, that lasts about 3s, after which I can choose my OS (both are working just fine) and work normally. Do you have any suggestions to get rid of the error message each time I boot my PC?


Forecast total for a year given monthly time series

I have a monthly time series (for 2009-2012 non-stationary, with seasonality). I can use ARIMA (or ETS) to obtain point and interval forecasts for each month of 2013, but I am interested in forecasting the total for the whole year, including prediction intervals. Is there an easy way in R to obtain interval forecasts for the total for 2013?


I'm reading a theorem about the order of a finite field:  Here is the proof:   At the end, the author said  It follows that $\mathbb{F}$ is a vector space over $\mathbb{F}_{p}$, implying that its size $q$ is equal to $p^{m}$ for some $m>0$.  I do not understand how $\mathbb{F}$ is a vector space over $\mathbb{F}_{p}$ implies that its size $q$ is equal to $p^{m}$. Could you please elaborate on it?


I tried differentiating under the integral sign which led me to: $$f'\left(y\right)=-\int_{0}^{\infty}e^{-xy}\sin^{2n+1}\left(x\right)dx\ =\frac{-\left(2n+1\right)!}{\prod_{k=0}^{n}\left(y^{2}+\left(2k+1\right)^{2}\right)}$$ where $$f\left(y\right)=\int_{0}^{\infty}e^{-xy}\frac{\sin^{2n+1}\left(x\right)}{x}dx$$ And now I'm stuck trying to evaluate $$-\int_{b}^{y\ }\frac{\left(2n+1\right)!}{\prod_{k=0}^{n}\left(t^{2}+\left(2k+1\right)^{2}\right)}dt=f\left(y\right)-f\left(b\right)$$ which, once I let $b$ approach $\infty$ and prove that I can set $y=0$ in the resulting expression, will lead me to the answer. I know the integral in $t$ is technically doable using partial fractions but I can't see how I can get an explicit expression in terms of $n$ (which I know exists) out of this approach.  Here's the answer. $$\int_{0}^{\infty}\frac{\sin^{2n+1}\left(x\right)}{x}dx=\frac{\pi\left(2n\right)!}{2^{2n+1}\left(n!\right)^{2}}$$


unable to install .deb file through terminal

I'm in confusion because I'm not getting my eclipse even after installing. I downloaded .tar.gz file of eclipse. Then I generated .deb file using command: sudo alien -d eclipse.tar.gz  Then I tried to install it using command:  sudo dpkg -i ./eclipse_1-2_all.deb   It didn't give me any error and seemed to have worked but there's no eclipse application in dash home. What should I do? Kindly suggest.


Why does the pitch of a container being filled with water increase?

I wonder about this.   If you pour water in a closed tank, it makes a noise. I have noticed that as the container becomes more and more full, the pitch of this noise also increases. Why is that?  I do not study, nor have any knowledge of beyond basic concepts, of the physics involved in sound and vibrations. However, my hypothesis is that this happens because the "chamber" where the sound is produced gets progressively smaller, therefore it behaves like a flute - as you change the shape of the chamber, the sound that air makes as it passes also changes.


jQuery-created html not caught in jQuery events

I have this page where i load products by getting them as json from my php and putting them in html in js side like so :   function getProducts(type) { $.ajax({     type:"POST",     url:"backend/getProducts.php",     data: {         category: type     },     success:function(data){         var response = jQuery.parseJSON(data);         var products = "";          for(var i = 0; i < response.data.length; i++)         {             products += "
";             products += "

";             products +=     "
"+response.data[i].Name+"
";             products +=     "
Description : "+response.data[i].Description+"
";             products +=     "
Color : "+response.data[i].Color+"
";             products +=     "
Price : "+response.data[i].Price+"
";             products +=     "<form method='post' class='add-to-cart-form'><input type='hidden' name='id' value='"+response.data[i].ID+"'>
<input type='number' class='quantity form-control' placeholder='Quantity'>
<button class='btn btn-default' type='submit'>Add to Cart</button>

</form>";             products += "

";         }          if(response.data.length == 0)         {             products += "

No Products Found

"         }         $("#shop-section").html(products);     } });   }  but when i try to catch the add-to-cart-form on submit to add the item to cart it just submits the form anyway even though i have e.preventDefault().  $(".add-to-cart-form").on('submit',function(e){     e.preventDefault();     // do stuff here });   how can i fix this ?  Thanks


I have some trouble trying to understand Halmos' explanations about generalized Cartesian products. I've read these entries already:    This also has the page I'm stuck on.      Is his generalization the same as a Cartesian product of several sets? As here:   What puzzles me is $\{a,b\}$. Where does it come from, what does it do? I know that it is supposed to be arbitrary. How does it identify distinct elements of $X \times Y$? Does some function map each $a \in A$ to an element in $X$? Or is it always the same $a$?  What does he mean by      the set $Z$ of all families $z$, indexed by $\{a,b\}$, such that $z_a \in X$  and $z_b \in Y$   ? What does does an element of $Z$, namely one family $z$, consist of? By family, does he mean an indexing function or the indexed elements? This comes to a very important question for me: Does family mean a function or the set of all indexed elements?   I will try to explain how I understand it thus far: $Z$ contains elements of the form $\{(a,x),(b,y)\}$. The choice of $x$ depends on $a$, so an $x$ in a $z \in Z$ equals the $z_a$ of $X$. Now, we want to map these pairs to $X \times Y$, so we have a function $f$ that takes $z \in Z$ and connects it to the corresponding ordered pair $(z_a, z_b)$, where $z_a \in X$. $X \times Y$ is not the same as $Z$; they only, effectively, contain equal elements.  He goes on:     If $\{X_i\}$ is a family of sets ($i \in I$), the Cartesian product of the family is, by definition, the set of all families $\{x_i\}$ with $x_i \in X_i$ for each $i$ in $I$.   How I understand it: $\{X_i\}$ contains, as elements, several sets, each single one a set $X$ identified by an index/element of $I$. Then, we go over all indeces $i$ in $I$, take from each set $X$, namely $X_i$, an element $x$ and add it to current set of the newly created sets/families. So, the lower index $i$ does not refer to an element of $X_i$ indexed by $i$, but rather calls all elements of $X_i$ $x_i$. We end up with a set, defined as Cartesian product, of sets, in which each element (set) contains ordered elements, each from a different $X_i$. How does the ordering occur?  $\prod_i X_i$, the Cartesian product, becomes equal to $X^I$, if all $X_i$ are the same set $X$. $X^I$ means all possible combinations of mapping from $I$ to $X$. We randomly take an elements $x$ from some $X_i$, put it in a set/family with other randomly obtained $x$, put the entire set into a set denoted $X^I$, and continue doing so, till we have no more options. Then, each set in the new $X^I$ contains a mapping of some $i$ to some $x$. Since we exhausted the options, they are indeed all combinations.  Where did I go wrong? Someone needs to spoonfeed my the answer; I am completely confused by now.


How to remove space between application and workspace switcher on Unity launcher?

I just downloaded Ubuntu 11.10 for the first time. I really enjoy the launcher on the left hand side but have a problem. After playing around with adding applications in it, there are large spaces from the last application to workspace switcher. If I try to drag a new application into the launcher everything moves farther down, instead of filling in the space in between apps. When I right click on the launcher in a blank spot it reads "drop to add application." I'm looking for a way to have all of the applications close together with no spaces, like when I first downloaded Ubuntu.


I am analysing C++ project.I found some unknown syntax in project.   array<String^>^ syntax and String^   can some please help me to understand these syntax. I appreciate your help.


13 ram available out of 16 when nothing is running

I use Ubuntu 20.04 LTS and I have 16GB Ram. When I use free -h I see the following, why is that?


Is there any way to decrypt RSA ciphertext $c = m^e \bmod n$ when $\gcd(p-1,e) > 1$?


How do you make an image of whole Mac disk drive and tranfer it to another Mac?  What is the best software to do this?   I am looking to make an exact duplicate copy of my machine to reload on a new Mac with the same hardware then reformat the older computer.  Acronis like software or something?


Novel about a young woman, and the doctor who mistakes her for a poltergeist

So, this is super vague and I apologize, but something sparked my memory and it's been bothering me, so here goes...  I'm looking for a young-adult book I read probably in the early 2000's.  It was possibly older than that, but I doubt it was earlier than the seventies or so, and was likely somewhere in my elementary school.  I have no information as to what was on the cover.  In terms of plot, I think it involved a haunting of an old house and two (or maybe three) children.  Either the older or middle one was a girl of twelve or fourteen.  When the ghost/spirit/whatever starts moving things and causing havoc in the house, I think the parents call a doctor.  He turns out to be a sinister-type character who wants to take the girl away, believing her to be the source of the disturbances.  I think the ghost or whatever takes a liking to the kids and tries to help, but for some reason I don't think it can talk or manifest, only move things.  I know it's not much to go on, but it's been on my mind all day.  Any help would b great!


Is there any drawback to having different versions of the same page?  For example:  and   Before we had responsive websites, we were able to force a desktop site using ?desktopRedirect=1 but I am wondering if the ada formatting that is being used is negative for seo in any way.


How to change the color of a particular bar in a bar diagram with pgfplots?

% used PGFPlots v1.14 \documentclass[margin=0.5cm]{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable}  \usepackage[scaled]{helvet} %Paquete para letra helvetica parecida a letra arial \usepackage[T1]{fontenc} \renewcommand\familydefault{\sfdefault} %Renombrar comando para hacer efecto la letra helvetica  % use this `compat' level or higher to be able to use absolute values for % the `bar width' \pgfplotsset{compat=1.7} \begin{document}  \pgfplotstableread{ fila    especie abundancia 1   Orisup  50.2 2   Agepho  6.4 3   Corcor  6.2 4   Stumag  5.2 5   Xenbai  5 6   Aphult  3.4 7   Spipas  3.4 8   Empalb  2.2 9   Turmig  2 10  Junpha  1.8 11  Pascae  1.2 12  Sitcar  1.2 13  Chavoc  1 14  Cyaste  1 15  Tactha  1 16  Melfor  0.8 17  Anadia  0.6 18  Colaur  0.6 19  Hirrus  0.6 20  Butjam  0.4 21  Haemex  0.4 22  Mellin  0.4 23  Pipmac  0.4 24  Tyrvoc  0.4 25  Ardher  0.2 26  Eupneo  0.2 27  Molate  0.2 28  Poescl  0.2 29  Psamin  0.2 30  Spinot  0.2 31  Spipsa  0.2 32  Steser  0.2 33  Toxcur  0.2 34  Troaed  0.2 }\mytable \begin{tikzpicture}[font=\tiny] \begin{axis}[ ylabel={Número de individuos}, xticklabels from table={\mytable}{especie}, xtick=data, major x tick style = transparent, %--------------------------------------------- % to make the bar plot look good ... % ---------- % ... provide the used axis limits ... % (using `\coordindex' means `xmin' always starts from 0) xmin=0, xmax=34,  % <-- this needs to be adjusted manually each time % provide a suitable `bar width' in absolute values. % This makes the plot independent of axis `width' % (this also only have to set once, because the increment is always 1) bar width=0.8, % ... and enlarge them by an absolute value which satisfies your needs % (this should be larger than half of the `bar width' so that the %  bars at the axis limits are fully shown) enlarge x limits={abs=0.6}, %------------------------------------------------- ymin=0, ymax=51, ybar, xticklabel style={ anchor=north west, align=left, rotate=60, %font=\itshape,%\fontsize{4pt}{baselineskip}\selectfont, inner sep=-0.8cm, %outer sep=0.7cm, xshift=-0.3cm %yshift=0cm }, ] \addplot table [y=abundancia, x expr=\coordindex] {\mytable}; \end{axis} \end{tikzpicture} \end{document}


How can I completely remove ecryptfs from my system and delete .Private?

Few days back I have installed ecryptfs, created a private directory using it. Now my Ubuntu login became super slow. I have tried removing ecryptfs from Synaptic. I found It, it can not be deleted that way. Somewhere I have read about this command  ecryptfs-setup-private --undo   But this command displays a rather confusing list of commands on terminal. I don't want to mess up my installation, neither want to loose my administrator account.  Now my question is, how can I safely remove /home/user/Private (.Private) and remove ecryptfs encryption ?


How to change to the Ubuntu desktop using the GUI (not Command Line)?

Is there a SUPER SIMPLE way to get the Ubuntu desktop to change to a different desktop using the GUI?  Maybe I'm missing something and just don't trust the command line? Thanks!


I'm travelling to San Francisco (SFO) with family this May. My first flight is with JAL to Narita. After a 12hr layover, the next flight is from Haneda to San Francisco. Similar routing on the way back a few weeks later (SFO-HND / NRT - ? ). Do I need a visa for Japan and if yes, what kind?


Hello Guys and/or Gals,  I am new to the site and after searching it for a few hours i finally decided to sign up as i have some questions.  I have a Windows 8.1 system and I would like to install Linux on it in VMware OS. I have never tried Linux before so I thought i would ask what is best version of Linux to run in VMware? I want to use it for rendering graphics, storage, teamspeak and other software. I do not want a dual boot system which is why I have vmware as I do not want it full time at this point. I also want to learn more about linux as when my windows 8.1 pc dies I will need a new os, and i am done with windows at that point.  So is Ubuntu the best choice and is there only one version to choose from?  Think that is all my questions for now. Thanks in advance Valshardreg


prove that $Span(A)$ is a subspace of $Span(B)$

Let $A$ and $B$ be two subsets of a vector space $V$ and assume that $A \subseteq B$. Prove that $Span(A) \le Span(B)$.  What I tried: to prove that $Span(A)$ is a subset of $Span(B)$, I tried to use the definition of spanning sets. I wasn't sure how to prove that + and * are closed for $Span(B)$.


For which positive numbers b is it true that $b^x \geq 1+x$ for all $x$?

For which positive numbers $b$ is it true that $$b^x \geq 1+x,\forall x ?$$  My calculus teacher gave this question on a test recently, and I’m not sure how to solve it. Any help is appreciated.


Installing Ruby On Rails stack on Ubuntu?

I'm looking to install ruby on rails on Ubuntu similarly to how its described in the RailsIntaller.org for MAC/Windows. Instructions and guides that I've seen to do this on Ubuntu seem to be all over the place and everyone seems to have their own way as to how to do this. I'm a Ubuntu newbie and would like this as simple as possible if it can be done. Does anyone have a guide/video/tutorial they recommend?. What rubyinstaller.org download installs it? And what I would like to get installed as well is:   Ruby Rails Bundler Git Sqlite Tiny TDS/OSX GCC installer/ Ubuntu equivalent Jewelry Box RVM SM framework


Calculate expected value of random variable $Z=\min\left\{X,Y\right\}$

Hi math people in my last question I  asked the question     $X,Y$ are independent, identical distributed with $$P(X=k) = P(Y=k)=\frac{1}{2^k} \,\,\,\,\,\,\,\,\,\,\,\, (k=1,2,...,n,...)$$      Calculate the probabilities $P(\min\left\{X,Y\right\} \leq x)$   I calculate it correct, here is calculation:  $$\begin{split}F_M(x) &= P(\min\left\{X,Y\right\} \leq x) \\ &= 1-P(x<\min\left\{X,Y\right\} ) \\ &= 1-P(x<X, x<Y) \\ & = 1-P(X>x)\,P(Y>x)\\ & = 1-(1-P(X \leq x))\,(1-P(Y \leq x))\\ & = 1-(1-F_X(x))\,(1-F_Y(x))\end{split}$$  But now how     calculate expected value of random variable $Z=\min\left\{X,Y\right\}$   So we have $Z = 1-(1-F_X(x))\,(1-F_Y(x))$  Then $$E(Z) = \int_{0}^{\infty}\left(1-(1-F_X(x))\,(1-F_Y(x))\right) \,\,dx$$  Is it good like this?


I just instantly lost 211 rep on MSO.    A few hours ago I had 1,060, now 849, a 211 decrease. I don't think I ever received enough votes on one question or answer to lose that much by a single question delete (or whatever).    My profile shows: 9 today +10 - 7 hours ago - upvote - Notify myself with message and (optionally) a future point in time -1 - 1 hour ago - downvoted - What questions should NOT be asked on Meta?    Where did it go? Is there somewhere else it could show why it was decreased that I am not aware of?    Ticked the box as Bart suggested, was indeed: -220 - 1 hour ago - removed - Please, delete this post


An example of a domain whose complement has a different boundary

Can someone give an example of a domain $G$ which has a boundary different from the boundary of its complement $G^c$?


Dividing an equilateral triangle into N equal (possibly non-connected) parts

It’s easy to divide an equilateral triangle into $n^2$, $2n^2$, $3n^2$ or $6n^2$ equal triangles. But can you divide an equilateral triangle into 5 congruent parts? Recently M. Patrakeev  an awesome way to do it — see the picture below (note that the parts are non-connected — but indeed are congruent, not merely having the same area). So an equilateral triangle can also be divided into $5n^2$ and $10n^2$ congruent parts.  Question. Are there any other ways to divide an equilateral triangle into congruent parts? (For example, can it be divided into 7 congruent parts?) Or in the opposite direction: can you prove that an equilateral triangle can’t be divided into $N$ congruent parts for some $N$?                                               (Naturally, I’ve tried to find something in the spirit of the example above for some time — but to no avail. Maybe someone can find an example using computer search?..) I’d prefer to use finite unions of polygons as ‘parts’ and different parts are allowed to have common boundary points. But if you have an example with more general ‘parts’ — that also would be interesting.