Apologies if this has been previously asked and answred, I did search but found nothing that provided the answer:  I have an HP Envy8, that came with a power adapter rated Output: 19.5V 3.33A. I also have a loan of an HP Envy x360, for which I don't have a power adapter to hand, but know the rating is 19.5V 2.31A.    My question is: Can I use the higher Amp rated adaptor (3.33A) with the lower rated machine (2.31A) without possible damage.  (I have checked and the adapters fit).

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I've got punctual geometries that I'd like to represent in a desktop and a web application, using complex symbology, like this :    My idea is to use a symbology editor to create a SLD file that defines the symbols. I used QGis to create the symbology and then tried saving it into a SLD file. The problem is that symbols are simplified and instead of the symbol I created, I get this one:    Do you know about a SLD editor that supports complex symbology?  Do you have any other suggestion different from creating a SLD file?

Is there any software that can easily create a Styled Layer Descriptor (SLD) without using a  script?


How to dynamically generate methods and properties in Python?  Let's assume that we have a long list and some class:  #!/usr/bin/env python list = ["sky","sand","sea",...] class SomeStaticObjClass( object ):         def __init__( self, arg, ):             # some code   ...and want to dynamicaly add names and values to keep the funtionality with code example as follows :  sky = "sky"                                     # generate key and value sky_OBJECT = SomeStaticObjClass( sky )          # generate name def sky_Function( arg ): return arg.__class__   # generate function name print sky_Function( sky_OBJECT )                # proceeding generated object name as argument   ...then continue with other list members again... Any help, please?

I've read that it is possible to add a method to an existing object (i.e., not in the class definition) in Python.   I understand that it's not always good to do so. But how might one do this?


I had asked a question  in which@Jay also answered.But He used "wouldn't" in the following sentences while answerimg my question:   Here, you wouldn't say, "May I ask you what is your name?" Though we break this rule for questions sometimes Well, someone might say that in informal speech, but you wouldn't write it or use it in formal speech. "May I ask you what's your name?" is awkward; a fluent speaker wouldn't say that.   I had asked  question in ELL and I have also received answers for it. But there is one thing that I'm still confused about.  Do the meanings of the sentences above change if we use 'won't' instead of using 'wouldn't' ? can we use 'won't' in the place of 'wouldn't' without changing the meanings of the sentences above?  Note:This question is all about wouldn't vs won't or are they interchangeable or not)

I have asked many questions about "would" both in ELL and ELU. But I still have a question about the use of "would". I have recently asked a question which @Jay also answered. He used "wouldn't" in the following sentences: 1. Here, you wouldn't say, "May I ask you what is your name?" Though we break this rule for questions sometimes 2. Well, someone might say that in informal speech, but you wouldn't write it or use it in formal speech. 3. "May I ask you what's your name?" is awkward; a fluent speaker wouldn't say that.  I had asked  question in ELL and I have received answers for it. But there is one thing that I'm still confused about.  Do the meanings of the sentences above change if we use 'won't' instead of using 'wouldn't' ? can we use 'won't' in the place of 'wouldn't' without changing the meanings of the sentences above?


So in  question,  answer posted seems that it should totally be a comment but it is posted as an answer and has received a significant amount of upvotes, while the answer posted by  and  should receive more upvotes as they are the actual answers which support the OP’s requirements  So, is it that I am just greedy for more rep or what I am saying makes some sense?   P.S. First question on this site went through all the rules, hope I didn’t miss any tags.

One of the odd patterns I've noticed on SO goes something like this:   Person A asks a question. Person B very quickly delivers the minimum viable answer, with minimal explanation. B's answer starts to receive votes for being 'correct' even though it may not actually help the poster due to its sparseness. Person C started composing their answer at the same time as B, but instead delivers a detailed, well thought out reply with examples and explanations. They receive fewer points due to the time difference since they took longer to compose their answer. Person B then later edits their answer to include more detail to a similar quality as C's. People tend to be more generous with points to the earlier answer so the effect continues.   This strikes me as a cheap way of gaming the system for points by just making sure you have a 'correct' answer as soon as humanly possible to be available for votes.  My question is whether or not this is a behavior that should be discouraged or not, and if so - what could be done about it.  If there is a consensus that this is to be discouraged, I'd like to suggest that for very new question, for the first 15 minutes or so - answers given appear in a random order, and the number of points for each are not shown (except to moderators) and only the voting arrows appear - this would eliminate this kind of pattern I've identified and encourage higher quality answers out of the gate by eliminating order effects and the first poster advantage.


There is one account on my PC, "Administrator", without a password.   When I try to connect to it via RDP it says "Unable to log you on because of an account restriction".  I think that is because the account doesn't have a password.   I don't need password for my account. Can I somehow get around this limitation?

I am trying to make my main desktop be able to reboot right into the desktop without asking for a password, but I still want to be secure when I'm accessing it remotely. No one is ever going to physically touch my PC except me, but security is security dealing with Remote Desktop.   How can I enable RDP without having to type the password locally?


Let $ a+b\sqrt{-1} $ be a non-zero element of the ring of Gaussian integers $ \mathbb Z[\sqrt{-1}]. $ Show that $ | \mathbb Z[\sqrt{-1}]/(a+b\sqrt{-1}) |=a^2+b^2 $. [Jacobson, Basic Algebra, P202.3]   My attempt:   Since $ \mathbb{Z}[\sqrt{-1}] $ is a p.i.d. and we can factor $ a+b\sqrt{-1} $ into primes: $ a+b\sqrt{-1}=p_1^{j_1}p_2^{j_2}...p_n^{j_n} $, $\ p_i $ are primes in $ \mathbb Z[\sqrt {-1}] $, then we only have to prove the case for the primary quotient submodule in the following sense:  $$ | \mathbb Z[\sqrt{-1}]/(p_i^{j_i}) |=a^2+b^2\, ,\text{where $ a+bi=p_i^{j_i} $}. $$  From here I am stuck......

I used this isomorphism today but now I'm having trouble justifying it. The norm function isn't additive so I can't come up with a ring isomorphism to prove the following:     For any $\,a+bi\in\Bbb Z[i],\,\gcd(a,b)=1$, we have a ring isomorphism   $$\Bbb Z[i]/\langle a+bi\rangle\,\cong\Bbb Z/(a^2+b^2)\Bbb Z=:\Bbb Z_{a^2+b^2}.$$   Could someone show me an isomorphism between these rings to prove this?


I know that the minimum distance between any 2 segments is be 16 locations (10H) , but some say its 16 bytes , how is that possible if the the locations are of 2 bytes each. It would total to 32 bytes of minimum size for a segment.

If we can access (64*4) 256Kb of memory at a time in 8086 and you can move those segments around, what is the use of the remaining memory? Some say that we can move around the segments but what is the benefit of moving around the segments? Still we can't use the whole memory...


So, I messed up my windows 7 boot loader, and I'm trying to change my USB so that I can use it as you would use the Windows Recovery disk. I have the .iso for the recovery disk and I've changed the file system of my USB drive to FAT32 and extracted the .iso to my USB, but I the USB drive is still not being recognized as bootable media.  I see plenty of guides for windows, but none for doing this on Ubuntu. I've tried changing the boot order in my BIOS, and it still doesn't work. How can I get my USB drive to act like the Windows Recovery Disk?

I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?


The only way i've heard of is using the cron, but id rather do it ad hoc. Is there another way in bash?

I'm working on a Linux machine through SSH (Putty). I need to leave a process running during the night, so I thought I could do that by starting the process in background (with an ampersand at the end of the command) and redirecting stdout to a file.  To my surprise, that doesn't work. As soon as I close the Putty window, the process is stopped.  How can I prevent that from happening??


If someone edits a post of mine, and they have not commented on that post, I cannot ping them if I want to respond to or comment on their edit.  I can leave a comment and hope and pray and cross my fingers that they see it, but that only goes so far.  Could it be made possible to ping someone who edits a post, at least as an option to the author of the post (if not to everyone)?

How do the comment replies (aka "pinging users") work?  Who can I send an @reply to? How do I respond to a specific user when entering my comment? Will they be notified? What do people mean when they talk about "pinging" another user?  Related:


Given $f: \mathbb{R}^2 \to \mathbb{R}$ such that for all real $y$, $t \mapsto f(t,y)$ is a polynomial function and for all real $x$, $t \mapsto f(x,t)$ is a polynomial function, is it necessarily true that $(x,y) \mapsto f(x,y)$ is a polynomial function?

Let $ \mathbb{F} $ be an uncountable field. Suppose that $ f: \mathbb{F}^{2} \rightarrow \mathbb{F} $ satisfies the following two properties:   For each $ x \in \mathbb{F} $, the function $ f(x,\cdot): y \mapsto f(x,y) $ is a polynomial function on $ \mathbb{F} $. For each $ y \in \mathbb{F} $, the function $ f(\cdot,y): x \mapsto f(x,y) $ is a polynomial function on $ \mathbb{F} $.   Is it necessarily true that $ f $ is a bivariate polynomial function on $ \mathbb{F}^{2} $? What if $ \mathbb{F} $ is merely countably infinite?


Do I have to restart my world in order to get new features added to the game or does my world, before the update, gain the features on it's own?

I'm a new Minecrafter, and was wondering if new updates are backwards compatible. Specifically, will the new "Adventure Update" features (Beta 1.8) appear in existing worlds created with Beta 1.7 and earlier? Or will I need to create a new world for this version?


I  on an older laptop.  Everything seems to be working fine, except the Wifi.  The Wifi networks are not showing in the ifconfig output, nor in the UI.  The owner of the laptop said Wifi used to work before, when the laptop was running Windows 10.  Relevant output:  $ lspci | grep Wireless 03:00.0 Network controller: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter   I tried to restart the network-manager service, but that didn't solve it.  I feel like some drivers/modules are missing or have to be loaded, but I don't know how to do that.  How to solve this problem?    Note: Wireless was not working in the live USB as well. Wired connection does work.

I had this working on Elementary but then it stopped so I switched to Ubuntu and I still can not get this driver installed and working.   I followed this tutorial    As well as using the same install file but sudo bash install. I keep getting this error and output:   make -C /lib/modules/`uname -r`/build M=/home/alyson/Downloads/MT7630E-release/rt2x00 modules make[1]: Entering directory '/usr/src/linux-headers-4.4.0-28-generic'   Building modules, stage 2.   MODPOST 1 modules make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-28-generic' make -C /lib/modules/`uname -r`/build M=/home/alyson/Downloads/MT7630E-release/btloader modules make[1]: Entering directory '/usr/src/linux-headers-4.4.0-28-generic'   Building modules, stage 2.   MODPOST 1 modules make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-28-generic' cp -v firmware/*/* /lib/firmware/ 'firmware/BT/mt76x0.bin' -> '/lib/firmware/mt76x0.bin' 'firmware/Wi-FI/MT7650E234.bin' -> '/lib/firmware/MT7650E234.bin' cp rt2x00/mt7630e.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless/ cp btloader/mt76xx.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless/ depmod modprobe: ERROR: could not insert 'mt7630e': Required key not available   I am assuming this is a 16.04 issue, but I do not know enough to work around it or know how to find another driver. any help would be greatly appreciated ! :)


Given a set $\Sigma$ of letters, apply the Kleene star operation to it, and we get $\Sigma^*$, the set of all finite-length sequences from $\Sigma$, called strings (allowing a letter appearing more than once in a string).  If $\Sigma$ is empty, then $\Sigma^*$ consists only one string, the empty string.  If $\Sigma$ is not empty, then $\Sigma^*$ has an infinite cardinality.  I wonder if $\Sigma^*$ can be countably infinite? When will that be true? When $\Sigma$ is finite?  When will its cardinality is uncountably infinite?  Thanks!

Today in Coding/Cryptography class, we were talking about basic definitions, and the professor mentioned that for a set $A=\left \{ \left. a, b, \dots, z \right \} \right.$ (the alphabet) we can define a set $A^{*}=\left \{ \left. a, ksdjf, blocks, coffee, maskdj, \dots, asdlkajsdksjfs \right \} \right.$ (words) as a set that consists of all finite sequences of the elements/letters from our $A$/alphabet. My question is, is this set $A^{*}$ countably or uncountably infinite? Does it matter how many letters there are in your alphabet? If it was, say, $A=\left \{ \left. a \right \} \right.$, then the words in $A^{*}$ would be of form $a, aa, aaa, \dots$ which, I think, would allow a bijection $\mathbb{N} \to A^{*}$ where an integer would signify the number of a's in a word. Can something analogous be done with an alphabet that consists of 26 letters (Latin alphabet), or can countability/uncountability be proved otherwise? And as mentioned before, I am wondering if the number of elements in the alphabet matters, or if all it does is change the formula for a bijection.   P.S. Now that I think of it, maybe we could biject from $\underset{n}{\underbrace{\mathbb{N}\times\mathbb{N}\times\mathbb{N}\times\dots\times\mathbb{N}}}$ to some set of words $A^{*}$ whose alphabet $A$ has $n$ elements? Thanks!


I am working on a web site that will start off with hundreds of thousands of images in it to hopefully hundreds of millions.  Most of the images won't exceed 300K in physical size.  What is the best way to store these in PostgreSQL?  One thing I know for sure is that the system will be using schemas, partitions, and tablespaces to manage storage.

Alright, so I'm working on an application which will use a Linux back-end running PostgreSQL to serve up images to a Windows box with the front end written in C#.NET, though the front-end should hardly matter.  My question is:   What is the best way to deal with storing images in Postgres?   The images are around 4-6 megapixels each, and we're storing upwards of 3000.  It might also be good to note: this is not a web application, there will at most be about two front-ends accessing the database at once.


I have used my Stack Exchange account to login to a third-party site. Upon doing so, I was asked to authorize it to use my OpenID credentials from Stack Exchange.  Going to  I can change my password, but not see a list of places that I have granted access, and more importantly revoke it, like Google does here:   If I go to my profile page and click on "my logins", it shows only the credentials used to login on this site, not the ones issued to other sites.  Where can I find a list of sites that are using my StackExchange openID account?

I'm working on an app that integrates with Stack Exchange's OAuth interface, . I can approve the application, but can't figure out how to find the apps that I've approved.    How do I disable or at least view this after I've approved it?


I was in chat and clicked on a user's image to see the stuff under his name. This is what I saw:    At the very top is where I enter the URL. At the very bottom is where I enter the chat message. You can see that there is so much stuff in this user's chat "profile" that it overflows to the top. Scrolling does not revel it. It stays fixed on the page. I suggest that such instances keep the "profile" height at what ever the window's height is and overflows the rest. Or perhaps it can be absolutely positioned instead of fixed1.     Fiddling in the developer tools, I fixed it by changing position:fixed to position:absolute on .popup class and added position:relative to body in the css. Needs some work on the z-index though because it ends up on top of the area where you enter messages (#input-area).

So, I wanted to check what low-number rooms are still active so I joined a bunch of rooms in the chat.  This is the result:    Bug also exists when expending rooms on the side:    Since the position is fixed I can't scroll down.  Proposed fix:  Only show the first 10 rooms, and show ... pointing to the user's profile for other rooms.


There are numerous myths relating to grammatical dos and don’ts, many of which were drummed into us at school. The one that stubbornly refuses to budge from my mind is the diktat "never begin a sentence with a conjunction such as and or but" and "never end a sentence with preposition such as about, with, on, etc." but I would like to hear from all if it is perfectly natural to end a sentence with preposition in modern English?

When I learned English at school, I was taught that I should not end a sentence with a preposition.  Is it correct to end a sentence with a preposition?     To avoid starting a sentence with a conjunction, I don't write sentences similar to "I miss you. And your kisses." Is there a similar way to avoid ending a sentence with a preposition?


Here is the situation. I made a merge (commit 80d0e2b on the picture) of my branch and origin/master and pushed my changes to remote server. The merge appeared to be shitty and I decided to apply git reset HEAD~1 to remove it from server (yes, I was stupid). Now I ended up in situation, when some of the commits (for example, MOB-25) are not reachable from any branch and commit 2e4df35 is the referred as the last.  I thought about changing the point of origin/master to point to MOB-25 and then to apply fetch and make merge again.  I also found this thread advising to use reflog (), but I want to be 100% sure. What would be the best way to fix this mess?

Is it possible to undo the changes caused by the following command? If so, how?  git reset --hard HEAD~1


Consider $n$ points chosen uniformly and independently on the surface of a sphere with circumference  $1$ at the equator. What is the expected minimum (great-circle) distance between any pair of points?   If we considered a circle instead the answer would be $1/n^2$.

What is the expected minimum euclidean distance between $N$ points uniformly and independently chosen on the shell(sphere) of 3-D ball of radius $R$?   Note that the expected minimum distance might be difficult to compute, so a good lower bound is also fine.   My approach  I take the approach similar to this   .   Suppose we put $N$ circles of radius $r$ uniformly on the surface of the ball. Therefore we could compute the expected minimum distance by the following expression \begin{align} E[D]=\int_0^\infty P(D>t) dt. \end{align}  So, it remains to compute  $P(D>t)$. Actually, since we are after a lower bound on  $E[D]$ it is enought to give a lower bound on $P(D>t)$.  Let $S_i$ be the event that the pair of circles does not intersect which should be given by \begin{align} P(S_i) =  \frac{ Surf(R)-Surf(r)}{Surf(R)}= 1-\frac{  \pi r^2}{ 4\pi R^2}=1-\frac{ r^2}{ 4 R^2} \end{align}  Now the probability that euclidean minimum distance $D$ between $N$ balls is bigger than $t$ should be similar to  \begin{align} P[ D \ge t] \stackrel{?}{=}  P[ \cap S_i] \end{align} However, I think we somehow need to converte from the geodesic distance to euclidean distance but I am not very sure how to do that?


I'm new to function pointers and am getting hung up on syntax. What I'm trying to do is define, within a class, an array of functions to do string matching. The matching functions and their storing array will be static since they will be shared by all instances of the class. The functions are stored in an array so I can iterate through within match() and try different ones. Also, I'm trying to typedef the function pointer globally because similar matching functions will be used in many such classes. I've found some stuff suggesting that the signature should maybe be bool(Money::FP)(char str) but, if true, is there no way that I can define this globally (i.e. for classes other than "Money")?   The code below does not compile so please consider it as pseudocode for what I'm trying to accomplish.   Money.h:  typedef bool(*FP)(char* str);  class Money {  private:     static FP matchers[3] = {         Money::m1,         Money::m2,         Money::m3     };      static bool m1(char* str);     static bool m2(char* str);     static bool m3(char* str);  public:     static void match(char* str); };

What is the best way to initialize a private, static data member in C++?  I tried this in my header file, but it gives me weird linker errors:  class foo {     private:         static int i; };  int foo::i = 0;   I'm guessing this is because I can't initialize a private member from outside the class.  So what's the best way to do this?


I have a folder (let's name it main-folder and it's mounted via smb) that contains lots of files and subfolders. I want to copy half of the contents of main-folder to a local subfolder (let's call it my-folder). My problem is that one folder is common between main-folder and my-folder. And even though I have pressed the option key, I do not get the merge option.  I know I can use rsync and other similar commands which I've done lots of time. EXCEPT I can't use it this time as I am only copying half of the files/folders. Too tedious to write an exception list.  I was hoping for a similar behaviour when dragging files/folders in Windows Explorer.  Any ideas on how to make it work? Thanks a lot

Before Mavericks one could hold the ALT key and move a folder "A" onto a folder "B" where already an "A" existed. In this case Mac OS X asked in Lion if I want to merge - or on Mountain Lion if I want to keep both (which was also a merge).  I can't find this option in Mavericks.  Did Apple remove this useful feature?  Any hints?  (And yes: I own ForkLift, which can do it - I just sometimes still prefer the Finder).


I'm trying to grep a file in order to find a line containing this text: "-m". I've created this file to test this issue: echo "min-value: 2" >> test.txt echo "original-matrix: 10" > test.txt echo "total-points: 55" >> test.txt  When I run this command I get that error: filizaum@asus-pc ~ $ echo test.html | grep "-m" grep: option requires an argument -- 'm' Usage: grep [OPTION]... PATTERN [FILE]... Try 'grep --help' for more information.  How can i grep with that string?

sudo find / -name "*" | xargs grep -sn --color=auto "-j"   Above command returns below:  grep: invalid option -- 'j' Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more information. ...   How do I search for string -j?


I am starting to write my master thesis in latex. So far I have only written article-like texts, so this is my first big document.  I would like to start with some good general good practices. Specially since I might go into academia and pursue a PhD.  What are good principles to keep in mind?. For example, do you have one single huge tex file, or do you have several smaller files for each chapter?

I have 3 months to write a PhD thesis in French. I have a good level in LaTeX (wrote several memoires and many articles), however, I would like to know if you have any suggestions concerning good practises for this kind of work (more than 100 pages, figures, tables, bibliography, footnotes...)  What would be great would be to share a heading file, including all packages that will be needed during the writing.  I give you what I came up with:  \documentclass{book} \usepackage[utf8]{inputenc} \usepackage[frenchb]{babel} \usepackage{lipsum}   \begin{document} \chapter{Chapter 1} \section{A section} \lipsum[1-10]  \chapter{Chapter 2} \section{Another section} \lipsum[1-10] \end{document}   I also noticed this excellent link:   Any other suggestion is welcome.


I would like to ask the following question, please. I am using Beamer for a presentation. At the top right of each of my slides appears a logo. However, I am looking for a possibility to exchange this logo half way through my talk as the university/institution changed.  I used the code   \addtobeamertemplate{frametitle}{}{% %\begin{textblock*}{100mm}(-0.03\textwidth,0.76\textheight) \begin{textblock*}{100mm}(0.92\textwidth,-0.15\textheight) \hskip0.1cm\pgfuseimage{institute-logo}\hskip0.1cm \end{textblock*} }   In the meantime I managed to do:  I managed to do this (skipping the option to have the logo in the top right part of the frametitle)      \newif\ifplacelogo % create a new conditional     \placelogotrue % set it to true     \logo{\ifplacelogo   \pgfputat{\pgfxy(-6.25,-0.25)}{\pgfbox[center,base] {\includegraphics[height=15pt,keepaspectratio]{Logos/logo1.pdf}%     \hspace{\dimexpr\paperwidth-2cm-50pt}%      \includegraphics[height=15pt,keepaspectratio]{Logos/logo2.pdf}}}     \else  \pgfputat{\pgfxy(-0.4,-0.25)}{\pgfbox[center,base]{\includegraphics[height=30pt,keepaspectratio]{Logos/main-blue-CMYK.pdf}}}     \fi} % replace with your own command   But I encountered another challenge: What do I do, if I want a slide without a logo? Currently I only have two options, false, true. How do I incorporate a third, please? Okay, found it: local definition via \nologo \newcommand{\nologo}{\setbeamertemplate{logo}{}}  Thank you for your help and ideas.

I am making a presentation which is devided in two parts. The first part is about experiments held in instute A and the second part is about experiments held in instute A and institute B.  Is it possible to add a second logo in a beamer presentation after a certain frame?  Let's say that this is a previous slide    This is a next slide


How can i generate serial key for the C# Desktop Application (Windows application) ?  E.g. Software expires after a month. (Trial version).  If user changes Machine time then hoe could it be possible to validate the software for the specified time ?

How can I create a product key for my C# Application? I need to create a product (or license) key that I update annually.  Additionally I need to create one for trial versions.  Related:


Proving one way is very simple  If n is a perfect square then  n = $a^2$  $n^7$ = $a^{14}$  $n^7$ = $a^7$($a^7$) which is obviously a perfect square for some integer a.  It's the if $n^7$ is a perfect square then n is a perfect square part that is giving me trouble. I have already tried to get hints from others and the one hint I was given was to write $n^7$ as a product of primes, but I have no clue where to go from there. I believe it can be done using modulus but I honestly have no idea.  Any hints would help thanks.

If $ a$, $ b$, $ x$, $ y$ are integers greater than $1$ such that $ a$ and $ b$ have no common factor except $1$ and $ x^a = y^b$ show that $ x = n^b$, $ y = n^a$ for some integer $ n$ greater than $1$.  I started this way: $x^a=y^b$ $=>$ $x=y^{b/a}=(y^{1/a})^b$. Thus $x$ is an integer, and so is $y^{1/a}$, so $y=n^a$ for some integer $n$ greater than $1$. Then from the given relation, we get $x=n^b$.   I am not very convinced with my solution, as I feel I did some mistake. Can anyone point out where the mistake is? Any other solution is also welcome :)


I am learning Java rest webservices using Jersey Framework.  Created one sample project in eclipse but not able to deploy it in tomcat. Below libraries added in eclipse project. Can anyone please help me out here  cglib-2.2.jar hk2-api-2.3.0-b06.jar hk2-locator-2.1.63.jar hk2-utils-2.5.0-b04.jar javassist.jar javax-inject.jar javax.annotation-api-1.2.jar javax.ws.rs-api-2.0.jar javax.ws.rs.jar jersey-bean-validation-2.17.jar jersey-client.jar jersey-common.jar jersey-container-servlet-core.jar jersey-container-servlet.jar jersey-guava-2.7.jar jersey-media-jaxb.jar jersey-server.jar validation-api-1.0.0.GA.jar  Getting below error while running project in Apache server inside eclipse.         SEVERE: StandardWrapper.Throwable     java.lang.NoSuchMethodError: org.glassfish.hk2.utilities.AbstractActiveDescriptor.<init>(Ljava/util/Set;Ljava/lang/Class;Ljava/lang/String;L     java/util/Set;Lorg/glassfish/hk2/api/DescriptorType;Lorg/glassfish/hk2/api/DescriptorVisibility;ILjava/lang/Boolean;Ljava/lang/String;Ljava/     util/Map;)V         at org.jvnet.hk2.internal.ConstantActiveDescriptor.<init>(ConstantActiveDescriptor.java:113)         at org.jvnet.hk2.internal.Utilities.getLocatorDescriptor(Utilities.java:951)         at org.jvnet.hk2.external.generator.ServiceLocatorGeneratorImpl.initialize(ServiceLocatorGeneratorImpl.java:71)         at org.jvnet.hk2.external.generator.ServiceLocatorGeneratorImpl.create(ServiceLocatorGeneratorImpl.java:96)         at org.glassfish.hk2.internal.ServiceLocatorFactoryImpl.internalCreate(ServiceLocatorFactoryImpl.java:270)         at org.glassfish.hk2.internal.ServiceLocatorFactoryImpl.create(ServiceLocatorFactoryImpl.java:230)         at org.glassfish.jersey.internal.inject.Injections._createLocator(Injections.java:138)         at org.glassfish.jersey.internal.inject.Injections.createLocator(Injections.java:123)         at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:330)         at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:392)         at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:177)         at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:369)         at javax.servlet.GenericServlet.init(GenericServlet.java:158)         at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)         at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5253)         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5543)         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)         at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)         at java.util.concurrent.FutureTask.run(Unknown Source)         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)         at java.lang.Thread.run(Unknown Source) enter code here

I'm getting a NoSuchMethodError error when running my Java program.  What's wrong and how do I fix it?


If $f: \mathbb{C} \rightarrow \mathbb{C}$ is holomorphic and $|f(z)| \geq 1 \space \space \forall z \in \mathbb{C}$, show that $f$ is constant   I have attempted to prove this, but I am not sure if my proof is correct. I tried to follow the proof of Liouville's Theorem to do this:  Since $f$ is holomorphic, by Taylor's Thm, we have that $\forall z \in \mathbb{C}$ and $R>0$,   $$f'(z)  = \frac{1}{2\pi i} \oint_{|w-z|=R} \frac{f(w)}{(w-z)^2} dw$$ Now using the estimation lemma, $$\left|f'(z) \right|\leq \frac{1}{2\pi} \oint_{|w-z|=R} \frac{|f(w)|}{R^2} |dw|$$ Then   $$\left|f'(z) \right|\leq -\frac{1}{2\pi R^2} \oint_{|w-z|=R} -\space|f(w)| |dw|$$ $$\leq-\frac{1}{2\pi R^2} \oint_{|w-z|=R} 1 |dw| = -\frac{1}{R}$$  Letting $R\rightarrow \infty$, we have $f'(z) = 0 \space \forall z \in \mathbb{C}$, i.e. $f$ is constant.   Is this correct?

I know I'm going to use Liouville's Theorem, but my main question is why is $1/|f(z)|$ entire as well if $f$ is entire? Is this just a basic property: if $f$ is entire, then $1/f$ is entire? Thanks for the help.


I have a stack of cards and want to know how many cards are in the stack at any given time.  Any thoughts on how I might be able to do this?  Would it be possible for me to put a tag on every card and then use some type of sensor below the cards which could count the tags above it? The cards are suspended from rings like this:    While there was a prior question that was similar, it does not appear there were any answers that came out of that question.

We are attempting to electronically determine which of 10 cards, numbered 1-10, is currently in front of a stack.  Initially card 1 is in front.  Eventually card 1 will be flipped around to the back of the stack, and card 2 will then be in the front.  Then card 2 will be flipped around to the back of the stack and card 3 will be in front.  This process repeats for all cards labeled 1-10.   These cards will be viewed by people so we are looking for a solution which won't require a device positioned in front of the cards (such as a barcode scanner).  These cards will also be outdoors making any type of IR sensor not possible.  Does anyone have any ideas on how we can detect which card is in front?  See an example image:  ()


In a Java program, I want to display a JFileChooser where the user selects just a directory name where multiple output files will be written. So mychooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY), that's easy enough. But I'd like to fill in a default directory name. And JFileChooser doesn't appear to allow me to do that. I wrote this:         File newdir=new File(newdirname);         JFileChooser chooser=new JFileChooser(newdir);         chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);         int reply=chooser.showSaveDialog(Captions.home);  I was expecting that it would display the parent directory for newdir with the full path to newdir filled in. But instead, if newdir does not already exist, it shows my documents directory. I don't want to create newdir before calling the JFileChooser because the user might not take the default. I suppose I could create it and then if the user chooses something else delete it, but that seems rather goofy. Is there a clean way to do this? Note that I am NOT asking how to set a default FILE name. I am asking how to set a default DIRECTORY name. Someone closed this question as a duplicate of one asking about setting a default file name. But the method for setting a default file name DOESN'T WORK for setting a default directory name. Maybe there's some additional trick to make it work with a directory name. If so, that's what I'm asking.

The JFileChooser seems to be missing afeature: a way to suggest the file name when saving a file (the thing that usually gets selected so that it would get replaced when user starts typing).  Is there a way around this?


A sci fi anthology had a short story about a time traveler who invented a machine that may have caused a catastrophic event by its use.  The traveler from the future showed up to the front porch of his earlier self to warn his earlier self of the impending doom.  The world on the horizon behind the future self was being consumed.  The earlier self asked the future self just how far into the future he had come with his time machine.  "About five minutes..."  the man on the porch said, "Not far enough."

I am looking for a veryshort story from the 1960s about a time traveller who travels back in time fifteen minutes only to tell the person he meets that the amount of energy it took to propel him back in time destroys the universe.


I currently have a C# class that appears as follows:   namespace DBModel {     using System;     using System.Collections.Generic;     using System.ComponentModel.DataAnnotations;     using System.ComponentModel.DataAnnotations.Schema;     using System.Data.Entity.Spatial;      public partial class ConnSrv     {         public int ID { get; set; }          [Required]         [StringLength(14)]         public string Service { get; set; }          [Required]         [StringLength(14)]         public string ConnectsToService { get; set; }          public virtual Service Service1 { get; set; }          public virtual Service Service2 { get; set; }     } }   In my main program, I'm creating hashsets to work with these objects. The problem I'm encountering is that I would like to be able to use operators such as Contains, Except, ExceptWith, UnionWith, and so on on these hashsets.  For an object of the ConnSrv to be considered "equal", the Service and ConnectsToService values have to be equal. As such, I realize that in some way, I will have to override the Equals and GetHashCode operators for the class. I'm just not sure how to do so, whether it's through a straight override of the object class, by implementing IEquatable or IEquatable, or through some other method. Below are a couple simple examples of what I would expect the end result to be once implemented. If I'm way out in left field, please let me know. Thanks in advance for your time.          var testHS1 = new HashSet<ConnectingService>();          testHS1.Add(test1);         testHS1.Contains(test2); // Returns true          var testHS2 = new HashSet<ConnectingService>();          testHS2.Add(test1);         testHS2.Add(test2);         testHS2.Add(test3);          testHS2.Except(testHS1); // Expect end result to only contain test3

I came across this recently, up until now I have been happily overriding the equality operator (==) and/or Equals method in order to see if two references types actually contained the same data (i.e. two different instances that look the same). I have been using this even more since I have been getting more in to automated testing (comparing reference/expected data against that returned). While looking over some of the  I came across an  that advises against it. Now I understand why the article is saying this (because they are not the same instance) but it does not answer the question:  What is the best way to compare two reference types? Should we implement ? (I have also seen mention that this should be reserved for value types only). Is there some interface I don't know about? Should we just roll our own?!  Many Thanks ^_^ Update Looks like I had mis-read some of the documentation (it's been a long day) and overriding  may be the way to go..  If you are implementing reference types, you should consider overriding the Equals method on a reference type if your type looks like a base type such as a Point, String, BigNumber, and so on. Most reference types should not overload the equality operator, even if they override Equals. However, if you are implementing a reference type that is intended to have value semantics, such as a complex number type, you should override the equality operator.


OK so I was writing a sentence to explain that there are three holes at the same angular position on a wheel (different radii).  I started to write; 'there are more than one hole at each angular position...' But... it sounds wrong. Don't you agree? 'There is more than one hole...' sounds much better.  The construction 'there is' or 'there are' is used to indicate existence of a single thing or a plurality of things (countable nouns) respectively.  In this case, it seems that the thing that you are indicating the existence of is whatever 'more' is referring to, not the 'one'. Which is, in this case, two holes (on top of the first, three in total). So why does it sound so bad?  If there were two holes in total, then sure, 'there is more than one' would make sense, since the 'more' is one hole.  Is there some kind of special rule in English to say that we always say 'there is more than one' because there is at least one more?  Otherwise, why would we say 'there is' when referring to a plural, countable noun like in the above example?

While adding to an Answer to  question, I needed to use the above phrase, and I suddenly realised I was unsure whether to write "is" or "are".   There is more than one way to skin a cat. If there are more than one species of cat, we will flay each species differently.   I don't think that second example above sounds quite right to me (disregarding the meaning - sorry!), but in my original Answer I felt "is" would have been even worse.  Is "are" always wrong here? If so, what exactly is the rationale? If not, is there a case where it's unquestionably preferred – and why is that?    Note that in both the problematic Answer and my example attempting to mimic the same context more briefly, the writer doesn't know how many there are. There may be one, more, or even none.  Getting even more specific, the writer might have an opinion on how many there might be, and wish to convey his leanings by choice of verb form if language allows this to be done succinctly.


I'm a prospective graduate student in political science with a strong GPA and research interest in climate change and environmental conflict. My challenge is that I have been finding it difficult to get into a PhD programme. I have been applying since 2018. This year I hoped I would get into my desired choice but I was rejected due to my low GRE score. I don't want to take the exam again but political science departments seem to strongly value high GRE scores.  What can I do to improve my chances of acceptance?

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


How can I trim this wall to the roofline? Thanks in advance.

I have a problem I have been tied up all the day with and I haven't solved yet. I am trying to cut the walls of this house along the inclined pitches of this house. Any ideas? I have tried almost all, add-ons, boolean operations etc.  I think that the best way in this case would be to cut the vertical walls along the intersection between the roof and the walls themselves (pic. 1). Another option would be to extend the walls up underneath the pitches, but as you can see there are different heights and there are no snapping points to use and this is so annoying ;) Please be quite clear because, in spite of my age, I am a newbee. Thanks.


Today I was trying to measure the rectified SMPS incoming power supply ( 315VDC) using a tektronix TDS 3932C oscilloscope with P6139A  probe. Every time the ground-probe touches the ground of the supply, the power supply rectifier diode is getting damaged. I assumed it may be related to earth fault current, but both equipment supplies are properly earthed.  I need some advice here.  Eqpt :Tektronix TDS 3932C Digital Phosphor Oscilloscope 300 MHz Probe used: P6139A , 500MHz, 8 pF ,10 MOhms, 10x  Edited I want to check the pwm controller IC O/p waveform with the oscilloscope, the Vcc of the IC itself is tapped from the rectifier supply, and I am unable to use the oscilloscope.

I built a simple bridge rectifier.         – Schematic created using   I connected the output of the function generator with CH1 of my oscilloscope and  with the input of the rectifier (using a T-Piece). The output goes into CH2.   The original wave looks like this:    After connecting CH2 the picture looks like this:   While CH2 looks good,  CH1 now shows the wave I would expect without capacitator but not the expected original wave.   Could somebody explain why? I'm using a Gwinstek GDS-1072A-U Oscilloscope and a Gwinstek SFG-1003 function generator.


I want to remove / hide "sharepoint suite bar ribbon and header" ? It is the yellow part in my hardcopy. Is there a way to do it ? Best Regards, Pierre

I have a Sharepoint online page on which I would like to remove the blue navigation bar at the very top of the screen (the one with the seach bar in the middle and the button on the left with 9 dots to switch to different Microsoft apps). I have checked all of the header settings and also went into the site settings and modified the search settings. I was able to exclude the site from search results, however the blue bar still remains. Is this possible to remove in a default SharePoint online site without using custom CSS or anything like that?


My iPhone 3G is growing old -- yesterday I noticed that it didn't make any sounds anymore, and phone calls also muted (I heard nothing, other party didn't hear me either). It turns out that the phone erroneously thinks that a headset is plugged in. I noticed because the volume control popup shows "headset."   When I actually plug my headset in, everything works as expected. But unplugging the headset doesn't register on the phone; it stays in headset mode.  It seems that there's a small hardware switch that notices the plug, and this switch has failed.   Can I somehow clean the switch? Perhaps it's not broken, just dirty. Can I take the phone apart myself (warranty is long gone), or should I have it repaired?   Looking at iFixit, it seems I would have to completely dismantle the phone to get to the jack (). I'm not sure that's feasible for the layman, with any hope of it working again afterwards?    I realize that the phone's value is less than any repair would cost, so it's a matter of whether I can fix this myself, or need to spend €€€ on a replacement phone.

I have a pair of Sol headphones that would always fit into my iphone until recently I realized that my iPhone didn't have any sound coming out of the internal speakers.  It was my headphone jack that is causing the issues and i just cleaned it out but now its not working and the sol headphones I mention just don't fit into my iPhone. I barely get the tip in and nothing else can go through and im not trying to force it in.   How do i fix this?


Should I use make or makes in the following sentence?      David’s friendly demeanour, brilliant sense of humour and warmth, make you feel right at home.     I say make, but my friend says makes.

Can anyone tell me if I should use inspire or inspires in this phrase?     An extraordinary leader whose vision, values, integrity and boundless curiosity inspires all who follow in his footsteps.


Scenario: You're going to buy a/an SSD.  Do you use "a" or "an" before an abbreviation that is pronounced with a vowel first, but written with a consonant first?  When spoken, you would say "an ess-ess-dee", but when written, should you use "a SSD" because there's actually a consonant as the next letter?

Possible Duplicates:             Since SSD (solid-state drive) is pronounced es-es-dee, I'm wondering whether one should write "an SSD" or "a SSD". Saying "a SSD" out loud feels a bit off...


Similar to sheep.   Look at that sheep. Look at those sheep.  Look at that prius. Look at those prius.  Sounds right.

, and why?   A Latin professor would say Prium’s the best...


We all know that notification 'Drive X was not ejected properly'. I have a laptop, which I use regularly at my desk with monitor etc, as well as on the go. I want to be able to back up my data to an external drive, so I've got a 1 TB drive connected via a USB hub alongside my mouse an keyboard.  It's a real pain trying to remember to eject the disk before I unplug the laptop to take it somewhere. Especially when I'm in a hurry I often forget. I've seen that notification countless times when pulling out thumb drives but nothing ever happened so I stopped taking it seriously.  That is, until my backup drive got corrupted. It's now in a state where disk utility consistently fails to reformat it and time machine can't write to it. I have two other USB devices this has happened on, but they were fairly old ones I used infrequently so I assumed something else had made them fail.  Why does OS X require users to be so careful ejecting drives? Both Windows and Ubuntu (the other two OS's I've used) seem to handle this fine. Is there a way that I can have this drive consistently connected so that backups happen automatically, but that I don't have to worry about the drive being damaged?

Is it necessary or recommended practice to eject external drives before logging out, restarting, or shutting down? (The drives are not being unplugged.)  BTW, I am aware that I need to eject my external drives before unplugging them, I just don't know if it's necessary when logging out or shutting down. It seems to me this should be obvious, but I can't find an explicit answer to this question anywhere. I am interested in answers for Snow Leopard, Lion & Mountain Lion OS versions, as I have 2 machines, one with Snow Leopard, the other with Lion, & I'll soon be upgrading Lion to Mountain Lion.


Recently I've been experiencing my internet connection being lost. The yellow triangle signals no internet connection and then picks it up again after a couple of seconds. It could be that it's been doing this for some time. I first noticed it after I started playing an MMORPG, and it annoys the hell out of me every time it happens. The intervals range from 5-45 minutes. When streaming/downloading it occurs more frequently. Sometimes it doesn't even pick up the connection and just refuses to cooperate.  I've got a web server running, but it shouldn't affect my connection. At least it didn't on Windows XP.   I've got a static IP address. I've tried letting it dynamically get the IP address but that doesn't make any difference.  At one point, I thought it could be that the modem/router got overheated or something.  So, I turned it off for a day to see if it would help. It didn't.  I removed the router out of the equation and put the cable directly into the modem.  That did seem to work, but my web server stopped working.  I'm at wits end here...    Relevant specs:              OS: Windows 7 Professional         Modem: Netgear DM111P        Router: Netgear WGR614 v7, software up to date Networks card: Realtek PCIe GBE Family Controller, all drivers up to date           ISP: Bredbandsbolaget (Sweden)   Analysis from the university of Berkeley's website Networks analyzer reported the following problems:  Direct probing of DNS resolvers (?) –     Your system is configured to use 1 DNS resolver(s).     The resolver at 192.168.1.1 (ns6.bredband.com) could not process the following tested types:          Medium (~1300B) TXT records         Large (~3000B) TXT records         Large (~3000B) TXT records fetched with EDNS0      It validates DNSSEC. It does not wildcard NXDOMAIN errors. The resolver reports a number of additional properties. Hide them.          Hostname: ns6.bredband.com         Version: Telenor DNS

We have a Comcast 50/10 line into our office.  We keep seeing very short but sometimes frequent drops in our internet service.  It's enough to kick you off of skype and stop any websites from loading, which is obviously affecting our productivity.   We've tried 4 different routers, we've tried moving everyone off of wireless and onto wired via a switch and so far nothing has helped.  Right now we're on a Cisco SB WRP400-G1 router.  Attached to the router is a 16 port switch going to the ports in all of the offices. We've moved to OpenDNS in the case that it was the comcast DNS servers going down. Today we tried putting the modem, router, and switch on a UPS to make sure it wasn't power fluctuations that was causing it.   Every time we call Comcast, by the time they are here the internet is working fine.    I'd like to somehow prove that the problem is with Comcast, so if that means plugging in a machine directly into their router and collecting data all day, I'm up for that.  I just want to hear ideas on what tools to run and how to collect this data.  I could just continuously ping google.com all day long but I'm not sure how valuable that data would be.  Thoughts?


when a gas like hydrogen is heated it shows discrete line in its emission spectrum but in case of solids we see a continuous spectrum why it is so???i have searched it on internet and some people says that solids also shows line spectrum but the difference in energy levels of electrons in solids is very less so it shows very dense line which our eyes cannot detect? if is it true then how black body absorbs all the frequency of radiation and emits also it should emits energy only of discrete frequencies?

By conservation of energy, the solid is left in a lower energy state following emission of a photon.  Clearly absorption and emission balance at thermal equilibrium, however, thermodynamic equilibrium is a statement of the mean behaviour of the system, not a statement that the internal energy is constant on arbitrarily short timescales.  The energy has to come from somewhere during emission, and go somewhere during absorption.  Energy in a solid can be stored as kinetic and potential energy of electrons and nuclei, either individually or in collective modes such as phonons and plasmons.  In thermal equilibrium energy will be stored more or less in various forms depending on the temperature and material.  However, even if most of the thermal energy in a particular solid at temperature $T$ is stored in the form of phonons, it could be that phonons primarily interact with light indirectly via electrons, e.g. a phonon excites an electron in a phonon-electron interaction, which can interact with light via the EM field.  Given that light is an EM field, it makes sense to me that it is emitted and absorbed by charged particles.  The electron-photon interaction is probably dominant for visible and ultraviolet light, given that metals are opaque, while semiconductors and insulators are transparent to (visible and UV) light with energy lower than their bandgap. However, once you get into energies in the IR and below, or X-rays and above, other mechanisms apparently take over.  For example, on the high-energy end of the spectrum I've heard that gamma rays can interact directly with nuclear degrees of freedom, which is reasonable considering that gamma rays are emitted during a lot of nuclear reactions.  A review of  might give clues to important light-matter interactions over a broad range of wavelengths.  Whether all of the these processes are involved in blackbody emission is a somewhat different question.  What physical processes mediate energy transfer during blackbody emission, and in which energy ranges are the various processes dominant?


I am trying to mirror across the global YZ plane, so have been using the mirror tool set to the X axis. My pivot point is set at the 3D cursor at the origin. However, when I mirror, the mirrored object is in the right location but its orientation is wrong. It is not mirroring across the right plane. I tried using global axes as the mirror reference or the 3D cursor (Set at the origin). In the attached screenshot is a photo of what is happening (3D objects) versus what I want (drawn in red)

I am trying to mirror an object and the original is symmetrical along all axis, but when I attempt to mirror across the y axis, the mirrored side is tilted to a different angle.


The count shown on the Area 51 topbar sites-switcher tooltip (hover over Stack Exchange logo on the top-left) is missing the count of Stack Exchange Network sites.  Area 51 topbar sites-switcher tooltip says:     A list of all Stack Exchange sites   Whereas, on StackExchange.com it says "A list of all 154 Stack Exchange sites" and most of the subdomains i.e. *.stackexchange.com shows "A list of all 149 Stack Exchange sites".  But, as for the Area 51 tooltip goes, it's totally missing the count.  Here is the screenshot of it:        Can anyone please explain this?  P.S. My original question was marked  by Shadow Wizard. But it was not exactly duplicate. I have removed the duplicate content from this question. Please note that  is about the difference in number of communities on Stack Exchange site whereas my question is about "missing count".

I assume the difference in the number of Stack Exchange sites/communities is a mistake... correct?


I know it’s possible to do this  when the device is wired to the Mac (using Quicktime’s record audio), but I haven’t found a way to do it wirelessly.

I don't have an AppleTV (yet), but I do have a Mac Mini hooked up to some decent speakers.  Is there something I can run on it, so that it acts like an Airplay audio receiver?  (Video support isn't important to me.)


I cannot figure out why lines are not being showed on the shaded columns. Can I get a little help finding what is wrong?     EDIT: The MWE follows:  \documentclass[12pt, a4paper]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage {setspace} \doublespacing  \usepackage{fullpage} \usepackage{graphicx, pdflscape} \usepackage{tikz} \usepackage{colortbl}    %for shading* \usepackage{pifont}    %for pointing hand \usepackage{arydshln}    %for dashed lines \begin{document}  \begin{center} \renewcommand*\arraystretch{1.2} \scalebox{1}[1]{\begin{tabular}[t]{|rrl||c|c|c|} \hline  \multicolumn{3}{|c||}{kesaks} & CF & CS & F \\[0.5ex] \hline \hline a. & \ding{43} & kesaks & $\ast$$\ast$ & \cellcolor{lightgray} & \cellcolor{lightgray} \\ \hline b. & & gesaks & $\ast$$\ast$$\ast$! & \cellcolor{lightgray}$\ast$ & \cellcolor{lightgray}$\ast$ \\ \hline c. & & gezaks & $\ast$$\ast$$\ast$!$\ast$ & \cellcolor{lightgray}$\ast$$\ast$ & \cellcolor{lightgray}$\ast$$\ast$ \\ \hline d. & & gezags & $\ast$$\ast$$\ast$!$\ast$$\ast$ & \cellcolor{lightgray}$\ast$$\ast$ & \cellcolor{lightgray}$\ast$$\ast$$\ast$ \\ \hline  e. & & gezagz & $\ast$$\ast$$\ast$!$\ast$$\ast$$\ast$ & \cellcolor{lightgray} & \cellcolor{lightgray}$\ast$$\ast$$\ast$$\ast$$\ast$ \\ \hline \end{tabular}} \renewcommand*\arraystretch{1} \end{center}  \end{document}

I'm using the xcolor package to colour the top row in a table. This is displayed properly using PDF viewers such as Preview or Skim (Mac). But using Adobe Reader 10.1.3 (either Windows or Mac) doesn't display the table line properly.   But removing the colouring for the table fixes it. Here is the example that works as expected:  \begin{table} \caption{Table showing Feature 5's Functional Tests} \hspace*{-0.5in} \begin{tabular}[h!]{|p{0.6cm}|p{4cm}|p{5cm}|p{4cm}|p{1.5cm}|} \hline {\bf Test ID } & {\bf Task } & {\bf Expected} & {\bf Actual} & {\bf Outcome} \\ \hline    5.1 & Something &  Something & Something &  Success \\ \hline    5.2 & Something &  Something & Something &  Success \\ \hline    5.3 & Something &  Something & Something &  Success \\ \hline    5.4 & Something &  Something & Something &  Success \\ \hline \end{tabular}  \end{table}   And here is the example with a coloured row:  \begin{table} \caption{Table showing Feature 5's Functional Tests} \hspace*{-0.5in} \begin{tabular}[h!]{|p{0.6cm}|p{4cm}|p{5cm}|p{4cm}|p{1.5cm}|} \hline \rowcolor{gray!25} {\bf Test ID } & {\bf Task } & {\bf Expected} & {\bf Actual} & {\bf Outcome} \\ \hline    5.1 & Something &  Something & Something &  Success \\ \hline    5.2 & Something &  Something & Something &  Success \\ \hline    5.3 & Something &  Something & Something &  Success \\ \hline    5.4 & Something &  Something & Something &  Success \\ \hline \end{tabular}  \end{table}   Removing the \rowcolor{} command replacing it with \cellcolor{} creates the same view. Any idea how to fix this?  I've tried printing it out of Adobe and the lines print fine, but as this will be read on as a soft copy it's pretty important. .  Any idea how to fix this?


I am trying to call intent I set putExtra in first Activity as follows. In first activity  public void onClick(View v) {     int position = getAdapterPosition();     final Intent intent;     intent = new Intent(c, WhenCardClicked.class);     intent.putExtra("title",titles[position]);     intent.putExtra("desc",details[position]);     intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);     c.startActivity(intent); }   In WhenCardClicked.java  protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_when_card_clicked);     Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);     setSupportActionBar(toolbar);      TextView textView = (TextView) findViewById(R.id.title);     TextView textView1 = (TextView) findViewById(R.id.desc);     String title ="";     String desc = "";     title = getIntent().getExtras().getString("title");     desc = getIntent().getExtras().getString("desc");     Log.d("Debugtext", title+" "+desc);     if(title != null)textView.setText(title); }   In content_card_demo.xml  <TextView     android:layout_width="wrap_content"     android:layout_height="wrap_content" android:id="@+id/title"/> <TextView     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:id="@+id/desc" android:layout_below="@+id/title"/>   I am calling intent in first activity. But I am getting      Null pointer exceptioava.lang.NullPointerException: Attempt to invoke   virtual method 'void   android.widget.TextView.setText(java.lang.CharSequence)' on a null   object reference at   quickbook.com.recyclerlayout.WhenCardClicked.onCreate(WhenCardClicked.java:28)

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 need to create a pop up message on one of our visualforce pages which when the user tries to leave the page or exit the browser when data has been inputted into the inputfields and hasnt pressed the save button,   i only need the pop up to appear in those 2 instances and not really sure where to start with this, anyone can point me in the right direction would be very handy   thanks

Question: How to pop-up alert to a user when he/she navigate away from page without saving the Records in custom visual force page?  Details:  I have a custom visual force page i.e. "My Members" that have the following code:  <apex:page Controller="MyMember" > <script>  function mytest() {  if (!confirm('Are you sure to naviagte without saving Records?')) {   }  else {return true;} }  window.onbeforeunload = mytest(); </script> <apex:form id="form">    <apex:pageblock title="Member List" >  <apex:pageBlocktable value="{!CheckSelectedList}" var="memLst" > <apex:column title="Select" > <apex:inputCheckbox value="{!memLst.checked}" ></apex:inputcheckbox> </apex:column> <apex:column headerValue="Name" > <apex:actionRegion > <apex:outputField value="{!memLst.KeepSelected.Name}" > <apex:inlineEditSupport event="ondblClick" showOnEdit="btnSave,btnCancel" hideOnEdit="btnAddSession" /> </apex:outputField> </apex:actionRegion> </apex:column>  </apex:pageBlocktable>  <apex:pageblockButtons> <apex:commandButton value="Save" action="{!save}" id="btnSave"  style="display:none" />  <apex:commandButton value="Cancel" action="{!cancel}" id="btnCancel"  style="display:none" reRender="PanelId" /> </apex:pageblockButtons>   </apex:pageblock> </apex:form> </apex:page>   In my VF Page, I have a in-line edit support enable.  The issue is:  Whenever, I want to alert user when they edit records and navigate without saving the record using JavaScript (Please see above the JavaScript code I was trying). It doesn't seem to be working. Am I missing anything? Is it possible to do this using only JavaScript in Customer Visual Force Page? Need: I want when user edit the Record and leave the page without saving my function will execute and show the pop-up message.   My thoughts:  I was also thinking to execute my JavaScript function by using apex class? Should it be possible? Or any other technique how to invoke popup when the user navigate without saving the Edit records?


I have a raspberry pi 3 webserver.   When user gets into my app. App is sending a post request to my server every second to check if there are any messages for user.   The query is simple: SELECT message FROM messages WHERE id=id  I'm using innodb and node js for handling post requests.

This is a  about capacity planning for databases. Related:      I'm looking to create a canonical question of tools and methods of capacity planning for databases. This is intended to be a canonical question. Obviously, the general workflow is:  Put your scenario in place Add monitoring Add traffic Evaluate results Remediate based on results Rinse, repeat until reasonably happy  Please feel free to describe different tools and techniques for different web-servers, frameworks, etc., as well as best-practices.


We tried to get the information on How many recipients we can add in the recipients in Email alerts.  FYI, This is WRT Recipient field on email alerts i.e. users/opptyteam/owner/creater etc.

Could you please clarify my below queries on email alert which we have under workflow   How many recipients can i add under email alert? Can i add group emailID (Eg. Supportmembersgroup@yahoo.com) which contains more than 50 recipients.   In Cc also I need to add more than 10 recipients, is email alert will work for this functionality Or I should go with apex class?


Let $X$ be a connected metric space and $D$ a set. Let $f: X \to D$ such that for every $x \in X$ there is a neighborhood in which $f$ is constant. Show that $f$ is constant.  I'm trying to get the hang of the problem, but this seems somewhat self explanatory? Perhaps I'm not understanding it correctly. If we have that $\forall x \in X:$ $\exists V_\varepsilon(x)$ such that $f$ is constant then wouldn't it imply that it must be constant all in all? The open sets acts as covers for $X$ and since $X$ is connected they cover whole $X$ right?

If $X$ is a connected metric space, then a locally constant function $f: X \to $ M, $M $ a metric space, is constant.  Thoughts:  I can see that this is similar to the definition of connectedness: that any continuous map from $X$ to a two-point space is constant. How would I go about proving the above statement though?  Thanks.


I have installed 17.10 on a Lenovo 14 flex with touch screen.  Each time I touch the screen a keyboard pops up.  I can find no way to disable this feature.  I can not type using it, making this even more annoying.  Any way to disable this?  Thanks

I'm in 17.10. Whenever I touch the screen, whether to change windows/apps, scroll within a browser, or press a button, the stupid little keyboard pops up in the bottom left corner.  I have never left Screen Keyboard enabled in Universal Access, but if I toggle it on, that's the same keyboard popping up in the bottom left corner.    In this screenshot, I'm simply touching the screen in a full-screen youtube video. You can see the menu pop up on the right, under the point where I'm touching.  I don't have a before pic, but it was similar look/color keyboard, but it was smaller, maybe half as wide, and only in the bottom left section of the screen, as opposed to stretching across the entire width. This change from little left-hand keyboard to full-width keyboard happened after following @pomsky 's advice below.    This is a . You can mark yourself affected by it to hopefully increase its received attention.


Non-rotating big stars can be subject to a gravitational collapse increasing their density. When the density is so high that the mass volume shrinks below the event horizon, a black hole is formed.  Is such an "initial" black hole already considered as a singularity, or are there further shrinking processes required in order to consider the black hole to be a singularity? Do the characteristic dynamics of black holes include further shrinking processes until the mass is reduced to a point (or nearly)?

What is the exact reason that normal matter can not exist within an event horizon?  I can understand how a super-dense object like a neutron star could accrete mass until its physical radius is less than its Schwarzschild radius and an event horizon forms around it.   But why can't the neutron star remain inside the event horizon as it was before the event horizon formed? Aside from the escape velocity at the surface reaching $c$, what actually changed?  Why must all matter within an event horizon undergo complete physical collapse to a point?


My department is titled Utilities Operations.  We run the utilities (heating, cooling, power) for a public university.    It seems to me that the correct title should be either Utility Operations or Utilities Operation.

A doll house or a dolls house? Which is correct for the toy? ... There's that thing called Same Sex Couples Act; how about calling it Same Sex Couple Act?  The question is - when should I put attributives in plural? As far as I remember, Bill Bryson claimed in his Dictionary of Troublesome Words that - and that's what I vaguely recall from my classes - attributives should be in singular. Except for some exceptions. If so, what are they? I'm looking for some rule of thumb here other than "when in doubt, JFGI", of course.  NOTE: I leave out forms like a doll's house/dolls' house as they're pretty clear to me, as well as cases like The 'Big Boys and Their Motors' Club in which attributives are separate entities.


I have a question regarding adjusting vs matching when the confounding status is largely different between groups. For instance, men are more prone to have Parkinson's disease and vascular diseases; whereas, females are more susceptible to Alzheimer's disease and MS. Say that one wishes to assess the vascular risk to Parkinson and dementia. In this case, age and sex are known to be strong confounders to both the risk and the outcome. Should adjusting the confounder in the regression more reliable or matching? I am asking because I got very different results in a very well sampled population-based cohort. On one hand, the vascular risk was highly associated with the outcomes (OR=14.4 [5.92,35.2]) but it was completely gone after I matched the two groups (disease vs disease-free)(OR=1.29 [0.92,1.82]). The results were pretty robust in the matching groups (I've tried to match with different ratios and different methods several times). I personally think that with a great difference in age and sex distribution, regression adjustment may not be able to account for confounding fully. Therefore, the results from matching are more reliable. One evidence to it is that after matching, the PD only contributes to a 0.1 increment on the score of vascular risk. Therefore, it is unlikely that the association was real.

I am trying to understand the benefit of propensity matching over non-parametric regression for causal inference from non-experimental data. As background: the way I understand it, parametric regressions are generally a poor choice for causal inference when selection bias exists. One can try to create a model that takes into account the different baselines between treatment and control groups, but she/he will be be extremely vulnerable to model misspecification.* Matching solves this issue by making the two datasets look "alike." The exact meaning of alike depends on the matching algorithm used, but all the algorithms strive to eradicate model dependence, with the most common types being stratified and weighted propensity matching. The mathematics for these algorithms are well-developed, and in particular, we know how to extract error bars and statistical significance. What I'm struggling with is why this is superior to just using a non-parametric regression like a decision tree or random forest, which are also designed to prevent model misspecification. After creating the forest, one could run individuals through it assuming treatment or no treatment, and call the difference the estimated treatment effect for that individual. My first guess is that extracting significance, which is critical to causal inference, from trees is difficult, but it seems that statisticians have made strides in that regard over the last decade or so. To be clear, I am not asking about using a tree to develop the propensity scores, but to use one instead of propensity matching. To help kick off the conversation, I've developed five hypotheses for why matching is preferred to non-parametric regression, but haven't been able to find anything proving or disproving any:  Empirical research demonstrates that stratified or weighted propensity matching (the most common types) yield results closer to causal experiments than non-parametric regressions like trees.  Though it is possible to extract significance from non-parametric regressions like random forests, the math isn't settled, or the notion of "significance" for a decision tree variable doesn't map precisely to the notion of "one minus the odds of a type I error."  Though it is possible to extract significance from non-parametric regressions, the code is difficult to write.  Model misspecification actually is an issue for decision trees due to the tuning required to run them. Empirical observation has demonstrated this is more of an issue for decision trees than it is for matching algorithms.  We don't actually know a lot about whether we can use non-parametric regressions for causal inference, but we do know that matching works, so it there's no reason to reinvent the wheel.   *As detailed in the first ten minutes of this wonderfully intuitive Youtube:


Newbie here. I had to install adobe flash plugin and add it to firefox. I followed instructions of a youtube video and did that successfully. In one of the step it asked me to enter the command:   sudo nautlius.   I was wondering what does this particular step does and where else can I use it again?

I've got a problem with Nautilus in Ubuntu 12.04 LTS.  When I run the command gksu nautilus /, the password ask box appears and I type my super-user password, then the password box disappears and Nautilus is not opened.  When I try to open Nautilus as a normal user in with the command nautilus, the folder is opened.  When I try in terminal   $ sudo nautilus   I got the following error  $ sudo nautilus /  ** (nautilus:8523): WARNING **: Command line `dbus-launch --autolaunch=2c8ce9b7da2257c2609b749700000007 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n Could not parse arguments: Cannot open display:   How can I fix this error?


I've just downloaded Windows 7 Enterprise evaluation from Microsoft and the ISO file says it's the 7600 version. Isn't there a Windows 7 Enterprise installation with Service Pack 1 already slipstreamed?

I heard that Microsoft released Windows 7 Service Pack 1 yesterday. By sheer coincidence I planned to format and reinstall Windows 7 on my PC, next week.  Is it possible merge (slipstream) the original Windows 7 installation and the new Service Pack 1 in a single ?  Note: Bonus points if you suggest a method that works also for Windows XP.


CPU:  Windows 10 Enterprise LTSC Hyper-V:  When I install Virtualization Technology driver got below:  I check the BIOS, and there don't have the option for Virtualization Technology. BTW I want to make QEMU run faster. If any other way for acceleration also helps me.

I have an old laptop with Core Duo (not Core 2).  The CPU supports VT-x but the bios doesn't. (And never, no more BIOS update)  Does VT-x really need BIOS support? Can we do it with a Linux kernel patch?


I tried methods like deleting or updating the source list that I found on the web but these didn't fix it.

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode     return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 796: ordinal not in range(128)   My goal is get the text  from a text file and save it as a variable in my program. I do not know how it is encoded. If someone could tell me how to find out how it is encoded, that may also be helpful

I received some text that is encoded, but I don't know what charset was used. Is there a way to determine the encoding of a text file using Python?  deals with C#.


i recently got a new computer asus n552vx, i installed ubuntu 18.04 via a usb drive (flashed with rufus in firt attempt and etcher in the second). after i installation is completed, i reboot the system and boot ubuntu through grub but it goes to a black screen then it loads   after some digging i tried      sudo apt install intel-microcode    then i updated my bios to the latest version asus bios Version 300 for asus n552vx. but the problem isn't solved. i installed ubuntu 16.04 and i had the same error. so i tried installing ubuntu 18.04 on my brother's laptop and it worked fine ..  Any help please ?

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:


Can we obtain interference pattern by using single electron/photon in Young's Double slit experiment? If yes, then how ...and if no, then why?

In a double-slit experiment, interference patterns are shown when light passes through the slits and illuminate the screen. So the question is, if one shoots a single photon, does the screen show interference pattern? Or does the screen show only one location that the single photon particle is at?


Does both the Cov(x,y)= 0 and the Corr(x,y)= 0 for random variables x and y to be independent. Is it possible random variables are correlated whilst the covariance is zero?

My professor was discussing correlation and when it implies independence. It was fairly clear to me that, if $X$ and $Y$ are independent, then their correlation is zero. The reverse direction is less clear. Correlation being zero doesn't imply independence. This makes some sense to me because correlation measures linear association in some sense, but I am having trouble coming up with a concrete example of this. He also stated that, if $X$ and $Y$ are bivariate normal and correlation is zero, then $X$ and $Y$ are independent. Can someone provide a proof/intuition about this?


I tried creating a view with two values in one column using +, and the view was created successfully, but when I try selecting all from it it gives me this error:  select *         * ERROR at line 1:  ORA-01722: invalid number    I tried researching this and the concatenation operator but to my dismay have found no help. Here is the code I used to create the view, and the select also.  CREATE VIEW CombinedNameEmployeePhoneView AS SELECT (EMPLOYEE.LastName + ' ' + EMPLOYEE.FirstName) AS EmployeeName, EMPLOYEE.Phone as EmployeePhone from EMPLOYEE;  select *  from CombinedNameEmployeePhoneView;

What is the string concatenation operator in Oracle SQL?    Are there any "interesting" features I should be careful of?    (This seems obvious, but I couldn't find a previous question asking it).


I installed ubuntu about a year ago and yesterday I deleted the partition, because my parents were annoyed with the startup menu. I didn't know that I had to fix the 'mbr'.    Now every time I try to boot the computer the grub menu pops up and says that the partition  cannot be found. I made an ubuntu dvd but it doesn't turn on automatically and I have no clue how to do it manually.   Please help me, I have no clue what to do. Could someone at least tell me how to retrieve data or documents.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I'm reading an XML file and I ask the user to enter the name of the airline you want to search, by leaving the XML in upper case the condition passes and displays the information I want, but when leaving the information in minuscule and minuscule or uppercase, It returns nothing.  public class XMLReader     {         public XMLReader()         {         }         //Fin de metdo leerXML.         public void leerXML()         {             Console.WriteLine("Enter the airline you wish to search: ");             string name;             name = Console.ReadLine().ToUpper();              if (!String.IsNullOrEmpty(name))             {                 XElement info = XElement.Load(                   @"C:\Users\thoma\Documents\Visual Studio 2019\Backup Files\data.xml");                  var airlines = info.XPathSelectElements("aerolinea");                 foreach (XElement el in airlines)                 {                     if (!String.IsNullOrEmpty(el.Element("nombre").Value) &&                        ((string)el.Element("nombre").Value).IndexOf(name) >= 0)                     {                         Console.WriteLine((string)el.Element("origen").Value);                         Console.WriteLine((string)el.Element("destino").Value);                         Console.WriteLine((string)el.Element("fecha").Value);                     }                 }             }         }          static void Main(string[] args)         {             XMLReader xmlReader = new XMLReader();             xmlReader.leerXML();             Console.ReadLine();         }     }   Here is the XML  <?xml version="1.0" encoding="iso-8859-1"?> <aerolineas>     <aerolinea id="01">         <nombre>VIVA COLOMBIA</nombre>         <origen>BOG</origen>         <destino>MDE</destino>         <fecha>01/03/2019</fecha>     </aerolinea>     <aerolinea id="02">         <nombre>HK Express</nombre>         <origen>BOG</origen>         <destino>CTG</destino>         <fecha>01/06/2019</fecha>     </aerolinea>     <aerolinea id="03">         <nombre>Volotea</nombre>         <origen>PEI</origen>         <destino>BOG</destino>         <fecha>01/09/2019</fecha>     </aerolinea>     <aerolinea id="04">         <nombre>Vueling</nombre>         <origen>MDE</origen>         <destino>BOG</destino>         <fecha>01/12/2019</fecha>     </aerolinea> </aerolineas>

Is there a way to make the following return true?  string title = "ASTRINGTOTEST"; title.Contains("string");   There doesn't seem to be an overload that allows me to set the case sensitivity.. Currently I UPPERCASE them both, but that's just silly (by which I am referring to the  issues that come with up- and down casing).  UPDATE This question is ancient and since then I have realized I asked for a simple answer for a really vast and difficult topic if you care to investigate it fully. For most cases, in mono-lingual, English code bases  answer will suffice. I'm suspecting because most people coming here fall in this category this is the most popular answer.  answer however brings up the inherent problem that we can't compare text case insensitive until we know both texts are the same culture and we know  what that culture is. This is maybe a less popular answer, but I think it is more correct and that's why I marked it as such.


Given a text like "Great drinks , beef hash, coffee, burritos.", I know I can tokenize it with NLTK's Tweet Tokenizer for example to produce:  ['Great',  'drinks',  ',',  'beef',  'hash',  ',',  'coffee',  ',',  'burritos',  '.']   I would like to treat each part preceding a comma and full stop separately to produce a list like [Great drinks, beef hash, coffee, burritos]. How would I do this?

I'm trying to split a string up into words and punctuation, adding the punctuation to the list produced by the split.  For instance:  >>> c = "help, me" >>> print c.split() ['help,', 'me']   What I really want the list to look like is:  ['help', ',', 'me']   So, I want the string split at whitespace with the punctuation split from the words.  I've tried to parse the string first and then run the split:  >>> for character in c: ...     if character in ".,;!?": ...             outputCharacter = " %s" % character ...     else: ...             outputCharacter = character ...     separatedPunctuation += outputCharacter >>> print separatedPunctuation help , me >>> print separatedPunctuation.split() ['help', ',', 'me']   This produces the result I want, but is painfully slow on large files.  Is there a way to do this more efficiently?


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


I am using this code on the page to show when the next few dates are, they are always the next few days... but it is not working now:  <script>var now = new Date();     var day = ("0" + (now.getDate()+3)).slice(-2);     var day2 = ("0" + (now.getDate()+4)).slice(-2);     var month = ("0" + (now.getMonth() + 1)).slice(-2);     var today = (month)+"/"+(day)+"/"+now.getFullYear();     var today2 = (month)+"/"+(day2)+"/"+now.getFullYear();     document.write(today); document.write(' and/or ');document.write(today2); </script>   But it is putting this out:  currently scheduled for: 05/32/2017 and/or 05/33/2017   how do I get the + 1 to have it go to the next month if it needs to?

How to add days to current Date using JavaScript. Does JavaScript have a built in function like .Net's AddDay?


I have an array of data which stores an object with functions and other such info. I push these objects to the function for my draw function to execute.  But i do not know of a way to find a specific object in an array to remove it and thus stop drawing it.   For example i have an array structure like this:  var data  = {             'fnc':function(){                        updatePosition(spriteID);                        drawSprite(spriteID);               },              'something':'here'             };  var drawOrder= []; drawOrder.push(data);   There are many functions in this array and they are pushed dynamically depending on what i wish to draw.  What would be the best way to find the index of one of these objects and remove it from the array in this case?

What is the best way to find if an object is in an array?  This is the best way I know:    function include(arr, obj) {   for (var i = 0; i < arr.length; i++) {     if (arr[i] == obj) return true;   } }  console.log(include([1, 2, 3, 4], 3)); // true console.log(include([1, 2, 3, 4], 6)); // undefined


I'm attempting to remove duplicate characters from a string without using any additional buffer. The code works when I declare a single variable like this  char s[] = "aaabbb";   but not when I'm attempting to loop through a few test cases.  #include <stdio.h> #include <string.h>  /* Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or two additional variables are fine. An extra copy of the array is not. */  void removeDuplicates(char s[]) {     // attempts to modify array in place without extra buffer }  int main() {     char *s[4] = {"aaaa", "abcd", "ababab", "aaabbb"};      int i;     for (i = 0; i < 6; i++) {         removeDuplicates(s[i]);     }     return 0; }   This returns Bus error: 10 because it's attempting to modify the string literal "aaaa" but I'm not sure how to overcome this while maintaining a nice setup for the test cases.

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


boolean d1 = false, d2 = false;  void func(boolean b) {     b = !b; }  void caller() {     func(d1);     System.out.println(d1);//I expect the value of d1 to be true }   How to change the value of d1 by passing d1's pointer?

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


I imagine this is a classic floating point precision question, but I am trying to wrap my head around this result, running 1//0.01 in Python 3.7.5 yields 99.   I imagine it is an expected result, but is there any way to decide when it is safer to use int(1/f) rather than 1//f ?

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


I have shown a group of order 10 has a cyclic subgroup of order 5. But now I am stuck. Any hints?

Show that up to isomorphism there exist only two groups of order 10: $C_{10}$ and $D_{10}$. I need some help on this question. I only know the basic definitions of isomorphism. Any hints?


I'm trying to write a small backupscript which should get executed every hour via cronjob. While the script does monthly/weekly/daily backups and these work, i also would like to perform hourly backups - but only on specific hours. (Like i have a cluster of 3 nodes and want to perform the backup every hour on a different node). Right now, i want to perform the hourly backups on the following hours BACKUP_HOURLY=true BACKUP_RETENTION_HOURS=2,5,8,11,14,17,20,23  And I'm checking for current hour via HOUR=`date +%H`  I tried something like if [[ ( $BACKUP_HOURLY == true ) && ( $HOUR -eq $BACKUP_RETENTION_HOURS ) ]]; then  /usr/local/bin/backup fi  But this doesn't seem to work. While I also tried googling for a solution I'm probably unable to match the correct search terms to find an easy solution to this problem. Hope anyone can help :-)

I have a string in Bash: string="My string"  How can I test if it contains another string? if [ $string ?? 'foo' ]; then   echo "It's there!" fi  Where ?? is my unknown operator. Do I use echo and grep? if echo "$string" | grep 'foo'; then   echo "It's there!" fi  That looks a bit clumsy.


I’ve been trying to test out my MAC spoofing abilities on my home network using Macchanger. When not connected to WiFi, it works just fine. I can bring the interface down using ifconfig, change the mac, then bring it up again with no problems. Verifying with ifconfig shows the random ether - so I know it’s good to go.  However, when I try to connect to my WiFi, it shows the original BIA when I run ifconfig. Logging into my router shows that my BIA is also the MAC address registered - not a randomized one.   My question then is this: which default setting is causing Debian to revert to my wifi interface’s BIA instead of the address that I spoofed?  I have already tried following a couple different guides that said to try changing the NetworkManager.conf file and the 00-default.link but neither of those worked. Any help would be appreciated. Thanks!

so i change my MAC address with macchanger -A wlp68s0b1 at boot with crontab, here is what happens when i disconnect and reconnect :  while connecting after boot :  rahman@debian:~$ macchanger -s wlp68s0b1 Current MAC:   00:22:31:c6:38:45 (SMT&C Co., Ltd.) Permanent MAC: 00:00:00:00:00:00 (FAKE CORPORATION)   after disconnecting :  rahman@debian:~$ macchanger -s wlp68s0b1 Current MAC:   16:7b:e7:3c:d3:cd (unknown) Permanent MAC: 00:00:00:00:00:00 (FAKE CORPORATION)   after reconnecting :  rahman@debian:~$ macchanger -s wlp68s0b1 Current MAC:   00:00:00:00:00:00 (FAKE CORPORATION) Permanent MAC: 00:00:00:00:00:00 (FAKE CORPORATION)   and so on, and with every disconnect i get a different random MAC address which fades on reconnecting giving me my real MAC address , what causes that and how to stop it ?  some outputs :  rahman@debian:~$ lspci -nn |grep 14e4 44:00.0 Network controller [0280]: Broadcom Limited BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01) rahman@debian:~$ uname -a Linux debian 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux rahman@debian:~$ sudo ifconfig  enp0s25: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500         ether 00:24:c0:7b:a8:8b  txqueuelen 1000  (Ethernet)         RX packets 0  bytes 0 (0.0 B)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 0  bytes 0 (0.0 B)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0         device interrupt 20  memory 0xd4800000-d4820000    enp0s25:avahi: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500         inet 169.254.9.109  netmask 255.255.0.0  broadcast 169.254.255.255         ether 00:24:c0:7b:a8:8b  txqueuelen 1000  (Ethernet)         device interrupt 20  memory 0xd4800000-d4820000    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536         inet 127.0.0.1  netmask 255.0.0.0         inet6 ::1  prefixlen 128  scopeid 0x10<host>         loop  txqueuelen 1  (Local Loopback)         RX packets 9436  bytes 6584515 (6.2 MiB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 9436  bytes 6584515 (6.2 MiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  wlp68s0b1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         inet 192.168.1.5  netmask 255.255.255.0  broadcast 192.168.1.255         inet6 fe80::6711:9875:eb78:24fc  prefixlen 64  scopeid 0x20<link>         inet6 fd9c:c172:b03b:ce00:f1e0:695e:7da0:91a  prefixlen 64  scopeid 0x0<global>         ether 00:00:00:00:00:00  txqueuelen 1000  (Ethernet)         RX packets 484346  bytes 641850809 (612.1 MiB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 368394  bytes 44259668 (42.2 MiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  rahman@debian:~$ sudo iwconfig  lo        no wireless extensions.  enp0s25   no wireless extensions.  wlp68s0b1  IEEE 802.11  ESSID:"3bdo"             Mode:Managed  Frequency:2.447 GHz  Access Point: 9C:C1:72:B0:3B:D4              Bit Rate=65 Mb/s   Tx-Power=30 dBm              Retry short limit:7   RTS thr:off   Fragment thr:off           Encryption key:off           Power Management:off           Link Quality=54/70  Signal level=-56 dBm             Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:4  Invalid misc:183   Missed beacon:0


I want to implement a generic method that will take a vector of Points (Point can be of type integer, float or double) and return rectangle. (I am using OpenCV).  By reading the online tutorial of generics in c++ from  I have implemented the above method but I am getting a compile-time error.      Error: Error LNK2001    unresolved external symbol "public: static class cv::Rect_<int> __cdecl getRect<int>(class std::vector<class cv::Point_<int>,class std::allocator<class cv::Point_<int> > >)" (??$getRect@H@CvUtil@i2v@@SA?AV?$Rect_@H@cv@@V?$vector@V?$Point_@H@cv@@V?$allocator@V?$Point_@H@cv@@@std@@@std@@@Z)   I am unable to understand this error. Can someone explain to me what could be wrong here?  Below is the code snippet of my implementation.  template<typename T> struct XCoordSortX {     bool operator() (cv::Point_<T> pt1, cv::Point_<T> pt2) { return (pt1.x < pt2.x); } }; template<typename T2> struct XCoordSortY {     bool operator() (cv::Point_<T2> pt1, cv::Point_<T2> pt2) { return (pt1.y < pt2.y); } };  template<class T3> cv::Rect getRect(const std::vector<cv::Point_<T3>> points) {     cv::Rect rect;     std::vector<cv::Point_<T3>> tempPoints(points);     XCoordSortX<T3> sortX;     std::sort(tempPoints.begin(), tempPoints.end(), sortX); // sorting by x coordinate      rect.x = tempPoints[0].x; // setting top left point as lowest x     rect.width = tempPoints[tempPoints.size() - 1].x - tempPoints[0].x; // width will be diff between largest and smallest      XCoordSortY<T3> sortY;     std::sort(tempPoints.begin(), tempPoints.end(), sortY);     rect.y = tempPoints[0].y; // setting top left point as lowest y     rect.height = tempPoints[tempPoints.size() - 1].y - tempPoints[0].y;// height will be diff between largest and smallest     return rect; }  int main() {     std::vector<cv::Point> pointVec;     pointVec.push_back(cv::Point(2, 3));   // cv::Point is cv::Point_<int> type     pointVec.push_back(cv::Point(2, 10));     pointVec.push_back(cv::Point(10, 3));     pointVec.push_back(cv::Point(12, 5));      pointVec.push_back(cv::Point(40, 50));     pointVec.push_back(cv::Point(40 ,100));     pointVec.push_back(cv::Point(100, 40));     pointVec.push_back(cv::Point(50,50));      cv::Rect newRoi = getRect<int>(pointVec); // Error here }

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)