My homework is as follows:  Step Two - Create a file called connections.txt with a format like:  Kelp-SeaUrchins Kelp-SmallFishes   Read these names in from a file and split each string into two (org1,org2).  Test your work just through printing for now.  For example:    cout <<  “pair  =  “ << org1 <<  “ , “ << org2 << endl;   I am not sure how to split the string, that is stored in a vector, using the hyphen as the token to split it. I was instructed to either create my own function, something like int ind(vector(string)orgs, string animal) { return index of animal in orgs.} or use the find function.

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?


In my symfony application i have a jquery $(document).ready function that looks like that: $(document).ready(function (){     var button = $(".addFieldButton");      $(button).click(function (e){         //... click function     } }  The thing is i can also add lines which contain a new .addFieldButton-Button which doesn't work because the function is only instanciated once when the document is loaded so i also want to reinstanciate this function when the user clicks the .addLineButton-Button like this: $(document).on('mouseover mouseout','.addLineButton',function (){     var button = $(".addFieldButton");      $(button).click(function (e){         //... click function     } }  But when i only use this function the .addFieldButton-Button that exists from the start on, only works when i hovered over the .addLineButton-Button. Is there a way to combine these to functions?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I installed the wireless driver using this instruction  and I have WiFi working. No problems here.  But unfortunately the bluetooth doesn't work. The Ubuntu bar shows the bluetooth sign and I can turn the bluetooth on/off but I can't discover any devices. And I can't find my laptop when I turn visibility On. So, obviously bluetooth doesn't work.  I couldn't find the reports that blutooth can actually work with this adapter in Ubuntu. So, is there anyone with BCM43142 adapter that have bluetooth working? I am using Ubuntu 12.10 x64.

Bluetooth is on but can't find or be found by any other devices.  Output of sudo service bluetooth status:  ● bluetooth.service - Bluetooth service    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)    Active: active (running) since ხუთ 2015-06-04 22:33:18 GET; 13min ago  Main PID: 26678 (bluetoothd)    CGroup: /system.slice/bluetooth.service            └─26678 /usr/sbin/bluetoothd -n  ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled   Output of lsusb:  Bus 003 Device 005: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0   How can I fix it?


Continued from   Am trying to calculate remaining response time for the case.   Based on the priority of the case we are setting the remaining time to respond the case(in hours and mins).  Please see .   Important thing is, we need to show the remaining time dynamically. That is, when the page is refreshed after 10 min, it should change the remaining time dynamically. So went for the formula field to calculate. Here is my formula,  IF( caseOwnerChanged__c ,  IF(FLOOR((((CreatedDate + ( ResponseTime__c /1440 )) - caseOwnerChangedOn__c ) * 24 * 60) / 60) = 0, LEFT( TEXT(MOD((((CreatedDate + ( ResponseTime__c /1440 )) - caseOwnerChangedOn__c ) * 24 * 60) ,60)),2 )  &' min', (TEXT(FLOOR((((CreatedDate + ( ResponseTime__c /1440 )) - caseOwnerChangedOn__c ) * 24 * 60) / 60))  &' hr'&  LEFT( TEXT(ABS(MOD((((CreatedDate + ( ResponseTime__c /1440 )) - caseOwnerChangedOn__c ) * 24 * 60) ,60))),2 )  &' min') ),   IF(FLOOR((((CreatedDate + ( ResponseTime__c /1440 )) - NOW() ) * 24 * 60) / 60) = 0, LEFT( TEXT(MOD((((CreatedDate + ( ResponseTime__c /1440 )) - NOW() ) * 24 * 60) ,60)),2 )  &' min', (TEXT(FLOOR((((CreatedDate + ( ResponseTime__c /1440 )) - NOW() ) * 24 * 60) / 60))  &' hr '&  LEFT( TEXT(ABS(MOD((((CreatedDate + ( ResponseTime__c /1440 )) - NOW() ) * 24 * 60) ,60))),2 )  &' min')  ) )      caseOwnerChanged__c - Checkbox field, which returns true if owner   changed. When the case owner changes, response time should stop    wherever it is.          ResponseTime__c - formula field which returns 30 for P1, 120 for P2,    480 for   P3...          caseOwnerChangedOn__c - Returns datetime when owner changed   So, am trying to save this formula but am getting      Error: Compiled formula is too big to execute (9,018 characters).   Maximum size is 5,000 characters   I tried putting the formula's   (((CreatedDate + ( ResponseTime__c /1440 )) - caseOwnerChangedOn__c ) * 24 * 60) TEXT(MOD((((CreatedDate + ( ResponseTime__c /1440 )) - caseOwnerChangedOn__c ) * 24 * 60)   in seperate formula fields and referenced in the current main formula but it is reducing only less number of characters.   So, Any other way to simplify this formula?.

Each  has a compiled cost that contributes towards the  compiled character formula limit.  What are the current compiled costs associated with each formula function?


A system is integrable if the Liouville integrability condition holds or the Hamilton-Jacobi equation is completely separable.   The problem is, are the two the same actually? Namely, the one is implied by the other?

I am asked to show that, a system is completely integrable Liouville if and only if its  is completely separable. I get the idea and understand that is very related to the Action-Angle coordinates and one of Liouville's theorems. Two texts have been of help: Jose & Saletan and Arnol'd.   I see how separability leads to AA coordinates and thus to an integrable solution of the system, but why is it an "if and only if" relationship? Why can't there exist systems with non-separable HJ, but reducible to integrals?


I am developing a small daemon program which needs to run some instructions when a user logs onto the system (all kinds of logins included). In order to do so, I want my program to be woken up whenever this login event occurs. However, I don't want it to check periodically whether a new user arrived, which means it must not:   Read log files such as /var/log/auth.log periodically. Besides the fact that I would have to actually parse the file, I would also probably do it far too often (since there are very few logins on my system). Check the output of another command such as ps, who or w and keep track of users internally. Using this method, the program could miss some logins, in case someone logs in and out before my program runs its checks on the output.   Since I don't want my program to waste time, I thought about using I/O events, however... I don't quite see where to hook. I have tried watching over /var/run/utmp (using inotify) but it doesn't seem to react correctly: my program receives a lot of events when terminals are opened/closed, but very few when someone actually logs in (if any at all). Additionally, these events are hardly recognisable, and change from a login attempt to another. For the record, here is a little set of what I was able to catch when running su user:   When a terminal opens: IN_OPEN (file was opened), IN_CLOSE_NOWRITE (unwrittable file closed), sometimes IN_ACCESS (file was accessed, when using su -l). When su is started (password prompt): a few events with no identifier (event.mask = 0). After a successful login attempt (shell started as another user) : nothing. When closing the terminal: another set of unnamed events.   Is there another way to hook a program onto "user logins"? Is there a file reflecting user logins on which I could use an inotify watch (just like I could use one on /proc to detect process creations) ? I had another look at /proc contents but nothing seems to be quite what I need.  Side note : I thought about posting this on Stack Overflow since it is programming-related, but beyond implementation, I am more interested by the "visible" reactions a Linux system has when a user logs in (by "visible", I mean reactions we could observe/detect/watch out for, programmatically, without wasting time).

I'd like to run a privileged command upon successful SSH logins at the server's end. However, this has to be in the server configuration (sshd_config or anything else that cannot be manipulated or circumvented by the user) as I need this to be mandatory. That is, however restricted the system account used is, it needs to be able to manipulate a piece of data that requires superuser privileges (namely use ipset add conditionally - which I can script). Oh and I'd like to be able to access the contents of SSH_CLIENT, please - despite privileged execution. The command also must be unaffected by ChrootDirectory.  I am aware of /etc/ssh/sshrc, but that appears to be "client-side", i.e. it's being run by the user who is logging into the machine.  Does such a facility exist in OpenSSH? I am using version 6.6.    Also, the man page (ssh(1)) isn't all too clear about sshrc:     /etc/ssh/sshrc   Commands in this file are executed by ssh when the user logs in, just before the user's   shell (or command) is started.  See the sshd(8) manual page for more information.   So does this mean it also runs whenever external commands (via ForceCommand) or subsystems like internal-sftp get invoked, despite restricting settings like PTY allocation or forcing a chroot? If so, I could resort to a restrictive /etc/sudoers entry if there is no other way at all.  NB: I am not using inetd for obvious reasons (see sshd(8)) as described .


i have Dell vostro laptop , and my keyboard is no more responding after i drop a cup of coffee over it. i am thinking of buying a new keyboard and attach it. but i have the following questions:-   will the new keyboard work well automatically without having to configure it ? in case the keyboard need some configuration , will i be able to install it without having to type anything , while installting the new keyboard , Or i should have external keyboard while installing the new keyboard? last question, after i drop the cofee over the keyboard , i have remove it and i clean it using pure water ? could this have harmed the keyboard ?

I have just dropped a half full latté on my company laptop and am not sure what to do.  Is there a way I can make sure that my laptop is usable again?  What steps must I go through to improve it's chances of survival?


How would I apply the UV map texture I have here to the object (in place of what's currently the colour) whilst still keeping my diffuse and glossy shader?

I am struggling to understand perhaps a very simple concept in Blender. There are materials which might have some diffuse coloring and a texture image, and there are also UV maps with their own images. Both can be applied to meshes or faces, but it seems that if a face has UV map then the material's texture is ignored and an image for UV map is picked.   If so, what is the use for a texture in a material if it is replaced by UV map's image?   EDIT: I've added some images to clarify the issue I have.   Case 1: a basic plane with material which has a texture, and no UV map. Diffuse color is applied, but material's texture is not.   Case 2: like above, but with reduced intensity of texture.   Case 3: Added UVmap and added image to the UVmap. Now I have texture, but not the diffuse color, and if UVmap was a different image, it would be picked regardless of texture set in the material.   So if I have UVmap image, what is the material texture for?


As per the title, I'm a Cuban citien with the UK residence card. I would like to travel to Cuba from the UK via Canada and the same on the return journey. My question is: do I need to have transit visa to pass through Canada? I won't be leaving the airport. Thank you.

I'm passing through Canada, on my way to somewhere else. I'm staying only a short time.   Is there a website, or some other way of find out out if I need a visa?


Suppose $S_1,\dots, S_n\subseteq[n]$ are such that $|S_i\cap S_j|\leq 1$ for all $1\leq i\lt j\leq n$. Show that in this case  $$\frac{1}{n}\sum\limits_{i=1}^{n}|S_i|=O(\sqrt n).$$

Show ${1\over n}\sum|S_i|=O(\sqrt n)$  where $S_i\subset [n]$, $|S_i\cap S_i|\le 1$ for $i\ne j$. A previous question required showing  $|E|\le {1\over 2}(\sqrt{t-1}n^{3\over 2}+n)$, for an $n$-vertex graph $G$. What I tried to do is placing $S_1,...,S_n$ in a row, and below it setting $1,...,n$ likewise. While I didn't mind the fact that as a graph, $S_i$ cannot be connected to $S_j$ as it will have no meaning here, I did pay attention to the restrictions I am given: I can't have a $K_{2,2}$ graph (also not a $K_{2,t\ge 2}$, but $t=2$ is tighter.). Is what I am doing admissible? If so, I am arriving at: $|E|\le {1\over 2}(\sqrt 2n^{3\over 2}+2n)$. Acknowledge(or at least assuming) that the number of edges is simply the sum of $|S_i|$'s, I get ${1\over n}\sum|S_i|\le  \sqrt2n^{1\over 2}+2$ which seems $O(\sqrt n)$. Is it graph theory acceptable arguing? I would really appreciate your insights.


What is the reason behind not letting people vote again on the same post (for example -- after changing mind, i.e. downvote after previous upvote, upon further reading or after certain comments)? What this suppose to do, what prevent or in what this should help?  I can't vote again on post, where I have already voted, but I can... edit this post, do some really tiny change and then I can vote again, without any restrictions. Where's the logic?  EDIT: Neither  nor  (which most of you takes incorrectly as dupe) answers my question. I'm not talking about poor edits etc. I'm precisely asking, why I (with 2k+ rep) am blocked with this restriction, which I can very easily override by doing simple edit? In this case, 2k+ users shouldn't have this dual-voting restriction at all. This question has nothing to do with poor edits or tactical voting. It addresses  -- voting again after changing mind, after explanation by post author made in comments.

I've found many questions here regarding this 'feature' and many answers explaining how it works, but none showing any 'philosophical' concept behind it. i.e., why is it here? Is it helping to make site better?  For example, just now I made a downvote, retracted it to think a bit more, left a comment with explanation and tried to downvote again. No game. And this is not the only real-life situation when value of this 'feature' is doubtful. There're plenty on this meta.  So, what was the primary reason to introduce it? A flow of people who change all their votes on daily basis?


From the novel Great Expectations by Charles Dickens.       I rang for the tea, and the waiter, reappearing with his magic clew, brought in by degrees some fifty adjuncts to that refreshment, but of tea not a glimpse. A teaboard, cups and saucers, plates, knives and forks (including carvers), spoons (various), saltcellars, a meek little muffin confined with the utmost precaution under a strong iron cover, Moses in the bulrushes typified by a soft bit of butter in a quantity of parsley, a pale loaf with a powdered head, two proof impressions of the bars of the kitchen fireplace on triangular bits of bread, and ultimately a fat family urn; which the waiter staggered in with, expressing in his countenance burden and suffering. After a prolonged absence at this stage of the entertainment, he at length came back with a casket of precious appearance containing twigs. These I steeped in hot water, and so from the whole of these appliances extracted one cup of I don’t know what for Estella.   Below is the sentence about which I have questions:     I rang for the tea, and the waiter, reappearing with his magic clew, brought in by degrees some fifty adjuncts to that refreshment, but of tea not a glimpse.    Does "bring in" mean "put"? Does "by degrees" mean "gradually"? Does the word "adjunct" mean "something that is joined or added to another thing but is not an essential part of it"? Does "brought in by degrees some fifty adjuncts to that refreshment" mean "gradually put fifty adjuncts in the refreshment of tea"? Does "that refreshment, but of tea not a glimpse" mean "the refreshment of tea, not the refreshment of glimpse"? Does the word "refreshment" mean "food and drink"?

I still have a question about the phrase "but of tea not a glimpse" from the novel  by Charles Dickens.     I rang for the tea, and the waiter, reappearing with his magic clew, brought in by degrees some fifty adjuncts to that refreshment, but of tea not a glimpse. A teaboard, cups and saucers, plates, knives and forks (including carvers), spoons (various), saltcellars, a meek little muffin confined with the utmost precaution under a strong iron cover, Moses in the bulrushes typified by a soft bit of butter in a quantity of parsley, a pale loaf with a powdered head, two proof impressions of the bars of the kitchen fireplace on triangular bits of bread, and ultimately a fat family urn; which the waiter staggered in with, expressing in his countenance burden and suffering. After a prolonged absence at this stage of the entertainment, he at length came back with a casket of precious appearance containing twigs. These I steeped in hot water, and so from the whole of these appliances extracted one cup of I don’t know what for Estella.   Below is the sentence about which I still have a question.     I rang for the tea, and the waiter, reappearing with his magic clew, brought in by degrees some fifty adjuncts to that refreshment, but of tea not a glimpse.    Does the word "of" mean "with respect to" in the phrase "but of tea not a glimpse"? Does "not a glimpse" mean "the protagonist of the novel saw and inspected all of the fifty adjuncts that were brought by the waiter, and the protagonist of the novel didn't glimpse all of the fifty adjuncts, and the protagonist of the novel saw all of the fifty adjuncts very carefully, and then the protagonist of the novel found that all of the fifty adjuncts were with respect to the tea" in the sentence "but of tea not a glimpse"?


I made a program to search for a certain string in another string and print Word found if the condition is true or print word not found if condition is false   The logic is as follows  enter word length of word for searching for letter [1] if true then for till length of word match with string to be searched  else continue loop  But I always get word not found no matter what the input, please help me over here!!!  The code is as follows :-      import java.util.Scanner;     class Search_i_String     {                 public static void main(String args[])         {             int flag=0;             Scanner Prakhar=new Scanner(System.in);             System.out.println("Enter a String");             String ori=Prakhar.nextLine();             System.out.println("Enter the String to be Searched");             String x=Prakhar.nextLine();             char a[]=new char[ori.length()];             char b[]=new char[x.length()];             for(int i=0;i<ori.length();i++)             {                 a[i]=ori.charAt(i);             }             for(int i=0;i<x.length();i++)             {                 b[i]=x.charAt(i);             }              for(int i=0;i<a.length;i++)             {                 if (a[i]==b[0])                 {                     for(int j=0;j<b.length;j++)                     {                         while(flag==0)                         {                             if(b[j]==a[i])                             {                                 flag=0;                             }                             else if(b[j] != a[i])                             {                                 flag=1;                             }                             i++;                         }                     }                 }             }             if (flag==0)             {                 System.out.println("Word Found !!!");              }             else              System.out.println("Word not Found");         }      }   P.S. : I know I can use the contains() function but I can as my professor suggests against it and could someone please correct the program I have written, because I could have scavenged off a program from the internet too if I had to, I just wanted to use my own logic   Thank You(again)

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Why $E(X|Y)=E(E(X|Z,Y)|Y)$?   I know that $E(U)=E(E(U|V))$. So, $E(U|W)$ should be $E(E(U|V,W))$. But the latter expression is free from $W$ so it is not possible.   I can get a intuitive idea that right hand side of the above expression should be a function of $Y$, so we are conditioning two times. But how to prove it rigorously?

I'm trying to prove the "tower property" of conditional expectations, $$  E[V\mid W] = E[\ E[V\mid U,W]\ \mid W\ ], $$  where $U$, $V$ and $W$ are any random variables. $E[X \mid Y]$ is itself a random variable $f(Y)$ where $$f(y) = E[X \mid Y = y) = \sum_x x\cdot Pr[X=x\mid Y=y].$$ Keeping this observation in mind, I still don't see why $U$ is "averaged out" when moving from the right hand side to the left side.


I've just run into  asked in 2008. It has an accepted answer, which was good until 2009 when namespaces were introduced into PHP 5.3. But since 2010 it is no more correct, see .  It may not be the best example, but the point is:  What to do with obsolete posts that are no more correct?  They are usually inactive for months or years. Due to the time, the obsolete posts usually have many upvotes and only archaeologists bother to dig in them, but they have many views and the better the Google index them. In ten years, SO might be flooded with outdated, no-more-valid posts.

I was thinking about this issue from time to time but I didn't know whether it really exists or just an speculation on my side until today when I woke up [!], I saw  downvoted (in the meantime I'll leave that answer unedited for the sake of discussion; note that this is just a sample. I'm not asking "how to deal with this specific answer." The question is completely general as it's nearly impossible to keep track of all of your answers to see whether they require updating or not). While the downvoter didn't explain a thing, I suspect the reason is that the answer is no longer applicable (It's one of the new features in iPhone OS 3.0). As we go to celebrate a long sequence of birthdays for Stack Overflow (hopefully!), we're going to see lots of answers become obsolete. How we're going to deal with this issue?


I just installed Lubuntu 12.10 "Quantal Quetzal" on my Acer Aspire One D257, creating the partitions:  $ df -h Filesystem      Size  Used Avail Use% Mounted on /dev/sda5        15G  2.1G   12G  15% / ... /dev/sda1      1008M   62M  896M   7% /boot  /dev/sda6        15G  180M   14G   2% /home /dev/sda4       195G  188M  185G   1% /media/data   (or see partitions.png:)    (I know boot partitions were useful for old bios, but now they are also useful for encryption, LVM... (though differerent from a dedicated GRUB partition !)) I renamed the "data" partition (=sda4) flag/name (using utility Disks). I have been trying for hours now to find a solution to:      How to get my data partition (not my home partition!) to auto-mount at boot time somewhere (if possible in /media/data) with me (user =   christophe) as owner and the permissions as rwxrwxr-x (=user:rwx,   group:rwx, other:r-x)?  My problems are that every time I reboot:   /media/data is back under root ownership /media/data is back under rwxr-xr-x permissions /media/data content is back as just lost+found (!!!) frequently, when trying options in /etc/fstab, I had "an error occurred while mounting /media/data" at boot time.  I tried mostly to edit my /etc/fstab file. Now it is:  $ cat /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point>   <type>  <options>       <dump>  <pass> # / was on /dev/sda5 during installation UUID=8325697c-2c27-49dd-99f8-2a1a3e1467be /               ext4    errors=remount-ro 0       1 # /boot was on /dev/sda1 during installation UUID=3ba24cc6-e38b-48d9-b526-68358783d980 /boot           ext4    defaults        0       2 # /home was on /dev/sda6 during installation UUID=1ef16ece-0965-4611-a2e5-dd687f4ee5ff /home           ext4    defaults        0       2 # /media/data was on /dev/sda4 during installation # UUID=0598f54b-dcf8-4508-97de-94d9f2c5e2a8 /media/data   ext4    defaults        0       2 UUID=0598f54b-dcf8-4508-97de-94d9f2c5e2a8 /media/data     ext4    rw,suid,dev,exec,auto,user,async,errors=remount-ro,relatime,uid=1000,gid=1000        0       2 # swap was on /dev/sda2 during installation UUID=04f73159-479d-4a4b-a78c-37a406909225 none            swap    sw              0       0  In a way, I'd like my data partition to automount like my home partition. I do not want a solution where I would have to chmod or chown or do something every time I (re)boot!   Thanks.

I want to mount the device /dev/sda3 to the directory /foo/bar/baz. After mounting the directory should have the uid of user johndoe. So I did:  sudo -u johndoe mkdir /foo/bar/baz stat -c %U /foo/bar/baz johndoe   and added the following line to my /etc/fstab:  /dev/sda3 /foo/bar/baz ext4 noexec,noatime,auto,owner,nodev,nosuid,user 0 1   When I do now sudo -u johndoe mount /dev/sda3 the command stat -c %U /foo/bar/baz results in root rather than johndoe. What is the best way to mount this ext4-filesystem with uid johndoe set?


Would you be petrified by it, or would nothing happen? Or is it not possible to take a photo of a Basilisk?

As far as we know the gaze of the basilisk will instantly kill someone or eventually petrify him/her in case the gaze is somehow softened or reflected.   But why would it melt the film in Colin's camera? The film is just plastics with some specific chemicals.   A bit broader question would be - is the some information that the basilisk's gaze is somehow destructive to non-alive objects too and under what circumstances could it happen?


i need some help with a java code,  This is my code:  public void showData() {          int pass = 0;          /* For first list */         for(int i = 0; i < first_list.length; i++) {              if(first_list[pass].toString() != second_list[i].toString()) {                 System.out.println(first_list[i]);              } else {              }          }          pass++;     }   The output:   Porto  Algarve   But i dont want this and i understand that by doing this way, my for ends and dont do other passes.. i want to get all possible combinations without repeat words, the output that i want is this one:   Porto Algarve Lisboa Algarve Lisboa Porto   This is a draw to help understand:   How can i do such thing? Thank you!  EDIT: Im not asking how to compare strings... if someone can point me a topic with what i want, it would be nice, if not.. well some advices would be great


We are discussing the sentence "We can obtain the result by analytic inversion." It's from a math context.   Is this an OK sentence, or does it have to be "an inversion"? If so, why? If not, why? Is this sentence particularly problematic because "inversion" can have both a non-countable (the process of inverting) and a countable (if you have different ways of inverting) interpretation? If this is an OK sentence, why is the sentence so much different if you replace "inversion" by "algorithm"? Clearly, in this case, you do need "an".

It is said that "To give added punch, articles are often dropped in the titles"  Source:   Is there any general rule or reference about dropping articles, especially in academic research papers?


Generally, when a new object is created in Java it follows the idiom:  Object obj = new Object();   where the Object() constructor matches the object type Object.  But what if it doesn't? I understand from the Oracle Docs on  and  that the constructor must be in that object's class or one of its subclasses.  However, suppose we wanted to declare a new stack.  My first instinct would be:  Stack s1 = new Stack();   But I assume it's valid to do it this way, too:  Object s2 = new Stack(); //This   Is there a difference here?  What are we really saying about s2?  I'm guessing s2 is simply an empty stack, but only has access to the Object class methods?  I'm not sure why someone would ever do this, but I want to solidify my understanding of the Java hierarchy.  Are there really any circumstances where someone would use a subclass's constructor when creating a new object?  Any and all informative responses will be appreciated.  Thanks in advance!

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


iPhone has standard and not zoom mode enabled, yet the text and icons have a larger font. The favorite, flag, share and edit options only show icons and their text(function) isn’t displayed.  App Version: 1.6.6.2 Device: Unknown (iPhone10,2) OS Version: Version 13.6 (Build 17G68)

I'm using the official Stack Exchange mobile app for iOS or Android, and  My app crashed! It doesn't look good on my new smartphone. It won't run after I updated my device. I noticed another bug. I have an idea for a new feature which is currently not in the app.  How do I report bugs with or request features for the iOS and Android apps? Also:  I've used the built-in functionality of the app to report a bug or submit a feature request. Did I do the right thing? The app prompted me to post on Meta after an error occurred. Should I post about it here? I'm wondering why the latest version is from 2017. I've heard rumors that the apps are no longer supported; is that true? I can't find the app on my device's app store anymore! Where did it go?     We get a lot of bug reports from users about the mobile apps, which are unsupported, and at the moment, there is no centralized Q&A pair for those to be closed as duplicates of (the relevant answers are spread across multiple unrelated questions). This question is an FAQ proposal, to serve as a directly-related duplicate target for those questions.


I'm trying to use intermediate machine to connect to a remote host but I'm doing something wrong and not sure what.  I have added to my intermediate box /etc/ssh/sshd_config following lines:  Match User deploy PermitOpen  any AllowTcpForwarding yes ForceCommand echo 'This account can only be used for deployments'   I can ssh from that intermediate box onto the target system no problem but I was hoping to be able to just execute a command like one below to connect via my proxy box:  ssh deploy@dev-linux-03 -W TARGET_IP:22   But I'm getting different response:   SSH-2.0-OpenSSH_4.3   Protocol mismatch.   Anything obvious I've missed?

We have two main environments in question:  Development and QA  Each environment has two servers:   Jump Box Application server   In order to connect to the application server, you must connect to the jump box first, and then SSH to the Application server.  There are a few rules in place courtesy of the firewall:   You MUST connect to the application server via the jump box The application server cannot connect to either jump boxes The jump boxes are on the same subnet, and CAN talk to each other.   Our Problem  We have a lot of content (670 GB) on the DEVELOPMENT APPLICATION SERVER, and we need to get this to the QA APPLICATION SERVER.  Copying this data to the jump boxes is not an option because they lack the required amount of space.  I did some research, and learned that we could potentially do a series of tunnels through these servers so that we can stream the data straight from one app server to the other via the tunnels. However, the problem that we cannot connect to the jump box from the application server.  Do we have any options? This is getting to be a desperate situation, and time is of the essence. We do not have time to download the data and re-upload it. Copying across the network on the servers will go quickly, as it is a gigabit connection.


This question came to mind while reading a comment on another question about loosing privileges dues to bounties. Suppose an user has enough rep on a site to get the association bonus on their other accounts. They create an account on another site and get the free +100 rep points... They then proceed to give out said points in a bounty and then delete the account. This should be possible, since it was documented that the association point rewards can indeed be spent on a bounty. Also, bounties are "immune" to the user deletion effect, so they won't be "detracted" when the user is removed. This means that the bounty will survive the user deletion. This in turn brings another question: what happens now if the user recreates a new account on the same site? Is the association bonus given out again? Obviously, you can all see where this is going.... Could one technically game the system by creating an user, moving the rep to another sock and then "rerolling" the same user again to get a free association bonus for each reroll? And as a bonus question... should we fix this (I guess a similar behavior would be very noticeable, so  I don't even know if it would be worth fixing this "exploit")

I figured out a method to abuse the Association Bonus, however I'm unsure whether or not this is a serious issue. Are there anti systems in place that prevent this?       Prerequisites: 1 account with the Association bonus, and 1 account with 100 reputation on a different site.      Step 1: Create a bounty on the first account using the association bonus on the site on which the second account has 100 reputation, and award it to the second account.  The second account now has 200 reputation and will receive the Association Bonus.    Step 2: Abuse the bounty system to give the association bonus from the second account back to the first.    Step 3: Create a third account, and again abuse the bounty system to gift 200 reputation to it from the second account.  Step 4: Repeat steps 2 and 3 in order to gain infinite reputation.    Step 5: Give the 200 reputation back to the first account.    Please don't actually do this.


I am trying to figure out what package/font was used to typeset this example and I cannot really recognise it. I figured I'd ask some of you as you'd probab

Is it possible to identify the font used in a specific document/picture?  Answers to this question should identify:   Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y").   This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's  tag.


Everyone knows that whenever we square a negative number it becomes positive but everyone just accepts this as a universal truth. I want to know why this happens? I also want to know as to why do two negatives make a positive? And moreover is (-2)^2=4=(2)^2 then how will be justify that this does not make -2=2 ?

Someone recently asked me why a negative $\times$ a negative is positive, and why a negative $\times$ a positive is negative, etc.  I went ahead and gave them a proof by contradiction like so:  Assume $(-x) \cdot (-y) = -xy$  Then divide both sides by $(-x)$ and you get $(-y) = y$  Since we have a contradiction, then our first assumption must be incorrect.  I'm guessing I did something wrong here. Since the conclusion of $(-x) \cdot (-y) = (xy)$ is hard to derive from what I wrote.  Is there a better way to explain this?  Is my proof incorrect?  Also, what would be an intuitive way to explain the negation concept, if there is one?


I have the following forward declaration:  template     < typename Vector     , typename Scalar = Vector::Scalar > class RayPlaneHitTest;   This works fine with MSVC++ 2010, but G++ rejects it. I think the purpose is self-explanatory. How do I need to modify it s.t. it works with G++?  I've been trying it with G++ 4.6.3.

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


I read a command from   Why can  $ bash -c 'for f do echo "$f";done' bash a b c a b c   output the same as  $ bash -c 'for f in "$@"; do echo "$f";done' bash a b c a b c   ?   Why does a for-loop not require  explicitly specifying    the set of values of the loop variable, as in "$@" and ; ?   Thanks.

I was recently looking at some code that confused me because it works and I didn't expect it to. The code reduces to this example  #!/bin/bash for var; do   echo "$var" done   When run with command line arguments is prints them  $ ./test a b c a b c   It is this, that is (to me) unexpected. Why does this not result in an error because var is undefined ? Is using this considered 'good practice' ?


Suppose we have $f: \mathbb{D} \rightarrow \mathbb{D}$ analytic and not identically zero. In order to prove $f$ has an infinite Blaschke product representation (where of course the product defines an analytic function on the disk), I need to show that $f$ necessarily has countably many zeros $a_j$ in $\mathbb{D}$, and that they satisfy $$\sum_{j=1}^{\infty} (1-|a_j|)<\infty.$$ This condition seems necessary because the Blaschke product formed by the zeros of $f$ converges locally uniformly on the disk if and only if they satisfy the summation condition, which is how one would show the product is analytic.  Assuming this crucial step, I am able to prove that $f$ has a representation $f(z)=B(z)g(z)$ where $B$ is a product as above and $g$ is a never vanishing analytic function. Any help is appreciated.

I'm going over old exam problems and I got stuck on this one. Suppose that $\mathbb{f}\colon \mathbb{D} \to \mathbb{C}$ is analytic and bounded. Let $\{a_n\}_{n=1}^\infty$ be the non-zero zeros of $\mathbb{f}$ in $\mathbb{D}$ counted according to multiplicity. Show that  $$ \sum_{n=1}^\infty \left( 1 - \left|a_n \right|\right)\lt\infty $$  I can understand that $\left|a_n \right|$ goes to $1$ since zeros are isolated, but it doesn't help showing the series is convergent. Any help will be appreciated!


I am performing research on Product attributes of mineral water toward purchase decision.  However, the result of -2log likelihood test showed that my model is fit enough yet my result of Hosmer and Lemeshow is only 0.121. However, my Wald statistics showed none of my independent variables were statistically significant.   How should I interpret this result?

My multiple regression analysis model has a statistically significant F value however all beta values are statistically non-significant.   All the regression assumptions are met. No multicollinearity was found. Correlations among all predictors are all less than 0.60.   What else might be the cause of the insignificant predictors?


I usually plug the charger to my laptop, whiles my battery is plugged in. After a while, when my battery became fully charged I remove it from laptop, while the laptop is still working.  Now I want know is it harmful to my battery that I remove it while the laptop is working?  My laptop is Dell Inspiron 5520

I have a new HP Compaq 610. Most of the time I use it plugged and with the battery removed, to avoid wearing it. Sometimes I need to move it to somewhere else - currently I hibernate the machine, move it, plug it in its new location, and power it up again.  I wonder if it's possible to plug the battery while the machine is on and running on AC power, move it, plug it, and unplug the battery again, without ever turning it off. I'm afraid to try it myself. Does anyone know?


I've been trying to change my skin. I can see my skin, but everyone else sees me as Steve (the default skin). I need to change my skin or I will explode in anger. What am I doing wrong?

I made a skin by using Skincraft and I exported it to minecraft.net. I chose my skin and uploaded it. At the top it says,      "Your skin has been changed! Please wait a few seconds for it to   update."   I went to Minecraft, clicked singleplayer and chose a random world at the top. I looked at my character, but it's still default. Multiplayer won't load for some reason. I don't know what I've done wrong!


I have made a big mistake - I accidently deleted the D partition and formatted it to NTFS.   Is there a way to recover my data? Is this partition needed by the OS?  Can I live without it?

I have a harddisk with two partitions: one for windows and one for data. I've reinstalled windows on the first partition and formatted the data partition with full format (without /Q option) making sure that all my data is backed up. After that I've created the same folder structure (without files inside) on data partition as it was before formatting.   I then realized that all my photos were NOT backed up :((((  I've tried several tools to recover my data without any success:   Wordershare Photo Recovery Active File Recovery R-Studio PhotoRec from CGSecurity Recuva   There are max 50Mb of new data on that partition, so data overwriting is minimal.  What is the reason why I'm not able to recover my data with data recovery tools: full format or same folder structure?  And... can I get my photos back or they are lost forever?


Is it possible to have longtable and tabulary together in a table for autofit and Auto continuation of table in next page  Below is my code   \documentclass{article} \usepackage{longtable,tabulary,capt-of,dcolumn} \usepackage{booktabs} \usepackage{showframe}   \makeatletter  \def\ltabulary{% \def\endfirsthead{\\}% \def\endhead{\\}% \def\endfoot{\\}% \def\endlastfoot{\\}% \def\tabulary{%   \def\TY@final{% \def\endfirsthead{\LT@end@hd@ft\LT@firsthead}% \def\endhead{\LT@end@hd@ft\LT@head}% \def\endfoot{\LT@end@hd@ft\LT@foot}% \def\endlastfoot{\LT@end@hd@ft\LT@lastfoot}% \longtable}%   \let\endTY@final\endlongtable   \TY@tabular}% \dimen@\columnwidth \advance\dimen@-\LTleft \advance\dimen@-\LTright \tabulary\dimen@}  \def\endltabulary{\endtabulary}  \makeatother  \begin{document}   \begin{table} \captionof{table}{Sample Table 1 }\label{table_specrot} \begin{ltabulary}{LLD..{1.3}} x&y&1.1\\ x&y&1.244\\ x&y&1.3\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&y&1.2\\ x&yaaaa&1.2\\ \end{ltabulary} \end{table}  \end{document}

I know that you can combine tabularx and longtable functionality with either ltxtable or ltablex, but is there something similar for tabulary? My searching has come up dry when looking for any way to get tabulary to work with very long tables.  The table I am working with has large amounts of text that requires line breaking in multiple columns. Some cells have very little, and some have a lot, and I would like to see the column widths juggled to minimize total table length. I realize I could manually do this with the {>{\hsize=.5\hsize}X>{\hsize=1.5\hsize}X} functionality in tabularx, but what I'm making is intended to be a template that should work well with any particular arrangement of data that gets thrown in. Am I doomed to using tabularx and manually adjusting the hsize numbers each time I want to make a table?


I'm building a new 14.04 box for my family and me.   I learned that the accounts can be transferred by copying /etc/passwd, /etc/shadow and /etc/group from the old box to the new one. Then, I used rsync to move the /home folders from the old machine to the new one.  Well, I thought I learned.   The odd side effect is that while the password can be used to log in with and various other tasks like SU and software installation, it won't work log back into the desktop after locking the screen (manually or automatically). The only way in after locking is to use the switch user option. Then it will accept the password.  I can only assume Unity has some place they have the password or hash stashed for use here that is now out of sync. Maybe?

I had to reinstall recently. I installed normal Ubuntu 14.04. I then installed gnome/gnome shell/gdm. I then logged in my user to gnome. Since then I have been configuring my system.  Yesterday, unlock was working fine. Today, the automatic lock screen is not accepting my password as valid. It just takes the input like it's processing it, then takes me right back to the same password prompt. If I click the 'login as a new user' link, it takes me right back to the lock screen. Ctrl+Alt+F1, etc, does nothing.  I had to resort to a hard boot. I've tried this more then once. (first time was from automatic, idle time lock, second time was from my triggering the lock screen with the keyboard command).  I'm certain I have my password right, as I am able to get logged in after the cold boot.


So I'm confused about electrons holes and how they differ from free electrons. I have this question in my mind for months and I couldn't any solid answer.

I'm tutoring senior high school students. So far I've explained them the concepts of atomic structure (Bohr's model & Quantum mechanical model) very clearly. Now the next topic to be taught is semiconductors.  I myself am not conviced with the concept of electron holes. If there is no electron then there is no electron. How can it be a hole. We define a hole when there is some thing every where except at a place. But inside an atom how can we define a HOLE.  Kindly explain it with the help of Bohr's model. What was the need of introducing such abstract concept in semi conductors?


i saw this code on the internet but i don't know what that starred expression in front of map function do.  here's the code  print(*map(input().find,map(chr,range(97,123))))   i was thinking about args but it doesn't apply for this code because this is map function right? does it relate to map function or print function? or both?  also i tried running this code without that star in front map function like this  print(map(input().find,map(chr,range(97,123))))   but the output was this  <map object at 0x7f42409d50f0>

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


I am a US citizen and have a long connection (23 hours)in Helsinki on my way back to New York from Paris. Do I need a visa? Can I leave the airport and stay overnight in Helsinki?

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


In my workflow I always have tab 1-3 of chrome as specific pages that never change.  I want to make a keyboard shortcut that will navigate to the second tab with Super+Shift+S.  If I execute the following bash script from a terminal it will proceed to behave as expected but when I tie it to a keybinding from keyboard shortcut settings in the gui it will only achieve focus on Chrome but not proceed to the second command.  wmctrl -a chrome && xdotool key Ctrl+2  Any help will be appreciated.

I'm trying to simulate a media key press using a custom shortcut.  So far, I've been able to achieve the simulation I need using the command:  xdotool key XF86AudioPlay   It works perfectly, it pauses or starts the music player every time it is run.  The problem comes when trying to run it as a shortcut.  First I tried to run an alias with a custom shortcut, but it did not work.  As explained on :     The commands run by keyboard bindings are not parsed via a shell. Your best bet is to create a directory bin in your homedir.   Next I created the suggested script and named it simplay:  #!/bin/sh xdotool key XF86AudioPlay   It is located inside a bin folder which is part of the PATH, this works fine and can be run from any location.  When trying to create the Custom Shortcut, I was unable to get it to execute, the configuration is the following:  Name: test Command: simplay  Shortcut: Ctrl+Alt+R   After searching a bit more I found another way to execute the shortcut:  gnome-terminal -e simplay   I tried it on a terminal and noticed that when executing it it would rapidly open a new terminal window, execute the child process, pausing the music and immediately close the window.  I changed the command on the shortcut and when hitting it I noticed the same behavior opening a terminal and immediately being closed but this time the child process did not pause the music, which makes me think that the script has been called on all my previous attempts but it is somehow not being able to execute.  How can I solve this problem according to your knowledge?


I am interested in installing Xubuntu on an old HP running Windows XP (2003 Home Edition). The BIOS does not allow the alternative of booting from USB, nor do I have a CD/DVD-writer. I read in another thread that you can mount the iso-file (with Xubuntu) as a virtual disc of sorts (using e.g. VirtualClone I think it was), but my question is: is it possible to install Xubuntu from a virtual CD or do I need to either burn a CD/DVD or re-write the BIOS, allowing USB-booting? All assistance is much appreciated, I am a beginner at this.

How to run the Ubuntu ISO live image from Windows without USB or DVD?  This is a self answered question.


I want to prove that for all $n\in\mathbb{N}$ and $x_i\in\mathbb{R}$, we have $$(x_1+\cdots+x_n)^2\leq n(x_1^2+\cdots+x_n^2).$$  At first I wanted to do a proof by induction, but it has turned out to be much more complicated than I imagined.  Now I'm thinking Cauchy-Schwarz, but I can't seem to write it in the correct form to get the result I need.  Any hints or help would be much appreciated.  The Cauchy-Schwarz inequality as we are using it in my class is in vector form, i.e., $$|\langle u,v\rangle|\le\|u\| \|v\|.$$

$$\dfrac{x_1^2+ x_2^2 + \cdots + x_n^2}n \geq \left(\dfrac{x_1+x_2+\cdots+x_n}n\right)^2$$   I don't think AM, GM can be used here. And simple expansion doesn't help too. What should I do?


The definition of the Enlightened badge says:     Enlightened         silver; awarded multiple times   Be the first person to answer a question, and receive a score of at least ten for that answer. The answer must be accepted by the question   owner, and .      Does "the first" mean "the first including deleted answers" or just "the first among not deleted answers"?

For the first answer criterion for the Enlightened badge, is the first answer the one   that remains, excluding deleted answers; or that ever was, including deleted answers   As for the suggestion, if it were the latter, can we please make it the former?  It would make sense to exclude squatters from the equation if they later retract their answer from the question (having reached no good solution).


I am currently running a 32-bit OS, but I'm not really sure if I have to. According to some articles on the Web, there are no flags in my output that indicate that my CPU is a 64-bit. But according to articles describing the Athlon II X2 250, such as , it should be 64-bit processor. I've never been much of a hardware person, so I don't know if this article necessarily means that mine is a 64-bit, or mine is just a subset of some family of processors, some of which are 64-bit.   I am slightly worried because there is nothing in the hardware information that very specifically states Data bus size: 32 or 64. How do I know for sure?   This is the output from my /proc/cpuinfo   processor   : 0 vendor_id   : AuthenticAMD cpu family  : 16 model       : 6 model name  : AMD Athlon(tm) II X2 250 Processor stepping    : 3 microcode   : 0x10000b6 cpu MHz     : 1800.000 cache size  : 1024 KB physical id : 0 siblings    : 2 core id     : 0 cpu cores   : 2 apicid      : 0 initial apicid  : 0 fdiv_bug    : no f00f_bug    : no coma_bug    : no fpu     : yes fpu_exception   : yes cpuid level : 5 wp      : yes flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate npt lbrv svm_lock nrip_save vmmcall bogomips    : 5984.90 clflush size    : 64 cache_alignment : 64 address sizes   : 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate  processor   : 1 vendor_id   : AuthenticAMD cpu family  : 16 model       : 6 model name  : AMD Athlon(tm) II X2 250 Processor stepping    : 3 microcode   : 0x10000b6 cpu MHz     : 2300.000 cache size  : 1024 KB physical id : 0 siblings    : 2 core id     : 1 cpu cores   : 2 apicid      : 1 initial apicid  : 1 fdiv_bug    : no f00f_bug    : no coma_bug    : no fpu     : yes fpu_exception   : yes cpuid level : 5 wp      : yes flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate npt lbrv svm_lock nrip_save vmmcall bogomips    : 5984.90 clflush size    : 64 cache_alignment : 64 address sizes   : 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate

I'm confused. Running Fedora Linux, lscpu yields:  Architecture:            i686 CPU op-mode(s):          32-bit, 64-bit ...   But when I try to install a 64-bit program (Chrome) I get error like:     Package /....x86_64.rpm has incompatible architecture x86_64. Valid architectures are ['i686', 'i586', 'i486', i386']   I'm less interested in being able to install Chrome and more interested in why lscpu says that my CPU can run in 64-bit mode; clearly this can't mean I can run 64-bit programs. Can anyone clarify?


Recently, I was surfing on stackoverflow.com & I have found one bug in Question filter.  I was looking under the java tag and yet I saw questions which were not tagged java    The incorrectly shown question was

Does Stack Exchange contain any edit suggestion or bug submission system, or such type of discussion forum to inform SO or its administrators about suggestions and bug reports that relate to SO itself?


I am trying to make a table that is similar to this:  ...and failing. Here is my code:  \documentclass[a4paper]{article}  \usepackage[english]{babel} \usepackage[utf8x]{inputenc} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{lipsum} \usepackage{multirow}  \begin{document} \begin{table}[h] \caption{This is a caption} \centering % centering table \begin{tabular}{|l| p{5cm} | p{5cm} | c|}  \hline  Domain & Sub-domain & Use case &Suitable \\ \hline % inserts single-line Metering & Water, Electricity or Gas distribution & Collect daily or bi-             hourly water, electricity and gas usage data. & Yes \\ \hline \multirow{9}{2cm}{Infrastructure networks} & Water \& Gas transportation &      Water and Gas infrastructure network surveillance (alarm, metering parameters) & Yes\\   & Power Grid & Electricity transport status monitoring and command/control & Yes \\  & Power Grid & Command and control & Yes \\  & Traffic monitoring & Traffic light functionality monitoring, traffic level      monitoring, & Yes \\ & Traffic shaping & emergency gate status control, traffic lights control &     Potentially \\ \hline  \multirow{7}{3cm}{Environmental \& Smart City} & Pipelines & Collect data on     Metrics (temperature, pressure), alarms, leakage, vibration & yes \\ & Waste and Drains management               & Collect data on levels                                            & yes \\ & Atmospheric Noise-Pollution monitoring    & Collect data on humidity,     noise, temperature,$CO_2$,CO, etc. & yes \\ & Public Lighting Monitoring & Bulb monitoring & yes \\ & Parking management & Availability monitoring & yes \\ \hline  \end{tabular} \end{table} \end{document}   Which creates this:  It's fairly close to what I want, but I can't find a way to make the horizontall lines appear wher they should. \hline creates lines that span the first row too.  Any help would be much appreciated.

In a table, how can I draw a horizontal line that goes only through some of the cells? I mean a line like the one in the Foo and in the Bar area of this table:  +----+-----+ |Foo |1 |2 | |    |1 |2 | |    +--+--+ |    |1 |2 | |    |1 |2 | +----+-----+ |Bar |1 |2 | |    |1 |2 | |    +--+--+ |    |1 |2 | |    |1 |2 | +----+--+--+


If you hold Ctrl while translating objects move by full values. I must have pressed some buttons accidentally because for some reason right now its the other way around. I have to hold Ctrl while translating everytime to be able to translate an object normally without it snapping to full values. I don't know how to revert this, reopening doesn't work.

My cursor is moving by every selection by large increments!  Normally when I use Blender, I am able to select and move objects to any coordinate. Now, all of the sudden, when I select an object or mesh the selection moves by an inch or so in each direction.  How do I reset it to normal?


When I log into Ubuntu 13.04, it only shows my background. Now I've tried CCSM to enable the Ubuntu Unity Plugin, but every time I try to do it, it seems to put a check mark in the blank then the check Mark goes away.  I really need a fix for this because I don't want to have to downgrade my system.

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


I am using Ubuntu 14.04.  Mostly I study from e-books, so I read e-books in fullscreen or play games in fullscreen. How to set a sound alert for low battery?

I want my computer to play a custom sound file when my battery is low (say 10%). How can I do this? Thanks


I try to learn the basics about curves and curve modifiers. To do this, I tried to make a zipper. It was a catastrophe. Doesn't matter what tutorial i follow, the following things (one, more, or all) happening to me:   The mesh and the curve is fram from each other The mesh not following the paths shape The mesh turning to different directions applying the same origin destroys everything Apply all transform sets the origin to the pivot of the coordinate system Twist Strange shapes   So can anybody tell wich is caused by what? I'm near to breakdown. Thanks

Every time I think I have the curve modifier mastered, it throws me a another curve ball (no pun intended).  Why in  can I not get the lights to follow the spiral curve? When the modifier is activated, the lights are stretched and distorted along the curve.  I created the curve by converting it from a mesh (string of verts). Why does it not display like a normal Bezier? Is that related to my problem?  I am following all the "rules" that I am aware of, as detailed here: . The curve seems to run in the correct direction. The origin point is at the first point of the curve. The curve modifier on the lights is set to -Y which is the local orientation of the curve's direction.  What am I missing?


Trying to put filenames and taken date/time to every frame in video collecting  from still frames using filelist and command line. Filelist "input.txt" looks like: file 'E:- TMP DACHA 2021\360\101RICOH\R0024073.JPG' duration 0.04 file 'E:- TMP DACHA 2021\360\101RICOH\R0024074.JPG' duration 0.04 Code in command line: ffmpeg -f concat -safe 0 -i input.txt -vf scale=640:-1 output.mp4 Thanks!

What I want to do: I have a folder with a great bunch of images. Using these files I want to create a slideshow video, while I want the filename of each of the original images burned into the bottom right corner.  What my current state is: I made a script to fetch all .jpg files in the folder and make a ffmpeg-readable list and I know how to concat the images to a slideshow and everything works as intended. I also figured out how to use FFmpeg's drawtext to get a handsome filename stamp.   Now the problem: Currently FFmpeg grabs the last filename from the file list (for example IMG_9935.jpg) and burns it into the entire video. But what I want to happen is, that it changes with each 'new' image - just like a timecode would change during the course of the video.  Is any of this possible?  As a side note: "Why don't you burn the filename beforehand?" I'd like to keep it as flexible as possible. So if there's another way round, I'd like to go that way.  for i in *.jpg; do echo "file '$i'" >> files.txt; done  ffmpeg -r 1/3 -f concat -safe 0 -i files.txt -vf "eq=text=$(echo $i | rev | cut -d / -f 1 | rev): fontcolor=0x808080: fontsize=14: x=w-tw- 10:y=h-th-10" -c libx264 filename.mp4


I have a Razer Blade Stealth, and a few weeks ago I upgraded to 17.10. Everything was going great until I closed my laptop lid, and reopened it. Everything would look normal for ~10 seconds and then the screen would go dark and the computer would suspend. Unlock the computer, and the process repeats itself. This behavior would not stop unless I was able to quickly log in and restart the computer.  At first, I thought it was a problem with suspending. But after some digging and additional tests, I do not think this is the case. If I suspend the computer from the command line or the power button then I can resume with no issues. However, if I do it by closing the lid (as one would normally do 99% of the time) then the issues come up again.  I guess my question is: what kind of issue does this point to? I'm no power user, and the way I've got around it is by going into my /etc/systemd/logind.conf file and changing it so that HandleLidSwitch=ignore, but this just makes it so the laptop doesn't do anything on lid close. Does anyone know what a more elegant fix to this issue could be, or where to look?

So I have decided to make the leap from Windows to Linux, but I have been having one issue. Whenever I close the lid of my laptop, it goes into sleep mode, and when I open the lid, it comes back awake. My issue is, that 30 seconds or a minute into use, it auto goes into sleep for NO reason, I don't know why it does this. I then have to press the power button to get it to wake, but then it just repeats, I have to completely power off to fix it. Any solutions? I can provide info as needed, provided you tell me how to get that info.


I would like to prompt users for a single passphrase to establish trust with separate, normally (but not always) complementary systems from one password input.  I'm essentially looking for a box where one password enters and two leave, where maximum of entropy is maintained and the ability of an attacker using either output password to derive the other is minimized.  There are some constraints:   The algorithm must be public knowledge. No other secret keys can be involved. Output passwords must be deterministic for any given input password.   A simple answer seems to be:   $\rm pass1 = HMAC(password, \text{ "Magic One"})$ $\rm pass2 = HMAC(password, \text{ "Magic Two"})$   With this method, it should be as difficult for someone who knows $\rm pass1$ to derive $\rm pass2$ as it would be for them to guess $\rm password$.  Are there better existing algorithms?  The only reference I have been able to find is Steve Bellovin's  using the same basic method.  Specifically, is it practically possible to increase the difficulty of someone with knowledge of $\rm pass1$ to derive $\rm pass2$ to be more than the difficulty of guessing $\rm password$ itself, even if it requires spending portions of available $\rm password$ entropy?  For example, let's assume that $\rm pass2$ is exposed in an environment where it is being attacked "offline", while $\rm pass1$ is less vulnerable.  In this case, $\rm pass1$ is effectively also exposed to the "offline" risk as much as $\rm pass2$.

What is the best way to generate two independent symmetric keys from one user-entered password or passphrase? Would using both scrypt and pbkdf2 achieve this?


Why does the following result in an error?  Is bar not instantiated before the invocation?  (function bar(){}, bar())      Uncaught ReferenceError: bar is not defined

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


I created two websites for a local football team with news and photos, etc. I created them on a hosting facility provided by a newspaper company for amateur sports clubs. After ten years they now inform me that their hosting service will end in one month's time. They advise me to make arrangements to preserve the two sites if I wish keep the content, as the sites will not be available after the hosting service ends. How can I save these sites for future referencing ?

How can I download all pages from a website?  Any platform is fine.


I have tried to use FIND command but i couldn't figure out exactly how it works. Can someone help be. I want to know how i could use this command to find where the boot.log file is stored?

I wanted to know, what is the best way to use the find command efficiently?  I generally use, find [filename] [dir] which gives me a long list of file names none of them any way related to my search.  I simply need to find one file in a particular directory. What is the command for that?


Do not confuse this question to be a duplicate of "what is difference b/w sort -u and sort | uniq"  This is in essence a word count program  Confusion raised from the following command is reason for asking this question:      root@sanctum:~/datascience# cat data      this is a file that is supposed to be a file   this gives incorrect output:  root@sanctum:~/datascience# cat data | sed 's/ /\n/g' | uniq -c       1 this       1 is       1 a       1 file       1 that       1 is       1 supposed       1 to       1 be       1 a       1 file   Piping the output to sort and then to uniq gives the perfect answer-  root@sanctum:~/datascience# cat data | sed 's/ /\n/g' | sort |uniq -c       2 a       1 be       2 file       2 is       1 supposed       1 that       1 this       1 to   output of when piped just to sort:  root@sanctum:~/datascience# cat data | sed 's/ /\n/g' | sort  a a be file file is is supposed that this to   how does the line number of appearance of a line have an effect on the count of the occurrences in the file? i dont know how to phrase it but u get the point  Basically why cant cat data | sed 's/ /\n/g' | uniq -c give the required result?

So I'm checking the md5 hash of my files with this as my output:  657cf4512a77bf47c39a0482be8e41e0  ./dupes2.txt 657cf4512a77bf47c39a0482be8e41e0  ./dupes.txt 8d60a927ce0f411ec94ac26a4785f749  ./derpina.txt 15f63928b8a1d5337137c38b5d66eed3  ./foo.txt 8d60a927ce0f411ec94ac26a4785f749  ./derp.txt   However, after running find . -type f -exec md5sum '{}' ';' | uniq -w 33 to find the unique hashes I get this:  657cf4512a77bf47c39a0482be8e41e0  ./dupes2.txt 8d60a927ce0f411ec94ac26a4785f749  ./derpina.txt 15f63928b8a1d5337137c38b5d66eed3  ./foo.txt 8d60a927ce0f411ec94ac26a4785f749  ./derp.txt   From my understanding, only one of either derpina.txt or derp.txt should be showing up since their hashes are the same. Am I missing something? Can anyone enlighten me as to why it outputs like this?


"Proofreader" Badge awarded to approved or rejected 100 suggested edits but if you see my suggestions count it is . So my question is why I am not getting badge of "proofreader" or there is something else required for that?

Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


I've just install wine in my Xubuntu 18.10 with the command "sudo apt install wine" but there's no shortcut in my menu.  I checked the /usr/share/applications, there's nothing there too.  Is there a way to generate that file. Try to uninstall/reinstall it with the softwares application or via synaptic but with no more success.  As I use Ubuntu/Xubuntu for 11 years, I found an alternative way to launch sketchup without anything in my menu but I think it should be fixed for the beginners.  Edit: The answer is not only to make a launcher. But the apt install program didn't create anything in the menu. I don't have neither the right clic option "open with wine..". I would like to have an integration of wine as usually in Xubuntu. It doesn't work for the 18..10 version.

In older versions it was easy to create a launcher on my desktop. All I had to do is right click on my desktop and select the "create launcher" option.  How can I create such launchers now?


Is it possible the write multiple statements in an anonymous function?  For example, I want to pass a function f as an argument to another function, which will attempt to call it multiple times in a loop, and I want f to do non-trivial work spread over multiple statements.  Clearly I can't write the following, since the second disp is not captured by the function -  >> f = @() disp('Hello'); disp('World') World   I hoped I could use brackets to delimit the scope of the function, but while MATLAB accepts the syntax,  >> f = @() {disp('Hello'); disp('World')}  f =       @(){disp('Hello');disp('World')}   it doesn't like me calling the function -  >> f() Error using disp Too many output arguments.  Error in @(){disp('Hello');disp('World')}   Is there a solution, other than writing an inner function and passing that instead (which I am loathe to do, since debugging in an m-file that contains inner functions is difficult, since you can't create variables in the workspace).

I'd like to do something like this:  >> foo = @() functionCall1() functionCall2()   So that when I said:  >> foo()   It would execute functionCall1() and then execute functionCall2().  (I feel that I need something like the )  EDIT:  functionCall1 and functionCall2 are not necessarily functions that return values.


I'm modifying a form plugin, and trying to have it submit to another page chosen by the user. Right now the page it submits to is page_id=6. If I navigate to this page myself, it prints Array(). When I submit the form, I get a 404 error although the url matches.  page_id=6 uses the shortcode [convertable] to include this code:  <?php  echo "<pre>"; print_r($_POST); echo "</pre>"; ?>   I'm testing in on a WPMU install. You can see the form   Any ideas on what's going wrong?

I have a problem with my page. I'm trying to make a "Contact Us" page. It's working perfectly fine design-wise. But when I try to send the form to the same page as origin. It returns 404 error.  It only happens when I'm sending the form. I've tried both with GET and POST requests. Nothing seems to work.  I've even commented out the PHPMailer part. It's caused entirely by the extra variables.  If it helps anything, they're "name", "email" and "message".


The President * information to an unauthorized staff of the White   House.   I am wondering if there's a word for divulging unintentionally like as in a person leaking corporate information to a person who's not supposed to have that information unintentionally. Is there such a word?

I am thinking there could be an idiom that states that you or someone revealed a secret unintentionally? Can you think of an idiom like that? I am looking for an idiom I can use to write a blog post about the recent incident where Secretary Pompeo unintentionally revealed the dirty secrets behind the CIA.


I have the following minimal example and I don't get, why my struct sizes are wrong. I'm expecting the output to be 50, instead I get 1. What am I doing wrong?  #include <stdio.h> #include <stdlib.h>  typedef struct prod {     char *x; } prod_t;  typedef struct obj {     prod_t *things; } obj_t;   #define LARGE_BUF 100 #define CHAR_BUF 20   obj_t *func1(obj_t *t) {     t->things = malloc(sizeof(prod_t) * LARGE_BUF);      for (uint16_t i = 0; i < 50; i++) {         t->things[i].x = malloc(sizeof(char) * CHAR_BUF);         t->things[i].x = "hello";     }      return t; }  int main(int argc, char **argv) {     obj_t *var = malloc(sizeof(obj_t));      var = func1(var);      printf("%lu\n", sizeof(var->things)/sizeof(var->things[0]));      return 0; }   Since I don't have the number of entries, the function generated for me (it's 50 now, but it could change dynamically), how do I free(..) this up?  Is the only option to introduce a field in the struct, to keep track of the actual array size?

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)?


Can i place slip in a wave like pattern? Can i place first slip ahead of keeper towards batsman instead of behind the keeper?  I have not seen these types of fieldings.

Can I place more than 2 midoffs or 3-4 silly points in cricket? I have seen no match with such fieldings? But there are no rules against it.


I just upgraded from 12.04 to 14.04. Now any Arabic text is displayed as squares, as shown in the image below. I tried installing the Arabic language pack but this did not solve the problem.

I have installed Arabic language support using the language tool, but I am still unable to get this page to render correctly:    Which fonts do I need to install to stop seeing squares instead of Arabic characters? I would prefer fonts that are available in the Ubuntu repositories.


I am taking a course in Mathematical Methods for physicsPhysics (Junior Level).   We are working from   > Mathematical Methods for physicists, George B.Arfken .    I just need online resources covering ( Matrices, Determinants, Vector Analysis, Tensors and differential forms and Vector spaces...etc) to study and understand from.

A week ago I  people on this site what mathematical background was needed for understanding Quantum Physics, and most of you mentioned Linear Algebra, so I decided to conduct a self-study of Linear Algebra. Of course, I'm just 1 week in, but I have some questions.    How is this going to be applicable to quantum physics? I have learned about matrices (addition, subtraction, multiplication and inversion) and about how to solve multiple equations with 3 unknowns using matrices, and now I am starting to learn about vectors. I am just 1 week in, so this is probably not even the tip of the iceberg, but I want to know how this is going to help me.  Also, say I master Linear Algebra in general in half a year (I'm in high school but I'm extremely fast with maths), what other 'types' of math would I need to self-study before being able to understand rudimentary quantum physics mathematically?


I'm new using Ubuntu OS, I've Ubuntu 12.04 and I'm trying to run a simple Hello world C program  #include <stdio.h> int main(){ printf("Hello world!"); return 0; }   When using gcc --version command at cmd, it returns 4.6.3 (I think that is the version), the problem is that when I try to use the command gcc helloworld.c in the address where the helloworld.c file is, it doesn't prompt anything, not the hello world! printing nor an error, the cmd just change line like if the enter key was pressed, but it appears that an a.out file were create by the command.  I've been working with python in the same way by using python file.py command and have no problem, what am I doing wrong?  Thanks for reading!

I have installed GCC compiler by installing the build-essential package.  After the installation I wrote a simple C program. I tried to run it with the following command:  gcc First.c ./a.out   but I'm getting a bash: ./a.out: Permission denied message. I don't know what to do now.


What is the basic argument upon which ridge and lasso regression are based on? I went through  where it was mentioned that       In many cases, tikhonov matrix is chosen as the identity matrix ,   giving preference to solutions with smaller norms. In other cases,   lowpass operators (e.g., a difference operator or a weighted Fourier   operator) may be used to enforce smoothness if the underlying vector   is believed to be mostly continuous.   I want to understand that why are solutions with smaller norms more appealing? Smoothness I can get but why smaller norms?

In order to solve problems of model selection, a number of methods (LASSO, ridge regression, etc.) will shrink the coefficients of predictor variables towards zero. I am looking for an intuitive explanation of why this improves predictive ability. If the true effect of the variable was actually very large, why doesn't shrinking the parameter result in a worse prediction?


"Tyra sprints best of all competitors."   Is it a correct sentence?

We achieve the best financial outcomes through highest ethical standards according to our Compliance Code, cost controlling, and protecting our assets, environment, and people.    Is it correct to write this sentence without the article the before the superlative adjective highest?


I ran boot-repair and got   The computer won't even let me run the BIOS without the USB I installed Ubuntu from plugged in. Interestingly enough, I formatted that USB drive right after I installed, so I don't know why it would even be a factor here. Any advice?

I had Ubuntu 12.04 Beta installed on my computer. When 12.04 was finally released, I made a bootable USB Flash Drive using Startup Disk Creator.  Then I decided to check if this drive works properly and to reinstall the system on my desktop. I must add, my desktop behaves a bit strange when it comes to bootable USB's, it recognizes them as HDD.  In BIOS I changed priority of boot so USB Flash Drive (recognized as HDD) was first. Successfully booted, I installed Ubuntu. Everything worked fine, but...  Now I cannot boot from my real HDD. Every time I want to boot, I put the USB Flash Drive into my computer, boot, safely remove it and everything works.  What do I need to do to repair boot?


I want to change the command \pause into %\pause in all my tex files. So I used the following Linux command:  for f in *.tex; do sed -i 's/\pause/%\pause/g' $f; done   but the problem is that the machine don't take into account the character \, so it only changes pause into %pause.

Take the following script:  #!/bin/sh sed 's/(127\.0\.1\.1)\s/\1/' [some file]   If I try to run this in sh (dash here), it'll fail because of the parentheses, which need to be escaped. But I don't need to escape the backslashes themselves (between the octets, or in the \s or \1). What's the rule here? What about when I need to use {...} or [...]? Is there a list of what I do and don't need to escape?


How do I prototype a method in a generic python program similar to C++?  //PROTOTYPE do python protoyping  writeHello() //GIVES ERROR AS IT WAS NOT DEFINED YET  def writeHello():     print "Hello"

I have a series of Python classes in a file. Some classes reference others.  My code is something like this:  class A():     pass  class B():     c = C()  class C():     pass   Trying to run that, I get NameError: name 'C' is not defined. Fair enough, but is there any way to make it work, or do I have to manually re-order my classes to accommodate? In C++, I can create a class prototype. Does Python have an equivalent?  (I'm actually playing with Django models, but I tried not complicate matters).


Our domain was originally pointing to a Squarespace site that went live in March. In June, the site was rebuilt in WordPress and is currently hosted with WPEngine. Oddly, the site is being indexed by Bing and Yahoo, but is not indexed at all in Google i.e. site:example.com yields nothing. A few things to note:   I am not "discouraging search engines" in WordPress Robots.txt is fine - I'm not blocking anything that shouldn't be blocked A sitemap has been submitted via Google Webmaster Tools and I have "fetched as Google" and submitted for indexing - No errors I've entered both the www and non-www in WMT and chose a preferred There are several incoming links to the site, some from popular domains The content on the site is pretty standard and crawlable, including several blog posts   As far as I know, the site has never been indexed by Google, neither before nor after the switch. What gives?

This is a general, community wiki  question and answer pair intended to address any questions   concerning the reasons a site or specific site contents do not appear   in search engine results.      If your question was closed as a duplicate of this question and you   feel that the information provided here does not provide a sufficient   answer, please open a discussion on .   My site (or specific pages on my site) is not appearing in search engine results.  Why isn't my content indexed and what can I do about it?


I would like to know how to prove the symmetrical relation for $\sim$ according to the following definition:     Suppose $\sim$ is defined on the set of the integers as follows : $a\sim b$ iff $ab ≤ a|b|$   Please explain to me. Thank you.

I would like to know how to prove reflexivity, symmetry and transitivity for $\sim$ according to the following definition:     Suppose $\sim$ is defined on the set of the integers as follows : $a\sim b$ iff $ab ≤ a|b|$   Please help me. Thanks!


user have to write an email in multiple lines and stop the input when ".." (two dots) are entered by the user. then the email should be saved to the variable but the variable saves the last input which are the two dots. this is my code  any changes?  BufferedReader inl = new BufferedReader(new InputStreamReader(System.in)); String email_data;  System.out.println("Data: ");  do{     email_data = inl.readLine(); } while(email_data != "..");

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


This may have been asked before, but I can't seem to find an appropriate answer. I've been searching for about two days now, to no avail. Here is my situation.  I purchased a new laptop. The original thought was to put Ubuntu on first, that put on Windows 7, which I have. After I installed Ubuntu, It wouldn't let me install windows. After a while, I got frustrated and decided to REMOVE Ubuntu and just install Windows 7 for a class i'm going to need in a few days. For the life of me, I can't uninstall Ubuntu. I've tried everything possibe and even google searched. I purchased WipeDrive, still not working. Tried to restart and boot from disk. It freezes. Sometimes only sees Ubuntu on C drive and not my cd drive. Please, for the love of god, help me get Ubuntu off of my computer. Please.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I recently did a couple of travels where by accident I found unlisted hotels. Basically I found them on place. I was curious and googled them. These were small places, mostly known by locals I assume, that I was not able to find in booking websites. Even googling I only found a couple of "accidental" references in company listings or blog references.  The places were actually OK, a bit outdated, but actually with a good quality/price ratio. Probably also good options when everything is already full on the usual online resources.  This leads me to believe there are probably more of these. Hotels and other types of accommodation that are not listed online.  I know the question is a loop hole. How to find something that is not findable. But maybe there are some resources, online groups or something that collect and list these places.  Is there an easy way to find accommodation that is not listed in the standard places, like booking websites?  Note: I was not aware of  when I first asked. In fact the questions are very similar. In any case, for now, I will leave it since the scope of this one is broader. Any kind of accommodation is welcome. In any case I recognize the high similarity and that probably answers will be the same. I leave it up to the community to decide.

There are a ton of sites out there to help book hotel rooms and to aggregate all the different sites to book hotel rooms. These companies make enough money to buy ads on TV, so I won't name them here. I normally poke around 3 or 4 of these as part of planning any trip.  I am now starting some very long term planning for a 6 week South Pacific trip, which includes undertstanding what hotels costs on some very small islands. I have paper guidebooks and I've been looking online. But I come across anomalies. For example, a place which has only 9 hotels listed on the sites I use, and prices range from $1000/night down to $200/night, then when I read the reviews on that cheapest one people are saying "it's nothing special, there are 5 or 6 places just like it here for half the price". Well, not on this site there aren't!  My guess is that many of these places don't have web sites, or don't have online booking, and therefore aren't getting into the aggregators. For some islands I have found local tourism boards with lists of "pensions" and such, typically cheaper than what I can find on the aggregators.    But how can I know? I don't want to assume that popular web sites represent reality, and choose only from places listed there. But I don't want to invest 10-20 hours of research per island only to discover the aggregators had everything. How can I know where the coverage is good and where it isn't, what kinds of hotels are more or less likely to be listed at expedia, trivago, booking, hotels, tripadvisor, and the like? (For example, I don't want to stay at a hostel, so I don't mind if they're not included in online sites.) Are there sites like wikitravel that list places without much of an internet presence?  I'm starting my research over a year before the trip, but wading through hotel pages is not the fun part of the planning so tell me how the smart people do it.


I just asked about , which lead to  which pointed out some tools such as . I also have heard of LuaTeX, , , and others.  I am not familiar with how these different "LaTeX tools" work, which is what this question is about. I am wondering if they actually implement TeX from scratch. That is, they somehow read the  and implemented all the algorithms without resorting to some standard / central TeX library. By standard / central TeX library I mean some central code repository that implements all the algorithms from the research papers. If all these tools are all implementing the research from scratch then that would be a useful learning tool.  If the tools I listed (and others similar) are just wrappers around a central TeX library, then wondering what that central library is. I have seen , but given that , I am not sure if that would be considered tex-core. This question  leads to  (also , looks like it's written in , and ), but not sure if everything is using that. If instead there are multiple different implementations of the TeX research, that would be helpful to know as well.

I’m interested in the differences and commonalities between the “new” (La)TeX processors:   , , and .   Personally, I’ve only used XeTeX so far and without having the time to try out all three systems, I’m having a surprisingly hard time setting them off from one each other.  As I understand it, these systems are actually very different in some regards. So I’m explicitly asking for strengths and weaknesses in every-day use (whatever that is), rather than very special scenarios.  (I’ve already asked a  on Super User some time ago.)


I have a large word-frequency matrix (~6m unique words X ~4k documents) and I'm trying to use truncated singular value decomposition (SVD) to project it onto a matrix with fewer dimensions. I know how to get to $[U_{k}, S_{k}, V_{k}']$, but I don't know what to do then.  Each tutorial I find gives me a different answer. , for instance, I'm told to retain only the first $k$ rows of $S_{k}$ and $V_{k}'$ and then multiply $S_{k}V_{k}'$. In the scikit-learn implementation, however, they do it by multiplying $U_{k}S_{k}'$ ( and ). (The  as source doesn't say anything about that.) In  they suggest $X'U_{k}$ instead (though they are talking about PCA, so maybe that doesn't apply here). Other answers haven't helped (, for instance, they say we need to apply truncated SVD to the reduced matrix - which doesn't sound right, we use truncated SVD precisely to get to the reduced matrix, no?).  So, bottom line: how do I go from $[U_{k}, S_{k}, V_{k}']$ to a reduced data matrix? Which of the above formulas is the correct one (and why)?  Just to be clear: I'm not looking to reduce rank only (that I can do by multiplying $U_{k}S_{k}V_{k}'$ but it gives me the exact same dimensions I had before, which doesn't help me); I want to reduce the actual dimensions of the data matrix.

Principal component analysis (PCA) is usually explained via an eigen-decomposition of the covariance matrix. However, it can also be performed via singular value decomposition (SVD) of the data matrix $\mathbf X$. How does it work? What is the connection between these two approaches? What is the relationship between SVD and PCA?  Or in other words, how to use SVD of the data matrix to perform dimensionality reduction?


I was able to include a .eps file in my latex document in the following way :  \documentclass[12 pt]{article}  \usepackage[pdftex]{graphicx}  \begin{document} \begin{figure} \centering \includegraphics[width=6cm, height = 6cm]{x.eps} \caption{} \label{} \end{figure}  \end{document}   I would like to be able to add labels for the x and y axis (the image has been imported from a plotting software without the x and y axis labels) in latex. Is there a way to accomplish this in latex ? I tried using tikz but I was not able to get desired results.

Recently I have learned how to draw simple stuff with TikZ. I really like it. Now I wonder if it is possible to draw with TikZ on a image. Instead of pasting a image in Illustrator and adding some vectors to point something in the picture I would like to do it using TikZ. Is it possible?   For example, on a picture of a computer (PNG,etc) I would like to draw some arrows and labels saying "Keyboard", "Monitor", etc.


How will I then uninstall Windows?  I don't want to run both operating systems side by side.

I would like to see a full how-to guide on how to install Ubuntu.


Task: Display multiple symbologies (Gratuated symbols and Colours) on one layer  Problem: The symbology keeps overwriting itself, so I cannot get both symbologies at the same time  Methods Tried:   Export the graduated colour layer as .lyr and import. (Result:Overwrites) Multiple attributes:(Result: Gives me all combinations, and that is not what I want)   I really don`t understand why I cannot get what I want to do in a few simple clicks?

In ArcMap 10.2, I have a layer that has two attributes: depth and magnitude.  Depth should be represented by color: deeper points being lighter and shallower being darker.  Magnitude represented by symbol's size: points with a higher magnitude have a bigger symbol and points with a lower magnitude have a smaller one.  How do i do that?  So, many people has told me to use "multiple attributes" in the symbology dialog. I wish i could upload a screenshot but my firewall seems to have the image service blocked. Let's try with words.   "Multiple attributes" offer these input boxes: "value fields" and "variation by". in "value fields" i select "depth" and "magnitude" in "variation by" we have two buttons: "color ramp" and "symbol size" in "color ramp" i choose "depth" i open "symbol size". There, "depth" is selected. I change it to be "magnitude". open "color ramp" again. No longer "depth" is selected. Now "magnitude" is.   Basically, whenever i select something on "symbol size" or "color ramp", the same selection is duplicated on the other button.