Suppose $f:[a,b]\to \mathbb R$ has derivative up to order $2$, and  $f'(a)=f'(b)=0$.  Prove there is  a point $c$ at $(a,b)$ such that  $$ |f''(c)|\geq 4\frac{|f(b)-f(a)|}{(b-a)^2}. $$    If it was factor 2, not 4, then I could use a Taylor expansion with Lagrange residue.

Let ${\rm f}:\left[a, b\right]\to\mathbb{R}$ be twice differentiable, and suppose   $$\lim_{x\to a^{+}} \frac{{\rm f}\left(x\right) - {\rm f}\left(a\right)}{x - a} = \lim_{x\to b^{-}}\frac{{\rm f}\left(x\right) - {\rm f}\left(b\right)}{x - b} =0 $$  Show that there exists $\xi \in \left(a, b\right)$ such that $\displaystyle{% \left\vert\vphantom{\Large A}\,{\rm f}''\left(\xi\right)\right\vert \geq \frac{4\left\vert\vphantom{\Large A}% \,{\rm f}\left(a\right) - {\rm f}\left(b\right)\right\vert} {\left(b - a\right)^{2}}}$.  I don't know how to start. Any hints ?.


I have read  post, showing how to retrieve the stored wi-fi passwords. But I am not able to access the file. And I have also enabled android backup settings for data. I think it also saves wi-fi passwords. But I don't know from which site I can access my android personal data.  I have recently purchased a new mobile and rooting will void the warranty.  Any idea how to retrieve without rooting.  Thanks in advance !!

I have an LG Optimus 7 (not-rooted), and all my WiFi passwords are there. I want to view the saved WiFi passwords to transfer thm to my new Samsung Galaxy S3, but I don't know how.  I tried to search on the Internet and Google play for an application that would allow me to view this information, but I can't find one. Is there any way for me to accomplish this?


The "Tag suggest" functionality when editing Open Source projects in one's Careers 2.0 profile is broken (i.e. the layout is broken, you can still "use" the feature) when using Chrome 38 on Windows (did not test other browsers).  See this screenshot:

Here's a screenshot of the error shown for the list layout alignment issue. I don't know what it is called, so I did my best.  I'm using Google Chrome version 38.0.2125.104 m, telling me that I'm up-to-date.   If it's a browser issue, then I can't update it, as I don't have admin rights and had to go report this issue to the admin.


ABC is a right triangle at $A$ ,  $BH , CD$ are the bisectors of angles $\angle {B},\angle { C}$, respectively , if $BH=9$ and $CD=8\sqrt {2}$ , Find the length of $BC$?

In a right triangle $ABC$ (right-angled at $B$), $D$ and $E$ are points of $\overline{AB}$ and $\overline{BC}$ respectively such that $\overline{CD}$ and $\overline{AE}$ are the angle bisectors of the acute angles of the triangle. Given that $AE=9$ and $CD=8\sqrt{2}$, find the length of the hypotenuse $\overline{AC}$.


Windows 7, OsGeo4W pack installed including QGIS 2.4.0 and GRASS.  In QGIS when I try to execute a GRASS geoprocessing algorithm I get this popup:     Missing dependency. This algorithm cannot be run :-(    This algorithm requires GRASS GIS 7 to be run. Unfortunately, it seems that GRASS GIS 7 is not installed in your system, or it is not correctly configured to be used from QGIS   Click here to know more about how to install and configure GRASS GIS 7 to be used with QGIS   The link doesn't help. I get the same message at my computer at work with QGIS 2.2.0  The GRASS plugins are activated under geoprocessing settings.  Do I need to configure something?    When I run MSYS I get this:

I am quite new to QGIS and working with the external applications such as GRASS.  When trying to launch a GRASS tool from the processing toolbox I get the following error:     Missing dependency. This algorithm cannot be run :-(   This algorithm   requires GRASS to be run. Unfortunately, it seems that GRASS is not   installed in your system, or it is not correctly configured to be used   from QGIS    Click here to know more about how to install and configure   GRASS to be used with QGIS   When I am using GRASS from the Plugins menu it works. I have GRASS 6.4 installed to my system and running, GRASS 7 installed, but it doesn't run, probably due to some known El Capitan issue. Anyhow, GRASS 6.4 should be working. Moreover, there is also the GRASS that comes with the QGIS installation.  Unfortunately I messed up the path to GRASS that was originally set in Processing -> Options before I even tried if the original setup works. I tried really every possible path I could think of, to the GRASS-6.4 installation in my applications folder (/Applications/GRASS-6.4.app) and to the GRASS folder in the QGIS installation (/Applications/QGIS.app/Contents/MacOS/grass), I don't get the GRASS tools to working. I reinstalled QGIS to restore the original settings, but obviously I have to delete the particular settings before (but where?), because the path was still as I set it before reinstallation.  SAGA is working from the processing toolbox.  So, long story short:   Any suggestions what could be the issue? Anyone experiences with running GRASS via processing toolbox with QGIS 2.8 on El Capitan? It would be already a great help if someone could give me the original path to GRASS set at "Processing" --> "Options"


I tar files using   tar -czvf pngs.tar.gz folder*/*.png   which tars the correct files but maintains the file structure, but I want everything without folders inside the tar-ball. How do I do that?  File structure as illustration:   folder0001:   0001.abc.png 0001.dfg.png ...  folder0087:   0087.fje.png 0087.gho.png  ...   ...  otherfolder   ...  ...

Say I do this:  tar cvf allfiles.tar $(<mylist.txt)  and mylist.txt contains this:  /tmp/lib1 /tmp/path2/lib2 /path3/lib3   How to tar the files so the tarball contains just  lib1 lib2 lib3   with no directory structure at all?    The -C of --directory options are usually recommended (, ), but there are multiple directories so this doesn't work. Also, --xform looks like it requires a fixed pattern () which we do not have.


On a large scale, normal reaction force is supposed to occur when two objects come into contact. But how is contact defined here? If you have a book sitting on a table, how close do the particles that make up the book have to be to the table's particle in order to be considered 'in contact'?

If you've ever been annoyingly poked by a geek, you might be familiar with the semi-nerdy obnoxious response of      "I'm not actually touching you! The electrons in the atoms of my   skin are just getting really close to yours!"   Expanding on this a little bit, it seems the obnoxious geek is right. After all, consider Zeno's paradox. Every time you try to touch two objects together, you have to get them halfway there, then quarter-way, etc. In other words, there's always a infinitesimal distance in between the two objects.   Atoms don't "touch" each other; even the protons and neutrons in the nucleus of an atom aren't "touching" each other.  So what does it mean for two objects to touch each other?   Are atoms that join to form a molecule "touching"? I suppose the atoms are touching, because their is some overlap, but the subatomic particles are just whizzing around avoiding each other. If this is the case, should "touching" just be defined relative to some context? I.e, if I touch your hand, our hands are touching, but unless you pick up some of my DNA, the molecules in our hands aren't touching? And since the molecules aren't changing, the atoms aren't touching either?  Is there really no such thing as "touching"?


I have a normal distribution $X$~$N(\mu,\sigma^2)$. Is there an exact value for the mean and standard deviation of $X^2$?  Thanks

What is the distribution of the square of a non-standard normal random variable (i.e., the mean is not equal to 0 and the variance is not equal to 1)?


Can the romex be spliced in line and then shrink wrapped ? Or  bring receptacle outletbox closer to cut line.

Is there a way without using junction boxes to simply splice in additional length of 12/2 NM-B cable? Can I use twist caps?  I'm putting in a dog door and as it so happens, there is some 12/2 right in the way of the location I've chosen. There's no additional slack in the cable, and I don't want to rip up more drywall than I have to. I'm tempted to just cut it and splice in an additional foot or two with twist caps to get it out of the way. I don't know if this is safe or legal. Do I need to get junction boxes? Attached some pictures for fun.  Also, there is a 1-gang electrical outlet box that is going to the outside. I'm moving that up a bit.


I have made two solvers to implement neural networks, one is based on stochastic gradient descent (SGD) while the other is based on the BFGS (Broyden-Fletcher-Goldfarb-Shanno) algorithm.   I have read a lot of material and find it is common to use SGD rather BFGS, but I have found that BFGS performs better than SGD.   Can anyone can tell me why people prefer SGD to BFGS?

It seems that, especially for deep learning, there are dominating very simple methods for optimizing SGD convergence like ADAM - nice overview:   They trace only single direction - discarding information about the remaining ones, they do not try to estimate distance from near extremum - which is suggested by gradient evolution ($\rightarrow 0$ in extremum), and could help with the crucial choice of step size.  Both these missed opportunities could be exploited by second order methods - trying to locally model parabola in simultaneously multiple directions (not all, just a few), e.g. near saddle attracting in some directions, repulsing in the others. Here are some:   L-BFGS:  TONGA:  K-FAC:  saddle-free Newton:  my second order local parametrization:    But still first order methods dominate (?), I have heard opinions that second order just don't work for deep learning (?)  There are mainly 3 challenges (any more?): inverting Hessian, stochasticity of gradients, and handling saddles. All of them should be resolved if locally modelling parametrization as parabolas in a few promising directions (I would like to use): update this parametrization based on calculated gradients, and perform proper step based on this parametrization. This way extrema can be in updated parameters - no Hessian inversion, slow evolution of parametrization allows to accumulate statistical trends from gradients, we can model both curvatures near saddles: correspondingly attract or repulse, with strength depending on modeled distance.  Should we go toward second order methods for deep learning?  Why is it so difficult to make them more successful than simple first order methods - could we identify these challenges ... resolve them?  As there are many ways to realize second order methods, which seems the most promising?  Update: Overview of SGD convergence methods including 2nd order:   Update: There are criticized huge 2nd order methods, but we can work on the opposite end of cost spectrum: make tiny steps from successful 1st order methods, like just cheap  in single direction e.g. of momentum method for smarter choice of step size - are there interesting approaches for such 2nd order enhancement of 1st order methods?


Does completing phD from a highly ranked university has benefits over completing phD over a lower ranked University?  I am only talking about the college rankings and not about the advisor rankings like for eg: TAMU has better rank than UAH.

I've been admitted to more than one PhD program, and I'm having a very hard time making a decision.  The programs I'm accepted to have advantages and disadvantages with respect to one another. How do I weigh the relative importance of difference aspects of the program in order to make an optimal decision?  Ultimately, this is not a decision that anybody else can make for me, because everyone has different values and priorities, and the right decision for me may not be the right decision for somebody else. However, you can help  by giving me more information about how different features of a program will affect my experience in graduate school and my future career.  The offers under consideration differ in a variety of ways:          I need to know more about what kinds of things are important and how these will affect me, so that I can make an informed decision about balancing competing criteria.     Note to readers: These answers quote extensively from other answers on this site (and link to them). If you read something quoted here that you find helpful, please follow the link to the original source and vote it up!    This is a special community wiki 'canonical' question that aggregates advice on a very broad topic - see more information in this .  Each answer here relates to a different metric that one might take under consideration. If you have a new "critical" metric not in the list above that you believe should be an important part of the decision, post a new answer. If you want to add something related a metric that's already represented in its own answer, edit that answer.


I am going on a business trip to Amsterdam for 3 days , would like to extend the trip as a tourist to Paris for 6 days. Which countries consulate should I apply. What should I mention in the cover letter of Schengen visa?

I'm planning a multi city trip soon. I'll be applying with the German embassy as I had planned on going to Berlin for 3 days before going to Prague, Vienna, and Budapest for 2-3 days each afterwards.   My question is, it is working out more conveniently for me to instead make Germany my last destination, rendering the first entry clause. And I can only apply with the German consulate as they are the only ones I can find an appointment for in time. Would staying in Germany for 4 days afterwards be enough to classify it as a main destination (as opposed to 2-3 days in the other cities)?


We specify the direction of instantaneous angular velocity using the right hand thumb rule. I just want to know that is it just a matter of convention or we don't have any other direction for it to be specified?

Angular velocity is the rate of angular displacement about an axis. Its direction is determined by right hand rule.  According to right hand rule, if you hold the axis with your right hand and rotate the fingers in the direction of motion of the rotating body then thumb will point the direction of the angular velocity.  The direction of angular velocity is above or below the plane. But what does it mean? I mean in linear velocity the direction of velocity is in the direction of motion of body but what does it mean that body is moving in one direction while the direction of its angular velocity is in another direction?


As mentioned by the title 'is my CPU core/CPU proximity to high in temperature?'. The underneath of my macbook gets seriously hot. Not only this but if an application is being 'verified' when opened or when I open a browser such as google chrome, the fans get extremely noisy. I've had a look online but there seems to be difference of opinion. Can anyone tell me what they think with the stats below? It averages around 70s/80s.

I just got a new MacBook Pro 2017 128GB no-touchbar, bought it in the refurb.  I'm doing a bit of Photoshop ( I know it's not the best MBP, but I really need it right now for work ) and I have Safari ( 6/7 tabs ) running with Spotify, and I feel like my MBP is too hot. Here are the temperatures according to iStats    I feel like it's really way too hot, but perhaps I'm mistaking. I heard the max temperature is 100°C, so I'm pretty far from that.  What do you think ?  Thanks !


For example, can you get a gold shovel (by buying 50 fertilizer) before getting a silver shovel (donating 15 fossils)?

I remember in Wild World, the gold shovel could plant money trees and was acquired by burying a normal shovel for a day.  The other golden tools had special abilities too.  In New Leaf, I have read that there are also silver tools.  What do the silver/gold tools do and how can I get them?


Kindly help me in understanding the following code,      BigDecimal d = new BigDecimal(000100);     System.out.println(d); // output is 64!!!!      BigDecimal x = new BigDecimal(000100.0);     System.out.println(x); // output is 100   Shouldn't we use BigDecimal to process int or long value in any scenario? (I mean leave about performance and stuff, I know its not advisable to use BigDecimal to process only int or long). My data has mix of both long and decimal values, so am trying to know about BigDecimal.

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


My code:  function myFunc(callback) { /*do stuff*/     $('div').one('mouseover', function () {         alert('mouseover');         callback;     }); } $("div").click(function () {     alert('clicked');     myFunc(function () {         alert('Callback');     }); });   However, callback does not execute, nor is there an error in the console. How can I make this work?  Fiddle:

I understand passing in a function to another function as a callback and having it execute, but I'm not understanding the best implementation to do that. I'm looking for a very basic example, like this:  var myCallBackExample = {     myFirstFunction : function( param1, param2, callback ) {         // Do something with param1 and param2.         if ( arguments.length == 3 ) {             // Execute callback function.             // What is the "best" way to do this?         }     },     mySecondFunction : function() {         myFirstFunction( false, true, function() {             // When this anonymous function is called, execute it.         });     } };   In myFirstFunction, if I do return new callback(), then it works and executes the anonymous function, but that doesn't seem like the correct approach to me.


I was just downloading a new copy of LaTeX for my Mac and I noticed this comment on the www.latex-project.org website:  The LaTeX3 Project  LaTeX3 Project  The LaTeX3 project is a long-term research project to develop the next version of the LaTeX typesetting system.  So I looked at  and it refers to the .  So it's been 20 years since the Mittlebach and Rowley article came out. That's certainly long-term. Did LaTeX3 ever happen?

I feel as though I have been hearing about the LaTeX3 project for a very long time.   Why is it taking so long for it to come into fruition? Are there major technical difficulties, or is it purely a lack of developers that is causing a bottleneck?


We can say walking down this street, and we also say the shop is 500m up this building. Can we say walk up the street and in these cases, what direction is the up and down to, as in most cases, the road is flat without any slope. How we know which way is up or down?

Is walking up/down the road/street applicable if the street is not sloped?  I think I heard something about "with/against the numbering of houses" but I'm not sure if it's correct.  Also, if that were correct, why is walking down the street  than walking up the street?


Suppose I try to shoot a piece of forest with trees casting dense shadows during daylight. It looks something like this to a human eye (part of larger and more detailed image from )    In the image above the brightest spots and the darkest shadows are still "within limits" - nothing harsh, looks lit rather evenly. But when I try to shoot a similarly looking scene I get something like this (part of image from ):    In the latter image there're only very dark shadows and very bright spots and almost nothing can be seen except for newspapers and a log and some leaves. Although I know that if I witnessed a scene like this it would look more like a former image to me - much more evenly lit.  The notes to the former image mention that the author used     Nikon D600 + Nikkor 17-35 f/2.8 + ND64x @25mm, f/8, 30s, ISO:50   which includes very strong attenuation combined with rather long exposure.  Is this combination of ND filter and long exposure responsible for having such even lighting on the scene in the former image?

I am attempting to work out, conceptually, how the use of a neutral density filter effects the resulting captured image.  Do ND filters allow a camera to capture higher contrast scenes (without clipping the highlights) than would otherwise be possible? Or do they just decrease the amount of light uniformly so that highlight detail is gained at the expense of shadow detail being lost?  Put more technically, is the effect of a ND filter more like a linear mapping or a clipping of the low light levels? See the figure below for examples of each.


My problem is that I am working on a project, but when I extrude in it it extrudes in large increments instead of extruding smoothly.Why is this so? In my other projects the extrusion works just fine.

My cursor is moving by every selection by large increments!  Normally when I use Blender, I am able to select and move objects to any coordinate. Now, all of the sudden, when I select an object or mesh the selection moves by an inch or so in each direction.  How do I reset it to normal?


Which is correct:   The 80s is returning The 80s are returning.   If you say "are returning", then why do we say, "The 80s was a time of....." ?

"the 90s were the best decade ever" or "the 90s was the best decade ever"  "the 90s" and "decade" are both referring to the same singular period of 10 years, so "was" seems to make more sense. "90s were" rolls off the tongue better though.


I think the title is pretty self explanatory, although I wasn't very sure about how to formulate it properly. I am currently studying Young's double slit experiment and some related stuff. One of the requirements for this experiment to work is that the light source has to be coherent.  coherent = only one wavelength and invariable phase.  So, imagine I use a normal light bulb (in stead of a light source that emits one single wavelength) and try to reproduce Young's double slit experiment. A light bulb emits multiple frequencies. The light reaching both slits will be exactly the same as it comes from the same source. So you can perfectly get positive and negative interference and see a pattern on the other side (I think). There will already some sort of interference (generating ) of the longer wavelengths with the shorter wavelengths and so forth before they reach the screen. So this more complex waveform afterwards reaches both slits. But as this waveform is the same at both slits, I think you could still perfectly be able to see an interference pattern.  So does it really matter whether the source emits multiple more than one wavelength? If yes, why should we care?

In , a home experiment is presented which appears to produce a very good double-slit interference pattern with normal sunlight.  The experiment is an empty cardboard box with a visor and a placeholder for a microscope slide with two slits on one side. This is arranged with the slits and visor facing the Sun, so the interference forms on the bottom of the box.    They claim to observe a good interference pattern from the two slits:    Discussions of interference in optics textbooks often stress that coherent light is needed to produce such patterns, and that sunlight and other thermal sources of light do not have such coherence. How, then, is this possible?


I'm conducting a PCA in Matlab on standardized variables. My goal is to interpret    angles = loadings, correlations bw. variables and PC-axis directions = vectors point to the direction of the variable length = ?   of the eigenvectors from the biplot.  In my biplot I get eigenvectors of different length. Could you please help me to understand why is it the case?  Also, I'm confused what does the length of the eigenvector mean if my data set is standardized? I summarize my questions/sources of my confusion in the two following questions:    First: I red that while conducting PCA on not standardized data (using covariance matrix) the length indicates the standard deviation of the variable. So what do different lengths of my eigenvectors mean while using correlation matrix? I found some answers online like:      The length of a variable vector in the ordination plot reflects its contribution to the ordination. That is, variables with vectors which appear longer than others in a given ordination were more important in building the PCs used in that ordination.   But I thought that the importance of variables w.r.t. ordinations is already reflected in the loadings (in the angles bw. the variables and PC-axis but not in their lengths). Could you please give me a starting point from which I can elaborate this matter further? Second: shouldn't all eigenvectors be of equal length (=1) anyways as it is imposed by construction?


I found many people like to use "literally" in their sentences . Is that a kind of emphasize? How can I use this word?

Recently I've heard American TV commentators say "[a person] was literally decimated" and "[a Senator] was literally thrown under the bus". In the first case I think the person was not actually 10% killed, but in the second, I believe they meant that 57 members of the US Senate carried #58 onto Constitution Avenue and threw him under a (hopefully moving) bus.  Are usages like these normal or acceptable now? I find them grating, myself.


I'd like to parse status.dat file for nagios and output as xml or json in c#. Does any know any plugin/library or method to parse it to xml or json??  Any help and pointing in the right direction will be highly appreciated.  The file looks like this:  ######################################## #          NAGIOS STATUS FILE # # THIS FILE IS AUTOMATICALLY GENERATED # BY NAGIOS.  DO NOT MODIFY THIS FILE! ########################################  info {     created=1233491098     version=2.11     }  program {     modified_host_attributes=0     modified_service_attributes=0     nagios_pid=15015     daemon_mode=1     program_start=1233490393     last_command_check=0     last_log_rotation=0     enable_notifications=1     active_service_checks_enabled=1     passive_service_checks_enabled=1     active_host_checks_enabled=1     passive_host_checks_enabled=1     enable_event_handlers=1     obsess_over_services=0     obsess_over_hosts=0     check_service_freshness=1     check_host_freshness=0     enable_flap_detection=0     enable_failure_prediction=1     process_performance_data=0     global_host_event_handler=     global_service_event_handler=     total_external_command_buffer_slots=4096     used_external_command_buffer_slots=0     high_external_command_buffer_slots=0     total_check_result_buffer_slots=4096     used_check_result_buffer_slots=0     high_check_result_buffer_slots=2     }  host {     host_name=localhost     modified_attributes=0     check_command=check-host-alive     event_handler=     has_been_checked=1     should_be_scheduled=0     check_execution_time=0.019     check_latency=0.000     check_type=0     current_state=0     last_hard_state=0     plugin_output=PING OK - Packet loss = 0%, RTA = 3.57 ms     performance_data=     last_check=1233490883     next_check=0     current_attempt=1     max_attempts=10     state_type=1     last_state_change=1233489475     last_hard_state_change=1233489475     last_time_up=1233490883     last_time_down=0     last_time_unreachable=0     last_notification=0     next_notification=0     no_more_notifications=0     current_notification_number=0     notifications_enabled=1     problem_has_been_acknowledged=0     acknowledgement_type=0     active_checks_enabled=1     passive_checks_enabled=1     event_handler_enabled=1     flap_detection_enabled=1     failure_prediction_enabled=1     process_performance_data=1     obsess_over_host=1     last_update=1233491098     is_flapping=0     percent_state_change=0.00     scheduled_downtime_depth=0     }  service {     host_name=gateway     service_description=PING     modified_attributes=0     check_command=check_ping!100.0,20%!500.0,60%     event_handler=     has_been_checked=1     should_be_scheduled=1     check_execution_time=4.017     check_latency=0.210     check_type=0     current_state=0     last_hard_state=0     current_attempt=1     max_attempts=4     state_type=1     last_state_change=1233489432     last_hard_state_change=1233489432     last_time_ok=1233491078     last_time_warning=0     last_time_unknown=0     last_time_critical=0     plugin_output=PING OK - Packet loss = 0%, RTA = 2.98 ms     performance_data=     last_check=1233491078     next_check=1233491378     current_notification_number=0     last_notification=0     next_notification=0     no_more_notifications=0     notifications_enabled=1     active_checks_enabled=1     passive_checks_enabled=1     event_handler_enabled=1     problem_has_been_acknowledged=0     acknowledgement_type=0     flap_detection_enabled=1     failure_prediction_enabled=1     process_performance_data=1     obsess_over_service=1     last_update=1233491098     is_flapping=0     percent_state_change=0.00     scheduled_downtime_depth=0     }

I'd like to parse status.dat file for nagios3 and output as xml with a python script. The xml part is the easy one but how do I go about parsing the file? Use multi line regex?  It's possible the file will be large as many hosts and services are monitored, will loading the whole file in memory be wise? I only need to extract services that have critical state and host they belong to.  Any help and pointing in the right direction will be highly appreciated.  LE Here's how the file looks:  ######################################## #          NAGIOS STATUS FILE # # THIS FILE IS AUTOMATICALLY GENERATED # BY NAGIOS.  DO NOT MODIFY THIS FILE! ########################################  info {     created=1233491098     version=2.11     }  program {     modified_host_attributes=0     modified_service_attributes=0     nagios_pid=15015     daemon_mode=1     program_start=1233490393     last_command_check=0     last_log_rotation=0     enable_notifications=1     active_service_checks_enabled=1     passive_service_checks_enabled=1     active_host_checks_enabled=1     passive_host_checks_enabled=1     enable_event_handlers=1     obsess_over_services=0     obsess_over_hosts=0     check_service_freshness=1     check_host_freshness=0     enable_flap_detection=0     enable_failure_prediction=1     process_performance_data=0     global_host_event_handler=     global_service_event_handler=     total_external_command_buffer_slots=4096     used_external_command_buffer_slots=0     high_external_command_buffer_slots=0     total_check_result_buffer_slots=4096     used_check_result_buffer_slots=0     high_check_result_buffer_slots=2     }  host {     host_name=localhost     modified_attributes=0     check_command=check-host-alive     event_handler=     has_been_checked=1     should_be_scheduled=0     check_execution_time=0.019     check_latency=0.000     check_type=0     current_state=0     last_hard_state=0     plugin_output=PING OK - Packet loss = 0%, RTA = 3.57 ms     performance_data=     last_check=1233490883     next_check=0     current_attempt=1     max_attempts=10     state_type=1     last_state_change=1233489475     last_hard_state_change=1233489475     last_time_up=1233490883     last_time_down=0     last_time_unreachable=0     last_notification=0     next_notification=0     no_more_notifications=0     current_notification_number=0     notifications_enabled=1     problem_has_been_acknowledged=0     acknowledgement_type=0     active_checks_enabled=1     passive_checks_enabled=1     event_handler_enabled=1     flap_detection_enabled=1     failure_prediction_enabled=1     process_performance_data=1     obsess_over_host=1     last_update=1233491098     is_flapping=0     percent_state_change=0.00     scheduled_downtime_depth=0     }  service {     host_name=gateway     service_description=PING     modified_attributes=0     check_command=check_ping!100.0,20%!500.0,60%     event_handler=     has_been_checked=1     should_be_scheduled=1     check_execution_time=4.017     check_latency=0.210     check_type=0     current_state=0     last_hard_state=0     current_attempt=1     max_attempts=4     state_type=1     last_state_change=1233489432     last_hard_state_change=1233489432     last_time_ok=1233491078     last_time_warning=0     last_time_unknown=0     last_time_critical=0     plugin_output=PING OK - Packet loss = 0%, RTA = 2.98 ms     performance_data=     last_check=1233491078     next_check=1233491378     current_notification_number=0     last_notification=0     next_notification=0     no_more_notifications=0     notifications_enabled=1     active_checks_enabled=1     passive_checks_enabled=1     event_handler_enabled=1     problem_has_been_acknowledged=0     acknowledgement_type=0     flap_detection_enabled=1     failure_prediction_enabled=1     process_performance_data=1     obsess_over_service=1     last_update=1233491098     is_flapping=0     percent_state_change=0.00     scheduled_downtime_depth=0     }   It can have any number of hosts and a host can have any number of services.


My understanding is that 10.0.2.1/32 means 10.0.2.1 vs 10.0.2.1/24 means 10.0.2.1 to 10.0.2.255. For example in /etc/network/interfaces, /24 is used when configuring static IPs. But in /etc/iptables/rules.v4, -d 10.0.2.0/24 means any IP in the 255.255.255.0 subnet... which equals 10.0.2.0 to 10.0.2.255 right? Sorry for the newbie question... I am confused!

This is a  about IPv4 Subnets.      Related:               How does Subnetting Work, and How do you do it by hand or in your head?  Can someone explain both conceptually and with several examples? Server Fault gets lots of subnetting homework questions, so we could use an answer to point them to on Server Fault itself.   If I have a network, how do I figure out how to split it up? If I am given a netmask, how do I know what the network Range is for it? Sometimes there is a slash followed by a number, what is that number? Sometimes there is a subnet mask, but also a wildcard mask, they seem like the same thing but they are different? Someone mentioned something about knowing binary for this?


I'm struggling with a few of my homework problems so I thought I might ask for some help on them. Here's the question:     I'm assuming it requires $\frac{n}{2}$ to determine a number to factorialize?  I'm stumped with the length n part and not sure what to do. Anything is appreciated. Thanks!

I was just thinking, Is there some mathematical rule that is a formula for all the palindromes? And if there is a rule what is it?


I am trying to dump the values inside of vectors using gdb and stl but the vectors are in an #included header.h file and don't appear in debugging.  How do you dump the value inside of a vector in a header file?  code:  #cat buymngr.h  void buymngr(){         //vector defs         vector<std::string> buydat;         vector<std::string> markdat;         vector<std::string> pricedat;         vector<std::string> qworkcoin;         buydat = getmyData();         markdat = getmarketbuyData();         cout << "Bork!" << endl;         if(buydat[2] == std::string("Buy")){                 cout << "Bork2!" << endl;                 for(int b = 2; b < buydat.size(); b+=7){                         int y = 3;  y+=7;                         if ( buydat[b] == "Buy" ) {                                 pricedat.push_back(buydat[b+1]);                 //I need to dump these 2 vectors                                 qworkcoin.push_back(buydat[y+1]);                         }         }     }   #cat main.cpp #include <cstdio> #include <iostream> #include <fstream> #include <stdio.h> #include <unistd.h> #include <cstring> #include <cstdlib> #include <vector> #include <algorithm> #include <sstream>  #include "getmyData.h" #include "getmarketsellData.h" #include "getmarketbuyData.h" #include "buymngr.h" #include "sellmngr.h"  using namespace std;  //Le Main int main(void) {         buymngr();         sellmngr(); }   debug:  gdb> r Starting program: /home/main warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? I got my own data I just got market buy data Bork! Bork2!  Program received signal SIGSEGV, Segmentation fault. _______________________________________________________________________________      eax:0000000A ebx:0060A1B0  ecx:0060A1B0  edx:0060A2E8     eflags:00010206      esi:0060A2E8 edi:0060A1B0  esp:FFFFBD90  ebp:FFFFBDF0     eip:Error while running hook_stop: Value can't be converted to integer. 0x00007ffff7b9355b in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/libstdc++.so.6 gdb> l Line number 30 out of range; masterMain.cpp has 29 lines. gdb> ll Undefined command: "ll".  Try "help". gdb> #include "buymngr.h" gdb> include "buymngr.h" Undefined command: "include".  Try "help". gdb> l Line number 30 out of range; masterMain.cpp has 29 lines. gdb> p

I want to examine the contents of a std::vector in GDB, how do I do it?  Let's say it's a std::vector<int> for the sake of simplicity.


I swear I read an ingame hint that said Workshops would share my stuff between them, but that doesn't seem to be the case. I have a settlement at Sanctuary and Red Rocket Truck Stop, but I can't access my items I added in Sanctuary at RRTS. Am I mistaken in remembering that you could do this, or is there something I need to do to get that to work?

I just got the Local Leader perk, it says I can establish supply lines between workshop settlements.  How do I do this?


Edit: I did a new question as this is hapening for years!  I will post a new question every year about this.  Hi there and greetings from Kefalonia/Greece.  I have a little issue: Every time i change the keyboard's language using alt+shift, my CAPS status resets and i have to press again the CAPSLOCK key to write in capital letters.   Any Ideas on how do i get it to stop reseting?

Pretty self explanatory question. Does anyone know why this is happening? I am using 16.04 with English and Greek languages. When I am changing the language on the keyboard, caps lock is turned off, so I have to press it again.  Just to clarify, this is happening for years now, as of 2014!!! It hapens with all the languages, and both ways from Gr to En and vise versa. I have used every combination for keyboard input that exists and can't find the solution.   It continued even after i reinstalled 14.04, and even when i changed computers.  The formats and the changing of computers where done retaining the /home folder, so it could be something in my configs....


I want, only using "basic" commands (for maximum portability) (i.e., something that would work on AIX / Linux / etc., not just something using a recent nicety ^^), to find all the files (symlinks, hardlinks and combinations thereof) pointing to a specific file/dir.  Be careful to not rush to answer find / -ls | grep .... : it will miss many cases. See my links below, mixing hardlinks, symlinks, relative-and-absolute paths (and also play with symlinks "././././." possibilities)  ie   hardlinks and symlinks can be "nested", ad-inifinitum... some symlinks could be with the full path, others with a relative path,  those paths (relative or absolute) could be very complex (ex: /tmp/././../etc/file ) a symlink could lead to a file, which hardlink to another, which is a symlink to a third, which ends up [after some more iteration] to the final destination...   In the end, I "just" need to find out a way to know what is the "final destination" of any file/link (ie, which inode will be accessed in the end?). But it's really tough (unless some magical function will tell me "the final destination inode is : ...". That's what I need!)  I thought I could simply use '-H' or '-L' options of find, but (I'm probably dumb...) it didn't work... yet.  Any info welcomed (but please, using find/ls/etc, not some "nice utility only available on linux")  Try to create some different links to the "/tmp/A" directory, and find a way to find and list them all:  mkdir /tmp/A    /tmp/B ln -s /tmp/A/   /tmp/B/D  #absolute symlink, with a training "/" ln -s ../A      /tmp/B/E     #relative symlink ln -s /tmp/A/.  /home/F  #absolute symlink, with a trailing "/." ln -s ../tmp/A/./.  /var/L  #let's get craaaaaaazy! symlinks are "fun"... ln    /tmp/B/D  /etc/G    #Hard-link to the symlink file /tmp/B/D, which itself symlink to /tmp/A/ witch ends up being the same as "/tmp/A" in most cases. ln    /etc/G    /etc/G2   #and a duplicate of the previous one, just to be sure [so /etc/G, /etc/G2, and /tmp/B/D have same inode, but it's a different inode from the final destination... :( ln -s etc/G /thatsenough   #symlink again, for further chaining   and then some tries:  find -H / -ls   # show inodes of the links and symlinks, not of the "final" directory find -L / -ls   # same thing (I do try that on an OLD AIX ...) find -H / -inum 123456 -ls  #if /tmp/A/. has inode 123456. This lists *only* hardlinks to /tmp/A, ie will only print a subset (and /tmp/A have to be a file in that case)   I expected to see the final inode (123456) in front of all the paths, in one of those invocation (I also added '-follow' to both), but I always see the inodes of the links, not of the "final destination" (i.e., /tmp/A)  What could I use to find out the "final inode" I end up accessing? [the OS manages it, but can a "simple" command tell me beforehand "through that file, you will open that final inode!"?]

How can one get the list of all the aliases of a file (including of type directory) efficiently, given that a file:   may have multiple hard links, multipe soft links, multi-level soft links  may be present under a directory which is mounted at another location in the same filesystem may be present under a directory that has link(s) pointing to it; again the links having features mentioned in 1   Could a possible solution be using inodes?


I am working on my first ever website and it seems that I've run into a problem. I've created a footer, however it does not stay at the bottom.The footer messes up everything else in the page and distorts my items. What should I add in order make my footer stick to the bottom with causing any trouble to the rest of my page?. Here is my code.   * { margin: auto; padding: auto; box-sizing: border-box; font-family: Century Gothic; }  header { height: 15%; background-size: cover; background-position: center; background-color: #ebebeb; border-bottom: 5px solid #A9A9A9; position: relative; }  html, body { font-size: .80em; margin: 0%; padding: 0%; color: #696969; height: 100%; width: 100%; }  .footer { background: #bfbfbf; color: #d3d3d3; height: 300px; position: relative; }  s .footer .footer-content { border: 1px solid red; height: 400px; }  .footer .footer-bottom { background: #343a40; color: #686868; height: 50px; width: 100%; text-align: center; position: absolute; bottom: 0px; left: 0px; padding-top: 20px; }  .footer-section-socials h1 { margin-left: 6%; margin-top: -1%; font-weight: 50; font-size: 150%; color: black; }  .logo-footer h1 { padding: 1.5%; margin-left: 3%; font-family: Leckerli One; color: black; font-size: 3.1875rem; }  .footer-about { margin-left: 2%; margin-right: 0%; }

             &copy; #.com | Designed by #

     Help in advance!

I have a simple 2-column layout with a footer that clears both the right and left div in my markup.  My problem is that I can't get the footer to stay at the bottom of the page in all browsers.  It works if the content pushes the footer down, but that's not always the case.


I'm writing a website which allows users to enter some text in predefined text fields. This text gets passed on the server where a LaTeX document is created (containing the text entered by the user). The server finally returns a compiled LaTeX document (a pdf) to the user. Note: the user doesn't enter the whole tex document, only parts.  My problem: how can I make sure that the entered text will not harm my server? I.e. how to detect harmful LaTeX code?  Some examples:   The user entered an infinite loop written in LaTeX, the server can't compile the document. The user entered a shell script which will be executed from the tex file when compiling, potentially crashing my server.   Is my best alternative to blacklist any LaTeX code? Is detecting \ followed by a non-space enough to block any potentially harmful LaTeX code?

I am a programmer and as part of a website I need to be able to take LaTeX source files and compile them, then return the pdf to the user. This seems dangerous since a malicious user could e.g. read and write files on server this way. Is it possible to 'clean' a LaTeX file so it's safe to compile or is it too complicated?


I nearly finished the begginer blender tutorial - just to find that when I render my scene it is completely black. Any ideas on how to fix it? I've seen others with the same kind of problem, but no solutions that helped. The link to my project =

A scene I made is not rendering, at all. This grey screen stays the same and nothing changes.  Here are my settings:  [


Is there a way that I can set the focus in between text that I am generating dynamically on focus of input field? Scenario: There is a input field and I am generating some text on focus of it. ex: ("") I want the focus to set in between double quotes. Currently focus is setting at the right side of the text Is there a way to achieve this in javascript? TIA

Does anybody know how to move the keyboard caret in a textbox to a particular position?  For example, if a text-box (e.g. input element, not text-area) has 50 characters in it and I want to position the caret before character 20, how would I go about it?  This is in differentiation from this question:  , which requires jQuery.


this is my first question.I am using below code for remove fragment:      private boolean returnBackStackImmediate(FragmentManager fm) {          List<Fragment> fragments = fm.getFragments();         if (fragments != null && fragments.size() > 0) {             for (Fragment fragment : fragments) {                 if (fragment.getFragmentManager().getBackStackEntryCount() > 0) {                     if (fragment.getFragmentManager().popBackStackImmediate()) {                         return true;                     } else {                         return returnBackStackImmediate(fragment.getChildFragmentManager());                     }                 }             }         }       return false; }   Now,I want after remove fragment, if user click on Back button again, my activity be close.for that I have added these codes into my Activity:      @Override public void onBackPressed() {      if (getSupportFragmentManager().getFragments() == null) {         finish();     } else {          if (!returnBackStackImmediate(getSupportFragmentManager())) {             super.onBackPressed();         }     }  }   but when I press back button and remove fragment and press again I got this error:   java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.v4.app.FragmentManager android.support.v4.app.Fragment.getFragmentManager()' on a null object reference                                                                              at com.safarayaneh.notify.activities.MainActivity.returnBackStackImmediate(MainActivity.java:501)                                                                              at com.safarayaneh.notify.activities.MainActivity.onBackPressed(MainActivity.java:488)                                                                              at android.app.Activity.onKeyUp(Activity.java:2477)                                                                              at android.view.KeyEvent.dispatch(KeyEvent.java:2664)                                                                              at android.app.Activity.dispatchKeyEvent(Activity.java:2730)   I know fragment is null but which condition can I use for this situation?

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?


How do I pull up the Edit Dialog after it closes?  I have enabled Math Functions and it works fine; however, after I initially enter my settings in the dialog ("Add Z Function Surface"), the dialog disappears.  How can I pull up the dialog to change my settings? I am using Blender 2.90.1, Windows 10. Thank you in advance!

When you first add a cylinder, you have the option to change the number of vertices, etc, but once you do anything else in blender, it seems you no longer can edit those parameters.   Is there a setting anywhere or an add-on that allows these parameters to be edited later on? If not, how easy would such an addon/feature be to create for anyone reading this?


I'm a student and our physics teacher asked us a question that no one answered, what's the difference between EMF and electric potential? there will be many answers?

This is a confused part ever since I started learning electricity. What is the difference between electric potential, potential difference (PD), voltage and electromotive force (EMF)? All of them have the same SI unit of Volt, right? I would appreciate an answer.


Early in June I'll be travelling to the US..  I've heard various bits of news about the rules for taking laptops to the US. That they won't be allowed in hand baggage, or they won't be allowed at all, or no change has taken effect yet, or that they only apply from certain starting points.   What are the rules for taking a laptop on a flight from the UK to the US?  Where can I find up-to-date information on this?

I am going to the US in the coming week. However, I heard that laptop and camera are not permitted to bring on board as carry-on. What are the latest rules about these larger electronics?


Right now I am working through archived papers of a math aptitude quiz. For some reason I seem to be haveing a hard time with these series problems. I have managed to write the above series in a compact form but thats as far as I got.   $$\frac{1}{5}-\frac{1 \cdot 4}{5 \cdot 10}+\frac{1 \cdot 4 \cdot 7}{5 \cdot 10 \cdot 15}-\ldots = \sum\limits_{i=0}^\infty (-1)^i\frac{\prod\limits_{j=0}^i (3j+1)}{5^{i+1}(i+1)!}$$  Help please!

How to find the sum of the following series:  $\frac {1}{5}-\frac{1.4}{5.10}+\frac{1.4.7}{5.10.15}-\cdot\cdot\cdot\cdot\cdot\cdot\cdot$  Any hints.


What event can i use to run code when a user visits another page then hits back to load my page again?  I wrote window.onload = function() { ... and it works when i hit refresh but not forward then back.

For all major browsers (except IE), the JavaScript onload event doesn’t fire when the page loads as a result of a back button operation — it only fires when the page is first loaded.  Can someone point me at some sample cross-browser code (Firefox, Opera, Safari, IE, …) that solves this problem? I’m familiar with Firefox’s pageshow event but unfortunately neither Opera nor Safari implement this.


I'm an electronics engineer. I was thinking about how to detect the presence of COVID-19:   Obtain the sample. Increment image/sample, (I need the real size to determine increment/magnification) Digital image processing — detect presence using artificial intelligence or Recognition.   What is the approximate size of COVID-19? Is there a real image of COVID-19?

You can easily find a lot of  of the SARS-CoV-2 virus. But although it should be trivial for an electron microscope to measure the size, I am not able to find accurate size information.  What is the size (diameter) of the SARS-CoV-2 virus? (Why does some virus particles seem to have a different size?)


Definitions   $H_n = 1+\frac{1}{2}+\frac{1}{3}+\cdots+\frac{1}{n}$ for all $n \in \mathbb{N}$    The Question   Prove $1 + \frac{n}{2} \leq H_{2^n}$ for all $n \in \mathbb{N}$   My Work    Base Case:  $1+\frac{1}{2} \leq 1+\frac{1}{2} = H_1$   Inductive Hypothesis: $1 + \frac{k}{2} \leq H_{2^k}$ for all $k \in \mathbb{N}$   Induction Step: $1+\frac{k+1}{2} = 1+\frac{k}{2} + \frac{1}{2} \leq H_{2^k}+\frac{1}{2} \leq H_{2^k} + \frac{1}{2^k+1} + \frac{1}{2^k+2} + \cdots + \frac{1}{2^{k+1}} = H_{2^{k+1}} $    My Problem   My problem is actually understanding the $H_{2^k}+\frac{1}{2} \leq H_{2^k} + \frac{1}{2^k+1} + \frac{1}{2^k+2} + \cdots + \frac{1}{2^{k+1}}$ step. I think that's how the proof should finish, but I don't know why.   My Question   Can someone explain why the inequality under the "My Problem" header is true? Or if it even is true, am I going about this proof the wrong way?

Prove by induction the summation of $\frac1{2^n}$ is greater than or equal to $1+\frac{n}2$.  We start with $$1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\dots+\frac1{2^n}\ge 1+\frac{n}2$$ for all positive integers.   I have resolved that the following attempt to prove this inequality is false, but I will leave it here to show you my progress. In my proof, I need to define P(n), work out the base case for n=1, and then follow through with the induction step. Strong mathematical induction may be used.  This is equivalent to $$\sum_{k=0}^n\frac1{2^k}\ge 1+\frac{n}2\;.$$  Let $P(n)$ be summation shown above.   Base case for $n=1$, the first positive integer,   $$\sum_{k=0}^1\frac1{2^k}=\frac1{2^0}+\frac1{2^1}=1+\frac12=\frac32\ge 1+\frac12=\frac32\;,$$  so base case is true.  Induction step: Assume $P(n)$ is true and implies $P(n+1)$. Thus   $$\sum_{k=0}^{n+1}\frac1{2^k}\ge\frac1{2^{n+1}}+\sum_{k=0}^n\frac1{2^k}\ge 1+\frac{n+1}2\;.$$  This can be written as   $$\sum_{k=0}^{n+1}\frac1{2^k}\ge \frac1{2^{n+1}}+1+\frac{n}2\ge 1+\frac{n+1}2\;.$$  I work the math out but I get stuck contradicting my statement. Please show your steps hereafter so I can correct my mistakes.


I'm trying to start an exe from the command line  shell> wampmanager   When I do that, a User Account Control popup pops up and prompts me for permission. I press "yes" to run and it runs. But is it possible to grant permission via the command line? This is because I am writing a batch file that runs this program on its own, and I won't be around to press the "yes" button when it does. Thank you.

Possible Duplicate:          Is there a way to grant permanent UAC permission in Windows 7 to a single program?  I have an old program that's supposed to start up in the background when Windows starts.  I want to have it "just work" without the nagging, but keep UAC in all other cases.


Getting this exception while running following program    Exception in thread "main" java.lang.NullPointerException     at pojo.Bill.main(Bill.java:20) Java Result: 1   Bill.java  public class Bill {     public static void main(String s[]){         Bill b=new Bill();         b.getBillDetails().setBillNo(444);// line 20         System.out.println("bill no "+ b.getBillDetails().getBillNo());     }      private BillAction billDetails;      public BillAction getBillDetails() {         return billDetails;     }      public void setBillDetails(BillAction billDetails) {         this.billDetails = billDetails;     }   In BillAction there is  getter and setter of billNo How to resolve this.

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


I am trying to upload a file to my server using JQuery, AJAX and a PHP script to handle the server-side uploading. I've tested my PHP script, which is now fully functional. However, I'm facing some difficulties with my JQuery. After some testing I found that most likely the FormData is empty or isn't being send to the server.  My code looks like this:  HTML:  <form id="upload" enctype='multipart/form-data'>     <input type="file" name="file" id="file" />          Upload      </form>   JQuery:  $(document).ready(function(){     $("#upload-button").click(function(e) {         document.getElementById("file").click();         e.preventDefault();     });      $("#file").change(function(e) {         e.preventDefault();         $('.upload-text').html("Uploading...");         $('#upload').submit();     });      $('#upload').submit(function(e) {         e.preventDefault();         //var fileData = $('#file').prop('files')[0];            //var formData = new FormData();                           //formData.append('file', fileData);          var formData = $('#upload').serialize();          $.ajax({             url: 'ajaxupload.php',             type: 'post',             data: formData,             contentType:false,             processData:false,             enctype: 'multipart/form-data',             async: false,             success: function(data){                 $('.upload-text').html(data);             }         });     }); });   I have tried using the following, but that also isn't working:  var formData = new FormData(); formData.append('file', $('#file')[0].files[0]);   As well as that, I've also tried using var formdata = new FormData(this); and placing new FormData(this); directly in the AJAX request. Lastly, I've also tried using params: instead of data:, sadly to no avail. My PHP script should return a link to where the file can be downloaded, which should then be displayed in the element with class upload-text.  I am using JQuery 3.3.1 (newest).

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


I need to predict the impact of a set of node failures in a network, based on 2 features: the fraction of failed nodes and a measure of their network centrality.  Failure of less important nodes will have low to no repercussions, while failure of important nodes can bring down the whole network.  The predicted output should be a number in the range [0, 1], where 0 is "no damage", and "1" is "failure of all nodes". 0 is inclusive since I use it to cover the case "no damage" when the fraction of failed nodes is 0.  Here's an example mapping 2 features (x and y axes) to the actual simulation result (z axis). I plotted the scatter and the projection of the points. It looks like something that can be learned, right?    I'm using multivariate linear regression in scikit-learn to train a predictor. I take my training set, pick the 2 features I want, use them to make a 4th degree polynomial, which I then standardize and use to train my model.  The problem is, for some combinations of my 2 feature values, the predictor outputs negative values or values greater than 1. I can post a picture if needed.  I've tried changing the degree of the polynomial, using regularization (lasso, ridge and ElasticNet) and applying normalization. Nothing completely fixes the problem, especially for predictions >1.  Is linear regression the wrong tool for predicting values in a range? Any suggestion for a drop-in replacement? I'm tempted to try logistic regression, but it does not sound like the right tool, since it's for classification, and it outputs probabilities, while my values have a different meaning (not a "chance" but a degree of damage).

I am thinking of building a model predicting a ratio $a/b$, where $a \le b$ and $a > 0$ and $b > 0$. So, the ratio would be between $0$ and $1$.  I could use linear regression, although it doesn't naturally limit to 0..1.  I have no reason to believe the relationship is linear, but of course it is often used anyway, as a simple first model.  I could use a logistic regression, although it is normally used to predict the probability of a two-state outcome, not to predict a continuous value from the range 0..1.  Knowing nothing more, would you use linear regression, logistic regression, or hidden option c?


The sequence $e_n$ has limit $0$ and all terms are in $(0,1)$. Also, we have that $e_{n+1}=e_n e_{n-1}$ I need to show that we can pick $C$ s.t.  $$e_{n+1}\le C \cdot  e_n^\phi$$  where $\phi$ is the golden ratio. Any ideas? As all terms are in $(0,1)$ so we know that $e_{n+1}<\min(e_n,e_{n-1})$ but I'm not sure where to go.

Question:  Consider $E_n\in(0,1)$ and $E_n\to0,\text{as }n\to\infty$      Assuming that $E_{n+1} = E_n E_{n-1}$, show that, for a real $C$ independent of $n$, $$E_{n+1} \leq C{E_n}^\phi$$ where $\phi=\frac{1+\sqrt{5}}{2}$, the Golden Ratio   My attempt so far:  We can take logarithms of both side to see that   \begin{align*}\log(E_{n+1}) &= \log(E_n E_{n-1})\\ &=\log(E_n)+\log(E_{n-1})\end{align*}  We can see that this fulfils the conditions of the Fibonacci Sequence, $F_{n+1} = F_{n}+F_{n-1}$  Therefore, we can assume that $$\frac{\log(E_{n+1})}{\log(E_n)}\to \phi,\quad\text{as }n\to\infty$$  We can then say that \begin{align*}\lim_{n\to\infty}\left|\frac{\log(E_{n+1})}{\log(E_n)}-\phi\right|&=0\\ \lim_{n\to\infty}\left|\log(E_{n+1})-\phi\log(E_n)\right|&=0\\ \lim_{n\to\infty}\left|\log(E_{n+1}) -\log({E_n}^\phi)\right|&=0\\ \lim_{n\to\infty}\left|E_{n+1} - {E_n}^\phi\right|&=1\end{align*}  I'm not entirely sure that the last line of this is correct - I have attempted to get rid of the logarithms as I would have done in an equation with no limits or absolute values in. Could someone let me know if I have done anything wrong please. I am also struggling to continue from this point so any guidance would be much appreciated too.


For instance, in The "Half-Blood Prince", Draco spends almost his entire school year trying to fix the Vanishing Cabinet so he will be able to bring back-up Death Eaters into Hogwarts. But couldn't he have used a house-elf to bring them all to Hogwarts by Side-Along Apparition and skip all that fuss and stress and panic attacks? He could have literally had them there whenever he wanted so long as he had a house-elf that would obey him, right? Or any person that had a house-elf that knew where Hogwarts was could get there, right?

I know that , but  made me question whether they could Side-Along Apparate a human to/from Hogwarts. From what canon tells us, it is impossible for humans to Apparate within the grounds of Hogwarts, which seems to indicate that this should be a simple question, but the events that took place in the Malfoy's cellar in The Deathly Hallows made me curious.  Ron was now trying to Disapparate without a wand. “There’s no way out, Ron,” said Luna, watching his fruitless efforts. “The cellar is completely escape-proof. I tried, at first. Mr. Ollivander has been here for a long time, he’s tried everything.”  According to  from Slytherincess, somewhat of our resident expert on Harry Potter, a wand does not seem to be required to Apparate. The fact that Ron was unable to Disapparate, as well as Luna's assurance to him that "the cellar is completely escape-proof" seems to indicate that some sort of enchantment was put over the cellar to prevent people from  Disapparating out of there. Further evidence for the enchantment happens when Dobby arrives, and Harry asks;  “You can Disapparate out of this cellar?” he asked Dobby, who nodded, his ears flapping. “And you can take humans with you?”  The fact that an enchantment seems to be present, and that despite this Dobby is still able to Side-Along Apparate them out, to me indicates at least some evidence that it should be possible within the grounds of Hogwarts (assuming that the same enchantment was used). So my question is, is there canonical evidence (other than listed above) that either backs up this theory, or that refutes it?


I am trying to optimize and write the best code possible (as any developer is) and I have been racking my head trying to figure out if this particular method I am writing is bad code. For some reason in my head I find that having multiple return statements are bad as opposed to having just one. Yet I have nothing in solid writing stating this is bad. Please tell me if this is bad code or not  public boolean fooBar(int foo, int bar){    if(foo == 3) {      return true;    }     if(bar == 3) {      return true;    }     System.out.println("foo or bar is not equal to three");    return false; }   I am not looking for simplification, I am just looking for general ideas on if this is bad code or not and if there are performance issues that could arise from doing this.

Are there good reasons why it's a better practice to have only one return statement in a function?   Or is it okay to return from a function as soon as it is logically correct to do so, meaning there may be many return statements in the function?


I am attempting to test a "phone number input", so I am testing against the presence of at least one non-digit or two or more spaces, hyphens or periods. The issue is, it returns a hit on any single space, hyphen or period. I'm obviously getting it wrong. Here's the code pl0x help:  var re = /[^0-9]{1,}|[-.\s]{2,}/   Using javascript.

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


I need to divide a with b and round that number to a n number of decimals. example : a = 2 b = 52 n = 5 , Solution = 0.03846. I can only use intigers!!  I've been working with decimalformat but I don't know how to make the format custom.  DecimalFormat nstevilo = new DecimalFormat("#.###");//I need to change ### to a n-number.     if(x<y) {     double a = x/y;     System.out.print(nstevilo.format(a));     }   This only outputs #.### because of the format i need to make it #.######- n times of decimal.

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


I have a header only class with two functions    //F1   void add_argument(const std::string &name, const std::string &desc,                     const bool required = false) {     //...   }   and    //F2   void add_argument(const std::string &name, const std::string &long_name,                     const std::string &desc, const bool required = false) {     //...   }   and in my code I call  //L1: should call F2 add_argument("-w", "--write",              "Writes the calibrated values to the config.",              false);  //L2: should also call F2 add_argument(   "-i", "--interval",   "The time interval in milliseconds that it should check in.");   The intended behavior is that both L1 and L2 call the same method F2. However, when I compile and run, L1 does correctly call F2, but L2 calls F1.  What I'm wondering is why it appears that in L2 it is converting the last string to a boolean and not using the default argument? Is this a part of the C++11 standard, is it a compiler/linker bug, or am I making a dumb mistake?  This is being compiled and run on a RaspberryPi    Linux raspberrypi 4.14.71-v7+ Raspbian GNU/Linux 9 (stretch)   g++ (Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0 20170516   GNU ld (GNU Binutils for Raspbian) 2.28   using a command similar to this (I'm actually using cmake with make to the commands are hard to copy exactly)    g++ -std=c++11 -Wall -I. main.cpp -o test   (I get no compiler warnings)

Having recently introduced an overload of a method the application started to fail. Finally tracking it down, the new method is being called where I did not expect it to be.  We had  setValue( const std::wstring& name, const std::wstring& value );  std::wstring avalue( func() ); setValue( L"string", avalue ); std::wstring bvalue( func2() ? L"true", L"false" ); setValue( L"bool", bvalue ); setValue( L"empty", L"" );   It was changed so that when a bool value is stored we use the same strings (internal data storage of strings)  setValue( const std::wstring& name, const std::wstring& value ); setValue( const std::wstring& name, const bool& value );  std::wstring avalue( func() ); setValue( L"string", avalue ); setValue( L"bool", func2() ); setValue( L"empty", L"" ); << --- this FAILS!?!   The problem with L"" is that it is implicitly casting and previously it was happy to be a std::wstring, but not it prefers to be a bool. The MSVC compiler does not complain, or raise warning, so I'm worried that even if I "fix" the setValue( L"empty", L"" ); to be  setValue( L"empty", std::wstring() );   somebody else may come later and simply use setValue( L"empty", L"" ); and have to track down this issue again.  We thought to use explicit on the method but it is not a valid keyword for this usage. Is there some way to get the compiler to complain about this, or otherwise prevent the issue?  Otherwise I'm thinking to change the name of the method which takes a bool to ensure it can't make an incorrect guess.


I cannot find Area 51 in the site list in the Android app. Will this be implemented in the future?

Will  be supported on the Android App in the future? I visit A51 rather frequently and I would like to see it in the App.


This is a situation based question and I don't know whether is it directly connected to physics or not. Sorry, if not, I thought that it would be best to ask it here, of it has some interesting application.  Anyways, I recently started to learn Newtonian mechanics as a high school student and recently learnt about laws of motion.  Now consider this situation which I have encountered many times. The situation is that I'm inside car and car is moving, window are open and suddenly a fly enters the car and it is pretty comfortable inside (making us disturbed). Now I wonder how the bee is managing inside the car. What I mean here is that we are having a velocity because we are in contact with car(as we are seated on the seat and not flying) whereas the bee is apparently, not in contact with car and hence should not possess the velocity of car ( I deliberately said that windows are open, because may be closing of windows affect the motion of bee, which I neither know nor experienced), but the bee is flying here and there annd this according to road frame must have a velocity greater than car, which is of course not the case ( I searched speed of a bee on browser and found it to be around 10-15 miles per hour, which is way less than speed of car, I am in.  So what's the reason for this result. May be it's biological, which I don't think and I considered this situation from physics's viewpoint, with conditions idealized. So according to me the bee should be thrown back to the end of car, because there is no considerable friction and as per the law of inertia. Other thing which I considered was pressure, which I came to conclusion can surely not change as windows are open. I'm not able to go beyond.  May be the question seems stupid, but the real aim of physics is understanding real situations and not completely idealized ones. So, I would appreciate any help on how to analyse this situation and to know what is going on from a physicist point of view.  EDIT In the other question, the conditions are different from mine. There windows are closed and here open, which may make a difference, I suppose. Also I didn't found a satisfactory answer there, so I posted it on the basis of my common experience.  Thanks a lot.

A couple of weeks ago I was travelling in a car (120 km/h approximately) and I saw a  flying in front of me (inside the car, near my nose, windows closed). I wonder how was that possible.   Does it mean is really flying at 120 km/h or the fly is being affected by some kind of gravity/force?


Let $n$ be a positive integer, $P(x)$ a polynomial with integer coefficients and degree $n$. Show that the maximum  of the absolute value of $P(x)$ with $x \in [0,1]$  is bigger than $\dfrac{1}{e^n}$.  Amazing ! I have no idea to begin with. May I consider a sum with $\displaystyle P\left(\frac{k}n\right)$   or using $\displaystyle \left(1-\frac{1}n\right)^n$ ?

This is problem 10 from the International Mathematical Competition for University Students of 2015, from day 2, in Bulgaria. I think it is an interesting problem!     Let $n$ be a positive integer, and $p(x)$ be a polynomial of degree $n$ with integer coefficients. Prove that   $$ \max_{x\in [0,1]}\left|p(x) \right| > \frac{1}{e^{n}}. $$   Proposed by Géza Kós, Eötvös University, Budapest.


Variable flagForTest is false and variable count is 10 but they should be: true and 100. Debugs in batch show correct values, debugs in test class or invoked in Anonymous Apex show incorrect values. How can I take values from batch to Apex class? This is my test class: @isTest(seeAllData = true) private class PatchPanelTriggerClassTest {     @isTest private static void deleteDuplicatesTest() {      PatchPanelTriggerClassTestBatch p = new PatchPanelTriggerClassTestBatch();      Test.startTest();     Database.executeBatch(p, 200);     System.debug('p.flagForTest = ' + p.flagForTest);  // false - incorrect, should be true     Test.stopTest();      System.debug('p.flagForTest = ' + p.flagForTest); // false - incorrect, should be true     System.debug('PatchPanelTriggerClassTestBatch.count= ' + p.count); // 10 - incorrect, should be 100   } }  And this is code for my batch: global with sharing class PatchPanelTriggerClassTestBatch implements Database.batchable<SObject> {  public Boolean flagForTest = false; public  Integer count = 10;   global void execute(Database.BatchableContext param1, List<Patch_Panel__c> param2) {     flagForTest = true; // why it show false in test class and Anonymous Apex?     count = 100; // why it show 10 in test class and Anonymous Apex?      for (Patch_Panel__c p : param2) {         System.debug(p.Name); // debugs are correct     }      System.debug('flagForTest in batch ' +  flagForTest); // here is true - correct     System.debug('PatchPanelTriggerClassTestBatch.count in batch  = ' + count); // 100 - correct     System.debug('Batch execute ends'); }  global void finish(Database.BatchableContext param1) {     System.debug('nothing here'); }  global Database.QueryLocator start(Database.BatchableContext param1) {     flagForTest = true;     String s = 'select Name, Total_No_of_Ports__c from Patch_Panel__c limit 160'; //       return Database.getQueryLocator(s); }  }

Are stateful member variable of Batch Apex class maintain state after finish method when accessed in a test method. e.g.   global  class SampleBatch implements      Database.Batchable<SObject>,Database.Stateful {      global integer count;     global SampleBatch (){count =0;}      //START     global Database.QueryLocator start(Database.BatchableContext BC) {                  return Database.getQueryLocator(queryString);                      }          //EXECUTE      global void execute (Database.BatchableContext BC,List<sObject> scope){      count++;     }     //FINISH     global void finish(Database.BatchableContext BC){     }   }   When I try to access count variable in Apex Test Class it gives me value as 0, is it expected behavior?


Suppose a child is accused of misbehaviour and the parent wants to know what the child has done. Would it be okay to ask the child: "what have you done?" or should they say "what did you do?". Is there a difference in nuance? Does "what have you done?" sound more accusatory?

I have been learning English for 7 years now, and I have read so many grammar books with rules, telling the difference between Present Perfect and Past Simple and I still find it hard to distinguish them.   On paper, it is easy, if it is not a certain (exact) time in the past without any time markers (yesterday, a month ago, etc) it is past simple. Yes, but outside the classroom it is really harder than this . I have heard many people speaking how they want to, mixing the tenses.   So, I will give these sentences which i have heard to be constructed differently, please, if someone can explain the difference to me.     Have you enjoyed the party? / Did you enjoy the party?      I have given the documents today. / I gave the documents today.      I have done this when I have revised it. / I did it when I revised it      What did you do today? / What have you done today ?   Is it possible to use past simple without mentioning a definite time in the past  (without the time markers)?     It has been 3 years since we moved house. / It has been 3 years since we have moved house.      I know him since we met each other/ I know him since we have met each other   Correct me if some of the sentences are grammatically wrong!


I am new to wordpress, I have installed the parallax content slider in my demo site. Now the site consists for 5 static pages and I want the slider to appear only on the first page.  If I add the function in the header.php its shown in all the pages.  if ( function_exists( 'get_wp_parallax_content_slider' ) ) { get_wp_parallax_content_slider(); }  If I add the short code [parallaxcontentslider] above the page it doesn't look good as the format of my home page is 1. header with navigation 2. the slider. 3. accordian. 4. testimonials. 5. the static page.

I have following links in content.php and i want to display in specific page with condition. Any ideas or suggestions? Thanks.               Home             Director’s speech             Projects             Our Vision             Volunteers             Inquiry


I spend a lot of time peer-reviewing paper submissions to conferences, workshops, and journals in my field.  Sometimes I end up getting assigned a paper that I had already rejected from another venue.  Usually the authors of the resubmission have at least attempted to address the flaws pointed out in the past reviews. But sometimes the paper is submitted in much the same form. That is, the authors have failed to correct the major errors and gaps identified and agreed upon by the reviewers. They may not even have bothered to fix simple mistakes such as typos (even when the reviewers helpfully itemized these).  It seems that these authors have no understanding of or respect for the peer review process.  Rather, they are adopting a rapid-fire approach of submitting the same paper to different venues in sequence (or in parallel, for all I know) until they luck out on a suitably unqualified or neglectful reviewing panel that happens to clear it for publication.  What I normally do when I receive such a resubmission is to copy, paste, and resubmit my previous review.  After all, if the authors haven't bothered revising their paper, why should I spend any extra time re-evaluating it?  But I wonder if that's all I should be doing.  Does it make any sense to alert the journal editors/area chairs about these time-wasting shenanigans?  Do serial "publication shoppers" ever get blacklisted, or at least a stern talking-to?  Or is dealing with the same submissions over and over again just an inevitable and unmitigatable part of the whole peer review process?

I have received a manuscript to review for a journal. The interesting thing is, I had already reviewed this article (exact same title, abstract and author list, almost exact same content) for another journal a few weeks ago where I recommended that it be published, but only after major revisions of both form and content. When I first reviewed it, I wrote a two-page review, listing some questions and several “actionable” comments, ranging from some concerns about exactness of the text (some conclusions didn't seem fully backed by the results) all the way down to trivial stuff (grammar, a few typos, graphic issues with the figures, etc.).  Now, the manuscript has come to me for review again, but it is almost unchanged from the first version. None of the serious stuff has been addressed, and even most of the trivial stuff was not fixed (there's at least one remaining typo, and the figures still aren't fully legible). However, I think this behavior from the authors is clearly a bad signal, which should be somehow conveyed to the editor: they're not willing to amend their work, and would rather do some journal-shopping.  What would you suggest me to do? Should I just re-send my earlier review? Add a note to the editor about my knowledge of the “history” of the paper? Or maybe even include it in my review, so the authors are aware that people know of their behavior, and maybe feel bad enough to change their ways?    PS: I wrote it in the present tense, but it's actually a story from my past. I'm not sure I did the right thing at the time, and I think it's better to actually formulate it as an open question…


My original email id got compromised and now I want my new email id to be the main id for all SE sites . How to delete original id from the system as someone else might login from it ?

I no longer use the service that I originally used to register, and would like to change the service I use to log in, or at least add a second account.  Is this possible? How do I change my login provider or associate a backup method to log in?     For more information, see "" in the .


I have some podcasts on my radio server which contain a timestamp when they should be played. I noticed one of them is put into single quotes 'filename.mp3', and I'm unable to remove them. Check this:  4,0K drwxr-xr-x 2 user group 4,0K  4. Apr 20:40 . 4,0K drwxrwsr-x 6 user group 4,0K  4. Apr 20:28 ..  83M -rw-r--r-- 1 user group  83M  4. Apr 20:32 2016-03-09-22-00-moshtrocity.mp3 173M -rw-r--r-- 1 user group 173M  4. Apr 20:40 2016-03-25-10-00-funkfabrik-classic-25.mp3  53M -rw-r--r-- 1 user group  53M  4. Apr 20:41 '2016-04-01-21-00-Wasted Fridays.mp3'   Now, I tried to escape the \' like that, but I get:   $ mv \'2016-04-01-21-00-Wasted\ Fridays.mp3\' 2016-04-01-21-00-Wasted\ Fridays.mp3  mv: cannot stat ''\''2016-04-01-21-00-Wasted Fridays.mp3'\''': No such file or directory   Now, it looks like it ignores the quotes. I tried without, look at this:   $ mv 2016-04-01-21-00-Wasted\ Fridays.mp3 2016-04-01-21-00-Wasted\ Fridays.mp3 mv: '2016-04-01-21-00-Wasted Fridays.mp3' and '2016-04-01-21-00-Wasted Fridays.mp3' are the same file   Uh, how to deal with that? How to remove a single quote from a file name?  I'm on ArchLinux if this matters. Filesystem is ext4.

I just noticed that on one of my machines (running Debian Sid) whenever I type ls any file name with spaces has single quotes surrounding it. I immediately checked my aliases, only to find them intact. wyatt@debian630:~/testdir$ ls 'test 1.txt'  test1.txt wyatt@debian630:~/testdir$ alias alias ls='ls --color=auto' alias wget='wget --content-disposition' wyatt@debian630:~/testdir$   Another test, with files containing single quotes in their names (also answering a request by jimmij): wyatt@debian630:~/testdir$ ls 'test 1.txt'  test1.txt  'thishasasinglequotehere'\''.txt' wyatt@debian630:~/testdir$ touch "'test 1.txt'" wyatt@debian630:~/testdir$ ls ''\''test 1.txt'\'''  test1.txt 'test 1.txt'          'thishasasinglequotehere'\''.txt'   update with new coreutils-8.26 output (which is admittedly much less confusing, but still irritating to have by default). Thanks to Pádraig Brady for this printout: $ ls "'test 1.txt'"   test1.txt 'test 1.txt'    "thishasasinglequotehere'.txt"  $ ls -N 'test 1.txt'  test1.txt test 1.txt    thishasasinglequotehere'.txt  Why is this happening? How do I stop it properly? To be clear, I myself set ls to automatically color output. It just never put quotes around things before. I'm running bash and coreutils 8.25. Any way to fix this without a recompile? EDIT: Appears the coreutils developers  to break with the convention and make this the global default.  UPDATE - October 2017 - Debian Sid has re-enabled the shell escape quoting by default.  And at the bottom of the reply chain to the previous bug report, "the change was intentional and will remain."  I thought this had already been settled, but apparently it was just reverted so that the "stable" Debian branch could keep its "feature freeze" while getting the other fixes, etc. from the newer version. So that's a shame (in my opinion). UPDATE: April 2019: Just found a  that was caused by this change to ls. When you're confusing developers and generating false bug reports, I think it might be time to re-evaluate your changes. Update: Android toybox ls is now doing something similar to this but with backslashes instead of quotes. Using the -q option makes spaces render as 'question mark characters' (I have not checked what they are, since they're obviously not spaces), so the only fix I have found so far without rooting the device in question is to add this to a script and source it when launching a shell. This function makes ls use columns if in a terminal and otherwise print one-per-line, while tricking ls into printing spaces verbatim because it's running through a pipe. ls() {     # only way I can stop ls from escaping with backslashes     if [ -t 1 ]; then         /system/bin/ls -C $@ |cat     else         /system/bin/ls $@ |cat     fi }


I have used below regex for email validation.  var reg = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;   How can i validate the below two email id like    hello!%#%^world@gmail.com  helloworld@-gmail.com   Vaild Email ids:   hello-world@gmail.com hello.world@gmail.com   InVaild Email ids:   hello!#%#@gmail.com helloworld@-gmail.com   Special characters should not be allow before @gmail.com  Below is my JavaScript code  var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;  if (!re.test($(this).val())) {     errmsg.push($(this).attr('placeholder') + ' is invalid'); }

Is there a regular expression to validate an email address in JavaScript?


I'm using biblatex-apa and trying to get a multiple citation wit specific pages  What i want to get:     (Author1,p.1; Author2,p.2)   my (working) workaround right now is this:  (\cite[][1]{author1}; \cite[][2]{author2})   but the problem here is the missing sortcites option   is there a way to do this with \parencite ?  when I'm trying to use \cite described like  does not work; my code:  \cite[][1]{author1}[][2]{author2}   neither does \parencite work  \parencite[][1]{author1}[][2]{author2}

I am using biblatex for citations and bibliography. Now I often have lists of multiple citations, for which biblatex has the \cites command. Now I can get citations to automatically sort if I don't want page numbers, but I cannot get it right with page numbers.  What I want is all citation ordered chronological (oldest first). Is this possible, or must I just do this by hand?  Here is an example.  \documentclass[11pt,oneside]{memoir}  \usepackage[     style=authortitle,     useprefix=false,     maxnames=2,     firstinits=true,     sortcites=true,     uniquename=init,     abbreviate=true,     backend=biber,     sorting=ynt ]{biblatex}  \begin{filecontents}{jobname.bib} @book{tom1,   author = {Author, A.},   year = {2001},   title = {This book is from 2001},   shorttitle = {2001}, } @book{tom2,   author = {Author, A.},   year = {1999},   title = {This book is from 1999},   shorttitle = {1999}, } \end{filecontents}  \addbibresource{jobname.bib}   \begin{document} This one is corrent.\footnote{\Cites{tom1,tom2}.} This one is corrent.\footnote{\Cite{tom1,tom2}.}   This one is incorrent.\footnote{\Cites{tom1}{tom2}.} This one is incorrent.\footnote{\Cites[1]{tom1}[12]{tom2}.} \end{document}


I have a bash script that scrapes a list of urls for links to various kinds of documents. At the end, the script uses wget to download the files. However, I'm having trouble with filenames containing white space in the name: wget ends the url at the space. Is there some way to use sed or something to change the white space to %20 here? Or some other solution?  This is my code:  for url in $(cat download.md) do     lynx --listonly --dump $url | \ awk '/\.(pdf|doc|docx|odt)$/{ sub("^[ ]*[0-9]+.[ ]*","",$0); print}'  done > ~/links.txt  for i in $( cat ~/links.txt ); do wget $i;  done

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


I'm an Indian student in my 2nd year and I have a subpar(6/10) grade, but that's just because of the school I'm in currently.   I've been a straight A student before university all my life. I'm pretty sure that it's  this school which is super competitive and likes giving extra-hard tests and strict grading which leads me to have a poorer grade, despite knowing/understanding the material. And I'm not the only student who's been disadvantaged here in this manner.  I've interacted with several other schools/students here, or outside India, for example  and I'm pretty sure I'd have a higher grade if I were at one of those schools.  I understand that being challenged is beneficial and the post might just come across as one from a poor student who likes to whine, but my thoughts are genuine. Other factors that contributed to a poor grade are my ADHD and the utter lack of course flexibility.  For clarification, I'm a CS student and I'm talking admissions committees outside of my country(admission to an engineering masters program here takes place differently through tests) - perhaps in the USA/Canada. Are these valid reasons I could get through to them? How?

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


Does a Ghana passport holder transiting through Lisbon Portugal en route to Morocco require an airport transit visa ?

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I am working on my Project in Netbeans entitled Car reservation system. I've encountered an error in my log in form codes. Once I clicked the login button java.lang.NullExceptionPoint error showed up.  Any suggestions for my codes? thanks  Here is my code:  private void cmdloginMouseClicked(java.awt.event.MouseEvent evt) {                                               // TODO add your handling code here:         String sql = txtusername.getText() + "'select * from tblelogin where username='" + "' and userpass='" + txtuserpass.getText() + "'";         try {             pst = conn.prepareStatement(sql);             rs = pst.executeQuery();             if (rs.next()) {                 JOptionPane.showMessageDialog(null, "Correct");              } else {                 JOptionPane.showMessageDialog(null, "Invalid username or password");             }          } catch (Exception e) {             JOptionPane.showMessageDialog(null, e);         }     }

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 currently on 91 points, and I have got the Edit Community Wiki privilege! Why?

I'm new to Stack Overflow and just received new privileges this morning.  Now I received three new notifications about additional privileges that I received, even though I don't think I've reached the reputation points level for them. At the moment I have 13 reputation points, and I recieved notifications for the following privileges:   Vote up Flag Posts Talk in chat   I tried voting up and it doesn't work (since I don't have the reputation points for it). What's going on?


I want to have   (Goossens et al., 1993)   But using biblatex, it will give below  \parencite  --> (Goossens et al. 1993)   I am using a template in   \usepackage{biblatex}  \addbibresource{references.bib} \usepackage{uorbib}   in uorbin.sty file:  % This contains styling elements for bibliography % stuff: Entire citation is colored instead of just % year. \NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{uorbib}   [2018/01/18 v0.01 LaTeX package for UOR thesis]  %% Bib stuff \DeclareFieldFormat{citehyperref}{%   \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links   \bibhyperref{#1}}  \DeclareFieldFormat{textcitehyperref}{%   \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links   \bibhyperref{%     #1%     \ifbool{cbx:parens}       {\bibcloseparen\global\boolfalse{cbx:parens}}       {}}}  \savebibmacro{cite} \savebibmacro{textcite}  \renewbibmacro*{cite}{%   \printtext[citehyperref]{%     \restorebibmacro{cite}%     \usebibmacro{cite}}}  \renewbibmacro*{textcite}{%   \ifboolexpr{     ( not test {\iffieldundef{prenote}} and       test {\ifnumequal{\value{citecount}}{1}} )     or     ( not test {\iffieldundef{postnote}} and       test {\ifnumequal{\value{citecount}}{\value{citetotal}}} )   }     {\DeclareFieldAlias{textcitehyperref}{noformat}}     {}%   \printtext[textcitehyperref]{%     \restorebibmacro{textcite}%     \usebibmacro{textcite}}}  \endinput %% %% End of file `uorbib.sty'.   I try to change to  \usepackage{natbib} to get \citep{goossens93} and (Goossens et al., 1993)  But is not working using the template.

I use the authoryear style in biblatex, and when I do for instance \cite{bauman2000}, I get:       Bauman 2000   But I would like to add a comma between the author and the year, in order to have      Bauman, 2000   Is there a simple command to get this change ?


So I know that you can take the derivative of this and multiply by x and do integrals or something like that. However, I am just wondering if there is a way to come to the summation of the series without doing derivatives or integrals. Is there a simple way or would that way just be guess and check?

The actual sum I'm looking to solve is $$\sum x^i(i^3-(i-1)^3)=(1-x)\sum x^ii^3$$ But I'd rather do a general answer first. I know the method of differentiation and integration but I'd like to do it without that. I remember seeing a method which reduced the power of $i$ on Brilliant but I can't find it anymore.


I want to create a class that can be made without any parameters, and has a method that takes a list of any object and behaves like this:  List<String> list1 = Arrays.asList(new String [] {"a","b"}); List<String> result1 = myClass.myMethod(list1);  List<Integer> list2 = Arrays.asList(new String [] {1,2}); List<Integer> result1 = myClass.myMethod(list2);   Here's my attempt after reading briefly about Java generics:  public class myClass<T> {  public List<T> myMethod(List<T> input) {   ...    return input; // just an example }   Why doesn't this work?

The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List<String> someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List<String> someList = someMethod();          }