I am new to PDO, really new, I'm trying to read documentation from several site (, for example) but I just don't fully understand it.  Still, I wish to update an internal website I'm using in my company because this project is becoming bigger and important and I want to rewrite it to shape it better.  I was able to "convert":  <?php $sql = "SELECT name FROM table order by name ASC"; $result1 = pg_query($conn, $sql); while ($row = pg_fetch_row($result1)) {   echo "<option value='$row[0]'>$row[0]</option>"; } ?>   to:  <?php $sql = "SELECT name FROM table order by name ASC"; $stmt_menu = $pdo->prepare($sql); $stmt_menu -> execute(); foreach ($stmt_menu as $row){   echo "<option value=".$row['name'].">".$row['name']."</option>"; } ?>   Even though I would have preferred to continue using the row[0] for simplicity, but Apache's logs complained about PHP Notice:  Undefined offset: 0 in /var/www/pdo-test-website/left-menu.php on line 20  Following other tutorials (like  one), I am trying to replace the current datalist SQLs into a PDO based statements.  Before I had:  <input type="text" list="test_list" class="form-control input-sm" name="test_name" id="test_name_id" />  <?php echo '<datalist id="test_list">'; $test_name = pg_query("SELECT DISTINCT ON (FOO) FOO FROM table;"); while ($row = pg_fetch_row($test_name)) {   echo "<option value='$row[0]'>$row[0]</option>"; } echo '</datalist>'; ?>   Now:  <?php $datalist_foo = "SELECT DISTINCT ON (:value) :value FROM table;"; $stmt_datalist = $pdo->prepare($datalist_foo);   echo '<datalist id="test_list">'; $stmt_datalist->execute(['value' => "FOO"]); foreach ( $stmt_datalist as $row ) {     echo "<option value=".$row['FOO'].">".$row['FOO']."</option>"; } echo '</datalist>'; ?>   I am trying my best to have it working but I keep reading errors in the Apache's error log file. I tried rewriting this statement in many different versions, it would be not so useful if I would paste the log file for your reviewing because I should also write, for each error row, its full php code.  The last error, the one that I get after trying the code I posted above, is:  PHP Notice:  Undefined index: FOO in /var/www/pdo-test-website/datalist.php   I just want to note, that the non-pdo version works, the (test) database have data inside and I am able to fetch them using the "old" pg_query method.  I hope you can give me some advice, I also tried the solution at this link:  but I can't get it working.

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


I update my mvc project nuget packages and some related files, unfortunately I had checked-in my solution to TFS source control. but I understand this update damaged my project functionality, Now I decide to rollback changes. How I can do it? It is possible to use get specific version by change set to undo nuget updated packages?

I'd like to rollback a change I made recently in TFS. In Subversion, this was pretty straightforward.  However, it seems to be an incredible headache in TFS: Option 1: Get Prior Version  Manually get prior version of each file Check out for edit Fail - the checkout (in VS2008) forces me to get the latest version  Option 2: Get TFS Power Tools  Download Team Foundation Power Tools Issue rollback command from cmd line Fail - it won't work if there are any other pending changes  Option 3: Manually Undo Changes  manually undo my changes, then commit a new changeset  Question How do I rollback to a previous changeset in TFS?


I have a list of 40 names, a list of 40 picture boxes, I want to show these names randomly and uniquely in picture boxes.  I tried but my effort is worthless. Any help would be appriciated.          Random r = new Random();          List<int> list = Enumerable.Range(1, box.Count).ToList();         List<int> rndList = new List<int>();         Random rnd = new Random();         int no = 0;         for (int i = 0; i < box.Count; i++)         {             no = rnd.Next(0, list.Count);             rndList.Insert(i, no);             list.Remove(no);         }          for (int i = 0; i < box.Count; i++)         {             System.Reflection.Assembly sysrefass = System.Reflection.Assembly.GetExecutingAssembly();             var rm = new System.Resources.ResourceManager(sysrefass.GetName().Name + ".Properties.Resources", ((System.Reflection.Assembly)sysrefass));             box[i].Image = (Image)rm.GetObject(rndList[i].ToString());          }

What is the best way to randomize the order of a generic list in C#? I've got a finite set of 75 numbers in a list I would like to assign a random order to, in order to draw them for a lottery type application.


I have to prove that  $$\lim_{n\to \infty} \frac {n^n} {n!}=\infty$$  I've tried to look for a lower bound that also converges to $\infty$ (I don't know if I'm explainig myself correctly), but I haven't found one yet. Applying L'Hôpital is way too complicated in $n!$, and the epsilon proof does not work as I have no way whatsoever of finding N.  Any ideas?

"Examine whether the given progressions converge (eventually improperly) and determine their limits where applicable.  (a) $$(a_n)_{n\in\mathbb{N}}:=\frac{n^n}{n!}$$  [...]"  I am having problems getting this homework done as I have no clue about convergency at all. Through Mathematica I know that $\lim\limits_{n\to\infty}a_n=+\infty$ however I don't know how to proove it! During my research I found out that for sufficient big $n$ the inequality $x^n\leq n!\leq n^n$ for $x\in\mathbb{R}$ and $n\in\mathbb{N}$ is true. However this doesn't help me at all. Having a look at our lecture notes I developed the following statement: every $x^n$ with $|x| \geq 1$ diverges as $x^n$ is unbounded and therefore has the improper limit $\lim\limits_{n\to\infty}x^n=+\infty$. Furthermore it seems obvious to me that I need to express the terms in a simpler way, like fractions converging to 0 etc, but I don't know how. Neither some work with the $\varepsilon$-definition of limits in combination with the triangle inequality helped me out. Any suggestions or hints?  Information: This is "Analysis for computer scientist" and therefore we haven't "officially" learned any fancy tricks like L'Hôpital's rule etc. just basic properties of $\mathbb{R}$ and some inequalities as this is an introductory lecture.


I've seen this hundreds if not thousands of times, but what does it actually mean?  Are there other strategies that I can use, perhaps variants on mine or their?    What is the syntax for using different strategies and in what situations should I choose one over an other?

From the man page on git-merge, there are a number of merge strategies you can use.     resolve -  This can only resolve two heads (i.e. the current branch and another branch you pulled from) using 3-way merge algorithm. It tries to carefully detect criss-cross merge ambiguities and is considered generally safe and fast. recursive -  This can only resolve two heads using 3-way merge algorithm. When there are more than one common ancestors that can be used for 3-way merge, it creates a merged tree of the common ancestors and uses that as the reference tree for the 3-way merge. This has been reported to result in fewer merge conflicts without causing mis-merges by tests done on actual merge commits taken from Linux 2.6 kernel development history. Additionally this can detect and handle merges involving renames. This is the default merge strategy when pulling or merging one branch. octopus -  This resolves more than two-head case, but refuses to do complex merge that needs manual resolution. It is primarily meant to be used for bundling topic branch heads together. This is the default merge strategy when pulling or merging more than one branches. ours -  This resolves any number of heads, but the result of the merge is always the current branch head. It is meant to be used to supersede old development history of side branches. subtree -  This is a modified recursive strategy. When merging trees A and B, if B corresponds to a subtree of A, B is first adjusted to match the tree structure of A, instead of reading the trees at the same level. This adjustment is also done to the common ancestor tree.   When should I specify something different than the default?  What scenarios are each best for?


I want to write my thesis in latex, with a font of size 14pt. I wrote   \documentclass[14pt,oneside,a4papper]{book}   but the font is not of 14pt. Can someone tell me how can I write with 14pt? Thank you!

Possible Duplicate:          Sometimes when I want to review a draft I need larger fonts. Is there a package or a command that I can use to increase the font of the entire document?


I want to save a message, When I run a curl request -   curl -H "Content-Type: application/json" -X POST -d "{\"time\": \"2019-12-27T09:50:02.000+0000\", \"unread\": true, \"message\": \"asd\", \"from\": \"John\"}" localhost:8080/api/save   I have error in cmd  {"timestamp":"2020-01-05T04:36:33.192+0000","status":500,"error":"Internal Server Error","message":"No message available","trace":"java.lang.NullPointerException\r\n\tat org.vaadin.marcus.spring.service.impl.MessageServiceImpl.add(MessageServiceImpl.java:45)\r\n\tat org.vaadin.marcus.spring.service.impl.MessageServiceImpl$$FastClassBySpringCGLIB$$2d73a7c.invoke()\r\n\tat  My code  @Service @Transactional public class MessageServiceImpl implements MessageService {     private final MessageRepository repository;     private final PageRequest lastRequest;      private List<Long> chekedMessages = new ArrayList<>();       @Autowired     public MessageServiceImpl(MessageRepository repository) {         this.repository = repository;         lastRequest = new PageRequest(0, 10, Sort.Direction.DESC, "id");     }      @Override     public MessageStatus add(@RequestBody  Message message) {         MessageStatus status = null;         try {             repository.save(message);             status.setMessage("Message Saved");         }         catch (Exception e) {             status.setMessage("Message not saved - " + e);         }         return status;     }      @Override     public List<Message> getAllMessages() {         return repository.findAll();     }      @Override     public List<Message> getLast() {         List<Message> result = repository.findAll(lastRequest).getContent();          return result.stream()                 .sorted(Comparator.comparingLong(Message::getId))                 .collect(Collectors.toList());     }      @Override     public List<Message> getUnreadById(long id) {         return repository.getUnreadById(id);     }        @Override     public String getUnreadMessages() {         List<Message> out = new ArrayList<>();         List<Message> unchekedMessages = repository.findAll();         for (Message message: unchekedMessages) {             if (!chekedMessages.contains(message.getId())) {                 chekedMessages.add(message.getId());                 out.add(message);             }         }         return new Gson().toJson(out);     }      @Override     public void updateMessage(long id, Message message) {         if (repository.findById(id).isPresent()) {             message.setId(id);             repository.save(message);         }     } }   Rest Controller  public class RestController {      @Autowired     TimerTask timerTask;      @Resource     private final MessageService messageService;      public RestController(MessageService messageService) {         this.messageService = messageService;     }      @PostMapping("/api/save")     public MessageStatus saveMessage(@RequestBody Message chatMessage) {         return messageService.add(chatMessage);     }      @GetMapping("/api/last")     public String getLasts() {         return new Gson().toJson(messageService.getLast());     }      @GetMapping("/api/unread")     public void getUnreadMessages() {          timerTask.run();     }      @GetMapping("/api/unread/{id}")     public List<Message> getUnreadById(@PathVariable ("id") long id) {         return messageService.getUnreadById(id);     }   Github -

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?


$$\lim_{x\to 0}\frac{\sin(6x)}{\sin(2x)}$$  I know I can use L'Hospital's but I want to understand this particular explanation.  They seem to skip something, and I'm not seeing the connection:  The limit is $\frac{6}{2}=3$ since $\lim_{x\to 0}\frac{\sin(x)}{x}=1$

I am trying to evaluate the following limit without L'Hopital's:   $$\lim_{x\rightarrow 0} \frac{\sin (6x)}{\sin(2x)}$$  I know I have to use the fact that $\frac{\sin x}{x} = 1$ but I don't know how to get the limit from the above to $\frac{\sin x}{x}$ or even a portion of it to that. I know how to evaluate limits like the following   $$\lim_{x \rightarrow 0}\frac{\sin 3x}{x} = 3$$  if that's any help.  Any hints would be appreciated  Thanks!


I want to paste the contents of my clipboard on machine A (client - Windows 7), to machine B (Ubuntu 16.04 Server). I followed the instructions , but I'm still having the same problem. Here is the error message:  Error: Clipboard on X11 requires that the DISPLAY envvar be configured.   I do have Xming installed on my windows machine!  xclip is already installed on the Ubuntu server. When I connect to the server via PuTTy, I use the following configuration at /etc/ssh/sshd_config:  X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes   And  in my PuTTy config.  What else do I need to be able to paste the clipboard of machine A to B?  The reason my Ubuntu server is a "Shiny" server, and in my "Shiny" app I want to paste data from the clipboard.

I'm going to accessing my ubuntu machine remotely from my windows machine through putty. Are there any suggestions for possible ways to get an X server running on my windows machine?  Thanks.


PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away   I have Last error, this error will be resolved when a user increase max allowad packet Im do it and set it 500MB, and Im clearing cach from DB, and Im restart a mysql server ..but not working  any way this error was trigger when Im try to save a block was creation in view, I think I know where is problem, its in filed in this block was add manually .. but now I need back to disable block to I can maintenance a problem, how I can do that ..   or there another way to resolve this problem ..  thanks alot

I created a block and put in some invalid PHP code resulted in entire site not accessible at all.   I'm fairly new to Drupal and I'm not a back-end programmer either. Much appreciated if you can provide a clear step-by-step guide on how to delete that particular block directly from the Database (PhpMyAdmin).


Last night our adventure league group ran into an issue. Our barbarian who wields I think great swords (the damage dice were 2d6, that I remember for sure).  He rolled a critical hit and I and we here all know that this adds one damage die, but another player mentioned that the RAW may conflict with the RAI for this case.  Compare, 1d12 critical hit makes 2d12, whereas 2d6 critical hit makes 3d6.  This reason I am contending this is because both basic hits have the potential of hitting for 12hp, whereas the criticals potential is 24hp for one, but only 18hp for the other. That just doesn't seem to jive. Mathematically speaking 2d6 is intended to more often do more damage that 1d12, but when a crit is rolled, that advantage isn't transferred which is not-intuitive. The normally heavier hitting weapon has less potential to do heavy damage when a crit is rolled.  What should this really be; Is it a balance oversight, completely overlooked or is it really intended to be this way?  My opinion and opinion only is that the intention would for this case to add 2d6 to the normal 2d6, but I really want to hear from the experts what should really happen from both RAW (which is clear) and RAI (which is less clear in this case) perspectives.

The Barbarian has the class feature Brutal Critical that reads:     Beginning at 9th level, you can roll one additional weapon damage die when determining the extra damage for a critical hit with a melee attack. (PHB 49)   The half orc has a similar racial trait as well (Savage Attacks).   This is a straight forward process if your weapon damage is a single die (great axe or smaller). However, with a greatsword, your weapon damage "die" is 2d6.  Does this feature mean you get to roll both d6s for the extra damage, or just one d6?


A number of years ago, I read a novel of a colony on a world that was covered by dense forest. The native people were human-like but had prehensile toes and lived in the forest canopy layer in villages that were a single tree that recognised them and would allow entry.  The natives bond with a semi-sentient "pet" that in a twist at the end turns out to actually be stage of a plant's lifecycle.  The humans are destroying forest for commercial gain and one of their ships crashs and is discovered by the natives who have a special bond with their "Home Tree" (no its not Avatar).    One other detail I remember is the fact that the planet's surface is extremely "hostile" and dangerous.   I am trying to find it again but can't remember the book or the author (I seem to recall he/she wrote some Star Trek stories as well)

I read part of the series in 2005, a young man was the protagonist, he was traveling to different worlds. I think he was telepathic and the most identifying thing I can remember was he had a flying snake or asp as a pet which possibly was his protector? He was in danger for some reason. Also there was a romantic interest female. The books were very distinct from one another. The second or third book he visited a planet that was extremely bio-diverse, where he was on top of all this vegetation and he realized how many layers of vegetation he would have to get to before he got to the ground and it was vast. I never finished it and it's been driving me nuts.


I am new to Ubuntu,i managed to install it on my PC (with windows 10). At the end of installation it asked me to restart but after that my computer directly booted in windows, even i am not able to see the DRIVE where ubuntu is installed in windows

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I need a little explanation on Opportunity object. I was wondering Account and opportunity objects are in Lookup Relation but acting as Master-Detail. Also in workflows, we can update Account Records from Opportunity even though workflows are not meant to update child records... Can someone please explain to me why the Opportunity object is special than others... Thanks in Advance...

On Opportunity there is a lookup relationship to Account.But why it behaves as Master-Detail as we can create Rollup Summary Fields on Account.  Similarly if we delete Account then Contact gets deleted but there is lookup relationship between Contact and Account  What is the relationship between Opportunity/Account and Contact/Account ? (Lookup or Master-Detail)


Friends,  Do you know of a neat proof of the linear independence (over $\mathbb{C}$) of the functions $f(t) = e^{at}$ and $g(t)=e^{bt}$ when $a$ and $b$ are linearly independent over $\mathbb{Q}$?

I have $n$ lambdas, which are all different real and positive numbers, where:  $\lambda_1 < \lambda_2 < \cdots < \lambda_n$.  I then have to show that these functions are linearly independent:   $$e^{\lambda_1 t}, e^{\lambda_2 t}, \ldots, e^{\lambda_n t}$$  So I guess what I want to show is that the only solution to this equations:   $$c_1 e^{\lambda_1 t} + c_2 e^{\lambda_2 t}+ \ldots +c_n e^{\lambda_n t}=0, \quad \text{for all } t$$  is that all constants are zero. I am not entirely sure how to do this when it is for $n$ lambdas - I did it earlier for just 3 lambdas, where I differentiated the function, so I have tried to use the same approach.  I wanted to get $n$ equations with $n$ unknown, so I differentiated the function $n-1$ times, and then I chose to look at the case where $t = 0$, so I have something looking like this:   $$c_1+c_2+ \ldots +c_n = 0$$  $$c_1 \lambda_1+c_2 \lambda_2+ \ldots +c_n \lambda_n = 0$$  $$ \cdots $$  $$c_1 \lambda_1^{n-1}+c_2 \lambda_2^{n-1}+ \ldots +\lambda_n^{n-1} = 0$$  Then I put this into a matrix $Ac = 0$, and now I want to show that the $\det(A)$ doesn't equal zero, so that the only solution is c = 0, but I'm not quite sure how to do this, or whether there is an easier way to do it ?


Convention? Any historical reasons? This seems to be a little odd for me. I'm not a native English user. I thought only the first letter should be the upper case. What's so special about this last name?

There is clearly a prefix in names like McDonald, McChrystal, O’Brian, O’Neal.  What does this Mc- and O- prefix signify? It looks like Donald, Chrystal, Brian, Neal are perfectly fine names on their own, so why is there a prefix before it?


Use comparison test to show that $\sum^{+\infty}_{k=1} \frac{1}{k(k+1)(k+2)}$ converges and find its limit  I tried expanding out the denominator, and then using the comparison test with $\frac{1}{k^3}$ but I think this is an incorrect use of the comparison test as I get divergence. I know that the limit is $\frac{1}{4}$ but I am not sure how to use the comparison test to then apply the limit.

I am trying to calculate the following series:  $$\sum_{n=1}^{\infty}\frac{1}{n(n+1)(n+2)}$$  and I managed to reduce it to this term  $$\sum_{n=1}^{\infty}(\frac{1}{2n}-\frac{1}{n+1}+\frac{1}{2n+4})$$  And here I am stuck. I tried writing down a few partial sums but I can't see the pattern, $\frac{1}{2}-\frac{1}{2}+\frac{1}{5}+\frac{1}{4}-\frac{1}{3}+\frac{1}{8}+...$ I cant seem to find a closed formula that we can calculate for $S_n$  How should I go about solving this question


Usin bibtex in the beamer, with the plain style, I have  In the first line there is the author, the second line the title and in the third other information as can be seen. In addition, there is a small spacing between each reference. But I am switching to using biblatex, as I need some resources from it. But I would like to stick with the bibtex style. I researched a lot, but I didn't find any solution for that, the closest was the trad-plain , that distances each quote, but it does not leave the information on different lines.The result is,  The code is \documentclass{beamer} \usepackage[style=trad-plain]{biblatex} \addbibresource{example.bib} \setbeamertemplate{frametitle continuation}{}  \begin{document} \nocite{*} \begin{frame}[noframenumbering,allowframebreaks]{Reference}     \printbibliography \end{frame} \end{document}  EDIT Solution: Using the suggestions given in  and  and the solution of problem  given in , it was possible to build code that solves the problem. \documentclass{beamer} \usepackage[style=trad-plain,block=par]{biblatex} \addbibresource{example.bib} \settowidth\labelnumberwidth{\usebeamertemplate*{bibliography item}}  \begin{document}          \nocite{*} \begin{frame}{Reference}     \printbibliography \end{frame}  \end{document}  The code style=trad-plain generates a space between each reference. The code block=par separate each reference information on a new line. The code \settowidth\labelnumberwidth{\usebeamertemplate*{bibliography item}} removes the small space that occurs in the first line when using the plain style with biblatex.

I pretty much like how the bibliography is rendered via BibTeX+Beamer as demonstrated by the Metropolis beamer theme:    Does there exist some BibLaTeX style with a similar look and feel? In particular I like the separation/newline between author, title, and remaining parts.


One of the selling points of Lollipop was that it will now support shooting in "Raw" mode, so that you can get the raw sensor data and then process it on the computer.  I just installed CM12.1 on my Samsung S3.   Will my phone support "Raw" shots in the future (My camera app doesn't support it yet) or does it require specialized hardware and I shouldn't even count on it being supported in an old phone?

I have a Samsung Galaxy S4. Is there a way in Android or an app that can take ? I.e. have the raw camera data to process in a program like Photoshop. I am using Android 4.2.2.


I accidentally removed some important files from Linux with rm *. How can I restore those files?  The distribution used is CentOS 6.4

Has anyone had success recovering deleted files from an ext4 partition? I've tried various utilities, but none have worked yet. I'd be grateful if someone can share a success story!


I have 2 modules (filters): html_pre_filter and syntaxhighlighter.  syntaxhighlighter_prepare_callback executes before html_pre_filter_prepare_callback.   How to reoder them?  I tried this  function html_pre_filter_module_implements_alter(&$implementations, $hook) {     if($hook == 'filter_prepare')     {     $group = $implementations ['syntaxhighlighter'];     unset($implementations ['syntaxhighlighter']);     $implementations ['syntaxhighlighter'] = $group;     } }   but it doesn't work

In D6, I use a contrib module, but I would like to override a small bit of its behavior. I have a custom module for that, but my implementation of the relevant hook is called before the implementation in the contrib module, and so the contrib module's version "wins".   Is there any way to change it, and force my own hook to be called last?   Here are the specific details:  I would like to remove the default "Anonymous" user name for unregistered users in the comment form.  I created a small custom module, tweak_comment_form, that implements form_alter hook and removes the default value from the name field ().  However I also use a contrib module called , which also implements form_alter. RealName does what I want for registered users (replaces user name with "real name"), but re-assigns default value to the name field.


This is a longstanding confusion of mine without a clear answer. Why do we complete measure spaces? Certainly, it is nice to have the property that if some set is of measure zero, then a smaller set also should be so. However, when I looked up the mathematical literature, I am unable to find a single theorem that works better for complete measures. So, the only reasons in support of completing the measure seem to be: 1)., it agrees with our intuition of what can be neglected, 2)., the Caratheodory extension process automatically gives a complete measure.  I was also surprised to realize that in probablity theory, very little use is made of the Lebesgue $\sigma$-algebra. Almost always the Borel $\sigma$-algebra is used. This prominence of Borel $\sigma$-algebras also seems to be the case in ergodic theory, where one considers for instance the space of all probability measures on a given measurable space(usually equipped with a Borel $\sigma$-algebra), and the null sets might differ from one measure to other(for example, consider Dirac measures concentrated at different points).  So, what are some better mathematical reasons to argue for complete measures? Are there some theorems that I do not know, which are true only for complete measures? There ought to be some, to give credence to all W. Rudin's going-on about the process of completing a measure being as significant in analysis, if not more than, the process of completing the rationals into the real numbers. One can readily find a number of theorems in analysis that would break without the least upper bound property of real numbers. Such does not seem to be the case with completing the measure space, with a superficial look.

While reading the motivation of complete measure space , what I concluded was,  completeness is not really necessary when we define on one measure space  and it is necessary when we want to measure on product of measure spaces (is it true ?).  If $\lambda$ is measure on $X$ and $Y$ then is it true that $\lambda^2$ is measure of $A$x$B$ and how ?  I am not able to understand that $\lambda^2(A\times B)=\lambda(A)\times\lambda(B)$ ?  Essentially what is the flaw in the measure without being complete ?  Waiting for response. Thanks!


I have a working batch file that I'm running through task scheduler to delete files with today's date in the file name.  For now I'm manually entering the date into the filename ahead of time but at least this part works.  I'm looking for the best way to have this automatically insert the variable.  I can change the naming scheme to default if it cannot be as specific as I have in this example.  For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b) echo %mydate%_%mytime% REM 2018-07-04_1040 PM PushD "\\DISKSTATION\backups\Google Drive" && (   "forfiles.exe" /s /m "*2018-07-04*" /C "cmd /c del @path" ) & PopD

Update: Now that it's 2016 I'd use PowerShell for this unless there's a really compelling backwards-compatible reason for it, particularly because of the regional settings issue with using date. See @npocmaka's     What's a Windows command line statement(s) I can use to get the current datetime in a format that I can put into a filename?  I want to have a .bat file that zips up a directory into an archive with the current date and time as part of the name, for example, Code_2008-10-14_2257.zip. Is there any easy way I can do this, independent of the regional settings of the machine?  I don't really mind about the date format, ideally it'd be yyyy-mm-dd, but anything simple is fine.  So far I've got this, which on my machine gives me Tue_10_14_2008_230050_91:  rem Get the datetime in a format that can go in a filename. set _my_datetime=%date%_%time% set _my_datetime=%_my_datetime: =_% set _my_datetime=%_my_datetime::=% set _my_datetime=%_my_datetime:/=_% set _my_datetime=%_my_datetime:.=_%  rem Now use the timestamp by in a new ZIP file name. "d:\Program Files\7-Zip\7z.exe" a -r Code_%_my_datetime%.zip Code   I can live with this, but it seems a bit clunky. Ideally it'd be briefer and have the format mentioned earlier.  I'm using Windows Server 2003 and Windows XP Professional. I don't want to install additional utilities to achieve this (although I realise there are some that will do nice date formatting).


i want to login via ssh without password using root account. I have problem with /etc/ssh/sshd_config file. I set: PermitRootLogin without-password and StrctMode no but it doesn't work (i have to enter passphrase to key)  I have Ubuntu 16.04.

I need to configure a machine so software installation can be automated remotely via SSH. Following , I was able to setup SSH keys so my user can access the machine without a password, but I still need to manually enter my password when I use sudo, which obviously an automated process shouldn't have to do.  Although my /etc/ssh/sshd_config has PermitRootLogin yes, I can't seem to be able to log in as root, presumably because it's not a "real" account with a separate password.  How do I configure SSH keys, so a process can remotely log in as root on Ubuntu?


This was a movie I saw a few times on British TV during the 80's, but I don't think it was much older than that. English language, almost certainly American-produced. I think it was an action movie, driven by a multiple murder plot.  The main scene I remember (I really want to say it was the opening scene, but I'm not 100% certain of that) had a couple running along the beach being filmed for a commercial, and the production crew were upset that when they jumped they weren't twisting as far as the computer said they should.  I think there was also an early scene where an actress fell from a hotel window, which was later discovered to be murder, though I might well be conflating another movie there.  I know this isn't a lot of detail, but it's been bugging me recently and I'd really like to know what it was. Thanks.

Plot Details/Summary  I saw this one on HBO as a kid in the 1980s.  As best as I can remember, the plot was along these lines: There's a series of murders occurring, and the protagonist, I believe, is a suspect at one point.  IIRC, he's at or near the scene of one of the murders.  The protagonist can't remember what happened during the time of the murder - what he was doing, etc.   As he investigates, the protagonist discovers an experimental weapon has been developed.  It's a handgun that fires pulses of light. The pattern of the light causes the victim to go in to a sort of blackout.  Not really unconscious, but sort of stunned in place. When it wears off, the victim is left with a memory gap, with no recollection of what happened or what took place while he was stunned.  I recall the protagonist is able to acquire the weapon, and turns the table on the man who's been killing people with it.  I don't recall how the weapon was developed, or why the man was killing people in the first place.  I do remember the protagonist beats the killer up by using the weapon to stun him and then punching him out between bursts.  Timeframe  I saw the film in the early 80s, so I'd say 70's or 80s.  It was a color film, and I remember it being fairly "modern"-looking - i.e. not an old 60's film or the like.  That's all I can recall.


I've cleared quite a bit of my user files off my Mac, and have restarted. The disk utility shows this:    but a df -h in the terminal as I clear never changes from 89 GB free, and when I try to restore some things from Time Machine, the 'not enough space' message reflects the df results, which should be wrong, instead of the disk utility display.  I only have the one volume on my hard drive.  This isn't the same question as the proposed duplicated, at all. I am not suggesting that anything is eating my disk space. I'm also not saying that restarting it changes anything. I'm stating that the disk util says I have 300 GB free, which is likely the case given what I deleted, and the OS says ~90 GB free, an amount that did not change as I was deleting things and did not change when restarting the system...so basically the freed space was not given back.

Every few days I get notices on my MacBook that it's running or run out of hard drive space. Curiously, restarting the computer will enable me to recover gigabytes of space (this past time, it was able to recover about 2.2GB). However, I can't identify anything in my personal activity that consumed that space.  It's possible that it's a rogue iTunes podcast or a huge software update that my Mac is automatically downloading - would either of these reclaim the space upon a restart?  One possibility that I can think of is that FileVault has some sort of disk leak, allocating but not freeing files. Does this make sense? Is there a tool that I can run to determine where this space is going? Assuming it is FileVault, should I try to disable it? What's the best way to turn of FileVault on a nearly full computer?


Since more than 6 characters need to change when editing an answer, I can't convert a textual link to a real link:  Original Text     More info: I've been looking at cocoahttpserver () > but it would be nice to have an embeddable server which supported output templates like rails, php, django, etc.   After the edit (changing less than 6 characters)     More info: I've been looking at  > but it would be nice to have an embeddable server which supported output templates like rails, php, django, etc.   I understand that very short edits might not generally have much value, but having links which aren't clickable are quite annoying, even if the edit only changes 4 characters.

The 'under 6 characters' limit on suggested edits should be waived for edits in URLs -- it should be possible to correct something like a trailing slash without messing with the prose.


I'm trying to fix the kerning around the quote with a feature file. I looked at several answer and tried this :  \documentclass[12pt]{article} \usepackage[french]{babel} \usepackage{filecontents,fontspec,microtype} \begin{filecontents*}{minion.fea}    languagesystem DFLT dflt;    languagesystem latn dflt;  feature kern {   pos  \quoteright \a 40;   pos \quoteright \eacute 10;   pos \quoteright \o 10;   pos \quoteright \e 8000;  } kern; \end{filecontents*} \setmainfont{MinionPro-Regular}[   FeatureFile={minion.fea},Path=fonts/] \frenchspacing \begin{document} l’étranger  d’accord  d’ores et déjà  L'e \end{document}   It doesn't change the kerning    it's particulary bad with a "L". Any tips ?  I'm using Miktex 2.9  Thank you   Edit: Using the suggestion in comment  \documentclass[12pt]{article} \usepackage[french]{babel} \usepackage{filecontents,fontspec,microtype} \directlua{ fonts.handlers.otf.addfeature { name = "ktest", { type = "kern", data = { ["quoteright"] = { ["e"] =  50,                    ["a"] =  50,                    ["eacute"] =  50,                    ["o"] =  50, }, } }, "extra kerns" } } \setmainfont{MinionPro-Regular}[   RawFeature=+ktest,   Path=fonts/] \frenchspacing \begin{document} l’étranger  d’accord  d’ores et déjà  L'e \end{document}

As of version 2.7 of luaotfload the support for font feature files (.fea) .  On the  Hans showed how to make font substitution work through Lua.  More examples are available in the latest ConTeXt distribution (, , , , , , )  In the past I have been using font feature files to adjust the kerning of fonts on-the-fly.  From Hans' example it is not clear to me how to adjust kerning in the new syntax.  The below example does not work as intended.  \documentclass{article} \usepackage{fontspec} \directlua{ fonts.handlers.otf.addfeature {     name = "kern",     {         type = "pair",         data = {             [0x0041] = { [0x0056] = { false, { -200, 0, 0, 0 } } },         }     } } } \setmainfont{Latin Modern Roman} \begin{document} AV \end{document}   Can we have a comprehensive guide on how to adjust font features with LuaTeX with the fonts.handlers technique?    Related questions:  (These involve hooking into the luaotfload.patch_font callback)


I've been gathering information about how addresses in different countries are written. While doing that I've also been working on a database design to hold this world wide information most probably used for making deliveries.  I started off with  data and came up with a first design (the higher table has the lower table as a child) :  Continent   Country     City       Address   With Currency (as a FK) and Language (with a many-to-many table) linked to the Country table. Also a many-to-many Capital table linking a Country and a City.  Soon I realized the US for example uses the state's code in their address. So an extra Province table was inserted between Country and City:  Continent   Country     Province       City         Address   Now I stumbled upon . This organization provides a list with all the cities in each country with some detailed information. This data fits pretty good with my 2nd design. I only renamed the Province table to SubDivision which is in the US the state, in Belgium the province and in France the department. This is very similar to the ISO 3166-2 codes.  Continent   Country     SubDevision       City         Address   To me, this looks like a good detailed database structure that won't need to be altered in the future. Like I said in the beginning, Currency is a FK in the Country table easy editable or removable. Language has a many-to-many relationship with Country and is also easy editable or removable. My biggest concern is that ISO also has more than 1 subdivision level fear certain countries. For Belgium for example there they have the provinces (provided in the UNLOCODE code list), but ISO () also has 3 regions that are higher than the provinces in Belgium and are pretty much in-between the Country and the Province.   Should additional (optional) tables be added? How this would be implemented is a question to me though. Another database design I can think off is all loose tables, no FK's, and 1 table linking all required tables together with following columns: AddressID, CityID, SubDiv1ID, SubDiv2ID, ... , CountryID, ContinentID. Not sure if this is a good approach. Add a different table per Country based on their amount of SubDivisions. This means Continent and Country and Address stay unchanged. City will be Country specific with the US for example having a USState (SubDiv 1) -> City and Belgium BERegion (SubDiv 1) -> BEProvince (SubDiv 2) -> City. I did a little more searching and found  answer.       Consider creating lookup tables for city, state and country entities. The city/state/country columns of the address table then consist of FKs pointing to these lookup tables. This allows you to guarantee consistent spellings across all addresses and gives you a place to store additional metadata (e.g., city population) if needed in the future.

Take the representation of an Address, here below is a complete and very detailed implementation:    here instead is a quick implementation (which more or less contains the same fields, imagine all fields in the former are contained also in the second)    If I were to decide which is the closer to a normalized and academically correct one I'd say the first one, however if I were to start a project I would go with the second.  Do you agree with this consideration? And if yes, how does one deal with this fact?   start with an easy database and as soon as it is time improve it into a more normalized/academical database. start with something as close as possible to the academical database stick with the quick and dirty solution


I heard that using a resistor for each LED in parallel is good, and I also watched a video on youtube.  The guy said if your LEDs are the same type and color you can use just 1 resistor. Is there a simple explanation?

Why can't you use a single resistor for a number of LEDs in parallel instead of one each?


I re-installed Minecraft after deleting it and now I can't find my minecraft folder to install mods on. I'm on a Mac.

I have a friend who is playing with me on a server we've created. Unfortunately, he is on a  Mac whereas I am on a Windows machine. I told him that I should be able to compile and send a .minecraft folder to him so that we can both play. Unfortunately, he can't find his .minecraft folder where it is supposed to be. Is it hidden and how can I unhide it?


I have a MWE as given below: /*Packages that are being used ... ... */  \chapter{...} \section{...} \paragraph{...} \section{...} ... \section{...} \paragraph{...} (some text) \begin{figure} \includegraphics[scale=0.675,angle=90]{filename}     \caption[reference]{caption} \end{figure}  \section{...} \paragraph{...}  Instead of appearing in the place I expected in the middle of the text, my figure ends up at the end of the chapter after the last paragraph. How could I solve this? Following suggestions I tried \begin{figure}[h], \begin{figure}[ht] and \begin{figure}[htbp] but figure still goes to the end of chapter.  Solved using \usepackage{float} and \begin{figure}[H], as suggested in

I have a problem when a lot of figures are in question. Some figures tend to "fly around", that is, be a paragraph below, although I placed them before that paragraph. I use code:  \begin{figure}[ht] \begin{center} \advance\leftskip-3cm \advance\rightskip-3cm \includegraphics[keepaspectratio=true,scale=0.6]{slike/visina8} \caption{} \label{visina8} \end{center}\end{figure}   to place my figures. How can I tell latex I REALLY want the figure in that specific place, no matter how much whitespace will be left?


I need a word that you would use that encompasses all tree of literature, movies, and books. I'm doing an art project and the theme is “words I like”, and I want a word that you can say and it includes all three. I've already thought of Fine Arts or the Arts, but I don't think that works.

I need to know this for an essay I'm doing. I thinks media might work but I'm not really sure. Do you have any suggestions?


I'm a Senior and not very computer literate and need detailed help in installing Ubuntu. I do have the download in my Firefox/download file as an ISO image file. What to do, not wanting to crash the XP? T.I.A.  WOW, can't even respond to this onslaught. Seems to me that installing Ubuntu, which BTW failed, regardless NEEDS to still enable XP,,,, which I want to get away from = MS, that is. Still need help in doing so.

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


I want to automate some testing that uses captouch as the interface for the human user. I would love to use an Arduino or similar's GPIO to create the equivalent press and release events from a finger. Is there some material that can be used here such that it would cause a press event when I set the GPIO to high? I would like to avoid any mechanical solutions that involve moving things. Ideally, I would tape the material onto the place where the button is and run my fake human code on the Arduino.  Had a hard time wording that, hope it makes sense. Also, I'm pretty ignorant with the electronics for a captouch system given that I'm a software guy...be gentle :pray:

Basically I am trying to stimulate a touch screen with an arduino board. I know this has been asked several times and Ive spent a long time looking at solutions, namely some kind of foil stuck to a touch screen being pulled to phones ground, or USB shield, or arduino earth, or a fruit or your body etc. I have tried all of this and more, using a transistor, MOSFET, optocoupler, and even a relay. All while holding the phone, or on the table or on top of a foil sheet or a grounded foil sheet etc... I have had varying success with all of them but nothing reliable and repeatable long term.   The relay has been the most successful, connecting foil via the armeture switch to the phones ground. If I set the arduino to pulse the relay closed for 100ms every 2000ms in this case, Interestingly I find a consistent result: when I place the foil a touch occurs and isn't released, the foil and wire are enough to do it. After between 30 seconds to a minute, the touch is released and touch events start pulsing with the arduinos input via the relay, and after 30 seconds to a minute or so longer, the screen stops responding all together, even to finger touches on the back of the foil - where this produced a touch event beforehand.  So I figure the screen is adapting to the environment. Just as it would need to if you were using your phone standing on a flag pole vs leaning against the steel wall of a truck. For some reason it decides the foil is environmental noise and 'numbs' that area of the screen to it.  So my question is, is there a way to reset the capacitive field image between each touch, or is there a different method to achieve touch events using the arduino?  EDIT Attached is a basic schematic of the circuit. Pin 2 is switching from LOW to HIGH for 100ms, then to LOW, for 2 seconds, and the relay clicks closed accordingly. The wire labeled 'Wire A' has been tried a variety of ways. To iPhone Gnd like it is, to Arduino Gnd, to my fingers, to a piece of foil laid under the iPhone. Additionally I have tried all these combinations with a 1000k resistor in series, and capacitors varying from 100pf to 100nf, separately and together with the resistor.  The underlying problem is the piece of foil stuck to the screen. The iPhone sensor seems to be able to determine its proximity is not changing, even if its electrical characteristics are.


I'm fairly new to QGIS. I have a world map, standard WGS84 with 10 degree graticules (see map).   How do I "shift" the whole map over just 10 degrees to give me a complete world map with a solid (unbroken area) Russia?   See red line on map.     I don't need the size or anything else to change, I just want it to be centered 10 degrees over.  [World][1\

I wish to display a map in QGIS (world country shapefiles) showing all countries but centered on the Pacific area.   I am not familiar with Proj4, so is there any way this can be done in QGIS?


I have been trying to delete my account for a few days but nothing is happening. I went to  and clicked the button where it said it would take 24 hours.   However 7248 hours have passed at least and still nothing.  There was a notice saying that it was due to be deleted in 60 minutes which counted down but at the end nothing happened.  Is there anything else I need to do?

How can I delete my Stack Exchange account(s)? Also,  What happens to my content? Can I request it be deleted as well? What if I'm suspended, rate-limited, or banned from posting questions or answers? What will happen to my votes? Will other users be impacted? Why wasn't my account deleted immediately after the timer expiring? What will happen to my pending bounties and close, reopen, delete, or undelete votes? I want my account deleted on all Stack Exchange sites. How do I do this? Will my profile on chat be removed once I delete my site account?   For more information, see "" in the .


Due to a , I can't use Gnome Flashback for a while. I am forced to use the new Gnome 3 layout.  There are a few apps (Slack, Skype, Steam, KTorrent, Krusader, ...) that used to be minimized to a "tray icon" in the "task bar" or "notification area" or "indicator applet" or whatever, I am not quite sure about what the names are. It's the little icon somewhere in some bar which you can click to restore the app or show a menu.  In Gnome 3.26 (and later versions), there is no such area by default, and the apps, once minimized, disappear from GUI entirely. I can't see them anywhere, yet their process is running.  I am not going to criticize that decision (it's obviously a bad one :) ) and will skip to the questions:   How am I supposed to open such app? How can I configure Gnome 3 to have that running apps icons area? I have seen these  and . Are these official? Or will it stop working in the next release as these workarounds tend to?

I have recently installed Ubuntu Gnome with Gnome 3 running on it. I have installed various programs on it which in Unity would have a little icon which would go on the right on the Unity panel, such as Skype, Steam, and Shutter. However in Gnome when launching these applications I see no such icons appearing anywhere.    So do they appear somewhere? Can I make them appear somewhere (such as where they would appear in Unity) if not?


I'd like to use this connector in my design but couldn't find what it's called. Anyone know?

I just want ask how the socket in the image is called?   I couldn't really find and the closer I could get is only Raspberry's module.


I am new to regular expression and want to create two regexes for my .net application.  I have an input variable which stores an xml. Below is the xml  <Row> ...... </Row> <Row {optional}> ....  </Row> <Row {optional} header="true" {optional}> </Row>   I want 2 regexes:  1. Regex which selects Rows with header="true" 2. Regex which selects Rows which do not have header="true"  Regex only have to consider opening tag. eg:

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I am going to apply to few PhD programs in Microbiology (I'm particularly very interested in Microbial ecology) but I'm afraid my undergrad gpa (8.5/10 for the first 6 semester as I'm currently in my 7th semester) might hold me back (however I have scored 9/10 in all core biology subjects). But I have a lot of other aspects to my application. For e.g. :  I have co-authored 3 research papers which are published in peer reviewed journal. I have co authored 6 book chapters (4 in peer reviewed journals like springer, Elsevier etc) I have presented 4 of my papers in 3 different international conferences (2 of them I was the first author) I received funding from ISRO-ASI scholarship (Indian Space Research Organisation- Astronautical Society of India)  to attend one of the aforementioned conferences. One of my team projects received a funding of 38,000 USD from our college trust. I have conducted 3 months full time research internship in a research laboratory Tsinghua University. I have also done 2 company trainings of 10 day each. Plus few extra curricular activities like I was in tedx team, entrepreneurship cell etc. And as part time job I also taught few high school kids. By the way I should mention my college is well reputed  (best in the state) in my country (India) but is tier-2  I need your help! I have no idea as to which colleges I should target ( my dream College would be University of Illinois (Urbana-Champaign) because of this particular professor Bruce W Fouke. He's amazing!) But I don't know if I would be accepted. I'm also not very rich so I can only afford the application fee for 10 colleges. I need your advice! Do you guys think I should apply to M.S. first get good grades and then try out for PhD. What kind of colleges I should target? (I actually concentrate more on the laboratory and not on the affiliated University but the University would be the one screening my application).

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


I have a huge text document lets say of 1000's of words and with way too many lines in the text.  I want to grab specific value of a particular word. In my example word is Teetotlar and value is Yes or No  Sample text:      I am going to a party with my friends. I have lot of friends. they are   all coming to party. I will be happy to see each of them.      Many of my friends drink but if you ask them r you teetotlar, they   would probably reply yes.       But it is all good.   I have working code for:   Read all lines one by one Check for teetotlar word Again check if that have "Yes" or "No" and then save that value in one variable   What I want:  Is to have a regex which just checks for the word Teetotlar in the whole text and then looks for value Yes or No in the same line.


I have a table which contains individual test items (responses) from a 20 item test. There is a Person_ID, a Item_Number, and a Item_Response. Example:  Person_ID| Item_Number| Item_Response 1        | 1          | 6 1        | 2          | 9 1        | 3          | 3 1        | 4          | 2 2        | 1          | 5 2        | 2          | 5 2        | 3          | 1 2        | 4          | 8 3        | 1          | 1 3        | 2          | 3 3        | 3          | 5 3        | 4          | 2   Need to transform to this with an SQL query:  Person_ID| Resp1| Resp2| Resp3| Resp4 1        | 6    | 9    | 3    | 2 2        | 5    | 5    | 1    | 8 3        | 1    | 3    | 5    | 2   I am using MS Access SQL  Thank you!

First post ever, thanks for having me!  Currently we have an Access database connected to two access control devices tracking hours for different statuses: Check In, Check Out, Break Out, Break In, Overtime In, Overtime Out.  How our devices manage this though, is that they record each time independently, so in the Access database we have different rows telling the username, date and time, status, device and other interesting stuff that sadly don't help with the problem. What I want to focus on though is time, which I want to put in separate columns using Access' CrossTab mode, with TRANSFORM and PIVOT and what else.  The main issue is that the employees have many breaks during the day and sometimes many overtime schedules and I have no way to tell which is the first or the second break/overtime but the time when those happened.  Here is an example of what I have with Dave:  Name    | Date       | Auth     | Time  | ------------------------------------------------------------------ Dave    | 21.01.2019 | CheckOut | 18:00 | Dave    | 21.01.2019 | BreakIn  | 16:45 | Dave    | 21.01.2019 | BreakOut | 16:30 | Dave    | 21.01.2019 | BreakIn  | 14:00 | Dave    | 21.01.2019 | BreakOut | 13:00 | Dave    | 21.01.2019 | BreakIn  | 10:00 | Dave    | 21.01.2019 | BreakOut | 09:45 | Dave    | 21.01.2019 | CheckIn  | 07:30 |   And here is what I'm trying to achieve with that:  Name    | Date       | CheckIn | BreakOut1 | BreakIn1 | BreakOut2 | BreakIn2 | BreakOut3 | BreakIn3 | CheckOut | ---------------------------------------------------------------------------------------------------------------- Dave    | 21.01.2019 |  07:30  |   09:45   |   10:00  |   13:00   |   14:00  |   16:30   |   16:45  |  18:00   |   Right now I managed to obtain somewhat what I planned to have, but I was only able to output one column for each Auth. If I manage to get the data that way I might be able to calculate exactly how many hours an employee has worked.  Do you think that using a CrossTab is a good idea to do such? If so could you please help me reach the objective? Not really looking for snippets of instant solutions, rather many ways to think on how to achieve it. I have a standard expertise with Access and database in general so one can never stop learning!  Thanks in advance, have a great day.  Leo


I am trying to build a tool that sends data to another tool via some mediator between the 2 tools.  Suggestions are welcome to use something else, however for those that know how to use the WCF, can you walk me through how it is done ?  I watched some videos online, but they seem to use the web. Both applications are used on the desktop, and both are windows forms application tools.  Here is where I am at.  I created a toolX, and toolY. Both different projects. Here is what I want.  I want to use toolX to start toolY, and send it data. toolY will receive the data, start processing it. Once finish, I need toolY to trigger that it is finished go back to toolX so it can process other data to toolY.  I created a WCF service, but I am not sure what to do with it, where to implement my code so it starts toolY and send it the data. I did not include anycode because it is pointless since it is an empty service class with [Service Contract] section, and [Data Contract] Section. Any help, examples, tutorials, websites are much appreciated

I have used IPC in Win32 code a while ago - critical sections, events, and semaphores. How is the scene in the .NET environment? Are there any tutorial explaining all available options and when to use and why?


How can I run for loop with two variables or in other words is it acceptable to do that? I will clarify my question by the following example:  I have a list of letters included in a text file "names.txt" and I have numbers included in text file "numbers.txt" each number in "numbers.txt" is equal to letter in "names.txt" (row by row) I want to create folders has the names in names.txt + the numbers in numbers.txt  names.txt       numbers.txt         output_folder name A               1                   A1 B               2                   B2 C               3                   C3 D               4                   D4 E               5                   E5   to create folders has the names included in names.text I can use the following code:  #!/bin/bash in=/in/on/an out=/ss/tt/nn for i in $(cat $in/names.txt); do  mkdir ${in}/${i} done   How can I add a second variable to a for loop i.e in the previous code we have the variable i is belonging to the names.txt how can I add variable b belonging to numbers.txt?

I wanted to know if there is any way of reading from two input files in a nested while loop one line at a time. For example, lets say I have two files FileA and FileB.   FileA:  [jaypal:~/Temp] cat filea this is File A line1 this is File A line2 this is File A line3   FileB:  [jaypal:~/Temp] cat fileb this is File B line1 this is File B line2 this is File B line3   Current Sample Script:  [jaypal:~/Temp] cat read.sh  #!/bin/bash while read lineA     do echo $lineA      while read lineB         do echo $lineB          done < fileb done < filea   Execution:  [jaypal:~/Temp] ./read.sh  this is File A line1 this is File B line1 this is File B line2 this is File B line3 this is File A line2 this is File B line1 this is File B line2 this is File B line3 this is File A line3 this is File B line1 this is File B line2 this is File B line3   Problem and desired output:  This loops over FileB completely for each line in FileA. I tried using continue, break, exit but none of them are meant for achieving the output I am looking for. I would like the script to read just one line from File A and then one line from FileB and exit the loop and continue with second line of File A and second line of File B. Something similar to the following script -  [jaypal:~/Temp] cat read1.sh  #!/bin/bash count=1 while read lineA     do echo $lineA          lineB=`sed -n "$count"p fileb`         echo $lineB         count=`expr $count + 1` done < filea  [jaypal:~/Temp] ./read1.sh  this is File A line1 this is File B line1 this is File A line2 this is File B line2 this is File A line3 this is File B line3   Is this possible to achieve with while loop?


I tried to install the packages apt-file, ubuntu-tweak and checkinstall using sudo apt-get install <package name> in 10.10, but the terminal reported package not found even after sudo apt-get update. What am I doing wrong?

How do I get to the Universe Repository in supported versions of Ubuntu?


I know that we should use "an" instead of "a" if the next word (such as a noun) is a vowel.   But I'd like to know if there is an exception to this? One example:  How to install an SSL certificate.   Is the above example incorrect or is an exception? To me, it just sounds right but I don't know if it's correct.

99% of the time, I'm clear on when I should use "a" versus "an." There's one case, though, where people & references I respect disagree.  Which of the following would you precede with "a" or "an," and why?   FAQ FUBAR SCUBA   [Note: I've read the questions  and , but the rules given there don't necessarily apply here.]    [Edited to add]  Here's a shorter (and hopefully clearer) version of the question…  In written English, which is correct (and why): "a FAQ" or "an FAQ"?  Some references with differing opinions:   an: the  and  a: the Microsoft Manual of Style for Tech Publications, 3e either: the  and


I have tried \bنيك\b but this does not seem to work.    Examples would be: نيك  should MATCH  الهندسة الميكانيكية should NOT MATCH  نيك  نيك  نيك  should MATCH

I need to delete some Unicode symbols from the string 'بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ'  I know they exist here for sure. I tried:  re.sub('([\u064B-\u0652\u06D4\u0670\u0674\u06D5-\u06ED]+)', '', 'بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ')   but it doesn't work. String stays the same. What am I doing wrong?


I have made a costum PCB with components and a WT51822-S2 bluetooth module. After testing, there seems to be a low percentage of modules that have a fault in them. Since they are SMD modules, with connections on the sides, its hard to desolder them if faulty. They are soldered on easily with a normal solderin iron but desoldering, thats a whole other thing.  Is there a way to test SMD modules without actually soldering them on the pcb? I have tried pressing them on (with force and duck tape) but some pins have contact, others dont. I have also made a brakeout board for testing, but it still requiers soldering.  what to do?

I have a circuit board in production, primarily through-hole, to the tune of ~400 units per year. Each one is manually inspected and tested. The board has ten distinct voltage rails, four voltage feedback amps, three current feedback amps, a microprocessor with particular response characteristics, and a few other parts. That's a lot to check.  I'm considering building an automated test rig for all that. I think a PCB that feeds the appropriate input stimuli, observes the responses, and gives a go/no-go would save me a lot of time. I'm reasonably confident that this is done, commonly. However, the techniques used to do it are unknown to me.  I imagine a test rig with a circuit board of the same footprint as the unit under test (UUT). It would have a microprocessor, appropriate protection and scaling circuitry, and a large number of vertical pins sticking up from the board. Mount points would also stick up from the test rig for the UUT. When the UUT is mounted on top of the test rig, the bottom of the board makes contact with the vertical pins, allowing the test rig to feed stimuli to the UUT and observe responses.  This seems reasonable, and I have the idea I've seen something very much like this before. But the details elude me. What sorts of pins would be used on the bottom board? (Part numbers would be great!) Would I need to put specific kinds of test points on the UUT, or can I get away with just contacting the clipped pins protruding through the board? What other concerns might there be?


When I render my scene, the render is a pixelated yellow image. Then it tells me that my texture size is smaller than my output size? I have not found any answers on how to take care of this problem. Here is a screenshot.

A scene I made is not rendering, at all. This grey screen stays the same and nothing changes.  Here are my settings:  [


I am very new to Latex and I am getting this error:  Class scrartcl Error: undefined old font command `\bf'. See the scrartcl class documentation for explanation. Type H <return> for immediate help.... \maketitle   My template is never even using \bf but I still get this error. I am using the newest version of Texmaker.

I understand that \bf and \it are now obsolete in LaTeX and that \textbf and \textit are proper, as they produce more sophisticated (in particular, cumulative and properly kerned) changes to font style. I have read the  and I understand the rules and their reasons, as well as the several other commands that are affected.  However, I find it convenient to use LaTeX for notetaking during lectures, and in that rushed environment, shortening a command by any number of keystrokes helps keep me from falling behind. \bf and its two-letter kin are still very useful to me for that reason, and once a presentation is finished I can go through and replace all appearances of \bf et al. with \textbf et al.  My question is this: is there a plan eventually to replace the short font style commands like \bf with the implementations of \textbf etc. some day, or should I expect \bf always to remain in existence but obsolete, for reasons of backward compatibility with original TeX? Original TeX has been greatly improved on in countless ways, but in the heat of transcription I sometimes miss its conciseness.


As far as I'm aware, Vibranium was exclusively in Wakanda (except for the Vibranium that Ulysses Klaue stole and later gave to Ultron and the Vibranium from Howard Stark that is in Cap's Shield). So how is it possible that Tony Stark has Vibranium?

Captain America's shield is made of Vibranium which came from Wakanda. Given Wakandan tech was so advanced and Wakanda was so protective about Vibranium, how could US government collect a chunk of Vibranium from Wakanda?


I am very frustrated.  Turned the PC on, worked some time with my bluetooth mouse on, suddenly the mouse stopped working, the occasional OFF-ON the mouse did not help (as it usually does), I went to Settings, and acctually did see the Bluetooth settings dissapeared before me!  I read up everything, watched tutorials on Youtube, in Device Manager have found Bluetooth in hidden, but nothing worked to put it back on (in many tutorials the start looked the same, but did not fix it for me).  I tried to uninstal it, reinstal it from the Intel site.  The bluetooth is installed, services are running, still, its nowere to be found.......  This is the second time this happened - the first time it has fixed miraculously itsself after a few hours of me reading up and trying everything...........when I gave up, in some time it just resumed.  Please help, I have spent all night on it...... (tried everything written and in all youtube tutorials), it did not happen after update, I tried updating the driver first, followed all the tutorials. The restore did not work, and now the restore point is gone........  Do not want to refresh the PC....

I have a Lenovo G580 laptop. In the past, using Windows 8, I could use Bluetooth to connect to other devices.  Installing Windows 10, Bluetooth simply disappeared. I can't find anything related to Bluetooth in the Device Manager, also in Settings → Devices.  There is no Windows 10 Bluetooth driver for my laptop.  What can I do?


Lets say a woman is attached to the center of a spinning disc with a rope ,and she also has friction between her shoes and the surface of the disc.  A problem I am doing says that the force pointing to the center (the centripetal force) includes friction and tension.  Tension i understand that it pulls her inwards. But how can static friction provide part of that centripetal force?  Static Friction opposes relative motion. So how does it point inward? her velocity vector is tangential but always changing direction.

In my book, the following are described to be the steps that one must follow if he wishes to find the direction of static friction force acting on an object:  "(1) Draw the F.B.D(free body diagram) of the object in question with respect to the other object on which it is kept. (2) Include the pseudo force also, if the contact surface is accelerating. (3) Decide the direction of the resultant force and resolve this force into two components; one along the surface of contact and the other along the normal to this surface. (4) The direction of static friction is opposite to the component of the result force along the contact surface."  Firstly, are these steps correct? Will I always obtain the correct answer by following these steps? Secondly, consider the following problem:  In questions like these, when I try to find the resultant force and then assign the direction to static friction, I find that my answer is incorrect! Are there some other steps to follow when I know that the object is definitely accelerating in one direction or another? Edit 1: I approached the above question by doing exactly what my book suggests; first, I identified all the forces acting on the smaller block, being the normal force applied by the block A and its weight mg downward. Adding these two forces, I get another force that actually acts on the body like so:  I wonder if I'm not supposed to take either of the contact forces into consideration when drawing the F.B.D to figure out the direction of static friction acting on the body. Also, are there other steps for finding the direction of kinetic friction? Edit 2: From Judge's answer, I have been able to figure out my mistake, it being that I completely missed step (3) and didn't resolve the resultant force into components! Sheesh. Sorry! Much thanks in advance! :) Regards.


This is a person who can talk about any topic related to any field; for example,  medical, politics, history, engineering, etc. and not just in a boasting way, this person actually posses knowledge in these fields mainly by reading books, magazines etc. Also, this word is not used in a sarcastic way, it's actually a deferential word.   The person is not necessary to posses 'deep knowledge' of the subject, just enough to converse with people.

Possible Duplicate:          I just wondered, what could we call a person with deep knowledge in various fields? For example, computers, music, sports, etc.  I think I could use sage, but it wouldn't be appropriate if someone is experienced in multiple fields.


I want to view a .osm file that was generated from an Overpass API query.  I tried the steps given in  on OSM wiki. The tutorial says        Start QGIS Desktop   Go to: Vector (menu) → OpenStreetMap → Import Topology from XML.   Select the .osm file, and it'll suggest a name for the SpatiaLite database that will be created from this data.      But when I opened the QGIS, the vector menu does not give drop-down submenu.  Am I missing something in the steps or the QGIS tool on my machine is not installed correctly? Any suggestions?   is the most related question I could find. But it was not very helpful when it comes to my problem.

I just (December 12, 2018) downloaded the training manual and data. I'm trying to get started but I cant find the first part to download the OpenStreetMap part.  "In the Vector menu dropdown, select OpenStreetMap -> Download Data. You can then manually enter the co-ordinates of the region you wish to use, or you can use an existing layer to set the co-ordinates."  I see the Vector menu on the top ribbon, but the dropdown does not have the right option. I cruised around but didn't see a way to add it.


I have a latex document which has several citations. These citations are from my global .bib file that I manage with JabRef. The documentclass of my document is IEEEtran (I doubt my use of IEEEtran affects the answer, but this is my usecase, so I figured I would ask in context).  I am getting ready to share my document (and the .tex file) and would like to share a minimal working .bib file with it. My question is: is there an automated way of extracting the entries from a .bib file using the .tex or .aux files of a document so that the output .bib only contains the bibtex entries cited by the document?  Obviously, I could manually go through my document, find the keys, copy the relevant entries from my global .bib file to one called standlone.bib or some such. But I'm curious if there are any extant automated ways. Or if there are not any automated ways, are there any simple commands to get there?  I have been searching and was unable to find any answers to this question, so please forgive me if this is a duplicate as I did not know what terms to search for beyond "latex standalone bib from tex", etc.  For completeness, suppose I have a document such as the below MWE snippet in a file called document.tex.  % document.tex \documentclass{IEEEtran}  % ... Various preamble commands  \begin{document}  Lorem ipsum dolor sit amet, consectetur adipiscing elit.  Sed mattis pellentesque mauris. Sed non nisi ut velit  ullamcorper congue non eu erat. Aliquam pharetra nibh magna, eu consectetur risus aliquet vel. Aenean eget turpis dui. \cite{key1}  Sed in tristique nibh, vel ultricies lorem. Pellentesque sem lacus, maximus ac laoreet eu, mattis at sem. Maecenas dignissim sagittis nisl, non interdum nunc auctor nec. Proin ac ipsum quis lorem placerat accumsan sed quis sem. \cite{key2}  % ...  \bibliographystyle{IEEEtran} \bibliography{jabrefBib}  \end{document}   Example of the command I hope exists:  $ exportbibfromdoc --stand-alone-bib document.tex -o standalone.bib   so that the output would be  % standalone.bib @ARTICLE{key1, ... }  @BOOK{key2, ... }  ...   Thanks in advance for any help!

Normally, LaTeX will only create references for the BibTeX entries cited in the text. Is there a way of extracting these entries into a different .bib file automatically? For example if I have a .bib file with two entries, and only one is cited in a particular text, I need a way of creating a new .bib file with just that reference.


I booked a flight from HCM City to Manchester on 25/09/2015, using Etihad Airways. The input the last name as first name in wrong order. My first name: Hoang, last name: Pham, but while booking, I enter my first name as Pham and last name as: Hoang.  Will the airport agents accept the wrong order of first name and last name, or I have to issue a name change to the airways?

Is there any problem if the last name prints first then the first name in international air ticket?


I have freshly installed and updated ubuntu on raspberry pi 3.  Neither sudo ls nor sudo apt-get install pose any problem, but executing:  sudo nmcli device status   gives:     Error: Could not create NMClient object: Could not connect: Permission denied

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


I know this is asked many times, but I couldn't exactly find what I need.  I want to get the server path and add image path to that. I did that   string mypath = Request.Url.GetLeftPart(UriPartial.Authority); string uploadPath = Path.Combine(mypath, "Upload/Images/"); Response.Write(uploadPath);   This printed http://localhost\Upload/Images/, why is there a \ in the middle of the path.  I fixed it by adding / to mypath like this  string mypath = Request.Url.GetLeftPart(UriPartial.Authority) + "/";   Is this the correct way? or is there is any better way to do this?

is handy, but is there a similar function in the .NET framework for ?  I'm looking for syntax like this:  Url.Combine("http://MyUrl.com/", "/Images/Image.jpg")   which would return:  "http://MyUrl.com/Images/Image.jpg"


How come the first condition is false and the second is true?  I was sure they were both true. System.out.println(Integer.toString(3) == "3"); System.out.println(Integer.parseInt("3") == 3);

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 want to create an image that has the text as transparent like this (imagining that black is transparent)    So in photoshop I have tried selecting 'color range' and choosing the white and then getting the inverse selection and deleting it from a new white layer. But this comes out very pixelated like this (I have put a black layer underneath to show through the transparence):    How can I do this without the pixelated edges? The ideal situation here would be if there was a 'transparent clipping mask'

Okay, this should be super easy to do but I just can't find the way.  I have a background image with a solid colour layer on top of it, and I would like to add text on top of everything in such a way that the filling of the text is the image in the background. I have tried selecting the text shape and deleting that selection shape in the solid colour layer, but it just looks wrong.   Can anyone help me with this? Many thanks in advance.


Let $G=S_4, N=\{e;(1,2)(3,4);(1,3)(2,4);(1,4)(2,3)\}$   I need to prove that $N\lhd G$  Attempt:  $N\lhd G \iff gng^{-1}\in N$   and it is in $N$ for all $g\in G, n\in N$

Let $K=\{(1),(1,2),(3,4),(2,4),(1,4),(2,3)\}$ is a subgrope of $S_4$, we want to show that it is a normal subgroup.  I know that i have to examine the condition of normality in $S_4$ i.e. for all $g\in S_4, g^{-1}Kg=K$. I think this takes times or I am missing something near. Please give me the right hint. Thank you.  Edit: $K = \{(1),(12)(34),(13)(24),(14)(23)\}.$


I tried to install Ubuntu 2 times, but I failed. The first time, I installed Ubuntu alongside Windows, but it never booted! Still, it occupied about 44 gigabytes of disk space. The second time I gave my laptop to my friend and she installed it again (alongside Windows 10) but she failed to boot it after the install too. Now, for the third time, I want to install it but not alongside Windows.   If I select Erase the disk and install Ubuntu, would it then delete the previous failed Ubuntu install files or not? And if it doesn't, then how can I delete them and free up the disk space they occupy?

I am installing Linux on Virtual Box but it says that the computer currently has no detected Operating Systems. What would you like to do?     1) Erase disk and install Ubuntu Warning: This will delete any files on disk.  What should I do?


I have a VM running a simple webhost.  But whenever I try to connect to it using my external IP (148.123.29.35) or domain (test.mydomain.com (A-record to 148.123.29.35)), my browser just tries to connect, then ends with "This webpage is unavailable".  This only happens from my local network, I have tested over VPN to my work place and it works fine from there, and a friend also tested for me.  I am using Asus RT-AC66U router with portforwarding port 80 to 192.168.1.200  Following is the result of a tracert request in cmd:    C:\Users\Username>tracert test.mydomain.com  Tracing route to test.mydomain.com [148.123.29.35] over a maximum of 30 hops:   1     1 ms    <1 ms    <1 ms  x.x.x.x.customer.cdi.cc [148.123.29.35]   Trace complete.    Following is the result of a tracert request in cmd to google.com    C:\Users\Username>tracert google.com  Tracing route to google.com [148.123.29.35] over a maximum of 30 hops:   1     1 ms    <1 ms    <1 ms  router.asus.com [192.168.1.1] 2 - 8                        << Hidden >> 9     8 ms     8 ms     8 ms  148.123.29.35   Trace complete.    I also want to point out that I am currently running a Space Engineers server which is working perfectly, both from internal and external computers (obviously port-forwarded..)  NOTE:   My actual domain has been replaced by test.mydomain.com My actual external IP has been replaced by 148.123.29.35 (google.com) My actual username has been replaced by Username My actual cdi. address has been replaced by cdi.cc Other IPs have been replaced by x.x.x.x

My setup  I have a linux server running in my basement. I currently have my router looking to that server for DNS lookup, so I can use named to spoof a bunch of domain names to point to my local server's local address, 192.168.0.111. This works great.  I also am running Apache and PHP on this server, and have forwarded port 80 on my router to this machine, so my public IP xx.xxx.x.xx is sent to the basement server.  This is a great development set up for me, because I can develop websites in my local network and pull them up on numerous devices with a *.mylocal.net address. I can also quickly share a website on my public IP with others that are outside of my network.  I have a static IP, so that makes this even easier.  The problem  Some applications need to have an absolute URL. My spoofed DNS doesn't work outside my network, and neither does my internal IP address.  I need to be able to access the sites at the same IP that they are accessed publicly, which is my public IP: xx.xxx.x.xx    For some reason, I can't access my own public IP address from within my own network.  My router's public IP is xx.xxx.x.xx, and when I hit xx.xxx.x.xx from outside my network I see exactly what I want -- my development website. But, when I hit xx.xxx.x.xx from inside my network, the connection times out.    I assume my ISP has a firewall that blocks requests from xx.xxx.x.xx to xx.xxx.x.xx where the origin and the destination are the same IP (or maybe this is impossible on any network?)  So how can I set up my network to forward the internal request to my public IP to the local IP of my basement server?   I would like to do this within the local DNS server I set up, or in my router, so the change can be applied to all devices in my network, and not just the basement server or the windows tablet/laptop, etc individually.


But I still can't find the gpedit.msc. I have the dlls, I can run the program, but I can't locate the msc and it's driving me nuts. All my google searches lead me back to questions about how to activate gpedit.  Just to reiterate: I have it. I can't find it. Syswow64 contains gpedit.dll, it contains various mscs, it doesn't seem to contain gpedit.msc. I can run gpedit from command line but I can't locate this file.   (I am trying to gain full control over my telemetry and update settings on a Home version, that's the motivation for bothering with gpedit at all)

I want to make some changes to Windows that require using the Group Policy Editor (gpedit.msc).  Unfortunately the Group Policy Editor is not included with the Starter Edition, Home and Home Premium editions of Windows.  How can I install it?


I see some people make mistakes in conversation then they counter-attack you if you point out their mistakes. Let's take an example:     Jay: I don't like Chinese food because I hate china.   Xu(Chinese Guy): How can you say these things about Chinese.   Jay(Careful manner): I was talking about specific people. You are my brother how can you even think it was against you, I am ashamed.   So Jay did the mistake and he is trying to defend by diverting the topic. Do we have any specific word or slang for such type of act or behavior of Jay?

I'm looking for either a single word or phrase that would describe either someone or the action of dismissing someone's opinions as something "socially unpopular", without giving any reasoning why, either just to spite them, because they have a poor counter-argument, have been backed into a corner, or something similar.  For example, someone who supports something politically incorrect (like, say, stronger gun control or help for male domestic abuse) might have their views dismissed as racist or sexist or liberal without actually acknowledging and debating against them, thus labeling the former as something they might not be.  I was talking to a friend earlier about politics, and she complained about Germany's immigration problem. She said one issue was that many politicians that try to support stronger immigration laws would immediately be shot down as racist or a nazi and forced to resign, instead of being presented with counter-arguments. Regardless of whether you agree with them or not, what would describe that?  EDIT: Forgot to specify -- the word or phrase I'm looking for would be used in an informal context. And to address further questions, to be used when the person's opinion has legitimate worth and isn't just "being racist" etc, i.e. the dismisser is incorrect, and is only making these accusations because they can't argue further. (Added emphasis to the last sentence of the first paragraph)


This model now has 3,840 triangles I need to reduce it to 1,400 triangles but still keep it's good looks and smoothness.  I have tried Limited Dissolve but it just creates bumps and messes up the vertices. Does anyone have any suggestions? Is there possibly a way to merge all the vertices into one line therefor reducing vertices?  Here is what it looks like:

Is there a tool or an easier way to remove unneeded geometry from objects? Mostly when using a "Displace" modifier, on many places there are flat surfaces where there is extra geometry on the mesh, that you would like them to be removed. At first I thought of the "Decimate" modifier, but is there a way to do it more evenly. By preserving the edge/face flow and such. Is there some feature for something like that in Blender?   From this      To this      Or to this (if I want the geometry to be to the very limits and worrying only about the shape)


I have Windows 7 installed in my PC. In a failed attempt to create a partition my disk has been converted to dynamic including system and boot volumes. How can I install Ubuntu in a partition without affecting the Windows system?

I've been trying to install 12.04 for a while now, I'm running on Windows 7 and I already made the partition (it's dynamic). I've tried booting from a disc and also the Windows installer. I haven't tried used any repair-boot programs or anything. Every time I tried to load from either, I get an error:  command=C:\windows\sysnative\bcdedit.exe /set {03f9077f-661f-11e1-845a-d08b36406c3d} device partition=U;  retval=1  stderr=An error has occured setting the element data. The request isn't supported  stdout=   Then after that, it makes a log file with information that I don't understand.  If it is simply due to the fact of it being a dynamic partition, someone please help. If it is more extensive, anyone with details on possible solutions or definite ones please express them.


I've noticed that these forums do lack a LightBox for the images posted by users.  When I click an image in a question to view the full size, it will simply open the image in the parent window, resulting in loss of any answer or comment already written by me. (Yes, there is a autosave for drafts.)  Shouldn't there be a modal or something to view the images in a more friendly way? Is it possible that there is a modal but my browser can't display it? I tried different browsers, but the same effect.

It would be nice to support showing images in their original size when they where automatically resized because they are too big to fit in a question or answer ().  I envision it just like in blogs or facebook: You can click on the image and it is shown in its original size in an overlay.


Is there any understanding, or theories, of why the uncertainty principle exists at all in nature? Can anyone recommend any reasonable ideas, (especially involving cosmology) that have already been put forward, or is it something we just have to accept as part of nature? It’s because it’s something that I’d like to investigate further and wondered if any work has already been done on this kind of thing.  Are ‘hidden variable’ theories connected to this? It is well known that quantum mechanics is difficult for us humans to understand.  Books sometimes say things like – ‘we cannot expect the laws of nature on the smallest scales to make sense to the human brain.  Humans have daily experience of larger scales and we should just accept nature’s laws even if they don’t make intuitive sense to us’. But it would be better if there was a reason for the existence of the uncertainty principle. Here is some work done so far, attempting to understand the uncertainty principle and link it to cosmology. The uncertainty principle for position and momentum is $$\Delta x \Delta p\ge\frac{h}{4\pi}$$ But what is really meant by position? According to Mach’s principle, the position of an object is only meaningful if it’s defined relative to the positions of other objects in the universe. Similarly ‘momentum’ also only makes sense if it’s defined relative to other objects in the universe. If it’s the observer that the position or momentum of a particle (e.g an electron) is defined as relative to…then to what is the position or momentum of the observer defined relative to?  It seems that the whole universe should be involved when deciding ‘position’ or ‘momentum’. But then we have the problem of what counts as part of the universe.  According to most models in cosmology there is a horizon $R$ beyond which signals won’t reach us $$R=\frac{c}{H}$$ where $H$ is the Hubble parameter. We could imagine the universe as a kind of gas with particles continually entering and leaving the horizon. So there seems to be an inherent ‘unknowability’ about which particles are within the horizon and when, and hence an ‘unknowability’ about the position and momentum of a particle, such as the electron. It’s easier to proceed using the version of the uncertainty principle $$\Delta E \Delta t\ge\frac{h}{4\pi}$$ There is an uncertainty for an observer of the total energy of the universe $E=Mc^2$, where $M$ is the mass of the universe within the horizon, for a time $\Delta    t=\frac {R}{c}$ - as there is a time delay for the information of what constitutes the universe to reach the observer.  The fluctuation  or unknowability in energy, modelling it as a gas of $N$ particles, where the particles can enter or leave a boundary at random, is from thermodynamics $\frac{Mc^2}{\sqrt{N}}$ and if this unknowability is shared between the $N$ particles in the universe we get $$h=\frac{ Mc^2}{N^{3/2}}\times\frac{R}{c}$$ $$h=\frac{RcM}{N^{3/2}}$$ …it’s the right order of magnitude.  Of course this is just a model to see if it’s possible to get an understanding of why the uncertainty principle exists at all. Is it in principle possible to understand the origin of the uncertainty principle?  What ways have already been tried?  Or is it so fundamental to quantum mechanics that it’s not something that we should even attempt to explain or understand?  This question should be reopened as it's a discussion of relating the uncertainty principle of quantum mechanics to cosmological quantities and is different to the other questions.

$$\Delta x \Delta p_x \geq \frac{\hbar}{2} $$  I understand what does  states i.e. it's definition and it has been proven experimentally. But, can anyone please explain the reason for whatever this principle states i.e. why it happens?   Stating this principle in reference to the single slit experiment with electron (one particle experiment i.e. electrons are fired one at a time): Assuming the variable width of the slit is along the X-axis. So, if an electron passes through the a thin slit we can say the uncertainty in position is $=\Delta x$ which is equal to the  width of the slit. Now, we can also know the $x$ component of the momentum at he time when electron passes through the slit using distance between the slit and screen, time interval and the distance between the centre of the screen and the point where the electron hits.   As, the electron was fired towards the centre of screen we should expect a point on the screen but instead we get a gaussian distribution, and as we decrease the width of the slit (decrease $\Delta x$) the FWHM of the gaussian distribution increases i.e. $\Delta p_x$ increases which means the uncertainty in the measurement or prediction of $p_x$ increases.   Which is exactly what Heisenberg's Uncertainty principle states. But, can anyone please explain how/why this happens?


How do I create a startup command permanent on every cycle restart ? As previously having brightness reset when set at power saving mode to turn off the monitor.  18.04 64bits 5.4.0-42-generic Desktop Nvidia 440 driver  I found out xset dpms 600 900 1800 works on turning off the monitor display but I wanted it to run at startup which i do no need to type manually on the terminal. I tried adding xset dpms 600 900 1800 to the bottom of home/.profile but it didn't work. Further testing and by adding an extra line to run terminal by adding xset dpms 600 900 1800 gnome-terminal  at the terminal startup checking the xset -q xset dpms was not set Standby: 0 Suspend: 0 Off: 0  while it should be Standby: 600 Suspend: 900 Off: 1800 The weird scenario is when manually launch a terminal without typing anything , the command of xset dpms 600 900 1800 active. What would it be the reason ? .profile with command 'xset dpms 600 900 1800' Not trigger on startup but when I launch terminal manually it trigger the command. If anyone could explain the reason ? or a better way to run the command on startup rather running on .profile ?

How can I run scripts automatically when Ubuntu starts up so I don't have to run them manually after startup?


I would like to install python3 and python3.4 in my office servers. There are 86 hosts and I am confused how I do that in the same time. In this time, I found my solution like this pssh -h host_86.txt -i "yum install -y epel-release && yum install -y python34"  Is python3 included in python3.4 package automatically or separately? Is my solution right to do that? The OS is RHEL 7 and I found the yum package from here: . Do I need to install python34-setuptools and easy_install-3.4? I am junior system administrator and confused about how to handle 86 hosts a day.

Coming from Windows administration, I want to dig deeper in Linux (Debian). One of my burning questions I could not answer searching the web (didn't find it) is: how can I achieve the so called "one-to-many" remoting like in PowerShell for Windows?  To break it down to the basics I would say:  My view on Linux:    I can ssh into a server and type my command  I get the result. For an environment of 10 servers I would have to write a (perl/python?) script sending the command for each of them?   My experience from Windows:    I type my command and with "invoke-command" I can "send" this to a bunch of servers (maybe from a textfile) to execute simultaneously and get the result back (as an object for further work). I can even establish multiple sessions, the connection is held in the background, and selectively send commands to these sessions, and remote in and out like I need.   (I heard of chef, puppet, etc. Is this something like that?)    Update 2019: After trying a lot - I suggest Rex (see ) - easy setup (effectively it just needs ssh, nothing else) and use (if you know just a little bit perl it's even better, but it's optional) With  you can do adhoc command and advance it to a real configuration management (...meaning: it is a CM in first place, but nice for adhoc tasks, too) The website seams outdated, but currently (as of 01/2019) it's in active development and the IRC-Channel is also active.  With Windows' new  there are even more possibilities  you can try: rex -u user -p password -H 192.168.1.3 -e 'say run "hostname"'


I'm following a tutorial on Python classes. I want to output all class variables, but raise_amount doesn't show up for some reason. Here's my class definition along with one instance, emp_1: class Employee:          raise_amount = 1.04          def __init__(self, first, last, pay):         self.first = first         self.last = last         self.pay = pay      emp_1 = Employee('Corey', 'Schafer', 50000)  These 2 statements do the same thing, but neither displays raise_amount: print(vars(emp_1)) print(emp_1.__dict__)  {'first': 'Corey', 'last': 'Schafer', 'pay': 50000} {'first': 'Corey', 'last': 'Schafer', 'pay': 50000}  Is there a newer way to output the class variables (Python 3.7)? The above statements worked in the video, but it's from 2016. I can still reference raise_amount (see below), just can't see it when outputting all the class variables. print(emp_1.raise_amount)  1.04

So what I'm looking for here is something like PHP's  function.  This is so I can debug my scripts by seeing what's the state of the object in question.