My 1TB NTFS data drive seems to be failing and is no longer accessible. It doesn't appear in drive or device manager on windows. The drive only has the one NTFS partition. However I can see the drive when booting into ubuntu. It accurately picks up the drive size and free space, but is unable to mount a partition. Google seems to suggest it's a partition table failure, however I am can not be sure. Is this a software failure or something physical? And is it repairable without losing data on the partition? The drive only has the one NTFS partition.
What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:
Using package nomencl What is the difference between building from source and using an install package? it seems my bash-completion got corrupted. Every time I try to use command substitution, for example when I type  ls $(ls Deskto&lt;Tab&gt;   ..result is..  ls $(ls Desktobash unexpected eof while looking for matching ")".   I tried removing my .bashrc file and cp /etc/skel/bashrc ~/ to get a new one. That works until I add something into my new bashrc. Even when I do echo '#" &gt;&gt; ./.bashrc it breaks again. Removing my bash_aliases did not help either.  Also sudo apt-get install --reinstall bash-completion did not do the trick.  However there are some threads about similar problem, nothing works.  ANY hint will be greatly appreciated! :) Show that the operator norm is submultiplicative We had in our lecture on numerical analysis the following: Let $\mathrm{Lin}(X,Y)$ be the set of all linear maps $X\rightarrow Y$. Let $A\in\mathrm{Lin}(\mathbb R^l,\mathbb R^n)$ and $B\in\mathrm{Lin}(\mathbb R^n,\mathbb R^m)$ and $\|C\|_{op}:=\max_{\|x\|\leq1}\|C(x)\|$. Then our lecturer followed $\|A\circ B\|_{op}\leq\|A\|_{op}\cdot\|B\|_{op}$. So he didn't prove it and so I've tried it by my own. My attempt: $$\begin{aligned} \|A\circ B\|_{\mathrm{op}} &amp;= \max_{\|x\| &lt; 1}\|(A \circ B)(x)\| \\ &amp; \leq \max_{\|x\| &lt; 1} \|A\|_{\mathrm{op}} \|B(x)\| \\ &amp;= \|A\|_{\mathrm{op}} \max_{\|x\|\leq1}\|B(x)\|\\ &amp;= \|A\|_{\mathrm{op}}\|B\|_{\mathrm{op}} \end{aligned}$$ But this seems too easy. I am really interested in a nice proof so anybody could help? Thanks a lot! Windows Update not working on Windows 2012 R2 Standard I recently inherited the management of a Windows 2012 server at a remote site.    I checked Windows Update and it has not been updating since March.  When I tell Windows to check for updates, it acts like it is checking, but it seems to say that for hours.   If I attempt to restart the windows update service, it seems to never be able to shut down.  My only remedy seems to be rebooting to get back to the point where I can tell Windows Update to check for new updates.    The last successful check for updates says March 20.  The last time updates were installed says March 17 (failed).  The update history shows that one update failed for March 17, a printer driver update, but the history shows 13 failed updates for Feb 17.  Not sure what else to try. Which balancing issues, if any, would arise from allowing PCs to spend actions on bonus action features? I understand that RAW, features/spells/etc. that require a bonus action (e.g. Bardic Inspiration or Healing Word) cannot be used with a regular action instead (see ).  However, what would be the long-term ramifications and effects on game balance if I were to instead allow PCs to use a regular action for bonus-action features/spells/etc.?  For the sake of narrowing this down a bit; I'm only asking about ramifications when allowing player characters to do this, no need to take NPCs or Monsters into account. I don't use the variant rule of feats either, so no need to consider those as well. LaTeX errors in Formatting I want to print this text :  make -j 5 KDEB_PKGVERSION=1.yourcustomname deb-pkg  But I feel because of the underscore , LaTeX generates an error missing $ inserted and it doesn't print it as well.  Secondly, In the \fbox{} , I wanted to print the two texts on the next line(i.e) one text per line , so I used \ and even \par but it doesn't seem to work and I would like to align the (or) as well.   \fbox{\texttt{uname -a}\\(or) \texttt{cat /proc/version}}   Here is my full source code:  \documentclass[12pt]{article} \author{Subham Soni S.} \date{\today} \title{Compiling and Installing a Kernel 3.13.3 On Ubuntu, Debian and its Derivatives} \begin{document} \maketitle To replace the existing \textsl{kernel} with a new one, do the following: \begin{enumerate} \item Create a folder named \emph{kernel} in the home directory. \item Download the latest kernel to the folder from  \texttt{www.kernel.org}. \item Extract the file. \item In the terminal, type the following command to \textbf{install the neccesary tools to compile the kernel}:   \begin{center}     \fbox{\texttt{sudo apt-get install gcc libncurses5-dev dpkg-dev}}   \end{center} \item Enter the directory of the extracted kernel source   \begin{center}     \fbox{\texttt{cd kernel} \par \texttt{cd linux-3.13.3}}   \end{center} \item Configure the kernel   \begin{center}     \fbox{\texttt{make menuconfig}}   \end{center}   In this menu you can customize your kernel \item Save and exit \item Compile the kernel   \begin{center}     \fbox{\texttt{make -j 5 KDEB_PKGVERSION=1.yourcustomname deb-pkg}}   \end{center}   \emph{This process might take a while...} \item Install the kernel   \begin{center}     \fbox{\texttt{sudo dpkg -i ../linux*.deb}}   \end{center} \item Reboot   \begin{center}     \fbox{\texttt{sudo reboot}}   \end{center} \item Run the following commands to check the kernel version   \begin{center}     \fbox{\texttt{uname -a}\\(or) \texttt{cat /proc/version}}   \end{center} \item You can easily uninstall the kernel with the command:   \begin{center}     \fbox{\texttt{sudo apt-get purge linux-image-3.13.3 linux-image-3.13.3-dbg}}   \end{center} \end{enumerate} \end{document} How do I generate a smooth random horizontal 2D tunnel? I'd like to create a smoother version of the navigable and quite natural-looking random tunnel found in .  It should ideally be...   infinite, so more can be generated as the player progresses; parametrised, allowing control of its thickness over time; made of smooth curves, not rectangles as in the above game; precomputable, as knowing its bounds in advance allows collision detection for e.g. positioning powerups inside the tunnel.   I'm looking for a generic method I could implement myself. Further parameters and optimizations are welcome.  Asking here was suggested . I think this fits in both places, as it's as much about the algorithm as about gamedev. How to perform a logistic regression for more than 2 response classes in R I want to predict the impact of oil price over a Colombian oil company's stock price. I plan to use a logistic regression for this with a categorical variable (Up or Down given the direction of the stock price). Here is part of my dataset:  Minute  ecopet  profit  sum_profit   direccion  cl1_chg   sum_cl1    direccion_cl1 571     2160     0       10           Up         -0.03     0.00      Down 572     2160     0        0           Neutral     0.07    -0.03      Down 573     2160     0       -5           Down       -0.08     0.04      Up 574     2160     0       -5           Down       -0.07    -0.04      Down 575     2160     5       -5           Down       -0.08    -0.11      Down 576     2165     0       -25          Down        0.00    -0.19      Down 577     2165     0       -25          Down       -0.05    -0.19      Down 578     2165     0       -15          Down       -0.17    -0.24      Down 579     2165     5       -15          Down       -0.06    -0.41      Down 580     2170     0       -20          Down        0.03    -0.47      Down 581     2170    -10       0           Neutral     0.04    -0.44      Down   My dependent variable is 'direccion'. But as you can see it has 3 response classes. I know that to implement a binary logistic regression in R the code is:  glm.fit=glm(direccion~direccion_cl1, data=datos, family=binomial)   I am working with intraday information and plan to predict what happens when the oil moves up/ down (in the previous 10 minutes) and how it impacts the stock price in the next 10 minutes.  Could anyone tell me how could I perform this? I don't really know how to perform the logistic regression with 3 response classes. Thanks! Converting numpy dtypes to native python types Is there a way to insert Keyboard Glyphs in Google Docs? Here on the StackExchange framework we have a nice feature, which is apparently called "Keyboard Glyphs" (cf. ):     CTRL+Z   Is there a way (e.g. with an Add-On) to do the same in Google Docs? I browsed the Add-Ons but did not find anything, maybe it's hidden somewhere different (e.g. in a Code Formatting Plugin). I have a text file named "Hex_data.txt". I want to load content of Hex_data.txt into a variable name RAM in verilog. When I try this, I get an error that the text file can't be found. Where is this file loaded from?  The content of "hex_data.txt" :            21            a4          2a          26          7a          ff           6f   I want to create a variable name "RAM" defined like:   reg [6:0] RAM; in which the above content save like:  RAM[0]=21     RAM[1]=a4           RAM[2]=2a             RAM[3]=26            RAM[4]=7a             RAM[5]=ff             RAM[6]=6f   I wrote a code:  module file_read;      reg [7:0] RAM [0:6];          initial $readmemh("Hex_data.txt", RAM);   integer i;               initial begin                    $display("data:");                for (i=0; i &lt; 7; i=i+1)                $display("%d:%h",i,RAM[i]);              end                 endmodule        But the above code not working. How can i get desired output? Steam Bollywood Achievement:     As Gandhi, win a cultural victory with   3 or fewer cities in your empire.   I wish to do this achievement on a Pangaea Standard map size or larger and on Prince difficulty or higher,  What tactics do people recommend to achieve this. Any tips on the use of, Social Policies, Wonders, Diplomacy, City States and Military. Why is polyploidy lethal for some organisms while for others is not? Execute a script upon logout/reboot/shutdown in Ubuntu I'd like to run a .sh file using bash on logout and shutdown of Ubuntu. I have searched up and down the web and have found only fixes for KDE and GNOME. The script is simple, I just need to know if I can add the line of code to the "logoff/shutdown" file or if I need to reference it in another script. Solutions to $a+b+c=12$, $a, b, c \in \mathbb{N}_0$ Let $a, b, c \in \mathbb{N}_0$. If $a+b+c=12$, how many solutions $(a,b,c)$ satisfy the equation?   Is the answer:      $729$ How can I secure an Ethernet-over-power network? I just bought myself an Ethernet-over-power adapter, and plugged it in. It seems to be working great, but now I'm concerned that my neighbours may be able to access my network.  I live in a rowhome complex; is it possible they can access my network? If so, how can I secure it? How to find fixed points for DES weak keys recursive statistics on file types in directory? I did a website scrape for a conversion project. I'd like to do some statistics on the types of files in there -- for instance, 400 .html files, 100 .gif, etc. What's an easy way to do this? It has to be recursive.   Edit: With the script that maxschelpzig posted, I'm having some problems due to the architecture of the site I've scraped. Some of the files are of the name *.php?blah=blah&amp;foo=bar with various arguments, so it counts them all as unique. So the solution needs to consider *.php* to be all of the same type, so to speak. In my custom Drupal 8 plug-in I perform such query:  $select = db_select('my_table', 'e'); $select-&gt;addField('e', 'field1');  $select-&gt;condition('field3', 'NULL', '!='); $select-&gt;condition('field4', array(11, 12, 31, 32, 33), 'IN');  $select-&gt;groupBy("e.field1"); $select-&gt;orderBy("e.field1"); $select-&gt;orderBy("e.field5"); $entries = $select-&gt;execute()-&gt;fetchAll(\PDO::FETCH_ASSOC);    And it works fine. It returns me all records grouped by field1 that meets the condition, orderered. But it returns only field1 column.  I wanted to get more columns, so I have added another $select-&gt;addField('e', 'field2'); just after first one:  $select = db_select('my_table', 'e'); $select-&gt;addField('e', 'field1'); $select-&gt;addField('e', 'field2');  $select-&gt;condition('field3', 'NULL', '!='); $select-&gt;condition('field4', array(11, 12, 31, 32, 33), 'IN');  $select-&gt;groupBy("e.field1"); $select-&gt;orderBy("e.field1"); $select-&gt;orderBy("e.field5"); $entries = $select-&gt;execute()-&gt;fetchAll(\PDO::FETCH_ASSOC);    This time I get error:     Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1055 Użyto 'my_database.e.field2' bez umieszczenia w group by:   Which means "my_database.e.field2 has been used without putting in into group by". But I don't want to group by every column I select.  Unfortunatelly Drupal 8 added ONLY_FULL_GROUP_BY :( Then, how can I use groupBy and select more then one column at the same time?