So I wanted to create code that creates fake steam keys/adobe keys to fool my friends into thinking I can get as many games as I want. So I got everything working as planned, the code generates the steam key and then places it into a .txt file.   However I find it very annoying that I need to keep manually reopening the file after every time I type "y" in the if another == "y": line to access the new key. I was wondering if it is possible to have it open the .txt file for me. I have looked through many websites and can't find anything that actually launches the .txt. Hope someone can help me out here, full code is as follows:  import string import subprocess import sys import random from random import * while True:     def steam():         while True:             min_char = 5             max_char = 5             allchar = string.ascii_letters + string.digits             password1 = str("".join(choice(allchar) for x in range(randint(min_char, max_char))))             password2 = str("".join(choice(allchar) for x in range(randint(min_char, max_char))))             password3 = str("".join(choice(allchar) for x in range(randint(min_char, max_char))))             f = open('Steam Keygen.txt','w')             f.write(password1.upper() + "-" + password2.upper() + "-" + password3.upper())             f.close()             steampath = r'C:\Users\mynamewhichIdontwanttoshare\Desktop\Steam Keygen.txt'             subprocess.Popen(",s ,s" , (steampath))             another = input("Another?")             if another == "y":                 print("Ok!")                 steam()             else:                 sys.exit(0)     def first():          watchuwant = input("What software do you want a code for?")         if watchuwant == "steam":             steam()         elif watchuwant == "adobe":             adobe()         else:             print("This is not available, sorry.")      first()   Note:  The adobe() function doesn't work yet so if you want to run it, just test by typing:  -What software do you want a code for?  steam  -Another?  y

I need to be able to open a document using its default application in Windows and Mac OS. Basically, I want to do the same thing that happens when you double-click on the document icon in Explorer or Finder. What is the best way to do this in Python?


Can anyone justify the presence and absence of comma after first in the sentences below?        First we’ll create a screen for the user to log in.   First, we’ll define the AniJS helper and then we’ll declare the before animation function.

If I have a sentence that starts with additionally, finally, consequently, etc. do I always have to put a comma after it? Or is there a different rule?


We're running ubuntu 18.04, with the following configuration of netplan:  network:   version: 2   renderer: networkd   ethernets:     ens3:       dhcp4: yes   Currently we're running into an issue with DHCP, seems old IPs are not being freed after assigning a new one:  2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000     link/ether 00:1a:4a:X:Y:Z brd ff:ff:ff:ff:ff:ff     inet 10.X.Y.175/23 brd 10.X.Y.255 scope global ens3        valid_lft forever preferred_lft forever     inet 10.X.Y.201/23 brd 10.X.Y.255 scope global secondary dynamic ens3        valid_lft 3136sec preferred_lft 3136sec     inet 10.X.Y.168/23 brd 10.X.Y.255 scope global secondary ens3        valid_lft forever preferred_lft forever     inet6 fe80::21a:4aff:fe97:5f31/64 scope link         valid_lft forever preferred_lft forever   This is generating duplicated IP addresses as some IPs are being reused but not freed, generating to the users a lot of issues.  What is causing this behavior and how can it be solved?

I'm seeing two different IP addresses on my Odroid XU4. I only noticed after I set up a Unifi controller on the box, but then tried to ssh into both of the addresses with success. I only want 192.168.2.3, and no IPv6.  mike@odroid:~$ ip addr show 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     inet 127.0.0.1/8 scope host lo        valid_lft forever preferred_lft forever     inet6 ::1/128 scope host         valid_lft forever preferred_lft forever 2: eth0:  mtu 1500 qdisc fq_codel state UP group default qlen 1000     link/ether 00:1e:06:30:1e:f5 brd ff:ff:ff:ff:ff:ff     inet 192.168.2.3/24 brd 192.168.2.255 scope global dynamic noprefixroute eth0        valid_lft 3069558340sec preferred_lft 3069558340sec     inet 192.168.2.9/24 brd 192.168.2.255 scope global secondary eth0        valid_lft forever preferred_lft forever  mike@odroid:~$ ifconfig eth0: flags=4163  mtu 1500         inet 192.168.2.3  netmask 255.255.255.0  broadcast 192.168.2.255         ether 00:1e:06:30:1e:f5  txqueuelen 1000  (Ethernet)         RX packets 12821  bytes 2393432 (2.3 MB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 13336  bytes 9323830 (9.3 MB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  lo: flags=73  mtu 65536         inet 127.0.0.1  netmask 255.0.0.0         inet6 ::1  prefixlen 128  scopeid 0x10         loop  txqueuelen 1000  (Local Loopback)         RX packets 10593  bytes 4855090 (4.8 MB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 10593  bytes 4855090 (4.8 MB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  As we can see here eth0 has two IP address and is only shown by ip command and not by ifconfig. I am unable to understand where this is coming from or how to disable the 2nd IP permanently. I would like to get rid of the 2nd IP address permanently.  mike@odroid:~$ cat /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d  mike@odroid:~$ cat /etc/netplan/*.yaml cat: '/etc/netplan/*.yaml': No such file or directory


Let's say that I have a little script that outputs "Hello world!" in terminal:  echo "Hello World!"   How can I publish it to Launchpad PPA so I can type:  sudo add-apt-repository ppa:myusername/hello-world && sudo apt-get update sudo apt-get install hello-world   Then running hello-world in terminal the application will output "Hello World!".  I read the instructions from , but the image is blurry for me...

Let's assume I have a working application written in C, C++ or Python. I want to create a Launchpad PPA so others can easily install it from a package. Please give step by step instructions for doing this from beginning to end. (Or provide a link that does the same ;)   Does the programming language matter? (Could it be a bash script?) Do I need to add anything to my build? Where should the build install itself to? How do I define dependencies? How do I use dependencies? How do I create a .deb? What do I need to do before uploading to Launchpad?


What is the difference between Ubuntu GNOME 17.04 () and Ubuntu 17.04 + GNOME 3.24.  If installed side by side, they are definitely different. The boot screen and login screen have differences, there are Wifi issues (seemingly packet loss, can't access Ubuntu.com servers at all), Bluetooth mouse connectivity issues, general subtle UI differences, etc...  But there is no explanation, anywhere that I can find, that states they are in fact separate. So which one is official? Why do they go by the same name but are actually different?

TL;DR: how does an Ubuntu flavor iso installation ( for example Lubuntu ) differ from installing a desktop package via apt-get ? (for instance sudo apt-get install lubuntu-desktop)  Context for the question:   Some time ago I answered a question on AskUbuntu , where I tested in virtual machine removing unity-desktop and installing ubuntu-gnome-desktop. That makes the boot logo ( plymouth ) change, desktop changes, different packages get installed (gnome-network-manager instead of network-manager , if I am not mistaken). It appeared that in effect I've switched to different Ubuntu flavor, even though I started out with the standard Ubuntu system. Hence the question: what differentiates the pre-made Ubuntu flavor iso from installing a package ? Is it all the same base underneath the hood or does installation from iso have specific configurations ? If it's possible to install a flavor via package manager, why then separate flavor iso's exist ? (obvious answer is user convenience, but I think there has to exist other reasons. Canonical is a business , and it makes not a lot of sense for a business to provide additional flavor iso , if a sysadmin or end-user can get the same thing via package manager by themselves).


Is it possible to calculate the spaces between the roads using a select statement in a PostGIS/PostgreSQL Database?   I tried using some combinations of the predefined functions as ST_Intersects & ST_Difference but did not succeed yet.

I'm currently trying to create polygons that represent the areas surrounded by roads. The roads are stored in PostGIS as points / lines so I have flexibility over what I can do with them.  I'm basically trying to turn the white areas of this example line output into polygons:    Any ideas?    Here is the PostGIS to achieve this (assuming you have a road table full of lines):  SELECT (ST_Dump(ST_Polygonize(roads.geom))).geom AS the_geom FROM (SELECT ST_Transform(ST_SetSRID(geom, 27700), 4326) AS geom FROM road_lines) AS roads


Hello fellow programmers! I would like some help on my code please. The following program randomizes my class' seating order. However, some elements from my list appear to be repeating. Is there any way to alter this piece of code in order to receive different seating orders without repeating any of the elements in my list? I thank you all in advance!!  List<string> list = new List<string>();  list.AddRange(new String[] {                     "Daria", "Denisa", "Erica",     "Merlin", "Nicoletta", "Mia",     "Lilian", "Karel", "Luveesh",     "Milan", "Oliver","Tea",     "Carlos", "Raneem", "Marsha",     "Uros", "Oguzhan" });  Random random = new Random(); Console.WriteLine("Type 'x' then hit 'Enter':");  string userInput = Console.ReadLine();  if (userInput == "x") {     foreach (var item in list)     {         Console.WriteLine("");         Console.WriteLine("Table 1: " + "" + list[random.Next(0, list.Count)] + "," + "" + list[random.Next(1, list.Count)]);         Console.WriteLine("Table 2: " + "" + list[random.Next(2, list.Count)] + "," + "" + list[random.Next(3, list.Count)]);         Console.WriteLine("Table 3: " + "" + list[random.Next(4, list.Count)] + "," + "" + list[random.Next(5, list.Count)]);         Console.WriteLine("Table 4: " + "" + list[random.Next(6, list.Count)] + "," + "" + list[random.Next(7, list.Count)]);         Console.WriteLine("Table 5: " + "" + list[random.Next(8, list.Count)] + "," + "" + list[random.Next(9, list.Count)]);         Console.WriteLine("Table 6: " + "" + list[random.Next(10, list.Count)] + "," + "" + list[random.Next(11, list.Count)]);         Console.WriteLine("Table 7: " + "" + list[random.Next(12, list.Count)] + "," + "" + list[random.Next(13, list.Count)]);         Console.WriteLine("Table 8: " + "" + list[random.Next(14, list.Count)] + "," + "" + list[random.Next(15, list.Count)]);         Console.WriteLine("Table 9: " + "" + list[random.Next(16, list.Count)]);         Console.ReadLine();     } }

What is the best way to randomize the order of a generic list in C#? I've got a finite set of 75 numbers in a list I would like to assign a random order to, in order to draw them for a lottery type application.


$f(x)$ is the function such that $$\lim_{x\to 0} \frac {f(x)}{x}=1$$. If $$\lim_{x\to 0} \frac {x(1+a\cos x) -b\sin x}{(f(x))^3}=1$$ then find a, b.    Using L'Hospital I have found that $f'(0)=1$ but I am not able to use that information further. Moreover I also think that $f(0)$ must be $0$ for application of L'Hospital.   Any new methods and hints would be appreciated. If anyone comes up with a solution without use of L'Hospital then it would be the best.

Let $f$ denote any function such that $\lim\limits_{x\to 0}\frac{f(x)}{x}=1$. Find the value of $a$ and $b$, assuming that $\lim\limits_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{(f(x))^3}=1$.   My  attempt: $\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{(f(x))^3}=1$ $\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{x^3\frac{(f(x))^3}{x^3}}=1$ $\lim_{x\to 0}\frac{x(1+a\cos x)-b\sin x}{x^3}=1$ $\lim_{x\to 0}\frac{1+a\cos x-b\frac{\sin x}{x}}{x^2}=1$ $\lim_{x\to 0}\frac{1+a\cos x-b}{x^2}=1$ As denominator is tending to zero,so numerato will also tend to zero. $1+a-b=0............................(1)$ Applying L Hospital rule, $\lim_{x\to 0}\frac{-a\sin x}{2x}=1$ So $a=-2$ and $b=-1$ But the answer given in my book is $a=\frac{-5}{2}$ and $b=-\frac{3}{2}$. I do not understand where have i gone wrong?


When I have a giant Thunderbolt monitor plugged into my MacBook, I want windows arranged a certain way.  No full-screen apps, some apps are shown on my small laptop screen, other apps are shown on my Thunderbolt display.  When I unplug the Thunderbolt display, I would like programs arranged differently, e.g., the browser is a full-screen app.  Is there any program that will let me "save" my window state when I have an external monitor plugged in, and save another layout when I don't have any external display, and automatically switch between the two when it detects that external display has been plugged in or unplugged?  I'm on Mountain Lion on a MacBook Pro.

Here’s something that sucks:   Plug in external monitor to laptop (Mac OS X Leopard in my case). Arrange your windows to have the IDE on one screen and browser on another. (Etc etc.  Resize, rearrange, fuss, fuss, fuss.) Unplug monitor to run to a meeting, or whatever. Goto 1.   I’d like to replace step 2 with “computer remembers exactly how I had it and just puts it back that way”.  (I personally only need a solution for Mac but collecting solutions for other systems here might be useful to others.  I’m sure it’s a common problem.)


My code is supposed to initialize an n*m matrix of all zeros in order to manipulate them individually edits = [[0] * (len(str2) +1)] * (len(str1) + 1)  However, when I try and set a specific index in that matrix like: edits[0][0] = 1  It affects all value with that column value [[1, 0, 0, 0, 0], [1, 0, 0, 0, 0], [1, 0, 0, 0, 0], [1, 0, 0, 0, 0]]

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


I can't generate link for transferring my old C.O.C account to the new device. Can I use old C.O.C account to other device such iPad and using the old game centre and Apple ID? Will it transfer my previous Clash of Clans Town to the new device? Is it possible?

I just bought a new iPad and I’m wondering if I can move Clash of Clans from the old to the new and save the progress. I spent a fair bit of money into it and I don't want to lose it.


How to write code in a question/answer on a Stack Exchange site?

How do I post text so that it is formatted as code?  What do I need to do so that my code shows up properly — not escaped or removed — when posted? And how to get the correct syntax highlighting?     For more information, see "" in the .


I was told the sentence "Today's lunch was sandwiches", should be "Today's lunch were sandwiches", but I don't think this is correct.  However, when I switch the order I end up with this:     Sandwiches were today's lunch.   Therefore, because "were" seems appropriate here, I thought maybe "were" is correct in the above example as well.  However, no matter how many times I try to convince myself, "Today's lunch were sandwiches" just sounds wrong.  Is there ever a case where "Today's lunch were ~" is correct?

My fish's native habitat is rice fields. My fish's native habitat are rice fields.   Which one is correct? I'm pretty sure it's the first, since 'is' modifies 'habitat,' but it still sounds weird...


One of the services I run is a simple email service that lets people send emails from their own websites.  Because it's only a simple email thing, I didn't want to  have to install an email client software package such as RoundCube. Instead, I made my own editor, using Markdown.  Why? I thought, because WYSIWYG editors produce such bad markup, I'd use Markdown backed up on the server-side instead.  The question is, is this use of Markdown both effective and accessible? Do I need to do anything to explain how it works to users and that all the extra characters don't appear in the final email? Would I be better using a WYSIWYG editor or even a software package?

The Problem I love using Markdown to write questions, answers, posts, comments, etc.  That being said, I am a very technical, detail-oriented, programmer type.  However, I am working on a CMS of sorts to be used by non-technical folks.  I am using Markdown for this, but I'm becoming increasingly worried that it will be too technical for the users.  It works great for users of  but let's face it. we love to learn new languages.  Users hate new things. Context You and I both know (because we're good programmers) that WYSIWYG editors produce a jumbled mess of non-semantic markup.  (If you don't know this, check out  by David Demaree and then you will.)  What you and I don't know is how users feel about it.  Programmers are terrible when it comes to guessing at users' pain points. The Question Can Markdown simultaneously solve the need for clean markup and not be grating for non-technical users? [Update] After a year of watching users with our Markdown editor, and dealing with the HTML generated on the server-side, I am firmly convinced that Markdown can be used by non-technical users of varying skill levels.  Users have had no trouble getting the basic syntax (since it already resembles email conventions) and with some helpful tips (look at  answer below for some specifics) they can get the more advanced syntax very quickly.


I understand that when I run exit it terminates my current shell because exit command run in the same shell. I also understand that when I run exit & then original shell will not terminate because & ensures that the command is run in sub-shell resulting that exit will terminate this sub-shell and return back to original shell. But what I do not understand is why commands with and without & looks exactly the same under pstree, in this case sleep 10 and sleep 10 &. 4669 is the PID of bash under which first sleep 10 and then sleep 10 & were issued and following output was obtained from another shell instance during this time:  # version without & $ pstree 4669 bash(4669)───sleep(6345)  # version with & $ pstree 4669 bash(4669)───sleep(6364)   Should't the version with & contain one more spawned sub-shell (e.g. in this case with PID 5555), like this one?  bash(4669)───bash(5555)───sleep(6364)   PS: Following code was omitted from output of pstree beginning for better readability:  systemd(1)───slim(1009)───ck-launch-sessi(1370)───openbox(1551)───/usr/bin/termin(4510)───bash(4518)───screen(4667)───screen(4668)───

I seem to misunderstand the Bash rule for creating a subshell. I thought parentheses always creates a subshell, which runs as its own process.  However, this doesn't seem to be the case. In Code Snippet A (below), the second sleep command does not run in a separate shell (as determined by pstree in another terminal). However, in Code Snippet B, the second sleep command does run in a separate shell. The only difference between the snippets is that the second snippet has two commands within the parentheses.  Could somebody please explain the rule for when subshells are created?  CODE SNIPPET A:  sleep 5 ( sleep 5 )   CODE SNIPPET B:  sleep 5 ( x=1 sleep 5 )


I imported a 2D draw from autocad. When I exturded the edges, I realized that the faces are overlapping and not even. How can I cut the faces "b" and "c" from "a" face as you can see at the pic.  And same like that, how can I trim an edge from another edge? Thank you for your help.

First off, I would like to apologize for any mis-terming or anything of the like, as this is my first blender project. I'm trying to make a mesh model, and I like to have everything neat and connected. I have run into one problem multiple times, that is that I need to connect two parts of the mesh at a certain point, which is inside another face. Is there any way that I can use both face to "cut" each other, sort of making a cross a corner? I have some screenshots below for clarification.


I'm getting the error "Expression must have integral or enum type" on the switch statement of my (incomplete) function below. I've stared at it for a while and can't figure out what the matter is. Any insight greatly appreciated.    std::string CWDriver::eval_input(std::string expr) {     std::vector<std::string> params(split_string(expr, " "));     std::string output("");     if (params.size() == 0)     {         output = "Input cannot be empty.\n";     }     else     {         switch (params[0])         {             case "d":          }     } }

Compiling the following code and got the error of type illegal.  int main() {     // Compilation error - switch expression of type illegal     switch(std::string("raj"))     {     case"sda":     } }   You cannot use string in either switch or case. Why? Is there any solution that works nicely to support logic similar to switch on strings?


If you have a contact list, and add a contact to that list, where should the icon of the new contact be added: to the top or the bottom of the list?  The contact list does not follow an exact order, its just data.

I have a medium-sized list (about a few dozen items, the container is very likely to have internal vertical scrolling). There is no sorting, so items are displayed in the order of their addition to the list. They are added through a series of controls located above the list with a "submit" button at the end. A colleague and I disagree as to where the new items should appear – at the bottom of the list, or at the top.


this is my code:  \thispagestyle{empty}  \begin{figure} \centerline{\includegraphics[scale=0.7]{alciatus2.pdf}} \caption{\textit{Alciati Emblematum liber}, Emblema CXLV, In Senatum boni Principis (1531), D1v} \end{figure}   it's part of a double sided book.

Sometimes, a float is just a tiny bit too large for one page and one would like to remove the page number and hope that nobody notices.  \documentclass{article} \usepackage{mwe} \begin{document} \blindtext \begin{figure} \thispagestyle{empty} \includegraphics[width=\linewidth,height=1.02\textheight]{example-image-a} \caption{This float is too large for one page.} \end{figure} \blindtext \end{document}   (Why, of course this is an artificial example and I could just make the image smaller. This is a more common problem for tables where using a \resizebox looks even worse.)   Unfortunately, no matter where I put the \thispagestyle{empty}, there is no way to guarantee that it really affects the page the float ends up on. I tried both before and after the \includegraphics and also in the caption itself. There is a way to change the pagestyle for all float pages ( and floatpag) but that's not what I want here.


I am getting "RE (SIGSEGV)" for the following line of code: int dp[105][100005];  My laptop has 8GB of RAM. Is it not sufficient to store 10^7 integers?

The following code is generating a stack overflow error for me  int main(int argc, char* argv[]) {     int sieve[2000000];     return 0; }   How do I get around this? I am using Turbo C++ but would like to keep my code in C  EDIT:  Thanks for the advice.  The code above was only for example, I actually declare the array in a function and not in sub main.  Also, I needed the array to be initialized to zeros, so when I googled malloc, I discovered that calloc was perfect for my purposes.  Malloc/calloc also has the advantage over allocating on the stack of allowing me to declare the size using a variable.


Is Iran safe to visit? Since Iraq shares its border with Iran, are there any signs or news of penetration of ISIS or ISIL or IS whatever you call them, inside Iran? Is it politically stable? And also, is it being attacked frequently by terrorists? In short, leaving behind pocket thieves, is it safe enough to spent 1 month in Iran? How much is probability of coming back alive. I belong to non-western country (i.e. India).  EDIT: I am narrowing down my question: Actually visit to Iran has aim of doing some machining repairing work at some company (not sure where it is, sorry). It might take up to 1 month. But some serious news show up in news mediums regarding Iraq about ISIS (or IS or ISIL). Also that terrorists from Iraq are spreading through the world and now they also have some impact over Syria so I want to know if there are same activities (specially from ISIS) in Iran.

Now there's a lot of propaganda in the west that leads us to believe Iran is dangerous and travellers shouldn't go there.  Obviously there are major political disagreements between several governments and the Iranian government and this should be taken into account.  But at a human level I have met many Iranians travelling elsewhere in the world and have found them to be friendly, charming, and hospitable. I have also met several western travellers who spent time in Iran, including hitchhiking around the country, who only have wonderful things to say about the country and its people.  As a traveller I've learned to trust the most what I hear from other travellers about a destination, especially ones which prefer similar ways of travel to myself. I've also learned to trust the opinions of inhabitants of countries bordering on the destination country the least.  Yet some people still insist that Iran is not safe for a traveller, or that .  I can look up for myself the general travel advisories issued by governments and disclaimers in WikiVoyage. So please don't regurgitate those an answers.  I want to know from travellers who've been there, from Iranians, or from references to specific incidents targeting foreigners/westers about which parts of Iran are no problem, and which parts should be avoided, even by experienced intrepid travellers.  (I realize any advice won't apply to Israeli citizens unfortunately. I'm Australian.)


How to find the limit of $a_1=1\:,\:a_{n+1}=\frac{a_n+2}{a_n+1}$?  I think to find the limit, first I need to prove that the sequence is convergent then it is easy to find the limit :   $L = \frac{L+2}{L+1}  \to  L = \sqrt{2}$ because the sequence $>0$   any hint to prove that the sequence is convergent?   thanks

Suppose $a_0$ is an arbitrary positive real number. Define the sequence $\{a_n\}$ by $$a_{n+1}=\frac{a_n+2}{a_n+1}$$ for all $n\geq0$. I have to prove that $\{a_n\}$ converges.  My attempt: If  $a=\lim_{n\to\infty}{a_n}$ exists, then it should be a solution to $$a=\frac{a+2}{a+1}$$ which is $\sqrt2$. Thus I need to show that $|\sqrt2 - a_n|$ gets arbitrarily small for large $n$. I tried to prove that $|\sqrt2-a_n|<|\sqrt2-a_{n-1}|$ but couldn't.


Why do physicists dislike ? Why do physicists consider the potential existence of Naked singularities as a serious problem?

I often hear people say that general relativity predicted its own demise because of the singularities it predicts. If I'm not mistaken, this is also a problem in QFT. I wonder why singularities garner so much hate. To me, it seems like negative or complex numbers: we used to hate these things but now they are more generally accepted. Why can't it be that nature just has singularities? We might not get it, we might not like it, but it may be so.


I am getting UnboundLocalError for one of the variables but not the other one. This is the code that confuses me: tokens=[] token_count = 0  def extend():     for word in line.split():         tokens.append(word)         token_count += 1  lines = ['this is one line', 'this is another line'] for line in lines:     extend()     print(tokens)  Running this you would get the error: UnboundLocalError: local variable 'token_count' referenced before assignment  But removing token_count += 1 line makes the code run fine. I understand that this can be fixed by adding a global token_count after function definition. What I have trouble understanding is why Python is not complaining about the other variables (e.g., line in for word in line.split() and tokens). These variables are all defined outside this function and if I'm getting Local variable error for one, I should get it for the other too. Any explanation for this behavior?

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


i have an issue i need to fix ASAP because is getting in the way of my work, i started modelling with Blender and i love it, specially Vehicle modeling, and i have an issue, i created procedual materials like Metal, glass, tinted glass, carbon fiber using nodes in blender without any textures, and the problem i have is that whe ni apply the material in the vehicle for expample the windows i'm not getting the result i should be getting but when i apply the material to a plane or monkey head it applyes correctly, i have a few Screenshots to show you guys what i'm talking about with hope you guys can hellp me understand what's the problem cuz i really can't find any solution to this...   here another example on my carbon fiber material that's different in both meshes but is the same exact material... i really need help with this. i may be a noob and this is an easy thing to solve but i really need help to figure it out... PS: english is not my native lenguage and in the picture i wrote in spanish in red "mismo material" it means "same material" PS2: i'm rendering with experimental build GPU supported (Cycles)

I am relatively new to Blender so please excuse me if this is rather amateur!   The bottom of my torus has poor surface quality, I have scaled the vertices down for a smaller (variable) tubular radius all the way around the torus and at the bottom the surface quality is awful, with inaccurate shading. Any ideas as to what is wrong and/or how I could fix this?  Thanks, itsanate


Where can I find information if the german Dr.med. is corresponding to the USA PhD? Did anyone with Dr.med. apply for USA PhD equivalent?  Thanks for the comments. Actually I don’t really think this has been answered here. I read the mentioned topics and they don't answer my question. MD in USA is a title students get after finishing medical school. In Germany this turns you in a Physician, but you don't have the title "Dr.med."  To earn the title you have to write and defend a doctoral thesis. That's why MD in US and Dr. med. in Germany are not the same.  About transfer from US to Germany it says (Grundsätze für die Regelung der Führung ausländischer Hochschulgrade (PDF) auf kmk.org.):  “Inhaber von folgenden Doktorgraden …Vereinigte Staaten von Amerika: „Doctor of Philosophy“ Abk.: „Ph.D.“,…können anstelle der im Herkunftsland zugelassenen oder nachweislich allgemein üblichen Abkürzungen die Abkürzung „Dr.“ jeweils ohne fachlichen Zusatz und Herkunftsbezeichnung  führen.”  This is what I find on Wikipedia, but I hesitate to huse this as my only source:  "There are a variety of doctoral degrees, with the most common being the Doctor of Philosophy (PhD), which is awarded in many different fields, ranging from the humanities to the scientific disciplines. There are also some doctorates in the US, such as ... Doctor of Medicine (MD) ..., which are generally regarded internationally as professional degrees rather than doctorates, as they are not research degrees and no defense of any dissertation or thesis is performed. ...  ...Doctorate degrees in Germany are research doctorates and are awarded via a process called Promotion ("promotion"). The concept of a US-style professional doctorate as an entry-level professional qualification does not exist. ...  ...In German-speaking nations; most Eastern European nations..., the corresponding degree to a Doctor of Philosophy is simply called "Doctor" (Doktor), and the subject area is distinguished by a Latin suffix (e.g., "Dr. med." for Doctor medicinae, ...)."

Reading the question posted  left me with a more general question:  Given the professional title and name: Dr. (First Name)(Last Name), is there some way to differentiate between the holder of a philosophical doctorate and a medical doctor? Wouldn't it be more appropriate for a PhD holder to have the title (First Name)(Last Name), PhD?


I know that this is a rather trivial question, but I've been having issues developing a problem-solving strategy for figuring out whether resistors are in parallel or in series. The Specific problem is in the photo.  Is there a strategy towards problems like this? Or is it that I just don't understand the definition of series and parallel?

I know how to detect when resistors are arranged in parallel or series arrangement and I can also find their equivalent resistance in simple circuits or when resistances are connected in form of triangle but what happens when the arrangement is complex like this :   Which resistors are parallel and which are in series ? How can I find the equivalent resistance in such cases ? Is there rule or method for figuring this out ?


Lamp is installed on my home machine and will never be for public viewing. I'm learning to program.   When I code in Notepadqq and try to save the file var/www/html/ I get permission denied. So, I used this command in terminal:  sudo chmod 766 -R /var/www/html    In the example I was copying, this command was given:  sudo chown pi /var/www/html    I got this from terminal in response.  chown: invalid user: ‘pi’    I then realised pi was not my name, so I then tried  sudo chown Bobby /var/www/html   as Bobby is my name. But I still got  chown: invalid user: ‘Bobby’   So I tried this  sudo chmod 766 -r /var/www/html   as per the example. But I got  chmod: cannot access '766': No such file or directory   Eish.  All I would like to do is to be able save the programming I am learning in that file so I can load it through the apache server which is up and running.   Help please

I want to stop having to use sudo everytime I work in /var/www. How can I do that? I simply want to put all of my sites into this directory and work with them without too much pain.


To find the limit $$\lim_{x\to\infty} (\sqrt{9x^2+x} -3x)$$  Basically I simplified this down to  $$\lim_{x\to\infty} \frac{1}{\sqrt{9+1/x}+3x}$$  And I am unaware of what to do next. I tried to just sub in infinity and I get an answer of $0$ , since $1 / \infty = 0$. However, on symbolab, when I enter the problem it gives me an answer of $1/6$.  Can anyone please explain to me what I need to do from this point? I haven't learned l'Hopitals rule yet so please don't suggest that. Thanks

I am trying to find the limit and I know that I have to do something to get a denominator but I can't make it work. There is a specific thing I have to do to this problem to make it work but I am not sure what that is. I know what I am doing is not wrong mathematically, it just doesn't help me get the answer.  $$\lim_{x \to \infty} (\sqrt{9x^2+x} - 3x)$$  Not sure where to go with this, multiply it all by the conjugate? I tried that but I know that won't help because I have to rationalize the denominator. I know I can't multiply by anything really until I get rid of the sqrt and I don't know how.


I recently installed a new GTX 1070 alongside my old R9 290X. When I rebooted the system I get put into low graphics mode. I know that amd and Nvidia drivers don't work on the same system, but I thought I would still be able to boot.  I tried to run the fix option which did nothing. Attempting to continue booting in low graphics mode causes the screens to go black. I can boot to the login menu from grub "safe mode" but attempting to log in keeps kicking me back to the login screen.  I am running the open source radeon drivers on my AMD card and Ubuntu 14.04.5.  EDIT:Like an idiot i forgot the question part of my question. I was wondering if there is some way to force Ubuntu to ignore the new GPU, I want to use it for a PCI pass through VM, so I dont really need Ubuntu to use it.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


If you were able to ride along a photon and a second photon passed you in the opposite direction, would what you observe be twice the speed of light?  And would that change what you would see of the second source of light?

Let's say we have $2$ particles facing each other and each traveling (almost) at speed of light.    Let's say I'm sitting on #$1$ particle so in my point of view #$2$ particle's speed is (almost) $c+c=2c$, double light speed? Please say why I am incorrect :)    EDIT: About sitting me is just example, so in point of view of #1 particle, the second one moves at (almost) $c+c=2c$ speed?


I would like to use the command line to put text in the GUI clipboard so that it can, for example, be pasted into a graphical web browser's text input field. I am using Kubuntu 20.04. I tried as an example uptime | xclip, and when I press the middle mouse button, the uptime output is pasted. However, when I press Ctrl-Shift-V on the command line, or Ctrl-V in a GUI application, the uptime text is not pasted; instead, the previously copied text is pasted. I read that there is a distinction between the selection and the clipboard. I presume xclip is copying into the selection. How can I copy into the clipboard?

I'm coping file to xclip  cat file.txt | xclip  I'm pasting without problem with  xclip -o  When I want to paste it to Firefox with Ctrl+V it pastes old text (that shouldn't already be in the clipboard).  When I go back to terminal and run xclip -o it pastes the correct text.  Why is there a problem with pasting to Firefox?


Obi-Wan tells Anakin that      Only the Sith deal in absolutes.   He uses that as his identification that Anakin had actually turned to the Dark Side. (Anakin's statement of "Either you're with me or against me" )  Then is Yoda making an absolute statement, when seeking to make a deal (getting Luke to try again, work harder, DEALING with living with Luke) with Luke says...      Do or Do not. There is no try.    Is this confirmation that Yoda is a Sith?

This is a pretty well known quote from the Star Wars movies. But isn't it a bit paradoxical?   It in itself is an absolute, and it was said by a Jedi (Obi-Wan if I recall correctly?). If this holds true, then is he leaning towards the Sith himself? If it isn't true, then both Jedi and Sith can deal in absolutes and the statement is pointless.  Surely it should be phased along the lines of "Jedi's should avoid dealing in absolutes" or something similar?


How would one integrate $$\int\sin(kx)e^{-x}dx, k\in\mathbb{R}?$$ I have tried integration by parts  $$\int\sin(kx)e^{-x}dx=$$

Is there a general formula for finding the primitive of $$e^{ax}\sin(bx)?$$  I've done this manually with $a=9$ and $b=4$ using Euler's formulas. But it takes a bit of time. Is there a pattern here?


Here is a script I did to automate autosmooth and set the degree. Pretty simple. It works in object mode great, however in edit mode it fails. What I do not understand is why. It does not matter if I am in edit or object mode when I use the regular buttons in Blenders UI.    class SetAutoSmooth(bpy.types.Operator):     bl_idname ="set.autosmooth"     bl_label ="Set Autosmooth"      def execute(self, context):         bpy.ops.object.shade_smooth()         bpy.context.object.data.use_auto_smooth = True         bpy.context.object.data.auto_smooth_angle = 0.523599          return {'FINISHED'}   Here is the error I get. It states that context is incorrect.      Traceback (most recent call last):         File "C:\Users\info\Desktop\Coding.blend\class Pie.py", line 14, in execute         File "C:\Users\info\Desktop\blender-2.76.0-git.d330162-AMD64\2.76\scripts\modules\bpy\ops.py", line 189, in call           ret = op_call(self.idname_py(), None, kw)       RuntimeError: Operator bpy.ops.object.shade_smooth.poll() failed, context is incorrect       location: :-1

I keep on getting context errors in the Blender Python API.  I don't understand the issue of the context in the API, how do I know which is the correct context?   Thanks!


I am getting an error while trying to connect to SQL locally either via a web application or SQL management Studio. Oddly, I can connect fine remotely via apps on other servers or SQL management on my desktop.  The error is:  SQL - an error occurred during the pre-login handshake.  EDIT I have tried the winsock command listed on the other page I have tried adding tcp:servername,1433 to the Registry as Suggested elsewhere on here. I have tried running this fix it from Microsoft    I am still getting the same issue which is that SQL Agent cannot start, if I re-enable SSL3 and reboot all works fine disable again and here is the error i recieve     2014-11-24 21:03:34 - ! [000] Unable to connect to server   'tcp:servername,1433'; SQLServerAgent cannot start 2014-11-24 21:03:34   - ! [298] SQLServer Error: 10054, TCP Provider: An existing connection was forcibly closed by the remote host. [SQLSTATE 08001]  2014-11-24   21:03:34 - ! [298] SQLServer Error: 10054, Client unable to establish   connection [SQLSTATE 08001]  2014-11-24 21:03:34 - ! [382] Logon to   server 'tcp:servername,1433' failed (DisableAgentXPs) 2014-11-24   21:03:35 - ? [098] SQLServerAgent terminated (normally)

Until yesterday evening, I was able to connect to my server from my local machine. Now, I get the following error:  A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.) (.Net SqlClient Data Provider)  Note, I can log on to the actual server with no problem.  Yesterday, I installed IIS on my machine and set up a site using my IP address - don't know if this has anything to do.  I did come across this article, followed the steps, but didn't seem to help.    I also went through the following article, changed TC/IP settings, restarted, but nothing.    Started trying suggestions from comments too but stopped when I realized I might be messing things up more.  So, why is this happening / how can I fix?


When I was little (about 8-9 years ago), I watched an animated series whose name I can't remember, but I really liked the series so I want help to find its name. I can't remember the media source, but I watched them in Bulgarian.  In the series there was a purple boy (he wore loose purple trousers and had purple hair), I think his name was Strack or something like that, and there were some kind of monsters, that could be summoned by gems. There were other kids too and they were Strack's friends and еach one had a gem. I remember a big forest too.   It's not much information, but I hope it helps.

What is the name of the anime TV show where a boy can summon beasts with crystals/gems. It was on SABC 2. There was also a boy that could summon a purple turtle . I think the gems were blue, green, and red.


When we have a system of particles, consisting of n particles, each having different mass and moving with a different velocity, we calculate the kinetic energy of the system in an inertial reference frame as K. When the same system of particles is viewed in frame moving with a velocity V, obviously the velocity of the particles change with respect to the frame and we thus calculate the kinetic energy as K'. We can see that K is not equal to K'.   Well my question was that how does the energy of the system of particles change when we simply view it with respect to a different frame of reference?

Intuitively, I would expect the change in kinetic energy of a particle to be frame independent. It just doesn't "feel" right that between two points in time-space, one frame should measure a change in kinetic energy of a particle different to another frame.  Is my intuition right? Is the change in kinetic energy of a particle frame independent?


I wish to make some editor tools: when I am working only the draft of my document I want to display the 'name' of the equation (set by \label) after each equation. For example in case of  \begin{equation} \label{eq::einstein} E=mc^2 \end{equation}   I want to see something like     E=mc^2 (1)      (eq::einstein)   I have to tried to redefine \label to store the parameter in \@currentlabelname then redefine environment equation to print \@currentlabelname after the equation (into a margin note box).  My MnWE:  \documentclass[a4paper]{article}  \usepackage[T1]{fontenc}  \usepackage[utf8]{inputenc} \usepackage[english]{babel}  \usepackage{amsmath}  \usepackage{marginnote} \usepackage{tikz} \setlength{\marginparwidth}{1.5cm} \usepackage{todonotes}  \usepackage{regexpatch} \makeatletter \xpatchcmd{\@todo}{\setkeys{todonotes}{#1}}{\setkeys{todonotes}{size=\tiny,#1}}{}{} \makeatother  \newcommand{\note}[2][yellow]{\todo[color=#1]{\tiny #2}}  \makeatletter \let\oldlabel\label %% %% Problem occurs here %% \def\label#1{\oldlabel \gdef\@currentlabelname{#1}}  \let\Oldequation\equation \let\Oldendequation\endequation \renewenvironment{equation}{\Oldequation}{\Oldendequation \note[blue!90!black]{\textcolor{white}{\@currentlabelname}}} \makeatother  \usepackage{lipsum}  \begin{document}  \lipsum[1]  \begin{equation} \label{equ::lenvente} d_{twin}=\frac{1}{\beta} \end{equation}  \lipsum[1]  \end{document}   Thank you for your time!

I'm using the package showlabels which has the effect that when I label something with \label{thing1} the thing1 gets typeset in the margin of my document next to where I put the label. This works fine for equations in align and proof environments, and things like that.  The problem is that it does not work when I label a theorem, which I do like this:  \begin{theorem}\label{fact1} Important math statement. \end{theorem}   I can still refer to said theorem via \ref{fact1} but I cannot get the label to typeset in the margin next to the theorem.  EDIT: I originally failed to include a compilable example of the problem. @DavidCarlisle posted an example of the problem not occurring, but with showlabels replaced with showkeys, upon which I noticed that showkeys did not produce the problem.  Looking more closely at my preamble, the problem had to do with the hyperref package. The following does not result in the label on the theorem being displayed.  \documentclass{article}  \usepackage{showlabels} \usepackage{hyperref} \usepackage[english]{babel}  \newtheorem{theorem}{Theorem}[section]  \begin{document}  \begin{theorem}\label{a theorem}     Important math statement. \end{theorem}  \end{document}   On the other hand, if one moves the hyperref package so it is implemented before showlabels, as follows, it works.  \documentclass{article}  \usepackage{hyperref} \usepackage{showlabels} \usepackage[english]{babel}  \newtheorem{theorem}{Theorem}[section]  \begin{document}  \begin{theorem}\label{a theorem}     Important math statement. \end{theorem}  \end{document}


I created this Adapter for my App:  public class DeadlineAdapter extends ArrayAdapter<Deadline> {     private Activity context;     public List<Deadline> deadlineList;      public DeadlineAdapter(Activity context, List<Deadline> deadlineList){         super(context, R.layout.item_deadline, deadlineList);         this.context = context;         this.deadlineList = deadlineList;     }      @NonNull     @Override     public View getView(int position, View convertView, ViewGroup parent) {          LayoutInflater inflater = context.getLayoutInflater();         View listView = inflater.inflate(R.layout.item_deadline, parent, false);          TextView displayDate = listView.findViewById(R.id.display_deadline_date_tv);         TextView displayName = listView.findViewById(R.id.display_deadline_name_tv);         Deadline deadline = deadlineList.get(position);         displayDate.setText(deadline.getDate());         displayName.setText(deadline.getDeadlineName());          return listView;     } }   But every time I try to run the app, my App crashes. The log says the following:     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference   How do I solve this problem?

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


i have a object which sets pickedup = true on collision public class IDCARD : MonoBehaviour     {     private bool pickedup = false;      // Start is called before the first frame update     void Start()     {              }      // Update is called once per frame     void Update()     {              }      private void OnCollisionEnter(Collision collision)     {        print("k");         pickedup = true;         Destroy(gameObject);     }  }  now i want exit script in an another object to check if pickedup == true on collison now what can i do pls  give a brief explanation  with a names i have given i have written your code. but i think there is some issues

I need to access a variable from another script in Unity, but I can't figure it out. Script:  public class move : MonoBehaviour { public float speed; // Use this for initialization void Start () {  }  // Update is called once per frame void Update () {     transform.position += Vector3.left * Time.deltaTime * speed; }  }   I want to access the variable speed in another script, but I can't. Any help will be appreciated :)


I have a Canon T2i (2010) I am looking to upgrade. Are there any other brands of camera that my Canon lenses will fit?

I've got some lenses of brand X, but I've just got a new camera of brand Y. How can I tell if it's possible to use my lenses on my camera? I accept that I may lose a lot of automatic functionality like autofocus, aperture control and metering when using an adapter to connect the two.


I have Ubuntu GNOME installed on my pc and I also installed the unity shell, the problem is I seem to have lost the GNOME login screen and lock screen, is it possible to switch back from the new unity one to the original GNOME one?  thanx

I believe my question says what I am trying to achieve.   Steps I tried to make gdm my default display manager:   sudo dpkg-reconfigure than select gdm as my default. Edit /etc/X11/default-display-manager and change its content to  /usr/sbin/gdm    After the above two steps I logged out myself and after that when I see my login screen it still shows lightdm as my display manager.  What am I doing wrong here.?


Where does the terminal command (reboot) live? If I wanted to change it to "rebooot" or "rbt" what would I need to do?   Without creating a separate bash script for a completely separate command.

I want to create a shortcut for a command in terminal. Like for a command  "ssh user@123.45.7.123", I just want a command "user" and the above command will run. Is this possible, and if so how can it be done?  Thank you!


Given a large integer $n$ (could be as large as $10^{18}$), how can I find all possible pairs of integers $(a,b)$ such that  $$a^b=n.$$  A fast algorithm is preferable.    The question  concerns quick computations by hand, which are not going to solve the present problem.

In a test I'll take there may be a question such as the following:  A perfect power is an integer that can be written as $a^b$, $a$ and $b$ being integers greater or equal to 2. One of the following numbers is not a perfect power, which one is it?  125 216 1000 500 2500   The first three (125, 216, 1000) are simply primeNumber^something, but the last two aren't. Keeping in mind that I can't use a calculator and should spend on average only 1 minute per question, I was wondering what's the best method I can use to resolve such questions or more difficult ones (where there are less obvious wrong solutions, such as 1000).


I have a 64-bit OS, windows 10. The hardware is a ThinkCentre 64-bits. Until yesterday everything was ok. I was working in some vm-64bits (some in vmWare, some in VirtualBox).  The windows did an update during this night and after that I can not open the 64-bits vms. I dont have 32-bits vms, but I think 32-bits process was not affected. I still can create it.  Virtualization and Vt-d are enabled in the bios and Hyper-V are unchecked.  For sure something happened after that update. How to bring back the 64-bits feature to vbox and vmware?

I have downloaded and installed the newest  for my Windows 7 (64-bit OS), but when I want to install 64-bit Linux, the New->Create Virtual Machine only displays 32-bit option, no 64-bit option. Could anyone give any clues about this issue? Thanks very much in advance!


I have a UV Sphere projected at the pole and the UV to a single point smear issue    I read that this is because blender does not properly map the triangles at the poles. I found that I can "fix" the UV vertices (ouch):     Or, perhaps a much easier way is to add a loop cut close to the pole to the VU has a quad instead of a trip to work with. The issue that I an having is; if I try and add a loop cut I can't seem get it to show up between the last edge loop and the pole.  For example I want to to place a loop cut where the arrow is:   Is there any way to fix this?

Need a way to do a loopcut- ish thingy on the blue line


When acting to close a question because it belongs on another SE site, the dialog box generally gives a few default sites, but (apparently) no way to add a new such site.  For instance, I wanted to close a question on Mathematics.SE and migrate it to Cryptography.SE, but the only options provided were MathOverflow, Physics, etc.  How do we add new optional migration sites to the list to be considered when closing a question for migration?

Wouldn't it be a good idea to be able to vote for questions to be moved to any Stack Exchange site? For example, I just voted  as off topic, but that was all I could do. I wish I could've voted it be moved to .  It's OK to have the predefined list of sites that is now when voting to move, but it would be nice to have a more link, where we could pick any Stack Exchange site.  Here's a quick mockup of how I see this implemented:    When the more link is clicked, a list of all the Stack Exchange sites should appear.


I have a list of figures that I show in the appendix page each of them is on a separate page. The figures are showing on the top part of the page. I would like to know if it would be possible to have the figures in the middle of the page so that the half bottom of the page doesn't look empty. Would this be possible to overleaf, please? Many Thanks

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


This page states that I marked the question as a duplicate, but I never did:    Unlike , I don't think all the different reasons should be listed. I just don't want the statement to be false.

Even though a question may be closed by receiving 5 close votes, the votes do not necessarily need to agree.  I think this is a good behavior, but  (which it was) and found the question was closed as "not a real question".  This is unfortunate, while I'm happy to display my username and acknowledge that I voted to close, I'd like some additional transparency.  That is, if it was a 4-1 vote for "not a real question" vs "exact duplicate" I'd be interested in seeing that level of information.  The point is to be transparent about why the question was closed, and though 5 users may agree the question needs to be closed they may not agree why.  It's important to recognize all the reasons for closure, not just the majority reason.  I'd suggest displaying this information as something like:     closed on Jun 21 at 4:26 as:         not a real question by foo, bar, baz   exact duplicate by alice, bob      Once a question has been closed I'd argue it's more important to understand the rationale than it is to worry about an extra 2 lines of text. If the votes are 2,1,1,1 perhaps keep just 2 bullets, the first showing the majority vote, the second saying "for other reasons" as a summary of the change.  The point is to aggregate the summary by reason.


I have problem using eclipse on Ubuntu 16.04 .It takes too much CPU and when I want to create or delete a project or a class , it takes a long time and eclipse goes not responding. This had never happened to me using windows or Ubuntu 15.10.

Eclipse was working as good as anything on 14.04. I did a clean install of 16.04 and installed Eclipse. But it runs a Java program only once after which it just hangs during subsequent attempts before I remove and reinstall it. I have tried many things, since in the beginning I needed CDT as well. Right now, I just want to remove everything related to eclipse and do a fresh install (remove all the configs and dependencies). Please note that I used Eclipse installer to install Eclipse and the eclipse icon image is also not appearing (the default ubuntu ? is appearing).


Downloaded TeXworks a couple weeks ago and have been using it to type my mathematics homework in LaTeX. I keep having to write sentences such as: Let $n$ be an integer. There are times when I would much prefer to write similar statements in symbols. For example: Let $n \in \mathbb{Z}$. But every time I click to compile I get a message saying \mathbb{Z} is not recognized. I am assuming this is because I am not loading the proper package.  I am writing \usepackage{amsmath} before I begin the document. Should I be loading a different or additional package to be able to use these additional symbols, such as the symbol for the integers? If so, what package?

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I feel that two people incorrectly marked my question as a duplicate.    On its face, my question is about large amounts of binary data, not just opening a file and writing text.    I feel like I should have some way to protest, without simply editing my own question.

I asked a question regarding a very specific feature of a program and whether or not it works with a larger program.  Within hours someone had marked it with "This question may already have an answer here of a similar question, but not related to my question.  The question I asked IS NOT ADDRESSED in the referred-to question. It's frustrating to spend half an hour putting together an intelligent and specific question, and then have someone mark it as a duplicate (or possible duplicate), which apparently causes people to skip over my question. I haven't received any more responses since the question was flagged.   Two questions:  (1) How do I get this flagging removed and (2) what's the best way to prevent these "helpful" flaggings in the future?


What word is used to signify "change/transform letters from uppercase to lowercase?" Uncapitalize? Decapitalize? The grammar check on my laptop suggests these words are not commonly used, or they do not exist.  Thanks

A word that starts with a lower-case (lowercase?) letter can be capitalized, but what is the converse action?  Google has only one page in the top results that addresses this and the closest thing to a proposed answer is decapitalize, which trips spell-checkers, so de-capitalize.


How to interpret the curl and div geometrically?  My book said the vector derivative operator '$\nabla $' is considered as vector as follows :  $$\left(\frac{\partial}{\partial x}, \frac{\partial}{\partial y}, \frac{\partial}{\partial z}\right)$$  Let $\mathbf F$ be  a vector field.  First,  I know the fact that the $\operatorname{curl}$ is the tendency of rotation and the pivot is $\operatorname{curl} \mathbf F$  However, why the curl is the tendency of rotation geometrically?  Easily, when calculating the outer product between two vector, we can interpret the result. The value is $\mathbf a\mathbf b\sin\theta$ and the direction is perpendicular to the two vectors.  I want to know to draw $\nabla$ as vector.  Second, the $\operatorname{div}$ is tendency of divergence or convergence.  But which direction? If the result of $\operatorname{div} \mathbf F$ is plus, then the tendency is same direction to $\mathbf F$? (If minus, then opposite direction?)

I learned vector analysis and multivariate calculus about two years ago and right now I need to brush it up once again. So while trying to wrap my head around different terms and concepts in vector analysis, I came to the concepts of vector differentiation, gradient, divergence, curl, Laplacian etc.   The reference that I'm using is very inadequate to give any geometric/physical interpretetions of these (almost) new concepts. I don't have much problem with their formulae and working rules, but I want to look at them in a little more geometric way. For example, the geometric significance of gradient that I got out of my book is the following: if $f:\mathbb{R}^3\to \mathbb{R}$ be a differentiable function then $\nabla f (x,y,z)$ is the vector perpendicular to the level surface $f(x,y,z)=c$ ($c$ constant) at the point $(x,y,z)$.  I would really appreciate if anyone can explain how, in this way, can divergence, curl and Laplacian be interpreted geometrically. (e.g. For a given vector field $\textbf{F}: \mathbb{R}^3\to \mathbb{R}^3$, the relation between $\nabla\times\textbf{F}$ and $F$ and questions like that.) I looked around Google a bit, but couldn't find what I was looking for.  Thanks in advance.


I would like to erase Windows XP partition and devote entire disc space to Ubuntu 12.04 LTS . Currently have 45GB partitioned to Ubuntu and 35 to Windows XP. Can this be done without reinstalling everything from scratch? Thanks.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


We have two tools for community moderation of questions: downvotes and close votes. Both are used to indicate a question is not "good", yet they work in isolation. Why is this? The tooltip for a downvote says:  This question does not show any research effort; it is unclear or not useful.  I downvote questions that I don't welcome. Either because they are unclear (which ties nicely to a close reason) or because they show no research effort (not a close reason, but desired by many). If a question has reached a score of -5, -7 or -10, is this really a question that should be open? It will probably be closed eventually, for reasons relating to the downvotes, but why do we have to act twice? Note: these scores are just examples, clearly different sites would have different typical scores for poor questions. I'm beginning to wonder if a low question score should trigger a question to be on hold. I haven't figured out the finer details yet, it's just an early thought. But I wanted to start a discussion about the pros and cons of keeping the two moderation tools separate, as they are now. I'm not suggesting we do away with close votes, I'm just questioning whether a low question score is another way a question could be closed. Based on a  looking at Stack Overflow, it seems there are thousands of questions with a negative score that are still open:  Score        Open Questions ===========================  -4                  17,258  -5                   7,116  -6                   2,983   -7                   1,322  -8                     693   -9                     261  -10                    189  Does this data mean anything? I'm not sure. It perhaps proves there is a benefit to having open questions with a low score. Or perhaps this shows just how many crap questions could be closed if an auto-closure system kicked in. Here's  but for questions with at least one answer. The numbers are smaller but still significant.

To resolve the frequent issue of poor question unfairly gaining answers, and thus paving the way for more poor questions to be asked  I Propose  EDIT: From feedback, have changed net vote threshold to 5 (to at least match that of the current 5 users at 3k rep) END EDIT     If a question has 5 net downvotes, the question is put   on hold automatically, and no answers are allowed until the question   is resolved/has been edited and net votes are > -5.   The net vote threshold could be perhaps different, to avoid grey area questions being on hold unfairly, but this also needs to be high enough to allow for early action.  On hold note, something such as:     This question has been put on hold via community voting on the   question, and cannot receive answers. To resolve this, edit and   improve the question.   This proposal would assist in stopping poor questions from receiving answers, as currently questioners not wanting to put in any effort know they will likely get an answer eventually.  This could also help improve site quality by making people improve their questions before they can have answers, so answers are only given to decent questions.


How can I make my title page in beamer look like    with an vertically full width image and the blue bar in the bottom?  I don't know which functions to use to change this  \documentclass{beamer}  \title{Women Matter: \\ Making the Breakthrough} \subtitle{Presentation for Highways Agency/WTS} \author{} \date{18th of September 2012}  \titlegraphic{\includegraphics[width=2cm]{vertical_image.jpg}}  \begin{document}  \begin{frame} \maketitle \end{frame}  \end{document}

How can I modify title page so that it looks like it is in  video. Please seek to 16 seconds and watch title page. I do not have permission to post images. I liked this theme and I want to make a beamer theme that looks similar. I tried with beamercolorbox but I failed to position the box to the bottom.      Edit: Here is my minimum working example  \documentclass[xcolor=dvipsnames]{beamer} \defbeamertemplate*{title page}{customized}[1][] { \usebeamerfont{subtitle} \usebeamercolor[fg]{subtitle}  {\flushright \setbeamercolor{author}{bg=white,fg=Red} \usebeamerfont{author} \insertauthor\par \usebeamerfont{institute}\insertinstitute\par }  \vspace{0.2in}  \setbeamercolor{postit}{fg=white,bg=YellowOrange}  \begin{beamercolorbox}[sep=1em,wd=1.062\textwidth,ht=3cm,dp=3cm,right]{postit} \usebeamerfont{title} {\huge \inserttitle}\par \usebeamerfont{subtitle} {\insertsubtitle} \end{beamercolorbox} } \usecolortheme[named=YellowOrange]{structure} \useoutertheme{infolines} \setbeamertemplate{navigation symbols}{}  \institute{Harvard College Professor and\\ Johnstone Family Professor in Psychology, Harvard University}  \title{SAY WHAT?} \subtitle{Linguistics as a Window to\\ Understanding the Brain} \author{Steven Pinker}  \begin{document} { \setbeamertemplate{footline}{} \begin{frame} \titlepage \end{frame} } \end{document}


Let $A, B, C$ be some complex matrices. Suppose that $AB - BA = C$ and $AC = CA$. Prove that: $C^k = 0$ for some $k$.   It is an exercise in the section of "Jordan Canonical Form of Nilpotent Transforms". But I am not sure how to prove the question. Could anyone give me a hint?

I saw this in a  and am putting it here for posterity.  Problem: Let $A$ and $B$ by square matrices and set $C=AB-BA$. If $AC=CA$, prove $C$ is nilpotent.


I often have to write bug reports where I have to talk about something in connection with the top bar in Ubuntu, but this is rather difficult, because I simply do not know what to call it... So really that is my question, what is the top bar in Ubuntu called?

I've sent a few mails to the Ayatana mailing list regarding some UI suggestions for Unity, but I'm afraid I keep confusing the right terms for the UI element, so I would like to have some clarification.  Answer Index:


I saw this Glass Frying Pan on "Breaking Bad" TV Series and thought it to be really cool.  Does anyone know where I can buy a glass frying pan like the one seen on Braking Bad?  Please advise!   Thanks!!

Where could I find a transparent frying pan?


I had a disagreement about the correct use of a ligature and kerning in a headline and would appreciate any help in seeking insight on the issue. The issue is with the "f" and "t". One side believes using the ligature creates proper kerning throughout and the other side believes the "f" and "t" should be spaced out slightly more and separated for a better look. I know this may not be a black and white issue but again any thoughts or knowledge about the issue would be appreciated. Thanks.

What decisions and factors should be considered to determine when to use ligatures? Only in headings? Only in body? Purely by eye?  I ask because about seven people looked over a poster design and liked it. One noticed, "hey Ryan, the f and i in identification are so close the dot is missing." Now, after being pointed out, others think its an error as well. I had to explain what a ligature was, and that it wasn't a mistake.  The font is Futura:    When, if ever, should someone use ligatures?


std::vector V contains elements a1, a2 ,a3, a4, a5, a6 and I need to copy elements from a2 to a4 in a new std::vector NV.   How is it possible to copy  range of vector into a new vector? i did this uin my code as per recommendations but still i am not able to figure out?The part involved is this one.                         vector<int>::const_iterator first = v.begin() + i+1;                        vector <int>::const_iterator last = v.begin() + i+k;                        vector<int>:: nv(first, last);

Suppose I have a std::vector (let's call it myVec) of size N.  What's the simplest way to construct a new vector consisting of a copy of elements X through Y, where 0 <= X <= Y <= N-1?  For example, myVec [100000] through myVec [100999] in a vector of size 150000.  If this cannot be done efficiently with a vector, is there another STL datatype that I should use instead?


I need to clone a database in a single instance of SQL Server 2012.  I have tried the Copy Database tool in SSMS, but it fails with file access error of which I've spent all day reading around to no avail.  I'm running out of time, and I need to get this database cloned, ensuring that the clone is entirely independent of the original.  The source database, DB1 needs to retain much of its data, so Generate Scripts is also no good.  Also my version of SQL does not have the Schema Compare tool.  Can I do a full backup, but then restore to a different database name?  I tried it on a dev machine, but some aspect such as it retaining the original logical name concern me (I might not need to be concerned - please advise!).  Or are there any other ways to do this?

I just got into a project in which we have only one SQL Server 2012 copy. We have 12 databases attached to the primary instance of SQL Server 2012.  As I don't have SQL Server 2012 or supporting OS, I have to depend on the primary instance of SQL Server 2012.  I am not sure whether it is good to create copy/clone of all 12 databases and attach it to same instance and work on the copy for data manipulation and query testing purpose.  Based on Kin's query  SELECT    SERVERPROPERTY ('MachineName') AS PhysicalMachineName,    SERVERPROPERTY ('ServerName') AS SQLServerName,    SERVERPROPERTY ('Edition') AS ServerEdition,    CAST(SUBSTRING(@@Version,charindex('SQL',@@version, 1),15) AS VARCHAR(255)) +  ' + '         + CAST (SERVERPROPERTY ('productlevel')AS VARCHAR (50)) + ' + (Build'        + CAST (SERVERPROPERTY ('ProductVersion') AS VARCHAR (50)) +')' AS ProductVersion,     RIGHT(@@version, (Len(@@Version)-charindex('Windows',@@version, 1))+1) AS [O.S.],  SERVERPROPERTY ('Collation') AS Collation   Following is the output. I ignored PhysicalMachineName and SQLServerName.  ServerEdition : Business Intelligence Edition (64-bit) ProductVersion : SQL Server 2012 + RTM + (Build11.0.2100.60) O.S.           : Windows NT 6.1 <X64> (Build 7601: Service Pack 1)  Collation      : SQL_Latin1_General_CP1_CI_AS


My ipad 2nd generation is super sluggish and crashing a lot. It was suggested that I downgrade from the current release - which it runs on now - to iOS 7. I tried doing this through itunes and picking my own OS file to restore but I was told the ipad was not eligible for that back up. What is the best way to do that? Thx.

I'm trying to downgrade my iPhone from the current iOS to an older one, as per .  But every time I try, I always receive this error:     The iPhone could not be restored. This device isn't eligible for the requested build.     I have tried many times with and without DFU mode. Any ideas regarding this?


This code below is very simple but for some reason it dosent work.   I want a simple function to toggle elements that will active different functions each one. When you click on the first element it changes his class for the second element, when you click on a second element it does other things.  The toggle works well (No JS errors) but I dont know why jQuery do not trigger a click on a class that was added with javascript. I tested too with "addClass" and "removeClass" and got the same result.  I already created a replacement for this (using a if with jquery function "hasclass" to switch behavior when you click on the element). I also understand that I may use other functions with count and all... That would not work for what I wanted but this is not the point...  I just wanted to know why it dosent work because its a common solution that I am sure that I will use again. The code is so simple that I am wondering if I dindt miss something obvious.  Here is fiddle:   HTML:
No click so far
   Jquery  $(document).ready(function () {        $('.aaa').click(function() {         $('.toggle').toggleClass('aaa zzz');         $('.toggle').html('Class was toggled');      });           $('.zzz').click(function() {              alert("This should work...it dosent... why?");       }); });

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


Why does it take more time for insertion in the same SET the first time and much less time when I try to insert the second time. Why there is a change in the behavior for the same code? The Employee class contains two fields and generates a hash code. This is of no use here but related to a different program. What I am trying to do is to calculate the complexity of various Collections for better performance on CRUD operations. But when I first add 200000 elements into the HashSet it takes more time. When the same code runs again it takes much lesser time. I don't know how it is working internally. Any help is appreciated. IN THE OUTPUT THE HASHMAP CORRESPONDS TO THE HASHSET ONLY. REFER TO THE CODE. class Employee {     String name;     int age;          @Override     public int hashCode() {         return age;     } }  public class NonDuplicateObjects {     private static final int COLLECTION_SIZE = 2000000;     private static final Object DUMMY =`enter code here` new Object();     public static void main(String[] args) {             Employee e = new Employee();         e.age = 0;         e.name = "Rahim";         Employee[] eArr = new Employee[COLLECTION_SIZE];         ArrayList<Employee> al = new ArrayList<>();         HashMap<Employee, Object> hm = new HashMap<>(COLLECTION_SIZE);         HashSet<Employee> hset = new HashSet<>(COLLECTION_SIZE);         long startTime;         long timeDiff;                  System.out.println("PROGRAM FOR TIME COMPARISION ON THE BASIS OF CRUD OPERATIONS");         System.out.println("PERFORMING ADDITION/INSERTION:");              //  Insertion in an array         startTime = System.currentTimeMillis();         for (int i=0; i<COLLECTION_SIZE; ++i)         {             ++e.age;             eArr[i] = e;         }         timeDiff = System.currentTimeMillis() - startTime;         System.out.println("Time taken by array: " + timeDiff);         System.out.println("SIZE: " + eArr.length);                  //  Insertion in a ArrayList         e.age = 0;         startTime = System.currentTimeMillis();         for (int i=0; i<COLLECTION_SIZE; ++i) {             ++e.age;             al.add(e);         }         timeDiff = System.currentTimeMillis() - startTime;         System.out.println("Time taken by ArrayList: " + timeDiff);         System.out.println("SIZE: " + al.size());              //  Insertion in a HashSet         e.age = 0;         startTime = System.currentTimeMillis();         for (int i=0; i<COLLECTION_SIZE; ++i) {             ++e.age;             hset.add(e);         }         timeDiff = System.currentTimeMillis() - startTime;         System.out.println("Time taken by HashMap: " + timeDiff);hset.clear();         System.out.println("SIZE: " + hset.size());         //  Insertion in a HashSet         e.age = 0;         startTime = System.currentTimeMillis();         for (int i=0; i<COLLECTION_SIZE; ++i) {             ++e.age;             hset.add(e);         }         timeDiff = System.currentTimeMillis() - startTime;         System.out.println("Time taken by HashSet: " + timeDiff);         System.out.println("SIZE: " + hset.size());     } }

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


What is the purpose of running a command with eval? What kinds of commands can eval run? I find it can run builtin command, external executable command, pipeline, script. Can it run all kinds of commands which can be run in a shell directly? Compare running a command directly in a shell and indirectly via eval. Is the difference only in that ?  Compare running a command via eval and via command. Assume that the command can be run by both. What differences are between the two ways?

What can you do with the eval command? Why is it useful? Is it some kind of a built-in function in bash? There is no man page for it..


Take a look at the screenshot below:  I'd like to vertically center the elements in the yellow box, and align them so that the images are all in one vertical line. The image below shows what I'd like to achieve:  Here's the code:   * {   box-sizing: border-box; }  .column {   float: left;   width: 50%;   padding: 5px;   color: #242323; }  .centered {}  .container {   display: flex;   align-items: center;   justify-content: center; }

Telephone: +94 (0)11 5 828468

Fax: +94 (0)11 2 931086

E-Mail: group@nawaloka.lk

Address: Some Address

    Appreciate the feedback!

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


I am a beginner in this course,  please give me a detailed step by step solution of this problem.  Let $W_1$ and $W_2$ be subspaces of a finite dimensional vector space $V$. If $X$ is a subspace of $V$ , I use the notation $X^0$ to denote the set of linear functionals $f$ on $V$ that annihilate $X$. We have the following to prove: $$(W_1 + W_2)^0 = W_1^0\cap W_2^0 $$

I have a problem as follows: $W_1$ and $W_2$ are subspaces of a finite-dimensional vector space $V$. $W^0$ is the annihilator of $W$.  (a) Prove $(W_1 + W_2)^0 = W_1^0 \cap W_2^0$.  (b) Prove $(W_1 \cap W_2)^0 = W_1^0 + W_2^0$.  Thoughts so far:  By definition of Annihilator,  $W^0$ is the set of linear functionals that vanish on $W$. I feel that I also should use dual, but not sure how to put things together.


There's a Wiki page for PLS "Path Modeling" and another one for PLS "Regression"... they seem to be saying the same thing, except the first link says PLS is great, and the second says that PLS is controversial and some journals no longer accept papers based on PLS:  1)   2)   Are PLS "Path Modeling" and PLS "Regression" pretty much the same thing?

This question was asked  but no one gave a good answer. So I think it's a good idea to bring it up again and also I would like to add some more comments/questions.    The first question is what is the difference between "PLS path modeling" and "PLS regression"? To make it more general, what are structural equation modeling (SEM), path modeling and regression? To my understanding regression focuses more on prediction while SEM focus is on the relationship between response and predictors and path modeling is a special case of SEM?  My second question is how trustworthy is PLS? Recently it's been subject to many criticisms as highlighted in  and  which leads to the rejection of papers based on PLS in high tier journals such as Journal of Operations Management ( is the note from the journal editor):     We are desk rejecting practically all PLS-based manuscripts, because we have concluded that PLS has been without exception the wrong modeling approach in the kinds of models OM researchers use.   I should note my field is spectroscopy, neither management/psychology nor statistics. In the papers linked above the authors are talking more about PLS as a SEM method, but to me, their criticism looks applicable to PLS regression as well.


I declared two Strings as below and initialise them as blank but in output one vale is blank and other show null.    String insert_brand_from_table="",insert_model_from_table="";    System.out.println("brand:  "+insert_brand_from_table);    System.out.println("model:  "+insert_model_from_table);  But output is :    brand:      model:  null  Now the null value of model showing null pointer exception error when i try to save model as blank into database.

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


Title says it all.   Where can I add workspaces - looked into CompizConfig but I was not able to find a tab where I can specify the # of workspaces. I used to have 2X2 and that's what I'm looking for.

It appears that Unity on Raring only comes with a single virtual desktop (aka workspaces) by default, and CCSM's Wall plugin has no way to add more. Is this configurable at all?


My server has 24 cores, 16 GB RAM, and 8 SSDs on raid 0 (I think).  I've noticed it is now using a low of swap space, even though there is plenty of RAM available.  load average: 2.70, 2.54, 2.50 Mem:  16303072k total,  1546160k used, 14756912k free,     9200k buffers Swap:  2097144k total,   471084k used,  1626060k free,   552448k cached   Do you know what could be causing something like this and how I can fix it?  Thanks  Steve

I am running centos 5.8 with cpanel. Lately I am getting reports that my swap is full , but there is a lot of free memory  to use.  top - 10:33:43 up 133 days, 17:00,  1 user,  load average: 0.05, 0.03, 0.05   Tasks: 170 total,   1 running, 169 sleeping,   0 stopped,   0 zombie   Cpu(s):  2.1%us,  0.5%sy,  0.0%ni, 97.2%id,  0.0%wa,  0.0%hi,  0.2%si,  0.0%st   Mem:  24726100k total,  8255368k used, 16470732k free,   599560k buffers   Swap:  1046520k total,   984740k used,    61780k free,  3641828k cached     How do I solve this? The unused ram memory should be used instead of the swap. Or should I increase the swap ( and how do I do that ? ).  Thanks


I have a test class that creates records for use in unit tests.  One of the components creates an Opportunity record, but I don't know how to add a Record Type to the Opp.  I know I can use RecordTypeID, but since I don't want to hardcode that, I am looking to use the Record Type name.  Can anyone help me figure out the syntax I need to use?  Thanks,  public static Opportunity createOppNew (Id acctId){      Opportunity opp1 = new Opportunity();       opp1.Name = 'Test Renewal Opp';       opp1.StageName = 'Phase 1';       opp1.CloseDate = Date.today().addYears(1);       opp1.Renewal__c = 'Yes';       opp1.Effective_Date__c = Date.today().addYears(1);       opp1.RP_Contract_Start__c = Date.today().addDays(1);       opp1.Term__c = 12;       opp1.AccountId = acctId;       opp1.RP_Customer_Engagement__c = 0;     return opp1; }

I know of two approaches to get the recordtype id of a particular record type   Use SOQL   RecordType RecType = [Select Id From RecordType  Where SobjectType = 'Account' and DeveloperName = 'Business'];    Benifit here is if the admin changes the name of the record type, the code still works as we can use developer name   Using Describe  Map<String,Schema.RecordTypeInfo> rtMapByName = d.getRecordTypeInfosByName(); Schema.RecordTypeInfo rtByName =  rtMapByName.get('Business');    Saves on SOQL limits but uses a describe call.  What would be your choice and why   EDIT : Usage is for setting up recordtype while inserting records in apex or trigger


How can you determine through T-SQL which logins have sysadmin?  Thanking you

For a security audit,I need to identify all super users and log every activity performed. Best approach for this?  By "super user" I mean sysadmin, serveradmin, securityadmin, processadmin, and dbcreator.


I would like to merge multiple MP3 files on a Windows PC without decoding and re-encoding them. I don't mind if the final MP3 files loses the ID3 tags, but if it could somehow preserve the ID3 tags, that would be a bonus. I would also like to avoid issues with time.  How can I accomplish this?

Motivation  I'm looking for a program that allows me to join a lot of mp3 files (an audio book) to a single large mp3 file. My mp3 player is able to remember the position inside a track, but it takes a while to reorganize the database if there are lots of files.  Already tried  I tried some programs (Wave Pad Sound Editor, Audacity), but with these it's all done inside a GUI with lot of manual action.  Question  Does anybody know a program that does this merge as a batch process, or at least without much interaction?  EDIT: I'm only looking for freeware.  EDIT: The software should run on Windows XP.


Can I move my already installed programs to my ubuntu installation, and if so can someone give me the general gist of it? I'm pretty good with a computer so if you give me the general outline I should be able to manage.

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


I was wondering the following: Let's suppose that $G$ is a non-empty set, then, can we always find a binary operation $*$ such that $(G,*)$ is a group?  For example, if we fix $G=\mathbb{Q}$ the sum of rationals $+$ tell us that $(\mathbb{Q},+)$ is a group.  Another way to understand it: Is there a set for which we cannot find a binary operation such that is not a group?

I know that there is no vector space having precisely $6$ elements. Does every set have a group structure?


I am supposed to show that $\sin(n)$ does not converge by constructing two subsequences: one subsequence contains terms of $\sin(n)$ that are between $1/2$ and $1$, and the other subsequence contains terms of $\sin(n)$ that are between $-1/2$ and $-1$. But how can I do this? Which $k(n)$--for subsequence $x_{k(n)}$--should I choose?

Show that $a_n=\sin(n)$ does not converge     My idea:  Take two subsequences: $a_{n_k}=\sin(\frac {\pi k} 2)$ , $a_{n_l}=\sin(\frac {2\pi l} 3)$  So: $\forall n$ : $\lim_{n\to\infty} a_{n_k}=1$, $\lim_{n\to\infty} a_{n_l}=-1$  So two inifinite subsequence converge to different limits thus the sequence $a_n$ doesn't converge.   Is that correct ?  Edit:   The contrapositive of the defintion of a limit of a sequence:   $\exists\epsilon>0 : \forall n\in N : \exists n>N \Rightarrow |x_n-L|>\epsilon$  Take $\epsilon =1$ and we know that $\sin(n)$ is bounded so lets take it's supermum: 1  $|1-1|>\epsilon=1\Rightarrow 0>1 \Rightarrow$ Contradiction.


I've been trying to play some games on my macbook (running on mojave) and whenever I try to hold CTRL and click it won't let me. Is there anyway to disable Ctrl-Click?

Disabling ctrl+click as right-click is useful because:   Many web app rely on ctrl+click (typically for multiple selection). There is little use for this combo (mice have 2+ buttons and trackpad emulate right-click with two-finger click or clicking in the right zone).   Can it be done in OS X Mavericks?  This question has been  and answered negatively (i.e. a third party utility is needed). Has this improved for Mavericks?


Everytime i get some text to display on a page using php echo, all the inverted comma's are replaced by some stupid question mark signs like this: �   Anyone have any idea why this happens?  Encoding:  Page- charset=utf-8 Database- MySQL charset: UTF-8 Unicode (utf8)

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Suppose there are 2 observers each with a watch, both show exactly the same time.  Suppose observer A stands on earth (which may be considered an inertial frame of reference) and observer B sits in a spaceship with speed as much as 100,000,000 m/s. When both will later meet on earth again, if the proper time was 100 s, then putting the values in the time dilation equation, the new time will be 106 s i.e. a difference of 6 seconds in the watches.  For observer A, the watch of observer B is the event and it should be showing 100 seconds while his own watch shows 106 seconds has passed. But for observer B, the watch of observer A is the event and he should see that it is the watch of observer A which is showing 100 seconds while his own watch shows 106 seconds.  Following the time dilation principle both observers should see that it is the other's watch which is showing the effect of time dilation and is 6 seconds behind (because the time for the event had slowed down or dilated). But isn't this practically impossible that each one observes a different time in their own and the other's watch? What will happen in actuality?

I'm in trouble with time dilation: Suppose that there's two people on the Earth (A,B), they are twins and each other has a clock. (So they are at the same reference frame). B travels in a spaceship and is orbiting around the Earth, as B's speed has increased there's some time dilation. So it's supposed that if A "looks" to B, B's clock will run slower than A's, and viceversa. And if one day B decides come back to the Earth, he will be younger than his twin and the hour of his clock would be different (earlier than A's clock) because of time dilation.  My first question is, why each person see the other's clock as the slow one? (In fact, I found some information that may solved it but I'm not sure if it's the right answer, and if it is, I don't understand it. -> It's because everyone thinks about himself as the reference frame. In other words, that for B, he is the stationary and who moves is A, so he sees A's clock run slower as B is "stopped" and the same for A. B is who is moving and A the stationary.)  The other question I have is that if it's true that each one sees the other as the slow one there's something that i missed out. We all agree that B (after going to the space and came back to the Earth) he is younger than his brother. So, why B don't see A moving and aging very fast if A see his brother and his things going very slow? Let's imagine they were looking to each other all the time, if both of them see the other going slowly once they meet and "discover" B is the young one... how is that possible?  [I think that in one episode of Cosmos of Carl Sagan (though may be I'm mistaken) he said that a neutrino "borned" in the Big Bang could have seen the creation of the Universe until today in few seconds due to its high speed, here starts my doubts: or i misunderstood something or there's contradictory information]  (I don't know anything about physics, only what is taught at high school as I'm a teenager so it'd be better to answer with no kind of calculation as I'd not understand it.)


Well, pretty much everything is in the title - I'm looking for the proof of the following statement: if we have a field extension $F \subset E$ then the degree of the extension $F(x) \subset E(x)$ [fields of rational functions] is the same as that of $E$ over $F$. Will be grateful for any hints!

Suppose $K$ is a field and $F$ is an algebraic extension of some degree $n=(F:K)$. It is stated that the field of rational functions $F(x)$ is in fact an algebraic extension of the field $K(x)$ and moreover $(F(x):K(x))=n$.    How do I approach this exercise? I'm new in this area so any help would be greatly appreciated!


I'm looking for a way to use multiple WMS on my application. If a user zooms in/out another baselayer is supposed to be selected. As for now, I've come across the following:  map.events.on({ "zoomend": function (e) {     if (this.getZoom() > 10) {       mapnik.setVisibility(false);       layertest.setVisibility(true);     }     else {       layertest.setVisibility(false);       mapnik.setVisibility(true);          }                                         }             });   The problem I still encounter is really bad performance. Well it works, but is there maybe a faster way of doing this?

I have a  which overlays Open Street Map data on imagery for Pennsylvania. As a baselayer to the roads (and eventually other layers) I have two baselayers - Blue Marble NG and USGS EROS 1ft imagery. I would like to be able to combine these two layers into a single base map object that switches automatically as the user zooms in since it makes no sense to view the 1ft imagery for the whole state or the Blue Marble imagery when you are zoomed in.   Ideally I'd like to do this on the client side as I'm pulling the imagery from two different sites.


I have a list of employees (EmployeeID, EmployeeName, etc) I have a list of Projects (ProjectID, ProjectName, etc) This is a many to many relationship - a project can have many employees working on it and an employee can be working on many projects.  This much is okay. Currently I've done  SELECT Employee.EmployeeID, ProjectEmployee.ProjectID FROM Employee LEFT JOIN ProjectEmployee ON Employee.EmployeeID = ProjectEmployee.EmployeeID LEFT JOIN Projects ON ProjectEmployee.ProjectID = Projects.ProjectID   This currently returns all employees whether or not they are assigned to a project. If they are assigned to multiple projects, their ID appears in column 1, twice.  e.g.  EmployeeID  ProjectID 1           NULL 2           1 3           1 4           1 4           2 5           1 6           2 7           2   I don't know if it's possible but I'd like it to list all employees once in column one. If they are assigned to multiple projects, list all the projects in a single field in column 2 e.g.  EmployeeID  ProjectID 1           NULL 2           1 3           1 4           1,2 5           1 6           2 7           2   Thanks in advance for any advice!

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


It's rather annoying to have to scroll all the way back up and check usernames to see if the person who commented "That's not an answer to the question" is the OP (and therefore you should delete the answer) or someone else (in which case that is for the OP to decide and it may very well be the right answer). Furthermore, when someone answers their own question, there is no guarantee they will use "I" in that answer, and they may not be easily identifiable as the OP.  I propose that, in all comments and answers on their own questions, users be highlighted as the original poster with the letters "OP" next to their username in a colour that contrasts with the background to the site. This would apply to the whole Stack Exchange network.

Make comments from original poster stand out. Use different light background color than white. Like what happens with accepted answers.