the following Example does not work:  \documentclass{article} \usepackage{pst-all}  \begin{document}  \def\FF{x 3 exp 4 mul 3 div x sub 1 add} \def\AbFF{x 2 exp 4 mul 1 sub} \begin{pspicture}(-2.5,-2)(2.5,4) \psaxes[Dx=1,Dy=1]{->}(0,0)(-2,-1.5)(2.2,3.7)[$x$,0][$y$,90] \psplot[plotstyle=curve,linewidth=1.5pt]{-1.3}{1.2}{\FF}% postscript function \def\xs{-1} \multido{\r=-1+0.5}{5}{ \psplotTangent{\r}{1.3}{\FF} \psdot[dotscale=1.2](! \r /x \r def \AbFF) } \end{pspicture} \end{document}   The problem ist the second \r in the line:  \psdot[dotscale=1.2](! \r /x \r def \AbFF)   If I replace it with a number, then everything works fine.

I want to define a constant globally within my pspicture environment as follows:  \begin{pspicture}(4,2) \psgrid \SpecialCoor \def\length{2} \pnode(!\length 1){C} \uput[90](C){$C$} % other codes truncated here for simplicity. \end{pspicture}   The above example does not work.   What is the correct way to do that?


First of all I apologize if this question is too out of topic but it's been bothering me for a while.  From what I've gathered after years of study it seems that set theory is essentially the foundation of modern mathematics.  Now, I've been studying formal logic for a while and it seems to me that logic is even more fundamental than set theory in the sense that we rely on it to prove things about sets. However, from what I've read we also rely on set theory to prove things about logic.  I realize that formal logic is not the same as naïve logic. But if we expect to have a solid foundation for mathematics, shouldn't we have a rigourous approach to the way we reason that is independent from set theory? Is such a thing even possible?  In a nutshell, is it possible to have a reasonable framework for logic that is rigourous and independent from set theory?  I'm sorry if this question is too vague. And maybe a lot of people don't really care as long as everything makes sense. But since modern mathematics is so concerned with consistency and rigour, how do we know logic itself isn't flawed?  I would really appreciate your insight on this topic! Thank you!  PS: Please let me know if this question isn't appropriate for this forum.

I am trying to understand what mathematics is really built up of. I thought mathematical logic was the foundation of everything. But from reading a book in mathematical logic, they use "="(equals-sign), functions and relations.  Now is the "=" taken as undefined? I have seen it been defined in terms of the identity relation.  But in order to talk about functions and relations you need set theory.  However,  seems to be a part of mathematical logic.  Does this mean that (naive) set theory comes before sentential and predicate logic? Is (naive)set-theory at the absolute bottom, where we can define relations and functions and the eqality relation. And then comes sentential logic, and then predicate logic?  I am a little confused because when I took an introductory course, we had a little logic before set-theory. But now I see in another book on introduction to proofs that set-theory is in a chapter before logic. So what is at the bottom/start of mathematics, logic or set theory?, or is it circular at the bottom?  Can this be how it is at the bottom?  naive set-theory $\rightarrow$ sentential logic $\rightarrow $ predicate logic $\rightarrow$ axiomatic set-theory(ZFC) $\rightarrow$ mathematics  (But the problem with this explanation is that it seems that some naive-set theory proofs use logic...)  (The arrows are of course not "logical" arrows.)  simple explanation of the problem:  a book on logic uses at the start: functions, relations, sets, ordered pairs, "="  a book on set theory uses at the start: logical deductions like this: "$B \subseteq A$", means every element in B is in A, so if $C \subseteq B, B \subseteq A$, a proof can be "since every element in C is in B, and every element in B is in A, every element of C is in A: $C \subseteq A$". But this is first order logic? ($(c \rightarrow b \wedge b \rightarrow a)\rightarrow (c\rightarrow a)$).  Hence, both started from each other?


I did my research and some sources are saying there wouldn't be warranty if your iPhone is bought outside your home country. But I don't know if that rule still applies now.   I want to buy online on the US apple store 'cause its waaay cheaper than where I reside now.

I'm about to travel to the US, where iPods / AirPods / iPhone are much cheaper than in my country.   I wonder if Apple's warranty is international, and/or what warranty coverage exists when I return to my country.  Where can I understand what Apple Warranty covers in the US when products leave the US?


My book Isc Nootan 12th reasons for the question that when a voltmeter is connected in parallel and if it had less resistance it would draw some current and potential drop across resistor to be measured will decrease thus an error.In order to avoid this voltmeter has very high resistance.What i dont get is if connect voltmeter across resistor the net resistance in circuit would decrease and thus current drawn should increase.This increase current only passes through voltmeter thus there would be no change in current flowing through resistor,then how is above reasonable?

According to my textbook, it is said that, for an ammeter:     It is essential that the resistance $R_A$ of the ammeter be very much   smaller than other resistances in the circuit. Otherwise, the very   presence of the meter will change the current to be measured.   Which makes definite intuitive sense to me. One would hope its resistance is very low, because otherwise it would be like trying to measure the speed of a car by putting spikes under its tires just before.   However, what it says for voltmeters is not intuitive for me:      It is essential that the resistance $R_V$ of a voltmeter be very much larger than the resistance of any circuit element across which the voltmeter is connected. Otherwise, the meter alters the potential difference that is to be measured.   Why would it having a small resistance cause a hamper on anything? Why does restricting the current of charge carriers a necessity in measuring potential difference in the circuit? This is coming from someone who is very unfamiliar with circuits in general, but trying to learn incrementally.


When I try to use LaTeXiT it only shows the bottom part of the equation, I have no idea what is causing this problem, I've searched the web about it but can't find anything related. It occurs not only on math eqs. but anything. I am on mac OS High Sierra.  Thanks

I am using LaTeXiT (pierre chachatelier, www.chachatelier.fr) - latex equation editor for Powerpoint for mac.  It's producing pdf that appear to be "cropped" on top (see attached) - I've tried already with changing the "margins" option (Preferences>General) but unsuccessfully - don't think that's the problem.   Any hint?   Thanks


I need to add Windows 10 in GRUB.  Windows 10 I have installed in legacy BIOS mode. Similarly as in the screenshot:    Ubuntu 16 I have installed in UEFI mode.  $ [ -d /sys/firmware/efi ] && echo UEFI || echo BIOS UEFI   I have two hard drives. Each operating system is installed on a separate hard drive.  $ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL NAME                    FSTYPE        SIZE MOUNTPOINT LABEL sda                                 465,8G             ├─sda1                  vfat         19,5G            RECOVERY ├─sda2                  ntfs        445,8G            Windows 10 └─sda3                  ntfs          450M             sdb                                 232,9G             ├─sdb1                  vfat          512M /boot/efi   ├─sdb2                  ext2          488M /boot       └─sdb3                  crypto_LUKS 231,9G               └─sda3_crypt          LVM2_member 231,9G                 ├─ubuntu--vg-root   ext4          224G /               └─ubuntu--vg-swap_1 swap            8G                   └─cryptswap1      swap            8G [SWAP]      sr0                                  1024M                .  On Windows, I run the following command:  C:\WINDOWS\system32>bcdboot C:\Windows /s C: /f uefi   I performed this command to create a bootable configuration.  In Ubuntu file /etc/grub.d/40_custom I added the following option:  if [ "${grub_platform}" == "efi" ]; then menuentry "Windows 10 (BCD-UEFI configuration on system drive /dev/sda2)" --class windows --class os {     insmod part_msdos     insmod ntfs     insmod search_fs_uuid     insmod chain      set root='hd0,msdos2'     if [ x$feature_platform_search_hint = xy ]; then       search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  8684C04C84C04103     else       search --no-floppy --fs-uuid --set=root 8684C04C84C04103     fi      chainloader /EFI/Microsoft/Boot/bootmgfw.efi } fi   UUID of the partition labeled "Windows 10":  $ sudo blkid /dev/sda2 /dev/sda2: LABEL="Windows 10" UUID="8684C04C84C04103" TYPE="ntfs" PARTUUID="76692ca8-02"   The problem is booting Windows 10 does not progress further the Windows logo.

Long story short, I installed ubuntu while I was watching netflix and feeling very lazy, and may have lost all my windows 7 files.  Quick summary:    -Windows 7 was installed on Legacy bios and I installed ubuntu on UEFI bios -ubuntu installer didn't detect any other OS on my computer and wanted to write over the disk, so I had to manually edit the partition    -Despite repeated warnings about partitioning windows in the ubuntu installer, I did this anyway, assigning 140 gigs to ubuntu and 500 to windows Now, my computer won't boot into anything but Ubuntu  -in Gparted, it still shows that I have two partitions, and windows 7 boot loader -However, I can't boot into the non-linux partition, and boot loader says I need a recovery disk.  My question is does anyone know if what I've done is fixable? I'm hoping that I can fix it using the way outlined in this thread:   Thanks for the help everyone!  Note: gparted shows:    Foudn linux image: /boot/vmlinuz - 3.13.0.30 - generic   Found linitrd image: /boot/initrd.img - 3.13.0 - 30 - generic   Found linux image: /boot/vmlinuz - 3.13.0 - 24 generic   Found  initrd image: /boot/initrd.img - 3.13.0 - 24- generic   memtest   memtest   Found windows 7 (loader) on /dev/sda1


I have a second internal hard drive, which shows up on the computer:/// page as a long string of numbers and letters (which is always the same).  When I open it its gets mounted as a random (new) location, like /media/max/7830FA191926581F.  It's got some stuff on it already which I can access fine, and want to keep.    I can see with df -h that it's on `/dev/sdb2/:  /dev/sdb2       525G  177G  348G  34% /media/max/7830FA191926581F    How do I set it up so that it's a permanent location, eg as /mnt/drive2 ?

Running sudo fdisk -lu returns the hdd I want to mount as  Disk /dev/sdb   but when I try to mount it from KDE Partition Manager it doesn't show some directories when I try to set up a path (tried showing hidden folders, only displayed 3) and through the konsole with sudo mount /dev/sdb /mnt, I get  mount: wrong fs type, bad option, bad superblock on /dev/sdb,    missing codepage or helper program, or other error     In some cases useful info is found in syslog - try    dmesg | tail or so.   so I tried running sudo e2fsck -f -b 32768 -y /dev/sdb and get  e2fsck 1.42.13 (17-May-2015) e2fsck: Bad magic number in super-block while trying to open /dev/sdb  The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem.  If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:     e2fsck -b 8193 <device>  or     e2fsck -b 32768 <device>   and when I try those variations I get the same message. How do I mount this hard drive? The file type for the hdd is "inode/blockdevice" and I've already created a partition for it but it won't save without a path.  Also, why does it say 17-May-2015?  Many thanks.    EDIT: Was able to find the /dev folder by clicking the bar next to "Look in" however the partitions don't show up even as hidden files but it does show up if I type it into the "Directory:" bar but its not selectable ("Choose" is greyed).    Gparted, as expected, no difference. I'm sure its a file type error..    Re-partition the hard drive in gparted:    and after applying the settings it seems to have worked but upon opening my file manager, the "Devices" listing on the leftside has disappeared! My ssd is not even listed (as it had been before) "Devices" title is not there!


If you've got a string containing for example "how are you?", I would do stringname.replace("how", "How") to have the first word written in Capital H. So far so good. The problem now is, I'm writing this script which at some point accesses the Open Weather Map, and the words are driving me crazy. Until now I just did a  weather2 = self.weather.replace("partly", "Partly") weather3 = weather2.replace("cloudy", "Cloudy") weather4 = weather3.replace("foggy", "Foggy") weather5 = weather4.replace("sunny", "Sunny") weather6 = weather5.replace("rain", "Rain") #and so on   But I can't have 20 .replace().  So I was thinking, and here comes my question: Could I create two lists, one containing the OWM originals, and the other list with the Words it shall be replaced with, and do something like  for name in names      do something

Does anyone know of a really simple way of capitalizing just the first letter of a string, regardless of the capitalization of the rest of the string?  For example:  asimpletest -> Asimpletest aSimpleTest -> ASimpleTest   I would like to be able to do all string lengths as well.


I'm newbie and I don't know how Drupal 7 work! I want to remove with and height from below code:  <img typeof="foaf:Image" src="http://ashkanplastic.loc/sites/default/files/styles/large/public/slider-1a_0.jpg?itok=k4X3QU5U" width="480" height="236" alt="">   Could you please introduce to me why I can not find 480 with $ grep -H -R 492? And please help to remove width and height.

I want to remove width and height properties from img tags in certain content type  Currently it show's like this     but I want


How can I copy files  with extension .ORF from a director and all it's sub-directors to a different director. i.e: I have home/Pictures and it's sub-directories and I want to copy only the files  with .ORF extension to home/TempPictures  I want to specify that I have had a look already here and on a lot of other sites and I haven't find the answer I look for...  Thanks!

I would like to copy all files with a certain extension that are in sub directories to a different folder. I don't want to maintain the directory structure, I just want to copy all files found to a different folder.  I used this command to do it:  cp `find . -name "*.aac"` /media/moasad/New\ Volume/Media\ files/Avengers/Aud/aac/   However, I noticed that If it runs into folders or files with spaces in them the cp function doesn't know what to do and I get an error something like this:  cp: cannot stat ‘./Temporary_Items/martin/Problem’: No such file or directory cp: cannot stat ‘Files/nav-YCA136843.aac’: No such file or directory   Notice that its one file: ./Temporary_Items/martin/Problem Files/nav-YCA136843.aac  But because of the space in "Problem Files", it's confused.


Is the use of "but rather" correct here?     The United States' decision to drop atomic bombs on Hiroshima and Nagasaki was not a diplomatic measure to intimidate the Soviet Union, but rather a military measure designed to force Japan’s unconditional surrender.

Is this comment that I made  grammatically correct?  In Latin, when a group of males and females is combined, the neutral plural form is not used, but rather the masculine is.


How can I block specific telephone numbers on my iPhone? I don't want to get call from specific numbers. if anyone call to me from the blocked number, he should receive a message that "this number does not exist" or "this number is busy" always.

How do I block unwanted callers without jailbreaking?


In the following code, I expect the program to print "Match", because "\D+\d" matches the "x4" part of the string. But it does not print anything. What is the problem?  import re pattern = r"\D+\d" if re.match(pattern, "1x4"):     print("Match");   Thanks

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


My problem is as follows:  % File name: Example.tex \documentclass[journal]{IEEEtran} \usepackage{cite}     \begin{document} \cite{key} \bibliographystyle{IEEETran} \bibliography{bibfile} \end{document}   I want to generate the reference file in a separate PDF output. I can either run the standalone Example.bbl file as input or add the code as suggested below. I want to get the an additional PDF file for example Reference.pdf as an output each time. Example.pdf also contains the reference as a main file.

Some grant agencies require separate pdf files for the main proposal and the references. I guess, it is easier to work this way in Word :-)  In LaTeX, one can create a single PDF file and then split it later using pdftk or other tools. However, is a direct method of creating two separate PDF files: one that contains the main text (with the correct citation information) and the second with all the list of references. I understand that, at the very least this will involve compiling two separate .tex files. That is okay. I just don't want to use additional tools (can be tricky to install on all computers of all collaborators, etc.)  Here is a MWE to play with:  \begin{filecontents}{test.bib}   @ARTICLE{author,     title={A sample article},     author={Random Author},     journal={Random journal},     volume = {10},     year = {2000},   } \end{filecontents}  \documentclass{article} \usepackage{natbib}  \begin{document} As shown by \citet{author}, using references can be interesting  \newpage \bibliographystyle{apalike} \bibliography{test} \end{document}


I want document in specific database schema style. Like in image. I have tried as much I can do, even I am facing issue.   Why access_log & group_id coming up with indentation (I want all line indented similar) Why text exceeds the page width? I tried with \usepackage[paperwidth=5.5in, paperheight=8.5in]{geometry} , \setlength{\textwidth}{6.5in} but even text content exceed page wdith In access_log, I want to create array as appearing in image. Is it possible? Can I create title as it is Users-schema in image width black strip   Link to Source code with DEMo :   Image:

I am trying to create a schema page in LaTeX. It shall look like this.   How can I create schema code which look like this image? There should be also a click to go function. When the user clicks on the user_schema link he should be redirected to that page.  What classes I can use for this? Any suggestions would be appreciated.    \documentclass{article} \usepackage[utf8]{inputenc}  \begin{document} \maketitle  \section{User schema} \mySchema{Users} {     _id: ObjectId - Id do registro     name: String - Nome do usuário     date: Date - Data de Cadastro     ren_date: Date - Data de renovação do Cadastro     email: String - Lorem ipsum dolorsitamet, consecteturadipisicingelit, sed do eiusmodtemporincididunt ut labore et dolore magna aliqua. Ut enim ad minimveniam, exercitationullamcolaborisnisi ut aliquipexeacommodoconsequat. Duisautereprehenderit in voluptatevelit esse cillumdolore eu fugiatnullapariatur. Occaecatcupidatat non proident, sunt in culpa quiofficiadeseruntmollit.     access_log: Array [          {              date: String - Data da ocorrência.             user: ObjectId - Usuário que executou.             action: String - Ação Executada.         }         {              date: String - Data da ocorrência.             user: ObjectId - Usuário que executou.             action: String - Ação Executada.         }     ]     \link{group}{group_id}: ObjectId - Id do grupo. } \end{document}   Here is the image how should it appear:


I am going to download & install java on Ubuntu 12.04 LTS (32-bit system)  On java download page, there are 2 download options.     Java for Linux Platforms   Java for RPM based Linux Platforms     Which would be better suited for Ubuntu?

I want to install Oracle's JRE and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?  Before release Java 7, I followed  to install Java 6.  But it doesn't work for Java 7. There is no package sun-java7-xxx. How can you install Java 7?


I am struggling to understand what frame of reference means in relativity. Imagine the twin scenario. Twin A is at rest, while twin B travels somewhere and back at near the speed of light. If one takes as a frame of reference the one where twin A is at rest, then time goes slowly for Twin B, thus making it so that when B returns, A is older.  Now I get really confused, if I take twin B's rest frame as the frame of reference, then he was stationary all the time, and A was moving at close to the speed of light, thus B will be older than A. What am I getting wrong here?

I read a lot about the classical twin paradox recently. What confuses me is that some authors claim that it can be resolved within , others say that you need . Now, what is true (and why)?


because of resting potential is their a constant leakage current across membrane due to resistance of membrane and ion pumps continuously pump restore the resting potential ?

My bio teacher was discussing the ratios of different ions inside versus outside the cell.   $$\text{OUT:IN}$$  $$\text{K}^+ (1:20)$$ $$\text{Cl}^- (11.5:1)$$ $$\text{Ca}^{2+} (10000:1)$$ $$\text{Na}^+ (10:1)$$  Can someone provide specific details as to the relative quantities of these different ions relative to each other? In other words, given these ion ratios, provide me with how much of each type of ion there are and show why this adds to to -70 mV. I just want to make sure I have a realistic picture of the concentrations.    I think I am mixing up concentration with the ratio between inside and out. Although for every potassium ion outside there are 20 inside, the charge from the total number of potassium ions must be less than that of chloride or it would not be negative inside, right?


I know the set of rational numbers can be well ordered since there exists a bijection from the set of natural numbers and then set of rational numbers by ordering $ℚ$ in this way  my question is, in this case, is $ℚ$  well ordered by the usual $<$? Same thing with the set of integers If you order them in this way: 0, 1, -1, 2, -2.. in this case the set is well ordered by the relation $<$ right? (Since there exists a bijection with the set of natural numbers)

Why can positive rationals be not well ordered?  If we define the relation to be greater than(>), then every subset will have a least element.  Or why are positive or even integers not well ordered?  By the same logic we can always find a least element in any subset.  I know I am wrong at some very fundamental point, but please explain it to me.


The class below is just an example of a wrapper I made to use the thread library.   I assign a name and id for every thread I spawn using this wrapper. For ease of debugging multi-threaded applications, I would like to see the name of the thread displayed on my thread menu in Visual studio 2015 (see image attached).   Is that possible?   I would like to forward a custom name to visual studio or in other words I would like to name my worker threads.   //// Identity //////////////////////////////////////////////////////// class Thread { //// Structors /////////////////////////////////////////////////////// public: // Constructor. Thread (const string& name, const ThreadType type, const function<void ()>& task); // Destructor. ~Thread ();   public: thread::id id;                                string name;                                 ///< The descriptive name of the thread. const ThreadType type;                       ///< The classification type of the thread.

I have a server application that uses "a lot" of threads. Without wanting to get into an argument about how many threads it really should be using, it would be nice to be able to see some descriptive text in the debugger "threads" window describing what each one is, without having to click through to it and determine from the context what it is.  They all have the same start address so generally the threads window says something like "thread_base::start" or something similar. I'd like to know if there is an API call or something that allows me to customise that text.


When I compile the following (almost identical) two pieces of code, there is much more vertical space between both words in the first example than in the second example:  % Much space between the hellos \documentclass{book} \begin{document} \Huge Hello  {\Huge Hello} \end{document}   and  % Almost no space between the hellos \documentclass{book} \begin{document} {\Huge Hello}  {\Huge Hello} \end{document}   What is the reason for that? What difference do the curly brackets make at this point?

Why linebreaks break the line height within certain environments with size-changing macros?  I'm trying to understand what's the difference between these three approaches:   \newenvironment between {} or \begingroup/\endgroup inside a minipage     \documentclass{article} \begin{document} \thispagestyle{empty} \section{With newenvironment}  \newenvironment{env}{\begin{center}\LARGE}{\end{center}} \begin{env}   Text with\\linebreak \end{env}  \section{With begin/endgroup}  \begin{center} {\LARGE Text with\\linebreak} \end{center}  \begin{center} \begingroup \LARGE Text with\\linebreak \endgroup \end{center}  \section{With minipage}  \begin{center} \begin{minipage}{\textwidth}\centering   \LARGE   Text with\\linebreak \end{minipage} \end{center}  \end{document}


I am traveling to the US with my daughter in May 2018. Her US visa expires in October 2018. We are back in our home country in a month. Does she have to have at least 6 months left on her visa at the time of entry in the USA.

I'm a bit surprised from my US Visa. I plan to go to a conference on 3rd of April. Amazingly though, the visa expiration date is written as April 3rd.  So what does that mean. Can I enter the US on April 3rd? or should I enter one day earlier?


This has been haunting me for mostly all my life, a film I saw as a child during the 70s. Can't tell if it was theater or TV.  I basically only remember the last scene of the film:  There is some form of deadlock between a human spaceship and another hostile one (aliens, other humans?). This spaceship has some form of drill as nose cone; which is detachable but has to have someone ride it.      Spoiler The deadlock is solved by some hero climbing into the drill pod and riding it into the hostile ship. I seem to recall his daughter was also on board and tries to dissuade him.    Edit(per comments) I'm almost sure it was a live action film.

This has been a old live-action movie from Asia, most likely Japan. I've seen it some time in the late 80's and I think it's been black/white only.  Earth is invaded by UFOs (small and round, like flying balls), coming from Mars.  Japan (I think) built some kind of super spaceship, initially hidden within some secret port in some kind of island/mountain.  The spaceship looks similar to a classic battleship, but with an added drill below the front.  In the movie's finale it's revealed that this is some kind of   super weapon/bomb that has to be manually piloted by someone. When launched it starts rotating and flies (formed like a bullet but with the drill/corkscrew head).   To defend Earth, the ship is sent on a mission to Venus, where the UFOs seem to originate. I don't remember the specific reason or conclusion here.  The ship starts underwater or launches from the mountain on the island, then taking off and fighting UFOs while leaving Earth's atmosphere.


I am trying to take the inverse Fourier transform of $\frac{1}{k^2+a^2}$. I know what the answer is (something like $e^{-|x|}$), but I'm having trouble actually doing the integral in the inverse Fourier transform.  First I noted that $\frac{1}{k^2+a^2}$ is even in $k$, so it's inverse Fourier transform is $$\frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty \frac{1}{k^2+a^2} \cos(kx) dk$$  Where do I go from here? I tried integration by parts, but that didn't lead anywhere. And looking at the Fourier transform of  $e^{-|x|}$ didn't really help.  Ideas?

I need help to calculate the  Fourier transform of this funcion  $$b(x) =\frac{1}{x^2 +a^2}\,,\qquad a > 0$$ Thanks.


How can we read data from a text file and store in a String variable?  is it possible to pass the filename in a method and it would return the String  which is the text from the file.  What kind of utilities do I have to import? A list of statements will be great.

I've been using the idiom below for some time now. And it seems to be the most wide-spread, at least on the sites I've visited.  Is there a better/different way to read a file into a string in Java?  private String readFile(String file) throws IOException {     BufferedReader reader = new BufferedReader(new FileReader (file));     String         line = null;     StringBuilder  stringBuilder = new StringBuilder();     String         ls = System.getProperty("line.separator");      try {         while((line = reader.readLine()) != null) {             stringBuilder.append(line);             stringBuilder.append(ls);         }          return stringBuilder.toString();     } finally {         reader.close();     } }


Suppose in an empty space two rocketships exists with person A and B of same age inside each. Let A move with velocity c/2 away from B and return. They'll find out that B grew older while A didn't have that change in age due to relative passing of time. But this incident can also be interpreted in another way such that, we can assume B to be moving away while A stood still as there is no other frame to compare with. How will we define proper time and improper time in this case? Do we have to take the initial point of A in space into consideration? Doesn't this mean we're taking space as a universal reference frame?

The paradox in the  is that the situation appears symmetrical so each twin should think the other has aged less, which is of course impossible.  There are a thousand explanations out there for why this doesn't happen, but they all end up saying something vague like it's because one twin is accelerating or you need general relativity to understand it.  Please will someone give a simple and definitive explanation for why both twins agree on which twin is younger when they meet for the second time?


Can't find any nodejs package in Ubuntu 20.04 Manifest . I'm actually running nodejs on Ubuntu 16.04, and planning to Upgrade to Ubuntu 20. Which version should I upgrade to? Thanks in advande.

How can I check the version of the available package in the Ubuntu repositories without installing it?


I'm new to C language, it is required for my degree to complete one course on C programming. Hope the title makes sense... I had a hard time trying to convey what I meant. I'll elaborate here.  The problem I am facing right now is double type data being able to slip through the program undetected when it should have been rejected. This happens when a number very very close to the boundaries I set is provided.   In this assignment, in order to get an HD, my code has to have identical output to the lecturer's. The solutions are able to detect any number larger than the boundaries, no matter how close.   Basically, the program will ask the user to provide a GPA which is from 0 to 4.  I tried the following inputs: 4.01 rejected 4.001 rejected ... 4.000001 rejected But at 4.0000001, it is accepted. This should not happen at all. I am baffled.   Here's my code:  double GPA=-1; /*Flags are being initialised*/ int GPAflag=1; while(GPAflag){     char str[50];     char *ptr;     int isnum=1,n=0,i,point=0;     printf("Enter GPA>");     fflush(stdin);     gets(str);      n = strlen(str);      if(n==0){ /*string length is 0? There was no input, thus invalid*/         printf("Invalid GPA. ");         isnum=0;     }else{         for(i=0;i<n;i++) /*Validates numerical inputs, if not numerical, prompts user with error*/         if(!(str[i]>='0' && str[i]<='9')){             if(str[i]!='.'){                 printf("Invalid GPA. ");                 isnum=0;                 break;             }else{                 point++;             }         }     }     if(isnum){ /*If the input is a number, it may still be invalid*/         GPA=strtod(str, &ptr); /*The string is converted to a double*/         if(GPA>=0&&GPA<=4&&point<=1) /*If GPA is between 0 and 4, and the above is also satisfied (point=1), then the flag is 0 and thus a valid input*/             GPAflag=0;         else             printf("Invalid GPA. "); /*If not, it is still invalid*/     } }   I personally don't think this will be a problem but I would really like to know why it happens, and if possible, a way to fix it.  I can simply make a FOR loop: IF leading number is 4 and there's a '.' -> Reject But this seems like hard coding to me, I think it's rather a workaround than an actual solution.  Or I can change the IF statement from "<=4" to "<4.0000000000000000000000...1". Which in my opinion should lose marks... (if I was the marker I will take marks off for that)  Also, I am totally aware that the function "gets" is primitive and causes many problems (overflow... etc.). I have tried using fgets but it's a pain to implement... replacing the '\n' with '\0' blah blah... we haven't even learnt gets, let alone fgets. Is there a better way to implement fgets? Maybe have a function to replace the '\n'? I've tried that and it refused to work.  Any help and tips are greatly appreciated!

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


import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.concurrent.ConcurrentHashMap;  public class ConcurrentHashMapTest {        public static void main(String[] args) {              Map<String, String> hMap = new HashMap<String, String>();             hMap.put("FIRST", "1");             hMap.put("SECOND", "2");             hMap.put("THIRD", "3");             hMap.put("FOURTH", "4");             hMap.put("FIFTH", "5");             hMap.put("SIXTH", "6");             System.out.println("HashMap before iteration : " + hMap);             Iterator<String> hashMapIterator = hMap.keySet().iterator();              while (hashMapIterator.hasNext()) {                   String key = hashMapIterator.next();                   if (key.equals("FOURTH")){                        hMap.put(key + "-SHIVAM", "I AM NEW KEY IN HMAP");             }             }              System.out.println("HashMap after iteration : " + hMap);       } }    Exception in thread "main" java.util.ConcurrentModificationException   at java.util.HashMap$HashIterator.nextEntry(Unknown Source)   at java.util.HashMap$KeyIterator.next(Unknown Source)   at ConcurrentHashMapTest.main(ConcurrentHashMapTest.java:21)    I am wondering why this exception is coming. The exception is not at all seems to be fair in this case.

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


I am trying to follow the standard QGIS tutorial for Swellendam based on QGIS version 2. Specifically the chapter which address coordinate systems  If I go to a layer and try to re-project it from WGS 84 to WGS 84 / UTM zone 34 S it shows that my data (purple square) is somewhere south of North Africa in the sea. Obviously if I set the CRS all my measurements gets messed up.   How do I proceed or do I only set the project CRS? Please try and explain the reasoning behind this.     Details:  Using Version 3.2 Windows 10

How do I change the projection of my shapefile using QGIS? The default projection is set to EPSG:3003, I want to change it to WGS84 EPSG:32632. When I do a reprojection or I change projection in the properties mask I don't have the correct result. On the left, I have the plan coordinates but they are not correct for the EPSG shown on the right:


I get that for simple linear regression, say y=b0+b1*x + error, the errors should be normally distributed, have no autocorrelation, constant variance. I also understand that there should be no collinearity, and that the relationship between x and y should be linear.  Those are the standard assumptions in an intro to regression. However, as I'm learning about power transforms such as the Box Cox transformation, it's said that the Box Cox attempts to transform either the predictor x or response y to normally distributed if they are skewed in the first place. By this I mean the marginal distribution of x and y, not the distribution of y conditioned on x (this is related to residues).  But other sources say it's not important for x and y to be normally distributed. So I'm thinking, if both x and y are uniformly distributed rather than normally distributed, and then there is a roughly linear relationship between them, wouldn't linear regression also work? You can still have the error be normally distributed in this case right?  For example, say you have a cylindrical bar of chocolate. You want to regress the weight against the length of chocolate that you cut. Since the cross section is the same, the weight is linear with the length. But let's say you cut it using a machine that randomly decides on a length from a uniform distribution (1-10 inches). Then the weight should be uniformly distributed too. You should still have normally distributed residues due to manufacturing tolerance, accuracy of the machine, accuracy of measurement, etc...  A linear regression clearly is suitable in this case, but neither x and y are normally distributed. So I'm guessing, it's not required for x and y to be normally distributed. Please advise.

In linear regression, each predicted value is assumed to have been picked from a normal distribution of possible values. See below.  But why is each predicted value assumed to have come from a normal distribution? How does linear regression use this assumption? What if possible values are not normally distributed?


Why do I get the following error message:  josef@josef-Satellite-L755:~$ apt-get install -f E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? josef@josef-Satellite-L755:~$   Thank you for your help

I get this error whenever I try to install programs using the terminal:  home@ubuntu:~$ apt-get install myunity E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   Also I'm unable to install updates using the terminal.


In bootstrap.css they have added the following style rules after many classes,    display: table; content: " ";   The classes that include this are:    .clearfix:before, .clearfix:after, .dl-horizontal dd:before, .dl-horizontal dd:after, .container:before, .container:after, .container-fluid:before, .container-fluid:after, .row:before, .row:after, .form-horizontal .form-group:before, .form-horizontal .form-group:after, .btn-toolbar:before, .btn-toolbar:after, .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after, .nav:before, .nav:after, .navbar:before, .navbar:after, .navbar-header:before, .navbar-header:after, .navbar-collapse:before, .navbar-collapse:after, .pager:before, .pager:after, .panel-body:before, .panel-body:after, .modal-header:before, .modal-header:after, .modal-footer:before, .modal-footer:after {   display: table;   content: " "; }   My question is why is this blankspace added after and before these classes and why is it's display set to table not something else like display: block or display: inline-block?

I have the age-old problem of a div wrapping a two-column layout. My sidebar is floated, so my container div fails to wrap the content and sidebar.

   There seem to be numerous methods of fixing the clear bug in Firefox:
 overflow:auto overflow:hidden   In my situation, the only one that seems to work correctly is the
 solution, which is a little bit scruffy. overflow:auto gives me nasty scrollbars, and overflow:hidden must surely have side effects. Also, IE7 apparently shouldn't suffer from this problem due to its incorrect behaviour, but in my situation it's suffering the same as Firefox.  Which method currently available to us is the most robust?


So, 3 years ago I was convicted with a simple assault/domestic with a 3 year filing which means it will be completely off my record in november of this year.  Im planning on going to england to visit for 2 weeks in may and was wondering if that was going to be a problem or if im going to be fine.  I was never imprisoned for it but i did have to take like 3 months of a batterers intervention program, but like i said that was 3 years ago.  Is this going to be a problem? and if you answer can you post a source? ive been looking on government websites and couldnt find anything that pertained to my situation.

I have a friend with a criminal record who wants to go to London with me and I'm trying to determine if that is actually a possibility.  This friend was convicted of a class A misdemeanor on Dec 14, 2011 for theft. The court disposition was deferred so they weren't sentenced to any jail time (although they were in jail shortly following their initial arrest and prior to their being bonded out). They were, however, placed on probation for two years.  Since they were never actually sentenced to jail time it seems like, per , that their visiting the UK shouldn't be a problem.


Now, with special relativity applied to the scenario of me getting closer and closer to light speed, my mass would increase with respect to the observer, and also my length would contract in the direction of motion, again with respect to the observer. Now, if this is allowed to continue, there certainly would come a point where my mass would be observed to be very very high, and my length contracted to below my Schwarzschild Radius, now what would happen in this scenario? Would the observer observe a black hole while observing me? if not, what would the observer actually see?(If the observer sees me as a black hole, shouldn't that technically not happen since nothing is different to me from my own point of view!? )  Would I turn into a black hole? and if not, what would the observer see if I do not turn into a black hole? Would the observer notice any gravitational effects from me?

I'm a big fan of the podcast Astronomy Cast and a while back I was listening to a Q&A episode they did. A listener sent in a question that I found fascinating and have been wondering about ever since.   From the show :      Arunus Gidgowdusk from Lithuania asks: "If you took a one kilogram mass and accelerated it close to the speed of light would it form into a black hole? Would it stay a black hole if you then decreased the speed?"   Dr. Gay, an astrophysicist and one of the hosts, explained that she'd asked a number of her colleagues and that none of them could provide a satisfactory answer. I asked her more recently on Facebook if anyone had come forward with one and she said they had not.  So I thought maybe this would be a good place to ask.


How do I get the value of my controller in my lighning controller  I have the following ligntningcomponent:  <aura:component access="global" implements="forceCommunity:availableForAllPageTypes" controller="NavigateToProfielController">     <aura:handler name="init" value="{!this}" action="{!c.openPage}"/> </aura:component>   With The following Controller:  ({     openPage: function (component, event, helper) {         var recordId = component.get("v.LoggedInUserContact");         var url = '/flow/LerarenCommunity_Licentie_Verlenging?varProfielId="' + recordId +'"';         window.open(url, '_self');     } })   In my NavigateToProfielController I need to call LoggedInUserContact from which I want to pass the value to the RecordId  My URL output gives me undefined:  https:.../flow/LerarenCommunity_Licentie_Verlenging?varProfielId="undefined"

i have this attribute in my component:  <aura:attribute name="currentRecordDuns" type="String" />    im trying to send it to the apex controller.  this is the javascript controller:  ({ doInit : function(component, event, helper) {         helper.getAccounts(component); },})     this is the helper:  ({ getAccounts: function(component) {             var action = component.get("c.getAccounts");     action.setParams({         "currentDuns": component.get("v.currentRecordDuns"),         "freeTextFilter": component.find("freeTextFilter").get("v.value")                 });     //Set up the callback     var self = this;     action.setCallback(this, function(actionResult) {         component.set("v.Accounts", actionResult.getReturnValue());                 });             $A.enqueueAction(action);                 },})   this is the apex code:  public class AccConListController {     @AuraEnabled     public static List<Account> getAccounts(String currentDuns,String freeTextFilter) {         String q = 'SELECT Id, Name,DunsNumber, (select name, Phone, Email FROM Contacts where Name like \'%' + freeTextFilter +  '%\' or Phone like \'%' + freeTextFilter +  '%\' or Email like  \'%' + freeTextFilter +  '%\') FROM Account  where DunsNumber=:currentDuns';         //q+= ' and Name like \'%' + freeTextFilter +  '%\'';         List<Account> accounts= Database.query(q);         return accounts;     } }   i didnt get the results i wanted, so i looked at the debug log and saw:     12:13:25:003 VARIABLE_ASSIGNMENT [19]|currentDuns|null   i have no idea why, please advise  EDIT: how do i assign a value to the currentRecordDuns: in my component i call:  <aura:handler name="init" value="{!this}" action="{!c.doInit}" />   this is doInit in the controller:  ({ doInit : function(component, event, helper) {         helper.getDuns(component);     helper.getLeads(component);     helper.getAccounts(component);      component.set("v.showContacts", component.find("checkboxContacts").get("v.value"));     component.set("v.showLeads", component.find("checkboxLeads").get("v.value")); },  })   the function the retrieves the currentRecordDuns:      helper.getDuns(component);   this is the function in the helper:  getDuns:  function(component) {       var action = component.get("c.getDunsByRecordId");     action.setParams({         "currentRecordID": component.get("v.recordId")             });     //Set up the callback     var self = this;     action.setCallback(this, function(actionResult) {         component.set("v.currentRecordDuns", actionResult.getReturnValue());                 });             $A.enqueueAction(action);  },   and this is the function in the apex controller:      @AuraEnabled public static string getDunsByRecordId(id currentRecordID) {      String q = 'SELECT DunsNumber FROM Account  where Id=:currentRecordID limit 1';     List<Account> accounts = Database.query(q);     return (!accounts.isEmpty()) ? accounts[0].DunsNumber : ''; }


ephemeral-ephemeral ECDH is it susceptible to MITM attack ? if yes, can you please give me a detailed answer ( Workflow that can be followed by the attacker) and how we can prevent this attack (static-ephemeral or we can keep ephemeral-ephemeral and change some parameters)?  Thank you in advance

I'm new to cryptography and I just started learning about the Diffie-Hellman key agreement. I read that this system is vulnerable to a man-in-the-middle attack when used alone. What kind of attack is this?


It's common convention to name a domain something like companyname.local for internal Active Directory with integrated DNS.  I'm in a situation where the company name has changed and I would like to rename the domian. I'm aware of the difficulty and implications. I would like to rename it from 'abccorporate.local' to just 'xyz'. I can't think of any reason to keep the '.local', is there one?

This is a  about Active Directory domain naming.   After experimenting with Windows domains and domain controllers in a virtual environment, I've realized that having an active directory domain named identically to a DNS domain is bad idea (Meaning that having example.com as an Active Directory name is no good when we have the example.com domain name registered for use as our website).   , but I'm still not sure about what other rules there are around naming Active Directory domains.  Are there any best practices on what an Active Directory name should or shouldn't be?


Hello i'm using ubuntu 17.10 on a lenovo ideapad 110s and anytime the system suspends it freezes on the lock screen and if I try to to shutdown the computer it stays on the shutdown screen. Holding down the power button is the only way I can shut it down. I've used previous versions of ubuntu on this laptop and haven't had any troubles.

I decided to upgrade to 17.10 on my Thinkpad.  Now every time I try to shut it down via console or menu) or reboot it, it takes ages.  TTY gives me several errors connected to hung_task_timeout_secs, reaching from kworker, over networkmanager down to wpa_supplicant.  I tried reinstalling with different ISOs (daily-build from 2 days ago, beta2, and the rc one from today) and still get the same error every time.  Any ideas what could cause that issue? Right now I'm running 17.10 on two other, different PCs without any problems whatsoever.  EDIT: deborphan doesn't return any orphaned packages. I think I might have found something though. I decided to completely wipe the disc, including my dualboot windows. Reinstalled, and everything worked fine. Today in university the problem reappeared.  Now the interesting part is: I think it is related to my wifi. At home, during installation and after, I had it plugged in via cable, and had no problems at all. But with only wifi in university it reappeared. So I gave it a try and plugged in the cable again at home, and it works again. Removed cable, restarted, and the problem reappears. Wifi-Card is a Qualcomm Atheros.


Say I have a table of numbers 1-6. I throw a 6 sided die a number of times. Each time I get a number I have not already had, I mark it in the table. What is the expected number of times to throw the dice to fill out the table?

What is the average number of times it would it take to roll a fair 6-sided die and get all numbers on the die?  The order in which the numbers appear does not matter.  I had this questions explained to me by a professor (not math professor), but it was not clear in the explanation.  We were given the answer $(1-(\frac56)^n)^6 = .5$ or $n = 12.152$  Can someone please explain this to me, possibly with a link to a general topic?


I might've messed some stuff up and I have icons which lead to a non-existent path in the "Show Applications", I am using Ubuntu 18.04.2 LTS if that helps.  More specifically I tried running Steam through wine, didn't work but made an icon in the "Show Applications" menu. Even when the path is correct it says it's wrong.

I had installed some programms with Wine, but I removed Wine from my computer. Now when I browse all applications in the Unity menu, the symbols of the programms I installed with Wine are still there.  How can I remove them?


Let $P_n=\frac{2^3-1}{2^3+1} \cdot \frac{3^3-1}{3^3+1} \cdot\frac{4^3-1}{4^3+1}...\frac{n^3-1}{n^3+1}$  Then $\lim_{n\to\infty} P_n=\frac{2}{3}$.  I could understand that as $n \to \infty$, the last term in the series approaches $1$. But I couldn't understand how the product evaluates to $\frac{2}{3}$.

Calculate $$\lim_{n \to \infty} \frac{2^3-1}{2^3+1}\times \frac{3^3-1}{3^3+1}\times \cdots \times\frac{n^3-1}{n^3+1}$$ No idea how to even start.


For some reason, I have to login again whenever I haven't touched the data explorer for some unreasonably small period of time (<<< 1 day).  I am logged in with the StackExchange openid.  I usually end up entering the captcha instead when it's just a quick query.  Firefox 37.

On most Stack Exchange sites, when I visit them I am already logged in if I have logged in before. Why isn't it the case with ?


I used the following code to find out the time past between two dates:  $date1 = "1900-00-00"; $date2 = "2000-00-00";  $diff = abs(strtotime($date2) - strtotime($date1));  $years = floor($diff / (365*60*60*24)); $months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24)); $days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));  printf("%d years, %d months, %d daysn", $years, $months, $days);   But this prints 100 years, 0 months, 24 daysn, instead of 100 years, 0 months, 0 daysn  What is going on?

I have two dates of the form:  Start Date: 2007-03-24  End Date: 2009-06-26   Now I need to find the difference between these two in the following form:  2 years, 3 months and 2 days   How can I do this in PHP?


I got 6 domains : company.ca and company.com (because both where free, but we are a canadian company but can do business with the rest of the world).  Then, we sell sportwear because of the company name is totally unknown to the world. Our product is we have bought product specific domain : chandails.ca and t-shirt.ca as well as shorts.ca and shorts.com.  So those 6 domains are mine. Now what is the best way to do? Now all are 301 redirect to the main company name (.com) or make micro-site, super simple one page optimized for just shirt and one for shorts, then tell people to know more, go to the main site.  Because now, I cannot really find the benefit of the search word in domain name edge if never somebody see something in that domain...  I got confused and don't find strait answer to this question.

Lets say I have a domain already, for example www.automobile4u.com (not mine), with a website fully running and all.  The title of my "Website" says:    <title>Used cars - buy and sell your used cars here</title>   Also, lets say I have fully SEO the website so when people searching for the term buy used cars, I end up on the second or first page.  Now, I want to end up higher, so I go to the google adwords page where you can check how many searches are made on specific terms.  Lets say the term "used cars" has 20 million searches each month.  Here comes the question, could I just go and buy that domain with the search terms adress, in this case www.usedcars.com and make a redirect to my original page, and this way when people search for "used cars", my newly bought domain name comes up redirecting people to my original website (www.automobile4u.com)?  The reason I believe this benefits me is because it seems search engines first of all check website adresses matching the search, so the query "used cars" would automatically bring www.usedcars.com to the first result right?  What are the downsides for this?  I already know about google spiders not liking redirects, but there are many methods of redirecting...  Is this a good idea generally?


In Game of Thrones S07E06 when Jon and his group have a standoff with White Walkers we see a few White Walkers (4-6) along with the Night King.   Are they all the White Walkers in the world? Are some of them in some other place? If so, where?

Throughout Game of Thrones, we have seen multiple  die. As far as I remember:   Sam killed one with dragonglass. Jon Snow killed one with Longclaw. Meera Reed killed one with a spearhead made of dragonglass.   So are there a set number of White Walkers that were created by the ? If so, about how many are there?  OR  Can the  just create as many as he wants?


I'm new to Ubuntu..  I'm not sure what just happened, but the screen just went black with the text:  Ubuntu 11.10 "my computer name" tty4  and I was asked to log on.  It happened when I closed Chrome (Alt+F4). This is the second time it has happened, and I cant make it go away :) Even if I log on. Only thing that works is to press Ctrl+Alt+Delete, which makes my PC restart.  Any idea what is causing this?

I tried to install an nvidia driver and there was an error saying I must not be in an X terminal when doing so. So I did a Ctrl+Alt+F1.  The resulting terminal did not allow the nvidia driver to be installed and showed the same error message. How do I revert back to the Unity GUI?


I am travelling from  Washington DC to Copenhagen ( layover 4 hours ) then to Newcastle UK. Do I need a schengen visa? I have a green card and 5 year UK visa and am a citizen of India

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


There are some shortcut keys on my windows computer that must be coming from some program. I know that I've installed a couple of "productivity" programs, but for the life of me I can't figure out what's causing some of these shortcuts.  Is there a generic program/way for me to hit some hotkey, and then know where it's coming from? For example, suppose that I have an autohotkey exe running which always prints a message when I hit ctrl+alt+m. Is there a way to hit ctrl+alt+m, and then know that the autohotkey program is binding that keystroke to something?  If there isn't an easy way to do this (I'm betting there's not), then what possible places are there to check? Are there known ways to bind hotkeys via registry? If so, are there common places in there? Are there keyboard settings in Windows OS somewhere?  I know this is an abstract and hard question, but I think it's very practical for "super users", has objectivity, and so belongs here.

Given a hotkey, how can I find which program owns it?


I just wanted to know how to explain "degrees of freedom" to a non-statistics person without mentioning any statistical terms. How to explain this?

From , there are three interpretations of the degrees of freedom of a statistic:     In statistics, the number of degrees of freedom is the number of   values in the final calculation of a statistic that are free to vary.      Estimates of statistical parameters can be based upon different   amounts of information or data. The number of independent pieces of   information that go into the estimate of a parameter is called the   degrees of freedom (df). In general, the degrees of freedom of an   estimate of a parameter is equal to the number of independent scores   that go into the estimate minus the number of parameters used as   intermediate steps in the estimation of the parameter itself (which,   in sample variance, is one, since the sample mean is the only   intermediate step).      Mathematically, degrees of freedom is the dimension of the domain of a   random vector, or essentially the number of 'free' components: how   many components need to be known before the vector is fully   determined.   The bold words are what I don't quite understand. If possible, some mathematical formulations will help clarify the concept.  Also do the three interpretations agree with each other?


Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


I am trying to create a short code with a form I have the form displaying ok but I need to be able to pull the price information from sql table as well and show it in a label.  How can i do that using the following code.  <?php /* * Plugin Name: WordPress ShortCode * Description: Fules Plugin. * Version: 1.0  */  // Example 1 : WP Shortcode to display form on any page or post. function form_creation(){     global $wpdb; ?> <form>  Liters:<select> <?php      $sql = 'SELECT liters FROM wp_tfp';      $liters = $wpdb->get_col($sql);  if( $liters ) {    foreach( $liters as $liter ) {          echo '<option value="' . $liter . '">' . $liter . '</option>';   } } ?>  </select> Price: <input type="text" name="price"><br>  </form> <?php } add_shortcode('test', 'form_creation'); ?>

I have a Widget which I am creating but my quesiton is how do I access my custom table which I created via my plugin. I am attempting to fill the dropdown from the table called tfp which contains the column liters which I wish to popluate the values into the drop down   class my_plugin extends WP_Widget {  // constructor function my_plugin() {         parent::WP_Widget(false, $name = __('Thomsons Fuels Widget', 'wp_widget_plugin') );  }  // widget form creation function form($instance) {  //Check values if( $instance) {  $title = esc_attr($instance['title']);  $dropdown= esc_attr($instance['dropdown']);  $textarea = $instance['textarea'];  } else {  $title = '';  $textarea = ''; } ?>   <p> <label for="<?php echo $this->get_field_id('dropdown'); ?>"> <?php _e('Liters',   'wp_widget_plugin'); ?></label> <select> <option value="volvo">Volvo</option> </select>  </p>   How I created the table in the plugin   global $wpdb; global $custom_table_example_db_version;  $table_name = $wpdb->prefix . 'tfp'; // do not forget about tables prefix  // sql to create your table // NOTICE that: // 1. each field MUST be in separate line // 2. There must be two spaces between PRIMARY KEY and its name //    Like this: PRIMARY KEY[space][space](id) // otherwise dbDelta will not work $sql = "CREATE TABLE " . $table_name . " (   id int(11) NOT NULL AUTO_INCREMENT,   liters VARCHAR(100) NOT NULL,   price VARCHAR(100) NOT NULL,      postcodearea varchar(20) NULL,         dft varchar(20) NULL,   PRIMARY KEY  (id) );";  // we do not execute sql directly // we are calling dbDelta which cant migrate database require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql);  // save current database version for later use (on upgrade) add_option('custom_table_example_db_version', $custom_table_example_db_version);


As I understand it, Microsoft licencing is tied to an organisation. My company is a gold partner and has volume licensing. We're toying with the idea of hosting some of our clients systems, but don't know whether our existing licensing allows that. I've seen that SPLA licences allow for monthly billing, but do other licence packs, or even the purchase of a boxed product, allow you to run production environments for clients? Also, is there a problem having multiple clients using a single Windows server, or SQL server?

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


We often omit "that" in direct object noun clauses. For example:     I hope you have a good weekend.   or     I hope the meeting goes well.   It may sound a bit stilted to include "that" in those sentences, particularly the first.   However, today I was writing an email and wanted to combine those ideas into one sentence. My clarity instinct led me to write:     I hope you have a good weekend and that the meeting goes well.   In this case, omitting "that" before "the meeting goes well" makes that second object sound clumsy. But including two "that"s sounds equally clumsy.   Is it acceptable to omit the first and not the second? Does it sound clumsy to omit both?

He will understand that I was not joking.   He will understand I was not joking.  Which of the sentences is correct? Are there any specific rules about the use of "that" in the sentences I reported as example?


Is it possible to define a zero $f(x)$ in a ring $R[x]$ of polynomials as a display of the form: $(\forall x \in R)$ $f(x)=0$ ?

I shall assume all rings to be commutative in this question. The impatient can scroll down to the "blockquote" to read the actual question.  Whenever we have a polynomial over a ring, it defines a function from the ring to itself by evaluation. It's reasonable to ask when two different polynomials define the same function.  From the factor theorem it follows that an $n^\text{th}$ degree polynomial over an integral domain has at most $n$ roots. Then it's easy to show this:  Theorem. Let $R$ be an infinite integral domain and let $f \in R[X]$ such that $f(a)=0$ for all $a \in R$, then $f = 0$. Proof. $f$ has infinitely many roots, so it must be the zero polynomial. $\quad\square$  For finite rings a kind of opposite situation occurs:  Theorem. For any finite ring $R$ there are polynomials over $R$ that are different but agree on all elements. Proof. There are only finitely many functions from $R$ to itself, but $R[X]$ is infinite. $\quad\square$  If we make further assumptions it's of course possible to prove more, as Pete L. Clark wrote in this post: []  Then there is the question of infinite rings that are not integral domains. It's relatively easy to come up with examples of a ring $R$ with positive characteristic and a nonzero polynomial that evaluates to the zero function, e.g.: $$ R := \bigoplus_{n=1}^\infty \mathbb{Z}/6\mathbb{Z} \quad\text{and}\quad f(X) := X^3-X.$$  The Question:     This leaves open the case alluded to in this post's title: Is there a commutative ring of characteristic $0$ (hence infinite) such that a nonzero polynomial evaluates to the zero function?


When i try installing Ubuntu alongside Windows, I see only 2 options: One is to erase all data and install Ubuntu, and the other one is "Something else". I can't see an option to install alongside Windows 10.

Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions.   /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition)   Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function?


How do you change an unverified Steam email address, with no access to the cell phone number and email address for the Steam account?

I am unable to log into my Steam account as I do not have access to my email account for the Steam Guard verification process.   I have raised a ticket but have not received a reply from Steam Support yet, and it has been over two days so far.  I am really desperate because I just put $20 on there and that's really rare for me. There is no way to activate my email account which the verification code has been sent.   What can I do to resolve this issue and regain access to my Steam account?


Can 's be used as a contraction of was?  For example, can "maybe she's born that way" mean "maybe she was born that way"?

Is there a contraction for "I was"?    There are contractions for "I am" (I'm), "I will" (I'll), "I have" (I've), "I would" (I'd), and yet the simple past tense seems conspicuously missing. Why is that? Does that reasoning apply to "I did" and "I had" as well?


I have tried below piece of code to remove punctuation from a string.  import re s = "string. With. Punctuation?" s = re.sub(r'[^\w\s]','',s)   This works fine for roman like text(script) but seems to have problem with Unicode like text like Hindi, Telugu etc.  for example:  import re s = "అనేది దేనికి సమానం అవుతుంది." s = re.sub(r'[^\w\s]','',s)   This one completely changes the text itself and making it not understandable by removing dependent vowels of that script.  So my question is how can I remove punctuation from text that is other than roman text.  The duplicate question linked will replace punctuation for roman like string as I already mentioned. My issue here is to replace punctuation for Unicode like string. There is a clear difference not a duplicate.

It seems like there should be a simpler way than:  import string s = "string. With. Punctuation?" # Sample string  out = s.translate(string.maketrans("",""), string.punctuation)   Is there?


In case of the solution of Schrödinger equation in particle in a box we find that the probability of finding the particle at the middle of the box is always zero (for $n$ even) and the probability distribution has a node there.  Say initially the wave function is a superposition of all even-$n$ states. So we have a finite probability to find the particle on each side of the box but not at the middle therefore if I measure the particles position now and find it at the right side then after long time if I take another measurement and find the particle on the left side, I can't say that it has passed to the left side in the meantime because at the middle the particle can never be found.  So, my question is   How can I find the particle on both sides but not at the middle, as if it is found to be present at both sides at two instances, it must pass through the centre? If this is not the case then what is the description of a particle in quantum mechanics? I mean which properties should a physical quantity have to be called a particle?

Let's consider an infinite square well. In the first exited state there is a node at the middle of the well (i.e. wave function and thus probability of finding the particle is zero there). If I measure the position right now, I may find the particle on the left side of the node, and if I measure the particle after some time, I may find the particle on the right side of the node. But must  a particle on the left side to go to right side not pass through the node point? Thus the particle will spend some time at that point, so there should be some probability of finding the particle there, but the wave function is zero there, so what's wrong with the arguement? Does the particle move here to there, without passing through the space in between? But that will just violate continuity equation?


I have a number of functions with a combination of positional and keyword arguments, and I would like to bind one of their arguments to a given value (which is known only after the function definition). Is there a general way of doing that?  My first attempt was:  def f(a,b,c): print a,b,c  def _bind(f, a): return lambda b,c: f(a,b,c)  bound_f = bind(f, 1)   However, for this I need to know the exact args passed to f, and cannot use a single function to bind all the functions I'm interested in (since they have different argument lists).

How can I bind arguments to a Python method to store a nullary functor for later invocation?  Similar to C++'s boost::bind.  For example:  def add(x, y):     return x + y  add_5 = magic_function(add, 5) assert add_5(3) == 8


I'm an Indian national, currently residing in US. I'd applied for a Schengen visa for Iceland at the Sweden consulate (Sweden handles visa processing for Iceland). My passport with the stamped visa arrived late, to the point that I had to cancel my travel. I now have an approved Schengen single-entry tourist visa issued by Sweden that I haven't traveled on. Planning a new trip to Iceland in the short duration while the visa is still valid is turning out to be just too expensive (no flight options available). Can I use this visa to travel to France instead?  Others have asked similar questions regarding use of the single entry Schengen visa, but I'm specifically interested in guidance / experience from travelers to France who've been in this situation.  UPDATE: I made the trip to Sweden, though the visa had been issued by Sweden for travel to Iceland. Faced no problem at immigration on entry.

My friends and I planned to visit Germany, so I got a single entry tourist Schengen visa to Germany. However, my travel plans have changed since then, because my friends are going to Italy instead. I don't have time to apply for a visa to Italy, but I have been told that I can use my Schengen visa to enter Italy. Is that true?


(1)Let $p_n$ be the nth prime number,and $P=\sum_{n=1}^{\infty} \frac{1}{p_{n}}$; (2)Let $\varphi(n)$ be the Euler's totient function,and $S=\sum_{n=1}^{\infty} \frac{\varphi(n)}{n^{2}}$ .

Is this series known to converge, and if so, what does it converge to (if known)?  Where $p_n$ is prime number $n$, and $p_1 = 2$,  $$\sum\limits_{n=1}^\infty \frac{1}{p_n}$$


Let $f$ be a real function defined on $\mathbb{R}$ satisfying the condition:  $$\lim_{h\rightarrow 0} [f(x+h)-f(x-h)]=0 \mbox{}$$  for any $x\in\mathbb{R}$. Does it imply continuity of $f$?    I believe the counterexample to that statement is the following function:  $$g(x)=\mathbb{1}_{\{0\}}\mbox{,}$$ which is clearly not continuous at $x=0$.

Suppose $f$ is a real function defined on $\mathbb{R}$ which satisfies    $$\lim_{h\rightarrow 0}\ [f(x+h)-f(x-h)]=0.$$   Does this imply that $f$ is continuous?   Source: W. Rudin, Principles of Mathematical Analysis, Chapter 4, exercise 1.


I had an USB pendrive plugged in the laptop when the laptop froze. After that time I can't access my USB pendrive. It doesn't work on other computers either.   I checked disk management and it says "no medium".    I have checked drive letter, NOT the problem. I have re-installed the drivers, NOT the problem.  My other usb still works on my laptop so not broken usb ports.

I have a usb stick that won't show up on the computer. It has always worked in the past, and nothing remarkable has changed on the stick or the PC since its last use.  It could be that it's not getting power. The light doesn't show up, and other USB sticks work fine in that port. This stick doesn't work in any port on any PC that I've tried.  Is there any way of getting the data off it? Tall order I know...


I need to create a complex geometry at one place on my model,    so I would not use the knife tool I would add loop cuts but it doesn't let me to.      I already deleted the faces and created them again but even when I think that the topology of this certain place is alright I still cant't add a single loop throughout all the tube.  So my Question is: Why is this happening and what would be the best thing for me to do?

Alright so I've seen some postings about loop cuts and done some research. I am very new to blender and modeling overall. I am trying to loop cut this concrete barrier. Now I'm following a tutorial and kind of did my own thing in some areas. I cleaned it up following some instructions in another answer here on stack exchange.  I can't for the life of me figure out why I can loop cut around the whole bottom:   ...but not the whole middle:   I see this marked as answered by another question. That question refers to ngons and inside faces. Now once again I'm totally new to this. I looked on the inside. I don't believe I have inside faces or any ngons by the terms I've read online in my research.  Here is a wireframe picture and the inside view:     Maybe I'm missing something the answers on other posts are saying. If so and you know what it is I'd be very appreciative of what it is.


I have read through the  documentation from Android. I see that it keeps using copyInputStreamToOutputStream(in, System.out);. That gives me   error: cannot find symbol method copyInputStreamToOutputStream(InputStream,PrintStream)  Here's the code in question:  URL url = new URL("https://wikipedia.org"); URLConnection urlConnection = url.openConnection(); InputStream in = urlConnection.getInputStream(); copyInputStreamToOutputStream(in, System.out);   What is the meaning of copyInputStreamToOutputStream?

I was surprised to find today that I couldn't track down any simple way to write the contents of an InputStream to an OutputStream in Java. Obviously, the byte buffer code isn't difficult to write, but I suspect I'm just missing something which would make my life easier (and the code clearer).  So, given an InputStream in and an OutputStream out, is there a simpler way to write the following?  byte[] buffer = new byte[1024]; int len = in.read(buffer); while (len != -1) {     out.write(buffer, 0, len);     len = in.read(buffer); }


Consider a $2^{1999} \times 2^{1999}$ square, with a single $1 \times 1$ square removed. Show that no matter where the small square is removed it is possible to tile this "giant square minus tiny square" with L-trominos.

Suppose we have an $2^n\times 2^n$ board. Prove you can use any rotation of L shaped trominoes and a monomino to fill the board completely.  You can mix different rotations in the same tililng.


I am new to ubuntu and I had the 12.04 version installed by a friend of mine. When installing, he kept the windows os I already had in my PC, creating a partition. Now I'd like to replace the partition (I don't need windows anymore) and install the new Ubuntu 14.04 LTS (from USB) only. Can I do that straightforward installing 14.04 or do I have do delete the partition before? Thank you in advance!

I would like to see a full how-to guide on how to install Ubuntu.


Below is my code of sending email from my mail but I  am getting an error please help !      Error: Email not sent!System.Net.Mail.SmtpException: The operation has timed out. at System.Net.Mail.SmtpClient.Send(MailMessage message)   at   _Default.Button1_Click(Object sender, EventArgs e)   try{          MailMessage mailmessage = new MailMessage();         mailmessage.To.Add(TextBox3.Text);         mailmessage.From=new MailAddress("sadiazar05@gmail.com");         mailmessage.Subject = "User SignUp";         mailmessage.Body = "Hello You're registered!";         SmtpClient smtpclient = new SmtpClient("smtp.gmail.com",465);         mailmessage.Priority = MailPriority.High;         smtpclient.Timeout = 60000;         smtpclient.Send(mailmessage);         Response.Write("Email sent successfully!");         }         catch(Exception exp)         {             Response.Write("Email not sent!" +exp);         }     }

Instead of relying on my host to send an email, I was thinking of sending the email messages using my Gmail account. The emails are personalized emails to the bands I play on my show.   Is it possible to do it?


I have this slight problem with my Tic Tac Toe program. I have a nested counter checking for vertical and horizontal wins with the X piece (I haven't done it for O yet). For some reason, it never ends, allowing me to place more and more pieces.  For some context, here are some snippets of code.   public static void game (String winner, Board pointer) {      boolean win = false;     int turnCount = 1;     winner = "Tie";     while (win == false || turnCount < 9)     {         int row = Integer.parseInt(JOptionPane.showInputDialog(pointer.getName1() + ", it is your turn. " + "\n" + "What row would you like your 'x' to be in?"));         int col = Integer.parseInt(JOptionPane.showInputDialog("What column would you like it to be in?"));         pointer.play[row] [col] = pointer.x;         SpotCheck1(winner, pointer, row, col);         System.out.println(BoardStat(pointer));         winCheck(win, pointer, winner);         int row2 = Integer.parseInt(JOptionPane.showInputDialog(pointer.getName2() + ", it is your turn. " + "\n" + "What row would you like your 'o' to be in?"));          int col2 = Integer.parseInt(JOptionPane.showInputDialog("What column would you like it to be in?"));         SpotCheck2(winner, pointer, row2, col2);         pointer.play[row2] [col2] = pointer.o;         System.out.println(BoardStat(pointer));         winCheck(win, pointer, winner);         turnCount++;     }     //return winner; }  public static void winCheck (boolean win, Board pointer, String winner) {     for (int counter = 1; counter <= 3; counter++)     {         if ( pointer.play [counter] [1].compareTo(pointer.x) > 0 && pointer.play [counter] [2].compareTo(pointer.x) > 0 && pointer.play [counter] [3].compareTo(pointer.x) > 0)         {             win = true;             winner = pointer.getName1();             win(winner, pointer);         }                   else if (pointer.play [1] [counter].compareTo(pointer.x) > 0 && pointer.play [2] [counter].compareTo(pointer.x) > 0 && pointer.play [3] [counter].compareTo(pointer.x) > 0)         {             win = true;             winner = pointer.getName1();             win(winner, pointer);         }     }     //return win;  }   SpotChecks 1 and 2 are the ways to check if a player has already placed a piece. The problem, I think, is in the WinCheck method. If anybody can help me out, that'd be great! First post, apologies if I did something wrong.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


13 green, 15 blue, and 17 red chameleons are on an island. Whenever two chameleons of different colors meet, they change to the third color. Is it possible for all of them to become the same color?    I said no. I took a look at all the chameleon numbers mod 3, and saw that they were 1 mod 3, 0 mod 3, and 2 mod 3. (I have some trouble explaining this part)->I did some color-changing on them, and saw that the chameleon numbers per color mod 3 stayed the same. The number of each color was either 0,1, or 2 mod 3. The number of chameleons of each color is either 0,1,2 mod 3, which doesn't change. so it is impossible to change everything to 0 mod 3. (all the colors have to have the same number in order to have everything become one color). I am not sure if I am going in the right direction or if this is the right proof.

I am trying to understand the solution to the below puzzle      There are 13 Red, 15 Green, and 17 Blue Chameleons at some point of   time. Whenever two Chameleons of the different colors meet both of   them change their color to the third color. Is it ever possible for   all Chameleons to become of the same color?   I am able to figure out "manually step by step" that it is not possible to get all in one color.  However I don't understand the more formal solution using the modulo, for example Solution 1 .    I realize that after every change the differennce between the second and first terms is -3, 0 or 3.    What are the vectors (2,2,2) representing?  I don't understand the final statement there:  We see that, with the initial vector (1, 0, 2) modulo 3, the only possible combinations of colors on the island are (1, 0, 2), (0, 2, 1), and (2, 1, 0), and these occur cyclically with period 3.  Can anybody explain in simple way this solution to the problem?


I've been playing long enough to get most weapons that don't require research. Since I don't have anyone to play with and don't want to go out searching for a clan, I guess I'm going to have to do this alone.  How expensive (credits/forma/platinum/other resources) is it going to be to start a clan and build enough Dojo facilities to start researching new stuff? Are there any maintenance costs or tasks that I need to be aware of after the Dojo is built?

Is it possible for an one-or-two-person clan to build a dojo? If so, what are the resources involved?   I'd like to experience the whole Dojo building experience so I don't plan to join an existing Clan with a dojo already.


I have a directory under C:\Users\myuser\.ssh and I need to delete it but Windows won't let me.  From Windows Explorer:    From a Cygwin shell:  myuser@mymachine /cygdrive/c/Users/myuser/.ssh $ rm -rf id_rsa rm: cannot remove `id_rsa': Device or resource busy   Any ideas how to force this deletion?

On Windows XP, when I try and delete a specific file it says:     Cannot delete blah.blah: Make sure the   disk is not full or write-protected   and that the file is not currently in   use.   How can I go around this warning and delete it anyway?


Read this sometime in late 1980s / early 1990s. Survivors of a human vs. robots war are trekking across a barren landscape. They stop at an underground cavern, one of a network established by the human resistance. Only to discover that the food stores have been poisoned by the robots. To be clear, this isn't The Terminator albeit it clearly shares many similarities.

I'm trying to figure out the name of a science fiction novel.  In it there were bands of humans which roamed a world.  The world was controlled by intelligent robots or mechanized creatures I think.  In it the humans all had suits, which produced different smells to warn the humans about different robot/creatures nearby.  In it a particular group was hunted by a very intelligent robot/creature and it made them a deal for freedom in a spaceship.  I know that they traveled in wastelands for part of the novel but ended up going to a robot/creature city at some point in the novel.  Help please!


Q: Suppose $\varphi$ is a real valued function on $\mathbb{R}$ such that:   \begin{align*}   \varphi \left[ \int_0^1 f(x) \, dx \right] &\le \int_0^1 \varphi [f(x)] \, dx \\ \end{align*}   for every real valued bounded measurable function $f$ on $[0,1]$. Prove that $\varphi$ is convex.   My attempt:  Consider for fixed $x_1, x_2 \in \mathbb{R}$:  \begin{align*}   f(\theta) &= \theta x_1 + (1 - \theta) x_2 \\   \int_0^1 f(\theta) \, d\theta &= x_1 \int_0^1 \theta \, d\theta + x^2 \int_0^1 (1 - \theta) \, d\theta = \frac{x_1 + x_2}{2} \\ \end{align*}  Plugging this into the inequality given in the problem:  \begin{align*}   \varphi \left[ \frac{x_1 + x_2}{2} \right] &\le \int_0^1 \varphi [\theta x_1 + (1 - \theta) x_2] \, d\theta \\   \end{align*}  From here, I'm stuck. If I can show the midpoint property:  \begin{align*}   \varphi \left( \frac{x_1 + x_2}{2} \right) &\le \frac{\varphi(x_1) + \varphi(x_2)}{2} \\ \end{align*}  I know proofs from there that $\varphi$ is convex. But I don't see how to get that.

Suppose $\varphi:\mathbb{R}\rightarrow\mathbb{R}$ and for all bounded measurable $f$, $$ \varphi\Big(\int_0^1fd\lambda\Big) \le \int_0^1\varphi(f)d\lambda $$ I'm asked to prove that $\varphi$ is a convex function. I have no idea how to even begin, only idea I've had is to try to suppose that $\varphi''(x)<0$ for some $x\in(0,1)$ but then I haven't got a clue.


My Windows app has a C# part and a C++ part. The C# app shows a console window when it's ran.  The C++ code is compiled into a DLL which is used from C# via P/Invoke.  The problem is that printing text from the C++ DLL via std::cout doesn't print anything. Printing from C# works fine.  I suspect C# has taken over the console, so C++ can't get a handle to it. The fix might be to get a console handle from C#, pass it over to C++, and use it to connect std::cout to the console window. But I don't know how to go about doing that.  Any ideas?  Edit: My C++ code is unmanaged.

I have an application which is a relatively old. Through some minor changes, it builds nearly perfectly with Visual C++ 2008. One thing that I've noticed is that my "debug console" isn't quite working right. Basically in the past, I've use AllocConsole() to create a console for my debug output to go to. Then I would use freopen to redirect stdout to it. This worked perfectly with both C and C++ style IO.  Now, it seems that it will only work with C style IO. What is the proper way to redirect things like cout to a console allocated with AllocConsole()?  Here's the code which used to work:  if(AllocConsole()) {     freopen("CONOUT$", "wt", stdout);     SetConsoleTitle("Debug Console");     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED); }   EDIT: one thing which occurred to me is that I could make a custom streambuf whose overflow method writes using C style IO and replace std::cout's default stream buffer with it. But that seems like a cop-out. Is there a proper way to do this in 2008? Or is this perhaps something that MS overlooked?  EDIT2: OK, so I've made an implementaiton of the idea I spelled out above. Basically it looks like this:  class outbuf : public std::streambuf { public:     outbuf() {         setp(0, 0);     }      virtual int_type overflow(int_type c = traits_type::eof()) {         return fputc(c, stdout) == EOF ? traits_type::eof() : c;     } };  int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) {     // create the console     if(AllocConsole()) {         freopen("CONOUT$", "w", stdout);         SetConsoleTitle("Debug Console");         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED);       }      // set std::cout to use my custom streambuf     outbuf ob;     std::streambuf *sb = std::cout.rdbuf(&ob);      // do some work here      // make sure to restore the original so we don't get a crash on close!     std::cout.rdbuf(sb);     return 0; }   Anyone have a better/cleaner solution than just forcing std::cout to be a glorified fputc?


I am adding HTML to the DOM with jQuery to an existing empty table with class sec_sch like this:  details += "
"+     "" + this.name + "	" +     "" + this.start_year + "	" +     "" + this.end_year + "	" +     "" + this.qualification + "	" +     "" + "<button class=\"rmv\">-</button>" + "	" + "
"; $(".sec_sch tbody").append(details);   It loads fine but I cannot seem to manipulate the button.rmv from the same JS file with such code.  $('.rmv').click(function(e) {     console.log(this);     e.preventDefault();     alert('hi'); }); // end of remove secondary school   please any idea why?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I get my data inside my function. However when trying to set the data to my textView it fails. It gives a null pointer exception. But I initialise my textView on top of the page. Anyone has an idea why it gives this error?  Process: com.example.dylangomes.parkingxl, PID: 10078 java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference at com.example.dylangomes.parkingxl.DetailFragment$1.onCallBackRecieved(DetailFragment.java:79) at com.example.dylangomes.parkingxl.Services.ParkingService$3.onResponse(ParkingService.java:113) at com.example.dylangomes.parkingxl.Services.ParkingService$3.onResponse(ParkingService.java:108) at com.android.volley.toolbox.JsonRequest.deliverResponse(JsonRequest.java:65) at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:99) at android.os.Handler.handleCallback(Handler.java:769) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6540) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)   This is my function  public class DetailFragment extends Fragment {  private String titleText, addressText; private int freePlacesText; private TextView title, freeplaces, address; private ParkingService parkserv;  @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {     // Inflate the layout for this fragment     View fragmentView = inflater.inflate(R.layout.fragment_detail, container, false);      title = fragmentView.findViewById(R.id.title_view);     freeplaces = fragmentView.findViewById(R.id.freePlaces);     address = fragmentView.findViewById(R.id.address);      return fragmentView;  }  public void setId(int id) {     Log.d("Set id function called", "FUnction called");     parkserv = new ParkingService(getActivity());      parkserv.getParkingLotsById(id);      parkserv.setApiCallBackObject(new APICallBackListenerObject() {          @Override         public void onCallBackRecieved(JSONObject jsonObject) {             Log.d("Getting into OnCallback", "OncallBack");              final Gson gson = new Gson();             final Type type = new TypeToken<ParkingLots>() {             }.getType();             final ParkingLots parkinglots = gson.fromJson(jsonObject.toString(), type);              Log.d("ParkingLots", parkinglots.getAddress());             Log.d("ParkingLots", parkinglots + "");              titleText = parkinglots.getTitle();             freePlacesText = parkinglots.getPlacesNow();             addressText = parkinglots.getAddress();              title.setText(titleText);             freeplaces.setText(freePlacesText);             address.setText(addressText);         }     }); }   }  the logs log the data which i expect but it gives an error before i get inside the view and crashes the program

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


This is actually part (c) of the original question. Part (a) asks to prove for any $h>0$, we have $\lim_{x\to\infty}\frac{f(x+h)-f(x)}{h}=b$. Part (b) asks to prove if $f(x) \to a$ as $x\to\infty$, then $b=0$. I know how to do (a)(b) using Mean Value Theorem. I think I should use Mean Value Theorem here. For any $x>0$, there exists $c\in (0, x)$ such that $f'(c)=\frac{f(x)-f(0)}{x}$. But as $x\to\infty$, $c$ may not approches to $\infty$. I don't know how part (c) is related to (a)(b). I can't figure out whether I should use the trick of add and subtract or others.

If $f$ is differentiable on $(a,\infty)$, Show that if $f'(x)\rightarrow L$ as $ x \rightarrow \infty$, $-\infty \leq L \leq \infty $  then  $ f(x)/x \rightarrow L $ as $x \rightarrow \infty$.   Deduce further that if $f(x) \rightarrow M$ as $ x\rightarrow \infty$ , and $ f'(x)\rightarrow L $ as $ x \rightarrow\infty $ then $ L = 0$   For the first part I tried converting $f(x)$ to $F(\frac{1}{x})$ and $x \rightarrow 0$ and then using L'Hospital's rule but I am getting stuck. How do I proceed with this problem ?


Prove the given identity.   $$\left(\sin\frac{9\pi}{70}+\sin\frac{29\pi}{70}-\sin\frac{31\pi}{70}\right)\left(\sin\frac{\pi}{70}-\sin\frac{11\pi}{70}-\sin\frac{19\pi}{70}\right)=\frac{\sqrt{5}-4}{4}$$   Please provide the shortest method possible. I didn't get any idea to start the solution

Prove the given identity.  $$\left(\sin\frac {9\pi}{70}+ \sin\frac {29\pi}{70} - \sin\frac {31\pi}{70}\right) \left(\sin\frac {\pi}{70}-\sin\frac {11\pi}{70} - \sin\frac {19\pi}{70}\right) =\frac {\sqrt {5} -4}{4}$$  Please help, I could not gather enough ideas, even on how to get to the first step. I thought of using the transformation formula (from sum to product) but did not find a fruitful result.   UPDATE 1.:  $\left(-\frac{1 +\sqrt{5}}{8} + \frac{1}{8} \sqrt{14\left(5 - \sqrt{5} \right)}\right)\left(-\frac{ 1+ \sqrt{5}}{8} -\frac{1}{8} \sqrt{14 \left(5 -\sqrt{5} \right)}\right) $,    I noticed that Alexis had got to this point.  Can anyone explain me how did he get here, with calculations. Please help.  Thanks in Advance.


Trying to find the inverse of the function $y=x!$ for domain restricted to $x>0$. Does this function have an inverse for the given domain? If so, please include methods used for finding the inverse to help further my understanding of the solution. Thanks!

I'm trying to solve hard combinatorics that involve complicated factorials with large values.  In a simple case such as $8Pr = 336$, find the value of $r$, it is easy to say it equals to this: $$\frac{8!}{(8-r)!} = 336.$$  Then $(8-r)! = 336$ and by inspection, clearly $8-r = 5$ and $r = 3$.  Now this is all and good and I know an inverse function to a factorial doesn't exist as there is for functions like sin, cos and tan etc. but how would you possibly solve an equation that involves very large values compared to the above problem without the tedious guess and checking for right values.  Edit: For e.g. if you wanted to calculate a problem like this (it's simple I know but a good starting out problem) Let's say 10 colored marbles are placed in a row, what is the minimum number of colors needed to guarantee at least $10000$ different patterns? WITHOUT GUESS AND CHECKING  Any method or explanation is appreciated!