Background  I was recently banned from asking questions, and appealed my case . As I think about my problems, I have begun to realize that I was never notified of the question-ban policy - neither were others like me. To remedy the situation, I propose a question ban meter in a user's profile, which shows how close they are to being banned. The meter would look somewhat like this:   (source: )    New users would begin in the middle (where green and yellow meet.) Using the secretive algorithm, the users would then be able to see if they needed to improve questions (in the red) or if they should continue on their current path (in the blue).  This meter would also be used to help people who have been banned. Their pointer would show up to the right of the red, and as they gradually improved it would slide towards the meter until they were able to ask questions again.  Uses   Users in the blue could give up their "question expertise" to help question banned users. This would add a small amount of user input on the ban algorithm, effectively adding much needed community moderation.   Alternative Idea: These "trusted users" (different from [this][4]) would be able to turn down the severity of the ban from permanent to temporary. The notches would be as follows:   Vote to have this ban reviewed (10 "Question Points") One Month Ban (50 "Question Points") One Week Ban (100 "Question Points") One Day Ban (250 "Question Points") Unbanned (500 "Question Points")  Also, users who were able to do this could pool their points together - this would make it even more of a community moderation process.   People who have a good question reputation would show up further on the list of unanswered questions - this would mean that Stack Overflow visitors could find their answers quicker. It would also act as another incentive for people to ask thoughtful questions.  This would help new users realize that there is a question ban in effect, potentially lowering the number of ban appeals on the    Thoughts? Comments? Questions? Please let me know if you think that this is a good idea (or not) in comments and answer sections.  Edit  Many users have said that Stackoverflow could be "gamed" if this were to go into effect. Before you say that, please try to answer these questions:   What do you mean by "gamed"? If "gamed" means using the system to make sure that questions are not downvoted, or to realize when to focus more on the question... then that is not "gaming" the system - it is using it in the appropriate manner. This is somewhat unrelated to the origninal question, but they are definitely intwined: What is the reason for the secrecy of the algorithm? If people knew what it was, most people would try to avoid doing things that would hurt themselves instead of using it to somehow "ruin" the experience for others.

So many interesting questions get asked on Stack Overflow and then immediately closed (or worse yet, closed and re-opened for days on end) because they're subjective, argumentative, and fundamentally unanswerable due to our lack of omniscience: without the ability to see into the future and/or know the secret motivations of companies and their developers, we are left to make wildly varying (un)informed guesses. The obvious solution to this is to add a  feature to the Ask a Question page. Similar to the current "Related Questions" feature, this could be used to answer otherwise-unanswerable questions before they're asked, thus saving everyone time and frustration. I propose a simple system whereby a web cam is aimed at an ordinary  device, long recognized as one of the most accessible and accurate fortune-telling mechanisms available to modern society. A simple  could be placed under this rig and triggered in response to the user's typing. Once focus leaves the Title input field, a short delay will be triggered, followed by a bit of logic to capture the 8-ball's result and feed it through a simple OCR routine to produce the result.  So far as I'm aware, SO would be the first major Q&A site to implement such a feature...  Examples:            ...another UV resurrection...


This is something i've observed a long time ago, and i never really got an answer to that (never really looked for one, just thinked about). But, when you have a light source behind you, and right in front of you there is an object (doesn't matte what it is), if you position your hand, arm, whatever, so that your shadow is close to the object's shadow, when you get really close, the shadows "unite", even if both you and the object are not touching at all. Sorry if this is not the place to ask, but doesn't hurt to ask! Thanks

I was laying on my bed, reading a book when the sun shone through the windows on my left. I happened to look at the wall on my right and noticed this very strange effect. The shadow of my elbow, when near the pages of the book, joined up with the shadow of the book even though I wasn't physically touching it.   I have posted :The video seems to be the wrong way up, but you still get the idea of what is happening.  What is causing this? Some sort of optical illusion where the light gets bent?  Coincidentally, I have been wondering about a similar effect recently where if you focus your eye on a nearby object, say, your finger, objects behind it in the distance seem to get curved/distorted around the edge of your finger. It seems awfully related...  EDIT: I could see the bulge with my bare eyes to the same extent as in the video! The room was well light and the wall was indeed quite bright.


NOTE: This question was previosuly marked as duplicate by someone, but it was not a duplicated of the suggested alternative post. Moderators, please read carefully before dismissing someone's question as duplicate.  Google seems to use the Title tag as the primary source for determining sitelink titles.  However, I noticed that for some sites, the page title is not the same as the sitelink title.  For example, Airbnb has a sitelink titled 'Business Travel':    But when you enter the page the title is actually 'Corporate & Business Travel on Airbnb':    Does anyone know how to determine the title of a sitelink, and make it different than the target page's title?  Thanks!  *Note: The precise process of determining the sitelink title is automated, and Google is not transparent about it at the moment.


Why there is this white space above my containers,     * {     padding: 0;     margin: 0; }  .hamburger {     position: relative;     background: #eee; }  .bar {     background: orange;     position: relative;     margin-top: 150px;  }

hi

hi

hi

hi

hi

hi

hi

hi

hi

     When i add margin-top: 150px for .bar elements seems i get white space above the whole container not inside it, this is unexplained to me!!  Can anyone explain this bahavior??

So essentially does margin collapsing occur when you don't set any margin or padding or border to a given div element?


I'm currently having windows 10 build 1803, and I'm interested in some features of windows 10 1809. However, Windows update indicates that my software is up to date. Microsoft provides with an updater to manually update to version 1809, however, on my computer, it fails during installation, and reverts changes.  Another solution to get these features would be to sign up for the Windows Insider Program, but that means that I would have more unstable versions of Windows.  Is there a way to indicate to windows update that you wish to get the newest upgrade, or in any way to accelerate the process of making this update available on my computer?  EDIT:  I've had several boot problems due to a clone of my system to a newest disk that I've added to my computer. The boot process seems to have been very disturbed by the presence of two identicals boot routines and GPT tables. I've repaired my windows bootmanager and wiped my oldest disk. I've been able to get the update 1809 through the semi annual channel as suggested. It is currently downloading through windows update and I will try the installation afterwards

The Windows 10 October 2018 update (v1809) rollout got cancelled multiple times, however you can still get the ISO files of it. Is it somehow possible to update using the ISO files (without losing files) or to enforce an update over windows update?  I don't want to do a clean install because it would take me multiple days on the machine I want to upgrade, however I need to upgrade it because of some bugs fixed in the latest version.


I wonder what happens when I play with the return value of the main function.  I found that if I return an array variable from main (which is supposed to be the exit status) and print the exit status in shell, the output is always 56. I wonder why?  The C program:  int* main(void) {     static int x[3];     x[0]=89;     x[1]=15;     x[2]=10;     return x; }    I test it as follows:  gcc array_return.c -o array_return ./array_return echo $?   The output is always 56 even if I change the size of the array, or change the numbers in it. What does the number 56 mean?

What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related:


If I have two players and my investigator is blessed and has a resultant fight of 11 and rolls 8 successes, do I outright take 4 doom tokens off the ancient one? We spent 2-3 hours slogging through the game and getting hurt at every turn, but when the final battle came, it was quick and short due to this situation, surprising me that it was so easy to defeat the ancient one after all that.

In Arkham Horror you have to roll a cumulative number of successes equal to the number of players to knock off a doom token from the Elder God's health. If you reach the number of players worth of successes do you then stop counting for the player and move on or do you count the extra successes against the next doom token?  We played it so that you kept on adding them but it meant that we turned Nyalothotep into mince meat quite quickly (One Character was blessed had a fight of 6 a shotgun and Fight +1 skill card though)


Need someone to help calculate the total population for each region and print the regions name, population, and average population. States.txt (file): State           Population   SqMi      Region  ------------------------------------------ California           39.37   163.7       West Texas                29.36   268.6      South Florida              21.73    65.7      South New_York             19.33    54.7  NorthEast Pennsylvania         12.78    46.1  NorthEast Illinois             12.59    57.9    Midwest Ohio                 11.69    44.8    Midwest Georgia              10.71    59.4      South North_Carolina       10.60    53.8      South Michigan             9.97    96.7    Midwest  **Output should look like"" Region Total Average --------------------------- South 72.40 18.10 Midwest 34.25 11.42 NorthEast 32.11 16.05 West 39.37 39.37

Need someone to calculate the average area, in square miles, of the states listed in states.txt. States.txt (file): State           Population   SqMi      Region  ------------------------------------------ California           39.37   163.7       West Texas                29.36   268.6      South Florida              21.73    65.7      South New_York             19.33    54.7  NorthEast Pennsylvania         12.78    46.1  NorthEast Illinois             12.59    57.9    Midwest Ohio                 11.69    44.8    Midwest Georgia              10.71    59.4      South North_Carolina       10.60    53.8      South Michigan             9.97    96.7    Midwest  Output should look like this: Average Area: 82.85 square miles  Note my awk program will be ran like this: awk –f <file.awk> states.txt


I am trying to create a timeline of an athlete medical record including on this dates of specific events and also wether the athlete was injured or not. The data will come from an sql database. Any help would be appreciated   thanks   Doc James

Hello great TeX people :)  I am trying to create a timeline looking like     but with months down the side and with lines connected to dates.   I have been trying to modify the chronology package, but the "year" indication was way to deeply incooporated.   I have been trying with TikZ but unfortunately I really have not been able to produce anything close to the desired output.   How would you attack such a problem? how would you structure your code if trying to solve the same problem?


I have a manufacture dataset of 65 million rows corresponding to 65 millions distinct items.  Out of those 65 millions, I have 60,000 of them that failed a certain test, thus I have very imbalanced classes.   I have about 200 to 300 variables/features that describe them that are both categorical (2 levels or more) and numerical.  So    y = failed items = 1 or 0 (binary) X = $X_1$ ... $X_{300}$ (categorical and numeric).   What is the proper methodology or model to use to root cause the important variables that contribute to the failed items? In other words, how to I identify the top variables that may be responsible for the failure?

We already had multiple questions about unbalanced data when using , , ,  and a number of other similar questions, what makes it a very popular topic! Unfortunately, each of the questions seems to be algorithm-specific and I didn't find any general guidelines for dealing with unbalanced data.  Quoting , dealing with unbalanced data     (...) heavily depends on the learning method. Most general purpose   approaches have one (or several) ways to deal with this.   But when exactly should we worry about unbalanced data? Which algorithms are mostly affected by it and which are able to deal with it? Which algorithms would need us to balance the data? I am aware that discussing each of the algorithms would be impossible on Q&A site like this, I am rather looking for a general guidelines on when it could be a problem.


stringstream parser;  parser << 5; short top = 0; parser >> top; parser.str(""); //HERE I'M RESETTING parser  parser << 6; //DOESN'T PUT 6 INTO parser short bottom = 0; parser >> bottom;   Why doesn't it work?

I've tried several things already,  std::stringstream m; m.empty(); m.clear();   both of which don't work.


I have a database that I have inherited which has been left for a long time to grow and grow. 95% of this growth is caused by 1 log table used by our application. The database is 120GB and in full recovery mode. The compressed backups are around 10GB. The server is 2008. The log file is 3.5GB  After asking I have found that I can remove all data from this log table over 3 months old. This gives me 100GB of free space. I have also written an agent job to keep the log table at this level.  This means I will have roughly 100GB sat in this file forever (as long as no other table starts growing in way it hasn't previously or the agent job fails)   I would like to free some of this space up while leaving enough room for future growth which should be much less then it was before my agent job was put in.  So I don't want to shrink and then defrag indexes as this may require a lot of downtime and is almost always a bad idea.   Is dropping the database and restoring the 10GB backup an option? I'm not even sure if this will give me the desired result which is a smaller database with something like 2GB free in it's file for future growth.   Thanks

This question is asked in various forms here but the question boils down to:  I know shrinking a database is risky. In this case, I've removed so much data and I'll never use it again.   How can I shrink my database? What files do I shrink?  What should my considerations be while doing this?  Should I do anything after? What if it is a large database? Can I shrink it in smaller increments?


I have a narrow ensuite and so am looking for a space saving towel rail solution, such as .  Unfortunately, I believe the studs in my wall or located such that one is within my shower and the next is in the middle of the gap between the shower and sink where I would like to affix the towel rail.  Are there any plasterboard fixings that would be suitable to achieve this in order to hold to bath sheets and possibly a hand towel? I believe the two strongest are  and ?  Am I asking too much of my wall?  Thanks  Edit: Or are  better? What is everyone's thoughts on  Anchors?

I'm considering attaching a new towel rail to the drywall in my bathroom, with attachment points approximately marked by the yellow postit notes in this picture.    This is on the 21st floor of a condo building in Montreal (built in 2014). The building manager said the drywall is approximately 1" thick (a full inch! not a centimeter).   Is this really possible? (I haven't been able to get confirmation from anyone else). If the drywall is really 1" thick, will the usual drywall anchors be effective? Usually the pictures I see of drywall anchors have them exceed the thickness of the drywall by around 1/2", and have expanders which end up significantly expanded after the screw is inserted. However, most anchors are at most 1" long, and in a 1" thick drywall, there probably won't be much room for the expanders to expand. Will this decrease the effectiveness of the anchors? Another issue is the nearby thermostat/light switches. How do I make sure to avoid any of their wiring when drilling in the drywall anchors? Is it important to avoid them? Part of this I suppose comes down to how the wires are arranged behind thew all. Will they for example come bundled in a metal tube? (In this case hitting the metal tube may cause the tube to flex undesirably? Is there anything else I need to watch for? How can I tell if there's plumbing behind the wall? If I gently drill a small hole, poke into the hole with a toothpick and check there's nothing within an inch behind the wall to worry about, is that a guarantee I'll be fine?


I usually work with 2 additional display monitors with my Windows 10 laptop. I see 4 additional displays phantom screens in the display settings. The detect or disconnect this display doesn't work as well.  Even if I remove all the displays, I still 4 additional display. How should I remove those. I don't have or use the New Desktop in the Windows 10 when do WIN + TAB

After a recent update, or after I played around with installing Ionic Framework and Visual Studio 2015 Community Edition, right after a restart, I suddenly have not 2, but several monitors detected by Windows 10.   Screen 1 is my laptop screen, and screen 2 is my monitor, connected via HDMI. When they first appeared, some of them were duplicated in groups of 2, while others were extensions.  When I disconnect my monitor, these screens don't disappear, and even worse - I can't disconnect one of these "screens", so I have to duplicate it with my laptop screen.  I have alleviated all major symptoms of the problem, except for one more: The sound from the speakers embedded in my monitor has also ceased to work.  With all of that, I really don't want to fix any more symptoms, but want to get to the core of the problem and remove all of this junk.  I tried uninstalling Intel(R) HD Graphics 4600 drivers, but they got themselves re-installed and all of this junk re-appeared again. I tried several restarts obviously, and it didn't help. I tried disabling the device from the device manager and it didn't have any effect. Under the "Monitors" section of the Device Manager in Windows I have 4x "Generic Non-PnP Monitor", and 2x "Generic PnP Monitor". I tried restoring from a restore point but that failed miserably (with a memory error right at the start).  What might be causing it? And how can I fix it?


I want to perform various Linux commands/operations using python script. I will be using the output, verifying/processing it and continue with some more commands execution in my script, may be remote execution also sometimes.  I have tried with both os and subprocess modules. The caveat here is, I am not able to combine both of them i.e. system calls or commands executed from one module does not affect "program/python" environment variables rather only considered by that particular module.  For. ex.   os.chdir(dirname) os.system(cmd) # p = subprocess.Popen(cmd)   Now, here changes from os.chdir are not useful for subprocess call. We have to stick with any one of them. If I use subprocess, I have to pass/create shell commands for it.    Added: cwd= is a solution for subprocess.Popen but every time I would have to pass option cwd as argument to future commands, if they all should be run from that dir    Is there a better way where we can use both of these modules together?  Or  Is there any other better module available for command executions.  Also I would like to know "Pros-Cons/Caveats" of both these modules.

How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?


I've searched all over, seen some examples, but none of them are barely close to my challenge. See image attatched.    Obviously locking a column won't work. I'm out of ideas.

I want to display a table with 4/5 columns and possibly 100 rows (as in desktop app right now) in smartphones. The table cells are also editable. Now we want to port this desktop app to smartphones (Android / IOS), what will be the most optimized way of showing this on Smartphones.   ** I'm sure many people must've come across this problem by now, Is there some patterns or solution for displaying such kind of large data (editable) on smartphones.


I'm getting a NullPointerException when i'm checking if the length of the array is equal to 0 or not, and I can't find why it isn't working. Anyone could tell me what i'm doing wrong ? Here's my entire function code:      public static ArrayList<String> searchZone(Player p){     openConnection();     ArrayList<String> data = new ArrayList<String>();     WorldEditPlugin worldEdit = (WorldEditPlugin) Bukkit.getServer().getPluginManager().getPlugin("WorldEdit");     Selection selection = worldEdit.getSelection(p);     String query = "SELECT * FROM " + db + ".blocks";     ArrayList<String> res = executeQueryWe(query);     String[] items = res.toArray(new String[res.size()]);     int i = 0;     int iters = items.length;     while(i < iters){         try{         if(selection != null){             String[] locs = items[i].split(",");             World world = Bukkit.getServer().getWorld(locs[0]);             int x = Integer.valueOf(locs[1]);             int y = Integer.valueOf(locs[2]);             int z = Integer.valueOf(locs[3]);             Location loc = new Location(world, x, y ,z);             if(selection.contains(loc)){                  String query2 = "SELECT * FROM `blocks` WHERE `world`='" + world.getName() + "' AND `x`='" + x + "' AND `y`='" + y + "' AND `z`='" + z + "';";                 data = executeQuery(query2);             }         }         } catch(Exception e){             closeConnection();             p.sendMessage(prefix + ChatColor.RED + "An error occured while reading database");             break;         }         p.sendMessage(prefix + ChatColor.RED + "Please make a selection first");         break;     }     if(data.size() != 0){ //<---------------------------- ERROR COMES FROM HERE         closeConnection();         return data;     } else {         data.add("No entries has been found.");         closeConnection();         return data;     } }

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've noticed that if I wiggle my finger in an upwards and downwards direction on the home button on my iPhone 6S running iOS 9 half of the screen slides down; as shown here:    I can't find any documentation of what this is or any use for it (tapping the space just closes it, dragging it down pulls down the control centre). It's accessible from any app.   Would love to know what it is!

I was fooling around with iPhone 6 plus and found that when you place finger twice on finger scanner or rotate your finger on the scanner the currently running app or the menu views move down to half for the screen.     I'm not worried of this behavior but I am curious why such thing is happening.


In my Python 3 notebook in Azure Databricks, when I run this:  %scala import com.microsoft.azure.sqldb.spark.config.Config import com.microsoft.azure.sqldb.spark.connect._  val config = Config(Map(   "url"            -> "serverName.database.windows.net:1433",   "databasename"   -> "dbName",   "user"           -> "user@domain.com",   "password"       -> "password",   "encrypt"        -> "true",   "trustServerCertificate" -> "false",   "hostNameInCertificate"  -> "*.database.windows.net",   "loginTimeout"   -> "30",   "authentication" -> "ActiveDirectoryPassword",   "dbTable"        -> "dbo.TableName" ))  val collection = sqlContext.read.sqlDB(config) collection.show()   I get the error:  java.lang.NoClassDefFoundError: com/microsoft/aad/adal4j/AuthenticationException   This database requires ActiveDirectoryPassword. I am able to connect using pyodbc on my computer with the credentials above, but I can't get anything to connect from Databricks. This is an Azure Databricks Standard account (not Premium). Any ideas?  UPDATE: Thanks Mark for the answer.  Apparently, the default importing of jar's in Azure Databricks puts them in the application class path instead of the system class path, which is the cause of this error (according to: ). To resolve this, I used the code below (change 'clusterName' to actual name of cluster):  %scala // This code block only needs to be run once to create the init script for the cluster (file remains on restart)  // Create dbfs:/databricks/init/ if it doesn’t exist. dbutils.fs.mkdirs("dbfs:/databricks/init/")  // Display the list of existing global init scripts. display(dbutils.fs.ls("dbfs:/databricks/init/"))  // Create a directory named (clusterName) using Databricks File System - DBFS. dbutils.fs.mkdirs("dbfs:/databricks/init/clusterName/")  // Create the adal4j script. dbutils.fs.put("/databricks/init/clusterName/adal4j-install.sh",""" #!/bin/bash wget --quiet -O /mnt/driver-daemon/jars/adal4j-1.6.0.jar http://central.maven.org/maven2/com/microsoft/azure/adal4j/1.6.0/adal4j-1.6.0.jar wget --quiet -O /mnt/jars/driver-daemon/adal4j-1.6.0.jar http://central.maven.org/maven2/com/microsoft/azure/adal4j/1.6.0/adal4j-1.6.0.jar""", true)   // Check that the cluster-specific init script exists. display(dbutils.fs.ls("dbfs:/databricks/init/clusterName/"))

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


I'm trying to connect my android app to PHP page.. this is AsyncTask class function:  @Override     protected String doInBackground(String... params) {         try {             accountDetails.add(new BasicNameValuePair("Name",params[0]));              JSONObject json = jparser.makeHttpRequest("http://site.page.php","POST",accountDetails);             /*My Problem is here..*/            String registerReport = json.getString("registerReport");         } catch (Exception e) {              error = e.toString();         }          return null;     }   and my php page return this:  {"registerReport":"1"}   And then i got this error: java.lang.NullPointerException: Attemp to invoke virtual method 'java.lang.Stringorg.json.JSONObject.getString(java.lang.String)' on a null object reference


I got a pair old Shimano SH-R133 shoes for my road road, they are size 46. I'm thinking about a pair of SH-XC30. Can I use the same size?

I am riding clipless with the MT43 shoes I bought at my LBS. They are great,... when it is not cold outside... and now it is cold outside... and my toes are freezing. I was thinking of getting Shimano MW81 Gore-Tex Winter SPD Boots but my LBS does not sell it and is not willing to order (they're promoting their own brand and only sell two Shimano references). So I was considering buying online. I know Shimano is know to have "funny" sizing, and that one usually needs one size or two over one's usual size. The thing is, my MT43s fit perfectly (tried 4 different sizes at the LBS) and I ended up with EU 46 size while I usually wear for city and sports shoes 46 to 48 depending on the brand which feels weird since Shimano shoes usually require one size over the usual...  And now for my upcoming MW81: can I rely on my MT43 experience and get the same size? or should I get one size higher? (or should I order both and return the one that does not fit... but that wold cost me some extra postage)?  Also, the 46-48 non-Shimano-shoe-size I had mentionned earlier was already true over a year ago and since then, I lost 80 pounds and when I look at my feet, they do look a little skinnier (I can now see some veins and bones which was not the case before), can this mean that I might have dropped to 45 for usual urban and 46 for Shimano? I mean my old urban shoes still fit and I have not felt much of a difference but I had to toss that idea in the pool...  Thank you all!


I’m trying to understand different approaches to quantum gravity. One involves quantising space and time themselves, which i believe can result in there being a minimum possible length and time interval. My question is, does making space discrete like this violate lorentz invariance? From special relativity we know that length contraction is a thing, so would having a minimum length cause a problem?

On a quantum scale the smallest unit is the , which is a discrete measure.  There several question that come to mind:   Does that mean that particles can only live in a discrete grid-like structure,  i.e. have to "magically" jump from one pocket to the next? But where are they in between? Does that even give rise to the old paradox that movement as such is impossible (e.g. )? Does the same hold true  for time (i.e. that it is discrete) - with all the ensuing paradoxes? Mathematically does it mean that you have to use difference equations instead of differential equations? (And sums instead of integrals?) From the point of view of the space metric do you have to use a discrete metric (e.g. the ) instead of good old Pythagoras?   Thank you for giving me some answers and/or references where I can turn to.  Update: I just saw this call for papers - it seems to be quite a topic after all: Is Reality Digital or Analog? FQXi Essay Contest, 2011. , , . One can find some pretty amazing papers over there.


Let $V$ be a vector space and $T:V\to V$ be a linear transformation. Prove that $T=T^2$ if and only if $T$ is a projection on $W_1=\{y\in V:T(y)=y\}$ along $N(T)$.  Does $W_1=\{y\in V:T(y)=y\}$ imply it is an identity map, and how am I supposed to prove that the only way the projection works is letting $0_v\in N(T)$? What's the sketch?

Let $V$ be a vector space. Determine all linear transformations $T:V \rightarrow V$ such that $T=T^2$. I am given      $x=T(x)+(x-T(x))$ for every x in V, and show that $V={y:T(y)=y} \oplus N(T)$ as a hint   I don't have a first thought on this problem, what can identity mapping tell us? And what's the general intuition for this problem?


Prove that $f$ is a non const continuous map from $\mathbb{R} \to \mathbb{R}$ then the image of an uncountable set under the map is uncountable.  Here's the proof I am talking about ,  There is a proof on stackexchange which uses the method of negation to prove the statement. Is there a general proof for this ,other than the method of negation? If yes then can someone give me some hints on how to do this.

There are two questions:        Image of a countable set of real numbers under any continuous function is countable?      My claim is yes. Let $X$ is countable $\implies X=\{x_1,x_2,\ldots,\}$. Now $f(X)=\{f(x_1),f(x_2),\ldots,\}$ which can be atmost countable. Now my question is "What is the role of continuity here?"        Image of a uncountable set of real numbers under any non-constant continuous function is uncountable?      I feel this is true. But unable to proceed. Please provide me a hint.


I wrote a tool that outputs a Blender python script that generates a given Minecraft world in Blender using the fewest cubes possible. It's working great, but I'm having terrible difficulty trying to remove interior faces (for optimization reasons).     After I "Remove Doubles" the "Select -> Interior Faces" will select several faces. However, some of them are actually exterior faces and it doesn't even detect a significant number of interior faces.  I don't think there's anything strange going on with my geometry; the vertices are all snapped to the grid, and nothing overlaps.  Is "Select -> Interior Faces" just poorly implemented in Blender? Or is there precursory steps to using it?

I built something Minecraft style model by cubes. Now I met a problem: when I'm trying to remove all interior faces, it appears that some exterior faces are influenced inevitably. I wonder if there is some better way to do it better.    P.S.: There are three things I've tried:   Non-manifold checking (Ctrl Shift Alt M) Select Interior Faces (Select -> Interior Faces) 3D Print Toolbox (Addon)   I didn't work it out so far, which leaves me no choice but manually deselect those faces I didn't want to remove, which takes quite a bit time for other cases.    There are answers like this . But I don't think it works exactly in my case.      EDIT: Is there any faster way than enabling Limited Selection to Visible then manually deselect them from different views? (it will not work effectively in complex cases that require similar need)


EDIT: This is not a duplicate of the issue linked. When I boot my computer with my headphones plugged in, they are working. When I unplug them and plug back in they usually do not work. To get it working again, I have installed pavucontrol "PulseAudio Volume Control". I go into "Configuration" and I under my audio controller, I change the Profile to "Analog Stereo Output" from "Off". It's almost as if it doesn't automatically detect the headphone being plugged in. there shouldn't be an issue with the hardware because it works fine on Windows with my dual boot. How do I make it so that automatically it picks up that I have plugged in the headphones and switches the profile for me? Edit: Following this does not fix the issue: , it is also a different scenario. Edit: Looks like this is also a similar issue:

On my fully updated Ubuntu 18.04.3 system, audio doesn't work unless I switch between outputs. When I boot my PC, the right output (stereo speakers) is already selected by default, but there is no audio from Chromium, Firefox, VLC or any other program. However, the GNOME speakers test works. I can hear "front left" and "front right" from there, but no audio from other programs. In order to fix that, I can simply switch to another audio output (e.g. HDMI out) and then switch back to the stereo speakers, and the audio will magically work. Any idea why? It's not a big deal because it takes a couple of seconds to switch between outputs, but it's kind of annoying to do that after every reboot.


I have to demonstrate that a generator of VoIP calls generates calls uniformly distributed between callers. In particular the distribution is the uniform (min, max) one where the volume per caller distribution is uniformly distributed between a minimum and maximum. So by running a test with 10000 users and a min value equal to 30 calls per week and a max value equal to 90 calls/week i obtain that not all the users respect this limits.  The situation is depicted in figure:  The few users that generate <30 or >90 calls spoil the chi-square goodness of fit test and I don't know how can i proceed with a goodness of fit test. Most of the values is within the interval (and from these we obtain low chi-square value), but the few out-of-range values spoil the final chi-square calculation.  In your opinion what is the best way to operate? What should I do with the "out-of-range"values? Thank you.  PS: the chi-square goodness-of-fit test performed is reported in the following figure:   where still I don't know what to do with the out-of-range values.   UPDATE  after talking with people linked with the project we concluded that the generator does not satisfy the uniform distribution. We have to do a theoretic analysis of what we expect really to be the distribution at the end of the generation based on the inputs.  This means that I have to do it! More details:  The generator assigns a "probability" between 0 and 1 to the callers (with a particular method, that probably is the problem). Then it generates a random value from 0 to 1 and it finds the associated user and assigns the call to him.  The generator generates calls for a week with the constant rate equal to 1 call per second, this means that it generates ca. 604800 total calls.  My goal is to distribute the callers between the min and max number of calls in a week. For example if I have 10000 users and the min limit is equal to 30 calls per week and max = 90 calls per week I should obtain something about:  30 calls : 163 users.  31 calls : 163 users.  ....  90 calls : 163 users.  So 163 users generate 30 calls in a week..etc, etc and finally 163 users generate 90 calls in a week. How should I assign the probability to callers in order that the generator distributes the callers uniformly between the range 30-90?

My supervisor asked me to find out which distribution represents a particular situation.  I have a VoIP generator that generates calls "uniformly" distributed between callers. This means that the volume per caller distribution is "almost" uniformly distributed between a minimum and maximum. So by running a test with 10000 users and a min value equal to 30 calls per week and a max value equal to 90 calls/week i obtain that not all the users respect this limits: we have some users that generate <30 calls and some other users that generate >90 calls. It is clear that the obtained distribution is not uniform.  The situation is this:    He said that i have to perform a sort of numerical process in order to find some formulas that could define this distribution. Initially, as wrote before,we wanted to obtain a uniform (min,max) distribution (the green area in the figure) but this is not the case as proved with chi-square test.  Moreover the curve in figure is not symmetric, the probability of call generation below 30 call/week and greater that 90 call/week are not identical (it is high for 90calls/week). The variability of the number of generated call increases with the increasing call generation rates.   "Actually implementation of this distribution is nothing but assigning different call rates in a range for users in domain which indicates implementation of several delta functions. As the call rates increases the variability of the generated calls also increases with the average call rate and this leads to the asymmetric behavior of the curve." [cit. from the Voipgenerator documentation]  Someone can help me?I think that now i cannot use Q-Q plot because i don't know which theoretical distribution i have to use in order to compare it with my empirical data.  Sorry if I have stressed with a similar problem a few weeks ago, but initially we thought we could change the implementation, but now we cannot. Hence i have to discover the type of the distribution i obtained and i don't know how can i do this.


I'd like to inform users of new features that are happening in our web portal. This feature is not applicable to all users but may be useful to others; nonetheless we'd like to raise awareness that it's available. The feature is hidden under our navigation so it is not incredibly discoverable so we'd like to surface this when the user arrives to the portal.  We'd like to use a call-out that would be shown at the top right of the screen. We have given the option for the user to dismiss the message using the 'X' but several question:   Multiple administrators with different accounts can access this portal. If admin A dismisses the message, should it still be shown to admin B? My assumption here would be yes as it is exposed to a different user, but is there reason it shouldn't? If the user never dismisses the call-out, how long should such message be shown the user? What expiration should it have? When is a feature no longer considered 'new?' When is it too frequent too launch these messages? We may anticipate having new features show-up weekly in the portal, but this becomes annoying and overwhelming have to dismiss a message like this often. Is it appropriate to limit the message to a monthly cadence yet still have the new feature in the portal prior to the announcement? Is there better approach to tell users about new features rather than a call-out as shown below?          – Wireframes created with

I work with a web-based platform with lots of data and various tools to view the data, perform analysis. Users are often impressed by one or two features and stick with them. The platform adds new features regularly; too many and too often for most users (and the sales team) to keep up. We have release notes that are emailed out and the occasional press release, but we're still in search of organic ways for users to discover new features.   One idea we had was a pop-up that included "Did you know?" text and some graphics. We know that most users ignore these. Has anyone been successful with popups like that? Or Are there other interfaces that have seen more success?


I am wondering if one can use TeX/LaTeX to typeset a full-fledged fiction book i.e. a prose, literature (not poetry) e.g. if Conan Doyle wished to write his Sherlock using TeX, what would you have in mind for him? Is TeX even right for writing a book (non-mathematical, I repeat)? I have used TeX and still am using for Math, Physics and Economics to produce articles, monograph and theses but never a fiction/literature book. Naturally, I want to have a ready-to-go template adapted for the leading world publishers style, requirements etc.

Is there a class for typesetting novels? I know it's trivial to you, but I really need one.


How can I find the wave function of a quantum harmonic oscillator? If I measure its energy several times, my measurements will change the state of a system. All I know are the possible states, given my Schrodinger equation.

We know that there is uncertainty principle, so question: can we ever measure wavefunction of particles? I do not think this is possible, but I am not sure. I guess that everything is probabilistic. (that's why, I believe, we have sigma level when we say we discovered some particles...)


How can I find evidence that a independent variable has a non-linear relationship with the dependent variable? Can I possibly achieve this by squaring all the independent variables and estimate a model containing both the squared variables and the original variables and then if the coefficients on the squared variables are a value close to 0, then we can assume that the variable has no non-linear relationship with the dependent variable?  Also, how can I find what the effect of using the logs of both the dependent and independent variables in the above case will do? Wouldn't the estimate the model be not valid as it contains multicollinearity? So is would it be more appropriate if I remove the linear terms and just estimate the model using the logs of the squared variables?

One of the assumption of logistic regression is the linearity in the logit. So once I got my model up and running I test for nonlinearity using Box-Tidwell test. One of my continuous predictors (X) has tested positive for nonlinearity. What am I suppose to do next?   As this is a violation of the assumptions shall I get rid of the predictor (X) or include the nonlinear transformation (X*X). Or transform the variable into a categorical? If you have a reference could you please point me to that too?


I've got an IEnumerable<string> with values like:   pp pp.10.0 pp.6.0 pp.6.1 pp.8.3 kp.10.1 kp kp.3.20   ... etc  I'd like to organize them alphabetically, but keeping the values with double digits (in example above ones with 10.0 and 10.1) below the ones with single digits. In other words, after sorting it should look like this:   kp kp.3.20 kp.10.1 pp pp.6.0 pp.6.1 pp.8.3 pp.10.0   I tried a simple IEnumerable<string>.OrderBy(x => x, StringComparer.CurrentCultureIgnoreCase) but that doesn't quite work in this case.  Also bear in mind that the pp and kp parts could have dots in them as well, if you're thinking of splitting the string.

Anyone have a good resource or provide a sample of a natural order sort in C# for an FileInfo array?  I am implementing the IComparer interface in my sorts.


How can I enlarge my boxplot in jupyter? I can't find any optional parameters that allows me to do so. specifically using seaborn.

How do you change the size of figure drawn with Matplotlib?


Starkiller Base was made out of a Planet with it's super weapon being powered by draining the nearby sun.  But how would it work for the long term? could the planet actually move? if so how and what was the energy source for this?

In Star Wars: The Force Awakens, once the Starkiller Base has depleted the star it is drawing power from, is it supposed to travel to another star where it can draw more power? Or is it non-mobile and supposed to fire a few, limited shots only? Or can it somehow reuse the star it is drawing power from, even after it has been depleted?  Its name suggests that it will "kill" or completely deplete the star it is drawing power from, but I haven't noticed an indication in the film that the Starkiller Base can travel to other stars.


Thank those who answered , I learned a lot especially the small difference when in past tense.  However, is there any difference if I change them to future tense? (Because neither of below imply the final result)   Once he gets the passport, he will go to the Chinese consulate in Toronto and apply for a visa. Once he gets the passport, he will go to the Chinese consulate in Toronto to apply for a visa.

Here are two sentences:        Once he got the passport, he went to the Chinese consulate in Toronto and applied for a visa.   Once he got the passport, he went to the Chinese consulate in Toronto to apply for a visa.      Are the two sentences grammatical, and do they sound natural?  If they are both fine, what's the difference?


I am using BibLaTeX to organize my references. I use it in the following way: \usepackage[backend=bibtex8,style=numeric,doi=false,maxbibnames=99,sorting=none]{biblatex}  However, when I cite several authors, eg. \cite{author1,author2,author3}  the results is: [10, 11, 12]. How can I remove the spaces between the numbers? Also, how could I set it to [10-12] instead of [10, 11, 12]?

How can I cite a range of papers, the output is a range of numbers, instead of a list of numbers? In other words, when I type  ... some dummy text here is due to me \cite{me1, me2, me3, me4} ...   I want the output to be     ... some dummy text here is due to me [3-6] ...   instead of     ... some dummy text here is due to me [3.4.5.6] ...   (I use LaTeX, and am currently using the amsart class and whatever it includes. But I am open to other suggestions.)


I have a javascript web app that is calling a php script each time it recieves an event from the websocket (between 1 to 8 times each second, no specific interval).  I want to save this information (json) into a text file to be able to be able to use it for later purposes.  <?php $file = '../backtests/' . $_POST['name'] . '.txt';  if (!file_exists($file)) {     $to_add = '[' . $_POST['_data'] . ']'; } else {  $to_add = ',' . $_POST['_data'] . ']';  }  $fh = fopen($file, 'a') or die("can't open file");  $stat = fstat($fh); ftruncate($fh, $stat['size']-1); fwrite($fh, $to_add); fclose($fh);   ?>   Ok so the problem is, at the beggining the it is working, but after the file is getting 40-50 kb of text, it's getting corrupted, and php will start writing at the wrong part of the file, and so corrupting it.  I am not sure what causes this but I guess it's because the file is growing and php takes more and more time to edit it?   What other solution could I use?  Thank you.

I'm building a small web app in PHP that stores some information in a plain text file. However, this text file is used/modified by all users of my app at some given point in time and possible at the same time.  So the questions is. What would be the best way to make sure that only one user can make changes to the file at any given point in time?


Why it stops working? Can't we pass the name of the pointer as an argument for strcpy? if I change it to strcpy(&a,&b); it works.  #include <stdio.h>      int main() {      char *a;     a = "aabtyn";      char *b;     b =  "mihli";      strcpy(a,b);      printf("%s-%s\n",a,b);       return 0; }

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


I want re-project my Esri Arcinfo ASCII (.asc) raster file to Albers Equal Area Projection Which is currently in WGS84 and output it as .asc file. But gdalwarp cannot output as .asc file but gdaltranslate can. Is there anyway that i can use gdalwarp output as gdaltranslate input.

I'm trying to use gdalwarp to reproject an ascii grid file. According to  this shouldn't be a problem and indeed I can happily use gdal_translate to create grd files (AAIGrid) but not gdalwarp:  gdaltest 14:40:08 $ gdal_translate -of AAIGrid rj_DEM_1978.grd junk.grd Input file size is 401, 301 0...10...20...30...40...50...60...70...80...90...100 - done. gdaltest 14:40:25 $ rm junk.* gdaltest 14:40:41 $ gdalwarp -of AAIGrid rj_DEM_1978.grd junk.grd Output driver `AAIGrid' not recognised or does not support direct output file creation.  The following format drivers are configured and support direct output:   VRT: Virtual Raster   GTiff: GeoTIFF   NITF: National Imagery Transmission Format   HFA: Erdas Imagine Images (.img)   ELAS: ELAS   MEM: In Memory Raster   FITS: Flexible Image Transport System   BMP: MS Windows Device Independent Bitmap   PCIDSK: PCIDSK Database File   ILWIS: ILWIS Raster Map   SGI: SGI Image File Format 1.0   Leveller: Leveller heightfield   Terragen: Terragen heightfield   netCDF: Network Common Data Format   HDF4Image: HDF4 Dataset   ISIS2: USGS Astrogeology ISIS cube (Version 2)   ERS: ERMapper .ers Labelled   RMF: Raster Matrix Format   RST: Idrisi Raster A.1   INGR: Intergraph Raster   GSBG: Golden Software Binary Grid (.grd)   GS7BG: Golden Software 7 Binary Grid (.grd)   PNM: Portable Pixmap Format (netpbm)   ENVI: ENVI .hdr Labelled   EHdr: ESRI .hdr Labelled   PAux: PCI .aux Labelled   MFF: Vexcel MFF Raster   MFF2: Vexcel MFF2 (HKV) Raster   BT: VTP .bt (Binary Terrain) 1.3 Format   LAN: Erdas .LAN/.GIS   IDA: Image Data and Analysis   GTX: NOAA Vertical Datum .GTX   NTv2: NTv2 Datum Grid Shift   CTable2: CTable2 Datum Grid Shift   ADRG: ARC Digitized Raster Graphics   SAGA: SAGA GIS Binary Grid (.sdat)  gdaltest 14:40:52 $ which gdal_translate /Library/Frameworks/GDAL.framework/Programs/gdal_translate gdaltest 14:41:05 $ which gdalwarp /Library/Frameworks/GDAL.framework/Programs/gdalwarp gdaltest 14:41:10 $    As you can see, the format list is somewhat shorter than normal. From the two which commands at the bottom you can also see that both gdalwarpand gdal_translateare located in the same library. Does anyone have an explanation for this? I can work around it easily enough but this shouldn't be happening, should it?


I just noticed  got 10k views. Does this mean it's a Famous Question?

I was browsing my reputation/questions, and I noticed that one of my questions has 10k views. However, it doesn't show the 10k view "Famous Question" badge on my account.  Is "10k views" a rounded figure that will show 10k between 9500-10499? Also, does that mean that the "Famous Question" badge is only earned after receiving 10000+ views?


I am an Indian citizen studying in US on F1 Visa. I have a 6-7 hour layover in Toronto International Airport on my flight from Chicago -> Tornoto -> Zurich -> Mumbai. I am wondering if it's possible for me to outside the airport and get some food and roam around a little bit before catching my flight? Is this allowed on a transit visa? Will there be any issue during Immigration check?

I'm traveling from the UK to the Bahamas with my wife and 2 kids our flight has 17 hrs connection. We have a transit visa.  Can we get out of the airport to some hotel or do we have to stay inside the departure area with our two kids?


I have a visualforce page where i get a serial number and making callout to get the related information from external system on click of a button.  Before making the callout i need to insert a record which holds the serial number so that when the callout returns the information, i can store it in same record.  But when doing this i get     CalloutException: You have uncommitted work pending   in controller method.  Am getting attachments from User to get stored in the inserted record as well. So i cannot do the insert after making callout since record id is required to use as parentid for attachment.  Visualforce page  <apex:inputText value="{!serialNumber}"/> <apex:commandButton value="Add" action="{!getSerialNoDetails}"/>   Controller  public void getSerialNoDetails() {  SerialDetailsResponse response = SerialDetailsResponse(); Serial_Details__c serialDetails = new Serial_Details__c(Serial_Number__c = serialNumber); insert serialDetails; try {     // Callout     response = SerialDetails.getSerialDetails(serialDetails.Serial_Number__c);     if(response != NULL) {         serialDetails.Material_Number__c = response.MaterialNo;         .         .                } } catch(Exception e) {     System.debug(e); }   Any idea on how to avoid this exception? Thanks in advance.

I have same exception can please   The previous post issue is resolved.  Exception: :System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out  Visualforce Page   <apex:page controller="Controller" action="{!init}" showHeader="false" sidebar="false">     <center>         <apex:pageBlock title="Request Listener"></apex:pageBlock>               </center> </apex:page>   Controller :            PUBLIC with sharing class Controller {        PUBLIC String fromNumber      = ApexPages.currentPage().getParameters().get('From');     PUBLIC String toNumber        = ApexPages.currentPage().getParameters().get('To');     PUBLIC String body            = ApexPages.currentPage().getParameters().get('Body');        PUBLIC PageReference init()     {                    System.debug('From Phone Number :' +fromNumber);         System.debug('To phone NUmber :' + toNumber);         System.debug('Message Body :' + body);          TwilioRestClient Client = TwilioAPI.getDefaultClient();                                                                SYSTEM.DEBUG('FROM AND To  Number is NOT NULL');                      String formattedNumber='+919876543210';                 IF(body != NULL)                 body = body;             ELSE                 body = '';             Case c = NEW Case (Subject = formattedNumber,Description = body,Origin = 'Phone');             INSERT c;                               Map<String,String> params1 = new Map<String,String>             {                'To'   => fromNumber,                'From' => '+1908280****',                'Body' => 'Conformation to customer'             };             TwilioMessage message = client.getAccount().getMessages().create(params1); /* Valid conformation SMS sent to the Customer.*/                                            return null ;     } }   While loin as admin then click preview on visualforce page executed but case is not created.I have checked the the debug log it throw the exception.


I'm trying to split a url into parts so that I can work with these separately.   For e.g. the url:  'https://api.somedomain.co.uk/api/addresses?postcode=XXSDF&houseNo=34'  How can I split this into: 1) the source/origin (i.e. protocol + subdomain + domain) 2) path '/api/addresses' 3) Query:  '?postcode=XXSDF&houseNo=34'

I decided that I'll learn python tonight :) I know C pretty well (wrote an OS in it) so I'm not a noob in programming so everything in python seems pretty easy, but I don't know how to solve this problem : let's say I have this address:    Now how can I create two strings from this, one containing the "base" name of the server, so in this example it would be   and another containing the thing without the last filename, so in this example it would be   . Also I of course know the possibility to just find the 3rd and last slash respectively but maybe you know a better way :] Also it would be cool to have the trailing slash in both cases but I don't care since it can be added easily. So anyone has a good, fast, effective solution for this? Or is there only "my" solution, finding the slashes?  Thanks!


int main() {     int c=5;     printf("%d\n%d\n%d", c, c<<=2, c>>=2);     return 0; }   I am not getting how the assignment is taking place in the printf function. The output is coming out to be 4,4,4 but according to me it should be 4,4,1.

Can it be assumed a evaluation order of the function parameters when calling it in C ? According to the following program, it seems that there is not a particular order when I executed it.   #include <stdio.h>  int main() {    int a[] = {1, 2, 3};    int * pa;      pa = &a[0];    printf("a[0] = %d\ta[1] = %d\ta[2] = %d\n",*(pa), *(pa++),*(++pa));    /* Result: a[0] = 3  a[1] = 2    a[2] = 2 */     pa = &a[0];    printf("a[0] = %d\ta[1] = %d\ta[2] = %d\n",*(pa++),*(pa),*(++pa));    /* Result: a[0] = 2  a[1] = 2     a[2] = 2 */     pa = &a[0];    printf("a[0] = %d\ta[1] = %d\ta[2] = %d\n",*(pa++),*(++pa), *(pa));    /* a[0] = 2  a[1] = 2 a[2] = 1 */  }


Okay, so I am working on this little pet project just for fun. It's a wallpaper for my friend with his gamertag. My problem, is that I can't seem to find the right node orientation/ settings to get his tag to appear in FRONT of the shockwave. Everything I try won't help, and it still looks like it's either between the red and purple, or behind both. Anyone got any ideas?

I have multiple scenes each with different objects. I want to combine all these scenes in the compositor but when they render, all the objects from each scene overlap each other and are all transparent, so I can see all the objects when some should be hidden behind others.   To join my scenes I'm using a mix node with add.


In a little project of mine I have situation like this:  // Header file template <typename T>; class AClass { public:     virtual void doSomething() const; private:     std::vector<T> *v; };  // separate cpp file template <typename T> void AClass<T>::doSomething() const {     // use the vector here }  // main.cpp #include "AClass.h"  int main() {     AClass<int> anObject;     anObject.doSomething();      return 0; }   This piece of code compiles fine but is unable to link because in the main file the linker is unable to find an implementation for AClass unless I add this to the cpp file:  template class AClass<int>;   But that is just stupid, because it takes away the advantage of using templates.  Now the question: Is there a way to solve the linking problem without using the class forwarding in the cpp file or is this just impossible to have something like this in a separate .h file and .cpp file? Putting the forward class declaration is not an option for me.  I'd really like to have some clarification on this.  Thanks

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


jQuery does not seem to be able to select a loaded HTML element. Here is my HTML:

   The loaded HTML is a list of links. This is my JavaScript:  $("#submenuID li").addClass("active");   But it would not add the class. After some snooping around. I learn to use  $("#submenuID li").live('click', function() {     $("#submenuID li").addClass("active"); });   However, it does not work until I click on the link a second time.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


During the events of book 7, we can pretty much see that Voldemort won, with the exception of the resistance in place. He ran the ministry, had his policies enforced, etc. How close did he come to winning the first time he was in power?

Looking at , it looks like the OotP and the Aurors had the odds stacked against them. Did the OotP have any chance of defeating Voldemort, either by permanent restraint, or death and finding his horcruxes? Is there anything to indicate that anything but The Boy Who Lived would have stopped him?


I'm encountering a strange behaviour of Google.  Pages in my site has the form :  .. <title>Title of Article - mysite</title> </head> <body>  <img alt='mysite logo'> ..   So I expect this page to show as "Title of Article - mysite" in the clickable link of google SERP.  However, it is displayed as "Title of Article - mysite - mysite logo".  Why the heck is it fetching part of body as the title?  How can I prevent this from happening ?  Thanks !

I'm just wondering how it is possible that IGN.com has this in its title tag:      Video Games, Cheats, Walkthroughs, Game Trailers, Reviews, News, Previews & Videos at IGN   while on Google its title is simply "IGN".   How can one achieve such a thing? Does it use some special meta tag I can't see?


I have tried everything to install MariaDB on this clean Ubuntu installation but I keep getting this error,  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies: mariadb-server : Depends: mariadb-server-5.5 (= 5.5.33a+maria-1~saucy)  but it is not going to be installed E: Unable to correct problems, you have held broken packages.   I have followed this guide to try and install it,   And I have also followed the "official" guide on the MariaDB downloads page for 13.10   But nothing seems to be working.  Edit 1  I have tried both  and  but it still gives me the error I posted above.  It's a fresh Ubuntu install with hardly anything installed.  Edit 2  All the check boxes are ticket in Updates. I ran:  sudo apt-get update && sudo apt-get -f install mariadb-server-5.5"=5.5.33a+maria-1~saucy"   And it gave me this error:  The following packages have unmet dependencies: mariadb-server-5.5 : Depends: mariadb-client-5.5 (>= 5.5.33a+maria-1~saucy)  but it is not going to be installed Depends: mariadb-server-core-5.5 (>= 5.5.33a+maria-1~saucy)  but it is not going to be installed E: Unable to correct problems, you have held broken packages.

What is the most stable/safest way to install MariaDB?


I am accepting that this is a duplicate question of many others. But I want to fix my problem, I know very well that if someone posts many low quality questions or questions that do not meet the standards of site, then he/she will be blocked from asking questions.  Also if someone delete the questions from the site then it may be a reason of blocking. Or many other reasons like IP conflict, account conflict and many more.  What in my case:  I removed a question from site that did not get any answer, any upvote or any downvote. But I got the block from site after 15 days of that removal by further asking the questions only not for others. But I have a question: why after 15 days?  Reason of removing that question:  I did not get any answer on that question, so I think that if I ask the same question again then it will violate the terms & condition of site.  So I decided to remove it, and after one day I have asked the same question and got the answer. But at that time I was not aware that removal also violate the rule.  But What I am requesting now:  Now I know my mistake and will never repeat it, So give some help that do a fix to my problem. I am trying to undelete the deleted one but getting failed.  I tried many solution from the same questions have been asked here but did not get fix.  Any help would be appreciated.

If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you  to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see:  We are no longer accepting questions from this account. See  to learn more.  Likewise, for answers:  We are no longer accepting answers from this account. See  to learn more.   Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked?


How to find   $$L=\lim_{n \to \infty}\prod_{i=0}^{n}\frac {qn+ip+1}{qn+ip}\,,$$  where $p\in\Bbb N ,p \neq \{0,1\},q>0$?  Also, I'm bound to using elemental methods.

Evaluate $$\lim_{n\to\infty}\frac {qn+1}{qn} \frac {qn+p+1}{qn+p} \dotsm \frac {qn+np+1}{qn+np}$$ where $p\in\mathbb{N}\setminus\{0,1\},q>0.$   Any hints on how to approach this problem in the first place? The answer should be: $\left(\frac {p+q}q\right)^{1/p}$  I have just tried something and got pretty close to the result anyway:  Let $\lim_{n\to\infty} \frac {qn + 1}{qn}\frac {qn+p+1}{qn+p}\dotsm\frac {qn+np+1}{qn+np}=L$ taking the $\ln$ on both sides we get:  $$\lim_{n\to\infty} \sum_{k=0}^n\ln\left(1+\frac1{qn+kp}\right).$$  Here (I'm not sure if I'm wrong here) but if we use the remarkable limit on each of these $\ln$. $\lim_{x\to0}\frac{ln(1+x)}{x}=1$.  $$\lim_{n\to\infty}\sum_{k=0}^n\frac1n\frac1{q+ \frac knp}\xrightarrow[{n\rightarrow\infty}]{}\int_0^1\frac 1{q+xp}dx=\frac 1p\ln\frac {p+q}{q}=\ln L.$$  $\implies \boxed{L=\sqrt[p]{\frac{p+q}q}}.$


I want to show $\underset{n \to \infty}{\lim} (1+\frac{x}{n^2} )^n=1 \; \forall x \in \mathbb{R}$. But my solution only works for $x\leq 0$: $$\underset{n \to \infty}{\lim} (1+\frac{x}{n^2} )^n= \underset{n \to \infty}{\lim} (1-\frac{(-x)}{n^2} )^n=\underset{n \to \infty}{\lim} (1-\frac{\sqrt{-x}}{n} )^n(1+\frac{\sqrt{-x}}{n} )^n=e^{-\sqrt{-x}}+e^\sqrt{-x}=e^0 =1$$ The problem is, I cant use the $\exp$ identity with complex numbers because we only showed it for Reals. Is there a way to avoid the problem?

Find $$\lim_{n\to\infty} \left(1+\frac{x^2}{n^2}\right)^n$$   I particular, I am hoping to find the above to be $1+x^kg(x/n)$ where $g(\cdot)$ is a function with uniformly bounded derivatives.  Edit: I'm trying to prove a result that would be true if  $(1+x^2/n^2)^n -1 = x^kO(x/n).$


Learning about ReaderWriterLockSlim. Trying to understand why ReaderWriterLockSlim in better than any other lock like for example Monitor?   What is difference between EnterWriteLock() and EnterReadLock(). I suppose that EnterWriteLock() has more chances to get lock than EnterReadLock(). but I suppose I can use EnterReadLock() in places when I need just write - it only will be slower.     class Program     {          static ReaderWriterLockSlim _rw = new ReaderWriterLockSlim();         static List<int> _items = new List<int>();         static Random _random = new Random();          static void Main(string[] args)         {             new Thread(read).Start() ;             new Thread(read).Start();             new Thread(read).Start();              new Thread(()=>write("A")).Start();             new Thread(() => write("B")).Start();           }           public static void read()         {             while (true)             {                 //_rw.EnterReadLock();                 _rw.EnterWriteLock();                 for (int i = 0; i < _items.Count; i++)                 {                     Thread.Sleep(1000);                 }                 //_rw.ExitReadLock();                 _rw.ExitWriteLock();             }         }           public static void write(string value)         {             while (true)             {                 int newNumber = GetRandom(100);                 _rw.EnterWriteLock();                 _items.Add(newNumber);                 _rw.ExitWriteLock();                 Console.WriteLine("ThreadID={0} added={1}",Thread.CurrentThread.ManagedThreadId,newNumber);                 Thread.Sleep(100);             }          }          private static int GetRandom(int v)         {             lock (_random)             {                 return _random.Next(v);             }          }     }

I have an IDictionary<TKey,TValue> implementation that internally holds n other Dictionary<TKey, TValue> and distributes that insertions by the HashCode of the key to the invidual sub-dictionaries. With 16 sub-dictionaries, the number of collisions is pretty low on a 4-core machine.  For parallel insertions, i locked the Add-method with a ReaderWriterLockSlim, locking only the individual sub-dictionary:    public void Add(TKey key, TValue value)         {             int poolIndex = GetPoolIndex(key);             this.locks[poolIndex].EnterWriteLock();             try             {                 this.pools[poolIndex].Add(key, value);             }             finally             {                 this.locks[poolIndex].ExitWriteLock();             }         }   When inserting items with four threads, i only got about 32% cpu usage and bad performance. So i replaced the ReaderWriterLockSlim by a Monitor (i.e., the lock keyword). CPU usage was now at nearly 100% and the performance was more than doubled.   My question is: Why did the CPU usage increase? The number of collisions should not have changed. What makes ReaderWriterLock.EnterWriteLock wait so many times?


I need to load data from Postgres to Oracle. While reading data from Postgres I got the date in below format "2013-02-13 00:30:22.402" now I need to load this date into oracle db  I tried but getting exception   String dd = "2013-02-13 00:30:22.402"; DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); java.sql.Date dateform=(Date) formatter.parse(dd); System.out.println(dateform);   Throws this exception:  Exception in thread "main" java.lang.ClassCastException: java.util.Date cannot be cast to java.sql.Date     at ghg.main(ghg.java:26)

I am trying to use a  as input and then creating a query with it - so I need a .    I was surprised to find that it couldn't do the conversion implicitly or explicitly - but I don't even know how I would do this, as the Java API is still fairly new to me.


I'd like to reduce the number of steps needed to turn mobile hotspot on or off. Currently it's unlock, then five taps.  Galaxy Note 4, Android 5.0.1 Lollipop.  I did find , but it's from 2012 and a lot has changed since then probably.

is there a way to automate (or at least reduce the number of steps) to turn on or turn off the WiFi hotspot on my Galaxy 3.  I have to    unlock  press the menu button  press settings press More Settings Tethering and portable hotspot Slide portable hotspot on.


I have this spatial object:   > polys Simple feature collection with 24 features and 2 fields geometry type:  POLYGON dimension:      XY bbox:           xmin: 4530000 ymin: 3517000 xmax: 4536000 ymax: 3521000 epsg (SRID):    NA proj4string:    +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs    Id total                       geometry 1   0     7 POLYGON ((4530000 3517000, ... 2   1     3 POLYGON ((4531000 3517000, ... 3   2     8 POLYGON ((4532000 3517000, ...   It is a polygon geometry type. I would like to save it as a raster file but I still can not manage!  I tried to create a raster with r <- raster(ncols=6, nrows=4) and then to x <- rasterize(polys,r,getCover=TRUE,progress="text") but it can not make it.  Any ideas?

I would like to compare vector vs raster data. So i try to fix a problem using both ways.  I made it in vector first :  coastline<-readShapeSpatial("shp") wets<-readShapeSpatial("shp") wetb<-gBuffer(wets,width=500,byid=T) #doing a buffer of 500m of the wetlands wetb2<-gBuffer(wets,width=1000,byid=T) #doing abuffer of 1000 wetb1$vat=0 # assigning a new column of 0 in the buffer i created wetb2$vat=5 # assigning a new column of 5 in the second buffer coastline$vat=10 #assigning a new column of 10 in the rest of the land   Now how would i write the same thing in raster?  My thoughts are that i should turn the coastline and the wetlands into raster first off.How would i do that and what after that?


Here's a snippet of my code for an assignment. I can't seem to get the boolean flag to work properly. When i try to figure it out, either every name gets the discount or no name gets the discount. To clarify the name Mike or Diana should give a discount.  String firstName;     //user's first name   boolean discount = false;  //flag, true if user is eligible for discount  int inches;       //size of the pizza char crustType;     //code for type of crust String crust; //name of crust double cost = 12.99;    //cost of the pizza final double TAX_RATE = .08; //sales tax rate double tax;       //amount of tax char choice;      //user's choice String input;      //user input String toppings = "Cheese "; //list of toppings  int numberOfToppings = 0;  //number of toppings  //prompt user and get first name System.out.println("Welcome to Mike and Diane's Pizza"); System.out.print("Enter your first name:  "); firstName = keyboard.nextLine();  if (firstName == "mike" || firstName == "diana" || firstName == "Mike" || firstName == "Diana" || firstName == "MIKE" || firstName == "DIANA") { discount = true; }  if (discount = true) { cost  -= 2.0; System.out.println ("You are eligible for a $2 discount.");

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I'm working with ShareLatex and I'm uploading .pdf image, so it takes a long time to compile because it is a large document. I found it is possible to automatic convert .pdf images to .png using:    \usepackage{graphicx}   \usepackage{epstopdf}   \epstopdfDeclareGraphicsRule{.pdf}{png}{.png}{convert #1 \OutputFile}   \DeclareGraphicsExtensions{.png,.pdf}   which will speed up the compiler but it seems that I need to call pdflatex with the --shell-escape option. The question is, how is it done in Sharelatex?  Here is the info of the webpage of   Thanks

Is it possible and if so how can you pass flags to the ShareLaTeX compiler which one would have passed as parameters to the LaTeX compiler?  I am using the minted package and need to pass the -shell-escape flag.


Evaluate: $$\int_0^{\infty}\dfrac{\ln(x+\frac{1}{x})}{1+x^2}\cdot dx$$   I tried substituting $\ln(x+\frac{1}{x})=t$ that to some extent created denominator but made it more tedious. Please give some hints to solve.

Here is my question  $$\int_0^{\infty} \frac{\log(x+\frac{1}{x})}{1+x^2}dx$$  I have tried it by substituting $x$ = $\frac{1}{t}$. I got the answer $0$ but the correct answer is $\pi log(2)$. Any suggestion would be appreciated.


How do you evaluate a sum of the form $\sum\limits_{n=0}^\infty nk^n$, for $|k|<1$?  If we take $k=\frac{1}{2}$, the sum is $\frac{1}{2} + \frac{2}{4} + \frac{3}{8} + \frac{4}{16} + \dots$, which isn't like any series I know. Wolfram Alpha evaluates this to $\frac{k}{(k-1)^2}$, but I don't know how it finds that.

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


I have home problem with the HTML symbols in a spanish web page what I am developing. The symbols are like � on my ñ and á, é, í, ó and ú.  I tried:  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />   Also:  <meta charset="UTF-8" />   And:  header('Content-Type: text/html; charset=utf-8');   But nothing works. Thats how the webpage works:   I have an index.php which selects throught $_GET the layout. Layouts are saved in .phtml Then I include the selected file.   Everything works fine, except the charset codification, � symbols remain in the page. What could I do for changing it?  EDIT - I have read the solution proposed and gives no solution, I have done all that they are saying before (as I said at the begining), and I have no problems with MySQL codification.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


How can I display all textarea rows instead of having that vertical scroll. I have tried with css using min-height and max-height and height: auto but is not working.  .form-control{     width:400px;     min-height: 100px;     max-height: 900px;     height: auto;}   I don't really know if is possible to do that with css.       Maybe is possible with native javascript so I am trying something like this   function expandtext(expand) {     while (expand.rows > 1 && expand.scrollHeight < expand.offsetHeight) {         console.log("display all rows!")>     } }   I find something nice  but it only increase and decrease rows , so how can I display all textarea rows without using scroll. DON'T NEED SOLUTION WITH FIXED HEIGHT, NEED SOMETHING DYNAMIC or other solutions that works only on chrome browser or only on firefox like Object.observe().  Demo    function expandtext(expand) {   while (expand.rows > 1 && expand.scrollHeight < expand.offsetHeight) {     console.log("display all rows!") >   } } body {   padding: 20px; } .form-control {   width: 400px;   min-height: 100px;   max-height: 900px;   height: auto; }   <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"/> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"/>
   remove texarea scroll and display all rows   <textarea class="form-control" rows="4" onkeydown="expandtext(this);">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque suscipit, nisl eget dapibus condimentum, ipsum felis condimentum nisi, eget luctus est tortor vitae nunc. Nam ornare dictum augue, non bibendum sapien pulvinar ut. Vestibulum ante ipsum     primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras congue congue purus, quis imperdiet tellus ornare in. Nulla facilisi. Nulla elementum posuere odio ut ultricies. Nullam tempus tincidunt elit eget posuere. Pellentesque sit amet     tellus sapien. Praesent sed iaculis turpis. Nam quis nibh diam, sed mattis orci. Nullam ornare adipiscing congue. In est orci, consectetur in feugiat non, consequat vitae dui. Mauris varius dui a dolor convallis iaculis.</textarea>

   remove texarea scroll and display all rows   <textarea class="form-control" rows="4" onkeydown="expandtext(this);">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque suscipit, nisl eget dapibus condimentum, ipsum felis condimentum nisi, eget luctus est tortor vitae nunc. Nam ornare dictum augue, non bibendum sapien pulvinar ut.</textarea>
     External .

There was , which I've tried. But there is one problem: the textarea doesn't shrink if you delete the content. I can't find any way to shrink it to the correct size - the clientHeight value comes back as the full size of the textarea, not its contents.  The code from that page is below:  function FitToContent(id, maxHeight) {    var text = id && id.style ? id : document.getElementById(id);    if ( !text )       return;     var adjustedHeight = text.clientHeight;    if ( !maxHeight || maxHeight > adjustedHeight )    {       adjustedHeight = Math.max(text.scrollHeight, adjustedHeight);       if ( maxHeight )          adjustedHeight = Math.min(maxHeight, adjustedHeight);       if ( adjustedHeight > text.clientHeight )          text.style.height = adjustedHeight + "px";    } }  window.onload = function() {     document.getElementById("ta").onkeyup = function() {       FitToContent( this, 500 )     }; }


I would like to know how to factor the following polynomial.  $$ ab^3 - a^3b + a^3c -ac^3 +bc^3 - b^3c $$ What is the method I should use to factor it? If anyone could help.. Thanks in advance.

I'm trying to factorise $$ x^3z - x^3y - y^3z + yz^3 + xy^3 - xz^3 $$ into four linear factors.  By plugging it into WolframAlpha I've learned that it's $$-(x-y)(x-z)(y-z)(x+y+z)$$  My question is: what are the steps involved in factorising the expression? Is there a method I don't know about that I'd have access to with my limited maths?  Really appreciate any help!


I have a string of dates in php (dd/mm/yyyy) that I want to convert to yyyy-mm-dd format.  I have tried :  UPDATE `table` SET `DATE_VAR` = convert(datetime,'19/03/2015', 121) WHERE `ID`=160   Can you help me?

I have a datetime column in MySQL.   How can I convert it to the display as mm/dd/yy H:M (AM/PM) using PHP?


Related to file and directory permissions and umask: Why the command umask (shows the octal form) and umask -S (shows the symbolic form) show different (actually the option -S shows the bits negations of the octal form)? I was expecting the umask in symbolic form for umask 024 to be u=---,g=w,o=r but it shows like this: [user1@server-base ~]$ umask 0024 [user1@server-base ~]$ umask -S u=rwx,g=rx,o=wx

I believe that umask is something that controls , but do not fully understand it.  After running umask 0644 in a , I cannot read the files I create with the command-line text editor nano. I noticed that the permissions of that file are set to 0022 instead of the default 0755.  How does umask work? I thought I could just remove the each digit in the umask from 0777, 7 - 6 = 1 and 7 - 4 = 3, so I expect the permissions to be 0133, but apparently, this is not the case.   What is umask exactly? Explain it to me like I was a "Linux noob" How do I calculate with umask? What are use cases for umask?


General-Purpose GPU Computing is not a concept dominated purely by NVidia. It is somewhat abstract; there are multiple vendors/organizations/consortia involved in this field; and there's a popular non-NVidia GPGPU programming framework - OpenCL.  It thus appears that the GPGPU tag cannot be owned ("sponsored") by NVidia - according to the policy described .  So, how come I see the NVidia logo next to the GPGPU tag?

Possible Duplicate:          I'm not sure if this is a very recent change, but I have noticed that some of the tags I follow (CUDA, GPU and GPGPU) have the NVIDIA logo applied to them.  While for CUDA this is of course completely reasonable, it seems a bit much to me to apply this to GPU and GPGPU. Even though my hardware of choice is NVIDIA and has been for years, I do acknowledge the existence of AMD and their contributions in this area.  I have found some information on sponsored tags. Is it the case that NVIDIA is sponsoring these particular tags? (Clicking on the tags does reveal some "sponsored links") If so, is the possible competition taken into account when it comes to sponsoring? Or is it simply first come, first served?  Update:  Given @Balpha's , should the NVIDIA icon still be part of the tag? Or should it be removed there as well? After all, the comment states:     icons on tags only are allowed if the sponsor "owns" the tag.


I've noticed that both of the following loops take the same amount of time: ~ 1.2 seconds. double count = Math.pow(10, 9); for (int i = 0; i < count; i++) {     int y = 10;     int x = 3*y;     x = 100*y;     int[] arr = new int[3];     arr[0] = 1; }  double count = Math.pow(10, 9); for (int i = 0; i < count; i++) {     //nothing }  Why would they finish in the same time? These for-loops only increment and do 1 comparison, so 2 actions per iteration. I would think the first one would take about 3 times longer to finish, since it does 7 actions whereas the second one does 2.

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


The following is a problem from Real analysis by N. L. Carothers.     . For $E\subset [a,b]$, show that $m^{*}(E) = 0$ if and only if $E$ can be covered by a sequence of intervals $(I_n)$ such that $\sum\limits_{n=1}^{\infty} m^{*}(I_n) <\infty$, and such that each $x\in E$ is in infinitely many $I_n$.   I can prove the if-part of the question.  chat discussion suggests how to construct such $I_n$ for countable sets. How can we prove the only if part for a general set?

Given a measure zero set $E$, by definition we have forall $\varepsilon > 0$, a covering of $E$ by intervals whose lengths sum to $< \varepsilon$.  I want to prove that we can cover $E$ in intervals such that the sum of the lengths the intervals is $< 1$ and each point in $E$ is contained in infinitely many of the intervals.  Do you know how to prove this? Thank you


When I installed Ubuntu 16.04 I selected logical volume management. I created a virtual machine with 40GB Hard disk.  The I cloned that to a new machine with Hard disk 100. but when I check df -h it still shows 40GB.  Is there any way to increase it?

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


I want to declare string constants in JavaScript.  Is there is a way to do that?

Is there a way to use constants in JavaScript?  If not, what's the common practice for specifying variables that are used as constants?


Let $A \in M_n(\mathbb{Q})$($n\le 2015$) such that $A^{2017}=I_n$. Prove that $A=I_n$. I think that this should be solved using the fact that the polynomial $f(x)=x^{2017}-1$ rewrites as $f(x)=(x-1)(x^{2016}+x^{2015}+...+1)$ and $x^{2016}+x^{2015}+...+1$ is irreducible, but I don't know how to proceed. EDIT: The problem linked in the comments doesn't really help me because it doesn't solve the case when $n\le 2015$.

Let $A \in \mathcal{M}_{n}(\mathbb{Q})$ such that $A^{2017}=I_n$. Is it always true that $$A=I_n?$$   When $n \leq 2015$, I proved that this result must hold using the minimal polynomial and the fact that $2017$ is prime. I suspect that when $n \geq 2016$, this equality is not always true, but I can't find any matrix other than $I_n$ with that property, which also has only rational entries.  I also thought of an approach with eigenvalues, but since they are all complex roots of $2017$, I am not sure how to make use of them here.


Bought a a second hand ipad  from a yard sale the person had it set to  new installation. I looked at it before I bought it to make sure it powered up, and I got it home and connected to my laptop to start the process I found I i could not go any further be cause the ipad had been locked by another apple Id. When I went back to show the person they didn't know how that had happrned and they didn't recognize the apple Id and now they wont do anything to help try and reset it nor give back my money  and now i'm stuck with a locked Ipad and no money. What can I do now?

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


In Java, I have to create a linked list from scratch (not allowed to use the LinkedList import).  I have been provided with this code as support:  public class Link<E> {     private E e; // the element contained in this linked list     private Link<E> next; // the next element of the linked list      public Link(E e, Link<E> n) {         this.e = e;         this.next = n;     }      public Link(E e) {         this.next = null;         this.e = e;     }      /**      * Method to set the element      */     public void setElement(E e) {         this.e = e;     }      /**      * Method to set the next linked list element      */     public void setNext(Link<E> e) {         this.next = e;     }      /**      * Method to get the element.      */     public E getElement() {         return this.e;     }      /**      * Method to get the next linked list element      */     public Link<E> getNext() {         return this.next;     } }   With this code provided, I have to create a LinkedList with the following methods:   Add objects at a specific index; addAt(data, index) Retrieve objects using the index; getAt(index i)   I have come up with the following code:  import java.util.*;  public class LinkedList<E> {      private Link<E> head, tail;     protected long size;      public LinkedList() {         super();         this.head = null;         this.tail = null;         this.size = 0;     }      public void addAt(Object data, int index) {          Link<E> temp = new Link(data);          Link<E> current = head;          if (data == null) {             throw new NoSuchElementException();         }          if (current != null) {             // crawl to the requested index or the last element in the list, whichever comes             // first             for (int i = 0; i < index && current.getNext() != null; i++) {                 current = current.getNext();             }         }          // set the new node's next-node reference to this node's next-node reference         temp.setNext(current.getNext());          // now set this node's next-node reference to the new node         current.setNext(temp);      }      public Object get(int index)     // returns the element at the specified position in this list.     {         // index must be 1 or higher         if (index < 0)             return null;         Link<E> current = null;         if (head != null) {             current = head.getNext();             for (int i = 0; i < index; i++) {                 if (current.getNext() == null)                     return null;                  current = current.getNext();             }             return current.getElement();         }         return current;      }  }   However, I get a NullPointerException which I can't wrap my head around at:   temp.setNext(current.getNext());    Besides the NPE, I have another question: would there be a cleaner way to implement a LinkedList from scratch?

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?


Screen text reads: Error reading block 23108274 (input/output error).  /dev/sda5: UNEXPECTED INCONSISTENCY; run fsck MANUALLY  and: fsck excited with status code 4 done Failure: file system check of the root filesystem failed The root filesystem on /dev/sda5 requires a manual fsck  At browsing Ask Ubuntu, I found similar problems mentioned but none of the previous solutions work. After I tried the exit command, this was the result:  However, I retried the exit command, and then used "reboot", which got me stuck on the following screen :  As I'm told that each reboot aggravates the problem, I feel hesitant to force a shutdown. I had no other option but to pull the plug. At restart, I got to an "enter setup f2" message on the bottom left, which I did. Within setup, I hit some of the keys to navigate. The system responded so slow that I doubt whether it did so at all and instead shifted through the different tabs at random. I managed to exit setup, and now find myself staring at this:  It took me some time but I now have an Ubuntu Live USB.

I am running an HP pavilion dv6000 dual boot win7 and Ubuntu 12.04. (well, up until today).  After a reboot, the boot process drops to the BusyBox shell and I end up at the prompt:  BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash) Enter 'help' for a list of built-in commands.  (initramfs)   I've been researching others who have had this same problem, but haven't been able to find any of those solutions to work for me.  I tried the method described , and after the final command   mount -t ntfs-3g /dev/sda1 /root -o force   it does nothing and gives me another (initramfs) prompt.  I can boot to a live CD (USB) and get to a terminal, but it doesn't seem to do much good, as I can see the /dev/sda1 in the ls command, but it doesn't recognize it when I try to cd to it.  One more question: using the command fdisk -l how can I tell which mount point (sda1/sda2) is my windows partition and which one is Ubuntu?


$$\int_0^b\left(\int_0^af(x,y)dx\right)dy=\int_0^a\left(\int_0^bf(x,y)dy\right)dx.$$ I am given the following hint: Investigate $p:[0,b]\rightarrow\mathbb{R}$ defined by $$p(t)=\int_0^t\left(\int_0^af(x,y)dx\right)dy-\int_0^a\left(\int_0^tf(x,y)dy\right)dx.$$ I have read the classical proof of Fubini's Theorem that uses $\sigma$-finite spaces, but this is beyond the scope of which this question is asked in. I am looking for advice on how to utilize the provided hint to establish a proof of this.

Let $f$ be continuous function on $[a,b]\times [c,d]$. Prove that      Prove that $$\int_a^b \left( \int_c^d f(x,y)dy\right) dx=\int_c^d  \left( \int_a^b f(x,y)dx\right) dy$$   First of all, note that $ \int_c^d f(x,y)dy$ is continuous in $x$ and $ \int_a^b f(x,y)dx$ is continuous in $y$ so both integrals exist.  We have  $$\frac{d\left[\int_a^b \left( \int_c^t f(x,y)dy\right) dx \right]}{dt}=\int_a^b f(x,t) dx$$  (We used differentiation under the integral sign and the fundamental theorem of calculus)  Also  $$\frac{d\left[\int_c^t  \left( \int_a^b f(x,y)dx\right) dy \right]}{dt}=\int_a^b f(x,t) dx$$  (Here we used the fundamental theorem of calculus)  Thus $$\int_a^b \left( \int_c^t f(x,y)dy\right) dx-\int_c^t  \left( \int_a^b f(x,y)dx\right) dy$$  as a function of $t$ is constant on $(c,d)$.  It remains to show that this constant is $0$. How can I do this?


In biblatex citation, I want to put `and' in between author name if number of author is 2.  Otherwise for more number of authors the citation output will `first author et al., year'.  For example  if bib file contains :  @article{two_name,   title={ABC},   author={First, name and Second, name},   year={2002} } @article{three_name,   title={ABC2},   author={First, name and Second, name and third, name},   year={2002} }  Then the citation should result in    First and Second, 2002 for \cite{two_name}  First et al., 2002 for  \cite{three_name}   NOTe: maxcitenames=2 option of biblatex produce the first output correct. However, the second citation is rendered as First, Second et al., 2002.

In the header of my document I set the maximal author names to 2:  \usepackage[style=authoryear-icomp, maxbibnames=9, maxcitenames=2, backend=biber]{biblatex}   Now, when I cite texts with two authors, LaTeX gives me the following:     (Author_A/ Author_B 2012: 232)   When I have three authors or more, LaTeX makes it:     (Author_A/ Author_B et al. 2012: 232)   But I want LaTeX to just name the first author if there are more than two authors ... like this:     (Author_A et al. 2012: 232)   Any tips on how to achieve this ?


While playing with the Mo' Creatures mod in Minecraft, I picked my kitty up on my head and it wouldn't get off. Then I right clicked it while shifting and it got off, but got stuck on my feet. Eventually it will go back on my head. How do I get it off??

I installed the Mo'Creatures mod into Minecraft, then made a fish bowl. After catching a fish I went to put it on top of a bookshelf in my room, but instead of placing it, the bowl just dropped at my feet. When I tried to pick it up my character put it on his head. Now I'm stuck with a fish bowl on my head and I can't find any mention anywhere of how to get it off. There are a number of other animals from the mod that you can put on your head for some effect, but no mention of how to remove them pretty much anywhere.


How to create triangular pyramid with equal length of edges?    Note - I'm not looking for a way to create one with a single click, but I want to be able to model one from scratch.

How to make a pyramid in blender and all the edges to be equal size? Is there a way to do that in blender? Or if there is no easy way for that, maybe anybody not that lazy can provide me with a math line? Or maybe a link or whatever?