Let $a_n := (1+1/n)^n$ for $n \in \mathbb{N}$  How can one prove that $a_{n+1} \geq a_n$ for all $n \in \mathbb{N}$ with Bernoulli's inequality?  I know that the inequality states that $(1+x)^r \geq 1+rx$ for every integer $r \geq 0$ and every real number $x \geq -2$. And if the exponent $r$ is even, then the inequality is valid for all real numbers x.   So I have to use induction and for $n=1$ we would get $(1+1/1)^1 = (1+1/(1+1))^2$, and that would give $2 < 2,25$. But wouldn't that imply that all numbers $> 1$ would make $a_{n+1} > a_n$? At which case is it equal? Can someone show me where I can find an induction proof for this?

Show that $U_n:=\left(1+\dfrac{1}{n}\right)^n$, $n\in\Bbb N$, defines a monotonically increasing sequence.   I must show that $U_{n+1}-U_n\geq0$, i.e. $$\left(1+\dfrac{1}{n+1}\right)^{n+1}-\left(1+\dfrac{1}{n}\right)^n\geq0.$$  I am trying to go ahead of this step.


Here is a strange situation. Following code works perfectly if I run it as is, but if I comment the first CHARINDEX line, it throws an error.  Msg 536, Level 16, State 4, Line 1 Invalid length parameter passed to the RIGHT function.  SELECT  DT.DataID ,RIGHT(K.IniValue, LEN( K.IniValue ) - 15) --error if you comment the next line  ,CHARINDEX('}',SUBSTRING(K.IniValue,CHARINDEX('ExtShared',K.IniValue) + 12,LEN(K.IniValue))) AS LastPosition   ,REPLACE( CONCAT( REPLACE( RIGHT(K.IniValue, LEN( K.IniValue ) - 15), '''}', '' ), SUBSTRING( P.providerData, CHARINDEX( '''providerInfo''=''', P.providerData ) + 16, CHARINDEX( ''',''storage', P.providerData ) - ( CHARINDEX( '''providerInfo''=''', P.providerData ) + 16 ))), '\\', '\' )  FROM llprod.DTreeCore AS DT INNER JOIN llprod.DVersData AS DV ON DV.DocID = DT.DataID AND DT.VersionNum = DV.Version INNER JOIN llprod.ProviderData AS P ON DV.ProviderId = P.providerID INNER JOIN llprod.KIni AS K ON K.IniKeyword = P.providerType --WHERE ( k.IniValue LIKE '%{%' and K.IniValue LIKE '%}%' AND k.IniValue LIKE '%ExtShared%') WHERE DT.DataiD = 123456 OPTION (RECOMPILE)

Something very odd is happening here.   I have a query that looks like this.  SELECT CAST(FT.DOP AS SMALLINT) FROM TRACKING_DATA WHERE date > @mydate and identifier = 0000000000   When run as a raw query it returns data just fine.  When i place it in a stored procedure that alters the where clause it throws this error.  Msg 244, Level 16, State 2, Procedure myprocedure, Line 107 [Batch Start Line 2] The conversion of the varchar value '58629' overflowed an INT2 column. Use a larger integer column.   So here is the oddity. I go through all the possible data for that where clause with a query like this.  SELECT DISTINCT DOP FROM TRACKING_DATA where identifier = 000000000000   and  SELECT DISTINCT CAST(DOP AS smallint) FROM TRACKING_DATA where identifier = 000000000000   And this is what i get back.  17 12 9 19 8 14 6 16 11 13 7 10 0 18 5 15 4   Nowhere does it have anything remotely too large for a SMALLINT. So i thought, ok maybe its a non-printable ASCII character. But i can't find any.  I'm a little perplexed at the moment. It runs find as a raw query, explodes as a procedure and all possible data based on the where is valid. My only suspicion is that the query plan is doing something odd with filtering or maybe runs with different validation when run as a procedure.


I am brand new to coding and this is my first test class. I have spent hours trying to get it to pass.  Apex Trigger That I am Testing  trigger RenameTransaction on Financial_Transaction__c (before insert) {      for(Financial_Transaction__c a: Trigger.New) {         Financial_Month__c fm = [SELECT Name FROM Financial_Month__c WHERE ID = :a.Financial_Month__c];         Account vn = [SELECT Name FROM Account WHERE ID = :a.Vendor__c];         a.Name = fm.Name + ' * ' + vn.Name + ' * ($' + a.Amount__c + ')';     } }   Test Class That I Wrote  @isTest private class RenameTransactionTestClass {     Static testMethod void validateInsertTransaction() {         financial_transaction__c ft = new Financial_transaction__c(             Name='Test',              Amount__c=1.00,             Item__c='Stuff',             Currency_type__c = 'Debit',             Financial_month__c = 'a016g0000021jNuAAI',             Vendor__c = '0016g000003s4pCAAQ',             Billing_period__c = '1st Half');          Test.startTest();         insert ft;         Test.stopTest();          ft = [SELECT Id, Name FROM financial_transaction__c WHERE Id =:ft.Id];          System.assertNotEquals('Test', ft.Name);      } }   Error That I am Receiving     Class RenameTransactionTestClass   Method Name validateInsertTransaction   Pass/Fail   Fail      Error Message System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, RenameTransaction: execution of BeforeInsert caused by: System.QueryException: List has no rows for assignment to SObject Trigger.RenameTransaction: line 4, column 1: []   Stack Trace Class.RenameTransactionTestClass.validateInsertTransaction: line 14, column 1   Any help you can provide would be greatly appreciated. I am trying to teach myself how to code.

I have written the following batch apex class and corresponding test class. Tests are successful but the execute method is never called. I have attempted to debug to try to pinpoint the problem but have had no luck.   Batch Class  global class BatchAddToCampaign implements Database.Batchable<sObject>,  Database.Stateful {     global final Id campaignId;     global final Set<Id> qKeys;      global BatchAddToCampaign(Id campaignId, Set<Id> qKeys){         this.campaignId = campaignId;         this.qKeys = qKeys;     System.Debug('this.campaignId is ' + campaignId);              System.Debug('this.qkeys is ' + qKeys);                       }      global Database.QueryLocator start(Database.BatchableContext BC) {         return Database.getQueryLocator('Select Id From Lead Where Id In :qKeys');     }      global void execute(Database.BatchableContext BC, List<Lead> scope) {         System.Debug('Starting Execute Method!');                  Integer collsize;          List<CampaignMember> cm = new List<CampaignMember>();            Map<Id, Campaign> cmMap = new Map<Id, Campaign>([Select (Select LeadId From CampaignMembers) From Campaign c Where Id = :campaignId]);          for(Lead myLeads : scope) {              CampaignMember newCM = new CampaignMember(              CampaignId = campaignId,              LeadId = myLeads.Id,              status = 'Added' );                   if (!cmMap.containsKey(myLeads.Id)) {                      cm.add(newCM);                       collsize = cm.size();                  }          }           try {              Database.insert(cm);           } catch (DmlException ex) {             System.Debug('Insert failed ' + ex);          }             }      global void finish(Database.BatchableContext BC) {         AsyncApexJob a = [SELECT Id, Status, NumberOfErrors, JobItemsProcessed,  TotalJobItems, CreatedBy.Email From AsyncApexJob Where Id = :BC.getJobId()];         // Send an email to the Apex job's submitter notifying of job completion.         Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();         String[] toAddresses = new String[] {a.CreatedBy.Email};         mail.setToAddresses(toAddresses);         mail.setSubject('Add to Campaign ' + a.Status);         String campaignURL = URL.getSalesforceBaseUrl().toExternalForm() + '/' + campaignId;         mail.setPlainTextBody('The batch Apex job processed ' + a.TotalJobItems + ' batches with '+ a.NumberOfErrors + ' failures. ' + 'Link to Campaign: ' + campaignURL);         Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });     } }   Test Class  @isTest public class BatchAddToCampaignTest {     static testMethod void testMethod1()     {         List<Lead> lstCM= new List<Lead>();         for(Integer i=0 ;i <1;i++){             Lead myLead = new Lead();             myLead.Id = '00Q1U00000KqFcDUAV';             lstCM.add(myLead);             Integer collSize = lstCM.size();              System.debug('List Collection Size is ' + collSize);                 {                  System.debug('Start Set');                 Set<Id> leadIds = (new Map<Id,SObject>(lstCM)).keySet();                 System.debug('End Set');                 Integer collSizeSet = leadIds.size();                  System.debug('Set Collection Size is ' + collSizeSet);                 Id workingCampaignId = '7011U000000RWRAQA4';                  Test.startTest();                  //BatchAddToCampaign ba = new BatchAddToCampaign(workingCampaignId, leadIds);                 DataBase.executeBatch(new BatchAddToCampaign(workingCampaignId, leadIds));                  Test.stopTest();                   }             }      } }


I try to work with Launchctl and have a question:  I know there is a possibility to run commands directly (shell for example) with Launchctl, can someone please add an example on how can I do it with delay? (for example, run the command echo 1 > /tmp/1 in 10 minutes)  I know it can easily be done by creating Launch Agents, I looking for a way to do it using Launchctl directly to programmatically.  I know I can run: launchctl submit -l my_choosen_name mkdir /tmp/mydir as a direct command, my question is how can I schedule this to run every 5 minutes directly from launchctl ?

I try to work with Launchctl and have a question:  How can I set up an application to run in a few minutes using Launchctl? (for example, open the program MyApp.app with arguments "hello" "world" Every 10 minutes)  I know that it can easily be done by creating Launch Agent, I looking for a way to do it using Launchctl directly to programmatically.


I would like to estimate the log growth consumption for a database with full recovery model  for a particular transaction/group of transactions which is filling up my log drive. I would like to forcast this before a transaction is run.Is there a way to find this out in SQL Server(any version) Thanks in advance.

Is there a way to estimate log file size? I have a scenario where there is a possibility of 40-45K rows per day.  For the above scenario,    What should I consider to estimate log file size? How much initial size it will be? On what basis, the log file growth will be there?   Finally, any approximate size for records 40-45K per day?


I have problem Bluetooth and with the wireless interface in dual boot with Windows 10 but only in Ubuntu. I have the HP Notebook 15-bw017nv the output of sudo lshw -C network is:  `*-network     description: Ethernet interface    product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:01:00.0    logical name: enp1s0    version: 15    serial: 48:ba:4e:1d:c9:14    size: 100Mbit/s    capacity: 1Gbit/s    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation    configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.1.8 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s    resources: irq:35 ioport:4000(size=256) memory:d3304000-d3304fff memory:d3300000-d3303fff *-network UNCLAIMED    description: Network controller    product: Realtek Semiconductor Co., Ltd.    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:02:00.0    version: 00    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress cap_list    configuration: latency=0    resources: ioport:3000(size=256) memory:d2000000-d200ffff`

I am having an issue with wifi; it seems when I'm trying Ubuntu without installing, it only detects connection via the ethernet cable.  I can't connect and none of the available wifi networks are detected.  $ lspci 00:00.0 Host bridge: Intel Corporation Device 5904 (rev 02) 00:02.0 VGA compatible controller: Intel Corporation Device 5916 (rev 02) 00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 02) 00:08.0 System peripheral: Intel Corporation Sky Lake Gaussian Mixture Model 00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21) 00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21) 00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI (rev 21) 00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21) 00:1c.0 PCI bridge: Intel Corporation Device 9d10 (rev f1) 00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port (rev f1) 00:1c.5 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port (rev f1) 00:1f.0 ISA bridge: Intel Corporation Device 9d4e (rev 21) 00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21) 00:1f.3 Audio device: Intel Corporation Device 9d71 (rev 21) 00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21) 01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] (rev 83) 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) 03:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723     $ lspci -knn | grep Net -A3 03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:d723]     DeviceName: Hanksville Gbe Lan Connection     Subsystem: Hewlett-Packard Company Device [103c:8319]


There is a word/idea that something has happened to you, but you just don't know that it already has occured. Question Have you ever been phished before?  Answer 1. Yes. 2. No, I have never been phished before. 3. I don't know.  In this case, say for number 2 (and for intents and purposes that the phishing is silent), you HAVE been phished, you just wouldn't have known it has happened to you. For you, you feel this is true but it may not be because you wouldn't know. What is this idea called? Naive, Ignorance? I'm looking for an ideology word if one exists, like Occam's razor or even an expression.

What is the appropriate name for a person who exhibits the behavior described below?  A person who speaks in a Confidently informed manner (about a technical process or procedure for example) however they are actually imparting incorrect information and are apparently oblivious of their actions.


I'm currently working on a model for Samsung Galaxy Note10+, with one of the colors used on the phone is "Aura Glow" that is a very reflective glass that reflects  light (a la CD/DVDs):  However, I couldn't get the effect working as intended in Cycles, Blender 2.90.  Using the  method shows the result correctly in Material Preview/Eevee, but appears transparent in Cycles render (note that the front of the phone appears as "see through"). Mixing with Principled BSDF didn't help much.      Using  method only gives out a solid red finish.   I can't seem to find any other method that actually reflects like what I intended to, so I'd like anyone to help me on giving a reflective glass like that GIF above.

Is it possible to create an  shader in Cycles? Specifically for something like , , , etc..


I know where the ultraweave armor is, and I know that one of the power cores is in the beginning, but where is the other one?

I am trying to find the power cells to access the amor. Yet the placement is unmarked and I thought I would eventually stumble over them clearing the cauldrons.  Yet after clearing three cauldrons (RHO, XI, and Sigma) I still only have the one from the very beginning.  Where do I find all the power cells?


def fib(max):     n, a, b = 0, 0, 1     while n < max:         yield b         a, b = b, a + b         n = n + 1          return 'done'  print(next(fib(6))) print(next(fib(6))) print(next(fib(6)))   the result is 1，1，1. However, if I change the content in print() as below:  f = fib(6) print(next(f)) print(next(f)) print(next(f))   the result will be 1, 1, 2. Why does this happen?

What is the use of the yield keyword in Python? What does it do? For example, I'm trying to understand this code1: def _get_child_candidates(self, distance, min_dist, max_dist):     if self._leftchild and distance - max_dist < self._median:         yield self._leftchild     if self._rightchild and distance + max_dist >= self._median:         yield self._rightchild    And this is the caller: result, candidates = [], [self] while candidates:     node = candidates.pop()     distance = node._get_dist(obj)     if distance <= max_dist and distance >= min_dist:         result.extend(node._values)     candidates.extend(node._get_child_candidates(distance, min_dist, max_dist)) return result  What happens when the method _get_child_candidates is called? Is a list returned? A single element? Is it called again? When will subsequent calls stop?   1. This piece of code was written by Jochen Schulz (jrschulz), who made a great Python library for metric spaces. This is the link to the complete source: [Module mspace][1].


I'm trying to use the concmath package (along with T1 fontec package) but the resulting text looks jagged and not vector-like, but I have seen some documents using this font that look vector-like.  Here's my code:  \documentclass{article}  \usepackage{amsmath}  \usepackage{amssymb}  \usepackage{amsthm}  \usepackage{concmath}  \usepackage[T1]{fontenc}  \begin{document}  Hello  \end{document}   How do I resolve this problem?  Thank you

I would like to use the Concrete Math font in LaTeX, which is a bitmap font. The rendering with pdflatex is naturally poor-quality with jagged edges.  My solution so far has been to generate a DVI file and then convert to PDF using Linux's dvipdf. This tool effectively traces and smooths the edges of the glyphs and the end result is beautiful. However, using the DVI output format (with latex) causes a host of other problems with including figures, etc. For instance, you can't include .png or .pdf figures when using plain LaTeX.  Is there a way to somehow get the same bitmap font-smoothing effect in pdflatex? or via an intermediate format that still allows you to include at least .png figures?


I'm new to this site, english is not my mother tongue, and I'm just learning LaTeX. I'm basically a noob, so please be indulgent if I break any rule or habits.  I'm stuck at proving the following equation. I suppose I should use the formula for geometric series ($\sum\limits_{k=0}^{n}q^k=\frac{1-q^{n+1}}{1-q}$), and also use somewhere that $e^{î\theta}=cos(\theta)+i\sin(\theta)$  So here is the equation I have to prove : $$\frac{1}{2}+cos(\theta)+cos(2\theta)+...+cos(n\theta)=\frac{sin(n+\frac{1}{2}\theta)}{2sin(\frac{\theta}{2})}$$  Thanks for your help

I have the formula for summing a finite geometric series as $$1+z+z^2\cdots +z^n = \frac{1-z^{n+1}}{1-z},$$ where $z\in\mathbb{C}$ and $n=0,1,...$. I am asked to infer the identity $$1+\cos\theta+\cos 2\theta+\cdots+\cos n\theta = \frac{1}{2}+\frac{\sin(n+1/2)\theta}{2\sin\theta /2}.$$ Now, I understand that on the left hand side I'm going to get $$1+\cos\theta +\cdots + \cos n\theta + i[\sin\theta + \sin 2\theta +\cdots + \sin n\theta]$$ using $z=e^{i\theta}$ for any complex $z$. However, when I make that substitution on the right hand side, a monstrous expression occurs and I cannot simplify it down to the desired result. For instance, I get $$\frac{1-e^{i(n+1)\theta}}{1-e^{i\theta}}$$ and using identities I get $$\frac{1-\cos [(n+1)\theta]+i(\sin[(n+1)\theta])}{1-\cos n\theta -i\sin n\theta}.$$ From here I did a whole lot of manipulating, but never getting any closer to the identity asked.   If anyone could shed some light it would be greatly appreciated! ~Dom


So while installing Ubuntu MATE 17.04 Grub failed to install and I need to choose where to install the boot loader. The way I see it I have 3 places where I can place it: sda (my supposed ssd but where grub couldn't install) sdb which is where ubuntu is located but not where windows is installed, or sdb1 which is labeled windows 10.  Basically W10 is installed on my ssd while Ubuntu is on my regular hard drive and I am unsure of where to install the bootloader

Where is the boot loader, such as Grub, installed generally?   When I install 12.04 along side Windows on different partitions of my disk, I encountered a choice for "Device for boot loader installation". If I understand it correctly, it is to specify where to install the boot loader Grub,  I found on the internet that it is to specify the disk that contains the partitions for the OS, not any partition on the disk. E.g. disk sda, not partition sda1, sda2.  Questions:  I wonder where the boot loader installed actually on the disk?  Is it installed on any of the existing partitions for the OSes and for personal data, or does it have its own partition, which is also visible e.g. from system monitor of Ubuntu?  Thanks and regards!


Of course I could easily restore my backup. But I wonder what mechanism is responsible for this behaviour. Cheers mkdir ~/Schreibtisch oder even mkdir ~/Desktop (each followed logout/login) did not resolve the problem.

Files in my SSD get duplicated on my Desktop. When I delete any folder/file it gets automatically deleted from the second location (Home) and when I create a folder in any of the locations it gets created in both places.  Take this screenshot for reference:    I am running Ubuntu 19.04 LTS.


I am not able to use the shortcut key in Blender, although in Preferences > Input there is normal.  For example, I can't use key G for move , S for scale, R, X, Y, Z or Shift + D for duplication, but I can use Ctrl + A and various keys preceded by either Ctrl or Alt..  I have tried many times and more than one time I have to re-install Linux.  How do I solve this issue?

I am trying to use the Alt+Right Click to select edge loops in Linux Mint but this shortcut doesn't work it is already used for Linux to reduce a window. I have checked the keyboard shortcut but it doesn't appear.


I'm trying to use the Group Stats Plugin.   Unfortunately I can not use the plugin: after I enter all the required values, press "calculate" is not active and is always gray.  My problem is that I have a shape of point that are points for animal sightings.  This shape is formed by a text field containing the types of areas (beech, poplar, etc.) and another containing the areas value. I need to calculate the number of records that contains a precise type of vegetation and the sum of the relative areas.  Is this possible with Group Stats Plugin?

In my case I failed to use  plugin (2.0.30) with QGIS 2.14.11 and 2.18.3 on windows64.  Tested on several datasets: points, polygons, and csv.- But I am not sure what I have missed.    I want to click on this Calculate button.


Every time I try to update or install a package or open software center, I get an error something like   E: The repository 'http://ppa.launchpad.net/tista/adapta/ubuntu disco Release' does not have a Release file.    I am on latest Ubuntu 19.04.

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


How to convert string to number in PHP?  Could any one tell me how to convert string data to number?  For example:  $Str = "212315"; // convert to 212315

Using PHP, what's the fastest way to convert a string like this: "123" to an integer?  Why is that particular method the fastest? What happens if it gets unexpected input, such as "hello" or an array?


How can I find an expectation of random variable $\xi \sim \mathcal{N}(a,1)$, where $a$ is random variable: $a \sim \mathcal{N}(0,\sigma^2),\quad  \sigma = \text{constant}$ ?

I would like to learn how to calculate the expected value of a continuous random variable. It appears that the expected value is $$E[X] = \int_{-\infty}^{\infty} xf(x)\mathrm{d}x$$ where $f(x)$ is the probability density function of $X$.  Suppose the probability density function of $X$ is $$f(x) = \frac{1}{\sqrt{2\pi}}e^{\frac{-x^{2}}{2}}$$ which is the density of the standard normal distribution.  So, I would first plug in the PDF and get  $$E[X] = \int_{-\infty}^{\infty} x\frac{1}{\sqrt{2\pi}}e^{\frac{-x^{2}}{2}}\mathrm{d}x$$ which is a rather messy looking equation. The constant $\displaystyle\frac{1}{\sqrt{2\pi}}$ can be moved outside the integral, giving  $$E[X] = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} xe^{\frac{-x^{2}}{2}}\mathrm{d}x.$$  I get stuck here. How do I calculate integral? Am I doing this correctly this far? Is the simplest way to get the expected value?


How do I access the command line argument that I set in my project. for example if I give following input to command line "abc def ghi" then how do I access them using argc &/or argv.  I am getting some integer values if I am accessing them via argv[i] or *argv[i] Thanks.

How can I parse integers passed to an application as command line arguments if the app is unicode?  Unicode apps have a main like this:  int _tmain(int argc, _TCHAR* argv[])   argv[?] is a wchar_t*. That means i can't use atoi. How can I convert it to an integer? Is stringstream the best option?


I would like to shoot professionally but am having an issue with my Nikon D3300.  I shoot product photography, mainly sunglasses.   My questions is what function, mode, and option should I choose on this camera to be able to shoot professional photos such as the one below. I am interested in sharp images to capture the text on the foreground and the background on the temples of the sunglasses.   The green focus box will only either capture the background or the foreground separately on two different images. I would like both on one image.

I want to make a full focus on the body, for example: I need to have a clear focus on the each balls in the photo. I used just single point focus.    In this picture I used:   shutter speed: 8 aperture: F/4 ISO: 200 2 flashes, one in the right and one on the top of project camera: nikon d300s lens : 105mm micro 2.8   Thanks


I am trying to understand (self-study) a few things from set theory. One particular claim I encountered is the following: "Can we always rank the cardinalities of any two sets? The answer is affirmative, and when equipped with the Well-Ordering Principle, not difficult to prove."  They follow it up with an exercise question: Show that, for any two sets $A$ and $B$, we have either $A\succ_{card} B$ or $B\succ_{card} A$.  I would like to get clues on how to approach this question. I know the Well-Ordering Principle.

For any pair of sets $A$ and $B$, we can define $A\le B$ iff there exists injection $f\colon A\rightarrow B$. I am trying prove that  $$(A\le B)\vee (B\le A).$$  I have tried assuming  $\neg (A\le B)$, then proving $B\le A$ by constructing the required injection, but I haven't been able to make any progress. Any hints, etc. would be appreciated.  EDIT  Assuming  $\neg (A\le B)$, can you prove there exists a surjection $f: A\rightarrow B$? Then it would be easy, by applying AC, to construct an injection $g: B\rightarrow A$


Let $f$ be a complex valued function holomorphic on the unit disk with $f(0) = 0$. Then $\lvert f(z) + f(-z) \rvert \le 2 \lvert z \rvert^2$.   I was looking at this  but I still unsure about certain steps.  $\textbf{proof attempt.}$  Define $g(z) = \frac{f(z) + f(-z)}{2}$ (which is also holomorphic). Then $g(0) = 0$ and if I could show $\lvert g(z) \rvert \le 1$, then by Schwarz's lemma $\lvert g(z) \rvert \le \lvert z \rvert$. Now define $h(z) = \frac{g(z)}{z}$, and by Riemann removable singularity theorem we can define $h(z)$ on all of $D(0,1)$ since $h$ is bounded at $z=0$ since $\lim_{z\to0} \frac{g(z)}{z} = g'(0) = 0$. Thus $h(0) = 0$ and $\lvert h(z) \rvert = \lvert \frac{g(z)}{z} \rvert \le 1$ finally applying Schwarz's lemma to $h$ we obtain $\lvert \frac{g(z)}{z} \rvert \le \lvert z \rvert$ which is the desired result.  //  How do I show $\lvert g(z) \rvert \le 1$?

Let , $\Delta = B(0,1)$.  If $f:\Delta \rightarrow \Delta$ is holomorphic, and $f(0)=0$, prove that $|f(z)+f(-z)| \leq 2|z|^2$.  My attempt so far:  $\displaystyle f(z) = \sum_{n=0}^{+\infty} a_n z^n = \sum_{n=0}^{+\infty} a_{2n} z^{2n} + \sum_{n=0}^{+\infty} a_{2n+1} z^{2n+1}$  $\displaystyle f(-z) = \sum_{n=0}^{+\infty} a_n (-z)^n = \sum_{n=0}^{+\infty} a_{2n} z^{2n} - \sum_{n=0}^{+\infty} a_{2n+1} z^{2n+1}$  Then, $\displaystyle f(z)+f(-z) = 2  \sum_{n=0}^{+\infty} a_{2n} (z^2)^n =: 2 g(z^2)$  If $g(\Delta) \subset \Delta$, as $g(0) = 0$, I can invoke Schwarz Lemma and I win. However, I don't know how to prove this. Could anyone help me? Thanks!


Related:    Looks like there was a keyboard shortcut for it. But in 10.11.6 all I get when I press Cmd Shift . is the bonk sound.    Is that keyboard shortcut gone? What's an easy way to get it back?   Note that the shortcut works in file dialogs but not the standard Finder window.   Not a duplicate: the top ranked question on  does not work in El Cap.

I need an easy way to switch files visibility on Mac. I know about Terminal commands how to show hidden files and hide files. However, I need a tool to make this task faster and easier.  I was trying to find a special app in the App Store, but found nothing. Is there any way to show/hide hidden files without launching Terminal? Any tips or apps?


For $a>0$,the series $\sum_{n=1}^\infty a^{\ln n}$ is convergent if and only if       (1). $0<a<e$  (2). $0<a\leq e$  (3). $0<a<\frac{1}{e}$  (4). $0<a\leq \frac{1}{e}$  I tried with $a=e$ as well as $a=\frac{1}{e}$. I can eliminate (1),(2) and (4), but how can I confirm (3)?

For $a>0$, test the convergence of the infinite series: $$\sum a^{\ln(n)}$$ Which test should be better to use here? I tried the D'Alembert's ratio test. $$\lim_{n\to \infty} {\frac{a^{\ln(n)}}{a^{\ln(n+1)}}}= \lim_{n\to \infty}a^{ln{\frac{n}{n+1}}}=a^0=1$$ So the test failed.  UPDATE: I observed that $${a^{\ln(n)}}=e^{{\ln(a)}{\ln(n)}}={n^{\ln(a)}}={{1\over n^{ln({1\over a})}} }$$Further by test of auxiliary series $$\sum \frac{1}{n^p}$$ we know that criterion for convergence is $p>1$. Here $p=ln({1\over a})$.Hence the series will be convergent when $ln(a)<-1$ i.e. when $0<a<1/e$, since $a>0$ is already given.Finally this solved my question.


You see I can tap on the link and it behaves totally well. Yet its color shouldn't be black, though.  MD source:  [***Link***][1] blah text.    [1]: /.   Demo:   blah text.

I saw a link to IMDB in  on Movies.SE site. This link text has been italicized and emboldened by the user. It says Time Enough At Last.  And now the link is hidden. It loses its blue coloring that other links receive,  making it impossible to know it is a hyperlink. Can this be fixed? It's likely a conflict in CSS rules.  Android 4.4, default browser (chromium), Galaxy S5.  Notice the Wikipedia link is blue. I had not visited either url so they should not be colored differently. The same page, in full site/desktop mode, shows the same link blue, so this is just a problem on mobile web.  Just tested, on regular Safari, with the iPhone 6 user agent, it also has the same issue.    The Inspector shows the problem. The em style is overriding the a > em somehow in the mobile CSS.  em { color: #0C0D0E; } a, a:visited { text-decoration: none; color: #07C } a, a > em { color: #07C }


As the title states my netbook keeps freezing on Ubuntu 17.04 keeps freezing on asus x205ta. I have looked at all the post about the freezing problems and what to do.  My problem is that nothing works at all. I can hit any combination of buttons and still nothing. I am not sure what to do or if it is just my netbook?  Specs for netbook:   Processor Intel® Bay Trail-T Quad Core Z3735 1.33 GHz Processor Operating System Windows 10 Memory DDR3L 1333 MHz SDRAM, 2 GB  Display 11.6" 16:9 HD (1366x768) Glare panel Graphic Integrated Intel® HD Graphics Storage 32GB eMMC Card Reader card reader (Micro SD Micro SDXC Micro SDHC ) Camera VGA Web Camera Networking Built-in Bluetooth™ V4.0 Interface 1 x Microphone-in/Headphone-out jack  2 x USB 2.0 port(s) 1 x micro HDMI  1 x micro SD card Audio Built-in Speakers And Microphone SonicMaster Battery 38 Whrs Polymer Battery Power Adapter Output : 19 V DC, 1.75 A, 33 W Input : 100 -240 V AC, 50/60 Hz universal Dimensions 286 x 193.3 x 17.5 mm (WxDxH) Weight 2.16 lbs (with Polymer Battery) Certificates UL, MIC, CE Marking Compliance, FCC Compliance, BSMI, Australia C-TICK / NZ A-Tick Compliance, CCC, GOST-R, CB, Energy star, IDA, Erp 2013, RoHS, JATE

My system freezes completely at random, frequent intervals. I started to have the same problem in Ubuntu 14.04 but after recent upgrade to 16.04 there is no improvement, in fact it seems worse.  When it happens, it's impossible to do anything. I've tried everything in this thread:  but nothing works, I have to hard reset. I have read all the system logs and journalctl but there is never any information that could help diagnose the problem.  This is a dual-boot system with Windows 10 and there's no problem there, so it's not defective hardware.  My laptop has an Intel Bay Trail processor (Pentium N3540)


So the giveTaxChart method is supposed to take the incomeArray,sort it in a ascending order and then populate taxArr with the tax values that each income recieves through the payableTax method, but even though the payableTax method is tested and indeed works, Im still getting a NullpointerException when I use the giveTaxChart method and enter reasonable values. Is there something obviosly wrong with my method or should I look somewhere else ?  public static void giveTaxChart(int[] incomeArray) {     Arrays.sort(incomeArray);     for (int i = 0; i < incomeArray.length; i++) {         for (int j = 0; j < incomeArray.length; j++) {             taxArr[j] = TaxCalculator.payableTax(incomeArray[i]);             draw(i * 20, (i * 20) + 1, taxArr[j]);         }         draw(i * 20, i * 20, incomeArray[i]);     } }   This is the full error message :  Exception in thread "main" java.lang.NullPointerException at com.company.Entities.TaxChart.giveTaxChart(TaxChart.java:36) at com.company.Main.main(Main.java:21)   And this is what main contains :  public static void main(String[] args) {     Scanner in = new Scanner(System.in);      int income = in.nextInt();     System.out.println("Tax payable is" + " " +  TaxCalculator.payableTax(income) + " " + "£");      int numberOfIncomes = in.nextInt();      int [] incomeArray = new int[numberOfIncomes];     for (int i = 0;i < numberOfIncomes ; i++ ){         incomeArray[i] = in.nextInt();     }     TaxChart.giveTaxChart(incomeArray);  }   And this is the declaration of taxArr :  private static Integer[] taxArr;

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?


Is the scheme for generating $\displaystyle p_n=\left(\frac{1}{3}\right)^n$ stable?  $\displaystyle p_{n} = \frac{5}{6} p_{n-1} - \frac{1}{6} p_{n-2}$

Is the scheme for generating $p_n=(1/3)^n$ stable or not?  $$p_n= \frac{5}{6} p_{n-1} - \frac{1}{6}p_{n-2}.$$


given some $n \in \mathbb{N}$, prove that $A \cap ( B_1 \cup \cdots \cup B_n) = (A \cap B_1) \cup \cdots\cup (A \cap B_n)$  Using unary union and intersection and basic set theory.  My approach :  Let $B = \{ B_i \mid 1\leq i \leq n \}$  And let $C = \{ A \cap B_i \mid 1\leq i \leq n \}$, so now i need to prove that  $A \cap \bigcup B = \bigcup C$ but i don't know how to proceed, i know i have to let $x$ be anything and assume that $x \in \bigcup C$ and prove it must be in $x \in A \cap \bigcup B$, but this formal step i don't know how to do it, please help.  Update : one should use unary union

given $n \in \mathbb{N}$ ,prove that $A \cap (B_1 \cup B_2 \cup \cdots \cup B_n) = (A \cap B_1) \cup (A \cap B_2) \cup \cdots \cup (A \cap B_n) $ ? (As HomeWork)  Now i know how to prove using induction or using "without loss of generality",  But unfortunately we did not learn them in class so "We don't know them", is there another way to prove the above equality !


I realize this isn't possible, but I can't see why not, especially if you change the model a little bit so that the balls simply travel through a tube of water on the way up, rather than exactly this model.  Please be clear and detailed.  I've heard explanations like "the balls wouldn't move" but that doesn't do it for me - I really do not see why the balls on the right would not be pulled/pushed up, and the rest of the chain wouldn't continue on.


Basic Specs - Ubuntu 13.10, Gnome 3 (session fallback), Ambiance theme, Faenza icons.  I recently installed , now everytime i want to use the program i have to run the sudo /opt/lampp/lampp start command, im quite new at ubuntu but i know my way around some things and i knew i can make a shell script to start the program when i double click on it, so, i open nano in the terminal and write:  #!/bin/bash/ sudo /opt/lampp/lampp start   I save it as "lampp.sh" at my home dir and give it the proper permissions chmod +x lampp.sh and chmod +775 lampp.sh. When i double click on it absolutely nothing happens, in order for it to work i have to open a terminal and run the the script there ./lampp.sh.  If i have to open the terminal each time i want to run the script then the script it self is worthless (specially when runing the sudo /opt/lampp/lampp start is 1 line of code), is there anyway i can run it on double click?  Thanks in advance, i love this community.

I'm trying to run an executable (testdisk) but double click doesn't work. The only way is to run:  sudo ./testdisk   from terminal. But I'd like to open executables with double click in future. How can I do this?


I saw a question my number theory notes: for which values of $n$ , $1+n+n^{2}+n^{3}+n^{4}$ is a perfect  square where $"n"$ is non negative integer? It was solved my professor using inequalities,but i think that his method is too long.Because of that, i did not write it here. I tried to solve it using modular arithmetic but i could not do it. I am looking for hints or solutions to solve it using modular artihmatic. Note= I tried to use $(mod4)$ because for all $x^{2} \equiv \pm 1 (mod4)$ but i stuck in it.

Integer values of $x$ for which $\bf{x^4+x^3+x^2+x+1}$ is a Perfect Square.  $\underline{\bf{My\; Try}}$:: Let $\bf{x^4+x^3+x^2+x+1 = k^2}$, where $k\in \mathbb{Z}$  $4x^4+4x^3+4x^2+4x+1 = 4k^2 = (2k)^2$  Now How can I proceed after that  Help Required,  Thanks


I often ends up with refactoring question, such as "how do you make this code smaller?".  Typical example :   $(document).on( "click", '#el1', function(event) {    ... do stuff...  });   $(document).on( "click", '#el2', function(event) {    ... do more or less same stuff...  });   $(document).on( "click", '#el3', function(event) {    ... do more or less same stuff...  });    when I want it to be   $(document).on( "click", '#el1, #el2, #el3', function(event) {    ... do the whole stuff...  });    Is it ok to post these kind of questions on Stackoverflow ?

Is there a good SE site that is only about refactoring?  I know there are sites like this, but SO has the largest audience of programmers so a section where you can just post a code snippet and people can give advice on refactoring it.


I changed my project display name and then changed its name in the project navigator. (same new name for both). I noticed the target name didn't change. Now I'm noticing that I can't find or build the project and my intents are out of scope. I tried changing the target name itself. It would let me click on it to edit but it wouldn't save it unless its as the old name. I also tried cleaning the build folder and restarting Xcode based on SO advice, but it didn't work. What do I do?

I began an iPhone project the other day with a silly development code name, and now I want to change the name of the project since it's nearly finished.   But I'm not sure how to do this with Xcode, trying the obvious of changing the application's name in the info.plist file, causes the signing process to go wrong (I think...) and my app won't launch giving me a Launcher error.  I guess I could make a new project and copy paste everything over, but it seems so primitive that I'm hoping for a more civilized solution.


Given a multilayer perceptron to be used to separate 2 classes. One has 2 design options.  1 -- Use one output node -- where one class is trained to give an output equal to zero, and the other class is trained to give an output of 1 on this node.   2-- Alternatively one could design a network having 2 output nodes; where one class gives an output of 1 on node #1 and zero on node #2, and the second class gives an output of 0 on node #2 and an output of 1 on node #1.   Which of these two options is considered better?  Also, I notice that the sigmoid function approaches zero but does not quite reach zero. Also, the same function approaches 1 but does not quite reach 1. Given this situation, how can one train a network to output a value of 1 or 0? Should one use something like 0.99 and 0.01 (as opposed to 0 and 1?)

Assume I want to do binary classification (something belongs to class A or class B). There are some possibilities to do this in the output layer of a neural network:   Use 1 output node. Output 0 (<0.5) is considered class A and 1 (>=0.5) is considered class B (in case of sigmoid) Use 2 output nodes. The input belongs to the class of the node with the highest value/probability (argmax).    Are there any papers written which (also) discuss this? What are specific keywords to search on?  This question is already asked before on this site  with no real answers. I need to make a choice (Master Thesis), so I want to get insight in the pro/cons/limitations of each solution.


A coworker replied to an earlier email from me with some very good news. I wanted to thank him for his help. I was hoping to start with     Thank you, Jim. That is wonderful news...      OR is it     Thank you Jim. That is wonderful news...   Do I place the comma after the "Thank you"?

I see a lot of people saying things such as      Nice work, Nick   Or     Thanks, Mat   Is the comma really needed? I'm not 100% sure because my spelling and grammar is not great, but I think it reads very strange.


I have set up a private OpenVPN tunnel which uses the a 10.x.x.x private ip range as the client and server ip. I was wondering if that would cause any problem in big networks that use that ip range also, like for example hotels or conference networks.  I noticed trouble staying connected to the internet sometimes and I was wondering if that had anything to do with it.  What is the recommend ip address range to use in a VPN setup like this?   The setup is: 1 Server 2-3 Clients at once at most (I know that the IP range is overkill, but it was from a tutorial I did some time ago) OpenVPN (if that is anyhow important)

While there's a wide variety of private non-routable networks across 192.168/16 or even 10/8, sometimes in being thoughtful of potential conflict, it still occurs. For example, I set up an installation OpenVPN once with the internal VPN network on 192.168.27. This was all fine and dandy until a hotel used that subnet for floor 27 on their wifi.  I re-IP'd the VPN network to a 172.16 network, since that seems to be all but unused by hotels and internet café's. But is that an appropriate solution to the problem?  While I mention OpenVPN, I'd love to hear thoughts about this problem on other VPN deployments, including plain ol' IPSEC.


Compare: Which is bigger? $\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad$ $\Large{3^{\sqrt2}}\quad$ or  $\quad \Large{2^{\sqrt 3}}$  My attempts: Let,  $\quad$ $a=3^{\sqrt 2}$ and $b=2^{\sqrt 3}$ We have  $$a^\sqrt{3}=3^\sqrt{6}\\ b^\sqrt{3}=8<3^{\sqrt{4}}<3^\sqrt{6}=a^\sqrt{3} $$ $$a^\sqrt{3}>b^\sqrt{3} \Longrightarrow a>b$$  Question-1:  Is my solution correct?  Question-2:  I saw the following solution was approved on another site.  But, the last line seems wrong to me. Am I right?

$\bigodot=?$ $(\sqrt 2) ^ \sqrt 3 \bigodot  (\sqrt 3) ^ \sqrt 2$  where $\bigodot is either \lt or \gt$   In other words, which one is larger $(\sqrt 2) ^ \sqrt 3$ or $(\sqrt 3) ^ \sqrt 2$? The best I could do was ending up with $\sqrt \frac {3}{ 2} = \frac {\ln 3}{\ln 2}$  side question : is there a symbol like encircled $?$ for when what we are trying to find is the correct order symbol like one of $\lt,\leq,=,\geq , \gt $ ?  Hopefully using just juxtopisition of symbols without resorting to real analysis. is it possible to do with precalculs algebra?


Suppose that $f\in L^1(\mathbb{R})$ and that $f(x)=0$ if $x\notin[0,1]$. For $n=1,2,\ldots,$ let $f_n(x)=f\left(x+\frac{1}{n}\right)$. Prove that $\|f_n-f\|_1\to 0$ as $n\to\infty$.

Let $f \in L^1(\mathbb{R})$, for $a\in \mathbb{R}$ let $f_a(x)=f(x-a)$, prove that: $$\lim_{a\rightarrow 0}\|f_a -f \|_1=0$$  I know that there exists $g\in C(\mathbb{R})$ s.t $\|f-g\|_1 \leq \epsilon$, this is also true for $f_a$ and $g_a$.  Now I have the next estimation:  \begin{align*} \|f_a-f\|_1 &= \int_{\mathbb{R}} |f(x)-f(x-a)| dx \\ &= \int |f(x)-g(x)+g(x)-g(x-a)+g(x-a)-f(x-a)| \\ &\leq \|f-g\|_1 + \|f_a-g_a\|_1 + \int |g(x)-g(x-a)| \end{align*} my question is: I can argue that $\lim_{a\to0} \int |g(x)-g(x-a)| = \lim_{a\to0} \lim_{T\to\infty} |g(x_0)-g(x_0-a)| 2T$, now I think that I can change the order of the limits here, but I am not sure why?  P.s $x_0$ is some point in $[-T,T]$, and the above is valid from the intermediate integral theorem for continuous functions, right?  Thanks.


In Windows Explorer (Win7-10) the folder's type is detected automatically by the files in it (e.g., music). I can disable this on folder base manually in the properties of each folder (and its subfolder). But this creates a lot of desktop.ini files.  Is there a way to disable the folder type detection on a system based level - like "Windows should never detect the folder types on its own and should always use the plain file view"?

I'm making an automated installer for Windows XP, and I want the default view to be the "details" view on all folders - that is, the effect gotten by setting one folder to the details view, then going to Tools -> Folder Options -> View -> "Apply to All Folders". I also want the status bar to be showing, same as going View -> Show Status Bar.  What registry entries should I modify, and to what, to have this be the case?


I have updated to Ubuntu 17.10. Now I want to create a bootable USB stick to use on other machines or to install 17.10 on a new machine. Start up Disk Creator recognizes my USB Drive, but is looking for a CD/DVD containing a source file.  I assume an ISO file.  I cannot change the source location and even if could, I have no idea where to find the 17.10 ISO on my hard drive.  I found sample code to create the USB using the terminal but I can not get that to work either, I keep getting a message saying the add command can not be found!  Must I be signed into the root directory to use the necessary  commands and if so how do I do that?

This is the third time I've tried to install Ubuntu Server 14.04.03 64-bit on the same laptop, and each time it caused different problems.  Each time I wrote the same iso image to a USB flash drive by using a different application and OS.   Universal USB Installer (pendrivelinux.com) from Windows WinImage writer from Windows built-in image writer from Linux Mint 17.2    The iso image is the same in all three cases, the USB flash drive is the same, and the laptop is the same. However each time the installation of Ubuntu gave me different installation options. For example, the last time I installed Ubuntu, it didn't show all the packages to choose while installing (Basic Ubuntu server, etc.).


I am trying to make a city with lights on windows. Here is what I have done so far:  I have my city and my material for the window lights, but as you can see the tower in the back has the texture strech all the way up, I would like to know if there is a way to "unstrech" it. I have tried to check on the UV map but I found nothing.  Does Anyone have an idea how ot make this ?  Thx in advance

I just recently got into the nodes system, my knowledge on the subject is limited. I can't seem to find out how to tile textures using my current node setup, because it doesn't tile the them on its own. I know that I could be using a Vector Mapping node, but the way I'm modeling this requires that I texture each part of the building individually. If I use a Vector Mapping node, I'll have to manually adjust each individual part myself. The nodes I'm currently using  The problem that I'm having is that if I use the same nodes for a mesh with different dimensions they get stretched.  I want to avoid the need of using Vector Mapping nodes and just give it the ability to tile the texture so that it goes over a mesh of any size without stretching.


I am working on a school project for Intro to CS and I can't post my code because our teacher fails us for getting code checked from StackOverflow. My issue is that in my code with the format :  while (condition){ Do something;  if (new condition){ Do something else; Wait for input; Depending on input make while's condition false; }   This code should wait for input when the if statement is evaluated and it does something else. However, my code does not wait for "Wait for input" step and goes directly to the "Do something" step. Here's a bit of the code. Thank you for your help.  while (inum != 102) { System.out.println("Enter a number between 1 and 100: "); inum = input.nextInt(); else if (inum == 101) {                 System.out.println("Are you sure you want to quit?");                 confirm = input.nextLine();                 if (confirm == "yes") {                     inum = 102;                 } }   Here the code gives me this when I type in 101: Are you sure you want to quit? Enter a number between 1 and 100:  *The code does not wait for   confirm = input.nextLine();                 if (confirm == "yes") {                     inum = 102;                 }    step.

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


I have a KVM switch (Trendnet TK 409) that helps me switch between my Ubuntu laptop and Linux computer. The switch use a hotkey for switching (numlock+numlock).   Unfortunatly, that only works on Windows. I found a guide on the net, and have now a script called kvm (etc/init.d)  #!/bin/bash numlockx on; sleep 1;  numlockx off; sleep 1;  numlockx on  exit 0   I have then attached a hotkey (ctrl+numlock) and this works perfectly.. But I would like to have done so that whenever I shutdown my Ubuntu computer, the script is executed so that I can continue on my windows computer.   As mentioned earlier kvm lies in etc/init.d and I have created a shortcut in rc0.d called K99kvm  But whenever I turn of my Ubuntu computer, the KVM doesnt switch to Windows computer. As I said the script itself works perfectly with hotkeys, but it doesnt work when turning the computer off.  Help would be much appreciated...  A small question aswell. Is it possible to create a hotkey in Ubuntu like numlock+numlock (2 clicks on the same button) and if yes, then how?

I'd like to run a .sh file using bash on logout and shutdown of Ubuntu. I have searched up and down the web and have found only fixes for KDE and GNOME. The script is simple, I just need to know if I can add the line of code to the "logoff/shutdown" file or if I need to reference it in another script.


I have a geoserver installed on my local machine and on it i have published the map which is connected to Postegresql.  Now i can view a map on geoserver using the openlayers viewer (url-"")"  Now i have code api of leaflet to customise a map which is hosted on geoserver.  Here is a HTML code:      <!DOCTYPE html>        <title> Leaflet Demo </title>      <link rel="stylesheet" href="https://npmcdn.com/leaflet@1.0.0-rc.3/dist/leaflet.css" />            <form id="form1" >

      var map = L.map('map').setView([55.67, 12.60], 11);      var mywms = L.tileLayer.wms("http://localhost:8081/geoserver/test/wms", {     layers: 'k101:theme-startkort',     format: 'image/png',     transparent: true,     version: '1.1.0',     attribution: "myattribution"     });     mywms.addTo(map);
     </form>     But when compiling on visual studio ,browser displays : a code itself  Any idea, what to do?

I'm not very skilled within the GIS world, however, I would like to know if it's possible to use this map:    within leaflet?  I've looked at the API for leaflet and can see that it is possible to use custom maps/tiles with the tileLayer option. However, I cannot get it to work.  Can someone point me in the right direction?


For example, $\sqrt{4}$. I've asked a bunch of people and I get mixed answers all the time, as to whether it is $-2$ and $+2$ or just $+2$.  How about if there's a negative in front of the square root sign, for example, $-\sqrt{4}$? Would that still be plus or minus or just minus?

It is perhaps a bit embarrassing that while doing higher-level math, I have forgot some more fundamental concepts. I would like to ask whether the square root of a number includes both the positive and the negative square roots.  I know that for an equation $x^2 = 9$, the solution is $x = \pm 3$. But if simply given $\sqrt{9}$, does one assume that to mean only the positive root? And when simply talking about the square root of a number in general, would one be referring to both roots or just the positive one, when neither is specified?


"Prove using simple induction that for each integer $n \geq 1$, $$ 5 + 5^2 + 5^3 +..... + 5^n = \frac{5^{n+1}-5}4 $$  so I start with base step  base step: $n = 1$ $$5^1 = \frac{5^{1+1}-5}4 $$ is correct.  induction step: so we assume that $P(k)$ is true for all integers $≥1$ $$ 5^{(k+1)} = \frac{5^{(k+1)+1}-5}4 $$ this is where I get stuck :X, i'm confused about the "$5 + 5^2 + 5^3 +\ldots$ " notation in question and just generally where to go from here

I'm working on a double induction problem with the following prompt:     Prove by induction on $n$ that for any real number $q > 1$ and integer $n \ge 0$:   $$ 1 + q + q^2 + q^3 + \cdots + q^{n-1} + q^n = \frac {q^{n+1}-1}{q-1} $$    Based on , I would imagine the solution is:   Base case $(q,n)$ as $(2,n)$ and $(q,0)$ Assume premise for $(2,n)$ and prove $n+1$ Assume premise for $(q,0)$ and prove $q+1$   But even the base cases confuse me...for example on $(q,0)$: $$1+q^0 = \frac {q^{0+1}-1}{q-1} $$ $$2 = 1 $$  That can't right. Maybe I omit the $q^0$ on the LHS, but why?


I have written a program to find all the links in an HTML page:  public static void main(String[] args) throws IOException {     String base = "http://www.oracle.com/";     URL url = new URL(base);     BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));      StringBuffer stringBuffer = new StringBuffer();     String inputLine = null;     while ((inputLine = in.readLine()) != null) {         stringBuffer = stringBuffer.append(inputLine).append("\n");     }      Matcher matcher = Pattern.compile("<a .*href=\"([^\"]+)\".*", Pattern.DOTALL).matcher(stringBuffer.toString());      ArrayList<String> urlList = new ArrayList<>();     while (matcher.find()){         String relUrl = matcher.group(1);         String fullUrl = relUrl.startsWith("/")?base+relUrl.substring(1):relUrl;         urlList.add(fullUrl);         System.out.println(fullUrl);     }      in.close(); }   For some reason, when I run this code it is only matching one link. However, when I run it without the DOTALL flag, it matches 108 links. The reason I included the DOTALL flag is to match links where the a tag may go over one line, such as:

Solutions

   According to , the regex <a .*href=\"([^\"]+)\".*<\/a> matches the HTML above. (this is slightly different than the one I used in the code because Eclipse wouldn't let me escape the / character)

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


I regularly send out mails using different addresses from different domains. Let's take mail@example.com and new@spf.com as an example.  To keep things easy and centralized (as in: configuration is on the server, so I don't have to set up each client separately), I always use smtp.example.com as my outgoing mail server, which is an Exim on Debian.  Now, the admin of this fictitious spf.com has activated SPF and tells me that mails sent from my @spf.com-address through example.com might start getting filtered. Makes sense!  Of course, I now would go ahead and set up all the different clients I use (home PC, laptop, work machine, smartphone, …) so that mails from the different domains go out through their respective SMTPs. If you ever tried this, it's a hassle: Each client is different and not all are as easy to configure. It would be so much easier to tell Exim to:   check outgoing mails before sending them, "intercept"/filter out ones from @spf.com, and "forward"/send those through smtp.spf.com (with the provided username and password) instead.   This way, I could set up the whole thing once on the server and be done with it—every client would work "out of the box".  I've been having trouble searching for the correct terms to google for; I'd be surprised if Exim wasn't able to do something like this!

I want to route emails with the From: .*@host1.com through smtp.server1.com and emails with the From: .*@host2.com through smtp.server2.com.  For the moment, I have smarthost configured with dpkg-reconfigure exim4-config so that update-exim4.conf.conf contains the line  dc_smarthost='smtp.server1.com::587'. That is, everything routes through smtp.server1.com.  I tried adding another router just before the definition of smarthost: in the config file, setting senders = .*@host2.com  smarthost_server2:   debug_print = "R: smarthost_server2 for $local_part@$domain"   driver = manualroute   domains = ! +local_domains   transport = remote_smtp_smarthost   senders = .*@host2.com   route_list = * smtp.server2.com byname   host_find_failed = ignore   same_domain_copy_routing = yes no_more   but exim still routes everyting via smtp.server1.com. Do I use the senders condition correctly?  AFAIU, this should be a rather common setup for cases when people with emails .@google.com and .@gmail.com do not want to reveal in their @gmail.com email headers the fact that they are also google employees, so the routhing should be different.


I've found plenty of instructions on how to add Google Calendar to Outlook (via ics links) but nothing on how to do it the other way around, which is what I want.  How do I share an Outlook calendar so that I can view it in Google Calendar?

Is there anyway to sync Outlook's calendar with Google's calendar? I've tried  before but it doesn't work properly. I'm using Windows 7 and Outlook 2010.  The thing is, it's really easy to check my Google Calendar on my phone since I have an Android terminal, but on my computer I prefer just opening Outlook instead of opening a web browser and logging into Gmail.


How to prove second moment of a quadratic form where $Z$ has normal distribution with mean zero and covariance matrix identical?

For random variables $X \in \mathbb{R}^h$, and a positive semi-definite matrix $A$: Is there a simplified expression for the expected value, $\mathop {\mathbb E}[Tr(X^TAX)]$ and variance, $Var[Tr(X^TAX)]$? Please note that $A$ is not a random variable.


Let $\phi :F $ $\to$  $ R $ be a ring homorphism. Prove either $\forall x \in F ,\phi (x)=0 $ or $\phi$ injective.    Def homorphic: $\forall x,y \in F \Rightarrow f(a)+f(b)=f(a+b) \wedge f(a)f(b)=f(ab) $   Injective (one-to-one) If $f(a)=f(b) \Rightarrow a=b$    My attempt  There are 2 cases either $\forall x \in F:\phi (x)=0$ or not that is $\exists x \in F:\phi (x)\neq 0$.   There is theorem stating that $f(0_S)=0_R$  (Need to show that in the case $\exists x \in F:\phi (x)\neq 0$ $\implies$ injective)  Assume $f(a)=f(b)\equiv f(a-b)=0_R=f(0_s)$ so $a-b=0_s$$\therefore$ $a=b$    Not sure it might be correct. Also, In the case that shows it is injective it is bothering me that the special property was not used.  There is a related problem but it is a  So i think i can't make  same

Possible Duplicate:          $f:K\rightarrow R$ is a homomorphism from field to ring. To prove is that it is injective or zero.


How can I take a return value which is a char, and check if the char is contained within a String?  I've been told that I should be able to work with the char as is, w/o converting to String. SO I have something like:  String answer = "JAVA IS THE BEST"; char guess = getUserInput(); //Returns a char if (answer.contains(Character.toString(guess))){     //DO SOMETHING }   I was told this is "incorrect" and should be able to work with the char return value as is?!  Thanks

In Java is there a way to check the condition:  "Does this single character appear at all in string x"  without using a loop?


I have a list of strings List<string> str = new List<string> str.Add("test1"); str.Add("test2"); str.Add("test3");  After some processing this list goes to some service where the list gets modified and can have any of the three values "test1"," test2", "test3" or all of them. I want to filter this list based on the strings: "test1"," test2", "test3" and dump it into some another object. How do I filter it without giving hardcoded string values? How do I do it in C# using Linq?

I am looking for a very fast way to filter down a collection in C#.  I am currently using generic List<object> collections, but am open to using other structures if they perform better.  Currently, I am just creating a new List<object> and looping thru the original list.  If the filtering criteria matches, I put a copy into the new list.  Is there a better way to do this?  Is there a way to filter in place so there is no temporary list required?


The  privilege which is gained at one thousand reputation has been around forever. We all know that it lets you see the vote count on posts. But I propose we remove the 1k reputation restriction that is in place to access vote counts. Or at least make it to where that privilege doesn't appear on the . Why? Because that restriction is completely, 100% useless as you have been able to view vote counts without having 1000 reputation for ages, with . You don't even have to be signed in to view the vote counts. Why have a useless privilege when you dont actually even need 1k rep?

Just curious, why is there a required privilege (especially one as high as 1000) to view vote counts for a post? It's not like someone can mess up a post by just viewing the vote counts. Is it just to give people incentive to reach 1000?


I am trying to find the value of $\prod_{i=0}^{\infty}{p_i-1 \over p_i}$ =  ${\lim_{x \to \infty}} {\phi(p_x!) \over p_x!}$ Where $p_x!$ is the $x$th primorial, and $p_i$ is the $i$th prime number.  I guess I can honestly say I have no idea where to start, other than just iteriating it manually (around $0.25$ maybe?)

Where pn is the nth prime number, does the infinite product $$\prod_{n=1}^{\infty}\left(1-\frac{1}{p_n}\right)$$ converge to a nonzero value? (Any help would be much appreciated!)


Is it true that $2^n - 1$ is a prime if and only if n is a prime?

I have the following question where I need to provide a counterexample     if $n$ is prime, then $2^n -1$ is prime   The statement is invalid and I now that $2^n -1$ is not prime when $ n = 11$, but other than plugging in prime numbers is there any other way to figure out whether $2^n -1$ is prime if $n$ is prime?


Ball A (2 kg) is moving towards ball B (1 kg) at 4 m/s. On the other side, ball C (7 kg) is moving towards ball B at 3 m/s. If all three balls collide elastically at the same time, what is the final velocity of each ball? This is a one-dimensional system with no spin, and the coefficient of restitution is 1.   I've tried having the balls collide one at a time, but I got different answers when A and B collide first and when B and C collide first.

I have written an algoritm to resolve a collision between two balls with conservation of momentum. It looks to work exactly as expected in my simulations. Here is the code:  public void Resolve() {   var r = 0.5; // coefficient of restitution   var m = Ball1.Mass + Ball2.Mass;   var ua = Ball1.Velocity.Magnitude * Math.Cos(Ball1.Velocity.Angle(Normal));   var ub = Ball2.Velocity.Magnitude * Math.Cos(Ball2.Velocity.Angle(Normal));   var va = (r * Ball2.Mass * (ub - ua) + Ball1.Mass * ua + Ball2.Mass * ub) / m;   var vb = (r * Ball1.Mass * (ua - ub) + Ball1.Mass * ua + Ball2.Mass * ub) / m;   Ball1.Velocity -= Normal * (ua - va);   Ball2.Velocity -= Normal * (ub - vb); }   Now I also want to make this work for more than two balls colliding at the exact same moment. My initial thought was that I could just solve this equation several times for each contact between balls. When I have a situation like a "Newton's cradle" where the balls is in contact in a "serial" way it's easy to just solve each collision on at a time and without moving the balls just go ahead and calculate the next and the next etc until reaching the last ball which will end up with all energy not lost along the way. This works fine also, albeit not very fast.  But what about for instance a case where three balls are in contact in a V-shape and the bottom ball is the one with a velocity (up in this case)? I mean how now do I distribute the energy between the other two balls? The equation I have only works for two balls and now I don't see how I can calculate this iteratively anymore. Can you help guide me in how I should think with this? Can I modify my Resolve-function to work with any number of balls? I mean with a set of $N$ balls with connecting surfaces and initial velocity vectors, what will the outcome velocities be? Is there a well known general solution for this?  Note:  I have tried out the method currently marked as the answer but I have unfortunately got a bit weird results in some setups. Be warned. I will probably revert back to resolving one collision at a time again. I will update this info when I have tried this more.


I live in KwaZulu-Natal, South Africa, and the only indoor bugs I've experienced issues with are fleas, as I have two cats (and a big garden). This morning, however, I put on a fleece top that had been lying around somewhere, got a lift to the store, and returned to suddenly feel a crawling sensation. I lifted up my shirt to find these tiny bugs crawling all over my upper body. I did some Googling, went upstairs and carefully observed my bedding and bed, however, the only evidence I found was a few newborn fleas / flea larvae (which I intend to deal with today). I should also mention that a flock of wild Egyptian Geese have been raising five goslings in my yard, and they get very close to me when I'm walking outside at times. My house is also not carpeted, it has oregon pine floors throughout. I tried to take a photo of the critters, however, they're very tiny and move very quickly, so it was difficult to get a clear shot. Any advice would be greatly appreciated.

This bug is crawling all around the house it stays within the shadows and moves very very slow, i have never seen it jump or run, it just moves very slowly    P.S. those bugs as u can see are smaller than 1mm so it's hard to take better pictures but i will get better ones tomorrow  P.S. the hairs are not hairs they are wool from the carpets, i just got married in october 2014 and everything in the house is new, including the flat, it was built in january 2014.    it is very similar to what's in this picture, but i couldn't take a picture of it because it's tooo tiny  I really need to know what it is so I can deal with it :(  Edit: once i found a very little few under the carpet but it generally stays away from the carpets and stays on the tiles and I don't think it is a termite because I don't find any piles of eaten wood  EDIT 2: More pictures:  -- Stage 1 --       -- Stage 2 --       I don't know what it is but I know that there is ones young in age i call them stage 1 they are unable to move  and there are ones I call stage 2 older in age and bigger in size and they can move and I think they can bite too  -- Insect 2 -- 5mm by 5mm     I found this one across the hall from the others and I do't know if it's related, i found it dead but I haven't sprayed that side with insecticides i sprayed the other side so it's possible that it was with the others but ran and died far from them.  EDIT: More photos  P.S. I found those moving in daylight (now)    when i blew a little air i think i turned it


To prove $\frac{\mathrm{d}^3\vec{p}}{E}$ is Lorentz invariant is to prove  $$\frac{\mathrm{d}^3\vec{p}}{E} = \frac{\mathrm{d}^3\vec{p}'}{E'} \qquad(\mathrm{d}^3\vec{p} := \mathrm{d}p_x \mathrm{d}p_y \mathrm{d}p_z). \tag{1}$$  Suppose reference system $\Sigma'$ is moving at speed $v=\beta$ ($c=1$) along $z$ axis of $\Sigma$. We have $$E' = \gamma(E - \beta p_z), \qquad p_{x,y}' =p_{x,y}, \qquad p_z' = \gamma(p_z-\beta E), $$  then  $$\det\frac{\mathrm{d}\vec{p}'}{\mathrm{d}\vec{p}} = \gamma \Big( 1 - \frac{\mathrm{d}E}{\mathrm{d}p_z} \Big).$$  If $$ \frac{\mathrm{d}E}{\mathrm{d}p_z} = \frac{\partial E}{\partial p_z} = \frac{p_z}{E}, \tag{2} $$  we can prove (1). However, I don't understand the first equality in (2).

When we canonically quantize the scalar field in QFT, we use a Lorentz invariant integration measure given by $$\widetilde{dk} \equiv \frac{d^3k}{(2\pi)^3 2\omega(\textbf{k})}.$$  How can I show that it is Lorentz invariant?


Hi I want to convert a Bitmap to byte[] i did this :   byte[] imageInByte; Uri uri = data.getData(); bitmap = null; try {     bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uri); } catch (IOException e) {     e.printStackTrace(); }     int size = bitmap.getRowBytes() * bitmap.getHeight(); ByteBuffer byteBuffer = ByteBuffer.allocate(size); bitmap.copyPixelsToBuffer(byteBuffer); imageInByte = byteBuffer.array();   Next I want to convert this byte[] to Bitmap and I did this :  Bitmap bmp = BitmapFactory.decodeByteArray(imageInByte, 0, imageInByte.length);   And when I what check a bmp.getWidth();  and show in Toast:  Toast.makeText(this,bmp.getWidth()+"",Toast.LENGTH_SHORT).show();   I have nullpointer please help me

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?


The following image is my failed attempt to make a sword handle's surface meet the blade's bottom. How can I snap the blade's bottom to the handle?

I have a sword handle and I want it centered below a completely differently object that has a face on the bottom with a vertex in the middle. I could also snap a central vertex to the other one but I don't know how. How can i do this?


I need to prove the theorem      Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be a convex function such   that $ \lim_{x\rightarrow -\infty}f(x) = −\infty$. Show that $\lim_{x\rightarrow\infty} f(x) = \infty$   I can see clearly why this must hold by doing a graph where $f(x)$ converges to a constant when $x\rightarrow\infty$. But I have no idea of how to do a formal proof of this.

I don't know how to approach this exercise: Let $f$ be a real valued convex function that satisfies:  $$\lim_{x\to-\infty}f(x)=-\infty$$  prove that it must be $$\lim_{x\to+\infty}f(x)=+\infty$$  I know the definition of convexity and limits however I don't know how to prove this formally.


I found a command online to clear the trash for you because I wanted to clear a file without doing it throught GUI. The command is sudo rm -rf ~/.local/share/Trash/* . I called it and saw the folder on my right monitor disapear. I looked on the left monitor to see everything gone. I looked up recovery tools for ubuntu and found photorec . I used it and it said it recovered 200 files but none are there. EVERYTHING from my home directory is gone as well as Documents downloads, etc. How can I recover this? I had many important things I didn't back up.

Are there any tools, methods, incantations to recover recently deleted files on Ubuntu?  If it makes any difference, I want to recover a  2.x database file. But would be better to have a method/tool that works on any kind of file.


"Let A = $\begin{bmatrix}1 & 1 & 4\\0 & 3 & -4\\0&0&-1\end{bmatrix}$. Is the matrix A diagonalizable?  If so find a matrix P that diagonalizes A. Can you write A as a linear combination of rank 1 matrices formed from its eigenvectors? Determine the eigendecomposition $A = PΛP^{-1}$."  My solution attempt:  det(λI - A) = $\begin{vmatrix}λ - 1 & -1 & -4\\0 & λ - 3 &4\\0&0&λ + 1\end{vmatrix}$ = (λ -1) (λ -3) (λ + 1) = 0  $λ_{1}$ = 1, $λ_{2}$ = 3, $λ_{3}$ = -1  ($λ_{1}I - A)x_{1}$ = 0  $\begin{bmatrix}0 & -1 & -4\\0 & -2 &4\\0&0&2\end{bmatrix}$ $\begin{bmatrix}x_{11}\\x_{12}\\x_{13}\end{bmatrix}$ = $\begin{bmatrix}0\\0 \\0\end{bmatrix}$   $\begin{bmatrix}x_{11}\\x_{12}\\x_{13}\end{bmatrix}$ = $x_{11} \begin{bmatrix}1\\0 \\0\end{bmatrix}$  It follows that $\begin{bmatrix}1\\0 \\0\end{bmatrix}$ is a basis for the eigenspace of A corresponding to $λ_{1}$ = 1.  In a similar way, I found other two basis vectors as $\begin{bmatrix}1/2\\1 \\0\end{bmatrix}$ and $\begin{bmatrix}-2/5\\1 \\1\end{bmatrix}$, and I got $P = \begin{bmatrix}1 & 1/2 & -2/5\\0 & 1 & 1\\0&0&1\end{bmatrix}$. Then my $P^{-1} = \begin{bmatrix}1 & -1/2 & 9/10\\0 & 1 & -1\\0&0&1\end{bmatrix}$. And I said A's left-multiplication by $P^{-1}$ and right-multiplication by $P$ $(P^{-1}AP)$ gives the diagonal matrix Λ that is similar to A. I found Λ as $\begin{bmatrix}1 & 0 & 0\\0 & 3 & 0\\0&0&21/5\end{bmatrix}$. Then I said that if we multiply both sides of the equation $P^{-1}AP = Λ$ by $P$ from the left and by $P^{-1}$ from the right we get $PP^{-1}APP^{-1} = PΛP^{-1} = A$ and that this is the eigendecomposition of A. Here are my questions:   Do you think I understood and did correctly what the asker wanted me to do by saying "Determine the eigendecomposition $A = PΛP^{-1}$."? What the hell does the sentence "Can you write A as a linear combination of rank 1 matrices formed from its eigenvectors?" mean?

Let A = $\begin{bmatrix}1 & 1 & 4\\0 & 3 & -4\\0&0&-1\end{bmatrix}$. Is the matrix A diagonalizable?  If so find a matrix P that diagonalizes A. Can you write A as a linear combination of rank 1 matrices formed from its eigenvectors? Determine the eigendecomposition $A = PΛP^{-1}$. A = $\begin{bmatrix}3 & 1 & 0\\1 & 2 &1\\0&1&3\end{bmatrix}$. Is the matrix A diagonalizable?  If so find a matrix P that orthogonally diagonalizes A. Can you write A as a linear combination of rank 1 matrices formed from its eigenvectors? (Note that A is real symmetric so that you do not have to compute the inverse of P).   My solution attempts:   det(λI - A) = $\begin{vmatrix}λ - 1 & -1 & -4\\0 & λ - 3 &4\\0&0&λ + 1\end{vmatrix}$ = (λ -1) (λ -3) (λ + 1) = 0   $λ_{1}$ = 1, $λ_{2}$ = 3, $λ_{3}$ = -1  ($λ_{1}I - A)x_{1}$ = 0  $\begin{bmatrix}0 & -1 & -4\\0 & -2 &4\\0&0&2\end{bmatrix}$ $\begin{bmatrix}x_{11}\\x_{12}\\x_{13}\end{bmatrix}$ = $\begin{bmatrix}0\\0 \\0\end{bmatrix}$   $\begin{bmatrix}x_{11}\\x_{12}\\x_{13}\end{bmatrix}$ = $x_{11} \begin{bmatrix}1\\0 \\0\end{bmatrix}$  It follows that $\begin{bmatrix}1\\0 \\0\end{bmatrix}$ is a basis for the eigenspace of A corresponding to $λ_{1}$ = 1.  In a similar way, I found other two basis vectors as $\begin{bmatrix}1/2\\1 \\0\end{bmatrix}$ and $\begin{bmatrix}-2/5\\1 \\1\end{bmatrix}$, and I got $P = \begin{bmatrix}1 & 1/2 & -2/5\\0 & 1 & 1\\0&0&1\end{bmatrix}$. Then my $P^{-1} = \begin{bmatrix}1 & -1/2 & 9/10\\0 & 1 & -1\\0&0&1\end{bmatrix}$. And I said A's left-multiplication by $P^{-1}$ and right-multiplication by $P (P^{-1}AP)$ gives the diagonal matrix Λ that is similar to A. I found Λ as $\begin{bmatrix}1 & 0 & 0\\0 & 3 & 0\\0&0&21/5\end{bmatrix}$. Then I said that if we multiply both sides of the equation $P^{-1}AP = Λ$ by $P$ from the left and by $P^{-1}$ from the right we get $PP^{-1}APP^{-1} = PΛP^{-1} = A$ and that this is the eigendecomposition of A. Here is my first question: Do you think I understood and did correctly what the asker wanted me to do by saying "Determine the eigendecomposition $A = PΛP^{-1}$."?   I started in the same manner and I got three eigenvectors as  $\begin{bmatrix}x_{11}\\x_{12}\\x_{13}\end{bmatrix}$ = $x_{12} \begin{bmatrix}0\\1 \\0\end{bmatrix}$,  $\begin{bmatrix}x_{21}\\x_{22}\\x_{23}\end{bmatrix}$ = $x_{21} \begin{bmatrix}1\\1 \\1\end{bmatrix}$ and  $\begin{bmatrix}x_{31}\\x_{32}\\x_{33}\end{bmatrix}$ = $x_{33} \begin{bmatrix}1\\-2 \\1\end{bmatrix}$.   I said A is not diagonalizable since the eigenvectors are not linearly independent.  Here is my second question: What the hell does the sentence "Can you write A as a linear combination of rank 1 matrices formed from its eigenvectors?" mean?


The Anscombe Quartet powerfully makes the point about the effectiveness of a visualization.  Do people have other (pedagogically tested) vignette/dataset examples, especially based on economic/business data, for which using the right visualization helps the analyst gain unique insights about patterns in the data?

I've just come across  (four datasets that have almost indistinguishable descriptive statistics but look very different when plotted) and I am curious if there are other more or less well-known datasets that have been created to demonstrate the importance of certain aspects of statistical analyses.


Ubuntu won't find any wifi near me to connect and I don't know how. I was fine connecting to wifi with windows 7 but now I can't connect to any or find wifi.     Here is the output of lspci -knn | grep Net -A3; rfkill list:   09:00.0 Ethernet controller [0200]: Broadcom Corporation NetXtreme BCM5752 Gigabit Ethernet PCI Express [14e4:1600] (rev 02)     Subsystem: Dell NetXtreme BCM5752 Gigabit Ethernet PCI Express [1028:01cc]     Kernel driver in use: tg3     Kernel modules: tg3 0c:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11b/g WLAN [14e4:4311] (rev 01)     Subsystem: Dell Wireless 1390 WLAN Mini-Card [1028:0007]     Kernel driver in use: b43-pci-bridge     Kernel modules: ssb 0: dell-wifi: Wireless LAN     Soft blocked: no     Hard blocked: no

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I am successfully checking, if a string matches any value  in a dictionary. The string is a substring of the value (if matching). Upon matching, I append the key of the value, where the substring was found, to a list.  Is there any way in python to introduce something like an if condition, to do the following:  "only append to the list, if the substring matches at position 60+ (of 100) in the value"  My code so far:  #!/usr/bin/python3 # imports import re,sys import itertools # handling stdin faFile=sys.argv[1] pat=sys.argv[2] pat2=sys.argv[3] # opening .fa-File and building dictionary with open (faFile) as f:     # reading file-content line by line     content=f.readlines()     # stripping linebreaks and >     content=[x.strip()for x in content]     content=[x.strip('>') for x in content] # building dictionary from content # IDs are keys, sequences are values d=dict(itertools.zip_longest(*[iter(content)]*2, fillvalue=""))  # motif- search function def search (myDict, search1, search2):     # initialize empty list to store found keys     search.a=[]     # iterating through dictionary     for key, value in myDict.items():         if search1 in value:             if search2 in value:                 search.a.append(key)  search(d,pat,pat2) print(search.a)   Command-line call:  ./search.py file.fa pat pat2   I thought of something like introducing a counter, but couldn't figure it out yet

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I have my own DNS server, DHCP sets it in any host on the LAN.  I have just installed a new Ubuntu 17.10 laptop  This command  nslookup abox   Can't find the IP of abox (it is in DNS)  nslookup > server 192.168.1.30 abox   Returns the correct address  systemd-resolve --status   claims to be using   DNS Servers: 192.168.1.30   But it obviously is not, its using 127.0.0.53, I can see the traffic in tcpdump.  So how do I tell systemd to stop messing with the DNS config that DHCP has told it to use and to actually start using the DNS server it claims to be using?

My DNS server is 192.168.1.152.  This DNS is provided to clients by DHCP. The windows clients on my LAN resolve names properly using that DNS, but my Ubuntu VM doesn't.  The VM is set up with bridge networking and is being properly provided the DNS server, but my local hostnames aren't being resolved by nslookup or browsers.  Here is an nslookup of one of my local domains:  # nslookup unraid.local Server:     127.0.0.53 Address:    127.0.0.53#53  ** server can't find unraid.local: SERVFAIL   Here is what it should resolve by using my DNS server:  # nslookup unraid.local 192.168.1.152 Server:     192.168.1.152 Address:    192.168.1.152#53  Name:   unraid.local Address: 192.168.1.152   /etc/resolv.conf has a wrong nameserver:  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN # 127.0.0.53 is the systemd-resolved stub resolver. # run "systemd-resolve --status" to see details about the actual nameservers.  nameserver 127.0.0.53   I ran that command. Under DNS Servers, confusingly, it specifies the correct server (and my default gateway).  root@ubuntu:~# systemd-resolve --status Global           DNSSEC NTA: 10.in-addr.arpa                       16.172.in-addr.arpa                       168.192.in-addr.arpa                       17.172.in-addr.arpa                       18.172.in-addr.arpa                       19.172.in-addr.arpa                       20.172.in-addr.arpa                       21.172.in-addr.arpa                       22.172.in-addr.arpa                       23.172.in-addr.arpa                       24.172.in-addr.arpa                       25.172.in-addr.arpa                       26.172.in-addr.arpa                       27.172.in-addr.arpa                       28.172.in-addr.arpa                       29.172.in-addr.arpa                       30.172.in-addr.arpa                       31.172.in-addr.arpa                       corp                       d.f.ip6.arpa                       home                       internal                       intranet                       lan                       local                       private                       test  Link 2 (ens33)       Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6        LLMNR setting: yes MulticastDNS setting: no       DNSSEC setting: no     DNSSEC supported: no          DNS Servers: 192.168.1.152                       192.168.1.1   I don't want to "hard code" the DNS server's IP in a config file because I won't be able to resolve when I change networks.  How can I get resolvconf and NetworkManager to automatically set the DHCP server's IP in /etc/resolv.conf?


I'm beginner with Java EE, when I try to transfer an object between a JSP and a Servlet I use a session. For an homework, I have to create an e-commerce website. I just have this in my jsp:  HttpSession sess = request.getSession();               Panier pan = new Panier(); sess.setAttribute("panier", pan); sess.setAttribute("produit", produits.get(0));   produits is an arraylist of "produit" object.  In my Servlet:  HttpSession sess = request.getSession(); Panier pan = (Panier) sess.getAttribute("panier"); Produit p1 = (Produit) sess.getAttribute("prod");   When I'm here, all works cause I can display the good attributes of the object pan or p1. But, when I use my method "ajouterProduit" (addProduct in English), a savage null pointer exception appears.  My class "Produit":  public class Produit implements java.io.Serializable{ private String nom; private int prix;  public Produit(String name, int price){     this.nom = name;     this.prix = price; }  public void setNom(String n){     this.nom = n; }  public void setPrix(int p){     this.prix = p; }  public String getNom(){     return this.nom; }  public int getPrix(){     return this.prix; } }   My class "Panier" (basket in english):  public class Panier implements Serializable{ private List<Produit> panier; private static int montant = 0;  public Panier(){     panier = new ArrayList<>(); }  public void ajouterProduit(Produit p1){     panier.add(p1);     montant = montant + p1.getPrix(); }  public void ajouterProduit(Produit p1, Produit p2){     panier.add(p1);     montant = montant + p1.getPrix();     panier.add(p2);     montant = montant + p2.getPrix(); }  public void ajouterProduit(Produit p1, Produit p2,Produit p3){     panier.add(p1);     montant = montant + p1.getPrix();     panier.add(p2);     montant = montant + p2.getPrix();     panier.add(p3);     montant = montant + p3.getPrix(); }  public List<Produit> getPanier(){     return panier; }  public int getMontantTotal(){     return montant; } }   Thanks in advance for help ! ;)

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 take a screenshot which I was coding in my game result screen.  I used the following method that I found in StackOverflow:  public void TakeScreenShot(){     Date now = new Date();     android.text.format.DateFormat.format("yyyy-MM-dd_hh:mm:ss", now);      try {         String mPath = Environment.getExternalStorageDirectory().toString() + "/PICTURES/Screenshots/" + now + ".jpg";          v1 = this.findViewById(android.R.id.content).getRootView();         v1.setDrawingCacheEnabled(true);         bitmap = Bitmap.createBitmap(v1.getDrawingCache());         v1.setDrawingCacheEnabled(false);          File imageFile = new File(mPath);          FileOutputStream outputStream = new FileOutputStream(imageFile);         int quality = 100;         bitmap.compress(Bitmap.CompressFormat.JPEG, quality, outputStream);         outputStream.flush();         outputStream.close();          Toast.makeText(this, "Screenshot OK", Toast.LENGTH_SHORT).show();      } catch (Throwable e) {         e.printStackTrace();     } }   but I'm getting NullPointerException at Bitmap.CreateBitmap.  My Bitmap and Views are global and I try to call method in OnCreate.     11-04 15:20:17.868 13569-13569/com.finger W/System.err:   java.lang.NullPointerException   How can I solve this problem?     I FOUND SOLUTION!   I try to call takeScreenshot method in onCreate and always i got same result all different variation, but i try call method in "Share Button" click event, now its working. Thank you.


Please settle an UNO debate with regards to Wild Draw 4.  The face card on top of the pile is a Blue 0.  Player 1 plays WD4 but does not change the color.  Player 2 plays WD4 changes the color to Blue.  Player 3 challenges player 2 on having Blue cards.  Who is being challenge player 1 or 2?

Need clarification on the Draw 4 rule. - Player 1 lays down a Draw 4 Card and says the color is Red. - Player 2 does not have a Red card but has a Draw 4 Card. Can Player 2 lay down his Draw 4 Card and have Player 3 draw 8 cards?


I wish to write text from stdin to a file that is owned by root.  I'm doing this programmatically across an SSH connection - essentially from a script - so using a text editor is out of the question. There is no terminal. The process is entirely automated.  Given that [a] root elevation can be obtained via sudo, and [b] files can be written to using cat with redirection, I assumed the following would work:  ssh user@host sudo cat >the-file   Unfortunately, the redirection is applied to sudo, not to cat. How can I apply redirection to cat in this example?

I've been given sudo access on one of our development RedHat linux boxes, and I seem to find myself quite often needing to redirect output to a location I don't normally have write access to.  The trouble is, this contrived example doesn't work:  sudo ls -hal /root/ > /root/test.out   I just receive the response:  -bash: /root/test.out: Permission denied   How can I get this to work?


I'm trying to export a model with textures as an FBX. the export works fine except the texture comes out as flat. this is how model looks when its box:  this is how model looks when its flat:  this is how the model looks when exported as an FBX with "box":  i want the export to be like the first picture. the fire texture at the back is exported as "flat" and comes out in the FBX matching the model of the first picture (which is correct). the body texture in the middle is exported as "box" but comes out in the FBX matching the "flat" model in the second picture (which is wrong). has anyone encountered something similar to this?

I used node textures in a mesh I exported to .FBX.  I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine.  Is there something I'm doing wrong or is it Blender?


Consider the sequence $$ a_{n} = \sum_{r=1}^{n}\frac{1+2+\cdots +r}{r!} $$ Then we have, $$ a_{n} = \sum_{r=1}^{n}\frac{1}{r!} \ + 2\sum_{r=2}^{n}\frac{1}{r!} \ + 3\sum_{r=3}^{n}\frac{1}{r!} \ + \cdots  + n\sum_{r=n}^{n}\frac{1}{r!} \ \geq \ 1 + \sum_{r=1}^{n}\frac{1}{r!}$$ for all $n \geq 2$. $\implies \displaystyle  \lim_{n \to \infty}a_{n} \ \geq \ e $ Now, in my book it says $\displaystyle  \lim_{n \to \infty}a_{n} \ = \frac{3}{2}e $ How can I attack this problem? Anyone please?

What is the value of the following sum?  $$\frac{1}{1!}+\frac{1+2}{2!}+\frac{1+2+3}{3!}+ \cdots$$  The possible answers are:  A. $e$ B. $\frac{e}{2}$ C. $\frac{3e}{2}$ D.  $1 + \frac{e}{2}$  I tried to expand the options using the series representation of $e$ and putting in $x=1$, but I couldn't get back the original series. Any ideas?


I would like to know which one is correct, "She is not yet here." or "She is not here yet." Or are they both correct?

If I have to write a causative sentence in Present Perfect, where should I put yet, at the end of the question or right after the negation?        She hasn't had her doors mended by the carpenter yet.    She hasn't had her doors mended yet by the carpenter.    Has she had her doors mended yet?      Could I say this:         She hasn't had yet her doors mended.    Has she had yet her doors mended?      Which is the right order, or are both acceptable?


I saw a lot of materials supposing that the Bernoulli's equation explains the curvature of a soccer ball: since the ball is spinning, two sides of the ball would experience different velocities, and due to Bernoulli's theory, the side with slower velocity generates a higher pressure and push the ball to the other side.   However, when we first learnt the Bernoulli's equation, one of the fundamental criteria is that it must be applied on the same streamline. And in the above case, the streamlines on the two sides of the ball are separated. So how does the Bernoulli's theory explain the curving-ball phenomenon? Is that a misconception?

I've seen a  here on the Magnus force, which explains why balls with a spin will curve.  However, my intuition is still telling me that the Bernoulli's principle would push it the opposite way and I need help understanding why my reasoning is flawed.  Imagine that you kick a soccer ball on the left side so that it's spinning clockwise (viewing the ball from above) and the ball will curve to the right.  Since the left side of the ball is spinning against the air, wouldn't this mean faster relative speeds and thus a lower pressure than the right side?  And wouldn't this lower pressure on the left side cause it to curve left instead of right?


Peano introduced a number of logical symbols still used today:   ∨ (from Latin vel) ∧ (inverted ∨) ∃   This inversion of Latin letters as symbols (and inversion of symbols to signify their 'opposite' operation) was followed by later logicians:   ∀ (Gentzen, : inverted A from "All-Zeichen", by analogy to ∃) ⊥ (inverted ⊤)   I had always assumed that ∃ stood for "E" in "Existential" / "there Exists", but Peano wrote and introduced this symbol in French, not using any words beginning 'E':     Mais nous préférons l'indiquer par la nouvelle notation      Ǝa      qu'on peut lire « il y a des a ».         , Peano (1897)      So why did he choose an inverted "E"?

I imagine that these symbols originated in one of the following ways:  "I will declare a symbol for "for all." I will just use the letter "A" flipped upside-down. Yes, let $\forall$ represent "for all."  Hmmm, now I need a similar notation for "there exists." Well, I will do the same thing with the letter "E". But wait! The letter "E" has horizontal symmetry, so this won't work! I must flip it backwards instead. $\exists$ it is!"  OR  "I will declare a symbol for "there exists." I will just use the letter "E" flipped backwards. Yes, let $\exists$ represent "there exists."  Hmmm, now I need a similar notation for "for all." Well, I will do the same thing with the letter "A". But wait! The letter "A" has vertical symmetry, so this won't work! I must flip it upside-down instead. $\forall$ it is!"  So which is it? Did we flip our A's or our E's first?


Here's a sample dictionary.  example = {'a': 10, 'b': 12, 'c': 10, 'd': 12}   I want to print them like below.  12 b, d 10 a, c

Given a dictionary like so:  my_map = {'a': 1, 'b': 2}   How can one invert this map to get:  inv_map = {1: 'a', 2: 'b'}


The  is kind of elusive about this:       The creature is limited in the actions it can perform by the nature of its new form, and it can't speak, cast Spells, or take any other action that requires hands or Speech. (5th Edition SRD, p. 169)      We were in an arena doing some gladiator fights and one of the foes, controlled by the DM, was a sorcerer.    My DM took it this way: spells don't require hands or speech while casting a Subtle Spell, so he could transform his character into a Giant Ape with polymorph, buffed with Mage Armor, and kept counter-spelling me since I was the only caster in the fight.    I think this is the wrong way to interpret the whole thing, but I am running out of proof.   Here's the question: Who is wrong and why?    I searched a lot about the topic, but couldn't find anything. Was it included in an errata I could not find?

The Polymorph spell states (in part):     The target’s game statistics, including mental ability scores, are   replaced by the statistics of the chosen beast. It retains its   alignment and personality.      The creature is limited in actions it can perform by the nature of its   new form, and it can’t speak, cast spells, or take any other action   that requires hands, or speech.   So, can a polymorphed Paladin use their Divine Smite class feature?  It expends a spell slot, but it is not a spell, and as far as we can tell does not require hands or speech.  We know (based on the 10th level Transmutation Wizard feature) that a wizard is supposed to be able to polymorph herself, and we can assume that she is also supposed to be able to maintain concentration needed to stay in the new form (otherwise it would be a pretty useless ability).  This is (as far as I can tell) not something any of the beasts eligible as polymorph targets can normally do.  So it is clear that the polymorphed creature maintains some abilities from her old form.  The question is which ones.    The Druid's Wild Shape ability explicitly says you can use class features, while Polymorph does not, suggesting that you can't use class features while polymorphed.  However, Wild Shape also explicitly says that you can continue to concentrate on a spell (see below, emphasis mine), and Polymorph does not, yet we believe that a polymorphed creature can continue to concentrate on the polymorph spell.  So the fact that Wild Shape explicitly allows something and Polymorph is not explicit about it does not necessarily mean that the polymorphed creature cannot do those things.  From Wild Shape rules:     You can't cast spells, and your ability to speak or take any action   that requires hands is limited to the capabilities of your beast form.   Transforming doesn't break your concentration on a spell you've   already cast, however, or prevent you from taking actions that are   part of a spell, such as call lightning, that you've already cast.   So, since Polymorph is silent on the question of whether or not class abilities can be used, and states only that the polymorphed creature cannot perform actions that require hands or speech, how can we best determine whether (RAI) polymorphed creatures maintain any of their old abilities beyond spell concentration?