I have a Samsung Galaxy S3 with a broken screen. The screen does not respond to any touch and does not display anything at all, it is black at all times. CyanogenMod 11 is installed on the device.  I need to securely wipe the device, but I've been having a very difficult time doing so, as CyanogenMod doesn't allow ADB to connect without user input, which in this case is impossible. I've done a factory reset on the phone, but didn't wipe the user data on the internal storage (not an external SD card, rather the "internal SD card" which is hosted on the main phone ROM).  How can I securely wipe the phone and delete all data left on the internal storage? I'd like to zero-out the filesystem, but still have a semi-working phone that will at least boot into Android for occasional tinkering over adb.

My screen is totally destroyed, it's black and unresponsive. The phone turns on just fine, though. I just got my new phone and I have to send this one back now.  I want to wipe the phone before I send it back, but I'm not sure how. I don't care too much about sending back a rooted phone, it seems Asurion doesn't really care about that from what I've read, but I don't want my personal data on the phone when I send it in.  What are my options to wipe the phone without a screen? I've already read a lot of threads on other forums and here on the subject, but everyone seems to say to wipe through ADB shell. Well, I can see the phone in ADB, but I am unable to enter SU through ADB shell. I assume it's because the screen is locked, and I have no way to unlock it. Others have also said to wipe through fastboot in ADB, but I am seeing conflicting recommendations and I'm not sure how to proceed. I'm not that proficient with ABD, so I want to make sure I don't mess this up.  Any advice would be greatly appreciated.


Attempt to invoke virtual method com.google.firebase.auth.FirebaseUser com.google.firebase.auth.FirebaseAuth.getCurrentUser()' on a null object reference :   MyAccount.java  public class MyAccount extends AppCompatActivity  {      private FirebaseAuth mAuth;     private TextView email,passwordtxt;     private FirebaseFirestore mFirestore;     private String UserId;     private FirebaseAuth.AuthStateListener mAuthListener;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_my_account);          email       = (TextView)findViewById(R.id.email_txt);         UserId      = mAuth.getCurrentUser().getUid();         passwordtxt = (TextView)findViewById(R.id.pass_txt);         mAuth       = FirebaseAuth.getInstance();         mFirestore  = FirebaseFirestore.getInstance();          mFirestore.collection("Hospitals")                   .document(UserId).get()                   .addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {             @Override             public void onSuccess(DocumentSnapshot documentSnapshot) {                 String user_name = documentSnapshot.getString("email");                 String password  = documentSnapshot.getString("password");                  email.setText(user_name);                 passwordtxt.setText(password);             }         });     } }

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 am using Arcgis 10.1 and have an existing line shapefile that i would like to convert to polygons.

I am trying to create polygons from a line layer of lots and concessions (large blocks of land in rural areas).   The lines are mainly grid style as they intersect mostly at right angles.   I need to create polygons from these lines.   I tried it in QGIS and it did not work.   Any suggestions other than digitizing?   I'm using ArcEditor 10.


I've got an InDesign document with multiple A4 pages, with a 12.7 mm margin on all sides. I've got a bunch of images I want to drop onto each page.  To save me dropping in each image and manually resizing it to fit between the width or height of the margins is there a "fit to margins" option in InDesign.   I've made a video to better articulate my question here :

I've got an InDesign document with 100 A4 pages.   I've got 100 assets (a mixture of .jpg and .pdf files) and I want to place 1 per page. If an image is not the proportion of the A4 page I would like to get it as big as it can be on the page before it hits into the margin. Ex. if it's a portrait image it should be as large as it can be before hits the top/bottom margin. If it's a landscape image it should be as large as it can be before hits the left/right margin.   At the moment I'm dragging each file across and resizing them manually. Is it possible just drop them on the page and get them auto resized ?


I'm looking for an M.S. in Computer Science and I found it difficult to properly navigate all the available degrees. I'm interested in a particular focus (computer graphics, not modelling and that kind of stuff but how to do use algorithms in order to create graphics). I also have some constraints on language: I currently speak both Dutch and English, so no German or French master's for me.  There are other questions on this site about  and , but I'm mainly looking for quick preselection (like a top 30 of options I have). I'm looking for a overview of courses as it enables quick elimination which if I have to wait for each uni to answer will take quite a long time  Is there any website or other online resource that will allow me to filter all M.S. programs by my requirements (language or country, research focus) and then find out information (such as the list of courses that comprise the degree) about the programs that meet my criteria, all in one place?

What types of methods are available to students today who want to find a University for a Master, PhD, or postdoc program that supports the student's obscure/specific area of research?  For example, I am looking for PhD programs that specialize in software engineering metrics analysis and process improvement.  I have looked at the websites of about 15-20 universities that offer PhD's in Computer Science.  Sometimes, I'll find "software engineering" listed vaguely as a research area, but as I research the publications and activities of the faculty, there will be just a single faculty member who does work in an obscure aspect of software engineering, like applying CASE tools to data modeling, validation of aeronautic systems, etc.


Every SE site has a  page. This page exhibits various actual Q&A from the site.  On Lifehacks.SE,  uses one of my questions. Was this manually selected by somebody on the SE Community Team, or automatically?

Diamond moderators  . In the second section from the top—entitled "Ask questions, get answers, no distractions"—that takes us to an opportunity to select one of a page full of questions from the site as the example question used on the about page. The selections currently available on physics are a little idiosyncratic. Is there some rhyme or reason to these? I suppose that we want a good example question to:  Be accessible to the intended audience (perhaps even to the newest and most naive person in that audience) Be judged at least decent by the community (positive score) Have more than one answer which are also judged acceptable (again positive score)  What else? How does a question end up on the list?


I've seen this done before but it was a long time ago. I don't know what it's called so forgive me if there's already a thread like this. Say you have a cube and you put a sphere inside the cube half way so that half of the sphere is poking out. You then use that sphere to carve out the other half of the sphere into the cube as if it's leaving a footprint.  Please redirect me to any duplicate post out there!  NOTE: I'd prefer to avoid using the Knife tool.

How do I make a hole in an object created by me? Please help, youtube tutorials didn't help at all. Hope the image help.


hi I was trying to configure my laptop and went online trying to figure out about things to do after installing Ubuntu 14.04. I came across this.  Fix overheating and extend battery life There is a good chance Ubuntu is not handling your fan, battery, etc. optimally but there is a nifty utility that probably will. Do this: sudo add-apt-repository ppa:linrunner/tlp sudo apt-get update sudo apt-get install tlp tlp-rdw sudo tlp start  but it seems to have made my laptop behaving weirdly but shutting down regularly after booting an entering password. how do I remove the whole package? please. Also my graphics seem to turn a bit greyish for a mn or two before returning to normal. I am using a Lenovo w510 Intel core i7 with 4gb ram and 1tb hdd. many thanks.

I have installed LibreOffice 4 using PPA. I was using LibreOffice 3, then  I had upgraded to LibreOffice 4, because I was somewhat eager to try a new version.   Now since I found that LibreOffice 4 has some issues, including handling my native language, I want to move back to LibreOffice 3.  This question  has already some answers which has some similarity with my above mentioned issue, but it does not solve my problem. This question talks about downgrading from a specific version of LibreOffice, namely from 4.0 to 3.6. The solutions mentioned are not the ones I am looking for. They will work, but the  solutions suggest either downloading .deb files for LibreOffice 3.6 or adding PPA for them. Furthermore, some of the answers put out-of-proportion~(applicable for the solution, however) stress on use of , not general command-line-solution.     I want a general solution without using PPA or downloading .deb files. All I want is to move back from the (higher) PPA version to the (lower) official version.  Anyway, in order to accomplish this, I removed the LibreOffice config directory from my home and then purged LibreOffice from my machine.  sudo apt-get purge libreoffice-*   Then I removed the relevant PPA's using the sudo apt-add-repository --remove command. And then ran sudo apt-get update.  Now, when I try to install LibreOffice using the command  sudo apt-get install libreoffice   I get an avalanche of output about unmet dependencies, something like,   The following packages have unmet dependencies:  libreoffice : Depends: libreoffice-core (= 1:3.5.7-0ubuntu4) but it is not going to be installed (snipped)    If I dig the issue further, by using the command,  sudo apt-get install libreoffice-core   I get    The following packages have unmet dependencies:  libreoffice-core : Depends: libreoffice-common (> 1:3.5.7) but it is not going to be installed                 Depends: libexttextcat0 (>= 2.2-8) but it is not going to be installed                 Depends: ure (>= 3.5.7~) but it is not going to be installed E: Unable to correct problems, you have held broken packages.    Could you please tell me how do I install LibreOffice 3 in my machine?  I am using Ubuntu 12.04 LTS.    EDIT  Before receiving , I was wondering, at this very moment, if I take a fresh computer, and install Ubuntu 12.04, LibreOffice installation will work without a hitch. Then why I can not install LibreOffice in my 12.04 machine today from simple command line?  Then the accepted answer clarified everything. I need to use ppa-purge so that this resets all packages from a PPA to the standard versions released for my distribution.  Basically it is like a way to restore my system back to the way it was before my installed packages from a PPA.  further elaborates the idea.    worked perfectly for me. Actually, this was an education for me since it taught me how do downgrade a package that was added via PPA. And I realized that the answer actually teaches us to "move from PPA installation  of a package to official lower version package."


Please help me understand what the paradox or disconnect is between quantum mechanics and general relativity. With my very simple understanding of each, there appears to be harmony to me.  Specifically: Through classical physics, we know that waves are energy. Thought quantum field theory, we know matter is made of waves.  Through Einstein, we know energy equals mass (proportionately) Through relativity, we know matter has mass and curves spacetime  Therefore, all matter is wave energy and these waves curve spacetime   I guess it’s metaphorically like waves in the ocean that curve the surface of the ocean.  This all seems to fit together to me, but I’m clearly missing something (a lot), to understand why this is one of the greatest unsolved problems in physics.   Thank you for explaining it to an amateur like me.

It is well known that quantum mechanics and (general) relativity do not fit well. I am wondering whether it is possible to make a list of contradictions or problems between them?  E.g. relativity theory uses a space-time continuum, while quantum theory uses discrete states.  I am not merely looking for a solution or rebuttal of such opposites, more for a survey of the field out of interest.


Does the medal ceremony scene at the end of A New Hope take place on Yavin IV?  Shouldn't the Rebels be evacuating instead of handing out medals? Even though they destroyed the death star the rest of the empire surely knows they are there.

I know there are similar questions out there, but from what I know the new Princess Leia comic deals IMMEDIATELY after the award ceremony and the ensuing evacuation.  My question:   Why not before?  (I know the real-world answer) they knew the planet was going to get destroyed.  Could it have been an act of loyalty to rebel high command?  Were they worried the Death Star would feint using it's super laser and try a ground assault (so they needed the troops)?  Or is there room for us simply to assume they did a partial evacuation, and then either just had the ceremony with the , or the evacuees returned to help break down the equipment?


Using the following routine would it be possible to find the ten nearest clincs I am using parse.com to store my info and I have long and latitude their I am using xamian.ios c#. I want to be able to just list the first ten ares that match one being passed in with just using long and lat ?   I am very basic at maths so if any formulas need using can an example be provided thanks.  public async void populateFromParseLocalDB() {         var query = ParseObject.GetQuery ("clinics");         IEnumerable<ParseObject> results = await query.FindAsync();          int i=0;          foreach (var record in results)         {             i++;             Console.WriteLine("in for each");             var name = record.Get<String>("Name");             var lat = record.Get<string>("lat");             var lng = record.Get<string>("lng");             Console.WriteLine(name);         }          int mycount = i;     }

How do I calculate the distance between two points specified by latitude and longitude?  For clarification, I'd like the distance in kilometers; the points use the WGS84 system and I'd like to understand the relative accuracies of the approaches available.


HI i have a NTFS drive insalled on my machine runing ubuntu 20.04 and on the file explorer if i go to other locations, i can see the drive and can click and view the files inside it. HOwever, when i try to copy new files into it, it says it cant and i dont have permisison to? I then right clicked the ntfs drive and when to its properties and then onto the permision option and ticked everything to allow me, owner and "others" to read/write on it but it still wont let me copy files into it? ANy suggestions?

I'm not sure what has happened, but I've all of a sudden lost write access to any of my NTFS external drives.   I installed a few games and apps from the software center, and now I can't make new folders or copy and paste files to anything that is NTFS. Everything is now read only, and I've tried so many things to fix it, but it seems hopeless.  Just to check if it wasn't the drives themselves, I made a little ntfs formatted truecrypt volume, and a fat formatted volume. And yes, it seems that Ubuntu is blocking me from writing anything to NTFS.   What happened here?  Whats a way I can simply get write access to my NTFS drives, so I can just backup all my stuff.  I'll probably reinstall Ubuntu. Please help.    UPDATE (and thanks everyone for their quick replies)  The problem has been solved.  Prior to noticing that I had lost NTFS write permission, I had installed GParted from the software center, and there was an extension called ntfsprogs that came with it.  During my search for a solution to the problem, I uninstalled GParted (as that was one of the apps I installed just before the problem). But that did not solve the problem.  I came across an app called 'NTFS Configuration Tool'. When I installed this, it said that the ntfsprogs extension needed to be removed (so I guess uninstalling GPARTED, didn't remove the ntfsprog extension).  I launched the NTFS Configuration Tool and now I have write access to NTFS drives. Unfortunately, I didn't check if I had write permission prior to launching the NTFS Configuration Tool, so I'm not sure whether the NTFS Configuration Tool, or the un-installation of ntfsprog gave me back NTFS write permission.   Hopefully if another newbee encounters this problem, they'll come across this page and know what to do.


I have a working trigger that I'm starting to build my test class for.  I've done a few lines and ran a test to make sure it's working as it should and everything seems okay, except the trigger itself is 0% coverage.  Can someone help me figure out why?  Trigger:  trigger PartnerLeadAssignment on Lead (before insert) {  List<Lead> leadList = new List<Lead>(); for(Lead l : trigger.new){     leadList.add(l);     if(l.Company == null){         l.Company = l.FirstName + ' ' + l.LastName;           if(l.LeadSource == 'Website' && (l.Lead_Subtype__c == 'Free Resource' || l.Lead_Subtype__c == 'Contact Requested' || l.Lead_Subtype__c == 'Connect with Advisor' || l.Lead_Subtype__c == 'WMC Footer') && l.Referring_Brand_Id__c == '0010H00002SuHKtQAN'){             l.OwnerId = '0050H0000090O6HQAU';              }          if(l.LeadSource == 'Website' && (l.Lead_Subtype__c == 'Free Resource' || l.Lead_Subtype__c == 'Contact Requested' || l.Lead_Subtype__c == 'Connect with Advisor' || l.Lead_Subtype__c == 'WMC Footer') && l.Referring_Brand_Id__c == '0010H00002Vv9gqQAB'){             l.OwnerId = '0050H00000BwRULQA3';              }              if(l.LeadSource == 'Website' && (l.Lead_Subtype__c == 'Free Resource' || l.Lead_Subtype__c == 'Contact Requested' || l.Lead_Subtype__c == 'Connect with Advisor' || l.Lead_Subtype__c == 'WMC Footer') && l.Referring_Brand_Id__c == '0010H00002PZz8zQAD'){             l.OwnerId = '0050H000009LmB3QAK';              }          if(l.LeadSource == 'Website' && (l.Lead_Subtype__c == 'Free Resource' || l.Lead_Subtype__c == 'Contact Requested' || l.Lead_Subtype__c == 'Connect with Advisor' || l.Lead_Subtype__c == 'WMC Footer') && l.Referring_Brand_Id__c == '001i000001siaFLAAY'){             l.OwnerId = '005i0000007xZy2AAE';              }     } }   Test Class:  @isTest public class PartnerLeadAssignmentTest { static testMethod void insertLead(){       List<Lead> leadList = new List<Lead>();     Lead l = New Lead(Company = '', FirstName = 'First', LastName = 'Last', leadSource = 'Website', lead_SubType__c = 'Contact Requested');     leadList.add(l);     if(l.Referring_Brand_Id__c == '0010H00002SuHKtQAN'){          insert l;          l=[Select Company, FirstName, LastName, Referring_Brand_Id__c, LeadSource, OwnerId, RecordTypeId FROM Lead Where Id =:l.Id];         System.assertEquals('0050H0000090O6HQAU', l.OwnerId);         }     if(l.Referring_Brand_Id__c == '0010H00002Vv9gqQAB'){           insert l;          l=[Select Company, FirstName, LastName, Referring_Brand_Id__c, LeadSource, OwnerId, RecordTypeId FROM Lead Where Id =:l.Id];         System.assertEquals('0050H00000BwRULQA3', l.OwnerId);        }        } }   The trigger is much longer than that, but just included a few lines for reference.

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How is code coverage obtained and calculated? How do I increase my coverage?  Why can't I cover these lines? Why isn't the body of my loop or conditional statement covered?


My LG Nexus 5 shows a Lollipop update prompt. I do not want this prompt to sit on top of the device.  How do I remove this Notification from the home screen?

I upgraded my Nexus 4 to Lollipop a few days ago but I don't like it. I'll leave out my reasons because they're not relevant here. I wiped my phone and installed a clean stock 4.2.2 version instead. I'm happy with this.  Not long after, Android automatically downloaded the 4.3 upgrade and notifies me with the choices "Later" and "Install". I don't want to do this upgrade.  How do I:   get rid of the notification, and  remove the downloaded update (to free up precious storage space).     I have already tried choosing "Later" but the same notification immediately reappears.    Based on Google search results, I also tried going to Settings > Apps > All > Google Services Framework and unticked "show notifications" but it still appears. Force stop or disable also doesn't seem to help, so I've re-enabled the service including notifications. I didn't see any other apps in this list that sounded relevant - did I just not see it?


If $A$ is a connected set and $\{A_i : i \in I\}$, $I$ an arbitrary set (can be countable or not) of connected sets.  How to show that if $A \cap A_i \neq \emptyset$ for all $i \in I$ then $A \cup (\cup_{i\in I} A_i)$ is connected?  I am trying to show that if $A \cap A_u \neq \emptyset~~ \forall i \in I$ then for all $i, j \in I$ $A_i\cap A_j \neq \emptyset.$ This enought to conclude the result. But I stuck here.  What I tried: Suppose that there are $i,j\in I$ such that $A_i \cap A_j  = \emptyset.$  Then since $A\cap A_i \neq \emptyset$ and $A\cap A_j \neq \emptyset$ it somehow induces me to think that is possible to obtain a split for $A$. I don't know how to proceed.  Thanks

Let $\mathscr{F}$ be a collection of connected subsets of a metric space $M$ such that $\bigcap\mathscr{F}\ne\emptyset$. Prove that $\bigcup\mathscr{F}$ is connected.   If $\bigcup\mathscr{F}$ is not connected, then it can be partitioned into two disjoint, non-empty subsets $A,B$. Let $x$ be a point in $\bigcap\mathscr{F}$. Then either $x\in A$ or $x\in B$. I don't know where to go from here.


I'm running GeoServer locally as a servlet (in JBoss), and I'm serving a GeoTIFF file through the WMS protocol.  In a webpage running an OpenLayers map, I have the GeoTIFF-WMS layer overlaid above an OpenStreetMaps base layer.  The problem is that it looks like this:    The GeoTIFF is clearly being tiled (good) and each tile is normalized to a given brightness level (bad).  When I zoom in, I can see a similar effect taking place on the smaller tiles, and I know that the original GeoTIFF doesn't have this blockiness: it's a diagonal strip of 16-bit greyscale surrounded by zeros that ought to be transparent.  How do I turn off this brightness-normalization feature (or what is it called, so that I can Google it)?  Even better, how do I tell GeoServer that pixels with zero values ought to be transparent?

I have a script that download and process satellite images using pyhon/gdal and then upload them to GeoServer.  The basic process is:  gdalbuildvrt tmp.vrt file_1.tif file_2.tif ... file_n.tif gdal_translate -of GTiff -co TILED=YES tmp.vrt outfile.tif gdaladdo -r gauss outfile.tif 2 4 8 16 32  #then upload to geoserver   outfile.tif looks like this in QGIS:   When GeoServer feeds image tiles to my OpenLayers application I am to understand that it applies a contrast enhancement. This is initially a good thing since my images tend to be a little dark.  The problem is that the effect seems to be applied locally on each tile. This is how the same file looks like in OpenLayers:   I have tried to modify the used style file (SLD) in GeoServer. Changing the ContrastEnhancement property from Normalize to Histogram makes the effect even bigger.  How do I remove these "boxes" in the image?  Does someone have any ideas for what I could try?


Carbon-14 has a half-life of 5,730 years.  That means that after 5,730 years, half of that sample decays.  After another 5,730 years, a quarter of the original sample decays (and the cycle goes on and on, and one could use virtually any radioactive isotope).  Why is this so?  Logically, shouldn't it take 2,865 years for the quarter to decay, rather than 5,730?

I understand that C14 decays at a given rate. I also interpret this to mean that 100% of the atoms of C14 in an object will all decay at the same right, individually.  So if I have 4 C14 atoms, will they all be gone in a full-life? or will two be 100% in a half-life while the other 2 are 0%?  Please explain how the decay of C14 works.


In PHP 4 you would enter a form to a MySQL db like this:  <form  action="script.php" method="post">  <fieldset>   <input id="name" name="name" type="text" placeholder="Insert your name" />   <input type="submit" value="Opslaan" />             </fieldset> </form>       script.php:  $name= $_POST['name'];   $name = stripslashes($name);   $name = mysql_real_escape_string($name);  mysql_connect($host,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "INSERT INTO names (id, name) VALUES ('','$name')"; mysql_query($query); mysql_close();   Now PHP 5 is out, what is the correct notation to put this form in a MySQL db by the latest standards using PDO?

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


After the user creates a div with a button click I'd like to be able to click on that div and change its color. I'm wondering why this is not possible. It works if the div is hard coded in but not after it is dynamically created. Also, how do I make it work?  $("#addDiv").click(function() {     var div = '

';     $("#container").html(div); });  $("#clickMe").click(function() {     $(this).css("background", "red");    });

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.


I am working through some questions and I am stuck on the working of this one:  Where the working to the answer is here:  Can someone explain the highlighted section as I can't see where it comes from?

I just started in Griffith's Introduction to electrodynamics and I stumbled upon the divergence of $\frac{ \hat r}{r^2} \equiv \frac{{\bf r}}{r^3}$, now from the book, Griffiths says:  Now what is the paradox, exactly? Ignoring any physical intuition behind this (point charge at the origin) how are we supposed to believe that the source of $\vec v$ is concentrated at the origin mathematically? Or are we forced to believe that because there was a contradiction with the divergence theorem? Also how would the situation differ if $\vec v$ was the same vector function but not for a point charge? Or is it impossible?


I have this data in a LONGTEXT column (so the line breaks are retained):  Paragraph one Paragraph two Paragraph three Paragraph four   I'm trying to match paragraph 1 through 3. I'm using this code:  preg_match('/Para(.*)three/', $row['file'], $m);   This returns nothing. If I try to work just within the first line of the paragraph, by matching:  preg_match('/Para(.*)one/', $row['file'], $m);   Then the code works and I get the proper string returned. What am I doing wrong here?

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


A mapping $T$ on a Hilbert space $H$ is said to be a linear operator if $T(\alpha x + y) = \alpha T(x) + T(y)$ for any element $x , y \in H$ and every complex number $\alpha$. We define the operator norm as follows:  $\|T\| = \inf \{ c>0 : \| T(x) \| \ge c \|x\| \}$,  also this norm is defined with  $\| T\| = \sup \{ \| T(x) \| : \|x\| = 1 \} = \sup \{ \| T(x) \| : \|x\| \le 1 \} = \sup \{ | <T(x) ,y> | : \|x\| = \|y\| = 1 \} $.  The operator $T$ is called projection if $T$ is idempotent and hermitian, i.e. $T^2 = T$ and $T^* = T$ respectively. Now I want to show that :     If $T$ is idempotent and $\|T\| \le 1$ then $T$ is a projection.   In fact I have to show that $T=T^*$ but I can't prove it. Please say me how can I say $T=T^*$ ?

Is a contraction idempotent operator self-adjoint?  In the other words, if $T:H\to H$ is a bounded linear operator such that $||T||\leq1$ and $T^{2}=T$, can we conclude $T=T^*$?


i sent a whatsapp message with my mobile data off. And then deleted it before turning on my mobile data. does this message get delivered?

I'm using Whatspp on a Moto G (1st Gen) mobile. Today I've accidentally sent a message to my friend while my mobile data was in off mode. I have deleted that message immediately. Now will the message be delivered to my friend if i turn on the mobile data?


All Orochimaru's people are wearing a purple color rope belt. What is the purpose of it? Why Sasuke is wearing it even after killing Orochimaru? Does it offer any power?

The Sound Four wear a purple-colored type of belt or wrap around their waists:    Orochimaru, their master, also wore one:    Being some of the few ninja I have seen wearing one, does it have a formal name? What does it signify and does it relate or exist in real world fighting..? It feels almost sumo-ish, I think.


I am using "^[(\+[0-9]{1,3}\.[0-9]{4,14}(?:x.+)?]$"  regex to validate phone number. I want it to work for international numbers as well. It is working for the patterns: +4454475294x364  I want to add space and '-' also.  example: +44 544-75294 x364.  What changes I need more in my regex.  Thanks.

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


Is there any experimental data for the gravitational lensing equation  $$ \alpha=\frac{4M}{b} $$  where $b$ is the distance of closest approach, $M$ is the mass of the object.   I tried Google but didn't find anything.

Can anyone provide me with (or point me to) real life gravitational lensing data that I can plug in to the first equation on this page (the standard lensing equation):   together with the luminous mass and distance to the galaxy(s).  I've looked for papers online and have not found any simple data that can be readily plugged in to the equation (I am not familiar with the details of how exactly the lensing is measured and have gotten lost in the mountains of data in the papers).  Thanks


I am using SQL-Server 2012, I have a table of credit card transactions as follows:  CardScheme  RespCode ========================= Visa        Declined MasterCard  Approved MasterCard  Approved MasterCard  Declined Visa        Declined MasterCard  Approved MasterCard  Declined Visa        Approved Visa        Approved MasterCard  Approved   I need to write a query to get the following results  CardScheme  Declined  Approved ============================== Visa        2         2  MasterCard  2         4   Please help

My table is like this:  Sitecode    Month  Amount --------    -----  ------ XX          Jan     1000 XX          Jan     3000 XX          Apr     3000 XX          Apr     1000   What I want is, to show the result something like this:  Sitecode    MonthJAN   MonthAPR --------    --------   -------- XX          4000       4000


How can I block a user not to use "sudo su -" command ? Because that will give him root access anyway. I want to limit him to read only permission for all files apart from what ever I give write access.

I don't need an administrator to change my root password. I don't want any sudo user to execute this command:  sudo passwd $root   I have tried it in the sudoers file using the following command:  %sudo ALL=(ALL) ALL, !/usr/bin/passwd $root   How can I block it?


(Please note: I've seen some other questions asked like the one I myself am asking, I realize that I am indeed late to the party, but I am genuinely curious and none of the previous answers have satiated me as of yet. Note that this is a highly hypothetical question, asked by somebody who isn't even a college student studying the idea of physics at this point in time, so go easy on me here. Sorry if this isn't worded well, but I still haven't studied much on the subject, nor am I used to typing up thesis papers. Excuse me please.)   Theoretically, it is stated that if you were to travel through a Kerr Black Hole- a Black Hole with a rotating ring singularity- it would allow you to go back to an earlier point in time. Another says you can travel through time using a Wormhole and exotic matter. What I'm curious about is whether or not time travel is hypothetically feasible were one of these true, as in whether or not the sheer force would crush a human by attempting to use one of these routes.

I read somewhere that according to relativity, it is possible - involving black holes and other stuff - to jump into the past. Is it possible for anything to go back in time either continuously or by jumping?


When I run the code below, the listData (original data sources) will also be affected.  How can I improve my code so that downloadData can copy the data from listData and remove the id, createdBy, create_at, updatedBy and updated_at in the array but listData's data is being kept and not being altered?  let downloadData = this.listData.filteredData;  let downloadDataNum = downloadData.length;  for( let i = 0; i < downloadDataNum; i++ ) {   delete downloadData[i].id;   delete downloadData[i].createdBy;   delete downloadData[i].created_at;   delete downloadData[i].updatedBy;   delete downloadData[i].updated_at; }

...where each object also has references to other objects within the same array?  When I first came up with this problem I just though of something like   var clonedNodesArray = nodesArray.clone()   would exist and searched for info on how to clone objects in javascript. I did find a  on StackOverflow (answered by the very same @JohnResig) and he pointed out that with jQuery you could do  var clonedNodesArray = jQuery.extend({}, nodesArray);   to clone an object. I tried this though, this only copies the references of the objects in the array. So if I   nodesArray[0].value = "red" clonedNodesArray[0].value = "green"   the value of both nodesArray[0] and clonedNodesArray[0] will turn out to be "green". Then I tried  var clonedNodesArray = jQuery.extend(true, {}, nodesArray);   which deep copies an Object, but I got "too much recursion" and "control stack overflow" messages from both Firebug and Opera Dragonfly respectively.  How would you do it? Is this something that shouldn't even be done? Is there a reusable way of doing this in Javascript?


Is there is a way to increase the chances without mods or commands?

Sometimes, when fighting an enemy, your character will do a special move, with a third person view animation, instantly killing the enemy. But these types of moves seem to be random, sometimes being used on enemies with nearly full health, other times not having a finishing move at all during a whole fight.  What are the parameters determining when a finishing move is used?


I stopped to smoke.  I know that in the sentence 'Stop' is used as an intransitive verb. But what if it is a transitive verb in that?  I think It would mean 'Upon thinking to smoke a cigarette, I stopped the thinking'.  And 'Stop' could be a transitive verb in the sentence on a particular situation?

My teacher said that "stop to do" had two meanings: quit doing present work to do next work (which is following after the word "do") and pause for a while then continue. I have searched a lot about its meanings but what i got just about the first meaning. Is the second one true?  For examples:   I stop to play games.   First meaning: i stop doing something in order to play games.  Second meaning: i pause playing games for a while then i continue.


Hi everyone I was wondering if someone on here could help me with my question. I am looking to apply for a Passport Card. The thing is that I currently own a Passport Book. I don't want to use form DS-82 because I still want my Passport Book to be valid and I don't want to be without it during the processing time. Is it possible for me to use form DS-11 and apply in person and use my birth certificate as Proof of Citizenship. Also if I apply for the Passport Card will my Passport Book definitely still be valid or do I have to tell the State Department specifically to keep it valid and NOT cancel it. I just want to make sure because ultimately I want to have both a valid Passport Book and a valid Passport Card. Any help would be appreciated. Thanks!!

I have a US passport book, and I would like to apply for a US passport card (to have in addition to my passport book).  If I apply using form DS-82, submitting my current passport book as proof of citizenship, does it get returned to me still valid, or does it get cancelled?  Is it possible to apply for a passport card using form DS-11 and avoid sending in my current valid passport book (submitting a birth certificate instead)?  I would prefer answers with official sources, which I have not been able to find myself on the US State Dept website or on the forms themselves (which are written quite ambiguously).


When I try to access to an NTFS partition, I get this error message:  Error mounting system-managed device /dev/sda3:      Command-line `mount "/mnt/723DB8C4766C7701"' exited with      non-zero exit status 14: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda3': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.   So, as a temporary solution, i added the read-only option to the disk :    It's working, but I cannot write to disk (because of ro).  Is there any other possible solution for this issue ?  I have a dual boot system: Kali Linux 2 and Windows 10.

I'm using Fedora 20 along with Windows 8. However, I'm unable to access the contents of the drive in which Windows 8 is installed. It shows:  Error mounting /dev/sda2/ The NTFS partition is in unsafe state Windows is hibernated, refused to mount   even though I had shutdown the Windows properly.


I've come across something a bit odd.   I'm trying to parse a string with a time in ( e.g. "12:00", "13:30") into two separate integers.  I tried this:  timeString = "12:00" [hours, minutes] = timeString.split(":").map(parseInt)   But minutes comes out as NaN  I thought there was a problem with parseInt taking in "00", but when I tried parseInt("00") in the console I get 0.  Can someone shed some light on this?

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


I want to know the difference between what and which, and between who and which   For example :   what is your favourite game / which is your favourite game

Most of the time one or the other feels better, but every so often, "which" vs. "what" trips me up.   So, what's the exact difference and when should you use one or the other?


Consider:    I'm not sure if it's reproducible, but it doesn't change after refresh either. It seems to be a bug.  Even here:

We see site stats on the home page of beta sites. Below the site stats, we have two more options to show the stats in detail.   Area 51      Previously, the Area 51 showed a Area 51 logo beside its name. But now, the Stack Overflow logo is being shown. I didn't notice this before. Is this showing up since the ?  Is this intentional or a bug?


I was writing an essay on The Cow. I started like this:  The cow is a four-footed domestic animal. It has a big body...   ....There are many different breeds of cows in the world.  You would notice that I started with 'the cow' and then I changed to 'cows'. Is there anything wrong about this? Is it grammatically incorrect switching between them two?

When speaking precisely or technically, one would say that "Homo erectus and homo sapiens are two species of hominid" rather than "Homo erectus and homo sapiens are two species of hominids." The hominid here should be singular because we are speaking about instances of a single class ("class" being used here in its broader sense, not in the sense of taxonomic grouping).  Now let's consider more common parallel constructions replacing the word species with other words.      Tide and Wisk are two brands of detergent.       Tide and Wisk are two brands of detergents.      Cats and dogs are two types of pet you can buy at Pets-R-Us.       Cats and dogs are two types of pets you can buy at Pets-R-Us.   I feel that using the singular noun to specify the class is more grammatically correct, but sounds stilted in conversation. Almost everyone I hear making these constructions uses the plural form. What are your thoughts about singular vs. plural here?  Edit  Here's a more extreme example that may help clarify the issue. Consider the following sentence:     It was my first attempt at calming an angry crowd, and I just        stood there while people were hurling all kinds of insults at me.   Here I think the singular insult sounds strange, if not downright wrong.  Further Edit  I just noticed in A Treasury for Word Lovers (Morton S. Freeman, 1983) a section entitled "Types of Errors." This is a book about (American) English usage by an English professor and editor, which purports to be a "practical guide for serious writers and readers." I wish I could say this discovery satisfies the question, but in fact I now feel somewhat farther from the truth, if there is any single "truth" in this matter. But at least I don't have to worry about being wrong when using the plural form of the class in these constructions.


Consider the following stacks of 2D boxes with uniform density:        A                   B                        C  ___________          _________                _________ |           |        |         |              |         | |___________|     ___|_________|____     _____|_________|___ |   |   |   |    |        |   |     |   |        |     |     | |___|   |___|    |________|   |_____|   |________|     |_____|   How is the weight of the boxes on top distributed to the lower ones?  A) 50:50  B) Theoretically 100:0, since I can just get rid of the lower right box because the center of mass of the top box is just above the edge of the lower left one?  C) ?  Is there an equation or algorithm to calculate this?

In the image below,    All the blocks are frictionless & identical with side of unit length, height $h$, weight $w$ & center of gravity at their geometric centers. The 2 lowest blocks are on solid ground. The distance from the corner of each block to the midpoint of the bottom side of the box above it is given (namely $a1,a2,b1,b2$). forces $F_{ac}$ and $F_{bc}$ are the resultant reaction forces exerted by blocks $A$ & $B$ on $C$.      I am interested in the behavior of these blocks immediately after setting them in this configuration and releasing them, or more specifically: For what relation between $a1,a2,b1$ & $b2$:    do $A,B$ and $C$ move?- case 1 do only $A$ and $C$ move?- case 2 do only $B$ and $C$ move?- case 3 is the configuration stable (does not change at all once set under this condition and then left.)?- case 4    For those interested, here's my approach & what (I think) I know already:  In an attempt to find the limiting conditions (the borderline conditions between equilibrium and non equilibrium), I assumed that initially $C$ will tend to be in equilibrium.(I have no rigorous justification for this assumption, just a hunch that "this isn't where the trouble is").Under this condition, $F_{ac}$ & $F_{bc}$ can be calculated, and the moments due to their "equal and opposites" ($F_{ca}$ & $F_{cb}$) about $P1$ and $P2$ can be obtained as: $$ M_{ca}(x,y)=w(.5+a1-a2-x)/(x/y+1)$$ $$ M_{cb}(y,x)=w(.5+b1-b2-y)/(y/x+1) $$ where $x$ & $y$ are the perpendicular distances of the respective forces from the center of $C$.   With some ad-hoc and shaky logic here's what I arrived at:   when $$w\cdot a_2 <M_{ca}(.5,.5)\quad \& \quad w\cdot b_2 <M_{cb}(.5,.5)$$ case-1 occurs with $A$ & $B$ touching $C$ only through it's vertices. when $$w\cdot a_2 =M_{ca}(x1,.5)\quad \& \quad w\cdot b_2 <M_{cb}(.5,x1)$$ where $a1\leqslant x1< .5$ case-1 occurs with $C$ rotating with $A$ maintaining a surface of contact with $A$ but only a point contact with $B$, but if $$\boldsymbol{w\cdot a_2 =M_{ca}(x1,.5)\quad \& \quad w\cdot b_2 \geqslant M_{cb}(.5,x1)}$$ the configuration is stable (case-4). when $$w\cdot a_2 >M_{ca}(a1,.5)\quad \& \quad w\cdot b_2 <M_{cb}(.5,a1)$$ case-3 occurs, but if $$\boldsymbol{w\cdot a_2 >M_{ca}(a1,.5)\quad \& \quad w\cdot b_2 <M_{cb}(.5,a1)}$$ the configuration is stable (case-4). The above conditions with $a$ & $b$ exchanged along with their corresponding variables.   But I have no way to check this or provide a satisfactory argument for these conditions, especially the parts written in bold (I arrived at it by putting various combinations of arguments for $M_{ca}$ & $M_{cb}$ & thinking about what would happen in each case). Is this set of conditions right?. What would be a good approach with a logical progression of steps to solve it?


A stone is dropped from a stationary helicopter 500 m above the ground at the equator. How far from the point vertically beneath the helicopter does it land and in what direction? You should solve this problem in two ways: a) by consideration of the angular momentum of the stone; b) by invoking the Coriolis force.  The b) part works out well in just a couple of lines, giving ca 24 cm to the west as an answer (correct). However, I don't seem to be able to get a) right. I tried to consider the stone as rotating around the Earth starting at a distance of R+500 m (R being the radius of the Earth) and then falling downwards with gravity and consequently speeding up in rotation as well, due to the distance to the centre of rotation getting smaller. After some nasty integrals this gave the answer to be 48 cm, about exactly a factor of 2 larger than in part b). However, I also had to use R in the final calculations which was not given in the question, hence this is probably not the way it was meant to be done.  Anybody who knows how part a) is to be attacked? Many thanks. :)

I am currently stuck on the following question.   A stone is dropped from a stationary helicopter 500m above the ground, at the equator. How far from the point vertically below the helicopter does it land and in what direction? Solve this problem by conserving angular momentum.   My current interpretation is that when the stone falls in order to converse angular momentum the angular velocity must increase. This leads to the stone travelling to the east.   I equated the angular momentum at the start       L0=*(re+h)mVo  where re is radius of earth, h is the height above that, m is mass and Vo is inital velocity. To the angular momentum at any time  L=(re+h-1/2gt^2)m(Ve+Vo)  where the 1/2at^2 term comes from gravitational acceleration and Ve is the additional velocity.   I rearranged to find Ve and then integrated over the time it takes to fall the 500m in order to work out the extra distance the stone traveled. However, my answer is 1/2 what the answer should be. I have checked the maths and it seems to be fine. So I believe my set up is wrong. Any help would be appreciated.


I don't have an internet connection at work, and I want to bring there a specific library.  So I want to be able to download at home an artifact along with all of its dependencies (recursively), in order to be able to take all of these jars and bring them to work.  I have read on this site about dependency:get, which is great but downloads the artifacts to the local Maven repo (~/.m2/repository). This means that after downloading, I need to look at pom files and manually copy all of the dependent JAR files to some directory, which I can then bring to work.  I would love to have a way to simply download the desired JAR and all of its dependencies into a specific folder.  Is there a way to acheive this?  Please note: this question is different than the mentioned duplicate, in that I'm asking how to do this without any project or pom.xml file. I'm looking for the simplest way to do this.  EDIT: I believe I found a possible solution (not the most elegant though..):   Rename the local repo (~\.m2\repository on my Windows machine) to repository.old. Create an empty directory repository at the same location instead. Run  mvn dependency:get -Dartifact=<groupid>:<artifactid>:<version>   This doesn't require a pom.xml or a project. The artifact and dependencies have been downloaded to your local previously-empty repository (~\.m2\repository). Move the local repository to wherever, and rename repository.old back to repository.   (I think) you now have all the dependencies for your desired artifact.

How do I get my project's runtime dependencies copied into the target/lib folder?    As it is right now, after mvn clean install the target folder contains only my project's jar, but none of the runtime dependencies.


I want to check if a phone number is valid, it has to be in JavaScript and the format can be in any country format, just needs to check if a phone number can be successfully sent to it?

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


Set<String> stringSet = new HashSet<String>();   will not retain order obviously   Set<String> linkedHastSet = new LinkedHashSet<String>();   while reading elements from the above set it should retain order but in some times it does not ? am I wrong in my observation or I am missing something ?

Anyone have a good rule of thumb for choosing between different implementations of Java Collection interfaces like List, Map, or Set?  For example, generally why or in what cases would I prefer to use a Vector or an ArrayList, a Hashtable or a HashMap?


I recently installed some Plymouth themes by using this command:  sudo apt-get install plymouth-theme-*   Then I changed theme to ubuntu-budgie using this command and selecting the theme:  sudo update-alternatives --config default.plymouth   And then I updated configuration using this command:  sudo update-initramfs -u   And finally I rebooted my system and what I see, it shows me the bootup screen, then automatically reboots the system and then takes me to some black screen prompt mentioned BusyBox and initramfs in it. What should I do now? I can't boot into my system.

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?


Every time I run apt-get update I get the error for one PPA:     W: Failed to fetch gzip:/var/lib/apt/lists/partial/gb.archive.ubuntu.com_ubuntu_dists_precise_universe_source_Sources  Hash Sum mismatch   I have 38 packages under "not being installed" but they are mostly to do with graphics and would like to install them.  Is there a way to sort this?

When I check for updates, I get a "Failed To Download Repository Information" error.   This is what comes up under details:   W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources  Hash Sum mismatch,  E: Some index files failed to download. They have been ignored, or old ones used instead.


Task is:  Let $G$ be an abelian group and let $H$ and $K$ be finite cyclic subgroups with $|H| = r$ and $|K| = s$. Show that if $r$ and $s$ are relatively prime then $G$ contains a cyclic subgroup of order $rs$.  I'm thinking about how to solve this. My intuition is that because the orders are coprime and the groups are cyclic, the generators must be $r$ and $s$, by Lagrange's theorem. That would mean that the elements of the groups are distinct and since the group is abelian, we can simply count the pairs, giving us a group of $rs$ order. Is this correct?

If $A$ and $B$ are finite subgroups, of orders $m$ and $n$, respectively, of the abelian group $G$, Prove that $AB$ is a subgroup of order $mn$ if $m$ and $n$ are relatively prime. Definition: $AB=\{ab|a\in A, b\in B \}$   My attemptation: $A$ has $m$ elements, $B$ has $n$ elements. There are $mn$ representations of elements in $AB$. If some of them are equal or there exist $a,a'\in A, b, b'\in B$ such that $ab=a'b'$, then $AB$ has elements less than $mn$, if such elements do not exist then $AB$ has order of $mn$. Therefore we want to show that if $m$ and $n$ are relatively prime then such elements do not exist. Please show me how to do it. I think it has something to do with Lagrange's theorem and properties of prime numbers.


On startup of a spring-boot application I want to perform a scan for all @Entitiy classes on the classpath.  Moreover, I'd like to filter any entities with a @CustomAnnotation.  I want to create some kind of auto configuration, and use the package of any entities found in:  EntityManagerFactoryBuilder   .dataSource(ds)   .packages(getPackages()))   But I don't want to explicit define the package there the appropriate entities are to be found, but find them on startup. Is that possible at all?

What is the best way of searching the whole classpath for an annotated class?  I'm doing a library and I want to allow the users to annotate their classes, so when the Web application starts I need to scan the whole classpath for certain annotation.  Do you know a library or a Java facility to do this?  Edit: I'm thinking about something like the new functionality for Java EE 5 Web Services or EJB's. You annotate your class with @WebService or @EJB and the system finds these classes while loading so they are accessible remotely.


I would like to reset my footnote counter for every section in my article, and I am using the footmisc package. I have seen the perpage option, and similarly there are questions on how to achieve this for chapters, but I would like the equivalent for sections, and am struggling to find an applicable solution.  Currently my preamble includes (among other things):  \documentclass[12pt, a4paper, twoside]{article} \usepackage[bottom]{footmisc}   Similar questions:

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


$8$ rooks are placed randomly on an $8\times 8$ chess board.  What is the probability of having exactly one rook each row and each column?  I guess there is no meaningful order here?

What is the probability that when you place 8 towers on a chess-board, none of them can beat the other.  Attempt: ${64 \choose 8}^{-1} \approx1$ in $4\ 400\ 000\ 000$  Correct answer: ${64 \choose 8}^{-1} \cdot 8! \approx 1$ in $9\ 000\ 000$.  I disagree with the $8!$. If there's combinations (binomial coefficient) in the denominator, why would there be permutations i.e. the order counts, in the numerator?


to shank to stab with an improvised knife   How did shank evolve to its importance in popular culture?  Has there been a key gangster rap with this word, perhaps taking off as an internet sensation?    The suspected duplicate isn't the same as my question.  I'm looking for something recent, to trace its recent extreme popularity.

I have heard the verb "shanked" use to mean pulling down someone's pants, and the noun "shank" to mean stabbing someone. What is the etymology of "shanked"?  From researching online, it appears that the word has some Dutch roots with leg, but both of these slang definitions I've mentioned above do not show up much in definitions for the word. I am curious how it has gained such different meanings in common vernacular.


While searching in web regarding whether rate of change of acceleration is possible or not; I came across the concept of . I want to know whether photons which can be accelerated can also have jerk or not?

Photons travel at the fastest speed in our universe, the speed of light.  Do photons have acceleration?


I'm doing research on US cotton price fluctuations from 1877-1930.   Here's the problem: my data is county-level, but county borders changed from 1877 to 1930!   To solve this, I plan to "aggregate up" to the smallest consistent unit (eg. if a county border splits, use the un-split original county as the unit of observation).   How can I do this on QGIS? I am using data from the Historical County Project here:

I have a shapefile that represents counties (admin 2) only, but I need to create a state level (admin 1) polygon file (I'm using QGIS). I will need to sum up (or average) the relevant data at each district level as well.   There are far too many counties to do this manually, so does anyone know of an automated way to roll up to a higher administrative level like this?   I am new to QGIS.


I am wring the paper that is formatted by elsarticle. However, the margin between text and left. right page look big. Hence, the text length is very narrow. Could I change it in the file     \documentclass[preprint,12pt, sort&compress]{elsarticle}   Thanks

I am using "elsarticle" document class for my Elsevier paper and I want to change the margins in all side to 2.5cm. How can I do this?  I used the code below:  \documentclass{elsarticle}  \usepackage{amssymb}  \doublespacing  \begin{document}  \begin{frontmatter}  \title{...}  ....  ....  \nocite{*}  \bibliographystyle{elsarticle-harv}  \bibliography{pose}  \end{document}   I used the code below to control the margins, but the height of the text is not proper.  \oddsidemargin = 0cm \topmargin = 0cm \textheight = 25cm \textwidth = 16cm   because A4 paper is 21*30cm and I reduced 5cm and wrote 15*25 without any excess margin. What is the solution?  regards.


When I try to vertical-align: middle an icon () next to some text, the icon is always a little bit too low (see example). How can I fix this so it is vertically centered with the text.  Example:    p {   font: 10pt Arial, sans-serif; }  .icon {   vertical-align: middle; }
This is some text with an icon in it.

Why won't vertical-align: middle work?  And yet, vertical-align: top does work.   span{   vertical-align: middle; }
      Doesn't work.


I'm wondering if it's possible to do something like this in Latex?    I have seen the similar question , but I'm wondering if there is a way to shade, have dotted lines, and have the dot? Ideally, I'd want to have a way to show how different $\epsilon$ values affect the $\delta$ values, i.e., as $\epsilon$ gets smaller, there is a $\delta$ that works.  So far, I've simply recreated the image in PowerPoint which I then copy paste in my tex document.

I'm trying to do something similar to this epsilon-delta graph I've found.  Specifically, I'd like to copy the placements and arrows, like the L+e and L-e coming out of L. Same thing with the x0 + d and x0-d coming out of the x0. Can someone help me with this? This is what I have so far.    \begin{tikzpicture} \begin{axis}[ ,         legend pos=north east,         axis x line=middle,         axis y line=middle,         x tick label style={/pgf/number format/fixed,                             /pgf/number format/fixed zerofill,                             /pgf/number format/precision=1},         y tick label style={/pgf/number format/fixed,                             /pgf/number format/fixed zerofill,                             /pgf/number format/precision=1},         grid = major,         width=8cm,           height=6cm,         grid style={dashed, gray!30},         xmin=0   ,     % start the diagram at this x-coordinate         xmax= 4,    % end   the diagram at this x-coordinate         ymin= 0,     % start the diagram at this y-coordinate         ymax= 11,   % end   the diagram at this y-coordinate %axis background/.style={fill=white},         xlabel=$x$,         ylabel=$f(x)$,         tick align=outside,         enlargelimits=false] % plot the stirling-formulae %\addplot[domain=0:200, red, ultra thick,samples=100] {K/(1 +    ((K-X0)/X0) * exp(r*x))    }; \addplot[domain=0:200, red, ultra thick,samples=100] {3*x-1 };  \addplot[line width=1pt, dashed, mark=none, black] coordinates {(0,8) (3,8)}; \addplot[line width=1pt, dashed, mark=none, black] coordinates {(3,0) (3,8)}; \addplot[line width=1pt, dashed, mark=none, blue] coordinates {(3.33,0) (3.333,9)}; \addplot[line width=1pt, dashed, mark=none, blue] coordinates {(2.666,7) (2.666,0)}; \addplot[line width=1pt, dashed, mark=none, blue] coordinates {(2.666,7) (0,7)}; \addplot[line width=1pt, solid, mark=none, blue] coordinates {(3.333,9) (0,9)}; \addplot[holdot] coordinates{(60,8.66)};  % 1\addlegendentry{$f(x) = 10 \sin (x)$}  \end{axis}   \end{tikzpicture}   which gives


I have some PHP code that takes a post request as input to a prepared statement. It is not returning any information. There are no errors.  I have tried hard coding the variables that are passed to the prepared object to no avail.   If I manually query the database with the desired query, output is received.  What am I missing here? What can I do to get output?  Heres my code:  <?php  $username = "user"; $password = "ultrasecurepassword";  try {     $pdo = new PDO('mysql:unix_socket=/run/mysql/mysql.sock;dbname=news', $username, $password);  } catch (PDOException $e) {     print "Error!: " . $e->getMessage() . "<br/>";     die(); }  $query = "SELECT * FROM newsdb ORDER BY pubdate DESC LIMIT 250"; if(!empty($_POST['search'])){     $termobusca = htmlspecialchars($_POST['search']);     $tipobusca = htmlspecialchars($_POST['searchtype']);      if($tipobusca == "title"){         $stmt = $pdo->prepare("SELECT * from newsdb where title like '%:term%' ORDER BY pubdate DESC limit 5000;");     }     else {         $stmt = $pdo->prepare("SELECT * from newsdb where pubdate like '%:term%' ORDER BY pubdate DESC limit 5000;");     }      $stmt->bindParam(1, $termobusca);  } else {     $stmt = $pdo->prepare("SELECT * FROM newsdb ORDER BY pubdate DESC LIMIT 250"); }   $stmt->execute();  while($row = $stmt->fetch()){     print_r($row); }   $pdo = null; ?>

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


Let $\mathbb R^+$ be the set of positive real numbers and let the natural numbers be $\mathbb{N} = \{ 1,2,3,\ldots \}$. Let $\star_x$ be an operator on $\mathbb{R}^+$ such that   \begin{align} a \star_0 b &= a + b \\ a \star_1 b &= a \cdot b \\ a \star_2 b &= a^b \end{align}  And so on. In particular, if $b\in \mathbb{N}$ and $x \in \mathbb{N}$, then $\star_x$ satisfies the recursive property  $$ y \star_x b = \underbrace{y \star_{x-1} y \star_{x-1} \cdots \star_{x-1} y}_{b \text{ times}} $$  Is there a natural way of extending $\star_x$ for any $x \in \mathbb{R}^+$ so that the map $(a,b) \mapsto a \star_x b$ is a continuous function of $x$? (EDIT: And, hopefully, a continuous function of $a$ and $b$?)

$\uparrow^n$ and $G(n,\cdot,\cdot)$ are notations for hyperoperation.      $n$ is the hyperoperations rank.    Can example $x$, $y$ and $z$ values be provided for either the following formula?  The formula can be notated:  $$z = x\uparrow^{-3}y$$  $$\text{or}$$  $$z = G(-1, x, y)$$    Or, alternatively, for this formula?  The formula can be notated:  $$z = x\uparrow^{-0.5}y$$  $$\text{or}$$  $$z = G(1.5, x, y)$$    I prepose a possible name for $\uparrow^{-0.5}$ to be addiplication, also resulting in the words addiply, addiplicative and addiplicativly.


Consider the coupled spring-mass system with a frictionless table, two masses $m_1$ and $m_2$, and three springs with spring constants $k_1, k_2$, and $k_3$ respectively. The equation of motion for the system are given by:  $y_1''=-\frac{(k_1+k_2)}{m_1}y_1+\frac{k_2}{m_1}y_2$  $y_2''=\frac{k_2}{m_2}y_1-\frac{(k_1+k_2)}{m_2}y_2$  Assume that the masses are $m_1 = 2$, $m_2 = 9/4$, and the spring constants are $k_1=1,k_2=3,k_3=15/4$.  a)use 4x4 system of first order equations to model this system of two second order equations. (hint: $x_1=y_1,x_2=y_2,x_3=y_1',x_4=y_2'$)

Consider the coupled spring-mass system with a frictionless table, two masses $m_1$ and $m_2$, and three springs with spring constants $k_1, k_2$, and $k_3$ respectively. The equation of motion for the system are given by:  $m_1\frac{d^2x_1}{dt^2}=-(k_1+k_2)x_1+k_2x_2$  $m_2\frac{d^2x_2}{dt^2}=k_2x_1-(k_2+k_3)x_2$   Assume that the masses are $m_1 = 2$, $m_2 = \frac{9}{4}$, and the spring constants are $k_1=1,k_2=3,k_3=\frac{15}{4}$.  I substitute all value in the system above, and able to get  $\frac{d^2x_1}{dt^2}=-2x_1+\frac{3}{2}x_2$  $\frac{d^2x_2}{dt^2}=\frac{4}{3}x_1-3x_2$  Then how to convert the system about into four first order equations?


In the story, an officer describes an ongoing war between humans and aliens.  The aliens have less advanced technology so they assume they will easily when.  However, the officer remises on how much of the new technology used in the war was unreliable and could not be produced in high numbers, and some even exploded and destroyed their own spaceships, leading to humanity losing a war of attrition.  The story was very short, 20 pages at most, and part of some collection/anthology, and released before the year 2010.

I am looking for help to point me out at a very old novel (likely from the '60s) about two empires at interstellar war. When it comes to starships, one is technologically very advanced, and the other has very low and inefficient technology.  The highly advanced empire has apparently strong chances to win the war, in particular considering a new technology they were developing. I remember the technology to work like this: consider the space as a flat surface, and on this surface, a disk around the spaceship. When the technology was turned on, this disk was stretched out, as made of rubber, so that it produced a cone, with the tip being the spaceship. The spaceship was therefore teleported 10 parsec away (if I remember correctly), but retained all the connections to the original position. If the spaceship moved, the cone moved as well. This allowed to move in position among enemy ships completely unnoticed, by stretching while afar, then moving in the proper position 10 parsecs away, then destretching.  Despite this technology, the empire lost the war because of delays. It's a perfect example of how having a disruptive technology does not guarantee to win against the competitors.  I am trying to find out the author and name of this novel, hopefully with the date of publication and in which journal/magazine.


If a mage casts a spell within 5 feat of a character with the Mage Slayer feat, does the reaction of attacking the casting character go off first, or does the spell go off first?  The  feat (PHB, p. 168) says:     When a creature within 5 feet of you casts a spell, you can use your reaction to make a melee weapon attack against that creature.   So which happens first?  Another reaction, the  spell, says that when you are hit by an attack, you get +5 AC against all attacks, including the triggering one - but if the attack didn't hit then the reaction couldn't have been triggered. So I assume both interrupt the triggering action, and are then treated as occurring before the trigger.

As  suggests, there seems to be a hole in the D&D Basic rules.  Maybe.  The rules for readying an action state:     When the trigger occurs, you can either take your reaction right after the trigger finishes or ignore the trigger.   This seems to imply that it is impossible to interrupt a spell in 5e.  If you set your trigger to be "I attack the Wizard when he casts a spell", then you make the attack after the spell has been cast.  Does this mean that spells can no longer be interrupted in combat like they could be in previous editions?


I have been using chromium and this laptop for more than 4 years and never faced this problem earlier. All service packs are up to date and current OS version is 20.04. Problem started happening around two months back on 18.04 and updating operating system did not help either. After closing the lid of the laptop, when I start the laptop again, chromium fails to refresh the screen. All I get is grainy screen. Moving mouse just repaints area underneath, but switching tabs or switching to different application all together does not force refresh. Only for chromium, screen looks like . All other applications work normally. Basically, after waking up the laptop, I have restart chromium. No other application is facing this problem. If screen saver kicks in and I log in again, I don't face this problem. Only after closing the laptop lid and only for chromium. Upgrading to 20.04 from 18.04 did not help either. lspci command reports graphics card as Intel Corporation HD Graphics 620 (rev 02)

Kubuntu 20.04, 64 bit GPU: Geforce GT610 nvidia-driver-390 Chrome Version 85.0.4183.83 Intel i5-4430, core 4, 4 thread , 3GHz RAM: 16GB  Each time I go into suspend mode and then resume, Chrome browser displays the current tab as full of sand of colors, something like dithering in image processing.  Other tabs display glitches too. The current solution is to close and reopen the browser. I tested nvidia-driver-418 but got a black screen problem and reinstalled nvidia-driver-390. The problem is more evident in Chrome, but it sometimes appears in vscode in small areas. There, hovering the mouse over the affected place or resizing the window fixes the problem. In Kubuntu the avatar of the user in the application launcher also shows dithered.  I tested in the same machine with fedora 32 workstation(gnome), nvidia driver, and had the same problems with Chrome browser.  Could it be a GPU problem? Thanks in advance for any directions in how to fix the problem or information on what is causing it.


I have a question about drawing logic circuits. How to draw these dots and two lines from the dot to nand logic gate?    I just need the part of code where you draw simple line dot line with easy solution to connect between logic gates not the whole code generating this image.  \draw (A |- (nand.input 1) %dot% -- (nand.input1);

I just wrote code for this, and I got it a little bit ugly. Can you help me to fix this. And how to change those nands for not, like it is on nand 3,4,5? Please help!  PS. What I mean by these nands for not or whatever this is


We saw Peter drive away.   Turned into passive:     Peter was seen to drive away.   I don't agree with this, because the meaning would be entirely different- in my limited understanding. What's making me unsure is that this is on an educational curriculum book, whose creators would surely be more proficient at English than me. We all make mistakes, so is the sentence correct?  The alternative which I suggest:      Peter was seen driving away.   The other question doesn't adress my problem. The sentence is indeed grammatically correct, but I'm saying the meaning changes because it would cause a confusion with the phrasal verb (or idiom- I might be mixing them up) "see to". I want someone to confirm or deny my arguement. Here:

We have a situation: someone saw the boy break the window. Can I make this passive sentence?     The boy was seen to break the window.   I use Murphy's Grammar and this structure is never discussed.


What does it take to move an unwilling status afflicted humanoid when they are:   Prone Restrained Incapacitated Stunned Paralyzed Unconscious   There are many logical answers, but the players handbook provides unwilling movement rules only for grappling.

While DMing my session today, I encountered a situation I wasn't sure how to answer. The PCs were attacked by a werewolf and decided to flee onto their nearby horses. Two of them were already mounted and two of them were on foot. One player on the ground (a wizard) attempted to cast a spell on the werewolf and failed. He then moved closer to the mounts but couldn't make it with his speed. After a few turns it was the barbarian's turn. The barbarian wanted to drag the wizard with him and plop the wizard onto a horse and then mount with his remaining movement speed.  I wasn't sure quite how to handle it, so I made a compromise. I allowed the barbarian to drag the wizard. However, because the rules specifically state that it takes half of a character's movement to mount, I wouldn't allow the barbarian to force the wizard to mount. However, if the barbarian wanted to, he could mount the horse himself as he had enough remaining movement.  The reason I allowed the barbarian to drag the wizard is because of the lifting, dragging, and pushing rules in chapter 7 of the Player's Handbook. The barbarian had more than enough strength to push our tiny, lightweight wizard around.  I'm not really sure if I handled it right at all. I'm not entirely sure that those rules apply to living beings, especially living beings that can move. I would really appreciate some advice on whether or not players can drag other players after their (the player who is being dragged) turn is over or if players can drag other players at all. If I recall correctly, I believe the wizard still had about 5' of movement left, if it makes a difference.


Trying to run Simplify Polygon (Cartography -> Generalization) tool in ArcGIS 10.2 (ArcInfo License).    I ran the tool successfully once, then tried again on a new polygon, but the simplification tolerance value field is missing...so running the tool results in an error that the missing value is required.    I tried restarting ArcMap but the field is still missing.    Is this a bug in the software or has anyone else had a similar experience?

I am having a strange problem in ArcGIS Toolbox.  I am trying to use the  tool from ArcToolbox. When I open the tool, there is no possibility to input Simplification Tolerance. Please see the attached image.  I can run the tool as a batch and from the Python window without any problem.  I am using ArcGIS 10(Editor) with Service Pack 5 on Windows 7 64Bit (English) and Windows Server 2008 64Bit (German). On both machines, I have the same problem. Any ideas?    I have reinstalled the software but the problem remains.


Let two random variables $\xi_1$ and $\xi_2$ be given. They are independent and have a standard normal distribution. Proove that $\frac{\xi_1^2 - \xi_2^2}{\sqrt{\xi_1^2+\xi_2^2}}$ and $\frac{2\xi_1\xi_2}{\sqrt{\xi_1^2+\xi_2^2}}$ are independent.  I was given a little hint that I need to think about the angles and may be it's necessary to go to the polar coordinate system.  Please help to prove it or give me a small hint)

It is given that $X,Y \overset{\text{i.i.d.}}{\sim} N(0,1)$  Show that $\frac{XY}{\sqrt{X^2+Y^2}},\frac{X^2-Y^2}{2\sqrt{X^2+Y^2}} \overset{\text{i.i.d.}}{\sim} N(0,\frac{1}{4})$  I was thinking of making polar transformations $X=r \cos \theta, Y=r \sin \theta$  Then I am getting stuck at ranges of $\theta$


In answers to  I learned that if a contact is set up such that they have received iMessages from me, there still may be a way to force a new message I'm composing to go via SMS. I might want to do this if I suspect they are not connected to the internet but I need them to receive the current message quickly.  Question: How can I ensure or force a message I'm composing to go via SMS on my iPhone 6 in iOS 12?    Comments from 2016 (but no answers) to  seem to say this can't be done, but that was three years ago.  points to answers about how to modify the receiving phone's situation. Here I'm asking about forcing SMS on a single, current message on the sender's phone.

Essentially, I would like to set my phone so that all my outgoing messages to a specific friend, with whom I currently text back and forth over iMessage, are sent out over SMS, never iMessage. Additionally, I would like to block any incoming iMessage texts of his and (hopefully) they'll fail and be resent via SMS.  Let me restate that: I would like to force SMS for both parties, going both ways, for a specific individual contact.   Is this possible? Blocking any usage of iMessage between myself and this other individual, so they must either send and receive any texts to or from me via SMS (or the texts fail/never arrive).


I have a 1TB disk, /dev/sda. I installed Ubuntu using default options and it took up the whole disk.  I would like to install Ubuntu in a 200GB partition and leave the rest for data so that I can refresh my Ubuntu as and when I like it without destroying my data.  I see that under Installation Type there is Something else where I can specify the partition size. However, when I tried it it keeps saying something like no file system at /.  How do I use this option to install Ubuntu on 200GB, assuming that this is a fresh disk and nothing currently on it need to be preserved?

I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures).  I'd like to cover such situations:     If your disk contains other systems:


I`m using below Outputtext to show negative values in brackets. For example, -1,000.00 to reflect as (1,000.00)  <td>$<apex:outputText value="{0, Number, Currency}">   <apex:param value="{!target}" /> </apex:outputText></td>   Above line works fine except that I want to get rid of decimals. Negative value should appear like this (1,000) without decimals. Can someone please suggest a better way to achieve this? Can I achieve this using LEFT or Right Funtion?

Formatting numbers on a VF page, but I do a bunch of processing the Apex Class, so I would rather return the formatted String value from the controller.   I am doing something like this, but I just want the second number to appear as "(1500)" rather "-1500"  Getting lost in the Message Format docs, so hoping someone can guide me in the right direction...  List<String> args = new String[]{'0','number','###,###,###'}; system.debug('Positive' + String.format(  ( (1000) - (500.50)  ).round().format(), args) ); system.debug('Negative' + String.format(  ( (-1000) - (500.50)  ).round().format(), args) );


Is it possible to rotate marker symbols (e.g. a triangle) in QGIS individually with an attribute field like in ArcGIS?  Edit: I would like to rotate each marker symbol individually in category A with an attribute field X, where the angle is defined.  This is how it is done in ArcGIS: "To rotate marker symbols individually based on the value of a field in the point layer's attribute table click Layer Properties dialog box > Symbology tab > Advanced > Rotation. On the Rotate dialog box, the Rotate Points by Angle in this field specifies the field that holds angular values and the Rotation Style controls the origin and direction of rotation" (ESRI Help).

I am trying to apply a rule to rotate symbols based on the value of an attribute.  I tried to copy , which is essentially my question, however it does not work for me.   I have a layer with two attributes, the slope and aspect.  I want to colour the symbols by the slope (this part works) and rotate by the aspect.  The steps I take are:   Layer Properties -> Style -> Graduated -> Symbol -> Change Select Simple Marker (arrow) and press the button to the right of angle -> field type (double) -> Aspect-sel    Applying these commands changes the symbol to an arrow, and I can easily apply the colour gradient, but the symbols do not rotate. The attribute Aspect-sel varies from 2.87 to 334.23.    ETA: I was using Version 2.8.3 - on suggestion I updated to 2.14.10, which solved the problem.


Let $A$ be a commutative unitary ring.  Can we see the localisation of a ring $S_f^{-1}A$, where $S_f=\{f^n,n\geq 0\}$, as the ring $A[f^{-1}]=A[x]/(xf-1)$?  I'm having problem showing that the obvious map $S_f^{-1}A\to A[f^{-1}]$ is injective.  More generally, is it it known the presentation of the localisation $S^{-1}R$ with $S$ any multiplicative system?

I am having trouble with the following problem.      Let $R$ be an integral domain, and let $a \in R$ be a non-zero element. Let $D = \{1, a, a^2, ...\}$. I need to show that $R_D \cong R[x]/(ax-1)$.    I just want a hint.  Basically, I've been looking for a surjective homomorphism from $R[x]$ to $R_D$, but everything I've tried has failed. I think the fact that $f(a)$ is a unit, where $f$ is our mapping, is relevant, but I'm not sure. Thanks


When creating objects for a game engine (unity) or in general I often come across a choice. I can make a face of my object be the way on the left or join the faces and have them as such on the right. Is the way on the right valid? Does it lead to any errors?  If it is wrong, why is it wrong and what are the consequences?  This is more of a modelling question, not specific to blender.

Recently, I am trying to create 3D models for my own game project. However, when I do some researches on game models, I come up with the term - game-ready models and I could not find any clear definition online. Could anyone tell me about what exactly is game-ready models and how to know if my 3D models (created by Blender mainly) is suitable for games.  From what I know by far, quad topology is preferred in Blender. However, for most of the game engine, triangle topology is preferred (Please correct me if I am wrong). Does it mean I have to manually change the models in Blender from quad topology to triangle topology before importing to the game engine?  Thanks for any helps.


I'm requesting something from a database, as a result i get the following object:  "[Ljava.lang.Object;@64a294a6"  What is that? Can I do anything useful with that and convert it into something else?           // FIXME     List singleTasks = Arrays.asList((Object[]) objClient.execute("execute_kw",             Arrays.asList(db, uid, password, "project.task", "search_read",                     Arrays.asList(Arrays.asList(                             Arrays.asList("active", "=", true))),                     new HashMap() {{                         put("fields", Arrays.asList("display_name", "total_hours", "project_id", "user_id"));                         HashMap map = this;                         System.out.println(map.get("fields"));                     }}                 )));      HashMap map = (HashMap)singleTasks.get(0);     System.out.println(map.get("project_id").getClass().getName());    getClass.getName only gives me: "[Ljava.lang.Object;" as result.

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


Find all holomorphic funtion $f:B(0,1)\mapsto B(1,4)$ s.t. $f(0)=3$ and $f(1/2)=1$  $B(a,r)$ is the open ball with centre a and radius r.  I think that maybe Schwarz lemma will help, but dont know how. Thanks!

Problem  Find all holomorphic functions $f:B(0,1) \to B(1,4)$ that verify $f(0)=3$ and $f(\frac{1}{2})=1$.  I have no idea how to attack this problem,since it comes after an exercise related to Schwarz lemma, I thought that maybe the idea is to somehow apply the lemma in this problem as well, but if that is the case, I don't know how could I use it. I would appreciate suggestions.


Dears I submitted a paper, after 4 months I received major revisions from 2 reviewers. I made all the required amendments and submit again. One reviewer suggested to accepts it as is, the second didn't give a response. The editor sent the manuscript to a third reviewer who suggested rejection with very negative comments in everything. The editor gave us a major revision again. We have revised the manuscript again responding to all the third reviewer highlighted points (some points are not responsible for that reason we submitted a rebuttal letter to the editor before sending the revision). Do you think the editor send it again to the same reviewer? if yes: do we have a chance to be accepted? if no: can the editor resend to another reviewer or can make a final decision by himself? Do we have a chance to be accepted in all cases? Thank you in advance.

What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take?  Note that this question is about the typical situation and hence not about:   Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or .   This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question.


I am new to databases, but I want a database for my site to store mp3 files in it, so later I play them on my site by using jplayer.   They say there are two ways to store data (in this case mp3 files) in the database:    By storing actual file itself in the database.  By only storing particular file URL, address, location or metadata, etc.   My question is what is the right way and how can I do that in phpMyAdmin?

What is the best place for storing binary files that are related to data in your database? Should you:   Store in the database with a blob Store on the filesystem with a link in the database Store in the filesystem but rename to a hash of the contents and store the hash on the database Something I've not thought of   The advantages of (1) are (among others) that atomicity of transactions is preserved. The cost is that you might dramatically increase storage (and associated streaming/backup) requirements  The goal of (3) is to preserve atomicity to some degree - if you can enforce that the filesystem you are writing to does not allow files to be changed or deleted, and always has the correct hash as filename. The idea would be to write the file to the filesystem before permitting the insert/update referencing the hash - if this transaction fails after the filesystem write but before the database DML, that is fine because the filesystem is 'faking' being the repository of all possible files and hashes - it doesn't matter if there are some files in there that are not being pointed to (and you could clean them up periodically if you are careful)  EDIT:  It looks like some RDBMSs have this covered in their individual ways - I'd be interested to know how others do it - and particularly in a solution for postgres


I developed a Python plugin to import a PostgreSQL project organized in QGIS with one click. The problem is that I don't put the layers it in the correct "tree scheme" in the layer panel.  I enclose a photo of the piece of instruction.

I am trying to add new layers into a specific group which I can get to work if I know the index, but how can I get Python to find the index of a group so it can load the new layer into the group wherever it is in the TOC?  qgis.utils.iface.legendInterface().moveLayer( layer, index )


In this sentence, "I still wished I could have done more", why isn't it saying, "I still wished I could do more"? Beauty and the Beast season 2 episode 16:   You okay? Yeah. [sic] I don't know, it's a little bittersweet, though. Yes, we finally stopped Sam, but, I don't know, it feels a little hollow, don't you think? We broke up their secret society. Just take a little bit of digging. We can put them away for a long time. Yeah, I still wished I could have done more, though. That's the old you talking. The one that used to take the law into his own hands. I like the new you better. Oh, you do, do you? Six years is a long time to hold onto all that pain and anger. Can't even imagine. I can.  I know the difference in meaning between 'could' and 'could have', but here, I can't seem to get the grammar.

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


I ran a R console on our server, and the process took much longer time than I expected. Thus I was trying close it by ctrl+z, it didn't work. Finally I just closed the terminal. But the process is still there when I check with top commands. I used kill, but won't kill the process.  The top command output:   PID   USER     PR   NI  VIRT    RES    SHR  S  %CPU %MEM  TIME+ COMMAND      27448 zhenyang  20   0 20.133g 0.020t 3.840g R 100.0 21.3  72:00.06 R    I checked the website and someone says it might be ctrl+z put the process in background, but fg command won't work.   Anyone help?

I have started a wget on remote machine in background using &. Suddenly it stops downloading. I want to terminate its process, then re-run the command. How can I terminate it?  I haven't closed its shell window. But as you know it doesn't stop using Ctrl+C and Ctrl+Z.


When I click on and element with a class of tool the alert box should show up but nothing happens, no errors in the console either.  I'm pretty sure the issue I'm seeing is an event delegation issue, I just can't figure out where I'm going wrong.  So the first snippet, the if statement loads a bit of HTML into the #tools element and the second snippet is when a user clicks on an individual .tool element that was loaded into #tools.  I've tried adding the alert code block into the if code block but didn't make a difference.   Snippets  if ($("#tools").length) {     data = {}     data['id'] = $("#tools").data('id');      ajaxCall("#tools", 1, data); }     $("#tools .tool").on("click", function(e) {     alert("1234");     e.stopPropagation(); });   HTML Example

1

12

123

1234

   *AJAX Function**  function ajaxCall(element, callId, dataIn) {     var limit;     var data;     data = {id: callId, data: dataIn, element: element};      $.ajax(     {         type: "POST",         url: "calls/",         data: data,         success: function (data)         {                             $(element).html(data);         },         error: function (jqXHR)         {             $(element).html(jqXHR.status + " - " + jqXHR.statusText);         }     }); }

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.


Windows 8.1 64 bit  Lepa N500 Power supply  GTX Geforce 650 ti boost  My Lepa N500 Power supply is rated at 500 watts. I read some about PSU's and it says that the overall rating isn't really what matters. Apparently, for Graphics Card requirements, one should check the line 12? rating. On my power supply it is 408 Watts.   IF NVIDIA says that the GTX Geforce 650 Ti Boost requires 450 Watts, does this mean that my 500 watt power supply is enough? Or should I be comparing 450 Watts to 408 Watts, thus seeing that my psu can't support my graphics card?  My computer ran for a whole year using this PSU and Graphics card but now I am having a problem where my computer will shutdown turn off and restart at the lock screen and I am given critical event 41 Kernel-Power in my event logs.  Could this mean that my power supply is too weak? Why did my computer work for a whole year before this happened?  NOTE: Computer will run in Safe Mode using the ONBOARD video card. Not the NVIDIA card

Note: This is intended to become a canonical post.  I got a dedicated graphics card of type XXX and it claims I need at least a YYY Watt PSU.   How big does my PSU really need to be?


I encountered The Squirrel at "A tree."              |   |                                                                         |   |                     "   Hello, I'm The                        |             |                        Squirrel. I can                        |             |                      provide you candies,                     |             |                      and lots of things.                                    |                      I know how much you                                    |        _.-'''-,      love candies. But I                                    |      .'        `\     feel alone in this                                    |     /           /          forest.       "                         |        |    /      .--^_^                                                   |        |    |     /  C ,,\                                                           |    |    |   \  _.)                           ___                            |     \   |   /  \                   ____.----'.-'                            |      '-, \./ \)\)               .-' --  __.-'                   |            \        `-/   );/           ___/  - _.-'                        |             \_________''--'-'________.-' --    /                            |              -   --        -  -     -     __.-'                                              -    --    -     --   --  /                                                 _________________________.-'                                 He asks you some questions. What are the correct answers, and what is the reward for getting them correct?

Squirrel plays tic-tac-toe at expert level and is a formidable player.  Has anyone managed to win?   Tried following this:  but its always a draw.