I need your help. My postfix is sending spam mails. I checked my main.cf and it should be fine. In the following a snippet of my mail.log Jan  3 22:35:41 mail postfix/pickup[104179]: 866352963F01: uid=33 from=<web424794656434@mydomain.net> Jan  3 22:35:41 mail postfix/cleanup[104027]: 866352963F01: message-id=<06760aed1118c62b0c4fb17967316e92@www.mydomain.net> Jan  3 22:35:41 mail opendkim[3895]: 866352963F01: DKIM-Signature field added (s=key1, d=mydomain.net) Jan  3 22:35:41 mail postfix/qmgr[27451]: 866352963F01: from=<web424794656434@mydomain.net>, size=6867, nrcpt=1 (queue active)   Any clue what happen? Thanks in advance!

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


I've noticed on some of the early censuses that when giving the address you will see something like "Ward 5" or "Ward 7". Is that something like Districts?

Many, if not most, of the 20th century U.S. census records include fairly precise address information for those living in cities and towns.  Even many 1880 census records include at least street-level information.  Some of the earlier census sheets (say 1860 and 1870) don't include street-level data, but do list the ward of the town or city.  I'm curious to know whether city wards are useful for  genealogical purposes.  I'd rather not get into rare, speculative uses, but rather actual uses where ward information can solve some other problem.


Is it possible to find in which commit a certain version of a binary file is?   I'm thinking something like:  $ sha1sum mybinaryfile 2fc60fcc4a92a2b171db333b482dabf94c82d51f  mybinaryfile  $ git tell-me-which-commit-has 2fc60fcc4a92a2b171db333b482dabf94c82d51f commit fc8d840778024557faf6bd2d93c56a2b4be55ab1 Author: author <author@here.com> Date:   Wed Feb 19 15:41:06 2014

Given the hash of a blob, is there a way to get a list of commits that have this blob in their tree?


Can someone point to a location, where this photograph was taken? It looks stunning!  This is one of lockscreen wallpapers in Windows 10.

Windows 10 has an extensive collection of lock screen photos, many of which have  here on Travel.SE.  Is there a website which lists the location of all of these photos? I imagine Microsoft has purchased an official license, so they should have a record about the photographer and the place where the photo was taken.


So if I have two sets A and B and if |A| = |B| and if function f is a function from A to B and is injective, how can I prove that it is also surjective?  Forgot to mention.  A and B are finite sets.

i cant solve this exercise, if you can help or give me a lead. I would like to also say its not marked.  Let $f$ an application from $E$ to $F$, with $\#E=\#F=n$. Show that these propositions are equivalent:    $f$ is injective $f$ is surjective $f$ is bijective   Going from 2 to 3 is fairly simple, and from 3 to 1 is automatic but I can't go from 1 to 2.  Thank you, cordially, JF


I am installing ubuntu on my real computer but with the error "this kernel requires an x86-64 cpu but only detected an i686 cpu. unable to boot - please use a kernel appropriate for your cpu" help me!!

I want to create liveUSB on part of my flash stick. I made a partition with GParted and downloaded .iso file of Ubuntu 19 from the official website to mount with gnome-disk-utility.  I noticed that the iso file has "amd64" in the name. But I intend to use this USB not only on amd computers!  Is that important? Will the live USB work on PC with Intel/other processor?


I have a random forest classification model that classifies into 3 different labels. The thing is my data is unbalanced label 1 dominates the data with frequency of 0.5 while label 2 is around 0.35 and the third one is 0.15. Which classification metric would you recommend me to use in order to evaluate my candidate models. what is your rational ? thank you all in advance !

I have to do classification model to predict the possibilities of person getting cancer based on certain attributes. The data is highly imbalanced. As per client requirement I have to report model performance based on any one of these 4 metrics AUC_Weighted normalized root mean square log loss Accuracy  Can you suggest me which one should I use?


function verifyEmail(component){         var status = false;         var emailAddress = component.value;         if(emailAddress == ""){             return true;         }         var emailRegEx = /^([A-Z0-9._%+-])+@([A-Z0-9.-])+\.([A-Z])+$/i;              if (!(emailAddress.search(emailRegEx) == -1)) {                  status = true;              }              return status;     }   This regex accepting duplicate words after @ . Eg: leela.lokesh@in.csc.com.com Here com word is coming 2 times. we should not allow duplicate words after '@'

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


In the Longman Dictionary I have found the following sentence:                                                                                'Try phoning Robert-he should be home by now.'                                                                                Can I say:'Try to phone Robert – he should be home by now'?Is this sentence correct?In case it is correct, do these two sentences have exactly the same meaning?

I tried to open the door. I tried opening the door   We can use both infinitive and gerund with verb "try" as used in above sentences. Does it change the meaning of the  sentence if use gerund or infinitive?.(here i don't know if the meaning of sentences is changed.)     The same confusion arise in these two sentences.  1.I stopped seeing him. 2. I stopped to see him.(But in case of these two sentence i know the meaning is changed but don't know exactly what the change is).


I'm using OSX 10.10 Google Chrome Version 45.0.2454.85 (64-bit) And When I go through the sidebar elements on my Wordpress site it looks like this:    Is this a known bug?.   On Firefox and Safari everything is looking fine.  UPDATE 1  You can temporary fix this by adding this on your functions.php file template:  add_action('admin_enqueue_scripts', function (){      if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Chrome' ) !== false ){          wp_add_inline_style( 'wp-admin', '#adminmenu { transform: translateZ(0); }' );     } });   UPDATE 2 This has been reported on Google Chrome forums:

I'm having an issue with my admin menu in WordPress. As you can see in the image below the formatting of the menu is out of order. This happens whenever I first land on one of the admin pages but if I refresh the page the menu looks fine. I tried disabling my plugins but none of them seem to be causing the issue.


I am using Azimuthal Equidistant Projection to plot points in a map being drawn in an Android application.  The origin is the centre of the map.  I have the formulas from  and . I am getting expected results.  Simplified version of the code being used by me in JavaScript:  // Add functions to Math if (!Math.toRadians)     Math.toRadians = function(angledeg) {         return angledeg * Math.PI / 180;     }; if (!Math.toDegrees)     Math.toDegrees = function(anglerad) {         return anglerad * 180 / Math.PI;     };  /* Mean radius of Earth (in metres)*/ const WGS_1984_R = 6370997;  /* Function to convert geodetic coordinates to Azimuthal Equidistant Projection projection (cartesian metres)*/ function convertGeodeticToAEP(longitude, latitude, longitudeOrigin, latitudeOrigin) {     var deltaLongitudes = Math.toRadians(longitude - longitudeOrigin),             cosDeltaLongitudes = Math.cos(deltaLongitudes),             cosLatitude = Math.cos(Math.toRadians(latitude)),             sinLatitude = Math.sin(Math.toRadians(latitude)),             cosLatitudeOrigin = Math.cos(Math.toRadians(latitudeOrigin)),             sinLatitudeOrigin = Math.sin(Math.toRadians(latitudeOrigin)),             // Angular distance from the centre             c = Math.acos(sinLatitudeOrigin * sinLatitude + cosLatitudeOrigin * cosLatitude * cosDeltaLongitudes),             k = c == 0 ? 0 : c / Math.sin(c),             x = k * cosLatitude * Math.sin(deltaLongitudes) * WGS_1984_R,             y = k * (cosLatitudeOrigin * sinLatitude - sinLatitudeOrigin * cosLatitude * cosDeltaLongitudes) * WGS_1984_R;     return {x: x, y: y}; }   What would be the formulas to rotate the projection by a given angle, from the origin? Say modify the function to include an additional parameter for angle of rotation and then modify the output accordingly...

I'm trying to rotate a tif raster in R using Proj4's  projection - I think the only way to rotate spatial geometries to custom angles.  But I'm finding the operation gets very slow approaching 90°, and in fact fails for that angle (possibly 2 separate issues).  This demonstrates:  require(raster) require(rgdal) # demo raster r <- disaggregate(raster(volcano[1:60,1:60]), 4) extent(r) <- c(-5,5,-5,5) crs(r) <- "+proj=longlat +datum=WGS84"  # proj4 two-point equidistant rotate transformations tpeqd_45 <- CRS("+proj=tpeqd +lat_1=2 +lon_1=-2 +lat_2=-2 +lon_2=2 +a=6371000 +units=m +no_defs") tpeqd_80 <- CRS("+proj=tpeqd +lat_1=1.9 +lon_1=0.35 +lat_2=-1.9 +lon_2=-0.35 +a=6371000 +units=m +no_defs") tpeqd_90 <- CRS("+proj=tpeqd +lat_1=2 +lon_1=0 +lat_2=-2 +lon_2=-0 +a=6371000 +units=m +no_defs")  system.time(r_45 <- projectRaster(r, crs=tpeqd_45))    user  system elapsed    0.350   0.051   0.404  par(mfcol = c(1,2)); image(r, asp=T); image(r_45, asp=T)     system.time(r_80 <- projectRaster(r, crs=tpeqd_80))    user  system elapsed    3.857   0.879   4.877 system.time(r_90 <- projectRaster(r, crs=tpeqd_90)) Error in if (value[1] != nrow(x) | value[2] != ncol(x)) { :    missing value where TRUE/FALSE needed In addition: Warning message: In `dim<-`(`*tmp*`, value = c(nr, nc)) :   NAs introduced by coercion to integer range   Note the increasing time to process for 80°.  For a 10x bigger raster this crashes my Macbook.  Does anyone know if this is a problem in the math for this projection and/or if there is any other way to rotate these in R?


What is the remainder when $2^{2^{517}}$ divided by $23$? I tried Fermat Little theorem, and seems like I cannot make a further step. The trick here is about $2^{517}$ which does not follow the normal principles of power's calculation.

I have had a go at this for a while now and can't seem to get anywhere.  $$2^{(2^{517})} \pmod {23}$$  I see that Fermat's Little Theorem must come into play but I can't see where to pull $22$ from. Any help would be appreciated.  Here is my attempt:  $$2^{(2^{517} \!\!\mod {22})} \equiv  2^{(2^{517})} \pmod {23}$$ Then proceed to do Chinese remainder theorem to find the exponent?


I tried a few threads already on Blender Stack Exchange:    I'm using 'Images as Background' add-on. I've tried the 'Film' 'Transparent' recommendation. The render icon is on in the outliner. I've messed with the nodes all day. Nothing seems to be working. I made an animation in 2.79, and I opened the file in 2.83,(I checked the box to not load the UI thing) so maybe a few bugs from the old one got into the this file because I tried loading up a new 2.83 file and the background rendered just fine with no modifications. I am using HitFilm 3 Express as my video editing program, I am more comfortable with it than Blender's internal video editing software. So I'm rendering out a greenscreen for the program to use.

I would like to render an animation as a series of .png images with transparent backgrounds for use in a video. Is this possible?


I wanted to enable the hadware acceleration of the chromium browser and therefore followed . At first it didn't work, but then I discovered a comment in the comment section which suggested to use the command LIBVA_DRIVER_NAME=i965 chromium-browser to start the chromium browser via terminal with hardware acceleration enabled and it worked! Then I thought to create a new custom desktop file for chromium to include this prefix automatically. I copied the existing dekstop file from /usr/share/applications to /home/myUser/.local/share/applications. Then I edited the desktop file and infront of every Exec Keyword I added LIBVA_DRIVER_NAME=i965. The resulting .dekstop file looks so now: [Desktop Entry] Version=1.0 Name=Chromium Web Browser Name[ast]=Restolador web Chromium ... Exec=LIBVA_DRIVER_NAME=i965 chromium-browser %U Terminal=false X-MultipleArgs=false Type=Application Icon=chromium-browser Categories=Network;WebBrowser; MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https; StartupNotify=true Actions=NewWindow;Incognito;TempProfile X-AppInstall-Package=chromium-browser  [Desktop Action NewWindow] Name=Open a New Window Name[ast]=Abrir una Ventana Nueva Name[bg]=Отваряне на Нов прозорец ... Exec=LIBVA_DRIVER_NAME=i965 chromium-browser  [Desktop Action Incognito] Name=Open a New Window in incognito mode ... Exec=LIBVA_DRIVER_NAME=i965 chromium-browser --incognito  [Desktop Action TempProfile] Name=Open a New Window with a temporary profile Name[ast]=Abrir una ventana nueva con perfil temporal Name[bg]=Отваряне на Нов прозорец с временен профил ... Exec=LIBVA_DRIVER_NAME=i965 chromium-browser --temp-profile  But now chromium browser is not found anymore by the launcher, so it seems like my .desktop file is somehow wrong. Can somebody explain to me what the problem could be here? PS: I'm using Ubuntu 20.04.

I'm trying to modify my Firefox shortcut in Unity so that it started with a specific parameter. From a terminal, I would start like this:  VDPAU_DRIVER=va_gl firefox   I tried modifying the firefox.desktop file so that the Exec line looked like  Exec=VDPAU_DRIVER=va_gl firefox   But this doesn't work (the application doesn't start). I thought it could be a problem with two "=" signs, so I tried  Exec="VDPAU_DRIVER=va_gl firefox"   but this doesn't work either. What should I do?


I am a completely new to Ubuntu & Linux. I would like to install a PC game, so I understand that I need to use Wine. Also I have the PC game as an .iso file which I assume will need another application to run...   I downloaded Wine 1.8 "from source" from . I don't really know if it's installed, or if it even needs to be installed. Afterwards I found this link , which mentions you can download wine from the Software Centre. I'd like to install it from the Software Centre now because I don't know what to do with the files I have from Winehq (not to mention binary packages???). But I am worried that what I already downloaded needs to be removed first. Is this the case??

I am looking for a step by step instruction to guide me in the ways of installing, configuring and debugging many of the issues new users have when dealing with Wine in Ubuntu.  What is the recommended way of installing Wine, some of the key issues that it has and how to solve them?  If I have a specific problem with an App in Wine, how do I go about solving it? What are the recommended steps to ensure that I can fix a problem related to an app I wish to use?


My iPad keeps ringing when I get a call on my iPhone.  I have disabled FaceTime and Messages, but it still doesn't work.

Similar to , but my iPad is ringing, not my Mac.


I upgraded my old  (Squeeze) server, but still the vulnerability seems to be there:  $ env x='() { :;}; echo vulnerable' bash -c 'echo hello' vulnerable hello   How do I upgrade Bash to a newer version on Debian 6.0 (Squeeze)?

We are running Debian Etch, Lenny and Squeeze because upgrades have never been done in this shop; we have over 150 systems running various Debian versions.   In light of the "shell shock" of this week, I assume I need to upgrade bash.  I do not know Debian so I am concerned.   Can I merely execute apt-get install bash on all of my Debian systems and get the correct Bash package while my repository is pointed at a Squeeze entry. If not, what other course of action do I have?


I've taken the regular expressions from a website some time ago, and now I'm trying to fix some issues but I'm terrible with regular expressions, I'm just learning, any help would be appreciated.  What am I doing wrong here?   function validateEmail(email) {      var reg1 = /^([a-zA-Z0-9])+\@([a-zA-Z0-9])+\.+([a-zA-Z0-9])+$/; // example@mail.com     var reg2 = /^([a-zA-Z0-9])+\@([a-zA-Z0-9])+\.+([a-zA-Z0-9])+\.+([a-zA-Z0-9])+$/; // example@mail.test.com     var reg3 = /^([a-zA-Z0-9])+\@([a-zA-Z0-9])+\.+([a-zA-Z0-9])+$/; // example.test@mail.test.com     var reg4 = /^([a-zA-Z0-9])+\.+@([a-zA-Z0-9])+\.+([a-zA-Z0-9])+\.+([a-zA-Z0-9])+$/; // example.test@mail.com      return reg1.test(email) || reg2.test(email) || reg3.test(email) || reg4.test(email)   }   I need to accept mails in this formats:  example@mail.com example@mail.test.com example.test@mail.test.com example.test@mail.com   reg1 and reg2 are working, reg3 and reg4 are not working.  Last edit:  I've tried to fix it like this, didn't work properly neither:  function validateEmail(email) {      var reg1 = /^([a-zA-Z0-9])+\@([a-zA-Z0-9])+\.+([a-zA-Z0-9])+$/; // example@mail.com     var reg2 = /^([a-zA-Z0-9])+\@([a-zA-Z0-9])+\.+([a-zA-Z0-9])+\.+([a-zA-Z0-9])+$/; // example@mail.test.com     var reg3 = /^([a-zA-Z0-9])+\.+([a-zA-Z0-9])+\@([a-zA-Z0-9])+\.+([a-zA-Z0-9])+\.+([a-zA-Z0-9])+$/; // example.test@mail.test.com     var reg4 = /^([a-zA-Z0-9])+\.+([a-zA-Z0-9])+\@([a-zA-Z0-9])+\.+([a-zA-Z0-9])+$/; // example.test@mail.com      return reg1.test(email) || reg2.test(email) || reg3.test(email) || reg4.test(email)   }

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


class Player:     def __init__(self, name, score):         self.name = name         self.score = score     def __str__(self):         return self.name +" " +str(self.score)  n = int(input()) data = [] for i in range(n):     name, score = input().split()     score = int(score)     player = Player(name,score)     data.append(player) sorted(data,key=getattr(player.score,'name')) for i in range(n):     print(data[i])   I am trying to sort a list by using the getattr function. When I try to pass the object in the arguments list I get the following error:   Traceback (most    recent call last):   File    "C:/Users/raghu/.PyCharmCE2018.2/config/scratches/demo2.py", line 15,    in <module>    sorted(data,key=getattr(player.score,'name'))   AttributeError: 'int' object has no attribute 'name'

I've got a list of Python objects that I'd like to sort by an attribute of the objects themselves.  The list looks like:  >>> ut [<Tag: 128>, <Tag: 2008>, <Tag: <>, <Tag: actionscript>, <Tag: addresses>,  <Tag: aes>, <Tag: ajax> ...]   Each object has a count:  >>> ut[1].count 1L   I need to sort the list by number of counts descending.  I've seen several methods for this, but I'm looking for best practice in Python.


In formal writing, is the following usage of punctuations acceptable?     I keep asking myself. Who am I? Where am I from? And where am I going?   I'm not quite sure whether using a period after I keep asking myself is weird. To me, the natural choice would have been a colon, but this also would have made the first interrogative sentence have to start with a lower case w whereas subsequent ones, as they follow a question mark, must begin with a capitalised W , like ..asking myself: who am I? Where am I from..., which doesn't make much sense to me either.   Of course, alternatively, I can reorganise these interrogative sentences into clauses like     I keep asking myself: who I am, where I am from and where I am going.   But this feels much less emotionally charged than the first one, which makes it not so desirable to me.

Should the first word after a colon be capitalized? Which of the following is correct?   For example: This. For example: this.


I'm looking through this project , and in one of the files (kseq.h, 75-77), there is macros this function: #ifndef kroundup32  #define kroundup32(x) (--(x), (x)|=(x)>>1, (x)|=(x)>>2, (x)|=(x)>>4, (x)|=(x)>>8, (x)|=(x)>>16, ++(x))  #endif  How does this function work?  Does it return 7 things?  I have an idea of the basic operations inside, I just don't get what is the form of its operation or output.


Why did Wolverine start ageing in the movie Logan?   I believe that Wolverine can heal fast and also won't grow old. It has been shown so in the previous movies as well. I remember in a previous movie (of the same X-MEN / Wolverine) series, Logan was lured into traps by saying that they will tell him his age and help him bring back his memories of what all happened before they shot him on his head with those Adamantium bullets.  Can anyone please explain me why Wolverine started ageing in Logan?

In  (2017), Logan seems to be dying from sort sort of ailment, that prevents him to heal properly and seems to be decaying his body in a way that wasn't happening in any of the other films his character appears in.  I don't recall that this is being explained in the film. The Wikipedia page only mentions "adamantium poisoning" and "his healing factor fading", but it is not backed up with citations, so I would love to get an in-depth answer for this question, maybe using excerpts from the comic or original source material.  What is happening to Logan?


I have referred to many websites online regarding the proof, but I haven't understood it at all.. Please do help.  As far as I know, $n! = 1 \times 2 \times 3 \times 4 \times \dots \times n$  Then using the same logic, $0!=0$  Then why is it that $0!=1$ ?

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


I have the below MySQL query.  select * from node where title LIKE 'born in care shelter breed';   Which is returning empty set. But when I try the below query  select * from node where title = 'born in care shelter breed';   It is returning 1 result.   What difference the both will make? I can't avoid the LIKE operator as the query creating after some condition checking

When using SQL, are there any benefits of using = in a WHERE clause instead of LIKE?  Without any special operators, LIKE and = are the same, right?


Well, I'm having a problem with figure.  I'm using figures like this:  \begin{figure}[!ht] \centering \includegraphics[scale=1]{\importacaodedados importacaodearquivos.png}  \caption{Importação de Arquivos.} \label{fig:importacaodearquivos} \end{figure}   And I'd like to know if there is a way to IF the scale=1 exceeds the text width, use [max width = \textwidth]  It would be really better if there is a way to put it in the style file. so I won't have to change every figure in the manual. (There are more than 140. Not all of them exceed the text width.)

With \includegraphics I can give the width of the resulting image (which would be scaled).   How can I give a maximum width of the image? That is, if the original is smaller than X, I'd like to keep the smaller image, if the image is larger than X, then the image width should be X.  Using pdflatex/graphicx.


I was trying to install mono, but the command:   sudo apt-get install monodevelop-database   is not working. How can I solve this?

How do I get to the Universe Repository in supported versions of Ubuntu?


I followed this guide in order to remove Cortana:    But now, when I open windows menu, the search doesn't work, nor can I get cortana back.  I factory resetted windows from scratch TWICE, but none of them work anymore, even when I check "use cortana" at the blue screen setting. (I see the cortana search window but it is disabled, But not the notebook)

With reference to:    I removed the Cortana packages from my running Windows 10 using the method posted by magicandre1981 and using  win6x_registry_tweak.   My question is how can I re-install Cortana (or for that matter any other package removed similarly)?  I have opened up the install.wim image (converted from a Win 10 install.esd file) and found Cortana in the system apps folder, but don't know how / what to use to re-install it.  Any help please?


I have a list of objects called employee() and I used emp as my object. I want to increment over employees and print the name of all the objects. I really lost on how to do this. Thanks.  for( emp ;  ;employees())         {         System.out.println(emp.name);         }

Consider:  List<String> someList = new ArrayList<String>(); // add "monkey", "donkey", "skeleton key" to someList     for (String item : someList) {     System.out.println(item); }   What would the equivalent for loop look like without using the for each syntax?


i applied with my parents to Germany. my dad got the visa while me and mum got the following: One or more member states are of the believe that you are a threat to the public order, the internal security, public health according to Arrocle 2 No 21 of the Resolution (EC) Nr. 2016/ 399 (Schengen Border Kodex) or to the international relations of one or more member states.   Any idea what that is or if it allows me to reapply? we always received Schengen visa together.

I applied for German Schengen visa as a medical escort to my relative in a different country from  where I reside, but my visa application was refused and the refusal letter  was written in German as the following:        Ein oder mehrere Mitgliedstaaten sind der Auffassung, dass Sie eine Gefahr für die öffentliche Ordnung, die innere Sicherheit, die   öffentliche Gesundheit gemäß Artikel 2 Absatz 19 der Verordnung (EG)   Nr 562/2006 (Schengener Grenzkodex) oder die internationalen   Beziehungen eines oder mehrerer Mitgliedstaaten darstellen.      I was in Germany for nearly a year with my relative during his treatment; I extended my stay there 3 times; and I returned back home two months ago in order to renew my passport. I applied again using the same documents that I used for my extension in Germany.    First, can anyone tell me what the refusal means? Next, is there any possibility that there is a mistake in the assessment?    Note: In English this reason is...     One or more member state(s) consider you to be a threat to public   policy, internal security, public health as defined in Article 2(19)   of Regulation (EC) No 562/2006 (Schengen Borders Code) or the   international relations of one or more of the member states).


HOW?How do I simplify this expression?     $276^{247} \mod 323$    Thank you so much.

How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .


How do I use GNU touch to update a file called -?  How do I use GNU cat to display a file called -?    I'm running:  % cat --version | head -n1 cat (GNU coreutils) 8.29 % touch --version | head -n1 touch (GNU coreutils) 8.29   Firstly, touch:  % touch - % ls -l total 0 % touch -- - % ls -l -- - ls: cannot access '-': No such file or directory   Ok, I'll give up on creating a file with touch. Let's create it with date instead:  % date > - % ls -l - -rw-r--r-- 1 ravi ravi 29 Sep  8 19:54 - %   Now, let's try to cat it:  % cat - % # I pressed ^D % cat -- - % # Same again - I pressed ^D   I know I can work around with:  % > -   and  % cat < -   But why don't these GNU utils support the convention that -- means that everything following is treated as a non-option?  How do I use these tools in the general case, for example I have a variable with the contents -?

How do you remove a file whose filename begins with a dash (hyphen or minus) -?  I'm ssh'd into a remote OSX server and I have this file in my directory:  tohru:~ $ ls -l total 8 -rw-r--r--    1 me  staff  1352 Aug 18 14:33 --help ...   How in the world can I delete --help from a CLI?  This issue is something that I come across in different forms on occasion, these files are easy to create, but hard to get rid of.  I have tried using backslash  rm \-\-help   I have tried quotes  rm "--help"   How do I prevent the minus (dash or hyphen) character to be interpreted as an option?


I've got a pressure sensor and a flow sensor. Both have a 5V span, but have a (different) null offset i.e. at zero pressure (gauge) or zero flow they read ~2V and ~1V respectively.   I am using an  and PiPyADC (from git) so can only read up to 5V. How can I remove these offsets?   Git code has a function:  |  cal_self_offset(self) |      Perform an input zero calibration using chip-internal |      reference switches. |       |      Sets the ADS1255/ADS1256 OFC register.   but I'm not sure that's what I need, I definitely can't make it do what I want anyway!  Currently, my only thought is to step the voltage down over a 2/3 potential divider to get into range, though I'm bound to lose some accuracy this way. I'm hoping I can somehow remove the offsets from both sensors.  I appreciate any help/guidance,  Thanks.

I am trying to create a circuit which will allow me to scale and offset a voltage (be it AC or DC) to within the range of the Arduino ADC.  The voltage could be anything between + and - 250V, but I also need to have good sensitivity over lower voltage ranges too.  To this end I am looking at a circuit whereby you can vary the voltage range that it expects the input to be and amplify/attenuate it accordingly.  How I will be making the decision and setting the different gains is for another topic for now.  I am only interested in the scaling and offsetting at the moment.  So far I have come up with this circuit:    Which appears to do just what I want for the +/- 250V range.  I don't know how "safe" this circuit is, and if I am endangering any of the components with the 250V or not.  The graphs at the bottom are (left to right) the input voltage, the power consumption of the bottom 10M resistor, the voltage across the 100M resistor (which is simulating the Arduino ADC input) and the power consumption of the upper 10M resistor.  Now, if I drop the input voltage to just +/- 2.5V and tweak the op-amp feedback resistor accordingly, for some reason the offset voltage the op-amp is adding jumps right up.  I don't know for sure if this is the fault of the simulator I am using, or if it is really what will happen, as I haven't yet breadboarded this circuit (I guess that's the next stage).  This is the output from the 2.5V version:    You can see how the offset has jumped up and the output is clipping massively.  If I drop the lower 10K resistor to the virtual ground offset voltage divider to just 3.3K it compensates, but that's not nice - I would like to just vary the one resistor.    The op-amp is (will be) a 5V single supply rail-to-rail I/O one.  The two diodes are to protect the input of the op-amp against over voltage - I don't know if this circuit strictly needs them, but I guess it doesn't hurt to have them there.  Also, I don't know if the resistor values are quite what I want - I chose them to keep the power consumption right down and the impedance right up.  I don't want them to impact the frequency response of the circuit more than I can help - the input waveform could be anything from DC up to around 500KHz or so, and I need that reproducing at the ADC end as faithfully as I can.  (I know the Arduino can only really sample at lower speeds than that, but the Arduino is just for experimenting - the final system will use a dsPIC with 1.1Msps ADC).  So, what can I do to A) get a more stable offset, B) allow the varying of the input sensitivity without nuking either the op-amp or the ADC, and C) make the circuit safe to connect to, for example, a European mains voltage?


When ever i update the custom post type it generates too many revision which crashed the website.  ( memory exceeded) How can i debug this issue?    Update :  I was able to find the culprit. Will it be possible for some one to detect what i did wrong in the below code :  if (class_exists('wpprolister_core')) {      add_action('wp_insert_post', 'wpprolister_updated_to_publish', 10, 3);      function wpprolister_updated_to_publish($post_id, $post, $update)     {          if (get_field('wpprolister_advanced_option_edit_seo', $post_id)) {              $metatitle     = get_field('wpprolister_seo_title', $post_id);             $metadesc      = get_field('wpprolister_seo_meta_description', $post_id);             $metakeywords  = get_field('wpprolister_seo_keyword', $post_id);             $content       = get_field('wpprolister_description', $post_id);             $image         = get_field('wpprolister_listing_slider_image', $post_id);             $attachment_id = $image['ID'];              if (!empty($image)):                 $size  = 'medium';                 $thumb = $image['sizes'][$size];                 if (defined('WPSEO_VERSION')) {                     update_post_meta($post_id, '_yoast_wpseo_title', $metatitle);                     update_post_meta($post_id, '_yoast_wpseo_metadesc', $metadesc);                     update_post_meta($post_id, '_yoast_wpseo_focuskw', $metakeywords);}                 //also update the content and featured image                 $my_post = array(                     'ID'           => $post_id,                     'post_content' => $content,                 );                 wp_update_post($my_post);                 update_post_meta($post_id, '_thumbnail_id', $attachment_id);              endif;          }     } }   How i solved the problem (please let me know if i did wrong ):  remove_action('wp_insert_post', 'wpprolister_updated_to_publish');             $my_post = array(                 'ID'           => $post_id,                 'post_content' => $content,             );             wp_update_post($my_post);             add_action('wp_insert_post', 'wpprolister_updated_to_publish');

I have been using this site alot for solving my problems, but this time I did not succeed in finding and answer for my problem.  I get and infinite loop when using wp_update_post inside a function that is called on save_post. I know that this is a common issue, but I can't figure out how to avoid it.  I want to save the order of my posts (which is of the post-type 'section'). So I have made a custom meta box which contain some sortable html-elements. In each element there is an hidden input tag with name='sectionorder[]'. So when I click the standard WordPress 'Update' buttom, an array containing all the ID's of the posts (in order) are send via POST. So here is the code where I retrieve the array, and wants to save the order:      // Update section sort order $sectionorder = $_POST['sectionorder']; if (isset($sectionorder)) { // Avoid error if there is no sections added yet     foreach( $sectionorder as $no => $sectionID ) {         $post_update = array();         $post_update['ID'] = $sectionID;         $post_update['menu_order'] = $no;         wp_update_post( $post_update );     } }   But the problem is that it starts an infinite loop. How do I avoid that? Maybe I can do it in a completely different way?  Appriciate your help!


Can I download Ubuntu on to a Mac, save it to a memory stick to install on a PC and leave the Mac untouched?

I am looking at this:    I need to create a boot disk to test Ubuntu to make sure it will run on a PC (Compaq Mini CQ10-120LA) I was given. I can create the boot disk off of a Mac (in English) or Windows (but Windows is in Spanish and foreign to me).   Questions:     What format do I choose for the USB stick? (I wish the instructions stated this). What is Dash? (Will I know when I run the installer?) Can I do this from a Mac or Windows computer? Or only from Ubuntu?


Does anyone know what apps the notifications at the top left of the screen are for? I was sent a screenshot and I'm curious.

I'm concerned about an app on my child's phone. I saw an app icon in the notification area that looked strange (Andy Android head, slightly tilted as its icon).  How can I find out what app it is from just having seen that icon in the notification bar?


When using a full frame lens on a crop body, does the lens require more light?  If I use an f/2.8 full frame lens on a crop body, does it become an f/4.2 (*1.5)?

Let's say I have a micro-4/3rd camera and a full frame camera, both set to 1/60 at f/2.8, taking a picture of the same scene in the same lighting. Will the exposure be the same across both cameras despite the different sensor sizes?  The reason why I'm asking is because of the difference in depth of field between micro-4/3 and full frame sensors. I'm finding that, in order to take a picture of certain scenes with the full frame camera at the same depth of field as the micro-4/3rd camera, I have to increase the aperture, which in turn forces me to crank up the ISO.


I know there are many similar questions like this but I am not sure why my code doesn't work. Basically, what I am trying to do is to initialize a 2D array to all 0s, get user input (row, column), and set the position to 1. def printBoard(positions):     for row in positions:         print(row)  def main()     x= int(input())     column = [0] * x     Board= [column] * x     printBoard(Board)     for i in range(x):         row, column = map(int, input().split())         Board[row][column] = 1         printBoard(Board)  main()  But the output is now what I expect. >>>2  [0, 0] [0, 0] >>>1,1 [0, 1] [0, 1]  As you can see, the whole column is changed. May I ask why?

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


For some reason all of a sudden when I update cells in Excel, my equations are not being updated.  For example, I have a simple equation =SUM(C4:C16).  If I change any of the cells in C4-C16, the answer doesn't get updated...  I don't know what happened I've never seen this fail before.  Any ideas?

I have a formula in a cell which counts the values in 2 other cells. Normally, after entering in the values in these 2 other cells, the formula cell updates automatically when Enter is pressed or when the cells are clicked out of.  However, for some reason, the value calculated by the formula does not update automatically. I am having to click on the formula bar, then I have to click enter for the formula cell to do its thing.  Why is this happening?


Let $D$ be a bounded region and $f$ is an analytic function on $D$. Show that if there is a constant $c ≥ 0$ such that $|f(z)| = c$ for all $z$ in the boundary of $D$ then either $f$ is a constant function or $f$ has a zero in $D$.  Is this just a direct consequence of the Maximum-Modulus Theorem?

Let $f$ be a non-constant and analytic on a neighborhood of closure of the unit disk such that $|f(z)|=\text{constant}$ for $|z|=1$. Prove $f$ has at least one zero inside unit disk.  I thought of using Rouche's somehow. Using $f(z)-z$, and taking constant is less than $1$, I can actually conclude from Rouche's theorem that the equation $f(z)-z=0$ have a fixed point inside the unit disk. I am stuck for other constants greater than equals to one and exactly zero. I hope there should be a little trick I am missing here. It will be awesome to see if maximum principle can be applied to conclude the result.


So I'm just doing some tests but for some reason a variable is not letting it be loaded... Here's my code:import java.util.Scanner;    import java.util.Scanner;  public class EquipmentTest {      static String choice;       public static void main(String[] args) {         Scanner SCANNER = new Scanner(System.in);         Scanner enterScanner = new Scanner(System.in);          choice = SCANNER.toString();          if(choice=="E") {             int PLAYERINFO.HEADEQ "{--error here" = ARMOR.SILKHAT;         }          System.out.println(PLAYERINFO.HEADEQ);     }  }     public class PLAYERINFO {      //Player equipment      public static int HEADEQ = 1;     public static int CHESTEQ = 1;     public static int LEGSEQ = 1;     public static int FEETSEQ = 1;      //Player defense calculation      public static int DEFENSE = HEADEQ + CHESTEQ + LEGSEQ + FEETSEQ;      //Player statistics      public static int PLAYERHP = 10;     public static int PLAYERDEFENSE = DEFENSE;     public static int PLAYERSPEED = 7;     public static int PLAYERATTACK = 6;     public static int PLAYERMAGIC = 6;  }     public class ARMOR {      public static int SILKHAT = 2;  }      Exception in thread "main" java.lang.Error: Unresolved compilation problem:    Syntax error on token ".", , expected    at EquipmentTest.main(EquipmentTest.java:15)      I looked everywhere but I can't find my error. Any help is good!

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


Google give the following definition of the word "equation":   "In mathematics, an equation is a statement of an equality containing one or more variables. Solving the equation consists of determining which values of the variables make the equality true."  Is really an "equation" is a statement? I think that it more close to a "predicate". I will be happy if someone can give an exact (but still simple) definition of the term "equation"    P.s. In all cases, I mean equation with unknown(s), not equal.  Thanks!

I was just wondering about the formal definition of equation, I mean in terms of logic and the theory of sets. Suppose for example I wanted to define an equation on $\mathbb{R}$, of course it might be anything instead. I know every number is a set, and also I know that equality of sets has been defined previously. So I often hear people say something like "A linear equation is an object of the form $a_{1}x_{1}+a_{2}x_{2}+ \cdots + a_{n}x_{n}=b$".  But how do you justify the part of "$x_{i}$ is an unknown". Because in that case I would also say that $3(2)+4(5)=0 $ is an equation.


Why for every normalized solution to the time-independent Schrödinger equation $E$ must exceed the minimum value of $V(x)$?

Consider e.g. the finite square well: $V = -V_o$ between $x=-a$ and $x=a$, $V=0$ elsewhere  Now for scattering states, $E$ must be $> 0$. For normalizable bound states, $E$ must be $< 0$ and $> V_{\rm min}$ (=$-V_o$ in example).   But if a particle in a lab has Energy which $< 0$ and $<V_{\rm min}$, is it bound or will it scatter?  And I don't know why I haven't thought about this before but what does it mean for a photon to have negative energy?


Find all rational solutions to $x^2+y^2=2$   I rewrote the equation to $x= \sqrt{2-y^2}$ and thought that $x$ is rational if and only if $2-y^2$ is a square. So the only solution to the first problem is $x=1$ or $-1$ and $y=1$ or $-1$.   Is there another approach? Thank you.  Edit: Another question: Is there maybe a way to show this using elliptic curves?

Are there any rational numbers $x$ and $y$ such that $x^2+y^2=3$. I think there are no rational solutions, but I haven't been able to prove it.


I am working on parallel programming on c++ (with Mac and linux) and I want to know if there is a way to detect the number of cores assigned to this program in c++98. Thank you.

Is there a way to determine how many cores a machine has from C/C++ in a platform-independent way? If no such thing exists, what about determining it per-platform (Windows/*nix/Mac)?


Stack Exchange sites are about asking and answering. However,  I can't help by answering because most of the questions are about something I'm not good at. I mean, everywhere.  Though, I can help by asking questions which weren't asked before, related to the theme of the site where it's asked and either might be useful for someone in the future or provides useful and constructive answers.  Is it enough?

Possible Duplicate:          I've been  for maybe a year to get answers to questions I couldn't find on my own.  I always make an attempt first to find the answer on my own.  As of this posting, I've asked 14 questions.  I only once gave an answer, and it was to a non-technical question, and only because I was really bored and had too much coffee to drink.  I wasn't intending to answer any other questions in the future, because on on my best days I'm only a mediocre programmer, and there are some real geniuses here on StackOverflow who can answer other peoples' questions faster and more accurately than I can.  It actually is my nature.  I am an Aquarian.  We are asker-listeners.  Today I discovered Meta Stack Overflow and started browsing around.  I became familiar with the concept of the "Help Vampire".  I seem to qualify.  I continued reading more posts on the topic and got the distinct impression that people who only ask, and never answer, are less than welcome here, rather despised.  So, should I just go away?  Or should I start contributing answers just to have a answer-to-question ratio of 3-to-1 (I read somewhere that's the average) even though I am less than one eighth as knowledgeable as the 10K+ guys and gals?    Or should I continue as I have begun?  I mean, doesn't a 0-questions-asked user like Jon Skeet need a Blankman?  Yin and yang, you know?


I am using biblatex with citestyle=authoryear and maxnames=5, along with \parentcite in the text. For papers with 3-5 authors, I would like them to appear with the full list the first time they are cited (as it does now), and with et al. the following times.  Example:  First appearance:  (Author 1, Author 2, Author 3 and Author 4, 2018)   Second appearance:  (Author 1 et al., 2018)   In , this seems to be done with the longnamesfirst command, but I haven't found a way to do this biblatex.

Basically all I need to know is how I can use "et. al" beginning from the second citation of a source. I am using the following  \usepackage[ natbib=true, style=authoryear ]{biblatex}   I need citations to look like this:  First citation of a source     Drobetz, Schillhofer, and Zimmermann (2004)   Second and further citations     Drobetz et al. (2004)   Right now, every citation looks like the first one. With the biblatex option maxcitenames I can only adjust all citations and not all but the first one. Any help?


I played Deus Ex: Human Revolution (Director's Cut) for 43 hours and I have a total of 4 card drops. How can I earn rest of these cards. Also, I'm new to steam.

Steam .  In order to get them, you're supposed to play specific games (currently there are  supported, but they've said more will come).  However, I can't figure out how to actually get the cards.  I played a bit of Portal 2, but didn't find any cards.  Do I need to find/pick up actual cards within the game?  Do I get them for completing certain objectives/achievements?  Do I need to beat the game?  How do I get cards?


Consider a lone photon. As its frequency increases, its energy increases. Taken to the limit, a sufficiently-high-frequency photon could be a black hole unto itself.  But the frequency of a photon is dependent on the inertial frame of the observer. Two observers could each observe this photon to be either above or below this critical frequency. Or, I could accelerate to "catch up" to this photon, red-shifting it until it is no longer energetic enough to be a black hole.  So couldn't I at one moment observe a particle to disappear beyond the event horizon, accelerate until the event horizon no longer exists, and hence observe what happened to the particle after crossing that threshold?  Is this in-principle possible? If not, why not?  EDIT: to clarify, I am not asking how much energy-due-to-photon-momentum is required to create a black hole, I am asking: given that threshold energy, how does the event horizon appear to different inertial frames which observe the photon to be above/below this threshold?

I was wondering if it is possible for a single photon to form a black hole if it has a small enough wavelength.If so, what would this wavelength be? I came across this question because I am reading about loop quantum gravity, and have heard that it is 'untestable'. I know that the loops making up spacetime in loop quantum gravity are thought to have a size in the order of $10^{-35}$m, and I was wondering whether making a photon with a wavelength small enough to investigate this would form a black hole.  I am aware of the two posts here, but neither seem to really answer my question because they refer to several photons:  and .  Thank you.


I have some previous experience with C++ and just getting started up with Python. I read this text from  :    In my experience, a general idea is, if you want to perform an operation on object 'O', you call a method on that object to do it.  Eg. If I have a list object, and I want to get summation of all elements, I would do something like :  listObject.getSumOfAllElements()   However, the call given in above book excerpt looks a little odd to me. To me this would make more sense :  return (["%s=%s" % (k, v) for k, v in params.items()]).join(";")   i.e. join all the elements of the list as a string, and here, use this parameter ';' as a delimiter.  Is this a design difference or just syntactically a little different than what I am thinking ?    Edit:  For completion, the book says this a little later :

This has always confused me. It seems like this would be nicer:  my_list = ["Hello", "world"] print(my_list.join("-")) # Produce: "Hello-world"   Than this:  my_list = ["Hello", "world"] print("-".join(my_list)) # Produce: "Hello-world"   Is there a specific reason it is like this?


I have two PCs, one is a Windows 7 desktop and another is Windows 10 laptop. I want to use remote desktop connection to connect to the Windows 7 desktop which is connected to the laptop with a LAN cable, no router and other things. Is it possible?

I've got two systems that are right next to each other, and connected wirelessly to the same router. I want to connect the two of them together with an ethernet cable - both have gig-e and autonegotiation so it should work. I DON'T need the second system to have internet, but I need any specific tweaks to be on that system only.  I do not need to share internet. I need RDP to work, and thats it  The wireless runs on a 192.168.1.x subnet and ICS always runs on a 192.168.0.x subnet so that wouldn't be a problem.  Ideally I want this layout. Can I do this with ICS, or there some other free or open source way?          +---------------------------+           +-----------------------------+      | Laptop 1                  |           | Laptop 2                    |      | Client- mobile            |           | 'server'- stationary system |      |                           <-----+----->                             |      | RDP client                |           | RDP Server                  |      | MUST have wireless access |  ethernet | Runs ICS or similar         |      +---------+-----------------+           | wireless access optional    |                |                             +-----------------------------+                |                |                |                |                |                |                |                +---------------+     wireless to internet


The Question  Prove $1 + \frac{1}{4} + \frac{1}{9} + \cdots + \frac{1}{n^2} < 2 - \frac{1}{n}$ where $n\ge2$ and $n$ is an integer by Induction  My Work  Basis Step:  1 + $\frac{1}{4} = \frac{5}{4}$  $2-\frac{1}{2} = \frac{3}{2}$  $\frac{5}{4}<\frac{3}{2}$  Inductive Hypothesis:  $1+\frac{1}{4}+\frac{1}{9} + \cdots + \frac{1}{k^2} < 2 - \frac{1}{k}$  Induction Step  We must show $1+\frac{1}{4}+\frac{1}{9} + \cdots + \frac{1}{k^2} + \frac{1}{(k+1)^2} < 2 - \frac{1}{(k+1)}$  $1+\frac{1}{4}+\frac{1}{9} + \cdots + \frac{1}{k^2} < 2 - \frac{1}{k}$  $2 - \frac{1}{k} + \frac{1}{(k+1)^2} = 2 - \frac{(k^2+2k+1)+k}{k(k+1)^2} = 2-\frac{k^2 + 3k + 1}{k^3 +2k^2+k}$  My Problem  I can't seem to complete the proof. Any hints on how to change my approach for success?

I am having trouble with the following proof:     For every positive integer $n$: $$1 + \frac{1}{4} + \frac{1}{9}+\cdots+\frac{1}{n^2}\leq 2-\frac{1}{n}$$   My work: I have tried to add $\frac{1}{(k+1)^2}$ to $2-\frac{1}{k}$ in the inductive step and reduce it down to $2-\frac{1}{k+1}$ but cannot do so. I am beginning to think that my entire approach is wrong.


I need to search for the first occurrence of text between single quotes, return the text (without the quotes), but if there is no quoted text is found, return null. I cannot use any additional methods.  For example:   On input "this is some 'text' and some 'additional text'" the method should return: text On input "this is an empty string '' and another 'string'" it should return: nothing.   My code:       public static String findSingleQuotedTextSimple(String input) {         Pattern pattern = Pattern.compile ("(?:^|\\s)'([^']*?)'(?:$|\\s)");         Matcher matcher = pattern.matcher (input);         if (matcher.find()) {             return (matcher.group ());         }         else {             return null;         }     }   However I seem to fail the test and the output is null every time, please help me point out the problem.

I have several strings in the rough form:  [some text] [some number] [some more text]   I want to extract the text in [some number] using the Java Regex classes.  I know roughly what regular expression I want to use (though all suggestions are welcome). What I'm really interested in are the Java calls to take the regex string and use it on the source data to produce the value of [some number].  EDIT: I should add that I'm only interested in a single [some number] (basically, the first instance). The source strings are short and I'm not going to be looking for multiple occurrences of [some number].


test.sh: /usr/bin/notify-send "test"  The following works: bash ~/Documents/test.sh  BUT the crontab never shows the notification. Why?  */1 * * * * bash ~/Documents/test.sh

I am new to linux and I read and followed many instructions to run a python script at reboot but non of them worked:  this is the command I want to run:  /usr/bin/python3 /home/am/projects/AMAcc/map.py   I used crontab -e and added   @reboot /usr/bin/python3 /home/am/projects/AMAcc/map.py   I tried sudo crontab -e and added the same command  I even edited /etc/crontab file and added above command.   Tried adding #!/usr/bin/python3 at top of my python code and changing its permissions like: sudo chmod a+x map.py  As documents suggested that all users would be able to run cron jobs if cron.deny file exists but its empty, so I tried creating empty cron.deny files in both /etc/cron.deny and /usr/lib/cron/cron.deny. But still no luck running the cron job.  What am I doing worng?


I am in a critical problem with the following question. Please help me.  Prove by induction: $$4^n > n^2 \text{ for }n >= 1$$  Base case: n = 1 $$4^1 > 1^2$$ 4 > 1 which is true and for some n = k > 1 we have $$4^k > k^2$$  Next, Induction step: Now setting n = k+1 we get $$4^{k+1} > (k+1)^2$$ $$4(4^k) > k^2 + 2k + 1$$ Now how will I proceed?

Prove that  $ n < 2^{n}  $ for all natural numbers $n$.  I tried this with induction: Inequality clearly holds when $n=1$. Supposing that when $n=k$, $k<2^{k}$. Considering $k+1 <2^{k}+1$, but where do I go from here?  Any other methods maybe?


I'm trying to render a scene where a large amount of the scene is visible, but blender has a performance feature where it culls objects when they start to get a certain distance from the camera, whether it be the actual render camera or user camera. Is there any way to remove this? I'm including a picture of the rendered scene.  EDIT> I found out right after posting this how to fix the problem.

I have created a simple model here   When rendering it the end of it is cut off   How can I get the camera to render a longer distance?


How can I find an example of subsets which satisfies;  for every $i \in \mathbb{N}$   $c_1 \supset c_2 \supset c_3 \supset \cdots \supset c_n$ which are closed and connected subsets of $\mathbb{R^k}$ then $\bigcap_{i=1}^\infty c_i$ is not connected.  until now I have     $c_n=\{[n,\infty) , n \in \mathbb{N}\}$ $\Rightarrow$ $\bigcap_{i=1}^\infty c_i=\varnothing$ which is I couldn't decide whether if it is connected or not connected.  $d_n=\{ ( [-\frac{1}{n},\frac{1}{n}] \times \{0\}) \cup (\{0\}\times ([-1,1]\setminus \{0\})), n\in \mathbb{N}\}$ $\Rightarrow$  $\bigcap_{i=1}^\infty d_i= \{0\} \times [-1,1]$  which is connected. (here I want to seperate the vertical one from the point $(0,0)$ for not path connected implies not connected. If i rearrange  the $ [-1,1] \times \{0\}$ element -for not path connecting result-  as $(-1,1) \times \{0\}$ the set will be not closed but intersection is not connected.)   Thanks in advance for your guidances :)

Let $X$ be a topological space and let $\left\{ Y_{i}\right\} _{i=1}^{\infty}$  be a descending chain of closed connected subsets of $X$. I know from reading elsewhere that ${\displaystyle \bigcap_{i=1}^{\infty}Y_{i}}$ is not necessarily a connected subspace of $X$   but I have no counter example and I haven't managed to come up with one.  There is a counter example  to the same question while also assuming $X$ is compact. However, it uses the quotient topology which I haven't studied about so I would prefer a different counterexample that does not use the quotient topology.  Help would be appreciated!


Note: This is for a physics project, so please don't just give me the answer...   Say we have a cup that is 3/4 full with water. We place that cup (with the water in it) upside down on a smooth table. Why doesn't the water fall out?  This is my understanding... The cup on the table has created an air tight seal that does not allow water to leak out nor any air to enter the cup. Also, as water gets deeper, the pressure increases. Therefore, there is a greater force of water pushing down on the table which the cup contains. But, wouldn't this cause the water to escape the cup? Also, there would be an area of low pressure in the "top" of the cup, but I'm unsure how that has anything to do with the water not escaping the cup...  Any insight would be great!

When I was in high school, my teacher did an experiment to show the power of atmospheric pressure.  Experiment: Prepare a glass bottle, fill with water, put a glass plate on the bottle, make sure there is no air in the bottle, just water. Hold the glass bottle and plate, and invert them. Slowly, release the hand which hold the plate. Because the atmospheric pressure, the glass plate will not fall down.    Question 1: As we know, if we didn't put water into the glass bottle, just air in the glass bottle the glass plate will fall down. So, If we use other liquid instead of water, this liquid has smaller density than water, like alcohol, the plate will not fall down. But, if we continue to chose the smaller density liquid until the liquid has density like air the plate will fall down. So, if there is a threshold density of liquid make the plate between falling  down and not falling down?  Question 2: If we put the bottle and plate into water slowly, when the plate and part of bottle are in the water but part of the bottle still above the water, will the plate fall down?  Question 3: Continuing question 2, when both bottle and plate are in the water I know the plate will fall down. So, how does the pressure of water and atmosphere change?  Is there a good description of this phenomena?  Why does the trick continue to work with lower density fluids and why does placing the plate in the water cause it to fall?


Audits which are potentially duplicates have a "Duplicate" tab at the top allowing you to see what it's been marked as a duplicate of:      When you get test audits which include or duplicate, however, no duplicate tab is displayed. This makes it somewhat obvious that it's a test audit:      For reference, here is the audit this was from:  (the question itself isn't actually closed as duplicate anyway!)

I recently started filtering to duplicates in the close votes queue and I've noticed that every review will always have a Duplicate tab allowing you to tab between the question and proposed duplicate.   Whenever presented with an audit, I know immediately because the duplicate tab disappears.    Upon searching for information regarding audit filtering I found  which told me that audits are not filtered but the tags are faked such that a user could not just watch the tags and only pay attention if their filtered tags do not show up, this doesn't help with this situation though.  As far as I can tell, you can currently robo-review the close votes queue indefinitely without ever reading a question:    Assuming I am not mistaken, should something be done about this?   Related (outdated?) but not duplicate:


Scripts on command line offer a wide range of parameters types. Often parameters can be passed to the script via "--[parameter]" or "-[parameter]". But what is the difference? Why do some parameters have a double "-" and some only a single "-" prefix? Is there a convention of a technical reason behind this?  Example of possible git parameters. (See --exec-path[=<path>] vs. -c name=value)  git [--version] [--help] [-C <path>] [-c name=value]            [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]            [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]            [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]            <command> [<args>]

Where did the convention of using single dashes for letters and doubles dashes for words come from and why is continued to be used?  For example if I type in ls --help, you see:    -a, --all                  do not ignore entries starting with .   -A, --almost-all           do not list implied . and ..       --author               with -l, print the author of each file   -b, --escape               print octal escapes for nongraphic characters       --block-size=SIZE      use SIZE-byte blocks   -B, --ignore-backups       do not list implied entries ending with ~ ...   I tried googling - and -- convention even with quotes with little success.


Right now I'm almost tormented by answering the following question:  "How do we handle our errors and issues in an agile environment?"  Scrum is a framework that does not directly dictate how to handle errors. The direct answer would be to treat bugs as Product Backlog Items that should be included in the Product Backlog. If the Product Owner rates their priority as very high, then they will be considered by the development team at the next sprint. Questions:  But is this the only or the right way? So how should you deal with the mistakes in an agile development?

When reporting a defect, we are setting the priority and severity of the defect. How this works with agile development? Is there any specific way ?  How bug prioritization works in agile projects vs non agile.?  Is there any other way of measuring the priority of a bug in agile projects?


I have a pound of hamburger meat that has not been opened yet. The sell by date was on may 23 2013. Is it ok to eat?

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


As the title says. If a user tries u upload a file with ' in title it throws error(it won't connect to server). Should I replace that sign during upload or something else. It just simple connecting to database      $b = "select * from doc";     $rez1 = mysql_query($b) or die("error");

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


I have been searching for a while trying to find a way to get an OS onto a USB. I have searched this and I have only found how to make a ubuntu live USB. I don't want to dual boot. I want to be able to have the operating system on the USB so that I can plug it into other computers and boot my desktop. I have no idea where to look on how to do this so some help would be nice. I have a windows 8.1 laptop and a 16GB USB.

If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about.   I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install.  To do this, I need to install the nVidia drivers first (sigh).  To do this, I need changes to persist a reboot.  To do this, I need to really install Ubuntu on a USB key.  How do you do that?    What I tried   I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu:  sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso   ...but the installer didn't detect the disk properly.


I'm meant to prove the statement above and I chose to do so by thinking about the equation modulo $4$ and residue classes. My simplified process is below:  $c^2$ is either the residue class $1$ (if odd) or $0$ (if even). After being multiplied by $3$, it is either the residue class $3$ or $0$. Similarly, $a^2$ and $b^2$ are either the residue classes $1$ (if odd) or $0$ (if even). Because of this, $a^2+b^2$ can never equal $3$ (which is $3c^2$'s residue class if it's odd), meaning that $a^2$ and $b^2$ must both be even so that $0 + 0 = 0$.  Where I'm lost is where to go from here. My instinct is to say that, since we ignoring the cases where $a$, $b$ and $c$ are zero, then the case above is invalid because $0$ is part of the residue class $0$, but that doesn't seem correct to me. Does anyone have any advice on where to go from here (or if I missed something in my proof?)

Show that the curve $x^2+y^2-3=0$ has no rational points, that is, no points $(x,y)$ with $x,y\in \mathbb{Q}$.   Update: Thanks for all the input! I've done my best to incorporate your suggestions and write up the proof. My explanation of why $\gcd(a,b,q)=1$ is a bit verbose, but I couldn't figure out how to put it more concisely with clear notation.  Proof: Suppose for the sake of contradiction that there exists a point $P=(x,y)$, such that $x^2+y^2-3=0$, with $x,y\in\mathbb{Q}$. Then we can express $x$ and $y$ as irreducible fractions and write $(\frac{n_x}{d_x})^2+(\frac{n_y}{d_y})^2-3=0$, with $n_x, d_x, n_y, d_y\in\mathbb{Z}$, and $\gcd(n_x,d_x)=\gcd(n_y,d_y)=1$.  Let $q$ equal the lowest common multiple of $d_x$ and $d_y$. So $q=d_xc_x$ and $q=d_yc_y$ for the mutually prime integers $c_x$ and $c_y$ (if they weren't mutually prime, then $q$ wouldn't be the lowest common multiple). If we set $a=n_xc_x$ and $b=n_yc_y$, we can write the original equation as $(a/q)^2+(b/q^2)-3=0$, and equivalently, $a^2+b^2=3q^2$.  In order to determine the greatest common divisor shared by $a$, $b$, and $q$, we first consider the prime factors of $a$. Since $a=n_xc_x$, we can group them into the factors of $n_x$ and those of $c_x$. Similarly, $b$'s prime factors can be separated into those of $n_y$ and those of $c_y$. We know that $c_x$ and $c_y$ don't share any factors, as they're mutually prime, so any shared factor of $a$ and $b$ must be a factor of $n_x$ and $n_y$.  Furthermore, $q=d_xc_x=d_yc_y$, so it's prime factors can either be grouped  into those of $d_x$ and those of $c_x$, or those of $d_y$ and those of $c_y$. As we've already eliminated $c_x$ and $c_y$ as sources of shared factors, we know that any shared factor of $a$, $b$, and $q$ must be a factor of $n_x$, $n_y$, and either $d_x$ or $d_y$. But since $n_x/d_x$ is an irreducible fraction, $n_x$ and $d_x$ share no prime factors. Similarly, $n_y$ and $d_y$ share no prime factors. Thus $a$, $b$, and $q$ share no prime factors, and their greatest common divisor must be $1$.  Now consider an integer $m$ such that $3\nmid m$. Then, either $m\equiv 1\pmod{3}$, or $m\equiv 2\pmod{3}$. If $m\equiv 1\pmod{3}$, then $m=3k+1$ for some integer $k$, and $m^2=9k^2+6k+1=3(3k^2+2k)+1\equiv 1\pmod{3}$. Similarly, if $m\equiv 2\pmod{3}$, then $m^2=3(3k^2+4k+1)+1\equiv 1\pmod{3}$. Since that exhausts all cases, we see that $3\nmid m \implies m^2\equiv 1\pmod{3}$ for $m\in\mathbb{Z}$.  Notice that $a^2+b^2=3q^2$ implies that $3\mid (a^2+b^2)$. If $3$ doesn't divide both of $a$ and $b$, then $(a^2+b^2)$ will be either $1\pmod{3}$ or $2\pmod{3}$, and thus not divisible by $3$. So we can deduce that both $a$ and $b$ must be divisible by $3$.  We can therefore write $a=3u$ $\land$ $b=3v$ for some integers $u$ and $v$. Thus, $9u^2+9v^2=3q^2$, and equivalently, $3(u^2+v^2)=q^2$. So $3$ divides $q^2$, and must therefore divide $q$ as well. Thus, $3$ is a factor of $a,b,$ and $q$, but this contradicts the fact that $\gcd(a,b,q)=1$, and falsifies our supposition that such a point $P=(x,y)$ exists.


I'd like to minimize/maximize any generic window in all 4 directions. How do I accomplish this? More specifically, I'd like to do this for iterm, but it would be nice if the solution is generic.

Before Mavericks, I could maximise a window while holding shift key, and the window would always fill up the entire screen without needing any third party tools or changes.  It no longer works in Mavericks, is there a workaround or hidden setting to revert to the old behavior?


Is "Listen up" a complete sentence or is it just a fragment?

seems to indirectly ask the question, but the upvoted answer says "the actual sentence is...". So my question is this: Are commands considered to be grammatically sound, complete sentences in the English language? Some examples:  Go. Add a note. Do work.


I have a array of objects , take the below code as a example:  Let Data =  [             {               "helptext": "streetAddress_description_text",               "name": "addressLine1",               "label": "streetAddress_label",               "placeholder": "streetAddress_sample",               "type": "text",               "required": true             },             {               "helptext": "streetAddress2_descriptor_text",               "name": "addressLine2",               "label": "streetAddress2_label",               "placeholder": "streetAddress2_sample",               "type": "text",               "required": false             },             {               "name": "city",               "label": "city_label",               "placeholder": "city_sample",               "type": "text",               "required": true             } ]   Here i need to add a unique value in the objects that is present inside the array.Example id   [             {               "helptext": "streetAddress_description_text",               "name": "addressLine1",               "label": "streetAddress_label",               "placeholder": "streetAddress_sample",               "type": "text",               "required": true,                "id":1             },             {               "helptext": "streetAddress2_descriptor_text",               "name": "addressLine2",               "label": "streetAddress2_label",               "placeholder": "streetAddress2_sample",               "type": "text",               "required": false,                "id":2             },             {               "name": "city",               "label": "city_label",               "placeholder": "city_sample",               "type": "text",               "required": true,                "id":3             } ]   And i am using the above object for some operation. Take an example i am rearranging the object position. Eg:   [              {               "name": "city",               "label": "city_label",               "placeholder": "city_sample",               "type": "text",               "required": true,                "id":3             },             {               "helptext": "streetAddress2_descriptor_text",               "name": "addressLine2",               "label": "streetAddress2_label",               "placeholder": "streetAddress2_sample",               "type": "text",               "required": false,                "id":2             },             {               "helptext": "streetAddress_description_text",               "name": "addressLine1",               "label": "streetAddress_label",               "placeholder": "streetAddress_sample",               "type": "text",               "required": true,                "id":1             } ]    After this process, i need to removed the id which we have added in the first process. And sumbiting the value to the server. Is there any way to achieve this.  Please help me with this. Thanks in advance

Say I create an object as follows: let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI",   "regex": "^http://.*" };  How should I remove the property regex to end up with new myObject as follows? let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI" };


Some times I come accross an answer that is super good, and I know I will need to look at this again.. I usually upvote such questions/answers.. but, some times it is  hard to find them again (unless I do something as oldfashion as bookmark it), so I would like to "save" it... for myself.. so that later I can look at my own "saved" answers, and this is a much smaller subset of all the answers out there (think reddit save funtion).

I browse Stack Overflow quite frequently and I often find that when I come across a helpful answer I want to be able to save the best answer for later. It would be nice if I could save those snippets/answers to my account so later I can quickly find what I was looking for.


I am trying to prove that the uncertainty of the equation $$Q = xy$$ is equal to $$\frac{\Delta Q}{Q_0} = \frac{\Delta x}{x} +  \frac{\Delta y}{y}.$$  However what I am getting is  $$\Delta Q =\sqrt{(y\Delta X)^ 2 + (x \Delta y)^²} $$ and I am stuck there.. How to continue to prove that it is equal to the second equation that I have written?

I'm in doubt with one thing: let's imagine that we have $n+1$ quantities, $n$ of them being directly measured, and the other one being related to the first $n$ by a function $f : \mathbb{R}^n \to \mathbb{R}$. If the $x_i$ is one of the quantities being directly measured and if $\Delta x_i$ is it's uncertainty, then I've learned that the uncertainty of the quantity $y = f(x_1, \dots x_n)$ is given by:  $$\Delta y=\sum_{i=1}^{n}{\frac{\partial f}{\partial x_i}\Delta x_i}$$  My problem in understanding this is: well, if $f$ is such a function, it's derivative is the linear transformation $df : \mathbb{R}^n \to \mathbb{R}$ given by:  $$df=\sum_{i=1}^{n}\frac{\partial f}{\partial x_i}dx_i$$  Where $dx_i : \mathbb{R}^n \to \mathbb{R}$ is given by $dx_i(a_1 \dots a_n) = a_i$. Hence, what we are saying, is that $\Delta y = df ( \Delta x_1, \dots \Delta x_n)$, in other words, we are saying that the uncertainty of $y$ is given by a linear function of the vector of uncertainties of the quantities $x_i$. Why should that be true? I mean, what's the reasoning behind this? I really didn't get the point, my teacher just gave the equation without justifying or anything like that.  Any help and reference is appreciated.


Many times a precise definition of something in physics is not available but yet there exist some rough definitions that guide us through. I need the same rough (if not precise) definition of physical laws. The reason being that we would consider $\mathbf a= \frac {d \mathbf v}{dt}$ as a mere definition but $\mathbf F =m \mathbf a$ as a law (as it is called as Newton's second law of motion). But to me it seem to be more inclined towards being as definitions rather than laws. I mean contrasting Newton's laws of motion to the law of conservation of energy (momentum, etc) it seem to be an attempt to define forces ( though I might be wrong at this (but I don't know reason for such)).   So what is the definition of a physical law that can encapsulated it's entirety?

Some basic Physics books are often misguiding in the sense that they don't make clear whether something is a primitive concept, a law, a definition or a theorem. This is often a little confusing. I've asked here some moments ago if there's a definition of force, and I've been redirected to a question about whether Newton's Laws are laws or definitions of mass and force.  This is just an example, but there are many others, like for instance, the conservation of energy, which some books present as a theorem, and some places says that this is a law of Physics. Time on the other hand, is something that according to Feynman's lectures on Physics, cannot be defined, so we just say how to measure it and leave it as a primitive concept.  In this context: how in general can we identify whether something is a primitive concept, a fundamental law of Physics, a definition or a theorem?


I have an Account hierarchy. I have a formula on my Account that returns the ID of the Account at the top of the hierarchy. Due to formula size restraints, I can't use CASESAFEID in the formula, so it only returns the 15 character ID. Return type of the formula is Text (String).  My use case is given one Account, return all the Accounts in its hierarchy. The problem is, I have a 15 character ID from the formula and SOQL is not case sensitive.   So if I do something like this:  Account a = [SELECT Id, Ultimate_Parent_Id__c FROM Account LIMIT 1]; String parentId = a.Ultimate_Parent_Id__c; String query = 'SELECT Id, ' + Util.GetDynamicQueryString() + ' FROM Account WHERE Ultimate_Parent_Id__c =: parentId'; List<Account> results = Database.query(query);   This won't work because theoretically there could be multiple Accounts with that 15-character ID when it is processed case-insensitive.  Since SOQL can't compare the String values in a case sensitive manner, the only way I can think to do this is to write a trigger to stamp the 18 character ID of the ultimate parent on create or reparent.  Has anyone figured out a way around this?

Can anyone confirm this: in a SOQL Where clause, when comparing an ID field to a 15-character string variable, the comparison works.  I didn't expect it to work, but it does and I am surprised.  I can't find any documentation to confirm it.  I thought 18-character ID was always in effect, and comparing 18-char ID to 15-char string would fail.  Example (Country__c is a lookup field):  String tmpID = 'a1he0000000EkAi'; Account acct = [select ID from Account where Country__c = :tmpID];


Using \bibliographystyle{unsrtnat} and bib files, with pdfLaTeX. I would like to include in the body of the text or perhaps in a footnote -- certainly not in  the reference section --  only the abstract of an article contained in the bib file. By way of analogy, this is what \citeyear{bibitem} does with the publication year. The nearest to this that I could find are:   seems to output each entry, while I would like to do it for a single citation at a time; : this extends the citation with the abstract, but I would like to have just the abstract.


I have a class like this:  using System; using System.Collections.Generic; using System.Linq; using System.Text;  namespace WindowsFormsApplication1 {     public class MyList<T> : List<T>     {         public int SelectedIndex { get; set; }          public T CurrentItem         {             get             {                 if (this.SelectedIndex > this.Count)                     return null;                  return this[this.SelectedIndex];             }         }     } }   I am creating a class that derive from list and create a property for getting the current item.  If SelectedIndex is a wrong value, I am returning null but it has an error     Cannot convert null to type parameter 'T' because it could be a   non-nullable value type. Consider using 'default(T)' instead.   I want the return value to be null not default(T).  what should I do?

I have a generic method with this (dummy) code (yes I'm aware IList has predicates, but my code is not using IList but some other collection, anyway this is irrelevant for the question...)  static T FindThing<T>(IList collection, int id) where T : IThing, new() {     foreach T thing in collecion     {         if (thing.Id == id)             return thing;     }     return null;  // ERROR: Cannot convert null to type parameter 'T' because it could be a value type. Consider using 'default(T)' instead. }   This gives me a build error      "Cannot convert null to type parameter   'T' because it could be a value type.   Consider using 'default(T)' instead."   Can I avoid this error?


Problem I just went to use Property List Editor to look at a .plist file and it no longer works in Sierra    My Setup Mid-2010 15" MBP macOS Sierra 10.12   Crucial Comment I do not want to use Xcode to open .plist files, it's too much for such a simple task. The Property List Editor was perfect.   What I have Found As of 2016-09-13 The Apple Developer website describes Xcode as the only option to edit .plist files (search for: About Information Property List Files) Apple mentions using Xcode to generate and work with .plist files but there has to be another way.    Is the Property List Editor App done in macOS Sierra?  If so, other than Xcode, are there any simple programs like the Property List Editor that people recommend?     Thank you for your responses!   UPDATE  This is not a "duplicate" question. This question is specifically for those who are used to using Property List Editor and have lost it as an option when upgrading to macOS Sierra. So keeping this question thread will help others with the specific issue, especially if they are not a fan of using Xcode to work with plist files and/or do not know how to work with plist files through terminal.  The solution linked in the "claimed" duplicate thread can be useful to those familiar with terminal.  Those familiar with terminal, you can also use rlwrap and PlistBuddy, which IS currently working in macOS Sierra. See:   Those not familiar with terminal who want to avoid Xcode: sorry, I haven't found a solution for you but I'll keep looking into it. If anyone else has a suggestion please add it. If there are other *exchange posts with software recommendations please feel free to link them for other users in the future.

From Finder, I can preview a plist file without any difficulties. For example, using Quick Look with ~/Library/Preferences/com.apple.Safari.RSS.plist I get a nice preview of its contents:     However, if I then try to open the file, either with TextEdit, or any other editor (I've tried SublimeText, TextMate, Vim, Nano, and Coda 2 so far), the encoding appears to be off:  bplist00Ò_"FixedRefreshesInBackgroundSettings_(com.apple.PreferenceSync.ExcludeSyncKeys ¡ 2]^����������������������������`   Here's what it looks like if I open it with TextEdit:     I've tried changing the encoding in Sublime Text and other apps, but that doesn't help.  Any thoughts?  I'm running 10.8.4.


Is there a way to get List of Files or FileName which a Process is writing (if possible writing/reading/appending) ,from C# ,which means im talking about Windows (NT,Vista,XP,7).

How do I get the list of open file handles by process id in C#?   I'm interested in digging down and getting the file names as well.   Looking for the programmatic equivalent of what process explorer does.   Most likely this will require interop.   Considering adding a bounty on this, the implementation is nasty complicated.


I am building a module on drupal 8 to make a redirection after a form is submitted  function form_redirect_form_alter(&$form, FormStateInterface $form_state, $form_id) {     $form['actions']['submit']['#submit'][] = 'ptt_contact_form_blocks_submit'; }   function ptt_contact_form_blocks_submit($form, FormStateInterface $form_state) {     $form_state->setRedirect($route_name); }   but for the setRedirect, it needs to have the route name. Like if i want to redirect to node/24, then how can i find the route name of the node?  Thanks!

I created a custom module, It generate a custom Form in a page. When I submit my form, I create a new node. So, I am redirect to the form page but I would like be redirect to the new node page.  I add this line at the end of my submitForm function :   $form_state->setRedirect('node/'.$mynewnode->id());   But when I submit my form from the website, I get the empty-white-screen-of-the-death. My apache log :   ... Uncaught PHP Exception Symfony\\Component\\Routing\\Exception\\RouteNotFoundException: "Route "node/153" does not exist. ...   And then, when I go manually to the node/153 page, there isn't any problem. The page work well.   My question : where is my mistake ? How can I set the redirection after create the new node ? Is it possible from the submitForm function ?


Hi math people in my last question I  asked the question     $X,Y$ are independent, identical distributed with $$P(X=k) = P(Y=k)=\frac{1}{2^k} \,\,\,\,\,\,\,\,\,\,\,\, (k=1,2,...,n,...)$$      Calculate the probabilities $P(\min\left\{X,Y\right\} \leq x)$   I calculate it correct, here is calculation:  $$\begin{split}F_M(x) &= P(\min\left\{X,Y\right\} \leq x) \\ &= 1-P(x<\min\left\{X,Y\right\} ) \\ &= 1-P(x<X, x<Y) \\ & = 1-P(X>x)\,P(Y>x)\\ & = 1-(1-P(X \leq x))\,(1-P(Y \leq x))\\ & = 1-(1-F_X(x))\,(1-F_Y(x))\end{split}$$  But now how     calculate expected value of random variable $Z=\min\left\{X,Y\right\}$   So we have $Z = 1-(1-F_X(x))\,(1-F_Y(x))$  Then $$E(Z) = \int_{0}^{\infty}\left(1-(1-F_X(x))\,(1-F_Y(x))\right) \,\,dx$$  Is it good like this?

$X,Y$ are independent, identical distributed with $$P(X=k) = P(Y=k)=\frac{1}{2^k} \,\,\,\,\,\,\,\,\,\,\,\, (k=1,2,...,n,...)$$      Calculate the probabilities $P(\min\left\{X,Y\right\} \leq x)$ and   $P(\max\left\{X,Y\right\} \leq x)$   For the minimum I do like this:  $$\begin{split}F_M(x) &= P(\min\left\{X,Y\right\} \leq x) \\ &= 1-P(x<\min\left\{X,Y\right\} ) \\ &= 1-P(x<X, x<Y) \\ & = 1-P(X>x)\,P(Y>x)\\ & = 1-(1-P(X \leq x))\,(1-P(Y \leq x))\\ & = 1-(1-F_X(x))\,(1-F_Y(x))\end{split}$$  Is this correct for minimum? I'm not sure how do it for $\max$? Maybe I do it too complicated because they are equal these $P(X=k)=P(Y=k)$ maybe you can do it more elegant? But I don't know how?


how can i aggregate text from different sources for example   char * a , * b,* c, *d; a = argv[1] ; b = "something"; c = "another text"; d=b&a&c; //this what i want to know printf("%s",d);   output :  somethingTESTanother text

I'm working in C, and I have to concatenate a few things.  Right now I have this:  message = strcat("TEXT ", var);  message2 = strcat(strcat("TEXT ", foo), strcat(" TEXT ", bar));   Now if you have experience in C I'm sure you realize that this gives you a segmentation fault when you try to run it. So how do I work around that?


-- in a title is collapsed to —. This probably isn't so great if the title  .  Is this intended behavior?    Running this query on data.stackexchange (I don't claim to be good at SQL):  SELECT     sum(case when Title LIKE '% -- %' then 1 else 0 end) AS [mdash],     sum(case when Title LIKE '% <!-- %' then 1 else 0 end) AS [comment],     sum(case when Title LIKE '%[a-z0-9]-- %' then 1 else 0 end) AS [decrement],     sum(case when Title LIKE '% --[a-z0-9]%' then 1 else 0 end) AS [increment],     sum(case when (Title LIKE '%-- %' OR Title LIKE '%--- %')               and Title NOT LIKE '% -- %'               and Title NOT LIKE '% <!-- %'               and Title NOT LIKE '%[a-z0-9]-- %'               and Title NOT LIKE '% --[a-z0-9]%' then 1 else 0 end) AS [uncategorized] FROM Posts   I get the following results:  mdash comment decrement increment uncategorized 7665  34      368       1752      472   The vast majority of valid uses cases would be unaffected by Tim Stone's proposal

Consider this question:    Unfortunately, the question title is displayed on SO as:     is `x— > 0 && array[x]` well defined behavior in c++?   There are two issues here:   Less severe, the backticks are displayed verbatim and don’t delimit a code span. Not very nice but bearable. On the other hand, MathOverflow has this really nice math mode even in titles – why not also introduce this on SO for code? The -- operator is transformed into an em-dash. This is slightly misleading and simply unnecessary. I am all in favour of using SmartyPants (or whatever SO uses) to glam up the question title typography. But this shouldn’t go at the cost of correctness.   So I suggest allowing limited Markdown in titles (e.g. as in comments?) or at least fixing the formatting bug.


If I had a XBox One, and a friend of mine had a Playstation 4, would we be able to play GTA Online together?

Grand Theft Auto Online exists on five different platforms: XBox 360, PS3, XBox One, PS4, and PC. Do any of these play on the same servers, allowing people on differing platforms to play together?


How would you monitor a directory on a Linux machine to check if there was a user (or someone from the network) who attempted to access it?

Is there any way in unix to find out who accessed certain file in last 1 week? It may be user or some script ftp it to some other place. Can I get a list of user name who accessed certain file? How can I find out who is accessing particular file??


Apologies if this is a duplicate (or just common knowledge) but I found it hard coming up with a way to search for this succinctly enough to get a definitive answer and I haven't really played a spellcaster before.  If I have a warlock level 5, the warlock has slots of 3rd level. If I then put my next level into a sorcerer. Can I select sorcerer spells of up to level 3, or can I only select sorcerer spells of up to level 1 (i.e. the sorcerer level). I understand how spell slots are added between classes etc, I'm just not sure of this one thing. I had a look at the multi-classing section but either didn't see it or didn't understand it when I did see it.

The "Your Spellbook" sidebar for the wizard includes the following line:  Copying a Spell into the Book. When you find a wizard spell of 1st level or higher, you can add it to your spellbook if it is of a level for which you have spell slots and if you can spare the time to decipher and copy it.  Does this mean that a Wizard 1/Cleric 19 can copy any wizard spell they find into their spellbook? Is there anything preventing them from casting these spells?


method to remove non alphanumerics in a string and display it in a list.  public static list<string> s(){     String stg = 'ABC,DEF,GHI,JKL';       List<String> lst = stg.split(',');     System.debug('test'+lst); }

In order to store results in the newly released (Winter 16') Platform Cache, I need an alphanumeric string, but currently have a String with the report name that I'm attempting to store, some of which have spaces, hyphens, parenthesis, etc. (i.e. "Sales - Actual Results (TY)").  I'm not sure in APEX how I would strip all these unwanted characters from the string to convert it into the alphanumeric key that I need.  Please & Thank you!


How would I go about proving this?  Let $X$ be a compact metric space. Let $(f_n)$ be a sequence in $C(X)$. If $(f_n)$ is uniformly convergent, show that $(f_n)$ is both uniformly bounded and equicontinuous.

Let $X$ be a metric space and let $\{ f_n \}_{n \geq 1}$ be a sequence in $C(X)$. Show that if $\{ f_n \}_{n \geq 1}$ converges uniformly on $X$ then $\{ f_n \}_{n \geq 1}$ is both uniformly bounded and equicontinuous.  Could I get a hint?


How is the quantity of views a question has received calculated by Stack Overflow?   Does the site always check the user's IP Address in the database?

I saw it's not just a page views number, because, if I press F5 several times, it won't increase the number of views.  They could store my IP address in a table, but wouldn't that make it slow? They would need to query a database one more time for each request.


When I go to the admin profile in Wordpress, I don't see a place to edit the photo for the admin.  Would anyone be able to please suggest to me how to navigate to the place where I can change the admin/user profile photo?  Thank you!

Is there a way o changing user's avatar without plugins? Why there's no "Avatar Upload" section in Users > Your Profile?  I can't use a plugin. Am I blind or being forced to use Gravatar? ;/


stat -c '%B' * reports the same number 512 for each file. What does %B mean? I don't understand the manual:     %B - The size in bytes of each block reported by ‘%b’   Is it related to my block size:  $ sudo blockdev --getbsz /dev/sda1 4096   Thanks.

I've noticed that when I do a:  ls -ls file   It provides block count, say 8 blocks.  When I do:  stat file   I notice that the block count is 16, twice the number given by ls.   The block size on my file system is 4096. I learned that the arbitrary unit for blocks used by ls is 1024. Is it correct to say that stat uses an arbitrary unit of 512 bytes when reporting blocks?  If so, is there a reason for the inconsistency?  I'm running Ubuntu 11.10 on an ext4 file system.


Let $(X, \mathcal{T})$ be a topological space. Suppose $A \in \mathcal{T}$. We define the interior of $A$, the closure of $A$ and the boundary of $A$ as follows:   $\operatorname{int}A=\lbrace x \in A\mid A \in \gamma(x) \rbrace$, where $\gamma(x)$ denotes the neighborhood filter of $x$.  $\operatorname{cl}A=\lbrace x \in X\mid \forall V \in \gamma(x): V \cap A \neq \emptyset \rbrace$  $\partial A= \operatorname{cl}A \cap \operatorname{cl}(X\setminus A)$  How do you prove that $\operatorname{int}(\partial A) = \emptyset$? I already have that $\operatorname{int}(\partial A)=\operatorname{int}(\operatorname{cl}A \setminus A)$, but how do you continue from this point?

Suppose X is a Metric Space  Let S $\subset X$  Prove that if S is Closed then, the Interior of the Boundary of S is Empty  Totally stuck on how to solve this.