I get a permission denied error when I run the command sudo echo '7' > /sys/class/net/eno99/device/sriov_numfs  This is the error: bash: /sys/class/net/eno99/device/sriov_numfs: Permission denied  I have enabled SRIOV in the following ways:  Enable Virtualization in System Setup. Enable Global Sriov in System Setup Enable Sriov for each ethernet port separately.  Still I am getting the same error. Also cannot find any critical error in dmseg that may cause the problem. Screenshots:  I also tried sudo echo 7 | sudo tee /sys/class/net/eno99/device/sriov_numfs   Any help will be appreciated.

When using sudo to allow edits to files, I regularly get 'permission denied'.  For example, my mouse is jittery and sluggish, so I want to disable polling:  sudo echo "options drm_kms_helper poll=N">/etc/modprobe.d/local.conf   I'm prompted for a password, and then get:  bash: /etc/modprobe.d/local.conf: Permission denied   So I tried to do a temporary change to disable polling by using:  sudo echo N> /sys/module/drm_kms_helper/parameters/poll   Yet again the system responded with:  bash: /sys/module/drm_kms_helper/parameters/poll: Permission denied   Any ideas?


Can anyone make sense of this? ~$ sudo apt list --upgradable -a Listing... Done libodbc1/buster 2.3.7 amd64 [upgradable from: 2.3.7] libodbc1/now 2.3.7 amd64 [installed,upgradable to: 2.3.7] libodbc1/groovy 2.3.6-0.1build1 amd64  ~$ sudo apt full-upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.  I initially thought it was an error in the repository, but it's been like this for days. Here's some Ubuntu version info: ~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 20.10 Release:    20.10 Codename:   groovy

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


Is it legal to audio or video tape professors while they are lecturing?  Why or why not?

Sometimes the Professor will say things quickly, or say things before I can write them down. It would be of great benefit if I could record audio for the course, but I am not sure the legal guidelines around doing so.


I'm trying to write a wrapper for command placement in a beamer document. I'm using tikz for this, and I created a new command:  \newcommand{\figz}[3]{   \begin{tikzpicture}[remember picture, overlay]     \node [anchor=west] at (#2,#3) {#1};   \end{tikzpicture} }   Which I call to, using:  \begin{frame}   \frametitle{Sun Hours Mismatch}    \figz{text 1}{0}{0}   \figz{text 2}{0}{0} \end{frame}   The result is     While I expect something like this    What am I doing wrong?   Edit  Compileable example. The frame title represent to actual result, rather than the desired one.   \documentclass[xetex,mathserif,serif]{beamer} \usepackage{tikz}   \newcommand{\figz}[3]{   \begin{tikzpicture}[remember picture, overlay]     \node [anchor=west] at (#2,#3) {#1};   \end{tikzpicture} }  \begin{document}    \begin{frame}   \frametitle{Overlap}    \figz{text 1}{0}{0}   \figz{text 2}{-0.39}{0}  \end{frame}  \begin{frame}   \frametitle{shifted}    \figz{text 1}{0}{0}   \figz{text 2}{0}{0}  \end{frame}    \end{document}

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?


I was trying to setup a permanent alias. but ~/.bash_aliases file not found on my system. I have checked the bashrc file and it shows bash_aliases are enabled. I tried creating a new file in the same name in home directory and putting the aliases. But it also didn't work. Any solution to set a permanent alias?  Also i would like to know whether I can set an alias for shell that I created and it is residing in some other path. Thanks in advance.

If you create an alias for example:   alias cls="clear"   It exists untill you kill terminall session. When you start a new terminal window the alias doesn't exist any more. How to create "permanent" alias, one that exists in every terminal session?


I would like to pass array as an argument to function Blink and print out each element; however variable count from Blink function returns 1 as a number of elements in array H   int main(){ int H[] = {1,2,3,4,5,6,7,8,9}; Blink(H);}  void Blink(int myArray[]){ int count = sizeof(myArray)/sizeof(myArray[0]); printf("Size of the array is %d\n", count); for(int x=0; x<count; x++){     printf("%d ", myArray[x]); } printf("\n");   }  Please, suggest where is a mistake and how can i fix it?

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


So, I want to convert a string into a Title Case string. I've written this code but I get the same string in lowercase when I run this. Could anyone please point out where I'm wrong with this? Any help is much appreciated.   function capitalize(str) {     return str.toUpperCase(); }  function titleCase(str1) {     str1 = str1.toLowerCase();     var arr = str1.split(' ');     var l = arr.length;     var m;      for (var i = 0; i < l; i++) {         m = arr[i].length;         for (var j = 0; j < m; j++) {             if (j === 0) {                 arr[i][0] = capitalize(arr[i][0]);             }             else {                 arr[i][j] = arr[i][j];             }         }     }     return arr; }  titleCase("I'm a little tea potty");

Is there a simple way to convert a string to Title Case? E.g. john smith becomes John Smith. I'm not looking for something complicated like , just (hopefully) some kind of one- or two-liner.


I have the following string:  foo  1  2  3  bar ! !  2  3  bar !   And I would like to match:  foo  1  2  3  bar !   My current regex is (?s)foo.*! , but that matched everything  Here is my regex example:

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I have a data table that looks like this (Not my table can't change the data)  Code     Version    Description AAA      0.0.0.0    Test of AAA AAA      0.0.0.1    Test of AAA BBB      0.0.0.0    Test of BBB CCC      0.0.0.0    Test of CCC CCC      0.0.0.1    Test of CCC   I want to return a list of unique "Code" values only. So my desired result will be:  AAA   Test of AAA BBB   Test of BBB CCC   Test of CCC   I've created a comparer class:  public class MyComparer : IEqualityComparer<MY_DATA_TABLE> {     public bool Equals(MY_DATA_TABLE x, MY_DATA_TABLE y)     {         return x.CODE == y.CODE;     }      public int GetHashCode(MY_DATA_TABLE obj)     {         return obj.GetHashCode();     } }   and in my code I have:  var mapCodes = (from mtc in GetAllData() select mtc)                     .Distinct(new MyComparer ())                     .ToList();   However it is still returning the entire contents back.  How can I achieve getting a distinct list by property?

I am playing with LINQ to learn about it, but I can't figure out how to use Distinct when I do not have a simple list (a simple list of integers is pretty easy to do, this is not the question). What I if want to use  on a list of an Object on one or more properties of the object?  Example: If an object is Person, with Property Id. How can I get all Person and use Distinct on them with the property Id of the object?  Person1: Id=1, Name="Test1" Person2: Id=1, Name="Test1" Person3: Id=2, Name="Test2"   How can I get just Person1 and Person3? Is that possible?  If it's not possible with LINQ, what would be the best way to have a list of Person depending on some of its properties in .NET 3.5?


I noticed that in the revision history, reputation over 10K isn't displayed in the shortened format used in other places. For example, in  my reputation on ELL is displayed as "11251" but it is displayed as "11.3K" when looking at the question. Is that intentional, or an oversight? I don't know if it has always been that way and I just noticed it, or if this is something new. I prefer the shortened format, especially for users that have 100K or more reputation.

The user card in the revision list, for example , shows the exact amount of reputation:  This is not consistent with how the flair works on (all?) other places in the site, e.g. under a post. There, the amount is displayed in units of thousands (k):  (or, in , millions (m).) It used to be consistent, see e.g. :


I am traveling to Greece.  I will be traveling from New York JFK.  I have a 15-hour long layover in Madrid, Spain, which is a part of the Schengen area.  I would like to know if can go out of the airport, showing my Schengen visa, and come back later to catch my connecting flight to Greece.

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


PLEASE NOTE: deserializeUntyped not deserialize! I currently loop trough a jsonPayload which is working fine for the nodes of the first level.How can I achieve this for the node(s) of the second level without knowing the Keyset names as the first level. Please note that deserialize would not work since the Json is not known beforehand. I would like for the second level to end up with the corresponding nodes something like string levelResource_1 = '{   "Opp": [     {       "Oname": "Opp1",       "CLdate": "02-02-2021",       "Aname": "0019Y00001GAZDxZLX"     },     {       "Oname": "Opp2",       "CLdate": "03-03-2021",       "Aname": "0019Y00001GAZDxZLX"     }   ] }'  Currently working jsonPayload example:     {   "Accts": [     {       "jname": "Alice",       "P": "+00 0600000000",       "Showstopper": true,       "Empl": "1-10"     },     {       "jname": "Ben",       "P": "+00 0611111111",       "Showstopper": true,       "Empl": "11-50"     }   ],   "Cont": [     {       "lname": "Anton",       "Ph": "+00 0600000000"     },     {       "lname": "Bjorn",       "Ph": "+00 0611111111"     }   ] }  jsonPayload I want to traverse trough     {   "Accts": [     {       "jname": "Alice",       "P": "+00 0600000000",       "Showstopper": true,       "Empl": "1-10",       "Opp": [         {           "Oname": "Opp1",           "CLdate": "02-02-2021",           "Aname": "0019Y00001GAZDxZLX"         },         {           "Oname": "Opp2",           "CLdate": "03-03-2021",           "Aname": "0019Y00001GAZDxZLX"         }       ]     },     {       "jname": "Ben",       "P": "+00 0611111111",       "Showstopper": true,       "Empl": "11-50"     }   ],   "Cont": [     {       "lname": "Anton",       "Ph": "+00 0600000000"     },     {       "lname": "Bjorn",       "Ph": "+00 0611111111"     }   ] }  My Current apex   Map<String, Object> levelResource_0 = (Map<String, Object>)JSON.deserializeUntyped(jsonPayLoad);        List<List<sObject>> sobjects = new  List<List<sObject>>();     for(String keyLevel_0: levelResource_0.keySet()) {           system.debug('[UploadDocuments]levelResource_0.keySet(): ' + levelResource_0.keySet());                  List<sObject> Newsobjects   = traverseJson(keyLevel_0, levelResource_0);         sobjects.add(Newsobjects);         for(String keyLevel_1: levelResource_0.keySet()) {          //How to get keylevels of second level _1 ?? levelResource_1.keySet()?!         }     }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, navigate to the  tag.  This question and answer is owned by the community! If you can improve it and make it more useful, you're welcome to edit it.  I have a specific JSON structure in mind. I need to either deserialize this structure that's coming in from a web service, or I need to serialize data into this structure to transmit it to another system. How should I get started on this project in Apex?


I'm trying to figure out which magazines I'm missing. They have different covers so they are obviously able to be identified separately. I want to know if there is a list that shows a picture or description of which magazines can be found where. This way I can compare that list to what I have already.  The wiki pages only have text descriptions of the locations, not the magazines themselves. Which means I have to rely on memory or guess and check work which would take longer than I'd like.

I've found a few magazines in the game but I've since sold them and forgotten which ones they were.  Is there any way to find out which ones I've found so far?


I have the path of a file stored in a variable (say) filePath. I would like to copy that particular file to another specific folder within a Python script.   I tried   folderPath = (os.getcwd() + "/folder_name/") #to get the path of the folder shutil.copyfile(filePath, folderPath)   But I got an error  IOError: [Errno 21] Is a directory.  How can I solve this ?  My question might seem to be  a duplicate of . But actually, I want to copy a file to a folder/directory whereas most answers to that question mention copying one file to another file.

How do I copy a file in Python?  I couldn't find anything under .


I have tried to mount my 32GB USB Drive for a while now. Every time I do, it tells me "mount: only root can do that"  HELP

I've installed Ubuntu 12.04 along with Windows 8.1. When I tried to open the C: drive in Ubuntu a window is popping out saying to run this command:  mount -t ntfs-3g -o remove_hiberfile /dev/sda2 /media/2A36EE3236EDFEA7   After running the command I'm getting the error mount: only root can do that.   What should I do?


I use 18.04 LTS on a dual-boot Samsung ATIV Book 8. All was fine until this afternoon, when Software Updater informed me of new software updates awaiting. Didn't check which ones--hit OK. After, opened terminal and sudo apt upgrade. A couple upgrades happened.  Hit reboot. System reboots, get "ubuntu' screen, then a stream of messages. No boot.  Tried recovery mode. No luck. Tried reverting to earlier kernel. No luck.  NOT a "boot to black screen." See image attached.  Am I looking a complete partition reinstall in the face?

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


def main():     row = 5     col = 3     count = 0     board = list([[""]*col]*row)     for i in range(0,row):         for n in range(0,col):             board[i][n] = str(count)             print board[i][n] , count, i, n             count+=1      print board main()   When I run this code, I expect my list to be :  [[0,1,2],[3,4,5],[6,7,8],[9,10,11],[12,13,14]]   and when I print the individual indices inside the loop, it assigns properly but after exiting the loop, I fine the output ends up being   [[12,13,14],[12,13,14],[12,13,14],[12,13,14],[12,13,14]]

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


is their solve to my problem i was used kali and ubuntu and windows 8 but when am install new windows boot menu disappeared and my laptop log into windows automatically all time

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


I have a new 32-bit ubuntu and tried to download wine1.6. I followed the instructions on the winehq site but the response was that I had to "chose an application" to proceed. Having got no further with that I used the terminal window and with sudo apt-get install wine1.6.  That was running quite well but a window labelled "configuring ttf-mscorefonts-installer" appeared which looked like a standard terms and conditions. There was an "" in the window but it was not cursor sensitive nor did "return" have any effect.  Ideas, please!

After a recent update, ttf-mscorefonts-installer prompted me to accept its license agreement.     ┌─────────────────┤ Configuring ttf-mscorefonts-installer ├─────────────────┐  │                                                                           │   │ TrueType core fonts for the Web EULA                                          │                                                                               │ END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE                             │                                                                               │ IMPORTANT-READ CAREFULLY: This Microsoft End-User License Agreement           │ ("EULA") is a legal agreement between you (either an individual or a          │ single entity) and Microsoft Corporation for the Microsoft software           │ accompanying this EULA, which includes computer software and may include      │ associated media, printed materials, and "on-line" or electronic              │ documentation ("SOFTWARE PRODUCT" or "SOFTWARE"). By exercising your          │ rights to make and use copies of the SOFTWARE PRODUCT, you agree to be        │ bound by the terms of this EULA. If you do not agree to the terms of          │ this EULA, you may not use the SOFTWARE PRODUCT.                              │                                                                               │                                  <Ok>                                         │                                                                           │   └───────────────────────────────────────────────────────────────────────────┘    Screenshot:   For some reason my terminal will not allow me to accept, or for some reason I am pressing the wrong hotkey...  I've tried every letter on the keyboard and Enter among others...  I'm sure there is a very simple and obvious solution to this.  I've also just tried to remove the package completely however the terminal states that due to the package not being correctly installed, I should reinstall the package before removing it.  Very frustrating!  Essentially, because I cannot successfully install this package, I can't really ever upgrade my system because I always have to end up terminating the terminal with the license agreement (thus the upgrade fails).


I'm trying to add an Aquila to the chest plate of a space marine I'm modelling. Is there a quick way to morph an object around another object as per the picture I attached?

I have seen other similar questions but they don't seem to be what I want, please correct me if I'm wrong.  For simplicity: delete the default cube, NumPad7, add cylinder, rotate X 90, then add torus with ext/int 1/0.75 and raise it above the cylinder. It should look like this:.  What I want is to deform the torus against the cylinder, but make it as if it's a projection. This means that, when looked from above, it will look like a normal, undeformed torus (volume changes), but when viewed with NumPad1, it will look like a round-end tube following the curvature of the cylinder, while still having the same round cross-section. To make it worse, my object needs to be deformed by a more complex surface, such as sin(x).  If I'd use soft body, it will look shrinked when looking from above, i.e. it will preserve the volume. If I use shrinkwrap, it either does a projection with its circumference intact, but all flat, or it will project it (similar to what I want), but only the bottom side vertices, like a curtain.  Mesh modifier gets me nowhere since I have to manually tweak the surrounding mesh, and curve modifier also preserves the length/volume, while also squishing the section of the torus at the bending points.  My question(s): is there a way to project (mold) the torus onto the cylinder while preserving it's cross-section? Can this be extended for more complex meshes to be projected or to be projected on?    This is, roughly, what the side view (along Y axis in the 1st pic) would look like after the deforming of the torus:    The unselected shape above is the torus (as it is in the first picture), and the selected shape is what it would look like after the deform, or molding, whatever you want to call it.  And here is what it would look like when seen from above (top view, along Z axis)): i.stack.imgur.com/HVOCo.png (can't add more than 2 pics)  The view would be the same before and after the torus is deformed.


I am new to python and I am using simple gedit application on linux machine to write python code, however its very difficult to manage the indentations of my code. I am looking for any Python IDEs that provides some functionality and should not slow down my P4 machine.

What IDEs ("GUIs/editors") do others use for Python coding?


Does there exist a $2×2$ matrix such that $A^2 \neq 0$ but $A^3=0$? Prove or disprove it.   I figured out that if such matrix exists, then A cannot be invertible, and because A cannot be a zero matrix (easily proven), A must have rank $1$. This can be seen as an extension question of nilpotent matrices. More generally, does there exist a $n × n$ matrix such that $A^n \neq 0$ but $A^{n+1} = 0$?

$A$ is a $n\times n$ matrix such that $ A^m = 0 $ for some positive integer $m$.   Show that $A^n = 0$.   My attempt: For $n > m$, it's obvious since matrix multiplication is associative.  For $n < m$, $A^n\times A^{m-n} = 0$; not sure what to do next. Also I know that $\det A = 0$.


Background I have Ubuntu 16.04, with Cinnamon 3.2.2 Desktop. I am trying to install a new theme inside Cinnamon. In the Settings panel, I find themes, but when I try to install them I get a 404 error:  I tried looking up the themes online from the "More Info" link, and I can download a zip file. However, I don't know where to put it. Question Where do I put the themes that I have downloaded?

I've reading about about the Cinnamon Desktop through this Q&A:  Also I've been reading these theming questions:     I'm trying to understand downloading & installing themes.  I see that I can download GTK2 & GTK3 but I'm unsure I understand the differences. I see there are themes such as Unity Themes, Gnome-Shell themes from websites such as  How do I apply these themes to Cinnamon?  I'm new to Cinnamon so a beginners guide would be very useful.


I am reading field theory.  I dont understand the following fact:     What will be a basis of $\Bbb R(t)=\{\frac{f(t)}{g(t)}:f(t),g(t)\in \Bbb R[t]\}$.   I know that $\Bbb R(t)$ is a field and hence a vector space too over $\Bbb R$.  Also a basis of $\Bbb R[t]$ is $\{1,t,t^2,\ldots ,t^n,\ldots\}$  But how to find  a basis of $\Bbb R(t)$?

Can anyone give an explicit basis of the $k$-vector space $k(X) = \operatorname{Quot}(k[X])$ of rational functions over $k$?   The dimension is given by $$\dim_k k(X) = \max(|k|, |\mathbb N|).$$  If $k$ is infinite, this follows from $|k| \leqslant |k(X)| \leqslant |k[X] \times k[X]| = |k \times k| = |k|$ and the linear independence of $\lbrace \frac{1}{X - \alpha} \mid \alpha \in k\rbrace.$ If $k$ is finite, the result can be obtained similarly from $|k(X)|=|\mathbb N|$ and the linear independence of the monomials $X^n$, $n \geqslant 0$.


Aulë created the first 7 Dwarven fathers, from whom 7 Dwarven clans rose. But how did they reproduce into even more clans, if it's known that the first Dwarves were men, and Dwarves reproduce sexually?   Duplicate This question is not a duplicate of  because my question asks how did dwarves reproduced if in the beginning there were no female dwarves, while  asks the general origin of dwarves, so please remove the duplicate flag.

After watching the movies, I was left wondering: where do the Dwarves come from? Do they all originate from the same place, or do they have different "countries"? Also, are the dwarves we meet all related to each other?


Why does a % decrease of a number not equal the same % increase when you reverse the calculation?  ie: $30 less 20% = $24.00   Reverse calculation  $24 plus 20% = $28.80  Please explain

Tried my best with the title. Ok, earlier while I was on break from work (I have low level math, and want to be more fond of mathematics)  I work retail, and 20% of taxes are taken out, and I am wanting to find out how much I made before 20% is taken out.  So I did some scribbling, and this is without googling so please be gentle. but lets say I make 2000 dollars per paycheck, so to see how much money I get after taxes I do 2000 * .8 which gives me 1600. I can also do 2000 * .2 which gives me 400 and then do 2000 - 400 (imo I don't like this way since I have a extra unnecessary step)  Anyways, I was pondering how to reverse that to have the answer be 2000, and what I did was 1600 * 1.20 (120%) which gave me 1920, and I thought that is odd so I did 1600 * 1.25 and answer was 2000 exact.  My question is why did I have to add extra 5% (25%) to get my answer? I am sure I did something wrong, and I fairly confident the formula I am using is a big no no.  edit; wow thank you all for your detailed answers. I am starting to like mathematics more and more.


A user  which added useful information to one of my answers. However, because it was a substantial edit, it was rejected by the reviewers. That's fine. However, as the owner of the post I would like to be able to overrule their decision after reviewing the edit myself (as I was encouraged to do by the notification in my inbox).  Currently, I had to open the edit suggestion in a different tab and manually copy and paste over the changes from the markdown diff to apply the changes. This seems laborious and doesn't give credit to the user who suggested the edit.  Request:  I would like a button on the suggested edit page, visible to the owner of the post, which applies the suggested changes, preferably just as if it had been accepted by the reviewers (i.e. giving credit to the editor and the +2 reputation for editing, if applicable).  Related discussions: (note that since this is a feature request, these are not duplicates)

When new users edit a post, the review is posted to a review queue and other reputable users can review the edit and choose to approve or reject it. However, I feel that a lot of people do it pretty quickly.    to . He was fixing broken links in the answer, and as soon as I saw it I knew it would have been a good edit. However, only one reviewer found so, and three others rejected it. I ended up manually doing the edit, and poor Onato didn't get any credit for it (in fact, he got an undeserved 'rejected' for it).  The point I want to bring is that, first and foremost, the person who wrote the answer probably knows best if an edit is acceptable or not. Could there be a time frame where the author of the answer (or question) can overturn a review decision?    EDIT: one more  was rejected by overeager reviewers as well. I absolutely disagree with the notion that the community knows better. The community repeatedly proves that it only wants Internet points.    EDIT: I told a commenter to fix something himself in one of my posts, but . I went back and applied the changes myself. It's not credited to him and his stats got a rejected edit now (which really should be an approved edit). The reason ("This edit is incorrect or an attempt to reply to or comment on the existing post") is blatantly wrong and shows once more that the community has much less insight into edit quality than the people who wrote the answers in the first place. It's true that the UI didn't make it easy for them, but those guys clearly didn't read the comment thread; I did, because as the author, I was notified.    EDIT: This time around, a user fixed a blatant (though small) mistake in one of my accepted answers. One hour later, another, unrelated 10k user , even though it had been approved by the community. I went back to undo his undo.  This goes on again to show that an active user is the best judge for the quality of an edit, and that since I can have the last word on edits on my own posts, I should be allowed to retroactively overturn a community edit vote and accordingly credit the person who proposed the change.    EDIT I wrote a  years ago. Some guy found it and tried to fix it but the community thought that it wasn't worth it. I think that the changes are great and once more I'll integrate them by myself into my post. Unfortunately for this user, he won't be credited for it. I still don't understand why I can't have a binding vote on edits on my posts.


ok so my friend told me that in a container, the pressure exerted by the walls on the liquid in the container act in the upward direction.Is he correct ? so what I am imagining is a cylindrical container kept on the ground. according to me the pressure by the wall of the container should act perpendicular to the surface of the wall.Am i going wrong somewhere ? Any help would be appreciated.

from a while ago and answers/comments to  from earlier today both make heavy mention of the fact that fluid pressure is a scalar.  Although this information was surprising to me, it makes sense intuitively, especially when considering Pascal's Principle and liquid depth pressure.  However, I struggle when thinking about the mathematical reasons why pressure is a scalar, and the answers to the first question linked either appealed to intuition, seemed contentious, or unsatisfying.  My confusion comes from the fact that pressure is often defined at the high school/undergrad level as $$P\equiv \frac{F}{A}$$ where this not just a relationship, but often presented as the equation definition of pressure.  Force is a vector, and I had assumed that area was a scalar.  Therefore, I had always figured this was a scalar multiplication problem, and the product would also be a vector.  Now that I know that pressure is a scalar, I just can't see how you would get a scalar for pressure out of this relationship.  I see two possibilities:  1) For reasons I don't currently understand, area is treated as a vector in continuum physics.  As a result, some type of vector algebra must be applied to divide a vector by another vector in order to yield a scalar.  If this is the case, I would like to see at least a framework for this math in the answer.  2) If possibility 1 is not the case, then the other possibility in my mind is that $P=\frac{F}{A}$ is not truly the definition of pressure, and there exists some more basic definition for pressure that would explain its scalar nature.  Are either of these explanations correct, or is there a third possibility that I have not considered?  I've tried to make this a substantially different question than either of the other two questions that I've linked to, but if that does not appear to be the case, please let me know.


I am trying to write a Python script that will find prime numbers. In the way that I am going about this, the script is going to take a number from a range, determine the factors, determine if the only two factors are 1 and itself, and return true if it's a prime number. I need help with my code to find the factors.   num = int(input("enter: "))  i = 1  while i < num:   if num % i == 0:     print(i)     i += 1   else:     pass   The i is set to 1 because you can't divide by 0. However, the return starts to work, however, it only returns a couple of numbers, not the full list that I am hoping for. For example, you input 20, it returns only 1 and 2.

Here's the very dumb way:  def divisorGenerator(n):     for i in xrange(1,n/2+1):         if n%i == 0: yield i     yield n   The result I'd like to get is similar to this one, but I'd like a smarter algorithm (this one it's too much slow and dumb :-)  I can find prime factors and their multiplicity fast enough.  I've an generator that generates factor in this way:  (factor1, multiplicity1) (factor2, multiplicity2) (factor3, multiplicity3) and so on...  i.e. the output of   for i in factorGenerator(100):     print i   is:  (2, 2) (5, 2)   I don't know how much is this useful for what I want to do (I coded it for other problems), anyway I'd like a smarter way to make  for i in divisorGen(100):     print i   output this:  1 2 4 5 10 20 25 50 100     UPDATE: Many thanks to Greg Hewgill and his "smart way" :) Calculating all divisors of 100000000 took 0.01s with his way against the 39s that the dumb way took on my machine, very cool :D  UPDATE 2: Stop saying this is a duplicate of  post. Calculating the number of divisor of a given number doesn't need to calculate all the divisors. It's a different problem, if you think it's not then look for "Divisor function" on wikipedia. Read the questions and the answer before posting, if you do not understand what is the topic just don't add not useful and already given answers.


There's a difference of almost 6.14GB regarding how much free space both methods report.  What's going on here? How much free space I actually have?  (The mounted image is very small, non worries about that)

I cleared space on my disk by deleting files and emptying trash. But, I am unable to make use of the space that I freed up. That is, as you can see the disk reports 142 GB as Available with 83 GB of that as purgeable.    So I should have plenty of space to to copy over a 70 GB file onto the disk. Yet when I try I get an error stating "Not enough disk space to copy", like the following image shows:    How do I clear out the purgeable space to make it truly available for use?  I've tried rebooting in the hopes that a restart clears out the purgeable area, but had no change trying that.


I'm on 14.04 about to move up to 18.04. In that version of Ubuntu can I have a folder and a file in the same location with the same name?   My use case is that I have html files without the .html extension, that I push up to AWS S3, where I serve a few websites. Leaving off the .html extension enables me to have clean urls for the websites. And S3 is perfectly happy to have directories and files with the same name, and thankfully they serve the html file rather than a folder if you navigate to the URL that is a file and a folder.   This would be a nice to have in Ubuntu. I could have an html file called 'articles' and a folder called articles, and then my URLs would be "RESTful."  example.com/articles/title would give you the article with that title, and example.com/articles would serve up a list of articles.   Anyhow, AWS already does this, I was just hoping Nautilus, or Ubuntu could handle this so I don't have to go through an awkward coding nightmare where my local directories have different names from my server directories.   Does this work in 18.04 or can anyone think of a good work-around?

In Ubuntu why can't I have a folder named "MyFile" and a document named "MyFile" at the same location? I get an item already used in this location error. Does Ubuntu / Linux treat folders and files as same objects (pointers to disk)?


I would like to transform $$0 = D u P''(u) - (D+G u)P'(u) + (G-Vu)P(u)$$ into a common differential equation. It's my understanding that since this equation has less than three regular singular points ($u = 0$ and $u=\infty$?), my equation should transform into the Hypergeometric differential equation: $$ z(1-z)y''(z) + [c-(a+b+1)z]y'(z) -a b y(z) = 0 $$ for a suitably chosen $y$ and $z$. Is there any systematic means by which I can find the correct transformation between my variables $P$ and $u$ and the standard form variables $y$ and $z$?

I'm trying to transform an equation of the form $$ yw^{\prime\prime}(y) - [b - ay] w^\prime(y) - [d + ey]w(y) = 0 $$ into the form of a Kummer's or confluent hypergeometric differential equation: $$ y w^{\prime\prime}(y) + [f - y] w^\prime(y) + g w(y)  = 0 $$ I know it may have something to do with merging two of the singularities of the original equation, and maybe doing something with $y$, making it $\frac{y}{b}$ and taking b to infinity, but I don't know and can't find the details for this process, and for my equation specifically. There's not too much difference between the two but just enough so that I can't get it. Thanks in advance for any help!


I have just installed ubuntu 16.04 and installed Japanese and Thai, I've followed the steps which I found in other posts for how to get Japanese working. However, when Thai is also installed a strange thing happens. If I switch to Japanese and start typing, it works ok.  But if I switch to Thai, then when I go back to Japanese it doesn't work - the language bar icon says Japanese but it still types in Thai.  I've tried changing the input modes but that doesn't help.  I can get the Japanese working again by going to Text Entry setttings then clicking on Japanese (Mozc) (IBus), then clicking on the little tool icon and then 'restore defaults', but if I cycle through the languages again it causes the same problem again.  Does anybody know if there's a way that I can switch back and forth between English, Thai and Japanese without this problem?  I know that this is probably not a problem that many people are going to encounter as it's an odd mix of languages.  Thanks for any help.

There were a set of extra steps I needed to take with Ubuntu 14.04 that got Japanese text input working, but the same steps seem to not apply to 16.04.  The system toggles between "En" and "Ja", but all it's doing (functionally) is switching from an English keyboard layout to a Japanese keyboard layout.  I installed in English with my location in Japan, which triggered Japanese language support (which isn't working).  I also tried a clean install in Japanese that installed all menus, etc. in Japanese, but also had non-functional Japanese input, so I did a third install in English again - with Japan as the local - which is where I stand now with it.  Any help with this issue greatly appreciated, as I need to be able to input Japanese text.


How to align (9) A to right?  \documentclass[12pt,a4paper]{report} \begin{document} \begin{description} \item [Hlavní poloosa] (9) A \\ $a$ může být určena  \end{description} \end{document}

I am trying to align some text to left/center/right in the same line. For example, I want to put my phone number on the left, my name in the center, and my email on the right, how do I do that?


I am trying to insert multiple rows into my table using the below query : INSERT INTO TABLE2(ID) VALUES(1),(2) .It is showing SQL Command Not Ended. Is it some syntacital error?I have rechecked but still not clear what's going wrong.


How to solve given Recurrence Equation $a_n = 6n^2 + 2n + a_{n - 1}$ ?  Given $a_{1} = 8$  Find the value of $a_{99}$ ?    Is there any procedure or approach for such questions ?


When I try to play multiplayer I type in the only server I know, which the game says was right, then click Play and it loads. Then it says Can't connect to server: bad log in. How can I fix this?

Similar to  on the bugs in Minecraft, I would like a complete list of what error codes exist in Minecraft and how they occur, as well as how they can be resolved.


I am currently watching a beginner tutorial on youtube and in the middle of the video, my blender suddenly crashes. When I open up my saved blender file I only got a colorless object even I already apply color to the object. But when I go to preview render (F12) it shows the color.  BTW, I set the render engine to cycles. That is probably the cause of the crash

This image is what's supposed to look like in Edit Mode/Object Mode(although I still can make these screenshots even after the update by pressing F12 which is rendering) but the following is what my donut looks like now in Blender.  It shows no shadows and colors. The only thing I did is updating blender to 2.81 from 2.80. And I don't know what but something seems off with blender. Sometimes I can't click any objects so I just pressed tab and then now it's all clickable. Seems like I was in edit mode, but to me, it looked exactly like object mode. I don't know what is wrong with it. How do I make my colors show up again?


I have read answers stating that light is not able to be transmitted through a wall whereas sound is easily transmitted due to difference in wavelength. But, why? I am looking for detailed and satisfactory answer. Please also include the reason of WIFI signals easily transmitting through any media as compared to sound.

When I sit in a room I can hear voices coming from the adjacent room but the light in adjacent room does not enter my room i.e. sound waves travels through the wall but light waves can't. Why?


As I recall, a tank knocked Iron Man in the first MCU movie, but he survived (with some black spots on the armor).  AFAIK, Vibranium is in limited supply in the MCU (Captain America's shield). Tony created Vibranium (Tony might call it Badassium) in Iron Man 2, and that's also in limited supply.  So what material is Iron Man's armor made of? It doesn't look like iron to me.

What kind of material is the Robert Downey Jr. Iron Man's armor supposed to be made from? I know he crafted the prototype from the things he had on hand, but once he was able to build the next one(s) in his own lab, what hi-tech material did he use for the movie armor?


I need to delete all the cookies and form datas when the page loads.  I have tried this one..  $.cookie('my_cookie_name', null);   Here, my_cookie_name is set to null i.e using the particular cookie name, the value is set to null. But, I need to delete all the cookies as well as form data when the page loads.  Is it possible using javascript or jquery?

How do you delete all the cookies for the current domain using JavaScript?


I'm new to PHP and programming, but I started building my own website, which will need a registration site woth the following PHP code:  <?php $fnameErr = $lnameErr = $emailErr = $pwErr = $pw_confErr = ""; $fname = $lname = $email = $pw = $pw_conf = "";  function test_input($data) {   $data = trim($data);   $data = stripslashes($data);   $data = htmlspecialchars($data);   return $data; }  if ($_SERVER["REQUEST_METHOD"] == "POST") {   if (empty($_POST["fname"])) {     $fnameErr = "(Please submit first name)";   }    else {     $fname = test_input($_POST["fname"]);   }    if (empty($_POST["lname"])) {     $lnameErr = "(Please submit last name)";   }    else {     $lname = test_input($_POST["lname"]);   }    if (empty($_POST["email"])) {     $emailErr = "(Please submit email address)";   }    else {     $email = test_input($_POST["email"]);     if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {       $emailErr = "(Email address is not valid)";      }   }    include ("email_compare.php");    if (empty($_POST["pw"])) {     $pwErr = "(Please submit password)";   }    else {     $pw = test_input($_POST["pw"]);     $pwHash = password_hash($pw, PASSWORD_DEFAULT);   }    if (empty($_POST["pw_conf"])) {     $pw_confErr = "(Please confirm password)";   }    else {     $pw_conf = test_input($_POST["pw_conf"]);   }    if ($_POST["pw"] !== $_POST["pw_conf"]) {     $pwErr = "(Please confirm password)";     $pw_confErr = "";   }     if (empty($fnameErr) && empty($lnameErr) && empty($emailErr) && empty  ($pwErr) && empty($pw_confErr))   {     include ("db_add.php");      header('Location: register_success_en.php');     exit;   } } ?>   I just found out, that data, that should be included into MYSQL should be escaped by mysqli_real_escape_string, but I already use my test_input function, which, in my opinion, has the same effect.  So my question: is the test_input function sufficient or should I also use mysqli_real_escape_string?   Thanks in advance!

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


I was recently working on a project and needed to use Ubuntu for a coding segment.  I replaced my Windows system with Ubuntu 18.04, but what I actually needed was on Ubuntu 16.04.  I have the ISO on an external hard drive and I have been trying to install it in GRUB.  To no avail, I have looked across many other forums and none relate to my current situation.  Any help would be great. Thanks.

I just installed a new version of Ubuntu and I want to roll it back to the previous version.  How can I do that? Is that even possible?


Given matrix $A$, we square it. We found the eigenvalues and eigenvectors for $A$. If we square $A$ (or it to a power of any number $n$), do the eigenvalues become squares (or to the power of any number $n$), while the eigenvectors remain the same?

The question is: Prove that if $\lambda$ is an eigenvalue of a matrix A with corresponding eigenvector x, then $\lambda^2$ is an eigenvalue of $A^2$ with corresponding eigenvector x.  I assume I need to start with the equation $Ax=\lambda x$ and end up with $A^2 x=\lambda^2 x$ but between those I am kind of lost. I have manipulated the equations several different ways and just can't seem to end up where I need to be. Help would be greatly appreciated as I believe this will be on a test tomorrow.


In many textbooks and online answers I have heard people go on about how time dilation accounts for the gap of time experienced between two observers. However, they continue that in reality this is not enough and we must have length contraction as well to truly close the gap.   From an intuitive perspective, can't time just slow down a lot and then this can cover the gap in time all by itself? Why must there also be length contraction to help cover the gap? Can't time just slow down more? I would really like to understand this on both the intuitive and mathematical level.

Please will someone explain what time dilation really is and how it occurs? There are lots of questions and answers going into how to calculate time dilation, but none that give an intuitive feel for how it happens.


Almost everywhere I see the statement that diffraction gets stronger when the size of the slit is comparable to the wavelength. I would just like to know the logic behind. Could anyone help me please? I really need a simple and concise explanation. Thanks :)

Almost in every book on physics we can find a statement like "diffraction gets stronger when the size of the slit is comparable to the wavelength". Let's say we have a wall in a bathtub with a slit in it. When water waves reach the slit, the books usually come up with the Huygens' principle to explain that the points on the wavefront which are near the edges interfere in some fancy way so that the water waves spread out radially. However I do not see any connection between the size of a slit and the wavelength. I do understand that if we have a really tiny slit, there are very few points on the wavefront which produce radial waves, and if the slit gets bigger, there are more points that produce the same secondary waves which eventually interfere in an interesting way. But what it has to do with the wavelength? If we have a tiny slit and even more tiny wavelength, how does this change the game?  So for example, if we have a big wavelength, the diffraction would be:    But if the wavelength gets smaller while the slit remains the same, I'd expect the very same diffraction with the only difference that the resultant wave will have a shorter wavelength:


what is dialout group in ubuntu?what permissions do the memberships of this group have?I read about it that memberships can access to the serial devices. what are serial devices? thank you for your answers.

I know that some define permissions on the file system (such as www-data).  But I don't understand why  by adding a user to the "Video" group.  So the question is mainly what do all the pre-built groups do in Ubuntu?  More reasonably, since there are so many, what "special" groups exist and how or when should they be used?


This question's my profesors. I know, if function $f$ has a primitive in the range $[a, b]$, then function $f$ satisfies the intermediate value theorem in the interval $[a, b]$. But is the opposite true? Can you help me? "If function $f$ satisfies the intermediate value theorem in the interval $[a, b]$, then function $f$ has a primitive in the range $[a, b].$" Proposition is true? Why is true? Why is false?

I'm thinking about the primitive of an arbitrary function. As we all know, every continuous function has a primitive according to the Newton-Leibniz formula, $\int_{x_0}^{x} f(x) dx$ is the primitive of function $f(x)$. However, if $f(x)$ is discontinuous, say has a point of discontinuity of the first kind, the the integral has both left and right derivative, but they don't coincide. So the question is whether we are able to find a primitive for those kind of functions. Or more generally, what kind of function has a primitive?


Is it allowed to use Stack Exchange to find people who would like to work on a project?  I am basically looking for students who are interested in creating something to show to future employers.

No, not like this:    Hear me out!  As Stack Overflow grows, it becomes increasingly ridden with extremely newbie and mediocre questions. It's just natural. The team are fighting hard to keep the crap out, but there are many very basic questions that are okay on their own. They don't deserve to be kicked out* - they are just very, very, very basic and/or localized.   Too much basicness tires users who are interested in discussing more advanced topics.  As has been discussed many times over, the voting system is not suited to identify advanced questions due to what is known as the . A group of people will vote on what they understand, which puts truly expert questions at a natural disadvantage that a democratic voting system can't overcome.  Now, there is a small number of users on Stack Overflow who I, as a user, know share my basic values (like, teaching a man to fish rather than fishing for them); I also know they are experts in their fields. It is safe to assume that what these users regard an interesting question worthy of attention, is likely to be interesting to me as well.      The idea is to introduce an opt-in "follow" mechanism that allows followed users to share what they find interesting, with very little fuss and on a purely opt-in basis.   Allow every SO user to follow any other SO user with a certain minimum rep, say 3000.   To every user who is being followed (or every user), display a new link underneath every question, "Recommend".    Introduce a new filtered view somewhere, named "Recommended". The view will show me all questions that my followed users are recommending.   Whenever I browse a list of questions, highlight those questions that have been recommended by my followed users. (I haven't put much thought into how to implement this graphically - you get the drift.)      I'm not especially fond of social networking, and I think most of it doesn't have a place on SO. But I'm starting to think this specific thing could be the right way to go in order to tell apart expert content from the 10000th dreary "how do I upload a file" question.  This is an entirely opt-in feature - unless I actively follow some users, I will never notice this.   Maybe for a bit of ego-stroking, the profile page can show how many users follow you. Or even who. Everything else would simply be kept under wraps - no publication of follower data in the data dump, no follower leagues or anything like that.      * At least not under current SO rules. Maybe those rules need to be changed - but that is a different discussion.


Following function is used to upload a file. Now I want to cancel file upload on button click. How to do this?  function submitForm(form) {         var loader = new Loader({showPgBar : true});         var progressBar = loader.progressBar();         loader.show();         var data = new FormData(form);         data.append("category", "MEDIA_FILE");         var csrf_headerName  = $("meta[name='_csrf_header']").attr("content");         var csrf_paramValue  = $("meta[name='_csrf']").attr("content");         $.ajax({             type: "POST",             enctype: 'multipart/form-data',             url: URI.file.singleFileUploadUrl(),             data: data,             beforeSend: function (request) {                 request.setRequestHeader(csrf_headerName, csrf_paramValue);             },             processData: false,             contentType: false,             cache: false,             timeout: 1740000,  //29 minutes             success: function (data) {                 loader.hide();                 mediaFileMetaDataSave(data ,null);                 document.getElementById('media-file-form').reset();             },             xhr: function(){                 var xhr = $.ajaxSettings.xhr() ;                 xhr.upload.onprogress = function(data){                     progressBar.updateStatus(data);                 };                 return xhr ;             },             error: function (e) {                 loader.hide();                 toastr.error('Error has occurred while uploading the media file.');             }         });       }   Edit:  I have called the xhr.abort() like below. Although I clicked the cancelFileUpload button nothing happens. I have checked the console in browser. No errors appeared as well.  xhr: function(){             var xhr = $.ajaxSettings.xhr() ;             xhr.upload.onprogress = function(data){                 document.getElementById("cancelFileUpload").onClick = function(){                     xhr.abort();                 }                 progressBar.updateStatus(data);              };             return xhr ;         },   Why is this not working?

Is it possible that using jQuery, I cancel/abort an Ajax request that I have not yet received the response from?


I want to sort a text file with GNU sort, by the first field, with field separator ":":  $ cat aa a:895502/ a:2013-05-24 # without --stable, last resort comparison $ cat aa | sort -t: -k1 a:2013-05-24 a:895502/ # with --stable, should disable resort comparison $ cat aa | sort --stable -t: -k1  a:2013-05-24 a:895502/   The last output baffles me, since I expected to get back the contents of the original file. Any help will be very much appreciated.


Let’s say I have an immersion $f:\Omega \to \mathbb{R}^n$, with $\Omega$ an open set of $\mathbb{R}^n$. It is a local diffeomorphism (because its differential is injective and thus bijective), so it is an open map. If I restrict the image and consider it to be not $\mathbb{R}^n$, but $f(\Omega)$, it would also be surjective. The only way it could not be a diffeomorphism is to not be injective, so I was wondering: are there counterexamples? Maybe that work on all dimensions (I don’t see how to give a counterexample in dimension 1, but it might be a special case where there are actually no counterexamples, while in greater dimensions there are)

Does there exist a surjective immersion $\mathbb{R}^2 \to \mathbb{R}^2$ which is not a diffeomorphism?  I tried to modify $\exp: \mathbb{C} \to \mathbb{C}$ to be surjective, but I find it hard to preserve the property of being immersion.  I also noticed that if we replace $\mathbb{R}^2$ with $S^2$ or any other compact simply connected manifold, no such immersion exists, because then it would be a covering map (as a local diffeomorphism from compact space, thus proper), but since the manifold is simply connected, it must be a diffeomorphism.


Couple of questions on Black body radiations 1. Blackbody emits a  continuous spectrum. But blackbody is an idealized body. Do normal objects like a bulb or a table emit a continuous spectrum too.? 2. Does the blackbody radiation curve depend only on temperature.? If I have iron and copper at the same temperature of say 2000 degree Celsius; will they appear of same color.? similarly a table and chair at room temperature will their curve be same too.? I am assuming the different colors we see for the chair and table is due to reflected light. but the curve for emitted radiation will be similar.?

My understanding was that all objects emit light of continuous spectrum when hot ( black body radiation) but then you see discreet wavelengths in spectra lines and I am confused. I know I am making a mistake somewhere but not able to point it


What are some tips for LaTeX that produce search-engine friendly PDF files?  For instance, if one does nothing, the default header title of the PDF file is "My Title" when uploaded to the web, which surely cannot be good for search-engines.  Thanks for any input.

I am writing a document using LaTeX and generating PDF.  Can anybody tell me how I can generate the PDF metadata, e.g. author or title, from LaTeX?  On Windows XP, I am using MikTex's texify to generate the PDF.  On linux, I am using pdflatex to generate the PDF.  Any answers for either platform would be much appreciated!


I have the following latex file for the figures. The figures are read successfully but it does not align itself in the desired space between horizontal text lines, instead it jumps to the next page. For instance:  [first some sentences...........................................................................................................] [I want my figures to be in this line....................................................................................................] [Next some sentences.............................].      Please find my latex file below:  Let us consider the following graphs:   \begin{figure}{} \centering \begin{subfigure}{.5\textwidth}   \centering \includegraphics[height=5.8em]{C:/Users/abc/Documents/formula1}   \caption{Fig: $G_1~~~~~~~~~$}   \label{fig:sub1} \end{subfigure}% \begin{subfigure}{.5\textwidth}   \centering \includegraphics[height=5.8em]{C:/Users/abc/Documents/formula2}   \caption{Fig: $G_2~~~~~~~$}   \label{fig:sub2} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[height=7.8em]{C:/Users/abc/Documents/formula3} \caption{$G_1\triangledown G_2$} \label{fig:sub2} \end{subfigure} \label{fig:test} \end{figure} In the graph $G_1$, the pair of non adjacent vertices whose end vertices are not $G_2$ are (5, 4) and (5, 6).     Note. I want my figures to be aligned in the space between 'first some sentences' and 'next some sentences' as mentioned above, but here it jumps to the next page

Is there any package or a method to force LaTeX to keep floating environments like table and figure closer to where they are declared?


Wanting to know your opinion on two-sided apps.  I'm working on a project at the moment where there will be an app which a regular user would use and an app which a business will use (Similar to what Uber does).   The apps will function in a pretty similar way with some differences between the two, so not entirely the same.  The alternative to this would have a single app but include an option to sign up as a business or regular user.   My question is, when would you do one over the other?  Thanks in advance :)

I'm a designer and my company has a single app that serves two different types of user.   One group is the general public, who uses the app to navigate big events (e.g. annual user group meeting sessions, exhibitors, connect with other attendees).  The second group is staff. They primarily access the profiles created by general users. They can add details, e.g. notes about conversations with them.  We have been asked to provide more 'staff' functionality. The app is getting quite large. I remember hearing that an app shouldn't be too "deep" (I think at an NNG course probably 2 yrs ago)... I think we can avoid a drill-down nightmare, but am worried about how large the footprint is getting.  Is there a rule of thumb for when to create a separate app, vs. wedging a lot of functionality into one? And/or can someone point me to a resource?


In both media, when Animagi transform from beast to human, they are fully clothed. In the Prisoner of Azkaban film, we see Wormtail leave his clothes behind, as he transforms into a rat. What happened to them?

In Prisoner of Azkaban, Sirius Black transforms a couple times without any special attention given to his clothes - it's either implied or pretty explicitly presented that his clothes morph with him.  When Peter Pettigrew is first revealed, he is fully clothed after having just been transformed from his animal form.  However, later in the movie, Peter returns to his animal form and leaves his clothes behind - they fall off him before he runs off.  The incident that really caught my attention though, was the train station scene with Sirius Black in Goblet of Fire (or perhaps it was a different movie/book, I'm not sure).  Here, Harry must give Sirius a cloak because he has just morphed from his animal form without any clothes.  All of the above seems to represent a fair bit of inconsistency in the handling of clothes for animagi.  Are there any particular rules governing when an animagus may retain their clothes throughout their transformations?  My primary experience with the Potterverse thus far has been through the movies, so it may be the case that the books handle this differently and I just don't know.  Are the movies an accurate representation of the books, in this respect?  Do the books offer any further explanation for this?


I will soon start studying electrodynamics from Griffith's Electrodynamics. I tried to learn the math required from the first chapter but found that I couldn't understand it very well. So are there some good textbooks for learning multivariable calculus?

I am looking for a multivariable calculus book that is really physics oriented.  Anyone know of any?  EDIT: My wife is looking to brush up on multivariable at the same time she needs to brush up on the related physics.


I sent a manuscript for publication last month and I just got it back with major revision. There were two reviewers who peer-reviewed the manuscript and both seem to have different opinions regarding the content. One reviewer asked me to omit a graph as he/she deemed it to be useless and didn't add to study narrative while another one commented on improving the graph. They also have different views on sample size of my experiment. One of them though our sample size was small while another one agreed on sample size with only improvement on statistical analysis conducted. They also had divided views on study design. One of them thought our study design was flawed and we should go back to the lab to perform additional tests while another reviewer thought our study design was okay with only missing statistical analysis.  How should I approach this?

A bit of background, I am doing research in atmospheric physics and detection systems  Recently, I received a paper submission back with revisions suggested by a couple of reviewers.  For the most part, the revisions were definitely constructive, justified and most importantly, helpful.    That is, except on one particular crucial aspect of the paper where both reviewers made suggestions, that they labelled as critical for the paper's success.  However, the suggestions were directly opposite.  i.e. Both suggestions are mutually exclusive, but equally feasible.    What is an effective means to address this conflict?  I have spoken to my academic supervisor and he is not sure how to proceed either and we have double checked and both suggested paths are feasible.


This is a question that I have been struggling with for quite some time.  I work with kids at a math tutoring center, and one of the things we do is work on the multiplication facts.  We use a standard 52 card deck, numbered 0-12, with 4 of each value.  We begin by flipping one card face up.  This is the number the student will work on.  The instructor then flips one card at a time until all 52 cards are used.  After doing this for a few days I started to notice that cards of the same value would come up back to back quite often.  So I began to wonder...  What is the probability of flipping through the entire deck without ever having 2 cards of the same value coming up back to back?  I believe that the probability is reasonable, because I have flipped through a deck a few times without repeating a value.  However, I believe that the probability is rather low.  Any advice on how to approach this problem would be appreciated.

What is the probability that a shuffled standard deck of 52 cards has no two cards of the same rank together ?  I am unable to get a handle on this problem, and wonder whether there is an analytical solution ?


I am beginner in physics and i have some questions about Newton's third  law The law says :      When one body exerts a force on a second body, the second body   simultaneously exerts a force equal in magnitude and opposite in   direction on the first body   . now for my question if am exerting a force o 1 newton on an object according to the law the object exerts a force of 1 newton on me but in opposite direction. if the force is the reason for motion then how the object is moving if the sum of forces equals zero ? or it does not move ?

Given Newton's third law, why is there motion at all? Should not all forces even themselves out, so nothing moves at all? When I push a table using my finger, the table applies the same force onto my finger like my finger does on the table just with an opposing direction, nothing happens except that I feel the opposing force. But why can I push a box on a table by applying force ($F=ma$) on one side, obviously outbalancing the force the box has on my finger and at the same time outbalancing the friction the box has on the table? I obviously have the greater mass and acceleration as for example the matchbox on the table and thusly I can move it, but shouldn't the third law prevent that from even happening? Shouldn't the matchbox just accommodate to said force and applying the same force to me in opposing direction?


A friend has given me his old iPhone but it still has his Apple id on iTunes and the cloud and won't allow me access. How do I erase this and input my details instead

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


I found the Witch app (). Are there any other solutions?

After 4 years of being a Mac user, there is only one thing that I still miss from the Windows world, and that is being able to switch with a single keystroke between all open windows in the computer.  What is the best app or utility, free or not, for accomplishing that?  I've used , but I never was completely satisfied with it. It's a bit slow and the switcher UI is not very pretty.  Do you know any alternative?    EDIT (2016): This question keeps getting views and upvotes after 6 years. When I asked this question in 2010 I was still transitioning from being a Windows user. Eventually, I got used to Mac OS X UI and nowadays I don't use any third party utility for managing app windows, just Mission Control and the native keyboard shortcuts. So, although this question is no longer relevant for me I hope it is useful to new Mac users making the switch (Including this comment).


I am writing a java program. When I do 4.9E-324/2, it returns 0.0. Using BigDecimal returns the correct value. Am I missing something?  double x = 4.9E-324/2.0;  System.out.println(x); //result is zero System.out.println(BigDecimal.valueOf(4.9E-324).divide(BigDecimal.valueOf(2.0)).toPlainString()); //result is a non-zero value

public class doublePrecision {     public static void main(String[] args) {          double total = 0;         total += 5.6;         total += 5.8;         System.out.println(total);     } }   The above code prints:  11.399999999999   How would I get this to just print (or be able to use it as) 11.4?


Every time I try to install "WINE" VIA the Software Center on Ubuntu 12.10, I get this error:  The following packages have unmet dependencies:  wine1.4: PreDepends: dpkg (>= 1.15.7.2~) but 1.16.7ubuntu6 is to be installed          Depends: libc6 (>= 2.14) but 2.15-0ubuntu20 is to be installed          Depends: wine1.4-amd64 (= 1.4.1-0ubuntu1) but 1.4.1-0ubuntu1 is to be installed          Depends: wine1.4-i386 (= 1.4.1-0ubuntu1) but it is not going to be installed   When I try installing it VIA the terminal, this is what I get:  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:  wine1.4 : Depends: wine1.4-i386 (= 1.4.1-0ubuntu1) but it is not installable            Recommends: gnome-exe-thumbnailer but it is not going to be installed or                        kde-runtime but it is not going to be installed            Recommends: ttf-droid            Recommends: ttf-mscorefonts-installer but it is not going to be installed            Recommends: ttf-umefont but it is not going to be installed            Recommends: ttf-unfonts-core but it is not going to be installed            Recommends: winbind but it is not going to be installed            Recommends: winetricks but it is not going to be installed E: Unable to correct problems, you have held broken packages.   how do I fix this?

I upgraded on a fresh install to Ubuntu 12.10, and I've tried installing wine many times, but I always get this:  This error could be caused by required additional software packages which are missing or not installable.  Furthermore there could be a conflict between software packages which are not allowed to be installed at the same time. The following packages have unmet dependencies:  wine:   It won't let me install the dependencies either it says it needs another set of dependencies to install them. Using Asus KJ50 64bit OS, dual boot with Windows 7  sudo apt-get install wine1.5 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:  wine1.5 : Depends: wine1.5-i386 (= 1.5.15-0ubuntu1) but it is not installable            Recommends: gnome-exe-thumbnailer but it is not going to be installed or                        kde-runtime but it is not going to be installed            Recommends: ttf-droid            Recommends: ttf-mscorefonts-installer but it is not going to be installed            Recommends: ttf-umefont but it is not going to be installed            Recommends: ttf-unfonts-core but it is not going to be installed            Recommends: winbind but it is not going to be installed            Recommends: winetricks but it is not going to be installed E: Unable to correct problems, you have held broken packages.


In my application, I require a DC motor that can operate a fixed load at different speeds. Is this possible? I know for sure that torque varies with current and speed varies with the voltage. Does this mean that voltage has no effect on torque and that the dc motor will generate the same torque even at lower voltage?

I have a conceptual doubt about torque-speed relation in a DC motors. It's probably a gap in my thinking but I'm posting this question anyway.  Torque and speed in a DC motor are said to be inversely proportional. But doesn't an increase in torque result in increase in Angular Acceleration and consequently, angular speed?  I know that back EMF/counter-EMF is responsible for the inverse relation but it seems counter intuitive to me. What happens to the angular acceleration, angular speed when the torque is increased and where does all that work go?


In the Matrix 3 Smith apparently overwrote his program onto every human and program in the Matrix.  If the humans continued to supply energy to the machines in this state, why wouldn't the machines have done something like this since the beginning (but keeping it under their control)?   I understand that the machines needed a Matrix to foster biological and neurological activity, but it seems like the same thing can and was achieved with the administratively assigned personality of Agent Smith overwriting the more problematic independent minds of humans in the Matrix.  Wouldn't that have been far less problematic for them, if they could get the electricity without having to deal with all of the potential escapees, the "balancing of the equation", the building and rebuilding of the Matrix, etc, etc?

Agent Smith, in the first Matrix movie (The Matrix) talks about how the machines originally created a paradise setting and humans didn't accept it, so it went back and created a more realistic one that humans would accept.  The human bodies, as we've seen, are kept in tanks and the body is kept asleep.  But why did the Matrix need to provide any kind of simulation for the brain to experience?  Why couldn't it have just kept all humans in a medically induced coma?  Or performed something equivalent to a lobotomy on every human?  Why did the Matrix need to spend the resources to keep the humans in good mental shape?


I am trying to create a 2 dimensional int array of size 800. This is my code: #include <iostream> int main() {     int array[800][800];     std::cout << 1; }  My problem is that it never prints 1. I am using g++ as my compiler so it might have something to do with it's inner workings. Furthermore, I couldn't find anywhere on the web saying there was a limit (except for 2^32 and such) to the size of a c-style array. When I try creating one with size 700 it works just fine. Does anyone have an idea where this limit comes into effect and how I can overcome it?

Is there a max length for an array in C++?  Is it a C++ limit or does it depend on my machine? Is it tweakable? Does it depend on the type the array is made of?  Can I break that limit somehow or do I have to search for a better way of storing information? And what should be the simplest way?  What I have to do is storing long long int on an array, I'm working in a Linux environment. My question is: what do I have to do if I need to store an array of N long long integers with N > 10 digits?  I need this because I'm writing some cryptographic algorithm (as for example the p-Pollard) for school, and hit this wall of integers and length of arrays representation.


I am developing on 2 different stacks: quarkus and angular. In order to develop in dev mode (watch mode), I need to start both applications on different terminals:  quarkus is started from maven (mvn quarkus:dev), when it is ready it prints "Listening on:  but it keeps running angular is started with ng serve (through npm) (and it keeps running also).  The thing is, quarkus generates angular files (from openapi endpoints), so angular cannot be started before quarkus has printed the line (otherwise it doesn't compile). Is there any command line tool (for ubuntu) to start two commands at the same time, or even better the second command after the first has reached a given state? Thx.

I need a command that will wait for a process to start accepting requests on a specific port.    Is there something in linux that does that?  while (checkAlive -host localhost -port 13000 == false)   do some waiting  ...


I'm trying to find a simple and easy to understand example of a free module that has bases of differing sizes. We were told about the existence of them in class but no example was given.

Does somebody has an example where the left $R$-modules $R^m$ and $R^n$ are isomorphic for all positive integers $m$, and $n$?


I have a Samsung gs3 gt 19300 running on cyanogen mod 10.2 stable version, so far it has been smooth other than the  ram problem (which I also encounter when using stock ROM)   Whenever I restart, I often have around 300 + MB of free ram (after recent apps are all cleared)  however, a few days later, I find that my free ram drops to less than 100 MB (with all recent apps cleared as well)   Well I checked the list of running services on the background and their sizes, but there were the almost the same compared to when the first day after restart, but if the running services are the same, how come the free ram drops that much? What is the problem? Is it memory leak by apps? What's the best way to handle it?

I'm new to the ICS os, coming from Gingerbread from another phone. The phone's quite nice and fast when I first used it, but just this morning it started exhibiting weird actions. Camera360 doesn't open up automatically when I click it, the Camera closes for no reason, Pocket restarts when an article has an image, and TTPod resets the song to the previous song on my widget in the middle of a new song I'm playing.  I checked out the ram, and and was surprised to see 500+ mb used, 0 mb available. I looked at the list of programs and I see the usual culprits like Facebook, but the ram they're using doesn't add up to 500+ mb. Yeah, I know that the whole ram indicated isn't usable by the apps, but I don't think I've done anything to warrant the 0 mb. I close my apps. There are times when there's free 4 to 5 mb, but I think that too shouldn't be the case. I tried installing Advance Task Killer, it listed less than 10 apps, killed it, still the ram is what it is above.   I did a reboot, and now it reads 300+ mb usage, 200 something free.   What can I do? How do I ensure an app's closed on ICS? I installed GoLaucher because it has a handy task killer and I can see the ram freed in an instant, but I would like to know if there's a better way to handle the RAM.


I read this in an anthology back in the late '60s and have been looking for it again ever since.  Militant people arrive on a peaceful planet where the natives live in harmony with nature and go about naked.  They've seamlessly integrated technology with their environment.  The militants decide to take over the planet.   They find out that many of the natives' capabilities come from belts they wear that appear to be made of black stones.  The natives offer to make these belts for the 'invaders' and thus bring the story to a happy conclusion, with the line     "Don't confuse 'doesn't' with 'can't'."

The story opens with a simple pastoral teenage boy in a forest proudly giving the pre-diaspora greeting chosen to make known the kinship of earthlings wherever encountered. A very militaristic male who has just landed on the planet gives the  appropriate response. The boy's people, the inhabitants of the planet, live very peacefully and close to nature. They are in constant telepathic communication by means of a simple beaded belt worn at the waist securing their flowing robes.  In the end the wannabe invader is shown how to make and maintain the belt. He knows that he will be a hero for taking home a tool that will be of great assistance to his people in their quest for galactic militaristic dominance. He only understands a small part of the powers of the belt.


lets say I have a a string such as :  line = "tree length for XI:      31.0215"   I would liek to only keep the 31.0215 part.  I tried:  print (re.sub("^[0-9]", "",line))   but it does not work, the "." is removed, does anyone have an idea?

How do I extract a double value from a string using regex.  import re  pattr = re.compile(???)     x = pattr.match("4.5")


I referred to  but it does not offer what I am asking about.  I have some variables which are declared globally and, initially, they are assigned to NULL. Inside the constructor I call a function called "newGame()", this function initialise the variables. And inside onDraw() I am trying to draw a text contains the size of one of the variables that I have initialised inside the newGame() function, and when I run the app, it crashes, and logCat says: NPE.  So, i think, if the constructor is called first, my variables should have been initialsed, so that there should be no NPE. But, since there is NPE, it seems that, onDraw() is called before the constructor, is that true?  Update_1  I have also placed the newGame() function inside onSizeChanged() but, I receive the same NPE  Update_2  I am checking if an object of a hashmapis null or not like this in the following: if (obj == null)  is it correct to check whether or not an object is null?  Update_3  here is how I initialise the "hand"  if (hand == null) {         Log.i(TAG, "@dealCards: Hand hashMap was NULL, it will be initialised");         hand = new HashMap<Integer, Card>();     }   Code  private HashMap<Integer, Card> deck = null; private HashMap<Integer, Card> tableHand = null; private HashMap<Integer, Card> myHand = null; private HashMap<Integer, Card> compHand = null; .... .... //CONSTRUCTOR     public GameView(Context context) {     super(context);     // TODO Auto-generated constructor stub     mContext = context;     scale = mContext.getResources().getDisplayMetrics().density;      textPaint = new Paint();     textBounds = new Rect();     deckSize_String = "Deck_Size: ";     cardArraySize_String = "cardsArraySize: ";      textPaint.setAntiAlias(true);     textPaint.setColor(Color.RED);     textPaint.setStyle(Paint.Style.STROKE);     textPaint.setTextAlign(Paint.Align.LEFT);     textPaint.setTextSize(scale*15);      newGame(); } .... .... //OnDraw()     protected void onDraw(Canvas canvas) {     // TODO Auto-generated method stub     super.onDraw(canvas);     canvas.drawText("tableHand: "+tableHand.size(), 10, 200, textPaint);  }  private void newGame() {     // TODO Auto-generated method stub     Log.i(TAG, "@newGame()");      initDeck();     dealCards(deck, tableHand);     myTurn = whosTurn();      if (myTurn) {         dealCards(deck, myHand);         dealCards(deck, compHand);     }else {         dealCards(deck, myHand);         dealCards(deck, compHand);     } } ... ... ...  private void dealCards(HashMap<Integer, Card> deck, HashMap<Integer, Card> hand) {     // TODO Auto-generated method stub     if (hand == null) {         Log.i(TAG, "@dealCards: Hand hashMap was NULL, it will be initialised");         hand = new HashMap<Integer, Card>();     }      for (int i=0; i<4; i++) {         hand.put( (hand.size()+1), deck.get( ((DECK_MAX_SIZE - deck.size())+1) ) );         copyDealtCards( dealtCardsPile, deck.get( ((DECK_MAX_SIZE - deck.size())+1) ) );         deck.remove( ((DECK_MAX_SIZE - deck.size())+1) );     } }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Let $p(z)=a_o+\dots+a_nz^n$, with $n\geqslant 1$ and $a_n\neq0$. Let $f:\mathbb{C}\rightarrow\mathbb{C}$ be defined by $f(z)=1/p(z)$.   I need to show that there is an $R>0$ such that \begin{equation}\left|z\right|>R\quad\rightarrow\quad\left|z^nf(z)\right|<2/\left|a_n\right|.\end{equation}  I have no clue how to do this...

For a polynomial $p(z)=a_0+\ldots+a_nz^n$, prove there exist $R>0$, such that if $|z|=R$, then $|p(z)|\geq |a_n|R^n/2$.  I get $|p(z)|\geq |a_n|R^n$, which makes that factor of $1/2$ useless. So I must have done something wrong.  $$|\frac{\partial^n{f}}{\partial z^n}(P)|\leq \frac{\sup_{z\in \overline{D}(P,r)} |f(z)|k!}{r^k}$$. This is the Cauchy estimate.   $$|\frac{\partial^n{p}}{\partial z^n}(z)| = |a_n n!|$$ $$|\frac{\partial^n{p}}{\partial z^n}(0)|\leq \sup_{\zeta\in \overline{D}(0,|z|)} |p(\zeta)|n!/R^n$$ $$|a_n n!|\leq \sup_{\zeta\in \overline{D}(0,|z|)} |p(\zeta)|n!/R^n$$ $$R^n |a_n|\leq \sup_{\zeta\in \overline{D}(0,|z|)} |p(\zeta)|$$  There exist a $z_0$, such that $|z_0|>0$ and $$\sup_{\zeta\in \overline{D}(0,|z_0|)} |p(\zeta)| = |p(z_0)|$$.  This is saying there exist a disk centered at the origin, such that $|p|$ is maximum on some point on the boundary.   Let $R=|z_0|$, we have $R^n |a_n|\leq |p(z_0)|$  Edit: I know what I got wrong. $z_0$ is just one point on the circle $|z| = R$. One can chose another point $z_1$ on the circle, such that $p(z_1)<p(z_0)$.


As per wiki , In particular, the geometric points do not have any length, area, volume, or any other dimensional attribute.But when line is made up of set of points how come it has length? I am not too good in maths but this question was back in my mind since many days. Someone please clear things up. Thanks.

I have extracted the below passage from the wikipedia webpage - Point (geometry):        In particular, the geometric points do not have any length, area, volume, or any other dimensional attribute.      I think the above passage imply\ies that the point is zero dimensional. If it is zero dimensional, how can it form a one dimensional line?     Physics texts sometimes talk of lines' being made up of points, planes' being made up of lines and so forth. Clearly a line segment, thought of as a connected interval of the real numbers, cannot be built as a countable union of points. What axiom systems define the building up of a line from points, or, how do we rigorously define the building of a line from points?       Links:   The section one () of part one of the book "Relativity: The Special and General Theory" seems to be giving Einsteins view on this matter.       Related: History of Euclidean and Non-Euclidean Geometry


In my textbook, they say the following statements before doing a proof for the Lorentz transformation:     We know that the Galilean transformation $x' =  x - vt$ is incorrect, but what is   the correct transformation? We require a linear transformation so that each   event in system $K$ corresponds to one, and only one, event in system $K$.   Why must it be a linear transformation? Wouldn't any one-to-one function work?

My textbook says that Lorentz transformations are linear transformations and present them as matrices. Lorentz transformations relate different coordinate systems with each other. It seems that coordinate systems are linear spaces, but coordinates are just labels for spacetime points, with no other structures attached. So what is the linearity all about?


sometimes when I open some file, the Visual Studio shows me a dialog about inconsistent line endings but Visual Studio is able to normalize the line endings.  How can I normalize the line endings (Windows CR LF) in the file by myself with using C#?  I read a definition of stored procedure from SQL Server and save it to the file.   File.WriteAllText("procedure.sql", "content");   But when I open the file in Visual Studio it gives a warning about inconsistent line endings. SQL Server Management Studio also shows the same warnings when I want to modify the stored procedure.

I have a data stream that may contain \r, \n, \r\n, \n\r or any combination of them.  Is there a simple way to normalize the data to make all of them simply become \r\n pairs to make display more consistent?  So something that would yield this kind of translation table:  \r     --> \r\n \n     --> \r\n \n\n   --> \r\n\r\n \n\r   --> \r\n \r\n   --> \r\n \r\n\n --> \r\n\r\n


SourceTree for Mac which I'm using with my AS3 project do not track changes in class files. More accurately speaking, it treats them more like a single line of code rather than a sequence of lines. So, when I change something, version control shows that the whole file has changed. It doesn't happen in all AS3 projects, but in some of them, so I'm guessing it has something to do with project Git settings.  How can I fix this?

I tried committing files with CRLF-ending lines, but it failed.  I spent a whole work day on my Windows computer trying different strategies and was almost drawn to stop trying to use Git and instead try .  Please share only one best practice per answer.


I've searched for whether "either" can be used in a context on which the possible options are made of more than two, and . It says that it is informal to use "either" on more than two options, but is used widely especially in oral communication.  However, he didn't mention that what is the best alternative to "either" in three or more options in formal context, and hence I posted this question here.  So, on the situation where there are multiple options possible, how should I express my sentence? For example, I want to know the alternative to this sentence:  I classify all pitches as either fastballs, breaking balls, or off-speed pitches.

Does “either . . . or” apply to only two options?   For example, can I say, “It can provide either 100, 150, or 400 amps of power”? Or should it just be “It can provide 100, 150, or 400 amps of power”?


I'm writing a plugin that interacts with a winform map control that can display shapefile layers.  I have a timer that will start a background worker to make changes to the displayed shapefile layer.  Once the shapefile gets updated I call a method that's part of the shapefile layer object to refresh the the layer displayed on the map.  When I call the method it initiates a bunch of other events and methods that's part of the map control.  I continually get a Cross-Thread error when the the refresh is called.  Any suggestions how I could accomplish this?  Should I be looking at using something else besides a backgroundworker?

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


Would it be possible to install the T3i software on my T5 (1200D)? Both cameras have the same Digic-4 CPU. The reason I'm asking this is that the T3i have some features for video my T5 doesn't have.

Is it possible to flash the firmware of a camera to add features?  I have an older DSLR from Canon.  Over time Canon has introduced features for example 5 photo bracketing instead of 3.  When I look at the newer models, the specs are almost the same.  The only difference being the sensor.  This should not affect things like bracketing and custom focus options.  This leads me to believe that many features are simply software in nature.  I know I can download firmware updates for any camera but switching from one firmware to another via update seems very risky and I doubt the automated software will recognize it.  I have loaded new bios on GPU's to get extra performance.  Is there a way to do this on a camera without bricking it?


Well it is known that electric fields originated due to changing magnetic field has different properties from those than formed due to static charges. My doubts:   Why is it so? Is it something we had to assume. Or some logical reason behind it. Ex: Closed line integral of electric field isn't zero in former etc.  Is magnetic field induced due to changing electric field (after maxwell) also different.

I have been reading about the electric field induced on a metal ring due to an increasing magnetic field directed along the axis of the ring and the electric field lines are found to form concentric circular loops. This implies that the electric field formed is not conservative. Why is it so? Are electric field due to free charges and those due to changing magnetic field two entirety different  things?  Please provide an intuitive and less mathematical explanation as I am just a high school student with knowledge of basic calculus.


$f(x)$ is a continuos fuction in $[0,1]$ and differentiable twice on $0$.  $U_n=(-1)^{n}f(\frac{1}{n})$ I need to prove that:  $1.$ if $f(0)=0$ then $\sum_{n=1}^\infty U_n$ converge.  $2.$ if $\sum_{n=1}^\infty U_n$ converge absolutely then $f(0)=f'(0)=0.$  I used Maclaurin series with 2 degree: $f\left(\frac{1}{n}\right) = \frac{f'(0)}{n}+\frac{f''(0)}{2n^{2}} + o\left(\frac{1}{n^2}\right)$.  I can't proceed from here can you help me? Thanks.

$f(x)$ is a continuos fuction in $[0, 1]$ and differentiable twice on $0$.  $U_n=(-1)^{n}f(\frac{1}{n})$. I need to prove that:   $1.$if $\sum_{n=1}^\infty U_n$ converge then $f(0)=0$.  $2.$if $f(0)=f'(0)=0$ then $\sum_{n=1}^\infty U_n$ converge absolutely.  Now, from the detail that $f(x)$ is differentiable twice on $0$ I think I need to write $f(1/n)$ with Maclaurin series with 2 degree but it doesn't work very nice. can you guide me please? thanks!


I want to have a data structure conformed by a list of deques. So, taking advantage of the FIFO disposition of elements in a queue, I instantiated the following:  Deque<String> pathQueue = new ArrayDeque<>();   and also,  Queue<Deque<String>> myQueueOfDeques = new LinkedList<Deque<String>>();   However when I add each deque and print myQueueOfDeques, it appears with the correct size of empty fields, e.g. when it is supposed to store three deques it shows [ [], [], [] ]. Here is the portion of the code.  for (Element leaf; (leaf = (Element)walker.nextNode()) != null; ) {             for (Node node = leaf; node.getNodeType() == Node.ELEMENT_NODE; node = node.getParentNode())             {                 pathQueue.addFirst(((Element)node).getAttribute("id"));             }             myQueueOfDeques.add(pathQueue);             pathQueue.clear();         }  System.out.println(myQueueOfDeques);   Clearly the problem is that I keep thinking it as the way data structures work in c++, however I know this is java and I'm having a hard time. I already read the documentation for different structures found here

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


This is a new idea for me and I have struggled understanding Kant. How does Kant substantiate the noumenal world? ..Also, is their an online text or online video someone can reference me to that further dives into the noumenal world?

Kant introduces the notion of the noumenon in his critical philosophy; he also later demonstrates in his system that solipsism isn't possible.   Is the introduction of the noumenon essential to this demonstration, and thus justifies it's introduction?