Route socks proxy traffic through wireless client

I have  a router with two Internet WANs: DSL (vlan1) and wireless client (eth1). They are both in default route: vlan is the first and eth1 is the second (I am using ip route add default scope global nexthop via …).   I want to use eth1 Internet from my laptop using socks proxy. I tried to use srelay socks server with –J eth1 option on the router but it didn’t  work (page loads forever) although it works through DSL if I use –J vlan1. I also tried to use ssh as a socks server and mark packets with iptables to route them to eth1 using ip rule:  iptables -t mangle -A OUTPUT -o vlan1 -j MARK --set-mark 1   After this command every program on the router starts using eth1 but I need that only the socks server uses eth1. Is it possible to mark only socks server packets? Now I have to use the second router for this purpose. I run socks server on it and add ip rule for its IP on the first router.   I already tried  and it didn’t work. It’s not "duplicate" because I need this for proxy server on router. The problem is that I can’t mark packets based on port number because proxy server doesn’t keep this mark while proxyfing.


I want to prove for all integers $a$ that if $3\mid a$ then $3\mid a^2$.  Suppose that $a \in \mathbb{Z}$ and $3\mid a$. Then $a = 3k$ for any integer k.  Hence $$a^2 = (3k)(3k) = 9k^2 = 3(3k^2)$$  Since $k$ is a integer, $3k^2$ is an integer. Thus $a^2 = 3b$ for some integer $b$.  Therefore $3\mid a^2$.  Is this proof correct?


How to be sure if a new field can be added to the pre-existing object or not?

I'm a C/Python guy, shifted to 'Javascript' recently.  Basically, I receive an object (named context) in a function as an argument.The caller function's definition is hidden to me. Now I need to add a field(type) to the context. When I add type to context directly, it doesn't reflect changes in 'context'. But when I try to modify the value of one of the existing field of 'context', this change is reflected.  Then I create one more object(new_obj) and copy 'context' in the 'new_object', then tried to add the field in the 'new_object', but unsuccessful. So from this behaviour, I guess the value is not copied but the reference is.   So finally I need to copy field by field in the new_obj and then add the new field 'type'. Also if I create a local object, then new fields are being added and object structure is modified.  So far so good. But I was wondering about the implementation of the 'context' object in background caller function. I mean if there is some 'const' type thing here(as in C, (Random thoughts :P)), then at what level it is applied i.e. there is only restriction of adding new fields or also of changing values of the existing fields. Needed some light over this issue.


Can you answer me , please.  1- Show that (p→r)∧(q→r) and (p∨q)→r are logically equivalent  2- show that (p → r) ∨ (q → r) and (p ∧ q) → r are logically equivalent  without truth table .


how to determine if a div has become taller than the viewport

Is it possible to determine if the content has become larger than the viewport? I have a web page like so  ======================================= +--------------------------------+    ^ |             header             |    | |                                |    | +--------------------------------+    | |                                |    | |                                |    | |                                | viewport |              main              |    | |                                |    | |                                |    | +--------------------------------+    | |             footer             |    | +--------------------------------+    V =======================================   Under default circumstances, the footer is sticky to the bottom of the browser with the help of style position: fixed. This is when main has content that is short enough that the whole page fits in the viewport. The footer style is changed to position: relative so the footer moves down with the text if the text in main is too large to fit in the viewport.  If the text in the body is short enough that it fits in the viewport, the footer should remain fixed. The footer position should change to relative only when the text is longer or when a smaller screen size is used, which is only when I want the footer to move down beyond the viewport.  How do I determine that the height of main is large enough that the footer should be pushed down?  ======================================= +--------------------------------+    ^ |             header             |    | |                                |    | +--------------------------------+    | |                                |    | |                                |    | |                                | viewport |              main              |    | |                                |    | |                                |    | |                                |    | |                                |    | |                                |    V ======================================= |                                | |                                | +--------------------------------+ |             footer             | +--------------------------------+   Update: Actually, I don't just want the footer to stay at the bottom of the page. I want the footer to stay at the bottom of the page only if the total page height is shorter than the viewport. If the page content makes the page taller than the viewport, then, and only then, should the footer be pushed down with the content. I think  comment below might help me solve this.  Update 2: Solved by using a bit of JavaScript. Sorry for a really trivial question, but asking it here almost unblocked the really easy solution that was escaping me. Thanks everyone.


Do I need to declare friends and family in UK when applying for a Standard Visitor visa?

I am about to apply for a UK Standard Visitor visa on an Indian passport. I have sufficient funds as shown by bank statements and am a full-time employed permanent resident of Canada. The application requires me to state whether I have friends/family and then requires all their details (their status in UK, address etc). I have a few old friends and one cousin but do not want to add them because of the details required.  Do you think it is a plus point or can go against me if I say "NO" to Do you have friends or family in UK?


Add 1Password extensions support to the SE iOS app

Please implement the URL scheme to call 1Password for password lookups on the iOS app.   a URL scheme for switching to 1Password to search item titles for a custom term, usually a service name like “twitter” or “evernote”. This speeds up the process for the user so they can copy something like their password and get back to your app  That will ease sign up speed using long, complicated or unmemorable passwords for many users of both apps. In the two years since the above blog was published there are now updated instructions for implementation and code on github:


This script  \documentclass{report} \begin{document} \begin{table}[h!]   \centering %{\def\arraystretch{2}                                                                                \begin{tabular}{l r }     aa00                  & bb00                \\     aa11                  & bb11                \\     aa22                  & $\frac{1}{9}$       \\     aa33                  & $\frac{1}{9}$       \\     aa44                  & $\frac{1}{9}$       \\     aa55                  & bb55   \end{tabular} %  }                                                                                \end{table} \end{document}   renders the output    The fractions bump into each other that suggests that the space between the respective rows should be expanded.  In this example I try using \def\arraystretch{2} as in  but this recipe applies to the whole table. How to achieve the same just for select rows?


Google Search Console reports only 11 indexed pages when there used to be thousands

So I have a site I would prefer not to mention but when I search for my sitename on Google I get too many pages to count of hits. But if I look on the search console it tell me this   Does this mean I have only 11 pages viewable through organic search.... And how could something like this happen. Is this normal?  This is not a duplicate question because my site is quite old. It has many many search results on site:<website_name> but apparently I only have 11(!) indexed pages but on google I find many more which contradicts the information provided by the webmaster.


I'm confused about using phrases like "can be easily accessed". When I'm deciding which of the following I should use:   it can be potentially provided it can potentially be provided   by searching google it's almost obvious that the second one is correct (about 3,470 results for "can be potentially provided" vs. about 899,000 results for "can potentially be provided"). But when it comes to "can be easily accessed" vs "can easily be accessed", Google showed more results for the first one (about 475,000 vs about 338,000). According to the question in , it may be understood that the first one is indeed better. But I cannot distinguish between these two phrases. Why should one grammatical rule apply to one of them and another rule to the other? Is there a general rule for similar circumstances?


Converting lodash's `_.pull` to vanilla JS?

I'm having an issue with this function that recursively removes empty values from an object:  const _ = require('lodash')  function sanitize(object) {   Object.entries(object).forEach(([key, val]) => {     if (       val == null ||       Number.isNaN(val) ||       (typeof val === 'string' && isOnlyWhitespace(val)) ||       (typeof val === 'object' && Object.keys(sanitize(val)).length === 0)     ) {       delete object[key]     }   });      // Remove `undefined` values leftover from using `delete` on an array.   if (Array.isArray(object)) {     _.pull(object, undefined); // THIS IS THE LINE IM TRYING TO CHANGE   }    return object; }  function isOnlyWhitespace(str) {   return !(/\S/).test(str.trim()); }   I'm trying to replace _.pull(object, undefined) with vanilla JS, but nothing seems to give the right output (I've tried using stuff like filter.)  Here is a snippet you can run to see both outputs:    // LODASH VERSION function lodashSanitize(object) {   Object.entries(object).forEach(([key, val]) => {     if (       val == null ||       Number.isNaN(val) ||       (typeof val === 'string' && isOnlyWhitespace(val)) ||       (typeof val === 'object' && Object.keys(lodashSanitize(val)).length === 0)     ) {       delete object[key]     }   });    // Remove `undefined` values leftover from using `delete` on an array.   if (Array.isArray(object)) {     _.pull(object, undefined); // THIS IS THE LINE IM TRYING TO CHANGE   }    return object; }  // MY VERSION function mySanitize(object) {   Object.entries(object).forEach(([key, val]) => {     if (       val == null ||       Number.isNaN(val) ||       (typeof val === 'string' && isOnlyWhitespace(val)) ||       (typeof val === 'object' && Object.keys(mySanitize(val)).length === 0)     ) {       delete object[key]     }   });    // Remove `undefined` values leftover from using `delete` on an array.   if (Array.isArray(object)) {     object = object.filter(val => val != null) // THIS IS MY ATTEMPT   }    return object; }  function isOnlyWhitespace(str) {   return !(/\S/).test(str.trim()); } <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js"></script> <button id="lodash">Show lodash output</button> <button id="me">Show my output</button> <p id="output" /> <script>   /**    * Fiddle-related code, you can ignore this    */    const lodashBtn = document.querySelector('#lodash')   const meBtn = document.querySelector('#me')   const output = document.querySelector('#output')      function createExampleInput() {     const input = {       name: 'John',       grades: [         90,         undefined,         50,         null       ]     };          return input;   }      lodashBtn.addEventListener('click', () => {     output.textContent = JSON.stringify(lodashSanitize(createExampleInput()), null, 4)   });      meBtn.addEventListener('click', () => {     output.textContent = JSON.stringify(mySanitize(createExampleInput()), null, 4)   }); </script>


My computer stopped working. I replaced the motherboard and processor (had an Intel i3, got an AMD Ryzen) and installed Ubuntu 18.04.03 on the disk where I had had the system before. The system boots and I can use quite a few programs. But, for example, I downloaded google-chrome and installed it, but the executable will not execute.   When I installed google chrome, the executable ended up in /opt/google/chrome. Here is the 'ls -l'  -rwxr-xr-x 1 root root      1873 oct  9 04:59 google-chrome    When I try to run it as root, I get  root@garey-machine:/opt/google/chrome# ./google-chrome -su: ./google-chrome: Permission denied   Is this a problem with the executables being Intel code? Is it a problem with some security system I am not aware of? Any help?


Is it correct to say       Tsunami coupling in the code 'helps determine' human casualty     i.e., is use of multiple verbs consecutively correct?   Also, is it 'help determine' or 'helps determine'?


I' trying to upload my photo for the ds-160 transit visa but whenever I hit the upload photo button it gives me an error 403 or sometimes an connection error reset. Sometimes it let's me upload a photo(about once or 2x) but when I submit it, it gives me another error connection reset.   Any tips on what I should do about this?


Two basic C++ questions about string literals and dynamic allocation

Are these two equivalent?  char * aString = "This is a string.";  char aString[] = "This is a string.";  From my understanding, C++ stores strings by their addresses, so the pointer is getting a valid address. I assume the strings are also stored as type char? But how does it know how much memory to allocate for the string? Normally, char arrays need their array size preset. I believe the [] type arrays are counted by the compiler before compilation. Is this what happens for the string literal pointer as well?  On to my second question, what is the difference between these two:  int someNumber;  int * someNumber = new int;  The second is supposed to be dynamic allocation. If I understand the concept right, it allocates the memory as soon as it reads the declaration. But what happens in the standard declaration? Basically, I need to understand how dynamic allocation is advantageous over standard declarations.


Relationship between impact crater properties and kinetic energy?

William Gravesande in  1722 published an experiment in which brass balls were dropped from varying heights onto a soft clay surface. He found that a ball with twice the speed of another would leave an indentation four times as deep.   Some years later,  republished the experiment and proposed that each ball's kinetic energy - as indicated by the quantity of material displaced - was shown to be proportional to the square of the velocity and the deformation of the clay was found to be directly proportional to the height the balls were dropped from, equal to the initial potential energy.  So is kinetic energy inversely (squared) proportional to the quantity of clay displaced or is it proportional to the depth to which the ball will go ? Please provide an explanation not based on experimental data as most of 19th century physicists do. Also are any one of the effects mentioned above due to momentum of the ball ?   i am not asking about diameter and kinetic energy relationships , i am just askin about a derivation for the depth and displaced amount of material relationship with kinetic energy of some object.


When does a subprocess.PIPE which is a mediator of two subprocess will close?

I am going to use subprocess to handle commands in linux. But I don't know when does this p1.stdout will close. As This may influlence the data integrity which should be written to test file.  p1 = subprocess.Popen('cat ', stdin=subprocess.PIPE, stdout=subprocess.PIPE, shell=True, universal_newlines=True) p2 = subprocess.Popen('cat ', stdin=p1.stdout, stdout=open("test", 'w'), shell=True, universal_newlines=True) p1.stdin.write('asda'*100) p1.stdin.close()   I know I can use p1.communicate() after I write all data to p1.stdin,But this function will close p1.stdout too and I am certain if there is a chance that test will lose a part of data.


What is the preferred approach regarding "I'm new to ..."

There are many questions opening with I am new to this and that. It seems very meta and irrelevant. It's not like I'll you will act differently to a noob question according to the faq:     Etiquette      Civility is required at all times; rudeness    So the question is should I edit it out? is it constrictive in any way?  I believe it should be treated like 'hi' and 'thanks' and same arguments against those apply: Wastes space on preview, irrelevant,not broad,etc'


My wife and I just got the Xbox version of Minecraft and cannot figure out what version it is running compared to the PC. We have been playing the PC for around 2 years now and when we switched, it seemed like we went back in Minecraft time. With limited room to play and a lot less crafting recipes. What version of Minecraft does the Xbox run?


New Zealand pronunciation of "women" vs "woman"

I have read in a number of places that the NZ pronunciation of "women" must be rather peculiar. Quoting from :     For some years I've noted the tendency of Kiwis to pronounce "woman" and "women" identically (as "woman").   To which an Australian replies:     It appears there is a vowel shift going on in New Zealand (NZ) English [...] [T]he vowel in "women" which in Australian English is the same as the vowel in "hit", is often, in NZ, reduced to a schwa [...]. It makes the plural sound like our singular. I don't think the NZ pronunciation of the singular is the same as the NZ plural   A New Zealander begs to differ:     I've noticed this trend over the last few years also. To me as a kiwi it doesn't sound anything like a mispronounced plural -- it just sounds as if the speaker is using the one word for both singular and plural. [...] I see it as part of a much larger tendency to confuse singular and plurals. [Several examples follow.]   Who's right? Who's wrong? Wikipedia has :     In New Zealand English the short i of KIT is a central vowel not phonologically distinct from schwa /ə/, the vowel in unstressed "the". It thus contrasts sharply with the [i] vowel heard in Australia. Recent acoustic studies featuring both Australian and New Zealand voices show that the accents were more similar before the Second World War and that the KIT vowel has undergone rapid centralisation in New Zealand English. Because of this difference in pronunciation, some New Zealanders claim that Australians say "feesh and cheeps" for fish and chips while some Australians counter that New Zealanders say "fush and chups".   So, there appears to be a vowel shift going on; but I'm not sure if there might be some truth to the people-just-stop-caring-about-certain-plurals argument as well.  I hope we have enough New Zealanders on board to shed some light on this.   Can you provide a guide to how to pronounce "women" and "woman" in NZ English? (I've done some searching for audio files or YouTube videos, but haven't found anything yet.)  Would you say that it's just the vowel shift, "a much larger tendency to confuse singular and plurals", or both?  How recent is this trend? (E.g., if you are a native speaker of NZ English, is your pronunciation of "women" different from that of your parents/grandparents?)


the sudden change in temperature or the sudden change of temperature

1.The sudden change in temperature can cause rocks to shatter.   2.The sudden change of temperature can cause rocks to shatter.     I'd like to know if the two sentences are the same in meaning or if there is any difference between them. Thanks in advance.


What happens if Humble Defector is sacrificed before its ability resolves?

reads     {T}: Draw two cards. Target opponent gains control of Humble Defector. Activate this ability only during your turn.   Anthony controls Humble Defector and . He activates Humble Defector's ability and holds priority. He then sacrifices Humble Defector to activate Butcher of the Horde's ability.  When Humble Defector's ability resolves, does Anthony draw two cards?


Where do I ask questions related to coding, but not broken code or code review?

Actually, I want to know which Stack Exchange site can be used to ask questions that are related to coding, but not broken or not to check whether the code is efficient or not.  For example,   Is that a good idea to use jQuery in React Which is good for beginners, npm or yarn? Can React native control hardware devices?   These are a few questions that are very much off-topic on Stack Overflow or the code review site.  My actual questions are different, but somewhat similar to those.


$C_{c}(X)$ is complete. then implies that $X$ is compact.

Let $X$ is locally compact Hausdorff space .If $C_{c}(X)$ is complet,then $X$ is compact (this is to be proved). I know that $C_{c}(X)$ is dense in $C_{0}(X)$. As $C_{c}(X)$ is complete implies that $C_{c}(X)=C_{0}(X)$. and I know only urysohn's lemma and Tiez's extension theorem on locally compact Hausdorff spaces and other basic things.


Been trying to find graphic novel for decades - at least I think it's a graphic novel

When I was a kid I had a book that I loved, as I think about it I'm pretty sure it would be characterized as a graphic novel although I was unfamiliar with that term at the time. It was a large hardcover comic book but a full-length story, probably a few hundred pages long.  This would have been about 25-30 years ago.  I recall a little about the plot: It starts with a spaceship crashing somewhere, I remember one of the first panels had the phrase that the ship "yawed wildly". I always remembered that because I had to look up the word "yawed".   The rest of the story is told in flashback form, with the rise of an empire, and I'm pretty sure there's a guy who's a slave or otherwise in the lower strata of society who rises to be the ruler of the world or something like that.    I thought that the title had the word "titan" or "empire" in it (Empire of the Titans, or Rise of the Titans, or something similar), but Google searches have been unfruitful.


In the last scene at the diner in Men in Black 3 Agent K is humming a tune that is playing. Agent J is confused how he knows the song. What changed? What makes Agent K happier now than he used to be?


Prove that there exists some $c\in(-3,3)$ such that$ \ \ g(c) \cdot g''(c)<0$.

$f(x)$ is a differentiable function and $g(x)$ is a double differentiable function such that $|f(x)|\leqslant 1$ and $f'(x)=g(x)$. If $$f(0)^2+g(0)^2=9$$ then prove that there exists some $c\in(-3,3)$ such that$ \ \ g(c) \cdot g''(c)<0$.  Attempt: Let us define a function $h(x) = g(x) g~'(x)$. Then $$h'(x) =  g(x)g''(x) + \left( g'(x) \right)^2 \tag 1$$ If we prove that for some $c \in (-3,3), h~'(c) < 0,$ then $$g(c)g''(c) <0 \tag 2$$ Also, $$\left|f(0)\right| < 1 \implies f'(0) \in (-3,-2\sqrt 2 ) \cup (2\sqrt 2,3) $$ Could someone please advise me how do I move forward from here. Thank you very much for your help in this regard.


Excel Auto-Fill a Series Without Mouse (Keyboard Only)

So when I want to extend a series or something along those lines, I can highlight a group of cells, then click on the bottom right corner of the highlighting box and drag down.  Excel will then attempt to automatically extend the contents as well as it can.  Is there a keyboard function that will allow me to do this?  I like to use the keyboard to avoid repetitive mouse motions.  I can use the shift key and arrow keys to make a selection, but I don't know what (if any) key can trigger this function.  I also don't really know what this function is actually called.


How secure is Activation Lock on iOS 7 (and later)?

Apple showed this new feature in iOS 7 called Activation Lock, that if you enable "Find My iPhone" on a device that is lost or stolen, a person that finds/gets the iPhone will not be able to wipe it or reset it. I'm curious whether the lock is designed to prevent these avenues to defeat the lock:   Can they completely drain the battery and leave the phone in that state for a couple of months and then try it? Or, can they use any third-party software that can access iPhone from outside the iTunes and wipe it that way? Or, can they simply "jailbreak" it and forget about this Activation Lock?   By what methods can this lock be defeated or bypassed?


The Fibonacci sequence $F_0, F_1, F_2,\dots$ is defined by the rule $F_0=0, \ F_1=1, \ F_n = F_{n−1} + F_{n−2}$.  Use induction to prove that $F_n \ge \sqrt 2 ^n$ for $n \ge 6$.  So for the base case:  $F_6 = 8 \ge 2^{\frac 6 2} = 8$  $F_7 = 13 \ge 2^{\frac 7 2} = 11.31$  By definition: $F_{n+1} = F_n + F_{n-1} \ge \sqrt 2 ^n + \sqrt 2 ^{n-1}$.  This is as far as I could get and I'm not sure where to go from here. Any ideas?


Windows 10 in UEFI mode and Ubuntu in Legacy mode

My laptop have already installed Windows 10 in UEFI but I mistakenly dual boot Ubuntu OS In legacy mode. So everytime I have to change BIOS SETUP settings to UEFI for Windows and legacy and legacy first for Ubuntu. So what I do to when I start my pc it ask me which OS to use(it also ask currently but don't run the other one according to BIOS setting)


I am looking for recommendation on upgrade path from my current needs to have sharper image quality.  My Equipments   Nikon D3200 2 years old. 35mm 1.8 DX Lense (my primary go to lense for everything) Nikkor 50 mm F/1.8 FX AS G SWM AF-S SIC M/A Lens Nikkor 18-35mm f3.5-4.5D ED IF Aspherical Lens (unused because on the frame it manual focus only) Nikon Speedlight SB-600 Basic Kit Lense Eye-Fi SD Wireless Card   I have also rented out a 17-35mm lense when in need.  What Do I do  I shoot at events that are typically dark and latenight (clubs, corporate events venues at restaurants, etc). I have also shot at weddings and engagements as a second photographers. I do mostly groups and single (couple) portraits. I have been engaged in day light shots for some fashion bloggers lately, therefore I have been gaining more experience in day shots now.  I do not foresee the type of work I currently do to deviate (more weddings/engagement and night time photography at least once a week).  This is still a "hobby" that I like to do, but It is not my primary job. So I do not expect to spend over 2K worth (body lenses combine) in the near future to accommodate my hobby.  I'm unsure what is my next step would be:   Buy more lenses (I don't have zoom, I dont have wide angle. even if I rent a 17-55mm, that lense is sure heavy and bothersome) Buy an upgraded Crop Frame (Current generation up, or last generation closest to full frame) Last generation entry point full frame   Any incremental steps I should be taking for my needs?  Note I am open to keeping the D3200 as a secondary if needed (also if my upgrade, the lenses I currently is not compatible like a full frame with a DX lense)  Update/Response to mattdm  I have read:   As per the best/top response with 9 vote - I am limited to my gear. I am surrounded by those who have full frame and work equally to use their photography passion as a second income and passion. So I am getting a lot of practice and pointers in terms of composition etc. I have felt that I have tapped the feedback / group path and it is time for more gears in terms of lense and/or body.


So, I understand that by using 'tee' I can redirect the output of a command such as 'ping' to stdout as well as a file.  For example:  > ping google.com | tee somefile   This would display the ping statistics on terminal and write them to 'somefile'.  Now, if I wish to modify the output from 'ping', I can use 'cut' in such a way:  > ping google.com | cut -d' ' -f 1   But, if I wish to use all the three commands together, I get a no output on stdout and an empty file.  > ping google.com | cut -d' ' -f 1 | tee somefile   What am I doing wrong? Is there a better way to do this? Somehow I feel I am not using 'tee' properly. Any insight would be appreciated.  I'm using bash shell, if this is relevant.


A certain police officer stops cars for speeding. The number of red sports cars she stops in one hour is a Poisson process with rate 4, while the number of other cars she stops is a Poisson process with rate 1. Assume that these two processes are independent of each other. Find the probability that this police officer stops at least 2 ordinary cars before she stops 3 red sports cars.  How do you solve it by binomial or by poisson? My initial response was to consider p = 1/5  How do you solve poisson process problems in which you need to calculate the probability of one event before another? In this case, the probability of 2 ordinary cars before 3 sports cars. By poisson, I tried calculate the event of 2 ordinary cars and event of 3 red sports cars. What I can't understand is one event before another logic. Can we do these problems by binomial?


I have a text file with 9 fields separated by :  survey:m1111771::rent:travel:::Morning:   How do I pull field 1 and 8 only to a separate file  for example it would look like this,  survey:Morning


Switch the Fn and Ctrl keys on a Sony VAIO

I just got a Sony VAIO (Fit 13). All my current and previous laptops have Fn key that's to the left of Ctrl key. I remember seeing a Sony utility on a VAIO Z that allows you to switch the Fn and the Ctrl key, but I couldn't find it anymore. I've also tried SharpKey but it doesn't recognize the Fn key. Is there a way to switch these two keys on a Sony VAIO?


I have a problem with a iMac mid 2011. It doesn't boot anymore. When booting, you only see a folder with a question mark, that's it. Troubleshooting done:  boot from the same HDD on another iMac mid 2011: OK boot the defect iMac with the HDD from the working iMac: Not OK added an extra sata-cable and connected the HDD to that cable: Not OK tried to boot to diagnostics and safe mode: Not OK reset NVRAM and PRAM: Not OK  What can I try more to get this iMac working again?


Find all positive integer $n$ with the property that there is a partition of the set $({n, n + 1, n + 2, n + 3, n + 4, n + 5})$

find all positive integers $n$ with the property: there is a partition of the set $({n,n+1,n+2,n+3,n+4,n+5})$ into two disjoint subsets $A$ and $B$ such that the product of element in $A$ is equal to the one in $B$  How do I approach the  problem quoted above? I tried using parity arguments but  I found nothing. Any help


I have the following construction with a long list of around 100 if .. elif. Is there a way do handle this more elegantly in python?     if isinstance(scen_dep, Class1):         scen_deps[someEnum.class2].append('1')    elif isinstance(scen_dep, Class2):         scen_deps[someEnum.class2].append('1')    elif isinstance(scen_dep, Class3):         scen_deps[someEnum.class3].append('1')


Why does ridge regression in glmnet and sklearn give very different results?  library(glmnet) X = matrix(c(1, 1, 2, 3, 4, 2, 6, 5, 2, 5, 5, 3), byrow = TRUE, ncol = 3) y = c(1, 0, 0, 1) reg = glmnet(X, y, alpha = 0, lambda = 1) coef(reg)   glmnet output: 0.18811436, –0.02910451, –0.04614124, 0.26402541  import numpy as np from sklearn.linear_model import Ridge X = np.array([[1, 1, 2], [3, 4, 2], [6, 5, 2], [5, 5, 3]]) y = np.array([1, 0, 0, 1]) reg = Ridge(alpha = 1, fit_intercept = True, normalize = True) reg.fit(X, y) np.hstack((reg.intercept_, reg.coef_))   sklearn output: –0.03862178, –0.0399697, –0.07276535, 0.42727921


Evaluating $\lim_{n \to \infty}\left({^n\mathrm{C}_0}{^n\mathrm{C}_1}\dots{^n\mathrm{C}_n}\right)^{\frac{1}{n(n+1)}}$

$\lim_{n \to \infty}\left({^n\mathrm{C}_0}{^n\mathrm{C}_1}\dots{^n\mathrm{C}_n}\right)^{\frac{1}{n(n+1)}}$ is equal to: a) $e$ b) $2e$ c) $\sqrt e$ d) $e^2$  Though it looks really innocent at first sight, it certainly isn't. Attempt: It's $\infty^{\infty}$ form. I had tried taking the product raised to the power $\frac{1}{n(n+1)}$ as function $f(n)$. Then I took logarithm of both sides to see if things simplifying.  Even after factoring out the extra factorials it wasn't easy. Note that ${^n\mathrm{C}_x} = \binom{n}{x}$.


I am new to the world of open source software. I'm a video enthusiast. I am used to using Sony Vegas - a professional editor so I want an open source editor with  professional capabilities for Vimeo, YouTube and personal use. I use Ubuntu 14.04. I searched Google and I have tried Openshot and Pitivi but they don't have the facilities offered by Sony Vegas. Can anyone recommend a video editor that might suit me?


'Ago' would be an adverb if it told time, but it seems only to be a kind of modifier of adverbs that tell time or to require some other free-standing word to tell time. It cannot stand alone, which seems to me to disqualify it from being considered an adverb. The closest it comes to telling time itself is when it is combined with 'long' as in 'long ago'. Could it be that 'ago' is just a particle or a function word like 'than' and isn't really a part of speech or even a word at all unless it is combined with some other free-standing word? German has things like this that are particles of verbs as separable prefixes. They look like words in print and are separated when spoken, but do not exist without the verbs to which they are attached in the infinitive form. (wehtun - to feel sorry, or bad. Tut das weh? Does that hurt? To which I can only say, Oy vay!)


Any way to find out what US Customs & Border Protection has in their database on me?

I travel from the US to Canada occasionally (about once per year on average) with my family. We are all US citizens and travel with US passports. Every time we re-enter the United States, I am given extra scrutiny.  Most recently, we used an automated check-in procedure at the airport. These are terminals where you scan your passport & fill out a customs declaration online and it prints a receipt which you take to the customs agent. When I got my receipt, it had a big "X" printed on it and we were directed to a line to talk to an agent.  In the past, I've had questions directed at me or my family: "Have you ever been to New York?", "Do you own any firearms?", and once "Where is your daddy?" directed at my then 4 year old son. The agents also seem to examine my photo & my face more closely than the other members of my family.  We get through customs OK, but it gives me a some anxiety. I suspect that there's someone out there with the same name (I have a pretty common name) who is on a "no fly" list or something.  My question is this: is there any way to find out what they're looking for when they scan my passport & see my name? Like a Freedom of Information request or something? I know I could/should ask when I'm in the line, but as I said, it makes me pretty anxious.


As part of my studies on java I'm trying to create a search function, which takes in one parameter String key that correlates to a destination of an object Plane.  Before that I create a Queue of 20 Object each with different parameters and am now trying to search by destination.  This is what I have so far:      public Plane searchDestination(String key)     {         Plane current = first;         while(current.destination != key)         {             if(current.next == null)                 return null;             else                 current = current.next;         }         return current;     }   It returns successful build, but doesn't return an object(s) with matching criteria, I tried adding System.out.println(current); after return current; but compiler throws out an error. I also have a .displayPlane(); function that should display all plane details (and works in other cases), but when I add current.displayPlane(); after my return current; I get an error saying that it is unreachable.  Am I doing the search correctly, or am I missing something out?


Prove that if d = gcd(m,n) then $\phi(mn)=\phi(m)*\phi(n)/d$

So if m and n are relatively prime, then the $\phi(mn)=\phi(m)*\phi(n)$ but what happens when $d > 1$?


Is there a way for finding out if the Pokémon Go servers are accessible?


Normally distributed vectors and inner product

Suppose that we have two random vectors $X_{1\times n}$ and $Y_{1\times n}$, where $X\sim N(\mu_x,\sigma_{x}^{2})$ and $Y\sim N(\mu_y,\sigma_{y}^{2})$, with N standing for the standard notation of the normal distribution $\mu_x,\mu_y$ are constants and $\sigma_{x}^{2}, \sigma_{y}^{2}>0$. Can we show that the inner product of the vectors $<X,Y>=XY^{'}$ also follows a normal distribution (where the exponential ${'}$ denotes the transpose of the random vector $Y$)? Does the same hold if $X$ and $Y$ is random variables?


Let $E$ be measurable and define $f:E\rightarrow\mathbb{R}$ such that $\{x\in E : f(x)>c\}$ is measurable for all $c\in\mathbb{Q}$, is $f$ measurable?  There are a number of equivalent definitions for the measurability of a function and the most obvious one would be to show that $\{x\in E : f(x)>c\}$ is measurable for all $c\in\mathbb{R}$.  Thus my strategy has been to consider an arbitrary irrational $y$ and use the density of the rationals in the reals to show that there exists some open set $O$ such that $m^*(O-\{x\in E : f(x)>y\})< \varepsilon$.  I would do this by choosing some rational $q<y$, close enough to $y$, such that the set of values in $E$ which get sent under $f$ to values strictly greater than $q$ and less than or equal to $y$ is small enough.  But that doesn't in general seem possible since I could keep sending intervals of some fixed positive length to smaller and smaller regions just beneath $y$.  However conversely, such a function would not be enough for a counter example, since finding such a function only rules out this strategy, but doesn't necessarily entail non-measurability.  Is there a better definition of the measurability of a set I should use? or does the statement actually not imply measurability?  Thanks.


How do I temporarily increase line spacing? I have some text on my title page:  \begin{center} { \Large \textbf{The Great Thesis About Some Very Great Things Indeed With a Pretty Long Title That Will Probably Be Split Between at Least Two Lines Or So} } \end{center}   I'm finding that the line spacing here is too small, but it's fine elsewhere in the document. How can I make the spacing bigger for just this piece of text?


No bootable device USB 2.0 MacBook Pro mid 2014

I've been tearing my hair out the last couple days trying to get Windows installed.  I have a MacBook Pro Retina 15 inch mid 2014. Yosemite version 10.10.1. Win 7 64 bit iso (sha1 - 0bcfc54019ea175b1ee51f6d2b207a3d14dd2b58).  I have tried two usb 2.0 flash drives with 'Create a Windows 7 or later install disk' option in BCA. This proceeds smoothly and so does creating the partition using Install Windows 7 option.  However, when it restarts, it says something along the lines of 'no bootable device'  If I hold down 'alt', the only options are to boot back into OS X & the recovery disk.  I realise this question has been asked countless times - I have read a lot of them but few seem applicable to my situation and those that are have not helped yet. I have not tried another USB yet since I am bandwidth limited (both in download speed and data limit) and BCA wants to redownload Windows support files every time and at this point it feels like a shot in the dark.  Any help with this will be greatly appreciated.  Some further questions:   Is there a way to determine whether the usb drives are at fault? Does BCA create the bootable drive in any special way? I.e. is it possible to create it by another method that will still play well with the bootcamp process?


As shown in the figure, the lines in both panels are $y = x$. The lines are not regression lines. I see that in the right panel the data points scatter further away from the $y = x$ line. Abundance.y and Abundance.x are supposed to be the same so that they should gather close around $y =x$ line. We are testing whether the left panel points are "tighter" around $y = x$ than the right panel points.  What is a good test for this?


I hate to spam and reopen old issues but this is urgent!!  I am experiencing an identical problem to the one in:   My internal drive can format to everything except APFS, I have tried troubleshooting via linux, and simple disk utility. Fsck and first aid both report no problems and this is driving me insane!! help desperately needed!


Simple udev rule doesn't work on Ubuntu 16.04

Can't get what's wrong with my udev rule and bash script. I want to make simple test on usb device insertion.  This is my rule /etc/udev/rules.d/90-usb.rules:  ACTION=="add", RUN+="/home/mike/notification.sh"  And this is my script /home/mike/notification.sh:  #!/bin/bash echo 'message:Hello!' | zenity --notification --listen   Just from terminal this command works fine.


Noetherianty of ring of continuous functions

Let $X$ be a topological space. Is there any topological property on $X$ that be equivalent to $C(X,\mathbb R)$ be noetherian ring?


A general formula for the second degree derivative?

Is the method I wrote for the second degree derivative formula is correct? Can you verify?     $$\begin{align} f''(x) &=\lim_{\Delta x \to 0}\frac{f'(x+\Delta x)-f'(x)}{\Delta x} \tag{1}\\[4pt] &= \lim_{\Delta x \to 0} \left[\frac{\lim_{\Delta x\to 0}\frac{f(x+2 \Delta x)-f(x+\Delta x)}{\Delta x}-\lim_{\Delta x \to 0}\frac{f(x+\Delta x)-f(x)}{\Delta x}}{\Delta x} \right] \tag{2}\\[4pt] &= \lim_{\Delta x \to 0} \left[\frac{\frac{f(x+2 \Delta x)-f(x+\Delta x)}{\Delta x}-\frac{f(x+\Delta x)-f(x)}{\Delta x}}{\Delta x} \right] \tag{3}\\[4pt] &=\lim_{\Delta x \to 0}\frac{f(x+2\Delta x)-2f(x+\Delta x)+f(x)}{{\Delta x}^2} \tag{4}\\[4pt] \Longrightarrow \quad f''(x) &=\lim_{\Delta x \to 0}\frac{f(x+2\Delta x)-2f(x+\Delta x)+f(x)}{{\Delta x}^2} \tag{5}\\[4pt] \Longrightarrow \quad f''(x-\Delta x) &=\lim_{\Delta x \to 0}\frac{f(x+\Delta x)-2f(x)+f(x-\Delta x)}{{\Delta x}^2} \tag{6}\\[4pt] \Longrightarrow \quad f''(x) &=\lim_{\Delta x \to 0}\frac{f(x-\Delta x)+f(x+\Delta x)-2f(x)}{{\Delta x}^2} \tag{7} \end{align}$$   REMARK Q:  My solution is different (especially the last steps) than . Therefore, it can not be evaluated under the category "Duplicate".


Weblogic commons-codec Base64 nosuchMethodError on SUNOS

Code used for decoding: Base64.decodeBase64("String");  Commons-codec jar version: 1.9  Exception: nested exception is java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.decodeBase64(Ljava/lang/String;)  Environment Details: OS: SunOS Version: 5.11 Java Version: 1.8.0_221 (Oracle corporation)  Same WAR working in below environment Environment Details: OS: AIX Version: 7.1 Java Version: 1.8.0_191 (IBM JDK)


How to propose another Stack Exchange website?

Is it possible to add another Stack Exchange website?  For instance, Internal Combustion Engine.  Is there a vote page or something else?


In this question, I would like to ask two things:    outlier detection normality test   Details are as follows:  I need to detect and remove outliers in my data. Before doing that, I want to test if my data is normally distributed or not. I have two variables X(independent) and Y(dependent) and have 951 records for both of them.   I want to know that while testing the normality, do I need consider both the variables simultaneously or both the variables but one at a time? (Somewhere, I have read that only dependent variable is considered to test the normality).  The attached figures show the results of normality test (Analyse>>Descriptive >>Explore) of dependent variable. If normality test is done only on dependent variable, then it shows that the data is highly skewed. In such a case, how can I remove the outliers?  The significance level of Shapiro-Wilk test and Kolmogorov-Smirnov test is 0.00. Skewness has statistic of 22.909 with SE of 0.079.


When searching on Google, how do I show more on the autocomplete list (drop down list)?

Currently it only show 4 possible autocompletes when I'm typing something in the search box, does anyone know how to increase that?  This is for Windows 10.


I have a mid-2012 MacBook Air, and the Service Battery alert is showing

My 13" Macbook Air recently started showing the "service battery" alert. It's the mid-2012 model, and is still under Apple Care. The alert seems to appear mainly when I'm running off the battery. Is this a battery issue or a bug in the system?


Can I have a mathematical equation within a caption?

I'd like to have an eqnarray environment (or equivalent) within a table caption. If I do this naively,  \begin{table*}   % table stuff   \caption{\label{tab:my_tab}     \begin{eqnarray}       a &=& b \\ c &=& d     \end{eqnarray}   } \end{table*}   LaTeX falls over with LaTeX Error: \begin{table*} ended by \end{eqnarray}. How can I get what I want (I don't mind no equation numbers)?


How to Write a test Class for Wrapper Class or Dto Class,how to call Wrapper Class in Test Class Please anyone Provide with Sample Example


player1Turn() won't return desired value

player1Turn() keeps saying that, regardless of what I put in, that temp = 0. temp is supposed to be which pit they chose, but numerically, so I could return temp and use it in the array. Also, I know there needs to be a return statement to complete the method, but for now I'm just trying to get temp to equal what I want it to. Suggestions for the whole thing are welcome, but I'm primarily concerned on player1Turn(). Thanks     import java.util.*;  public class Mancala {   Scanner input = new Scanner(System.in);   public static void main(String[]args)   {     Mancala mancala = new Mancala();     int[] board = {0,3,3,3,3,3,3,0,3,3,3,3,3,3};     System.out.print(" ");     mancala.display(board);     System.out.print(" ");     mancala.player1Turn();    }   public static void display(int[] board) {     System.out.println(" A  B  C  D  E  F");     System.out.print(" ");   for(int i = 13; i >=8; i--)   {     System.out.print(" "+board[i]+" ");   }   System.out.println("\n"+board[0]+"                  "+board[7]);   System.out.print(" ");   for(int i = 6; i >=1; i--)   {     System.out.print(" "+board[i]+" ");   }   System.out.println("\n  G  H  I  J  K  L"); } public void player1Turn() {   int temp = 0;   System.out.print("Which pit would you like to select? ");   String pit = input.nextLine();   {   if(pit == "A")     temp = 13;   else if(pit == "B")     temp = 12;   else if(pit == "C")     temp = 11;   else if(pit == "D")     temp = 10;   else if(pit == "E")     temp = 9;   else if(pit == "F")     temp = 8;   else     System.out.print("That is not a valid pit!");   }   System.out.print(temp); } }


This must have been known. Let $L/K$ be a finite number field extension. Then is $O_L$ a free $O_K$ module? How to prove it if so? So far, I know how to prove the following:  Let $\alpha_1,\dotsc,\alpha_n\in O_L$ be a $K$-basis of $L$ and let $d=d_{L/K}(\alpha_1,\dotsc,\alpha_n)$. Then $dO_L\subset O_K\alpha_1\oplus\dotsm\oplus O_K\alpha_n$.


Setting the width of a menu in the Windows API

I'm creating a custom control in wxWidgets that displays a menu as part of it, and currently working on the Windows side of things.  wxWidgets doesn't have a way of setting the width of a menu.  It just makes the window as wide as the longest string plus a few pixels on either side.  In the API, there is a way to get the actual Windows API menu handle.  Does the Windows API have a method of setting the width of a menu other than just calculating it on its own based on the width of the string?


My phone started rebooting all by itself all the time after I did 2 things with it. Installed Snapdragon BatteryGuru and put it on learning mode (for an estimated 3 days I guess) so that I could start saving battery by the app learning my behavior, and cleaned RAM with CleanMaster. These were the only changes I've done, I don't remember which was first but soon my phone started rebooting whether I was handling it or not at random intervals. I've also noticed the phone was hot all the time, the Note 3 runs into some hot period with some frequency but not with that frequency. I've uninstalled both apps and it didn't work, wiped cache and it didn't work. The phone was still rebooting even on safe mode. After I wiped Dalvik with the help of TWRP, I thought the problem went away but when I hit the power button to turn the screen off, the phone rebooted and it will now always reboot when the screen turns off, even if it's just from the phone being inactive. Note 3 SM-N9003 VJUBMI6


Clarification on the definition of derivative/differentiablility

I'm having a hard time understanding where to use: $$\lim\limits_{x \to a} \frac{f(x)-f(a)}{x-a}\qquad\text{and}\qquad \lim\limits_{h \to 0} \frac{f(a+h)-f(a)}{h}$$ My textbook seems to use either one of these in similar exercises and from what I've tried they produce the same result. Any help?


Resorting the *.bib file as appeared in *.tex and rewriting to a new *bib file (biblatex)

I have quite a huge database of citations, but not all of them are included in the document. And of course they are not ordered by appearance in the text, because sometimes I have to go back to some earlier part and include more citations. In our work group it is common practice to share the citation libraries with each other, once the thesis is finished. Since the bibtex format is quite common amongst many scientific journals I would like to include the bibliography as a digital copy. Hence I need to resort the whole *.bib file and remove citations unnecessary.  As suggested I have looked on the several possibilities mentioned in   Unfortunately those work only for the bibtex case.  I suppose it does have to do something with how the literature is cited:  Bibtex:  \citation{Schroedinger1926}   Biblatex:  \abx@aux@cite{Schroedinger1926}   That way neither  nor  do the job. I am currently trying the bibtex2html approach, but that does not compile.  One thing that I probably should mention is that I am using biber as a backend.   So, the basic question is how can I get the same result with the above combination for biber+biblatex.  I could change those commands by hand, but I really do not want to mess around with automatically written files. ( I could do it with grep and sed but I would rather save the pain.)


How to prove the following by Cauchy-Schwarz?

If  $u(x) \in C([a, b]), u(a) = 0,\; u(x) = \int_{a}^{x}u^{'}(t)dt$  then  $\int_{a}^{b} |u|^{2} dx \le \frac{1}{2}(b - a)^{2}\int_{a}^{b}|u^{'}(t)|^{2}dt$  The book said it can be proved using cauchy-schwarz-inequality, but I cannot make it.


I cannot use ntfs partitions from Ubuntu, how can I fix?

I have windows 10 and ubuntu-16.04 installed in dual boot.  I want to get into the Linux universe from time to time and I have a problem that is rather intriguing to me! When I  installed, Ubuntu already has Windows 10 installed with two C: and D: partitions.   To install Ubuntu I created a third partition with on the hard disk and installed ubuntu in dual boot! Until then, everything OK !!  When I opened the Ubuntu OS I can see the disks C: and D: and I can read and write files on them !! But after using the system two or three times, do not know the right, is no longer allowed to read or write the disks through Ubuntu!  What happened?


how to force Bibtex to treat two letters as one for author initials?

I have a citation that is transliterated from Russian Cyrillic.  @book{kondratyev_radiation_1969,     address = {New York},     series = {International geophysics series},     title = {Radiation in the atmosphere},     volume = {12},     publisher = {Academic Press},     author = {Kondratyev, K. Ya.},     year = {1969},     keywords = {Atmosphere, Solar radiation, Transport theory}, }   This means that the authors second initial is 'Ya' yet when using bibtex the a gets cut off.    I even tried this with no success:  @book{kondratyev_radiation_1969,     address = {New York},     series = {International geophysics series},     title = {Radiation in the atmosphere},     volume = {12},     publisher = {Academic Press},     author = {Kondratyev, K. {Ya}.},     year = {1969},     keywords = {Atmosphere, Solar radiation, Transport theory}, }   Does anyone know how to force bibtex to treat the two letters Ya as one?


I am a beginner in DFT. What are some resources that could help me to learn the basics?

I am a beginner in DFT. Please suggest me some good material to understand the basics.


Let $\phi: R \to S$ be a homomorphism of rings, $I$ an ideal of $R$, $J$ an ideal of $S$.

Prove that $\phi^-1(J)$ is an ideal of $R$.  Hello, I am trying to prove that $\phi^-1(J)$ is an ideal of $R$ given the above conditions but am stuck on my proof. Any feedback would be appreciated.  Note: $\phi^{-1}(J)$ is a sub-ring of $R$.  Absorbs products:  $\forall r \in,R$, and $x \in \phi^-1(J)$ rx $\in$ $\phi^-1(J)$ and xr $\in$ $\phi^-1(J)$ pf. Let r $\in$ $R$ and x $\in$ $\phi^-1(J)$. Thus x =   I don't know if I am in the right direction, can someone point me in the right direction. Thanks!


Cannot install the package ttf-mscorefonts-installer

These are the problems shown on the terminal:  W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/andale32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/arial32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)   Similarly many other files related to ttf-mscorefonts-installer.


When using a hyphen directly next to a capital T the spacing (kerning) looks weird:  Input: Abc-Tuv  Output:    It seems as there is too much space between the hyphen and the T. I can reproduce this behavior in PdfLaTeX and XeLaTeX (even Word) using the default font.  Is this typographically correct? If it is not what would be correct? How can I achieve a consistent correct kerning throughout the document without specifying \kern manually on each occurrence?  Thanks for your answers.  Edit: Given that this question was marked as duplicate I realize that my formulation of the question was somewhat misleading. Maybe it would have been better to emphasize the typographical aspect of the question: Usually the automatic kerning works quite well (meaning that I never had to bother about it before). Why does the spacing look "wrong" in this special case? Am I mistaken and this is actually (typographically) correct? If it is not which value should I supply to \kern? Guessing a value and change it until it "feels" good? Is there a better way, so that the best value is chosen automatically?  I hope this clears things up, sorry for not being precise in the first place.


Exactness of p-value in testing by simulation

When I use simulation to determine a p-value I am aware that the exactness of my p-value will be at most an estimate because I am using the scores of my sample and not my population, so that my computed p is on average close to its true p-value.   How do I deduce whether my estimate is a good estimate or a not-so-good estimate? Is there a some kind of rule?   My guess would be that it should be something like N ≥ 30 but I would appreciate an official answer.


how can my arraylist of object get updated on the onCreateview of a fragment

I am retrieving object arraylist of a recyclerview item ,my function on the fragment is updated ,but my arraylist on oncreateview remains null, how can i observe the updated value on realtime ?   public void gettolist( ArrayList<Profilefire> profilesingle) {     profilestoinvoice=profilesingle;     Log.v("listtocheck",profilestoinvoice.size()+" ");  }   -----> this shows size is updating    facture.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {               Log.v("listtocheck",profilestoinvoice.size()+" ");          }     });   ------> but here on the main onCreate method where i am handling my button click,the array keeps showing null    @Override   public void onBindViewHolder(@NonNull UserHolderFacture userHolderFacture, int i) {     final Profilefire profilefire =profiles.get(i);     userHolderFacture.updateUI(profilefire);      if (!isSelectedAll) userHolderFacture.checkall(false);     else userHolderFacture.checkall(true);        userHolderFacture.getFacturecheck().setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {         @Override         public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {              if(isChecked){                 profilestoinvoice.add(profilefire);                 invoicingFragment.gettolist(profilestoinvoice);              }else {                  profilestoinvoice.remove(profilefire);                  invoicingFragment.gettolist(profilestoinvoice);              }            }     });    }


I have two layers, one is point layer and other one is a line layer. I want the point features to snap on to the lines, but the points are away from the lines. Is there any way to move the points onto lines?


I am supposed to run a regression of Medical Expenditure on several explanatory variables like income, no of illnesses, age and also some dummy variables like gender differentiating dummy, dummy for health insurance cover etc. The simple linear regression thus obtained turns out to have low t and R2 values. I used some other functional forms like log transformation for income and medical expenditure. I even tried dropping some variables but the insignificance and low R2 persist. I dropped the intercept and the regression turned out to have high R2 (almost .95 in comparison to a .15 in the first model). How do I interpret this? I know dropping the intercept has some implications and we need to factor in presence of Dummy Variables as well since without an intercept, there'd be no base case for the Dummy Variables.  What is wrong with the entire interpretation? Given the possibility of dropping a variable, how do I interpret the dummy variables (there are 4 in total).


How do I combine the NBT tags from two separate commands?

I have two commands I'd like to combine into one, but I'm not sure how to go about combining them. Is this possible?   Here are the commands. They work individually, I just can't seem to get them to work together:  /give @p jukebox 1 0 {CanPlaceOn:["minecraft:melon_block"]}     /give @p jukebox 1 0 {display:{Name:"Box"}}   Can you help me to add one of the commands to the other one?


Characterization of short exact sequences

The following is the first part of Proposition 2.9 in "Introduction to Commutative Algebra" by Atiyah & Macdonald.     Let $A$ be a commutative ring with $1$. Let $$M' \overset{u}{\longrightarrow}M\overset{v}{\longrightarrow}M''\longrightarrow  0\tag{1} $$ be sequence of $A$-modules and homomorphisms. Then the sequence (1) is exact if and only if for all $A$-modules $N$, the   sequence  $$0\longrightarrow \operatorname{Hom}(M'', N)  \overset{\overline{v}}{\longrightarrow}\operatorname{Hom}(M,  N)\overset{\overline{u}}{\longrightarrow}\operatorname{Hom}(M', N)  \tag{2} $$ is exact.   Here, $\overline{v}$ is the map defined by $\overline{v}(f)=f\circ v$ for every $f\in\operatorname{Hom}(M'', N)$ and $\overline{u}$ is defined likewise.   The proof one of direction, namely $(2)\Rightarrow (1)$ is given in the book, which I am having some trouble understanding. So assuming (2) is exact sequence, the authors remark that "since $\overline{v}$ is injective for all $N$, it follows that $v$ is surjective". Could someone explain why this follows?  Given that $\overline{v}$ is injective, we know that whenever $f(v(x))=g(v(x))$ for all $x\in M$, we have $f=g$. I am not sure how we conclude from this surjectivity of $v$.  Thanks!


$\sum a_nx^n$ converges for $|x|<1$ then $\sum a_n$ converges

Suppose $\{ a_n \}$ is a sequence of non-negative real numbers and $\sum a_nx^n$ converges for $|x|<1$. If $\lim_{x \rightarrow 1^-}\sum a_nx^n=A$, prove that $\sum a_n$ converges to $A$.   My attempt: given $\epsilon>0$, we can find $\delta$ such that if $x \in (1-\delta,1)$ then $|\sum a_nx^n-A| < \epsilon$. Now consider $|\sum a_n - A| \leq |\sum a_n - \sum a_nx^n| + |\sum a_nx^n-A|$ and since $x^n \rightarrow 1$ as $x \rightarrow 1^-$, we have $|\sum a_n - \sum a_nx^n| \rightarrow 0$ and so $\sum a_n$ converges to $A$. Is my proof valid? Thanks.  Edit: As suggested by @Clement C., my notes also say that by Tauberian theorem if we prove that $\lim_{n \rightarrow \infty}na_n=0$ then we can conclude the statement. I wonder if this is possible.


I want to capture the scroll bottom action to load more records.Thanks

I have aura iteration with the set defined height,in which I am calling another component . I want to capture the scroll bottom action to load more records.  <div class="slds-scrollable" style="height: 40rem; width: 34rem;">          <aura:iteration items="{!v.timeLineItems}" var="item" end="{!v.displayCount}">                  <c:ActivityTimeLine_Item activityType="{!item.ActivityTimelineType}" itemDetail="{!item}"/>          </aura:iteration>     </div>


I basically want an enum-like class in PHP. My enum should have a few values (they are all static). Let's say I want to have an enum that has an ID (the ID must never, ever change), and a name (the name must not change during runtime, it can change during compile-time -- e.g. from changes made to the code). The state must not have any side-effects (i.e. they are only getters and instance variables cannot be changed). A state must also not be created during runtime except when initializing the class.   For my concert example, I have three possible states: OPEN, CLOSED, and UNKOWN:  class MyState {     const STATE_OPEN = new MyState(1, "open");     const STATE_CLOSE = new MyState(2, "closed");     const STATE_UNKOWN = new MyState(3, "unkown");      private $name;     private $state;      private function __construct(int $state, string $name) {         $this->state = $state;         $this->name = $name;     }      public function getName() : string {         return $this->name;     }      public function getState() : int {         return $this->state;     }      public function getStateByID(int $state) : MyState { ... }     public function getStateByName(string $name) : MyState { ... } }   I want to refer to each state unambiguously in my code (MyState::STATE_OPEN, etc). This should also ensure that a compiler/linter/etc can verify that the state actually exists (there is no guarantee that getStateByID does not throw an exception).   There are also some (de)serializers that can load a state after it has been saved (by using the never changing ID).  Unfortunately, I cannot set const or static instance variables if their object is from the same class. I get the following error:  Constant expression contains invalid operations   How can this be best accomplished in PHP? I know I can easily create an enum with just an int (class MyState { const STATE_OPEN = 1; }) but that has a major disadvantage: the enum is not an object and thus cannot have methods. I cannot use type hinting this way and I might pass an invalid enum. E.g., function takeMyState(int $state) can actually use an enum that has never been defined.


Finding expectation of continuous random variable

Let $X$ be a continuous random variable with CDF $F$. Suppose that $P(X>0)=1$ and that $E(X) < \infty$. Show that $E(X) = \int_{0}^{\infty}P(X>x)dx$  I start out with the definition of expectation: $$E(X) = \int_{-\infty}^{\infty}xdF(x)$$ Proceed with intergration by parts, letting $u =x$ and $v' = dF(X)$: $$E(X)=xF(x)\rvert_{-\infty}^{\infty}-\int_{-\infty}^{\infty}F(x)dx$$ $$=xF(x)\rvert_{-\infty}^{\infty}-\int_{-\infty}^{\infty}[1-P(X>x)]dx$$ let $t \rightarrow \infty$: $$E(X)=\lim_{t\rightarrow\infty}tF(t)-\lim_{t\rightarrow\infty}-tF(-t)-[\lim_{t\rightarrow\infty}t-\lim_{t\rightarrow\infty}-t]+\int_{-\infty}^{\infty}P(X>x)dx$$ $$\lim_{t\rightarrow\infty}t-0-\lim_{t\rightarrow\infty}2t+\int_{-\infty}^{0}P(X>x)dx +\int_{0}^{\infty}1dx$$ $$=\int_{-\infty}^{0}P(X>x)dx$$ I am not sure where my faulty logic is here, but I presume I did something naughty with the limits (I am quite rusty on my calculus), or I am misunderstanding how to use the fact that $P(X>0)=1$. Why did I end up with $\int_{-\infty}^{0}P(X>x)dx$ and not $\int_{0}^{\infty}P(X>x)dx$?


How exactly do our eyes see an inverted image of what we are looking at?  Does it have something to do with the shape of our lens (i.e. convex)?


Why don't my twins sleep for a longer stretch of time?

My twins are 4 1/2 months old. They are exclusively breastfed. We start our bedtime routine at 8: we take a bath, breastfeed, then rock to sleep. By 10 they will be asleep. However, each 2-3 hrs they will wake up to breastfeed. They never slept for more than that.  Is this normal? Aren't they supposed to sleep for a stretch of 5-6 hours yet?


This question is related with the topic:   I have understood the formula used to determine $(x,y)$ such that $x^2+y^2=M$ with $M$ composite. But what if $M$ is a large prime such as $M=1000000241$ do I have to do only bruteforcing? Are there other methods?  EDIT:  I know that $M$ must be a prime of the form $4k+1$ but how to find $(x,y)$?  Thanks


Running buffer algorithm from processing on each feature from one layer in pyqgis?

In a standalone outside script for QGIS 2.18, i have a layer which contain multiple features to bufferize :   vlayer = QgsVectorLayer(out_dir + "selected_shape.shp", "blabla", "ogr")   I try to run processing for each features  from qgis.core import * from processing.core.Processing import Processing Processing.initialize() from processing.tools import * import processing  buff_res = processing.runalg("qgis:fixeddistancebuffer", vlayer, 0.2, 99, False, None,)  get_output= processing.getObject(buff_res['OUTPUT'])  for f in get_output.getFeatures():     print f.attributes()   The qgis:fixeddistancebuffer compute the buffer only on the first feature from my layer. How can i compute the buffer on each feature on this vlayer ?


A definition of Conway base-$13$ function

Can you give a definition of the Conway base-$13$ function better than the one actually presented on , which isn't clear? Maybe with some examples?


java.lang.NullPointerException in parsing json data

I'm learning java recently and when I wanted to parse the data from a weather website, I got this error and I still can't figure it out, can anybody tell why I got this error: java.lang.NullPointerException ?   public class main {     public static void main(String []args) {         try {             URL url = new URL("http://api.worldweatheronline.com/premium/v1/past-weather.ashx?key=caa2f68a7b2b43a09c115021171404&format=json&q=atlanta&date=2015-07-20&tp=24");             InputStream is = url.openStream();             JsonReader rdr = Json.createReader(is);             JsonObject obj = rdr.readObject();             JsonArray data = obj.getJsonArray("weather");             JsonObject objectOfData = data.getJsonObject(0);             System.out.println(objectOfData.getString("date"));         } catch (Exception ex){             System.out.println(ex);         }      } }   Here is the data parsed from Postman:    Here is the trace log:    Here is the picture of line 19


systemd-logind[1439]: Failed to enable subscription: Launch helper exited with unknown return code 1

I'm getting a black screen of death. The only way around it is booting upstart. VirtualBox, uninstalled guest additions.


Best way to combine two or more byte arrays in C#

I have 3 byte arrays in C# that I need to combine into one. What would be the most efficient method to complete this task?


No wi-fi on new Ubuntu dual boot with Windows

I have installed a new dual-boot with windows. I saw some error messages at first load, and had to disable some graphics to get the install wizard to run correctly. Ubuntu is all installed and beautiful, but is not showing Wi-Fi as an option. I can get internet via wired connection, but the OS is behaving as if my computer does not have a network adapter. After doing some research on the command line I found that the adapter is the rtl8821ce, but cannot figure out any way to get Ubuntu to recognize and use it.


Redirecting URL with a certain parameter in

I would like to do the follow redirection using htaccess:  From:  To:   However, all of the parameters change quite a lot apart from page_id, so if it is possible to redirect all of these pages without having to do one for each possibility, that would be ideal. Thanks in advance for any help received,


I'm working on "Scorched earth"-like game just for learning purpose. I can't figure out how to launch the projectile from my tank's position, with a power of X ([0,100]),at an angle of Y ([-180,180]).


Disable SSH password authentication without root privileges

I have an online shell as a free account on a website. From what I know, after I generate the SSH key pair and put the keys in the appropriate places, I should disable password authentication.  I found that it can be done by editing /etc/ssh/sshd_config and then restarting the service. But there is a problem: I don’t have root privileges on the server, and the admin doesn’t seem very responsive.  So is there a method to disable pass auth all by myself, without said priviliges?


Is there precedent for mortgage rates being higher for a refinance than a purchase?

Right now, most if not all major banks have mortgage refinance rates about 1% higher than the rate for a mortgage used to purchase a property. Up until a few months ago, I don't recall ever seeing any spread between advertised refinance and purchase rates, never mind such a big one. Is there historical precedent for this practice? What is stopping a lender from undercutting other banks by offering only an 0.5% spread? Is it collusion that nobody is doing so?


Difference between prototype and non-object methods in Javascript

Lets take a look at these two examples:  first:  function Cars (name, doors) {     this.name = name;     this.doors = doors;     function getInfo() {         return this.name + " " + this.doors;     }; }   second:  function Cars (name, doors) {         this.name = name;         this.doors = doors;     }  Cars.prototype.getInfo = function() {     return this.name + " " + this.doors; }   I know that in first example saving the getInfo() method as object instance would waste memory this.getInfo() = function() { this.cars + " " + this.doors;} and it would be inherited, but is there a difference if the method would be defined as a non-object property - like I did in the first example and not as an object instance (I'm missing words here), besides that it would be statically defined?  What is the difference between   this.getInfo() = function() {       return this.cars + " " + this.doors; }  and   function getInfo() {     return this.cars + " " + this.doors; }   Performance and all other differences?  Also, is there a way to access private local variables with obj.prototype?  Thanks.


Using Ubuntu 11.10 and Vmware Player 4.0.  Every time when I open the vmware player, the last library was not there (it was just blank). I can manually add it and it is working then.  Anyone experienced this?


Placing math environments inside math environments

I have a macro which appears throughout my document in various places:  \newcommand{\placefraction}[2]{     $\frac{#1}{#2}$ }   Sometimes it is placed with regular text. Sometimes it is placed within other math modes. However, the document won't compile if it is placed inside another math mode.  None of my math ever appears in displayed formulas, it is always part of the paragraph.   How can I have a macro which sometimes appears inside math mode, sometimes outside, but itself contains math mode?


Show that $\limsup_{n \to \infty}a_nb_n= \limsup_{n \to \infty}a_n \cdot \lim_{n \to \infty}b_n$

Let $\{a_n\}_{n \geq0}$ and $\{b_n\}_{n \geq0}$ be two real sequences and suppose that $\lim_{n \to \infty} b_n=b \geq 0$ exist. Show that $$\limsup_{n \to \infty}a_nb_n= \limsup_{n \to \infty}a_n \cdot \lim_{n \to \infty}b_n$$  I am stacked on this problem. Could anyone give me a hint?


Why is the area of parallelogram not equal to the product of the distances between the two pairs of parallel sides? A parallelogram is just a rectangle that has a triangle cut off from one side and added to the other; so then why is the area not equal to the product of the distances between the two pairs of parallel sides?


Short story about a teleport gateway on Earth

The story I'm looking for is in a book I read in the mid/end seventies (1970's for time travellers). I can remember fragments from the story:   Teleport works through replication It has limited range, so teleport gateways are needed to spread across the galaxy Aliens teleport in and (not sure here) straight back out again leaving behind their inanimate body Our protagonist runs one of these gateways on Earth It's in a wooden house in or on the edge of a forest His job is to clean out the tanks the aliens teleport into by dissolving their left-over bodies after they leave again No-one else knows about this setup, he's the only person on Earth who knows about the aliens and the teleport gateways One day, one of the aliens escapes before being teleported on I think something like a police squad teleports in to try and locate the alien and take it away again


Do non-Israeli airlines flying to Israel adopt the same security measures?

Sorry if this question might seem suspicious - as a frequent traveler to Israel it's simply something I've always wondered about.  El Al has some well-known extra security methods for all flights to Israel, including operating their own additional baggage screening system, air marshals, etc. I believe Arkia and Israir do the same and that the Israeli government supplies the budget.  Are foreign airlines flying to Israel (Lufthansa, BA, etc) forced to also use these methods and screen passengers? Strangely although I've flown with foreign carriers and El Al many times I can't recollect how the experience differed - and would have no way of knowing about additional baggage screening.  If anybody has any information it would be nice to have my curiosity satisfied!


I have been in Europe for 2 years    Does this sentence mean I was in Europe for 2 years?  What's the difference between these two sentences?     I have been in Europe    Can this mean I am still in in Europe?


Does the spouse of British national with UK residence permit spouse leave to remain need a Schengen visa to travel to France?

My wife is an Thai national with an Thai passport. She holds an spouse/partner leave to remain in the UK residence permit. Does she need to apply for a Schengen visa before travelling to France or any other Schengen countries? And if so does she need to apply for a separate Schengen visas for each planned trip (eg France in May, Austria in July, Malta in September etc)


Erf as term for plot of land in a town or city. Is this word only used in southern Africa?

The Free Dictionary website states and so does Wikipedia:     erf [ɜːf]   n pl erven [ˈɜːvən]   (Engineering / Civil Engineering) South African a plot of land, usually urban, marked off for building purposes   [Afrikaans]   The term erf is used in legal documentation and technical English throughout South Africa and Namibia, maybe even further afield in the region.  Is it used anywhere else, except maybe the Dutch/Flemish regions in Europe, where I assume the term originated?  An example:      The client purchased Erf 132, Windhoek for a large sum of money. He intends to build a house on this erf.   The capitalisation of "Erf 132" is commonplace, since it is a definition of a location. This is similar to capitalisation of towns or cities. I find it slightly awkward, but that is how it is done.


Time complexity in terms of theta notation

sum= 0; for (i = n; i > o; i = i/3)    for (j = 0; j < n^3; j++)                  sum++;  what is the time complexity (in Θ- notation) in terms of n?  so far, i've gotten to this point:  The running time is O(n^3).Because the for loops’ conditions are depend on n and n 2, respectively i don't feel right about it. would appreciate any help, thanks.


How should i handle dynamic cast with template classes?

I got a template class that will store objects of derived classes from a base class, as an example: Template class vector, base class b, derived class d. class Animal { protected:     std::string m_name;  public:     Animal() {}     Animal (std::string name): m_name {name} {}     virtual void set_name(std::string name) {m_name = name;}     virtual std::string get_name () {return m_name;}     virtual std::string regn()  const { return "???"; }      virtual ~Animal(){     cout << "Destructor animal"<<'\n';} }; class Bird: public Animal { public:      Pasare() : Animal(){}     Pasare(std::string name)         : Animal{ name }{}     void set_name (std::string nume){     m_name = nume;}      std::string get_name(){     return m_name;}      std::string regn()  const override {return "BIRD";}      ~Pasare (){     cout << "destructor pasare"<<'\n';}  }; template <class T> class Atlas { private:      int m_length{};     T* m_data{};  public:     void SetLungime(int j);     Atlas(int length)     {         assert(length > 0);         m_data = new T[length]{};         m_length = length;     }      Atlas(const Atlas&) ;//= delete;     Atlas& operator=(const Atlas&);// = delete;      ~Atlas()     {         delete[] m_data;     }      void erase()     {         delete[] m_data;          m_data = nullptr;         m_length = 0;     }      T& operator[](int index)     {         assert(index >= 0 && index < m_length);         return m_data[index];     }     int getLength() const; }; template <class T> int Atlas<T>::getLength() const  {   return m_length; } template <class T> void Atlas<T>::SetLungime(int j){m_length = j; m_data = new T[j]; }  int main () {  Atlas<Animal> AtlasAnimal(1); Bird b{"Eagle"}; Animal &a{b}; AtlasAnimal[0] = a; cout << AtlasAnimal[0].get_name << " " << AtlasAnimal[0].regn();  -- This prints "Eagle",  which is good and "???" instead of "BIRD" as i wanted.  I don't know how to handle this, cause overriding the function regn works well; cout<<a.regn() prints "BIRD" , as wanted. I tried to do a dynamic_cast as shown: cout << AtlasAnimal[0].get_name << " " << (dynamic_cast<Bird&>AtlasAnimal[0]).regn(); but it fails, saying terminate after throwing instance of : std::bad_cast


How does the War Caster feat interact with +1 weapons or shields?

Say I take the War Caster feat, which allows me to use my weapon or shield as a spellcasting focus. If my weapon or shield is a +1, then when I use it was a spellcasting focus, would it act as a +1 wand or rod focus?


Every separable Banach space embeds in $C[0,1]$.

Every separable Banach space is isometrically isomorphic to a closed subspace of $C[0,1]$.   I know the result that every Banach space is isometrically isomorphic to a closed subspace of $C(X)$ for some compact Hausdorff $X$. This is proven using Alaoglu's theorem. However, I don't know how to improve this result, replacing $X$ by $[0,1]$.  Any hint will be appreciated!


I've studied simple harmonic motion and the relation that force $\mathbf F$ is proportional to $-x$ and time period of motion. But if in some other motion, $\mathbf F$ is proportional to some other power of $x$ say $- \mathbf F$ proportional to $-x^3$, and we just doubled the amplitude of motion, then how would the time period change?


I already have Windows XP, During installing Ubuntu(dual boot) the disk drive just stuck up at one place and doesn't seem to move ahead.. Is there a disk bad sector mark utility that just marks these sectors so that the disk doesn't seek them later. I tried running Seagate Seatools on the drive but both the short test and long test fail even before they start even chkdsk /f/r doesn't seem to work as the system locks up at stage four.


What is the remainder when $40!$ is divided by $1763$?     My try :  Factorizarion of $1763 = 41 * 43$  By using Wilson's theorem, I can say  $40! = -1 (mod 41) $  and $42.41.40! = -1(mod 43)$  => $40! = -22(mod 43)$    How can I combine both the results ?


I have a MWE where I use eqnarray for multiline equations. I want to right align those two text, but \hfill is not working here.  I think I may use align, but here just want to know how to do it with eqnarray.  \documentclass[]{beamer}  \begin{document}  \begin{frame} \frametitle{Example} \begin{eqnarray*} A &=& B + C \hfill (\Leftarrow \text{from Theorem 1}) \\   &=& D + E \hfill (\Leftarrow \text{from Corollary 2}) \\   &=& F  \end{eqnarray*} \end{frame}  \end{document}


To talk about something or someone, we usually give an apostrophe, like John's pen. If the word ends with s, we say Adams' pen . But what if we are talking of something that ends with an apostrophe s like Jack's (what we sometimes say in short for Jack's home, or Jack's kitchen etc.). How do I use an apostrophe for words like these? (For eg. If I want to say "Jack's house is closed" but I want to write Jack's instead of Jack's house  , How do I manage the apostrophe?)


I'm new to wordpress, I set up everything, but there's something that bothers me: on every single URL or link, there's a "?v=hash" appended everywhere (example.com/?v=d21feabed96b).  I tried to see inspect every plugin, I don't understand how this parameter is added.  It looks like it's added in js, because if I see the source, there's no trace of this hash, but I can see in firebug live source.  Plugins installed:   jetpack sumome wp-piwik wp super cache woocommerce   Theme: Storefront  I tried to disable everything, but still I get this hash, does anyone knows how and why it's added?  I'm also using cloudflare


Cant install chrome - what am I doing wrong?

I am Linux newbie. I installed Ubuntu today, and I don't know how to install Google Chrome browser. I first downloaded it from official page. After opening it, clicking install and entering password, it stays jammed at "Installing". I tried it multiple times, and now the whole "Ubuntu Software" app is jammed - it shows only main page, but when I want to find something or go to "Installed" or "Updates" tab, there is just loading circle...  sudo apt-get -f install output:   0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1   W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1   W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1   W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1   W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1   W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1


Show that a continuous function doesn't exist such that for every real $c$, there exist exactly two reals $a, b$ s.t. $f(a)=f(b)=c$.

I got pretty confused at that question... Can anyone help me understand this question better and/or drop some hints please? Thank you!


I want to grep across 500 files in a Maildir directory. I issued the command  grep MyPattern *   I got the error message:  bash: /usr/bin/grep: Argument list too long   So I stored the list of files in a file MyFiles, and issued the following  for i in $(`cat MyFiles`); do echo $i; done   Before I did a grep, I wanted to do an echo just as a check. But this gave the following error  bash: 1434361691.M617282P6399V0000000000000808I00000000000E16C1_23.ananda-linux,S=10055:2,S: command not found   where that 1434... thing is the first file in the directory.  So back to the original question. How do I grep across all these files in the mailbox. And I have larger mailboxes containing 50000 or more emails.


Where can I find the iptables log file, and how can I change its location?

I have this rule in my iptables:  iptables -A INPUT -s 192.168.11.0/24 -j LOG   My question is:  Where is the iptables log file, and how can I change that?


Prove that $$\frac{1}{4}\left(\frac{a^2}{b}+\frac{b^2}{c}+\frac{c^2}{d}+\frac{d^2}{a}\right) \geq \sqrt[4]{\frac{a^4+b^4+c^4+d^4}{4}}, \forall a,b,c,d \gt 0 $$ thanks.


Probability of list having a pair of unchanged consecutive elements once ordered

I've been grading exams for most of the day. Once I finished grading, I started entering the grades into my gradebook -- one by one, from top to bottom on the stack. About halfway through, I entered one students grade and the next student on the stack was also the next person alphabetically in the gradebook. What is the probability of this happening with $n$ students, all of whom have unique names?  Equivalent question:  For a random permutation $\left(a_1,a_2,\ldots,a_n\right)$ of the list $\left(1,2,\ldots,n\right)$, what is the probability that there exists at least one entry $k$ of the permutation that is followed immediately by $k+1$ (that is, $k = a_i$ and $k+1 = a_{i+1}$ for some $i \in \left\{1,2,\ldots,n\right\}$) ?  For small $n$, it's not hard to exhaustively calculate the probability. But my combinatorics skills are rusty, and I don't think I can easily calculate this for my 30 students.


How to "pull" an existing pdf into the app?

I currently have an app in C#/WPF, and I have a manual on how to use it in pdf, and I'm thinking of adding a button that when clicked open the manual ... How can I do this?


How can I determine if the user clicked the back button in GWTP?

I use GWTP and have two Presenters. Lets call it   FirstPresenter SecondPresenter   The website starts with First. When I click a link on First I navigate to Second. Now there are two forms of navigation on the Second Presenter.   The user can click a link which navigates back to First The user can click the browser back button.   How can I determine if the browser back button has been clicked?


There are things that I do not understand. When you use gpu only uses 1 core. Solution or explanation? Blender 2.78 release 1475052116   Amd fx 8120 ram 16gb 1600 ssd 120 kingstone + hdd sata3 500 gb gtx 970 sc evga  linux mint 18


The determinant of a matrix has a geometric meaning in terms of volume. Does the trace have some geometric meaning as well?


My comment flag may not have been handled correctly. Can someone enlighten me as to what happened?

So I came across an , screenshot shown below, for this .    I felt that this answer really wasn't an answer, so I raised a "it is not an answer" flag, but that flag was disputed, but it's apparent that there are others that feel the same way as I do.  So my question is why was my flag disputed?  I just want to get some perspective on this so I can better understand what really constitutes an answer and what doesn't.  And if this shouldn't have been disputed, well then obviously my flag should be corrected and the answer removed.  Don't know if it's worth mentioning, I have nothing against Jeff Yates, just doing my part to help keep the boards following the established guidelines.  Cheers.


Why can sticking fingers in an electric outlet kill you?

I just wanted to learn some differences between volts, amps, ohms and so forth and came up with this question. If your skin has 100k ohms resistance and the outlet is 220v wouldn't the current flowing through your body be 0.0022 amps?


Why is logon not automatic when coming from Stack Overflow via the Stack Exchange menu dropdown?

As logged on in Stack Overflow and clicking the Stack Exchange dropdown (top of window client area, far left) my expectation was to be automatically logged in to Server Fault...  That did not happen ... WHY?


Mirrored mesh splits when manipulating bones

I am using a mirror modifier for modelling. When viewing the mesh in edit mode, the vertices in the center are firmly stuck together and cannot be separated.     When in pose mode, I manipulate a wrist bone on my model and the mesh splits in two along the mirror axis center.    I have tried removing the subsurface modifier to see if this was the problem leaving only the armature at the top of the modifier list,i.e. as first modifier (which I am told is the bottom of the stack) and the mirror as the second.  It doesn't separate in edit mode and I've also tried increasing the merge limit to 0.1 and there's no change. Manipulating bones separates the mesh.


Can compact sets completey determine a topology?

Suppose that $\tau_1$ and $\tau_2$ are two topologies on a set $X$ with the property that $K\subset X$ is compact with respect to $\tau_1$ if and only if $K$ is compact with respect to $\tau_2$. Then is this enough information to determine whether $\tau_1 = \tau_2$?  If not (which is suspect to be the case) is there a nice counterexample, and what is the minimum amount of extra information required for $\tau_1 = \tau_2$?  I feel like there would be an issue regarding 'points at infinity.'


After installing Ubuntu 13.04 the display brightness of my laptop has reduced. Increasing the brightness in system settings makes no change. Can you help me tackle this problem?


I want to install a font from true type of font of my own. where should I install my font in ubuntu?


Is there a way to keep the chunks always loaded in SSP vanilla Minecraft?

Is there any ways to keep a chunk (in any dimension) always loaded as long I am playing?  EDIT: I have possibly found a better way to do this :  EDIT2: I realised I have no idea what's happening the video so that might not be the answer.


On Windows 10 Professional, with the November update (Build 10586, Version 1511) , is there any possibility to completely remove Windows Defender ?  I don't want to just disable Windows Defender.  I want to completely uninstall from my system.


exam package enables the possibility to use and define \half as to for instance consider .5. However I have not seen any way of implementing .75 and .25 in case I want a part or question to have that value.  Is it possible? In case yes can you give me an example and how I can have the correct sum of points per question?  Edit: MWE included  \documentclass[11pt, addpoints, twoside, a4paper]{exam}  \begin{document}  \begin{questions}  \renewcommand*\half{.5} \question[0\half] This question is 0.5 points  \renewcommand*\half{.25} \question[1\half] This question is 1.25 points  \renewcommand*\half{.5} \question[1\half] This question is 1.5 points  \end{questions}  Total points with addpoints: \numpoints~(3.5)  Total points real count: 3.25  I don't know how to define quarters, etc. so I can easily define the points in my questions without having to renew \texttt{half} command, and also having the final sum properly done.  \end{document}


Determine all ring homomorphisms from $ \Bbb Z$ $\oplus$ $\Bbb Z $ to $\Bbb Z$.

I got $(a,b) \to a$, $(a,b) \to b$ and $(a,b) \to 0$ these mappings to be homomorphisms just by hit and trial. So when I looked for it's solution, these were the ONLY homomorphisms from  $ \Bbb Z$  $\oplus$ $\Bbb Z $ to $\Bbb Z$.  There was a hint, which is as follows: "Observe that an idempotent must map to an idempotent."  Does this always happen? Why in this case it happens? (EDIT)How should I approach to construct those three homomorphisms by using the hint?  This problem belongs to the book Contemporary abstract algebra by Gallian.


Getting points inside a circle with a given radius in a 2D array?

Let's say you have a system that removes everything within a square made up of 4 position points. This square is calculated by taking the center point and adding or subtracting the range from this center point seen here: int xmin = x - range; int ymin = y - range; int xmax = x + range; int ymax = y + range;           for (int i = xmin; i <= xmax; i++) {      for (int j = ymin; j <= ymax; j++) {           bounds[j, i] = 0;      } }  How would I change these bounds to be in a circular range instead of a square?


Unlocked IPhones 5s Gets locked after inserting SIM

Bought iphone 5s and it's previous owner  removed icloud account on it.   I created my own icloud account and associated with it.  Everything is ok, but when i insert a sim card, it requres me OLD icloud credentials (one which was used by previous owner).   If i enter my own credentials it says : "this account could not be used to activate phone".   If i remove sim, turn phone on, and enter my credentials it works fine.  What could i do ? (rather than contacting old owner who is remote)  I'm not searching for any illegal (ticks or hacks) about bypassing Icloud.


Movie with an Alien race Which Absorbs Light as a Source of Nutrition

I watched this old cable TV movie when I was younger but I can't seem to find it anywhere in lists on the Internet.  I can't remember the year I've watched it but it was around the 2000s, so the movie is probably from the 90s or even the late 80s.  I remember that there was an alien female who was disguised as a human and for some reason she defected and was running with a human trying to prevent an invasion.  At some point she said that she has to feed/recharge and lowered her disguise - at which point she became pitch black, still with a humanoid body and laid down on the back seat of the car while the man was driving. She explained to him that their race is so much more advanced and doesn't need anything else for food but just sunlight.  Edit: The movie was American. The setting was in some big city, L.A., N.Y. or similar but I can't remember which one exactly. They entered in a small spaceship at some point and were flying through the city skyscrapers. At the happy ending a huge alien mothership appears.


I have made a generalised linear model with a single response variable (continuous/normally distributed) and 4 explanatory variables (3 of which are factors and the fourth is an integer). I have used a Gaussian error distribution with an identity link function. I am currently checking that the model satisfies the assumptions of the generalised linear model, which are:   independence of Y correct link function correct scale of measurement of explanatory variables no influential observations   My question is: how can I check that the model satisfies these assumptions? The best starting point would seem to be plotting the response variable against each explanatory variable. However, 3 of the explanatory variables are categorical (with 1-4 levels), so what should I be looking for in the plots?  Also, do I need to check for multicollinearity and interactions amongst explanatory variables? If yes, how do I do this with categorical explanatory variables?


Do cards with abilities that target trigger heroic?

Would something like  or something that has "When ~ enters the battlefield, put a +1/+1 counter on target creature" trigger Heroic?  It has the keyword target, but does it count as an ability or as part of the spell that targets? I guess this goes likewise for any ability that occurs when a card enters the battlefield.


This is the simplest form of my problem and I wonder how this happen? Console.WriteLine(3.12 * 3.14);  What it do to give this result? 9.796800000000001  It makes me problem for my general code and program. How to avoid this and give me the exact desired output?


Value of $\sum\limits_{n= 0}^\infty \frac{n²}{n!}$

How to compute the value of $\sum\limits_{n= 0}^\infty \frac{n^2}{n!}$ ?   I started with the ratio test which told me that it converges but I don't know to what value it converges. I realized I only know how to calculate the limit of a power/geometric series.


Whenever I ask'why does a proton attract electron?' People say that 'because they are oppositely charged'  But I want to know why do opposite Charges attract each other and tend to become neutralised?  The same is for all forces like gravity, intermolecular forces e.t.c. Is it because nature defined it to be so and just another question that no one can answer.


Is there a formula that gives the position of an object depending on the time, but which doesn't allow the object to surpass the speed of light?

I have found these two formulas:  $v = at + v_0$  $x = \frac{1}{2}at^2 + v_0t + x_0$   a is the acceleration v is the velocity x is the position t is the time $v_0$ is the initial velocity $x_0$ is the initial position   The problem is that with an acceleration of $10$ m.s$^{-2}$ (for example) the object would surpass the speed of light in $3 \times 10^7$ s = $11$ months and $11$ days, which should not be possible.  Is there some other formula that gives the position of an object depending on its acceleration and on the time, but which works and does not allow the speed of the object to surpass the speed of light?


Why does the irradiance of two intersecting waves not contradict the conservation of evergy?

I am currently working through Optics by Eugene Hecht. When two waves intersect together, Hecht shows that the total irradiance $I$ is $$I=I_1+I_2+\sqrt{I_1I_2}\cos{(\delta/2)}$$ where $I_1$ and $I_2$ is the irradiance of each separate wave and $\delta$ is the phase difference between the two waves. When we consider the irradiance of the two waves to be the same and we have no phase difference , we see that the total irradiance is $$I=4I_0$$ Why does this not contradict the conservation of energy. When the two waves are separate we have a total of $I_0+I_0=2I_0$ irradiance in the room. So how do we double that?


Render view mode not rendering, instead showing outline only

here is what it looks like when I switch to render view mode. This is a rendering of the default cube. I have an rx580 and an AMD Ryzen 5 3600 and 16GB of ddr4 ram, clocked at 3000MHZ. I have tried switching between different blender versions, yet still no hope. I have also change the render engine to open cl, selecting only my GPU for computing