I'm relatively new to Linux. I tried to install Virtualbox on Lubuntu 18.10. I had never used it before.  During the installation, a prompt told me that I had to alter my Secure Boot. I wasn't anticipating that and tried to discontinue the installation so I could read more about what that meant before moving forward.  I tried to uninstall Virtualbox using the Software application but it would not give me that option. I tried to use the Synaptic Package Manage to uninstall, but it prompted me to run sudo dpkg --configure -a in terminal. That did nothing for an indeterminate amount of time. I had to close out terminal entirely to write another command, and then I uninstalled Virtualbox using sudo apt-get --purge remove virtualbox and dpkg --list seemed to indicate this was successful.  But there still appears to be a residual problem that I can't discontinue.  Synaptic still gives me the same prompt if I try to use it. So does dist-upgrade command when I tried it among other things. If I try sudo dpkg --configure -a now I still get a process that appears to freeze in terminal. I get this:    And then nothing more seems to happen. Task manager seems to indicate nothing is happening. I saw that this was  but those solutions did not seem to work for me in this case.

I ran into some problems installing a package with apt. The terminal hung up during an install and I saw no other choice but to close the terminal. The problem, however, is that I can't seem to solve the issues that this has caused.   As is typical, I get:  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   This gets me nowhere and I'm locked out until I run sudo dpkg --configure -a. Makes sense. However, this process spits the following out and then hangs on the last line:  Setting up virtualbox-dkms (5.2.10-dfsg-6) ... Removing old virtualbox-5.2.10 DKMS files...  -------- Uninstall Beginning -------- Module:  virtualbox Version: 5.2.10 Kernel:  4.15.0-23-generic (x86_64) -------------------------------------  Status: This module version was INACTIVE for this kernel. depmod...  DKMS: uninstall completed.  ------------------------------ Deleting module version: 5.2.10 completely from the DKMS tree. ------------------------------ Done. Loading new virtualbox-5.2.10 DKMS files... Building for 4.15.0-23-generic Building initial module for 4.15.0-23-generic   A typical solution I've read is that you need to fix the broken packages. When I try to fix the broken packages (sudo apt install -f), the system also hangs on the same line, although the output is different:  Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 3 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up virtualbox-dkms (5.2.10-dfsg-6) ... Removing old virtualbox-5.2.1  0 DKMS files...  ------------------------------ Deleting module version: 5.2.10 completely from the DKMS tree. ------------------------------ Done. Loading new virtualbox-5.2.10 DKMS files... Building for 4.15.0-23-generic Building initial module for 4.15.0-23-generic   I am unable to get out of it unless I kill the process. This I do by checking what is currently running related to apt (ps aux |grep apt), and then I kill the relevant processes with sudo kill -9 process_number_here.  If I try to run things after that, it tells me I still need to reconfigure dpkg.  I tried looking around for more solutions to dpkg and all I really see is the nuclear option:  sudo rm /var/lib/dpkg/lock sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/apt/lists/lock   I also delete the files in /var/lib/dpkg/updates because when I did some digging one of the files inside had the exact same text as the above long output... but I fully admit to being out of my league here and I don't know what to do.   Taking a look at the error messages, I recognize that it hangs on building something related to the kernel. But I have no idea where to even start solving that. Any help is appreciated. My system is ubuntu 18.04


In older versions of nautilus there were arrows to unfold a folder and see the contents without having to enter the folder (see image).  There was also a status bar, that showed the available free space of the device.  Where have all these things gone and how can I get them back?

In 12.04, Nautilus showed the amount of remaining space in the status bar , but as of 13.04 the status bar is gone.  gsettings set org.gnome.nautilus.window-state start-with-status-bar true   turned out "no such key".  Is there any way to bring back the status bar?


Inspired by this question:   That Q&A concludes that it is possible for two creatures to unwillingly share the same space; for example, one creature could be pulled by thorn whip into the space of another creature.  Once the thorn whip caster's turn is over, when it is one of the other two creature's turns (either the one who was pulled or the one's whose space was invaded), they will of course start their turn in another creature's space.   From the PHB, p. 191:     Whether a creature is a friend or an enemy, you can’t willingly end your move in its space.   Are they allowed to end their turn in the other creature's space if they don't use any movement, or must they move out of the space (if they can; i.e. they have movement)?    Related:     (accepted answer seems to imply that the other character would have to move, but this is not supported and comments dispute that unsupported point; also, that question is about the character moving on their turn, mine is not)  (not the same as my question as it talks about sharing space on the creature in question's turn, whereas mine is about not moving on your turn to avoid this)

Based on the answer in this question  if a creature is unwillingly pushed/pulled/dropped or otherwise forced to end its turn in your space, what happens?  I can't find anything saying what happens. All I find is that you can't willingly end your turn in another creatures space.  What happens if you start your turn in the same space as another creature? Does anything happen to the creature that is forced to be in your space?


I did a ImageMagick install on my CentOS webserver and afterwards my cronjobs do not work anymore. I have cronjobs that executes php files. For example one cronjob execute every 15 minutes a php file that reads a json file and insert variables in my mysql database. I did not change the php files and they still work from the command line with php -q /home/admin/domains/domain.nl/public_html/command/myfile.php The status of my cron is: [admin@server domains]$ service crond status Redirecting to /bin/systemctl status crond.service ● crond.service - Command Scheduler    Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)    Active: active (running) since Fri 2020-07-10 22:52:30 CEST; 10h ago  Main PID: 13519 (crond)    CGroup: /system.slice/crond.service            └─13519 /usr/sbin/crond -n  I have tried to restart my server, I have restart my cron service without result. My /var/log/cron looks like Jul 11 09:13:01 server CROND[11480]: (root) CMD (/usr/local/directadmin/dataskq) Jul 11 09:14:01 server CROND[11629]: (root) CMD (/usr/local/directadmin/dataskq) Jul 11 09:15:01 server CROND[11792]: (root) CMD (/usr/local/directadmin/dataskq) Jul 11 09:15:01 server CROND[11791]: (admin) CMD (php -q /home/admin/domains/domain.nl/public_html/command/myfile.php) Jul 11 09:16:01 server CROND[11931]: (root) CMD (/usr/local/directadmin/dataskq) Jul 11 09:17:01 server CROND[12075]: (root) CMD (/usr/local/directadmin/dataskq) Jul 11 09:18:01 server CROND[12244]: (root) CMD (/usr/local/directadmin/dataskq) Jul 11 09:19:01 server CROND[12375]: (root) CMD (/usr/local/directadmin/dataskq) Jul 11 09:19:43 server crontab[13932]: (root) LIST (admin) Jul 11 09:20:01 server CROND[13993]: (root) CMD (/usr/lib64/sa/sa1 1 1) Jul 11 09:20:01 server CROND[13994]: (root) CMD (/usr/local/directadmin/dataskq) Jul 11 09:21:01 server CROND[14168]: (root) CMD (/usr/local/directadmin/dataskq)  With  php -q /home/admin/domains/domain.nl/public_html/command/myfile.php 2>&1 >>php -q /home/admin/domains/domain.nl/public_html/command/errorlog.txt  I try to view an extra error log, but the output to errorlog.txt is empty (but the file is made!). So I do not understand why the php file is doing nothing? What steps can I do to find the problem with the cronjob? Installing imageMagick was not easy. I also used the command: mount -o remount,exec /tmp

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


An example of my question can be duplicated with the following three files...  index.htm:  <!DOCTYPE html> <html> <head> <script type="text/javascript" src="jquery-3.4.1.min.js"></script> <script type="text/javascript" src="script1.js"></script> <script type="text/javascript" src="script2.js"></script> </head> <body> Hello, world! </body> </html>   script1.js:  $(function() {     const THE_TEXT = 'This is THE_TEXT'; });   script2.js:  $(function() {     function log_THE_TEXT() {         console.log(THE_TEXT);     }      log_THE_TEXT(); });   I expect to see "This is THE_TEXT" in the console log after loading the page. Instead there's this error:    ReferenceError: THE_TEXT is not defined script2.js:6:3    and:  jQuery.Deferred exception: THE_TEXT is not defined log_THE_TEXT@    If I define the constant in script2.js, it works as expected. So why doesn't it work, and is there a way to make it?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


Show that a topological space $X$ is separated (Hausdorff) if and only if for all compact subspaces $K_1$ and $K_2$ of $X$, there are disjoint sets $U$ and $V$ of $X$ such that $K_1 \subseteq U$ and $K_2 \subseteq V$.  I have one way ($\Leftarrow$), but I'm having some problems finding a neat proof from left to right. I think I've found a solution, but it's quite tedious. Here it is:  We assume $X$ is separated and we take two disjoint compact subspaces $K_1$ and $K_2$ of $X$.  Let's fix $x \in K_1$. Then $\forall y \in K_2$, there are two disjoint open sets $V_{x,y}$ and $U_{x,y}$ including $x$ and $y$ respectively. All these $U_{x,y}$ cover $K_2$ and therefore we can extract a finite number of them that cover it too $\{U_{x,y_i} : i = 1,...,n\}$ ($n \in \mathbb{N}^{\ast}$), and we take the correspondent $\{V_{x,y_i} : i = 1,...,n\}$. Then the sets $V_x:= \bigcap_{i = 1}^n V_{x,y_i}$ and $U_x := \bigcup_{i = 1}^n U_{x,y_i}$ are open disjoint sets.  Now I do this for all $x \in K_1$ and get a set $\{V_x : x \in K_1\}$ of open sets covering $K_1$, and corresponding $\{U_x : x \in K_1\}$ such that $\forall x \in K_1, V_x \cap U_x = \emptyset$. Since $K_1$ is compact, I now extract a finite number of those open sets $\{V_{x_i}: i=1,...,m\}$ ($m \in \mathbb{N}$), which still cover $K_1$ and the corresponding $\{U_{x_i}: i=1,...,m\}$.  Now $V :=\bigcup_{i = 1}^m V_{x_i}$ is open and covers $K_1$. While $U :=\bigcap_{i = 1}^m U_{x_i}$ is open too and covers $K_2$. Moreover $U \cap V = \emptyset$. That finishes the proof.  Is this approach correct? But more importantly, isn't there a less tedious way?

I want to show that any two disjoint compact sets in a Hausdorff space $X$ can be separated by disjoint open sets. Can you please let me know if the following is correct? Not for homework, just studying for a midterm. I'm trying to improve my writing too.  My work:  Let $C$,$D$ be disjoint compact sets in a Hausdorff space $X$. Now fix $y \in D$ and for each $x \in C$ we can find (using Hausdorffness) disjoint open sets $U_{x}(y)$ and $V_{x}(y)$ such that $x \in U_{x}(y)$ and $y \in V_{x}(y)$. Now the collection $\{U_{x}: x \in C\}$ covers $C$ so by compactness we can find some natural k such that  $C \subseteq \bigcup_{i=1}^{k} U_{x_{i}}(y)$   Now for simplicity let $U = \bigcup_{i=1}^{k} U_{x_{i}}(y)$, then $C \subseteq U$ and let $W(y) = \bigcap_{i=1}^{k} V_{x_{i}}(y)$. Then $W(y)$ is a neighborhood of $y$ and disjoint from $U$.  Now consider the collection $\{W(y): y \in D\}$, this covers D so by compactness we can find some natural q such that $D \subseteq \bigcup_{j=1}^{q} W_{y_{j}}$.  Finally set $V = \bigcup_{j=1}^{q} W_{y_{j}}$, then $U$ and $V$ are disjoint open sets containing $C$ and $D$ respectively.   What do you think?


lblAppointmentDate.Text = dt.Rows[0]["AppDate"].ToString();   This is my code giving the output as:     AppointmentDate: 11/19/2014 12:00:00 AM.   I want only Date as 19/11/2014.

How can I format a date as dd/mm/yyyy or mm/dd/yy ?   Like in VB format("dd/mm/yy",now)  How can I do this in C#?


I declare the package mathptmx in the preamble, but I want to use \mathcal for the letter I without mathptm:  The symbol omega is prettier with mathptm but \mathcal{I} is not.   \documentclass[12pt]{article} \usepackage{amssymb,amsmath} \usepackage{mathptm} \begin{document} $$\mathcal{\omega}$$ $$\mathcal{I}$$ \end{document}

I am using the package mathptmx to change the text font to Times. However, the mathcal font is changed as well, which is think is a bit ugly.  How can I reset the mathcal font to its default?


This left panel narrows the width. I don't use it, and is a great waste of space:    How can I remove it, and left the same (and more practical) structure that StackExchange sites had a few moths ago?

Can I remove the navigation bar as this is distracting and clutters the site especially on Stack Overflow.


A notebook Sony Vaio with the following requirements   CPU Intel Core 2 Duo T5500 1.66GHz Memory 2GB DDR2 SDRAM (533MHz) HDD 320GB Screen 15.4" WXGA (1280x800) Graphics NVIDIA GeForce Go 7400 (suporting 256MB)   supports Ubuntu 14.04 LTS?

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


My files are as follows: main.cpp #include "mylib.hpp"  // template <typename T> // T add(T a, T b) // { //  return a + b; // }  int main(int argc, char const *argv[]) {     int result = add(90, 4);     cout << result << "\n";      return 0; }  mylib.hpp #ifndef MYLIB_HPP #define MYLIB_HPP  #include <iostream> #include <cstdlib> #include <fstream>  using std::cout; using std::cin;  template <class T> T add(T a, T b);  #endif  mylib.cpp #include "mylib.hpp"  template <class T> T add(T a, T b) {     return a + b; }  Makefile a.out: main.o mylib.o     clang++ -std=c++17 main.o mylib.o      main.o: main.cpp mylib.hpp     clang++ -c -std=c++17 main.cpp  mylib.o: mylib.cpp mylib.hpp     clang++ -c -std=c++17 mylib.cpp  Without template or when I using the function in main.cpp(no multi file program) everything is working fine but when I am breaking it into multiple files it gives me the following error. clang++ -c -std=c++17 mylib.cpp clang++ -std=c++17 main.o mylib.o Undefined symbols for architecture x86_64:   "int add<int>(int, int)", referenced from:       _main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [a.out] Error 1  How do I fix this error?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I decided to mix beer with vodka hoping it would make me more drunk due to the alcohol content but then remembered the rest ISNT alcoholic and i cant figure out if mixing beer with vodka or other spirits would increase the alcohol content or not i would really like an answer to this as well as any health risks if there are any, thanks.

There is plenty of anecdotal evidence ("beer after wine and you'll feel fine, wine after beer will make you feel queer") that mixing alcoholic drink types leads to a stronger effect, but I can't find any true studies.   In fact the only studies I found are looking at mixing energy drinks and alcohol (mixing with energy drinks increases motivation for more alcohol (in college students) []), and discussed mixing caffeinated beverages with alcoholic ones [].  Are there any studies specifically looking at mixing alcoholic drinks? They would have to compare people drinking the same amount of alcohol, but some people mixing, others drinking the same thing. Maybe even a cross-over study design? Same people do both, one after the other? The only way to get an unclouded answer!  I am also interested in the follow-up why question: Why does mixing some drinks make you more drunk? Presumably it is something in wine (for example) that interacts badly with something in beer at the chemical level (the metabolites maybe)?   Marczinski CA, et al, (2012). Mixing an Energy Drink with an Alcoholic Beverage Increases Motivation for More Alcohol in College Students. Alcohol Clin Exp Res, epub. doi:  Touyz LZ, (2011). Mixing drinks and concocting troubles. Curr Oncology, 18(6):262-3. ; .


Can you help me to understand why d1 has different value in each alert() ? Thanks.  <script> d1 = new Date("01/01/2015"); d2 = d1; alert(d1); d2.setDate(d2.getDate()+10); alert(d1); </script>

So I was playing around the other day just to see exactly how mass assignment works in JavaScript.  First I tried this example in the console:  a = b = {}; a.foo = 'bar'; console.log(b.foo);   The result was "bar" being displayed in an alert. That is fair enough, a and b are really just aliases to the same object. Then I thought, how could I make this example simpler.  a = b = 'foo'; a = 'bar'; console.log(b);   That is pretty much the same thing, isn't it? Well this time, it returns foo not bar as I would expect from the behaviour of the first example.  Why does this happen?  N.B. This example could be simplified even more with the following code:    a = {}; b = a; a.foo = 'bar'; console.log(b.foo);  a = 'foo'; b = a; a = 'bar'; console.log(b);     (I suspect that JavaScript treats primitives such as strings and integers differently to hashes. Hashes return a pointer while "core" primitives return a copy of themselves)


I heard that keeping macbook battery in 20% to 80% is good.  Is it true? or what is the best way to use macbook best way?

My friend told me that I need to disconnect the power cord when the battery is fully charged. Otherwise, I will shorten the life of the battery.  Other people say you should drain it once a month or point out that for long term storage, you should charge it to 50% and then periodically (3 to 6 months) bring it back to 50% and store it again.  I am going to use my laptop at home 90% of the time. So, I plan to have the power cord connected all the time.  I'd prefer to just plugging in my MacBook Pro and letting it be on charge long term and occasionally taking it away from the charger when I'm not at home or my desk.  Are these specific recommendations worth the inconvenience?


Let $A\in M_{n,n}(\mathbb{C})$ be a diagonalisable matrix.  Prove $\exists B \in M_{n,n}(\mathbb{C})$ such that $B^{2016} = A$  I can't see why this statement would be true. Perhaps I'm missing something.  Can you assist me please?

Is there a general method (which can be implemented by hand) to finding the $n$-th roots of $2 \times 2$ matrices? Is there a similar method for a general $m \times m$ matrix? (for $n > 1$ and $n\in\mathbb{Z}$)


I am creating threads inside foreach report list in the loop. Each thread created will invoke its DLL where the report data is inserted into the database. Problem is that each thread created is executing multiple times inserting duplicate data. How can I avoid these multiple executions of same threads in foreach loop? Below is my code : Each report is passed through the thread to call DLL method foreach (ReportGeneric.ExportReportSchedulerModel report in reportList) {     log.Debug(report.ReportName + " Export():");     var parametersArray = new object[1];     parametersArray[0] = report;      log.Debug("Thread started in ExportReport() for " + report.ReportName);      Thread exporttoexcel = new Thread(() =>     {         _isStarted = false;         //invoking DLL method         var ret = ReportInvokeFunction(moduleName: report.ReportName.Split('_')[0], className: report.ReportName, functionName: "SelectData", parameters: parametersArray);         if (ret > 0)         {             log.Debug("ExportReport() successfull " + report.ReportName);             _isStarted = true;         }         else         {             log.Error("ExportReport() failed " + report.ReportName);             _isStarted = false;          }     });      exporttoexcel.Start(); }  Below is the logs are written for one of the reports: As seen below same thread [45] is executed twice at same time 2018-07-27 13:35:05,781. This is creating duplicate data in the database.  2018-07-27 13:35:05,781 [45] DEBUG ReportGeneric.GenericReportBase - ---- Started reading :  IvrHostTransactionReport from 20180727 133005 to 20180727 133505: 2018-07-27 13:35:05,781 [45] DEBUG IvrHostTransactionReport.IvrHostTransactionReport - ---- Started fetching data from SP : IvrHostTransactionReport from 20180727 133005 to 20180727 133505: 2018-07-27 13:35:05,781 [42] DEBUG ReportGeneric.GenericReportBase - ---- Started reading :  ChatInteractionReport from 20180727 133005 to 20180727 133505: 2018-07-27 13:35:05,781 [42] DEBUG ChatInteractionReport.ChatInteractionReport - ---- Started fetching data from SP : ChatInteractionReport from 20180727 133005 to 20180727 133505:

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


Take a look at the attached picture. There is a semi transparent "Ghost" file path from Notepad++. Notepad++ is not reunning. It was restarted normally several times but it has no bearing on the Ghost picture. So it looks like it has gone "Zombie" and I wonder what's causing it. I disabled and enabled display - and pulled other ticks I could think of but its still there. Other that a reboot which'd make me LOOSE my work. Is there anything else out there that can get this out ( standby did not help ).

I often have trouble with menu options staying on-screen after I click them. How to solve?


My attempt was based on principles of exclusion-inclusion but I'm unsure how to exclude in this case as the arrangements in which 'EEE' occur together are a complete subset of the arrangements in which 'EE' occur together. Could someone recommend a better method/ Elaborate how inclusion-exclusion works in such cases? The answer is supposed to be 960.

I understand that there are $\frac{8!}{3!2!}$=3600 permutations possible without any restrictions in place. I follow this by attaching all like elements as such {1,2,{3,3,3},{4,4},5} where I can account for 5! permutations where I have three 3s and two 4s in consecutive positions. However, when it comes to accounting for the permutations that, for example, will have three consecutives 3s but not so for the 4s, I am at a loss. I wrote some simple code and came up with a set of 960 permutations as the acceptable answer. As the question implies, I am unsure of how to reach that through other means. My apologies if this is considered elementary and I appreciate any help whatsoever.


I started fresh and cleared my hard disk then:    Installed Windows 10 Pro 64-bit. After installing that I installed Ubuntu desktop.   and from that point I'm not able to logon to my Windows 10. When I press F9 for boot order, it shows two files, my hard disk and network drive. Both options lead me to the Ubuntu login.  How can I boot Windows 10 again?  Results of sudo lsblk:  NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT loop0    7:0    0 216.4M  1 loop /snap/wine-platform-runtime/6 loop1    7:1    0  14.8M  1 loop /snap/gnome-characters/280 loop2    7:2    0     4M  1 loop /snap/gnome-calculator/406 loop3    7:3    0  88.4M  1 loop /snap/core/6964 loop4    7:4    0    74M  1 loop /snap/wine-platform-3-stable/6 loop5    7:5    0   3.7M  1 loop /snap/gnome-system-monitor/57 loop6    7:6    0  14.5M  1 loop /snap/gnome-logs/45 loop7    7:7    0   2.3M  1 loop /snap/gnome-calculator/260 loop8    7:8    0  1008K  1 loop /snap/gnome-logs/61 loop9    7:9    0 140.7M  1 loop /snap/gnome-3-26-1604/74 loop10   7:10   0  34.6M  1 loop /snap/gtk-common-themes/818 loop11   7:11   0   3.7M  1 loop /snap/gnome-system-monitor/83 loop12   7:12   0   151M  1 loop /snap/gnome-3-28-1804/51 loop13   7:13   0    13M  1 loop /snap/gnome-characters/139 loop14   7:14   0  35.3M  1 loop /snap/gtk-common-themes/1198 loop15   7:15   0 140.7M  1 loop /snap/gnome-3-26-1604/86 loop16   7:16   0    91M  1 loop /snap/core/6350 loop17   7:17   0  53.7M  1 loop /snap/core18/970 sda      8:0    0 931.5G  0 disk  ├─sda1   8:1    0   529M  0 part  ├─sda2   8:2    0 127.8G  0 part / └─sda4   8:4    0 230.9G  0 part /media/j7/94067EBA067E9D44 sdc      8:32   1   7.4G  0 disk  └─sdc1   8:33   1   7.4G  0 part  sr0     11:0    1  1024M  0 rom   Results of sudo parted -l:  Model: ATA HGST HTS541010A9 (scsi) Disk /dev/sda: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags:   Number  Start   End    Size   File system  Name                  Flags  1      1049kB  556MB  555MB  ntfs         Basic data partition  diag  4      677MB   249GB  248GB  ntfs         Basic data partition  msftdata  2      249GB   386GB  137GB  ext4   Warning: Unable to open /dev/sdb read-write (Read-only file system).  /dev/sdb has been opened read-only. Model: Generic- SD/MMC/MS PRO (scsi)                                       Disk /dev/sdb: 7934MB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags:   Number  Start   End     Size    File system     Name  Flags  1      1049kB  7932MB  7931MB  linux-swap(v1)

I have a dual boot of Windows and Ubuntu. When I switch on the machine, the BIOS does POST and after that the bootloader starts.  I want to understand how the BIOS chooses which bootloader to run. I want to know the process going on between the BIOS and the bootloader in a dual boot computer.


and I've been wanting a way to enchant unenchantable items in Bedrock without some client. Using the accepted answer from the linked question, I went to try this command and modify it because they are different: /give @p stick 1 0 {ench:[{id:16,lvl:5},{id:33,lvl:1}]}  However, I want a Knockback V stick instead. After some failures, I have a special draft: /give @s stick 1 0 {}  I'm not sure what the keywords are in the components section, so I will need help in that one. How can I get a Knockback V stick using commands?

I'm used to creating Java Edition Minecraft maps, where NBT can be used to set many different block, item, and entity properties, like an item's CanPlaceOn/CanDestroy list, a chest's items, and more! To open my maps up to more players, I've started creating maps on Minecraft Bedrock Edition as well. But NBT is inaccessible from commands in BE, which I knew before, but didn't know how much of a problem I would have creating these complicated command chains. One of the things that I've always been doing is giving players items with custom item names, lores, enchantments, and other properties. But there is a problem. All this would have been done in NBT in Java Edition. In Bedrock, NBT is inaccessible from commands, meaning the commands I used in JE don't work. Are my dreams crushed?


It is well known that one can use $\chi^2$ distribution to estimate the variance of normal distribution (i.e., $N(0,\sigma^2$)).  Is there a particular reason of using $\chi^2$ distribution? Or can we say that it is the "most accurate" way to estimate the variance of a normal distribution? Or does this "most accurate" thing exist? If it exists and it is not $\chi^2$ distribution, then what it is?  Thanks!

This is a very basic question. Why do we use a chi square distribution? What is the meaning of this distribution? Why is this the distribution used for creating a confidence interval for the variance?   Every place I google for an explanation just presents this a fact, explaining when to use chi, but not explaining why to use chi, and why it look the way it does.  Many thanks to anyone that can point me towards the right direction and that is - really understanding why I am using chi when I am creating a confidence interval for the variance.


Eclipse gives the wrong result when trying to calculate the sum of two floats. In my code, there are 2 float variables: float from = 0.025 and float to = 1. Then result has double variable: double value = 7 * from / to. Eclipse compiler shows: value = 0.174999997019767760 In excel calculator, this result was value = 0.175  How can I solve this an issue?

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


I have two files: testing.html with a numeric input, that runs cdv(value) from script.js everytime its value changes. <!DOCTYPE html> <html lang="en">  <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>JS Testing HTML</title> </head>  <body>     <input type="number" onchange="cdv(value)">     <script src="script.js"></script> </body>  </html>  script.js with a function that receives a number and calculates a specific digit... let cdv = (T) => {     var M = 0, S = 1;     for (; T; T = Math.floor(T / 10))         S = (S + T % 10 * (9 - M++ % 6)) % 11;     //return S?S-1:'k';      alert(S ? S - 1 : 'k'); }  But when I run it, the console says that cdv() is not defined. But if I try: <body>     <input type="number" onchange="cdv(value)">     <script>         let cdv = (T) =>         {             var M = 0, S = 1;             for (; T; T = Math.floor(T / 10))                 S = (S + T % 10 * (9 - M++ % 6)) % 11;             //return S?S-1:'k';              alert(S ? S - 1 : 'k');         }     </script> </body>  It works. Why can't I run the function from sourcing the script?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


the shift key in my keyboard has stopped working.(mechanical problem) so, is there a way so that I can make windows think like (caps-button) is new shift button. I'll buy a new keyboard ASAP but I need to do some urgent work that's why.

One of my laptop's keys has fallen off. Is there any way I can remap another key to serve as that key?  I'll 'sacrifice' the other key because I never use it.


I am not able to update and install anything in virtual box. It shows error Err:1 https://download.sublimetext.com apt/stable/ InRelease   Could not resolve host: download.sublimetext.com  Err:2 http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu xenial InRelease   Temporary failure resolving 'ppa.launchpad.net'  Err:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease                   Temporary failure resolving 'us.archive.ubuntu.com'  Err:4 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease   Temporary failure resolving 'ppa.launchpad.net'  Reading package lists... Done  W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'  W: Failed to fetch http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'ppa.launchpad.net'  W: Failed to fetch https://download.sublimetext.com/apt/stable/InRelease  Could not resolve host: download.sublimetext.com  W: Failed to fetch   http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'ppa.launchpad.net'  W: Some index files failed to download. They have been ignored, or old ones used instead.

Err http://archive.canonical.com natty InRelease     Err http://security.ubuntu.com oneiric-security InRelease                Err http://extras.ubuntu.com natty InRelease                             Err http://security.ubuntu.com oneiric-security Release.gpg   Temporary failure resolving ‘security.ubuntu.com’ Err http://archive.canonical.com natty Release.gpg   Temporary failure resolving ‘archive.canonical.com’ Err http://extras.ubuntu.com natty Release.gpg   Temporary failure resolving ‘extras.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric InRelease Err http://gb.archive.ubuntu.com oneiric-updates InRelease Err http://gb.archive.ubuntu.com natty-backports InRelease Err http://gb.archive.ubuntu.com oneiric Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com natty-backports Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’  Reading package lists... Done W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease       W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease   W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease   W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘archive.canonical.com’ W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg  Temporary failure resolving ‘security.ubuntu.com’ W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘extras.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Some index files failed to download. They have been ignored, or old ones used instead.   This is what I'm seeing when I try to run sudo apt-get update. I did an update on my instance yesterday and am now experiencing this.


I have an AMD Radeon 8490 Graphics card running in an HP Prodesk desktop PC with an AMD A8-6410 CPU.  The system (and the garphics card) is 5 years old.  I am running Windows 7 professional (64-bit).  I will not upgrade to Windows 10.  There is a list from AMD of operating systems that my graphics card will run with. One is Ubuntu x86 64-Bit.  My questions is: does Ubuntu 18.04.4 LTS have the same foundation as Ubuntu x86 (to put another way) is 18.04.4 LTS the same basic operating system (ubuntu x86) that would be compatible with the AMD drivers for my graphics card that were released back in 2015?  Maybe I should also ask AMD the same question.  Thank you in advance for your help!

I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it?


I know "how" to use the : operator to extract data from a list in python. Eg: l = [1,2,3] print(l[0:1]) print(l[-1:])  Yields: [1] [3]  But, how does python literally interpret the :? Why can't I set a variable equal to : and then call it? Eg: x = : print(l[x])  Would yield: [1, 2, 3]  Hoping someone who can go deeper on how python works can offer some insight. Thanks!

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


How to solve $x^3=y^2-7$?   I can see that $x$ cannot be even. Since $x$ even, implies $y$ odd, hence LHS is congruent $0 \mod 8$ and RHS $2 \mod 8$. Contradiction.   So $x$ is odd and $y$ is even. Maybe helpful: $x^3+8 = (x+2)(x^2-2x+4)$ and the RHS is thus congruent $3 \mod 4$. But I don't know how to proceed. Can someone help me? Thanks in advance.

The equation $y^2 = x^3 + k$ for $k = (4n-1)^3 - 4m^2$, with $m, n \in \mathbb{N}$ and no prime number that p is congruent to 1 modulo 4 divids m, doesn't have any answer and its proof can be obtained by using quadratic reciprocity law.  Do you know answers of this equation for two or three different values of $k$? In addition, do you know any reference about that?


I have been using the Unity environment on Ubuntu, and although I enjoy the Unity Dash search feature, I want to move away from Unity to the XFCE environment.  Is it possible to have the same sort of indexed search/ launcher functionality in XFCE? And is it possible to bind it to the Super key, just like in Unity.  The default search bar in XFCE seems to only searched through installed programs, and I cannot seem to bind it to just the Super Key.  Thank You.

The only thing I will miss after moving to LXDE from Unity will be the Unity Dash. Its functionality, not the piss-poor performance that is. So here's my question. I know there is synapse but AFAIK it only returns text, without multiple large-sized thumbnails of files etc.  I'm looking for a tool:   that uses relatively large area to present results with thumbnailing capability  with immediate presentation of recently used files and apps, preferably   Hence I do not look for any launcher. Point's no. 1 and 2 make for sufficient replacement. Please don't be afraid to answer 'No, there are none' if there no alternatives similar to Unity Dash or Gnome Shell Activities exist.  Related question:


what would be my possibilities if I cant?

We often get questions on bicycles.stackexchange about fitting wider or narrower tires to bicycles. We have a large number of these with answers suiting the specific bike or style of bicycle in question, but I have been unable to find one that provides a generic answer covering off all things that need to be considered. For most bicycles, the answer is the same regardless of the specific style and sizes of tires in question.   This is intended as a canonical question that we can point closed questions to.


How does one show that: if $\gcd( x, y) = 1$, then $\gcd( x+y, x^2 - xy + y^2) = 1\,{\rm or }\,3$.

Hint:  $a^2 -ab +b^2 = (a+b)^2 -3ab.$  I know we can say that there exists an $x,y$ such that $ax + by = 1$.  So in this case, $(a+b)x + ((a+b)^2 -3ab)y =1.$  I thought setting $x = (a+b)$ and $y = -1$ would help but that gives me $3ab =1.$  Any suggestions?


I try to export  the manual page of grep to grep.txt      $ man grep > ~/desktop/grep.txt   It displayed in garbled code:              GREP(1)                   BSD General Commands Manual                  GREP(1)              NNAAMMEE                  ggrreepp, eeggrreepp, ffggrreepp, zzggrreepp, zzeeggrreepp, zzffggrreepp -- file pattern searcher              SSYYNNOOPPSSIISS                  ggrreepp [--aabbccddDDEEFFGGHHhhIIiiJJLLllmmnnOOooppqqRRSSssUUVVvvwwxxZZ] [--AA _n_u_m] [--BB _n_u_m] [--CC[_n_u_m]]   How to get a formatted manual page from command line?

When I execute man ls > temp.txt the output text file is corrupted. By corrupted I mean that first and last letters in some words are overly repeated.  Several first lines in temp.txt:  LS(1)                     BSD General Commands Manual                    LS(1)  NNAAMMEE      llss -- list directory contents  SSYYNNOOPPSSIISS      llss [--AABBCCFFGGHHLLOOPPRRSSTTUUWW@@aabbccddeeffgghhiikkllmmnnooppqqrrssttuuwwxx11] [_f_i_l_e _._._.]  DDEESSCCRRIIPPTTIIOONN   And so on. Without redirection man ls is perfectly normal. What's happening?


I am trying to print the given char array into the reversed char array  I tried but getting the given char array as a reversed string.  public class Test {  public static void main(String[] args) {                char[] letters = {'J','A','V','A'};     int i = letters.length - 1, j = 0;     char[] let = new char[letters.length];     while(i >= 0){          let[j] = letters[i];          i--;          j++;     }     for (char c : let){          System.out.print(c);     } }  }   expected result is if Input: {'J','A','V','A'} then output should be {'A','V','A','J'}  But actual output im getting is "AVAJ"

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


I had Windows 8 installed, and tried to install Xubuntu in another HDD on my desktop. After installation, I could only boot into Xubuntu, and never got into the OS selection menu in GRUB. So I ran  in order to fix the boot problems.   The boot process got fixed, now it does boot into GRUB, where I have two Windows entries, but none of them actually work, I get the error:  error: no such device: 1CA0-4000 error: file 'EFI/Microsoft/Boot/bkpbootmgfw.efi' not found   I've tried to run the Windows 8 installation again, and chose Automatic Repair, but it was not able to correct the problem. So I guess the EFI files in the windows EFI boot partition of the 1st disk got deleted/chaged. How do I get them back/fix the windows bootloader?  I'm doing all of this with UEFI boot, both in the OS installed on the disks, and the installation media (booting from a USB flash drive).

I installed Windows 7 and Windows 8 in EFI mode on a hard disk some days ago. Today, the bootloader got missing/corrupted.  I currently have the Windows 8 installer on a flash drive and tried using the Automatic Repair option to repair the bootloader but it didn't do anything. The Startup Repair option is also missing in the Windows 8 installer.  How I can repair/recreate the EFI bootloader from the Command Prompt?  BCDEDIT returns the following message:  The requested system device cannot be found.


After booting into Ubuntu this shows up     /dev/sda1 contains a file system with errors, check forced. Inodes that were part of a corrupted orphan linked list found.  /dev/sda1: UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY.          (i.e., without -a or -p options) fsck exited with status code 4 The root filesystem on /dev/sda1 requires a manual fsck  BusyBox v1.22.1 (Ubuntu 1:1.22.0-19ubuntuu2) built-in shell (ash) Enter 'help' for a list of built-in commands.  (initramfs)_   What should I do?

I dual boot Ubuntu and Windows 7. I was browsing on FireFox in Ubuntu and all of a sudden I get some error message, so I rebooted.  Now when I try to boot into Ubuntu I get this message:  fsck from util-linux 2.26.2 /dev/sda6 contains a file system with errors, check forced. /dev/sda6: Inodes that were part of a corrupted orphan linked list found.  /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.         (i.e., without -a or -p options) fsck exited with status code 4 The root filesystem on /dev/sda6 requires a manual fsck  Busybox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built in shell (ash) Enter 'help' for a list of built-in commands.  (initramfs) _   How can I fix this?


I can't seem to find any solid way to do this online.  I'm trying to have wrinkles on skin during animation.  Baking a static normal map on mesh will not do the job because I only want certain areas to have it and I only want it during animation.  Perfect example is:    Thanks for your help.

I made a high poly model and then baked its textures onto a low poly model. Now I want to give another normal map's details to the model. How can this be done?


I have installed Ubuntu 14.04 on 1TB HDD and have installed lots of packages and softwares. Now i've bought an 128GB SSD, I have few questions on how to partition SSD and HDD and how to move my current installation to SSD.  I'm thinking to have / and /home on SSD, and store other files on HDD, so how can i partition SSD+HDD to have:   / and /home on SSD have /home/music, /home/videos, /home/downloads, /home/pictures on HDD I have no idea about swap partition (should it be on SSD or HDD, actually its empty most of the time now), my laptop has 16 GBs of RAM   I'm planning to have fresh install of 14.04 on SSD (and i think i have to), so what is the best way to move currently installed packages to new installation ? i'm planning to use Aptik for that, is there a better solution ?  Is preload any good and gives performance boost when using SSD (i have 16 GBs of RAM)

I have purchased a new SSD (120GB) and I had a HDD (1TB) already installed. I will install both Ubuntu and Windows on these drives. As the file space on the SSD is limited and I've read that writing to an SSD drive is discouraged, I would like to store most of the data on the HDD drive. I am aiming at faster system but also keeping the valuable data safe on the more reliable HDD and expanding the life span of the SSD.  I have already set up Windows on these drives (system files and applications on SSD, Users folder and ProgramData on HDD) and now it's time to set up Ubuntu.  So my question is which partitions I should create, on which drive should they be placed and how large they should be.  Based on my experience and articles I've read, I will probably create /swap, /home and / partitions.   Does it seem reasonable to place /swap and /home partitions on the HDD and / on the SSD?  And how large should / partition be?  Also, will the applications be installed in / partition? If so, is it rational to store the applications on separate partitions on the HDD instead of / on the SSD, and what should the size of the / partition be in this case?


This is my understanding of what the Central Limit Theorem (CLT) is: if you take a number of samples, each containing a large number of observations, and calculate their respective sample means, then these sample means will have an approximately normal distribution, regardless of the parent population's distribution.   I was told that the CLT can be used to explain why a Binomial distribution is approximately normal for large values of n, but do not see why this is the case.

In several different contexts we invoke the  to justify whatever statistical method we want to adopt (e.g., approximate the binomial distribution by a normal distribution). I understand the technical details as to why the theorem is true but it just now occurred to me that I do not really understand the intuition behind the central limit theorem.  So, what is the intuition behind the central limit theorem?   Layman explanations would be ideal. If some technical detail is needed please assume that I understand the concepts of a pdf, cdf, random variable etc but have no knowledge of convergence concepts, characteristic functions or anything to do with measure theory.


Suppose I have the following:   template<typename T>     struct Foo     {     public:         class Bar         {                    };     };   If I then define the function   template <typename T> void func(Foo<T>::Bar g) { }   I get an error: syntax error: identifier 'Bar'  Why do I get the error and how can I solve it so that I can use the templated function.

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'm using Windows 8.1.  To open extensionless files, I have to double click/right click -> Open With on the file, then scroll down until I find whatever it is I think I need, usually notepad/notepad++, a hex editor, or an image editor/viewer. I tried to set a hex editor as the default program for extensionless programs, but I can't. I found an article from 1999 recommending the registry editor, and that would work, but this hex editor wasn't actually installed (it's just an .exe) and doesn't have anything in the registry. I don't have any reference for how to set it as a default program for the . extension in the registry.  After searching around a bit more, I found that, on win8, you can change file associations in Control Panel\Programs\Default Programs\Set Associations. And while I did see the . extension there, I can't seem to set a default program for it. The . extension is only there because I added in the registry, as ".".  Another method I tried is making an extensionless file, then going to its properties and setting the default program there. Unfortunately, the button to set the default program just isn't there.  Is there any way to accomplish this? And, for that matter, is there a reason I shouldn't be doing this? It seems awfully complicated, and I'm afraid it's for a good reason. The only article I can find that explains how to do this is from before Windows 2000 came out, which isn't a good sign.

How to set the default program for opening files without an extension in Windows?


Here the problem is from the book, Problems in real analysis.     Prove that for real number $p \geq 0$ we hanve   $$\lim_{n \rightarrow \infty} \frac{(1^{1^p}2^{2^p}\cdots n^{n^p})^{1/n^{p+1}}}{n^{1/(p+1)}} = e^{-1/(p+1)^2}$$   Hint. Use the mean value theorem. For instance, in the particular case $p=2$, apply the Lagrange mean value theorem to the function $f(x) = (x^3 \ln x)/3 - x^3/9$ on the interval $[k,k+1], 1 \leq k \leq n$ .   I tried to calculate it by the way the hint indicates, but I failed. There must be a number $c_k$ such that $k \leq c_k \leq k+1$ by the mean value theorem. I don't know how to calculate it by using this. Help me.

Prove that for real number $p\geq  0$ we have   $$\lim_{n\to\infty}\frac{(1^{1^p} \cdot2^{2^p}\cdots n^{n^p})^\frac{1}{n^{p+1}}}{n^\frac{1}{(p+1)}} = \exp\left(\dfrac{-1}{(p+1)^2}\right).$$


My Xbox 360 has been freezing regularly whether I'm playing GTA or FIFA. Today when I was playing it froze, so I tried to restart the console, and it gave me 3 red rings.   So, I unplugged everything because this has worked in the past.   When I restarted it, the light was green, but, the console wouldn't turn on.   So, next, I opened the disc tray, and it froze giving me 1 red ring.  Now it gives me no rings and it just doesn't start up.    I am going to leave it unplugged over night and see if it helps. But, does anyone have any other ideas?

I've heard of kits that can fix your Xbox 360 if you happen to get the . Do any of these work, and do they void your warranty? Are there any other noteworthy tips or tricks?


My book mentions this:     In a system of conductors of arbitrary size, shape and   charge configuration, each conductor is characterised by a constant   value of potential, but this constant may differ from one conductor to   the other.   Here is a screenshot to give better context to the above lines:

Since the electric field inside a conductor is zero that means the potential is constant inside a conductor, which means the "inside" of a conductor is an equal potential region.   Why do books also conclude, that the surface is at the same potential as well?


The spell  can ward a creature, with the following caveat:     If the warded creature makes an attack, casts a spell that affects an enemy, or deals damage to another creature, this spell ends.   Does casting Fog Cloud break a Sanctuary spell?  Arguably, it does not, as the spell affects the air around the enemies, not the enemies themselves.

Does casting  interrupt the spell  on the caster? If yes, in which moment? Let us consider the case in which there is an enemy creature in the area covered by the web.  Maybe it can be useful underline a couple of things:    When web is cast, no creatures are affected. A creature will be affected by the web if it is starting/going through its turn there and fails the saving throw. About sanctuary: if the warded creature makes an attack or casts a spell that affects an enemy creature, this spell ends.


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

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


# Makefile  test :     while true; do         echo test     done  test2 :     while true; do echo test; done   make test throws the error while true; do /bin/sh: -c: line 1: syntax error: unexpected end of file make: *** [Makefile:2: test] Error 1  whereas make test2 works just fine. I can not figure out why.

I am using the following conditional statement within a Makefile:  mytarget:     if [ -z "${TAG1}" | -z "${TAG2}" | -z "${TAG3}" ]         then         echo "Need to set all tag names images         exit 1     fi   but then ...  $ make mytarget TAG1=latest TAG2=latest TAG3=latest if [ -z "latest" | -z "latest" | -z "latest" ] /bin/bash: -c: line 1: syntax error: unexpected end of file Makefile:36: recipe for target 'env' failed make: *** [env] Error 1


I am new to MVC, my company wanted me to work on an already built MVC application. There are lot of Tables and Stored procedures used in that application. Is there any way i can collect all the table names and the Stored Procedures names. The server and DB are been used by several applications in the company . So it makes more complicated in SQL server side to list them.   Thanks

I'm looking at creating a basic ORM (purely for fun), and was wondering, is there a way to return the list of tables in a database and also the fields for every table?  Using this, I want to be able to loop through the result set (in C#) and then say for each table in the result set, do this (e.g. use reflection to make a class that will do or contain xyz).  Further to this, what are some good online blogs for SQL Server? I know this question is really about using system SPs and databases in Sql Server, and I am ok with general queries, so I'm interested in some blogs which cover this sort of functionality.  Thanks


At first sight, this exercise seems to be already seen many times in this website but I could not find a Analysis-1 level proof of the following : Let $f: \mathbb{R} \to \mathbb{R}$ be a differentiable function such that $f(0)=0$ and $\forall x \in \mathbb{R}$, we have $f'(x)=[f(x)]^2$. Show that $f(x)=0, \forall x \in \mathbb{R}$. My attempt is : Since $f'(x) \geq 0$ $\forall x$, we have that $\forall x \in \mathbb R^+ f(x) \ge 0$. By contradiction, suppose that $\exists a > 0$ such that $f(a)>0$. Since $f'=f^2\geq0$, we get that $f(x)>0$  for all $x \in (a, +\infty)$. Let $g: (a,+\infty) \to \mathbb{R}$ be given by  $g(x)=\frac{1}{f(x)}$. As $g'(x)=-1$ we have $g(x)=-x+c$, $c \in \mathbb{R}$. So, $f(x)=\frac1{-x+c}, \forall x \in (a,+\infty)$. From $f(a)>0$ we get that $c>a$. But then $f$ isn't continuous at $x=c$, a contradiction. I think I showed that the function is constantly equal to $0$ on $(0,+\infty)$, but how do I show it on $(-\infty,0)$ ? Should I just do the same proof with the g function on $(-\infty,a)$ with $a < 0$?

Let $f:\mathbb{R} \rightarrow \mathbb{R}$ be a differentiable function such that $f(0) = 0$ and $f'(x) = [f(x)]^{2}$, $\forall x \in \mathbb{R}$. Show that $f(x) = 0$,  $\forall x \in \mathbb{R} $.  I first (unsuccessfully) tried using the Mean Value Theorem, but this is in the Integrals chapter so the solution probably involves them. Can't really see where integrals come in here though.  What I've got so far:   (i) Since $f$ is differentiable, thus it is continuous and, hence,  integrable. Therefore $f^2$ is also integrable and as $f'=f^2$, $f'$ is too.   (ii) $f' \geq 0$, $\forall x \in \mathbb{R}$


There are many answers on the site discussing motion of electrons in an electric potential field,  See   but also mass tends to move toward a lower gravitational potential. I assume then that things in general tend to move toward a lower potential when the potential is defined so that it represents potential energy.  However sometimes "potential" is used for a field that another field can be derived from usually by taking a gradient.  See  for a discussion of the term "potential" in physics.  My question is:  Why physically do things in general tend to move toward a lower potential value in a potential field?  Do they in general? Is there a physical law? Is there a basic physical explanation? I know there are mathematical explanations. Does the potential have to be defined as potential energy for this to hold true? Also does this have to hold true if one field can be derived from another potential field. Etc. ..

In mechanics problems, especially one-dimensional ones, we talk about how a particle goes in a direction to minimize potential energy. This is easy to see when we use cartesian coordinates: For example, $-\frac{dU}{dx}=F$ (or in the multidimensional case, the gradient), so the force will go in the direction of minimizing the potential energy.   However, it becomes less clear in other cases. For example, I read a problem that involved a ball attached to a pivot, so it could only rotate. It was then claimed that the ball would rotate towards minimal potential energy, however $-\frac{dU}{d\theta} \neq F$! I think in this case it might be equal to torque, which would make their reasoning correct, but it seems like regardless of the degrees of freedom of the problem, it is always assumed that the forces act in a way such that the potential energy is minimized. Could someone give a good explanation for why this is?  Edit: I should note that I typed this in google and found this  where it states that minimizing potential energy and increasing heat increases entropy. For one, this isn't really an explanation because it doesn't state why it increases entropy. Also, if possible, I would like an explanation that doesn't involve entropy. But if it is impossible to make a rigorous argument that doesn't involve entropy then using entropy is fine.  As a side note, how does this relate to Hamilton's Principle?


When establishing community, the actions of visitors such as self registration is not captured by default  How to setup debug logs for guest user of communities is important to trouble shoot the issues

Normally, you can put debug monitoring on a user by name to see the details on the error they're getting (especially for the non-descript Error Loading a Visualforce Page).  But when you are trying to debug a site page, how do you get a debug log for the guest user?  Update  As of Spring '18 Salesforce has dropped the requirement to include the debug_logs cookie to get debug logs for the force.com site requests.     In Winter ’17, we introduced a change that required guest users to set   browser cookies to activate debug logging. We had the best of   intentions: All your public site visitors share one guest user   license. Thus, when you enable logging for the guest user, the   visitors’ collective activities can fill your debug logs quickly,   hitting the log-size limit and causing log truncation. Sadly, people   didn’t like the Winter ’17 change. Setting cookies is complicated, and   the change made collecting debug logs for public users’ asynchronous   activity impossible. We’ve seen the error of our ways. Your public   users no longer need a debug_logs browser cookie to trigger logging.   This change applies to both Lightning Experience and Salesforce   Classic.


The Ready action states:     Then, you choose the action you will take in response to that trigger...   I am unsure whether this means you can only ready an action such as Dodge, Hide, Attack, Cast A Spell, or if this also includes bonus actions and reactions as the PHB states (page 189):     Certain special abilities, spells, and situations allow you to take a special action called a reaction.    And then later states (page 190):     Various class features, spells, and other abilities let you take an additional action on your turn called a bonus action.   I am aware that the Ready action uses up your action just like Dodge, Hide, and others, but am wondering whether what you spend your reaction to do can be something that would normally require a bonus action.  I am also aware that you cannot take a bonus action when it is not your own turn. Given that, one reason you might want to do this is to effectively use two bonus actions on a single turn (one using your bonus action, and another using the Ready action where the trigger occurs on that same turn).    One example of when you may want to do this (however there could be others which are entirely different in structure or setup):    You have already cast a spell such as spiritual weapon which you can use your bonus action to do something with (in this case make the weapon move and attack).   You take the Ready action to Ready the following: "When I say 'Go!', I will use my reaction to make the spiritual weapon move and make an attack."   You say "Go!", providing the trigger which allows you to spend your reaction to make the spiritual weapon attack.   You now still have a bonus action you haven't spent and can use it on anything, such as casting the spell misty step   Another possible example scenario:  You are walking past a row of allies but one is secretly an enemy and will attack you with an opportunity attack as you walk past. You want to know who this enemy is but also do not want to get attacked. Disengaging will prevent you from learning who they are as no opportunity attack will be provoked. Instead you decide to Ready misty step so that "When a creature attacks me (but before they have hit me) I will cast misty step and get away" thus allowing you to learn who they are and prevent the attack.  Can you ready a bonus action?

The rules for Bonus Actions (PHB, pg.189) state;  You can take only one bonus action on your turn...  Which to me can be read in two ways.  You can only take a bonus action if it is your turn. You can take only one bonus action on your turn but can take one or more on someone else's turn.  As an example, if I were to ready an attack action could I also use a bonus action for Two-Weapon Fighting when the trigger is met?


I'm suspecting that one of my servers is attacked some time ago. My question is how can I identify a DOS or DDOS attack while under attack or after the attack has finished?

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


I'm not sure if it's relevant, but I'm talking about a situation where a particle is moving in an electro-magnetic field.  As I understand, if we see the term $\nabla \cdot \vec{v}$ or $\nabla \times \vec{v}$ we can say it is equal to 0, because the velocity vector is independent of the location vector.  My question is this: Is this always true, or only in specific settings (particle in an electro-magnetic field for example)?  If it is always true: What about a state where an electron's velocity changes with respect to x? Then they can't be independent, can they?  In other words, are the following always true:  $\partial v_{x}/\partial x = 0$  $\partial v_{y}/\partial x = 0$  $\partial v_{z}/\partial x = 0$  $\partial v_{x}/\partial y = 0$  $\partial v_{y}/\partial y = 0$  $\partial v_{z}/\partial y = 0$  $\partial v_{x}/\partial z = 0$  $\partial v_{y}/\partial z = 0$  $\partial v_{z}/\partial z = 0$

In the calculus of variations, particularly Lagrangian mechanics, people often say we vary the position and the velocity independently. But velocity is the derivative of position, so how can you treat them as independent variables?


I was wondering what the best to choose is. Let's say I want to use C++ functions from C#. In most of the cases Platform Invoke will do the job fairly simple. The problem is that I want to wrap functions that are critical (used many times a second) i.e. OpenGL draw calls. This implies that there would be latency and loss in performance due to the intermediate layer. Then I found about CLI which is basically managed C++. I thought it would be faster, but since PInvoke is a technology improved for years, it be better.  What is actually the best performance-wise solution to use C++ functionality in C#/.Net  Edit: What are the pros and cons of both?

Is there free OpenGL support libraries for C#? If so, which one do I use and where do I find sample projects?  Does C# provide classes for OpenGL?


I want to create models for website and interact with it. I chose Blender since it is open source. My intention is to create some model, say a table and export to webGL. How can I export the model using Blender in order to view it in a webpage? Thanks.

I would like to create WebGL applications and use Blender as a modelling tool. I don't necessarily need to translate game engine functionality to WebGL but I would like to retain as much of the UV mapping, vertex colors, materials, etc. info as possible.  I already know I should keep the polygon count low. What are the other things I should keep an eye on? (Such as don't use feature X because you won't be able to export it)  What tools do I need to learn? (WebGL framework specific plugins, generic tools like OBJ exporter)


Prove that $f(x) = \sqrt x$ is uniformly continuous on $[0,∞)$.   take any $x,y \in [0, \infty)$. If $|x-y| < \sigma$ then $|f(x)-f(y)|=|\sqrt x - \sqrt y|= |(x-y)(x+y)/(\sqrt x + \sqrt y)| < |\sigma (x+y)/(\sqrt x + \sqrt y)|$  Now, I suppose, here must be shown that $|(x+y)/(\sqrt x + \sqrt y)|$ is bounded to show the continuity. Is it right? How do I proceed?

Prove that the function $\sqrt x$ is uniformly continuous on $\{x\in \mathbb{R} | x \ge 0\}$.  To show uniformly continuity I must show for a given $\epsilon > 0$ there exists a $\delta>0$ such that for all $x_1, x_2 \in \mathbb{R}$ we have $|x_1 - x_2| < \delta$ implies that $|f(x_1) - f(x_2)|< \epsilon.$  What I did was $\left|\sqrt x - \sqrt x_0\right| = \left|\frac{(\sqrt x - \sqrt x_0)(\sqrt x + \sqrt x_0)}{(\sqrt x + \sqrt x_0)}\right| = \left|\frac{x - x_0}{\sqrt x + \sqrt x_0}\right| < \frac{\delta}{\sqrt x + \sqrt x_0}$   but I found some proof online that made $\delta = \epsilon^2$ where I don't understand how they got? So, in order for $\delta =\epsilon^2$ then $\sqrt x + \sqrt x_0$ must $\le$ $\epsilon$ then $\frac{\delta}{\sqrt x + \sqrt x_0} \le \frac{\delta}{\epsilon} = \epsilon$. But then why would $\epsilon \le \sqrt x + \sqrt x_0? $ Ah, I think I understand it now just by typing this out and from an earlier hint by Michael Hardy .


I would like to access and transfer text messages from an Xperia E to a new phone. I've found several applications that appear to let me do so, but all of them require USB Debugging to be on. Since the screen is broken (but I do still have touch functionality as far as I can tell) I have no idea how to turn this feature on.   All questions about the USB debugging issue get closed and redirected to an existing question that doesn't help me, so I'm hoping that there is some way to get the texts without the need for USB debugging.

I just broke the screen of my (unrooted) Galaxy S.  How do I get back my SMS and contacts?   PS: I tried Kies but it won't detect my phone for some reason. (Kies works fine with another Galaxy I possess but not this one)


Since I'm not a native speaker, I've encountered the two examples that makes me confused..  Here are the examples:   "I still dream of THEM wolves, THOSE endless prairies." "First of THEM true loves singing on the shoulders."   Please, could anyone explain me why THEM/THOSE were put at all, is it because of the emphasizing?  In the first sample the both nouns are in the plural form, then why in the first one is THEM and in the second THOSE? And in the second sample why is there THEM, if the sentence might have been worked without it?

What is the difference between them and these/those? What is the usage of them and these/those?   Example sentence -        Some of these are insured by govt...      But I think "Some of them" is more common. But again there is nothing wrong with the quoted sentence.


I want to evaluate the integral $\displaystyle \int_{0}^{\infty}\frac{\sqrt{x}}{1+x^2}\,dx$ using complex analysis methods. I know that I have to use a keyhole contour, but I don't know which function to integrate on the contour. For example if I had to integrate $\displaystyle \int_{0}^{\infty}\frac{\ln x}{1+x^2}\,dx$ then I would have chosen to integrate over a keyhole contour the function $\displaystyle f(z)=\frac{\ln^2 z}{1+z^2}\,dx$.  If i had known that function then the rest is routine, since if we declare the given integral as $I$ and the contour integral as $J$ , then there is a simple relationship of $I, \; J$. It holds that $J=2\pi i I $. Hence we have the result.  However, I did not understand  well the keyhole contour. If someone could show me how the other parts disappear I would be glad.

Could anyone help me decide what contour to use to evaluate this integral?  $$\int_0^\infty \frac{\sqrt{t}}{1+t^2} dt$$  So we have simple poles at $i$,$-i$. Why does using a quarter of a circle in the upper right quadrant not work -is it a problem having $i$ on the contour of integration?  My second idea was to let $$\sqrt{t}=e^{\frac{1}{2}\operatorname{log}t}$$  And defining the branch of the logarithm to be the negative imaginary axis. Then using an upper semi-circular contour. With a hole at 0, which will tend to the point 0 as the radius of the semi circle tends to infinity. Then we'll divide by two to get the integral from $0$ to $\infty$. Does this work, as this does not seem to be an even function we're integrating.  I apolygise for the poor explanation of my contours, it's quite difficult without pen and paper!  EDIT: Ok, so using an upper semi circle, with a semicircular hole about $0$. let us call the contour $\gamma$, we have:  $$\int_\gamma \frac{e^{\frac{1}{2}\operatorname{log}t}}{1+t^2}dt =2\pi i\Big(\frac{e^{\frac{1}{2}\operatorname{log}t}}{t+i}\Big)\Big|_{t=i}=\frac{e^{\pi/4}}{2i}$$  But by letting on the positive real axis $z=x+iy$ implies $log(z)=log(x)+0$ and on the negative axis $log(z)=log(x)+\pi$ Therefore if we tend the large arc's radius to infinity and the small arc about the origin's radius to zero we find the integral along the arc tends to zero. So  $$\int_\gamma \frac{e^{\frac{1}{2}\operatorname{log}t}}{1+t^2}dt=\int_0^\infty \frac{\sqrt{x}}{1+x^2} dx+\int_0^\infty \frac{\sqrt{x}e^{\pi/2}}{1+x^2} dx=(1+e^{\pi/2})\int_0^\infty \frac{\sqrt{x}}{1+x^2} dx$$  $$\Rightarrow \int_0^\infty \frac{\sqrt{x}}{1+x^2} =\frac{e^{\pi/4}}{2i(1+e^{\pi/2})}$$  This is wrong but can anyone point out what mistake I have made here?


Let $R$ be a Noetherian normal domain.  Let $X$ be the set of height one prime ideals of $R$, and let $\mathfrak p \in X$.  Can one have  $$ \mathfrak p \subseteq \bigcup_{\mathfrak q \in X \setminus \{\mathfrak p\}} \mathfrak q? $$ Moreover, if this is impossible in a Noetherian normal domain, can it happen in a Krull domain?

Suppose $R$ is a Dedekind domain with a infinite number of prime ideals.  Let $P$ be one of the nonzero prime ideals, and let $U$ be the union of all the other prime ideals except $P$.  Is it possible for $P\subset U$?  As a remark, if there were only finitely many prime ideals in $R$, the above situation would not be possible by the "", since $P$ would have to then be contained in one of the other prime ideals, leading to a contradiction.  The discussion at the top of pg. 70 in Neukirch's "Algebraic Number Theory" motivates this question.  Many thanks,  John


I think I saw this movie in the 90s on Hungarian TV. It started with a team of astronauts on Venus. There's this thick green liquid and they collect a sample in a thermos bottle. As they do this, a rope snaps and a member of the team falls into a hole. With no way to save them, they decide to return to Earth rather than risks more losses. They return to Earth and land in a desert. There is nobody to greet them. They walk and walk and walk. Everyone is delirious from thirst and tensions rise. They carry a flare gun and the bottle with the sample. They use a few flares but still nobody comes for them. They descend into madness and die one by one. The last astronaut shoots and kills the other one with the flare gun. He walks on alone. He finds a well but it's dry. He ends up dramatically drinking the sample from Venus! Then he arrives in a town? The movie ends.

Maybe related to   I saw a movie in the early 80's that could be from the late 70's and I remember that the crew had at least five or six members. So it's not Strange New World (just three members) as one answer suggested, nor any of the other like Planet Earth or Genesis II. They were all men, or maybe there was also a woman. I saw it on TV just one time and never saw it again. It was a simple plot, but really well done and with a very unexpected finale.    The crew return to earth and like the other question says, they don't receive any kind of signal. They don't know what happened and everything looks deserted and depopulated. In finding some ruins, they seem to understand that there's been a nuclear war. The movie is about their struggle to find out what happened and determine whether there's any civilization left. They have almost no food and water. They begin to lose hope, and even fight with each other. Some become ill and die. And maybe, in fighting, someone gets killed. It was all very dramatic.  I don't remember the dialogue, the characters, or the scenes, but I remember the end quite well. At the end, just one of them is walking in the desert and falls down exhausted and ready to die. After all that's happened, you think it's really the end, but then he kind of wakes up and seems to hear something and, after walking a few steps more, behind the next dune he starts seeing the blurry sketch of a city not so far away — blurry because of the heat of the desert. And the movie ends showing the man walking through a street of the city where people are walking and children are playing, not paying attention to him, and leaving you to wonder why they aren't helping him even while you are happy that he survived.


I have seen at least one other movie where the title of the film was not shown until the end of the film. Hunger Games: Mockingjay Pt. 2 is the inspiration for this question. Are films required to show title?

I'm not quite sure if "title sequence" is the phrase I'm looking for, so I'll explain what I mean.   Older movies would begin with a short credit sequence, which would also include the title of the movie. Recently, it is becoming more common to skip this in preference of showing the title at the end of the movie, perhaps as part of the credits.   What I'm wondering, is if there has been an instance of a movie being produced without any inclusion of its title in such a sequence. If there is some legal requirement to have the title listed somewhere (e.g. copyright notice) then those mentions can be ignored. If there has been a movie produced with no title at all then I suppose it would qualify by default.


I'm pretty new to web development (coming from an AV control system programming background) and am trying to do something that I'm convinced has to be super easy, but I'm coming up short. Basically I've created an array variable of buttons on a document, and need to determine which button was pressed. For example, let's say I have four buttons with ID's "id1" - "id4" Here's what I've got in JS:  $(document).ready(function(){     var sourceBtns = [];     var lastPressedIndex;     for(i=1;i<=4;i++){        sourceBtns.push(document.getElementById("id"+i));    }     for(i=1;i<=sourceBtns.length;i++){        sourceBtns[i-1].addEventListener("click",lastPressed);    }      function lastPressed(){              //need to assign lastPressedIndex here    } });

The situation is somewhat like-  var someVar = some_other_function(); someObj.addEventListener("click", function(){     some_function(someVar); }, false);   The problem is that the value of someVar is not visible inside the listener function of the addEventListener, where it is probably being treated as a new variable.


The following is a test of mba entrance    Why is there a 's after RNA in number 2 ?  PS: the number 2 should change to      RNA's direct   according to the answer sheet.

For example, if I wanted to write the equivalent of  There are many automated teller machines in this city.  Would it be  There are many ATMs in this city.  or  There are many ATM's in this city. (could get confused with possessive form or contraction).  or just  There are many ATM in this city. (assuming the final s is included in Machines represented by M).  Maybe something else?


Faced with a small unpleasant situation. The PREFETCH files give me the path to the source file as:  C:\USERS\MYUSER\APPDATA\LOCAL\MEDIAGET2\MEDIAGET.EXE  This greatly spoils the look of my software. Is there an option to return it to its normal form, as indicated in the source file?  C:\Users\Myuser\AppData\Local\MediaGet2\mediaget.exe  I tried to output via FileInfo, through Path.GetDirectoryName + Name. Did not work. Anyway, prefetch gives the path in UpperCase mode (despite the fact that it is not used anywhere in the code).  P.S. Do not advise please use ToLowerCase - it also does not look nice and is different from the paths from the other code.

Windows file system is case insensitive. How, given a file/folder name (e.g. "somefile"), I get the actual name of that file/folder (e.g. it should return "SomeFile" if Explorer displays it so)?  Some ways I know, all of which seem quite backwards:   Given the full path, search for each folder on the path (via FindFirstFile). This gives proper cased results of each folder. At the last step, search for the file itself. Get filename from handle (as in ). This requires opening a file, creating file mapping, getting it's name, parsing device names etc. Pretty convoluted. And it does not work for folders or zero-size files.   Am I missing some obvious WinAPI call? The simplest ones, like GetActualPathName() or GetFullPathName() return the name using casing that was passed in (e.g. returns "program files" if that was passed in, even if it should be "Program Files").  I'm looking for a native solution (not .NET one).


I made a function that was supposed to add one day to the date string parsed, it worked like a charm except it's decrementing the month by one value per function call. I don't know why it's decrementing that way, I just wanted to increment the day by one.   Here's the fx :  private void setTarikh() throws ParseException {     FragmentJadual parentFragment = (FragmentJadual) getParentFragment();     int lastTarikh = parentFragment.hariArray.size() - 1;     String tarikhNewData = parentFragment.hariArray.get(lastTarikh).getTarikhHari();     SimpleDateFormat dateFormat = new SimpleDateFormat("dd / MM / yyyy");     Date d = dateFormat.parse(tarikhNewData);     Calendar calender = Calendar.getInstance();     calender.setTime(d);     calender.add(Calendar.DATE, 1);     SimpleDateFormat sdf1 = new SimpleDateFormat("dd / MM / yyyy");     String output = sdf1.format(calender.getTime());     mNewDay = calender.get(Calendar.DAY_OF_MONTH);     mNewMonth = calender.get(Calendar.MONTH);     mNewYear = calender.get(Calendar.YEAR);     mTarikhTv.setText("" + mNewDay + " / " + mNewMonth + " / " + mNewYear); }   I really tried looking at other functions that had problems but I can't even find a hint. Please help, at least to confirm that this function itself is true. I hate bugs but love them at the same time..!

In java.util.Calendar, January is defined as month 0, not month 1. Is there any specific reason to that ?  I have seen many people getting confused about that...


Sometimes when visiting a Hot Network Question question, that very same question will sometimes appear in the HNQ sidebar. Example here:    Silly sidebar, I've already seen that question--I'm there right now!   Can we add a feature to remove the currently viewed question from the possible list of HNQ questions that populate the sidebar?  This is not a duplicate of , as that is a bug report that was marked as by design. On the other hand, this is a feature request asking that the design be changed.

The hot questions algorithm . I like the effects, since I see lots of new interesting stuff every day rather than waiting 6-8 weeks varying amounts of time for the list to update.  However, the new algorithm also has the interesting side effect of recursing the same question:    Of course, this is a world-shattering workflow-breaking unicorn-hating waffle-despising ERROR tremendously minor matter. But, if the SE devs have opportunity during their amazingly large amounts of free time, it might be nice to add a check for the current page before populating the hot questions list.


So i was trying to do this:        var obj1 = {test:0};     var obj2 = obj1;     obj2.test= 2;     console.log(obj1,obj2);     and I expected to return      {test:0} {test:2}   but returned this     {test:2} {test:2}   Is this a bug or this is how object behaves?

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


Looking for a way to group in sets of n elements with LINQ.  I.e:  {1,2,3,4,5,6,7,8,9}:   Grouped By 2: {{1,2},{3,4},{5,6},{7,8},{9}} Grouped By 3: {{1,2,3},{4,5,6},{7,8,9}} Grouped By 4: {{1,2,3,4},{5,6,7,8},{9}} Etc...   Only way I can think of doing something like this at the moment is by using an anonymous type to generate a group index, then grouping by that index. I'm looking for a cleaner solution if possible.  Example:  int groupSize = n; int groupCount = 0; int groupNum = 0;  IEnumerable<T> items; IEnumerable<IGrouping<int,T>> groups = items     .Select(i => new      {       Index = ((groupCount++) % groupSize == 0) ? groupNum++ : groupNum,       Item = i     })     .GroupBy(c => c.Index, d => d.Item);   I'd like to avoid something this nasty if possible.

Is there any way I can separate a List<SomeObject> into several separate lists of SomeObject, using the item index as the delimiter of each split?  Let me exemplify:  I have a List<SomeObject> and I need a List<List<SomeObject>> or List<SomeObject>[], so that each of these resulting lists will contain a group of 3 items of the original list (sequentially).  eg.:   Original List: [a, g, e, w, p, s, q, f, x, y, i, m, c] Resulting lists: [a, g, e], [w, p, s], [q, f, x], [y, i, m], [c]   I'd also need the resulting lists size to be a parameter of this function.


Can anyone tell me how to retrieve radiogroup data from database? Values are inserting through radiobutton but isn't retrieving from database. coding is as follows:  while(rs.next()) {     String db_name = rs.getString("name");     String db_add = rs.getString("address");     String db_gender = rs.getString("gender");      Text_name.setText(db_name);     Text_address.setText(db_add);     if(db_gender=="Male")     {         RadioMale.isSelected();     }     else if(db_gender=="Female")     {         RadioFemale.isSelected();         // GenderGroup.equals(RadioFemale);     } }   NOTE: RadioMale & RadioFemale are Variable names of RadioButton.. db_name & db_add are working perfectly just getting issue on gender.. Help me out please!!

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?


I was just thinking about how electric field and magnetic field vectors oscillate in a Photon. but then I remember that a photon doesn't experience any time so how can these vectors oscillate if the time experienced by the photon is zero. According to Lorentz transformation formula, particles which are moving at the speed of light (in our case Photon) will experience infinite time dilation which basically means that time experienced by them is zero so if that happens to be the case then why the electric and magnetic vectors oscillate. If time experienced by the photon is zero then they should be anything happen at all but still the oscillations are happening?

From what I've read, according to relativity, a photon does not "experience" the passage of time. (Can we say there is no past/present/future for a photon?)  Would it be better to say a photon is "fixed in spacetime"? If so, how do we explain the apparent movement of a photon? Is everything else moving relative to it in spacetime?


When try something like this in JavaScript ['10','10','10'].map(parseInt)   You will get this is as a result: [ 10, NaN, 2 ]  Why does this happen?

From the :  [1,4,9].map(Math.sqrt)   will yield:  [1,2,3]   Why then does this:  ['1','2','3'].map(parseInt)   yield this:  [1, NaN, NaN]   I have tested in Firefox 3.0.1 and Chrome 0.3 and just as a disclaimer, I know this is not cross-browser functionality (no IE).  I found out that the following will accomplish the desired effect. However, it still doesn’t explain the errant behavior of parseInt.  ['1','2','3'].map(function(i){return +i;}) // returns [1,2,3]


Let $M_n(\mathbb{R})$ denotes the space of all $n \times n$ matrices identified with the Euclidean space $\mathbb{R^{n^2}}$. Fix a column vector $x \neq 0$. Define $f:M_n(\mathbb{R}) \rightarrow\mathbb{R}$ by \begin{equation} f(A)= \langle A^2x,x\rangle \end{equation} I am trying to prove $f$ is differentiable.  It looks like you have to find the derivative w.r.t the matrix $A$. How do I do that? Any help is appreciated.

Let $M_n(\mathbb{R})$ denote the space  of  all  $n\times n $ real   matrices  identified  with  Euclidean space $\mathbb{R^{n^2}}$. Fixed   a column vector   $x \neq 0$ in $\mathbb{ R^n}$. Define  $f :  M_n(\mathbb{R})  \rightarrow \mathbb{R}$ by $f(A) = \langle A^2x,x  \rangle$. Check whether given function is differntiable or not?   When I took $    A=   \left[ {\begin{array}{cc}    x_1 & x_2 \\    x_3 & x_4\\   \end{array} } \right]  $ and $x=\left[ {\begin{array}{cc}    a \\    b\\   \end{array} } \right]$. I got $f(A)$ as a polynomial of four variables. I know that the polynomial function is always differentiable. How do I prove it for $n\times n$ matrix case?Without expanding the inner product How do I prove the given function is differentiable?


So I've created this program which manipulates a word that the user gives as input, by taking the moving the first character to the end of the word, spells the rest of the word backwards, then checks if the original word and the new word are the same. It's designed to run until the user enters the word "quit" as the chosen word. I've managed to get the majority of the code working, except, instead of looping back to ask the user for a new word after its checked the previous one, it just continues running forever. The code I've currently got is below:  package uploadTask9_wordPlay;  import java.util.Scanner;  public class wordPlay {      public static void main(String[] args) {         // creates scanner object to get a name from the user input         Scanner userInput = new Scanner(System.in);              System.out.println("Enter a name to be tested, or 'quit' to exit  program: ");             // stores the user input into string testedName             String testedName = userInput.nextLine();              // if the user input is "quit", program exits             if (testedName.equals("quit")) {                 System.out.println("Thanks for using the program");                 System.exit(0);             }              // else, do the rest of the code with the given word             else {                  while (testedName != "quit") {              // takes first character from userInput             char firstLetter = testedName.charAt(0);              // removes first character from testedName             StringBuilder removeChar = new StringBuilder(testedName);             removeChar.deleteCharAt(0);              // adds first character of testedName to the end of removeChar             String newString = removeChar.toString() + firstLetter;              // prints newString backwards             String reverseWord = new  StringBuffer(newString).reverse().toString();              // if statement - far simpler way to carry this task out than loops             // if statement to check if the words are the same             if (testedName.equals(reverseWord)) {                  System.out.println(testedName + " is the same as " + reverseWord); }              else {                   System.out.println(testedName + " is not the same as " + reverseWord); }          }        }        } }   Does anyone know why the program doesn't loop back to the start each time its checked a word?


Let $x_{0} = 2$ and $x_{n+1} = x_{n} + \ln(x_{n})$, how can I find an asymptotic equivalent of this sequence say, to the third term? (This is not homework, it was a problem in the Oral Examination 2010 of Ecole Centrale).

Let $f_0=2$ and $f_n=f_{n-1}+\ln(f_{n-1})$. What is a good asymptotic to the sequence $f_n$? With good I mean much better than $f_n \sim \dfrac{3n \ln(2)\ln(n)}{2}$.


I have recently received the Investor badge for offering a bounty on question , but i have not got any notifications about it and it is missing under Achievements.

Today I got awarded an Investor badge:    ... but the new notification system didn't show me no shiny grey (1) (or show me it at all...):    (it's not any further down, I promise)  Needless to say, I'm very angry:


I'm creating a scheduled method to create last month invoices (currently set to every 5 seconds for testing purposes). I'm getting a NullPointerException on the line where I'm trying to get shiftServices from my shiftServiceService.  @Scheduled(cron = "*/5 * * * * *")     public void createLastMonthInvoices() {         List<Client> clients = clientService.getClientList();         System.out.println("Clients size: " + clients.size());         for (Client client : clients) {             System.out.println("Client ID: " + client.getId());             List<ShiftService> shiftServices = shiftServiceService.getLastMonthShiftServicesByClient(client.getId());             if (!ObjectUtils.isEmpty(shiftServices)) {                 System.out.println("Services size: " + shiftServices.size());         }     } }   Here is the shiftServiceService method itself.  public List<ShiftService> getLastMonthShiftServicesByClient(Long clientId) {         Specification<ShiftService> spec = where(null);         spec = spec.and(client(clientId));         spec = spec.and(lastMonthServices());         spec = spec.and(scheduledServices());          return shiftServiceRepository.findAll(spec);     }   clientId is not null and outputs correctly, but the function itself is giving me an error like this:  java.lang.NullPointerException: null     at com.bitweb.syda.service.invoice.InvoiceService.createLastMonthInvoices(InvoiceService.java:40)     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.base/java.lang.reflect.Method.invoke(Method.java:566)     at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)     at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)     at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93)     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)     at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)     at java.base/java.lang.Thread.run(Thread.java:834)

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Suppose a farmer has a certain length of fence, $P$ and wished to enclose the largest possible area. What shape area should the farmer choose?  Answer is "circle".But, how is it derived?  MY TRY: My book says assume that farmer had to enclose rectangular area, and then proceed. So, I used Lagrangian and supposed that $x$ is length and $y$ is breadth and got that $x=y=\frac{P}{4}$, i.e. the area should be square. But, what if the constraint "rectangular area" is omitted? How to show that "a circular field encloses maximal area for minimal perimeter?"

In this wikipedia, article  its stated that the circle is the closed curve which has the maximum area for a given arc length. First, of all, I would like to see different proofs, for this result. (If there are any elementary ones!)  One, interesting observation, which one can think while seeing this problem, is: How does one propose such type of problem? Does, anyone take all closed curves, and calculate their area to come this conclusion? I don't think that's the right intuition.