I'm very conservative in how I use my computer (no illegal software, no strange downloads) yet still managed to get infected by a very annoying piece of malware. I presents itself mostly in Internet Explorer (before also in Firefox, but there I reset the browser - which worked) as follow:   Random extra tabs open, usually to some "bigdeal" ad or a survey Links in valid articles get uppercased and intercepted when clicking on it In general, every few clicks get intercepted by a new tab with an ad   In my search of removing it, I've tried the following:   Using "Advanced" settings of Internet Explorer I reset Internet Explorer to its default settings. This requires a reboot. After reboot, the malware is back, so it doesn't work. Remove suspicious software from control panel "installed applications", but the malware is still there despite the list being clean Doing a full scan using the program "MalwareBytes". It found 3 threats which I removed, but the malware is still here.    I've been continuing my search with a lot of online research but the first two pages in Google search results look very suspicious. Poorly written, copy/pasted, and often recommending yet another scan tool I never heard of. I'm paranoid now, believing these are scam articles that will make my problem worse instead of solving it.  I'm looking for a solution that actually works, safely and permanently. A reinstall or restore is the last thing I need, so I'm just hoping for a good "clean".  As a secondary question, I'm interested to learn how on earth I got this malware. All my software is legal, I don't download anything from untrustworthy sources and follow general best practices in keeping software up-to-date, virus scanners, firewall, etc.

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


While flying to a wedding last weekend I caught a few glimpses of a movie that a fellow passenger was watching that looked interesting. I could not hear any audio and I only caught a couple minutes of what I presume was the beginning of the movie. The first scene had a group of scientists discussing aspects of 3 planets, which I believe were Venus, Earth, and Mars. A screen shows that Venus's temperature was +250 degrees (I didn't see what scale). Later, the shot zooms above what kind of looks like a solar collection tower in a mountainous area. Energy gathers together at the center, sort of Death Star style, and then shoots a yellowish beam into space. The next scene shows two white guys at a dimly lit bar with some neon lights. I did not recognize any of the actors in any of these scenes, but it seems like a fairly recent movie, probably no more than 10 years old.

I have memories of watching it a few years ago (I was a kid then) in the early 2000s probably; before 2010 I think. It was a movie with giant robots, and the enemies were aliens piloting what I remember as giant, more animalistic robots. I remember those animalistic ones running on water. The aliens themselves were a little taller than humans but mostly humanoid. I remember what the aliens look like a bit; most of the movie they were clad in some kind of armor, but the scene I mentioned showed one's face, if I remember well, grey skin, vividly green eyes, a beard made of some kind of quills, bald. I have this one scene that stayed crystal clear in my memories. The heroes had captured an injured alien, and other aliens attack to, in the end, just retrieve the injured one, leaving with this one without attacking further this time. I also remember the aliens going through a city in some machine (I'm actually not sure this one was piloted though) and destroying anything it perceived as a threat, from cars to security cameras. My memories are coming from years ago, so I might be wrong in a bunch of things there, but this one scene, I can assure is correct. This might remind a bit of Pacific Rim, but it isn't. (It's watching Pacific Rim that reminded me of this movie.) It doesn't seem to show up on any giant robot movie list on internet, weirdly, so I hope you can help me. And now I'm starting to wonder if there was really robots on the heroes' side. Maybe it was warships (sea ones, not spaceships). As I said it was some time ago and I was young, so bad memories are likely.


What do people recommend for a torrent app for Ubuntu 16.04? And how do I install it? I tried downloading one but I couldn't install it? Do I have to type in some code?  Thanks for the replies guys. I might try giving Deluge a try. I'll also read through the posted links (thumbs up).

What GUI Based Torrent managers exist in Ubuntu and features they offer in terms of:     Speed to start downloading (Search Speed, Seed, Leech)   Speed while downloading   Compatibility   Stability   Data check   Other attributes


I need to limit the amount of memory being used when running a Python script in NiFi, and I found  answer in Stack Overflow. I follow the logic of how the code works, but I'm a bit stumped as to how to actually implement it in a Python script.   For example, if I have a script  import sys import json  flowFile = sys.stdin.read() try:      j = json.loads(flowFile)     sys.stdout.write(j) except:     sys.stdout.write(flowFile)   would I then implement the memory limit as   import sys import json  def memory_limit():     soft, hard = resource.getrlimit(resource.RLIMIT_AS)     resource.setrlimit(resource.RLIMIT_AS, (get_memory() * 1024 / 2, hard))  def get_memory():     with open('/proc/meminfo', 'r') as mem:         free_memory = 0         for i in mem:             sline = i.split()             if str(sline[0]) in ('MemFree:', 'Buffers:', 'Cached:'):                 free_memory += int(sline[1])     return free_memory  if __name__ == '__main__':     memory_limit() # Limitates maximun memory usage to half     try:         main()     except MemoryError:         sys.stderr.write('\n\nERROR: Memory Exception\n')         sys.exit(1)  flowFile = sys.stdin.read() try:      j = json.loads(flowFile)     sys.stdout.write(j) except:     sys.stdout.write(flowFile)   or something else entirely?

Given the following code, what does the if __name__ == "__main__": do?  # Threading example import time, thread  def myfunction(string, sleeptime, lock, *args):     while True:         lock.acquire()         time.sleep(sleeptime)         lock.release()         time.sleep(sleeptime)  if __name__ == "__main__":     lock = thread.allocate_lock()     thread.start_new_thread(myfunction, ("Thread #: 1", 2, lock))     thread.start_new_thread(myfunction, ("Thread #: 2", 2, lock))


Traveling across USA having entered using the visa waiver program, having been approved for an ESTA. If I enter Canada for a few days, and then re-enter the United States, does my 90 days refresh upon re-entry?

I'm on a New Zealand passport.  From most US Embassy webpages:     The Visa Waiver Program (VWP) enables nationals of certain countries,   including Australia, New Zealand, and the U.K., to travel to the   United States for tourism or business for stays of 90 days or less   without obtaining a visa, if certain requirements are met. Under the   VWP, time spent in Canada, Mexico, and adjacent islands counts towards   the maximum of 90 days stay allowed under the program.   I'll be there on a 1-year working holiday visa starting when I arrive in Vancouver. I'm spending 3 days in Hawaii en route to Vancouver. This seems to imply that 90 days after landing in Hawaii, my time will be up and I won't be able to get back into the US, as my living in Canada will not reset the clock. What if after this time I want to say, pop across the border to Seattle? How can I restart the 90 days, without having to resort to say, flying to Japan and back just to reset it?


I have been reading about the working of transformers at "no load" condition, that is when no load is connected to secondary side of the transformer. I don't understand why the transformer still draws a little current called "no load current." I read about it on different websites and in books and found that it is to set up magnetic flux in the system.  Does drawing the current make the system stable or anything else, mustn't there be a requirement just like water has to go down a hill so that it can lower its potential energy?

The no-load current of a transformer consists of two components:  The Magnetization Current iM is the current required to produce the flux in the transformer core. The Core-loss Current ih+e is the current required to make up for hysteresis and eddy current losses.   This is what my book says for the no-load current in a real transformer. To me it sounded silly that the magnetization current, which is a part of the overall no-load current, is solely responsible for the entire flux generated in the core. How is it that not the overall but a part of the no-load current is responsible for all the flux that is in the core?


I only know Java Programming Language and no other. Can I develop games for Android in Unity3D using Java?

I am fairly new to Unity3D experience , but I have a very good knowledge of Java and Android development. I am really confused that if Java is at all needed for developing android applications? I read somewhere in Unity documentation that adding behaviour to objects in Unity requires use of scripts, and that unity only supports C# , .Net , and Boo scripts. Is there no use of Java at all?


I have a machine which I have accidentally install 32-bit 12.04 LTS on.  (Yes, accidentally. I can't recall how I managed that.)  What is the easiest way to fix this? Mucking about with the kernel files or axing it with a reinstall?  Is it possible and safe to have a dual boot of 32 and 64-bit 12.04 LTS?

I've got a 32-bit Ubuntu installation running on 64-bit hardware. Now that , I would like to switch to 64-bit without having to reinstall the OS.  This is one of the :  Shawn installed his system using the 32-bit version of Ubuntu, but his hardware is 64-bit and he wants to switch over. He manually installs the amd64 versions of dpkg and apt, replacing the i386 versions and changing which architecture is used as the default; then he installs the amd64 ubuntu-minimal package; then he installs the amd64 ubuntu-desktop package. Over time the remaining i386 packages are replaced automatically on upgrade.  However, when trying to follow the instructions in there, I cannot find any 64-bit version of dpkg or apt.  Did this user story got implemented in a different way in the final spec, or do I need to do something differently?  In short, how can I switch my 32-bit installation to 64-bit?


I Have been planning to completely to switch over ubuntu but I couldn't find any forum which gives step by step process to do so, I have no problem in playing steam games with help of proton but I couldn't find a way to play torrented games please help I know it could be done by lutris  but I couldn't find the option to select .exe

Can .exe and .msi files (Windows software) be installed in Ubuntu?


Say,$X$~$Pois(\lambda_1)$ and $Y$~$Pois(\lambda_2)$.  Let $Z=Y-X$.  So, $P(Z=z)=P(Y-X=z)=P(Y=z+X)=\sum_{x=0}^{\infty}P(Y=z+x)P(X=x)$.  (Last step, because of independence of ($X,Y$) ).  Thus, $P(Z=z)=\sum_{x=0}^{\infty}P(Y=z+x)P(X=x)=\sum_{x=0}^{\infty}\dfrac{(\lambda_2)^{z+x}}{(z+x)!}e^{-\lambda_2}\dfrac{(\lambda_1)^x}{x!}e^{-\lambda_1}=e^{-(\lambda_1+\lambda_2)}(\lambda_2)^z\sum_{x=0}^{\infty}\dfrac{(\lambda_2)^{x}}{(z+x)!}\dfrac{(\lambda_1)^x}{x!}=e^{-(\lambda_1+\lambda_2)}(\lambda_2)^z\sum_{x=0}^{\infty}\dfrac{1}{(z+x)!}\dfrac{(\lambda_1\lambda_2)^x}{x!}$  I am kinda stuck here, I can't think of any such discrete distribution which takes a form similar to this, the solution to this question gives a hint about the $Bessel's$ function, but I don't know how to tackle this. Can anyone help ?

I am looking at how to calculate the Skellam distribution () from the bivariate poisson distribution.  I understand that the Skellam comes from looking at BivPoisson(X - Y = z) but I dont see how this can be seen starting from the bivariate poisson PMF.


I have a dictionary which consists of {str: list}.  What I want to do is find out the keys with specific sequnce that may exist in value.  for example, the content of dictionary is like this:  DOC3187 [1, 2, 3, 6, 7] DOC4552 [5, 2, 3, 6] DOC4974 [1, 2, 3, 6] DOC8365 [1, 2, 3, 5, 6, 7] DOC3738 [1, 4, 2, 3, 6] DOC5311 [1, 5, 2, 3, 6, 7]   and I need to find out the keys with sequence of [5,2,3], so desired return should be:  DOC4552, DOC5311   I'm using Python 3.3.2, and the dictionary has about 400 items.

This is a generalization of the "string contains substring" problem to (more) arbitrary types.  Given an sequence (such as a list or tuple), what's the best way of determining whether another sequence is inside it?   As a bonus, it should return the index of the element where the subsequence starts:  Example usage (Sequence in Sequence):  >>> seq_in_seq([5,6],  [4,'a',3,5,6]) 3 >>> seq_in_seq([5,7],  [4,'a',3,5,6]) -1 # or None, or whatever   So far, I just rely on brute force and it seems slow, ugly, and clumsy.


In my adventures in trying to revert a kernel upgrade (it broke my wifi for some reason), I was able to generate a boot image for the previous kernel (#update-initramfs -c -k 3.11.0-17-generic)  I deleted the newer kernel boot image for good measure (#update-initramfs -d -k 3.11.0-19-generic)  Now every other boot my machine goes into panic mode because it can't find the 3.11.0-19 kernel version, and I have to hard reset, which puts me into boot menu where I can select the proper version.  My question is, how can I make 3.11.0-17-generic my default boot kernel (at least until I figure out what caused the issue with 19 and can upgrade again)  Edit:  For future visitors, images created by update-initramfs -c should be visible in grub (for me its under Advanced Options for Xubuntu). Just follow one of the answers in

I have both Windows 7 and Ubuntu installed on a shared machine. Because a lot of the non-developers use Windows, I'd like to change the boot order to make it easier for them.  Currently the boot order looks like the following:   Ubuntu 11.10 kernelgeneric *86 Ubuntu 11.10 kernelgeneric *86 (safe boot)  Memory test Memory test Windows 7 on /dev/sda6   How do I change the default order so that Windows 7 is at the top of the list?   Windows 7 on /dev/sda6 Ubuntu 11.10 kernelgeneric *86 Ubuntu 11.10 kernelgeneric *86 (safe boot)  Memory test Memory test


Why does the following statement return false in JavaScript?  new String('hello') === new String('hello')

I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==?


I'm still quite new to Ubuntu.  I've been installing tensorflow (with CUDA) for some university project; we are to work in conda. After activating my tensorflow conda environment, my instructions tell me to set the path (which is, as far as I understand an environment variable?) for pip installation:     Next, set the path to the binary file for the pip installation, by typing the following command:  ( t e n s o rfl o w ) $ export TF BINARY URL = \ h t t p s : / / s t o r a g e . g o o g l e a p i s . com/ t e n s o rf l o w / li n u x /\ cpu/ t e n s o rfl o w −0.11.0 rc1−cp35−cp35m−li n u x x 8 6 6 4 . whl       To finalize the installation type:  ( t e n s o rfl o w ) $ pip3 i n s t a l l −−ig no r e−i n s t a l l e d \ −−upgrade $TF BINARY URL       You can now proceed with Test run TensorFlow.   (All the spaces just come from the latex-pdf, of course I left them out.)  So I typed:   export TF_BINARY_URL = https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc1-cp35-cp35m-linux_x86_64.whl   Problem is, command line tells me that:   bash: export: `=': not a valid identifier bash: export: `https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc1-cp35-cp35m-linux_x86_64.whl': not a valid identifier   I just can't find what I've been doing wrong, and now I wonder whether there is some error in the instructions or whether I might have made some really stupid mistake? From what I have read it might be that the usage of export here is wrong, but I'm totally new to Ubuntu and bash shell and what I read there was ambiguous.

I'm trying to setup cocos2dx in Ubuntu 14.04 LTS but after setting the environmental variables (in .bashrc) I start getting this error:  bash: export: dev/cocos2d-x-3.2/tools/cocos2d-console/bin': not a valid identifier  bash: export:/home/john/android': not a valid identifier  bash: export: dev/android-ndk-r10b': not a valid identifier  bash: export:dev/adt-bundle-linux-x86_64-20140702/sdk': not a valid identifier   And I don't know what to do to fix it.


We're creating Contacts in Marketing Cloud using the REST API  method. This works really well — in a single request we are able to create:   an Email Subscriber (that appears in the All Subscribers list) a mobile Subscriber (in MobileConnect) Subscriber Attributes (in Attribute Sets/Populations within the Contact model)   We can then use the  to search for these  Contacts. For example, the following request:  POST https://www.exacttargetapis.com/contacts/v1/attributes/search {     "request": {         "attributes": [{                 "key": "Email Addresses.Email Address"             },             {                 "key": "MobileConnect Demographics.Mobile Number"             }]      },     "conditionSet": {         "operator": "And",         "conditionSets": [],         "conditions": [{             "attribute": {                 "key": "Contacts.Contact Key"             },             "operator": "Equals",             "value": {                 "items": ["25eb9b5f-a979-37eb-6595-ffc415d6e654"]             }         }]     } }     Returns:  {   "page": 1,   "pageSize": 50,   "count": 1,   "items": [     {       "values": [         {           "id": "75d77da9-1764-e611-97ba-8cdcd4a8b025",           "key": "MobileConnect Demographics.Mobile Number",           "name": "Mobile Number",           "value": "61402123456"         },         {           "id": "42d77da9-1764-e611-97ba-8cdcd4a8b025",           "key": "Email Addresses.Email Address",           "name": "Email Address",           "value": "someone@sample.com"         }       ]     }   ],   "links": {},   "requestServiceMessageID": "ba2e0692-b2e0-47d5-8320-3d594f7a4398",   "resultMessages": [],   "serviceMessageID": "9568bf7e-55f2-45d9-a518-e7dcf88941aa" }     This is fine, but we want to retrieve a mobile number and email address for a known Subscriber/Contact using an SQL query.   Is a MobileConnect list and the All Subscribers list accessible from an SQL query?  We could always write an SSJS Script Activity to use the Marketing Cloud REST API to retrieve the response payload and insert the values into a Data Extension, but I'd rather use an SQL query if possible.

Is it possible to automate a bulk export of MobileConnect subscriptions? I don't see much documentation on the matter.   Thank you.


My Canon 350D is no longer raising the AF mirror when it takes a photo.  Instead, it looks like this when the mirror flips up.   This results in a photo that is half black due to the sensor being obscured.  This camera is 9 years old and has never been dropped, mishandled or subjected to harsh temperature or humidity.  Is there any common maintenance I can do to get this thing swinging properly again?

I have an Olympus OM-1 which I've been using as a backup camera for my film Canon Rebel. However, when the mirror trap became stuck "up" in the Olympus, I tried gingerly to pull the trap back down. It eventually gave way and reset properly — but not before cracking and having pieces break away.  The camera still works great. The broken mirror doesn't mess with the viewfinder nearly as much as I thought it would, but it bothers me. Is it possible to repair this on my own? If so, how?


I have tried to write a regular expression for passwords:  public class ApplicationUser : IdentityUser, ITimeStamps {     public const string PasswordRegularExpression = @"admin|password";     // public const string PasswordRegularExpression = @"/admin|password/i"; // Tried this too     // public const string PasswordRegularExpression = @"/(admin|password)/i"; // Tried this too   This is over and above the normal Microsoft identity stuff:  manager.PasswordValidator = new PasswordValidator {      RequiredLength = 6,      RequireNonLetterOrDigit = false,      RequireDigit = true,      RequireLowercase = false,      RequireUppercase = false, };   Here's my Register view model:  public class RegisterViewModel {     [Required]     [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]     [DataType(DataType.Password)]     [Display(Name = "Password")]     [RegularExpression( ApplicationUser.PasswordRegularExpression, ErrorMessage = "The {0} must contain atleast 1 number and must not contain the word 'admin' or 'password'" )]      public string Password { get; set; }      [DataType(DataType.Password)]     [Display(Name = "Confirm password")]     [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]     public string ConfirmPassword { get; set; } }   I am wanting to throw an error in jquery validation when someone uses password or admin inside their password. However, the jquery validation does not seem to be working as expected. What might I be missing?  The generated html from asp.net looks like this:  <input class="form-control input-validation-error" data-val="true" data-val-length="The Password must be at least 6 characters long." data-val-length-max="100" data-val-length-min="6" data-val-regex="The Password must contain atleast 1 number and must not contain the word 'admin' or 'password'" data-val-regex-pattern="admin|password" data-val-required="The Password field is required." id="Password" name="Password" placeholder="Enter a password" type="password">   Test cases:   I've added brackets, it still does not work as expected. I type in password and it actually does not fail! I then put 1 more character (doesn't matter what it is) and then it fails... and now I remove part of the word "password" so for example 'pasrd21234' and the error is still there!    Side notes:   I have tried using this to test it:  and the regex seems to work fine there? I have also tried using this to test it:  and it works fine?

I know it's possible to match a word and then reverse the matches using other tools (e.g. grep -v). However, is it possible to match lines that do not contain a specific word, e.g. hede, using a regular expression?   Input:  hoho hihi haha hede   Code:  grep "<Regex for 'doesn't contain hede'>" input   Desired output:  hoho hihi haha


Beginner here. I am writing a basic algorithm that involves taking a list of x-values and a list of  y-values and then storing all possible combinations of coordinates.   Here are the x and y value lists:  x_line = [6,5,9,3,7,5,9] y_line = [10,3,5,7,1,7,3,1]   I would ideally want to store all possible coordinates in variable xy because I will be comparing the coordinates in this variable to other sets of coordinates.  I tried to use zip() to do this but I am unsure if I can zip() iterators. Here is that code:  for i in x_line:    for j in y_line:        xy = zip(i,j)    This yields an "int object not iterable" error.   I tried even this:  xy = zip(x_line,y_line)   but obviously this does not get every possible combination.   Again, I want to store all possible coordinates given a list of x and y value lists in one variable. I would appreciate any help or guidance. Thanks

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


I have tried to look around to see, if I could change my bibliography title, but its name is still in Danish. In Danish, the word for 'References' is 'Litteratur', but I want to change the name to 'References'. I have tried to renew the command \refname but nothing happens. Do you know how to fix it? I'm just using \cite{something} and then writing my references myself.  \documentclass[a4paper, 12pt]{extarticle}  \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} \usepackage[english, danish]{babel} \usepackage{fancyhdr} \usepackage[dvipsnames]{xcolor} \usepackage{mathtools} \usepackage{graphicx} \usepackage{amssymb} \usepackage{titlesec} \usepackage[left=0.5in, right=0.5in, top=0.8in, bottom=0.8in]{geometry} \usepackage{lipsum} \usepackage[breaklinks, colorlinks,linkcolor=NavyBlue, citecolor=NavyBlue, urlcolor=Blue]{hyperref} \usepackage[utf8x]{inputenc} \usepackage{titlesec} \usepackage{fix-cm} \usepackage{titletoc} \usepackage{tocloft} \usepackage{setspace} \usepackage[all]{hypcap} \usepackage{tikz, pgfplots} \usetikzlibrary{calc} \usepackage{tkz-euclide} \usetkzobj{all} \usetikzlibrary{positioning} \usetikzlibrary{arrows.meta} \usetikzlibrary{arrows} \usepackage{etoolbox}  \renewcommand\refname{References}  \begin{document} \begin{thebibliography}{depth,9} \bibitem{Oversigtsnote 1} \textit{Oversigts note 1} skrevet af \textit{HH} \bibitem{Oversigtsnote 2} \textit{Oversigts note 2} skrevet af \textit{HH} \bibitem{Oversigtsnote 3} \textit{Oversigts note 3} skrevet af \textit{HH} \end{thebibliography} \end{document}   This is my result:

Is there a way to rename (or do away with the name of) the bibliography page that is output using BibTeX?  If so, is the name dependent on the bibliographystyle, or is it something inherent within the BibTeX functionality?


On a newly installed 16.04, the screen resolution cannot be changed from 1024 x 768, even though my Intel chipset and monitor are confirmed to support a resolution of 1920 x 1200 or more.   I do seem to have the Intel driver installed and enabled. I have also tried , which didn't change anything.  I have seen quite a few questions about it here and elsewhere, none of which suggest a clear solution nor any way of diagnosing the root cause. My current bet is that somehow 8th generation intel processors, require  but the process seems a little sensitive to try.

All  I just install a fresh new Ubuntu 16.04 on my new desktop which has a 8th generation Intel CPU i5 8600K. When OS installed, I found there is only one option in display setting: 1024 x 768 (4:3),  My monitor is a HDMI monitor with 1920x1080 resolution  Do anyone have any idea how to make the resolution setting right? Thanks.  BTW. I do not install any graphic card, I use the internal GPU of Intel


I have the following function that checks whether a given value is None and additionally in the case of a string,  whitespace. These invalid cases return TRUE. But for some of my values I see in the debugger that value is str returns FALSE even when I verify that type(value) is str. How's this possible? def noneOrBlank(value):     if value == None:          return True     elif value is str and len(value.strip()) == 0:         return True             else:         return False   The function is called as agreement.start_date = dateutil.parser.isoparse(form['startDate']).date()                         if not noneOrBlank(form.get('startDate')) else None   The string that comes in has some kind of datetime value.

How do I see the type of a variable whether it is unsigned 32 bit, signed 16 bit, etc.?  How do I view it?


I want to have 6 figures on one page distributed on 3 rows and 2 columns. I've tried using \begin{subfigure} in the subcaption package without any luck. The figures are displayed correctly, but any text I add to the document is placed before the page with the figures and not after.  Any suggestions?  \begin{figure} \centering \begin{subfigure}[b]{{.5\linewidth}   \centering   \includegraphics[scale=0.37]{fig/benchmarkcase/2VF1CAD5.PNG}   \caption{5 CAD}   \label{fig:VF1CAD5} \end{subfigure}% \begin{subfigure}[b]{.5\linewidth}   \centering   \includegraphics[scale=0.37]{fig/benchmarkcase/2VF1CAD25.PNG}   \caption{25 CAD}   \label{fig:VF1CAD25} \end{subfigure} \begin{subfigure}[b]{.5\linewidth}   \centering   \includegraphics[scale=0.37]{fig/benchmarkcase/2VF1CAD50.PNG}   \caption{50 CAD}   \label{fig:VF1CAD50} \end{subfigure}% \begin{subfigure}[b]{.5\linewidth}   \centering   \includegraphics[scale=0.37]{fig/benchmarkcase/2VF1CAD75.PNG}   \caption{75 CAD}   \label{fig:VF1CAD75} \end{subfigure} \begin{subfigure}[b]{.5\linewidth}   \centering   \includegraphics[scale=0.37]{fig/benchmarkcase/2VF1CAD100.PNG}   \caption{100 CAD}   \label{fig:VF1CAD100} \end{subfigure}% \begin{subfigure}[b]{.5\linewidth}   \centering   \includegraphics[scale=0.37]{fig/benchmarkcase/2VF1CAD120.PNG}   \caption{120 CAD}   \label{fig:VF1CAD120} \end{subfigure} \caption{Volume fraction fuel phase} \label{fig:VF1BMC} \end{figure}

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


I have this script that is to rescale images to a percentage value  #!/bin/bash  percent=$1 echo $percent   for img in `find *.png`; do   echo Processing file $img   width=$( mdls $img  | grep kMDItemPixelWidth | tail -n1 | cut -d= -f2 )   height=$( mdls $img | grep kMDItemPixelHeight | tail -n1 | cut -d= -f2 )    newWidth=$((width*percent))   newHeight=$((height*percent))   echo $newWidth $newHeight   sips -z $newWidth $newHeight $img done   My bash is configured to accept commas as decimal separators.  So, whey I type  rescale 0,3019   I am trying to rescale the images to 30.19% of their values  the problem is that the line    echo $newWidth $newHeight   shows me the values as they were multiplied by 3019. Strangely the first echo  echo $percent   shows me 0,3019 (the correct value)  what am I missing?

Using echo "20+5" literally produces the text "20+5".  What command can I use to get the numeric sum, 25 in this case?  Also, what's the easiest way to do it just using bash for floating point? For example, echo $((3224/3807.0)) prints 0 :(.  I am looking for answers using either the basic command shell ('command line') itself or through using languages that are available from the command line.


I want to group adjacent list items with fixed numbers. Such as  a = [1, 2, 3, 4, 5, 6]  The result of groupby(a, 2) is [(1, 2), (3, 4), (5, 6)],  The result of groupby(a, 3) is [(1, 2, 3), (4, 5, 6)]  Here are my solution   def groupby(a, l):     ret = []     for idx in range(len(a)/l):         ret.append(tuple(a[idx*l:(idx+1)*l:]))     return ret   Is there more efficiently way to implement it?

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I'm new to latex and I was wondering is there a way to achieve something like this in latex? I have searched the internet but I achieve a good solution.  post is good but it didn't have written anything on the brackets. Thanks.

I am using the algorithmic package (or even algorithm2e is fine). Is it possible to use curly braces to group some lines in the algorithm so as to be able to put an explanation to the right?


Consider the following example document:  \documentclass{article}  \usepackage{amsmath} \usepackage{hyperref}  \begin{document}  \begin{equation}     \label{eq:eq1}     a = b\quad \wedge \quad b = c \end{equation}  \begin{equation}     \text{\eqref{eq:eq1}} \Rightarrow a = c \end{equation}  \begin{equation}     a \stackrel{\text{\eqref{eq:eq1}}}{=} c \end{equation}  From \eqref{eq:eq1} we know that $a = c$.  \end{document}   There are 3 occurences of \eqref. With pdflatex all of them create links to the first equation, but with xelatex for the second occurence (inside \stackrel) only the label text is printed while no hyperlink is created in the resulting pdf file.  How does this come about and what are possible solutions?

I would like my document to have clickable hyperlinks inside \overset environments. I'm using XeLaTeX because of the fonts…  This is a (rather) minimal example:  \documentclass[a4paper, 12pt]{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage[xetex, colorlinks=true, citecolor=blue, linkcolor=blue]{hyperref}  \begin{document}  \begin{equation}     a = b \label{eq} \tag{$\ast$} \end{equation}  \[ \eqref{eq} \] % working hyperlink here.  \[ c = a \overset{\eqref{eq}}{=} b \] % existing but non-clickable hyperlink here.  \end{document}   Any help is greatly appreciated!


I had some trouble with the windows 10 sound driver, so I decided to fully restore the system to the factory-settings as it was the easier way to solve it.  It had two main consequences:   - My updated Windows 10 disappeared and was restored to Windows 8.   - Dual-boot disappeared and I lost access to Ubuntu, but partitions are still there. I want to restore the dual-boot menu so I can use both Ubuntu and Windows. I've been checking a great deal of forums, but most of the suggested solutions involve risking too much for typing wrongly the partition name or do not even menction dual-boot, so I could gain access to Ubuntu again, but I could lose access to Windows, and both of them are important for me. Is there any way to do it in a safe and easy way? UPDATE: I got to Ubuntu using Windows Boot Repair and I managed to install Boot-Info using the Terminal. It wrote the following report:

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


Are there any statistics about how many people ask  questions and how many people answer to those questions?  My gut feeling is that there are much less people answering the questions, but I'd like to have some evidence backing this up.

It seems some people have a ton of questions on Stack Overflow, but relatively few answers, whereas some people have a ton of answers but relatively few questions; it seems like a smaller percentage of people fall in the "even" category.  I can't find a graph/grid of these ratios. Is this particular metric available somewhere?   I'm looking for a histogram of number of answers/number of questions.         |#     U|##     S|###     E|#####     R|#########     S|#############      |------------------             #A/#Q


I have a Python dictionary like this:  {    'apple': datetime.datetime(2012, 12, 20, 0, 0, tzinfo=<UTC>),    'orange': datetime.datetime(2012, 2, 4, 0, 0, tzinfo=<UTC>),    'raspberry': datetime.datetime(2013, 1, 9, 0, 0, tzinfo=<UTC>) }   What is the best way to sort the dictionary by the datetime values? I am looking for a list output with the keys in order from most recent to oldest.

I have a dictionary of values read from two fields in a database: a string field and a numeric field. The string field is unique, so that is the key of the dictionary.  I can sort on the keys, but how can I sort based on the values?  Note: I have read Stack Overflow question here  and probably could change my code to have a list of dictionaries, but since I do not really need a list of dictionaries I wanted to know if there is a simpler solution to sort either in ascending or descending order.


How do I compare dates in between in Java?   Example:  date1 is 22-02-2010  date2 is 07-04-2010 today   date3 is 25-12-2010  date3 is always greater than date1 and date2 is always today. How do I verify if today's date is in between date1 and date 3?

I have a series of ranges with start dates and end dates. I want to check to see if a date is within that range.  Date.before() and Date.after() seem to be a little awkward to use. What I really need is something like this pseudocode:  boolean isWithinRange(Date testDate) {     return testDate >= startDate && testDate <= endDate; }   Not sure if it's relevant, but the dates I'm pulling from the database have timestamps.


I recently received a wifi enabled thermostat which I thought I could install easily since I saw an unused wire (Blue) which I assumed would be the C wire behind the current thermostat.    When I went to install it, I found out the blue wire isn't actually connected to anything but there is a red wire connected the C terminal which I believe runs out to the ac unit.    Can I just connect the blue wire to the C terminal in addition to leaving the red wire or will this short something? Or does this just need to be completely rewired?  Thanks!

I'd like install a new Wi-Fi thermostat. The old one didn't have a C-wire but luckily there is an unused wire on both sides (one coming out of the wall and one at the furnace not connected yet), so I am going to use this unused wire as the C-wire. My only concern is that the C terminal at the furnace is already occupied with other two wires (that have nothing to do with the thermostat, but are connected one to the humidifier and the other one not sure to what, probably the air purifier). The question is: can I add a third wire to the C board of the furnace and use it as C-wire for the wi-fi thermostat? See picture: yellow is the unused wire.


I have a table :

    col 1	col2

    field	Field 2

    another field	one more field

   when I click on a row this code add a new row :  $("#myTable tr").click(function(){    $(this).addClass('selected').siblings().removeClass('selected');    var value=$(this).find('td:eq(1)').html();    if (value) {    alert('adding New Row !')    $('#myTable').find('tbody:last').append('
new Field	New Field
');     } });     But now when I click on the new created row nothing append. Why another rowis not created ?  Is there a way to do that ?

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


I wonder why the constructor doesn't work/get called in the first case.  #include <iostream> #include <typeinfo>  class Test{ public:     Test(){ std::cout << "1\n"; };     Test(int){ std::cout << "2\n"; }; };   int main() {     Test a(); // actually doesn't call the constructor     Test b(1); // "2"     std::cout << (typeid(b).name()) << std::endl; // "4Test"     std::cout << (typeid(a).name()); // "F4TestvE"     return 0; }   I've also found that typenames of created variables are strange. Can anybody explain such a behavior?     I use mingw gcc 4.7.2 for Windows to compile my projects  Thanks a lot.

Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?


pointer operator->()   {     return ptr_+buffer_position_;   }    const_pointer operator->() const   {     return ptr_+buffer_position_;   }   So the const overload returns a const pointer (yay) but the two functions do the same thing (boo) how does one avoid code duplication and the ensuing copypasta, while still maintaining const correctness?  (I'm looking at specifically C++98...though a C++11 answer would be pedagogic, as I suspect they did something to solve this problem).

Let's say I have the following class X where I want to return access to an internal member:  class Z {     // details };  class X {     std::vector<Z> vecZ;  public:     Z& Z(size_t index)     {         // massive amounts of code for validating index          Z& ret = vecZ[index];          // even more code for determining that the Z instance         // at index is *exactly* the right sort of Z (a process         // which involves calculating leap years in which         // religious holidays fall on Tuesdays for         // the next thousand years or so)          return ret;     }     const Z& Z(size_t index) const     {         // identical to non-const X::Z(), except printed in         // a lighter shade of gray since         // we're running low on toner by this point     } };   The two member functions X::Z() and X::Z() const have identical code inside the braces.  This is duplicate code and can cause maintenance problems for long functions with complex logic.    Is there a way to avoid this code duplication?


What is the difference between the following sentences? for me both are same.   you can search it in google & you could search it in google

I'm a native English speaker and I've been doing some research into English grammar for a programme I'm working on. However, on looking into modal verbs, I've only just come to appreciate how subtle and complicated they are.  What is the difference between these sentences? What possible different response might one have to each?        I can go to the cinema tonight.   I could go to the cinema tonight.   I may go to the cinema tonight.   I might go to the cinema tonight.      Granted, the first of these looks more like a statement of ability or possibility than the three that follow. But in what ways does it differ from the others, since all suggest ability and possibility? And crucially, what distinguishes the other three.  Perhaps it's a matter of tone, of context, of the speaker... The question may appear quite simple but I haven't found a satisfactory answer elsewhere.    looked quite useful in that it covered levels of confidence and certainty but it was talking about the potential state of something rather than the possibility for the person who is speaking. Are there any differences in that sense?   looked at these verbs used in question form (e.g., differences between 'Can I...?' and 'May I...?') but I'm not so interested in that for now.  Any thoughts appreciated.


I am trying to create a report that calculates how many contracts have been funded each month for the year 2014. The problem is I am trying to limit the dates, meaning I want the user to be able to see of how many funded contracts there are of each month but not passed the present month. So we are in June right now, I do not want the user to be able to access the month of June or July because the month hasn't been over yet, where as the passed months can be seen but only up until the first day of 2014. So, I do NOT want the current month. But only up to the last day of the previous month of every month. I believe my Where Clause is where the flaw is because I'm still new at the function of GetDate and Datediff.    ALTER PROC spGetAdminTotalYTD     (       @Begin_Date DATETIME ,       @End_Date DATETIME ,       @program INT = NULL     )  AS     BEGIN         DECLARE @year INT         SET @year = 2014          SELECT  d.name ,                 a.dealer_code ,                 b.last_name ,                 b.city ,                 b.state ,                 b.phone ,                 COUNT(CASE WHEN MONTH(c.Funded_date) = 1 THEN 1 ELSE NULL END) January ,                 COUNT(CASE WHEN MONTH(c.Funded_date) = 2 THEN 1 ELSE NULL END) Feburary ,                 COUNT(CASE WHEN MONTH(c.Funded_date) = 3 THEN 1 ELSE NULL END) March ,                 COUNT(CASE WHEN MONTH(c.Funded_date) = 4 THEN 1 ELSE NULL END) April ,                 COUNT(CASE WHEN MONTH(c.Funded_date) = 5 THEN 1 ELSE NULL END) May ,                 COUNT(CASE WHEN MONTH(c.Funded_date) = 6 THEN 1 ELSE NULL END) June ,                 COUNT(CASE WHEN MONTH(c.Funded_date) = 7 THEN 1 ELSE NULL END) July ,                 COUNT(CASE WHEN MONTH(c.Funded_date) = 8 THEN 1 ELSE NULL END) August ,                 COUNT(CASE WHEN MONTH(c.Funded_date) = 9 THEN 1 ELSE NULL END) September ,                 COUNT(CASE WHEN MONTH(c.Funded_date) = 10 THEN 1 ELSE NULL END) October ,                 COUNT(CASE WHEN MONTH(c.Funded_date) = 11 THEN 1 ELSE NULL END) November ,                 COUNT(CASE WHEN MONTH(c.Funded_date) = 12 THEN 1 ELSE NULL END) December ,                 COUNT(1) AS YTD         FROM    tdealer a                 JOIN tContact b ON a.contact_id = b.contact_id                 JOIN tContract c ON a.dealer_id = c.dealer_id                 JOIN tCompany d ON c.company_id = d.company_id         WHERE   YEAR(c.Funded_date) = @Year                 AND c.Funded_date >= DATEADD(MONTH,                                              DATEDIFF(MONTH, 0, GETDATE()) - 4,                                              0)                 AND c.Funded_date < DATEADD(MONTH,                                             DATEDIFF(MONTH, -1, GETDATE()) - 1,                                             0)                 AND c.program_id = @program                 AND c.funded_date BETWEEN @Begin_Date AND @End_Date         GROUP BY d.name ,                 a.dealer_code ,                 b.last_name ,                 b.city ,                 b.state ,                 b.phone     END

So what I need is a limitation for the user of the funded contracts. So this is what I am trying to implement. I am trying to let the user enter dates within the year 2014, which will bring up how many funded contracts are there for each month. I ONLY want up to the last day of the previous month and the passed months within the year 2014. So for example we are in June, if the user inputs any dates that are before June he can see those months of how many funded contracts are in there - but not any contract from June.   So the user should not be able to see July until we hit August which we can see July from there. Here is my query.  I feel that my where clause for the GetDate is incorrect. Any help will be appreciated             Alter Proc spGetAdminTotalYTD             (@Begin_Date  DATETIME,              @End_Date DATETIME,             @program int=null) As      Begin Declare @year int Set @year = 2014          SELECT  d.name, a.dealer_code, b.last_name, b.city, b.state, b.phone             , COUNT(CASE WHEN  MONTH(c.Funded_date) = 1 THEN 1 ELSE NULL END) January             , COUNT(CASE WHEN  MONTH(c.Funded_date) = 2 THEN 1 ELSE NULL END) Feburary             , COUNT(CASE WHEN  MONTH(c.Funded_date) = 3 THEN 1 ELSE NULL END) March             , COUNT(CASE WHEN  MONTH(c.Funded_date) = 4 THEN 1 ELSE NULL END) April             , COUNT(CASE WHEN  MONTH(c.Funded_date) = 5 THEN 1 ELSE NULL END) May             , COUNT(CASE WHEN  MONTH(c.Funded_date) = 6 THEN 1 ELSE NULL END) June             , COUNT(CASE WHEN  MONTH(c.Funded_date) = 7 THEN 1 ELSE NULL END) July             , COUNT(CASE WHEN  MONTH(c.Funded_date) = 8 THEN 1 ELSE NULL END) August             , COUNT(CASE WHEN  MONTH(c.Funded_date) = 9 THEN 1 ELSE NULL END) September             , COUNT(CASE WHEN  MONTH(c.Funded_date) = 10 THEN 1 ELSE NULL END) October             , COUNT(CASE WHEN  MONTH(c.Funded_date) = 11 THEN 1 ELSE NULL END) November             , COUNT(CASE WHEN  MONTH(c.Funded_date) = 12 THEN 1 ELSE NULL END) December,             COUNT(1) AS YTD         FROM tdealer a JOIN tContact b ON a.contact_id = b.contact_id               JOIN tContract  c ON a.dealer_id = c.dealer_id JOIN tCompany d               ON  c.company_id = d.company_id         WHERE YEAR(c.Funded_date) = @Year              AND c.Funded_date >= DATEADD(MONTH, DATEDIFF(MONTH, 0,GETDATE())-4,0)              AND c.Funded_date <  DATEADD(MONTH, DATEDIFF(MONTH,-1,GETDATE())-4,0)              AND c.program_id = @program              AND c.funded_date Between @Begin_Date And @End_Date              GROUP BY     d.name,     a.dealer_code,     b.last_name,     b.city,     b.state,     b.phone     END


I have a freeware app: . It generates an image on the screen. I press Alt+Print screen. I open something like Microsoft Paint, press Ctrl+V and the screen cap of the window of the app appears in Microsoft Paint, but the specific area of the image on which I'm working always comes up black.  I get pretty much the same behavior with GreenShot.  I have never seen an app do this before. The pixels are on the screen. There should be some way of duplicating them. What am I missing?

Winxp running wmp in IE  Neither Printscreen nor Gadwin are capable of capturing the image  I can only assume that is is something to do with how the memory is captured/stored for video vs normal apps


Hope you are all doing well, i trying to figure out how i can test if an entity can see a player in it's view atm i am using code below;  execute as @e[type=minecraft:villager,tag=Path,tag=Villager10] at @s anchored eyes facing entity @e[sort=nearest,limit=1,type=player] eyes anchored feet positioned ^ ^ ^1 rotated as @s positioned ^ ^ ^-1 if entity @s[distance=..0.1] run say Success  This code runs along side a villager with the tags path and Villager10. (side not i have removed AI for the villager so it wont move around)  This code works however it doesn't take into consideration if there are blocks in the way.  Dose anyone know if i am using the right method to do such a thing and if so how. Fairly new to commands like so.  Many Thanks. Dave

I want to execute a command if I am looking at a specific block. A command should only be executed if it is targeted.


I came from C world where the size of buffers can be controlled in advance. For instance, declaring a buffer of doubles that holds 10 elements, we do:  double *buffer = calloc(10, sizeof(double));   In Python, it is quite the contrary in the sense that we don't need to worry about the details and the size of the buffer by saying buffer=[].  My question is: If I want to restrict a python list to hold an arbitrary number of values, say 10 doubles, how can we do that with default python lists or maybe numpy?

Code like this often happens: l = [] while foo:     # baz     l.append(bar)     # qux  This is really slow if you're about to append thousands of elements to your list, as the list will have to be constantly resized to fit the new elements. In Java, you can create an ArrayList with an initial capacity. If you have some idea how big your list will be, this will be a lot more efficient. I understand that code like this can often be refactored into a list comprehension. If the for/while loop is very complicated, though, this is unfeasible. Is there an equivalent for us Python programmers?


I was using Virtualbox 5.1.4, and I was running Ubuntu 16.04 as my guest os on windows 10 host os. Everything was running perfect. Then yesterday the system freezed because I was running a lot of tasks. Then I rebooted the virtual machine. Next thing I knew I was stuck in the login loop. I tried a bunch of different things, like using mv .ICEauthority .ICEauthority.bak and some others, but none of them worked... One thing noticeable is that for some reason my environment variable was  messed up, because almost all my commands cannot be used directly (e.g I have to do /bin/mv .ICEauthority .ICEauthority.bak)  [Edit]I have also tried to disable my nvidia video card by using prime-select command, but it it prompted "command not found"  Any method that would log me into unity is much appreciated, as long as it keeps my data intact.  My environment file looks like this: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"  My .profile looks like this:

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


I am a beginner when it comes to regex. I have string cn=foo,ou=bar,ou=zoo,ou=aa,ou=bb,ou=cc,ou=dd,o=someOrg,c=UK. I need to get foo,bar and zoo so I used following regex to extract string in javascript.  const dn = 'cn=foo,ou=bar,ou=zoo,ou=aa,ou=bb,ou=cc,ou=dd,o=someOrg,c=UK'; const regex = /^cn=(\w+),ou=(\w+),ou=(\w+)/; const found = dn.match(regex); console.log(found) --> Array ["cn=foo,ou=bar,ou=zoo", "foo", "bar", "zoo"]   Then ou=bar value is changed upon new requirement to ou=bar - 1. It could have - or numeric value in any order within that string value. I tried following regex.  const regex = /^cn=(\w+),ou=(.+),ou=(\w+)/;   however it returns unwanted data Array ["cn=foo,ou=bar,ou=zoo,ou=aa,ou=bb,ou=cc,ou=dd", "foo", "bar,ou=zoo,ou=aa,ou=bb,ou=cc", "dd"]  What I expect is Array ["cn=foo,ou=bar - 1,ou=zoo", "foo", "bar - 1", "zoo"]. I tried to exclude unwanted data via ^(ou=aa|ou=bb|ou=cc|ou=dd|o=someOrg|c=UK) within the regex but I got null value. I'd appreciate someone can help me to correct regex syntax.  Update:  I tried /^cn=(\w+),ou=(\w+\s+-\s+\d+),ou=(\w+)/ but this covers it above example but it won't cover something like ou=bar-1 or ou=1bar-..

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


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

QGIS allows for opening very many different file formats.  Some of these are directly editable. It is possible to open the data/file, immediately edit the data in QGIS, then save back to the original file.  Many formats can be opened/read, and at the same time it is possible to save/write to that format BUT these require that the data is saved into a second format before editing is possible. This is fundamentally different from the first situation.   The question is what data formats are directly editable by QGIS (the first situation as opposed to the second)?   Reasons a list is helpful...  I think that sometimes QGIS doesn't handle this whole issue terribly well - for example in the past I have had some Excel files look like they are editable but the process ultimately fails - which adds confusion.   Notes at gdal.org provide some information, but it can be very difficult to distinguish between the two situations above - formats which are directly editable, and on the other hand formats which can both be read and written (but aren't directly editable).  It is helpful to have information about QGIS (or ogr) version in answers.


I had assumed that macOS and iOS photos would be synchronized through iCloud (assuming all iCloud features are enabled) but the people I see in "People" on iOS are not the same as the ones I see on macOS.  As of today, iOS has spent days finding people and has nearly completed the process, but when I look in Photos on macOS, I see two contradictory things, neither of which is very comforting:   Photos on macOS says it is just starting to scan for people, even though the process on iOS is nearly complete, and Photos on macOS shows a different but larger set of people (with different photos, completely different numbers, and names, connected to contacts, which iOS lacks).   This is unexpected, since Photos is synced through iCloud.  What's going on here:   Why do Photos need to be scanned again for faces on macOS, even though they've already been scanned on iOS? Why are there already Faces in macOS; and why are they different? Why isn't iOS aware of the name sand contact entries associated with the people they do share (at least by actual person)?   Why are "People" different between macOS and iOS Photos (and )?

The new Photos updates for iOS 10 and MacOS Sierra includes a much more powerful and integrated approach to organizing photos by who's in them.  It's built around powerful, on-device facial recognition.  But once it does its automated thing (finding the faces it thinks are the same person), there's still a lot of manual merging and labeling to be done if you have a lot of photos and are as obsessive about organization as I am.  For example, if you have, say... three thousand photos of your daughter, Photos will find almost all of them, but may guess they're 5 or 6 different people.  So you have to merge the buckets that all are one person, assign them a name (so you can search by it), etc.  But unlike other changes (edits, deletions, organization into albums, etc.), manual changes to "people" data don't seem to sync at all by default.      Is there really no way to do this?  It seems bizarre that one of the flagship features Apple's touting in this Photos update doesn't play at all with what was Photos primary selling point over iPhoto - everything synced on all your devices.


Recently, I created a blog in Blogger.com(or blogspot.com). My problem is that I can't see my content when I search on google for it. Similarly, I created the same page using Wordpress.com which shows the content on search on google.  What should I do to show my content on google search using blogger?  EDIT: (Edited after this )  More specific question - what part of a blogger blog does google search. I get the impression that it searches the header and the posts, but not the widgets, so if you are using the blog more as a website, your widget content won't get searched. I may be wrong though. Does anyone know exactly what is searched, heading, subheading, widgets and posts?  Please help I am new to blogspot.com or blogger.com

What are the best ways to improve a site's position in the Google search results?


So i'm getting quite desperate here.  I bought a brand new T460P. I then tried to install Ubuntu on it(15.10, 16.04, 16.10) and also debian. My problem is that it freezes seemingly random. It's a hard freeze meaning only a hard reset can fix it. Sometimes there goes a couple of hours and other times it's just minutes. It also happens during the boot sequence(when loading ubuntu). I haven't run anything else such as windows on it so i don't know how that reacts.  Specs:   Intel HD 530  Intel Core I5 6300HQ 8GB Ram 8260 AC Wireless Dual Band   I've had somewhat success with reproducing the crash by transferring a large file through netcat. It only takes a few seconds to crash. Using:      nc -l -p 1234 > out.file   But if it were network related it wouldn't be crashing during boot would it?  I have used all the built in tools to test for hardware defects and also updated the bios, intel-microcodes, i915 drivers. I have also tried just around every kernel(4.2, 4.4, 4.5, 4.6, 4.7, 4.8) with no luck.  I would post some logs but i really can't find anything related to the crash. If you need any logs or anything just reply and i'll post.

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when...   just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an    In what order should I try various solutions before deciding to pull the power plug?  What should I do when starting up Ubuntu fails?  Is there a diagnostic procedure I can follow?


I am wondering how to convert Australian grade(HD, D, C, ...) to US GPA (A+, A, B, C ...) I tried few websites but those showed me which I think of as "too good to be true" results.  For example, according to the website I used, a grade of C in Australian grading system is equivalent to B grade in US.  Is that realistic? and is there a formula to convert ?

I'm trying to figure out the equivalence between grade schemes in different countries.  According to some Google results:   If you are a U.S. citizen, you need a GPA of 3.2+ (it varies, some say 3.2 and some others say 3.6, etc) to apply for a position in the UK (job or university) where the prerequisite is to have a minimum grade of 2:1. In UK 2:1 is earned if you have a 60-69% of the points. I've read that 2:1 is the same as 67%. In Spain we use a grading scheme of 10 points. So according to (2), for have a UK 2:1 you need to have 6-6.9 points. If you are Spanish and have 6.7, when converting it to GPA the result is 1.5.   However, if you take the above points and treat them as a math equation, the final result will be GPA 1.5 = GPA 3.2, which doesn't make any sense.  GPA 3.2 = UK 2:1 UK 2:1 = Spain 6.7 Spain 6.7 = GPA 1.5   Replacing now...  UK 2:1 = GPA 1.5     GPA 3.2 = GPA 1.5   My question is if someone has a better explanation on converting grades obtained in different countries.


So I live in a town with 3 different ZIP codes. I'm not sure if ZIP codes have anything to do with Minecraft LAN servers. My problem is that my friend cannot connect to my LAN server. We live at different ends of town so I'm not sure if it is the reason. Could someone explain how the LAN servers work and if it is related to ZIP codes?

Minecraft's got an "Open to LAN" feature, which can be used to set up a local server when two computers running Minecraft are on the same network. Some young relatives of mine use this to play together whenever they're in the same house, but they'd like to be able to play together from their respective residences.  A server is not optimal because it's a bit complex. I've tried using Tunngle to spoof that the computers are on the same connection to no avail.  How can I convince Minecraft's "Open to LAN" that their two separate computers are on the same network?


To be specific, I am just curious as to why does our number system have 10 different digits?Just for an example, why did it not end at 7? (it is the greatest prime number before 10, there are 7 days of week). Or similarly any other digit If we assume the digits were derived from the number of fingers(including thumbs) on our hand, then why is it so that 0 represents nothing, 1 represents one finger, then for the 10th finger, we don't have a unique digit, but have to ADD one more to nine.     EDIT: My question also aims to clear one more thing. If it is derived from the number of fingers, then why don't we have a special symbol for the 10th finger,

After learning about the binary number system (only 2 symbols, i.e. 0 and 1), I just thought why did we adopt the decimal number system (10 symbols) after all?  I mean if you go to see, it's rather inefficient when compared to the octal (8 symbols) and the hexadecimal (16 symbols)?


I would like to reference appendices with "A,B,C,...", as in "Appendix A", but in the appendix at the end of the document I want the letter "A" after the word "Appendix", as in "Appendix A".  \documentclass[12pt]{article}  \begin{document}  \section{Introduction}  Reference to appendix \ref{ap:a}.   \appendix \section{Appendix} \label{ap:a}  \end{document}

I would like to have my appendices labelled 'Appendix A', 'Appendix B', etc. However, when I use appendices in LaTeX (specifically llncs document class, downloadable at ), I instead get ''A Appendix', 'B Appendix' and so on. Is there any way to change that? More specifically, this is my minimal working example: \documentclass[envcountsame]{llncs}  \begin{document} \appendix \section{Appendix: Foo Bar} %I want this to appear as 'Appendix A: Foo Bar' \end{document}


Let's say that I play Zed and bought Hydra and my enemy is Shen and bought Omen. How much damage will I do to him if my only item is Hydra and his only item is Omen? 75+AD - 70+Def? This is how LoL works or it's more complicated than that?

As far as I can tell, it's something like this:  damage reduction = armor / (armor + 100)   Is this accurate?


Let's say I have the following formula:  $$\sqrt{a^2-2ab+b^2}=\sqrt{(a-b)^2}=\sqrt{(b-a)^2}$$  When do I know which one of the following I should use?:  $$\sqrt{(a-b)^2}=a-b\qquad\text{ or }\qquad \sqrt{(b-a)^2}=b-a$$

Let $n \in \mathbb N$ be a natural number and $a \in \mathbb R$ be a real number. The $n$-th root of the number $a$ is defined as follows:  Case I: $n$ is an odd number. In this case the $n^{\text{th}}$ root of $a$ is defined to be that number $b \in \mathbb R$ such that $b^n = a$.  Case II: $n$ is an even number. In this case the $n^{\text{th}}$ root of $a$ is defined to be that number $b \geq 0$ such that $b^n = a$.  Why is it that when $n$ is even, we only consider $b \geq 0$. For example, both $+2$ and $-2$ squared equal $4$, but when we say the square root of $4$ is $2$. Is there a reason for this?


I remember reading that the outer orbitals of atom have higher energy. If an electron is given enough energy it goes to higher energy orbitals from $n=1$ to $n=2,3,4...$   My question is that why do the outer orbitals have higher energy? Is is because of charges?

Using electrical potential energy $V=\frac{1}{4\pi \varepsilon_0} \frac{Q_1 Q_2}{r}$ , a particle further away from nucleus has lower magnitude of energy.  Using Coulomb's law, a particle further away from nucleus experiences weaker attraction, hence less energy is needed to maintain orbit$^\star$ around that e-shell compared to a electron shell closer to nucleus, hence the one closer to nucleus supposedly should have higher energy.  $^\star$I know in reality $e^-$ does not orbit around a atom, but its position exists as a probability density or radial probability function.


When I start my pc, the login screen appear. I tried to login but I can’t access to the display and this message comes up. I don’t know what to do. I can’t access to my documents and I only have Ubuntu on computer. I use Ubuntu 18.04.2 LTS  Failed to connect to https://changelogs.ubuntu.com/meta-release-Its. Check your internet connection.  Your hardware enablement stack (HWE) is supported until April 2023

When I log into my Ubuntu terminal tty1, I get a message failed to connect to http://changelogs.ubuntu.com/meta-release  I try various things, then I get an error message telling me could not resolve us.archive.ubuntu.com  If I ping us.archive.ubuntu.com -c 4: ping: archive.ubuntu.com: name  or service not known  And the same message for sudo apt-get update. I did not set any proxy; I left it blank during install. My internet connectivity is apparently disabled and I could not configure it. I tried rebooting but nothing changed.


I need to validate an email ID for a user from DB using javascript/jQuery. How can I do that ?

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


The question says it all. From yesterday, my top panel icons and text have become very small. Not sure what has happened. I am sharing a screenshot.  Let me know if this can be corrected. Thanks!

So I was configuring VS code on my Notebook when suddenly I noticed that my interface font got really small on my desktop, terminal and files. I use Gnome Tweaks Tool to increase my scaling factor to 1,15 , but, even though it was active, the font stayed tiny. The solution I found was moving my scaling factor, which instantly fixed my font issue, however, every time I restart my Notebook the font gets tiny again and I have to repeat the process. I tried reseting my font configuration using this command, but had no success. gsettings reset org.gnome.desktop.interface text-scaling-factor  I also tried using the command dconf reset -f /  Finally, I tried using dconf-editor, but still had no success altering the font rendering DPI or changing the scaling factor. All of the steps I mentioned fixed my fonts temporarily, but the issue still persists when I restart my Notebook I am out of ideas and even considered getting a fresh Ubuntu install by now... My video card: NVIDIA GeForce GTX 1050 GPU


Assume there's a user with the name Bob on Stack Overlow who might be able to solve my question. If he hasn't seen my question yet, can I ping him to come and take a look?  So when I post     @bob please have a look at it.   will Bob get my notification in his inbox?

Possible Duplicates:             When I use Stack Overflow to ask a question, is there any way that I can I notify an expert user to inform him about this question?  Why do I want to do this? Because when I ask a question, I often get a perfect answer. I love this part of the site so much.  After that, I have another question which relates to my first question, and I hope that somewhere in the world he can see the question and try to help me again.  I don't know how to explain exactly my ideas. It's just same as a social network system.


I need help with a question.  Let $A$ and $B$ be real or complex-valued matrices. Define $[A,B] = BA-AB$. Prove that if $[A,[A,B]]=[B,[A,B]]=0$ then, for every $t \in \mathbb{R}$:  $e^{tB}e^{tA}=e^{t(A+B)}e^{\frac{t^2}{2}[A,B]}$  Hint: Verify that $\Phi(t)=e^{-t(A+B)}e^{tA}e^{tB}$ is a solution of  $X'=t[A,B]X$.         I know how to prove that if $\Phi$ is a solution of the ODE then the identity holds. But I think I am miscalculating the derivative of $\Phi$. I can't see how that $t$ would appear in the expression of the derivative.

Let $A,B \in M_n(\mathbb{R})$, and suppose $[A,[A,B]] = [B,[A,B]] = 0$, where $[A,B] = BA-AB$. We want to show $$ e^{At}e^{Bt}=e^{(A+B)t}e^{[A,B]t^2/2}, \quad \forall t\in \mathbb{R}. $$ I'm given a hint to show that $x(t) =e^{-(A+B)t}e^{Bt}e^{At}x_0$ is a solution to the ODE $x'= t[A,B]x$ for each $x_0\in \mathbb{R}$.    I haven't been able to prove the hint, let alone see why being a solution helps prove the identity. Taking the derivative of $x(t)$ didn't lead to much, and moreover there's no $t$ outside of the exponent, and substituting it into the RHS of the ODE also didn't help.    The RHS of the identity to be shown solves $x' = (A+B+t[A,B])x$, which maybe gives some intuition about the ODE in the hint, but I'm not really sure where to go.


I'm using ES6 template literals to construct some HTML in strings, and so far it has been working fine.  However, as soon as I try to put the literal text </script> in my string the browser throws up and throws the syntax error:  SyntaxError: Unterminated template literal   Here is a simple JavaScript sample which throws the error:  var str=` <script> </script> ` var pre = document.createElement('pre') pre.textContent = str document.body.appendChild(pre)   See the above code in .  It appears that what is happening is that it gives up looking for the end literal quote and instead starts treating everything at point as literal HTML, so all the JavaScript after that point is incorrectly treated as HTML, which it is not!  If I replace script by any other legal HTML tag (and even invalid tags like scripty) then it works just fine, so I can't see how this can possibly be a syntax error or a weird case where I think I have typed one character (e.g. the backtick) but instead have typed another that looks almost like it.  I am literally creating a string (to my understand, at compile time), the browser should not be attempting to treat it as HTML or in any way parse it. So what gives?

Why do some sites (or advertisers that give clients javascript code) employ a technique of splitting the <script> and/or </script> tags up within document.write() calls?  I noticed that Amazon does this as well, for example:  <script type='text/javascript'>   if (typeof window['jQuery'] == 'undefined') document.write('<scr'+'ipt type="text/javascript" src="http://z-ecx.images-amazon.com/images/G/01/javascripts/lib/jquery/jquery-1.2.6.pack._V265113567_.js"></sc'+'ript>'); </script>


I have a problem with Bluetooth on my Laptop. It seems to get stuck on searching for devices.  I looked through AskUbuntu already and found a few great, detailed solutions, but I don't know what firmware I need. Here are the outputs of commands I found online:  dmesg | grep -i bluetooth  [   20.793040] Bluetooth: Core ver 2.22 [   20.793074] Bluetooth: HCI device and connection manager initialized [   20.793081] Bluetooth: HCI socket layer initialized [   20.793085] Bluetooth: L2CAP socket layer initialized [   20.793095] Bluetooth: SCO socket layer initialized [   21.153861] Bluetooth: hci0: BCM: chip id 70 [   21.154856] Bluetooth: hci0: BCM: features 0x06 [   21.170837] Bluetooth: hci0: BCM43142A [   21.170844] Bluetooth: hci0: BCM (001.001.011) build 0000 [   21.449876] bluetooth hci0: Direct firmware load for brcm/BCM.hcd failed with error -2 [   21.449883] Bluetooth: hci0: BCM: Patch brcm/BCM.hcd not found [   24.056776] Bluetooth: hci0: command 0x1003 tx timeout [   24.058451] Bluetooth: hci0: unexpected event for opcode 0x1003 [ 5417.077645] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 5417.077649] Bluetooth: BNEP filters: protocol multicast [ 5417.077657] Bluetooth: BNEP socket layer initialized [ 5513.623521] Bluetooth: RFCOMM TTY layer initialized [ 5513.623532] Bluetooth: RFCOMM socket layer initialized [ 5513.623543] Bluetooth: RFCOMM ver 1.11 [ 5538.321869] Bluetooth: hci0: command 0x1003 tx timeout [ 5538.323516] Bluetooth: hci0: unexpected event for opcode 0x1003 [ 5734.376654] Bluetooth: hci0: urb 0000000094ad7f77 failed to resubmit (2) [ 5739.698606] Bluetooth: hci0: BCM: chip id 70 [ 5739.699750] Bluetooth: hci0: BCM: features 0x06 [ 5739.715784] Bluetooth: hci0: patryk-Lenovo-G50-45 [ 5739.715798] Bluetooth: hci0: BCM (001.001.011) build 0000 [ 5739.715927] bluetooth hci0: Direct firmware load for brcm/BCM.hcd failed with error -2 [ 5739.715934] Bluetooth: hci0: BCM: Patch brcm/BCM.hcd not found   lsusb  Bus 002 Device 004: ID 105b:e065 Foxconn International, Inc. BCM43142A0 Bluetooth module Bus 002 Device 003: ID 5986:0652 Acer, Inc  Bus 002 Device 002: ID 0438:7900 Advanced Micro Devices, Inc.  Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 004: ID 046d:c534 Logitech, Inc. Unifying Receiver Bus 001 Device 003: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller Bus 001 Device 002: ID 0438:7900 Advanced Micro Devices, Inc.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   As you can see it tries to load BCM.hcd firmware and while I found this repository on Github:  I don't know which firmware I should use.

Bluetooth is on but can't find or be found by any other devices.  Output of sudo service bluetooth status:  ● bluetooth.service - Bluetooth service    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)    Active: active (running) since ხუთ 2015-06-04 22:33:18 GET; 13min ago  Main PID: 26678 (bluetoothd)    CGroup: /system.slice/bluetooth.service            └─26678 /usr/sbin/bluetoothd -n  ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled   Output of lsusb:  Bus 003 Device 005: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0   How can I fix it?


I need to prove that these two sets have the same cardinality: $$\mathbb{R}^\mathbb{N}$$ and:  $$\mathcal{P}( \mathbb{N})$$    I thought about using these known facts: If $A,B,C$ sets then:  1. $A^{B^ {~C}} \sim A^{B \times C}$  2. If $B$ and $C$ are disjoint then $A^B \times A^C \sim A^{B~ \cup ~C}$    But I am stuck on that proof.. I tried to set: $A = \mathbb{R}$ , $B = \mathbb{N}$ , and $C = \{0\}$  and to use the known facts above while using $|A^B| = |A|^{|B|}$  I would appreciate your help, thank you!

I was wondering what the cardinality of the set of all real sequences is. A random search through this site says that it is equal to the cardinality of the real numbers. This is very surprising to me, since the cardinality of all rational sequences is the same as the cardinality of reals, and it seemed fairly intuitive to me that if cardinality of a set $A$ is strictly greater than the cardinality of the set $B$, then cardinality of $A^{\mathbb{N}}$ should be strictly greater than cardinality of $B^{\mathbb{N}}$. It turns out to be false.  Some technical answers have appeared in this forum elsewhere but I do not understand them. As I am not an expert in this topic, could some one explain me in simple terms why this is happening?  Also is the cardinality of all functions from reals to reals also the same as the cardinality of reals?


If Earth were at the middle of the solar core, how long would it take to destroy the planet?  Furthermore, how would the planet be destroyed?  To consider the planet to be destroyed, it must be ripped apart in some senses. I'd imagine that the Surface of the Earth would continuously melt and disperse into the sun, until nothing is left.  I've done some research and found that the Sun's energy output is roughly e26, and the gravitational binding energy of earth is e32. So that suggests it would take at least e6 seconds for the Earth to be destroyed.

Considering how low the power density is at the sun's core, I seem not to be able to expect what would happen to matter in case it was thrown inside the sun's core. For example, let's assume an Earth-like planet is placed at the center of the Sun's core, and with the power density of 276.5 $watts$/$m^3$ which is very low to even raise the temperature of the Earth by any noticeable degree. That was one thought. The other thought was that, the temperature in the core is already 15 million degrees K, so any matter there should get close to this temperature quickly enough.  So now I'm very confused,  like will the planet stay there intact for thousands or even millions of years until it has accumulated enough energy to melt or vaporize ?  Or there are other types of energy absorption the planet would experience and thus have a shorter time staying as one piece in the core ?  Just for trying to get a practical and numerical answer to this question, let it be : how long can the Earth as a whole survive in the core of the sun ?


the objects still changing their value,if something that i losing can you give me an article or the documentation about that, for example: const array = [   [     { local: '5', visit: '6' },   ],   [     { local: '6', visit: '1' },   ],   [     { local: '8', visit: '6' },   ],   [     { local: '6', visit: '2' },   ],   [     { local: '3', visit: '6' },   ],   [     { local: '6', visit: '7' },   ],   [     { local: '4', visit: '6' },   ] ];  i tried with: array.map(element => element.slice());

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


Consider the following simplified code.   \documentclass[pstricks,border=2cm]{standalone}  \usepackage{pst-eucl} \psset{saveNodeCoors}  %\def\xy#1{!\psGetNodeCenter{#1} #1.x #1.y}% cannot  be reflected! \def\xy#1{!N-#1.x N-#1.y}  \begin{document} \begin{pspicture}[showgrid](-3,-1)(3,3)     \pstGeonode         (2,0){A}         (2,2){B}     \nodexn{.25(A)+.25(B)+(0,2.5)}{C'}     \pstGeonode(C'){C}     \def\common{\psline(\xy{A})(\xy{B})(\xy{C})}%     \pscustom     {         \common         \reversepath         \scale{-1 1}         \common         \closepath     } \end{pspicture} \end{document}     Why can't the abscissa and ordinate obtained from \psGetNodeCenter be reflected?

Introduction  I am writing a tutorial on a short introduction to PSTricks for newbies. I got obstacles to explain how  a node A (for example), \rput, (!\psGetNodeCenter{A} A.x A.y) and (!N-A.x N-A.y) work by design.  I have read the pst-node documentation as shown below.      And the following is taken from page 35-36:    The manual says:   The transformation matrix will be reset by \psGetNodeCenter. (!N-A.x N-A.y) is not affected by \rput.   Even though I read it many times, I still get confused. The statements are too short.  Problem  Please consider the following figure for the remaining discussion.     Case 1  A node A is defined outside \rput and a dot is translated by \rput.   with (!\psGetNodeCenter{A} A.x A.y)  \pnode(2,2){A} \rput(1,1){\psdots(!\psGetNodeCenter{A} A.x A.y)}  with (!N-A.x N-A.y)  \pnode(2,2){A} \rput(1,1){\psdots(!N-A.x N-A.y)}    The results are different. \rput only affects (!N-A.x N-A.y). Case 2  A node A is defined inside \rput and a dot is translated by \rput.   with (!\psGetNodeCenter{A} A.x A.y)  \rput(1,1){\pnode(2,2){A}\psdots(!\psGetNodeCenter{A} A.x A.y)}  with (!N-A.x N-A.y)  \rput(1,1){\pnode(2,2){A}\psdots(!N-A.x N-A.y)}    The results are identical. \rput affects both. Case 3  A node A is defined inside \rput and a dot is defined outside \rput.   with (!\psGetNodeCenter{A} A.x A.y)   \rput(1,1){\pnode(2,2){A}}  \psdots(!\psGetNodeCenter{A} A.x A.y)  with (!N-A.x N-A.y)   \rput(1,1){\pnode(2,2){A}}  \psdots(!N-A.x N-A.y)    The results are different. \rput only affects (!\psGetNodeCenter{A} A.x A.y).   The MWE is given as follows.  \documentclass[margin=12pt]{standalone} \usepackage{pst-node} \addtopsstyle{gridstyle}{gridlabels=5pt} \psset{saveNodeCoors,linecolor=red} \everypsbox{\color{blue}} \begin{document}  \begin{psmatrix} \begin{pspicture}[showgrid=bottom](3,3)     \rput(1,1){Case 1-A}     \pnode(2,2){A}     \rput(1,1){\psdots(!\psGetNodeCenter{A} A.x A.y)} \end{pspicture} & \begin{pspicture}[showgrid=bottom](3,3)     \rput(1,1){Case 1-B}     \pnode(2,2){A}     \rput(1,1){\psdots(!N-A.x N-A.y)} \end{pspicture} \\ % case 2 \begin{pspicture}[showgrid=bottom](3,3)     \rput(1,1){Case 2-A}     \rput(1,1){\pnode(2,2){A}\psdots(!\psGetNodeCenter{A} A.x A.y)} \end{pspicture} & \begin{pspicture}[showgrid=bottom](3,3)     \rput(1,1){Case 2-B}     \rput(1,1){\pnode(2,2){A}\psdots(!N-A.x N-A.y)} \end{pspicture} \\ % case 3 \begin{pspicture}[showgrid=bottom](3,3)     \rput(1,1){Case 3-A}     \rput(1,1){\pnode(2,2){A}}     \psdots(!\psGetNodeCenter{A} A.x A.y) \end{pspicture} & \begin{pspicture}[showgrid=bottom](3,3)     \rput(1,1){Case 3-B}     \rput(1,1){\pnode(2,2){A}}     \psdots(!N-A.x N-A.y) \end{pspicture} \end{psmatrix} \end{document}   Question  How do I have to explain their behaviors to the newbies as the statements in the documentation seem to be unclear?  Note: As (!\psGetNodeCenter{A} A.x A.y) is identical to (A), (A) will not be discussed here.     If you are a teacher, how do you explain it to your   students?


I am searching for a Stack Exchange site where I can put my question related to the Arabic language.  I tried putting my question on Linguistics Stack Exchange, and it got comments that my question was off-topic:   I posted my question on Islam Stack Exchange and had the same issue there as on Linguistics:

I have been learning some Arabic mostly for fun. I am looking for the Arabic Stack Exchange site but cannot find it. I am sure I saw it lying around a few months ago or so. Any idea what happened to it?


I receive results that I consider inconsistent to simple queries.  -- This returns 3 rows select * from persons where person_id in (12,13,14)  -- This returns nothing select * from documents  where person_id in (12,13,14)  -- This returns nothing !?!? select *   from persons  where persons.person_id not in ( select documents.person_id from documents )   There is a FK on documents.person_id pointing to persons.person_id  Am I missing something? This is my @@version:  Microsoft SQL Server 2016 (SP1-CU1) (KB3208177) - 13.0.4411.0 (X64)   Jan  6 2017 14:24:37   Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows Server 2012 R2 Standard 6.3  (Build 9600: ) (Hypervisor)

Query 1:  select count(UserID) from users where UserID IN (select UserID from otherTable)   Returns: 178  Query 2:: (simply changed IN to NOT IN)  select count(UserID) from users where UserID NOT IN (select UserID from otherTable)   Returns: 0  Query 3: (remove the IN-clause completely)  select count(UserID) from users   Returns: 1047123 (over a million)  What? I can't... Even...   The only explanation I have is my database in inconsistent/corrupted, I have to run DBCC CHECKDB or something.  PS. UserID is a primary key, so - no dupes.


I've changed my ctrl-alt-l shortcut so instead of just locking the screen, the system goes into suspend.  (for reference, the command is gksudo pm-suspend-hybrid)  as you can see, the program needs to be run as root, so I added the gksudo. I'd really like to get the system to suspend without having to enter the password. Is there any way I can do this?

On one particular machine I often need to run sudo commands every now and then. I am fine with entering password on sudo in most of the cases.  However there are three sudo commands I want to run without entering password:   sudo reboot sudo shutdown -r now sudo shutdown -P now   How can I exclude these commands from password protection to sudo?


There is one piece of information that makes me wonder why finitely sized black holes are even possible: to an observer from afar, anything that approaches a black hole's event horizon is never observed to cross the event horizon, instead asymptotically approaching.  If that is indeed the case, then that would suggest that, for the generation of a black hole, the instance an event horizon arises from a singularity, surely, to outside observers, no more mass should be observed to cross that infinitesimal event horizon. Therefore, that would suggest that no more mass contributes to the singularity, and the mass of the singularity does not change. Therefore, the event horizon would remain infinitesimal in size, and no black holes would have the opportunity to grow to a size that any outside observers could observe in the first place.  This, of course, seems to be unlikely, given how black holes have indeed been detected. Therefore, I suspect there is a flaw in my logic, or that I'm making an incorrect assumption. However, I do not know where the flaw lies.  For example, perhaps the initial formation of a black hole does not start off with an infinitesimally sized event horizon. I assume this as I thought the generation of an event horizon occurs instantaneously whenever enough mass is collected within a certain volume.  Perhaps objects do indeed pass the event horizon, but only after an extremely long time passed.  Or could it be that objects just at the event horizon contributes to the mass of the black hole, even without passing through, until the event horizon grows in size and eventually consumes that which was just beside the event horizon.  Or, as a wild afterthought, is it feasible for black holes to have existed since the very start of the universe?  Any help with this would be very much appreciated!

Excuse me if the question is naïve. I am not a physicist.  Let's imagine formation of a black hole from a homogeneous collapsing star. At certain moment when enough of matter is inside of a small enough spherical area the event horizon starts to exist. When does the singularity start to exist and why?  The matter below the event horizon still continues to collapse towards the centre (e.g. in the reference frame of the falling matter). What are the necessary conditions for the singularity to appear?  I have found two similar questions but the answers did not really explain this problem to me:


If I start typing an answer, until I post it a draft is automatically saved.  How can I find these drafts? If there isn't a way, can one please be created?    The use case I have is I might start creating a post on my phone, but realize that it requires a lot more typing/effort than the phone easily supports so I want to switch to a another bigger device laptop/desktop.  It can be quite hard to find a specific question using search, so when this happens I read the question ID, which is not that easy on a mobile phone (especially if the title is long) and manually type it in on my laptop.  It would be very handy to click on a "Drafts" button (if one existed) and quickly pick up where I left off.

So, here's the sequence of events:   Read an interesting question, that I think I have an answer for. Start typing up an answer. Realize that my thought isn't completely formed and stop typing the answer. The answer draft is saved. Change computers. Complete the thought to answer the question. Can't find the question again.   Now, theoretically, I should remember enough about the question to be able to search for it, but is there a quicker/easier way to find the question to which I have a saved answer draft?  As a side note, I understand the need to have a limited number of active answer drafts, but why only one?  For example, I start working on a complicated answer, walk away for a couple of minutes, answer a different question, then come back to complete the complicated answer.


Earlier I tried installing chrome (from a .deb file) on Debian using a non root account. I couldn't do it. Is there any distro or tools that will allow me to install chrome from a deb file and get its dependencies?

Is it possible to install a .deb package completely under my home directory at debian?


A few times I saw regex experts say that using (.|\n)*? is a really, really bad idea.   Well, I do understand that it's better to replace it with the .* and use the /s flag. But sometimes the flags are not available, for example, when using regex within a text editor or other software with limited regex functionality. Thus, using something like (.|\n)*? might be the only option for multi-line matching.  So, what are the reasons to always avoid (.|\n)*??

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


My AddJoin operation is failing:  arcpy.CopyRows_management(lup_file,out_dir+'lup') try:     # Perform copy rows on merged csv file     print 'start'     aa = arcpy.Raster(SEIMF)     arcpy.AddJoin_management(aa, "VALUE", out_dir+'lup', "VALUE", "KEEP_ALL")     print 'end'     #arcpy.AddJoin_management(gis_dir+SIF, "VALUE", out_dir+'lup', "VALUE", "KEEP_ALL") except:     print arcpy.GetMessages()   error messages:     Executing: AddJoin C:\Users\Documents\Projects\AB\Inputs\gis\sif VALUE C:\Users\Documents\Projects\AB\Outputs\C\output\lup VALUE KEEP_ALL   Start Time: Sat Feb 22 02:27:50 2014   Failed to execute. Parameters are not valid.   ERROR 000840: The value is not a Table View.   ERROR 000825: The value is not a layer or table view   ERROR 000840: The value is not a Raster Catalog Layer.   ERROR 000840: The value is not a Mosaic Layer.   WARNING 000970: The join field VALUE in the join table sif is not indexed. To improve performance, we recommend that an index be created for the join field in the join table.   Failed to execute (AddJoin).     Does anyone know what is happening? I get this error only in the python code and can execute AddJoin just fine if I use the ArcGIS manually.

I am doing some arcpy -functions and afterwards I'm trying to add the calculated results from one table to another table. I'm using the arcpy.AddJoin_management() function.   As input table I'm using a table which is stored in a personal geodatabase. The personal geodatabase is not the workspace environment! As "JoinTable" a Table of a file geodatabase is used. This file geodatabase is the workspace geodatabase environment.  The initialized function looks like this:  (%self.getWorkspaceEnvironment => "W:/a18fb/data/mypersonalgeodatabase.mdb" and tFactsheetHochwasser => table in the personal geodatabase)  arcpy.AddJoin_management("%s/tFactsheetHochwasser"%self.getWorkspaceEnvironment(),"KPG", "GebaeudeKtn_BWVred1Stat","KPG","KEEP_ALL")  If the code is executed the following error-message appears:  Failed to execute.Parameters are not valid. The value cannot be a table     ERROR 000840: The value is not a Raster Layer.      ERROR 000840: The value is not a Raster Catalog Layer.      ERROR 000840: The value is not a Mosaic Layer.      Failed to execute (AddJoin)`.


I have recently upgraded my iPhone 4S to IOS 7. I have Ubuntu 12.04 LTS installed on all my systems and due to Security reasons it is not safe to sync and backup my iPhone on other's Windows based systems with iTunes.  My question, is there any alternative for iTunes on Ubuntu or any mechanism I can use to both backup and sync my phone with my linux system ?  Methods I can came across like Free MP3 app worked with IOS 6 only and could only sync music.

What ubuntu applications provide support? (guides, how to's, status) Also, specifically, details on support for syncing music to iPhone's and iPod's with the latest OS version:   Can you sync music to apple devices using >iOS4? (iPhone & iPod) What applications allow you to do this and how? (guides, how to's, status)    What has already been established is:   Apple does not support Linux and has no plans to.  provides some support, however it currently does not support music/video synchronization with devices >iOS4. Go to  and scroll to the section titled "" to see if your device version is supported.


I wrote this question from Hungerford's introduction abstract p.33 algebra  Theorem 2.8: If $G$ is a group and $X$ is a nonempty subset of $G$ then the subgroup $\langle X\rangle$ consists of all finite products $ a_{1}^{n_{1}}a_{2}^{n_{2}}\cdots a_{t}^{n_{t}}|(a_{i} \in X;n_{i} \in \mathbb{Z})$. In particular for every $ a\in G$, $$\langle a\rangle=\{a^{n}|n \in \mathbb{Z}\}$$  I can't show this.I know $\langle X\rangle=\bigcap_{i \in I}H_i,$ where $\{H_{i}|i\in I\}$ is family of all subgroups of $G$ which contain $X$. Therefore  we can easily see $$\{ a_{1}^{n_{1}}a_{2}^{n_{2}}\cdots a_{t}^{n_{t}}|(a_{i} \in X;n_{i} \in \mathbb{Z})\}\subseteq \langle X\rangle$$  How can we show converse direction?  What is the meaning of this theorem? For example: $\mathbb Z\setminus \{0\}$ is a subset of $\mathbb Q\setminus \{0\}$ and $\mathbb Q\setminus \{0\}$ is a subset of  $\mathbb R\setminus \{0\}$. How can we find set $\bigcap_{i \in I}H_i $ for those examples? If we think group as a additive group,  Then how do we determine the above concept?

A subgroup generated by a set is defined as ():     More generally, if S is a subset of a group G, then , the subgroup   generated by S, is the smallest subgroup of G containing every element   of S, meaning the intersection over all subgroups containing the   elements of S; equivalently,  is the subgroup of all elements of G   that can be expressed as the finite product of elements in S and their   inverses.   How does one prove that those statements are equivalent? If the answer is to broad to be presented here, I would appreciate pointers to relevant pages (or books).   Thanks in advance!