I have a tower of flat boxes, but the simulation is not stable. I have tried with split impulse turned off and on.  I have tried:   setting the collision shape to box, convex hull, and mesh increasing the number of steps per second and iterations per step (though this does improve the stability, it still eventually collapses without outside influence) enabling deactivation start deactivated (but as soon as an object touches the tower, it gets very "bouncy")   I have even tried to gradually increase gravity, hoping that the boxes would eventually gently settle all opposing forces (gravity and contact constraints).  shows that gravity is squishing the boxes a bit.  This technique, combined with enabling deactivation seems to work alright, until an object activates the boxes (on contact). Does anyone know of a less hacky way to prevent a tower of boxes from bobbing up and down like this?  Is there a way to make this kind of tower stable without resorting to these kinds of tricks?

I'm new to blender and actually amazed from the possibilities it provides. I successfully created a set of boxes (like domino tiles) that fall in a chain reaction. (Like in this answer: ). When I did this there was a tiny fall of the tiles (about 0.001cm) and very quickly they stood still.  OK, Now I want to build a +30 tiles height building (and see them fall :-) ), but even though I put the tile one over another with precise mathematical positioning they still have an initial shake, so a 5 floor tower stands, but a high tower just falls by itself.  The tower I am tring to build looks like this: (this is an example of 5 floor tower, each floor has 2 vertical tiles and one horizontal)  __ || __ || __ || __ || __ ||   So my question is - how can I position this kind of building with 30 floors or more without get the "initial shake" when starting the simulation - I want the building to fall only when it gets hit.


My struct is as follow.  typedef struct user {    char *name;    int age; } User;   Now when I am creating an array, I wonder what is the different between below both statments.  User users[10];   vs  User users[10] = {};

I have a large array in C (not C++ if that makes a difference). I want to initialize all members of the same value.  I could swear I once knew a simple way to do this. I could use memset() in my case, but isn't there a way to do this that is built right into the C syntax?


The 'Darth Plagueis' all but confirms that with the Rule of Two, the dark side of the force is concentrated in the two Sith. Does this mean that the Jedi have less to draw on? Or was this comment innacurate,and the Force is infinite?

One of the drivers behind the 'Rule of Two' is that with fewer Sith, the dark side will become more concentrated in those users and they will be more powerful as a result. Is there any indication that the same is true for Jedi?


I have a 15" 2018 Macbook Pro with touchbar and the touchbar has gone completely black! the only thing working is the touch id. Also, there are no touch bar related settings in the keyboard settings section.  I've seen his problems for the last couple of days, after the machine unexpectedly shut down, and then it showed "your computer restarted because of a problem"   I've tried:   pkill "Touch Bar agent";  killall "ControlStrip";   and  sudo pkill "Touch Bar agent"; sudo killall "ControlStrip";  Starting in Safe Mode SMC reset NVRAM reset Apple Hardware Test (booting while holding D),     resulting in "No problems found" re-installaing MacOS updating to Catalina. Pressing fn to see whether that would light the touch bar up (it didn't work)   Has anyone encountered this issue as well?

The control strip of my touch bar is not working anymore. Even after a full restart or start in safe mode.  There's nothing on the 'screen'. (Neither in Mac or Windows via Bootcamp) It doesn't respond to taps. In keyboard preferences the usual touchbar related properties are gone as well, as if my Mac doesn't even have a touch bar.  The Touch ID part (fingerprint) works fine though...  Any steps I can take to diagnose this?


I know that the result should be $0$. I tried polar coordinates and got stuck at this:  $$\lim\limits_{(r,\phi) \to(0,0)} r\frac{\cos^2\phi \sin\phi}{ \cos^2\phi + r\sin^3\phi}=0$$  I wonder if I can jump from this to the result (technically there exists a $\phi$ for which the denominator would equal 0) or if this is not a good approach at all.  Any help would be greatly appreciated, thanks in advance!  UPDATE I acknowledge that this is a duplicate question but 1) I searched before posting and couldn't find it asked here and 2) once someone linked it I still didn't quite get it. Only on this thread did I understand the explanation. This is my first question here, which might account for this.

I proved that $f(x,y)= \dfrac{xy^2}{x^2 + y^3}$ does not have limit at origin. I used two paths test; first I followed the $x$ axis, then I followed $x = \frac{1}{2}(y^2 + (y^4 - 4y^3)^{1/2})$ for $y<0$.   However, I am STILL looking for other solutions other ideas.  Any kind of answer, help or hint is appreciated.


I'm using PhpStorm and I'd like to find shortest string between {{ and }} by using Regex. An example is like this:     {{$ux['friend']['profile']['firstName']}} {{$ux['friend']['profile']['familyName']}}   I tried this:  \$(.*)(\['.*'\])+   which finds like this   $ux['friend']['profile']['firstName']}} {{$ux['friend']['profile']['familyName']   but I want to make it non-greedy -- only find the string between each match of {{ and }}  like   $ux['friend']['profile']['firstName']

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


Let $f:[0,1]\rightarrow\mathbb{R}$ be continuous. Prove that the following limit exists $$\lim_{n\to\infty}\left(\int_{0}^{1}| f(x)|^{n}\,dx\right)^{\!\!1/n}$$  I tried like this:  $$\left(\int_{0}^{1}| f(x)|^{n}\,dx\right)^{\!\!1/n}=e^{{\ln}{\left(\int_{0}^{1}| f(x)|^{n}\,dx\right)^{\!1/n}}}=e^{{\frac{1}{n}}\ln\left(\int_{0}^{1}| f(x)|^{n}\,dx\right)}.$$  Now from this how I can proceed?

Let $f(x)$ be a continuous real-valued function on $[a,b]$ and $M=\max\{|f(x)| \; :\; x \in [a,b]\}$. Is it true that: $$ M= \lim_{n\to\infty}\left(\int_a^b|f(x)|^n\,\mathrm dx\right)^{1/n} ? $$  Thanks!


How would I go about building something like this? I have no clue.

I am trying to fill in a table generated by a dynamic programming algorithm which requires to keep trace of the execution by inserting right or diagonally downwards arrow. An example image is below:    I know the command for table and arrows but can't get this done compactly.  What would be the basic table structure so that this alignment is visible?  \begin{center}     \begin{tabular}{||c c c c c c c c||}          \hline         Col1 & Col2 & Col2 & Col3 & Col1 & Col2 & Col2 & Col3 \\ [0.5ex]          \hline\hline         1 & 6 & 10 & 87837 \\           $\leftarrow$ & $\leftarrow$ & $\searrow$ & 87837 \\           2 & 7 & 78 & 5415 \\          3 & 545 & 778 & 7507 \\          4 & 545 & 18744 & 7560 \\          5 & 88 & 788 & 6344 \\ [1ex]       \end{tabular} \end{center}   This code gives me a structure like this:  As you can see, it's not quite ok. Thanks in advance.


Hi I ‘m 1 day old to ubuntu, I Installed ubuntu 14.04 lts on my windows 8 on 4-may-2014, even after giving the option boot along side win 8, it over wrote win8 and starts ubuntu 14. now I  have no access to windows 8 at all neither to the files on my laptop. I tried using my windows boot recovery but nothing happened. I tried using Os uninstaller by using ubuntu boot CD with cmds “sudo add-apt-repository ppa:yannubuntu/boot-repair” and “sudo apt-get update; sudo apt-get install -y os-uninstaller && os-uninstaller” but I don’t get os uninstaller, what is the right cmmds for restoring windows or atleast getting access to my files. I have tried booting With a USB bootstick also. Pls hlp

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.


Using Sculpt Mode, I accidentally pressed B and now some of the faces are black:    These faces are no longer editable. What have I done and how can I edit the faces again?  I tried checking my key bindings to find out what B does, but I am not able to find any information on this.

A mask has been created:    The shortcut Alt+M will clear it. Is there a button in the user interface? Or a menu entry?


When I rename "videos" folder, the videos in that have been removed.

After an update I ended up with this:    How can I add the default Files quicklist options which are not bookmarks (Documents, Downloads, Music...)  The same happened to Nautilus when I opened it, but I added the options in ~.config/user-dirs.dirs but now the Launcher icon is missing this options.


I'm trying to vertical-align: middle a div inside another div, but for some reason it's not working properly. What am I doing wrong?    #wrapper { border: 1px solid red; width: 500px; height: 500px; } #block { border: 1px solid blue; width: 500px; height: 250px; vertical-align: middle; }

 I'm Block

      PS:  This is just an example, so no, I don't actually know the actual width and height of the divs, as they are dynamic, according to their contents, so please no margin-top: 125px, or padding-top: 125px answers, or answers like that.

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


When I tried to delete a comment after I just deleted another one, the system told me     You can submit a comment vote every five seconds.   The message should be different, right?

I had an old question that I revisited in order to link it in a new answer. I noticed that in the comments Steven A Lowe had a funny comment that I -- at the time -- had responded to with "why can't I upvote comments?"  Well, of course, now I can.  So, I voted Steven's comment up then went to delete mine. I got the warning box that I can only submit comment votes once every 5 seconds. This seems like a bug to me. Deleting is not the same as voting.


I have an implemented interface extends from JpaRepository when I use repository.existById(); and pass unavailable id in the database. It returns NullPointerException, there is nothing saying anything about NullPointer in the documentation. It's a boolean, why it return NullPointerException?  My repository @Repository public interface AccountRepository extends JpaRepository<Account, Long> {      Boolean existsAccountByClientUsername(String username);      Account findAccountByClientUsername(String username); }  Test code that uses exsistByID @Test public void givenNotAvailableId_whenGetAccountById_thenThrowIllegalArgumentException() {     Long id = Long.MAX_VALUE;     IllegalArgumentException exception = Assertions              .assertThrows(IllegalArgumentException.class, () -> accountService.getAccountById(id));     Assertions.assertEquals("Id not found", exception.getMessage()); }  production code  @Service public class AccountService {      @Autowired     private AccountRepository accountRepository;      public AccountService(AccountRepository accountRepository) {         this.accountRepository = accountRepository;     }     public Optional<Account> getAccountById(Long id) {         throwIfNotFoundId(id);         return accountRepository.findById(id);     } }  throwIfNotFoundId method private void throwIfNotFoundId(Long id) {     if (!accountRepository.existsById(id)) {         throw new IllegalArgumentException("Id not found");     } }

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?


So, a colleague of mine, who's in a place with 10 hr time difference than mine, called me up during my morning (9am), his late night (11pm), and said "Good Morning". As this happened for the first time with me, I just replied with "Oh hello. Good ... err Night ... to you" & had a few seconds of awkward moment & continued with our work talk.    So I was wondering, what would be my proper response in this situation?

This may sound like a silly question, but I'm having a bit of confusion.   I'm not sure what to say. I work remotely and I am a member of a team on the opposite side of the earth. On the chat, when they say “good morning” or “good night”, I get confused about what I should reply because when they are enjoying morning it is night for me.  Should I say “good morning” when they say “good morning”? Can I say “good morning” to them when it's morning for me? Thanks!!


I'm setting up a framework using Java, selenium, Cucumber using page object model. project -   I'm getting null pointer exception while running the code.  The code runs fine if I directly open the browser in launchstep.java file.  I'm not sure the problem here is. I'm sure I have initialized everything that is required.  launchstep.java  package Steps.LaunchSteps;  import Utils.DriverFactory; import cucumber.api.java.en.Given;  public class launchstep extends DriverFactory {      @Given("^I go to HelloFresh$")     public void iGoToHelloFresh() throws Throwable {         OpenBrowser.goToURL();     } }   launchpage.java  package pageobjects.launchpage;  import pageobjects.BasePage;  import java.io.IOException;  public class launchpage extends BasePage {       public launchpage() throws IOException {     }      public launchpage goToURL() throws IOException {         getDriver().get("www.google.com");         return new launchpage();      }   }   DriverFactory.java  public class DriverFactory { public static WebDriver driver; public static launchpage OpenBrowser;  public WebDriver getDriver() {      try {         Properties p = new Properties();         FileInputStream fi = new FileInputStream(System.getProperty("user.dir") + "/src/main/java/properties/config.properties");         p.load(fi);         String browserName = p.getProperty("browser");           switch (browserName) {              case "firefox":                  if (null == driver) {                     System.setProperty("webdriver.gecko.driver", Constant.GECKO_DRIVER_DIRECTORY);                     DesiredCapabilities capabilities = DesiredCapabilities.firefox();                     capabilities.setCapability("marionette", true);                     driver = new FirefoxDriver();                  }                 break;              case "chrome":                  if (null == driver) {                     System.setProperty("webdriver.chrome.driver", Constant.CHROME_DRIVER_DIRECTORY);                     driver = new ChromeDriver();                     driver.manage().window().fullscreen();                   }                 break;          }     } catch (Exception e) {         System.out.println("Unable to load browser" + e.getMessage());       } finally      {         driver.manage().timeouts().pageLoadTimeout(60, TimeUnit.SECONDS); OpenBrowser = PageFactory.initElements(driver, launchpage.class);      }      return driver;  } }


I completed all the quests required to become guild master and was told that I would be guild master after I returned the key. But now Brynjolf is wearing the master armour and he is always too busy to talk.  So why is Brynjolf guildmaster not me?

I've completed the Thieves Guild main questline () and chosen my special power (Shadowcloak of Nocturnal). It says completed in my quest log.  I also completed the  in each city you can give Thieves guild influence to (Markarth, Whiterun, Windhelm, and Solitude) and done their special jobs from Delvin. They show completed in my quest log. I've even done at least one of each kind of job from Vex and Delvin (but not in each city).  I got  in the Ragged Flagon and have done the quest for Tonilia (delivering the Moon Sugar to a caravan) and Vekel (getting the 4 books). I've also upgrade one of my pieces of Thief Armor.  I talk to  to become guild master and I get no dialogue options but he just says he's busy and we'll talk another time. There is a guild chest in front of his desk but it's locked and I don't have the key.  What am I missing? Is there some bug I've encountered?


Are there two real-valued functions defined on the same subset of $\mathbb{R}$ that commute with each other but are not inverses of each other?  (After several responses, I have to make an edit to my post.  Neither function should be the identity function nor the zero function.  The two functions should not be the same function.)

Today I was thinking about composition of functions.  It has nice properties, its always associative, there is an identity, and if we restrict to bijective functions then we have an inverse.  But then I thought about commutativity.  My first intuition was that bijective self maps of a space should commute but then I saw some counter-examples. The symmetric group is only abelian if $n \le 2$ so clearly there need to be more restrictions on functions than bijectivity for them to commute.  The only examples I could think of were boring things like multiplying by a constant or maximal tori of groups like $O(n)$ (maybe less boring).  My question: In a euclidean space, what are (edit) some nice characterizations of sets of functions that commute? What about in a more general space?   Bonus: Is this notion of commutativity important anywhere in analysis?


When I try to import my Android Project I get three times the message "Nullpointerexception: null" and also the following error: Nullpointerexception: failed to set up android modules The error occurred after deleting by accident the .AndroidStudio1.4 folder, starting Android Studio, replacing the folder with the one in the recycle bin and starting Android Studio again.   Do you have any idea how to solve this?


I want to make a special villager that will trade a custom structure block upon the given items. I don't know how to get a villager to trade items with NBT tags though. What would I do with this example:  /summon Villager ~ ~ ~ {Profession:0,CustomName:"Carpenter",CustomNameVisible:0,Career:4,CareerLevel:42,CanPickUpLoot:0,PersistenceRequired:1,Silent:1,Invulnerable:1,Attributes:[{Name:"generic.knockbackResistance",Base:"1f"},{Name:"generic.movementSpeed",Base:"0f"}],Offers:{Recipes:[{buy:{id:"stick",Count:8},buyB:{id:"wooden_pressure_plate",Count:1},maxUses:9999999,sell:{id:"structure_block",Count:1},rewardExp:false}]}}

I am making a Minecraft Mini Game adventure map, and one of the levels has a /setblock command, I am using the command in a way to spawn an item in a chest (Wooden Button) I need the wooden button to have CanPlaceOn tag so it can be placed on a log. I have tried this command: setblock 294 5 -1251 minecraft:chest 0 replace {Items:[{Count:1,Slot:0,id:minecraft:wooden_button,CanPlaceOn:[log]}]}`


let say i have a field abc__c in account object and i want to check where this field has been used then i can do following things   1) retrieve all org metadata through ant or workbench or eclipse and do a text search in that data - (it is ineffective as it will just search the field name and there can be many field with same name or there can be code commented which will also come in search)  2) delete the field in salesforce org, if there is any dependency of it then the references will come in next page (Effective but more manual work)  Here in this question the thing that i want to find out is that, is there any function in salesforce which is available in metadata Api through which we can get the field dependency that salesforce find out during field deletion

Is there a good tool that checks the schema to determine custom fields and their use in triggers, page layouts, classes, etc? We have a couple objects that are getting close to the 500 max and it would be nice if there were a better way than having someone get a list of custom fields for an object manually and then searching every page layout, class, and trigger for use of each field.


Anyone who has been on SO for any length of time has come across answers by new users that should be a comment. In a lot of cases these answers become downvoted and serves to discourage the user as well as slows the users progress towards being able to leave proper comments.   Can we lower the bar for new users to leave comments? The current scale of 50 is achievable with a few good questions or answers, but for a lot of users, leaving a comment is a way to "test the waters" here and the continual downvoting of these types of answers only drives new users away, rather than educating them.

is a great example of people coming from Google and using answers as comments.  I understand the reputation threshold is there to prevent spam, but Answers are just as prone to spam as comments and you can post them at reputation 1. Furthermore there are already flags in place as a preventive measure for both.  Essentially the reputation threshold of comments is forcing people to use the site in ways the designers did not intend. Removal of the reputation cap would also make the site more new user friendly as newbies that use the site in this manner are commonly given a unfriendly welcome in the form of downvotes from people who forget you need 50 rep to post comments.


i am a beginner .i am trying to play sound track using buttons in code but when i am running the app,app is not running.it is showing open app again and again an d when i opens it it shows close app.in log cat it is showing runtime exception saying FATAL EXCEPTION: main/java.lang.RuntimeException: Unable to start activity ComponentInfo{com.devlopers.colourplay/com.devlopers.colourplay.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.media.SoundPool.load(android.content.Context, int, int)' on if anyone know please help me out


I am trying to use my javascript to make a call to a list that lives in a separate site collection. It is not working and blocks me due to CORS. Is there any way around this?  My question is different. The other post's user is asking for a request from the "internet", so outside of SharePoint. I am using an intranet and simply want to do a get request internally, but to call a different site collection to the one I'm on. My main javascript function looks something like this:      function getJson(endpointUri, success, error) {     $.ajax({         url: endpointUri,         type: "GET",         processData: false,         contentType: "application/json;odata=verbose",         headers: {             "Accept": "application/json;odata=verbose"         },         success: success,         error: error     }); }  function logError(error) {     console.log(JSON.stringify(error)); }

Is it possible to make SharePoint 2013 resources accessible via internet using REST API? Say I want to do CURD with a list from outside of SharePoint. How we can manage credentials for this situation? I've seen some sites (yammer) uses SSO by redirecting users to their company website and get credentials from there. Can we use the same approach with REST API for credentials? If yes, please explain how? (Just the credentials part)


A problem has recently occured where no ones mail is being indexed any more. Everyone can search their mail up until early December and then it just stopped.  When you go to the Indexing options on someones Outlook it recognises there are messages to be indexed as everything is still being received correctly but it refuses to budge.  This happens on both the web app and Outlook itself and I just don't know exchange well enough to diagnose the problem so anything that may point me in the right direction would help as i have seen this question:  but am unsure if it applies.  Running Exchange 2013 + Windows Server 2012 Datacenter  So far:   Checked Index status with Get-MailboxDatabaseCopyStatus -Server | FL Name,Index Mailbox database Index was corrupted, others saying Reseeding required Stopped Search Host and Search Services Renamed folder, restarted services Mailbox status "Healthly" but others still on reseeding required Indexing seems to have got stuck around a particular date, namely, early December, and it doesn't seem to be crawling anymore Mailbox now shows Failed: Internal error has occured For the Database or Index   I just had a quick dig through some files an old technician moved before Christmas and I've possibly found something. Space on the server was low and they moved some of the .log files you find in the Mailbox folders as well as some of the database (.edp) files. Though I assume if we were actually using them we wouldn't be able to see the mail either but I wonder if it has something to do with it, because there's definitely some missing .log files.  Edit..(I've lost count) : The other databases are in use, it seems they were moved and they're still updating on the other drive, found the index folders for them (not in the normal hieracrchy) and working on reseeding those now with above solution.  Final Edit: Problem solved, answer is to make sure you check where all your DB's are and follow the procedure outlined in this question

I have corrupted indexes in my Exchange 2013 server and I have having trouble figuring out how to reset them.  I found information on how to do it here:    They tell me this: "If the mailbox database copy is the only copy, Exchange Search must create a new content index catalog. You can use the ResetSearchIndex.ps1 script to do this."  It is in fact the only copy and so I have to use this option, the problem is that they don't give any information on how to run it because it will not run in Powershell. Other articles about 2010 show that I need to go to the scripts directory and run it from there, however this script is not in my script directory on my Exchange 2013 server.  Thoughts?


Take the following rule.     104.3f If a player would both win and lose the game simultaneously, that player loses the game.   How is it possible to do this, has there been a documented case of this happening?

One of  is     104.3f If a player would both win and lose the game simultaneously, he or she loses the game.   . However, it seems to me like it "ought to be" the case that if there are only 2 players and  [A loses]  [B loses]  [B wins]  would occur simultaneously, then B should win, since  win-and-lose-simultaneously should be better than just-lose.  For that reason, it seems like the     Proposed Alternative :    If, simultaneously, all players would lose the game and      some players would win the game, then the players who would not win the game      lose the game, and the game is a draw between the remaining players.  Otherwise,      if a player would both win and lose the game simultaneously, he or she loses the game.   would make more sense.  However, I can't think of any situations in which that would matter.  Are there any possible situations in which my proposed alternative  would yield a different result from the actual rule?


I can't log into my Gmail account. I was trying to clear the cookies and I think I touched the wrong button. Now I can't access my account I am desperate to recover it quickly.

I have forgotten the password or username for my Google account, or I'm unable to access my account for other reasons.  How can I recover my account?  (This Q&A is meant as a general description for all Google and Gmail username/password questions. See: )


I am working on a java project right now. I have two main questions that I must know the answers to.  When working with an Object passed through Parameters, does the passed Object work as a pointer to the original Object, as in:   public void DoThis(Object That) {     That.function(10, 100); // Let's just say this raises 10 to the power of 100, I know this function works as it's part of the original Object.     That = new Object(); // I want to know if this changes anything in the original Object or if the passes "That" Object I use is a reference or copy of some sort. }   Another question is that if I set a Local Object equal to another Object that already exists, then set that Object to a different Object or a new Object all together, if it alters the first Object I set it equal to, as in:   public void DoThisOtherThing(Object That, boolean Maybe) {     Object Thing = That.getSub();     if (Maybe)         Thing = Thing.getSub(); // I want to know if this would change That.getSub();     else         Thing = new Object(); // I want to know if this would also change That.getSub(); I would imagine if the other case doesn't, this wouldn't, and vice versa     That.getSub().setValue(Thing.getValue()); }   I am more familiar with C and it's much more straight forward to me. Java has a lot of things handled in the background automatically by the Java Runtime and don't know exactly what it's doing here. I normally don't work with Java, but for this project I am working on, I need to. Thank you in advance! :)

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Emacs is a huge platform. There is any "good path" to make the process of learn Emacs easier?

I am about to learn Emacs, have been through the tutorial and borrowed the O'Reilly book on Emacs. But the question still is - how do you learn good Emacs workflow? I guess, you don't use Emacs as you'd use, for example, .  This question seems revelant to mine:  -


sorry if this formatted a bit oddly, this is my first time asking a question here. I am working on a method for my class that is supposed to add a new node containing a specified value to the end of a linked list. However I keep seeing a NullPointerException at the start of my while loop. I would really appreciate any insight. public void add(Anything value) {           Node temp = first;     if (temp==null) {         this.addFirst(value);     }     while(temp.next!=null){         temp=temp.next;     }     temp.next=new Node(value, null); }  Note: for the purposes of this assignment I am only creating methods, the assignment is preloaded with some code already that I am not allowed to change. I have attached it to provide some more detail. public class CS2LinkedList<Anything> {       // the Node class is a private inner class used (only) by the LinkedList class     private class Node     {         private Anything data;         private Node next;                  public Node(Anything a, Node n)         {             data = a;             next = n;         }     }          private Node first;     private Node last;               public CS2LinkedList()     {         first = null;     }          public boolean isEmpty()     {         return (first == null);     }          public void addFirst(Anything d)     {          Node temp = first;          first = new Node(d,temp);     }               public void clear()     {         first = null;     }          public boolean contains(Anything value)     {         for (Node curr = first; curr != null; curr = curr.next)         {             if (value.equals(curr.data)) {                 return true;             }         }         return false;     }               public String toString()     {         StringBuilder result = new StringBuilder();  //String result = "";         for (Node curr = first; curr != null; curr = curr.next)             result.append(curr.data + "->");  //result = result + curr.data + "->";         result.append("[null]");         return result.toString();   //return result + "[null]";     } }  Thank you!

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?


How do you remove the lock screen from windows 10? The one with the random image which you have to [enter] away before going to the login input?  I had it removed until 2 weeks ago, but some windows update has undone that setting.  The regedit setting for HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization[NoLockScreen=1] is not working anymore. Not sure why.  P.S.: I'm running Windows 10 Home

The Windows 10 "anniversary update" is coming out tomorrow and according to some  the group policy to disable the lock screen is no longer effective on anything below the Enterprise edition. I'd like to know what options/workarounds are left to disable this nonsense on Pro editions.  Regards.


I would like to report a massive downvote of answers of mine today as visible in my profile:      Could you please verify the case?

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


This is my post id:  var postId = 47213486358396931; var postComments = "Comment";   adding in object like this   var param = {     "PostId" : postId,     "postComment":postComments }    If I print the param I get  like this. The last digit of number changed to 0. Why am getting like this.    {"PostId" : 47213486358396930, "postComment": "Comment"}

Is this defined by the language? Is there a defined maximum? Is it different in different browsers?


I'm about to buy a Laserjet multifunction wireless printer, and I was thinking about the   I searched online for a while and all I could find is   And .  Anybody had luck using this printer on Linux? Or should I go for a similar model with better Linux support?

Let's assume that one has some modern HP printer and/or scanner which is not supported by HPLIP package from official repository. Currently Ubuntu versions have :  trusty (14.04LTS): 3.14.3-0ubuntu3.4 xenial (16.04LTS): 3.16.3+repack0-1 bionic (18.04LTS): 3.17.10+repack0-5 focal (20.04LTS): 3.20.3+dfsg0-2 groovy (20.10): 3.20.5+dfsg0-3build1 hirsute (21.04): 3.21.2+dfsg1-2   What can one do if printer is supported in newer version of HPLIP (checked this in )?


I need to replace New Line with
 in the string obtained from a text box.Currently i use this   string text= textbox.Text; text.Replace(System.Environment.NewLine, "
");   But nothing is getting replaced when i test using MessageBox.show(text);

How can I replace Line Breaks within a string in C#?


I've tried sanding them down just a bit, cleaning the brake surface on the wheels, and this does stop them from squealing for a day or two, but it always comes back.  I'm using Kool-stop pads if it matters.

My rear rim brakes are squeaking loudly. I don't know what the problem is, but I am sure it has nothing to do with rain because it happens all the time even if it is dry.  Anybody have an idea what could be problem and how to solve it? It makes the rear brakes kind of useless, because if I use them I will scare the people or drivers around me.


Prove that $$a^2(1+b^4)+b^2(1+a^4)≤(1+a^4)(1+b^4).$$  This is a problem from the pre College mathematics. Please help. This inequality has to be proved for all reals $a$ and $b$

Prove that $$\frac{x^2}{1+x^4} \leq \frac{1}{2}.$$   First off, we observe that the expression on the LHS is positive for all $x \in \Bbb R,$ and equality is achieved iff $x \in \{-1, 1 \}$. That being said, we start by manipulating the expression as below;  \begin{align} \frac{x^2}{1+x^4} - \frac{1}{2} &\leq 0\\\\ \impliedby\frac{2x^2 - (1+x^4)}{2(1+x^4)} &\leq 0\\\\ \impliedby -\frac{(x^4 - 2x^2 + 1)}{2(1+x^4)}&\leq 0\\\\ \impliedby \frac{x^4 - 2x^2 + 1}{2(1+x^4)} &\geq 0\\\\ \end{align}   We then make the observation that $x^4 - 2x^2 + 1 = (x^2 - 1)^2 \geq 0$ for all $x \in \Bbb R$ and that $1 + x^4 \geq 1$ for all $x \in \Bbb R$, and so the final inequality holds for all $x \in \Bbb R. \\\hspace{92pt}\square$  Is it okay to prove it in this way? I have no solutions so it would be nice if I could have some validation!


In my assignment I had been asked to say why the following code prints mis-match the code checks for a == square (sqrt(a)) #include <iostream> #include <cmath> using namespace std; #define sqr(x) ((x) * (x)) int main() {         double a = 4.0*atan(1.0); // pi         double b = sqrt(a); // square-root of pi         if (a == sqr(b)) // pi is equal to         // square of square-root of pi?                 cout << "Match" << endl;         else                 cout << "Mis-Match" << endl;         return 0;  }  I know that this type of problem are do to the fact that floating point numbers are approximate representation and for checking equality one should check for almost equality case i.e. |a-b|<epsilon, where epsilon is taken to be 1e-8 or any other suitable value. But when I replace double with long double the code executed to print Match. So I want to know when == works and when it does not.

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


On Linux you can login via SSH or a tty and trigger a launch of a GUI application in completely different graphical session:  DISPLAY=:0 my-application   How to do it on Mac?

I'm used to working on Unix/Linux and recently moved to Mac. In used to be able to do this: derick@linux1:~$ ssh -X linux2 derick@linux2's password: derick@linux2:~$ xclock  I've install X11 from maxports and I can do the same from my mac. If I try the reverse by ssh-ing into my mac from linux I can only run certain apps:  /usr/X11/bin/xclock works fine  Something like /Applications/Preview.app/Contents/MacOS/Preview opens the GUI on the mac. It seems that this is not possible on a mac? If not, how do I run an application remotely (on a mac) with a local (linux) display? Do I need some third-party app?   Update: To be more precise: I have synergy and use Mac for coding. On my linux PC I would like to see another application's display (GUI) from Mac. Thus, 'live screen sharing' apps like VNC will not work. For example I'm working on my mac in app A (say Word) and want to see the output of Excel (running on mac) on my linux PC next to me. (Simulating a dual screen via the network). It worked nicely on linux, hoping for a solution for mac.


Is there a way to limit the bandwidth that Google Drive File Stream uses?  I'm using a Mac and when I resume syncing, the Internet becomes unusable. I have to stop syncing to browse simple web pages!

Is there any way to limit the amount of traffic Google Drive uses? I'm syncing Drive's content, and it almost swallows the entire bandwidth. I can't use Internet during sync operation.


Under "Settings" => "Reading", I have set "Blog pages show at most" to 6.  I have created a category called 1970s where one can see all the best Rock albums of the decade -> Meanwhile, I have created subcategories (1970, 71, 72, 73 etc...) where one can see the best albums of the respective year.  Here is the problem(s), in the subcategories I am getting exactly the same results as in the parent category + pagination is not working.  I am using the Genesis Framework and I am working with the Sample theme, Here is my custom category.php file:  function rock_custom_loop() { ?>
The Verybest of the:  <?php echo single_cat_title( '', false ) ?>
          <?php if ( category_description() ) :  ?>
<?php echo category_description(); ?>
         <?php endif; ?>            <?php     global $post;      $args = array(         'post_type'      => 'post',         'post_status'    => 'publish',         'paged'          => get_query_var( 'paged' )     );      global $wp_query;     $wp_query = new WP_Query( $args );      if ( have_posts() ) :         while ( have_posts() ) : the_post(); ?>

                     <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('category-thumb-2'); ?>

<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?>

          <?php         endwhile;         do_action( 'genesis_after_endwhile' );     endif;      wp_reset_query(); }  add_action( 'genesis_loop', 'rock_custom_loop' ); remove_action( 'genesis_loop', 'genesis_do_loop' );   genesis();   So I hope you can help find the bug (Subcategories + pagination)!  I have attached the following 2 pictures for visualization

I have added a custom/secondary query to a template file/custom page template; how can I make WordPress use my custom query for pagination, instead of using the main query loop's pagination?  Addendum  I have modified the main loop query via . Why isn't pagination working, and how do I fix it?


, one of our colleagues asked if it is possible to find the shape parameters of a $Beta(\alpha,~\beta)$ distribution given knowledge about its $\mu~(mean)$ and $variance$.  However, my question is how in R I can find shape parameters of a $Beta(\alpha,~\beta)$ distribution given only its quantiles (say, lower quantile is "$x = some~known~number$" and upper quantile is "$y = some~known~number$")?

Suppose I have two points $(p_1,x_1)$ and $(p_2,x_2)$ where $p_i$ is a probability on the beta CDF and $x_i$ is a value on that same CDF.  How would I go about determining the beta distribution shape parameters $\alpha$ and $\beta$ with only these two points?  To clarify, I'm assuming I already know the lower and upper bounds of the distribution L and U.


Let's say I have a god in the battlefield for more than one turn. And this turn I summon a creature that "completes" my devotion to the god. Can the god attack this turn? or it is affected by the summon sickness?

Note: this is intended to be a canonical question about summoning sickness.  "Summoning sickness", broadly, is the rule that stops you from attacking or paying {T} costs with a creature that you just played. But how exactly does it work? How does it interact with other rules and effects?  For example, if I'm trying to figure out how a creature is affected:   Does the status matter (tapped/untapped, face down/face up, etc.)? What if it came into play, but I didn't cast it? What if it's a token? What if it was on the battlefield when my turn started, but it wasn't a creature? What if it stops being a creature? What if it's a creature and also another card type? What if it's a double-faced card that just transformed? What if it changes control? What if it's a copy of another creature? Which of the creature's activated abilities can I use? Are any of its other abilities affected? Can I tap the creature to pay a cost that is not a {T} cost?   (These examples are primarily taken from questions about summoning sickness that have already been asked on the site)


Given that we have a set S of size $n$, how many subsets of size $j$ are there, such that for each pair of these subsets the intersection has size $\leq k$ (where $n \geq j \geq k$). Looking at the problem I feel that it must have an exact solution, but I am really struggling to come up with one. Alternatively, if there is not an exact solution, does a good lower bound exist?

Assume I have a set $S$ of $N$ elements and I create subsets with $k$ elements from it. With no additional property the number of possible such subsets will be $N \choose k$. Now I want my subsets to satisfy some additional rules $R_i$: Given a set $X$ of subsets of $S$ with $k$ elements (i.e. $\forall A \in X, A \subset S , \#A=k$), $X$ satisfies $R_i$ if and only if for all $A$ and $B$ in $X$, $A$ and $B$ share at most $i$ elements, i.e. $\forall A , B \in X, \#(A \cap B) \le i$. Let's call $S_i$ the set of all such $X$ satisfying $R_i$. I want to know how large a set satisfying $R_i$ can be, i.e. what is $M_i = \max_{X \in S_i} \#X $ For example if $N=1000$ and $k=10$, trivially we have $M_9 = {1000 \choose 10}$: the largest ensemble of subsets of $10$ elements that share at most $9$ with one another is exactly the set of all possible combinations of $10$ elements out of $1000$. Similarly at the other extreme, still for $N=1000$ and $k=10$, we have $M_0 = 1000/10=100$. Is there a formula or clever (not brute force) algorithm to compute other less trivial cases for $i=1,2,\dots8$? BTW even if there is a nice formula, I'll ultimately want to implement a way to get a maximal $X$...


does java Graphics or Graphics2D class uses graphics card? I am trying to draw a ton of things inside paintComponent() method in my JPanel, and I'm scared that it might take longer than it should.

I'm having performance oddities with Java2D. I know of the sun.java2d.opengl VM parameter to enable 3D acceleration for 2D, but even using that has some weird issues.   Here are results of tests I ran:  Drawing a 25x18 map with 32x32 pixel tiles on a JComponent Image 1 = .bmp format, Image 2 = A .png format  Without -Dsun.java2d.opengl=true  120 FPS using .BMP image 1 13 FPS using .PNG image 2  With -Dsun.java2d.opengl=true  12 FPS using .BMP image 1 700 FPS using .PNG image 2  Without acceleration, I'm assuming some kind of transformation is taking place with every drawImage() I do in software, and is pulling down the FPS considerably in the case of .PNG. Why though, with acceleration, would the results switch (and PNG actually performs incredibly faster)?! Craziness!  .BMP Image 1 is translated to an image type of TYPE_INT_RGB. .PNG Image 2 is translated to an image type of TYPE_CUSTOM. In order to get consistent speed with and without opengl acceleration, I have to create a new BufferedImage with an image type of TYPE_INT_ARGB, and draw Image 1 or Image 2 to this new image.   Here are the results running with that:  Without -Dsun.java2d.opengl=true  120 FPS using .BMP image 1 120 FPS using .PNG image 2  With -Dsun.java2d.opengl=true  700 FPS using .BMP image 1 700 FPS using .PNG image 2  My real question is, can I assume that TYPE_INT_ARGB will be the native image type for all systems and platforms? I'm assuming this value could be different. Is there some way for me to get the native value so that I can always create new BufferedImages for maximum performance?   Thanks in advance...


I'm new here! I was wondering if my PC can run Ubuntu and I don't know how to check it... My system is: Processor: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz RAM: 4GB (2,70GB AVAILABLE) 32 BITS  Can somebody help me pleaseee?? Thankssss

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


If I want to achieve something like the following:    where the text before the equaions is left-justified, how can I do that? So far I've been using stuff like  \llap{ Which gives us \hspace{3cm}} f;g;h = fg;h = fgh = f;gh   where I have to tweak the amount of hspace each time. I'm often, but not always, doing this inside the gather environment.  I suppose I could make an array with lcc columns, and put some \hfill in the left column, but how do I tell it to center the line on the middle column?

I have a document I am trying to copy to learn TeX. Here is what I have encountered: How can I have the "or" in the equation. This is what I have right now:  \[ f = ma; \]  But $a$ is the change in velocity,  \[ f = m \frac{dv}{dt};\] \[ f = m  \frac{d^2y}{dt^2};\]   Edit: Trying out Stefan's answer


I am wondering how I can concatenate a row of cells with comma separated values but exclude empty cells.   For Example the list would be:  A1 - Dog  B1 - "empty cell"  C1 - Cat  I am looking for a formula that would return ---> Dog, Cat  Really appreciate your help!

To concatenate a certain four cells, I'd use:  =CONCATENATE(A2,",",C2",",D2,",",F2)   This would make it so that...   A2 = "Matthew" C2 = "Mark" D2 = "Luke" F2 = "John"   would result in Matthew,Mark,Luke,John.  But we run into problems with something like...   A2 = "Jesus" C2 = "" D2 = "Mary" F2 = "Joseph"   which would result in Jesus,,Mary,Joseph.  Here, the extra comma is undesired. Is there a way to gracefully handle this so that all non-blank cells are included in the comma-separated list, while avoiding the addition of unnecessary commas when some cells are blank?  Certainly, this can be done with a fair number of nested IFs, but I really want to avoid that if possible. Can it be done with native Excel functions, or perhaps an array formula? Or would one have to resort to VB Script for something like this?


_g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for  ‘gio-vfs’ # Error constructing proxy for org.gnome.Terminal:/org/gnome /Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal:  Timeout was reached

I just upgraded from Ubuntu 16.04 to 18.04. My workflow is to connect from Windows using VcXsrv to Ubuntu (ssh with X tunneling), starting a xterm on Ubuntu. Inside the xterm I am typing gnome-terminal to get a gnome-terminal. Since the upgrade this is not working anymore. I am getting $ gnome-terminal   # Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.   # Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Fehler beim Aufruf von StartServiceByName für org.gnome.Terminal: Zeitüberschreitung wurde erreicht    or when starting with English locale $ LANG=en_US.utf8 gnome-terminal   # Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.   # Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached  I am not always getting the first line, but I am always gettint the timeout error. Digging more into the issue I found out  sudo gnome-terminal works gnome-terminal works when run in a xterm when locally logged in on the PC when I am also logged in locally on the PC then gnome-terminal in the remote session's xterm opens a gnome-terminal on the local session on the PC (still getting the first error line about registering with accessibility bus) when I am also logged in over rdp (Windows network connection) then a gnome-terminal in the ssh session opens a gnome-terminal in the xrdp session when I login over rdp (Windows network connection), logoff there, then gnome-terminal can open a gnome-terminal  What can I do to get gnome-terminal in a remote session's xterm to work?


Every explanation video about special relativity comes with a constantly moving train and a vertical (according to the train's speed direction) mirror clock. So first of all, why in the classical experiment (perpendicular bouncing of light), we propose time dilation, but we do not propose that the distance between the roof and the floor of the train (where the mirrors are placed) has contracted ? (I have only see length contraction only in the direction of movement but not in the perpendicular direction). Also, what happens to this thought experiment if we replace the perpendicular mirror clock with a horizontal one, meaning that the light between the mirrors travels in the same direction (back and forth) with that of the train ? So let's suppose the train is moving from left to right with a constant speed. We have placed two mirrors, one on the back of the train (left) and one on the front (right). The light bounces between the two mirrors back and forth. BUT, when the light travels from the back of the train to the front, it needs to cover more distance than when it travels from the front to the back, because in the first case it travels along with the train, where in the second case it travels in the opposite direction. So a stationary observer would have to say that from back to front the time passes slower but from front to back the time passes faster ? That doesn't make any sense. Any help to understand this ?

In Feynman's Lectures on Physics , chapter 15, page 6 he writes about 2 identical, synchronized light signal clocks. These are clocks that consist of a rod (meter stick) with a mirror at each end, and the light  goes up and down between the mirrors,  making a ,click each time it goes down. He describes giving one of these clocks  to a man flying out in space, while the other remains stationary. The man in the space ship mounts the clock perpendicular to the motion of the spaceship. Feynman then writes:      "the length of the rod will not change. How do we know that   perpendicular lengths do not change? The men can agree to make marks   on each other's y-meter stick as they pass each other. By symmetry,   the two marks must come a the same y- and y' coordinates, since   otherwise, when they get together to compare results, one mark will be   above or below the other, and so we could tell who was really moving."   what exactly is the "test" with the marking of meter-sticks that Feynman is describing? why would it violate relativity, since it seems the person in the space ship would be looking outside? why would a change in a perpendicular length violate relativity, but not a change in parallel length--couldn't the men also make marks on each other's sticks, in the case of parallel lengths?  Thank you!


I need help about proving the following sequent:  $$ \vdash Q \rightarrow (P \rightarrow Q) $$  I tried to prove it by trying to introduce a conditional proof, but somehow can't get the suppositions correctly in the beginning. I would appreciate some help.   Additionally, here is another similar sequent I've supposedly proved, but not completely sure:   $$ \vdash Q \rightarrow (P \rightarrow P) $$    Explanations for the proof:  CP: Conditional Proof Introduction  A: Assumption  Leftmost Column: Score-board for keeping track of suppositions.  I'd appreciate any help and suggestions.

Firstly, how do I read it? Is below right? With braces   $$p \vdash (q \Rightarrow p)$$  The given proof is:    ${p}$, premise ${q}$, assumption  $p$ by (1) // what???  ${q} \Rightarrow p$ by implication introduction with 2 and 2.1 QED...    I can't really get the link between $p$ and $q$ in 2.1 ...


When I want to declare a iterator for vector, why do I need to use typename?  For example:  typename vector<T>::iterator i;   If I remove the keyword of typename then the program simply does not work. What I have written is:  #include <iostream> #include <string> #include <vector>  using namespace std;  template <class T>  class MyClass {   private:     vector<T>  array;    public:     MyClass ( T * begin,int n ) : array(n)     {       copy( begin, begin + n, array.begin());     }      void List()     {       typename vector<T>::iterator i;       for( i = array.begin(); i != array.end(); ++i )         cout << * i << "," ;     }    };   int main() {   string array[4] = { "Tom","Jack","Mary","John"};   MyClass<string>obj(array,4);   obj.List();   return 0; }    Any help would be appreciated.

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


I recently switched my media center back to Ubuntu 16.0.4 from Windows 7. I'm running separate TV Show and Movie drives, which contain all of the content for Plex. My Movie drive mounted perfectly fine, and I was able to configure it via fstab. However, my TV show drive shows bad sectors, and won't mount. Being that this drive is the one being written to the most (new content added daily, and also watched constantly), it makes sense that it would give out before the other.  I've ordered a new WD Gold drive of the same capacity to replace it, but I need to know if there is a way to recover the data stored on here, and copy it to the new drive.

An external 3½" HDD seems to be in danger of failing — it's making .  I've acquired a replacement drive, and want to know the best strategy to get the data off of the dubious drive with the best chance of saving as much as possible.  There are some directories that are more important than others.  However, I'm guessing that picking and choosing directories is going to reduce my chances of saving the whole thing.  I would also have to mount it, dump a file listing, and then unmount it in order to be able to effectively prioritize directories.  Adding in the fact that it's time-consuming to do this, I'm leaning away from this approach.  I've considered just using dd, but I'm not sure how it would handle read errors or other problems that might prevent only certain parts of the data from being rescued, or which could be overcome with some retries, but not so many that they endanger other parts of the drive from being saved.  I guess ideally it would do a single pass to get as much as possible and then go back to retry anything that was missed due to errors.  Is it possible that copying more slowly — e.g. pausing every x MB/GB — would be better than just running the operation full tilt, for example to avoid any overheating issues?  For the "where is your backup" crowd: this actually is my backup drive, but it also contains some non-critical and bulky stuff, like music, that aren't backups, i.e. aren't backed up.  The drive has not exhibited any clear signs of failure other than this somewhat ominous sound.  I did have to fsck a few errors recently — orphaned inodes, incorrect free blocks/inodes counts, inode bitmap differences, zero dtime on deleted inodes; about 20 errors in all.  The filesystem of the partition is ext3.


Now I know this question has been posted a lot but I cant find a satisfying answer anywhere on the internet.  So 2x4GB vs 1X8GB.  What are all the pros and cons in terms of speed, performance, temperatures and power consumption?  PS: I dont want to hear anything related to cost or saving slots for future upgrades.

I'm building a Core  system which supports dual-channel memory (up to 16 GB in four DIMMs), my target is 8 GB. From the performance perspective, is it better to have two times 4 GB or four times 2 GB?


I saw this in someone's code: y = img_index // num_images  where img_index is a running index and num_images is 3. When I mess around with // in , it seems to act just like a division sign (i.e. one forward slash). I was just wondering if there is any reason for having double forward slashes?

Is there a benefit to using one over the other? In Python 2, they both seem to return the same results:  >>> 6/3 2 >>> 6//3 2


I installed Docker but found that it used up a lot of my root partition and got a warning about it being full. When I opened gparted, I found out that I have this big chunk of unallocated space at the end of my drive that I had somehow overlooked. When I try to extend the root or home partitions, both my swap and boot partitions are in the way. How would I re-partition my drive so that boot and swap are out of the way and both root and home are able to extend into my free space?

I Installed Ubuntu 16.04 LTS next to Windows 10. I decided to increase my Ubuntu partition because I don't have enough space for apps, So i went to Windows 10 and shrink my larger Partition and now I have 50 GB of unallocated space.. So my question is:  How can I safely expand my Ubuntu partion using this unallocated space? I also have a bootable pendrive with Ubuntu .iso


Me (US citizen) traveling with fiancee (EU citizen been to the US several times with ESTA) to Atlanta.  Should we use the visitors line together or can she go through the citizens line with me?  Most importantly we dont want to be seperated. Dont really care which line we go through.  Thanks!

I will soon travel to the US for the first time.  I am not a US citizen, but I will travel together with one.  We will land in ATL and then proceed to a connecting flight. I know I will have to clear customs in ATL.  My ESTA application has been approved, but I read that since I never have travelled to the US before, I will have to clear immigration through a old-fashioned booth with a immigration officer, and I won't be able to use the electronic kiosks.  As my travel companion is a citizen, they'll not be subject to this restriction.  What is the best course of action? Should they queue with me, or should we proceed our separate ways?  I'd like to proceed together, but I don't know if it is allowed.


I want to check for the existence of a file on a remote server - Current code: FUNCTION CheckFiles(targetServer, prefix)     ON ERROR RESUME NEXT     Dim xmlhttp     fileURL = "<path omitted>"     Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")     xmlhttp.open "GET", fileURL, False     xmlhttp.send     If(Err.Number<>0) then         Response.Write "Could not connect to remote server"     else         Select Case Cint(xmlhttp.status)             Case 200, 202, 302                 Set xmlhttp = Nothing                 DoesFileExist = True             Case Else                 Set xmlhttp = Nothing                 DoesFileExist = False         End Select     end if     ON ERROR GOTO 0 End FUNCTION  After reading some more examples with a sample similar to this it's always used with a web URL (should have been obvious to me by the ServerXMLHTTP but anyways... Is it possible to perform something like this but using the Windows file sharing method? For example: "\\"+targetServer+"\c$\path1\path2\path3\"+prefix+"-filename.txt"

Is there a good way to access network shares from within a VBS script, with alternative credentials (not the credentials with which the VBS script is running)?  The intention is to perform two tasks:   programmatically navigate a remote share file structure, in order to confirm that a couple of remote files exist, and copy one file over the other (both remote) copy files from a local drive (accessed with local username / permissions) to a remote drive (accessed with the alternate credentials)   As far as I can tell FSO (Scripting.FileSystemObject) is out of the picture, because it always runs with the credentials of the application using it - which would be the local machine user.(?)  The only viable-seeming approach I have found while googling to prepare a Batch file (or extended call to "cmd.exe") that uses "net use" to provide the remote share credentials, and then copies the files with robocopy or the like, from within the same command-shell "session". This would work OK for copying/deploying files from the local drive to the remote share, but it would ve very complicated and brittle to do any sort of file system browsing (like you would do with FSO) in this way.  Another possibility I have considered involves having two scripting sessions - you call the script (providing the alternate credentials in the command line) and it runs a cmd.exe session, which first does a "net use" to map the remote share to a temporary local drive, then runs itself in an "actually do stuff" mode and uses FSO, then when it's done (back in the cmd.exe shell) disconnects the temporary drive with "net use" again. This is clunky (multiple windows, temporary drive...) and I'm not even sure it would work.   Does anybody know either way, or know of a viable alternative? (sticking to VBScript / WScript on a windows 2000 machine - no PowerShell!)


What languages still use the 'ge' prefix that was part of the Old English grammatical structure?  I've searched and found German, but am not sure that is the only one which still does.  I'm interested, because I am involved in a conversation regarding how we know what Old English sounded like. (I've seen this question:  but it didn't seem to provide the answer I'm seeking.)

The Germanic languages that I'm familiar with all use a prefix similar to ge- on past participles:  German: Ich habe mir den Fuß gebrochen. Dutch: Ik heb mijn voet gebroken.  But English doesn't do this at all:  English: I've broken my foot.  Where did this prefix come from? Did English ever have the ge- past participle prefix? If so, why was it lost?


How to calculate the following integral: $$I = \idotsint_V dx_1 \, dx_2 \cdots dx_k$$ where $$V = \big\langle 0\leq x_1 \leq 1, \space 0\leq x_2 \leq 1-x_1, \space \ldots, \space 0\leq x_k \leq 1-x_1-x_2-\cdots-x_{k-1} \big\rangle$$ I'm pretty sure that this is a well-known integral, and it is equal to $\dfrac{1}{k!}$, but can't prove it.

It's rather tedious to show using Fubini's Theorem and induction on $n$ that the volume of the region $x_1+x_2+...+x_n \leq 1$ with $x_1,...,x_n$ nonnegative is $\frac{1}{n!}$.  Is there an easier way to see this?


Let $R$ be a an Equivalence relation on $\Bbb{R}$ defined by: $$aRb \Leftrightarrow (a-b)\in \Bbb{Z}$$ What is the cardinality of $|\Bbb{R}/R|$?   where $\Bbb{R}/R$ is the quotient set of $\Bbb{R}$ under $R$.

R is an equivalence relation defined as $xRy \Leftrightarrow a - b$ is an integer.  What is the cardinality of the quotient of $\mathbb R$ in respect to R? How would you prove it?  I thought about a bijection between $[0,1)$ to the quotient of $\mathbb R$ in respect to R, but can't figure out to prove it formally.


I want to encrypt the admin/members passwords, but I don't know if the MD5 is still strong for that, or became weak. And what is the strong alternatives for encrypting the passwords like MD5 in the past.

It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection.  This question,   suggests that hashing multiple times may be a good idea, whereas  suggests using salt.  I'm using PHP. I want a safe and fast password encryption system. Hashing a password a million times may be safer, but also slower. How to achieve a good balance between speed and safety? Also, I'd prefer the result to have a constant number of characters.   The hashing mechanism must be available in PHP It must be safe It can use salt (in this case, are all salts equally good? Is there any way to generate good salts?)   Also, should I store two fields in the database (one using MD5 and another one using SHA, for example)? Would it make it safer or unsafer?  In case I wasn't clear enough, I want to know which hashing function(s) to use and how to pick a good salt in order to have a safe and fast password protection mechanism.  Related questions that don't quite cover my question:


Correct me if i am wrong, if we cut 2mm from eyebrow hair, it will grow 2mm and then stop growing, or if we cut 5mm, then it will grow only 5mm. My question is, does hair know how long to grow ?

Some hair especially body hair regrows after trimming but stops growing after a while. What is the mechanism behind control of hair growth and how is the length limit determined?


I get the Year and Month using this Query given below  select CAST(YEAR(GETDATE()) AS VARCHAR )+'0'+CAST(MONTH(GETDATE()) AS VARCHAR)   But for this Month is printing Correctly but for 10 month its printing 010 can any one help on this.

As compared to say:  REPLICATE(@padchar, @len - LEN(@str)) + @str


If I have a table like this:  Name  | Start Time item1 | 4:00PM item1 | 6:00PM item2 | 3:00PM   How can I roll up the start time column so the end result would be  Name  | Start Time item1 | 4:00PM,6:00PM item2 | 3:00PM   Thanks!

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


Can I ride up to an enemy on my horse, grapple him and then drag him using the horses half movement speed?

When you move a grappled opponent, your speed is halved. However, while mounted, your mount is moving you. Is your mount's speed halved when you move a grappled opponent ?


I'm new to understanding render engines, is there any chance someone could explain a few things about them?  Specifically for Cycles vs Vray:   Are there any major differences between Blender Cycles and Vray for    function of rendering various things?  Is there anything the one struggles to do or is completely unable to do while the other can?  Are the two render engines compatible with one another at all for transferring various assets and setting up scenes? Like object    materials for example, would they have to be recreated in each?  Are there any advantages to using a purchased third party render engine like Vray over the free Cycles? (Especially if you are a    single user not a studio.)   In General:   Why are render additional render engines available? Do they offer different functions or unique traits? Why would you want to use a different one?

I wonder which render engine is faster? I mean, you have 2 identical scenes and render it using BI and Cycles. Which image will be generated faster? What will be the time difference?  Do you know any site (please post a link) which shows the results of such comparison?


The following example should show a square and a smaller copy of it inside, the commands xscale and yscale  work when I write the coordinates manually on both paths, but when I reference the coordinates defined previously, it doesn't.  \documentclass{minimal} \usepackage{tikz} \pagestyle{empty} \begin{document} \begin{tikzpicture} \coordinate (A) at (-1,1); \coordinate (B) at (1,1); \coordinate (C) at (1,-1); \coordinate (D) at (-1,-1); \draw (A) to (B) to (C) to (D) to cycle; \draw[xscale=0.5,yscale=0.5] (A) to (B) to (C) to (D) to cycle; \end{tikzpicture} \end{document}   This image shows the expected versus the obtained figure.    EDIT: Apparently I forgot to explicit my question, how to properly get this done? Apply scalings, or any transformation in general, to previously defined coordinates?

Say I have a triangle with vertices defined using  \coordinate (a) at (0,0); \coordinate (b) at (1,0); \coordinate (c) at (0,1);   Let us denote by T(x,y) the triangle defined by (a),(b) and (c) which is translated by a vector (x,y). I can now easily draw T(0,0) as follows:  \draw (a) -- (b) -- (c) -- cycle;   So far so good. Now, lets say that I want to plot the triangle T(2,3). Ideally, I would like to do something like:  \begin{scope}[shift={(2,3)}]     \draw (a) -- (b) -- (c) -- cycle; \end{scope}   However, as the coordinates were defined outside of the scope the transformation (translation in this case) won't effect them. See . What would be the smart way to do it? Or more generally:  What is the best way to reuse coordinates that are defined once under varying transformations?  Possible solution: Basing on the comment of @Qrrbrbirlbel I posted an answer. This answer however, is very limited and local - is the something more general?


I'm using this library with C# to connect and upload files to a server:   I'm able to connect to FTP sites, but attempts made with SFTP respond with a connection timeout.  Anyone have an example of what to do when establishing a connection with SFTP?  Here's an example of what I'm doing:  using (var ftpClient = new FtpClient(new FtpClientConfiguration                 {                     Host = FTPUrl,                     Username = FTPUser,                     Password = FTPPassword,                     Port = FTPPort, // using port 21 for ftp, and port 22 for sftp                     EncryptionType = FtpEncryption.Implicit,                     IgnoreCertificateErrors = true                 }))                 {                     await ftpClient.LoginAsync();                      // do something with ftp client                 }

Does a free .NET library exist with which I can upload a file to a SFTP (SSH FTP) server, which throws exceptions on problems with the upload and allows the monitoring of its progress?


How to show that $R^3$ is the direct sum of $W_1=$Span$(1,1,1)$ and $W_2=$Span$(\{1,0,0\}, \{1,1,0\})$?  So we write it as $R^3=W_1+W_2$ because every $(x_1, x_2, x_3)\in R^3$ can be written as $a((1,1,1)-(1,1,0))+b((1,1,0)-(1,0,0))+c(1,0,0)$   Do I have the correct direction?

We write linear combination  of two spans as $a(1,1,1)+b(1,0,0)+c(1,1,0)$. Any vector $v$ in $\mathbb{R}^3$ can be expressed as $(a+b+c, a+b, a)$. Also linear combination of $W_2$ cannot form vector in $W_1$ other than $(0,0,0)$, $W_1\cap W_2=(0,0,0)$, and therefore direct sum is $\mathbb{R}^3$.  I am not sure if my method is correct, so could anyone help?


Note: This is intended as a canonical question for a commonly seen problem here on Stack Overflow.  My Android app crashed. I  and found that the cause is a NullPointerException at the line  myEditText.setText(myString);   What is the problem and how do I fix it?

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?


I'm a newbie on Linux stuff and maybe the solution to my problem is obvious, but I need your help.  I decided to install Kubuntu 14.04 on my laptop (HP pavilion g6-2330sf) and the installation worked perfectly, but even if my Ethernet connection works, the wireless network refuses to be enabled.   So I spent a couple of hours trying to install drivers, NetworkManager etc... but nothing works, or should I say I can't make it work.  When typing the following command in the console $ sudo lshw -C network I get the following output:  *-network     description: Ethernet interface     product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller     vendor: Realtek Semiconductor Co., Ltd.     physical id: 0     bus info: pci@0000:06:00.0     logical name: eth0     version: 05     serial: 74:46:a0:85:dd:93     size: 100Mbits/s     capacity: 100Mbits/s     width: 64 bits     clock: 33MHz     capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation     configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8105e-1.fw ip=************** (knowingly hidden) latency=0 link=yes multicast=yes port=MII speed=100Mbits/s     resources: irq:46 ioport:2000(size=256) memory:f0204000_f0204fff memory:f0200000-f0203fff  *-network UNCLAIMED     description: Network controller     product: AR9485 Wireless Network Adapter     vendor: Qualcomm Atheros     physical id: 0     bus info: pci@0000:07:00.0     version: 01     width:64 bits     clock: 33MHz     capabilities: pm msi pciexpress bus_master cap_list     configuration: latency=0     resources: memory: f0100000-f017ffff memory:f0500000-f050ffff   Furthermore when using the command nmcli nm I get the following output:  RUNNING               STATE                 WIFI-HARDWARE   WIFI        WWAN-HARDWARE   WWAN running               connected             enabled         disabled    enabled         disabled   I already read the following Questions:        Could someone help me activate the Wireless network?

I'm assuming that at some point I may have mistakenly assigned the wrong driver to my wireless card while attempting to boost signal strength. Is there any commands that would allow me to reclaim my wifi card and set the correct drives?  It took a minute to find it, but I think this is the command that did it.   sudo apt-get install firmwire-b43-installer b43-fwcutter   which did not install, or this one,   sudo apt-get remove bcmwl-kernel-source   In the windows driver installer the files were netathr.inf and netathrx.inf. The program marked them with an error of which I can't remember.  I have re-installed bcmwl-kernel-source and nothing. I don't even know if it is related to my problem.   My card is   Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01).   I have Ubuntu 14.04 LTS in which I have just upgraded to in hopes that it would fix this same problem I experienced in 12.04 LTS.   I'm currently running wifi from a usb controller, but I need the internal card to work because this wifi usb controller is not mine, nor is it small. It is very large for what it is and I would much rather have my laptop work like it is supposed to.  sudo lshw -C network    *-network UNCLAIMED        description: Network controller        product: AR9285 Wireless Network Adapter (PCI-Express)        vendor: Qualcomm Atheros        physical id: 0        bus info: pci@0000:07:00.0        version: 01        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list        configuration: latency=0        resources: memory:f0100000-f010ffff   In case more info is needed.  rfkill list all  0: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no   nmcli nm  RUNNING         STATE           WIFI-HARDWARE   WIFI       WWAN-HARDWARE   WWAN       running         connected       enabled         enabled    enabled         enabled   iwconfig without usb controller  eth0      no wireless extensions.  lo        no wireless extensions.   What can I do to resolve this issue?  I have entered the following code with no result.  sudo apt-get install linux-firmware-nonfree wicd wicd-gtk wicd-daemon wicd-cli wicd-curses


Trying to prove $(A ∩ B) - C = (A - C) ∩ (B - C)$ Im stuck here on this problem:  $(A ∩ B) - C = \{x\mid x \in (A ∩ B) ∧ x \not\in C\}$  $(A ∩ B) - C = \{x\mid(x ∈ A ∧ x ∈ B) ∧ x ∉ C\}$  $(A ∩ B) - C = \{x\mid(x ∈ A ∧ x ∉ C) \lor (x ∈ B ∧ x ∉ C\}$  I'm stuck right about here because how do I change the or ($\wedge$) sign to the intersection sign ($\cap$).  Edit: step 3, changed the and to an or

Trying to prove $(A ∩ B) − C=(A − C) ∩ (B − C)$ Im stuck here on this problem:  $(A∩B)−C=\{x | x ∈ (A ∩ B)∧ x ∉ C\}$  $(A∩B)−C=\{x|(x ∈ A ∧ x ∈ B) ∧ x ∉ C\}$  $(A∩B)−C=\{x|(x ∈ A ∧ x ∉ C) \lor (x ∈ B ∧ x ∉ C)\}$  I'm stuck right about here because how do I change the or (v) sign to the intersection sign (∩).  Please don't link me to the other question like this, I had a typo in it.


Is it possible to develop a WinForms application which when deployed (of course on Windows) will not be dependent to .NET Framework? And How?  Okay, put it this way, I want all the dll's and stuffs to be included in my application, so when installed in a machine, the users don't have to install .NET Framework, something like that. Is it possible?

I would like to distribute my .NET programs without the .NET framework. Is it possible to compile a .NET program to machine code?


I have an open-source project that I'm having trouble defining. Where is the appropriate place to ask for advice?

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


This is not a new argument but I wanted to see what sort of counter-arguments are produced here. According to Wikipedia, the Sun's surface gravity is 28.02 times earth surface gravity, and the moon's surface gravity is 0.1654 times earth surface gravity.  Assumption set 1:  The angular diameter or apparent diameter of an object is:  2*arcsin(diameter-actual/2/distance to object)   For the sun and moon, these are very nearly the same (during an eclipse, the sun and moon appear to be almost exactly the same size), so  diameter-sun/2/distance to sun = diameter-moon/2/distance to moon   or  distance to sun / distance to moon = diameter-sun / diameter-moon   Assumption set 2:  SurfaceGravitySun = GravitationalParameterSun/HalfSunsDiameterSquared  SurfaceGravityMoon = GravitationalParameterMoon/HalfMoonsDiameterSquared  SunsGravityForceAtEarth = GravitationalParameterSun/DistanceToSunSquared  MoonsGravityForceAtEarth = GravitationalParameterMoon/DistanceToMoonSquared   where the GravatationalParameter is the Gravitational Constant multiplied by the mass of the Sun or Moon.  So...  SurfaceGravitySun * HalfSunsDiameterSquared = DistanceToSunSquared * SunsGravityForceAtEarth   and  SurfaceGravityMoon * HalfMoonsDiameterSquared = DistanceToMoonSquared * MoonsGravityForceAtEarth   If we divide the equations we get equation 1:  SurfaceGravitySun * HalfSunsDiameterSquared / SurfaceGravityMoon / HalfMoonsDiameterSquared =   DistanceToSunSquared*SunsGravityForceAtEarth / DistanceToMoonSquared / MoonsGravityForceAtEarth  Going back to Assumption set 1,  DistanceToSun/DistanceToMoon = DiamenterSun/DiameterMoon   which we can easily make into equation 2:  HalfDistanceToSunSquared/HalfDistanceToMoonSquared = HalfSunsDiameterSquared/HalfMoonsDiameterSquared   So now substitution of equation 2 into 1 yields...  SurfaceGravitySun * HalfDistanceToSunSquared / SurfaceGravityMoon / HalfDistanceToMoonSquared =  DistanceToSunSquared * SunsGravityForceAtEarth / DistanceToMoonSquared / MoonsGravityForceAtEarth   Removing and cancelling the Half's on the left side means the distance terms completely cancel, leaving equation 3:  SurfaceGravitySun / SurfaceGravityMoon = SunsGravityForceAtEarth / MoonsGravityForceAtEarth   Assumption set 3:  Lunar tides are stronger than solar tides, therefore SunsGravityForceAtEarth < MoonsGravityForce at earth.  Therefore  SurfaceGravityMoon > SurfaceGravitySun   Something's not right here, obviously. So what's wrong with the argument?

You have likely read in books that tides are mainly caused by the Moon. When the Moon is high in the sky, it pulls the water on the Earth upward and a high-tide happens. There is some  similar effect causing low-tides. They also say that the Sun does the same as well, but has smaller effect compared to the Moon.  Here's my question: Why is the Moon the major cause of tides? Why not the Sun? The Sun is extremely massive compared to the Moon. One might say, well, the Sun is much farther than the Moon. But I've got a simple answer: Just substitute those numbers in $a=\frac{GM}{d^2}$ and find gravitational acceleration for the Moon and then for the Sun (on Earth, by the way). You'll find something around $3.38$ $10^{-6}$ $g$ for the Moon and $6.05$ $10^{-4}$ $g$ for the Sun - I double checked it to make sure. As you can see, the sun pulls about $180$ times stronger on the Earth. Can anyone explain this? Thanks is advance.


I want to install Ubuntu, but keep my Windows 7 partition.  Do you have any ideas?  You can look at my screenshot:

Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions.   /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition)   Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function?


In a neon tester, how does the body complete the circuit even when it's insulated from the ground by footwear and the bulb glows? I mean is current flowing to the neon bulb?

How does the tester screwdriver work? If I put the tester screwdriver inside the "hot wire" of an electrical socket, it lits up if I press my finger against the metal cap on top of the screwdriver. This happens also if I stand on a surface of isolating material, such as wood. I read elsewhere that this happens due to stray capacitance formed by the "hot wire", the human body, and the ground. One has  $$ Z = R + \dfrac{1}{j \omega C}  $$  for the impedance, so if C  is high enough, the impedance should be close to r , the "effective resistance" of the formed circuit. Here I get lost; why r  is small enough to cause a current in the range of mA  even if I stand on an isolating surface?  So really what I am asking is how one may represent the system hot wire - screwdriver - human body - wooden floor - building - ground as an electrical circuit, and which parts of the physical system contribute to the resistance, capacitance (and inductance?) and in which proportion, even very approximately.


In this book there is a female engineer who uses 3 types of robots to do a lot of the maintenance. The type that interests me is "worm". These robots could join together into a longer links for cooperation for a specific task.

I am looking for the title of a novel that I only caught part of on audio. It takes place within our current time frame and deals with the Moon getting struck and fragmented into (initially) 7 pieces by a high-speed asteroid that they called "The Agent".  Within a few weeks of this episode, scientists figure out the the Moon will continue to break down in a cascade reaction over the next couple of years until the planet gets bombarded by so much debris that it sterilizes Earth. The governments of the world frantically start to build a series of ships using swarming concepts to evacuate the planet as much as possible... and that's all I have heard so far.  Thanks for any info.


I'm running on Windows and trying to get Wireshark to pick up my network traffic. It picks up all outbound and inbound traffic fine, except for a client/server I'm running on my local system. As it is, even when I'm sending packets through my LAN IP, it's still not picking up the traffic. Is something clever/stupid about Windows likely to be routing it so it doesn't travel through the network? Is there anything I can do to force the packets to meander down the intended path (ie. going out to my router and back in so Wireshark can see it)?  What I want is to ensure my packets, which are being sent out to 192.168.x.x don't get 'redirected' to 127.0.01 - which Wireshark cannot sniff. I suspect Windows is detecting I'm connecting to the same machine and is being 'clever' by skipping the network - and I need to stop it doing so.

Is there a way to get wireshark to capture packets sent from/to localhost?    When I monitor traffic going from my computer to another, or from another computer to my computer, then it works.  But from localhost to localhost does not register anything.


Suppose $V$ is a 3 -dimensional vector space and let $T: V \rightarrow V$ be a linear map such that $T^{3}=0$ and $T^{2} \neq 0$. Show that ${Id }-T$ is an isomorphism. Express its inverse in terms of powers of $T$. So if I come up with its inverse is it true that it is an isomorphism. Otherwise how to show this.

I think I'm supposed to prove that both $T$ and $I_V$ are isomorphic, but I'm not sure and even if that's the right way to go, how am I supposed to prove that $I_V$ is isomorphic. Or am I going about this all wrong. Please help.


I have a file in which more than 50,000 lines are there. How can I split the file into two or more based on the selected lines?  Suppose I want to split a file from line 10,000 to line 40,000.

Say I have a huge text file (>2GB) and I just want to cat the lines X to Y (e.g. 57890000 to 57890010).  From what I understand I can do this by piping head into tail or viceversa, i.e.   head -A /path/to/file | tail -B   or alternatively  tail -C /path/to/file | head -D   where A,B,C and D can be computed from the number of lines in the file, X and Y.  But there are two problems with this approach:   You have to compute A,B,C and D. The commands could pipe to each other many more lines than I am interested in reading (e.g. if I am reading just a few lines in the middle of a huge file)   Is there a way to have the shell just work with and output the lines I want? (while providing only X and Y)?


This is the theorem If $G$ is a graph, there are at least $2$ vertices(points ) always have the same degree.  e.g:  I have graph $G$, $(U,V)$ ,$4$ vertices $(e1,e2,e3,e4)$ ,and $4$ edges. So the degree we have $(2,2,2,2)$,  and if i put one vertice ,and obtain new graph or new vertice, and so on the graph always have a same degree ,at least  $2$ ..  How i can proof it with pigeon hole principle or others? Can you give me a clu?

I want to prove whether it is possible for a graph to have different degrees for each vertex. I think that it can be possible with an example, but I can't prove it with mathematics.


How do I get the icon that Windows uses by default for a specified file type?

As seen in  for common file types, it's quite possible for a windows program to get the icons for a registered file type using the C++ Shell API.  These icons may or may not exist on disk - for example, we wanted to make our own custom file browser and want to display the system-associated icon with the file.  Is there a native C# way to get the icons for various file types (and if so, how) or must it be done through PInvoke with shell API?  And as a follow up, if there is a native .NET way of doing it, is there a cross-platform way of doing it?


I am a beginner who just installed ubuntu 18.04 just fews days ago, and I am currently studying how to do everything from the terminal.  Chrome is a necessary application for me, for example, and I have already known how to run it by using the command line like/opt/google/chrome/chrome, which is the default path to chrome. But for Firefox, which was installed initially, I just need to type firefox and the browser works just fine.  And now I'm wondering if I can open Chrome in a similar way rather than typing the complicated path. Anyone has ideas?

When I have installed a package using apt, is there a way to find out by which command(s) I can run the installed program(s)?  For instance, the package httpcode is not available as httpcode, and the package description (apt show httpcode) does not explain how to run it. How could I have found out that it’s run via hc from the command line?  There are two slightly hacky workarounds I found:    Assuming that programs are by default installed in usr/bin, I ran ls -ltc | head -n 10 to find recenlty touched files there, and indeed I found hc. Similarly to 1, dpkg -L httpcode returns a list of files created by installing the package, which also lists /usr/bin/hc.   Is there a better solution to this problem that doesn’t hinge upon the intuition of where the program might be stored on disk?  I also found that man httpcode does open the man page of the program, even though I called it with the package name as argument. Does this always work (if the program provides a manpage)?


I had a requirement that using the main method arguments we have to do operations like Sum,Subtraction,Multiplication... For example: If the input is java Compute 1 2 3 add the last argument should be taken as the input for Addition and do operation...  I have written follwing code for requirement but its is not going inside if condtion and execute the code..can any one help ... thanq    package com.project;  public class Compute  {  public static void main(String[] args)  {      int Last = args.length-1;     String method[] = {"add","sub","mul"};     if(args[Last] == method[0])     {         //System.out.println(method[0]);         int sum = 0;         for(int i=0; i < args.length-1; i++)         {             sum += Integer.parseInt(args[i]);             System.out.println("Sum is:"+sum);          }     }else if(args[Last] == method[1])         {             //System.out.println(method[0]);             int sub = 0;             for(int i=0; i < args.length-1; i++)             {                 sub -= Integer.parseInt(args[i]);                 System.out.println("Substraction is:"+sub);             }         }else if(args[Last] == method[2])             {                 //System.out.println(method[0]);                 int mul = 0;                 for(int i=0; i < args.length-1; i++)                 {                     mul *= Integer.parseInt(args[i]);                     System.out.println("Multiplication is:"+mul);                 }     } } }

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?


A homophone is a word that is pronounced the same as another word but differs in meaning. Is there a name for two words with the same spelling but with different meanings? For example: Polish (someone from Poland) and polish (rubbing something to make it shiny).

What words change meaning when the first letter is capitalised? The only word with this property that comes to mind is polish/Polish (the pronunciation also changes in this case, but that's not a necessity part of what I'm asking for).


Given a polynomial, for example, 5x^4 - 1x^2 +2x^2 -3 +5x I create the following three arrays whose indexes match up with the variable,degree, and coefficient that each "item" in the polynomial has.  variableArray = [x,  , x, x, x] degreeArray   = [1, 1, 2, 2, 4]  //sorted on coefficentArray=[5, -3, 2, -1, 5]   I am attempting to write code that adds up all of the "items" with the same degrees and same variable, and returns a String of the new polynomial, so for instance what I'm looking for here would be 5x^4 + 1x^2 + 5x -3. Here is my function so far...      public static String putItTogether(int[] array,int[] array1, String[] array2, int count) {     int j = count; //count is number of items in arrays     StringBuilder builder = new StringBuilder();     for (int i=count; i<=0 ; i--) {          int answer = 0;          while (array[j] == array[j-1]) {                         //array = degrees //array1 = coefficients // array2 = variable               if (array2[j] == array2[j-1]) { //variable                     answer = array1[j] + array1[j-1];//coeff               }          j--;          }       String coefficientString = Integer.toString(answer);       String degreeString = Integer.toString(count);       builder.append(coefficientString);       if (array2[i].equals("x")) {           builder.append("x");       }       if (array[j] != 1) {          builder.append("^");          builder.append(degreeString);       }     }     return builder.toString(); }   The call...  String daAnswer = putItTogether(degreeArray, coefficientArray, variableArray, degreeCount);     System.out.println(daAnswer);   For whatever reason, it's not printing out anything. If you could look over my code, and see where I'm going wrong I'd really appreciate it. Also, any questions about what I'm asking please don't hesitate to ask!


Is the series $$\sum_\limits{n=1}^\infty\frac{n}{n^3+1}$$ convergent or divergent? My answer is the following. Could anyone tell me if it is correct? Since $$0<\frac{n}{n^3+1}<\frac{1}{n^2}\;\;,\;\;\;\;\forall n\in\mathbb{N}$$ and the series $$\sum_\limits{n=1}^\infty\frac{1}{n^2}$$ is convergent, by applying comparison test, we get that the series $$\sum_\limits{n=1}^\infty\frac{n}{n^3+1}$$ is convergent too.

Hi I have two questions.  First, $\sum_{n=1}^\infty \frac{n}{n^3+1}$.   Is it divergent or convergent? I think it seems like it is positive and decreasing function so we can apply integral test. however, integrating this function is not an easy task.  Is there any other test I can use?   Second, $\sum_{n=1}^\infty \frac{n^2+1}{n^3+1}$.   I can't think of any test,,   Can anyone give me an idea please~