I live in the United States. One of my credit cards issued by a bank based in the US (namely, JPMorgan Chase Bank) was used fraudulently. I informed my bank, who Informed me they would close my credit card account, then  give me a new credit card with a different account number.  What's the impact on my credit score, if any?  The fraud did not cause me to miss any payment on my credit card account. I detected the fraud  within 2 days, and called my bank immediately.    Excerpts from the e-mail I received from the bank:     We closed your Chase credit card account ending in XXXX to prevent unauthorized transactions, as we recently discussed.      What you need to know about your replacement credit card:         You'll need to update the new account number if you have automatic bill pay set up for this credit card.   We'll notify Equifax, TransUnion and Experian that we closed your other account. Their records should be updated within 60 days.

I recently left my credit card at a bar so I reported it as lost to my bank, and my bank said I will get a replacement within a few days. For what it's worth, I picked my card up from the bar a few days later and made sure to cut it up.  The new credit card has arrived and has new numbers. Will this negatively affect my credit score?  VISA, Chase Bank, USA.


I have a batch file which creates a backup of some source code folders when run. For back file name it creates a string consisting of current date time.   To get date time string following snippet is used.  SET isodt=%date:~-4%_%date:~3,2%_%date:~0,2%__%time:~0,2%_%time:~3,2%_%time:~6,2% echo %isodt% pause   It gives following output when run on my laptop:  2019_09_12__14_25_01   Recently I ran it on a virtual machine and it gave me following output for same code.  2019_ 0_Th__14_18_18   Why is output not the same? Both are run on Windows 10 64 bit machines.

Update: Now that it's 2016 I'd use PowerShell for this unless there's a really compelling backwards-compatible reason for it, particularly because of the regional settings issue with using date. See @npocmaka's     What's a Windows command line statement(s) I can use to get the current datetime in a format that I can put into a filename?  I want to have a .bat file that zips up a directory into an archive with the current date and time as part of the name, for example, Code_2008-10-14_2257.zip. Is there any easy way I can do this, independent of the regional settings of the machine?  I don't really mind about the date format, ideally it'd be yyyy-mm-dd, but anything simple is fine.  So far I've got this, which on my machine gives me Tue_10_14_2008_230050_91:  rem Get the datetime in a format that can go in a filename. set _my_datetime=%date%_%time% set _my_datetime=%_my_datetime: =_% set _my_datetime=%_my_datetime::=% set _my_datetime=%_my_datetime:/=_% set _my_datetime=%_my_datetime:.=_%  rem Now use the timestamp by in a new ZIP file name. "d:\Program Files\7-Zip\7z.exe" a -r Code_%_my_datetime%.zip Code   I can live with this, but it seems a bit clunky. Ideally it'd be briefer and have the format mentioned earlier.  I'm using Windows Server 2003 and Windows XP Professional. I don't want to install additional utilities to achieve this (although I realise there are some that will do nice date formatting).


i am a ubuntu user.  i often open/launch programms from the command line / terminal. But when i close the terminal, the program also shuts down. Is there some way to let the programs stay open, even when the terminal, i launched it from, is closed?  Thank you in advance!

I know that I can append & to a command to run the process in the background.   I'm SSH'ing into an Ubuntu 12.04 box and running a python program with $python program.py & -- but when I go to close the terminal window I get a message saying that closing the terminal will kill the running process.   Why is this? I am using the ampersand to run the process in the background. How can I get it to run regardless of if I am SSH'ed in?


I am the author of the question:  Following Zarko's advise, I have revised my code according to his suggestion to get my bolded number aligned in the right way. However, a new problem is popping up. I am making another post because I can't share the updated version of my code in my previous post. I am trying to make a table with special header. I tried the following code: \documentclass[11pt,a4paper]{article} \usepackage[hyperref]{NAACL2019} \usepackage[skip=1ex,font=small]{caption} \usepackage{times} \usepackage{url} \usepackage{latexsym} \usepackage{algorithm}  \usepackage{algpseudocode}  \usepackage{sectsty} \usepackage{amssymb} \usepackage{makecell} \usepackage{multirow} \usepackage{amsmath,epsfig,times} \usepackage{tabularx}  \usepackage{booktabs} \usepackage{etoolbox} \usepackage{subcaption} \usepackage[utf8]{inputenc} \usepackage{booktabs} \usepackage{siunitx}  % <--- \usepackage{etoolbox} % <---  \newrobustcmd\B{\DeclareFontSeriesDefault[rm]{bf}{b}\bfseries} % <===  \usepackage{hyperref} % load this package _last_  \begin{table}[ht] \sisetup{detect-weight, mode=text, table-format=1.4} \centering \begin{tabular}{l SS              S[table-format=-1.2]             S[table-format=1.2] } \toprule  & \multicolumn{2}{c}{M1}    & \multicolumn{2}{c}{M2} \\    \cmidrule(lr){2-3} \cmidrule(l){4-5}  & {1-2} & {7-8} & {1-2} & {7-8} \\  \midrule A & \B{0.0021} & \B{0.0033} & -2.37 & 0.00 \\  B & \B{0.0052} & \B{0.0042} & -1.23 & 0.67 \\  C & 0.0960     & \B{0.0054} & -0.62 & 1.10 \\  D & \B{0.0082} & \B{0.0057} & -0.21 & 1.08 \\  E & 0.0107     & 0.0097     &  0.74 & 1.41 \\  F & \B{0.0080} & 0.0088     &  5.05 & 5.05 \\  G & 0.0140 & 0.0148 & -2.37 & 0.00 \\  H & 0.0128 & 0.0176 & -1.23 & 0.67 \\  I & 0.0157 & 0.0164 & -0.62 & 1.10 \\  J & 0.0145 & 0.0155 & -0.21 & 1.08 \\  K & 0.0205 & 0.0209 &  0.74 & 1.41 \\  L & 0.0236 & 0.0225 &  5.05 & 5.05 \\  \bottomrule \end{tabular}%} \smallskip \caption{My Caption} \label{tab:table1} \end{table}  But it gives the following result:  The problem here is that there is [rm]bfb right before each bolded number, which I want to remove. How can I resolve this issue? PS: For my LaTeX document, I am using this specific template for a particular academic conference:  This conference template is 2-columned, that is, the texts are displayed on each page in 2 columns. Thank you,

I am trying to make a LaTeX table that includes special headers. My code for the table is shown below: \begin{table}[ht] \centering \scalebox{0.70}{ \begin{tabular}{lddcdd} \toprule  &\multicolumn{2}{c}{M1} &   & \multicolumn{2}{c}{M2} \\ \cmidrule{2-3} \cmidrule{5-6}  & \multicolumn{1}{c}{1-2}   & \multicolumn{1}{c}{7-8} &   & \multicolumn{1}{c}{1-2}   & \multicolumn{1}{c}{7-8} \\  \midrule A &   \textbf{0.0021} & \textbf{0.0033} & & -2.37 & 0.00 \\  B & \textbf{0.0052} & \textbf{0.0042} & & -1.23 & 0.67 \\  C & \textbf{0.0082} & \textbf{0.0057} & & -0.21 & 1.08 \\  D & 0.0107 & 0.0097 & &  0.74 & 1.41 \\  E & \textbf{0.0080} & 0.0088 & &  5.05 & 5.05 \\  F & 0.0140 & 0.0148 & & -2.37 & 0.00 \\  G & 0.0128 & 0.0176 & & -1.23 & 0.67 \\  H & 0.0157 & 0.0164 & & -0.62 & 1.10 \\  I & 0.0145 & 0.0155 & & -0.21 & 1.08 \\  K & 0.0236 & 0.0225 & &  5.05 & 5.05 \\  \bottomrule \end{tabular}} \smallskip \caption{My Caption} \label{tab:table1} \end{table}  it creates a table like this:  but I want the bolded numbers to align nicely with un-bolded numbers...How can I make the bolded numbers to align the other numbers in the right way? Thank you,


I want to understand a little bit more about determining the determinant of tridiagonal matrices. These determinants are (mostly) of the form  $$f_n = \alpha f_{n-1} + \beta f_{n-2}$$ where $\alpha, \beta \in\mathbb{R}$.   I have a hard time finding literature on how to solve this. Anyone that can help me out?

Solve the recurrence $$f_{n+2}=af_{n+1}+bf_n\qquad n\in\Bbb N_0\tag{1}$$   Where $a,b>0$ and $f_0,f_1$ are given.   I know that if $$F_{n+1}=c_nF_n+d_n$$ then $$F_n=F_0\prod_{k=0}^{n-1}c_k+\sum_{m=0}^{n-1}d_m\prod_{k=m+1}^{n-1}c_k\ .$$ But I am unsure of how to find a solution to the recurrence in question. I am fairly certain that a closed form exists, because the Fibonacci sequence $F_n$ (which is given by the case $a=b=f_1=1$ and $f_0=0$) has an explicit solution, namely  $$F_n=\frac{\varphi^n-\psi^n}{\sqrt5}$$ where $$\varphi=\frac{1+\sqrt5}2,\qquad \psi=\frac{1-\sqrt5}2\,.$$ Admittedly, I do not know how to prove said result, but I'm sure there is some sort of generalization of the proof to solve my recurrence.   I've defined the generating function $$f(x)=\sum_{n\geq0}f_nx^n$$ and shown that  $$f(x)=\frac{f_0+(f_1-af_0)x}{1-ax-bx^2}\ .$$ So of course $$f_n=\frac1{n!}\left(\frac{\partial}{\partial x}\right)^n\frac{f_0+(f_1-af_0)x}{1-ax-bx^2}\,\Bigg|_{x=0}$$ but that is way too inefficient. Is there a nice closed form solution for $(1)$? Thanks.


I do not understand what the '*' does in my code. What does it do and what is it called?  numbers = [x for x in range(5)] mystrings = "numbers:{0}, {1}, {2}, {3}".format(*numbers) print(mystrings)   I do not even know what it is called (or I would have searched online already). I was learning how to use String.format() and wanted to add items from a list without typing them all out manually. I found this solution but it came with no explanation.  This is what I was trying to avoid:  mystrings = "numbers:{0},{1},{2},{3}".format(numbers[0],                                           numbers[1],                                           numbers[2],                                           numbers[3]                                           )

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


I'm familiar with how an electric motor works, and also familiar with what stall current and free current refers to in an electric motor. I'm also somehow familiar with the notions of energy being transformed from electromagnetic to kinetic and to heat.  I've also reviewed questions like these:       What I'm yet to fully understand is why exactly, from a physics point of view, does the current increase when the motor is stalled, and more intriguingly why does the current drop when the motor is moving.  I'm guessing that the coil resistance increases/decreases when the motor is moving/stalled, but I can't grasp the idea of why does that happen and what the explanation at an electric/electromagnetic level is.  I guess another way to put it's why isn't current always flowing at it's maximum in an electric motor and actually drops when the motor is moving?  thanks!

As an electric motor spins, the energy from the electricity is 'conducted' to the rotor by the magnetic fields.  However, when the motor is stopped, the energy becomes heat and burns up to motor.  What causes this heat to be formed?  Is it purely generated by the current flowing through the wire or is the magnetic field form the permanent magnets involved somehow?  Conversely, why is there less heat when the motor is spinning?  I'm hoping this is not just because the motor contains a fan.


When I type the following:  $ IFS=$'\n'; arr=( $(stat "/bin/bash") ); for i in ${arr[@]} ; do echo $i ; done   File: '/bin/bash'   Size: 1037528     Blocks: 2032       IO Block: 4096   regular file Device: 823h/2083d  Inode: 656086      Links: 1 Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root) Access: 2017-05-23 16:38:03.848124217 -0600 Modify: 2017-05-16 06:49:55.000000000 -0600 Change: 2017-05-18 07:43:22.946694155 -0600  Birth: -   I see the Birth Date for /bin/bash is null / empty. When is this field ever used and what purpose might it have in Linux when it works?  I appreciate there is a shorter way of using stat but this came up during development cycle and I copy and pasted.

I need  to find the creation time of a file, when I read some articles about this issue, all mentioned that there is no solution (like , ).  When I tried the stat command, it states  Birth: -.  So how can I find the creation time of a file?


I set up an OpenVPN server on a Debian 9 server, and everything seems to work fine: I can access Internet through that VPN. However, I figured out that any traffic targeting the server is still using either eth0 or wlan0 instead of tun0. For example, if I am on a local network that does not allow ICMP:  ping google.com will work as expected (using tun0as output interface)  ping myvpn.com (if myvpn.com is my vpn server) will not work, as it uses eth0 or wlan0 as output interface and so is blocked by the network firewall.  I looked at the routes and found that when connecting, OpenVPN client is adding an entry in the routing table: 1.2.3.4 via 10.0.0.1 dev wlp7s0 proto static metric 600 (where 1.2.3.4 is my vpn public IP)  I understand what this route is for: when OpenVPN client send packets to the OpenVPN server to be then rerouted to Internet, it has to send them through a physical interface.  However, I would like that when I ping or SSH to the server, packets are send through the tun0 interface.  Is there an option to give to OpenVPN client or maybe an iptables rule so that only OpenVPN generated packets are sent through a physical interface?  EDIT: Everything is working fine for outgoing traffic: it goes all through the VPN, except for the traffic that has for destination the server itself. I think the problem may be on the client side, where the route to the server is being added Here is server config file:  port 443 proto tcp dev tun  ca /path/to/ca.crt cert /path/to/server.crt key /path/to/server.key dh /path/to/dh.pem  server 10.8.0.0 255.255.255.0 keepalive 10 120 comp-lzo persist-key persist-tun status openvpn-status.log verb 3  push "redirect-gateway def1 bypass-dhcp" push "route 10.8.8.0 255.255.255.0"   I tried to modify this line:  push "redirect-gateway def1 bypass-dhcp"   to this:  push "redirect-gateway autolocal def1 bypass-dhcp"   as suggested in answers, but result is still the same: I can ping google.com but not my VPN public IP

I'm trying to make my client forward all traffic through a VPS running OpenVPN. As you can see, it will allow pings to both domains and raw IP addresses, but it will not allow traffic like that made through curl and traceroute doesn't come up with anything. The traffic works correctly when not connected to the VPN.   All information is here:   Thank you.  Working configs thanks to solution below:  Server:  port <integer> proto udp dev tun ca ca.crt cert vpnserver.crt key vpnserver.key  # This file should be kept secret dh dh4096.pem tls-auth ta.key 0 server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "redirect-gateway autolocal" push "dhcp-option DNS 8.8.8.8" push "dhcp-option DNS 8.8.4.4" keepalive 10 120 cipher AES-256-CBC comp-lzo user nobody group nogroup persist-key persist-tun status openvpn-status.log verb 3   Client:  client dev tun proto udp remote x.x.x.x <port number> resolv-retry infinite nobind persist-key persist-tun ca ca.crt cert vpnclient.crt key vpnclient.key tls-auth ta.key 1 ns-cert-type server cipher AES-256-CBC comp-lzo verb 3


Naming a new folder on your desktop Super Control Panel.{ED7BA470-8E54-465E-825C-99712043E01C will display all the settings in Windows 7; is there an equivalent to this for Windows 8 and Windows 8.1?

I am looking for a way to enable God-Mode in Windows 8, does anyone know how to do this or is it even possible?  It's a trick that .


I have multiple errors with my class, either "string", a variable, or the template class isnt declared. Not sure whats wrong with my header files or how I'm setting it up.   Now my program uses 2 classes, one is a templated class that uses dynamic arrays in the private member, and the other class uses that templated class in the private member.  In the .cpp  #include <iostream> #include <ostream> #include <string>   #include "Classroom.h" using namespace std;  bool Classroom::addStudent(const string& name){        return (classRoom.insert(name)); } bool Classroom::removeStudent(const string& name) {       return (classRoom.remove(name)); } bool Classroom::containsStudent(const string& name) {       return (classRoom.contains(name)); } string Classroom::listAllStudents() {      string name;     string data;     unsigned int i;     for (i=0;i<classRoom.size()-1; i++){           if (classRoom.at(i,data)){                  name += data;                 name += ", ";            }           }     if (i<classRoom.size()){        if (classRoom.at(i,data)){                  name += data;            }         }     return (name); }   In the .h   #ifndef CLASSROOM_H #define CLASSROOM_H  #include "UniqueVector.h"  class Classroom { public:     /*— If a student named name is not already on the     classroom roster, adds a new student named name to the classroom roster and returns true;     otherwise, returns false.*/     bool addStudent(const std::string& name);      /* — If a student named name is on the classroom     roster, removes the student named name from the classroom roster and returns true; otherwise,     returns false.*/     bool removeStudent(const std::string& name);     /* — If a student named name is on the classroom     roster, returns true; otherwise, returns false. */     bool containsStudent(const std::string& name);     /*— Returns a string containing the names of the students in the     classroom, separated by commas.*/     std ::string listAllStudents();      private:     UniqueVector<string> classRoom; };  #endif   I'm getting templated argument 1 invalid or classRoom from the private member of Classroom isn't declared.   Also an error about I UniqueVector classRoom; with string not declared   I tried using std:: UniqueVector classRoom; is there way so that I dont have to include std:: in every instance of string?

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


I've completed the guns part of Barclay Mills but after a certain point doing the "garbage" cleaners missions there are no longer any missions on the map and I can't talk to Maria. Is there something I'm missing and it's not appearing......... any solutions?

I did most of the barclay mills missions and brought the damage down to 2550 but now I can find anything else to damage or steal, so the meter is stuck at 2550 and the objective says "find and destroy garbage barges" but when I click it, no waypoint.  Please help.


Suppose I wrote the following:     She did well in the test but Tom didn't.    Why there is no comma before "but" whereas we put it in the following example:     I saw him before war, but I haven't seen him since that time.

Do I need a comma before "but"?      I like your car but it seems to me too expensive for you.   Or     I like your car, but it seems to me too expensive for you.   My native languages are Ukrainian and Russian. In these languages this comma is required.


How do you know what glyphs are in a font?  Is there a tool that shows them?

I usually use xelatex, but I'm exploring pdflatex now. When loading specific fonts in xelatex, I can always know what characters the font has available, since I can inspect the font file in any font viewing program, or I can find out the hard way by just entering the unicode and see if the character is displayed in the output. But how does this work with a font package?  Say, for instance, that I would like to use phonetic symbols in the  font. How do I know whether the font has phonetic symbols (I assume it does), and how do I know what command I need to type in order to make them appear? My only resource is , but this only tells me what characters/commands there are available in LaTeX2e by default (depending on the font encoding), and what symbols I can find in specific packages. Phonetic symbols, for instance, are said to be in the tipa package. Does that mean I am locked to tipa if I want to use phonetic symbols with pdflatex?  Here's a pointless MWE:  \documentclass{article} \usepackage{gentium} \begin{document} Please give me some phonetic symbols here? \end{document}


I'm trying to complete the , but am having some difficulties.  The code I've written appears to function correctly when I access it via Workbench, but I can't persuade my unit tests to pass.  My SUT class is like this:  @RestResource(urlMapping='/Accounts/*/contacts') global class AccountManager {     @HttpGet     global static Account getAccount()     {         RestRequest req = RestContext.request;          String accId = req.requestURI.substringBetween('Accounts/', '/contacts');          system.debug(accId);          return getAccountById(accId);     }      public static Account getAccountById(string account_id)     {         Account acc = [SELECT Id, Name, (SELECT Id, Name FROM Contacts)                         FROM Account WHERE Id = :account_id];          return acc;     } }   When I call this via Workbench, the response looks sane:    My test looks like this:  @isTest static void TestGetAccountById() {     RestRequest request = new RestRequest();     request.requestUri = 'https://playful-raccoon-288300-dev-ed.my.salesforce.com/services/apexrest/Accounts/0011r00001nUpkgAAC/contacts';     request.httpMethod = 'GET';     RestContext.request = request;     // Call the method to test     Account thisAcc = AccountManager.getAccount();      system.debug('here');     // Verify results     System.assert(thisAcc != null);     System.assertEquals('Bluebeards Grog House', thisAcc.Name); }   The exception I'm getting is:     System.QueryException: List has no rows for assignment to SObject   I understand from my research that this means that the query is returning 0 rows. This confuses me because the account ID being passed is the same as the one I'm using in Workbench. I wondered if my logic for extracting the account ID was wonky, but I've been able to verify this using checkpoints.  Am I missing something very obvious?

I have a Trigger that is referencing a class. It works in Dev, but now I am trying to create the test class in order to push it to production. I am trying to test that a new user is created. I keep getting the same error System.QueryException: List has no rows for assignment to SObject. The error seems to point to the class on line 9 where the Account is added. The goal of the code is when a new user is inserted, then a contact for that new user is created as well. Does someone have any ideas why this is happening? I've used the Query Editor to make sure that the record does exist, and it does, so I'm stumped. Thanks in advance for the help.   Trigger      trigger UserInsertContactInsert1 on User (after insert, after update) {      if(Trigger.isAfter && Trigger.isInsert){         Set<ID> usrIds = new Set<ID>();          for(User u : Trigger.new){             usrIds.add(u.id);         }          UserContactSyncClass1.syncContact(usrIds);       }      if(Trigger.isAfter && Trigger.isUpdate){          Set<ID> idSet = new Set<ID>();         Set<ID> idSet2 = new Set<ID>();          for(User u : trigger.new){             for(User r : trigger.old){                 if(u.ID == r.ID && u.isActive==false && r.isActive==true){                     idSet.add(u.ID);                 }                  if (u.ID == r.ID && u.isActive==true && r.isActive==false) {                     idSet2.add(u.ID);                 }              }         }          UserContactSyncClass1.InactiveContact(idSet);         UserContactSyncClass1.ActivateContact(idSet2);     } }   Class  public class UserContactSyncClass1 {      @future     public static void syncContact(Set<Id> userSet){         List<Contact> cList = new List<Contact>();         List<User> userList = [Select ID, FirstName, LastName, Email, Phone, True_Market_Unit__c, True_Market_Name__c FROM User WHERE ID IN :userSet];         List<String> mList = new List<String>();         List<String> mktList = new List<String>();         **Account acc = [SELECT Id, Name FROM Account WHERE Name = 'Company Users' Limit 1];**          // Loop through Users, to get List of True Market Number         for(User usr : userList){             mList.add(usr.True_Market_Unit__c);                 }          // Use the True Market Number and Match to the True Market Number in Markets         for(Market__c mkt : [SELECT Name, Unit_Number__c FROM Market__c WHERE Unit_Number__c IN :mList]){             mktList.add(mkt.Name);           }          for(User usr : userList){             for(String mk : mktList){                 usr.True_Market_Name__c = mk;             }             System.debug(usr.True_Market_Name__c);         }          for(User u : userList){             cList.add(new Contact(FirstName=u.FirstName, LastName=u.LastName, User_True_Market_Name__c=u.True_Market_Name__c, Email=u.Email, Phone=u.Phone, OwnerID=u.ID, Related_User__c=u.Id, AccountId = acc.Id));         }          upsert cList;     }   Test Class Method with the Error  public static testMethod void validateNewUser(){          Profile p = [SELECT id FROM Profile WHERE Name='System Administrator'];          User u = new User(             FirstName = 'test',              LastName= 'last_test',              Email='test323232@test.com',              Phone='111-111-1111',              True_Market_Unit__c='1111',              alias = 'test',              EmailEncodingKey='UTF-8',             ProfileId = p.Id,             LanguageLocaleKey='en_US',             LocaleSidKey='en_US',              TimeZoneSidKey='America/Los_Angeles',             UserName = 'test323232@test.com'          );          System.runAs(u){             System.assertEquals('111-111-1111', u.Phone);         }      }   Updated Solution  Turns out even though my User never referenced the account, I still needed to insert it into my test class, with the Name='Company Users' from my SOQL query. Thanks everyone for all the help.


I recently started with Modular javascript files. But I am facing an issue when trying to call internal functions. My script is like this   var myTeamMaster=(function(){     alert(function1());     var function1=function()     {         alert("function1");     }     var function2=function()     {         alert("function2");     };     return     {         function1:function1,         function2:function2     } })();   As you can see Im just calling function1() from the alert. Its triggering object expected error. I didnt understand why?

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


the question is simply a design question.. i mean how to restructure this piece of code into something that simple and efficient.  So lets take the following code for example.  class D{      var a;  }  class C{      D d;     //uses d.a  }  class B{      C c;  } Class A{      B b;     //needs d.a  }   here class A needs to access the variable "a" in D and classes B And C don't store variable "a" (even though C uses "a" i doesn't store it as it only needs it for initialization). Is there a way to make this code more cleaner.  right now i have made both classes B and C store variable "a". but it seems like it's not the correct way to do it. i mean i am thinking of cases where this chain is longer and the last class needs some variable in the first class. so how should i deal with it.

I often find myself in a situation where I am facing multiple compilation/linker errors in a C++ project due to some bad design decisions (made by someone else :) ) which lead to circular dependencies between C++ classes in different header files (can happen also in the same file). But fortunately(?) this doesn't happen often enough for me to remember the solution to this problem for the next time it happens again.  So for the purposes of easy recall in the future I am going to post a representative problem and a solution along with it. Better solutions are of-course welcome.     A.h  class B; class A {     int _val;     B *_b; public:      A(int val)         :_val(val)     {     }      void SetB(B *b)     {         _b = b;         _b->Print(); // COMPILER ERROR: C2027: use of undefined type 'B'     }      void Print()     {         cout<<"Type:A val="<<_val<<endl;     } };       B.h  #include "A.h" class B {     double _val;     A* _a; public:      B(double val)         :_val(val)     {     }      void SetA(A *a)     {         _a = a;         _a->Print();     }      void Print()     {         cout<<"Type:B val="<<_val<<endl;     } };       main.cpp  #include "B.h" #include <iostream>  int main(int argc, char* argv[]) {     A a(10);     B b(3.14);     a.Print();     a.SetB(&b);     b.Print();     b.SetA(&a);     return 0; }


I am trying to run an application in netbeans, but regularly getting bellow given error:  Exception in thread "main" java.lang.NullPointerException at javax.swing.ImageIcon.<init>(ImageIcon.java:217) at Login.<init>(Login.java:36) at Login.main(Login.java:90) C:\Users\MyPc\AppData\Local\NetBeans\Cache\8.1\executor-snippets\run.xml:53: Java returned: 1 BUILD FAILED (total time: 1 second)   The image is used in line 36 as:   btnLogin = new JButton("Login", new ImageIcon(ClassLoader.getSystemResource("Images/login.png")));          This question is different as already answered questions have been reviewed but none of them are able to solve the issue. Similar questions can be different depending upon particular environment.

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


I have been playing D&D 5e for a while now and I recently made a new Fighter with 2 weapons. I already read many things and the PHB but I can't figure out if I get a bonus action from my first attack so I can make a second attack or if I have to already have a bonus action. If so wouldn't it be really bad on a fighter, at least in the early game? And how do I get this Dual wielding thing so that I get to wield normal weight weapons?

During the latest gaming session our level 3 Rogue was Two-Weapon fighting with a Rapier in the main-hand and a scimitar in the off-hand.  At the completion of our gaming session I contested the application of the Two-Weapon fighting rules as it seemed unbalanced.  Once I got home I reviewed the PHB and various RPGStack and Reddit but couldn't find a concrete answer.  My interpretation of the PHB Reference rules below is that although any class/character can technically wield a weapon in their off-hand, only those who have been granted a Bonus Action for which no explicit bonus action have been defined would be allowed to actually attack.  So in the case of a Rogue the Bonus Actions granted under Cunning Action allow for specific actions (none of which are attack).  The alternate interpretation would be the rules under Two-Weapon Fighting, perhaps it should be written      you receive a bonus action to attack with a different light melee weapon that you’re holding in the other hand.   This would, in my opinion, explicitly grant the Bonus Action to any character/class who is Two-Weapon Fighting.  After thorough review does it boil down to application of the rules-as-written and determining a house-rule to apply in our campaign?    References  Page 189 of PHB : Bonus Actions  Various class features, spells, and other abilities let you take an additional action on your turn called a bonus action. The Cunning Action feature, for example, allows a rogue to take a bonus action.      You can take a bonus action only when a special ability, spell, or other feature of the game states that you can do something as a bonus   action. You otherwise don’t have a bonus action to take.   You can take only one bonus action on your turn, so you must choose which bonus action to use when you have more than one available. You choose when to take a bonus action during your turn, unless the bonus action’s timing is specified, and anything that deprives you of your ability to take actions also prevents you from taking a bonus action.  Page 96 of PHB  A Rogue receives cunning action at level 2, You can take a bonus action on each of your turns in combat.      This action can be used only to take the Dash, Disengage, or Hide action.   Page 195 of PHB  Two-Weapon Fighting (Combat Rules)  When you take the Attack action and attack with a light melee weapon that you’re holding in one hand, you can use a bonus action to attack with a different light melee weapon that you’re holding in the other hand. You don’t add your ability modifier to the damage of the bonus attack, unless that modifier is negative. If either weapon has the thrown property, you can throw the weapon, instead of making a melee attack with it.  Page 165 of PHB  Dual Wielder  (Feat)  You master fighting with two weapons, gaining the following benefits:   You gain a +1 bonus to AC while you are wielding a separate melee weapon in each hand. You can use two-weapon fighting even when the one-handed melee weapons you are wielding aren't light. You can draw or stow two one-handed weapons when you would normally be able to draw or stow only one.


Hello possible fellow Ubuntu-users,  Until now I've been using Windows operating systems and my current laptop is going to retire soon. In my search of a new, basic (read: not too expensive) laptop I thought about Ubuntu several times. As a computer enthousiast I have a basic knowledge and interest but this is far from the expert-level. Recently I was pleased to see a big computer brand to launch a budget model including a pre-installed Ubuntu Linux 14.04 SP1 operating system with the following specs:  Processor: Intel® Celeron® Processor N2840 (1M Cache, up to 2.58 GHz)  Operating System: Ubuntu Linux 14.04 SP1  Memory: 4GB Single Channel DDR3L 1600MHz (4GBx1)  Hard Drive: 500GB 5400 rpm Hard Drive  Video Card: Intel® HD Graphic  Display: 15.6-inch HD (1366 x 768) Truelife LED-Backlit Display  Wireless: 802.11bgn + Bluetooth 4.0, 2.4 GHz, 1x1  The laptop will be used for the basis stuff: internet, documents,... Does this configuration seem adequate to run Ubuntu smoothly?  I'm also considering to change the 5OOGB HDD with a 250 SSD drive for some faster handling. Having read some basis research it should be possible. However I'm doubting if I will succeed to transfer the pre installed files to the new SSD drive and run Ubuntu. Any experiences for a Ubuntu novice are highly appreciated.  Hopefully you guys or girls can guide this windows-user into a new and bright Ubuntu age :-)  thx alot!  grtz

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I have an $n \times n$ orthogonal matrix $A$ and vectors $x,y \in \mathbb{R}^n$ and $\theta \in (0,\pi)$ and this satisfies  $Ax = \cos\theta x - \sin\theta y$, and $Ay = \sin\theta x + \cos\theta y$  I must now proof that $x$ and $y$ are perpendicular vectors of equal length.  I know this means $|x|^2 = |y|^2$ and $x\cdot y=0$, and I also think I should use the preserved Euclidean inner product. How to continue?

Let $A$ be an orthogonal $n × n$ matrix and suppose that $x, y \in \mathbb R^n$   and $\theta \in (0 , \pi)$ satisfy    $$Ax = \cos (θ)x − \sin (θ)y,\\ Ay = \sin (θ)x + \cos (θ) y.$$      Prove that $x$ and $y$ must be perpendicular vectors of equal length, i.e. show that $|x|^2 = |y|^2$   and $x · y = 0$.   We know that because $A$ is orthogonal then$$\langle x,x \rangle =\langle Ax,Ax \rangle, \quad \langle x,y \rangle=\langle Ax,Ay \rangle, \quad \langle y,y \rangle=\langle Ay,Ay \rangle.$$ I was already struggling with showing that $|x|^2 = |y|^2$. So far I just wrote out that   $$|x|^2= \sum_{i=1}^n (Ax_i)^2= \sum_{i=1}^n \cos^2(\theta)x_i^2-2\cos(\theta)\sin(\theta)x_iy_i+\sin^2(\theta)y_i^2,\\ |y|^2= \sum_{i=1}^n (Ay_i)^2= \sum_{i=1}^n \cos^2(\theta)y_i^2+2\cos(\theta)\sin(\theta)x_iy_i+\sin^2(\theta)x_i^2.$$  I don't really see how I could conclude from this that they are equal.


I have no idea what is causing this, but for some reason when I render my scene in Cycles it gives me these shadow spots. What's more weird is that it's only when I'm rendering interiors and it only shows up in the final render, the rendered viewport is perfectly fine.

Since the Denoise feature was added to Blender I only use the default setting with it and it really does the work. But sometimes the denoise is noticable on some of my renders. How can I overcome the blurred effect? Denoising for me is a big help because my system is quite aged.


I subscribed to a word-of-the-day thing about 10 years ago. One of the words was a noun for the instance of describing something redundantly. Every now and then I hear someone do this and die not being able to remember the word for it. As luck would have it, I can't muster an example I feel very confident about but perhaps "it was too overdone" where "it was overdone" would suffice would suffice as an example...    My ears will explode if I hear one more _____ out of this non-EL&U-subscribing scrub.

There is a family of expressions called oxymorons which contain contradicting meanings. What about expressions that add little meaning like "fatally injured" or "the evening sunset"? What are these expressions called?


I’m having a horrible time trying to get beans cooked to be tender and not bitter.  Overnight soaking and rapid soak methods aren’t making any difference.  If I add anything to the cooking process, it’s a piece of onion and/or a hot green chili.  These beans soak for at least 10 hours and cook for over 4!    Ok, so maybe at my store, the beans are old.  The packages are never past the pull date. How do you tell just by looking whether they’re “too old”?

I decided I would make baked beans for a BBQ at my MIL's this past weekend. I've never made baked beans but decided that it was time since I love them so much! I found a recipe for Southern Baked Beans (using Navy beans). It was from a food blog.   During the description/commentary of the dish the blogger said they could be made with dried beans but she uses canned to save time. The recipe only mentioned canned beans. I couldn't find anything to tell me the ratio canned:dried beans so I decide a 1:1 ratio would be good. After putting a 24oz bag of beans in a cake pan (the recipe called for 32oz canned beans), I decided that was A LOT of beans so didn't add the remaining 8oz. I rinsed them first then soaked them for 15-18 hours. I rinsed them again and put them in a pot with the rest of the ingredients.   The recipe said to bake them at 350 for about 40 minutes and they should be done. After an hour and a temperature increase to 400, the beans weren't anywhere close to being done. At this point I decided they were probably very old beans. :( I moved them to the stove after another 30 minutes. They boiled on the stove for another 1 1/2 hours and were still rock hard (I kept adding water so they wouldn't boil dry - and this was on medium to medium-low heat).   We left the beans at my MIL's and she cooked them "off and on" (her words) the next day and declared they were done. They are not done. :(  Now that they've been cooked then refrigerated then cooked then refrigerated again, can I attempt to salvage them? I've read that adding 1/8 tsp baking soda per cup of beans will soften them. Is it too late to try this - add the beans, more water, and a small amount of baking soda and cook them a little more? I've put so much effort into these stupid beans I can't just give up! LOL


It gives this error installing VLC and sort of same for the chrome too, can anybody please help?   Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  vlc : Depends: vlc-nox (= 2.1.4-0ubuntu14.04.1) but it is not going to be installed        Depends: libsdl-image1.2 (>= 1.2.10) but it is not installable        Depends: libsdl1.2debian (>= 1.2.11) but it is not installable        Depends: libtar0 but it is not installable        Depends: libva-x11-1 (> 1.3.0~) but it is not installable        Depends: libva1 (> 1.3.0~) but it is not installable        Depends: libvlccore7 (>= 2.1.0) but it is not going to be installed        Depends: libxcb-composite0 but it is not installable        Depends: libxcb-keysyms1 (>= 0.3.9) but it is not installable        Depends: libxcb-xv0 (>= 1.2) but it is not installable        Recommends: vlc-plugin-notify (= 2.1.4-0ubuntu14.04.1) but it is not going to be installed        Recommends: vlc-plugin-pulse (= 2.1.4-0ubuntu14.04.1) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


When I try to get latest windows updates, windows (7 home) tells me that it needs to update the windows update. And that the Update window needs to be restarted in order to do that. After that restart I get error "WindowsUpdate 8007006D". Googlin that code doesnt' give me any more information.  This is my windows update log:  2012-06-30  09:57:36:212    4956    2e8 Report  REPORT EVENT: {102103FB-11A6-4FF5-B910-75D5B104956B}    2012-06-30 09:57:30:865+0300    1   182 101 {61CA813A-7585-442E-A66B-B0D15CE6BDC0}  1   8007006d    SelfUpdate  Failure Content Install Installation Failure: Windows failed to install the following update with error 0x8007006d: Windows Update Setup Handler. 2012-06-30  09:57:36:231    4956    2e8 Report  CWERReporter::HandleEvents - WER report upload completed with status 0x8 2012-06-30  09:57:36:231    4956    2e8 Report  WER Report sent: 7.5.7601.17514 0x8007006d 61CA813A-7585-442E-A66B-B0D15CE6BDC0 Install 101 Unmanaged

I installed Windows 7 fresh and installed SP1. Now, when I try to check manually for Windows Updates it just hangs on the Checking for updates screen.    I tried running the tools in , but this did not fix the issue either:  No matter what I do it just hangs on the "Checking for updates..." screen and goes no further.


I have repeated (x4) measurements on 90 subjects. The outcome is zero inflated.  The model output gives these estimates:  Coefficients:                          Estimate Std. Error z value   Pr(>|z|)   (Intercept)               -2.2151     1.6998   -1.30    0.193  time                       0.5283     0.2167    2.44    0.015 X                          0.0791     0.3267    0.24    0.811 time:X                    -0.1525     0.0611   -2.49    0.013 Y                          1.0348     0.4488    2.31    0.021 time:Y                    -0.0037     0.0583   -0.06    0.950  Number of observations: total=342, Subject=90 Random effect variance(s): Group=Subject             Variance StdDev (Intercept)    6.302   2.51 Negative binomial dispersion parameter: 3.9265 (std. err.: 0.69723) Zero-inflation: 0.13169  (std. err.:  0.027756 )   X and Y both vary at the subject-level only, not at the time-level.  As you see, here the main effect of X is not significant, while the time:X interaction is significant. On the other hand, the main effect of Y is significant, while the time:Y interaction is not.  I believe that in the case of Y, this means that subjects with higher values of Y have higher trajectories of the outcome. Is this correct ?   However, how is the time:X interaction to be interpreted ?

I have two non-significant main binary variables in my binary logistic regression model, but their interaction is significant. The variables are centered and no multicollinearity is the case (all VIFs about 1.0). The main variables are nonsignificant, but their interaction is. I want to interpret that significant interaction of two non-significant estimates.   It would read something like this: the effect of the variable A is less visible in the level 1 of the variable B (B1) and more visible in the second level of B (B2). Or I can say the same thing about the effect of B being less visible in A1 and more visible in A2...  However, the problem is that neither the effect of A, nor the effect of B are significant! So the above interpretation, although seemingly correct, sounds inconsistent or strange. (How a non-significant effect is supposed to be boosted by the other variable?)...   On a second thought, it seems that it is actually possible. For example, if I exclude cases with B2 from my sample, now the effect of A in the sample would show up as significant (it is B2 cases in the sample that disallow A to appear as significant)... This is getting more clear in my head now, but do you still have something other than the above interpretation in mind?


I am trying to make a median program. This is my code.  def median(list=[]):     x = 0     list = sorted(list)     if len(list) % 2 == 0:         b = int((len(list)/2))         print b         c = int(len(list)/2)         x = [list[b-1],list[c]]         print x         x = float((x[0]+x[1])/2)         print str(x)     else:         print list[((len(list)//2))]   When I run it, I get this  >>> median([1,2,3,4]) 2 [2, 3] 2.0   What is happening?  Please note: I do not want any advice on ways to do it better, I just want help.

Is there a benefit to using one over the other? In Python 2, they both seem to return the same results:  >>> 6/3 2 >>> 6//3 2


I am using GT-I8262 (Galaxy Core) android 4.1 does it support OTG?

Some Android devices can act as a USB host, so that you can use other USB devices attached to them. For instance, browse or import the photos stored on a camera from your phone, or copy files onto a USB memory stick attached to your tablet, plug a full-size USB keyboard or mouse into a tablet, or use an external GPS or wifi device.  How can I tell if my device can do this?


If I had an application with .tar.gz or .tar.bz2 extension can I transform it to a package .deb ?

Possible Duplicate:          There are several tarballs (e.g. Firefox, Eclipse, Zend Studio and ...) that have executable files in them, that we can extract and run. but this executable will be available only for the user that extracts it.  If we want to make it available for all users we should move it to some location like /usr/share, /usr/local/share/, /opt/, ... and give appropriate permissions, make an executable file in /usr/bin/ and so on...  I want to make a deb installer file that does them all! How to do it?


I've installed virtualbox on my laptop which has Windows 7 operating system, but I cannot run Ubuntu and it shows me the following error:     This kernel requires a x86-64 CPU, but only detected an i686 CPU.   Unable to boot- use a kernel appropriate for your CPU.

I was trying to install Ubuntu 12.04 in VirtualBox 4.2.12r84980. I see    this kernel requires an x86-64 CPU, but only detects an i686 CPU, unable to boot   But I am using a 64 bit Windows 8, and trying same .iso for trying Ubuntu. Then what is the problem?


LaTeX, of course, has a protective mechanism that prevents you from doing some stupid things:  \newcommand\a{a} \newcommand\a{b} %% LaTeX Error: Command \a already defined.   Of course, if you know what you're doing, then you can circumvent it with \renewcommand.  However, some commands have their own definition mechanisms:  \newcommand\a{a} \DeclareMathOperator\a{a} %% LaTeX Error: Command \a already defined.   (and there is no \RedeclareMathOperator).  I've been getting around this by doing something awkward like:  \newcommand\a{a} \makeatletter \DeclareMathOperator\@a{a} \let\a=\@a %% \let (and \def) circumvents LaTeX's protection \makeatother   (Of course, the best thing to do would be to delete that original definition, but, in practice, it's in another package that I must include but whose source I do not control.)  However, it occurs to me that a hypothetical \undef command would do the job:  \newcommand\a{a} \undef\a \newcommand\a{b} %% No complaints   Does such a command exist?  If not, is there an easy way to write it?

I thought the way to undo a \def was to define it to \relax, but that does not appear to work.  Also, am not sure why this produces no output if I try to use \def instead of \let in my attempt to do an undef.  \documentclass{article}  \begin{document}  \def\CaseA{}%  \ifdefined\CaseA%     \def\ProcessCaseA{}%     % Do stuff that uses \ProcessCaseA     %\def\ProcessCaseA\relax% no output if use this, and comment next line     \let\ProcessCaseA\relax% no output if comment this, and use above line \fi  % Now do stuff that requires \ProcessCaseA NOT be defined \ifdefined\ProcessCaseA     ERROR: \textbackslash ProcessCaseA is still defined \else     SUCCESS: \textbackslash ProcessCaseA is not defined \fi  \end{document}


So I have a column of tags that looks like this :  Array([list(['r']), list(['php', 'mysql']), list(['c#']), ...,         list(['python', 'datetime', 'pandas']),         list(['javascript', 'jquery']), list(['java', 'list',   'generics'])],        dtype=object)   Each row is a list of tags.( we have 100000 rows)  I want to put all the tags in one list, to do so I wrote two codes.   1st one :    def liste_tags():      list=[]      for l in tags_train :          for tag in l :              list.append(tag)      return list    2nd one :    tag_w=[]  for i in range(0,100000):      tag_w=tag_w+y_train[i] # tage_w contain all tags that are present in train dataset   so the thing that I don't understand is why the 2nd code take toooo much time to execute while the 1st takes only a couple of seconds. I mean they both loop through the 100000 rows so why the 2Nd one takes more time ?

What is the difference between:  some_list1 = [] some_list1.append("something")   and  some_list2 = [] some_list2 += ["something"]


I haven't used blender for 2 years and I forgot almost everything. I would like to ask why the faces looks like this? I extruded them from the cylinder's face (the main body) and then the result looks like this.   I'm confused, and yeah I use the subdivision modifier. Tried merge but nothing happens.

What's going on here? I'm trying to apply a normal edge split with a subdivision to make it look high poly with good edges. But when I applied it on this model it did this.


How come Sauron wasn't able to detect Sam in the last chapter of The Two Towers? I'm pretty sure he wore it longer than Frodo in Amon Hen, and Frodo was detected in the latter, was he not? Plus, Sam didn't only wear it for several minutes, he wore it in Mordor... is there any reason why Sauron didn't spot him ? Even if there was something happenening elsewhere, didn't he detect the presence of the ring as soon as Frodo put it on while inside Mountain Doom? And this was while a battle was being fought in his front door, so just how the hell did he not detect Sam?

When Frodo put on the One Ring, both the Nazgul and Sauron himself found Frodo. However when Bilbo had the ring and possibly used it many times, Sauron sought Gollum to get a hint on where to look for the ring and send the Nazgul after it.   Sauron sought Gollum before Bilbo wore the ring at his birthday party, slightly after that time, he was very effective at locating Frodo when Frodo put on the ring. So I guess it's not a matter of Sauron gaining any extra powers with time.  Also Bilbo seemed to use the ring without it bothering him at any point, unlike Frodo who seemed to be very troubled when using the ring. How is that possible?


Consider the sequence: $x_1=3, x_{n+1}=\frac{x_n}{2}-\frac{2}{x_n}$. This sequence is bounded or is unbounded?   Attempt  Checking a few terms we get $x_1 = 3, x_2 = \dfrac{5}{6}, x_3 = -\dfrac{119}{60},x_4 = \dfrac{239}{14280},\cdots$. I will prove by contradiction that it is bounded. Suppose that the sequence is bounded. Then there exists some $x_k$ such that $x_k \geq \dfrac{x_n}{2}-\dfrac{2}{x_n}$ or  $x_k \leq \dfrac{x_n}{2}-\dfrac{2}{x_n}$ for all $n$.  I seem to get stuck here.

Consider the sequence $$x_{n+1}=\frac{x_n}{2}-\frac{2}{x_n}, x_0>0.$$ How can you prove that this sequence is bounded or unbounded for those values of $x_0$ for which it is defined. With a number generator I noticed that all terms of the positive out of range $[-2,2]$  form finite sets in strictly decreasing order. We found that it can be periodically. For $x_0=\frac{2}{\sqrt{3}}$ its terms  repeat of 2 by 2.  I tried to prove boundedness to the method of reduction to absurdity but we did.   Thanks so much for any suggestion


Let $(X,\mathcal{X})$ and $(Y,\mathcal{Y})$ be measurable spaces.  We consider the product of the two spaces, denoted $(X \times Y,\mathcal{X} \overline{\times} \mathcal{Y})$, where $\mathcal{X} \overline{\times} \mathcal{Y}$ is the smallest $\sigma$-algebra generated by $\{ A \times B \mid A \in \mathcal{X},B \in \mathcal{Y} \}$.  For a measurable set $S \in \mathcal{X} \overline{\times} \mathcal{Y}$ and an element $x \in X$,  states that the following set is measurable: $$ S_x := \{ y \in Y \mid (x,y) \in S \} $$  How can I prove this?

I'm studying measure theory, and I came across a theorem that says that, given two $\sigma$-finite measure spaces $\left(X,\mathcal M,\mu\right)$ and $\left(Y,\mathcal N,\nu\right)$, and a set $E\in \mathcal M\otimes\mathcal N$, the function $x\mapsto \nu\left(E_x\right)$ is measurable.  The definition of the product-$\sigma$-algebra $\mathcal M\otimes\mathcal N$ is the $\sigma$-algebra generated by the rectangles $A\times B$ with $A\in\mathcal M$ and $B\in\mathcal N$. Also, the $x$-section $E_x$ is defined as $E_x=\left\{y\in Y:\left(x,y\right)\in E\right\}$.  My problem is that I can't even convince myself that, given $E\in\mathcal M\otimes \mathcal N$, the sections $E_x$ are in $\mathcal N$ for all $x$. It looks like it has something to do with unitary sets being measurable (which shouldn't be necessary, I think), but I can't prove it even assuming that $\left\{x\right\}\in\mathcal M$ for all $x$.


I need to integrate the Web cam to the application. I need to take the user profile picture using the web cam.

I'd like to allow users to record videos directly from their webcam. I haven't done much work with PHP but am stuck with it for this project. We currently have a system in place for video uploading and encoding, but nothing to actually access a user's webcam. How would you recommend I proceed?


After updating my iPod I'm asked to enter the password for the iCloud account, which has an Apple ID which uses an older email which no longer exists. I don't remember the old password.  Is there a way to update to my current Apple ID? I don't have access to the old email for verification.   If it's not possible I could live without it as I don't really use iCloud.

When I originally set up my iTunes account, I used an email address from my prior employer.  I later moved my account to a personal rather than corporate email address and I have since changed jobs.  The original email address associated with my Apple account is no longer valid.  In the meantime, my computer on which my original iTunes account died.   Fortunately, I had my iTunes music backed up and when I purchased a new computer, I uploaded my songs.  I recently tried to play an Album and an error message came up that said that this computer was not authorized to play the songs and that I would need to access my account to authorize the new computer.  When I clicked through the authorization screen, my original email address came up and asked for my password.  I tried several of my “usual” passwords, but none of them worked.  I clicked on the “forgot my password” link and Apple gave me the option of answering a few security questions or having my password sent to my email address.  Recognizing that I could not access the dead email account, I asked to answer the security questions.  The first one that came up was to enter my birthdate.  I did so and Apple said that my answer was incorrect.  I next tried the street I grew up on and that did not work either.   I soon figured out that none of the questions matched my personal information so I am wondering if these questions were ever associated with my original iTunes account. Apple then locked my account for incorrectly answering the questions.  When I called Apple to see if we could do something to unlock the account and tie it to my new account (which would have the same name, address, and other personal information), I was informed that Apple cannot unlock the account and that I had to have access to the old email account to access the account and authorize this new computer to play the music.  After going up three levels of Apple customer service, I was told that there was absolutely nothing they could do for me.  So, I have purchased hundreds of songs that I cannot play now.  Is there a work around to this problem?  The songs are stored on my computer – I just can’t play them.


For example:   For an MVC architecture, should I prefer Ruby on Rails or PHP [closed] Gmail: What is a jQuery selector for incoming mail senders only? How to work with highly compressed and nested CSS in general? [closed]   Better to convert to   [closed] For an MVC architecture, should I prefer Ruby on Rails or PHP [closed] Gmail: What is a jQuery selector for incoming mail senders only? How to work with highly compressed and nested CSS in general?   I should first read the title and sometimes open the question to understand if the question is closed.  I think the [closed] mark  should be at the beginning of the title, not in the end, where I won't ever be if the title is long.  Also coloring will be a good improvement (via @Shadow Wizard).

Sometimes you open a lengthy question, read through it and then discover "Closed as ..." at the bottom (sometimes only after scrolling) - oops, not something you can answer. Wouldn't it make more sense to display that message before the actual question? Or maybe even in both locations? That's really important information.  Edit: Looks like my concern would be solved by , thanks to Tim Stone for pointing that out.


I am planning to power Node MCU from cable power. Can I connect mobile charger to the micro USB port? Or is it better to connect to Vin in NodeMCU?

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


I have seen the "at symbol" on several occasions, used in connection with LaTeX macros, often as part of command names. Does this symbol have a special significance in LaTeX, or is it just a convenient special convention?  An example I found at this site is , like this :   begingroup\makeatletter\def\f@size{5}\check@mathfonts $$abc+xyz=44$$\endgroup   If the question has been asked before, a hint or a pointer will be very welcome. Thanks!

Does the @ mean anything specific? For example, is it substituted? Does it split the command into parts, like \s@foo could internally mean "foo of type s"? Is the purpose of the @ only to make internal commands break when used outside a class definition or a package? If so, how is that a Good Thing?


I am looking for an effect like the following:  \begin{frame}[fragile]{Highlight new stuff} \begin{itemize}     \item<1-> [{\Large \textbf{Points}}]     \item<1-> Foo1     \item<2-> Foo2 \end{itemize} \end{frame}

I'm using beamer for a presentation. There's an itemize environment on a slide. For this (and possible more) itemize, I want the following behaviour:    highlight the item I'm talking about (e.g., bold) gray out the items I talked about already (e.g., by {\color{gray} old item} items I'm going to talk about later are not visible yet no code duplication (e.g., writing sentences twice)   What I startet with was  \begin{itemize}     \item<+> My first point     \item<+> My second point     \item<+> My third point     \item<+> And my last point \end{itemize}   I tried to get this done by user-defined commands like   \newcommand{\grayout}[1]{     \item<+> #1     \item<+-> {\color{gray} #1} } \begin{itemize}     \grayout{My first item}     ... \end{itemize}   But this is not working well. How can I solve this issue?


I dropped my external HDD (WD My book 2TB, non-portable) from 1m (3ft) height on the hard floor. Now there seems to be no problem, but is there any way that I can check if it is okay?  In the old days, I remember that there were utilities that check 'bad sectors'. Does this apply to modern external HDD?

How can I read the  S.M.A.R.T. state of my HDDs while using Windows 7, either automatically or manually?


Calculating AUC for one threshold in the continuous output is simple:  AUC = (TPR - FPR + 1) / 2;   What if I want to calculate AUC for multiple thresholds in continuous output of the classifier?

I am interested in calculating area under the curve (AUC), or the c-statistic, by hand for a binary logistic regression model.  For example, in the validation dataset, I have the true value for the dependent variable, retention (1 = retained; 0 = not retained), as well as a predicted retention status for each observation generated by my regression analysis using a model that was built using the training set (this will range from 0 to 1).  My initial thoughts were to identify the "correct" number of model classifications and simply divide the number of "correct" observations by the number of total observations to calculate the c-statistic. By "correct", if the true retention status of an observation = 1 and the predicted retention status is > 0.5 then that is a "correct" classification. Additionally, if the true retention status of an observation = 0 and the predicted retention status is < 0.5 then that is also a "correct" classification. I assume a "tie" would occur when the predicted value = 0.5, but that phenomenon does not occur in my validation dataset. On the other hand, "incorrect" classifications would be if the true retention status of an observation = 1 and the predicted retention status is < 0.5 or if the true retention status for an outcome = 0 and the predicted retention status is > 0.5. I am aware of TP, FP, FN, TN, but not aware of how to calculate the c-statistic given this information.


I am trying to write a script which is POSIX compliant, so it can run on any *nix system (Debian, Fedora, CentOS, AIX, Arch... ALL of them). When it comes to redirection, I am rather confused on what is supported by POSIX and what is not.  If I redirect ls -l file missingfile &> out.txt this works perfectly in bash. The line from stderr complaining that missingfile doesn't exist, and the permissions output from file, are both in out.txt. However, I believe this is only working because these shells support more than just POSIX standard operators. Upon researching this question I've come across conflicting answers.  , for example, seems to imply that &>, >&, >>& and &>> are non-standard operations. However,  explicitly states that some-program > some_file 2>&1 is POSIX compliant. Does this mean that the >& operator (using digits for stderr & stdout) is POSIX compliant whereas using &> to auto redirect both stderr and stdout to a file is not POSIX compliant? Or are both &> and >& not POSIX compliant / POSIX compliant (one of these two people are wrong)?  I considered just avoiding the & sign completely and using ls -l file missingfile >out.txt 2>out.txt however this comes with its own issue. Running the ls command this way causes the shell to open two file handles for out.txt, both pointing to offset 0 in the file. So when ls looks for these two files, one of the messages gets clobbered.  What one would expect ls -l file missingfile >out.txt 2>out.txt to output:  -rw-r--r-- 1 blah blah 0 Jun  3 13:18 file ls: cannot access 'missingfile': No such file or directory   What is actually output:  -rw-r--r-- 1 blah blah 0 Jun  3 13:18 file le or directory   What is the best way to redirect both stdout and stderr to a file in a POSIX compliant fashion?

I often see tutorials online that connect various commands with different symbols. For example:  command1 |  command2 command1 &  command2 command1 || command2     command1 && command2   Others seem to be connecting commands to files:  command1  > file1 command1  >> file1   What are these things? What are they called? What do they do? Are there more of them?    .


I know that the lenses I am going to talk about are not comparable as one is prime and another is zoom and one is f/1.4 and other is f/4.5-5.6 But still want to have opinions before buying either of two. I shoot with Nikon D7000 and 18-105 mm mostly family portraits.  I am planning to buy either Nikon 50 mm 1.4 G or Nikon 70-300 mm IF VR both are simialar priced at my location  My inclination is towards 70-300 as it covers the focal length gap. On the other side I want crisp sharp photos.  So question is can I get the similar or some what closer results with 70-300mm as compared to 50 mm.  Kindly suggest.

What focal length or range of focal lengths are usually used for portraits?   What is used by professionals? Why would one select a certain focal length? What are the advantages and disadvantages of different choices, and are there certain situations where an unusual choice might be better?


Is it possible to export object schema(objects, fields, datatypes ) from sandbox to excel?  I tried following tools no use-Cloud Converter, EasyDescribe and Object Snapshot.  Please let me know, Greatly Appreciate your help!

How can I export the fields of an object from Salesforce into an Excel sheet? I'm only looking for the field schema information, not the objects records.


Orienting myself with basic terminal commands (Ubuntu 16.04); I have a file listed in my Downloads folder; a Jupyter notebook file called, 'Indexing and Slicing.ipynb' and wish to copy the file to my user directory, 'uswang'. After navigating to the Downloads folder, I tried the command;   cp Indexing and Slicing.ipynb /home/uswang (To be 100% certain I even copy/paste the full file name) but receive the error,  cp: cannot stat 'Indexing': No such file or directory cp: cannot stat 'and':No such file or directory cp: cannot stat 'Slicing': No such file or directory   I get the same error when trying the mv command.  Why would this be the case? Tried researching other cp cannot stat entries, but none seem to relate directly to my predicament - Thanks

I want to enter the following folder in the terminal:  Milano, Torino (Jan)-Compressed   How should I write the command cd to enter this directory?  Spaces and several other special characters like \, *, ), ( and ? cause problems when I try to use them in the command line or scripts, e.g.:    $ cd space dir bash: cd: space: No such file or directory  $ cat space file cat: space: No such file or directory cat: file: No such file or directory  $ cat ( bash: syntax error near unexpected token `newline'  $ echo content >\ > ^C  $ ls ? (  )  *  ?  \   How do I enter file or directory names that contain special characters in the terminal in general?


in the framework of QISM, How can i derive the R-matrix for XYZ Heisenberg model?

In algebraic Bethe ansatz procedure, one of the central objects is the R-matrix satisfying the Yang-Baxter equation, but all the papers/books give directly its expression without deriving it, so my question is How can i derive the R-matrix for XYZ/XXZ Heisenberg model?


I was transferring files from my laptop to external hard disk using cut paste method. The system hanged so I forcefully stopped it.  My files are lost as they are not on laptop and even the hard disk.  Where have the files gone?

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.


Why here have  Exception  in thread "Thread-0" at unsynch.Bank.transfer(Bank.java:30)     at unsynch.UnsynchBankTest.lambda$0(UnsynchBankTest.java:22)     at java.lang.Thread.run(Unknown Source) Thread[Thread-3,5,main]Exception in thread "Thread-2" java.lang.NullPointerException   Code:  public void transfer(int from, int to, double amount) throws InterruptedException {     bankLock.lock();     try     {         if(accounts[from] < amount)              sufficientFunds.await();    //当前条件不符合。被阻塞，放弃锁         System.out.print(Thread.currentThread());         accounts[from] -= amount;         System.out.printf("%10.2f from %d to %d", amount, from, to);         accounts[to] += amount;         System.out.printf(" Total Balance: %10.2f%n",getTotalBalance());         sufficientFunds.signal();  //通知阻塞线程激活。     }     finally     {         bankLock.unlock();     } }

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 would like to know how to break URLs which contains long unbreakable sections in my bibliography using Sharelatex.  That's the code I use to load my bibliography file  \usepackage[sorting=nty]{biblatex} \addbibresource{bibliography.bib} \nocite{*}  \usepackage{hyperref} \hypersetup{     colorlinks=true,     linkcolor=black,     filecolor=black,           urlcolor=black, } \urlstyle{same}  \begin{document}  ...  \printbibliography[ heading=bibintoc, title={Bibliografia Completa} ]  \printbibliography[heading=subbibintoc,type=article,title={Solo articoli}] \printbibliography[heading=subbibintoc,type=book,title={Solo libri}] \printbibliography[heading=subbibintoc,type=misc,title={Solo videografia}]  \end{document}   but when I load the bibliography the URLs that have too long unbreakable sections to fit in the page, like that one      PLoaVOjvkzQtyjhV55wZcdicAz5KexgKvm   , are not automatically broken, forcing me to use the \\ command. How can I avoid that and still maintaining a fully justified bibliography and correctly broken URLs?  Albeit the use of the hyperref package, I'm not using the \url{} command in the bibliography to make the URLs clickable, but they still are. My bibliography preset looks like this:  @misc{,     author    = "",     title     = "",     howpublished = "",     year      = "",     url       = "",     %month    = "",     %note     = "", }   Thank you for your time.

How do I allow long URLs to have line breaks at any point. This is in the bibliography not the main text. I am trying to save space so don't want extra spaces to be added to make it only break at slashes, for example, as it does by default.  I am using biblatex+biber.


A follow-up on , and before you yet again send me to , keep in mind that, as was re-iterated in , collinearity is not an issue here (which is the only explanation brought up in ). We fit a logistic regression model with about ~10 numerical predictors, for $n=500$ observations (a seemingly respectable sample size) and got the following:  Full model is statistically significant. Here are the ANOVA results using ChiSq test.    None of the individual predictors are significant in the full model. Here is the model summary.    No evidence of collinearity (VIF scores all < 2, none of the pairwise correlations are >0.5, etc). Here is the VIF output for the model.   And when enough variables are dropped (e.g. via stepwise selection to reduce the model), the individual predictors eventually start becoming significant.. What might be operating here if not collinearity?

In a multiple linear regression, why is it possible to have a highly significant F statistic (p<.001) but have very high p-values on all the regressor's t tests?  In my model, there are 10 regressors. One has a p-value of 0.1 and the rest are above 0.9    For dealing with this problem see the .


If $\sum a^2_n$ converges so does $\sum \frac{a_n}{n}$   I'm trying to prove/ disprove this statement. But I couldn't end up with anything yet. Any help?

Suppose $\sum{a_n}$ converges. How do I prove that $\sum{\frac{\sqrt{a_n}}{n}}$ converges.  So I know that just because  $\sum{a_n}$ converges, do not mean I can say anything about the converges of its square root. So I know that I can prove that if  $\sum{\sqrt{a_n}}$ converges then $\sum{\frac{\sqrt{a_n}}{n}}$ converges by Abel's Test, but I do not know where to start for the case where  $\sum{\frac{\sqrt{a_n}}{n}}$ diverges


I don't know if this is a basic question or whatever, but I can't seem to find an answer.   As far as I understand the reciprocal of a number the inverse of that number, that still doesn't clarify why it is needed.   For many years I've only ever done math like if I were a robot. I just did it and never understood what I was doing. So when I went and divided fractions I just used the reciprocal, because "that was the way to do it". I want to understand math at a deeper level, especially subjects like probability, statistics, calculus, and linear algebra. To do that I have to understand the fundamentals however.   Any response is appreciated.

For dividing two fractional expressions, how does the division sign turns into multiplication? Is there a step by step proof which proves  $$\frac{a}{b} \div \frac{c}{d} = \frac{a}{b} \cdot \frac{d}{c}=\frac{ad}{bc}?$$


I have a number variable that will always only provide digits like this: 249837   How can I format the string like this in javascript? 2,498.37  Edit: This is a bit more difficult from other questions because the last 2 digits in the input are cents with no periods in the variable.

I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this: "$ 2,500.00"  What's the best way to do this?


I am trying to TRUNCATE a table but I am getting this error:  Cannot truncate a table 'ALOT_OF_USELESS_LOGS' because it is being referenced by a FOREIGN KEY constraint.   However, I have already truncated all the table where it is referenced EXEC sp_fkeys 'ALOT_OF_USELESS_LOGS' and they all truncated successfully but over this table I am still getting this error.  How can I let this go, ideally without dropping constraints?

Using MSSQL2005, can I truncate a table with a foreign key constraint if I first truncate the child table (the table with the primary key of the FK relationship)?  I know that I can either   Use a DELETE without a where clause and then RESEED the identity (or) Remove the FK, truncate the table, and recreate the FK.   I thought that as long as I truncated the child table before the parent, I'd be okay without doing either of the options above, but I'm getting this error:     Cannot truncate table 'TableName' because it is being referenced by a FOREIGN KEY constraint.


Assuming  list of candidates is still accurate: who are the two Kingsguard / Queensguard accompanying Cersei and Ser Robert Strong through the Red Keep when they      encounter the Hound, and get run through in short order,    in S8E05?  Edit: This question is about an entirely different season and episode than the  reference, which names 6 of the 7 guards at that time, and so is not a duplicate.  I'm asking about who is left now; specifically, who are the 2 in this scene.  If it is known.

This pertains to Season 6 and Season 7 of Game of Thrones if you have not caught up this point... Beware the Spoilers! Now to the question...  During the scene where Cersei sits on the Iron Throne and is "sworn in" we see her escorted by seven members of the Kingsguard. Now this is what I would expect as that is the correct number. However, I have no idea who they are!                                The books pay more attention to detail in this area, but the show is also diverging and outpacing in this regard. We can see that a few of the names are not possible on the show. I have listed the names from the books and given why the reason they could not be members on the show in bold.  Ser Jaime Lannister, Lord Commander - Stripped of title Ser Loras Tyrell - Dead and also was never a KG on the show. Ser Osmund Kettleblack - Possible, but not mentioned by name Ser Balon Swann - Possible, but not mentioned by name Ser Meryn Trant - Dead Ser Boros Blount - Possible, but not mentioned by name Ser Robert Strong (aka Zombie Mountain) - Confirmed  I know it can be confusing mixing the books and shows, but the question still remains the same... Who are the current members of the Kingsguard? Bonus Question: Who is the Lord Commander, if any? ETA: This question can also apply to the Kingsguard escorting her throughout Season 7.


Is there a way in order to set every label of every single node to his north west position?

How can all labels of a given type of node be restyled in Tikz?  Imagine that there are nodes of different styles, and that only the nodes of style X should have red labels. Is this possible without having to change all labels one by one of nodes of style X?


Why does the following generate an error?  \documentclass{article}  \usepackage{enumitem} \begin{document}  \begin{description}[label=\emph{\alph*})]  \item [aaa] bbbb  \item [eee] əəəə   \end{description} \end{document}

How can a list be created, whose items are both    enumerated (a,b,c,d,...)  and allow for setting a description via \item[texthere] ?   Im am using MikTex on Windows.


I am using Ubuntu 20.04. I just faced an error "Temporary failure in name resolution". I am unable to access the internet. At first, it was just happening in the terminal. If I ran a command in the terminal, it was displaying the error. But browsers were working, but a bit slow. But now, nothing is working. I can't access any website. And the terminal is displaying the same error. I have disconnected the modem, rebooted the device, but nothing works. I am dual-booting Windows 10 and Ubuntu 20.04. And the internet is working fine on Windows. So, I don't think there is a problem with my Grammenphone Modem. What should I do now? How to fix the problem? Update 14/08/20: Now, Terminal can fetch files from some sources, but not all. Mainly, it can't fetch files from "archive.ubuntu.com". Actually it is "bd.archive.ubuntu.com" as I am in Bangladesh. It also fails to fetch files from some other sources. Such as "dl.winehq.org" and "debrepo.freedownloadmanager.org".

Err http://archive.canonical.com natty InRelease     Err http://security.ubuntu.com oneiric-security InRelease                Err http://extras.ubuntu.com natty InRelease                             Err http://security.ubuntu.com oneiric-security Release.gpg   Temporary failure resolving ‘security.ubuntu.com’ Err http://archive.canonical.com natty Release.gpg   Temporary failure resolving ‘archive.canonical.com’ Err http://extras.ubuntu.com natty Release.gpg   Temporary failure resolving ‘extras.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric InRelease Err http://gb.archive.ubuntu.com oneiric-updates InRelease Err http://gb.archive.ubuntu.com natty-backports InRelease Err http://gb.archive.ubuntu.com oneiric Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com natty-backports Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’  Reading package lists... Done W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease       W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease   W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease   W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘archive.canonical.com’ W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg  Temporary failure resolving ‘security.ubuntu.com’ W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘extras.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Some index files failed to download. They have been ignored, or old ones used instead.   This is what I'm seeing when I try to run sudo apt-get update. I did an update on my instance yesterday and am now experiencing this.


I have just started studying MRI physics and was reading F.Bloch’s paper on Nuclear Induction.  In page 463, it is mentioned,  To obtain this variation does not require the solution of the Schroedinger equation. It is enough to remember the general fact that the quantum-mechanical expectation value of any quantity follows in its time dependence exactly the classical equations of motion and that the magnetic and angular momenta of each nucleus are parallel to each other.   The parallelity between the magnetic moment $\mu$ and the angular momentum a for each nucleus implies $\mu = \gamma a$  Are the magnetic and angular momenta of the proton always parallel to each other? Why is this so?

How do I prove the relation between the vectors of magnetic moment $\vec\mu$ and angular momentum $\vec L$, $$\vec\mu=\gamma\vec L$$  ?  Many text books and lecture notes about the principles of magnetism show the relation of $\mu$ and $L$ as scalars only and then just state that the relation holds also for the vectors. An example:   $$\mu=I\cdot A = \frac{q}{t}\pi r^2 = \frac{qv}{2\pi rm}m\pi r^2$$  ($I=q/t$: current, $A$: area of a loop, $q$ charge, $t=2\pi r/v$: time of 1 rotation, $v$: velocity of particle, $m$: mass )  The angular momentum is $\vec L = \vec r\times\vec p$ or $L=mrv$ and therefore $$\Rightarrow \mu = {\frac{q}{2m}} L = \gamma L.$$  Why is this also true for the vectors? Is there a general explication by classical physics without the need of quantum theory?


I am new to Ubuntu, using 14.04 I am trying to format an SD card to make space on it, and it's not working. I tried in terminal:  format mmcblk0 hformat mmcblk0   and it says:  hformat: /home/michael/mmcblk0: error (no such file or directory)   How do you format an SD card?

How can I format or partition SD card in Kubuntu?  Is there an application with GUI for this?


Ok, so here's the deal. I have a picture, from Google Images, that I am trying to put on a flashdrive or such so I can make it the profile picture to the account I am currently logged into. I have the latest OSX and everything is up to date. I am on a Safari only guest account. Whenever I try to download anthing to the computer directly, I only get a "Safari could not download the file “Just Another Day For Arceus.mp4” because there is not enough free disk space. Try deleting documents or downloading to another disk." This of course, was trying to download a video, not the said picture. That, and when I try to right click items, the usual white bar with several items does not appear. I can access the USB, however, when I go to Google's homepage and click "Change Image" and although I can access the files already on it, I cannot add any new files. Please help if you can, and let me know if I can do anything without logging into the Admin account. Also, I am not much of a tech person, so if you try to give me pathways, I won't know what to do with them, nor how to use them.  Thank you so much in advance,  Drena The Eliatrope

I'm logged into the guest account of a borrowed MacBook Air which is running OS X Version 10.9.2 and I've been trying to transfer a 2.19GB video file to an admin account, a USB or external hard drive, or online.   1. Transferring the file to the admin account: Apparently if I log out of this guest account, the file will be deleted. So, I tried transferring it to a shared folder, but I can't find/access a shared folder... perhaps because I'm on a guest account? I tried using Terminal and codes I copy-pasted from Google, but they all require the password of the admin account, which the owner can't remember. We've been working together the whole afternoon to try to remember the password, but the owner says he'd be able to guess it if he had the "password hint". Unfortunately, we only know how to view the "password hint" by logging out of the guest account, which we obviously can't do, or else the file will be deleted. Transferring to the admin account: FAILED :(  2. Transferring the file to a USB or external hard drive: I've tried both ports with 3 different USB's, and none of them were recognized by the Mac. I've also tried plugging in a WD external hard drive in both ports, but neither recognized the hard drive. All in all, nothing between 3 USB's and 1 external hard drive showed up on the Mac. Could this have anything to do with being logged into a guest account? Transferring the file to a USB or external hard drive: FAILED :(  3. Uploading online: I've had two tabs open for the past 15 minutes: YouTube and Google Drive. Neither are showing any progress towards the upload. As I'm typing, both currently remain at 0%. I've also tried uploading the file through email, but Yahoo crashes before the upload even begins. In addition to this, I've tried uploading with Filemail.com multiple times. Each time it says it has "problems uploading"... Uploading online: FAILED :(  Is there anything I can do? Is there another method I can try? Perhaps theres a way to view the password hint without logging out of the guest account? Is there another way to access the "shared files" folder without needing the admin password? Is there anything that can be done about the USB's and the hard drive that won't show up? Is there a reason why the file won't upload online? I would really, really appreciate your help. Thank you in advance!


I am creating an answer key booklet using exam.cls for a question sheet that I had made for some students.  Along with that, I've used the multicol package to create a 2-column structure within a question that is composed of multiple parts. To be more specific, I've used 3 multicols environments (as seen in the code further below), and my reason for this is so that the labels are ordered horizontally and not vertically. What I mean by horizontally is having (a), (c), (e) on the left side and (b), (d), (f) on the right so that (a) and (b) are on the same line, (c) and (d) together on the next and so on (what the screenshot below would have looked like had the letters not overlapped); which is contrary to the vertical-style labelling where (a), (b), (c) are in the left column and (d), (e), (f) in the right. I've been trying to achieve this horizontal-style labelling, but I am faced with the issue of the part letters being in the wrong places:    As you can see, part (c) and (e) are placed at the positions of (d) and (f) respectively, causing quite a mess. I would like to avoid repeating the question's original text (from the question sheet) after \question as I want (a) and (b) to be in-line with the question number. Here is my code:  \documentclass[11pt]{exam} \usepackage{multicol} \begin{document}     \begin{questions}         \question             \begin{parts}                 \begin{multicols}{2}                     \part answer                     \part answer                 \end{multicols}                 \begin{multicols}{2}                     \part answer                     \part answer                 \end{multicols}                 \begin{multicols}{2}                     \part answer                     \part answer                 \end{multicols}             \end{parts}     \end{questions} \end{document}   I am aware that placing the \part commands in a single multicols environment fixes the issue of overlapping letters, but this causes the labelling of the letters to be vertical and not horizontal. I also understand that the parts environment is used as the text for \question, but I can't understand why the output appears as such. How can I modify my code to fix this problem? And is using exam.cls inappropriate for this purpose?

If I utilize the two columns of multicols for my Kurdish sequence of numbers, it arranges the items in column like the following figure:   But I want to arrange the items in rows splitted by some columns (two columns in this case) alike the following figure:   And for the case of "three columns", the output would be alike the following figure:   How may I achieve the functionality? And I don't want to use the sequence of the following commands:  \begin{multicols}{2} \begin{enumerate}[$1)$,noitemsep] \item  Yek \item  Du \end{enumerate} \end{multicols}   Instead, I want to specify the split count of the columns and then have the items arranged in the desired arrangement automatically. For the record, I've check  post, but it's too generalized.


Are the apostrophe placements correct in every example?  • two weeks' vacation • four days' personal time • three months' sabbatical time • ten nights' accommodations • three hours' sleep • eight months' pregnancy • eight months pregnant • five minutes' time • a penny's worth • two pennies' worth • a nickel's worth • two nickels' worth • a dollar's worth • five dollars' worth • two seconds' time • five years' probation  Thank you kindly.

I’ve always understood that the phrase two weeks usually turns into two weeks’ when used as a modifier as in   I’m giving my two weeks’ notice.  I get two weeks’ vacation. (“two weeks’ holiday” for Brits)   with an apostrophe on the word weeks’, indicating that the vacation “belongs” to the weeks.   One way to explain this is the phrase “two weeks of vacation” being contracted to “two weeks’ vacation” – the vacation is “of” the weeks; that is, it is possessed by them.  But I’ve seen a lot of people omit the apostrophe in casual writing, and thinking about it, it seems plausible that the noun vacation would be plainly modified by the adjectival phrase two weeks.  But on the other hand, shouldn’t adjectival phrases be hypenated, namely two-weeks vacation?  Yet that seems wrong, too: the hyphenate should be singular, two-week vacation (like two-tone shoes) because .   touches on this (and references a good ) but doesn’t explain why the plural must be possessive in this case.   suggests that two weeks might be adverbial rather than adjectival, and thus resists being used attributively. But that still doesn’t quite explain this particular muddle of pluralization, possession, and attribution.  Given all this, why should “two weeks vacation” be written “two weeks’ vacation” with a possessive apostrophe?


I am new to c# and I have a trouble: Error CS0120 An object reference is required for the nonstatic field, method, or property In russian it is little bit different: Error CS0120 For non-static field, method, or property is required link to an object.  When I'm closing one form, that downloads some staff and saves it to a .xml files, I should update a combobox on the another form (This form contains a list of recently downloaded files.)  But I have an error. How can I fix it?  The code:  private void Reviews_browser_Closing(object sender, System.ComponentModel.CancelEventArgs e)     {         // Determine if text has changed in the textbox by comparing to original text.          // Display a MsgBox asking the user to save changes or abort.         if (MessageBox.Show("Закрыть, сохранив загруженные БД?", "Внимание!",            MessageBoxButtons.YesNo) == DialogResult.Yes)         {             // Cancel the Closing event from closing the form.             e.Cancel = false;             // Call method to save file...         }         else         {             e.Cancel = true;             try             {                 string[] dirs = Directory.GetFiles(@Directory.GetCurrentDirectory(), "*.xml");                 foreach (string dir in dirs)                 {                     if (Path.GetFileName(dir) != "HtmlAgilityPack.xml" && Path.GetFileName(dir) != ".xml")                     {                         int len = Path.GetFileName(dir).Length;                         glavnaya.fayly_s_otzivami.Items.Add(Path.GetFileName(dir).Remove(len - 4, 4));                     }                 }             }             catch (Exception oshibocka)             {              }         }

Consider:  namespace WindowsApplication1 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          private void button1_Click(object sender, EventArgs e)         {             //int[] val = { 0, 0};             int val;             if (textBox1.Text == "")             {                 MessageBox.Show("Input any no");             }             else             {                 val = Convert.ToInt32(textBox1.Text);                 Thread ot1 = new Thread(new ParameterizedThreadStart(SumData));                 ot1.Start(val);             }         }          private static void ReadData(object state)         {             System.Windows.Forms.Application.Run();         }          void setTextboxText(int result)         {             if (this.InvokeRequired)             {                 this.Invoke(new IntDelegate(SetTextboxTextSafe), new object[] { result });             }             else             {                 SetTextboxTextSafe(result);             }         }          void SetTextboxTextSafe(int result)         {             label1.Text = result.ToString();         }          private static void SumData(object state)         {             int result;             //int[] icount = (int[])state;             int icount = (int)state;              for (int i = icount; i > 0; i--)             {                 result += i;                 System.Threading.Thread.Sleep(1000);             }             setTextboxText(result);         }          delegate void IntDelegate(int result);          private void button2_Click(object sender, EventArgs e)         {             Application.Exit();         }     } }   Why is this error occurring?     An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int)


Several years ago I Had a book of sci fi short stories and one of the stories in it was amazing. Hopefully someone can tell me the name of the story or the book it was in --  In the short story, some human astronauts in space encounter some aliens. The aliens ask them where they're from, and the astronauts happily tell them from Earth, and then where Earth is located, in the Milky Way Galaxy. The aliens then tell them a story, about how long ago there was a huge intergalactic war, where all races had to come together to defeat one race that was incredibly brilliant but also bloodthirsty and vicious. The bloodthirsty race was ultimately defeated but one of their ships got away and the aliens have been hunting the universe for their descendants for thousands of years. And those descendants are us, humans. The aliens tell the astronauts they're sorry but they have to kill them, and then they're heading to earth to finish us off.   It was an amazing story and chilling. Any one recognize it please??

So the story goes, humans in a spaceship search for an inhabitable planet, being surprised they found none in the vicinity of Earth. They find one, and it seems uninhabited. At the same time are observed by the aliens, who go down on the planet to meet them. The aliens sit them down and tell them a story about war and conflict that ruled the galaxy, and how all the sentient races in the galaxy got together and got rid of the race that tried to conquer all by blowing up their planets.  In the end you realise man is this terrible conqueror the aliens are talking about.