<input type="checkbox" class="allCheck" />all  <input type="checkbox" class="checks" />shoes  <input type="checkbox" class="checks" />bag  <input type="checkbox" class="checks" />car   how to unable and uncheck other checkbox if checkbox all is checked?  NOTE: I want to check multiple checkbox EXCEPT ALL if ALL is checked the others must be unchecked and disabled.

I'd like to do something like this to tick a checkbox using jQuery:  $(".myCheckBox").checked(true);   or  $(".myCheckBox").selected(true);   Does such a thing exist?


I can see variations on this question get asked a lot, but after trying many of the suggestions here I still can't get this to quite work. Basically, I have an HTML form that on submit makes a POST multipartfile request to the server:  <form class="resource-checkout-form" method="POST" enctype="multipart/form-data"          id="resourcefilecheckoutform" action="/uploadAndCheckout">     <input type="file" name="file" id="selectyamlfile" class="filestyle"/> </form>   When the value is changed (a file is selected), I have the form submit automatically:  $('#selectyamlfile').change(function() {       $('#resourcefilecheckoutform').submit();     });   To a REST interface on the server:  @ApiResponses(value = {          @ApiResponse(code = 200, message = "Success", response = HttpMessageInformationReturnDataBean.class),         @ApiResponse(code = 404, message = "Not Found")})  @RequestMapping(value = "/uploadAndCheckout", method = RequestMethod.POST) public String singleFileUpload(@RequestParam("file") MultipartFile file,                                RedirectAttributes redirectAttributes) {   So far so good, that works, and it uploads the selected file. The problem comes when I try and bypass the form submit redirect by using Ajax to do the request itself. I changed the HTML (removing the action):  <form class="resource-checkout-form" method="POST" enctype="multipart/form-data"          id="resourcefilecheckoutform">     <input type="file" name="file" id="selectyamlfile" class="filestyle"/> </form>   And moved the action itself to a jquery that occurs when the form is submitted:  $('#resourcefilecheckoutform').submit(function(e){     e.preventDefault();     $.ajax({         url:'/uploadAndCheckout',         type:'POST',         contentType: false,         cache: false,         processData: false,         data:$('#resourcefilecheckoutform').serialize(),         success:function(){             console.log("success");         }     }); });    It makes the request, but on the server side it complains that the request is not a multipart request:  org.springframework.web.multipart.MultipartException: The current request is not a multipart request   The number one suggestion I've found is to change the contentType to false, but I'd already done that and it didn't work. So, having searched around I tried a few things, starting with changing the contentType to multipart:  $('#resourcefilecheckoutform').submit(function(e){     e.preventDefault();     $.ajax({         url:'/uploadAndCheckout',         type:'POST',         contentType: 'multipart/form-data',         cache: false,         processData: false,         data:$('#resourcefilecheckoutform').serialize(),         success:function(){             console.log("success");         }     }); });    But that caused an error about a missing boundary:  Caused by: java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: the request was rejected because no multipart boundary was found   So I figured I'd add the boundary in, as suggested in some of the other threads:  $('#resourcefilecheckoutform').submit(function(e){     e.preventDefault();     var boundary = '--'+Math.random().toString().substr(2);     $.ajax({         url:'/uploadAndCheckout',         type:'POST',         contentType: 'multipart/form-data; boundary='+boundary,         cache: false,         processData: false,         data: $('#resourcefilecheckoutform').serialize(),         success:function(){             console.log("success");         }     }); });    But that causes a 400 - Bad Request error with no other real feedback to indicate what it didn't like. I feel like I'm dancing around some fundamental mistake that I'm just not seeing, maybe I'm grabbing the data itself wrong? Does anyone know how to achieve this?

I would like to upload a file asynchronously with jQuery.     $(document).ready(function () {     $("#uploadbutton").click(function () {         var filename = $("#file").val();          $.ajax({             type: "POST",             url: "addFile.do",             enctype: 'multipart/form-data',             data: {                 file: filename             },             success: function () {                 alert("Data Uploaded: ");             }         });     }); });  File <input type="file" id="file" name="file" size="10"/> <input id="uploadbutton" type="button" value="Upload"/>     Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem?


Evaluate to get a closed form solution.   I encountered this by rearranging the below equation which I also need some help solving:  $\sum_{n=1}^N n {n \choose k} $  I'm not very good at solving generating functions but I believe the right approach is to rearrange the terms in order to get some sort of recursive relation.  If solving the title equation is not the right approach in order to solve the equation in the body please let me know!

After reading , the most popular answer use the identity $$\sum_{t=0}^n \binom{t}{k} = \binom{n+1}{k+1}.$$  What's the name of this identity? Is it the identity of the  modified.  How can we prove it? I tried by induction, but without success. Can we also prove it algebraically?  Thanks for your help.    EDIT 01 : This identity is known as the  because, on Pascal's triangle, when the addends represented in the summation and the sum itself are highlighted, a hockey-stick shape is revealed.


I've added my.js using js injector module and updated .info file. Where do I have to create those instances? Sorry, I'm new with technology.

Is there a location where I can drop in a custom JavaScript file in Drupal 7.x?  It just includes simple event actions for menus, and I don't want to edit the theme/module files.  Or do I have to just add the "include" hook to the theme/module?


my University Library uses bluefire reader, for allowing off site viewing of ebooks. The software produces .acsm files, and is compatible with Android, and IOS. Is there a software for Ubuntu which will let me read these acsm files?

For the moment I run Adobe Digital Editions under Wine to download ebooks burdened with ditigal restriction management. I only use it to open .acsm files supplied by ebook-shops, which contain authentication information required to download the actual DRM'ed ebook files, which I then transfer to my reader-device with calibre. My question is, if there exist open source alternatives to Adobe Digital Editions. They don't need much functionality. I just want to put the .acsm-file in and get the .epub out (no, I don't want to remove the drm, that'd be illegal afaik).


In C# there is concept of static and instance variables.  Static variables are shared by all instances.  In the code snapshot from above, an instance field _bigClass is created. In the constructor and other methods, this is instantiated and it's methods are invoked. My question is - why has the user not used this._bigClass? I'm trying to understand whether it is not necessary to use the this. keyword to access variables within c# class?

I was curious about how other people use the this keyword. I tend to use it in constructors, but I may also use it throughout the class in other methods. Some examples:  In a constructor:  public Light(Vector v) {     this.dir = new Vector(v); }   Elsewhere  public void SomeMethod() {     Vector vec = new Vector();     double d = (vec * vec) - (this.radius * this.radius); }


I have 3 files   file1:  compute-0-44 compute-0-2  compute-0-7  compute-0-8    file2:  0 11/29/2017 | 02:01:34 0 05/16/2018 | 08:47:56   file3:  0 963 0 459   When I do paste file1 file2 file 3, I get :  compute-0-44    0       0 compute-0-2     11/29/2017 | 02:01:34   963 compute-0-7     0       0 compute-0-8     05/16/2018 | 08:47:56   459   What I want is :  compute-0-44    0                       0 compute-0-2     11/29/2017 | 02:01:34   963 compute-0-7     0                       0  compute-0-8     05/16/2018 | 08:47:56   459   Is it possible using paste? If there are any other alternatives like sed, that will serve the purpose too.

I want to print two files in two columns -- first file on the left side and second on the right side. paste doesn't do the job, because it can only insert a character as delimiter, so if first file lines have different length output will be twisted: $ cat file1 looooooooong line line $ cat file2 hello world $ paste file1 file2 looooooooong line   hello line    world  If it was a command to add trailing spaces like fmt --add-spaces --width 50 the problem would be solved: $ paste <(fmt --add-spaces --width 50 file1) file2 looooooooong line                                 hello line                                              world  But I don't know a simple way to do this. So how to merge and print several files horizontally without twisting? Actually, I just want to look at them simultaneously.  UPD: command to add trailing spaces does exist (for example, xargs -d '\n' printf '%-50s\n') But solution like $ paste <(add-trailing-spaces file1) file2  does not work as expected when file1 has fewer lines than file2.


Voting to close as duplicate on mobile is pretty painful with the recent changes to the duplicate selection dialog, especially due to .  However, at least on iOS, it's even worse than that. Pasting in a duplicate link to the overly-wide text field causes all sorts of crazy horizontal scrolling as well:    You'll also note that the OP's user card is encroaching on the question tags' personal space. Similarly, selecting a duplicate via direct link or through one of the options in the dialog causes crowding to the left, smushing the title up against the "similiar/back to questions" link and cramping the "votes" text's style:    I know that there's only so much space to work with on mobile, but at the moment it feels like this just has been overlooked. Presumably with some slight style tweaking, a lot of these more quirky behaviours could be avoided.  Finally – perhaps the most important issue of all – there's no space between "Closing" and the > sign:

Attempting to use the site with a Nexus 4.  I came across a question that was a duplicate, so I found the dupe and voted to close.  The only problem:  the button is at the bottom of the modal.  While in mobile view, that means lots of painful scrolling all the way through the question and its answers.  On the normal site this isn't an issue:    ...but on the mobile site...    Here's an example:    This definitely affects usability while on mobile.


Let $X=\mu + \Sigma^{1/2}Z$ and $Z\sim \mathcal{N}(0,I)$. Is there a closed form for the distribution of $\exp(X)$?

The Multivariate Gaussian pdf is given by  $$(2\pi)^{-\frac{K}{2}} \det(\Sigma)^{-\frac{1}{2}} \exp({-\frac{1}{2}}(X-\mu)' \Sigma^{-1} (X-\mu)) $$  The wikipedia for multivariate Gaussians is    However I could not find a pdf for the multivariate lognormal distribution. Does it exist? If so, what is it?


In this circuit I am using a push button rated 5V.  I am planning to connect a voltage source having 24V.  What will happen?  Circuit diagram of the switch.   Partnumber: SPVR110102


I've got an ajax request that executes every time an user presses some button (writes text) in a certain textarea. This would work great already (it is a search filtering function btw.), but it would n't be a good idea to execute the filter after each keystroke. So I was thinking about making a delayer thing. So the ajax request would only execute only when at least 1 second has passed since the user pressed the last button. How can I achieve this?  <textarea id="text" name="text" onkeyup="Search()"</textarea>  function Search() {     $.ajax({...     ... }   So obviously it will run all the time. For example if I type "hello" into the textarea fast it will run 5 times and it has no use. It would be enough to run it only when I stopped writing for more than 1 second.

I have a form with an <input type=text /> and I want to call a javascript function after 5 seconds of the last key press, and every time a new key is pressed, this timer should reset and only call the function after 5 seconds.  How can I do this?  I'm using jQuery.  thanks!


Why can water evaporate below 100°C?  Or, more in general, what is the mechanism behind the evaporation process in liquids?

When the sun is out after a rain, I can see what appears to be steam rising off a wooden bridge nearby. I'm pretty sure this is water turning into a gas.  However, I thought water had to reach 100 degrees C to be able to turn into a gas.  Is there an edge case, for small amounts of water perhaps, that allows it to evaporate?


I am using following stored in sqlserver, I can't figure out to pass array in this stored procedure. The array is exactly in this format from c# code ABC,DEF or i can write string abc = "ABC,DEF";  ALTER PROCEDURE [dbo].[BookedChemicalsLists]         @RigNameValue VARCHAR(50) = null AS BEGIN       SET NOCOUNT ON;           SELECT *       FROM [BookedChemicals]       WHERE AND (RigName IN (@RigNameValue,',') OR @RigNameValue IS NULL ) END

How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?  SELECT * FROM Tags  WHERE Name IN ('ruby','rails','scruffy','rubyonrails') ORDER BY Count DESC   In this query, the number of arguments could be anywhere from 1 to 5.  I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some elegant way specific to , I am open to that.


I formatted by Desktop drive,  I used Easeus data recovery during scanning all files will be showing, but after completion, I can't find all files

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


I am a businessman. I had applied UK tourist visa in 2017 along with my wife which were refused. Then later in December 2017 I had applied German Visa without my wife for business. Which were also refused. After that I changed my circumstances and re applied for UK tourist visa in 2018 which were approved for both of us. We visited UK and returned back after 10 days. We both have traveling in other more countries like Singapore, Turkey, Malaysia, Dubai, China etc  Now question is : I want to apply schengen Visa for tourist. My wish to visit German, France, Italy and Switzerland. should I apply again on German Embassy? Or other embassy Please guide on it  This question is NOT duplicate.  Some people told me that we should apply in German embassy because they refused me first. Other embassy will not approve my vise due to this. This is my question now should I apply again on German Embassy? Or other embassy

I'm planning to go to Germany on Sept 6-8, then Netherlands on Sept 8-11 and exit Switzerland on Sept 11-14.  My question is:  Which embassy do I need to apply for the Schengen visa? The number of days are the same for Netherlands and Switzerland, but I'm planning to apply in Netherlands since it will be my second point of entry.


Which of these is correct capitalization?        Mrs. Ohana gave me the Bible.   Mrs. Ohana gave me The Bible.

Should I capitalize the word "the" when speaking of God as "the/The Lord"?     I praise the Lord.   or...     I praise The Lord.


This is my code: SELECT *  FROM mytable  WHERE (Permit,Stampdate) IN (SELECT Permit,MAX(Stampdate) AS Stampdate                               FROM mytable GROUP BY Permit)

I often need to select a number of rows from each group in a result set.  For example, I might want to list the 'n' highest or lowest recent order values per customer.  In more complex cases, the number of rows to list might vary per group (defined by an attribute of the grouping/parent record). This part is definitely optional/for extra credit and not intended to dissuade people from answering.  What are the main options for solving these types of problems in SQL Server 2005 and later? What are the main advantages and disadvantages of each method?  AdventureWorks examples (for clarity, optional)   List the five most recent recent transaction dates and IDs from the TransactionHistory table, for each product that starts with a letter from M to R inclusive. Same again, but with n history lines per product, where n is five times the DaysToManufacture Product attribute. Same, for the special case where exactly one history line per product is required (the single most recent entry by TransactionDate, tie-break on TransactionID.


We need a method that can check which file or folder is currently being used by the process and return a list for further path analysis. Not so long ago I found out about PerformanceCounter, which partially simplified my life. But this question was never resolved. But the concept of my application requires a solution to this issue. There is an example of what I want to achieve is the standard Resource Monitor snap-in for Windows. There is a tab Disk > Disk activity, just select any process and you can see all the files and folders opened by this process. Actually, that's why I'm not giving up yet, because I suppose that there is an API. The Net Framework is a rich library, not a single programmer's life is enough to learn everything. We will discuss any solutions.

How do I get the list of open file handles by process id in C#?   I'm interested in digging down and getting the file names as well.   Looking for the programmatic equivalent of what process explorer does.   Most likely this will require interop.   Considering adding a bounty on this, the implementation is nasty complicated.


I have a question related to this one:   Since the rules don't specify how you calculate your DC for this ability, could a multiclass Sorcerer/Cleric use their Charisma instead of their Wisdom modifier?

clerics have the ability  (PHB, p. 62):     When a creature within 5 feet of you that you can see hits you with an attack, you can use your reaction to cause the creature to make a Dexterity saving throw. The creature takes 2d8 lightning or thunder damage (your choice) on a failed saving throw, and half as much damage on a successful one.   It doesn't specify what the DC of the saving throw is.   I assume it uses the spell save DC, even though it technically isn't a spell?     Spell save DC = 8 + your proficiency bonus + your Wisdom modifier


I'm usually dealing with different captive portals and having to sign in to have free WiFi. Sometimes the browser (Firefox for Android) or the OS detects the portal and redirects you to log in but other times that just doesn't happen and you have to visit one website so it can detect the captive portal. The problem is that when the web is a HTTPS website it takes longer or you just receive some annoying security warnings that require extra clicks. But also many times still the captive portal is not recognized. When that happens visiting a HTTP website just for detecting the portal makes everything more straightforward but nowadays fortunately there aren't left so many HTTP domains but for this purpose they can be useful. I'm visiting one domain that contains 11 characters that I won't mention because the website could be considered spam. So, in short, do you know any domain that is less than 11 characters that still uses HTTP? Thank you!

Captive WIFI portals suck.  So often when I open in a browser (Desktop Chrome or Mobile Chrome) a HTTP site, I get the captive portal, but with auto-completion and so quickly I connect again to WIFI.  The problem is that after the captive portal redirects, I'll have also a HTTPS redirect and Chrome remember the certificate and to use only HTTPS.  So I cannot use the same site twice (in a session).  A well-known public HTTP only site will resolve this.  Well-known sites usually work, causing some less debugging of the WIFI connection.


I find these types of Dragons really difficult to face. One strike with their frost breath wipes out most of my health. I have beaten some before, but I need easier ways, so feel free to tell me anything-Thanks     I am a Dumner or the Dark Elf btw and I use all magic, but mostly destruction.

Anyone got any tips on how to beat down a Dragon solo? I've managed to get it down to 3/4 health, but keep running out of potions and getting owned.  I tend to whittle it down with bow from cover, then hit it with akimbo Lightning Strike which is awesome btw. Then poison and some sword.  I can't see a way to achieve this without having about 1000 points of stamina to run away from it when it does a swooping breath attack which seems to track you no matter what way you go.  Any advice please? This is for fighting them out in the open, "wild dragons" if you will.


We have a module that allows users to create some scripts.  I would like to determine if user has used correct properties etc.  For example user has wrote:  var test = session;   I can do:  var something = eval("session"); if (!something){     // Throw error here }   But i'm facing issues with this:  var test = session.id; // session id property is "id123456"   I thought i can do:  var something = eval("session.id"); if (!something){     // Throw error here }   But it seems it really does this:  var something = eval("id123456");   Any suggestions how can i determine wheter property exist in this object, also property in property and further?  As i said, i'm not trying to determine some certain object for some certain property, the strcture can be:  session.id.toString().name ... and further  In addition, i have just tried this:  session.hasOwnProperty("id"); // returned false  session.id // returned "id123456"

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


Just interested in learning the context behind a cup of "Joe". It seems weird that we'd use a proper noun to name a cup of coffee, rather than anything else.

I knew that Joe was used to mean the average man, and I discovered that joe is used to mean also coffee.   What is the origin of such meanings? When it is used to mean the average man, should I understand that Joe is/was the most common name?


I'm thinking about buying a blender since my food processor doesn't do a great job at pureeing tomatoes or blending my homemade almond milk. I'm considering buying a blender that can also puree fresh coconut if I can find one withing my budget. I'd like to spend 70€ tops. In my country (Portugal) I can find blenders with 1000W and 1200W within this price range. These are supposed to be high speed blenders, but for the blenders I'm seeing I can't find any reviews saying they can puree coconut. Will any blender over 1000w puree coconut? How can I know? Any advice?

My wife had a "smoothie" made by a co-worker that is based on green apples and raw red potatos.  Our smoothie maker can't do that and leaves unchopped bits and a gritty feel.  Her friend uses a Vitamix blender, and looking up the model number not only induced sticker shock, but reviews raised concerns with the item leaving bits of teflon in the food etc. And the price for just a replacement pitcher is so high that it appears overpriced.  What is it about a blender that allows it to make a good purée rather than just mixing things easily?  I think it might be the design of the blade and base, not just raw power: even a modest powered blender doesn't stall or run out of power; but it doesn't chop any finer no matter how long it is left running.  It might also involve speed vs torque usage of power.  Does anybody know what makes a machine capable of making a good purée as opposed to just blending, especially when both kinds are sold as “blenders”.  Should I be looking for ones with different options for blades like a food processor, to make it well suited to different purposes? E.g. I have seen blades just for milkshakes.  In general, how do you shop for one when the only information a seems to be total power and the number of presets?


I hope I don't make myself look stupid asking this question. Please note I'm relatively new to physics but am extremely interested. To test myself, I made up a time, velocity, and mass and filled in the rest. This is what followed:  v=9 m/s, d=108 m, t=12 s, a=0.75 m/s/s, M=7 kg, p=63 kg m/s, F=5.25 N, W=756 J, P=63 W, KE=283.5 N   Is this correct? My question is what the difference is between the force and the kinetic energy. I was imagining something being thrown down a road, so shouldn't the force be the same as the kinetic energy? Am I being extremely stupid?

I have learned that $$\mathbf{F} = m \mathbf{a}$$ where both the force $\mathbf{F}$ and acceleration $\mathbf{a}$ are vectors. This makes sense, since both force and acceleration have a direction.  On the other hand, the kinetic energy $$K = \frac12 mv^2$$ looks completely different. It doesn't seem to depend on the direction. How are these two concepts related?


Having read other questions on here I believe I would be right in saying that this error occurs when you are trying to modify the children of a node while iterating over it.  I saw a couple of methods I could use to overcome this issue, however when I was messing around with my code I noticed that by replacing my enhanced for loop with a regular for loop it solved the issue.  My first question is why does this work? It would seem to me that I am still modifying the children of a node while iterating over them, so I don't understand why this now works. Secondly, is there anything wrong with overcoming the error in this way?  Update  As requested, here is a snippet of code      ArrayList<Button> list = new ArrayList<Button>();     Button b1 = new Button();     Button b2 = new Button();     Button b3 = new Button();     Collections.addAll(list, b1, b2, b3);      //Error     for(Button b : list) {         list.remove(b);     }      //No Error     for(int i = 0; i < list.size(); i++) {         Button b = list.get(i);         list.remove(b);     }

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


I'm having some trouble with my loop here, I want the user to be able to add more info(the grade and credits) if they have more classes to add. I'm stuck and hoping someone can help. Thanks.   import java.util.*;  public class DoWhileDemo  {     public static void main(String[] args){         String name;         String add;         double gradePoints = 0;         double credits = 0;          Scanner input = new Scanner(System.in);          System.out.println("Enter Students Name: ");         name = input.nextLine();         do {             System.out.println("Enter class credits: ");             credits = input.nextDouble();             System.out.println("Enter letter grade: ");             gradePoints = input.nextDouble();             System.out.println("Add another class? (Y/N) ");             add = input.nextLine();         } while (add == ("Y"));     } }

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


Can there exist a holomorphic function defined on the unit disk $D = \{ z \mid |z| <1\}$ such that $f(\frac1n) = \frac{1}{2^n}$ where $n \in \Bbb Z$?  I thought of using CR equations to find a contradiction but unable to do.

There does not exist an entire function which satisfies $f({1\over n})={1\over 2^n}$, what I tried is if possible then define $g(z)=f(z)-{1\over 2^{1\over z}}$ Then $g({1\over n})=0$ and so $g(z)$ is entire and its $0$ set has limit point in it and so $f(z)={1\over 2^{1\over z}}$ which is not analytic at $0$? Please help!  Edit: OOps! the way I defined $g(z)$ that is not entire! could any one give me hint?


I'd like to know what all I can delete that isn't part of the terminal. I don't really want to delete it, per se, but rather I want to copy it all over onto another disk, then use symbolic links to put it all back, but so it'll free up space on the main disk. first thing I tried was /bin/, which wrecked the terminal. I want to move everything that I possibly can onto the other drive, and I can't do that without the terminal. it's kind of a complicated situation where I can't move the entire OS to the bigger drive. thank you for your time.

I have Ubuntu 14.04 with a lot of packages and work related stuff that I am very happy with it. It is installed on my main SSD drive which is a 120GB one (I had choosen "/" when I installed ubuntu, so I beleive everything should be on this drive). It shows up as /dev/sda  Now I have added another SSD to my computer which is a 240Gb. I do not have any other storage media at hand at the moment (e.g. external hard drive).   Since the new 240GB drive has obviously more capacity and is faster (a newer generation than my 120GB one), I want to move my Linux to this new drive. This new drive shows up as /dev/sdb and at the moment it is not formatted or anything (I have literally unpackaged and inserted in my PC right now :P)  How can I safely move my linux installation to the new drive?  I can change the SATA cable so the new drive shows as /dev/sda if necessary.  This is the output of "fdisk -l" if that helps:  Disk /dev/sda: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00076d7a     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048   226064383   113031168   83  Linux /dev/sda2       226066430   234440703     4187137    5  Extended Partition 2 does not start on physical sector boundary. /dev/sda5       226066432   234440703     4187136   82  Linux swap / Solaris  Disk /dev/sdb: 240.1 GB, 240057409536 bytes 255 heads, 63 sectors/track, 29185 cylinders, total 468862128 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000  Disk /dev/sdb doesn't contain a valid partition table


I'm reading the Marvel comic series Avengers vs X-men. In this comic Wolverine and a few other X-men work WITH the Avengers against the X-men. I know Wolverine is an X-man. I'm wondering if anyone can explain this and possibly tell the back story to how he came to be working with the Avengers.

In Avengers vs. X-Men Program Guide (free at ), why is the Wolverine depicted fighting in the Avengers side of the brawl instead of X-Men?


From a data feed I'm getting date and time in this format:  19:24:15 06/13/2013   I need to have it converted to be in 12-hour AM/PM without the seconds. So the above time would be 7:24 PM. The date should remain in mm/dd/yyyy format. Is there an elegant way to do this in PHP (not MySQL)? Thanks!

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


If a body begins to collapse, it will form a black hole when its radius is less than the gravitational radius ($r_g$). However, for an observer (stationary in the Schwarschild metric), he/she will observe the surface of the body (which was originally at $r>r_g$) takes infinity amount of time to reach $r_g$ (although it takes finite proper time for the surface to do so). Do I understand correctly?  If so, why we can still find black hole? Isn't that it will take infinite time to form a black hole in our reference system in the universe?

One thing I know about black holes is that an object gets closer to the event horizon, gravitation time dilation make it move more slower from an outside perspective, so that it looks like it take an infinite amount of time for the object to reach the event horizon. It seems like a similar process should slow the formation of the black hole itself: As the star collapses, its gravitational time dilation make itself collapse more slowly. This make me wonder, are what astronomers claim to be black holes really black holes, or are they stars that progressively make themselves more similar to one without actually reaching the stage of having an event horizon?  EDIT: Contemplating one answer, I realize the question is ambiguous. What does finite time mean in general relativity. Here is a less ambiguous question: Is there a connected solution of 3+1 dimensional general relativity with one space-like slice not have a singularity, and another space-like slice having one.


Trying to replace all file names in a directory with ai to newai.  Execute: find . -exec rename 's/ai/newai/' {} ";" Error: find: ‘rename’: No such file or directory   What could be the problem here, and how can I fix it?

I'm trying to to execute a script, which uses the command rename.   When I execute it, I get a message rename: command not found. Any ideas?   if [[ -z '$3' ]]; then     shopt -s dotglob     rename "$EXPRESSION" ./* else     rename "$EXPRESSION" "$3" fi


I just have managed to install Lubuntu 12.04. Now I want to do some things in the terminal like installing and configuring the Apache and a Lamp-system among other things.  I come from Open SUSE world and there, I usually get access to the super-user-mode in the terminal by typing the command su.  But if I do that in Lubuntu, I am asked for the password and when I enter my password that I use to access the system, I get this error message (translated from German):  su: error with the Authentication    What should I do now?

I am having problems with the su command. I know my password and I am typing it correctly but su indicates authentication failure.  So I checked on the internet and then went into recovery mode and changed my username's password to what I was entering before.  Even now entering the same password on su gives me authentication failure.  Please suggest what am I doing wrong??


I graduated with a 6.4/10 GPA from a Non-IIT University in India - BE in CS in 2019. I pretty much messed up during my early 2 years of UG while taking part in non-academics such as workshops and research. Only later I have realized that it was too late to improve and now I am facing the consequences of neglecting good grades. I wasn't a lazy student, I worked 16 hours a day learning something new for research, solving math and leetcoding because I couldn't stand the classroom environment. I hate blaming the University but they were rather a scam ridden cash cow run by unprofessional people and did not encourage any sort of research activities or any funding for it. Luckily, my time in research did not require much funding yet I have managed to publish 12 papers during my 5 years (9 during undergrad) at well reputed domestic and international conferences - IEEE, Springer, etc, 3 winning awards. I frankly enjoyed the lab work and research part of my UG because it gave me complete freedom to explore my skills and work, yet it's frustrating how marks is always given the first preference. I have graduated with most publications compared to anyone who have studied in my University. I feel really cheated as I was told publications were preferred over GPA. I was an aspiring MS and PhD candidate for Natural Language Processing. And now I'm seeing that I have been rejected by ASU and I'm pretty sure it was because of my GPA, which probably never made it to the AdCom. This is my first post on stack exchange and I really want to know whether my career has hit a dead end here. I'm feeling tired and frustrated, thinking about a career change since a second chance elsewhere to prove my worth would at least take me beyond a bachelors degree.

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


So I have this question in my math homework, and I really have no idea how to prove it, could someone please help me?  Let $A\subset \mathbb R$ and $B\subset \mathbb R$ be two compact sets such that $\alpha = \inf B$ satisfies $\alpha > 0$.   Let $A/B = \{x/y \mid x\in A \text{ and } y \in B\}$. Prove that $A/B$ is compact.  My definition of compactness is the following:  Let $X$ be a metric space. A set $E \subset X$ is compact if and only if for each open cover $\{O_\alpha\}_{\alpha\in I}$ of $E$ indexed by some set $I$, there is an $n\in \mathbb{N}^*$ and indices $\alpha_i \in I$ such that $E\subset\bigcup_{i=1}^n O_{\alpha_i}$.  Sorry for the bad writing, but I don't know how to use the math notations.

Given compact $A,B \subseteq \mathbb{R}$ with $\alpha := \inf(B) > 0$, define $$\frac{A}B := \left\{\frac{x}y : x \in A  \text{ and } y \in B\right\}.$$ Show that $\frac{A}{B}$ is compact.  I am thinking of using the following result given in a previous exercice but I don't know how to proceed.     $K \subset \mathbb R^n$ is compact if and only if for all $\{x_{n}\}$ such that $\{x_{n} : n\in \{1,2,\dotsc\}\}\subset K$, there exists a convergent subsequence $\{{x_{\phi(n)}}\}$ that converges to a limit $l \in K$.   When does the infimum come into place?


Before I get downvoted and castigated - yes - this question has been asked (link below) but was not answered.  So, like the title suggests, does anyone know how to create a forward delete button using special keys on Ubuntu?  Thanks  previous link:

I'd like to create a shortcut with Ctrl+Backspace or Fn+Backspace or Ctrl+Shift+Backspace which performs a forward delete (the same as the Delete key). I use it (Fn+Backspace) on a Mac and I find it very useful.  Is this feasible?


I want to remove this line from fstab using sed:  /var/run/saslauthd /export/sasl none bind 0 0   I know a workaround, first give the number of line, then remove it with sed, but I want to know how to escape the three /?  I have tried a lot but none of these works:  sed  /^/var/run/saslauthd/d /etc/fstab sed  /^\/var\/run\/saslauthd/d /etc/fstab sed  /^"/var\/run\/saslauthd"/d /etc/fstab sed  ^"/var\/run\/saslauthd"/d /etc/fstab sed  ^"/var/run/saslauthd"/d /etc/fstab sed  ^/var/run/saslauthd:d /etc/fstab sed  :^/var/run/saslauthd:d /etc/fstab sed  :^"/var/run/saslauthd":d /etc/fstab sed  :^\/var\/run\/saslauthd":d /etc/fstab sed  :^\/var\/run\/saslauthd:d /etc/fstab sed  :^//var/run/saslauthd:d /etc/fstab sed  ^//var/run/saslauthd:d /etc/fstab

As in  I'm trying to get line numbers which contains the pattern. My pattern contains slashes so I wanted to add custom delimiter.  This simple one works:  sed -n '/file/=' temp.txt   Using delimiter for string replace works too:  sed 's|file|gile|' temp.txt   but when I want to add delimiter to first example it doesn't:  sed -n '|file /etc|=' temp.txt   I know I can escape slashes but I would prefer to add custom delimiter. Any idea how to fix my command?


i have declared Long checkRandom=0101010101l; but when I am printing checkRandom it printed checkRandom==17043521 what was the reason its taking checkRandom=17043521 not checkRandom=0101010101

This prints 83  System.out.println(0123)   However this prints 123  System.out.println(123)   Why does it work that way?


It is a principle and proof from Introduction to Set Theory, Hrbacek and Jech.   In the proof, line 1 and 2, I couldn't understand why $Q(0)$ is true.   $Q(0)$ means that "$P(k)$ holds for all $k<0$".   I understood there are no $k<0$.   And then I couldn't proceed.

I was pondering a bit more about  question regarding being able to "omit" the base case in a proof by strong induction due to vacuous truth. The post states:  Strong induction proves a sequence of statements $P(0), P(1), …$ by proving the implication "If $P(m)$ is true for all nonnegative integers $m$ less than $n$, then $P(n)$ is true." for every nonnegative integer $n$. There is no need for a separate base case, because the $n=0$ instance of the implication is the base case, vacuously.  However, if we consider $n=0$, we would have that the statement is vacuously true, which I would take to mean that the implication is true regardless of the validity of $P(0)$. However, clearly it's necessary for $P(0)$ to hold for an induction proof to be valid. So I'm confused on how, by omitting the base case, $n=0$ isn't just a tautology, making the implication true regardless of whether $P(0)$ actually holds.


What is the terminology for this abomination, where the face folds in on itself and requires triangulation to function? I'm assuming it has to do with something relating to normals, but I'm not sure specifically. Additionally, what is the terminology for its inverse, where a face has a level of flatness to it?

I think my question relates to a fundamental of 3D modeling that I haven't picked up on yet. It's very simple:  Let's say I have a flat quad. A plane on the XY plane inserted into am empty blender file is a great example. Now let's say I start moving each of the 4 vertices around on in any direction, especially the Z axis.   At this point, there would still be one face, but its extremely unlikely that the face would be planar (I just learned this word). So blender does its best to make sense of what this should look like.  The problem I'm having is that it seems like my quads are always like this, but they never look the way I want. There are edges and seams that look like they are dangling in space, and what tends to happen is that my mesh looks great when viewed from most angles, but if you look at it from just the right angle, you notice the dangling edges or sometimes even some kind of impossible geometry. And so I might try to nudge the problematic vertices around, but this often seems to either make it worse, or just hide the bad geometry until you see it from a different angle.  For me, this always seems to happen whenever I'm trying to move vertices to add roundness to something that is originally square.   There is another question on here about how to actually flatten the quads. That's great, and I might use some of the techniques mentioned there. My question is:   Why does this happen? (Can someone explain this better?) What are some tips and tricks to avoid this situation? What are some tips and tricks to mitigate this situation?   EDIT Here is an illustration:  The overall mesh as viewed from a distance looks decent (for my skill level)    But if you get closer and look from a certain angle...    Super close up:    The "edge" that is pointed to by the arrow is not actually an edge, but some kind of artifact created when blender tries to show the quad. The way the vertices are positioned, it shouldn't actually be possible to see the sliver of the face that I marked in red, since this face is supposed to be around the corner from the edges. The edges should form the silhouette on the right side of my figure.     Here is the side view. Maybe it is the angled topology that skews the face in a funny way?  But I'm not looking for help with this one particular issue, but rather a better understanding of why this happens, and ideas to prevent this in future models.


[Ubuntu 14.04.3  x86_64]  I have a 128MB SD card that I want to use as a read-only tripwire binary and database volume. Using UDisks I reformatted (complete wipe) that card with FAT-16 bit version as lone FAT option, along with NTFS and Ext4.   Next I tweaked the mount options from within UDisks, so my /etc/fstab entry is  (EDIT-1):  /dev/disk/by-label/TW_db-bin /mnt/TW_db-bin auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=TW-db-bin,x-gvfs-icon=TW-db-bin 0    EDIT-2: In UDisks, after successfully FAT re-formatting, I had:  Partition type: W95, FAT32(LBA)   # (*) Content: FAT (16-bit version)   (*) LBA mapping is late W95 FAT format style, i.e. total overkill on 128 MB SD media  Last I tried to mount it with the following result:  Error mounting system-managed device /dev/mmcblk0p1: Command-line `mount "/mnt/TW_db-bin"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/mmcblk0p1,        missing codepage or helper program, or other error        In some cases useful info is found in syslog - try        dmesg | tail  or so   (udisks-error-quark, 0)   dmesg | tail -f only gives me ufw related stuff.  Re. "Wrong fs type" per the chatty err mesg above... presumably because I used FAT-16 bit (FAT32 LBA)...   EDIT-3:  $ sudo fdisk -l /dev/mmcblk0  Disk /dev/mmcblk0: 125 MB, 125960192 bytes 8 heads, 32 sectors/track, 961 cylinders, total 246016 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000          Device Boot      Start         End      Blocks   Id  System /dev/mmcblk0p1              97      246015      122959+   c  W95 FAT32 (LBA)   I first tried Ext4 but ran into a formating error. Then I tried NTFS it mounted. Question: Is a FAT-16bit (FAT32 LBA) fs out of bound for Ubuntu 14.04 ?  =======================================================  EDIT-4: Apparently in gnome-disk-utility 3.10.0 (UDisks), you're outaluck when you want to format and mount a FAT SD32 LBA, as well as specify *"Show in user interface". That corresponds to the mount option: x-gvfs-show. Taking that out as well as:  - not specifying a label to mount on, such as `/mnt/foobar`  - not specifying an icon name (`x-gvfs-icon=foobar`)  - not specifying a display name (`x-gvfs-name=foobar`)   seems to solve the pbm. BUT WHY ?

Got a problem with my laptop manufacturer's partition. It's FAT32-formatted and fails under same curcumstances as for topic starter at . It seems like vfat got a problem working with x-gvfs-show parameter. Also, I seek for more "painless" solution then "format-and-refill", because this one is created by the manufacturer and (as far as I know) got specific structure adapted for BIOS.


My work so far:  I think I need to prove that N x N is either countable or countably infinite.  My first step:  A set A is countably infinite if there is a bijection (1-1 and onto) function f : N → A.  If a function is bijective, it is also surjective.  Let A represent N x N.  The set N × N = {(n, m) : n, m ∈ N} is countable.        Is this the correct way to prove the original question?

When showing that $\mathbb{N}\times\mathbb{N}$ is in bijection with $\mathbb{N}$, it seems standard to give a proof by picture that shows a way to systematically weave through all the points in $\mathbb{N}\times\mathbb{N}$ and label each one as you go.    I know there is a polynomial expression for this method, given by $$ J(m,n)=[1+2+\cdots+(m+n)]+m=\frac{1}{2}[(m+n)^2+3m+n] $$ where $m$ is the usual $x$-coordinate and $n$ the usual $y$-coordinate.  But how does one "see" how this formula is arrived at? I know how to manipulate the middle expression to arrive at the rightmost expression, but how does the middle expression relate to the weaving pattern through $\mathbb{N}\times\mathbb{N}$? Thank you.


I got used to using the shutdown command like:  shutdown -t now   So when I started wanting to use reboot in the same way I was confused at first because to reboot now you need to use:  reboot -n   I looked more into and I noticed reboot could also be used to shutdown the system with:  reboot -p   What is the history behind these two commands? Did one come out before the other and are they both on most systems historically?

I just want to know difference between in     reboot  init 6 shutdown -r now   and which is the safest and the best?


I am running this command on linux shell it works smoothly  sed -i 's/\[-.*-]//g' error .txt  What it does is it removes patterns like [-any text-] along with the brackets and - sign.  but when I try to run it through perl script , it removes only '-' sign.  I tried to use  system("sed -i 's/\[-.*-]//g' error.txt");  Please what I am doing wrong?

'     Number found where operator expected at ./scripttemp.perl line 5, near   ""sed -i -r "4" (Missing operator before 4?) String found where   operator expected at ./scripttemp.perl line 5, near "}" error.txt""   (Missing operator before " error.txt"?) syntax error at   ./scripttemp.perl line 5, near ""sed -i -r "4" syntax error at   ./scripttemp.perl line 5, near "s/[-.*-]//g}" Execution of   ./scripttemp.perl aborted due to compilation errors. '   I am getting this error running my script :  **#!/usr/bin/perl use warnings; use strict; exec("sed -i -r "4{s/\{\+//; s/\+}//; s/\[-.*-]//g}" error.txt");**   Please tell me what is wrong?


Some application (or script) changes the permission of my /Users folder from 755 to 777 at every boot. So, when I change it back to 755 (or repair perm with DiskUtility) it is good until the next reboot.  Is any way run strace or something like at boot time to trace down who changes the permission?

I use the Disk Utility to repair it. But the permissions change back after reboot.     Permissions differ on “private/etc/aliases”; should be lrwxr-xr-x ;   they are -rwxr-xr-x .    Permissions differ on “Users”; should be drwxr-xr-x ; they are drwxrwxrwx .    Permissions differ on “Users/Shared”; should be drwxrwxrwt ; they are drwxrwxrwx .   System: Mac OS X 10.9.3


I'm absolutely horrible at scripting.  Never really done it before.  I've been asked to create a script for a class project and have no idea where to start.  Here are the requirements:  Create a simple script on the client to request the user to supply a numeric value (X) and then ping each IP address starting from 192.168.222.1 to 192.168.222.X :   The value could be provided to the script as a command line parameter or read from the keyboard when prompted A conditional expression should be used to evaluate when all needed IP addresses have been pinged The script should ping each IP address starting from 192.168.222.1 and ending at 192.168.222.X. The script should display text saying “Beginning scan of 192.168.222.X ….” followed by the output of the ping command of the current IP addresses Use an appropriate ping parameter to only send two ping echos to each host Run the script with an input value of 15 and show the results.   Any help would be much appreciated.  Danny E.

In my work there is a lot of computer and I want make a joke. I can close computer over the network but finding IP addresses is hard to me.  How can I easily find all online IP adresses from 192.168.1.aa to 192.168.1.zz?


We are learning about it and my teacher didn't explain why either Sigma nor Pi were used.

Repeated union is written as: $$\bigcup_{i=0}^na_i$$ Repeated logical conjunction is: $$\bigwedge_{i=0}^na_i$$ Etc.  So why isn't repeated addition: $$\operatorname{\huge+}\limits_{i=0}^n{}^{\Large a_i}$$ Why use Sigma and Pi for sums and products? Everything else is just a bigger version of the symbol.


I did lasso selection using lars::lars(), then I got this plot. I have no idea how to interpret it:   Could anyone provide a brief explanation? Why does it plot standardized coefficients against |beta|/max|beta|?

I am new to the glmnet package, and I am still unsure of how to interpret the results. Could anyone please help me read the following trace plot?  The graph was obtaining by running the following:  library(glmnet) return <- matrix(ret.ff.zoo[which(index(ret.ff.zoo)==beta.df$date[2]), ]) data   <- matrix(unlist(beta.df[which(beta.df$date==beta.df$date[2]), ][ ,-1]),                   ncol=num.factors) model  <- cv.glmnet(data, return, standardize=TRUE)  op <- par(mfrow=c(1, 2)) plot(model$glmnet.fit, "norm",   label=TRUE) plot(model$glmnet.fit, "lambda", label=TRUE) par(op)


Assuming I have defined a glossary entry named v_rob as v_{\text{robot}} and in my text I want to describe the robot velocity at time t using a subscript, I was tempted to write \gls{v_rob}_t. This, however, produces an error as it is a double subscript. I was hoping to get the equivalent of v_{\text{robot},t}. As I frequently refer to such variables at different timepoints (e.g. t, t-1, t+1, ...), in the present form I can't really use the glossary entry and have to instead manually type v_{\text{robot},t}, v_{\text{robot},t-1} in my text.  My current workaround is adding a negative space between the glossary entry and the new subscript, but it's obviously not the best way to do it: \gls{v_rob}\hspace{-0.7pt}_t  Is there an elegant way to use subscripts with my glossary entry?

I am trying to use the approach given in the solution here  (which looks really neat) for an application where i am having more than one glossary; in the original i have only a symbolslist and abbreviations, but here's an mwe adapting the symbolslist to the main list provided in the solution of the link above  \documentclass{scrbook} % \usepackage[acronym,toc]{glossaries} %this line is new \newglossary[slg]{symbolslist}{syi}{syg}{List of Symbols} \makeglossaries \glsnoexpandfields  \newcommand*{\glsarg}{i}  \newglossaryentry{BetragVektor}{      name=\ensuremath{|\overline{u_i}|},      text=|\overline{u_{\glsarg}}|,     description={ABC}} \newglossaryentry{s:tP}{     name=\ensuremath{T_p\mathcal M},     text=T_\glsarg\mathcal M,     description={},     type=symbolslist %in own list } % modify the entry's format  \defglsentryfmt{%   \let\orgglsarg\glsarg   \ifdefempty\glsinsert   {}%   {%     \let\glsarg\glsinsert     \let\glsinsert\relax   }%   \glsgenentryfmt   \let\glsarg\orgglsarg }  \begin{document}  $\gls{BetragVektor}[1]$  $\gls{BetragVektor}$  $\gls{BetragVektor}[1]$  $\gls{BetragVektor}[2]$  $\gls{BetragVektor}[]$  $\gls{s:tP}[1]$  $\gls{s:tP}$  $\gls{s:tP}[1]$  $\gls{s:tP}[2]$  $\gls{s:tP}[]$  \printglossaries \end{document}   As mentioned, the only thing new is that I introduce a second list. The solution still seems to work for the main list as the result shows.    So somehow the new argument gets added in the and and \glsarg stays the same. How can I solve this, such that my new glossary also can have optional parameters on their entries?


I'm trying to send a file from my jsp to controller via ajax, im getting EXCEPTION:Null Error, below is my code:  Controller:  @RequestMapping(value = "/schedulebatch",method =  RequestMethod.POST,params="insertData") public @ResponseBody String addBatch(@RequestParam( @RequestParam(value="upfile",required=false) MultipartFile upfile) throws  Exception {  if(!upfile.isEmpty()){                     System.out.println("test1");}   View:      $("#submit-btn").click(function(){      var upfile = document.getElementById('upfile').enctypeVIEW;     alert('test');  if(batchname==null || fromdate == null || partners == null || interval ==      null){   $('#insertmodalalert').empty();      $('#insertmodalalert').append('
NOTICE | Please fill out the required form.
');      $('#alertMod').modal();      $('#okbtn').click(function(){       window.location.reload(true);      });  }  else{      $.ajax({        type: "POST",    url: "schedulebatch?insertData",    data: {"upfile" : upfile},                         success: function(response){       // alert('test');             $('#insertmodalalert').empty();             $('#insertmodalalert').append('
NOTICE | '+response+'
');             $('#alertMod').modal();             $('#okbtn').click(function(){              $('#alertMod').modal('hide');              window.location.reload(true);             });            },                       error: function(xhr, status, error) {                              var err = eval("(" + xhr.responseText + ")");             // alert('test');               // Display the specific error raised by the server      (e.g. not a               //   valid value for Int32, or attempted to divide by      zero).               $('#insertmodalalert').append('
NOTICE | '+err.Message+'
');              $('#activateMod').modal();                            $('#okbtn').click(function(){               $('#alertMod').modal('hide');               window.location.reload(true);              });            }             });   //alert("Test");  }     HTML:     File to upload: <input class="form-control" type="file" name="upfile"      accept=".csv" id="upfile"> <button type="submit" class="btn btn-success" id="submit-     btn">Submit</button>     I narrowed down the code to the only thing that gives me error, thanks in advance. It gets the Multipart file successfully but im not sure why it gives a null exception error

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 trying to obtain an Homography of a soccer image shot by a broadcasting camera. The original picture:    I then proceed to find field lines, resulting in the following:    From what I understand, at least 4 points need to be detected. From the detected line, I should easily obtain 4 points by intersection of the lines. (I will extend the detected lines so they actually intersect)  The detected points can then be projected to another image. Since I do not have another image, I believe I should use a field model, like the one below.    Since field dimensions are known, every intersection point of the field model in world coordinates are known. For example: the middle of the field can be set to (0,0) (in meters). The top right of the field will then be (52.5,34) (in meters).  Now how do I set those world coordinates on the image?

I'm working on a project using Chrome - JS and Webkit 3D CSS3 transform matrix. The final goal is to create a tool for artistic projects using projectors and animation - somewhat far away from using maths... I'm using a projector to project several squares over several shapes - as seen in the picture. What I would like to do is for the user to draw 4 points on the screen (2D x and y) and from there extract a matrix object that I could apply to a regular DIV element of a dimension of 100px by 100px. By finding scaleX, scaleY, rotation, rotationX, rotationZ and probably some perspective that I could apply to the div to relatively match the surface. I'm not really familiar with geometry beyond sin and cos, and 3D in general and don't even know if that is something doable. If anyone could help me get started or point me in the right direction, I would greatly appreciate. Here is an animated gif (click to enlarge), hoping it makes it more clear to understand.


If $a_1, a_2, \dots , a_n$ are positive numbers, prove following inequality:  $\sqrt{a_1a_2}+\sqrt{a_2a_3}+ \cdots + \sqrt{a_{n-1}a_n}≤ \frac{n-1}{2}(a_1+a_2+ \cdots + a_n)$  I know the solution, though there may be other algorithms. I will post my solution if there is no identical one.

Please demonstrate this is true This is the exercise:  $$\sqrt{a_1a_2}+\sqrt{a_1a_3}+\ldots+\sqrt{a_1a_n}+\sqrt{a_2a_3}+\ldots+\sqrt{a_{n-1}a_n}<\frac{n-1}2(a_1+a_2+a_3+\ldots+a_n).$$ I tried to solve it, but I couldn't do anything right. This is my idea: $\sqrt{a_1a_2}<\frac{a_1+a_2}2$ -because geometric mean < arithmetic mean; $\sqrt{a_1a_3}<\frac{a_1+a_3}2$, $\dots$, $\sqrt{a_{n-1}a_n}<\frac{a_{n-1}+a_n}2$  Please give me the answer!!  $a_1,a_2,a_3,\ldots,a_n$ are real, positive nummbers


When writing a post with a code, it is not possible to use block code directly after a list.   This is a list It contains some items It's goal is to show that I can't use code below  This is a code sample that is not being parsed.   If I write anything  I can use code now.    The only place I can't use code is right after a list.  Like here, for instance  This is also code that is not being parse  This is code too.   This is normal text.  This is code.

Consider the following piece of Markdown code:  This is some regular text.      >>> def factorial(n):     ...     return 1 if n < 2 else n * factorial(n - 1)     ...   * This is a list item.      >>> def factorial(n):     ...     return 1 if n < 2 else n * factorial(n - 1)     ...    Notice that the second code block is preceded by a list item.   Why is the factorial code not properly formatted under these circumstances? To demonstrate the problem, I'll insert the Markdown code show above:    This is some regular text.  >>> def factorial(n): ...     return 1 if n < 2 else n * factorial(n - 1) ...     This is a list item                 def factorial(n):       ...     return 1 if n < 2 else n * factorial(n - 1)       ...               This applies to numbered as well as unnumbered lists.


When a bounty is automatically awarded, it goes to the first answer. Is this still the case when an answer was older, but was edited more recently by the original answerer than a newer answer with the same score?

It's possible to offer and award bounties of reputation on questions.   What is a bounty? How can I find questions that have a bounty attached? How do I start a bounty? When can I start a bounty? Why is the system requiring me to choose a bounty amount that's higher than the minimum? Can I use Markdown formatting in the bounty remarks? Can I edit the remark? How long is the bounty period? How do I award a bounty? Can I award a bounty to my own answer? Can I award a bounty to an old answer? If I offer a bounty on someone else's question, can I award the bounty to their answer? After awarding the bounty, can I remove it or move it to another answer at a later time? What happens if there's no answer after the bounty period? What happens if I feel my question is still unanswered? What is automatic awarding? Are bounty awards exempt from the 200 points/day reputation limit? How does Community Wiki mode affect bounties? How does user deletion or post dissociation affect bounties? Can I award a bounty to an answer from a deleted user or one where the author was dissociated? Can I offer a second bounty after the first one has expired? Can I raise my bounty? What happens if a bounty question is closed or deleted? Why can't I vote to close or migrate a bounty question? What happens if I delete my account while I have an active bounty? Do I keep an awarded bounty when I delete my answer? What happens if a question where I awarded a bounty later gets deleted or migrated? Can I cancel my bounty? Can I affect / divide / share part of my bounty to two (or more) users? How many outstanding bounties can a single user have?      See also:  in the Help Center


This website called  came to my attention. It looks like a full copy of the various StackExchange sites. It does not add any information beyond the original contents from StackExchange, and its sectionings look like they were somehow programmatically generated from the tags on the question. Is this legal? Does StackExchange acknowledge this? It is scary because I can find my own contribution to the StackExchange sites copied on FAQoverflow, which I never knew before.

I just found http://programmingfaq.w3ec.com/faq/4761/whats-the-hi-lo-algorithm which has an exact copy of this Stack Overflow question, , with all its answers and no difference in a single character. There is no reference to Stack Overflow.  Is this legal, or at least tolerated? Is this impertinent theft of information? I just can't see any sense in copying whole pages, particularly when not referencing the source.


Test application:  public class Main {      private static long a = 0;      public static void main(String[] args) {         for (int i = 0; i < 5; i++) {             long start = System.currentTimeMillis();             for (long j = 0; j < 5000000000L; j++) a++;             System.out.println(System.currentTimeMillis() - start);         }          System.out.println("\na = " + a);     } }   The output:  2600 3739 3735 3734 3742   I noticed that the first nested iteration is considerably faster than subsequent ones whenever I run the program.  Why is it so?   Java version:  java version "1.8.0_74" Java(TM) SE Runtime Environment (build 1.8.0_74-b02) Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)   EDIT  If I copy-paste the outer loop right below the first one:  public class Main {      private static long a = 0;      public static void main(String[] args) {         for (int i = 0; i < 5; i++) {             long start = System.currentTimeMillis();             for (long j = 0; j < 5000000000L; j++) a++;             System.out.println(System.currentTimeMillis() - start);         }          System.out.println("----");          for (int i = 0; i < 5; i++) {             long start = System.currentTimeMillis();             for (long j = 0; j < 5000000000L; j++) a++;             System.out.println(System.currentTimeMillis() - start);         }          System.out.println("\na = " + a);     } }   then again the first iteration is the fastest in both outer loops:  2587 3736 3736 3734 3732 ---- 2560 3737 3734 3735 3740   Even in the first example, I would expect the first iteration to be slower, because of warm-up time (initialization, JIT optimizations, etc), as described in the answers for  which @Mureinik kindly pointed to, but it is the opposite.  EDIT 2  When I increase the limit for j variable by adding another zero to it (ten times), the difference is more than 10 seconds:  25747 38637 37767 38104 38690 ---- 27951 38780 39035 37962 37931   It seems to be a constant ratio of about 2.6/3.7.

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


$("button").on("click", function() {   $("ul").append($("

").text("good")); });  $("ul").on("click", "li", function() {   $(this).remove(); });  $("ul").on("mouseenter", "li", function() {   $(this).css("color", "yellow"); });
   <button>click me</button>
good

    Can we use objects in on() to create multiple events to elements that are yet to be created?

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 trying to make a text to speech program, but I always get this:  Exception in thread "main" java.lang.NullPointerException at FreeTTS.main(FreeTTS.java:7)   Here is my code:  import com.sun.speech.freetts.Voice; import com.sun.speech.freetts.VoiceManager; public class FreeTTS {     public static void main(String args[]) {         VoiceManager vm = VoiceManager.getInstance();         Voice voice = vm.getVoice("kevin16");         voice.allocate();         voice.speak("Hello World!");         voice.deallocate();     } }   how can I fix it?


Because of the floating point error 2^(log(63)/log(2)) isn't equal to 63. Check the results below:  format long; >> 2^(log(63)/log(2))  ans =    63.000000000000014   And unfortunatelly i can't use vpa on a logarithm according to the Matlab documents:     Unlike exact symbolic values, double-precision values inherently   contain round-off errors. When you call vpa on a double-precision   input, vpa cannot restore the lost precision, even though it returns   more digits than the double-precision value. However, vpa can   recognize and restore the precision of expressions of the form p/q,   pπ/q, (p/q)1/2, 2q, and 10q, where p and q are modest-sized integers.   So how can i solve this issue ? I have very big numbers like 2^200 and i get very big errors.  Edit: I'm not asking why it is happening. I'm asking how to make this work as 100% accurate so this isn't a duplicate.  The best solution so far:  Unfortunatelly the solution that is suggested by @Sardar_Usama isn't always working as intended. Check the results below:  >> sym(2^(log(2251799813685247)/log(2)))  ans =  2251799813685259   On the other hand  >> 2^(log(vpa(2251799813685247))/log(vpa(2)))  ans =  2.2517998136852470000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0*10^0*10^15   is much much more closer to 2251799813685247 = 2^51. It's error is around ~9.491*10^-494 which makes this the best solution so far but there is still some error.

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


I have a mesh which want to array 360 degrees with help of curve modifier and array modifier. I created a circle curve. I moved cursor to its origion and mesh's origin to cursor. I want to array it on y axis but when i click on it, it turns my mesh upside down under where it is not supposed to be. When i drag it on x axis, it moves on z axis. i tried CRTL+A - scale, rotarion, too in case. But still same.  Above, position of my mesh and curve        The result

Every time I think I have the curve modifier mastered, it throws me a another curve ball (no pun intended).  Why in  can I not get the lights to follow the spiral curve? When the modifier is activated, the lights are stretched and distorted along the curve.  I created the curve by converting it from a mesh (string of verts). Why does it not display like a normal Bezier? Is that related to my problem?  I am following all the "rules" that I am aware of, as detailed here: . The curve seems to run in the correct direction. The origin point is at the first point of the curve. The curve modifier on the lights is set to -Y which is the local orientation of the curve's direction.  What am I missing?


Took apart an Apple TV due to no power from the smps and its like 80% covered in a white rubbery adhesive.   I'm used to seeing this stuff (or similar) on bigger components like electrolytic caps to minimize vibration but I'm curious it's purpose on the bottom of the board where it's all smd? Other than to make it really annoying to chip away to test components

I'm not an engineer, but my monitor stopped working yesterday (it just wouldn't display anything but still gets power) so I figured I'd like to take it apart and see what went wrong.  At the very least I'd get to see what the inside of a monitor looks like :).  Anyway, I took it apart, and also read around about my issue and it seems the capacitors have gone bad, at least some of them.  However, I also noticed some white elastic stuff all over the board.  Some of them are sticking two capacitors together and to the board, but I also see some from where power socket connects to the board.  My question is, what is the white stuff?  Should I replace all capacitors that have white stuff around it, and should I also replace the power socket part?  Or should I just replace the bulging capacitors and leave it at that?  UPDATE:


Consider the following code snippet:  var OuterScope = function () {      function InnerScope () {         this.name = "K";         this.address = 10;     }      return new InnerScope(); };  console.log(new OuterScope());//Returns: InnerScope { name: 'K', address: 10 } console.log(new OuterScope().constructor.name);//Returns: InnerScope   Why/how does new OuterScope() returns the data? InnerScope is not defined in global namespace (where new OuterScope() is being invoked) yet JS properly recognizes the object/it's properties/constructor name etc.  Seems like returned data is parsed into JSON & JS interpreter in global namespace creates a JS object based on that JSON structure similar to what happens when we feed JSON data to client side from server side.

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I'm trying to make my own map implementation. MyMap.h :  #pragma once  #include <set> #include <list> #include <utility>  template <class Key, class Value> class MyMap { public:     MyMap();     ~MyMap();     int count(Key&);     Value& operator[](Key&); private:     std::set<Key> m_keys;     std::list<std::pair<Key, Value*> > m_kvList; };   MyMap.cpp  #include "stdafx.h" #include "MyMap.h"  MyMap<class Key, class Value>::MyMap() {  }   MyMap<class Key, class Value>::~MyMap() {  }  int MyMap<class Key, class Value>::count(Key& k) {     if (m_keys.find(k) != m_keys.end())         return 1;     return 0; }  Value& MyMap<class Key, class Value>::operator[](Key& k) {     if (count(k) == 0)     {         m_keys.insert(k);         Value* pValue;         std::pair<Key, Value*> kvPair(k, pValue);         m_kvList.push_back(kvPair);         return *pValue;     }     std::list<std::pair<Key, Value*> >::const_iterator it;     for (it = m_kvList.begin(); it != m_kvList.end(); it++)     {         if ((*it).first == k)             return *(*it).second;     } }   main code cpp  #include "stdafx.h" #include <iostream> #include <string> #include "MyMap.h"  using namespace std;  int _tmain(int argc, _TCHAR* argv[]) {     MyMap<int, int> m1;     m1[3] = 60;     m1[1] = 30;     m1[2] = 95;     return 0; }   The problem is in the assignment of the values in the map, it tells me  no operators "[]" matches these operands. operand types are MyMap<int, int> [int]   I don't really understand what's wrong with what I wrote because the overloading of the [] operator takes a Key and the Key in this example is set as int and so I pass an int value to the [] operator and the compiler still complains.

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


My phone is OnePlus 5t. In fastboot mode I flashed TWRP fastboot flash recovery twrp-3.5.2_9-0.img and every time I try to enter recovery mode it just start the original recovery mode that came with the system. But if i enter 'fastboot' and type: fastboot boot twrp-3.5.2_9-0.img the TWRP comes up.... How can I make it automatically TWRP? ty!  Edit: someone send me this:  And this was the problem: Another common mistake after flashing TWRP you must not boot into android. Reboot straightforward into recovery right after flashing, otherwise your custom recovery will be replaced with stock recovery /system/recovery-from-boot.p

I am trying to root my Lenovo K8 Plus after unlocking bootloader. I try to install TWRP and somehow the TWRP recovery doesn't open and the phone is struck in the bootloop. I then fastboot the device and connect to PC and open minimal fastboot cmd. The phone wasn't listed in adb device, but listed in fastboot devices. I think usb debugging is not turned on because the system doesn't restart (maybe there is no ROM). What should I do?


I want to pass object or list to sql server stored procedure. My purpose is to insert multiple records at a time via store procedure.  So, is there any way to do it?

I've often had to load multiple items to a particular record in the database. For example: a web page displays items to include for a single report, all of which are records in the database (Report is a record in the Report table, Items are records in Item table). A user is selecting items to include in a single report via a web app, and let's say they select 3 items and submit. The process will add these 3 items to this report by adding records to  a table called ReportItems (ReportId,ItemId).  Currently, I would do something like this in in the code:  public void AddItemsToReport(string connStr, int Id, List<int> itemList) {     Database db = DatabaseFactory.CreateDatabase(connStr);      string sqlCommand = "AddItemsToReport"     DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand);      string items = "";     foreach (int i in itemList)         items += string.Format("{0}~", i);      if (items.Length > 0)         items = items.Substring(0, items.Length - 1);      // Add parameters     db.AddInParameter(dbCommand, "ReportId", DbType.Int32, Id);     db.AddInParameter(dbCommand, "Items", DbType.String, perms);     db.ExecuteNonQuery(dbCommand); }   and this in the Stored procedure:  INSERT INTO ReportItem (ReportId,ItemId) SELECT  @ReportId,           Id FROM     fn_GetIntTableFromList(@Items,'~')   Where the function returns a one column table of integers.  My question is this: is there a better way to handle something like this? Note, I'm not asking about database normalizing or anything like that, my question relates specifically with the code.


How do I quote two non-contiguous paragraphs from a longer article? I want to be clear that they're non-contiguous, but not have an editorial interlude between them. Here's an example quotation from , with how I want to format it:  Over the decades, though, [higher education has] behaved like an embezzler who starts by taking only what he means to replace, but ends up extracting so much that embezzlement becomes the system. [...] When the economic support from the Golden Age began to crack, we tenured faculty couldn’t be forced to share much of the pain. Our jobs were secure, so rather than forgo raises or return to our old teaching loads, we either allowed or encouraged those short-term fixes—rising tuition, larger student bodies, huge introductory lectures.  I thought about moving the bracketed ellipsis to its own line, which seems more proper but looks clunky. I'm also interested in how you might quote this if it weren't a block quote -- specifically, should you close the first paragraph with a quotation mark or not? (Also, this is in an email, not an academic paper, so I'm worried about readability rather than about adhering to an official style guide.)

This is a problem that has long troubled me.  Imagine that I have a block of prose organized in three paragraphs. I want to construct a single quotation that contains only the first and third paragraph.  I use ellipsis if I want to tell readers that I am skipping sentences in a quotation. How do I tell readers that the quotation is skipping a paragraph?


I'm using a C based native library named WinDivert via DllImport to handle packets in C#.  What would be the best way to define and handle (get, set) data which is  smaller than 8 bits in C# struct like the C style struct below without using bitwise operations?  Maybe MarshalAs attribute?  typedef struct {     UINT16 SrcPort;     UINT16 DstPort;     UINT32 SeqNum;     UINT32 AckNum;     UINT16 Reserved1:4;     UINT16 HdrLength:4;     UINT16 Fin:1;     UINT16 Syn:1;     UINT16 Rst:1;     UINT16 Psh:1;     UINT16 Ack:1;     UINT16 Urg:1;     UINT16 Reserved2:2;     UINT16 Window;     UINT16 Checksum;     UINT16 UrgPtr; } WINDIVERT_TCPHDR, *PWINDIVERT_TCPHDR;   Variables Reserved1, HdrLength are defined as 4 bits, and Fin, Syn, Rst, Psh, Ack, Urg are 1 bit, and Reserved2 is 2 bits in the code above.  Thank you in advance.

I have a structure which I need to populate and write to disk (several actually).  An example is:  byte-6     bit0 - original_or_copy   bit1 - copyright   bit2 - data_alignment_indicator   bit3 - PES_priority   bit4-bit5 - PES_scrambling control.   bit6-bit7 - reserved     In C I might do something like the following:  struct PESHeader  {     unsigned reserved:2;     unsigned scrambling_control:2;     unsigned priority:1;     unsigned data_alignment_indicator:1;     unsigned copyright:1;     unsigned original_or_copy:1; };   Is there any way to do this in C# that would enable me to access the bits using the struct dereferencing dot operator?   For a couple of structures, I can just do bit shifting wrapped in an accessor function.  I have loads of structures to handle in this way, so I'm looking for something that's easier to read and quicker to write.


My question doesn't concern the standard-proof of the uniqueness of the empty set, which uses the lemma that the empty set is a subset of every set. My question concerns an alternate proof that I made before reading the standard one, and which now seams wrong, but I can't find my mistake. Can someone point me in the right direction?   My proof goes as follows:   Let us assume for contradiction that the empty set is not unique. This means that there is another empty set, let's call it $\varnothing'$, for which $ \varnothing' \neq \varnothing $. By the axiom of extensionality we have the following $\varnothing = \varnothing' :\iff \forall x: x \in \varnothing' \leftrightarrow  x \in \varnothing $, which implies $\varnothing \neq \varnothing' \iff  \exists x:  \neg (x \in \varnothing' \leftrightarrow  x \in \varnothing)$.  This is equivalent to $  (x \in \varnothing' \land x \notin \varnothing)  \lor  (x \notin \varnothing' \land x \in \varnothing) $ . But this is never true, because the empty set (by definition) doesn’t contain any elements. Hence, the empty set is unique.     I have read . My question doesn't only concern the correctness of my proof but also the difference between my proof and the standard one. If my proof is right, then I don't see why one should use the "standard" proof, which uses another lemma, instead of just applying the axiom of extensionality.

I haven't been able to figure out if the following reasoning is correct, so I'd like to have the opinion of other people on that.  The goal is to prove that the empty set is unique.  In order to do that, let $E$ be a set, $A$ be an empty set and  $B$ be an empty set. I want to prove that $A = B$.  First, I can try proving that $A \subset B$.  I know that $\forall x \in E, x \notin A$. Now I can consider this proposition : $x \in A \Rightarrow x \in B$  Since $x \notin A$, I can safely say that that the proposition above is true.  Hence, I can conclude that $A \subset B$  Am I right in my conclusion?


I've defined the following command  \newcommand{\CI}{\textsc{Ci}~}   which produces a C with a small uppercase i. The only problem I have is that when I use this command in the \chapter or \section environment the i is lower case. How can I fix that?

I can't seem to have both the small caps and boldface styles on a line:  \huge\sc\bf Hello   This will generate bold text, and if the \sc is placed after, it will generate small caps text but not bolded. They seem to override each other, so is there any way to apply them both?


I am trying to classify the data set "Insurance Company Benchmark (COIL 2000) Data Set" which can be found in .  I am using XGBoost in R (I am new to XGBoost algorithm) for the classification and the code that I have come up with is as follows-  D <- read.csv("ticdata2000.csv", header=T)  # dim(D)    # O/P- 5823 86  # Make training and testing splits- train_indices <- sample(1:nrow(D), floor(0.7 * nrow(D)), replace = F)  training <- D[train_indices, ] testing <- D[-train_indices, ]   library(xgboost)  # Train/Fit model (classifier)- model_classifier <- xgboost(data = as.matrix(training[-86]), label = training$C86, nrounds=100, eta = 0.1, gamma = 1)   # Make predictions using trained model- preds <- predict(model_classifier, as.matrix(testing[-86]))   # Convert floating-point values to either 0 or 1 according to 'C86' column- # for (i in 1:length(preds)) # { #   preds[i] <- ifelse(preds[i] < 0.1, 0, 1) # }   length(preds)       # O/P- 1747 length(unique(preds))   # O/P- 408   For 'XGBoost', the results are floats and they need to be converted to categorical values (for classification) at whichever threshold is appropriate for the model. How do I decide the threshold appropriate for my model? The final prediction has to be either 0 or 1.  The minimum and maximum values in "preds" variable is as follows-  min(preds)    # O/P- 0.03360531 max(preds)    # O/P- 0.3086071   Ofcourse, these values are bound to change as I have not used a seed value.  Any help is appreciated!  Thanks

I have a question regarding classification in general. Let $f$ be a classifier, which outputs a set of probabilities given some data D. Normally, one would say: well, if $P(c|D) > 0.5$, we will assign a class 1, otherwise 0 (let this be a binary classification).   My question is, what if I find out, that if I classify the class as 1 also when the probabilities are larger than, for instance 0.2, and the classifier performs better. Is it legitimate to then use this new threshold when doing classification?  I would interpret the necessity for lower classification bound in the context of the data emitting a smaller signal; yet still significant for the classification problem.  I realize this is one way to do it. However, if this is not correct thinking of reducing the threshold, what would be some data transformations, which emphasize individual features in a similar manner, so that the threshold can remain at 0.5?


I have some classes that look like this:    World.h:  #ifndef WORLD_H_ #define WORLD_H_ #include "GameObject.h" #include <vector>  class World { public: std::vector<GameObject*> objects;  World(); virtual ~World(); void add(GameObject*); void initialize(); void update(); void render(); };  #endif /* WORLD_H_ */   GameObject.h:  #ifndef GAMEOBJECT_H_ #define GAMEOBJECT_H_ #include "util/Point.h" #include "World.h"  class GameObject { public: World *world; Point *position; GameObject(); virtual ~GameObject();  virtual void update(); virtual void render(); };  #endif /* GAMEOBJECT_H_ */   Why does it give an error: "World.h, line 9 - 'GameObject' has not been declared " and "World.h, line 13 - 'GameObject' was not declared in this scope"?    I am using Linux GCC 4.8.1 compiler.

I am looking for the definition of when I am allowed to do forward declaration of a class in another class's header file:  Am I allowed to do it for a base class, for a class held as a member, for a class passed to member function by reference, etc. ?


I am trying to organize files while using function templates as shown in the following:  template <class T> T max(T a, T b) {     return a > b ? a : b; }  int main() {     cout << "max(10, 15) = " << max(10, 15) << endl;      retun 0;  }   I simply put the implementation of "max(T a, T b)" in a templateMaxFun.cpp and the following in templateMaxFun.h file:  template <class T> T max(T a, T b);   Then, I put #include "templateMaxFun.h" in the main.cpp. However, the compiler is complaining: "undefined reference to `int max(int, int)".  My question is: what is the correct way to put a template function prototype in the .h file? I am guessing my problem might be here.  Thanks for your help.

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


A wheel (or any ring of considerable mass) hardly balances itself when it is placed vertically on ground, but when we roll it along the ground it balances itself. What causes this effect? I guess its because of the centrifugal force generated by the circular motion of the wheel that makes the outer surface of the wheel rim to stick to the ground, but I am unsure whether this is the correct explanation.

Why does a bike/bicycle fall when its speed is very low or close to zero and is balanced when going with a high speed?


I am a Windows user. Currently I am switching to Ubuntu 18.04. My hard disk size is 1TB. When I am going to create partitions during Ubuntu installation I want to create 4 partitions like Windows does, such as:   Local disk(C) - size 200 GB  Local disk(D) - size 200 GB  local disk(E) - size 250 GB  local disk(F) - size 300 GB    How can I create these 4 partitions?

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 just want to know is this ok if i use  this stucture:
Luke

Sign In

Sign Up

    instead of this ?

Luke

Sign In

Sign Up

   and if not, i want to know why ? and also i want to know which one is SEO Friendly and why?

What are the rules of engagement with respect to SEO in HTML 5?  Examples of things we have been mulling over with no conclusion:   Are you penalised for not using <head> and <body> tags? Do links in <nav> blocks get prioritised for follows? With <aside> (no bside though), <section>, <summary> and <details> which ones carry the most weight for content, one-liner descriptions and keyword tags are there search engine implications? If you use CSS to put a <footer> element at the top and a <header> element at the bottom (not that you would but it may be construed as such by an incomplete spider implementation)? Does the use of placeholder attributes on <input> show you are more user focused?   At the minute we are haphazardly pinning the content on the donkey with regard to tag usage but would be interesting to know if anyone has any insight into the "correct" tags to use with regards to SEO.


I have the following:  variable1 34.30338950876217  import numpy as np np.round(variable1, decimals=2) 34.29999999999995   Why am I not getting the desired answer of 34.30?

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


My question is:  Lets say I have N arrays: arr0, arr1, arr2,... arrN (edit: actually N+1 arrays, but it doesn't matter) .  I want to insert to the first member of all the arrays values, in the same line, like this:  [arr0[0], arr1[0], arr2[0]... arrN[0]]=[0,1,2,3....N]   I would expect that after this line arr0[0] will be 0, arr1[0] will be 1 etc.  but, for some reason, what happends is arr0[0]=arr1[0]=arr2[0]=...=arrN[0]=N  Any idea why, and what can I do to fix it?  Thanks in advance.

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


Consider this model:  summary(lm(mpg ~ hp*wt, mtcars))  Call: lm(formula = mpg ~ hp * wt, data = mtcars)  Residuals:     Min      1Q  Median      3Q     Max  -3.0632 -1.6491 -0.7362  1.4211  4.5513   Coefficients:             Estimate Std. Error t value Pr(>|t|)     (Intercept) 49.80842    3.60516  13.816 5.01e-14 *** hp          -0.12010    0.02470  -4.863 4.04e-05 *** wt          -8.21662    1.26971  -6.471 5.20e-07 *** hp:wt        0.02785    0.00742   3.753 0.000811 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 2.153 on 28 degrees of freedom Multiple R-squared:  0.8848,    Adjusted R-squared:  0.8724  F-statistic: 71.66 on 3 and 28 DF,  p-value: 2.981e-13   The slope of hp is -0.12010 when wt is zero. As a value of zero for wt is unlikely, this for me raises the following questions:   Is there any worth in trying to interpret a main effect coefficient when it is included in an interaction term?  Should the main effect coefficient only be interpreted within the context of the interaction? Or in other words, in the model above, is hp:wt term the only term that should be interpreted?

I am doing a simple marketing project that has the following types of variables:   X1 - continuous (e.g. income) X2 - categorical (e.g. gender) Y - continuous (e.g. number of a product type purchased such as tubs of ice-cream)    I am interested in the relationship between income (X1) and product purchase (Y) but also the effect of gender (X2) on this relationship. (i.e. interaction or moderation effect).  I have centered X1 and have used the general linear model in SPSS. The result on Y is as follows:   X1 - significant X2 - not significant X1*X2 - not significant   How do I interpret this result in terms of main effect and interaction?


At first I thought it was by trophies, because I am the top 6th player in our clan, and I'm 7th on the war base but that's not it. And I have previously been the top 2nd of trophies, but like 13th on the war map. And then some other forums said it was based on your village level or something? But there's at least two people below me that have better villages than me. They have better walls, and stuff. So now I'm confused.

I am #10 in my clan (cause I'm farming) but I am #2 in clan wars. I don't have the strongest troops in my clan. I'm just wondering how the order is set up, the only thing i can think of is that it is based off of your defense, but I'm not sure. Anyone know?


I do find path/to/folder -name *foo.sh  The utility lists the relevant files. However, if I do find path/to/folder -name *foo*  I receive an error: find: paths must precede expression:  Why? What to do?

I want show all the files that have a .bak extension.  kaykav@ubu2:~/Documents$ ls cdIndex1-60  met.bak  tem.bak   I type the cmd :  $ find . -name *.bak  I'm in the correct Directory for this. I get the following message:     find: paths must precede expression: tem.bak   What does that mean? Man pages are no help.


I try to run v2.6.10 on Ubuntu 16.04 server:  sudo service mongod start   And get the result:  mongod start/running, process 67725   But when I check the status I get:  mongod stop/waiting   The content of log:  2017-09-10T07:47:16.528+0200 [initandlisten] MongoDB starting : pid=5493 port=27017 dbpath=/data/db 64-bit host=ns1 2017-09-10T07:47:16.529+0200 [initandlisten] db version v2.6.10 2017-09-10T07:47:16.529+0200 [initandlisten] git version: nogitversion 2017-09-10T07:47:16.529+0200 [initandlisten] OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016 2017-09-10T07:47:16.529+0200 [initandlisten] build info: Linux lgw01-12 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 BOOST_LIB_VERSION=1_58 2017-09-10T07:47:16.529+0200 [initandlisten] allocator: tcmalloc 2017-09-10T07:47:16.529+0200 [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1", port: 27017 }, storage: { dbPath: "/data/db", journal: { enable$ 2017-09-10T07:47:16.529+0200 [initandlisten] exception in initAndListen: 10309 Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod ins$ 2017-09-10T07:47:16.529+0200 [initandlisten] dbexit: 2017-09-10T07:47:16.529+0200 [initandlisten] shutdown: going to close listening sockets... 2017-09-10T07:47:16.529+0200 [initandlisten] shutdown: going to flush diaglog... 2017-09-10T07:47:16.529+0200 [initandlisten] shutdown: going to close sockets... 2017-09-10T07:47:16.529+0200 [initandlisten] shutdown: waiting for fs preallocator... 2017-09-10T07:47:16.529+0200 [initandlisten] shutdown: lock for final commit... 2017-09-10T07:47:16.529+0200 [initandlisten] shutdown: final commit... 2017-09-10T07:47:16.529+0200 [initandlisten] shutdown: closing all files... 2017-09-10T07:47:16.529+0200 [initandlisten] closeAllFiles() finished 2017-09-10T07:47:16.529+0200 [initandlisten] shutdown: removing fs lock... 2017-09-10T07:47:16.530+0200 [initandlisten] couldn't remove fs lock errno:9 Bad file descriptor 2017-09-10T07:47:16.530+0200 [initandlisten] dbexit: really exiting now

I try to run mongo v2.6.10 on Ubuntu 16.04 lts:  mongod   And get the result:  mongod --help for help and startup options 2017-09-16T12:15:19.660+0430 [initandlisten] MongoDB starting : pid=15959 port=27017 dbpath=/data/db 64-bit host=mahdi-MS-7808 2017-09-16T12:15:19.660+0430 [initandlisten] db version v2.6.10 2017-09-16T12:15:19.660+0430 [initandlisten] git version: nogitversion 2017-09-16T12:15:19.660+0430 [initandlisten] OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016 2017-09-16T12:15:19.660+0430 [initandlisten] build info: Linux lgw01-12 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 BOOST_LIB_VERSION=1_58 2017-09-16T12:15:19.660+0430 [initandlisten] allocator: tcmalloc 2017-09-16T12:15:19.660+0430 [initandlisten] options: {} 2017-09-16T12:15:19.660+0430 [initandlisten] exception in initAndListen: 28574 Cannot start server. Detected data files in /data/db created by storage engine 'wiredTiger'. The configured storage engine is 'mmapv1'., terminating 2017-09-16T12:15:19.660+0430 [initandlisten] dbexit:  2017-09-16T12:15:19.660+0430 [initandlisten] shutdown: going to close listening sockets... 2017-09-16T12:15:19.660+0430 [initandlisten] shutdown: going to flush diaglog... 2017-09-16T12:15:19.660+0430 [initandlisten] shutdown: going to close sockets... 2017-09-16T12:15:19.660+0430 [initandlisten] shutdown: waiting for fs preallocator... 2017-09-16T12:15:19.660+0430 [initandlisten] shutdown: lock for final commit... 2017-09-16T12:15:19.660+0430 [initandlisten] shutdown: final commit... 2017-09-16T12:15:19.660+0430 [initandlisten] shutdown: closing all files... 2017-09-16T12:15:19.660+0430 [initandlisten] closeAllFiles() finished 2017-09-16T12:15:19.660+0430 [initandlisten] dbexit: really exiting now   error :     exception in initAndListen: 28574 Cannot start server. Detected data   files in /data/db created by storage engine 'wiredTiger'. The   configured storage engine is 'mmapv1'., terminating   after update mongodb show error .