SEDE seems to be unaware of the name change on Cognitive Sciences (to ).  The site icon is a broken image and the text of the site name still reads "Cognitive Sciences" instead of "Psychology & Neuroscience".        This image is from the list of all sites and is representative of both the main site and meta site list items. The "visit site" link URL is also still "cogsci.se.com" but that is valid because it's a redirect, though the "correct" link "psychology.se.com" would probably be preferred.

I've removed the poll style answers in favour of open discussion.  I realise now this isn't the best way to have a proper discussion about this issue - sorry to anyone who commented/voted.    This is mostly a followup on this question:    As I've answered, the reason this is happening is that the root database (in the production Stack Exchange database server) is still called StackExchange.Programmers - a database name that propagates to SEDE and through it to the data dump.  The question here is what to do about it - the current situation is somewhat broken for users of the data dump.  These are the options we have:   Do nothing Update the root database name (requires downtime - so very undesirable) Update the update scripts so the SEDE database name is the new name, change will flow to the data dump export (breaks any queries using the old name) Update the export to the data dump so only it gets the new name Something else we haven't thought about   I have added all of these options as answers below - please vote on the one you most prefer, we will try to accommodate the top voted answer.


I know I can download apps such as Wunder Radio or iHeartRadio that tune in to the same signal over the internet as is being broadcast over commercial FM stations, but I want to use my iPhone to receive input from a real FM tuner.  Many times smaller stations do not stream and often other services, such as audio of TV on a Gym, some museums and traffic warning stations as well as conferences where live translations in several languages are broadcast over different FM frequencies.   Is there a particular app for this or maybe a third-party device I can purchase?

How to listen my local FM stations in my iphone 4? Like I can listen with my old Nokia phone, without using Internet, GPRS etc.  Is iPhone 4 lacking this facility?  I heard about "Pandora Radio" but it uses the Internet to run and it's also not for Indian FM channels.  In my Nokia Express Music Mobile I can listen my local FM stations without any GPRS, Internet in mobile.


By 18 January 2016, Member States shall notify to the Commission the list of professions for which a prior check of qualifications is necessary under Article 7(4).  Sometimes I get confused when it comes to "by" and a date.. Does this mean that "the Member States shall notify to the Commission the list before 18 January 2016", or "starting from 18 January 2016", like, "after 18 January 2016"? Thanks in advance..

I have read the Rules of a competition. The text of the Rules include a sentence as follows:     As per stated in the Rules the entrants will be notified by May 30th 2010.   Does the sentence above mean that May 30th is included in the term of notification or not?


I know there is an option available in preferences to increase "Width Outline". However this only applies to active object.  Is there anyway, through code manipulation possibly, to increase Line Width for all empties, latices, and objects in viewport? I believe the default value is 1px.

How do I increase the line thickness displayed in the 3D Viewport? The lines are simply too thin to see easily.    I changed my theme to "Back to Black" in the user preferences, and the higher contrast helps a little bit.  I am running 1920x1080 on a 27" monitor if that makes any difference.


Suppose that I have an idea with programming/cloud computing.   Since it's just an idea and there's nothing implemented yet, I can't discuss it on Stack Overflow because answers would be too opinionated and disoriented somehow.   Therefore, is there any section of the Stack Exchange network I should know about which would shed some light on some of the general steps and connect me with people who would like to discuss ideas not just to implement the idea into a real project?

I lead a team of 600 people in over 70 countries.  I often would like their input on one of my ideas and I don't want to use a survey because they tend to limit creativity by requiring a choice among predetermined answers.  Let's take a simple example.  I want to get the European team together next year.  I want the team to select the location of the meeting.  Could I use The Workplace exchange to ask the following question "Where should we meet in Europe next year?" and then invite my 100 team members to submit cities and/or vote on cities already submitted?  This doesn't seem to be in the spirit of Stack Exchange (I've only discovered this today), and I don't want to break etiquette.  If I can't use Stack Exchange for this purpose, is there another site out there that would allow people to submit ideas and/or vote on ideas submitted?


I got a bit confused about what would happen in this situation since the stack resolves in reverse order. So, the situation: I have a creature, and then I cast  on it causing it to be indestructible, my opponent then casts - that would usually kill the creature. But the stack is in reverse so would doom blade kill the creature BEFORE it got indestructible?

If I play an instant that grants target creature "indestructible," can an opponent use an instant in response to destroy said creature? Would the stack resolve their ability first? If so, would I be allowed to change target for indestructible? If not, do I still pay the mana cost?


i have three equations with number (reference) that i want to left align.  \documentclass[journal]{IEEEtran}  \usepackage{cite}  \usepackage{graphicx}  \usepackage[labelfont=bf, figurename=Figure, font=small]{caption} \usepackage[subrefformat=parens, labelformat=parens, font=small]{subfig} \usepackage{url}  \usepackage{textcomp}  \usepackage{hyperref}  \usepackage{microtype}  \usepackage[dont-mess-around]{fnpct}  \usepackage[misc]{ifsym}  \usepackage[depth=subsubsection]{bookmark}  \usepackage{booktabs}  \usepackage{makecell}  \usepackage{etoolbox}  \usepackage{authblk}  \usepackage{hhline}  \usepackage{multirow}  \usepackage{xparse}  \usepackage{cleveref}   \begin{document} \begin{equation}\label{eq1} x=\frac{-b\pm\sqrt{b^2-4ac}}{2a} \end{equation}  \begin{equation}\label{eq2} \frac{d}{dx}r^n=nx^{n-1} \end{equation}  \begin{equation}\label{eq3} Length=\int_{a}^{b}\sqrt{[f't]^2+[g't]^2}dt \end{equation} \end{document}   By default, the equations are center aligned. How can i make them left aligned? I already tried \begin{flalign}...\end{flalign}, \begin{aligned}...\end{aligned} with [fleqn] it did not work for me. Any help will be highly appretiated.

Is there a way possible to imitate the align environment for math mode commands, without having all writing being placed toward the center on the output page?  MWE:  \documentclass{article} \usepackage{mathtools}  \begin{document} \begin{align*} \cos\theta_1 \cos\theta_2-\sin\theta_1\sin\theta_2 &= \cos(\theta_1 +\theta_2) \\ \sin\theta_1 \cos\theta_2 + \cos\theta_1 \sin\theta_2 &= \sin(\theta_1+\theta_2) \end{align*}  \end{document}


For a small consulting firm, is it appropriate to use CEO or Managing Director as the owner of the business?

Can you please clarify if it's acceptable to use these terms interchangebly and if not point out to significant differences between these titles. It seems to me that it may be something with scale of an organization (perhaps, small/medium businesses have managing directors, and large corporations have chief executive officers) but I'm not sure. I do understand that a person may bear one or another of these titles formally, but what about real differences?


I was wondering if it was possible to express infinite divergent sums using set theory (I do apologize if some of the notation is improper)  I wanted to consider $$\sum_{n=1}^{\infty}n$$ i.e. the sum of all natural numbers. I thought you might be able to express this by adding up the cardinality of sets with n elements. So  $card(\{1\}) +card(\{2,3\})+card(\{4,5,6\})+...$ and so on. This then would equal  $card(\{1\} \bigcup\{2,3\}\bigcup\{4,5,6\}\bigcup...)=\mathbb{N}$  Hence $$\sum_{n=1}^{\infty}n=\aleph_0$$  Is my math correct and can this be generalized to compute other infinite sums, even those which involve terms with decimals?

I do not even know if the question makes sense.  The point is rather simply. If I have the sum of all natural numbers,  $$\sum_{n\in \mathbb{N}}n$$  this is clearly "equal to infinity".  But since almost a century ago, we know that there are (a lot of) different "infinities".  So, is this sum equal to something countable or something bigger?  I tried to look for references, but couldn't find anything and, since I am not an expert in Logic, Set Theory or Foundations of Mathematics, I thought that it would be good to ask here.  Thanks in advance, Davide  PS: This question is about sum of cardinals. It is not about Calculus.


I had an interaction today with a very high-rep user who posted a sloppy answer with both syntax and logic errors. I pointed these out (as I often do when I see code that won't compile or uses incorrect logic), and he got really angry, calling me a bad, bad word multiple times. He then told me he down-voted my (correct) answer, solely to punish me for being a bad, bad word. Screen shot of the comment from the answer he has now deleted (don't look if you have extreme sensitivities to mind-destroying and society-ruining vulgarity):    I don't really care that he down-voted me for the wrong reasons. But stating so in public is not behavior I expect to be tolerated.  I have a hard time not defending myself when someone calls me a bad, bad word for doing exactly what we are supposed to do here. This is the kind of crap that I refuse to put up with, and I don't think the community should either. It is childish and unacceptable and is going to drive users like me away from the site. This is especially true when it comes from a user with close to 200K rep. This is supposed to indicate a trusted and esteemed member of the community, but in this case this person is a very bad example of anything his rep is supposed to portray. If people can act this way unchecked I think the community is in a sad state.  I guess this is why we should down-vote anonymously, and not bother commenting. But when you don't comment, others may ignore the down-votes (especially if others have up-voted without seeing the flaws), and readers may take the answer as a good one. I have had a pretty consistent policy of commenting first and down-voting later (if the situation isn't corrected). Never mind that if nobody comments the OP doesn't learn why they got down-voted.  In the end, this incident is either going to change my views on my policy of providing constructive criticism instead of blind drive-by down-votes, or it is just going to make me find another venue where I can contribute. My question is:     What do you folks do to not let bullies get to you?    It's easy to say calm down, walk away, ignore, etc. But being called a bad, bad word is a bit much IMHO.

When flagging, there are two special case options: spam and rude or abusive.   What is spam, and when should I flag content as such? What is considered offensive, rude or abusive content? How does the spam flag differ from the rude or abusive flag? What is the effect of these special flags? When are these flags removed?


The derivative of the area $A(r) = \pi r^2$ of a circle with radius $r$ gives the circumfence $\frac{dA(r)}{dr} = 2\pi r$.  Similarly, the derivative of the volume $V(r) = \frac{4}{3}\pi r^3$ of the sphere (ball) with radius $r$ gives the surface area $\frac{dV(r)}{dr} = 4\pi r^2$.  This is not true say for the square or the square cuboid.  Just a coincidence. Stupid question I know.

, why is the surface area of a cube not equal to the derivative of its volume?  If you think about a sphere, it makes sense that the rate of change of the volume (with respect to $r$) yields the surface area ($SA$) = $\frac{\text{d}}{\text{d}r} \frac{4\pi r^3}{3} = 4\pi r^2 $, because we are "skinning" on "layers" of sphere.  The surface area of a sphere is the rate of change of the volume of that sphere at radius R because an infinitely thin skin of sphere laid on top of the sphere is exactly the surface area.  So for a cube, you'd think the same thing.  But $V_{\text{cube}} = x^3$ and $SA_{\text{cube}} = 6x^2$, where you'd expect $SA_{\text{cube}}=3x^2$ if surface area were just the derivative of volume.  I think it has to do with the cube-side length growing on two sides (hence $2 \text{d}x$?) but I can't quite put my finger on it.


I am programming in C++.  As basic as this question is I cannot seem to find an answer for it anywhere. So here is the problem:  I want to create a C-style string however I want to put an integer variable i into the string. So naturally, I used a stream:  stringstream foo; foo                 << "blah blah blah blah... i = "                  << i                 << " blah blah... ";   However, I need to somehow get a C-style string to pass to a function (turns out foo.str() returns an std::string). So this is technically a three part question --   1) How do I convert std::string to a C-style string?  2) Is there a way to get a C-style string from a stringstream?  3) Is there a way to use a C-style string directly (without using stringstreams) to construct a string with an integer variable in it?

How can I convert an std::string to a char* or a const char*?


I'm using following code:    #define OFFSETOF(_s, _m) ((uint32_t)(uint32_t *)(&(((_s *)0)->_m)))  typedef struct test {     uint16_t param0;     uint8_t param1; } test;  uint32_t uStartAddr = OFFSETOF(test, param1);   But I get that error:    error: cast from pointer to integer of different size

In ANSI C, offsetof is defined as below.  #define offsetof(st, m) \     ((size_t) ( (char *)&((st *)(0))->m - (char *)0 ))   Why won't this throw a segmentation fault since we are dereferencing a NULL pointer? Or is this some sort of compiler hack where it sees that only address of the offset is taken out, so it statically calculates the address without actually dereferencing it? Also is this code portable?


I want to open and edit layers from a personal geodatabase in QGIS. I have read this  and I follow the ODBC way to open a personal geodatabase in QGIS with success.  However, I cant edit layers in QGIS.    The editing toolbar is grayed out.  Can I edit the layer from a personal geodatabase in QGIS? Is it possible ?

After a lot of research and effort I have successfully made a connection to my Esri Personal Geodatabase (.mdb file).  Now I want to edit some attribute data in the attribute table of a layer... BUT I can't because the toggle edit and the editing toolbar is greyed out.  So how do I edit a layer inside (.mdb) file that I have loaded into QGIS?!  I am using QGIS 3.  Don't ask me why I want to do it this way. (But If you wan to know why, it's because I want to edit the (.mdb)file in QGIS and then send it to someone who is using ArcMap who should be able to read/write to the file too. The other person has ArcMap and I have QGIS).


I recently discovered the investpy library and I would like to know if there is any function where I can pass the stocks code and on return, among other data, receive its ISIN. I'm trying the function search_quotes, but the ISIN doesn't come back. import investpy as ip search = ip.search_quotes(text='CPLE11') for s in search:     print(s)  If anyone knows of any other library where I can pass the code and receive the ISIN, that helps too.

How can I can convert ticker symbols (which include information on the exchange) to an International Securities Identification Number (ISIN) (which contains no information on the exchange)? Also I am interested in the other way round — given an ISIN and a market identification code (MIC) how can I determine the ticker symbol? Any databases around?


The monotone convergence theorem in my text requires $f_n$ to be a non-negative, increasing, pointwise convergence sequence.   Why does $f_n$ have to be a decreasing sequence? Is there an example of when the sequence is decreasing it the theorem is not true?

Is there any counter example for for $F_n \downarrow F$ then $\int F_n \, d\mu  \downarrow \int F \, d\mu$?  I came up with the one below but $F_n$ does not go down to $0$ monotonically. I need something that goes monotonically.  $$F_n = \frac1n \cdot 1_{[0,n]}(x)$$  we know that $\int F_n \, d\mu = 1 \text{ and not $\int0 \, d\mu$}$


I would like to know if you can actually concatenate class's/ID's in jQuery to DRY more effectively.  like this:  $(".div1").hover(function() {         $(".title").hide();     });  $(".div2").hover(function() {         $(".title").hide();     });   to this:  $(".div1 + .div2").hover(function() {         $(".title").hide();     });   Is there a way of doing that?  Thank you

I’ve had a good look and can’t seem to find out how to select all elements matching certain classes in one jQuery selector statement such as this:  $('.myClass', '.myOtherClass').removeClass('theclass');   Any ideas on how to achieve this? The only other option is to do  $('.myClass').removeClass('theclass'); $('.myOtherClass').removeClass('theclass');   But I’m doing this with quite a few classes, so it requires much code.


I have a form, which has several input types.  I am saving the form with AJAX:  function save_form_data(){     $.ajax({                 url:"path/to/file.php",                 method:"POST",                 dataType:'json',                 data: $("#options_form").serializeArray(),                 success:function(returnObj){                 console.log(returnObj);                 }            }); }   I am using this function on submit function of jQuery.   $('#options_form').submit(function(event){     console.log('submitted');     event.preventDefault();     save_theme_options(); });   But, the problem that I face is I am not able to get the files uploaded in the form using AJAX request. I try to print $_FILES, but results in an empty array.   How do I solve this issue?

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?


How long does Australian online visa transfer take from old to new passport. Im an Indian national traveling to Australia in December. I will soon be getting my new passport reissued and will have to transfer my Australian Visa (online) on to the new one, after I update the details in m immi account

I have a business visa for Australia valid till end of this year(2019) but the passport it is linked to is about to expire. I have applied for a new passport which I will get within the next 14 days. As soon as I get my new passport, I will submit Form 929.    My problem is, I have to travel to Sydney, Australia as early as possible but I am not sure how much time it takes to process Form 929. Some say it takes 3 days, some say more. I need to factor this to book my Flight & Hotel early to save on cost.


What word better denotes a money transaction: debit or credit?

I’m looking for a generic word that means “debit or credit”.  Say I have a transaction, and I don’t know whether it’s a debit on the account or a credit on the account, and I want to ask about it, is there a word I can use?   For example, if I were asking whether a book were green or blue, I would ask, “What’s its color?”  If I ask whether a transaction was a debit or a credit, can I fill in the blank, “What’s its _?”  (Background: I’m looking to name a variable while programming, and the best I can come up with is type, which is not very descriptive).


So when I do a cycle render for a picture/video why is it really pixelated/fuzzy when its rendered??

I know that this question is a bit old or maybe overdone, but I'm running the latest edition of Blender and when I use the Cycles engine I get really fuzzy results and I can't find a simple, non-compromising solution to the quality.  I don't know exactly what I'm doing wrong here, but I'm sure others share my frustration.  Leaving everything in default settings, I started a new project and switched to the Cycles render.  I duplicated the cube and set colors for two Diffuse BSDF shaders, then went ahead and made walls and a floor all sharing the same diffuse shader.  I made two windows to emit blue light.  The screenshot has gaps between the walls because of the setup:  I'm aware that it's considered very incomplete and many have come to terms with some amount of noise, but is this normal?  Furthermore, with default settings or not, I can't change the amount of noise produced.  Supposedly, using "progressively refine" in the rendering tab should make it refine itself indefinitely, however Cycles only counts to 10 refines and then stops, creating a render which is a pixel-perfect match of the ordinary rendering method when it's completed.  I understand that there are tricks that can be used to reduce noise, but at the cost of extra processing time and usually small quality conflicts, like blurring.  My question essentially boils down to is this Cycles' current limit?


All the software in the center are on their older virsions and the update software doesn't detect the programmer. I want to play minetest 0.4.6 but the one in the software scenter is 0.3.1  if i try to download the 0.4.6 from the internet , the software center doesn't aloww me to install it. And i have the newest ubuntu (13.4) Please update it

In Ubuntu, once a release is out the software one has installed receives security updates only. In Windows, I can get new versions of programs with new features. How can Windows do this and why can't Ubuntu?


The story is set in a submerged city or community complex, anchored to the sea floor by tethers I believe. The story is centered around the POV of a kid, probably teenage. He was portrayed maybe 14-17 years old.  The first event I remember is one of these anchored homes caving in and collapsing to the sea floor. The main character (MC) witnessed the event and rushed in to save and rescue what/whoever he could.   The second event I remember is the MC and some female friend of his exploring an abandoned wreck of some structure and, in the midst of it, hearing the sound of a distant whale outside the structure propagating and reverberating through the metal structure.   The third event I remember is the ending, however, I'm presently on the mobile app of SE and don't see a button for spoilers (despite the ample space available for one) and I don't remember the special string of characters needed to create a spoiler, so I'll save typing it for later. Suffice it to say that the story ended happily, with plenty of dolphins.    There are other aspects of the story I remember as well.  I believe the MC lived on an aquatic farm homestead sort of ordeal, growing some kind of aquatic plants for the community. Their nearest neighbors did this as well. They all lived some distance from a central community with hundreds or thousands of citizens involved.   Most of these civilians were in denial of "mutants" emerging from their specialized community. I believe they shared stories about witnessing the feats of these mutants like we landgoers share ghost stories. In the end the MC and a number of other children end up being mutants themselves, adapted in some minute ways for living within water.   Some of these hypothetical mutants are blamed for a string of incidents and disasters in the communities and city, such as that one homestead collapsing and sinking (also, as it comes to me, I believe they managed to patch the sunken house up and inflate it again). I believe that during that event the MC chases down a culprit and witnesses something or someone mutant-like, driving his own suspicions and the plot further.  To live and work in the water, I believe the citizens inhaled in a kind of oxygen-rich liquid which allowed them some time to function in the depths without special breathing apparatuses.   I don't remember much about the regional setting, like where or when this place was situated, but I think there was a coastline city nearby.   The story seemed geared toward young adults and was likely written recently. I'd be surprised if it was written any later than 1990, and my impressions tell me sometime between 2000 and 2010. It was written in English and the copy I borrowed was printed on a paperback.

About twenty years ago, I read a sci-fi novel where, if I recall correctly:   The protagonist is a guy, and probably a teenager or a young adult. Like most of humanity, he lives on land; but he's visiting an undersea colony (one of many?), and that's where most of the action takes place. He gets to know a girl there about the same age; maybe he's staying with her family for some reason? (Maybe they're relatives of his?) The girl had an older brother ("Ian", maybe?), but he died. He goes out of the city (i.e., goes for a dive) at some point, and gets in trouble, but is mysteriously rescued. He learns about an underground separatist movement of some sort. (I don't remember the details.) He eventually discovers that:       Ian is actually alive, and his family (or at least his sister) is still in touch with him; but they're covering up the fact that he's joined this separatist movement, and (like some other separatists) has modified his body to have gills so he can live out in the ocean.      Ian is actually who rescued him mysteriously.     I would guess, in retrospect, that the novel is from the 70s or so; but I don't really know.  I read the novel in English, and I don't think it was a translation.


I'm having troubles comparing 2 strings after applying .substring() This is my example code: public class TestSubstring{  public static void main(String args[]){   String A = "BE359PH454128265";   String B = "EXAMPL_BE359PH4";   A = A.substring(0,8);   B = B.substring(7);   System.out.println("A = " + A);   System.out.println("B = " + B);  if(A != B){ System.out.println("Not Equal 1 "); }else{ System.out.println("Equal 1"); }  if(!A.equals(B)){ System.out.println("Not Equal 2 "); }else{ System.out.println("Equal 2"); }   } }  This is the output: A = BE359PH4 B = BE359PH4 Not Equal 1  Equal 2  Can someone explain we why "!=" doesn't work and "!A.equals(B)! does?

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


sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin   I was installing a font by using this command  sudo gnome-font-viewer /home/user-15/Downloads/aclonica/Aclonica.ttf     I used this before and it worked fine but now it is not working, I'm not able to install any font.

How can I fix the following error with sudo?  /etc$ sudo sudo: /etc/sudoers.d is world writable usage: sudo [-D level] -h | -K | -k | -V usage: sudo -v [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-u user             name|#uid] usage: sudo -l[l] [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-U user             name] [-u user name|#uid] [-g groupname|#gid] [command] usage: sudo [-AbEHknPS] [-r role] [-t type] [-C fd] [-D level] [-g             groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid]             [VAR=value] [-i|-s] [<command>] usage: sudo -e [-AknS] [-r role] [-t type] [-C fd] [-D level] [-g             groupname|#gid] [-p prompt] [-u user name|#uid] file ...


We need to create an Stealth (DMZ,  or ) Name Server. We are able to create Name Server for our private network and our sub-domain's are resolve in our Local Area Network where not in World Wide! Would you please help us to resolve the missing configuration?   Note: Sorry for being the large question, We beg your pardon as we are fresh contributor to an R&D based community.  Where following domain we have:  Domain       : chorke.org Name Server  : ns8533.hostgator.com Name Server  : ns8534.hostgator.com Subdomain    : bgd.chorke.org (public) CNAME of bgd : cki00.ddns.net (noip.com)   Network information as below:  GTW : 10.19.83.1    (Gateway/Router) DMZ : 10.19.83.3    (bgd.chorke.org  & Name server) LAN : 10.19.83.0/24 (Private network & range 0~255)   Following packages installed:  sudo su apt update && apt upgrade apt install bind9 bind9utils bind9-doc dnsutils   Startup options in /etc/default/bind9  RESOLVCONF=no OPTIONS="-u bind -4"   Options in /etc/bind/named.conf.options  acl internals {         127.0.0.0/24;  # 1-254         10.19.83.0/24; # 1-254 }; acl externals {         10.19.83.0/29;  # 1-7   (public)         !10.19.83.0/24; # 1-254 (private) }; options {         directory "/var/cache/bind";         auth-nxdomain no;         forwarders {                 8.8.8.8;    # Google DNS                 8.8.4.4;    # Google DNS                 10.19.83.1; # Router DNS         };         dnssec-validation auto;         listen-on-v6 { none; };         listen-on port 53 {                 127.0.0.1;                 10.19.83.3;         };         allow-transfer { none; };         allow-query { internals; };         allow-recursion { internals; }; };   Zones in /etc/bind/named.conf.local  include "/etc/bind/rndc.key"; zone "bgd.chorke.org" {     type master;     file "/etc/bind/zones/db.bgd.chorke.org";     # forward zone     allow-update { key rndc-key; }; };  zone "83.19.10.in-addr.arpa" {     type master;     file "/etc/bind/zones/db.83.19.10";           # reverse zone     allow-update { key rndc-key; }; }; // consider adding the 1918 zones here // include "/etc/bind/zones.rfc1918";   Forward zones in /etc/bind/zones/db.bgd.chorke.org  $TTL     600 $ORIGIN bgd.chorke.org.  @       IN      SOA     ns0.bgd.chorke.org. root.bgd.chorke.org. (                         201908051           ; Serial       YYYYmmddI                              3600           ; Refresh            01H                               600           ; Retry              10M                             86400           ; Expire             01D                               600 )         ; Negative Cache TTL 10S ; NS Records @       IN      NS      ns0.bgd.chorke.org. @       IN      NS      ns8533.hostgator.com. @       IN      NS      ns8534.hostgator.com. @       IN      NS      bgd.chorke.org. @       IN      A       10.19.83.3 ; A  Records apn             A       10.19.83.2 ftp             A       10.19.83.4 gtw             A       10.19.83.1 ns0             A       10.19.83.3   Reverse zones in /etc/bind/zones/db.83.19.10  $TTL     600 $ORIGIN 83.19.10.in-addr.arpa.  @       IN      SOA     ns0.bgd.chorke.org. root.bgd.chorke.org. (                         201908051           ; Serial       YYYYmmddI                              3600           ; Refresh            01H                               600           ; Retry              10M                             86400           ; Expire             01D                               600 )         ; Negative Cache TTL 10S ; NS  Records @       IN      NS      ns0.bgd.chorke.org. @       IN      NS      ns8533.hostgator.com. @       IN      NS      ns8534.hostgator.com. @       IN      NS      bgd.chorke.org. ; PTR Records 1.83    IN      PTR     gtw.bgd.chorke.org. 2.83    IN      PTR     apn.bgd.chorke.org. 3.83    IN      PTR     ns0.bgd.chorke.org. 4.83    IN      PTR     ftp.bgd.chorke.org.

I have an internal network with a DNS server running BIND, connected to the internet through a single gateway. My domain "example.com" is managed by an external DNS provider. Some of the entries in that domain, say "host1.example.com" and "host2.example.com", as well as the top-level entry "example.com", point to the public IP address of the gateway.  I would like hosts located on the internal network to resolve "host1.example.com", "host2.example.com" and "example.com" to internal IP addresses instead of that of the gateway. Other hosts like "otherhost.example.com" should still be resolved by the external DNS provider.  I have succeeded in doing that for the host1 and host2 entries, by defining two single-entry zones in BIND for "host1.example.com" and "host2.example.com". However, if I add a zone for "example.com", all queries for that domain are resolved by my local DNS server, and e.g. querying "otherhost.example.com" results in an error.  Is it possible to configure BIND to override only some entries of a domain, and to resolve the rest recursively?


How do you compute $\prod_{n=2}^\infty\bigg(1-\frac1{n^2}\bigg)$   I have no clue on how to start. Any help would be appreciated.

While trying some problems along with my friends we had difficulty in this question.   True or False: The value of the infinite product $$\prod\limits_{n=2}^{\infty} \biggl(1-\frac{1}{n^{2}}\biggr)$$ is $1$.   I couldn't do it and my friend justified it by saying that since the terms in the product have values less than $1$, so the value of the product can never be $1$. I don't know whether this justification is correct or not. But i referred to Tom Apostol's Mathematical Analysis book and found a theorem which states, that    The infinite product $\prod(1-a_{n})$ converges if the series $\sum a_{n}$ converges.   This assures that the above product converges. Could anyone help me in finding out where it converges to? And,   Does there exist a function $f$ in $\mathbb{N}$ ( like $n^{2}$, $n^{3}$) such that $\displaystyle \prod\limits_{n=1}^{\infty} \Bigl(1-\frac{1}{f(n)}\Bigr)$ has the value $1$?


I have a layer of points, that I hope to connect to form a polyline(s).  The layer looks like this:    I am hoping the end results traces the network that was originally used to construct the points:    Background: I am using ArcMap 10.3.  My workflow has been to turn the original polylines into points, after setting a starting point, an interval, and a total stop distance (along each branch in the network).  The I do some processing (data addition) on the points (which is originally a much larger set than shown) outside of arcmap, bring the points back in, create a layer from the initial larger dataset where a certain criteria is set, and then hopefully reverse the points into lines.  If I use the Points to Line tool (Data Management), I get this:    Which is expected since the numbering of the points along so many branches make's it illogical to follow the numbering when creating a polyline.  Is there a way to generate polylines from points when only the nearest points are connected?

I'm trying to figure out how to create a polygon that connects all the endpoints of a shapefile containing a set of polyilnes with pythonscript in ArcGIS, I'm having trouble doing this as the order of the nodes in the polygon is important. I want to achieve the grey polygon in the picture from the green lines


Two months ago we were traveling to Japan. After checking in the luggage we realized that we forgot the voucher for the Railway Pass at home so we hurried back to the city to get it. But pure luck we got back just before boarding even started.  But we were curious recently. What would have happened in a parallel universe, where we didn't make it back on time? I know that they are not supposed to take off without you if you've checked in your luggage. But I guess that at some point they will do something about this.  Just to give a full account, there were no further flights from the airport to the connecting airport (where we had to spent a few hours anyway, so if there was a second flight two hours later, it would have been fine); and we weren't physically at the airport for the most part.  So what would happen if we had only managed to get back to the airport 30 minutes after boarding, an hour after boarding, or even two hours (say due to a minor train accident or whatever)?  (The airline was Turkish Airlines, if that matters, and we were flying from within the EU.)

This is a hypothetical question.  Say you book a flight from A through B to C. For some reason or another, you choose not to board the last part of my trip. Would this create problems for other passengers?  When a checked in traveller does not show up for a flight, that flight is actually delayed – at least if he/she has baggage checked in. If he/she doesn't show up within a reasonable time, the crew will start off-loading the baggage, delaying the flight even further. In my experience, this process takes approximately 20 minutes (which may be very frustrating for other travellers, whom may have planes to catch at the next airport).  So, to recap:   If I don't show up for one part of the journey, will that delay those flights? What if my luggage is short checked to point B (for example,    when they need to be taken through customs) and you don't check them  back in? What if I only bring carry-on luggage?    There are some related questions below, but they focus on whether or not you as a traveller may face problems, whereas I am more interested in what problems it will cause for the airlines and other travellers.


Let the point $(u, v)$ be chosen randomly in the $[0, 1] \times [0, 1]$ square. Let $X$ be the random variable that associates to point $(u, v)$ to the number $(u + v)$. Obtain the distribution function of $X$.   Thoughts:  $0 \leq u \leq 1$, and $0 \leq v \leq 1$. Therefore $0 \leq u + v \leq 2$. But $X = u + v$, so we have $0 \leq X \leq 2$. I'm not sure how to take it from here, but I think that  $$ F_X = \frac{x}{2}, ~~ 0 \leq x \leq 2 $$

I am calculating the sum of two uniform random variables $X$ and $Y$, so that the sum is $X+Y = Z$. Since the two are independent, their densities are $f_X(x)=f_Y(x)=1$ if $0\leq x\leq1$ and $0$ otherwise. The density of the sum becomes $f_Z(z)=\int_{-\infty}^\infty f_X(z-y)f_Y(y)dy=\int_0^1f_X(z-y)dy$ by convolution. I am stuck at this stage. How do I proceed with my integral? I think a diagram make it easy but I dont know how to proceed.


After years with LaTeX, I need to take control over the output formatting of my citations in various projects. I've referred to the  as well as the otherwise excellent  but I'm looking for a more pedagogical less manual-like approach.  The web is full of hacks for specifics, but provides no overall systematic understanding of the rules that govern how .bib-files are turned into footnotes and bibliographies with dots, italics and what information from bib-files are included where. I would like to and never again feeling the need to google stuff like "remove initials in name in from footcite".  I don't want to be given a fish; I want to learn how to be a fisherman.  Does anyone know of a good book to read?

Is there a 'biblatex in a nutshell' guide out there? I'd like if someone explained to me the essentials on how to use biblatex (what lines I have to write in my document, which files I have to have, how many times and what I have to compile), so then I can go to  to customise it further.


I received a second hand I phone 4s as a gift it has not been reported stolen or lost. being the 3 party owner how can I delete the account attached to this phone to activate it

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


Please help! I am completely at a loss. Despite me copying commands directly from websites, my Latex document refuses to typeset either my citation or bibliography entry. Below is my tex...  \documentclass[12pt]{amsart}  \usepackage{geometry}  \usepackage{qtree}  \usepackage{natbib}  \usepackage{cite}  \geometry{a4paper}   \title{Nominals of Modern Greek (Abstract)}    \begin{document}  Important to note, is that if their are no other items in the lexical phrase,  the D must appear to the left side of N i.e. *\textit{podia ta}, citet{MG21}.  \bibliographystyle{te}  \bibliography{Syn3 Ref.bib}  \end{document}   Here is my bibliography entry saved under "Syn3 Ref..."   @book{MG21,     auTHor = {Brian D. Joseph and Irene Philippaki-Warburton},     YEAR = {1987},     Title = {Modern Greek},     publisher = {Biddles Ltd, Guilford and Kin'gs Lynn},     address = {Great Britain}  }

Hey I am completely lost. Despite me going to several websites and copying their commands directly, my LaTeX document refuses to generate either the citation or bibliography entry. Here is the LaTeX.  \documentclass[12pt]{amsart}  \usepackage{geometry}  \usepackage{qtree}  \usepackage{natbib}  \usepackage{cite}  \geometry{a4paper}  \title{Nominals of Modern Greek (Abstract)}  \author{Dingler, Ian}  \begin{document}  \maketitle  Important to note, is that if their are no other items in the lexical phrase, the D must appear to the left side of N i.e. *\textit{podia ta}, \citet{MG21}.  \bibliographystyle{te}  \bibliography{Syn3 Ref}  \end{document}   Here is my bib entry saved as "Syn3 Ref"  @book{MG21,         auTHor = {Brian D. Joseph and Irene Philippaki-Warburton},         YEAR = {1987},         Title = {Modern Greek},         publisher = {Biddles Ltd, Guilford and Kin'gs Lynn},         address = {Great Britain}      }   Both my .tex and .bib files are saved in the same folder yet all I get when I typeset is a ? where my citation should be and no bibliography entry what so ever.


If I create a new blender file, switch to "lookdev" view and apply the glass shader to an object, this happens:    Where is the image of the reflection coming from? It is a brand new file so it wasn't me who added it, I'm so confused.

I've made a roughness 0 glass pane, when I'm in lookdev mode it's reflecting a background that I didn't put there. I know I could just ignore it, but I'd rather be able to see what it'll mostly look like when I'm in the later stages. I also just want to know how on Earth I managed to set this background without realising it  Reflection completely ignores any objects I put in front of it. If I placed this glass inside my house, it would still just reflect trees (This is the point where I felt I couldn't ignore it - reflections are going to play a big part in my project and I don't want to be in render mode all the time)  The nodes are the default glass BSDF, except I set roughness to 0  The glass is set to 20mm thick, if that makes a difference  The background moves with my perspective and moves when I relocate the glass  I have a few HDRI's on my PC, but none look remotely like this   Also, I'm using cycles as I find Evee buggy as hell


i am working on a search bar which searches in a SQLSRV database.I cannnot use the sanitization method for mysql since sqlsrv doesn't have such thing. So, after looking on the internet, i used a few techniques, mostly from w3schools.Now, i don't know if they are old or hackable, or even valid.To submit the form i've used this markup :  enter <form action="<?php echo htmlspecialchars('cautare.php');?>" method="post" id="formular" name="formular">code here   in the hopes that a hacker won't be able to introduce code in the link to execute it. Then, in the php:      $search = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") {     $search = test_input($_POST["search"]); } function test_input($data) {   $data = trim($data);   $data = stripslashes($data);   $data = htmlspecialchars($data);   return $data; }   This part is from W3Schools and it seems safe enough, after i've read their explanation a couple times. I've done all this was to protect from a SQL Injection attack since i'm using this code to search the database:  WHERE den_produs LIKE '%{$search}%'   I'd like to know if there is a better way of doing this and what i am doing wrong.   Thanks a lot for your time!

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


I was going to ask something very similar to  (which hasn't been answered). Basically a camera fell from an airplane and it began to rotate (maybe because initially it was put in rotation by the hand from which it fell) but then it stabilized! I saw the same phenomena with Felix (the guy from red bull Stratos), though I think the stabilization occurred because of the little-mini-parachute that skydivers use to stabilize their descent.  My question is, does terminal velocity have something to do with this stabilization? GoPro cameras are like a cube, so intuitively, when the cube reaches terminal velocity it will receive the same force throughout the surface that points downwards, if it's not rotating, it will remain stable, if it is rotating how does this "uniform" force over the rigid body stabilize it?  I appreciate your thoughts on the problem.

Here is a video of a GoPro falling from a plane:   Any idea what is happening when the image "stabilizes" around 0:35? I think it is because the camera's tangential velocity approaches the speed of the GoPro's rolling shutter.  Follow-up question:    Why is the image skewed with the left side skewed "up" and the right side skewed "down?"   A challenge:    Find the axis of rotation (with supporting diagram and explanation of how it was computed).


Is the essence of the  that we now know that gravity propagates through space at the speed of light and not instantly?

LIGO has announced the detection of gravitational waves on 11 Feb, 2016. I was wondering why the detection of gravitational waves was so significant?   I know it is another confirmation of general relativity (GR), but I thought we had already confirmed GR beyond much doubt. What extra stuff would finding gravitational waves teach us? Is the detection of gravitational waves significant in and of itself, or is there data which can be extracted from the waves which will be more useful?


Let $\alpha$ be an ordinal , and define $X_{\alpha} = \alpha \times [0,1)$ to be a topological space with the lexicographic order.  Denote by $\omega$  the first countable ordinal and $\Omega$ the first ordinal that is not countable.  I need to prove the following :  if $\alpha$ is countable then $X_{\alpha}$ is isomorphic to $[0,1)$ as ordered set and to conclude that $X_{\alpha}$ is homeomorphic to $[0,1)$.  and, for each point in $X_{\Omega}$ except the min. element there is a neighborhood that homeomorphic to $R$.  Im a bit stuck on this question, for the first part i thought sending $(n,x)$ to $x$ but this does not work. i tried also sending $(n,x)$ to anywhere in the interval $(1/(n+1) , 1/n)$ - this also does not work.  I would really appreciate a detailed answer , as im not familiar that much with ordinals.  Thanks for helping.

I need to prove that for every countable ordinal $\alpha$, $X_{\alpha} = \alpha\times[0,1)$ is order isomorphic to $[0,1)$, where the order on $X_{\alpha}$ is the lexicographical order. I wanted to go by induction on the countable ordinals. I was able to manually construct a function $f:X_{\omega}\to[0,1)$ that is an order isomorphism, so the base case I have.  So, suppose by induction that for some countable ordinal $\alpha$, for all $\beta < \alpha$, $X_{\alpha}\cong [0,1)$. I need to show that $X_{\alpha+1}\cong[0,1)$. So my attempt was to use the fact that $X_{\alpha + 1} = \left(\alpha\cup\{\alpha\}\right)\times[0,1)$ and to use the induction hypothesis to get an order isomorphism $f'$ between $\alpha\times[0,1)$ and $[0,1)$, and to use the trivial isomorphism $f''$ between $\{\alpha\}\times[0,1)$ and $[0,1)$, and then take the union of these functions $f = f'\cup f''$. But then a problem arises when trying to compare $f(\alpha,r)$ and $f(\gamma,q)$ where $\gamma < \alpha$, since nothing promises me that $f'(\gamma,q) < f''(\alpha,r)$.  I assume after I figure out for successor ordinal, the generalization to a limit ordinal will not be difficult?


Can you add an MS Access table as X,Y points in the same way you can Add X,Y data in ArcMap using:  File --> Add Data --> Add X,Y Data

I have a co-worker who manages a large MS Access database that contains X & Y fields for various locations he tracks.  We have previously exported the data to CSV and used the QGIS Delimited Text Plugin to plot the locations.  We would now like to be plot this data directly in QGIS by connecting to the MS Access db via an ODBC connection (as opposed to export to CSV).   Can QGIS consume the data from the ODBC connection to plot the X-Y locations? Can it be "live linked" to the ODBC connection so that when a project is re-opened, the layer "replots" all old and newly added locations dynamically (as opposed to exporting to shapefile, which would create a snapshot in time)? Can you create tabular ODBC connections that can be joined to spatial tables within QGIS?   You can do all of this in ArcGIS ("Add XY Data" tool), so it would be great if this capability existed in QGIS. I just cannot find anywhere that mentions its existence.  I am not planning to move to a spatial database.  As a GIS person myself, yes I know that it makes sense to move to a spatial database, and yes I have used PostGIS to manage this kind of data.  But these are not options right now.  The user is not a GIS person nor wants to be, and he manages his own database in MS Access and that will not change.  I am and am pulling him kicking and screaming into the GIS world and want to make it easy as possible.  He can live with exporting to CSV, I was just hoping there is a better solution USING ODBC FOR MS ACCESS and displaying the XY data in QGIS.


So I sometimes see messages flagged in chat and get the options "approve" "disagree" or something else.  Are there guidelines about how to deal with these flags? I couldn't find any (I didn't look very hard).  If there aren't any, let's have a CW answer here to make some.

Chat is an offshoot of the main site, and using it is  during their time here.  Chat is our place for:        Real-time collaboration   Meeting fellow members of the community   Less structured, casual (but still roughly on-topic) conversation      Our chat system exists to serve the main site; users of each site can gather and commune with each other.  When in chat, we expect all users to abide by our  policy, which means that we expect community members to treat each other with respect.    While it is a place where the community can go to interact on a more casual level, chat still needs to be moderated by the community and there are tools in place to help with the moderation. This raises a few questions, that are addressed here:


I'm struggling with my current home assignment. If $x,y\in \mathbb{Z}$ and $xy=1$ how to prove that $x=y=1$ or $x=y=-1$? To achieve this, only the following properties can be used.  $\forall x,y,z\in \mathbb{Z}:$   $(x+y)+z=x+(y+z)$; $x+y=y+x$; $x+0=x$; $x+(-x)=0$; $(xy)z=x(yz)$; $xy=yx$; $x\cdot 1=x$; $x(y+z)=xy+xz$; $xy=0 \implies x=0 \lor y=0$; $x<y \veebar x=y \veebar x>y$; $x<y \land y<z \implies x<z$; $x<y \implies  x+z<y+z$; $x<y \land z>0 \implies xz<yz$; $0 \neq 1$; $x+z=y+z \implies x=y$; $-(-x)=x$; $-(x+y)=(-x)+(-y)$; $x\cdot 0=0$; $z\neq 0 \land xz=yz \implies x=y$; $(-x)y=-xy=x(-y)$.   A hint would be greatly appreciated.   As far as I understand, this is an exercise from this book:

I know the answer is obvious: In $\mathbb{Z}$ the only solutions of $xy=-1$ are $x=-y=1$ and $x=-y=-1$. My problem is that I want to formally prove it and I don't know how to write it. Where do you even begin for such a trivial statement?  Edit: I would like to prove it viewing $\mathbb{Z}$ as a ring. This is, just using the sum and product of integers. No order, no absolute value, etc...


In old exams, I've encountered the two following similar exercises:  (1) Classify, up to isomorphism, all the unitary $\mathbb{Z}[i]$-modules with 10 elements.  (2) Classify, up to isomorphism, all the unitary $\mathbb{Z}_2[x]$-modules with 4 elements.  My thoughts on (1):  I use the following fact: "An abelian group $V$ admits an unitary $\mathbb{Z}[i]$-module structure iff there exists a group homomorphism $\varphi:V\to V$ such that $\varphi\circ\varphi=-\mathrm{Id}$". First of all, as an abelian group of order 10 $V$ must be $\mathbb{Z}_{10}$. Then, I look at $\mathrm{Hom}_{\mathbb{Z}}(\mathbb{Z}_{10},\mathbb{Z}_{10})\cong \mathbb{Z}_{10}$ and I found that $n^2\equiv-1\,(10)\Rightarrow n\equiv 3,7$ so there are two $\mathbb{Z}[i]$-modules with 10 elements.   PROBLEM: How to distinguish if that two structures are isomorphic or not? Anyway, I'm following the correct approach? I thought of using fundamental theorem of modules over PID but I stuck following that way.  My thoughts on (2):  I know that the unitary $\mathbb{Z}_2[x]$-modules correspond with the vector spaces over $\mathbb{Z}_2$ with a fixed linear transformation $T$.  We have to look at two non-isomorphic cases:   $V=\mathbb{Z}_2\oplus\mathbb{Z}_2$, then the representation of $T$ must be a matrix $\begin{pmatrix} a&b\\ c&d \end{pmatrix}$ with $a,b,c,d\in\mathbb{Z}_2$ and we can classify the structure modules by looking at Rational Canonical Form: if $m_T$ denotes the minimal polynomial of $T$ then $\mathrm{deg}\, m_T=1,2$. If it's 1 then $T=\lambda\mathrm{Id}$, i.e. the null matrix or the identity matrix. If it's 2 then $T$ is similar to $\begin{pmatrix} 0& -a_0\\ 1& -a_1\end{pmatrix}$ then there are 3 structure modules in this case. Is it ok??   PROBLEM: If $V=\mathbb{Z}_4$ I don't know how to approach the classification in this case.  I apprecciate any hints/suggestions/comments, sorry for the long question. Thanks!

Problem 4.   Let $\Bbb F_2$ be the field with 2 elements and let $R=\Bbb F_2[X]$. List, up to isomorphism, all $R$-modules with 8 elements.      Solution.   We use the classification theorem of modules over a PID. Since $R$ is a finite module, it is in particular an $\Bbb F_2$ vector space. We can write   $$M\cong R/n_1R\oplus R/n_2 R\oplus\cdots\oplus R/n_r R$$   for polynmials $n_1\mid n_2\mid\cdots\mid n_r$. In our case, we have $\sum_{i=1}^r\deg n_i=3$, so we have three options: $r=1,\deg n_1=3$, $r=2,\deg n_2=2$, and $r=3,\deg n_3=1$. The first case yields 8 options. For the second case, we need $n_2$ to be reducible, so we have $X(X+1),X^2,(X+1)^2$ as choices. The first choice yields 2 decompositions, and the latter choices yield 1 decomposition each, for a total of 4. For the linear case, we need the same linear term repeated thrice, which is 2 choices. Therefore there are 14 in all, listed by invariant factors below:   $$\begin{align} &\{X^3+(0/1)X^2+(0/1)X+(0/1)\}\\ &\{X^2,X\},\{X^2+X,X+(0/1)\},\{X^2+1,X+1\}\\ &\{X,X,X\},\{X+1,X+1,X+1\}. \end{align}$$   My question is the problem above. I can understand the solution, but how can I see that the solutions given are from distinct isomorphism classes? For instance, is the below true? $$R/(X)\oplus R/(X)\oplus R/(X)\cong R/(X+1)\oplus R/(X+1)\oplus R/(X+1)\\ \cong F_2\oplus F_2\oplus F_2$$  Thanks for any help.


I'm having trouble accessing variables and functions defined in a library. When I tried to create a simple library code, I was still having trouble calling the library functions. The library .c file is shown below tony@glroadway:~/testlib$ cat MyLib.c int abc = 123;  void set_var(int a) {         abc = a; }  int get_var() {         return abc; } tony@glroadway:~/testlib$  The main function code is shown below. tony@glroadway:~/testlib$ cat main.c #include "stdio.h" int get_var(); void set_var(int);  int main(int argc, char** argv) {         set_var(44);         int b = get_var();         printf("%d\n", b);         return 0; } tony@glroadway:~/testlib$  The code compilation: tony@glroadway:~/testlib$ ls -l total 8 -rw-rw-r-- 1 tony tony 155 Nov 13 22:40 main.c -rw-rw-r-- 1 tony tony  82 Nov 13 22:15 MyLib.c tony@glroadway:~/testlib$ gcc -fPIC -c MyLib.c tony@glroadway:~/testlib$ gcc -shared -o libmylib.so MyLib.o tony@glroadway:~/testlib$ ls -l total 28 -rwxrwxr-x 1 tony tony 15704 Nov 16 15:36 libmylib.so -rw-rw-r-- 1 tony tony   155 Nov 13 22:40 main.c -rw-rw-r-- 1 tony tony    82 Nov 13 22:15 MyLib.c -rw-rw-r-- 1 tony tony  1688 Nov 16 15:36 MyLib.o tony@glroadway:~/testlib$ gcc -L./ -lmylib -o testlib main.c /usr/bin/ld: /tmp/ccE18z8U.o: in function `main': main.c:(.text+0x19): undefined reference to `set_var' /usr/bin/ld: main.c:(.text+0x23): undefined reference to `get_var' collect2: error: ld returned 1 exit status  tony@glroadway:~/testlib$ gcc --version gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  Please let me know if I should provide more details. tony@glroadway:~/testlib$

Why does the order in which libraries are linked sometimes cause errors in GCC?


Here is my sqrt function. I want to output the double value with specific precision.  But I was getting this output: "the sqrt of 0.5 is: 0.7071069999999999 "  The odd thing is, when I was debugging, the longResult is 707107  public static double precision = 0.000001;  // the main sqrt function using binary search public static double Cal(double input){     if(input < 0) return -1;     if(input == 0 || input == 1) return input;      // the sqrt value shall be between 0 ~ input. we use 二分法 to search for the value;     double min = 0;     double max = input;     if(input < 1) {         min = input;         max = 1;     }      double mid = 0;      while(max - min > precision){         mid = (min + max) / 2;         if(mid * mid == input) return mid;         else if(mid * mid < input) min = mid;         else max = mid;     }     long longResult = (long)((max + min) / 2 / precision);     return longResult * precision; }  public void Test(){     double input = 0.5;     System.out.println(String.format("the sqrt of %s is: %s", input,Sqrt.Cal(input))); }

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


I'm working on this problem  Let $f$ be a continuous function on $\mathbb{R}$ such that $\lim\limits_{x \to \infty} f(x) = L^{+}$ and $\lim\limits_{x \to -\infty} f(x) = L^{-}$. Prove that for any real $c$ strictly between $L^{+}$ and $L^{-}$ there exists $x \in \mathbb{R}$ such that $f(x) = c$   Edits: assume $L^{-}$ and $L^{+}$ are real numbers, $L^{-} < L^{+}$  This is trivial if we could get this into the form of $f:[a,b] \rightarrow \mathbb{R}$ and $f(a) < c < f(b)$ because we could use the intermediate value theorem. To get it int that form, my intuition says that we can pick an $a, b \in (-\infty, \infty)$ such that $L^{-} < f(a) < c < f(b) < L^{+}$ and then apply IVT, but I was wondering if one would need to show that more rigorously, and if so, how? My attempt Show that exists $a \in (-\infty, \infty)$ such that $L^{-} < f(a) < c < L^{+}$. Proof by contradiction, assume $\forall a \in (-\infty, \infty) \; f(a) \leq L^{-}$. But $$\begin{align} \lim\limits_{x \to \infty} f(x) = L^{+} &&\text{given}\tag{1}\\ \forall \epsilon > 0 \; \exists X, \forall x \geq X \; &&|f(x) - L^{+}| < \epsilon &&\text{definition of limit}\tag{2} \\ \forall \epsilon > 0 \; \exists X, \forall x \geq X \; &&-\epsilon + L^{+} < f(x) < \epsilon + L^{+}&&\text{expand abs value}\tag{3} \\ \forall \epsilon > 0 \; \exists X, \forall x \geq X \;&&L^{-} < -\epsilon + L^{+} < f(x) < \epsilon + L^{+} &&\text{choose epsilon, archimedean property}\tag{4} \\ &&f(a) \leq L^{-} < -\epsilon + L^{+} < f(x) < \epsilon + L^{+} &&\text{assumption}\tag{3} \\ \end{align}$$ Then we have $\forall a \in (-\infty, \infty) \; f(a) \leq L^{-}$ but this contradicts, for the right choice of $\epsilon$ and $X$ $\forall x > X, \; L^{-} < f(x)$ Therefore must exists $a \in (-\infty, \infty) \text{ such that } L^{-} < f(a)$. By similar argument we can say, $\exists a \in (-\infty, \infty) \text{ such that } L^{-} < f(a) < c$ and $\exists b \in (-\infty, \infty) \text{ such that } c < f(b) < L^{+}$. Finally we get to $f(a) < c < f(b)$ and we know that $f$ is continuous on $[a, b]$ since $[a, b] \subset (-\infty, \infty)$. Then we apply IVT to finish.

Here is the statement :  "Let $f: (a,b) \to \mathbb{R}$ a continuous function on $(a,b)$ with $a<b$ and $a,b \in \bar{\mathbb{R}}$. Then for all $u \in \left(\lim \limits_{x\to a} f(x), \lim \limits_{x\to b} f(x) \right)$ or $u \in \left(\lim \limits_{x\to b} f(x), \lim \limits_{x\to a} f(x) \right)$ (with $\lim \limits_{x\to a} f(x) \ne \lim \limits_{x\to b} f(x)$) there is $k \in (a,b)$ such that $f(k) = u$."  So we have three main cases :   Let $a,b \in \mathbb{R}$ with $\lim \limits_{x\to a} f(x)= \pm \infty$ and $\lim \limits_{x\to b} f(x)= \pm \infty$. Let $a=-\infty$ and $b=+\infty$ with $\lim \limits_{x\to -\infty} f(x)= c\in \mathbb{R}$ and $\lim \limits_{x\to +\infty} f(x)= d\in \mathbb{R}$. Let $a=-\infty$ and $b=+\infty$ with $\lim \limits_{x\to -\infty} f(x)= \pm \infty$ and $\lim \limits_{x\to +\infty} f(x)= \pm \infty$.   I tried to prove the first case. I want to apply the initial theorem which only works for compact interval.   WLOG, I suppose that : $\lim \limits_{x\to a} f(x)= - \infty$ and $\lim \limits_{x\to b}(x)= + \infty$  Writing the definition of limits I obtain :   $\forall A \in \mathbb{R}, \exists \eta_1>0, \forall x \in (a,b), \mid x-a\mid \le \eta_1 \Rightarrow f(x) \le A$. $\forall B \in \mathbb{R}, \exists \eta_2>0, \forall x \in (a,b), \mid x-b\mid \le \eta_2 \Rightarrow f(x) \ge B$.  Then for $k \in (a,b)$, I can chose $\eta_3 = \min\{\eta_1, \eta_2\}>0$ such as for $x\in [k-\eta_3, k+ \eta_3]$ I have $f(x) \in [B,A]$.  Does that imply that I can apply the usual theorem ?  Thanks in advance !


I need to prove that if $K_1\supset K_2 \supset K_3 \supset K_4 \supset \ldots$ is a chain of proper containments and each $K_{i}\subseteq \mathbb{R}^{n}$ is compact, then $\bigcap_{i=1}^{\infty} K_{i} \neq \emptyset$.  I understand that $K_i \neq \emptyset, \forall i$ because of the proper subset condition and since the empty set has no proper subsets.   I also understand that the compact condition is necessary in order to prevent sets that limit, at infinity, to an empty set but for no $i$ are empty themselves (example: $K_i=(0, 1/i)$).   However, I'm not sure how to complete.

Let $\{K_i\}_{i=1}^{\infty}$ a decreasing sequence of compact and non-empty sets on $\mathbb{R}^n.$ Then $\cap_{i = 1}^{\infty} K_i \neq \emptyset.$  I heard about a proof that take $x_i \in K_i.$ Then I have constructed a sequence. It is bounded because for every $i$, $x_i \in K_1$ that is bounded. Then there is a subsequence that converges. That is where I stopped. What indeed means that a subsequence converges? And why does the limit of such subsequence is in every $K_i,$ showing that such intersection is not empty.  Thank you!


Problem: Consider $\Bbb R^\omega$ with the uniform topology. Show that $\mathbf x = (x_1,x_2,\dots)$ and $\mathbf y = (y_1,y_2,\dots)$ lie in the same component of $\Bbb R^\omega $ if and only if the sequence $\mathbf x -\mathbf y = (x_1-y_1,x_2-y_2,\dots)$ is bounded.  I can prove it from left: assume that $|x_i-y_i| ≤ M$ for all $i∈\omega$. Consider $f(t)=t\mathbf x +(1-t)\mathbf y$. We can check that $f$ is a continuous function from $[0,1]$ to $\Bbb R^\omega$. Then $\mathbf x$ and $\mathbf y$ can be joined by $f(t)$, so $\mathbf x $ and $\mathbf y$ lie in the same component. But, how to prove it from right?

I am working on an exercise problem about components and path components of $\mathbb{R}^{\omega}$. Specifically,     Exercise about components and path components:   1. What are the components and path components of $\mathbb{R}^{\omega}$ in the product topology?   2. What are the components and path components of $\mathbb{R}^{\omega}$ in the uniform topology?   3. What are the components and path components of $\mathbb{R}^{\omega}$ in the box topology?   I can only handle with only parts of the problem (about components):     My partial solution:   1. $\mathbb{R}^{\omega}$ in the product topology is connected, so its only component is $\mathbb{R}^{\omega}$.   2. $\mathbb{R}^{\omega}$ in the uniform topology is not connected ().  There are two components: $A$ consisting of all bounded sequences of real numbers and $B$ of all unbounded sequences.  [EDIT: I realized that the answer is wrong: $A$ and $B$ constitute a separation of $\mathbb{R}^{\omega}$ in the uniform topology. However, this does not imply that $A$ and $B$ are two components of it. So, I have no idea of this problem.]   3. No idea.   Therefore:        Is my partial solution correct?        How to figure out the other parts of the problem?


We are planning to put an nginx reverse proxy in front of a static site and expect a traffic of about 120k http requests per minute on that. Mostly doing proxy_pass with some address concatenation op on the incoming request... We wanted to know from nginx experts here if nginx needs more of a cpu intensive server hardware or memory intensive or both? What cpu and memory do you think will be optimal for this application? Thanks in advance for the expert help... The suggested links (capacity planning) and (load testing) to other questions are totally different from what we are looking for. We are specifically looking for answers related to nginx server requirements whereas the suggested links talk about capacity planning and load testing for large infrastructure projects with multiple components to it (both are irrelevant to our question) We are looking for nginx server optimization and requirements.

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


Trying to figure out how to best implement this.  I am trying to add in a condition to show a value if a checkbox is check versus showing a value if it isn't.  Keep in mind that I have more picklists to add after this, so I would have a "," after customer and add the next condition.  I keep getting this error: Error: Incorrect parameter type for function 'OR()'. Expected Boolean, received Text  Thoughts??  IF( OR( ISPICKVAL(Picklist1, "Customer"), ISPICKVAL(Picklist2, "Customer"), ISPICKVAL(Picklist3, "Customer"), ISPICKVAL(Picklist4, "Customer"), ISPICKVAL(Picklist5, "Customer"), AND(Checkbox_Verify__c, NOT(Checkbox_Override__c)), "Not A Customer", ""), "Customer", "")

Trying to figure out how to best implement this. Background:  Have a current formula field that captures if a picklist value is X for any of the picklists show X in the formula.  There is a coded backend calculator that houses the proper tier order.  For example, if someone selects "Happy" on the picklists, it's the top tier value so the field would "Happy" versus "Silly".  Consider this formula field's structure as the order (tier).  I need to add in two checkboxes to this formula field.  Checkbox1 indicates that if someone selects "Happy" and the checkbox is checked, the formula field shows "Unhappy".  If checkbox2 is checked, it overrides the checkbox1 behavior to show "Happy" include (nullifying the "Unhappy" result).  I need to have an override function.  But I cannot manage to figure this one out.  Any thoughts???      IF( OR( AND( Checkbox1__c = TRUE, Checkbox2__c = TRUE, RecordType.DeveloperName = 'XXX' ), ISPICKVAL(Picklist1__c, "Happy"),  ISPICKVAL(Picklist2__c, "Happy"),  ISPICKVAL(Picklist3__c, "Happy"),  ISPICKVAL(Picklist4__c, "Happy"),  ISPICKVAL(Picklist5__c, "Happy") ) 'Happy', 'Not Happy' ),  IF( OR( AND( Checkbox1__c = TRUE, Checkbox2__c = TRUE, RecordType.DeveloperName = 'XXX' ), ISPICKVAL(Picklist1__c, "Silly"),  ISPICKVAL(Picklist2__c, "Silly"),  ISPICKVAL(Picklist3__c, "Silly"),  ISPICKVAL(Picklist4__c, "Silly"),  ISPICKVAL(Picklist5__c, "Silly") ) 'Silly', 'Not Silly' ),  IF( OR( AND( Checkbox1__c = TRUE, Checkbox2__c = TRUE, RecordType.DeveloperName = 'XXX' ), ISPICKVAL(Picklist1__c, "Sad"),  ISPICKVAL(Picklist2__c, "Sad"),  ISPICKVAL(Picklist3__c, "Sad"),  ISPICKVAL(Picklist4__c, "Sad"),  ISPICKVAL(Picklist5__c, "Sad") ) 'Sad', 'Not Sad' ),  IF( OR( AND( Checkbox1__c = TRUE, Checkbox2__c = TRUE, RecordType.DeveloperName = 'XXX' ), ISPICKVAL(Picklist1__c, "Angry"),  ISPICKVAL(Picklist2__c, "Angry"),  ISPICKVAL(Picklist3__c, "Angry"),  ISPICKVAL(Picklist4__c, "Angry"),  ISPICKVAL(Picklist5__c, "Angry") ) 'Angry', 'Not Angry' )


I've read a couple of post's on here and followed the queries word for word (minus my variable names) and I cannot get my code to run on a website I'm working on without errors appearing. All I have is a form where user's can upload an image.  My original code which was vulnerable but worked:  <?php   $uploadDir = 'images/';     if(isset($_POST['upload']))   {     $fileName = $_FILES['userfile']['name'];     $tmpName = $_FILES['userfile']['tmp_name'];     $fileSize = $_FILES['userfile']['size'];     $fileType = $_FILES['userfile']['type'];     $memberID = $_POST['member-id'];     $imgTitle = $_POST['img-title'];     $catID = $_POST['catID'];      $filePath = $uploadDir . $fileName;      $result = move_uploaded_file($tmpName, $filePath);      if (!$result) {       echo "Error uploading file";       exit;      }      echo "
Files uploaded
";      if(mysqli_connect_errno())      {        printf("Connect failed: %s\n", mysqli_connect_error());        exit();      }       if(!get_magic_quotes_gpc())         {          $fileName = addslashes($fileName);          $filePath = addslashes($filePath);         }           $query = "INSERT INTO `tblImage` (`fldImageID`, `fldMemberID`, `fldCatID`, `fldFilePath`, `fldName`) VALUES (NULL, '$memberID', '$catID', '$filePath', '$imgTitle')";          $query = "SELECT `fldImageID` FROM `tblImage` ORDER BY `fldImageID` DESC LIMIT 1";           $result = $conn->query($query) or die ("error");   }  ?>   and then the below is where I have tried to carry out prepared statements with no luck, please can someone point where my error is I've only pasted the below code which overwrites the above code where $query begins....      $stmt = $conn->prepare = ("INSERT INTO tblImage (fldImageID, fldMemberID, fldCatID, fldFilePath, fldName) VALUES (NULL, ?, ?, ?, ?)");      $stmt->bind_param($stmt, "ssss", $memberID, $catID, $filePath, $imgTitle);      mysqli_stmt_execute($stmt);     $stmt->execute();     $result = mysqli_stmt_get_result($stmt) or die ("error");   Error Message on web page:

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


While reading Atlas Shrugged I've come across a number of conversations similar to the following:     Person 1: "You're a louse!"      Person 2: "I?"   This sounds very odd to me, but I can see how 'I?' could be short for 'I am?'.  I've looked around trying to discover if this is grammatically correct and I've learned about personal pronouns (I, you, he, she, it, we, they) and objective personal pronouns (me, you, him, her, it, us, them).  Personally, I think the conversation sounds much better like this:     Person 1: "You're a louse!"      Person 2: "Me?"   ...with the reasoning that this:     Person 1: "He's a louse!"      Person 2: "Him?"   sounds much better than this:     Person 1: "He's a louse!"      Person 2: "He?"   Therefore I think the correct grammar in this scenario is the objective personal pronoun (me) rather than the personal pronoun (I). I'm not sure, though.  Can anyone give me some concrete rules about this scenario?

I was taught at school that the following expression is not grammatically correct:  Who is there? It's me.  The correct one is:  Who is there? It's I.  Can you let me know which one is accurate?


I'm trying to update tortoisehg as the current version that I have is 2.2, however:  $ sudo apt-get install tortoisehg tortoisehg is already the newest version   I have also tried these commands:  sudo add-apt-repository ppa:tortoisehg-ppa/releases sudo apt-get update sudo apt-get install tortoisehg   But I'm getting add-apt-repository: command not found

I want to install:  add-apt-repository ppa:ricotz/testin   It is showing:  The program add-apt-repository is currently not installed. You can install it by typing: sudo apt-get install python-software-properties   What should I do now?


I have tried the following by modifying the name of the authors. Everything was fine, except the first name of the second author. I want a dot to be displayed over only I of Ihsan. Any help is appreciated, the MWE based on the bib file is displayed for the reference.  @article{18, title={Developing a fuzzy analytic hierarchy process (AHP) model for behavior-based safety management}, author={Da{\u{g}}deviren, Metin and Y{\"u}ksel, {\.{I}hsan}}, journal={Information Sciences}, volume={178}, number={6}, pages={1717--1733}, year={2008} }

How to write in bibliography (package natbib) letter "a" with two dots above? Specially, I mean the word Birkhäuser.  Is there a general rule or way how to write such umlauts or other accented letters in bibliographies?


Sorry if this is a nooby question, but I recently tried to catch if a float is null with the if-statement, like:  Calculate.setOnClickListener(new OnClickListener() {      @Override     public void onClick(View v) {         final EditText Capital = (EditText)findViewById(R.id.Capital);         final float Capitalf = Float.valueOf(Capital.getText().toString());         if(Capitalf == "0"){             Toast.makeText(getApplicationContext(), "Please insert something!",             Toast.LENGTH_LONG).show();         }            } });   I already tried to make a String from Capital and check it with .equals, but it wasnt working. I also tried to catch the exception with try and catch, but the app still crashed by clickling on the button with no values.  It would be great, if anyone could help me, and sorry for my bad english, Im from austria.

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


How do yo convert this 2014-11-03 17:01:37 into Unix Timestamp? Is there a method that I can use.

How do I get timestamp from e.g. 22-09-2008?


how should i can install my iball3.5gh-72 modem in Ubuntu 13.10

I purchased iball 3.5G  connect wireless modem 1 month before. I am trying to connect it with my laptop which is having ubuntu Operating System. After plug-in it to the ubuntu system it is not connecting with net.   This modem is plug and play but after plugging it nothing is displaying to the system.  I am expecting step-by-step method to connect this modem with my ubuntu 12.04 LTS sysetm from your expert's advice.


My laptop runs 14.04. It receives connection through WiFi. However, I have a couple of Windows laptop in vicinity which requires internet connection. Is there any way that my laptop acts as server to provide internet connection via ethernet or wifi to other laptops ?

I know how to create a hotspot when connected to a wired network, but when I am using internet from a WiFi connection, this disconnects the wireless connection the moment I activate the hotspot.  In Windows I can use , which enables me to share the internet connection from the same wireless adapter as I am creating an access point on. As you can read on the :     Access Point mode allows you to create a hotspot using the same Wi-Fi card that you are using to access the Internet.   How do I do this on Ubuntu?


I found out there is 36.05% (Basic Customs duty @ 35% + Education Cess @3%) on the value of dutiable goods that is in excess of the Duty Free Allowance of 50000 rupee, according to 2016 Indian baggage rules.  Are there any other applicable taxes on top of this?

I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer?  What all I can take?   One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport.  Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff?


I'm an old guy. I seem to remember a day (40s or 50s) where a NFL runner was tackled and would be allowed to get up and continue to run. This was before the runner was considered down if his knee touched the ground. Doing a search on google, I couldn't find such a rule change. Am I dreaming?

In what year(s) in the NFL was the runner allowed to get up and run after being knocked off his feet, as long as they weren't tackled and held down? From memory, it only lasted 1 or 2 years because it caused lots of injuries. I think it was in the 50s but could have been in the early 60s also.


Query with multiple table joins is taking too much time. How to do the indexing for the query below:  QUERY:  select  ri.id, LOWER(REPLACE(ri.name,' ','-')) as urlName,ri.name, ri.logo, group_concat(distinct rc.cuisine order by  rc.cuisine asc SEPARATOR ',         '             ) as 'cuisine_string', rc.cuisine, rai.rating, rai.min_order_amount,         rai.latitude, rai.longitude, rai.delivery_time, rdf.start_dist, rdf.end_dist, rdf.fee, ri.address_search, rai.delivery_facility, ri.status as 'restaurant_status', rt.day, rt.status 'opening_status', rt.opening_time, rt.closing_time, ' - ',rdf.end_dist, ' km',' : ','₹',fee) SEPARATOR '~') as 'delivery_fee_string', GROUP_CONCAT(distinct CONCAT(rdf.start_dist, ( SELECT  MATCH (ri.address_search) AGAINST ('Kahilipara,                 Guwahati, Assam, India') as relevance             from  restaurant_info ri             where  ri.id = rai.restaurant_id               and  ri.id = rt.restaurant_id               and  ri.id = rdf.restaurant_id               and  ri.id = rc.restaurant_id) as ord , ( 3959 * acos ( cos ( radians(26.1428694) ) * cos( radians( rai.latitude ) ) * cos( radians( rai.longitude ) - radians(91.768487) ) + sin ( radians(26.1428694) ) * sin( radians( rai.latitude ) ) ) ) AS distance     from  restaurant_info ri     inner join  restaurant_additional_info rai  ON ri.id = rai.restaurant_id     inner join  restaurant_timing rt  ON ri.id = rt.restaurant_id     inner join  restaurant_delivery_fee rdf  ON ri.id = rdf.restaurant_id     inner join  restaurant_cuisine rc  ON ri.id = rc.restaurant_id     where  ri.status = 1       and  rt.status = 1       and  rt.day = lower(DATE_FORMAT(NOW(),'%a'))       and  rai.delivery_facility != 1       and  rai.min_order_amount <= 100       and  rai.rating <= ''       and  MATCH (ri.address_search) AGAINST ('Kahilipara, Guwahati,                 Assam, India'                  )       and  rt.opening_time < '12:40:21'       and  rt.closing_time > '12:40:21'     group by  ri.id     having  rdf.start_dist = 0       and  distance < 3.10686     order by  distance asc     LIMIT  100 OFFSET 0   DESCRIPTION OF PROBLEM- This Query is taking 8.5 seconds to run. My application contains 1-2 such queries.Therefore loading time approaches 1 min on server.  Can anyone help me to apply indexing on this query?

I've got a working PHP script that gets Longitude and Latitude values and then inputs them into a MySQL query. I'd like to make it solely MySQL. Here's my current PHP Code:  if ($distance != "Any" && $customer_zip != "") { //get the great circle distance      //get the origin zip code info     $zip_sql = "SELECT * FROM zip_code WHERE zip_code = '$customer_zip'";     $result = mysql_query($zip_sql);     $row = mysql_fetch_array($result);     $origin_lat = $row['lat'];     $origin_lon = $row['lon'];      //get the range     $lat_range = $distance/69.172;     $lon_range = abs($distance/(cos($details[0]) * 69.172));     $min_lat = number_format($origin_lat - $lat_range, "4", ".", "");     $max_lat = number_format($origin_lat + $lat_range, "4", ".", "");     $min_lon = number_format($origin_lon - $lon_range, "4", ".", "");     $max_lon = number_format($origin_lon + $lon_range, "4", ".", "");     $sql .= "lat BETWEEN '$min_lat' AND '$max_lat' AND lon BETWEEN '$min_lon' AND '$max_lon' AND ";     }   Does anyone know how to make this entirely MySQL? I've browsed the Internet a bit but most of the literature on it is pretty confusing.


What are the force that act on the water and which force is responsible to keep the water from falling out?

Let's take a bottle (no cap) with half its volume filled with water. If we rotate the bottle at some slower average velocity, water does not drop out of it. The same principle works on . Wikipedia says that the phenomenon of  is used here. What is the physics behind this? (I mean, Which opposes or equilibrates gravity during the vertical loop?)


I thought the task would be so easy I will be able find an answer in a second. As it turned out, I can't make my verb| | look smaller without changing the "global" settings (which isn't what I want). I want to set a scale factor or a font size a bit smaller for the default's (I guess it's CM) typewriter font. How can I do it? \documentclass[10pt]{article} % expect something like this \usepackage[scale=0.9]{monospacefont} \begin{document} Hello \verb|world| \end{document}

I want to apply small fonts inside the Verbatim environment e.g.  {\small  \begin{Verbatim}  1   double x, y; 2   double z, w; 3   main(); 4   return 0;  \end{Verbatim}}   Before the command \small and after the closing braket } text has normal size, which is obvious but the font size should be small inside the brakets.     Why is this command not applied to the environment's contents?


For example, I run  sleep 1 | sleep 2 | sleep 3 &   How do I get process ids of each part? I could examine output of jobs -l but its format may wary among shells and I am looking for a simpler way.

If, in bash, I execute:  cmd1 | cmd2 | ... | cmdi | ... | cmdn &   where the cmd{1..n} may not be distinct, how do I get the PID of cmdi? Alternatively, how can I signal the cmdi process? (For example, send it SIGUSR1?) pkill/pgrep, pidof etc. don't look like good answers, since other instances of cmdi maybe running, including as part of the same pipeline. jobs -p gives the PID of cmd1, for me.   i can be anything in {1..n}.


I'm trying to prove that, for positive integers, $m$ and $n$, there is a homomorphism from $F_n$ onto $F_m$ if and only if $m$ is less than or equal to $n$ (where $F_n$ is the universal free group with $n$ generators).  Working on the forwards direction of the proof now -- this is what I have so far:  First, assume that $\phi$ is a homomorphism from $F_n$ onto $F_m$. Assume for the sake of contradiction that $m>n$. Then, for some $x_i$, $\phi(x_i)$ must map to two generating elements in $F_m$, call them $y_a$ and $y_b$.   I get stuck here. I think that because $y_a$ and $y_b$ are non-unique in $F_m$ and part of the definition of a universal free group is that every word is written in a unique way, a contradiction should arise.  Am I on the right track?

Let $F_a$ be the group which is freely generated by $a$ elements. How to show that there is a homomorphism from $F_a$ onto $F_b$ if and only if $b\le a$?  I was thinking one possibility is if $F_a$ generated freely by $\{x_1, \dots , x_a\}$ and $F_b$ generated freely by $\{y_1, \dots , y_b\}$ then consider map which says $\phi(x_i)=y_i$ for $1\le i \le b$ and $y_1$ otherwise. I do not know if this works or even how to proceed. How to show this fact?


Are there characters in latex for separating text? To place where one thought ends and another begins

How do I put a decorative separator (like three asterisks or other symbols) in a text document so as to separate two sections of text, but not in a way that depends on LateX \section commands?  Such symbols used to be relatively common in books, but seem less common now.  NOTE: The proposed duplicate says "I would like to use a symbol", and the answers mostly reflect that. But I don't care if the decorative separator is a single symbol; in fact, it is better if it isn't. So, this question is more general than that one.


I had to find the equation of curve that represent my data. After trying different function, I got a models that seems fitting my data, at least by plotting them. But this is it. I have no idea how to understand if my model is good, based on the summmary of my model. I have no good statistical background(sorry!) and I am working since few months with R.  This are my data:     structure(list(height = 3:16, Suitable_Area = c(12153L, 9789L, 8712L, 7985L, 7574L, 7086L, 6543L, 6242L, 5943L, 5559L, 5188L, 4898L, 4680L, 4515L), Group = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = "Consecutive Suitable Area", class = "factor")), row.names = c("3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"), class = "data.frame")   This is the function of the curve fitting my data  #Hyperbola for SPLIT 1   #y = (a + (b * x)) / (c + x)  fitHyperbola <- nlsLM( Suitable_Area ~ (a + (b * height))/(c+height), data = Split1 , start = list(a = -3.62, b=1.67,c=-2.50))     At this point, I would look for the RMSE or the R-squared. I am able to get them by doing a summary of a linear model, but not with nlsLM, which provide me info about the a,b, and c of the equation.

I've fitted my model and am trying to understand whether it's any good. I've calculated the recommended metrics to assess it ($R^2$/ AUC / accuracy / prediction error / etc) but do not know how to interpret them. In short, how do I tell if my model is any good based on the metric? Is an $R^2$ of 0.6 (for example) sufficient to let me proceed to draw inferences or base scientific/business decisions?     This question is intentionally broad, to cover a wide variety of situations that members frequently encounter; such questions could be closed as duplicates of this one. Edits to broaden the scope beyond the metrics mentioned here are welcome, as are additional answers - particularly those that offer insight about other classes of metrics.


I have a problem which I think is a bug. So I have created a for loop:  var multi=2;  for (limit=0; limit < length; limit += 1.2) {       multi++;  }  console.log(multi);   The output is correct for all range of values except for the instance where length=10.8 or any multiples thereof. The output shows as multi=12 which in fact it should be 11.  Can somebody tell me why is this happening?  Thanks!

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


The basic assumption about inescapability beyond the Event Horizon is that the necessary escape speed (orbital speed) would exceed speed of light, therefore no object can achieve it. Now, would it be possible to escape it by other means, say, by mechanical push against the gravity, through application of force without increase of speed?    First, short introduction: What is a ? (feel free to skip or skim this section if you know it):  Dyson Ring is a hypothetical, artificial, ring-shaped structure surrounding a massive body (e.g. a star), rotating - essentially orbiting it - rotating at speed slightly higher or lower than orbital speed necessary to maintain orbital equilibrium - state of freefall near its surface. This way, its rotation creates centripetal force simulating gravity for inhabitants. It would create a habitat much larger than any planet, given some "rim" it could hold atmosphere, and essentially is a neat sci-fi alternative for a planet - similar conditions, vastly more surface.  The one property of it is that tensile strength of its construction allows it to exist at distance from the central body (star) that is off from normal orbit matter moving at this speed would take.  Most theoretized Dyson Rings move slightly faster than needed, stretched out, with the inner side inhabited, and the Sun in zenith for all of their surface. It is possible though (if not recommended due to buckling risks) to make one that moves slower, the star's gravity not fully overcome by rotation, compressive force applied to the construction.    Now - technological problems aside - of building a Dyson Ring (not habitable and much smaller; a scientific device of ~30km radius.) and bringing it close enough to a Black Hole.  Let's imagine a Dyson Ring that can change its circumference (say, built of segments connected with expanding/contracting actuators) - and, as effect, radius within certain range - specifically between outside and inside of Schwarzschild radius of a selected Black Hole. It is also supplied with power sources that allow to vastly increase its rotary speed.  Now, with the actuators expanded the ring is placed around the black hole, outside the even horizon, rotating so fast that its segment orbit the black hole. Its angular velocity so high the linear velocity of its surface is near to speed of light. Normally the centrifugal force would tear it apart, but it remains in equilibrium with centripetal force of gravity of the black hole.  Now, actuators contract. The angular velocity rises a little, with accordance of law of conservation of momentum, but since we're at relativistic speeds, the increase of angular speed is minimal; it's mostly the ring gaining some mass.  Now, the ring is below the Event Horizon. Since at this altitude orbital speed would exceed the speed of light, any object there would quickly spiral into the black hole. Still, the ring does not, due to its own tensile strength preventing further decrease of its own radius. It moves slower than the orbital speed, but the mechanical strain overcomes the gravity. (note, while below the Event Horizon, we're still pretty far from the singularity, so the forces exerted are not yet extreme enough to cause collapse of matter, and the rapid rotation overcomes great most of the compressing gravitational force)  Expand the actuators, increase the radius of the ring - and it is forced back outside the Event Horizon, able to broadcast its findings.  Possible physically, or am I missing something?

As a thought experiment imagine an incredibly strong spherical shell with a diameter a bit smaller than the event horizon of a particular large black hole.  The shell is split into two hemispheres, and the two hemispheres are released from either side of the black hole such that they will meet and join inside the event horizon, forming a stationary uniform shell around the singularity. Of course, we consider that the shell is flawless, and exactly centred around a stationary singularity - clearly this is an unstable equilibrium but we imagine it is possible.  Is is possible that the structural forces provided by such a shell could be strong enough to resist the extreme gravity conditions inside the event horizon, and hence avoid being sucked into the singularity?      (For the purposes of this question we can consider taking the shell to extreme levels of strength, e.g. consider that the shell is made from a theoretical maximally densely packed neutronium-like material that is strongly resistant to any further compression due to the Pauli exclusion principle).


If I buy a laptop of Dell, HP, Lenovo or Sony I could install any (meant for Laptop) variant of Linux or Windows on any of these devices, quite easily, without having to risk bricking (completely useless) of the device. Also, for example, Ubuntu is able to find out drivers for most I/O devices on any laptop.  But when comes to Android, why is this process so complex and has a serious warning like things can go very wrong. Also, why is that many IO devices on mobile like a fingerprint reader, etc don't work when OS is installed?  Given that, mobile phone has much bigger userbase, I  expected it to have more support from the community. What is lacking? When Ubuntu can pulloff in most laptops, why can't Google (they too want every mobile to use latest Android version) try to do it?  Also, regarding the security updates why it has to be delivered by the phone manufacturers, instead of Google (like in the case of Windows or  Ubuntu on laptop). There are warnings that custom OS installation won't get any security updates on android (Why Google lets this happen? Why can't they do as Ubuntu does? Why don't they provide an Android that can be installed on any device with ease?).

Are there any technical or others reasons why Android is still a firmware and not an OS which can be just installed without a lot of hassle?  Why there is no universal image which could detect appropriate drivers (kernel modules), partition NAND in some standard way and configure boot loader to boot updated OS version?  What stops Google from making a real (less firmware-like) OS (an OS for small ARM, x86 etc. devices)?


I need to create a bibliography that meets very specific style guidelines not compatible with any packages in LaTeX. Therefore, I need to be able to enter the exact text I want to appear in my bibliography. However, I also want to reuse bibliography entries as I would with BibTeX, keeping a central bibliography in a separate file from my documents.  How can I keep my exact bibliography entries in a database similar to BibTeX so that I will be able to \cite them in my documents? (I do not insist on the command being \cite, but I want it to have the same effect as \cite would in a traditional bibliography.)

When you prepare an article for a journal (in my case, Quantum Information and Computation, Rinton Press), often they ask you to use some format for your references; in my case, the following:     [1] R. Calderbank and P. Shor (1996), Good quantum error          correcting codes exist,  Phys. Rev. A, 54, pp. 1098-1106.      [2] M.A. Nielsen and J. Kempe (2001), Separable states   are  more disordered globally than locally, quant-ph/0105090.      [3] A.W. Marshall and I. Olkin (1979), Inequalities:   theory of majorization and its applications, Academic Press (New   York).   The issue is, sometimes (and this is the case) they do not provide a .bst style file for bibtex users. I (and I guess many other people) prefer not to copy all the references of a bibtex file one by one into a tex document. So here is the question I am trying to answer:     What is the easiest way to create a .bst file? (for Rinton or any other publisher)   At first sight, I thought this would be very easy to do: after all, a .bst file is just a mere script to give format to a list. Strangely to me, after a long search I have been unable to find a simple clean solution to this problem. These are the the options I have been looking at:   I have tried to adapt a previous .bst file: concretely, apsrev4-1.bst, which has a similar format. Other people have tried this solution before , . However, it is an ugly option. First, it requires going through the script of the .bst and understanding it. Second, the script format used in different .bst files differs (quite annoyingly), so it is not easy to modify them unless you do understand what's written. The above solution is quite hideous and you really lose time on it, so I was wondering: isn't there any software tool (hopefully with a GUI) that does this job? It should, after all, pretty easy to program for a .bst script expert some sort of program to generate .bst files. There are some related questions in this site asking for something similar , ; there I have seen a couple of proposed apps, but going through their manuals they seem not so easy to use. Isn't there some software tool available to generate a .bst in less than 1 hour of work?   Remarks: ideally I would like to use/personalize/create .bst styles that support eprint fields (e.g. aps4-1.bst).


i am using Qt5 creator , all the files are included in the project  (the class "MyCounter" is created using the IDE wizard) i reduced my code to this one, and when i compile and run:           undefined reference to MyCounter<int>::MyCounter()   main.cpp  #include <QCoreApplication> #include"mycounter.h" //if include "mycounter.cpp" instead of "mycounter.h" works fine   int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); MyCounter<int> x; return a.exec(); }   mycounter.h   #ifndef MYCOUNTER_H  #define MYCOUNTER_H   template<class T>  class MyCounter  {    public:       MyCounter();  };   #endif // MYCOUNTER_H   mycounter.cpp     #include "mycounter.h"    #include <iostream>     template<class T>   MyCounter<T>:: MyCounter()  {   std::cout<<"somthing..."; }

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


I want to open a putty session (SSH) from command line and immediately execute on the remote machine a specific command.  Something like:   putty.exe -ssh user@host -pw pass123 < "cd /some/directory; ll"   But this doesn't work. Is it possible?

When I do putty -ssh user@host -pw password echo "hi"  I get a network error  But if I do putty -ssh user@host -pw password  An SSH session is successfully opened in a putty terminal. But I just want to run a single command. How do I do this in Putty?