I have a table called commodities where I have nature_of_goodscolumn in it. nature_of_goods contains all the different types of goods like machinery, household etc.   I have another column called as created at which contains the date and time in timestamp format.   I need to find the maximum goods took place in particular month.   I have tried the following query:  select max(mycount) from   (select   nature_of_goods, count(nature_of_goods) AS mycount         from     commodities         group by month(created_at));

This question was inspired by  [closed] and is virtually identical to this  but using different RDBMS's (PostgreSQL vs. MySQL).  Suppose I have a list of tumours (this data is simulated from real data):  CREATE table illness (nature_of_illness VARCHAR(25), created_at DATETIME);  INSERT INTO illness VALUES ('Cervix', '2018-01-03 15:45:40'); INSERT INTO illness VALUES ('Cervix', '2018-01-03 15:45:40'); INSERT INTO illness VALUES ('Cervix', '2018-01-03 15:45:40'); INSERT INTO illness VALUES ('Cervix', '2018-01-03 15:45:40'); INSERT INTO illness VALUES ('Cervix', '2018-01-03 15:45:40'); INSERT INTO illness VALUES ('Lung',   '2018-01-03 17:50:32'); INSERT INTO illness VALUES ('Lung',   '2018-02-03 17:50:32'); INSERT INTO illness VALUES ('Lung',   '2018-02-03 17:50:32'); INSERT INTO illness VALUES ('Lung',   '2018-02-03 17:50:32'); INSERT INTO illness VALUES ('Cervix', '2018-02-03 17:50:32'); -- 2017, with 1 Cervix and Lung each for the month of Jan - tie! INSERT INTO illness VALUES ('Cervix', '2017-01-03 15:45:40'); INSERT INTO illness VALUES ('Lung',   '2017-01-03 17:50:32'); INSERT INTO illness VALUES ('Lung',   '2017-02-03 17:50:32'); INSERT INTO illness VALUES ('Lung',   '2017-02-03 17:50:32'); INSERT INTO illness VALUES ('Lung',   '2017-02-03 17:50:32'); INSERT INTO illness VALUES ('Cervix', '2017-02-03 17:50:32');   You want to find out which particular tumour was most common in a given month - so far so good!    Now, you will notice that for month 1 of 2017, there is a tie - so it makes no sense whatsoever to randomly pick one and give that as the answer - so ties have to be included - this makes the problem much more challenging.   The correct answer is:    Year    Month  Tumour count      Type   2017        1             1    Cervix  -- note tie   2017        1             1      Lung  --   "   "   2017        2             3      Lung   2018        1             5    Cervix   2018        2             3      Lung   A further bonus would be to have the month name appear as text rather than an integer.  I have a solution but it's quite complex - I'd like to know if my solution is optimal or not. The MySQL fiddle is !


Is the total enthalpy of the universe constant?  It would seem like the answer would have to be yes, since (1) enthalpy change represents the heat exchange between the system and the surroundings, and there is nothing "outside" the universe, and (2) in the equation $H = U + PV$, the matter in the universe is surrounded by a vacuum so $P = 0$ and that term disappears, so the enthalpy is just the internal energy $U$ of the universe, which never changes by the law of conservation of energy.  But I can't find a reliable source confirming this explicitly.  (The only place I can even find this question posted, is on Quora:  and the only yes/no answer says: "No, if this was the case, our school books would have ended up with another law of conservation of enthalpy", and that's why I don't read Quora.)

In popular science books and articles, I keep running into the claim that the total energy of the Universe is zero, "because the positive energy of matter is cancelled out by the negative energy of the gravitational field".  But I can't find anything concrete to substantiate this claim. As a first check, I did a calculation to compute the gravitational potential energy of a sphere of uniform density of radius $R$ using Newton's Laws and threw in $E=mc^2$ for energy of the sphere, and it was by no means obvious that the answer is zero!  So, my questions:   What is the basis for the claim – does one require General Relativity, or can one get it from Newtonian gravity? What conditions do you require in the model, in order for this to work? Could someone please refer me to a good paper about this?


I have this page  for my wap website. I have several buttons that append a form group to a div with id space. This is the code     The buttons do append the form group as expected but when i try to click the buttons of the appended html element, the on click event handler does not react. This is the code specifically  $('#log').on('click', function(e) {       alert('this connected');        e.preventDefault();        window.loading_screen.finish();       });   How can i have the button click respond to my clicks?.

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.


This question is with respect to starships battles in Star Trek TNG and DS9.  In many episodes, the Enterprise (or other Federation starship) is fired upon, but they don't retaliate quickly enough. They take multiple shots in the meantime, or the commanding office issues an order to the security officer to fire a certain kind of weapon with a certain intensity, while they take another hit before the order is conveyed and executed. Or there's an explosion on the bridge which throws the security officer away from his console before he can punch the appropriate button.  This results in the ship taking significant damage, losing their shields, losing the tactical advantage, or even being boarded or destroyed. I understand that this can be a plot device, but I find it illogical, as compared to the below alternatives:   The commanding officer can have a console with buttons for various kinds of weapons at various intensities (phasers, photon torpedoes, etc) so that precious time is not lost orally conveying an order, understanding it on the receiving end, and executing it, or risk having the security officer thrown away from his console by an explosion before he can execute the order. In a crisis, you don't want multiple people in the chain before something can get done. Another option might be a Fire All Weapons button for use in a dire situation. When pressed, this would fire all weapons at maximum power targeted at the parts of the enemy ship that are likely to cause the most damage. This way, firepower is not limited by human reaction or decision times, such as issuing an order, pressing a button each time, or targeting each individual burst of a weapon. What's the point of having so much firepower if it can't be used as quickly as possible in battle, when fractions of a second matter? A further extension is that the captain can activate this mode ahead of time. When active, the minute the ship takes one hit, the computer immediately retaliates at maximum power against the attackers. The captain would decide when this mode is appropriate to use.   Maybe you have other ideas on how ships can respond faster in battle. The point is not to fixate on the exact list of ideas, but to ask: is there any logical reason why Federation starships are so slow to react, losing the tactical advantage, and risking their own destruction or takeover?

I keep seeing this situation in Star Trek series:     "Captain, they've raised shields!"   "Now they're charging their weapons!"   "Captain, they're targeting our engines!"   "OK Ensign, evasive maneuvers."   BOOM   "Shields are holding, Captain, we're at 25%."   "They're coming about for another pass!"   BOOM   "Captain that one took out our warp drive, shields are offline as are phasers"   "Ensign, target their weapons array with a photon torpedo."   "Captain, they're hailing us..."   "Ok, belay that, put 'em on-screen."     & from this point they're possibly boarded, taken hostage, all kinds of bad outcomes that they have to come back from. One might imagine that a well-equipped cruiser would drill for such eventualities. I'd imagine it more like:     "Captain, they're raising shields!"   "Folks, you know what to do - defend the ship!"   All over the ship the crew work together as a well-oiled machine. Shields go up,    phasers take out the bad guys' weapons & engines faster than the other guys can    react, while simultaneously the helmsman takes them through a series of seemingly    random maneuvers designed to make them a very slippery target.   "OK hail them, see why they made an aggressive move on us."     Any reason why it's always the former & never the latter case?


I dismissed him and told him to go to sanctuary while on the mission to destroy the institute i did this because I had Nick after i did this I could not find him anywhere and I'm on console so I cant use the moveto Command

I recently dismissed Dogmeat in favor of Codsworth, and I'm fairly sure I sent him to Sanctuary Hills. However, I've had a fairly detailed look around the place and I haven't found him yet. Does anyone know where he is?


I need to use the symbol ||\frac{1}{2} W||_F.  I know if lengthen a vertical line, i can use the command \big|. But how to lengthen the double vertical line ||?

What is the "best LaTeX practices" for writing absolute value symbols?  Are there any packages which provide good methods?  Some options include |x| and \mid x \mid, but I'm not sure which is best...


today I've encountered the following excercise:  Show that all the primes greater than $3$ are in form of $6n\pm1$...  My initial thought was that numbers are in form of $6n,\quad 6n\pm1,\quad 6n\pm2, \quad 6n\pm3$ in respect to $6$ and $6n\pm2=2(3n\pm1),\quad 6n\pm3=3(2n\pm1)$ so since they are multiples of $2$ and $3$ they can't represent primes. This however didn't completely satisfy me, because I've shown that other forms in respect to $6$ aren't primes, but that doesn't necessarily mean that $6n\pm1$ must be prime. I thought perhaps I can do induction but I don't know what inital property to use for a start, or perhaps I am overseeing it right now.  Thanks in advance!

Show that every prime $p>3$ is either of the form $6n+1$ or of the form $6n+5$, where $n=0,1,2, \dots$


When I am am in virtual terminal and open my editor, I can use editor key shortcuts such as CTRL + Down and CTRL + Up to select lines (select block), or  F5 and F6 to copy/move the selected block.  When I log in via console however, (tty, via CTRL + Alt + F1), these shortcuts no longer work. CTRL + Down and CTRL + Up act simply as Down and Up, F5 instead of copying selected block prints cappital letter E. Only the  F6 works (moves selected block).  I believe this has nothing to do with my editor (joe), but instead has to do with settings of the console/terminal.  How can I use same keys in the tty console, as I do in virtual terminal.

In terminal emulation applications, pressing CTRL + Left / Right arrows jumps from one word to the previous or next one. Is it possible to have the same functionality in a Linux console, whether it is in text or in framebuffer modes?  In my configuration, the CTRL + arrow keys are transformed into escaped character sequences and not interpreted.


Suppose there is a wire of zero resistance so by ohms law it must have 0 potential difference between any two points, then I connect the wire to a battery which has potential difference across its terminals so would the current still flow?

In an ideal circuit, How can there be a current b/w points a & b, when there is no potential difference and thus no electric field between a & b? If there is no current, then where does current across the resistor come from, because that means no charge is coming from the battery (?).


What does dd stand for? I've always referred to it colloquially as "Disk Destroyer", but what are the "official" words that make up the acronym/command?   According to  and  it could be one of the following:   It used to stand for 'copy and convert' and was renamed 'dd' because 'cc' was already in use for the C compiler. It is a remnant of 'Job Control Language' program conversion into the 'Job Entry System'. It means 'data destruction'

I know very well what the command does, but man dd, info dd tell me: 'Convert and copy a file', as does .  Google says its an abbreviation of everything between medicine and bad webchat slang; except someone saying it means 'data destroyer', something used in PC forensics - I'd be horrified if my dd destroyed my data!  Any insight? :-)    Update: Of course I had to check :     The Unix dd(1) was designed with a   weird, distinctly non-Unixy keyword   option syntax reminiscent of IBM   System/360 JCL (which had an elaborate   DD ‘Dataset Definition’ specification   for I/O devices)   Still sounds pretty ambiguous, but then it says:     though the command filled a need, the interface design was clearly a prank.   Heh :-)


Use the adjective exalted to describe something (or someone) that is raised in rank, value, or power.           Which group has the most exalted status at your high school depends on who you ask.      Is the sentence correct or should we use whom instead of who?

Many times, I've been asked the difference between "who" and "whom". I myself know the difference, but it is hard to explain to others. What is the easiest way to explain it to those with a basic understanding of English? A mnemonic (if possible) would help.


So I have two arrays and I want to merge them into one array by adding the values with the same key together.  array &a     Array     (         [0] => 4         [1] => 10         [2] => 3         [3] => 10         [4] => 7     )   array &b     Array     (         [0] =>          [1] => 1         [2] => 2         [3] => 2         [4] => 2      )   I expect the resulting array as   Array     (         [0] => 4         [1] => 11         [2] => 5         [3] => 12         [4] => 9      )

I've got two arrays of the same size.  I'd like to merge the two so the values of one are the key indexes of the new array, and the values of the new array are the values of the other.  Right now I'm just looping through the arrays and creating the new array manually, but I have a feeling there is a much more elegant way to go about this.  I don't see any array functions for this purpose, but maybe I missed something?  Is there a simple way to this along these lines?  $mapped_array = mapkeys($array_with_keys, $array_with_values);


So right now I'm trying to put a mesh of a small pouch on the side of one of my characters. While I could make it like I would any other mesh, it would look kind of un-natural. When playing around in blender though, I noticed if you were to use the cloth effect to drape it over a few object that are close together, it makes something much like the desired effect.  So my question is, could I take the 'animated' cloth dropping over an object, say at frame 60, and make that the default way the shape is? Of course allowing me to then rotate it upward and edit it to the character.

How would one freeze a simulated body at frame X and use it as a static mesh?  Following a , I've been able to do a cloth animation to my model, now I'd like to have that made static, without the use of the timeline.   The thing is, I'm modelling something that's not going to be an animation, but a static object (something like a statue/figurine). So I don't need the animation, only the shape at a particular frame that I find convenient. I'd like eventually once this is done, to also modify that deformed grid.   I've tried to follow what was said , but couldn't figure out what chipmasque was saying. I'm quite new to blender (been using it on and off, just enough to forget everything).  I'm using blender 2.63, if it is of any relevance.


I have found an iPad on the street last night, it's an  according to the model number (A1474).   How can I find its owner?   The iPad is locked. There's no SIM card to help me find its owner. There's another question on this site  But it's 6 yr old and may be outdated.  I thought about leaving it to the police, but according to what I read, they won't deal with it.

So, I have this iphone that my parents found. I need some advice on how to find the owner. It's a puzzler though.  It was dead and I'm an android user so I couldn't power it up to find the owners info. So, I took it to the Apple store assuming that since I thought Apple was all about service, they would just take care of it.  No such luck. They said they couldn't help me. They did let me charge it up though. Might I point out that it's really stupid how long you have to wait for usability when plugging in a dead iPhone.  Anyway, when it finally became usable (20 minutes of standing foolishly in the Apple store later), it immediately popped up a little message saying it had no sim installed and when touched it just displayed a lock screen. The store employee told me there was nothing that could be done with that except a wipe.  I doubt a carrier would be helpful since there is no sim. I was under the impression that the sim couldn't be removed from an iphone though. Is that inaccurate?  Anyway, it also said the date was December 31st and my parents just found it a little over a week ago so I'm assuming it was sitting in that location for quite some time, which isn't all that surprising considering where it was. I guess maybe the clock isn't updating due to the lack of a sim... Just a guess though.  So now the only thing I really have to link it to it's original owner is the background pic on the phone which isn't much to go on at all. ;) Especially since it's half covered by the missing sim message.  Any ideas? You would think in this connected world that this wouldn't be that hard. Unfortunately I think it might be.


When I execute the code below      A = [[None] * 3] * 3     print(A)     A[0][0] = 1     print(A)   The two prints return      [[None, None, None], [None, None, None], [None, None, None]]     [[1, None, None], [1, None, None], [1, None, None]]   The statement A[0][0] = 1 assigns the value 1 to A[0][0], A[1][0], and A[2][0] instead of just assigning it to A[0][0]. Why is this the case?

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


I've been active at Math.SE for over a year and suddenly I can't upload images. When I click the Image icon (when I'm writing an answer) I get a new version of the "Drag and drop or click here" window where the "Drag and drop" picture is divided in 2, with the normal picture on top and an empty white rectangle at the bottom. And if I try and drag a file there (to the normal top part or the new empty bottom part), a new window (message box) appears asking if I want to leave this site. And if I try to click a "cancel" or click the "x" at the top right corner, nothing happens. What's going on?

When I try to upload an image, I'm presented with the following dialog box,    The dialog box does not allow uploading either from my computer or by posting a link.  This happens only on Chrome browser (running on Windows). Clearing cache and cookies, and restarting computer do not resolve.  Is this just my computer? Or is this a site-wide bug?  Additional info:  Clicking on 'click' to upload does nothing. Dragging an image onto dialog redirects me to the file location on my computer. Clicking 'Add picture' redirects me to http://[SE-domain].com/upload/image?https=true.  UPDATE: A Norton extension for Chrome was the source of the problem.


I have a custom post type kalender, a template which displays all of the posts in this custom post type and a single-kalender.php. Everything works fine when the user is logged in but when logged out the single pages return a 404 error.  I'm assuming I get the 404 because I'm trying to display future posts when not logged in. How would I go ahead and solve this issue?  EDIT 1  $labels = array(   'name' => __('Events'),   'singular_name' => __('Event'),   'add_new' => __('Nieuw event'),   'add_new_item' => __('Nieuw event'),   'edit_item' => __('Event bewerken'),   'new_item' => __('Nieuw event'),   'view_item' => __('Bekijk event'),   'search_items' => __('Doorzoek Events'),   'not_found' =>  __('Niets gevonden'),   'not_found_in_trash' => __('Niets gevonden in de prullenbak'),   'parent_item_colon' => '' );  $args = array(   'labels' => $labels,   'public' => true,   'query_var' => true,   'menu_icon' => get_stylesheet_directory_uri() . '/img/events.png',   'hierarchical' => false,   'menu_position' => null,   'rewrite' => array( 'with_front' => false ),   'supports' => array('title','editor','thumbnail')   );   register_post_type( 'kalender' , $args ); flush_rewrite_rules();   EDIT 2  I've added some code in the 404.php template which would detect if the page which is trying to load is in the custom post type kalender. This works:  <?php      global $wp_query;      if ('kalender' == $wp_query->query_vars["post_type"]) {         include 'single-kalender.php';     }     else{ ?>         </div><!-- .menu-container -->         <h1>Error 404</h1 <?php } ?>   Now I'm trying to query that specific single custom post type in the single-kalender.php template but I can't get it to work. The following query outputs no posts, even though the found_posts variable is 1 (works as expected) but the posts array remains empty unfortunately.  global $wp_query; $name = $wp_query->query_vars["name"];  add_filter( 'posts_where', 'my_posts_where_from_today' );  $query = new WP_Query(array('post_status' => array( 'publish', 'future' ), 'post_type' => 'kalender', 'order' => 'ASC', 'name' => $name ));   When I use the generated query on my database it selects the single custom post type as expected, the generated query is the following:  SELECT   wp_posts.* FROM wp_posts  WHERE 1=1  AND wp_posts.post_name = 'slug-of-the-post' AND wp_posts.post_type = 'kalender' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'future') AND post_date > '2013-04-11'  ORDER BY wp_posts.post_date ASC    If you want to check the whole print_r($query) see here:

I know I can publicly show future posts in a loop using 'post_status' => 'future' in WP_Query. But clicking on a future post's permalink will result in a 404 if you are not a logged-in user.  Suppose I have a post called Apocalypse in the post_type 'event', scheduled for 12-12-2099.  The permalink is mysite.com/event/apocalypse.  Is it possible to make mysite.com/event/apocalypse and other future 'event' posts visitable now by the public?  Ideally I'd be able to restrict future post availability to the 'event' post type, but I would settle for a solution that makes all future posts available regardless of post_type.


I have been recently studying binomial theorem and in that we very frequently encounter factorials. But one queer thing which I found is $0!$. Even more queer is its value which is      $0! = 1$.   I was told this fact and I accepted it(without any proof). But I am still confused about it.  How can we prove that $0!= 1 $?

How can I prove  from first principles that $0!$ is equal to $1$?


Similar questions have been asked before on MSE, but this is somewhat different. I have to prove the following fact  The straight line that passes through the point of intersection of the diagonals of a trapezium and through the point of intersection of the non parallel sides, bisects each of the parallel sides.  I tried using congruence and similarity, but could not find any congruent or similar triangle.

Prove that the line joining the midpoint of parallel sides of a trapezium passes through the point of intersection of diagonals.   I want to use theorems in geometry to solve this question.  The method using vectors is given .  Let $ABCD$ be the trapezium and let $O$ be the point of intersection of diagonals. I need to prove that one of the lines through $O$ can pass through both midpoints of adjacent sides. Let $AB$ and $CD$ be the parallel lines.  I started by considering a line through $O$ that passes through midpoint $E$ of $AB$. I need to show that if the line is extended, it also passes through midpoint $F$ of $CD$.  I tried using similarity of triangles but it did not help much.


In Stack Overflow the  badge is awarded for reading the entire about page. Why is the informed badge not awarded on Meta Stack Overflow? We have an about page  too.

When I signed up I received a welcome message specifically indicating I should take the tour to earn my first badge:     Clicking the message takes me directly to the .  However, as   , the 'Informed' badge is not active here on meta.  Shouldn't the wording of the welcome message be altered if a user signs up on a site which does not use this badge?


For example, which of the following is correct?     I am a teacher who likes teaching.   or     I am a teacher who like teaching.

I've seen this sentence in someone's facebook status but it sounds unnatural to me.     I'm the Rumplestiltskin who spins straw into gold   I thought it should be spin because the subject is I, but I'm not sure. Which one is the subject in this sentence, I or Rumplestiltskin and why?


I am writing some software for the ESP32 using Arduino and FreeRTOS.  Doing it this was doesn't let me see the full backend but its easy for now. If you look at Arduino examples, what you usually do is something similar to this to define a Timer callback. void vCallback(TimerHandle_t xTimer){   //Do something with the expired timer here } void setup(){   //One shot timer with 1 second timeout and callback to function   TimerHandle_t _timer = xTimerCreat("Name",1000,pdFalse,0,vCallback)   xTimerStart(_timer, 0); }  This does work if its all in the main.cpp file.  I am trying to break out my "applications" to separate files and its throwing up one way or another.  The callback definition is included in the timers.h file in the FreeRtos files and is typedef void (*TimerCallbackFunction)(TimerHandle_t);  I have tried multiple ways to get this to compile and run but not the way I would expect.  If I put the callback function in the class as a member and as a void function, it says this error during the xTimerCreate call:  argument of type "void" (Wifi_App::*)(TimerHandle_t xTimer)" is incompatible with parameter of type "TimerCallbackFunction_t" invalid use of non-static member function  If I change the function to type TimerCallbackFunction_t it throws up in the xTimerCreate because it wants a handle from the definition of the typedef. If I put the handle in that is creating the timer, it will run but it will Long story short, I am not sure how to implement this callback in the C++ class.  Maybe thats not the best approach or I should have the callback outside of the class?  I tried this but I couldn't get this approach to set a variable for the class to check. Here is my current code I am trying to implement app_wifi.h #ifndef _APP_WIFI_H #define _APP_WIFI_H  #include <Arduino.h> #include <bbcs_project.h>  typedef enum  {     WIFI_TASK_STATE_INIT = 0,     WIFI_TASK_STATE_CONNECT_START = 1,     WIFI_TASK_STATE_CONNECTING = 2,     WIFI_TASK_STATE_CONNECTED = 3,     WIFI_TASK_STATE_IDLE = 100 } E_WIFI_TASK_STATE;  class Wifi_App {     public:         Wifi_App(void);         void Handle_Task(void * parameter);         TimerCallbackFunction_t wifi_callback(TimerHandle_t xTimer);         //void wifi_callback(TimerHandle_t xTimer);         void wifiTimerCallback(TimerHandle_t xTimer);              private:         E_WIFI_TASK_STATE _state;         TaskHandle_t _handle;         TimerHandle_t _timer;         BaseType_t _timer_running;         bool _wifi_check;           };  #endif //_APP_WIFI_H  Then here is the main parts I am working with in the .cpp file app_wifi.cpp // void Wifi_App::wifi_callback(TimerHandle_t xTimer) // { //     static uint32_t timer_count = 0; //     Serial.print("Timer: "); //     Serial.println(timer_count); //     //_wifi_check = true; //     //return 0; // }  TimerCallbackFunction_t Wifi_App::wifi_callback(TimerHandle_t xTimer) {     static uint32_t timer_count = 0;     Serial.print("Timer: ");     Serial.println(timer_count);     //_wifi_check = true;     //return 0; }  TimerCallbackFunction_t test = wifi_callback(_timer); _timer = xTimerCreate("ConnectionTimer", pdMS_TO_TICKS(10000), pdFALSE, 0, test); Serial.println("Timer Created"); _timer_running = xTimerStart(_timer, 0); Serial.println("Timer started");   This example compiles and runs but you can see the callback function is defined before the creation so I am not sure if the handle is updated by the time is is used by the xTimerCreate function. It will compile and run but the timer expires immediately (as stated, I think from the handle not being correct).

I'm using an API that requires me to pass a function pointer as a callback. I'm trying to use this API from my class but I'm getting compilation errors.   Here is what I did from my constructor:  m_cRedundencyManager->Init(this->RedundencyManagerCallBack);   This doesn't compile - I get the following error:      Error  8 error C3867: 'CLoggersInfra::RedundencyManagerCallBack': function call missing argument list; use '&CLoggersInfra::RedundencyManagerCallBack' to create a pointer to member   I tried the suggestion to use &CLoggersInfra::RedundencyManagerCallBack - didn't work for me.   Any suggestions/explanation for this??  I'm using VS2008.  Thanks!!


I had read here that magnetism arises from a current because of the special relativistic effect associated with the speed of the moving charges in that current.  However that speed is only on the order of 0.024 cm/s, essentially zero compared to the speed of light, so there cannot be a relativistic effect to consider.  Is special relativity the origin of magnetism?

As an exercise I sat down and derived the magnetic field produced by moving charges for a few contrived situations. I started out with Coulomb's Law and Special Relativity. For example, I derived the magnetic field produced by a current $I$ in an infinite wire. It's a relativistic effect; in the frame of a test charge, the electron density increases or decreases relative to the proton density in the wire due to relativistic length contraction, depending on the test charge's movement. The net effect is a frame-dependent Coulomb field whose effect on a test charge is exactly equivalent to that of a magnetic field according to the Biot–Savart Law.  My question is: Can  be derived using only  and Special Relativity?   If so, and the $B$-field is in all cases a purely relativistic effect, then Maxwell's equations can be re-written without reference to a $B$-field. Does this still leave room for magnetic monopoles?


Sometimes as the OP (question asker), after reading through all the answers, I have my own sum-up about them. I want to tell people and all further readers about my feeling and comprehension about my desired answer and how all the answers helped towards solving my problem.  Where's the correct place to put that information? Things I've considered:   Edit into my question: No because that's not part of the question A comment under the question: I dislike that due to limited formatting in comments and its subject to removal (though the latter won't be the case) A comment under the highest-scored or the accepted answer: Still the same reason above. This is, for the time being, the place I'm posting that. A separate answer: Those thoughts probably don't qualify as an answer

on StackOverflow, I asked a . There are many good answers but I can not accept just one of it. I would prefer to create my own answer where I summarize all answers. Is that allowed?


Here's Prob. 18 in the Exercises after Chapter 2 in the book Principles of Mathematical Analysis by Walter Rudin, 3rd edition.      Is there a non-empty perfect set in $\mathbb{R}^1$ which contains no rational number?   Here's Definition 2.18 (h) in Baby Rudin.      Let $X$ be a metric space. A subset $E$ of $X$ is said to be perfect if $E$ is closed and if every point of $E$ is a limit point of $E$.    And, here's Definition 2.18 (d) in Rudin.      Let $X$ be a metric space. A subset $E$ of $X$ is said to be closed if every limit point of $E$ is a point of $E$.    Moreover, I know that the Cantor set --- discussed in 2.44 in Rudin --- is an example of a perfect set in $\mathbb{R}^1$ which contains no segment (i.e. no open interval).   Of course, any non-empty perfect set in a metric space must necessarily be infinite.   How to go about finding an answer to Rudin's question?

Sorry if this problem is repeated.  Is there a nonempty perfect set in $\mathbb{R}^1$ which contains no rational number?  Proof sketch: This set must be uncountable because any nonempty perfect set in $\mathbb{R}^k$ is uncountable.   We know that Cantor set (C) is perfect set on a line. If we take $E=C+\sqrt{2}=\{x+\sqrt{2}: x\in C\}$. Will this set be an answer to above problem?


I've been test-rendering a character I'm working on and I'm running into some problems. Not only are the eyes of my character not appearing in the render, but light seems to have no effect on objects at all.  In the viewport, all objects are visible and changes in light make changes to the image, but when I hit F12, I get the same thing every time.     [![enter image description here][2]][2]  This is what it looks like when I hit F12

This questions has already been asked a million times, but nothing solved my issue so far.  Situation   I'm using Blender 2.72b.  I'm not using nodes, just the plain old vanilla settings. But apparently I messed them up somehow. I'm using the Mirror modifier. I'm completely new to blender (and 3D modelling in general) and use it for a couple of days now. I deleted the cube and made this model from scratch (no import).   In texture view everything looks fine:   In material view (and after rendering) everything is black:   Attempts to solve   I have a light source. I have a camera. I have no ceiling. I have a material. I have a texture. Shadows are activated. I tried using nodes and my output was well connected - no change, still black, so I stopped using nodes again (I had no idea what I was doing anyway). I checked out many solutions posted on the web.   As my last attempt, I opened the vanilla start-up file again. Everything works fine with the cube. So I compared the material und texture settings step by step. It all seems the same. This topic is so extraordinary complex and I'm so bloody inexperienced that I'm stuck at this point.


I connect to a server via SSH from xfce4-terminal.  When I open vim outside of tmux, colors in vim are very bright (which is good):   When I start tmux with default config, and open vim from there, it displays normal colors (t_Co=8):   However, if I set default-terminal to "whatever-256colors" (or start tmux with -2) , and start vim from tmux, some colors are very dim:   Vim does recognize that this is a 256-color terminal, since t_Co gets set to 256.  I found out that entering :set background=dark in vim fixes the colorscheme, however, that isn't the proper fix, because this only inverses the problem (i.e. it causes vim to use bright colors with a terminal with light background).  How do I make vim correctly determine background color while in tmux, without setting it explicitly?    Ouside of tmux, $TERM is equal to xterm-256color.  .tmux.conf contains:  set -g default-terminal "screen-256color"   Inside tmux, $TERM is screen-256color. Changing terminal type to xterm-256color didn't help.

Environment:   Fedora 25 (4.9.12-200.fc25.x86_64) GNOME Terminal 3.22.1 Using VTE version 0.46.1 +GNUTLS VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 22 2017 16:26:11) tmux 2.2   I recently started using tmux and have observed that the colors within Vim change depending on whether I'm running inside or outside of tmux.  Below are screenshots of Vim outside (left) and inside (right) of tmux while viewing a Git diff:    My TERM variable is   Outside tmux: xterm-256color Inside tmux: screen-256color   Vim reports these terminal types as expected (via :set term?):   Outside tmux: term=xterm-256color Inside tmux: term=screen-256color   Vim also reports both instances are running in 256-color mode (via :set t_Co?):   Outside tmux: t_Co=256 Inside tmux: t_Co=256   There are many similar questions out there regarding getting Vim to run in 256-color mode inside tmux (the best answer I found is ), but I don't think that's my problem given the above information.  I can duplicate the problem outside of tmux if I run Vim with the terminal type set to screen-256color:  $ TERM=screen-256color vim   So that makes me believe there's simply some difference between the xterm-256color and screen-256color terminal capabilities that causes the difference in color.  Which leads to the question posed in the title: what specifically in the terminal capabilities causes the Vim colors to be different?  I see the differences between running :set termcap inside and outside of tmux, but I'm curious as to which variables actually cause the difference in behavior.  Independent of the previous question, is it possible to have the Vim colors be consistent when running inside or outside of tmux?  Some things I've tried include:   Explicitly setting the default terminal tmux uses in ~/.tmux.conf to various values (some against the advice of the tmux ):        set -g default-terminal "screen-256color"     set -g default-terminal "xterm-256color"     set -g default-terminal "screen.xterm-256color"     set -g default-terminal "tmux-256color"    Starting tmux using tmux -2.   In all cases, Vim continued to display different colors inside of tmux.


I found that my PC can run a 64 bit OS, but my RAM is only 1.5 GB. Am I doing something wrong by installing windows 8.1 32 bit? Is my system capable of performing better? What happens if I install the 32 bit version of the OS on a 64 bit processor?    and these are my specifications:

I've recently purchased Windows 7 Ultimate.  I have an AMD Athlon64 X2 5000+ with 2GB DDR2 RAM.  I know RAM has gotten much cheaper, I know, I know, but I am not going to be able to upgrade my RAM for about a year.  My question is obviously this; will I get any benefit from installing 64-bit Windows over 32-bit if I'm only using 2GB of RAM?    As I understand, the minimum requirement is 2GB & max is 192GB so if the minimum for 64-bit is 2GB & the minimum for 32-bit is 1GB will I lose performance if I chose to install 64-bit at it's minimum requirement over 32-bit whose minimum is half the amount?  I would like to install the 64-bit edition if only because it's the future.  192GB of RAM! that's incredible! Plus I've heard it simply performs better.  But that is with a larger amount of RAM.  I've tried to make this question as easy to decipher as possible.  Any advice would be greatly appreciated.


So I have looked online (believe it or not) and I can't seem to find anything to help me with my issue. My clock just disappeared. Here's a screenshot!

i am finding nowhere a solution I am running UBUNTU 12.04 and using GNOME desktop, which I installed additionally. Logging into classic GNOME I see the following:     WHAT is this "earth globe" icon coming from?Seems to be named "starter". It is configured to open a website, from my bookmarks. WHY is it not showing the TIME?   Using dconf-editor I had no luck in answering the above questions.  Any idea?


catch (Exception ex)\\error {     clsLogs.LogError("Error: " + ex.Message + this.Name + " || ImportData");     result = false;     }   ;Cross-thread operation not valid: Control 'cmbDeviceName' accessed from a thread other than the thread it was created on

Which is the simplest way to update a Label from another Thread?   I have a Form running on thread1, and from that I'm starting another thread (thread2).  While thread2 is processing some files I would like to update a Label on the Form with the current status of thread2's work.   How could I do that?


I have a web application I have been developing locally on my computer, I have recently launched it on my web server with the exact same settings for MySQL, but for some reason I am encountering a character encoding issue where "smart quotes" (’) are being displayed as black triangles with question marks (�), but only on the server. This is on the HTML: <meta http-equiv="content-type" content="text/html; charset=utf-8" />  My local MySQL database (without character issues) is MySQL 5.7.26 with an InnoDB table with UTF8MB4 encoding and a table collation of utf8mb4-unicode-ci My server MySQL database (with character issues) is MySQL 5.5.5-10.3.21 with an InnoDB table with UTF8MB4 encoding and a table collation of utf8mb4-unicode-ci Perhaps there is a PHP setting somewhere I am missing? Edit: if I run this script on my computer is works perfectly, but if I run the same script on my server with the same data in the database, it give me the character encoding issue: error_reporting(E_ALL);  include 'dbconfig.php';  $id = 19;  try {     $pdo = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);     $pdo->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_TO_STRING);     $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);     $sql = $pdo->prepare("SELECT * FROM products WHERE id=:id");     $sql->execute(['id' => $id]);       var_dump ($sql->fetch());      while ($row = $sql->fetch()) {         $data[] = $row;     }      echo json_encode($data);  } catch(PDOException $e) {     //echo "Error: " . $e->getMessage();     echo "Database Error"; } $conn = null;

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


I have made a program to tell what season it is based on the month. However, no matter what i input, it says that it is Fall. Here is the code:  import java.util.Scanner; public class SeasonChecker {  /**  * @param args  */ public static void main(String[] args) {     // TODO Auto-generated method stub     Scanner input = new Scanner(System.in);      System.out.println("What month is it??");     String month = input.nextLine();     System.out.println(month);     if (month == "december"||month == "January"||month=="February"){         System.out.println("Then it is Winter?");     }     else if (month=="March"||month=="May"||month=="April"){         System.out.println("Then it is Spring!!!");      }     else if (month=="June"||month=="July"||month=="August"){         System.out.println("Then it is Summer!");      }     else {          System.out.println("Then it is Autumn!");      }     input.close(); }   }

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


I tried to update the url/src of the queued $wp_scripts correctly... my aim is to use just relative paths. Therefore I:   loaded the $wp_scripts replace the domain and saved the output.   But it seems that is not the correct way to updated this variable. Pls explain me way.  /*  * Correct all script urls for multiple (alias) domain issue  */ function update_scripts_urls() {     global $wp_scripts;      foreach( $wp_scripts->queue as $handle ) {         $src = $wp_scripts->registered[$handle]->src;         $link = parse_url(home_url());         $domain = $link['scheme'].'://'.$link['host'];         $src = str_replace($domain, '', $src); // replace domain         $wp_scripts->registered[$handle]->src = $src;     } } add_action('wp_enqueue_scripts', 'update_scripts_urls', 101);   EDIT  It seems like $wp_scrips gets updated but the in the header output it shows still the full script url (eg. <script type='text/javascript' src='http://domain.local/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>)? Does the update happens in the to late?

I'm dealing with an SSL issue and I would like to strip the domain from all scripts and styles being output via wp_enqueue_scripts. This would result in all scripts and styles being displayed with a relative path from the domain root.  I imagine there is a hook that I can use to fileter this, however, I am not sure which one, nor how to go about it.


In Oxford's job website ( and ), I see positions including Professor, University Lecturer, Departmental Lecturer, Research Scientist, Research Assistant, and Research Fellow. What are the differences between the roles/duties and salary between these?  These job titles are discussed in answers to  but only in terms of career progression,  without much detail as to roles, duties, and salaries.

A recent job posting at a British university has specified available openings at multiple levels: lecturer, senior lecturer, reader, and professor. However, it's not clear how to map these titles to American equivalents. For instance, where would someone who has finished up several years of an assistant professorship and is interested in moving into such a position be classified? Would it be as a senior lecturer or reader?


I will be going to a beach location and there will be opportunities for some good sunsets.  I have a Canon 600D with 2 lenses and wanted to know the range for ISO and aperture settings.  I am doing daily home work with normal sunsets and want some guidance on the range of settings.  Many thanks

I've been lucky on a few occasions, but I often struggle with capturing awesome sunsets. What can I do to remove the element of luck and get more consistent results?  Additionally, is it possible to tell if a sunset set is going to be particularly striking far enough in advance to plan to get to an  in time?


I'm trying to compare the last names of two students in a directory, I'm doing this by overriding the compareTo method. The following code does not reflect exactly what I'm wanting to do here, the return value is just a placeholder for now. It is saying it won't compile because it cannot find the symbol for subString(int) in class String.  for (int i = 0; i < this.getLastName().length(); i++) {      if (!this.getLastName().subString(i).equals(s.getLastName().subString(i))) {         return 1;      }   }   Update: I appreciate y'all pointing out my idiocy in case sensitivity (no really, thanks) here's an update to where I'm at in the code. I think I can take it from here.  @Override public int compareTo(Student s) {   for (int i = 0; i < this.getLastName().length(); i++) {      if (!this.getLastName().equals(s.getLastName())) {         for(int j = 0; j < this.getLastName().length() || j < s.getLastName().length(); j++) {            if (this.getLastName().charAt(j) < s.getLastName().charAt(j)) {               return 1;            }            else {               return -1;            }         }      }    }   looking at it again, I don't even need that first for loop.  and here's the finished method.  @Override public int compareTo(Student s) {    if (!this.getLastName().equals(s.getLastName())) {      for(int j = 0; j < this.getLastName().length() || j < s.getLastName().length(); j++) {         if (this.getLastName().charAt(j) < s.getLastName().charAt(j)) {            return 1;         }         else if (this.getLastName().charAt(j) > s.getLastName().charAt(j)) {            return -1;         }      }   }    if (!this.getFirstName().equals(s.getFirstName())) {      for (int i = 0; i < this.getLastName().length() || i < s.getLastName().length(); i++) {         if (this.getFirstName().charAt(i) < s.getFirstName().charAt(i)) {            return 1;         }         else if (this.getFirstName().charAt(i) > s.getFirstName().charAt(i)) {            return -1;         }      }   }   return 0;   }


Theorem:   Suppose that $V$ is open and connected in $\Bbb R^n$  $f:V\to \Bbb R^m$ is differentiable on $V$   If $Df(c)=0$ $\forall c\in V$ then $f$ is constant on $V$     I want to prove this theorem with mean value theorem for real valued functions.   How to prove this?

I've been trying to prove to myself that if $\Omega$ is an open connected set in $\mathbb{R}^n$, then if $f\colon\Omega\to\mathbb{R}^m$ is a differentiable function such that $f'(x)=0$ for all $x\in\Omega$, then $f$ is constant.   I've reduced the problem to just showing $f$ is locally constant on $\Omega$. Given $x_0\in\Omega$, I know that  $$ \lim_{x\to x_0}\frac{\|f(x)-f(x_0)-f'(x_0)(x-x_0)\|}{\|x-x_0\|}=\lim_{x\to x_0}\frac{\|f(x)-f(x_0)\|}{\|x-x_0\|}=0. $$  This implies $\lim_{x\to x_0}\|f(x)-f(x_0)\|=0$. So for any $\epsilon>0$, there exists some open ball $B(x_0,\delta)$ around $x_0$ in $\Omega$ such that $\|f(x)-f(x_0)\|<\epsilon$ for $x\in B(x_0,\delta)$. But since the choice of the open ball changes with $\epsilon$, I don't think I can conclude $\|f(x)-f(x_0)\|=0$ for $x\in B$. So this doesn't convince me that there actually exists a neighborhood of $x_0$ on which $f$ is constant.   How can you make the leap from zero derivative to locally constant?


How to fix this security issue on MySQL?  [!!] User '@localhost' is an anonymous account.

According to the , you can harden a MySQL server by adding passwords, or removing the anonymous accounts.      If you want to prevent clients from connecting as anonymous users   without a password, you should either assign a password to each   anonymous account or else remove the accounts.   Before hardening, my users table looked like this.   mysql> select user,host,password from mysql.user; +------------------+-----------+-------------------------------------------+ | user             | host      | password                                  | +------------------+-----------+-------------------------------------------+ | root             | localhost | *F3A2A51A9B0F2BE246XXXXXXXXXXXXXXXXXXXXXX | | root             | gitlab    |                                           | | root             | 127.0.0.1 |                                           | | root             | ::1       |                                           | |                  | localhost |                                           | |                  | gitlab    |                                           | | debian-sys-maint | localhost | *95C1BF709B26A5BAXXXXXXXXXXXXXXXXXXXXXXXX | | myuser           | localhost | *6C8989366EAF75BB6XXXXXXXXXXXXXXXXXXXXXXX | +------------------+-----------+-------------------------------------------+   I've remove all anonymous accounts, so that the user table now looks like this.  (I'm using puppet to manage the users, but puppet effectively performs a DROP USER command).   mysql> select user,host,password from mysql.user; +------------------+-----------+-------------------------------------------+ | user             | host      | password                                  | +------------------+-----------+-------------------------------------------+ | root             | localhost | *F3A2A51A9B0F2BE246XXXXXXXXXXXXXXXXXXXXXX | | debian-sys-maint | localhost | *95C1BF709B26A5BAXXXXXXXXXXXXXXXXXXXXXXXX | | myuser           | localhost | *6C8989366EAF75BB6XXXXXXXXXXXXXXXXXXXXXXX | +------------------+-----------+-------------------------------------------+   Why is it that I am still able to login to my test system without a username or a password? What do I need to do to prevent any unwanted users from logging in?   root@gitlab:~# mysql Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 98 Server version: 5.5.32-0ubuntu0.12.04.1 (Ubuntu) .... mysql>    Update:  I've also just discovered that I can login as root, without entering a password.  Update2: I found  which has some good information, but does not solve the issue.   There are no anonymous users.  mysql> select user,host,password from mysql.user where user=''; Empty set (0.00 sec)   I login as root@localhost.  mysql> select USER(),CURRENT_USER(); +----------------+----------------+ | USER()         | CURRENT_USER() | +----------------+----------------+ | root@localhost | root@localhost | +----------------+----------------+    I do not have a default password, or skip-grant-tables defined in my.cnf  root@gitlab:~# cat /etc/mysql/my.cnf |grep -i 'skip-grant-tables'|wc -l 0 root@gitlab:~# cat /etc/mysql/my.cnf |grep -i 'pass'|wc -l 0   Update3:  I have tried performing these steps with puppet, (which should perform a flush privileges automatically). I have also manually flushed privileges and also tried restarting mysql.   Update4: I've also tried changing the mysql root password and flushed privileges. No luck, I can still log in as any user without a password.


function times(x){       return function(y){         return function(z){           return  x*y*z;         }       };     }   A bit confused how does this exactly work? How does that function know that the next parentheses is the argument for the inside return function?  console.log(times(2)(5)(2))  // 20

I've seen references to curried functions in several articles and blogs but I can't find a good explanation (or at least one that makes sense!)


I can't understand how a sigma algebra generated by random variable. can you more explain and give me some examples. for example in coin toss we have a sample space and sigma algebra such that it's generated by sample space. I'd like to know what's different between sigma algebra generated by sample space and generated by random variable? I have to say I'm not math student so I need more explanation other peoples!!! Thanks a lot

Consider a probability space $(\Omega, \mathcal{F}, P)$ where $\Omega$ is the sample space, $\mathcal{F}$ is the $\sigma$-algebra of $\Omega$, and $P$ is the probability measure. Let $X:\Omega\to\mathbb{R}$ be a random variable, inducing a $\sigma$-algebra $\mathcal{F}_X=\{X^{-1}(B)\mid B\in\mathcal{B}\}$ where $\mathcal{B}$ is the Borel algebra on $\mathbb{R}$.   Suppose we have another random variable $Y$ as well as the induced $\sigma$-algebra $\mathcal{F}_Y$, the conditional expectation can be defined as $E[Y|X]\stackrel{\text{a.s.}}{=}g$ where $g$ is determined by $E[YI_A]=\int_A g(s)P(s)\,\mathrm{d}s, \forall A\in \mathcal{F}_X$ according to Radon–Nikodym theorem.  I wonder what will happen if $\mathcal{F}_X=\mathcal{F}$ already? It looks like $E[Y|X]=Y$ so $X$ is kind of independent of any arbitrary random variable but I am not sure. Or, can anybody give an example of this kind of $X$? Thank you.  Some references:  by Mark J. Schervish.


In my bachelor thesis, I use a theorem from another author. I have to cite him. When I use  \newtheorem{proposition}{Proposition}[chapter] \begin{proposition}\textup{\cite[Proposition 4.7]{LPW}}   I get       This is not exactly what I want. As you can see, there is a point behind "Proposition 4.8". I want that point to be behind the last bracket, so that get    I hope I clarified my problem. Thanks for your help!

When I try to cite a book in such a way  \begin{theorem}[\cite[p.~90]{bibitem}] Theorem body. \end{theorem}   I've got an error because of multiple use of [ and ]. Is it possible to cite in such a way in theorem argument? Would be great if it could be done without redefine of \cite command.


This is my source file, base.c ...  #include "/usr/include/stdio.h" int main( int   argc, char *argv[] ) {     sprintf("%s\n", "woohoo");     return(0); }   I compile and execute with ...   jim@Pappy:~$ gcc base.c jim@Pappy:~$ a.out a.out: command not found jim@Pappy:~$ ll a.out -rwxrwxr-x 1 jim jim 7255 Jan 15 14:21 a.out*   So why is a.out not found?

I just switched from Windows to Ubuntu 11.10.  I wrote the following code in C with the text editor and saved it as HelloWorld.c in Documents.  #include <stdio.h> int main() {     printf("Hello World!\n");     return 0; }   And I started the Terminal and enter the following commands:  cd Documents  gcc HelloWorld.c   A file called a.out, which, after some search on Google, is the executable. I entered this command:  a.out   But I get   a.out: command not found   Which step did I do wrongly?


The example is with the particular case of Arabic, but could be extended to a more general case.  When writing academic papers containing Arabic names, each journal has a particular transliteration system. I would like to know if I could build my database of names with different romanizations for each name (some of them require diacritics, others don't) and then use the one I need for each journal. It would work similar to a bibliographic database :  @name{tusi, arabicname = {{محمد بن محمد بن الحسن ,{طوسی}, latinname = {Nasir al-Din Tusi} translit1 = {{Ṭūsī}, Naṣīr al-Dīn Muḥammad ibn Muḥammad}, translit2 = {Ṭusi}, Nasir al-Din Muhammad ibn Muhammad}, translit3 = {another one}, ....}   Then, I would "cite" them and choose the transliteration I want for each document. I could choose also the format: transliteration (Arabic name), or transliteration (Arabic name as footnote).

I use the term database loosely here -- it can be an actual database, or a spreadsheet (in any format including CSV) or can be package-dependent.   Is there a way to create mail-merged documents similar to what can be done in word processing packages? I found the  which sort of works but it puts all the mail-merged data into one document.   Is there a package or way to generate new, individual documents for each part of the database? In other words, if I have a firstName value in whatever storage system, can I get LaTeX to generate a file called <firstName>.dvi for each of the names in the database? Or do I need to resort to a scripting language driver to pull that off?  EDIT  So to further explain what I am trying to do (and will now set it up based on the answer to  ) :  I'm trying to create a "welcome to the company" sort of document that has a cover page, table of contents, welcome letter, then various sections of information. I've never tried this in anything other than a word processor where it's easy to set "master pages" or "template pages" for individual pages in the document. So I could use a letterhead template page for the welcome letter part and a standard article-type template for the rest and still have the letter numbered/referenced in the ToC.   If I use the approach on the answer there, how can I tell \pdfpages which page to include? Ultimately I would like to have many files like Bob.pdf, Sue.pdf, John.pdf etc. where each file is the same document with a custom letter embedded within.


Its been a long night... I bought a new computer with no os. I was going to copy my copy of windows 10 pro to a 250gb ssd. While copying the power went out. This usually is just a minor annoyance but for some reason it must have went off at the exact wrong time and the hdd head just swiped something wrong... It started off with a windows that just said something along the lines of,  Windows had a error:  error code: 0xc000000f Try to use a boot medium/recovery disk to fix it...   So i had a usb recovery tool and i thought it was just a simple bcd error. I ran CHKDSK and it ran successfully rebooted into my os. I was so happy something finally worked. I rebooted for other reasons in the os, and then i got a different error. This time from my UEFI/BIOS saying   "insert a boot medium with a Operating System"   At this moment i knew something was wrong so i made a windows 10 recovery disk and booted into recovery mode, then proceeded to follow these tutorials or at least some like them       These tutorials fall through all at the same place... When I run bootrec /rebuildbcd it can't find any windows operating systems.  I basically just asking for somebody to put me in the right direction. Thanks to everybody in advance!    EDIT: (after executing suggested bcdboot command)  Links to Pictures of errors:  Windows error display    GParted display of disk

NVIDIA drivers upgrade crashed my Windows 7 installation, so I'm working to undo the damage.  What I can do: I can boot Windows install from the USB drive, and I can boot the . Although automated Windows repair fails, I can get to command prompt when I boot Windows install from USB drive, and I can see my drive and all my data.  What I cannot do: I cannot boot into Windows - I get this message:  Windows failed to start. A recent hardware or software change might be the cause. To fix the problem: 1. Insert Windows CD and run a repair your computer option. File: /Boot/BCD Status: 0xc000000f Info: an error occurred while attempting to read the boot configuration data.   It seems that something is wrong with my /Boot/BCD, so I'm trying to recreate it from scratch. I've tried all the methods detailed  (including Windows repair which fails), and I'm left with the last one (near the bottom of that page). When I type the following command as in the tutorial:  bcdedit.exe /import c:\boot\bcd.temp   ...it fails with the following error:  The store import operation has failed. The requested system device cannot be found.   Many Google results say that I must use diskpart to set my partition active, however it's already set as active.  Also, when I try this:  bcdedit /enum   It fails with similar message:  The boot configuration data store could not be opened. The requested system device cannot be found.   Does anyone know what does that error message mean, and what is the requested system device?  I'd like to avoid having to reinstall Windows since all the files on disk seem to be fine.


I'm using fancyhdr to include a header on a long document that includes both portrait and landscape pages. I'd like the header to show up in the portrait orientation on the landscape pages - instead of on the bottom right in the code below, I'd like it to stay on the top right. Does anybody know how to fore the portrait placement? Tex code is below.   \documentclass[10pt, letter]{article} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \rhead{\textcolor{gray}{Mock Draft}} \renewcommand{\headrulewidth}{0pt} \usepackage{pdflscape} \usepackage[svgnames]{xcolor}  \begin{document} \begin{landscape} \textbf{Example} \end{landscape} \end{document}   Thanks!

Objective  How to change the heading of landscaped pages from    to    ?  Minimal Code  \documentclass{book} \usepackage[a5paper,hmargin=3cm,vmargin=5cm]{geometry} \usepackage{lscape,lipsum}  \begin{document} \chapter{One} \lipsum[1]  \section{One One} \lipsum[2]  \newgeometry{hmargin=5cm,vmargin=3cm}  \begin{landscape} \lipsum[3-5] \end{landscape}  \restoregeometry \lipsum[6]  \end{document}   Edit 1 (my real scenario layout)  In my real scenario, the left-right margins should not be occupied by headings.


I've just made a program, but I want to make a function in one place just to wait a few seconds to continue working. Could you tell me how does that function look?  for example  print 'I know' (HERE wait few seconds to continue working) print 'I am so layman with my trivial question'

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


I was about to write that several things were missing, when I realized that I wasn't sure if I should say      What is missing are connections   or     What are missing are connections   I think it should be the second one, but I'm not sure.

How should I phrase "What is the first 5 digits of your home postal code" or "What are the first 5 digits of your home postal code?"


So recently I decided I'd start learning Linux, having 10+ years experience with Windows and feeling quite competent with that OS. I got a 500gb external HDD, formatted it etc with Rufus and created a persistent, bootable USB installation of Ubuntu 14.04 (I later upgraded it to 14.10). This has worked great with my workstation PC, have not had any issues whatsoever and have been in love with the snappiness of Linux. However, when I try to boot that same working installation on pretty much any other computer (tried it with two lab computers at my office as well as my laptop) I get an "Operating system not found" error. I would love some advice as to how to get this install bootable on other PCs as I intend on using it to diagnose and clean Windows installations that are not in a workable state.

So I know I can make a persistent LiveUSB whereby there would be anywhere up to 4GB (I think that's the max) of persistent storage for downloads, etc.  I am asking the opposite, in a sense. I'd like to configure a USB install to have the platform adaptability that a Live OS offers while fully utilizing the 120GB of space I have.  In essence I'm hoping to have a boot up install that reconfigures most/all the hardware/drivers as necessary every boot as I'd like to be able to boot off of it on nearly any machine. (Within reason - they will all be 64-bit)  The biggest gripe with doing multi-platform booting is the video driver stuff. Sometimes the system I'm booting off of is AMD, sometimes Nvidia, sometimes Intel.  Alternatively, a usable answer may be a way to better configure the LiveUSB setup for more storage utilization and customization.


I am working on creating a maintenance inventory for a City's Parks Departments in ArcGIS 10.2.2 for Desktop. I have used the Township/Range/Section boundaries as the clipping areas for my data driven pages to set up viewing windows for different areas of the City. I have created 5 shapefiles of landscape maintenance types, which are present at varying levels in each of the individual Sections within the City. I have set up my pages as follows in the attached image, and would like to know if there would be a way to auto-populate the "table" at the bottom of the page with information that is only present in the current viewable Section(s).     For each of the 5 landscape maintenance types, I have the total area and modes 1-3 in the attribute table. Is there a way to auto-populate the red circled areas for just data within the individual page based on this?   I have found through researching this issue (without much luck so far) that more than likely I will have to join my tables for each landscape type with my index layer that is determining the data driven pages.   If this is the case, what would be the best method to join my landscape maintenance layers with the index layer?   I have access to the X-Tools extension if it would be helpful in this instance.

I am creating a map series that has many polygons per sheet. There is annotation for the polygons however some polygons are very small with no annotation for them (annotation would completely hide a polygon). Thus, I have an attribute table where labels are stored for those specific polygons.   How can I have that table displayed on the map, with only the attribute values per sheet, rather than all 2000+ values?   I am looking for a simple, dynamic solution.


The function TRUNCATE works in MySQL but I get an error in Microsoft SQL Server : Incorrect syntax near ( Basically I have list of value under discount. (Some with lots of decimal) I just want to keep the 2 decimal without rounding. E.g from 110.975 to 110.97, 10.259 to 10.25. How do I go about doing that?  SELECT TRUNCATE(110.975,2)

I'm trying to determine the best way to truncate or drop extra decimal places in SQL without rounding.  For example:  declare @value decimal(18,2)  set @value = 123.456   This will automatically round @value to be 123.46, which is good in most cases.  However, for this project, I don't need that.  Is there a simple way to truncate the decimals I don't need?  I know I can use the left() function and convert back to a decimal.  Are there any other ways?


My wife is now going to discuss possibility of induced labour with her doctor and we might need to pick up the date for delivery of our second daughter.   Our first daughter is turning 4 in couple of weeks and we were thinking about setting their birthday on the same date. Another option is to have them separated by a week or a few days.   This is an important decision with life-time consequences, and I am not quite sure what implications I should consider first. Perhaps anyone with similar experience in the past could share their view.   These are my only kids so far (two daughters) and the only reason of having them born on same date is it may somehow make them feel unusual and stand out in a crowd in future. I am quite sure this is not a very good reason. On the other hand, I definitely don't want to do it only to simplify my life and making future birthday's party planning easier for me, I think they will have them celebrated separately anyway.   Is it better to have birthdays separated by only a few days ?  I would very much appreciate your feedback, perhaps someone with similar experience could share their thoughts. Thanks!  Update after reading answers/comments: Thanks a lot to all of you, it gave me opportunity to look at it from different perspectives which was the reason I asked the question.  I and my wife are feeling more inclined now towards separate dates for B-day. One extra reason for that are in details I left out initially :  this is the first time our 4-year daughter is consciously anticipating her birthday party. We are expats, recently moved to a new country and she is still socializing, so we feel almost obliged to have a party(actually two) with her new schoolmates as well as one with her new friends speaking her native language.  The important part : she and we thought her mother presence at the party could be very important and I think this will drive our final decision on the new baby B-day date. As expressed in answers/comments : our main concern again is health condition, so we will rely on doctor's suggestions, otherwise I see it as they will be separated by a week or so (ideally having delivery before the event for 4-year old).  I can post an update in a month or so with the final results in case anyone interested, otherwise, thanks again to all of you. I upvoted all answers as they've been very helpful. I have troubles picking one as accepted though as most have a point that I agree with.

My son is born on October 1st three years ago. My wife is pregnant again and the calculated delivery date is October 22nd. Both children are boys, 3 years apart. We might end in a situation where the delivery is earlier, for reasons irrelevant to this question.   I believe that around their birthdays is the only time in the whole year that the actual date matters. It really does boil down to practical considerations around patience (gifts) and planning. I think that if there is, say, a week or more between the birthdays then it's easy to separate but if the difference is only a very few days then it gets complicated, and that's the situation I'd like to avoid.  I know from friends that having the same birthday makes events easier to plan, from the parents' perspective. It would also remove the unhappiness of a small child saying "why does he get presents today and I don't." Being a twin, and married to one, I know that there's nothing problematic in sharing a birthday as long as both get their fair share of attention.    What are practical arguments for, and against, choosing the same birthday for the second child? What considerations apply when the second child's birthday is only a very few days after the elder sibling's?


I want to build a small game which will be a JTable with some values and JTextField above the table, user should type any value in the text field if it exist in the table it will remove if it not exist user will get message by that, I tried to remove value which user write it in text field and wrote this code: String value = txt_num.getText(); for (int i = 0; i < table.getRowCount(); i++) {                            for (int j = 0; j < table.getColumnCount(); j++) {                       if (tbl.getModel().getValueAt(i, j).toString().equals(value)) {             tbl.setValueAt(null, i, j);         } else {                 JOptionPane.showMessageDialog(null, "Value isn't exist");          }     } }   This code remove correctly but it remove the first value which entered but when I enter another value I got this error:  How can I resolve that NullPointerException?

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I am reading book "Pro PHP and jQuery", I see:   but Stack Overflow put jQuery call at near top:   My question is:  Is best practice when put script link jQuery at the end near  inside HTML page?

When embedding JavaScript in an HTML document, where is the proper place to put the <script> tags and included JavaScript? I seem to recall that you are not supposed to place these in the <head> section, but placing at the beginning of the <body> section is bad, too, since the JavaScript will have to be parsed before the page is rendered completely (or something like that). This seems to leave the end of the <body> section as a logical place for <script> tags.  So, where is the right place to put the <script> tags?  (This question references , in which it was suggested that JavaScript function calls should be moved from <a> tags to <script> tags. I'm specifically using jQuery, but more general answers are also appropriate.)


These positive $\text{Li}$ ions are flowing up hill to the cathode during discharge so where is the energy coming from that allows them to get over the hill?

When Li-ion battery is discharged or being used, the positive lithium (Li+) ions move from anode to cathode through the electrolyte. Meanwhile the electrons move in the same direction through the external circuit. Why does this happen? I mean, why does a Li+ ion get attracted to the positive electrode (cathode)?


I am a student in a French university. I have some questions about the French system and universities. May I ask it in French so it would be easier for me to express myself? And so French users may respond more precisely (maybe)?

Otherwise known as  必须用英语吗？(is English required?) ¿Necesito hablar en inglés? ?האם אני חייב לכתוב באנגלית Muss ich auf Englisch schreiben?  Do I have to use English when posting a question, an answer or a comment on a Stack Exchange site?


import sys from fabric.api import *  env.hosts = ['my.host.com'] env.user = 'myuser' env.password = 'mypassword' # env.shell = '/bin/bash -l -c'  def deploy():     x = run("cd /srv/proj/")     print x.__dict__   I'm trying to login into remote shell and execute this simple cd command. although it shows that there is no error  [my.host.com] run: cd /srv/proj/ {'succeeded': True, 'return_code': 0, 'failed': False, 'command': 'cd /srv/proj/', 'stderr': '', 'real_command': '/bin/bash -l -c "cd /srv/proj/"'}   but when I execute run('ls') after cd command, it prints nothing but definitely there are files. so what is happening here. apart from that I'm having issues in executing manually set command (i mean alias in .bashrc file). fabric uses /bin/bash -l -c .... how can I overcome this hurdles.  I'm using ubuntu 14.04   ps: it's not same as os.chdir

cd is the shell command to change the working directory. How do I change the current working directory in Python?


I'm trying to model a skirt like , so I have a Bezier Circle to describe the curve of the waist, an a mesh for each pleat. As you can see , it looks fine, except the mesh is not being replicated around the curve completely. If I change the Constant Offset, I can only make the gap so small before one of the meshes disappears.  Is there a way I can fill that hole in the skirt by making the mesh go all the way around?

Repeating a segment of a tire with the Array Modifier along a curve creates a litte gap.     Are there other options besides changing the the Array Modifier's relative offset? (This would require manually adjustment of the mesh)  Merge + First Last would destroy the mesh.


Let's assume we have infinite computing power. When we consider two algorithms,  learning algorithm + regularization and feature selection + (learning algorithm + regularization),  Which one would achieve better prediction performance usually?  Now, my original post on feature selection vs regularization is duplicate with the . I'd like to update my question focusing on the point which is still ambiguous. I read the previous answers and they are not arriving at one conclusion. The answers point to the opinion that it depends on the situation. I'd like to narrow my question to focus on the case which still is not considered. I summarize some of the views from the answers:   mentions that it depends on the learning algorithm. It says that random forest would do better than the NN for selecting relevant features among large numbers of features. So the random forest would need feature selection less than NN.   indicates that the data size for training can be the issue. The feature selection might put one more layer of training into the fitting procedure and leads to overfitting because the feature selection is done at the subset of data.   mentions that if the application requires refit repeatedly with new data, then, the wrong feature might affect the performance, and feature selection would be helpful.   indicates that it depends on the regularization method.   The answers consider various factors that can affect the feature selection performance. But I think there might be several still more factors to consider. In this updated question, I'd like to raise the issue on the signal to noise ratio. My first thought is this: If the signal to noise ratio of the data set is low, there is more danger of overfitting and I feel that extra step of feature selection might help because it can remove the irrelevant feature catching the noise in a different way. In this setting, removing features might be more important than keeping more features. However, from the opposite point of view, the extra step of feature selection might lead to more severe overfitting with argument 2. Both views make sense to me at the moment. How much is the feature selection(preprocessing) helpful for the learning algorithm with regularization training with the data samples of different levels of signal to noise ratios?

I have one question with respect to need to use feature selection methods (Random forests feature importance value or Univariate feature selection methods etc) before running a statistical learning algorithm.   We know to avoid overfitting we can introduce regularization penalty on the weight vectors.   So if I want to do linear regression, then I could introduce the L2 or L1 or even Elastic net regularization parameters. To get sparse solutions, L1 penalty helps in feature selection.   Then is it still required to do feature selection before Running L1 regularizationn regression such as Lasso?. Technically Lasso is helping me reduce the features by L1 penalty then why is the feature selection needed before running the algo?   I read a research article saying that doing Anova then SVM gives better performance than using SVM alone. Now question is: SVM inherently does regularization using L2 norm. In order to maximise the margin, it is minimising the weight vector norm. So it is doing regularization in it's objective function. Then technically algorithms such as SVM should not be bothered about feature selection methods?. But the report still says doing Univariate Feature selection before normal SVM is more powerful.   Anyone with thoughts?


I was reading this answer by madame anna v:      You are right, the planetary model of the atom does not make sense when one considers the electromagnetic forces involved. The electron in an orbit is accelerating continuously and would thus radiate away its energy and fall into the nucleus.      One of the reasons for "inventing" quantum mechanics was exactly this conundrum.      The  was proposed to solve this, by stipulating that the orbits were closed and quantized and no energy could be lost while the electron was in orbit, thus creating the stability of the atom necessary to form solids and liquids. It also explained the lines observed in the spectra from excited atoms as transitions between orbits.    But I don't understand one assumption: Why would an electron in an orbit be accelerating continuously, and would thus radiate away its energy and fall into the nucleus in a classical model?  Also in a planetary model, would planets also be accelerating and thus fall into the sun?   I mean for example: a planet would accelerate towards the sun, but because it will then have bigger velocity, it will escape a little bit the sun, and then it will accelerate towards the sun... and the whole process repeats again. But, why wouldn't that be true for an electron and proton?  Thank you.

As I navigate through physics stackexchange, I noticed .  Electrons radiate light when revolving around nucleus? Why is it so obvious?  Note that I do not know anything about quantum mechanics - and I just want classical stories.


Since I have some graphics which have to be printed very large so you can see the details, I want to put them in the appendix of my document. Now to easily navigate the appendix I want to place a subsubsection and a sidewaysfigure on each page.  \subsubsection{Paper 01 - Kalman} \label{apx:plots-paper01-kalman}  \begin{sidewaysfigure}[htbp]     \centering     \includegraphics[width=\textwidth,         height=0.7\textheight,         keepaspectratio     ]{verificationMeasurementPaper01v2/KalmanDistance2.eps}      \caption{...} \end{sidewaysfigure}  \subsubsection{Paper 01 - Kalman (100 Samples)} \label{apx:plots-paper01-kalman-100}  \begin{sidewaysfigure}[htbp]     \centering     \includegraphics[width=\textwidth,         height=0.7\textheight,         keepaspectratio     ]{verificationMeasurementPaper01v2/KalmanDistance2-100-samples.eps}      \caption{...} \end{sidewaysfigure}   But now the subsection and the subsubsection are printed on the first page and after that there is always one page with one image.  How can I change this, so every subsubsection stays with the corresponding image on one page?  Both of the duplicated answers do not work. The subsubsections are still on the same place and not in front of the corresponding image.

I'm struggling with placing some plots in latex. I'm trying to include the plots (sideways, but not the heading) in an appendix, so the first plot needs to be placed at the same page as the appendix heading.  Also the plots, including the caption need to be placed inside the top/bottom/left/right margins.  When using sidewaysfigure  i get (1) a pagebreak, such that the heading and plot are placed at two different pages and (2) when the caption is long, it gets outside the margins.   Is there any way I can prevent the pagebreak? and how to prevent the plot and caption to break the margins? (is there any way to measure the total height of plot and caption, and scale the plot (graphic) so that it has width=textheight (inside margins?), and height=textwidth(inside margins?)-"captionheight"....  my preamble   \documentclass[pdftex,10pt,b5paper,twoside]{report} \usepackage[lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry}   and  \begin{sidewaysfigure} \captionsetup{width=0.75\textwidth} \begin{center} \includegraphics[keepaspectratio=true, width=\textwidth]{./Figur/fundvar.png} \caption[Commercial crude oil inventories, SPX excess returns, S\&P GCSI excess return time series]{Commercial crude oil inventories calculated as the logarithm of the current value divided by the mean of same weekly values over the past 5 years, Log excess returns on the S\&P Goldman Sachs Commodity Index,  Log excess returns on the S\&P 500 index.} \label{fig:fundvar} \end{center} \end{sidewaysfigure}


Suppose V is a vector space and T is a linear transformation. If every subspace of V is T-invariant, prove that T is a scalar multiple of the identity map.

I wrote a proof for the above question, but I am not sure whether it is right or not since I assumed linear independence.   Here's the proof:   Let $u$,$v$ be linearly independent vectors in $V$. $span(u)$, $span(v)$, $span(u+v)$ are all $T-invariant$.   $T(v)$ is an element in $span(v) \Longrightarrow T(v) = av$  $T(u)$ is an element in $span(u) \Longrightarrow T(u) = bu$  $T(u+v)$ is an element in $span(u+v) \Longrightarrow T(u+v) = T(u)+T(v)= bu+av = c(u+v)$  Hence, $bu+av-c(u+v) = 0 \Longrightarrow (b-c)u + (a-c)v = 0$ Since u and v are linearly independent, $(b-c)=(a-c)=0 \Longrightarrow b=a$   Hence, $T(w) = kw$, for all $w$ in $V$, and $k$ any scalar.   Is it right to assume linear independence? And is there any problem with my proof?


...without using the fact that a Cauchy sequence of real numbers converges:  If a subsequence of a Cauchy sequence converges, then the Cauchy sequence converges.

Let $(X,d)$ be a metric space, and say $(x_n)$ is a Cauchy sequence such that it has a convergent subsequence $(x_{n_k})$ that converges to $x$. We show $x_n \to x$. Let $\epsilon > 0$. Take $N >0$ such that for all $n,m > N$, we have   $$d(x_n,x_m) < \frac{\epsilon}{2}.$$  By hypothesis, we can take also $K >0$ such that for all $n_k > K$, we have  $$ d(x_{n_k},x) < \frac{\epsilon}{2}.$$  Put $M = \max \{N,K\}$. Therefore, for all $n,m,n_k > M$, we have  $$ d(x_n,x) \leq d(x_n, x_{n_k}) + d( x_{n_k},x) < \frac{\epsilon}{2} + \frac{\epsilon}{2} = \epsilon.$$  Hence, $x_n \to x$ as desired.  Is this a correct approach? Thank you very much in advance.


I am working on building a simple app with Python Flask. I am having a problem with the button inside of this form. Users can comment and then push the button to post their comment.  When this button is clicked, the form action(this action in python, redirects to the current page.) is fired. Now, when the button is clicked, the comment is posted on the browser but the browser is refreshed. I don't want the browser to be refreshed every time when users post their comment. How should I make this button not to refresh the page and still post the comment and show the comment on the page without refreshing the page?  <form method="POST" action="{{ url_for('feed_app.message', message_id=fm.message.id) }}" role="form" enctype="multipart/form-data">   {{ form.hidden_tag() }}   <div class="form-group">     {{ form.post(class='form-control', rows=1, style="background-color:#ffffff;width:200px;display:inline-block;") }}     <input type="hidden" name="to_user" value="{{ user.username }}" />     <button style="border-radius:5px;" type="submit" class="btn btn-success">Comment</button>   </div> </form>   This is the python code.  @feed_app.route('/message/<message_id>', methods=('GET', 'POST')) def message(message_id):     form = FeedPostForm()     message = None      user = User.objects.get(username=session.get('username'))     message = Message.objects.filter(id=message_id).first()     if not message:         abort(404)      if message and message.parent:         abort(404)      if form.validate_on_submit() and session.get('username'):         # process post         from_user = User.objects.get(username=session.get('username'))         post = form.post.data          # write the message         comment = Message(             from_user=from_user,             text=post,             message_type=COMMENT,             parent=message_id             ).save()          return redirect(url_for('home_app.home', message_id=message.id))      return render_template('feed/message.html',         message=message,         form=form     )   Is it because I set the message to redirect to the current page? I am not sure if this is an HTML problem or Flask problem.

I have an HTML page with a typical structure:  <html>   <head>    <script src="..." ></script>    <style>...</style>   </head>   <body>    content   </body>   <script>     var success_callback = function(data) {       // REPLACE PAGE CONTENT & STRUCTURE WITH "data"     }     ajax(url, params, success_callback);   </script> </html>   Do you think it is possible ?  I've already tried to give the html tag an id and doing $(id).replace(data); with no success.  Don't ask me why, but that is what I need (I'm working with a special "mashup builder" site... it is a long story).  EDIT : I forgot to say that scripts in the received content have to be executed, even external scripts included using <script src="...">.


Could arguments claiming the impossibility to prove or disprove anything be  flawed because if they were sound they would also be impossible to prove?   Or could you just assume they must be right without any proof?

The belief that everything is relative is obviously self-refuting, because it holds to an absolute.  However, in my experience, people who believe this (or some form of it) such as some Buddhists and atheistic materialists, or people who have an even more radical belief that permits no knowledge at all, such as nihilists, still actively resist those who suggest that there are at least some absolutes. In their discussing what reality is like and whether one idea corresponds to reality better than another idea, aren't they admitting that reality itself is an absolute and that at least one thing is absolutely knowable (a way in which reality is or is not, to which certain ideas correspond more or less closely)?  To put it another way, this very desire to show others that "some-absolute-truths-exist" is wrong seems to destroy their own "all is relative" or "nothing is knowable" positions. By taking a stance against any truth claim at all, they are making an ontological claim about what reality is not like and that this should apply globally—thus making a truth claim, admitting to at least one absolute. That seems ridiculously inconsistent, like someone going around and yelling at random passersby, "I'm not yelling at you!" and "You can't hear me yelling!"  I think that someone who believes in absolutely comprehensive global relativism (to me an impossible bit of nonsense, like square circles) has no business arguing with anyone at all. Any discussion they engage in cannot be intended to find truth together with their discussion partners, because they're either insane, lying, or the discussion was undertaken solely for their own pleasure—why else would someone who doesn't believe anything is true argue with you about whether something you think is true actually is? And pleasuring oneself in public at the expense of other people's comfort and in violation of basic human propriety (I don't know how to put this more delicately, it honestly seems like a very apt analogy) seems like a pretty reprehensible thing to do.  What kind of basis do relativists and their more extreme nihilist friends have for arguing against anything at all? And why do they seem to never, ever admit that when they do argue with others about the truth of any claim, that this is mistreatment solely in pursuit of their own offensive pleasure and amusement (since it can't be an attempt to discover truth, and their argument with the other person can't be an attempt to discredit an incorrect idea, since neither correct nor incorrect ideas exist)?


I am new to the Latex environment. I am simply compiling the IEEE trans Latex format in Tex-maker but I am getting this problem. I have copied the ieeetran.cls file to the directory   tex>latex>ieeetran>ieeetran.cls   but still when I try to compile the project the error displays that ieeetran.cls not found.   ! LaTeX Error: File `IEEEtran.cls' not found.Type X to quit or <RETURN> to proceed,or enter new name. (Default extension: cls)Enter file name:! Emergency stop.<read > \usepackage   I have tried to install the package but it didn't installs.  Before voting down this question please keep in mind that I am new to the whole Latex and Tex-maker thing so please be polite while answering my question. Thanks a lot in advance.

I'm new to LaTeX, investigating using it for some work projects.  I'm using MiKTeX on Windows.  My employer's locked-down network blocks the application's automatic installation function.  I can take my laptop home and successfully install from there, but if I need a package in the middle of the day I'm stuck.  I am able to access the CTAN website and download the package files (.dtx or .ins?), but I don't know what do do with them.  How can I do a manual package installation?


I've just installed Spotify, and it doesn't open, just displays an error message. I'm running Ubuntu 14.04.  Error message:  [1102/172855.962775:FATAL:nss_util.cc(632)] NSS_VersionCheck("3.26") failed. NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer. Aborted (core dumped)

I upgraded to Chrome 61.0.3163 via ppa on Ubuntu 16.04 but it won't launch because NSS out of date. Launching Chrome in terminal gives:  NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer.   Running   sudo apt-get install libnss3   gives  libnss3 is already the newest version (2:3.21-1ubuntu4)   Should I try to get a newer version of libnss that's not in the repository? I downgraded my version of Chrome for now.  Edit:  apt-cache policy libnss3 libnss3:   Installed: 2:3.21-1ubuntu4   Candidate: 2:3.21-1ubuntu4   Version table:  *** 2:3.21-1ubuntu4 500         500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages         100 /var/lib/dpkg/status  cat /etc/apt/sources.list # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted  ## Major bug fix updates produced after the final release of the ## distribution. # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## universe WILL NOT receive any review or updates from the Ubuntu security ## team. deb http://us.archive.ubuntu.com/ubuntu/ xenial universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu  ## team, and may not be under a free licence. Please satisfy yourself as to  ## your rights to use the software. Also, please note that software in  ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse  ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse  ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. deb http://archive.canonical.com/ubuntu xenial partner deb-src http://archive.canonical.com/ubuntu xenial partner  # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted # deb-src http://security.ubuntu.com/ubuntu xenial-security universe # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse


This should be easy but maybe im confusing how switch statements work. I have a data attribute associated with a list item. When you click the list item I pass the data attribute number to the switch which should run the function if the data attribute and the switch are equal. Isn't this how it works? Here the numbers should match up yet im getting the default every-time. However if i hard code the correct number it functions. Why is this? Thanks Stack,  HTML:

First Step

Slider

Social Hub

The Spirit

Elephant People

Elephant Room

Features

Spirit Award

Logout

   Javascript:      $('.nav_li').click(function(){       var $listItem = $(this);       var $point = $('.red_pointer');       var $rePoint = $listItem.attr('data-pointer-slide');         console.log($rePoint);     switch ($rePoint) {         case 10:             $point.animate({                top: '10%'             },1000);             break;         case 21:             $point.animate({                 top: '21%'             }, 1000);             break;         case 32:             $point.animate({                 top: '32%'             }, 1000);             break;         case 44:             $point.animate({                 top: '44%'             }, 1000);             break;         case 55:             $point.animate({                 top: '55%'             }, 1000);             break;         case 65:             $point.animate({                 top: '65%'             }, 1000);             break;         case 76:             $point.animate({                 top: '76%'             }, 1000);             break;         default:             console.log($rePoint);     } });

I have problem in some JavaScript that I am writing where the Switch statement does not seem to be working as expected.  switch (msg.ResultType) {   case 0:     $('#txtConsole').val("Some Val 0");     break;   case 1:     $('#txtConsole').val("Some Val 1");     break;   case 2:     $('#txtConsole').text("Some Val 2");     break; }   The ResultType is an integer value 0-2 and I can see that in FireBug.  In all cases, the switch transfers control to the final break statement which means all the logic is completely skipped.  What am I missing?