Some days ago I saw a migrated question in Meta : .  In the last session of the question there is a banner like Migrated from Stack Overflow    But when I scrolled to bottom for reading the answer, the banner vanished:    I refreshed the page it come again. Is that a bug ?

I've come across a small issue which occurs when a question has been closed but the question itself or one of its answers are being edited.  Steps to reproduce:   Visit a closed question. (even closed years ago)   In a different tab or browser, edit the question or one of its answers. "an edit has been made to this post; click to load" message will appear above the edited post in the first tab/browser, click it. The .question-status div becomes hidden, which includes the closed notice below a question and, for a duplicate-closed question, the list of duplicates above the question body. This gives the appearance that the question is no longer closed (until you refresh).   Some screenshots:                I know it isn't common/important but it did confuse me when looking at a particularly bad question - I thought it had been reopened.   Is this an intentional feature? If so, what was the thinking behind it?    Another example  Before    After


This is what I need:   What's the best way to achieve this without damaging my car's audio?  I want to connect my iPhone to my car's audio and charge it at up to 4.2A iPhone will draw up to 2A instead of 500mA.  Or would it be easier to use a USB hub with external power source, such as 2A?  Unless it's possible to "bump up" the car's audio current to more than 500mA.

The car I recently bought has a built in USB but only provides 500mA.   I want to use a cable like the one below to connect my iPhone to the built-in USB to play music/satnav on the car stereo, but I want my iPhone to draw a power from my powerful car charger (4.2A).   I understand that connecting two power sources together with this kind of cable is not a great idea, I'd have to modify it but disconnecting power (+) wire from one cable. Related discussions (below) say that both 'host' devices have to have a common ground. The car's USB and the car charger ground are common so this should work.   Will it work and recognise my iPhone?    Update: Jailbroken iPhone will show you what the current is during charging. It'll show around 2000mA when the phone is off. With the screen and other things on it shows over 1700mA. Using iPad charger in the screenshot.     Related, but I thought my question could possible be more specific as it's to do with cars. By reading those I think the answer to my question is yes, however I'd like a confirmation from you guys.


I am on a netbook and got recommended to try Ubuntu. So i am going to run it with Windows 7 Starter still as my OS. But if I decide to go with Ubuntu as my main OS is there any way to go back to Windows 7 Starter if for whatever reason I change my mind?   Sorry if it is a simple, silly question. I am unsure so thought I would ask.

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


I am switching to a Ubuntu-like OS (from Windows8) and I have been reading around about its derivates. I decided to choose between Lubuntu (for its idea of energy saving and lightweight) and the standard Ubuntu, so here is my question: is it really appreciable the difference of performance on a HP, Intel i7-4500 with 8Gb RAM (and Nvidia video card)?  Thank You!

I've heard that Lubuntu consumes less resources than Ubuntu. Is it because of the fact that Lubuntu uses different desktop environment and window manager?  If so, would it be equivalent to install lubuntu-desktop on top of Ubuntu rather than doing a fresh install?


I would like to start learning about symmetries in physics and how they affect physical quantities. As far as I know, the mathematical language that describes symmetries is the Group Theory. So, I think the best start would be getting deep in this theory. Although there are many books on that topic, I would like to find one that would be written in a very simple way, for beginners, with many examples, preferably in the physical context. Could anyone suggest such a book?  Note: I would like to study graphene and other 2D materials such as transition metal dichalcogenides.

I am looking for a good source on group theory aimed at physicists. I'd prefer one with a good general introduction to group theory, not just focusing on Lie groups or crystal groups but one that covers "all" the basics, and then, in addition, talks about the specific subjects of group theory relevant to physicists, i.e. also some stuff on representations etc.  Is Wigner's text a good way to start? I guess it's a "classic", but I fear that its notation might be a bit outdated?


This question relates to this one:    Among the answers are  and , among others, that simple put, point out that just because we, the audience, can hear the sounds, doesn't mean they exist in universe.  There are entries, like   which assert it is something the TIE fighters are artificially generating to make use of more of the pilots sense and give them situational awareness.  But amost all these answers, the point doesn't appear resolved.  So:   Do we have evidence in-canon about whether the characters can hear other ships and/or hear explosions as depicted to the audience?  In other words, are the sounds  ?   clarification:   It matters whether they react to the sounds, not how the sounds are generated or get to their ears.

Considering that sound can't travel through vacuum.


I'm trying to adapt a tutorial into an easy to use script  .  I'm trying to reduce the need for sudo/root as much as possible (preferably, only for the final dd step).   My questions are:   Can I mount the ext4 file system without sudo/root privileges in any way? Can I mount it in a way so that users/groups on the FS are ignored in some way (so I can run make install without sudo)?   The Filesystem is currently mounted loopback from an offset of a file (i.e. -o loop,offset=62914560).  This file is the image that will be copied onto the SD card used to boot the Raspberry Pi.

Can I mount a file system image without root permission? Normally I would do:  mount -o loop DISK_IMAGE FOLDER   Without using sudo or setting the suid on mount, is there any suitable way to do this?  I know I can use fusermount with some ISO images, but that is pretty limited, even for ISO images, some of my images cannot be mounted, but mount always works.


So in Chemistry and Math Stack Exchange I got suspended for six days and got my votes reversed. I believe that is because the moderators thought that I voted for myself.  So basically what was happening was that this account, John Rawls, had this other account Nick Bostrom voting for John Rawls. But rather I know Nick Bostrom so I kept on facebooking him the links to my questions so that I can get an answer.  I was wondering whether I am going to get my points back for Math.SE and Chem.SE after six days. If not, I was wondering if I could get it reversed because I don't understand why this is happening and I believe that this is unfair.  This question is specific and should not be marked as duplicate because this is a scenario where someone is voting for me

A high-reputation, highly-active user has already been dinged once for a sockpuppet, and I just dinged him again. He probably has another sockpuppet as well.   What are the guidelines for handling users who game the system in this fashion? Specifically,   How can I be sure I'm looking at a sockpuppet? When should sockpuppets be considered a problem? How should moderators handle problematic sockpuppets once they've been identified? I was suspended for sockpuppetting and feel this is unfair


Is there a way to make the Touch Bar esc key emit a "click" sound when it is pressed? This way I'd have some feedback that I successfully pressed the button when using vim.   I'd be happy with an Apple Script, or whatever works.

I love my MBP and the Touch Bar is pretty cool, but sometimes I find I’m second-guessing myself. Did I press the ESC key or not? Did I press that function key? Well you get the idea. There’s just no physical feedback and sometimes I keep tapping where I think something is, but it’s not!  I know there's no tactile feedback, but then it hit me - maybe there’s a setting somewhere for sound. You know, like the beeps you here when pressing buttons on some devices.  My guess is this is just not possible, but before I make the suggestion to Apple I wanna make sure!  Any ideas?


Here is what I'm trying to achieve:  To this purpose I've written the following commands: \documentclass[11pt]{article} \usepackage[utf8]{luainputenc}  \setdefaultlanguage[variant=us]{english}  \setmainfont{CMU Concrete} \setsansfont{CMU Sans Serif} \setmonofont{CMU Typewriter Text}  \usepackage{xspace} \usepackage{xparse}  \usepackage[dvipsnames]{xcolor}  \definecolor{keywdcolor}{HTML}{bf616a} \DeclareDocumentCommand{\keywd}{m}{     \ttfamily\bfseries     \textcolor{keywdcolor}{#1} }  \DeclareDocumentCommand{\apicmd}{m}{     \keywd{\textbackslash#1\xspace} }  \DeclareDocumentCommand{\apienv}{m}{     \keywd{\{#1\}\xspace} }  \definecolor{argscolor}{HTML}{a3be8c} \DeclareDocumentCommand{\argcontent}{m}{     \ttfamily\bfseries     \textcolor{argscolor}{\xspace\ensuremath{\langle}\textit{#1}\ensuremath{\rangle}\xspace} }  but when I try to implement it like this: \begin{document}    \apicmd{path}\apiopt{shape} \end{document}  this is the result:    Any idea why this happens and how I could correct it?

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


is it ok to put the side nav menu on application for the iOS? Because I can't find it on iOS guideline design.

So, I have about 7 actions users may need in my app, and I have to use text instead of icons because it is a customer requirement.  I can add only 3 actions to my toolbar on iPhone 6. On Android you have the hamburger menu (see image), but I have never seen it in iOS.       So, what is the appropriate concept in iOS to add many actions into a menu?


I have problem again almost like version QGIS 2.14. I did not solve the problem.   I install C:\MinGW and now QGIS grass geoalgorithms don't work? There is 300 geoalgorithms and I have only 148, what is the problem?  Is there a solution?? PC Windows 10 x64.       I need other grass geoalgorithms like v.net and others

Windows 10  QGIS 2.14.3-ESSEN  OSGEO4W install  (current)  64-bit  Processing toolbox.  Grass tools do not work  Neither 6 nor 7. 6 makes sense as I do not see OSGEO4W installing it but 7 tools are not working either.  My Grass folder (7) appears to be C*:\OSGeo4W64\apps\grass\grass-7.0.4*  They are activated (I know they are not in the screenshot). Grass 7 works as a standalone.    Error message:     Missing dependency. This algorithm cannot be run :-(  The specified   GRASS GIS 7 folder does not contain a valid set of GRASS GIS 7   modules. Please, go to the Processing settings dialog, and check that   the GRASS GIS 7 folder is correctly configured   What exactly should go in these four yellow boxes?  Now when I try to manually enter my path to grass 7 I get a new error message (below). No msys folder exists in the latest version of OSGEO4W 64-bit so I cannot set this.  .  This solution () appears to point to a spam link now and not mysys.


I have setup and cron to check if a port is busy or free and if its free then it sends and email and then start golang api service   send mail is working properly but api server is not getting started  following is my crontab file   */2 * * * * /home/ubuntu/sh/projectrun.sh   It runs projectrun.sh file every 2 minute, following is my code in this sh file   #!/bin/bash lsof -i :8080 | grep LISTEN || echo "Not listening" | curl "http://mysiteurl.com/serverlog/?s=cron" lsof -i :8080 | grep LISTEN || echo "Not listening" | tmux new-session -d -s bkapi3_session 'bkapi'   first line is executing properly as I am getting mails regulary but second command is not working, it works if I run this command directly from console like   lsof -i :8080 | grep LISTEN || echo "Not listening" | tmux new-session -d -s bkapi3_session 'bkapi'   Not sure what is the issue and how to resolve it

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


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


I would like to have an AHK script be disabled when I have the Microsoft Visual Studio window activated (basically, when I'm in it). How could I do that?   #IfWinNotActive Model (Debugging) - Microsoft Visual Studio (Administrator) SetCapsLockState, AlwaysOff SetNumLockState, AlwaysOn SetScrollLockState, AlwaysOff F1::Send !{F4} F2::^+Tab F3::^Tab F4::^t F6::^w F7::!Esc F8::#Down CapsLock::Enter ^Esc::#d F9::#1 F10::#2 F11::#3 F12::#4  return   Thanks

I have some autohotkey settings for my joystick that are set to work everywhere.  However, there are two programs in which I don't want the joystick remapped.  How can I modify my script to prevent autohotkey from remapping the joystick in these programs, so that I don't have to manually do it?


I'd like to use an  to separate groups of paragraphs from one-another. The asterism shall appear in a line on its own, like in . Can anybody tell me where I can find an asterism symbol (is there a macro that makes one from the asterisk symbol from the font you're using?) and how to use it as a separator as described above?  I'm using LaTeX with the scrartcl document class.

What are the options that can be considered an alternative to the old  symbol ?  I would like to denote a small break in the flow of the text, I noticed that this days many people like to just add more whitespace than the usual new line; but still, I would like to use a symbol, a more explicit glyph and I don't know if there are more "modern" ways to express this.


I have nearly 150 Panel pages and different template files. I generated lot of blocks using  module to be used in the Panel pages.   I guess this is causing memory issues in both MySQL and Apache configuration. Any solution for this memory issues?  My global memory_limit is 128M. Only after setting 512M in settings.php, my custom Drupal View is generating the output (otherwise, it generated a 502 error).  Is there a way so that I can set memory_limit only for my custom View?

I get this error all the time when I'm doing common admin tasks, such as enabling modules.     PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted   How can I fix this?


I would like to split a single shapefile into multiple shapefiles by using unique values for one attribute/field to select features for each value out into a new feature class.   I found ET Geowizard to do this but it's not free.   In  I found a tool named "SplitLayerByAttributes" but it does not work in ArcMap . (see comments below, this was an old version which has been updated.  The new version can be found at    )  Do you know of any tools or solution to split by attribute in the way described above?

I have a feature class with over 2,000 features, and I need to make them all individual feature classes based on a field.   Is there a way to do this?


I am deploying my code to production and i am getting the below error  Failure Message: "System.LimitException: Too many SOQL queries: 101", Failure Stack Trace:   My trigger  trigger OpportunityTrigger on Opportunity (after delete, after insert, after undelete,  after update, before delete, before insert, before update) {      if(Trigger.isAfter && Trigger.isInsert){         {         EncryptURl.insertOpp(Trigger.new,Trigger.newMap.keySet());         } }   and my trigger class is  public static void insertOpp(Opportunity[] o,Set<id> newMapKeySet) {      list<Opportunity> oppsToUpdate =[select id,Encrypted_URL__c from Opportunity where id  IN :newMapKeySet];     for(Opportunity op:oppsToUpdate){         if(op.id != null){             string oppid=op.id;             Blob dataLead = Blob.valueOf(oppid);             String b64Data = EncodingUtil.base64Encode(dataLead);             string oppURL =Label.PWV_FavoriteURL+'oId='+b64Data;             op.Encrypted_URL__c =oppURL;         }       }     try{     update oppsToUpdate;     }catch(exception e){             system.debug('DMl exception'+e);      }  }   Can i know where i am going wrong ....

I am getting a Too many SOQL queries: 101 error on a trigger when I am trying to deploy another trigger.  I am posting the trigger which is causing the error.  trigger rollupAccountShowings on Account (before insert, before update) {    if (trigger.isinsert) {       for (Account a:Trigger.new){           a.No_of_Viewings__c = 0;        }    } else {      for (account a : [select                   id,                  (select id from pb__Showings__r)                  from account                   where id in:trigger.new LIMIT 1]) {           trigger.newMap.get(a.id).No_of_Viewings__c = a.pb__Showings__r.size();      } }   Can anyone correct me where I have gone wrong and suggest me the changes.  Thanks


What's the difference between $\blacksquare$ and $\Box$ in the end of a proof? I've seen both and I never got the difference.

To end a proof, I often write "as was to be shown" or "q.e.d". Both of these terms make sense to me as a reader. On the other hand, I feel a little strange to put down $\square$ although I  saw it many times here and there. In fact, I learned $\square$ notation here. I wonder if anyone could give me a brief explanation of $\square$ notation in mathematics. Where does it come from? More importantly, how does it logically mean "end" of a proof? Thank you.


In HP & the Order of the Phoenix, Harry chased Bellatrix Lestrange after she murdered Sirius Black. He used cruciatus curse on her but it was not really effective.  As Bellatrix said:     "You need to mean them, Potter! You need to really want to cause   pain... to enjoy it... righteous anger won't hurt me for long... I'll   show you how it is done, shall I? I'll give you a lesson —"   Later when Amycus Carrow spat on Minerva McGonagall, Harry used the curse splendidly.     As Amycus spun around, Harry shouted, "Crucio!"      The Death Eater was lifted off his feet. He writhed through the air   like a drowning man, thrashing and howling in pain, and then, with a   crunch and a shattering of glass, he smashed into the front of a   bookcase and crumpled, insensible, to the floor. "I see what Bellatrix   meant," said Harry, the blood thundering through his brain, "you need   to really mean it."    attributes this to lack of sadistic feeling in Harry.   But still it makes no sense. Harry should have had more desire to cause pain after murder of his godfather but he was only able to knock Bellatrix off her feet. Wikia however also suggests that Bellatrix was probably less affected by the curse due to her lack of conscience and being a sadistic person herself but somehow I don't feel it's quite right.  Only rational explanation that I have been able to give myself is that the war-time environment changed Harry Potter from a young boy he was in HPTOOTP to a grizzled veteran by the time of Battle of Hogwarts & somehow his sense of emotions was also affected by it.   Could it be that Harry liked McGonagall better than Sirius and thus was able to channel his anger better than he did in Ministry skirmish? Is there any better explanation?

OK so the scene where Harry sees Voldemort making Draco tutur Rowel brings a few questions to my mind.      he felt the rage that did not belong to him posses his soul, saw a long room, only light by fire light, and the grate blond Death Eater on the floor,screaming and writhing, and a slighter figure standing over him, wand outstretched, while Harry spoke in a high, cold, merciless voice.   "More, Rowel, or shall we end it and feed you to Nagini? Lord Voldemort is not sure he will forgive you this time...You called me back for this, to tell me Harry Potter has escaped again? Draco, give Rowel another taste of our displeasure... do it, or feel, my wrath yourself!"   A log fell in the fire: flames reared, their light darting across a terrified, pointed white face-   I remember in the Order of the Phoenix Harry tries to do the cruciatus curse on Bellatrix, it doesn't work. She say this is because Harry doesn't mean it, he doesn't want to hurt he enough. If she's right about that (I'm sure she is) I don't see how Draco is managing to make to make Rowel writhe and scream, because it is clear he doesn't want to be doing it.   Also Harry was actually angry at Bellatrix and if his anger at her killing his godfather won't work... well you get my drift.   I know Draco is probably better at magic, but I feel Bellatrix is right, you really have to want them to hurt for it to work.  Next thing, Voldemort's having Draco do it why? Is he doing to upset Lucius, because that and lot of effort to go to, seeing as Voldemort is angry and he'd probably do a better job himself. Or is he trying to train himself a new soldier, I mean the other ones are getting old.


Often times I use methods like this to filter input. Using preg_match( ) as shown, or sometimes using a switch( ) that only acts if a POST/GET variable is one of a specific number of keywords.   if (preg_match("/^[0-9]+$/",$_POST['id_to_clear']))     {     db_query("UPDATE `table` SET `error`=0, `progress`=0 WHERE `id` = {$_POST['id']}");     }   Generally speaking, using a POST/GET variable directly in an SQL query is a huge red flag. But in this case it seems perfectly safe. Is there any way this could go awry? Something I'm not seeing?

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


When I install a new package in Ubuntu (using APT), like this:  sudo apt install binutils  it will install me the /usr/bin/nm utility. But it will also install other files in other locations.   Is there a way to see what files were installed by a specific package and in what locations? (Maybe see the list of files that will be installed before actually installing the package!)  I know that the reverse operation (see the belonging package for a file) can be achieved with the apt-file command.

I have installed the package geoip-bin using the apt-get command:  sudo apt-get install geoip-bin   and I wanted to know the command line command to use this package. But when I try to list the files that the geoip-bin package installs, to try and find the executable file, it's not listed in the dpkg -S output  % dpkg -S geoip-bin geoip-bin: /usr/share/doc/geoip-bin/changelog.Debian.gz geoip-bin: /usr/share/lintian/overrides/geoip-bin geoip-bin: /usr/share/doc/geoip-bin geoip-bin: /usr/share/doc/geoip-bin/copyright   After some research I learnt that this package installs a command/executable /usr/bin/geoiplookup. So at this point, I now know the command, but for future purposes, I would like to know how to find out what files a package installs.  Doing a "reverse" file lookup with, dpkg -S shows that this file came from the geo-ip bin package.  % dpkg -S /usr/bin/geoiplookup geoip-bin: /usr/bin/geoiplookup   I wondered if dpkg -S is not showing the file in the output because /usr/bin/geoiplookup is provided by one of the dependencies of geoip-bin.  After querying the dependencies with e.g. apt-cache show geoip-bin and then recursively querying the files and sub-dependencies, I still was not able to list the files provided by the package geoip-bin. How can I generate a full listing of the files installed by a package?


I vaguely remember reading this book in which there was an elitist group trying to gain immortality by uploading themselves into a computer(simulation). Each created their own world. Our hero somehow ends up in some of these worlds. Most are against him - but one of the elitists (I think with an exotic 'Hawaiian' ring to his name) modelled a nature-world (or jungle... insects) and tried to help the hero.  Tried googling, but "fiction" combined with "upload mind" or "virtual reality" gives too broad results.

There is this story I read years ago about a world where the wealthy created VR worlds for themselves to live in. These virtual worlds were extremely realistic and the 'masters' of those worlds could essentially live like gods in those worlds. 'Of course' at one point they figure out how to 'upload' their consciousnesses into these virtual worlds leaving behind their physical bodies. Each has his own world and is the only human being in it and some of them do not decide to live a god-like existence whilst others do.   Now the protagonist isn't wealthy and he has this entire story of his own I forgot about entirely (shame on me), but I have been lately 'quoting' concepts from the book, so I would like to properly attribute them (plus I fear I am attributing some things to this story which weren't from this one, so I would love to check).


Does a face down creature get the bonus from  ?

Reading FAQs concerning  and morph cards, a face down morph creature will get the +2/+2 bonus from .  What I don't understand is why. Since the face down creature gets +2/+2 form the glyphs, that implies the creature has no abilities. Yet the creature can be turned face up by its morph cost. If that is not an ability, what is it exactly?


I don't know how to prove or disprove convergence of the following. Which convergence test do I need to use?  $$\sum_{n=1}^{\infty} \frac{1}{n\ln^2n}$$

I am attempting to prove if the below expression converges or diverges:  $$\sum_{n=2}^{\infty} \frac{1}{n (\ln n)^2}$$  I decided to try using the . So then, I set $f(n) = \frac{1}{n (\ln n)^2}$ and $g(n) = \frac{1}{n}$ and did the following:  $$ \lim_{n \to \infty} \frac{f'(n)}{g'(n)} =  \lim_{n \to \infty} \frac{-\frac{\ln(n) + 2}{n^2 (\ln n)^3}}{-\frac{1}{n^2}} =  \lim_{n \to \infty} \frac{\ln(n) + 2}{n^2 (\ln n)^3} \cdot n^2 =  \lim_{n \to \infty} \frac{1}{(\ln n)^2} + \frac{2}{(\ln n)^3} = 0 $$  I know that $\sum \frac{1}{n}$ diverges due to properties of harmonic series, and so concluded that my first expression $\frac{1}{n (\ln n)^2}$ also must diverge.  However, according to , and as suggested by , the expression actually converges.  What did I do wrong?


I am trying to save a float value using hibernate into MS SQL Server. the value is 2.4 and when it get saved to the database, it becomes like this.  2.40000009536743  Here is the column definition in my entity class for this field.  @Column(name = "fTotalChipWeight")     private float totalChipWeight;   Could anybody advise me why this is happening this way  This is how the database column is defined

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I have a long list of folders, inside every folder I have the file "log.dat". I wanted to read the value of a specific line inside this file.  I saved the folders names in a file "All.txt", in the parent folder, then I ran this code:  #!/bin/bash in=/a/b/c   #path to the file All.txt   for i in $(cat $in/all.txt); do sed -n '/price/p' ${in}/${i}/log.dat  done   This code was able to read almost all the files but for some reason, which I can't figure it out!! It was output the following error message:  /log.dat: No such file or directory #(then the path to this file)   If I run the command sed -n '/price/p' log.dat inside the folder that output the error message. I get an answer!  PS: The content of the file ALL.txt ( which is created by running the command ls>All.txt in the parent folder) is as follow:  STR-548-021-01 STR-548-021-02 STR-548-022-01 STR-548-022-02 STR-548-023-01 STR-548-023-02 . . . . .   I tried to use the command "awk" instead of "sed" as follow:  awk '{ price }' ${in}/${i}/log.dat   And I got the same error message.  Can these carriage returns happen in Linux as an output for the command ls>All.txt?

I have a testA.txt with contents as shown below  [jiewmeng@JM textFiles]$ cat testA.txt  The quick brown fox jumped over the lazy  dog.   paste normally works  [jiewmeng@JM textFiles]$ paste testA.txt  The quick brown fox jumped over the lazy  dog.   But what happened when I used serial?   [jiewmeng@JM textFiles]$ paste -s testA.txt  The quicdog.lazy er  [jiewmeng@JM textFiles]$ paste -s -d- testA.txt  -dog.lazy er   I was expecting output similar to   [jiewmeng@JM tmp]$ echo -en "The quick\nbrown fox\njumped over\nthe lazy\ndog" | paste -s - The quick   brown fox   jumped over the lazy    dog   Opening the file in a test editor seems to work fine, just like cat, or paste did


I have the following implicit conversion operator:  public static implicit operator InputArgument<T>(T value) {    return new InputArgument<T>(value); }   The following is code in an ASP.NET MVC controller:  This works:  InputArgument<string> input = "Something";   This works:  InputArgument<Controller> input = this;   This works:  InputArgument<IPrincipal> input = new InputArgument<IPrincipal>(User);   But this doesn't work:  InputArgument<IPrincipal> input = User;   The last example gives the error:   > Cannot implicitly convert type > 'System.Security.Principal.IPrincipal' to > 'Engine.InputArgument<System.Security.Principal.IPrincipal>'. An > explicit conversion exists (are you missing a cast?)   What could be the reason that this implicit conversion does not work for IPrincipal?

I have a generic class that I'm trying to implement implicit type casting for.  While it mostly works, it won't work for interface casting.  Upon further investigation, I found that there is a compiler error: "User-defined conversion from interface" that applies.  While I understand that this should be enforced in some cases, what I'm trying to do does seem like a legitimate case.  Here's an example:  public class Foo<T> where T : IBar {     private readonly T instance;      public Foo(T instance)     {         this.instance = instance;     }     public T Instance     {         get { return instance; }     }     public static implicit operator Foo<T>(T instance)     {         return new Foo<T>(instance);     } }   Code to use it:  var concreteReferenceToBar = new ConcreteBar(); IBar intefaceReferenceToBar = concreteReferenceToBar; Foo<ConcreteBar> concreteFooFromConcreteBar = concreteReferenceToBar; Foo<IBar> fooFromConcreteBar = concreteReferenceToBar; Foo<IBar> fooFromInterfaceBar = intefaceReferenceToBar; // doesn't work   Does anyone know a workaround, or can anyone explain in a satisfactory way why I shuouldn't be able to cast interfaceReferenceToBar implicitly to Foo<IBar>, since in my case it is not being converted, but only contained within Foo?  EDIT: It looks like covariance might offer salvation.  Let's hope the C# 4.0 specification allows for implicit casting of interface types using covariance.


I am creating a script. I want this script perform next task: Log in as a root user. (I am trying to use one line) How to create script which will enter password automatically?   #echo "Hello Admin" #su root@admin       I just want to bash script and don't enter password. Why does it ask me to enter password?

I want to scp a file to a remote host, and from there, run a command on the file, and exit the remote session. If I write a usual script, call scp and then ssh, I am prompted to enter two passwords. Is there a way to copy, ssh, and run a command on a remote machine with one password?   Also how to write scripts which need to interact with user to enter passwords?  I do not want to use "read" as it's not safe. I do not want to use passwordless ssh, since my private key file may be compromised, which is even worse. I read something about "expect" but not sure if it's the right tool.


When I want to run this command sudo apt update I get this error: E: Failed to fetch http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu/dists/focal/InRelease  403  Forbidden [IP: 91.189.95.83 80] E: The repository 'http://ppa.launchpad.net/hanipouspilot/rtlwifi/ubuntu focal InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


What if I wrote 2 cheques for 151.53, therefore a total of 303.06$ will be due. and I have 303.05$ in the bank? Will one cheque bounce?  Can I just change the decimal of one cheque to be 151.52 and put my intials and the other to be 151.53? Or will that be deemed suspicious and it will be voided?   I'm asking this because, If I do rewrite this cheque I need to have a signature from my mentor, which he is out of town and this cheque is due soon.

I think I know the answer to this, but I'm not sure, and it's a good question, so I'll ask:  What is the accepted/proper way to correct a mistake made on a check?  For instance, I imagine that in any given January, some people accidentally date a check in the previous year.  Is there a way to correct such a mistake, or must a check be voided (and wasted)?  Pointers to definitive information (U.S., Canada, and elsewhere) are helpful.


Demonform is quite inhuman. Fluff-wise, it would not be unreasonable to be, for example, a collection of gleaming steel limbs orbiting a dazzling diamond core, with a glowing, radar-encrusted spun-copper head hovering above.  But I am unsure as to what extent this frees demons from human needs.  Do they need to eat, drink, or sleep?  Can they catch diseases? Or be poisoned?  Obviously, under most circumstances a un-covered demon is going to be under a lot of heat from the God Machine long before starvation or even dying of thirst is a real issue, but I can imagine scenarios where a burned demon might survive days — enough time that thirst could become a real issue. Would it?

When a Demon is in Demonic Form, does he gain any intrinsic protection against mundane concerns like breathing or falling unconscious? In particular, when in Demonic Form do/are demons:  need to breath? immune to poisons? fall unconscious? (ie do they stay conscious on full lethal?) suffer from wound penalties for having damage in last 3 boxes? need to consume food/water? need to sleep?  The last two are only really a concern to demons who have burnt their last cover. However this can happen in play, and is pretty significant for any burnt NPCs. Is seems odd that a swarm of glass beetles clinging together into the shape of a man might have any issues with being poisoned. But I can't find it clearly stated, whereas it is clearly stated in Werewolf (the Forsaken).


A few months ago my company was purchased by a large corporation. We recently switched our network over to the large corporate network which has more restrictions requirements. One of these is the requirement to use a proxy server for Internet traffic. However, some of our internal servers are not recognized by the corporate DNS, so we need to provide the fully qualified domain name.  For W7, we make changes to the Internet Properties for IE8 and Chrome to include our domain name as an exception to the proxy server (e.g., *.foobar.com). The problem is that a group policy that does not include our domain name is continually pushed out to my systems throughout the day. This requires me to make the appropriate changes to the Internet Properties several times a day in order to access our internal servers.  Is there a way that I can prevent the group policy from being pushed to my systems or detect when the group policy is pushed and override it? I am an administrator on all of my systems. I do have Firefox installed which is not subject to the same group policy push, but I need to have IE8 and Chrome working.

I am using a number of laptops which are connected to a domain which has Power Options put in place as part of the Group Policy. Is there anyway (registry, etc.) to override these settings?  Primarily, I want to change what the power and sleep buttons do, but to have control over the lid is also preferable.   The laptops are running Windows 7 Enterprise 64-bit.


Before the panel was visible how many votes I used pure per day  near avatar.  Tell me where it went and how it can cause. Votes may limit removed? Previously, it was 40.

Since the new top bar has been rolled out - a number of different people, established and new users alike, have asked questions on where a specific link has disappeared to with the new top bar design. Where has the link to <X> gone?


public static void main(String[] args) throws IOException{      String[] token = null;     int i, n = 0;     int lineCounter = 0;      Scanner file1 = new Scanner(new File(args[0]));      int[] lineNumber = new int[lineCounter];      for(i=0; i<lineCounter; i++) {         lineNumber[i] = n++;     }      String[] word = new String[lineCounter];     file1 = new Scanner(new File(args[0]));      while(file1.hasNextLine()) {         i++;         token[i] = file1.nextLine();   I keep trying to run the code, but it keeps giving me a null pointer exception. Any suggestions to fix this?  The token is referencing random words in a file called file1.

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?


This is kind of an odd question and I'm not sure how to word it well, but I'll try to give as much detail as possible.  So recently I've gotten interested in Linux and installed Ubuntu on my PC alongside  Windows 10. It's great and all but there's one problem — I don't have internet access. I use a wifi adapter and I'm guessing I'm missing drivers or something. I've found a possible solution  as it seems he was in the same situation I was, the problem is I don't have an ethernet cable or anything, so there's no way for me to download this. But I do have internet on Win10! So my question is, how do I download the drivers on Windows and transfer it to Linux? Can I just download it on to any drive on windows then open it up on linux?

I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?


When and why should we use '===' in javascript or jquery. Is it recommended to test string using === and if yes why.  I have a code where i am checking a condition on the string like. if(a == "some-thing") is this right or should i use '==='

I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==?


I just figured that the reference list are not compiled unless I directly cite them on latex file. Is this the norms?

Is there any way to have BibTeX or biblatex insert a bibliography without having citations in the body of the document itself? Maybe a way to hide the in-text citations, so that BibTeX still sees them and includes them in the bibliography, but does not print them in the body?


A little bit of background first: Over on , we've been nuking users that look very spammy, before they've had a chance to post anything. It began with posts like , which advertised watching things online and stuff.  So then we (I'm not a mod there, I just pinged them with links) started nuking users with spammy profiles before they had a chance to post. Like . They have keywords that might show up in a Google search and a link to their site.  Then the line gets a bit blurrier with profiles like . The entire profile looks like an ad for the product, and they have no positive participation. The profile is still something I'd flag on the spot as spam.  ...but now, after a  (link will only work for mods), it turns out that apparently we (me, the Puzzling mods, and apparently ) are in the minority here. That most mods will not nuke a user based on that, and will wait for them to actually post spam, the concern being that a legit user will be thrown under the bus - with  being an example of someone who might suffer from being nuked unfairly. (My opinion is that if they look like a spammer, they should expect to be treated like a spammer, and that if they want to be a positive participant they should create a less suspicious account.)  So... to resolve this (the conversation took over two hours), is there any official policy or anything on this?    Note: I'm aware of the . This is different, specifically as 1.) This is about the rules for nuking an account, and 2.) This has caused a lot of debate in the past couple hours and I feel it's time for a new discussion on this.

Are there any rules concerning what I can put in my profile?


If in the context of a technical document in prose, "LHS" is used as a shorthand for "left-hand-side" and "RHS" is used as a shorthand for "right-hand-side" should these abbreviations be preceded by "a" or "an"?  For example, should this:  In other words, an LHS look-up is done when a variable appears on the left-hand side of an assignment operation, and an RHS look-up is done when a variable appears on the right-hand side of an assignment operation.  ...be changed to:  In other words, a LHS look-up is done when a variable appears on the left-hand side of an assignment operation, and a RHS look-up is done when a variable appears on the right-hand side of an assignment operation.

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


This is question from abstract algebra. Question : If $p$ is irreducible in UFD $D$, show that $p$ is also irreducible in $D[x]$. But, I think this question is quite strange. I think every single element in $D$ is irreducible in $D[x]$. Every element in $D$ cannot be factored into the product of two non-constant polynomials. Because it could be only factored by constants, not polynomials... Something I misunderstood?

It is a known fact that if $R$ is a UFD, then $R[X_1,X_2,\dots]$ is also a UFD, but there is a subtlety that is making me uncomfortable.  The standard approach essentially goes something along the lines of...let $f$ be a polynomial, so it only involves finitely many variables, say up to $X_1,\dots,X_n$. Then since $R[X_1,\dots,X_n]$ is a UFD, $f$ has a factorization into irreducibles. Then $f$ cannot have a factorization involving indeterminates $X_N$ not in $R[X_1,\dots,X_n]$. If it did, then $f$ would have two factorizations in the UFD $R[X_1,\dots,X_n,\dots, X_N]$, a contradiction.  This seems to assume that the prime factorization in $R[X_1,\dots,X_n]$ is still a prime factorization in $R[X_1,\dots,X_n,\dots,X_N]$. But how can you see that irreducibles in $R[X_1,\dots,X_n]$ are still irreducibles in $R[X_1,\dots,X_m]$ for $m>n$? This does not seem obvious.  Let $R_k=R[X_1,\dots,X_k]$. The explanantion I found is this: Suppose $p\in R[X_1,\dots,X_n]$ is irreducible in $R_n$. Suppose $p=ab$ for $a,b\in R_m$. Evaluating $X_1,\dots,X_n$ at $1$, you get  $$ \bar{p}=\overline{ab}\in R[X_{n+1},\dots,X_m] $$ But $\bar{p}\in R$, which implies that $a$ and $b$ do not involve any variables $X_{n+1},\dots,X_m$. So $a,b\in R_n$, and thus one is a unit, hence a unit in $R_m$.   The part I don't follow is how evaluation at $1$, implies $a$ and $b$ do not have indeterminates other than $X_1,\dots,X_n$. Isn't it possible that some of the higher indexed indeterminates disappear when you evaluate? Suppose for instance $p\in R_1$, and $a\in R_2$ is $a=-X_1X_2+X_2$. Then evaluting at $1$ gives $\bar{a}=0$ so we may not get the desired contradiction since $\overline{ab}=0\in R$?


Given a sequence $(a_n)_{n \geq 1}$ in $\mathbb{R}$, and given that $$ a_1 > 0 \ \ \ \ \text{and} \ \ \ \ \ a_{n+1} = \sqrt{a_n + 6}\ \ \ (n\geq1)$$ Prove that $(a_n)_{n \geq 1}$ converges.  My thoughts   for $a_1 > 3$, we know that $3<a_{n+1} < a_n \ \ (n\in \mathbb{N})$ (1) for $a_1 < 3$, we know that $0<a_{n} < a_{n+1}<3 \ \ (n\in \mathbb{N})$ (2)   Now I now how to prove convergence. However, I'm having difficulty proving my two thoughts about the situation where $a_1 >3$ and $a_1 < 3$.   Any help on how I can show this correctly?

$\{a_n\}$ sequence $a_1=\sqrt{6}$ for $n \geq 1$ and $a_{n+1}=\sqrt{6+a_n}$ show that it convergence and as well find $\lim \limits_{n \to \infty} a_n$  In order to show that that sequence convergence I need to show that :  $$\lim_{n \to \infty} a_n= L$$  While $L$ is finite.  Using the calculator. I assume that L=3 because :  $$\sqrt{6+\sqrt{6+\sqrt{6+\sqrt{6........}}}}=2.999 \cong  3$$  I really don't think that this method is good enough to established that $\lim \limits_{n \to \infty} a_n= 3$ since it based on intuition.  I'll be glad to hear any ideas for an established method to show this.?  Any help will be appreciated.


We got here because the people who wrote the Norse legends didn't take space aliens into account, so the Marvel writers had make up god/alien interactions themselves.  There are indications in Thor: The Dark World that the Nine Realms are all in the same universe, so Midgard is just Earth in that case. (We don't know why Yggdrasil makes all those other worlds UN-special.)  Is there any published material for the comic Marvel universe (i.e. 616) whether Midgard is just Earth or the entire dimension Earth is in?  (Yes, I know based on other posts here that it's ambiguous whether the Norse realms are alternate sub-dimensions or planets in the non-Cinematic Marvel Universe.)

Marvel Universe describes  as:     a small planetary body that serves as home to the Norse gods such as Thor, and their ruler, Odin. It exists in another dimensional plane and is about the size of the United States.   There is currently no completed entry for Midgard, but the Asgard article addresses it briefly.     Another of these worlds that is in a different dimensional plane is the world of Midgard, or Earth.   and      Midgard, or “Middle Realm”, is home to humans and does not seem to be affected by the motion of the other worlds of Asgard. Jotunheim is the world of the Giants and is also on its own dimensional plane hidden from Asgard or Earth’s. The only thing that prevents passage between Midgard and Jotunheim is Jormungand, the Midgard Serpent.   The term "dimensional plane" mentioned evokes the concept of , a concept .  What defines Midgard and its boundaries? Is Midgard just the planet Earth? Our entire Solar System? The entire Milky Way? An alternate universe?


Consider the following few classes and interfaces :   class Program {     interface I { void foo(); }      abstract class A : I     {         public virtual void foo() { Console.WriteLine("A"); }     }      class B : A     {         public new virtual void foo() { Console.WriteLine("B"); }     }      class C : B     {         public override void foo() { Console.WriteLine("C"); }     }      static void Main(string[] args)     {         var c = new C();         (c as I).foo();         (c as A).foo();         (c as B).foo();     } }   It outputs :      A A C   where I would (naively) expect "C C C"  if indeed I replace "new virtual" by "override" in class B, that is what I get.   In the MSIL, I get   .method public hidebysig newslot virtual instance void foo () cil managed    instead of   method public hidebysig virtual instance void foo () cil managed    What does "new virtual" on a method?   Ho can you explain the behavior of my program?

What are differences between declaring a method in a base type "virtual" and then overriding it in a child type using the "override" keyword as opposed to simply using the "new" keyword when declaring the matching method in the child type?


I want to select the div nameMachine using this.but I can't find how to select it:   I can get this element with this code :  $(".switch").each(function(){    console.log(this);    $(this).css({       'background-color': 'white',       'border-style': 'solid',       'border-color': 'inherit',       'border-width': '3px',    }); });

I have a layout similar to this:

   and would like to use a jQuery selector to select the child img inside the div on click.  To get the div, I've got this selector:  $(this)   How can I get the child img using a selector?


I am a beginner and practicing arrays in java by a game of tic tac toe. However I seem to face an error when I try to compare an array element and a string (user generated by Scanner). Here is a separate program describing my problem:  import java.util.Scanner;  public class Test {     public static void main(String[] args) {         Scanner s = new Scanner(System.in);         String input = s.nextLine();          String[] nums = {"1","2","3","4","5"};          for (int i = 0; i < nums.length; i++) {             System.out.println(input == nums[i]);         }          s.close();     } }   Output:  false false false false false   But when I manually set the String in place of input, it works correctly.  import java.util.Scanner;  public class Test {     public static void main(String[] args) {         Scanner s = new Scanner(System.in);         String input = s.nextLine();          String[] nums = {"1","2","3","4","5"};          for (int i = 0; i < nums.length; i++) {             System.out.println("4" == nums[i]);         }          s.close();     } }   Output:  false false false true false   I'm stuck. Any help will be appreciated.

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'm trying to include a video into my presentation using this code:  \documentclass[xcolor={dvipsnames}]{beamer} \usetheme{CambridgeUS} \usepackage{multimedia}  \begin{frame} \frametitle{Test title} \framesubtitle{Test subtitle} \movie[showcontrols,width=\linewidth]{}{c.avi} \end{frame}  \end{document}   But this wouldn't display the video, how do I to deal with this please?  Thanks a lot!

I'm aware that it's possible to embed some kinds of videos and animations in LaTeX files (using the beamer or prosper classes) but I couldn't locate good documentation on this. My web searches returned a list of scattered forum questions and answers.   Could anybody give a link to some help or documentation page that systematically deals with the various ways of embedding videos and animations, the file types that work, etc.?


I started downloading El Capitan and left my computer for a while, but it had gone into the sleep mode and the download was paused. But when I tried to resume it would not start even after restarting my computer.

I started to download the El Capitan upgrade, but then I shut down my computer. The day after I wanted to continue the download but in App Store it shows "Waiting..." and doesn't do anything. Also when I go to the updates section, it shows the button "Download" but it's inactive. Maybe someone can help me? I tried to find the download file in some directory to delete it and start over but I couldn't find it.


I'm accessing a directory from my cross-platform c++ code. I know that this directory has three sub directories, but their names are randomly generated.  What I want is a list with the names of these directories (not files!) as type std::string. I would very much like to avoid using libraries, such as boost or qt, and keep to standard c++, if possible.

I was wondering if there's an easy way in C++ to read a number of file names from a folder containing many files. They are all bitmaps if anyone is wondering.  I don't know much about windows programming so I was hoping it can be done using simple C++ methods.


I would like to install a lot of apps, and I has been saving all commands to install each app, here is a sample:  ##Global  sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886 0DF731E45CE24F27EEEB1450EFDC8610341D9410 echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - sudo apt-get install apt-transport-https echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable sudo add-apt-repository ppa:otto-kesselgulasch/gimp  sudo apt-get update; sudo apt-get -y install indicator-multiload spotify-client sublime-text qbittorrent gimp virtualenv rar unrar postgresql pgadmin3 python-pip python-dev libmysqlclient-dev p7zip-full  ##Kaggle  pip install kaggle chmod 600 /home/username/.kaggle/kaggle.json  ##Jdownloader  wget http://installer.jdownloader.org/JD2SilentSetup_x64.sh chmod +x JD2SilentSetup*.sh ./JD2SilentSetup*.sh  ##Teamviewer  sudo wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb sudo dpkg -i --force-depends teamviewer_amd64.deb sudo apt-get install -f sudo teamviewer --daemon start teamviewer   How can I run all lines at once using scripting on bash command line? Thanks!

In Windows I can write a file containing commands for cmd (usually .cmd or .bat files).  When I click on those files it will open cmd.exe and run them commands the file contains.  How would I do this in Ubuntu?         I'm sure this is a duplicate, but I can't find my answer. Its similar to these questions, but they don't answer the question:


A is immersed in water, buoyancy must act on A; B is at the bottom of the container, there is no water between B and the container, that is to say, the bottom of B is not in contact with water, so will buoyancy act on B? Some people say buoyancy works on B, but I don't think so. B is like a suction hook. Water presses B on the bottom of the container. Buoyancy does not act on B. I'm not sure I'm absolutely right.

Let's say a 10N cube (in air, on Earth) rests flat on a scale at the bottom of a tank of water, and the scale reads 8N, so there is 2N of buoyant force on the cube.  How does the buoyant force manifest itself on the cube?  I assume the force is normal to the surface of the scale, but if there isn't any water under the cube, how does the water push up on the cube?


A very simple question. Does it have anything to do with performance? Something else?  System.out.println('c'); System.out.println("c");   Which, why?  System.out.println("Letter: " + "c"); System.out.println("Letter: " + 'c');   Which, why?

Is there a difference between single and double quotes in Java?


In my subs, I usually perform several forms of validation before proceeding with the sub. Is it a bad habit to exit the sub? For example:  Private Sub mySub()      if Not Validated() then         exit sub     end if     'do stuff End sub   Would it be better to enclose the entire body in an If-Then statement?   private sub mySub()     if validated then        'do stuff      end if end sub

Are there good reasons why it's a better practice to have only one return statement in a function?   Or is it okay to return from a function as soon as it is logically correct to do so, meaning there may be many return statements in the function?


I take exposure-bracketed photos on the Sony NEX-5R and exposure fuse them in Photomatix.  I've found that I've had to use exposure bracketing for low-light photos, to capture the shadows without blowing the highlights.  Is that a rough guideline on how many photos I should take, and how far apart in EV should they be? I currently take three photos, at 0, +2 and -2 EV, except in low-light, when I might take 0, +1.3 or 1.7, and +3 EV. Are these good settings, or is there no rule of thumb for this?

I started experimenting with the Custom Functions (C1,C2,C3) on my Canon 7D and I decided a useful one to have may be setting it up for exposure bracketing. So it's a quick switch if I ever need it, as opposed to going through the menu to set it up.  I realize the settings would vastly depend on the situation, but do you have any suggestions for some good all round settings to program in as a starting point?    Examples: 1 stop vs 1 1/3 vs 2 stop brackets / ISO choices / Metering mode / shooting mode and so on.


I have some functions that don't belong to any class. So right now, they're defined in my program.cpp. Specifically, a simple  std::string to_string(double const & value){     std::stringstream ss;     ss << value;     return ss.str(); }   I can use them in my classes when I declare std::string to_string(double const &);. But I can't get that to work with templates, i.e. with  template <typename T> std::string to_string(T const & value){     std::stringstream ss;     ss << value;     return ss.str(); }   In whatever way I declare it, I always end up with "undefined reference to" errors. Any way to do that? The way c++ forces bookkeeping on you makes me sad :(

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


If I have this little function:  <script type="text/javascript">   function printFloat(){       var myFloatNumber1 = document.getElementById('floatNumber1');       var myFloatNumber2 = document.getElementById('floatNumber2');       alert(parseFloat(myFloatNumber1.value) + parseFloat(myFloatNumber2.value))  }  </script>  <input type="text" id="floatNumber1"></input> <input type="text" id="floatNumber2"></input>  <input type="button" onclick="printFloat()"/>   in field 1 I enter: 221.58 in field 2 I enter: 2497.74  I expect the sum of 2 numbers in the input fields to be a 2 number digit: 2719.32 But the result is a incorrect number... : 2719.3199999999997  a round would do the job, but I just don't get why the code does that on this number... On other number combinations, the sum is correct...

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Good day to everyone!  I should like to apologize in advance for this sort of question -- however, I am extremely pressed for time and am unable to do my own research and experimentation.  I am new to LaTeX, but I have decided to write my seminal paper using it because I am positively sick and tired of various office solutions.  I need to create a figure counter for \documentclass{article} that would work like this:  Figure [chapternum].[imagenuminchapter]: [caption]   So for example, the second figure in the 3rd chapter would have the caption:  Figure 3.2: Some caption   The first image in the 4th chapter would be:  Figure 4.1: Some other caption   And so on.  Thank you all in advance, and again, I am terribly sorry for this "please write it for me" sort of question, I do hope you will understand.

I would like to achieve book like figure numbering for my article class document. MWE:  \documentclass[11pt,a4paper]{article} \usepackage{graphicx}  % optionally - this creates: Figure 1.1 ... Figure 2.2 %\renewcommand{\thefigure}{\arabic{section}.\arabic{figure}}  \begin{document}  \section{first section}  \begin{figure}[h]   \centering     \includegraphics[width=\textwidth]{1.png}     \caption{figure 1.1} % should be 1.1 \end{figure}  \section{second section}  \begin{figure}[h]   \centering     \includegraphics[width=\textwidth]{1.png}     \caption{figure 2.1} % should be 2.1 - actually is 2 or 2.2 with optional code \end{figure}  \end{document}   I do not want to reset the counter manually on each section.


My code:  import java.util.*;  public class VotingMachine {     private int WuDI;     private int HonST;     private int HawLB;     private int JanCS;     private int HanGU;     private int PanWG;      public VotingMachine() { WuDI = 0; HonST = 0; HawLB = 0; JanCS = 0;         HanGU = 0; PanWG = 0; }     public VotingMachine(int WuDI, int HonST, int HawLB, int JanCS, int HanGU, int PanWG) {         this.WuDI = WuDI;         this.HonST = HonST;         this.HawLB = HawLB;         this.JanCS = JanCS;         this.HanGU = HanGU;         this.PanWG = PanWG;     }     public void showVote(){         System.out.println("WuDI = " + WuDI + "vote(s)");         System.out.println("HonST = " + HonST + "vote(s)");         System.out.println("HawLB = " + HawLB + "vote(s)");         System.out.println("JanCS = " + JanCS + "vote(s)");         System.out.println("HanGU = " + HanGU + "vote(s)");         System.out.println("PanWG = " + PanWG + "vote(s)");     }     public void clear() { WuDI = 0; HonST = 0; HawLB = 0; JanCS = 0; HanGU = 0; PanWG = 0; }     public void voteWuDI() { WuDI+=1; }     public void voteHonST() { HonST+=1; }     public void voteHawLB() { HawLB+=1; }     public void voteJanCS() { JanCS+=1; }     public void voteHanGU() { HanGU+=1; }     public void votePanWG() { PanWG+=1; }      public static void main(String[] args) {         Scanner in = new Scanner(System.in);         VotingMachine v1 = new VotingMachine();         v1.clear();          for(;;){             System.out.print("Cast your vote by entering the candidate's name: ");             String name = in.next();             if(name == "WuDI")                 v1.voteWuDI();             else if(name == "HonST")                 v1.voteHonST();             else if(name == "HawLB")                 v1.voteHawLB();             else if(name == "JanCS")                 v1.voteJanCS();             else if(name == "HanGU")                 v1.voteHanGU();             else if(name == "PanWG")                 v1.votePanWG();             else System.err.println("The name your entered is not exist.");              System.out.print("Do you want to continue to vote? (Y/N): ");             char ans = in.next().charAt(0);             if(ans == 'N' || ans == 'n'){                 System.out.println("The result of the election is: ");                 v1.showVote();                 System.out.println("Thank you for your vote!");                 System.exit(0);}             else continue;         }      }  }   My code seems ok, the compiler didn't gave me any error message, But I keep getting this:  Cast your vote by entering the candidate's name: WuDI Do you want to continue to vote? (Y/N): The name your entered is not exist. N The result of the election is:  WuDI = 0vote(s) HonST = 0vote(s) HawLB = 0vote(s) JanCS = 0vote(s) HanGU = 0vote(s) PanWG = 0vote(s) Thank you for your vote!   I keep getting the err message and the vote wouldn't accumulate! I really couldn't figure out where I do wrong! Please help me, thank you!

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?


Hey I have tried to use a Type as Parameter and using typeof(Class) to get the type.  My problem is that i cant use the Type in a Task like this:  CreditorList = new ObservableCollection<DataModel>();   Is this possible??  Code for Reference:  private void Dg_Loaded(object sender, RoutedEventArgs e)         {             CreateList(typeof(CreditorClient));         }      async private void CreateList(Type DataModel)         {             CreditorList = new ObservableCollection<DataModel>();         }   Error:     Cannot implicitly convert type '...OberservableCollection' to '...DataModel.CreditorClient'

The title is kind of obscure. What I want to know is if this is possible:  string typeName = <read type name from somwhere>; Type myType = Type.GetType(typeName);  MyGenericClass<myType> myGenericClass = new MyGenericClass<myType>();   Obviously, MyGenericClass is described as:  public class MyGenericClass<T>   Right now, the compiler complains that 'The type or namespace 'myType' could not be found." There has got to be a way to do this.


Set $S$ be the set of all real number except -1. Define $*$ on $S$ by  $$a*b=a+b+ab$$  a) Show that $*$ gives a binary operation on $S$.  Answer from my lecturer was;  Suppose that $a*b=a+b+ab=-1$. Then we obtain that $a=-1$ or $b=-1$. Therefore, $S$ is closed under *.  I not really clear how $a$ or $b$ be -1 since it is not belong to $S$ and how it be close? I need an explanation. Thanks in advanced.

Let $k$ be any nonzero real number and let $S$ be all real numbers except ${-1\over k}$. Let $a,b \in S$. Define * on S by $a*b=a+b+kab$. Prove that $S$ is closed under *.  All I can think to do is set $a*b$ equal to ${-1\over k}$, but I don't know where to go from there. Is that the extent of the proof?


Let's have a look at the followings:  radu@Radu:~$ mkdir test radu@Radu:~$ cd test radu@Radu:~/test$ rmdir ~/test radu@Radu:~/test$ man ls man: can't change directory to '': No such file or directory  Normally, I would say that the last line from the previous output from my terminal is an error. But how can I understand it? And why does this appear only in the case of man command (as far as I know; even pwd or ls does not have any problem)?  Furthermore, let's see again:  radu@Radu:~/test$ man ls man: can't change directory to '': No such file or directory radu@Radu:~/test$ echo $? 0  What? It was a success (see the output of man man |& grep -A 1 '^EXIT STATUS$')?  Another version of man  When attempted with another version of man the same thing works.  $ mkdir mantst $ cd mantst/ $ man ls            <--- works $ rmdir ../mantst/ $ man ls            <--- works $ man --version man 2.6.3

On my server I have a directory structure looking something like this:  /myproject/code   I normally have an ssh connection to the server and 'stand' in that directory:  root@machine:/myproject/code#   When I deploy a new version of my code, the code directory is removed so I'm left with:  root@machine:/myproject/code# ./run -bash: ./run: No such file or directory   And the only solution I've found is to cd out and back in:  root@machine:/myproject/code# cd ../code root@machine:/myproject/code# ./run Running...   Can I avoid this? It's a somewhat strange behavior. If you have a nice explanation why this happens I would appreciate it.


I have recently bought an HP laptop (HP Pavilion Touchsmart Sleekbook 15), pre-installed with Windows 8. I do like windows 8, but I wish to also have the functionality of ubuntu on my laptop.  I do not like the look and risks of GRUB, as I care for Windows 8 more than Ubuntu (Cannot replace Windows), so I need to use Windows Boot Manager of the metro UI. (Which I also like the look of more).  I know my computer has Windows installed in UEFI mode, but I am also not big on complicated steps and heavily modifying my laptop. I have looked for multiple solutions to this problem, but one is just windows boot manager in BIOS mode, another is using Grub in EFI mode.  I definitely know I can disable secure and fast boot on my computer, and I can manually partition anything I want. I do not know much about linux either, so I need help on a simple, reliable way to dual-boot ubuntu and windows 8 on my laptop in EFI mode on Windows boot Manager. I have a live flash drive for ubuntu already, and am ready to install anything, but I am reluctant because I cannot afford another laptop.  Currently, I have Ubuntu 12.04.3 on my flash, but I can change it to whatever needed at will.  Can anyone help me do this on my laptop, or should I just give up right now? I am sick of trying to find these answers but to no solution.  All I need is a solution to   Pre-installed Windows 8 UEFI Windows Boot Manager Simple, reliable way to do this.   Thank you for all help that you can give me, -Ben  Note: This is not the same question as () at all. Here I am asking how you would go around installing ubuntu on pre-installed Windows 8 as I have NOT  installed anything yet. In the "Answered question" the asker is asking about Wubi on windows 8 preinstalled, AFTER he tried installing it. Please read both questions before flagging this down.

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'm having problems with my desktop computer.  It's 5 years old already, but still works well even with the latest games so I'd really like to keep it as long as possible.  Specs listed below:   motherboard: ASUS P5N72-T CPU: Intel Core 2 Quad Q9550 memory: OCZ 4GB Dual DDR2 graphics: Gigabyte GeForce GTX280 power unit: Corsair 620W case: Thermaltake Kandalf with decent cooling CPU is cooled by a separate radiator and fan, not the standard box one   The problem started a couple of years ago. When playing GPU-intensive games it kept freezing every hour or so. The intervals began to be smaller and smaller with time. Recently, when playing Farcry 3 I had to restart the machine every 15 minutes which pretty much rendered the game unplayable for me. Also, this summer, when the days were very hot (the room was probably 40+ degrees Celsius) it started freezing even when working normally (i.e. not playing).  When the machine crashes, it literally freezes - the screen stops at the last frame, all sounds stop and it's totally unresponsive. I've tried checking the temperature - the graphics card is definitely the hottest, but remains within acceptable limits, the CPU and motherboard temperatures are OK.  It's been suggested to me that the motherboard I have is known to be problemmatic because of the memory bus bandwidth or so. I've tried downclocking the CPU and it works to a certain extent - freezes don't happen so often, but they still do.  Another interesting things is that when I boot linux on this machine, kernel bootup sometimes freezes when initialising mdev.  Would you have any hints as to how I might diagnose the part that's causing the problems?

I built a desktop computer a couple years back with the following specs:  CPU: Intel  Yorkfield 2.5GHz 6 MB L2 Cache LGA 775 95W Quad-Core Processor BX80580Q9300 Motherboard:  LGA 775 NVIDIA nForce 680i SLI ATX Intel Motherboard Video Card: Two  GeForce 8600GT SCC 256 MB 128-bit GDDR3 PCI Express x16 SLI Supported Video Card PSU: SeaSonic S12 Energy Plus  ATX12V V2.3 / EPS12V V2.91 SLI Certified CrossFire Ready 80 PLUS Certified Active PFC Power Supply Memory: Two G.SKILL 4 GB (2 x 2 GB) 240-Pin DDR2 SDRAM DDR2 800 (PC2 6400) Dual Channel Kit Desktop Memory   Since its inception, the machine has periodically locked up, the regularity having varied over the years from once a day to once a month. Typically, lockups happen once every few days. By "lockup" I mean my computer just freezes. The screen locks up, I can't move the mouse. Hitting keys on my keyboard that normally turn LEDs on or off on the keyboard (such as Caps Lock) no longer turn the LEDs on or off. If there was music playing at the time of the lockup, noise keeps coming out of the speakers, but it's just the current frequency/note that plays indefinitely. There is no BSOD. When such a lockup occurs I have to do a hard reboot by either turning off the computer or hitting the reset button. I have the most recent version of the NVIDIA hardware drivers, and update them semi-regularly, but that hasn't seemed to help. I am currently using Windows 7 x64, but was previously using Windows Server 2003 x64 and having the same lockup issues. My guess is that it's somehow video driver or motherboard related, but I don't know how to go about diagnosing this problem to narrow down which of the two is the culprit.  Additional information re: cooling Regarding cooling... I've not installed any after-market cooling systems aside from two regular fans I scavenged from an older computer. The fan atop the CPU is the one that shipped with it. One of the two scavenged fans I added it located at the bottom tower of the corner, in an attempt to create some airflow from front to back. The second fan is pointed directly at the two video cards.  SpeedFan installation and readings Per studiohack's suggestion, I installed , which provided the following temperature readings:  GPU: 63C GPU: 65C System: 76C CPU: 64C AUX: 36C Core 0: 78C Core 1: 76C Core 2: 79C Core 3: 79C   Update #3: Another Lockup :-( Well, I had another lockup last night. :-( SpeedFan reported the CPU temp at 38 C when it happened, and there was no spike in temperature leading up to the freeze. One thing I notice is that the freeze seems more likely to happen if I am watching a video. In fact, of the last 5 freezes over the past month, 4 of them have been while watching a video on Flickr. Not necessarily the same video, but a video nevertheless. I don't know if this is just coincidence or if it means anything. (As an aside, each night before bedtime my 2 year old daughter sits on my lap and watches some home videos on Flickr and, in the last month, has learned the phrase, "Uh oh, computer broke.")  Update #4: MemTest86 and 3DMark06 Test Results: Per suggestions in the comments, I ran the MemTest86 overnight and it cycled through the 8 GB of memory 5 times without error. I also ran the 3DMark06 test without a problem (see my scores at ). So... what now? :-) Any further suggestions on what to check? Is there some way to get a stack trace or something when the computer locks like that? Resolution I have never did figure out the particular problems, but based on the suggestions here and elsewhere, I'm presuming it was a motherboard issue. In any event, I recently upgraded my system, buying a new motherbeard, PSU, CPU, and RAM, and that new rig has been working splendidly the past several weeks. I am using the same graphic cards as in the old setup, so I think it's safe to reason that they weren't the cause of the problem.


When I write, I try my best to leave religion and words that carry some divine connotation out of it. I recently stumbled upon the phrase in one of my texts:      [...] but pray it never happens.   I am wondering how to rewrite it, removing the connection with deities but keeping the same effect/meaning. Any ideas?

When a big disaster occurs in a country, you can often see messages saying:     Pray for [Country X]   Are people really writing this to incite people to ask their God for anything? For instance Japanese people (in majority non-religious) have started using this expression a lot.  Among similar but non-religious, politically-correct expressions, what would be the expression that most closely express the same feelings as "Pray for [Country X]"?


I was on Instagram and saw someone's post about making extra cash.  I inboxed her for details and she said her manager will deposit funds into my account, then I would send them $2000 to split between the both of them.  She stated that I would need to overnight my bankcard to her so her manager can process the deposit.  She didn't ask for anything (neither SSN nor routing or account number) but the bank card only.  I assume that it is a scam.  Can anyone elaborate on this type of scam?  She claim it's not a scam.

This girl that I'm friends with and have actually seen in person before, keeps posting [on social media] that she "loves when the transfer goes through" and gets $2000-$6000 for free quite often. She said you can make up to $6500 a day. She is not very smart and barely spells correctly. She keeps saying that all she is doing is "transfers" and that's it. So many of my friends are feeding into this crap. So I asked her what it is. She basically said "it's legit" and asked me for my bank username and password so she could see how much money to deposit into my account. I said no way and left it at that. She also said she is not stealing or doing anything illegal. She is getting her friends free money and I think they're naive. What is she actually doing? Is it illegal? I am sure she is incapable of doing crazy money wiring to different countries.   Thank you everyone for answering my question. I am not stupid, I did not give her my information. I knew she was up to something illegal, so thank you for giving me some input on what exactly she is doing. I submitted an anonymous tip to my local sheriff's department. I'm hoping they see it and pursue it, or forward it to the right authorities I.e the FBI or something.


I want to get involved in developing Blender, maybe writing add-ons and stuff for the community. As far as I can tell, there's a lot of math involved with this (generally stuff like matrix/vector algebra, dot/cross products, quaternions, and complex numbers, and I'm sure a lot of other stuff); are there any resources for learning this stuff (in particular, that focus specifically on CG applications): books that are generally in high regards in the blender community or tutorials?  Addendum: I feel I should mention, I don't find my post to be a duplicate of . First off, my question is about resources specific to learning CG related math and how it is implemented, specifically in a CG context (i.e. other applications of the math are not important.Because of this and a heavy emphasis on various algorithms, I also felt it would be considered off topic on the math SE), conversely, the other post appears to be focused on resources for using blender (add-ons, stock images/textures, other software that can be used along side it, tutorials on using it, etc.). I'm not looking for books on how to drive a car or looking for a different engine to add on; I'm looking for books on how engines work. What are the formulae for ray tracing, how do quaternions work, etc.  Secondly, math is a really fundamental part of CG works; I would think that since the other post didn't so much as even mention math (the closest thing I could find was some documentation about the Python API but even that is still pretty far off the mark), it wasn't because it was some tiny, obscure topic that was overlooked. So, it stands to reason that the resources I'm looking for aren't a good fit for it.

Since asking for tutorials, videos, resources, links to other content or downloads is considered off topic here, this is a specifically created Community Wiki which gathers resources for Blender and it has been approved by the .  Just write in the appropriate answer/section. If you have concerns, questions, post a  question, so we don't clutter the comments, but you can link your meta question from the comments.  Questions regarding such resources are not allowed anymore, except for very specific and on topic requests (ask on  if you're unsure about your question). Follow the instructions made in the question about how to post, what can be posted, etc.  Learning             Assets    (also see: )   Reference Images/Blueprints (also see: )    Tools    (also see: )      Other   Special Interest ()     Also see the .


I want to create a workspace with certain size (103x82cm for example) like an indesign-like environment where PDF pages can be arranged in a certain way, which is called impositioning:    I've learned about PDF libraries, but to me it seems like they do jobs like merging, importing, saving etc... I couldn't find something to manipulate the PDFs like the way I need to. Anybody knows one?  Thanks in advance.

I have several A4 PDF documents which I would like (two into one) "glue" together into A3 format PDF document. So I will get from 2PDFs A4 a single one sided PDF A3. I have found the excellent utility  and some others but none of them can be used to "glue" side by side two documents.


how do I create a tile on my windows 8 start menu that will open a browser and go to a specific URL..   any ideas?

How can I add a shortcut to a specific website to the Windows 8 Start screen? Is this possible at all?


I am doing  exercise on CodeEval. I have submitted my code a number of times but the maximum score I seem to get each time is 95. There are 20 test cases(email addresses) that the site runs against a submitted code. This means that there is one particular email in which one my code is giving the wrong answer to. Below are my 2 functions (which have given me the highest score yet, of 95) for checking a valid email. The difference with each is that each time I'm trying out a different regex:  FUNCTION 1  private static boolean isValid(String str) {     Pattern pattern = Pattern.compile("^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$", Pattern.CASE_INSENSITIVE);     Matcher emailAddress = pattern.matcher(str);     return emailAddress.matches(); }   FUNCTION 2  private static boolean isValid(String str) {     Pattern pattern = Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE);     Matcher emailAddress = pattern.matcher(str);     return emailAddress.matches(); }   I have tried to do some research on regex on here and with some books and it seems like the concept of regex is not necessarily exact when it comes to validating email addresses. The hope is to validate ALMOST all email address. However, CodeEval seems to think otherwise. I tried using the regex from  but their online editor/compilers complained of 100+ errors with that regex. My question is, is there some other regex that surely validate EVERY single email under the sun? Thank you in advance for any comment(s)/answer(s)

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


Find the last digit (in base 10) for the number: $$ {3}^{22}$$   This is a question in my course in discrete math. I have checked my notes from the lectures but can't seem to solve this one.

I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.


Luke Skywalker has vanished. In his absence,              the sinister FIRST ORDER has risen from the              ashes of the Empire and will not rest until              Skywalker, the last Jedi, has been destroyed.              With the support of the REPUBLIC, General              Leia Organa leads a brave RESISTANCE. She is              desperate to find her brother Luke and gain              his help in restoring peace and justice to              the galaxy.              Leia has sent her most daring pilot on a secret              mission to Jakku, where an old ally has              discovered a clue to Luke's whereabouts....   If the First Order's plan is to search out and destroy Luke Skywalker, why do they order TIE Fighters to shoot at the BB unit which contains their only means of finding him? Doesn't shooting at the droid containing invaluable data defy all logic and directly contradict the entire plan?  If someone kidnaps the President of the United States and speeds away with him, the secret service wouldn't call for an Apache attack helicopter to blow up the vehicle containing the President, would they?  This is similar to the asteroid chase scene in The Empire Strikes Back when the Star Destroyers were shooting at the Millenium Falcon even though Darth Vader wanted Han Solo alive, but I have theorized that the Star Destroyers were actually ordered to shoot at the engine in order to disable the Falcon (but Han just thought they were out to kill them). The same can NOT be said for the TIE fighters shooting at BB-8 in The Force Awakens, though (for obvious reasons).  Any ideas?

In The Force Awakens, after the First Order are alerted to BB-8, Rey, and Finn's presence at the cantina, an aerial bombardment of the compound begins. They also deploy ground troops.  Wouldn't it have been better to not have an aerial bombardment and simply have the troops surround the cantina, keeping as many people as possible bottled up inside it while they searched both the interior and surrounding area for BB-8?  Instead of a surgical extraction, the strategy that they chose seemed to create chaos and even risked destroying BB-8.  Perhaps this was a sign of the inexperience and emotionally-charged state of Kylo Ren, but General Hux seemed to have more direct authority over the deployment of troops and fighters.  So what was the strategy behind these tactics?


In the footer (bottom left corner) of every site in the network there is a "Chat" link, for example: ENGLISH LANGUAGE & USAGE  Tour Help Chat <---- Contact Feedback Mobile Disable Responsiveness  Except the Stack Overflow page has no "Chat" link:  Questions Jobs Developer Jobs Directory Salary Calculator Help Mobile Disable Responsiveness  Could somebody please explain why? I found  from 10 years ago.

On all Stack Exchange sites there is a chat in the footer why is there none at Stack Overflow? Usually I find it over Google or a bookmark, but I was wondering why it is this way.


Imagine this scenario:  var myObject = {     "1030":{},     "1059":{} }   I want to check if 1030 is in that object. How would I do this?

How do I check if an object has a specific property in JavaScript?  Consider:  x = {'key': 1}; if ( x.hasOwnProperty('key') ) {     //Do this }   Is that the best way to do it?


Should I write the substance of a poem In past tense or in present tense?  Here are a few lines of the poem owl:  Downhill I came, hungry, and yet not starved;  Cold, yet had heat within me that was proof  Against the North wind; tired, yet so that rest  Had seemed the sweetest thing under a roof.  Here's the link Vintage Poetry:   Here's the substance written by me: Should I use past tense or Present tense?   The poet comes/came down a hill. He is/was hungry, tired and feeling cold. But he is/was not really starving. He could/can still relish a shelter under a roof, and have/had sufficient warmth within him to resist the cold wind. He gets/got food, fire and rest in an inn. He is/was protected from the darkness and cold that prevailed outside the inn. But he cannot/could not avoid hearing the sad note of an owl coming distinctly from a hill. The cry of the owl seems/seemed to remind him of those soldiers and poor people who have/had not been able to get food and shelter. So, although he gets/got food and rest, he cannot/could not enjoy himself.   I think past and present both tenses can be used but present tense is better. What do you think?  One more question, should I use past tense or present in answer to the following question?   Question: Describe the feelings of the poet on hearing the cry of the owl. Answer:- The owl's cry was/is sad and piercing. It makes/made the poet ponder over the plight of the homeless poor and the soldiers fighting at the front. They have/had to starve and spend the cold winter nights in the open, under the sky. The poet feels/felt sad for the misery of those people. The owl's cry picks/picked his conscience. He cannot/could not enjoy his food and rest?   The question is in my text book with the above answer that is written in past tense. But I think present tense can also be used. What do you think? Which tense would you prefer?  Can any teacher or anyone who knows the language well please answer this?

When someone asks me to describe a character from a story or explain the story briefly, should I use "past tense" or "present tense"  Below is the story about the character of the novel "Devi Chaudhurani" (written by Bankimchandra Chattopadhyay) from which I was asked a question in the exam: Here is the link that expalins the novel and the character briefly    Prafulla is married but is shunned by her wealthy father-in-law, Haraballabh, because of a spat between him and her father on the day of her wedding. By custom prevalent at that time, a girl, once married, could not be divorced or remarried. Heartbroken at the fate of his only child, her father died after a few years, leaving the family in penury. Prafulla takes the drastic step to flee in the middle of the night to find the house of her in-laws whom she has never known, without any money, with knowledge of only the name of the village and name of her father-in-law.   Here is the question that was asked in the exam "Who is Prafulla? Describe her character briefly." Should I answer in past tense or present tense in the answer?   Prafulla is the main character of the novel Devi Chaudhurani. She lives/lived in a small village of Bengal. She is idolized in the novel as an Inspiration to women in Bengal that time. Prafulla is/was shunned by Haraballabh, Her father-in-law. This made/makes her father feel heart broken and depressed which leads/led him to death. This made/makes Prafulla more stronger than ever. By the character of Prafulla the author described/describes a hard and successful life of a woman.   I think both tenses are correct but not sure. Could you please explain? Can I use both tenses?


I have list of few exe files  that works according to windows edition for ex.  there are different files for windows 10 pro , windows 10 home , windows 7 professional ,windows 7 enterprises and so on .  here I want to create a batch file  which will detect the windows edition and according to that windows edition my batch file will install the exe file. i can get the windows edition details using wmic os get caption and FOR /F "usebackq tokens=3,4,5" %%i IN (REG query "hklm\software\microsoft\windows NT\CurrentVersion" /v ProductName) DO echo %%i %%j %%k  But I do not know how to put if condition on these commands so that I could run exe file according to windows edition

I'm working with InstallAnywhere, an old program for creating installers. I would like to install a particular file, only in case of Windows XP and Windows Vista.  Due to InstallAnywhere limitations, this is not possible. I can only decide to delete the file once it has already been installed, based on a rule.  Within that rule, I can check for the platform on which I'm running, which gives me the possibility to check for Windows XP, Windows Vista, Windows 7, etc. but not for Windows 10. I can't say "Perform this action when the system is not XP or Vista", so I need to say "Perform this action on all those platforms, which are not XP or Vista".  However, I can launch command-line commands and catch the result, so here's my question: is there a command which I can use for determining if I'm working on a Windows 10 system?


pgf-pie keeps giving me headaches.  This is my LaTeX code:  \documentclass{article} \usepackage{pgf-pie}  \begin{document}  \begin{tikzpicture} \pie[color={black!10, black!20, black!30}]     {62/\TeX\ Live and Mac\TeX,      32/MiK\TeX\ and Pro\TeX t, 6/Other \TeX} \end{tikzpicture}  \end{document}   I use MiKTeX and PdfLaTeX as my PDF engine, when I run it the  returns these errors:  Missing character: There is no b in font nullfont! Missing character: There is no l in font nullfont! Missing character: There is no a in font nullfont! Missing character: There is no c in font nullfont! Missing character: There is no k in font nullfont! Missing character: There is no ! in font nullfont! Missing character: There is no 1 in font nullfont! Missing character: There is no 0 in font nullfont! Missing character: There is no b in font nullfont! Missing character: There is no l in font nullfont! Missing character: There is no a in font nullfont! Missing character: There is no c in font nullfont! Missing character: There is no k in font nullfont! Missing character: There is no ! in font nullfont! Missing character: There is no 2 in font nullfont! Missing character: There is no 0 in font nullfont! Missing character: There is no b in font nullfont! Missing character: There is no l in font nullfont! Missing character: There is no a in font nullfont! Missing character: There is no c in font nullfont! Missing character: There is no k in font nullfont! Missing character: There is no ! in font nullfont! Missing character: There is no 3 in font nullfont! Missing character: There is no 0 in font nullfont!   And the PDF looks like this:    To me it looks like attributes/options are being accidentally being printed as text.  I've found similar issues (e.g. ), but none of these pointed me in the direction of solving this.  UPDATE: This question appeared to be a duplicate. One of the answers put me on the track to the the answer on this issue:   That solved it for me.

I am having troubles with TexStudio making pie charts with the pgf-pie package. I literally copied a fragment of this template:   \documentclass{article} \usepackage{pgf-pie} \begin{document} \begin{tikzpicture} \pie{10/A, 20/B, 30/C, 40/D} \end{tikzpicture} \end{document}     The log only shows the following message: Overfull \hbox (1033.10823pt too wide) in paragraph  As you can see the result is not the expected one, first because it does not show any pie chard, and secondo of all it should be something like this (done through Overleaf):   Does anybody knows how to fix this error?  Thank you for reading and for your Help.  David.


We know this happens for previous Pokemon games. For example, if I have a fire type pokemon, it deals extra (50%) damage when using fire type attacks.  So my question is does Pokemon Go also has this setting?

Only generation-I Pokemon are available, however it seems that the types which did not exist in Gen-I do exist in Pokemon Go (e.g. Dark type moves).   So I'm wondering which type chart the game is using for move effectiveness.    According to Bulbapedia, in Gen I Bug attacks were super-effective against Poison, but in Gen II-V Bug attacks are not very effective against Poison. What is it in Pokemon Go? Similarly, in Gen II-V Ghost attacks are not very effective against Steel, but in Gen VI Ghost attacks are normal effective against Steel. Does anyone have a Magnemite, is it Steel type? Does it resist Ghost? Does STAB exist in this game?


How do I form a question based on the following details:  At 1pm on Sunday Jim: Are you a virgin? Jane: Yes  nothing happened from 1pm to 9pm  At 9pm on Sunday: Did Jim ask you whether you were a virgin?  or   At 9pm on Sunday: Did Jim ask you whether you are a virgin?

I know the past tense carries the past tense in every dependent clause, but referring specifically to places or to things that are eternal, like the Earth, seems a bit weird and therefore we sometimes (I believe incorrectly) say     He didn't know that New Jersey was actually on the East Coast.   Because it still is. Or     He thought the Earth was round.   So is it square now?  Logically speaking, would you consider the use of past tense here a bit confusing in a day-to-day speech in these examples? Would you instinctively opt for using the present tense?


When adding nodes to a graph with a restriction that all nodes in the graph have a direct connection to all other nodes, how can one detect when a higher dimension is needed so the edges do not cross each other? By crossing I mean one can stretch an edge, circle around all other nodes and not touching any other edge.  For example, three nodes form a triangle and can reside in a 2D plane. Adding one node you can still put four nodes in a 2D plane without crossing edges. But adding the fifth node you have to go to 3D to avoid edge crossing.  It seems like any time a prime number of nodes is added the dimension needs to bump up.

We call a planar graph one that we can draw in two-space such that no two edges intersect. I was told that we're not so interested in drawing graphs in three-space, because it is "intuitively obvious" that we can just arrange the points and edges in a non-intersecting way because three-space gives us a great deal of room for arrangement.  While I agree that it seems intuitively true, I don't think it's necessarily true: it seems to me as if it might be possible to create a graph for which we cannot conceive a planar realization in three dimensions. If not, can we develop a formal proof that all graphs have a planar realization in three-space?