I am having an issue accessing my global variables inside the same file where the variables exist. However, they work just fine when I call the same variable in other files. To call the variable in another file I have used the required_once to call my file where the globals are located and then called each variable I need individually like  global $example_vairable. The issue is that when I use  global $example_vairable later on in the same file where I defined  global $example_vairable it does not work. Inside of another function on the same page I have called my variable  global $example_vairable and then just tested with either an echo or a var_dump. echo shows no display and var_dump provides a bool(false)  telling me I have an error but I have no idea where or why. This is in wordpress so I am using my functions file where my variables are located. Here is my code: THE FUNCTIONS FILE GLOBAL VAIRABLE function Total_Result(){     global $total_result, $resultx;       $resultxs = array($resultx);      $total_result =  count($resultxs[0]);     //return($total_result); } add_action( 'after_setup_theme', 'Total_Result' );  Then the function on the same file (functions.php) that I am trying to call the global from: add_action("wp_ajax_getvendorresponsestatus", "getvendorresponsestatus"); add_action("wp_ajax_nopriv_getvendorresponsestatus", "getvendorresponsestatus");  function getvendorresponsestatus() {     global $wpdb, $endResult,$total_result ;     if(isset($_POST['action']) == 'getvendorresponsestatus'){                      echo $total_result;         var_dump($total_result);             var_dump($endResult);             echo $endResult->posted_by;           }; }  I have also tried to pass the variable in the function itself but it too doesnt work. add_action("wp_ajax_getvendorresponsestatus", "getvendorresponsestatus"); add_action("wp_ajax_nopriv_getvendorresponsestatus", "getvendorresponsestatus");  function getvendorresponsestatus($endResult, $total_result) {     global $wpdb;     if(isset($_POST['action']) == 'getvendorresponsestatus'){                      echo $total_result;         var_dump($total_result);             var_dump($endResult);             echo $endResult->posted_by;           }; }

In reading I am not sure if the issue below could have something to do with needing a custom wordpress ajax handler? All of these functions are inside my functions.php file. I have a couple of PHP functions that are supposed to pass information from one to another. The an AJAX call to the final function should produce the final result through that call. Its not happening. My count results in 0 and I am not understanding why. If I replace my query with a static array like [44,55,99,33] then it will pass the values ok. Likewise if I keep the query and simply replace the $id in the query and make it a static id such as '20' then it works. I would think that the id was the issue then and it wasnt pulling properly but it seems to work ok just not pass? function idx(){     global $wpdb, $id;       $getId = $_SERVER['REQUEST_URI'];     $ecp = explode('/', $getId);     if($ecp[3] != ''){         $id = $ecp[3];     }         return $id; } add_action( 'after_setup_theme', 'idx' );  =============================================== function Total_Result(){     global $wpdb;     $id = idx();        /*$resultx = [44,88,59,52];*/ ;      $resultx = $wpdb->get_results( $wpdb->prepare("SELECT * FROM {$wpdb->prefix}custom_form_submission_conversation as cc LEFT JOIN {$wpdb->prefix}custom_form_submission as cs on cc.fsid ='$id' WHERE fsid='$id'" ));          $resultxs = array($resultx);          $total_result =  count($resultxs[0]);     echo  $total_result; }  when I var_dump $resultx I get: array(3) { [0]=> object(stdClass)#1256 (36) { [“cid”]=> string(3) “167” [“fsid”]=> string(2) “20” [“specified_date”]=> string(3) “yes” [“price_quote”]=> string(4) “1140” [“posted_by”]=> string(9) “dc_vendor” [“limit_count”]=> string(1) “1” [“read_unread”]=> string(1) “1” [“vendor_response”]=> string(4) “zero” [“date_created”]=> string(19) “2021-04-15 11:39:08” }   [1]=> object(stdClass)#1257 (36) { [“cid”]=> string(3) “186” [“fsid”]=> string(2) “20” [“specified_date”]=> string(3) “Yes” [“price_quote”]=> string(3) “602” [“posted_by”]=> string(8) “customer” [“limit_count”]=> string(1) “1” [“read_unread”]=> string(1) “1” [“vendor_response”]=> string(4) “zero” [“date_created”]=> string(19) “2021-04-15 11:39:08” }   [2]=> object(stdClass)#1258 (36) { [“cid”]=> string(3) “188” [“fsid”]=> string(2) “20” [“specified_date”]=> string(3) “yes” [“price_quote”]=> string(4) “1017” [“posted_by”]=> string(9) “dc_vendor” [“limit_count”]=> string(1) “1” [“read_unread”]=> string(1) “0” [“vendor_response”]=> string(4) “zero” [“date_created”]=> string(19) “2021-04-15 11:39:08” } }   so then I try and pass that data like so: function getvendorresponsestatus() {     global $wpdb; $id = idx();          $total_resultx = Total_Result($id);         die; }  Ive tried with and without the die();. The AJAX call is: setInterval(function(){     var ffiidd = jQuery('#ffiidd').val();     var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";          jQuery.post(ajaxurl, {         action: "vendorAjaxprog",         ffiidd: ffiidd     }, function(data) {         console.log(data);         jQuery.post(ajaxurl, {             action: "getvendorresponsestatus", //<<<<<<<< this is the action that calls the function             fsid : ffiidd         },         function(datas) {             console.log('+ datas);             jQuery('.cust_vendor_top').html(datas);         });         if(data == 0){}else{             jQuery('.ajaxreload').html(data);                                     }     });               }, 5000);/*==30 seconds==*/  So the question is why wont it pass along the query array information but it passes a basic array or it will pass if I change the id in the query to be static? I know the query is good because of when I var_dumped it, I have results before I get to the Total_Result() function.


I'm trying to create a C++ class that maintains a list of running instances of itself.   My .h file:  class FubberPWM {     /* code */      private:         uint8_t _duty;         uint8_t _instanceCount;         static FubberPWM _instances[]; }   My .cpp file, when trying to refrence the _instances array:  FubberPWM::loop() {     for(uint8_t i = 0; i < _instanceCount; i++) {         Serial.println(_instances[i]._duty); // Should output each instances _duty     } }   I get the error "undefined reference to `FubberPWM::_instances'". Also, I don't know how to add "this" instance to the _instances array. I tried the following:  _instances[_instanceCount++] = this;   But that does not work. "invalid conversion from 'FubberPWM* const' to 'int'"  I'm new to C++, coming from the Java world. I know about pointers and references, but not very well.

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


I have stopped a job by pressing Ctrl-z. Can I resume the job with bg, yet have the output redirected to a log file instead of stdout? Doing the following: bg > log.txt  Only writes the initial printed line (e.g. [1]+ <<job_name>> &) to the log file.

I have a running program on a SSH shell. I want to pause it and be able to unpause its execution when I come back.  One way I thought of doing that was to transfer its ownership to a screen shell, thus keeping it running in there.  Is there a different way to proceed?


In our math book it is written that if you want to go to a random point in a $1D$ place and you randomly go right and left and also you have unlimited time finally you arrive at that point. Also in a $2D$ place you finally arrive there. But in a $3D$ place the chance to arrive there is 24%. It is really amazing but our book don't bring any proofs for it. How can we know this?

How does one prove that a simple (steps of length $1$ in directions parallel to the axes) symmetric (each possible direction is equally likely) random walk in $1$ or $2$ dimensions returns to the origin with probability $1$?  Edit: note that while returning to the origin is guaranteed $(p = 1)$ in $1$ and $2$ dimensions, it is not guaranteed in higher dimensions; this means that something in a correct justification for the $1$- or $2$-d case must fail to extend to $3$-d (or fail when the probability for each direction drops from $\frac14$ to $\frac16$).


How can give me two or three examples about Banach spaces which it is not Hilbert spaces with proof ( I mean why it isn't Hilbert spaces ) ?

Can someone give me an example of a Banach space that is not a Hilbert space? I can't think of any because I don't know how to show one space that can not have inner product structure.


There is only one thing I hate on macOS (Sierra) since this was created.  I open an application and work on it.  I click on another application on the dock and the whole screen slides to the right and I see that app.  I click on the first application on the dock and the whole screen slides to the left.  For heaven's sake. How do I disable this? If I want to slide I go to an ice rink.  I have already typed that on terminal and restarted the machine  defaults write com.apple.dock mcx-expose-disabled -bool true   and this hateful thing continues.  I want to disable spaces, mission control and for that matter launchpad too and all other things like that.

Since upgrading to Yosemite I've been having issue with OS X creating additional desktops on my main monitor for no apparent reason. I usually have 3 different desktops setup on my main monitor and just one on my second monitor. By the end of the day, OS X will usually have created 2-3 extra desktops automatically.  I can't find any setting or shortcut that might be causing this to happen. There also doesn't seem to be any reason for it since it can happen as soon as I boot up my computer.  Is there a way to set a maximum number of desktops so I can prevent this from happening?  Image from related question -


I got research paper accepted in international conference to be held at Zurich, Switzerland. I got my visa rejected with following reason: Justification for the purpose and conditions of the intended stay was not provided. As i found that i did not mention the reason to stay for more three days after the conference. Basically my purpose was site seeing. As a justification of purpose, i already attached the invitation and acceptance letter from the conference committee. Should i need to apply for visa again with justification of purpose and stay. If yes, then should i need to mention in the cover letter about the refusal. Please suggest.

Schengen refusal formulae can be difficult to understand sometimes.    When an applicant receives a refusal with "Justification for the purpose and conditions of the intended stay was not provided", what does it mean?


Prove that: If $|x|<1$, then $\lim_{n\to\infty}x^n=0$.    My thought:  Since it's a theory so I'm not able to solve it mathematically also I'm too confused about "infinity algebra". I have just memorized "infinity algebra results."  So, according to me, infinity is a very large number, therefore if any number is raised to power infinity then ultimately we'll get infinity.    Answer:It's a simple algebra if you'll increase power of $\vert x  \vert<1$ then it'll keep decreasing the value hence you'll get $0$ too simple.  Edit:Thanku dear teachers for helping.I know it was too simple but sometimes we get struck on silly doubts like this.

Show that $|x|<1$ implies that $\lim_{n \to \infty}x^n$ = 0.   Can anyone help me define my $N$ (as used in the formal definition of a limit) in terms of $\varepsilon$? I define $x$ as $\dfrac{1}{1+p}$ where $p>0$ but I am not sure how also to define $N$ since both $P$ and $\varepsilon$ are variable.


I would like to hear what you think about bottom tab bar for mobile versions of websites. It is called bottom navigation bar too. Here an example: .  I am trying to use it to improve engagement of e-commerce websites in Brazil with this element but I need to reunite some good reasons to do that. I will post the links of my research later in this topic.  All the best!

I'm developing a mobile app and dealing with various UI/UX issues. I'm open to all kinds of ideas at this stage, however some designers I consult with seem to be zealots for bottom-navigation and are hesitant in actually analyzing whether the bottom-nav is actually best for my app; they just want me to use the bottom tabs navigation as if it's some UI law.  One point I try to bring up is that my business model has users who aren't typical one-handed mobile users, are tech savvy, would use my app more of a tool, and would spend only a few minutes in it. The app isn't a typical lazy-content-browsing experience where you want to minimize fingers-over-top-of-screen interference, and where you want to keep the use transfixed and spending time in the app.  Anyways, I'd like to hear about situations where a bottom nav was decided-on, or started-with, and you had good reason to eliminate it and go with another navigation design.  Most articles out there talk about eliminating hamburger menus and diving into bottom nav. Is the converse simply going back to hamburger menu?


I am using a course from Udemy that says to change the color of the selected object, you should:  be in Object Mode Render engine set to Eevee View set to Rendered  I have done this, but when I choose 'Material', and try and pick a color on the color pinwheel, the object does not change.  I have tried Edit mode, View set to material, nothing appears to work.  Why is this simple task so complicated? :(

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


proof. Let $A$ and $B$ both be convex sets and $A \cap B \ne \emptyset$. Then suppose that $p,q \in A\cap B$. Since $p,q \in A \cap B$, it follows that $p,q \in A$, a convex set. Then $p + (1-\lambda)q \in A$. Since $p,q \in B$, also a convex set by assumption, $p+(1-\lambda)q \in B$. Thus, $p + (1-\lambda)q \in A \cap B$. QED  I wanted to know if everything looks okay, or if anything needs to be improved?

How to prove that the intersection of any finite number of convex sets is a convex set?  I have no idea.


These symbols are in the Word 2010:  Then how should I find them for LaTeX ?

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I see in real world some time light pass through our ears and nose,i wanted to know how to make light pass through a mesh in blender cycles?

I am trying to create ceramic material, similiar to the one on the picture:    However I can't figure out, how to add shadow from behind the ceramic part. Translucency nor SSS don't do the trick.  As you can see there is no shadow comming from Suzanne's chin.     Any idea?  Folowwing your advices, this is the result:    And here is the node tree


I have two-way interaction on the two levels of the third categorical variable, the pattern looks different, why is three-way interaction non-significant?  Thanks to all!

In the three-factor (all categorical) ANOVA, two-way interaction is very significant, but when qualified with the third factor, it became non-significant. But the pattern seems different according to the different levels of the third factor(like in the picture). So I'm confused why is three-way interaction dropped dramatically?    (copied from later duplicate because it's useful to have both pictures explained in the same thread -- the same explanations work for both)  I have two-way interaction on the two levels of the third categorical variable, the pattern looks different, why is three-way interaction non-significant?


I am familiar with N=1 susy in the context of Wess and Bagger.  For further progress, i want to study ${\cal N}=2$, ${\cal N}=4$ supersymmetry, to study seiberg-like duality.  (I am not familiar with the notation ${\cal N}=(2,2)$, ${\cal N}=(0,2)$, what is this left sides and right sides implies?)  Please recommend good materials related to ${\cal N}=2$, ${\cal N}=4$, supersymmetry.

I have an idea of supersymmetry in quantum mechanics, can you suggest a book on "supersymmetry in quantum field theory", which has sufficient mathematical rigour like "Peskin and Schroeder"


I have problem with php, simply dont want to load .php files. I have installed apache2, php, and libapache2-mod-php. If you need more information, please let me know.  <?php  phpinfo();

I've tried to install PHP and Apache2, however when I access the file, it just shows a blank page.  I've installed the packages php, apache2, php-mysql (and some others)  I've already tried pretty much everything that I could find on the Internet.  I'm sorry if I'm not providing enough info, I will give any info that I can.


Related:  (not a dupe, that's a feature request and was closed as a dupe of another one)        (old) post does indeed say that Link-only answers can be flagged as NAA, but there are a lot of posts like  which define Not An Answer is a way that it doesn't apply to link-only answers.  Can we get some up-to-date consensus on this? That link only answers are not allowed is .

I think we can all agree, this sucks:  If you've been around a little while, you've probably encountered hundreds of answers like this in various forums, some of them even marked as "The Answer" by well-meaning1 forum admins looking to close a thread. We could try to enumerate the commonly-observed problems with it...  Link is probably broken If link isn't broken, it's spam If link isn't spam, it's to some broadly-related resource that the answerer found by pressing "I'm feeling lucky" when googling the question's title.  ...but the real issue here is that we don't know! Even if the link was originally pointing directly to the most awesomeest answer ever for exactly the question being asked, there's nothing in the answer itself to even hint at what direction we're being pointed in. Strip the markup, and this is what you're left with:  i think you should take The tutorial HERE! This will help you a lot  Is there even one tiny speck of information there? No. Even the title of the page being linked to would have provided something to go on, but that was entirely too much work. So let me be clear: this sort of response is not an answer. If you see this, flag it. Moderators, if you see it flagged, delete it. There's really only one valid exception to this rule, and that's when the question is:  Suggest me some tutorials where i can learn quick.  Don't get me wrong, it's still a bad answer - but when the question is kinda asking for bad answers this is to be expected. Close or flag the question and move on - this is much more efficient than hanging around to babysit it by deleting every crap answer that inevitably shows up. If you're still reading, you're probably getting really bored by now. "Gee, Shog - answers that contain ZERO information are terrible, horrible, very-bad things? What shocking revelations will you share next?" Yeah. It's really simple... Except, . See, the problem is that once you step away from black-and-white "answers / doesn't answer" decision-making, things get... Interesting. And all those other answers with links in them See, this is an answer:  And so is this:  Yes, they're both very short, and yes, they contain links. But strip the markup, and you still get at least a little bit of useful information. Does that mean these answers should forever hang around the site? No, not necessarily - if it turns out they're just not that useful, they should probably still be removed - or at very least, down-voted so that they rank below other answers. Just remember: if the text of the post contains an honest attempt at answering the question, then it is an answer - so don't flag it otherwise, and if you do, don't complain if your flag gets declined. Answers & Apples If you're still confused, forget about answers. Think about apples instead:  Answers are just like that, but less tasty in pies.  1 By which I mean to say, "criminally lazy"


I have seen a lot of topics being closed because they are somehow asking for advice rather than a programming question.   Do you think it would be useful if there was a stackexchange community that gives quick advice for beginners ?  Or just a few articles that would help beginners with getting started.

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


Hello folks I ran into a problem today that I've been trying to fix for at least 2 hours now. Basically what I want is an image on the left and then 2 lines of text that are vertically aligned to the image (in a way where it is responsive).  A picture here of what i would like to get:    I've tried a bunch of things. First I tried to put the image and the text in a separate div with display: inline-block; This made it so the text and image were next to each other but the text would be on the top.   I tried adding flexbox to this but this doesn't work since the display: inline-block; line would be overwritten.  I tried putting the image and text in the same div and using vertical-align: middle; This didn't work either because only the first line of text would be perfectly centered with the image and the second line would go below the image.  I've also been looking on stackoverflow for solutions for a while and on other sites I find with google aswell but I havn't found what I need.  The HTML of how my code is now:
          Some text
Some more text
   The CSS:  .projects{  }  .pic{   width: 200px;   height: 200px;   border-radius: 50%; }  .projects-pic{   vertical-align: middle; }  .projects-text{   vertical-align: middle; }   Also sorry if my english, grammar or code isn't the best, I'm only a jr dev.

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


I've started with a “perfect” image 'without noise'.  Then I added some noise to it. I've used gaussian white noise for this purpose.  In = In+0.5*randn(size(Io))   The combined image (my “noisy image”) has a signal to noise ratio with some meaning because I can compare it to the perfect image.  My question is how can I calculate the 'SNR Value'.

I am working with an image X, I apply the "adaptive median filter" in it and I get the image Y. I'd like to measure the SNR in both in order to evaluate the quantity of noise deleted.   I know the formula to calculate the SNR is:   SNR = Psignal / Pnoise  but I don't know how to get these values from both images I have. I was thinking in substract the image X from Y and get the noise value. But I am not sure about the method.


I'm attempting to clone an object. The Update Student Scores form should create a clone of the current student object and then apply changes to the clone. That way the changes will be saved to the current student only if the user clicks the OK button. To create a clone, the Student class will need to implement the ICloneable interface, and the Clone method will need to implement a deep copy. So far, I've learned that you want a deep copy of something when you need a copy of the other objects contained by the original (rather than pointers to the location of those objects in the original), so that when you make changes to these copied properties, you don't affect the original object. What I'm struggling with though is applying it to my model. I'm not sure how to apply the changes so that they only occure on the ok click. Below is the student class I'm trying to clone and the update student form. I've also attached the source code if that helps. Thanks!    Student.cs             public class Student : ICloneable     {     public List<int> Scores = new List<int>();      public string Name     { get; set; }      public object Clone()     {         return Name.Clone();     }   frmUpdateStudent.cs      public partial class frmUpdateStudent : Form     {     private Form1 parentForm;  //main form     private Student studentToEdit; //student list     private int index; //index      public frmUpdateStudent(Form1 parentForm, int index)  //update parent form (Form1) with the new student and scores     {         this.parentForm = parentForm;         this.index = index;         studentToEdit = this.parentForm.GetStudent(index);          InitializeComponent();          StudentName.Text = studentToEdit.Name;         UpdateScoreDisplay();     }      private void UpdateButton_Click_1(object sender, EventArgs e)  //open update form for current student     {         Student Form1 = new Student();         Form1.Name = StudentName.Text;         parentForm.UpdateStudent(index, Form1);         Close();     }

I want to do something like:  MyObject myObj = GetMyObj(); // Create and fill a new object MyObject newObj = myObj.Clone();   And then make changes to the new object that are not reflected in the original object.  I don't often need this functionality, so when it's been necessary, I've resorted to creating a new object and then copying each property individually, but it always leaves me with the feeling that there is a better or more elegant way of handling the situation.  How can I clone or deep copy an object so that the cloned object can be modified without any changes being reflected in the original object?


I need to dynamically build a select dropdown based on form data provided an ajax query. my DOM contains an element "organizations" with 4 children. The children with an org id and org name  Organizations = {     { id="2", name="Systems"}     { id="4", name="Network"}     { id="5", name="Operations"}     { id= "7", name="Security"} }   I need to build the following select clause  <select name='organization'>     <option value="2">Systems</option>     <option value="4">Network</option>     <option value="5">Operations</option> </select>   How do I dynamically build the select statement?

What is the best method for adding options to a <select> from a JavaScript object using jQuery?  I'm looking for something that I don't need a plugin to do, but I would also be interested in the plugins that are out there.  This is what I did:  selectValues = { "1": "test 1", "2": "test 2" };  for (key in selectValues) {   if (typeof (selectValues[key] == 'string') {     $('#mySelect').append('<option value="' + key + '">' + selectValues[key] + '</option>');   } }   A clean/simple solution:  This is a cleaned up and simplified :  $.each(selectValues, function(key, value) {      $('#mySelect')           .append($('<option>', { value : key })           .text(value)); });   Changes from matdumsa's: (1) removed the close tag for the option inside append() and (2) moved the properties/attributes into an map as the second parameter of append().


Hi how to display given string with July  3, 1969 for string 1969-07-03  String a="1969-07-03";   Expected output: July 3, 1969  I used this method initially to convert it to the right format.    textView.setText(reverseIt(a)); // but this reverse the whole string.      public static String reverseIt(String source) {         int i, len = source.length();         StringBuffer dest = new StringBuffer(len);          for (i = (len - 1); i >= 0; i--)           dest.append(source.charAt(i));         return dest.toString();       }   Please help me solve this.

How to format correctly according to the device configuration date and time when having a year, month, day, hour and minute?


I was just answering a  and saw this:  As you can see, there is no name in the third comment. What's this?

Ok, this is weird.  Generally the commentator name is at the end of comment, but for the below comment(Pic) i can't find the commentator link.   Here is the


I am having difficulties understanig inheritance in Python, but I have an idea how it works because of my somewhat larger experience in Java... To be clear, I searched the questiones here as well as online documentation, so I am aware this will be branded as repeated question in an instant :P  My code on Codecademy passes like this:  class Car(object):     condition = "new"     def __init__(self, model, color, mpg):         self.model = model         self.color = color         self.mpg   = mpg      def display_car(self):         return "This is a %s %s with %s MPG." % (self.color, self.model, self.mpg)      def drive_car(self):         self.condition = "used"  class ElectricCar(Car):     def __init__(self, model, color, mpg, battery_type):         self.model = model         self.color = color         self.mpg   = mpg         self.battery_type = battery_type   But as far as I can see, I'm almost defining a new class... Where is the inheritance in that? Could I do something like:  class ElectricCar(Car):     def __init__(self, battery_type):         self.model = model         self.color = color         self.mpg   = mpg         self.battery_type = battery_type   Maybe something with a keyword  super   ?

I'm trying to understand the use of super(). From the looks of it, both child classes can be created, just fine.   I'm curious to know about the actual difference between the following 2 child classes.  class Base(object):     def __init__(self):         print "Base created"  class ChildA(Base):     def __init__(self):         Base.__init__(self)  class ChildB(Base):     def __init__(self):         super(ChildB, self).__init__()  ChildA()  ChildB()


For the need of more accuracy in my adc value, I have to average the adc value for particular time, what are the types of techniques handled in the averaging Can anyone help me with the example C programs for different types of averaging techniques PIC 16f877A.

I'm looking for a time and memory efficient solution to calculate a  in C. I need to avoid dividing because I'm on a PIC 16 which has no dedicated division unit.  At the moment, I just store all values in a  and simply store and update the sum each time a new value arrives. This is really efficient, but unfortunately uses most of my available memory...


I ran the latest updates and as usual I had to re-install my video driver, download the headers and blah blah...  I ran into a few troubles that I was able to fix and at the end I got my Ubuntu up and running, Unity working, OpenGl working without a single problem... games running fine but wait.  I have only 1 worspace !  oooh no problem, lets ccsm to fix that... nope it has no effect. Well, we can activate the workspaces on dash --> Appearance... nope, nothing happends.  Oooooh yea, the dconf editor !!  I will force those workspaces thru that method aaaaaand  :/ nothing once again.  :(  Maybe im missing something, maybe I missed something in this forum... but I cant find a way to fix those worspaces. I can only have 1 and thats it.  Does anyone had thtis problem before? Can I has my workspaces back? I only need 4  :(

It appears that Unity on Raring only comes with a single virtual desktop (aka workspaces) by default, and CCSM's Wall plugin has no way to add more. Is this configurable at all?


So there's a similar question posted (twice) before, but I'm not sure if the proof will be the same. Can I use the fact that the product of $G_1$ of order $p$ and $G_2$ of order $q$ is some group $G$ of order $pq$? If this is true, how do I adapt this to prove my original question? Thanks!

Here are my thoughts so far:    $C_p = \langle x \mid x^p =e\rangle$ $C_q = \langle y \mid y^q =e\rangle$ $C_p \times C_q$ has elements of the form $(x^a,y^b)$ There are $p$ possible values for $x^a$ and $q$ possible values for $y^b$. So there are $pq$ possible elements in $C_p \times C_q$. $C_{pq} = \langle z\mid z^{pq} = e\rangle$ and there are $pq$ elements in this group. For an isomorphism from $C_p \times C_q$ to $C_{pq}$ we send $(e,e)$ to $e$ to ensure that the identities are mapped to each other. However, I'm not sure how to define an isomorphism for the other elements.


Let $f$ be a positive and continuous function on $[0, 1]$ . Compute $$\int_{0}^{1}\frac{f(x)}{f(x)+f(1-x)}dx$$  Is it even possible to compute this without using King's Rule? I have no clue at all about where to start for computing this one. I found a solution that uses the King's Rule, and the answer is $1/2$. But, what I could show was the fact that $ \frac{f(x)}{f(x)+f(1-x)}$ is integrable on [0,1] with a given fact that $f$ is positive and continuous. I could also show that if $g(x)=f(x)+f(1-x)$, then $g(a)=g(1-a)$ for any $a$ in $[0,1]$ Can I get some hints for this problem?

Problem  a) $f:[0,1]\rightarrow\Bbb{R}$ is an positive continuous function. Find the value of the intgral:  $$\int_0^1\frac{f(x)}{f(x)+f(1-x)}dx$$ b) And compute $$\int_{-\pi}^{\pi}\frac{1}{1+e^{\sin (x)}}\,dx$$   (Hint for task b: Let $f(x)=e^{-\frac{1}{2}\sin (2\pi x-\pi)}$ in task a and use the substisution $u=2\pi*x-\pi$.)  My Work  a) I have realized that $f(1-x)=f(a+b-x)$, but i don`t know how to proceed.  b) I tried to use the hint, I still don't understand how to solve the problem. This is what I end up with:  $$\int\frac{e^{-\frac{1}{2}\sin u}}{e^{-\frac{1}{2}\sin u}+e^{\frac{1}{2}\sin u}} $$  Any help is welcome.


In Java, if a parent and child class share the same method with the same signature, what would happen if I didn't use the @override annotation in the child class? Would it still compile and execute?

What are the best practices for using Java's @Override annotation and why?     It seems like it would be overkill to mark every single overridden method with the @Override annotation.   Are there certain programming situations that call for using the @Override and others that should never use the @Override?


I'm trying to make a navbar with a button and an icon of an hamburger menu. I put both divs inline but they risulted disaligned vertically. I can't find the mistake. What did I do wrong?   html, body{      padding: 0;      margin: 0;         }    .riga{      display: block;      }   .bg_grigio{       background-color: gray;          }   .testo_a_destra{       text-align: right;        }   .pulsante{       border-radius: 20px;       padding: 10px;       text-align: center;      }  .verde_vuoto{      border: 2px solid #0a5537;      background-color: inherit;      }  .div_inlinea{      display: inline;      margin-left: 40px;     }  .icona img{     width: 4%;     }  #riga_logo{     padding-top: 20px;     padding-right: 20px;     height: 50px; }

Order Benugo Delivery

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


I just downloaded Springer WWWJ template from  and after I compiled, there is a huge whitespace on the right. Whitespace was there even if I use the sample from the template directly, anyone has similar experience?

I'm writing a paper for a Springer journal, so I downloaded Springer journal template from  and after I compiled it, there is a huge white-space on the right.   Anyone know how I can solve that?


I have got the following task: (1) For each $n \in \mathbb{N}$, specify matrices $A, B \in \mathbb{R}^{n \times n}$ for which $A B \neq B A$ is true. (2) Determine $$ M:=\left\{A \in \mathbb{R}^{2 \times 2}: A B=B A \quad \forall B \in \mathbb{R}^{2 \times 2}\right\} $$ thus the matrices $A \in \mathbb{R}^{2 \times 2}$, which commute with all matrices $B \in \mathbb{R}^{2 \times 2}$. Could someone please help me with this or give me an approach? That would be very helpful. Thanks.

Let $Z_n$ be the set of all $n \times n$ matrices that commute with all $n \times n $ matrices. Show that $$Z_n = \{\lambda I_n \ | \  \lambda \in \mathbb R\}$$  ($I_n$ is the $n \times n$ identity matrix)  I don't know how to use $E_{ij}$ (matrix with $1$ in $(i,j)$ and $0$ elsewhere) and the elementary matrix $P_{ij}$ to prove this question. Can anyone explain it please?


Is it possible to get a table record depending on the row number?  For example, I have a table with 40 records and I need to get the 27th record.  I need some query like SELECT * FROM my_table WHERE **ROWNUM** = 27.

I'm interested in learning some (ideally) database agnostic ways of selecting the nth row from a database table. It would also be interesting to see how this can be achieved using the native functionality of the following databases:    SQL Server MySQL PostgreSQL SQLite Oracle   I am currently doing something like the following in SQL Server 2005, but I'd be interested in seeing other's more agnostic approaches:  WITH Ordered AS ( SELECT ROW_NUMBER() OVER (ORDER BY OrderID) AS RowNumber, OrderID, OrderDate FROM Orders) SELECT * FROM Ordered WHERE RowNumber = 1000000   Credit for the above SQL:   Update: See  regarding the SQL standard. Troels, have you got any links we can cite?


Hopefully a quick question - I am a US citizen currently residing in the UK on a visa.  I am traveling to the US with my wife, who is a British citizen.  We do not yet share a last name (due to just not filing the paperwork yet and just being married recently).  I've read online that since we are a family we should join the same line together when coming into the US border at the airport.  However, because we don't share a last name, would this still apply? Should we just use our own appropriate lines?  Would there be any issues with using our own lines?

Hopefully a quick question - I am a US citizen currently residing in the UK on a visa. I am traveling to the US for 2 weeks with my wife, who is a British citizen. We do not yet share a last name (due to just not filing the paperwork yet and just being married recently).  She does not have any visas apart from the standard ESTA and there are no other further requirements, such as money, which we would need to worry about.  I've read online that since we are a family we should join the same line together when coming into the US border at the airport. However, because we don't share a last name, would this still apply? Should we just use our own appropriate lines? Would there be any issues with using our own lines?  If we do use one line only, which line?  US citizen or non-US?


I'm trying to install Ubuntu 12.10 for the first time. I've downloaded the 64-bit torrent from ubuntu.com and have created a bootable USB using Unetbootin. When I entered the BIOS and booted from USB, it gave me the options to try Ubuntu, install it and some others. I've tried both, but my result is the same. The computer displays a black screen and nothing seems to happen. The computer currently has Windows 8 on it.  Thanks!

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


Im trying to make an asp.net mvc View with 2 PartialViews who get their informations by an ajax call with javascript.

                     <input id="CategoryName" class="form-control" />

                 <input id="AddCatButton" type="button" class="btn btn-default custombtn" value="asd" />

                 @Html.PartialFor("_Categories", Model.Categories, "Categories")

                 <input id="CategoryItemName" class="form-control" />

                 <input id="AddItemButton" type="button" class="btn btn-default custombtn" value="asd" />

             @*Contentn of the Detailpage*@

   everythings is working fine i can name and add a new Category the Partialview will "refresh" and then the scripts stop working.  ive included them in the _Layout.cshtml   The script calls the Controller and give back an PartialView("_Categories",model) with every category in the database and also a second method gives back every item of a category but the script stopped working until i reload the whole page.  ive tried it to include the scripts on each partialview but then when i created a new category it creates 2,4,8,16,and so on Do I habe to include the script somewhere elöse or what is the solution.  The Javascript is one script with 3 Methods in it    $("#CatList li").on('click', function () { //    Shows all items in a category and refresh the itemlist partialview  }); $("#AddItemButton li").on('click', function () { //    Adding an item to the selected Category //    and refreshes the itemlist partialview }); $("#AddCatButton li").on('click', function () { //    add a Category and refresh the category partialview  });

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.


So I am op at getting meteorite, heckstone(sry won't use bad words), stuff from floating islands, obsidian and stuff from the underworld, bad at non sticky explosives. Have arms dealer, demolitionist and no other attack-based npcs, what do I get 4 battle? Tell me where to get the guns, make the guns, where to get npcs if needed, and what materials needed for potions, explosives, how to make bunny cannon(if needed) and requirements/materials for armor. Give me any good and special tips if you could plz. Really want the hollow. Playing on mobile.

I've been having trouble defeating this monster. Even with lots of buff potions, health potions, high tier armor (Molten), and ranged weapons with plenty of ammo (Minishark), I can't seem to kill this boss.  Worse, when I get it down to about 2000 hp, even if I'm fairly far away, it'll suck me in and continually rise towards the skybox, which doesn't allow me to do anything for some reason.  How do I defeat the Wall of Flesh? What gear should I be using and what kind of potions do I need?


If a raging Barbarian gets polymorphed into a Tyrannosaurus Rex or a Mammoth or something, to give it more hp, does the rage drop? Polymorph says:  The creature is limited in the Actions it can perform by the Nature of its new form, and it can't speak, cast Spells, or take any other action that requires hands or Speech.  The Barbarian has already taken the rage bonus action. Rage says the following:  Your rage lasts for 1 minute. It ends early if you are knocked unconscious or if your turn ends and you haven't attacked a hostile creature since your last turn or taken damage since then. You can also end your rage on your turn as a bonus action.  This says nothing about the rage ending if you change shape. So would this work?

We know that when you  in D&D 5e, per the spell, you lose access to your class features, as discussed in . However, polymorph does not say it cancels on-going effects on the target.  My specific question is: If a raging barbarian is subject to polymorph, does their rage end or continue?  On one hand,  is a class feature, which suggests that it ends when the barbarian is polymorphed. On the other hand, Rage essentially applies a status effect to the barbarian with conditions which specify when it ends, which suggests that it might continue while polymorphed.  I am aware that Jeremy Crawford has tweeted that the answer to this question is that . However, Jeremy Crawford also rules that , another class feature with an on-going effect. If your answer is "Jeremy Crawford is right", then please also explain what components of the effects determine whether it is retained during rage, so as to clarify the apparent contradiction in Crawford's tweets.  I am also aware of  on the Bladesong feature, although that is a different feature to Rage and Rage is probably a more common scenario, so I thought I'd bring it up separately.


In the end of Star Wars Episode V: The Empire Strikes Back, Luke gets a bionic hand that looks perfectly like a normal human hand:   But, as seen on The Force Awakens cinematic trailers, Luke's hand looks very robotic:   Are there any clues as to what happens with his hand between Return of the Jedi and The Force Awakens?

Luke apparantly has four hands. There are the two he was born with, a mechanical one he was fitted with at the end of The Empire Strikes Back...    ...AND...       the one we see him fitted with in The Force Awakens, both during Rey's force flashback and at the end.  This one looks a lot like the one Anakin was fitted with in Attack of the Clones.     Whatever happened to the third hand?  I know it got a bit damaged in Retrun of the Jedi, but it certainly      looked more natural than the fourth one!  Why not replace the damaged third with another just like it?


How to delete all empty directories starting with 201 ?  The command must not execute recursive.. Only directories in the current directory  find /var/www -type d -name "201*" -exec rm {} \   This returns  find: missing argument to `-exec'

I'd like to find the files in the current directory that contain the text "chrome".  $ find . -exec grep chrome find: missing argument to `-exec'   What am I doing wrong?


I have to sort a list of tuples according to the second element. I am using the function sort() to do so. However, what I did isn't working...    def sort_tuple(to_sort):         sort_tuple=((3, 'C'), (1, 'B'), (2, 'A'))         sort_tuple.sort(key = lambda x: x[1])           return sort_tuple  And if I had to sort it according to the first element, would the code be what I wrote under?:    def sort_tuple(to_sort):         sort_tuple=((3, 'C'), (1, 'B'), (2, 'A'))         sort_tuple.sort         return sort_tuple  Thank you!

I have the following tuple, which contains tuples:  MY_TUPLE = (     ('A','Apple'),     ('C','Carrot'),     ('B','Banana'), )   I'd like to sort this tuple based upon the second value contained in inner-tuples (i.e., sort Apple, Carrot, Banana rather than A, B, C).  Any thoughts?


Could someone remind me how do I run application through the terminal, which allow me to close the terminal after the program is open. I totally forgot how to do this. Please let me know.

How do I run a program in the background of a shell, with the ability to close the shell while leaving the program running? Lets say my UI is having problems or for some reason, I need to boot up a program from the terminal window, say, nm-applet:  nm-applet   When it's started, it occupies the foreground of the terminal window.  Is there any simple way to run the program in the background without needing to leave the terminal open or have it occupy the whole terminal?  On that note, I did find a way to run programs from the terminal and have it allow for other inputs, by appending an ampersand (&) to the command as such:  nm-applet &   But this isn't much use as any processes started in the terminal are killed once the terminal is closed.


After installing Ubuntu 11.10 last week I couldn't install any mp3 or videoplayers such as vlc or any others. They show me something about a failure to install packages, and when I click on details I see this:     The action would require the installation of packages from not authenticated sources: libdvdread4 libvlc5 libvlccore4 vlc vlc-data vlc-nox vlc-plugin-notify vlc-plugin-pulse

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


Hello :D As a practice for Arduino, I'm trying to make a function that I can re-use to change global variables inside the loop function. So for example, I have two global booleans answer1 and answer2, and I have a void function that have boolean as an input. However, when I run the code, the global variables are not changing, and I'm sure what I am not understanding correctly. bool answer1, answer2;  void setup() {   answer1 = false;   answer2 = false; }  void loop() {       grading(answer1);   grading(answer2); }  void grading(bool _answer) {   _answer = true; }

I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable?


I know that if a matrix is not of a full rank than it is singular, but is it always true that singular matrices are of non-full ranks?

Why does the following sentence is true? A square matrix $n \times n$ is an invertible matrix iff the rank of the matrix is $n$.


Duplicate of:  and   I have a singleton that provides some service and my classes hook into some events on it, sometimes a class is hooking twice to the event and then gets called twice. I'm looking for a classical way to prevent this from happening. somehow I need to check if I've already hooked to this event...

I would like to ensure that I only subscribe once in a particular class for an event on an instance.  For example I would like to be able to do the following:  if (*not already subscribed*) {     member.Event += new MemeberClass.Delegate(handler); }   How would I go about implementing such a guard?


There is an unique solution with $x$ being approximately $0.739085$. But is there also a closed form solution?

I would like to know how can we solve the equation $\cos x = x$, without graphing. I know that  there would only be one solution, that is obvious, that too in between $0$  and $\frac{\pi}{2}$. Is there any real expression in finite terms [perhaps we call that closed form, I am not sure] that could give $x$ or $\cos x$. Although I have not studied Taylor series, I know that it only gives an infinite series, which is not what I want. I suspect that it could not be done, but can anyone explain me why?  Just for completeness, Wolfram Alpha, gives the approximate answer $x = 0.7390851332151606416553120876738734040134$, but fails to give a exact solution.


I'm running Ubuntu 14.04 and have installed cmake, but the version included is only 2.8. Minimum version that I require is 3.0.2 for my project ,so how can I use 'apt-get' to install a newer version? Or do I have to install it manually, which kind of eliminates the purpose of having a package manager.  Same goes for eclipse v3.8 and I need v4.4 (or at least v4.x).

I have Ubuntu 10 server and want to update a package to newer version (update rrdtool from 1.3.8 to current 1.4.5). What should I do? Download and build sources or get package from newer distribution? And how to do that?


The title of the question is pretty self-explanatory.  I did a quick back-of-the-envelope calculation for my own digital calculator watch (the Casio CA-53W for those who are interested). The battery is supposed to last around 5 years on the 90 mAh coin cell inside. This means that the watch must be using $$0.090\ \mathrm{Ah}\  /\  (5\ \mathrm{years} * 365\mathrm{\frac{days}{year}} * 24\mathrm{\frac{hours}{day}}) = 2.055\times10^{-6} $$ or just over 2 µA!!!   Now, I know that with enough tweaking, the ubiquitous ATMega328p can use as little as 1 µA, and there are specialized microcontrollers out there that use even less, say in the tens of nanoamps...  ...but what about the display? My watch shows the time on a 7-segment lcd, and the display is never off. Where on Earth can I find a display that only uses something on the order of 1 or 2 µA??  (Incidentally, I'm just trying to make own simple Reverse Polish calculator watch, kind of like the µwatch project at calcwatch.com, but with a focus on long battery life.)  Would I need to buy an fpga, fuse my own logic circuit onto it, and somehow hack the display out of an old watch to get these kinds of results? Is there an easier way?

Turns out Casio offers . The claim is that thanks to "an advanced technology" the battery life in those watches is extended to ten years.  Now if you look at different models you see that they are rather complicated hence likely energy consuming - for example,  has both a liquid crystal display and hands and also it has LED illumination and a sound alarm.  I first thought that maybe the battery is the key. Model AW-80-1AV runs on CR2025. Energizer CR2025 datasheet specifies that this battery has nominal output voltage of 3 volts and nominal capacity of 163 mAh, so it stores 0,489 volt-ampere-hours of energy.  For comparison, typical basic model of Swatch run about three years on Renata silver oxide 390 (SR1130SW) battery that has nominal output voltage of 1,55 volts and nominal capacity of 60 mAh and so stores 0,093 volt-ampere-hours of energy.  So CR2025 stores about five times more energy, but the basic model of Swatch only has hands - no digital display, no illumination, no alarm, so it likely consumes less energy.  There clearly must be something more than a bigger battery that makes 10 years battery life possible.  How is 10 years battery life possible in a rather energy consuming wristwatch?


I am assuming a sphere which can reflect, refract and diffuse a light ray. So when a light ray hits the surface of the sphere from outside, a part of it gets reflected, a part of it gets diffused and a part of it enters the sphere being refracted. Now the ray which entered the sphere will again hit another portion of the surface of the sphere. Will it be reflected again? Or it will be refracted only?

Let's say you have the ability to shine some light into a perfectly round sphere and the sphere's interior surface was perfectly smooth and reflective and there was no way for the light to escape.  If you could observe the inside of the sphere, what would you observe? A glow? And would temperature affect the outcome?  Seems silly, it's just something I've always thought about but never spent enough time (until now) to actually find an answer.


In HTML, they are called the &ndash; and &mdash; entities. Here is how they look like:  –      hyphen –      en dash (or ndash, en-dash or n-dash) —      em dash (or mdash, em-dash or m-dash)  Here is an article about them:  I have found a way in Ubuntu, it goes by hitting the minus/underscore key two or three times (for n- and m-dash correspondingly) while holding down the right "Windows" key. Now I would like to type them while on Windows too. How?

I write blog posts, and I often need to type en-dash (–) and sometimes em-dash (—) in my blog posts. Currently I keep these characters saved in a text file, and copy-paste them whenever I need them. Unnecessary to say, it is a headache to move between keyboard and mouse when you type large texts.  It would be better for me if there ware a keyboard shortcuts available for these two characters. Is there a way to type en-dash and em-dash in Windows? I use Windows 7 and Windows 8 in different computers.    Here's an aligned comparison of dashes, if you need to see the difference for some reason.   Here's-dash Here's–en-dash Here's—em-dash


Working on  question, I found an inconsistent behavior.    Why reference binding behave different in a constructor from a common function?  struct A { };  struct B : public A {   B(){} private:   B(const B&); };  void f( const B& b ) {}  int main() {   A a( B() ); // works   A const & a2 = B(); // C++0x: works, C++03: fails   f( B() );  // C++0x: works, C++03: fails }   I have tested it for C++03 with g++-4.1 and Comeau 4.2.45.2 in strict C++03 mode and with C++0x extensions disabled. I got same results.  For C++0x was tested with g++-4.4 and Comeau 4.3.9 in relaxed mode and with C++0x extensions enabled. I got same results.

Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?


I was passed along some LiDAR data that is in .xyzi ASCII format. I am having trouble figuring out a way to build a TIN or DEM from this data. I brought it in using "ASCII 3D to feature", and subsequently attempted to build a terrain dataset with the new feature. "Create Terrain" seems to work, but when I attempt to "Build Terrain", I am given an error that says "The terrain definition is incomplete or invalid".   I am not sure where I have gone wrong. Should the ASCII data be imported as point or multipoint data? Is there a better way of doing this?

I have many ASCII files containing LiDAR xyz values. In order to create an ArcGIS LASD file, I need to convert these ASCII files into las files. I can do this with FME or LAStools, but I can't see a way in ArcGIS.   Does anyone know if this is possible in ArcGIS Desktop 10.3.x?


Let $G$ be an Abelian group of order $mn$ where $\gcd(m,n)=1$.   Assume that $G$ contains an element of $a$ of order $m$ and an element $b$ of order $n$.   Prove $G$ is cyclic with generator $ab$.    The idea is that $(ab)^k$ for $k \in  [0, \dots , mn-1]$ will make distinct elements but do not know how to argue it.   Could I say something like $<a>=A$, $<b>=B$, somehow $AB=\{ ab : a \in A , b \in B \}$ and that has order $|A||B|=mn$?  Don't know if it's the same exact or similar to .

Suppose a and b are elements of group G and both a and b have finite order. How do I show if $ab = ba$, $gcd(|a|, |b|)= 1 \implies |ab| = |a||b|$


If $g=10 N/kg$ , what will show the Scales? Yes, I know this is a very simple problem. But, I am stuck. $$P=mg \Rightarrow m=\frac{100N+100N}{10N/kg}=20 kg .$$  But, I'm worried about this answer. What's the difference between hand holding the scales and putting them on the table? I think, if the Scales is captured manually, the force applied from above should be meaningless. And answer must be $m=10 kg.$ Is it correct?

If the spring in Figure A is stretched a distance d, how far will the spring in Figure B stretch? The spring constants are the same.  The answer is "by half". I don't get it, to me it's the same.


You have a set of real numbers $\{x_i\}_{i=1}^n$. You want to find what $x_{min}$ that minimizes $$\sum_{i=1}^n |x_i - x_{min}|$$  I can argue that this is minimized when $x_{min}$ is the median since, if it's not, then you either moving up or down by a distance $y$ will cause a smaller value since you make $n$ terms smaller by $y$ and $m$ terms larger by $y$, with $n > m$.  However, is there a more clean, algebraic / less hand-wavy way to prove it?

Suppose we have a set $S$ of real numbers. Show that   $$\sum_{s\in S}|s-x| $$   is minimal if $x$ is equal to the median.    This is a sample exam question of one of the exams that I need to take and I don't know how to proceed.


I am recently study group theory and its application in quantum mechanics, but got stuck at a very important point that how group theory can be applied to analyze energy level degeneracy.  In many textbooks, the statement what I understand is like this: if you find all symmetry operations that leave Hamiltonian invariant (the group of schrodinger equation) and get all the irreducible representations of them, then the dimension of each irreducible representation corresponds to the degeneracy of an energy level, though the order of different energy level cannot be predicted.  It is proved in many textbooks that the wave functions of an energy level can form a basis, and the matrices representing the symmetry transformation among them are indeed representation of the group. But why is that an irreducible representation of the group? (in the case of finding all the symmetry operations, so no accidental degeneracy argument) Or in other words, can an energy level degeneracy correspond to addition of several irreducible representations?  For example, in Jorio's book 'Group theory, application to the physics of condensed matter', it mentions that what if a representation under eigenfunctions of an energy level can be broken into smaller irreducible representations. It says 'But if this happened, then the eigenvalues for the two subsets would be different, except for the rare case of accidental degeneracy.' But why different irreducible representations correspond to different energy eigenvalues?  It is different from the question 'What is the relationship between symmetry and degeneracy in quantum mechanics?' because the problem why cannot an energy level degeneracy correspond to addition of different irreducible representations (even in the case all symmetries have been found) is not answered.

Let me remind you about the following classical  examples in quantum mechanics.     Example 1. Bound states in 1-dim potential V(x).   Let $V(x)$ be a symmetric potential i.e.   $$V(x) = V(-x)$$   Let us introduce the parity operator $\hat\Pi$ in the following way:   $$\hat\Pi f(x) = f(-x).$$   It is obvious that    $$[\hat H,\hat\Pi] = 0.$$   Therefore, for any eigenfunction of $\hat H$ we have:   $$\hat H|\psi_E(x)\rangle = E|\psi_E(x)\rangle = E\hat\Pi|\psi_E(x)\rangle,$$   i.e. state $\hat\Pi|\psi_E(x)\rangle$ is eigenfunction with the same eigenvalue. Is $E$ a degenerate level? No, because of linear dependence of $|\psi\rangle$ and $\hat\Pi|\psi\rangle.$   Consider the second example.     Example 2. Bound states in 3-dim a potential $V(r)$. Where $V(r)$ possesses central symmetry, i.e. depends only on distance to center.   In that potential we can choose eigenfunction of     angular momentum $\hat L^2$ for basis    $$|l,m\rangle,$$   where $l$ is total angular momentum and $m$ - its projection on chosen axis (usually $z$). Because of isotropy eigenfunction with different $m$ but the same $l$ correspond to one energy level and linearly independent. Therefore, $E_l$ is a degenerate level.      My question is if there is some connection between symmetries and degeneracy of energy levels. Two cases are possible at the first sight:   Existence of symmetry $\Rightarrow$ Existence of degeneracy Existence of degeneracy $\Rightarrow$ Existence of symmetry     It seems like the first case is not always fulfilled as shown in the first example. I think case 1 may be fulfilled if there is continuous symmetry. I think the second case is always true.


I am using bs4 and the request library to scrape some information from an api/xml page and I know the host doesn't like me to ping the site more than once per second.   I am using a for loop to iterate over certain sites, I was just wondering if there is a way to make sure that my iterations have a "time buffer" in between so that I don't upset the host.  example:  A = [1,2,3,4,5]  for x in A:     print(x)  >>> 1, >>> wait 1 second >>> 2, >>> wait 1 second >>> 3 >>> etc

I would like to know how to put a time delay in a Python script.


I've been working on the following problem:   Let $(X_j)_{j\geq 1}$ be independent random variables having the uniform $(-j,j)$ distribution.   a) Prove that $\lim_{n\to \infty} \frac{S_n}{n^{3/2}}=Z $ in distribution, where $Z\sim N(0,\frac{1}{9})$ Where $S_n=\sum_{i=1}^n X_i$  $\textbf{Attempt at solution}$ 1) The characteristic function of $X_j$ is $\phi_{X_j}(t)=\frac{sin(tj)}{tj}$ 2) Then, the characteristic function of $\frac{S_n(t)}{n^{3/2}}$ is $\phi_{\frac{S_n}{n^{3/2}}}(t)=\prod_{i=1}^n\frac{sin(\frac{t}{n^{3/2}}i)}{\frac{t}{n^{3/2}}i}$. 3) If one can show that the limit as $n\to \infty$ of the above expression is $e^{-u^2/18}$ then that should finish the proof. However, I don't see an easy way to evaluate that limit.

This is from and exercise of probability theory:     Let $(X_j)_{j\geq 1}$ be independent and let $X_j$ have the uniform distribution on $(-j,j)$. Show that   $$ \lim_{n\to\infty}\frac{S_n}{n^{3/2}}=Z\sim N(0,\frac{1}{9}) $$   in distribution.    In terms of characteristic functions, it suffices to show that $$ \lim_{n\to\infty}\prod_{j=1}^n\frac{\sin(jn^{-3/2}u)}{jn^{-3/2}u}=e^{-u^2/18}. $$ Take $\log$ on both side one gets: $$ \lim_{n\to\infty}\sum_{j=1}^n\log\frac{\sin(jn^{-3/2}u)}{jn^{-3/2}u}=-\frac{u^2}{18}. $$ How can this limit be proved?


Yesterday I installed Ubuntu from a USB flash drive. Now, when I turn on my notebook, it displays only _. When insert the USB drive it's ok.  I tried changing BIOS settings: some booting options, but it didn't help.  What should I do to make it possible to run without the USB flash drive?  Thanks in advance :)    Thanks but it didn't work properly. Boot Repair wrote "EFI detected. Please check the options." I don't know if it's important... after command  sudo fdisk /dev/sda   it answered:   Command (m for help): m Command action    a   toggle a bootable flag    b   edit bsd disklabel    c   toggle the dos compatibility flag    d   delete a partition    l   list known partition types    m   print this menu    n   add a new partition    o   create a new empty DOS partition table    p   print the partition table    q   quit without saving changes    s   create a new empty Sun disklabel    t   change a partition's system id    u   change display/entry units    v   verify the partition table    w   write table to disk and exit    x   extra functionality (experts only)  Command (m for help):   So I chose sda. Then it said something like      if any problems -  or boot.repair@gmail.com or my favourite discuss forum.    Then:      You can now reboot your computer. Please do not forget to make your BIOS boot on sda disk!   What has happened? what should I do? it again wasn't able to run without USB. Thank you

I had Ubuntu 12.04 Beta installed on my computer. When 12.04 was finally released, I made a bootable USB Flash Drive using Startup Disk Creator.  Then I decided to check if this drive works properly and to reinstall the system on my desktop. I must add, my desktop behaves a bit strange when it comes to bootable USB's, it recognizes them as HDD.  In BIOS I changed priority of boot so USB Flash Drive (recognized as HDD) was first. Successfully booted, I installed Ubuntu. Everything worked fine, but...  Now I cannot boot from my real HDD. Every time I want to boot, I put the USB Flash Drive into my computer, boot, safely remove it and everything works.  What do I need to do to repair boot?


I’m trying to book an emergency flight for the weekend of May 11th-12th from San Jose Costa Rica to Manila Philippines. I’m unable to obtain an in transit visa through Canada on such short notice. Canada is the cheapest route by far, less than $1,000 1-way.  The alternative, next cheapest flight is SJO to Mexico City to Narita to Manila for $2,300 for a 1-way.  The layover at Narita is 2 hours and 45 minutes.   Can a Filipino passport holder pass through Narita Japan Airport in transit from SJO, Mexico, Narita, to Manila?  Or do you also have to file for an in transit visa just like Canada?  If I have to wait any longer I will not be able to see my friend before they pass away.

I will be transferring between two international flights at Tokyo Narita airport. I'm scheduled to depart the same day I arrive. I am planning to stay within the airport during the layover. Does anyone know if I will require a transit visa at Narita?


I have figured out a possible solution and I only need someone to tell me if I'm correct. The solution is the following:  If a matrix has linearly independent columns, then  $A^+$ = $(A^TA)^{-1}A^T$  Therefore, by operating: = $A^{-1}(A^T)^{-1}A^T$ = $A^{-1}$ since $(A^T)^{-1}A^T = I$ So $A^+ = A^{-1}$  Am I right with this proof?   Thank you

If a matrix has orthonormal columns, they must be linearly independent, so $A^+ = (A^T A)^{−1} A^T$ . Also, the fact that its columns are orthonormal gives $A^T A = I$. Therefore,  $$A^+ = (A^T A)^{−1} A^T = (I)^{-1}A^T = A^T$$  Thus, $A^+ = A^T$. Am I correct? Thank you.


For every finite case, I can find a $c$ where $2^n = n^c$, so why is this true?  $$\lim_{n \rightarrow \infty} \frac{2^n}{n^c} = 0$$  From the finite cases it seems like $2^n$ grows faster because we can find a $c$ to match it at any $n$.

In other words, how to prove:  For all real constants $a$ and $b$ such that $a > 1$, $$\lim_{n\to\infty}\frac{n^b}{a^n} = 0$$  I know the definition of limit but I feel that it's not enough to prove this theorem.


I'm not the administrator, so I'm not in the sudo list. How can I shut down the computer from command line without sudo?  As I can shut down the computer from GUI, I must be able to get the privilege from somewhere... Thanks.

I have desktop edition of Ubuntu.  I like the Terminal so that that I prefer to shutdown my computer with the shutdown command.  However when I type shutdown now it prompts me to enter my password.Is there any way I can shutdown my computer using this command without entering my password?


I'm programming a cryptographic application that encrypts files, locked with the password the user supplies. It's not intended to be used in production. It's a project for me to learn more about encryption.  I have programmed the encryption part already, it's in C# and i'm using CBC as cipher mode.  I want to add authentication to my encryption and i plan on doing that by using CBC + HMAC(SHA256). I know that i have to HMAC the IV + Ciphertext. And yes i know BouncyCastle has an API that offers GCM(which is probably preferred over using CBC + HMAC), but the API's barely have any documentation and i read that CBC + HMAC is probably just as secure if done correctly. KeePass() uses it too.  However i'm not sure how to go about generating keys for the HMAC and the encryption itself. If i understand correctly it's always best-practice to use different keys for different operations (and rightly so). I'm currently encrypting the file content with a key that is generated by deriving a 256 bit key with the PKBDF2 algorithm(which takes a salt and does 10.000 iterations), but i need a key for the HMAC too. What is the best way to go about generating a key?  If you notice any mistakes and/or misconceptions in this post please tell me.

I've been doing a lot of reading on the proper way to implement AES CBC mode with HMAC authentication. I've seen many explanations, however, I've had a hard time finding an actual real example (with code) on all steps including key derivation, encryption, and decryption. My application uses PBKDF2 for key derivation. Here is what I have so far:  Derive Keys   Generate 256 bits of "key material" with KDF  key_material = pbkdf2(user_password, salt, iterations, size:256, alg:sha256)  Split key material in half yielding x2 128 bit keys for encryption and signing  enc_key = key_material.split(0, 127) mac_key = key_material.split(128, 255)    Encrypt   Generate 128 bit initialization vector  iv = secureRandomBits(128)  Do AES encrypt  cipher = aesEncrypt(plaintext, iv, mode:cbc, key:enc_key)  Compute MAC with concatenated IV and cipher bits  mac = hmac(iv + cipher, alg:sha256, key:mac_key)  Store resulting values to server (considered unsecure storage)  storeValuesToServer(cipher, iv, mac)    Decrypt   Fetch data from storage  cipher, iv, mac = getValuesFromServer()  Recompute mac  new_mac = hmac(iv + cipher, alg:sha256, key:mac_key)  Compare macs  if(mac != new_mac)   throw 'Failed MAC check!'  Do AES decrypt  plaintext = aesDecrypt(cipher, iv, mode:cbc, key:enc_key)    Questions  Does this look correct? Main concerns here are:   Have I derived the keys correctly, splitting them in half based on the output of the KDF? Am I computing the HMAC correctly by combining the iv + cipher. Does it matter if I had done cipher + iv instead?


I had 60+ Pokemon and a few rare, Pokemon go wasn't loading so I turned my phone off. When I tried to go back on Pokemon go I went to the starting screen. When I I tried to login I realized I forget my password so when I clicked forgot password nothing happend so please help me

It never gave me the option to make a password, and now I can't even sign in. I've tried to click the link, but then it takes me to some website that doesn't help me at all!  How do I recover my password?


Let $(x_{n})_{n}$ be a sequence of positive numbers for which the corresponding series is convergent. How can I show that there exists a sequence $(y_{n})_{n}$ converging to infinity such that the corresponding series of $(x_{n}y_{n})_{n}$ is convergent?  I am only interested in the existence of such sequence, but an explicit example is welcome :)

This is a nice problem on series convergence that I recently stumbled upon. Given a non-negative sequence of real numbers $(a_n)$ such that $$\sum_{n=1}^\infty a_n < \infty,$$ show that there exists a non-decreasing sequence of non-negative numbers $b_n$ such that $$b_n \to \infty \quad\text{ and } \quad \sum_{n=1}^\infty a_n b_n < \infty.$$ In other words, for every convergent series with non-negative terms, there is another convergent series with "substantially larger" terms.  I have a solution (see below), but maybe someone else has a different, simpler, and/or more elegant solution.


I was wondering if it is possible to create a chalkboard background in LaTeX, like in this picture (minus Bart of course). Then write in the chalkboard using white fill (chalk)?   Is it possible to do this in a non beamer type document class, i.e. not as frames?

I am currently preparing my beamer presentation for my PhD defense.  I took the example at the url  to get a black board style presentation.  This template includes a short script which uses a random-generator to randomly scatter dust-trails on the black background to mimic chalk traces (see MWE below).  The thing is that parallel to that, I am also using overlays to uncover my slide layout by layout. The script is executed each time I am using a layout command which slows down the compilation quite substantially. I am not so familiar with control statements in latex, so here is my question:  How can-I modify this script for the background to be refreshed only when the slide is over, and not after each layout command?  Remarks:  1) I am using the Augie font, but I didn't included it in the MWE so that it can be compiled more easily  2) In case, it should make a difference I am also using the \begin{textblock*} \end{textblock*} environment from the textpos package to position text on the slide.  Here is my MWE:   \documentclass[10pt,mathserif]{beamer}  \usepackage[francais,english]{babel} \usepackage[utf8] {inputenc} %for ISOlatin1 (8859-1) sources \usepackage[T1] {fontenc}      %for polices DC 8bits   %%%Fancy fonts %\usepackage{emerald} %\usepackage{eulervm} %%%  %%Extra packages \usepackage{amsmath} \usepackage{amsfonts} \usepackage{tikz} \usetikzlibrary{arrows,shapes} \usepackage[absolute,overlay]{textpos}    %set text colors for different objects \setbeamercolor{frametitle}{fg=white} \setbeamercolor{structure}{fg=white} \setbeamercolor{normal text}{fg=white} \setbeamercolor{alerted text}{fg=white} \setbeamercolor{example text}{fg=white}   %%Black background \setbeamercolor{background canvas}{bg=black}    %%%%%%%%%%%%%%%%%%%%%% %%%%%Script: Random Dust Trails%%%%%%%%%%%%%%% \pgfmathsetseed{\number\pdfrandomseed} % seed for random generator \setbeamertemplate{background}{     \begin{tikzpicture}         \useasboundingbox (0,0) rectangle (\the\paperwidth, \the\paperheight);        \foreach \i in {1,...,30} {             \pgfmathsetmacro{\x}{random(0,10000)/5000-1}%             \pgfmathsetmacro{\y}{random(0,10000)/10000-0.1}%             \pgfmathsetmacro{\r}{random(0,10000)/1000-5}%             \rotatebox{\r}{                 \pgftext[at=\pgfpoint{\x\paperwidth}{\y\paperheight}, left, base]{\includegraphics[width=\textwidth]{paintstroke.png}}             }         };      \end{tikzpicture} } %%%%%%%%%%%%%%%%%%%%%%  %%No navigation bar \setbeamertemplate{navigation symbols}{}  \begin{document}      \begin{frame}          \begin{itemize}             \item<1-> bla slide 1             \item<2-> blu slide 1             \item<3-> blub slide 1         \end{itemize}      \end{frame}  %%I want the background to be refreshed with the Dust Trails script only at the end of the frame          \begin{frame}          \begin{itemize}             \item<1-> bla slide 2             \item<2-> blu slide 2             \item<3-> blub slide 2         \end{itemize}      \end{frame}  \end{document}   This is my first post, so please be kind if I did something illegal on the formatting of the message ;-).  Thanks in advance,  Yannick


$$\int_0^1\frac{\arctan(ax)}{x\sqrt{1-x^2}}dx$$   My working is as follows;  Let   $$I(a)=\int_0^1\frac{\arctan(ax)}{x\sqrt{1-x^2}}dx$$  and thus   $$I'(a)=0-0+\int_0^1\frac{x}{(1+a^2x^2)(x\sqrt{1-x^2})}dx$$  (I did this using Leibniz-Newton's formula. I took the partial derivative of the integrand with respect to $a$, and since the two limits of the integral are constants, the first two terms are zero.)  Now, I'm stuck... I've been trying this one for the last hour. Can someone hint me towards the right answer? (which I  to be $\frac{\pi}{2}\sinh^{-1}a$)  P.S: I am aware of this site's norm of keeping MathJax out of the titles, but I'm getting a message that a question with this title already exists... Can someone please help?

How to evaluate $$\int_0^1\frac{\arctan x}{x\sqrt{1-x^2}}\,\mathrm dx\text{?}$$ The steps I can think of is integration by parts as $$\int_0^1\frac{\arctan x}{x\sqrt{1-x^2}}\,\mathrm dx=\int_0^1\frac{\arctan x}{x}\,\mathrm d(\arcsin x)$$ or integration by substitution using $x=\sin t$ as $$\int_0^1 \frac{\arctan x}{x\sqrt{1-x^2}}\,\mathrm dx = \int_0^{\frac{\pi}{2}}\frac{\arctan(\sin t)}{\sin t}\,\mathrm dt,$$ but both seems to make the problem more complicated.  Thanks a lot.


currently i'm trying read some website content using jsoup. I got following result for Image Url.  <img alt="" src="**data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==**"/>   how do i get the real image Url of this image

I have an image that is Base64 encoded. What is the best way to decode that in Java? Hopefully using only the libraries included with Sun Java 6.


For private betas, the site name is used in the chat and looks like this:    From the actual size, the text is barely readable. Blue on dark blue doesn't make the text look visible, never mind stand out from the background. The color choice is horrible and the small text makes things even worse. Can we please make the site name more visible in chat (for private betas)?

Here, you try:  If it weren't for the text shadow, it might as well be entirely invisible...  The cause is a CSS rule lurking in the transcripts for beta sites only:  #transcript-logo {   background: none repeat scroll 0 0 #273A5D; }   The problem is the #273A5D - a bluish colour not dissimilar to that used for the site name in the beta theme. Disabling that rule yields the much more manageable  I'll admit it is a little hard to read the "beta" in that shot. But if you had to choose which part was readable, wouldn't you choose the bit that tells you the name of the site?  Edit: It happens when actually in a chat room too!


I was trying to put ^ above y, the follow ways didn't work:   $\overset{^}{y} $^y$ $y^{^}$   I wanted something like overset, I would be glad if some one could help me.

I need to display the symbol '^'  d <- dist(fascores, method = "euclidean")^2   How do I do that?


It seems you cannot throw exceptions from destructors in case more than one exception is thrown from the destructor.   In Effective C++ Scott Meyers uses a vector example where the first element throws an exception during destruction and then later a second element throws- causing problems for C++ (which cannot handle more than one exception).  Surely this scenario (vectors manipulating elements and elements throwing exceptions) could also happen during a copy constructors implementing deep copying though?  EDIT:  Are we saying that its the recursive-nature of dtors calling underlying dtors which is different to the copy constructor?

Most people say never throw an exception out of a destructor - doing so results in undefined behavior. Stroustrup makes the point that "the vector destructor explicitly invokes the destructor for every element. This implies that if an element destructor throws, the vector destruction fails... There is really no good way to protect against exceptions thrown from destructors, so the library makes no guarantees if an element destructor throws" (from Appendix E3.2).   seems to say otherwise - that throwing destructors are more or less okay.  So my question is this - if throwing from a destructor results in undefined behavior, how do you handle errors that occur during a destructor?  If an error occurs during a cleanup operation, do you just ignore it? If it is an error that can potentially be handled up the stack but not right in the destructor, doesn't it make sense to throw an exception out of the destructor?  Obviously these kinds of errors are rare, but possible.


I used VS2019 to write C# project in Windows7. There is a error when I tried to compile the project: An object reference is required for the non-static field, method, or property  'ViewerController.curLSUnits'     When I tried to used some recommended method from other similar questions, that is, add"static" to the definition of  curLSUnits, new error occurs(Member 'ViewerController.curLSUnits' cannot be accessed with an instance reference; qualify it with a type name instead  ImageExplorerServer), seems like I could not add "static". What should I do to fix this "An object reference is required for the non-static field, method, or property 'ViewerController.curLSUnits'   " problem? viewcontroller.cs:    public UnitData[] curLSUnits;     public static void SaveToFile(int exportFileIndex, string argDBpath,       DataTable dt, int currentRow,int      m_IESTrayXTrayYValueEqualToTrayColTrayRow,int m_ExportDefectWithRedRec,      BackgroundWorker bgw = null)     {         try         {             if (exportFileIndex == 2)             {                                     string pathExptRpt = Path.GetDirectoryName(argDBpath) +         "\\ExportFolder\\" + Path.GetFileNameWithoutExtension(argDBpath) +             ".csv";                                     ExportRpt.WriteDefToCsv(bgw, pathExptRpt, dt,            exportFileIndex, currentRow,             m_IESTrayXTrayYValueEqualToTrayColTrayRow,             m_ExportDefectWithRedRec, curLSUnits);   //WY200619             }              else             {                 string pathExptRpt = Path.GetDirectoryName(argDBpath) + "\\"             + Path.GetFileNameWithoutExtension(argDBpath) + ".xlsx";                 ExportRpt.WriteDefToExcel(bgw, pathExptRpt, dt,           exportFileIndex, currentRow,             m_IESTrayXTrayYValueEqualToTrayColTrayRow,             m_ExportDefectWithRedRec);             }         }         catch (System.Exception ex)         {             debug.OutputDebugLogString("[IES] Temp debug log (SaveToFile):"      +ex.ToString() +  Environment.NewLine);                      }     }  exportRPT.cs:        public static void WriteDefToCsv(BackgroundWorker bgw, string       pathSaveFile, DataTable dtDefDetails, int ExportFileIndex, int       currentRow,     int IESTrayXTrayYValueEqualToTrayColTrayRow, int ExportDefectWithRedRec,      UnitData[] curLSUnits)     {         try         {                         System.IO.Directory.CreateDirectory(Path.GetDirectoryName(pathSaveFile));              var csv = new StringBuilder();              //Write Headers             string Headers;             SetDefectColumnTitile(out Headers);             csv.AppendLine(Headers);        ......

Consider:  namespace WindowsApplication1 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          private void button1_Click(object sender, EventArgs e)         {             //int[] val = { 0, 0};             int val;             if (textBox1.Text == "")             {                 MessageBox.Show("Input any no");             }             else             {                 val = Convert.ToInt32(textBox1.Text);                 Thread ot1 = new Thread(new ParameterizedThreadStart(SumData));                 ot1.Start(val);             }         }          private static void ReadData(object state)         {             System.Windows.Forms.Application.Run();         }          void setTextboxText(int result)         {             if (this.InvokeRequired)             {                 this.Invoke(new IntDelegate(SetTextboxTextSafe), new object[] { result });             }             else             {                 SetTextboxTextSafe(result);             }         }          void SetTextboxTextSafe(int result)         {             label1.Text = result.ToString();         }          private static void SumData(object state)         {             int result;             //int[] icount = (int[])state;             int icount = (int)state;              for (int i = icount; i > 0; i--)             {                 result += i;                 System.Threading.Thread.Sleep(1000);             }             setTextboxText(result);         }          delegate void IntDelegate(int result);          private void button2_Click(object sender, EventArgs e)         {             Application.Exit();         }     } }   Why is this error occurring?     An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int)


I am emigrating to the USA from the UK and need to purchase a flight. I have noticed that direct one way flights are over £1000 and return flights are only just over £500. Is there any way to get the price for a return ticket for a one way? If not, are there any repercussions for not using the return flight? I have a visa and everything is above board, I just don't want to spend the £500 extra when I can just buy a return for half the price of a direct one way.

I am planning a trip to Asia and then back to Rio. The thing is that I am traveling on flexible dates, so I am thinking of buying a one way ticket to Hong Kong, and I was planning to do the same when I want to come back.  But what I noticed is that, for example, a one way ticket from Melbourne to Rio costs no less than $2700 dollars for the month of May.  When I do a search for a round-trip from Melbourne to Rio and back, I can find flights for $2200.  I know I will not be using that return to Melbourne, but I'd still prefer to save those $500.   Can there be any issue with buying a round-trip with a return that I will never use?


I am using Linux Mint. Someone is trying to access my computer via my MAC Address and open port. I have some questions:   I know that there are different type of port like TCP and UDP. Should I close ALL (TCP and UDP, ...) the open (Listing) port to keep my computer save from hacking? How to close a port, if it is required?

I  was wondering about Linux security issues. Most people agree that a virus-scanner is not useful on a linux system, but what about a firewall? I am using Debian wheezy stable and before used Ubuntu 12.04. If I only have a personal PC which is logged into a secured WLAN, do I need a firewall and what is already set up on the two OS mentioned above?


I am beginner, I am trying to made a car bumper and problem appears when I want to mirror my model (I modeled a right side half of bumper because is symmetric).  When I use only mirror modifier all is fine but when I want add subsurface modifier, my model has some bugs and mistakes.

I was practicing with modeling a leaf using a image reference. Everything went fine and I finished modeling my leaf, but I wanted to make it more realistic (I'll add textures later), I saw lots of people using the Subdivision Surface modifier but it doesn't work for me.  My model:   My model when I add the Subdivision Surface modifier


If we have a system with the total energy concentrated in a few particles as the initial condition, law of entropy says that this energy will get more evenly distributed if the system is allowed to evolve using the laws of physics. If I take a box of gas right now as my system, the energy of the gas being concentrated in some molecules, I do observe that energy getting more evenly distributed over time. BUT, let's suppose I change the initial condition a bit. Consider a system identical to the above but with each particle having initial velocity in the opposite direction compared to the above system. Now we have a different initial condition. But the energy is still concentrated in a small number of molecules. After all, I've only reversed the directions of the individual velocities. The $1/2mv^2$ values remain the same, for each molecule. On one hand, law of entropy says that the energy of this system still gets more evenly distributed, as time passes (as the system initially has a lopsided distribution of energy) On the other hand, reversing the velocities is, in effect, the same as reversing the flow of time. Watching this system evolve in forward time should look the same as watching the original system evolve in reversed time. So this would mean that the entropy of this system should decrease over time, as that's what we witness when we reverse a video clip. This means the energy of this system should get less evenly distributed as time passes. Which of these conclusions is correct and why??

In statistical explanations of entropy, we can often read about a (thought) experiment of the following sort.  We have a bunch of particles in box, packed densely in one of the corners. We assume some temperature, and with it some random initial velocities of the particles. We don't exactly know the positions and the velocities, so these can be modeled as random variables in a mathematical sense. The random variables expressing the initial conditions have a certain joint probability distribution where the configurations expressing "particles in a bunch in the corner" have high probability. Now, we simulate physics (apply deterministic and reversible equations of motion) on this arrangement and we can mathematically prove that the random variables corresponding to the new positions and velocities of the particles have a joint distribution that makes it very likely that draws from it will fit the description "particles all over the place in a nothing-special arrangement".  This is very informal, but I know that all of this can be formalized by introducing the concept of a macrostate and then we have a mathematically provable theorem that the information theoretical conditional entropy of the full state given the macrostate will increase as time passes. This is basically the second law.  Now I don't see anything preventing me from applying the same logic backwards in time. Based on these mathematical results, I'd assume the following holds:  When I see a (moderately) clustered configuration of particles in the box, if someone asks me what I believe the particles looked like 10 seconds ago, my answer should be that 'they were probably more all over the place than now, with no particular arrangement or clustering'.  Or formulated otherwise, looking backwards in time, we should expect to see an increased thermodynamic entropy. The paradoxical thing to me is that we seem to assume that in the past entropy was even smaller than today!  Practical example: You arrive late to chemistry class and the teacher is demonstrating how some purple material diffuses in water. Common sense tells me to assume that the purple material was more concentrated in the water 10 seconds ago than it is now. But the above argument should make me believe that I look at the lowest entropy right now and the material was/will be more diffused in either direction of time. There is nothing time-asymmetric in the above statistical reasoning.  How can this paradox be resolved?


I know it's possible to do some electric hack to know how much current a device is using... but that would be a 1 time usage so it would be a waste of money and parts.  Is it possible to know that using software in Mac OS?  There's no BIOS in Mac OS, but I presume through EFI the OS should be able to access that kind of low level info.

I'm looking for a way to monitor the power being drawn from the USB ports on my Mac.  System Profiler doesn't appear to display this and I haven't been able to find any applications or tools to do the job either.  Can anyone suggest anything (preferably software based)?


The following sentence is from Bertrand Russell. I would like to know if in the emboldened part the  not so ... as is used or it's another structure with a different meaning.     ... they will conclude that a new belief is probably either an advance, or so unlikely to become common as to be innocuous.

First of all, note that this is not a duplicate question of another one asking about the usage of so as to, since this one is asking about the structure of so . . . as to. . . .  I understand this might have been a better question at the , since I’m not a native English speaker. I am asking it here since I want to get some professional advice in regard to this question, since I don’t seem to have found anything similar to this on the Internet.  At the Oxford Dictionaries Online (OD) I have found the following definition of ludicrous:     So foolish, unreasonable, or out of place as to be amusing.   I understand the phrase so as to, simply meaning in order to and preceding the purpose for which an action is done.  So by itself is just therefore, hence, thus, or a way of emphasizing an adjective or adverb.  As to in itself means with regard to or according to, as pointed out in .  In the OD definition of ludicrous, the use of so looks fair to me, that is, it clearly emphasizes the high extent to which something is foolish or unreasonable.  The use of as to doesn’t work in any way I’ve mentioned in this case (neither as in with regard to nor according to). I think the dictionary I’ve referred to has missed one, if not more, meaning of the phrase as to.  In this case, it appears to have likely been used as an alternative to that when used in the form So X, that Y, meaning something is or happens X (a combination of adjectives or adverbs) enough to cause Y to happen.  Of course, I don’t mean that in the structure so X as to Y the phrase as to is absolutely equivalent to that, since substituting as to with that changes the structure of Y.  Does all this mean that the phrase as to is a great alternative to that (although changing the structure of Y) whenever the sentence is of the form so X, that Y (where X is a combination of one or more adjectives or adverbs)?  I am new here and so I’m not too familiar with the variety of existing tags here, so if anyone sees an additional one that would fit, please add it to this question. I would also be glad to see some other corrections of my grammar.


There are already many answers to the general question of why birds or planes can fly. But my question is more specific: I would like to understand the relative importance of the viscosity. The air has a very low viscosity, so I am wondering whether it really makes a difference that the viscosity is non-zero. Or could a bird fly in a non-viscous fluid?

I have a hard time understanding whether or not a wing placed in a potential flow, assuming there is no viscosity and no friction with the wing, will produce a lift. I've seen several contradictory (to me) versions of what happens in this case, in particular:   In Landau - Lifshitz, Vol 6, §11 it is shown that the force vector on any object in a potential flow is zero (i.e. there is neither lift nor drag). The mathematics behind this derivation are above my understanding, thus I can't really follow how this is shown and what assumptions are made along the way. The Wikipedia article on the  states that a body in a potential flow does not experience drag. On the other hand the article does not say anything about lift forces and the German version explicitly states that it does not apply for lift forces. A common explanation for the lift produced by wings seems to be that its asymmetric shape causes a higher velocity of the flow above the wing and a lower below. Due to Bernoulli's equation that would result in a pressure-difference and thus a force. Honestly I don't quite get this explanation as I don't see where the different velocities are supposed to come from (without friction and thus without the circulation resulting from turbulences behind the wing).   So now I'm wondering, do or do not wings have lift in irrotational, inviscid, incompressible fluids.


I am an undergraduate student - just started to learn about group theory, ring theory and module theory. I am self studying from the book "Basic Abstract Algebra" by P.B.Bhattacharya, S.K.Jain, S.R.Nagpaul. Prof said that this book is written in an uncomplicated manner but i found the statements in it with more hints rather than complete proofs. What are your thoughts about this book? Our prof also suggested Abstract Algebra by Dummit and Foote - but i found it quite bulky. Please enlighten me with your thoughts as i am very much lost - which one to follow. Thank you.

I am taking abstract algebra in this semester. I find that my lecturer didn't provide enough examples for understanding. So I would like to ask what are the recommended books which has lots of solved problems and exercises? The lecturer said in this semester, he will cover group theory, ring theory and a bit of field theory. Which book contains extensive information in these three fields?


The site is all clean and beautiful, the formatting is great, the layout is organized... and we have this blue speech box like those on top of YouTube videos as the description box when you hover the mouse cursor over a tag badge with default font and a style that simply doesn't match the site.  Can this box be improved?

Some popups like the dupehammer explanation popup or the validation error ones on the  do not have the right fonts - the browser has to fall back to a default and quite ugly font instead.  Interestingly, this does not happen for validation popups on posting a question - those remain fine.  Tested with both Firefox and Microsoft Edge.