body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
I mean it would make sense if they couldn't but, how could the barrier tell the difference between a muggle born wizard and a normal muggle because i'm guessing people would tend to lean on the big pillars, and kids would fall on them..
Suppose someone from "Harry's world" married a Muggle, and they want to escort their child. Can the Muggle parent get through to the Hogwarts platform?
I have a file SRQ which is having 10000 SRQ_ID which are unique. I have one table(TABLE1) which is having 2 columns namely SRQ_ID,WORK_ID . I needs to write a query which will search the table(TABLE1) for all the SRQ_ID's in the file SRQ and will display the output with corresponding WORK_ID. I tried the below code. But IN clause is only applicable for 1000 records. How to run the same if I have 100k records? select WO_ID from TABLE1 where SRQ_ID in ('B6512DF0','5838FABC','EC5D804C','074DD65C')
Is there any way to get around the Oracle 10g limitation of 1000 items in a static IN clause? I have a comma delimited list of many of IDs that I want to use in an IN clause, Sometimes this list can exceed 1000 items, at which point Oracle throws an error. The query is similar to this... select * from table1 where ID in (1,2,3,4,...,1001,1002,...)
Do I need any determiners in the sentence below in general statement? Strong winds destroy homes. Is it ok to say in English in specific situation? The strong wind destroyed the homes in North Carolina. I mean mostly the determiners in this sentence. These are specific questions I am asking about. I couldn't find wider explanation of zero determiner and when it applies vs. prulars and singulars.
I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize? The standard rule you always hear: “If a person knows which item you are talking about then use "the" . . . doesn’t clear things up for me, as I have no idea whether or not they know.
Let $V,T$ be two random variables with supports $\mathcal{V},\mathcal{T}$, respectively. Let $P_{V|T}$ denote the probability distribution of $V$ coditional on $T$ $P_{V,T}$ denote the probability distribution of $(V,T)$ $P_{T}$ denote the probability distribution of $T$, $P_{V}$ denote the probability distribution of $V$ $P_{T|V}$ denote the probability distribution of $T$ coditional on $V$ Suppose that $\mathcal{V}$ and $\mathcal{T}$ are finite. Then, $$ E(V|T=t)= \sum_{v\in \mathcal{V}} v P_{V|T}(v|t)= \sum_{v\in \mathcal{V}} v \frac{P_{V,T}(v,t)}{P_{T}(t)}=\sum_{v\in \mathcal{V}} v \frac{P_{T|V}(t|v)P_V(v)}{P_{T}(t)} $$ Moreover, $$ \underbrace{E(V|T=t)\geq 0 \leftrightarrow \sum_{v\in \mathcal{V}} v P_{T|V}(t|v)P_V(v)\geq 0}_{(*)} $$ Now, I want to write condition $(*)$ (and in particular the right hand side) when $V$ and $T$ are continuous random variables, without using probability density functions but only probability measures or cumulative distribution functions. Could you help? My attempt: I managed to write $(*)$ when $\mathcal{T}$ is finite and $V$ is a continuous random variable: $$ E(V|T=t)\geq 0 \leftrightarrow \int_{\mathcal{V}} v P_{T|V}(t|v)dP_V(v)\geq 0 $$ But I'm struggling to extend to the case when also $T$ is a continuous random variable.
I'm looking for some correct notation. Consider the random variable $V$ with support $\mathcal{V}$ and probability distribution $P_V$. Consider a function $u:\mathcal{V}\rightarrow \mathbb{R}$. Let $\mathcal{V}$ be finite and suppose I want to compute the expected value of $u(V)$. This is $$ \sum_{v\in \mathcal{V}} u(v)\times P_{V}(v) $$ Suppose now instead that $P_V$ is continuous. What is the correct notation to indicate the formula of the expected value of $u(V)$ without passing through the definition of density? I though about using $$ \int_{\mathcal{V}} u(v)\text{ } dP_{V}(v) $$ Is this correct?
I stumbled upon this problem when reading the resource provided by AoPS, on Here is the problem: Show that if $a$ and $b$ are positive integers, then $$\left(a + \frac12\right)^n + \left(b + \frac12\right)^n$$ is an integer for only finitely many positive integers $n$. I'm unsure on how to begin - any help would be much appreciated! Thanks
Show that if $a$ and $b$ are positive integers, then $$\left(a +\frac12\right)^n + \left(b+\frac{1}{2}\right)^n$$is an integer for only finitely many positive integers $n$. I tried hard but nothing seems to work. :(
Show $\otimes$ and $*$ are the same operation on $\pi_1(G, x_0)$ where $(f\otimes g)(s) = f(s) \cdot g(s)$ where $\cdot$ is the group operation on the topological group $G. $ This is a question from the Munkres text which is really frustrating me. It's number 7 on page 335 for anyone with the book. I've already proved the first two parts. There is a hint and that is to compute $(f*$ $e_x)$ $\otimes$ $(e_x$ $*g)$. When I do this it is pretty easy to see that this is the same as $f \otimes g$ but am at a loss as to how this is the same as $f*g$.
Let G be a topological group and let $s_1$ and $s_2$ be loops in G (both loops are based at the identity e of G). Is it true that the loop $s_1s_2$ (where the multiplication is the one of the group structure of G) is equal, in $\pi_1(G,e)$, to the loop $s_1*s_2$ where this product is given by first going around $s_1$ and then $s_2$ (i.e., do we have $[s_1s_2] = [s_1*s_2]$)? If yes, what is the proof for this?
here code is Of the class public class AdapterOrderShop extends RecyclerView.Adapter<AdapterOrderShop.HolderOrderShop> implements Filterable { private Context context; public ArrayList<ModelOrderShop> orderShopArrayList,filterList; private FilterOrderShop filter; public AdapterOrderShop(Context context, ArrayList<ModelOrderShop> orderShopArrayList) { this.context = context; this.orderShopArrayList = orderShopArrayList; this.filterList=orderShopArrayList; } @Override public int getItemCount() { return orderShopArrayList.size(); } Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference
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?
"people" and "money" previously were used to denote plural. Now we have "peoples" and "moneys". What is the reason for this?
Can you please clarify the relation and differences between these nouns? For example, is it proper to use "persons" instead of "people"? Are they the same? As I believe that "people" is plural, how come there exists the plural of the plural (=peoples)? Does it have any usage?
I have an included layout in my activity's XML layout like so: <include layout="@layout/info_button" android:id="@+id/config_from_template_info_btn"/> I'm trying to set an OnClickListener for the button inside of that included layout by doing this: findViewById(R.id.config_from_template_info_btn) .findViewById(R.id.info_btn) .setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //Do things } }); However, this crashes on runtime with: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference The info_btn.xml layout simply contains Button widget like so: <merge xmlns:android="http://schemas.android.com/apk/res/android"> <Button android:id="@+id/info_btn" ... /> </merge> What am I doing wrong here?
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?
When in Windows 7 I have the option to have the touchpad automatically be disabled when a usb mouse in plugged in. Then when the mouse in unplugged the touchpad automatically becomes enabled. There is even a light at the top of the touchpad the comes on when it is in disabled mode! Is there a way to duplicate this functionality under Ubuntu 13.04? (I have a Dell Inspiron 15r with Hybrid AMD/Intel graphics.)
I have a Logitech MX Anywhere wireless USB mouse which works very well with Ubuntu. However, I would like to disable the touch pad when this mouse is connected. I keep hitting the touch pad with my wrist or thumb and cause the mouse to move to another part of the screen. I am constantly fixing typos. I've had this problem since I installed Ubuntu 9.10. I'm not sure if it is because the biometrics is part of the touchpad, the way the device is built into the system, or the BIOS which does not let me disable it.
Let $\mathbb{F}$ be a field, $\lambda \in \mathbb{F}$ and $A,B \in M_n(\mathbb{F})$ such that $m_A(x)=m_B(x)=(x-\lambda)^k$ and such that the geometric multiplicity of $\lambda$ in $A$ equals to the geometric multiplicity of $\lambda$ in $B$. a. Prove that for $n=5$ or $n=6$- $A$ and $B$ are similar b. Find an example for $n=7$ for which $A$ and $B$ are NOT similar My main question here is whether I should try proving it for $n=5$ and $n=6$ seperately? Or should I try proving it for any $n$ and then observe that it holds only for $n=5$ or $n=6$? Plus, any hints or suggestion regarding my main question or the question above will be welcome
I'm trying with matrices over $\mathbb F_2$ and trying to have a look at the Jordan canonical forms of these matrices. If the size of the biggest Jordan block is the same with 1's in all diagonal entries, we do get non-similar invertible matrices with same minimal and characteristic polynomial. But what do I do for satisfying the last condition on eigenspace? Please provide examples if possible and also please explain why it works.
I am trying to implement SVM classifier in Java using libsvm. I am getting the following error: Exception in thread "main" java.lang.NullPointerException at libsvm.Kernel.dot(svm.java:213) at libsvm.Kernel.kernel_function(svm.java:172) at libsvm.SVC_Q.<init>(svm.java:1161) at libsvm.svm.solve_c_svc(svm.java:1333) at libsvm.svm.svm_train_one(svm.java:1510) at libsvm.svm.svm_train(svm.java:2067) I am trying to implement a binary classifier on 6 training examples: this is my code: import libsvm.*; import java.io.*; import java.io.Reader; import java.lang.Object; public class SVMclassifier { public SVMclassifier(){ svm_problem svmData=new svm_problem(); svmData.l=6; double[] lab={1,0,1,1,0,0}; svmData.y=lab; svm_node[][] values=new svm_node[6][3]; System.out.print("I am here"); svm_node AA=new svm_node(); AA.index=1; AA.value=0.1; values[0][1]=AA; AA.index=1; AA.value=0.9; values[0][2]=AA; AA.index=1; AA.value=0.9; values[1][0]=AA; AA.index=2; AA.value=0.1; values[1][1]=AA; AA.index=1; AA.value=0.05; values[2][0]=AA; AA.index=2; AA.value=0.95; values[2][1]=AA; AA.index=1; AA.value=0.06; values[3][0]=AA; AA.index=2; AA.value=0.90; values[3][1]=AA; AA.index=1; AA.value=0.95; values[4][0]=AA; AA.index=2; AA.value=0.05; values[4][1]=AA; AA.index=1; AA.value=0.90; values[5][0]=AA; AA.index=2; AA.value=0.06; values[5][1]=AA; svmData.x=values; svm_model paras=new svm_model(); svm_parameter params =new svm_parameter(); int[] bb={1,1,1}; double[] cc={1,1,1}; System.out.println("I am here"); params.svm_type = svm_parameter.C_SVC; params.kernel_type = svm_parameter.LINEAR; params.degree = 3; params.gamma = 0.5; // 1/num_features params.coef0 = 0; params.nu = 0.5; params.cache_size = 100; params.C = 1; params.eps = 1e-3; params.p = 0.1; params.shrinking = 1; params.probability = 0; params.nr_weight = 0; params.weight_label=bb; params.weight=cc; paras=svm.svm_train(svmData, params) ; for(int i=0;i<=5;i=i+1){ svm_node[] v=values[i]; double u=svm.svm_predict(paras, v); System.out.println(u); } } public static void main(String[] args) { // TODO Auto-generated method stub SVMclassifier A=new SVMclassifier(); } } I am new to java as well as libsvm. any help would be welcome. Thanks
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?
Given the set $A_n =\{(i,j)∈ Z^2:(i,j)=1, 0≤i,j≤n\}$ I am having problems proving that the limit $\lim_{N\to \infty}$ $|A_n|\over N$ exist and to calculate it, any tips?
Let $A_n=\{(i,j)\in\mathbb{Z}^2:\gcd(i,j)=1, \ \ 0 \leq i,j\leq n \}$. How to prove the existence of $\lim_{n\to\infty}\frac{|A_n|}{n^2}$, and how calculate this limit? Thank you!
I'm trying to create a product listing. Naturally Sql prints the data vertically forming rows after rows like this: Rowa. product_img#1|Product_name|Product_price|Product_short_description Rowb. product_img#2|Product_name|Product_price|Product_short_description Rowc. product_img#3|Product_name|Product_price|Product_short_description Rowd. product_img#4|Product_name|Product_price|Product_short_description and so on... I'm trying to create a query so that I can display 3 products per rows like this: Product_img#1| Product_img#2| Product_img#3| Product_name| Product_name| Product_name| Product_price| Product_price| Product_price| Product_description| Product_description| Product_description| Looking up the web I found that what i'm trying to do is called pivot table. It was suggested to me to use a service report like SQL Server Reporting Services and create a Matrix Report to print the data the way I want it. To be honest, I have no idea how to use those services and where to start... This is totally gibberish to me. I'm using Netbeans joined with Mysql. Where do I install those services and how do I use them? Is there such kind of service integrated in Workbench? Any help/tricks/tips on how to achieve this would be gladly appreciated!
I have the following query that sort of works, but I find it to be kludgy and inefficient. Is there a better way to write this query? I know this is a bit of an odd query, else I would probably have found some advice when searching, but it is necessary for our business logic. We've been doing this in Hibernate queries and using software to output the file but we're needing to improve performance drastically and that means using raw sql. The output of this query is to be used to partially populate a helper table that we query to figure out which of our 40-odd product tables a particular item is contained in. Could the following query be replicated using something like GROUP_CONCAT in reverse? Note that the second and third column must be repeated on each line. The fields all contain the same type of data. SELECT 'Pn', 'Mfg', 'TableId', 'SourceColumn', 'OtherData' SELECT PN1, Mfg, '26', 'PN1', OtherData FROM Table UNION ALL SELECT PN2, Mfg, '26', 'PN2', OtherData FROM Table UNION ALL SELECT PN3, Mfg, '26', 'PN3', OtherData FROM Table UNION ALL SELECT PN4, Mfg, '26', 'PN4', OtherData INTO OUTFILE 'XXX.dat' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n' FROM Table d; Input looks like the following table: | PN1 | PN2 | PN3 | PN4 | MFG | TableId | OtherData | ----------------------------------------------------------------------- | asdf | abde | 12354 | asdfc | 2 | 26 | 0.2456 | | nupo | 1354 | null | null | 2 | 26 | 1.53 | | ... | ... | ... | ... | ... | ... | ... | | ... | ... | ... | ... | ... | ... | ... | | ... | ... | ... | ... | ... | ... | ... | I want the output .dat file to look like this: "Pn","Mfg","TableId","SourceColumn","OtherData" "asdf",2,26,"PN1",0.2456 "abde",2,26,"PN2",0.2456 "12354",2,26,"PN3",0.2456 "asdfc",2,26,"PN4",0.2456 "nupo",2,26,"PN1",1.53 "1354",2,26,"PN2",1.53 ... ... ... If I take the INTO OUTFILE clause out, I get an output that looks like this: | Pn | Mfg | TableId | SourceColumn | OtherData | ----------------------------------------------------------------- | "Pn" | {blob} | "TableId" | "PN" | {blob} | | "asdf" | {blob} | "PN1" | "PN1" | {blob} | | "abde" | {blob} | "PN2" | "PN2" | {blob} | | "12354" | {blob} | "PN3" | "PN3" | {blob} | | "asdfc" | {blob} | "PN4" | "PN4" | {blob} | | "nupo" | {blob} | "PN1" | "PN1" | {blob} | | "1354" | {blob} | "PN2" | "PN2" | {blob} | | ... | ... | ... | ... | ... | | ... | ... | ... | ... | ... | | ... | ... | ... | ... | ... |
I've seen in a someone who used before decision tree or other techniques. I thought it was just for compressing data but he aimed to improve his score. How can PCA improve score in this case ? Is it because there is less overfitting ?
Suppose I am running a regression $Y \sim X$. Why by selecting top $k$ principle components of $X$, does the model retain its predictive power on $Y$? I understand that from dimensionality-reduction/feature-selection point of view, if $v_1, v_2, ... v_k$ are the eigenvectors of covariance matrix of $X$ with top $k$ eigenvalues, then $Xv_1, Xv_2 ... Xv_k$ are top $k$ principal components with maximum variances. We can thereby reduce the number of features to $k$ and retain most of the predictive power, as I understand it. But why do top $k$ components retain the predictive power on $Y$? If we talk about a general OLS $Y \sim Z$, there is no reason to suggest that if feature $Z_i$ has maximum variance, then $Z_i$ has the most predictive power on $Y$. Update after seeing comments: I guess I have seen tons of examples of using PCA for dimensionality reduction. I have been assuming that means the dimensions we are left with have the most predictive power. Otherwise what's the point of dimensionality reduction?
The time-independent Shrödinger equation (TISE) is $$\dfrac{-\hbar^2}{2m} \nabla^2 \psi + V \psi = E \psi,$$ where $m$ is the mass of the particle. I just had a thought: If $m$ is the particle's mass, then the TISE is invalid for photons, since they're massless! But I know that the Shrödinger equation is used to model photons. So how can this be?
In basic quantum mechanics courses, one describes the evolution of quantum mechanics chronologically. Interference experiments with particles showed that particles should have a wave character; on the other hand, the photo-electric effect showed that electromagnetic waves should have a particle character. So there's a particle-wave duality. The course continues with postulating the Schrödinger equation, and solves the problems for the wave character of classical particles (e.g. with respect to harmonic oscillators to solve the UV-catastrophe in the description of blackbody radiation). On the other hand, one describes the photo-electric effect extensively with perturbation theory, as the electromagnetic wave acts as a periodical force on an electron. But the electromagnetic wave is still described with the Maxwell equations, and not by Schrödinger. Suppose history went a little differently: the corpuscular character would still be the generally accepted behaviour of light (as Newton preferred), and one discovered the wave character of photons and electrons simultaneously by doing interference experiments. The laws of Maxwell, Gauss, Faraday and Ampère weren't discovered yet. Schrödinger comes up with his equation, and one describes the wave character of electrons as well as photons with this equation. Would this equation give a exhaustive description of the electromagnetic (and vector like) behaviour of photons? In other words: is the Schrödinger theory, in some way, equivalent to the Maxwell theory for the description of photons? Or are the Maxwell equations some kind of limit for greater dimensions (like the Newton equations for mechanics)? What is the link between these two "wave character" descriptions of photons?
How can I get a batch file to prompt for UAC on Windows Vista to Windows 8 to run with Administrator rights - that is - other than right clicking on the batch file and hitting "Run as Administrator"?
Can I get UAC prompt for user from batch file? For example I need put some keys to registry under CurrentControlSet from batch file by reg import path\to\my.reg PS. runas is not a solution as my customers uses different Windows localisation and I can not guess which name used for Administrator account (this can be Администратор)... And script don't know administrator password. And UAC dialog box does not require password entering...
Let $\{y_n\}$ a sequence so that $\sum y_i=+\infty$ and $$y_n>0, \forall n \in \mathbb{N}.$$ Show that if $$\lim_{n \to +\infty} \frac{x_n}{y_n}=a$$ then $$\lim_{n \to +\infty} \frac{\displaystyle \sum^n x_i}{\displaystyle \sum^n y_i}=a.$$
Let $Y_{n} > 0$ for all $ n\in \mathbb{N} $, with $\sum{Y_{n}}= +\infty$. If $\displaystyle\lim\limits_{n\rightarrow \infty}\frac{X_{n}}{Y_{n}}= a$ then $\displaystyle\lim\limits_{n\rightarrow\infty}\frac{X_{1}+X_{2}+X_{3}+\dots+X_{n}}{Y_{1}+Y_{2}+Y_{3}+\dots+Y_{n}}= a$ I need a idea for solution. can i supose that $\lim\limits_{n\rightarrow\infty}Y_{n}$ exist ?
when i execute this schedule apex class from developer console the class is scheduled at 4 different timings as queue. when "schedule Job2" running i got this exception in debug log shows "|EXCEPTION_THROWN|[21]|System.AsyncException: The Apex job named "Scheduled Job0" is already scheduled for execution" and in debug log the future call shows : "Number of future calls: 1 out of 50" but i'm not getting the any records pulling from external source this is scheduled class global class SchedulingService implements Schedulable { global void execute(SchedulableContext SC){ ServiceNowUpsert.GetIncident('abcd','1234','https://abcd.service-now.com'); String day = string.valueOf(system.now().day()); String month = string.valueOf(system.now().month()); String hour = string.valueOf(system.now().hour()); String minute = string.valueOf(system.now().minute() + 15); String second = string.valueOf(system.now().second()); String year = string.valueOf(system.now().year()); String cronStr = '0 0,15 * * * *';//changes required String strJobName = 'Job-' + second + '_' + minute + '_' + hour + '_' + day + '_' + month + '_' + year; // String strSchedule = '0 ' + minute + ' ' + hour + ' ' + day + ' ' + month + ' ?' + ' ' + year; //System.schedule(strJobName, cronStr, new SchedulingServiceNow()); //changes required System.schedule('Scheduled Job0', '0 0 * * * ?', new SchedulingService ()); System.schedule('Scheduled Job1', '0 15 * * * ?', new SchedulingService ()); System.schedule('Scheduled Job2', '0 30 * * * ?', new SchedulingService ()); System.schedule('Scheduled Job3', '0 45 * * * ?', new SchedulingService ()); for( CronTrigger c:[Select State,Id,EndTime,CronExpression From CronTrigger where NextFireTime= null AND State='DELETED' Limit 100]){ System.abortJob(c.id); } } } This is my apex class global with sharing class ServiceNowUpsert { @TestVisible static HttpResponse res; @future(callout=true) global static void GetIncident(String username1, String password1, String endpointUrl1){ Http http = new Http(); HttpRequest req = new HttpRequest(); Blob headerValue = Blob.valueOf(username1 + ':' + password1); String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue); req.setHeader('Authorization', authorizationHeader); req.setHeader('Content-Type', 'application/json'); //displays data in JSON format req.setEndpoint(endpointUrl1+'/api/now/table/incident?sysparm_query=sys_updated_onONLast+hour%40javascript%3Ags.hoursAgoStart%282%29%40javascript%3Ags.hoursAgoEnd%280%29&sysparm_fields=impact%2Cincident_state%2Cshort_description%2Csys_id%2Ccontact_type&u_sftype=true'); req.setMethod('GET'); res = http.send(req); System.debug('MyResult == :'+res.getBody()); Deserialization.ResponseResult theresult1 = (Deserialization.ResponseResult)JSON.deserialize(res.getBody(), Deserialization.ResponseResult.class); System.debug('MyResult == :' + theresult1 ); List<Case> casesToUpsert = new List<Case>(); for(Deserialization d : theresult1.result ){ Case c = new Case(); c.Priority = d.impact; c.Status = d.incident_state; c.Subject = d.short_description; c.ServiceNowId__c = d.sys_id; c.Origin = d.contact_type; casesToUpsert.add(c); } system.debug('Cases to UPsert ::: ' +casesToUpsert); if(casesToUpsert.size()>0){ Database.upsert(casesToUpsert,false) ; } } } How to work my scheduled class perfectly running for every 15 mins and pulling the records from external source?
Using the salesforce GUI it seams impossible to schedule a job every 15 minutes. Or more than once a day.
I'm doing 2 totally different activities under one name and I would like to create a website for both under one domain name. For example, the website will be example.com. How should I arrange it better: activity1.example.com and activity2.example.com? OR example.com/activity1 and example.com/activity2? What do you think is better. I would choose the solution #1, but regarding the SEO and other practices which would be better?
I recently moved from having a main site like www.example.com with a subdomain associated site yyy.example.com, to moving everything off the subdomain to a subdirectory like www.example.com/yyy/, with the same hierarchy underneath the subdirectory, and now yyy.example.com is just a redirect page to the subdirectory, so yyy.example.com/abc/page-x is redirected to www.example.com/yyy/abc/page-x and so on. The effect has been that the traffic increased by several times (the total page views are more than ten times at the present rate) what it was to the yyy subdomain. Previously almost all of the traffic to the yyy subdomain was from the www site. This is from monitoring the old yyy site for a year or more. I'm curious to know if there's any research or results which would indicate whether this is universal (subdirectories beat subdomains) or "just me".
I'm studying about manifolds. I'm an engineer and want to grasp the concept of manifold without too deep dive into rigorous mathematics. My question is whethere the "topologist's sine curve" defined as $S = \{(0, y) : y \in (-1,1)\} \cup \{(x, \sin (1/x)) : x \in (0, 2/\pi)\}$ can be a manifold. I tried to find some explnations in books and web. However, what I found are all about (path/local) connectedness. I'm not familiar with topology and not want to study it extensively. So I tried to understand the question with very minimal knowledge. As far as I understand, to say that a set is a manifold, I need to set a topology (open subsets) on the set. As a subset of $\mathbb{R}^2$, every open set in $S$ should have a form $S \cap A$ for an open set $A \in \mathbb{R}^2$. Any interval in the vertical axis part of $S$, e.g. $I = \{(0, y) : 0 < y < 1/2\}$, cannot be an open set in $S$. It is because every open set in $\mathbb{R}^2$ containing $I$ also contains some other part of $S$ : there is no way to express $I$ in the form of $S \cap A$ where $A$ is open in $\mathbb{R}^2$. Then there is no homeomorphism from an open subset of $S$ containing $I$ to an open set in $\mathbb{R}$. It is because, if there is one, the preimage of an open interval in $\mathbb{R}$, to which $I$ is mapped, must be open but $I$ is not open. So there cannot be a coordinate chart for $I$ and $S$ is not a manifold. This is what I understand. My first question is whether or not this understanding is correct. The second question is whether $S$ can be a manifold if I give a different topology. I cannot express precisly how to define the topology but intuitively the sine function part is homeomorphic to an open interval in the real line and the vertical part is also homeomorphic to an open interval in the real line, if I consider $S$ as a space of its own, not a subspace of $\mathbb{R}^2$. Is this true? If true, how can I express the topology precisley? This question is not a duplicate of . I read it. However, the concept of connectedness confuses me. As I said in the first paragraph, I want to understand my question with minimal knowledge on topology such as just the definition of open sets, continuous functions and manifolds. Moreover the linked question does not concern my second question.
I am trying to work out the details of following example from page 101 of Tu's An Introduction to Manifolds: Example 9.3. Let $\Gamma$ be the graph of the function $f(x) = \sin(1/x)$ on the interval $]0, 1[$, and let $S$ be the union of $\Gamma$ and the open interval $I=\{(0,y)\in \mathbb{R^2} |−1<y<1\}$. The subset $S$ of $\mathbb{R^2}$ is not a regular submanifold for the following reason: if $p$ is in the interval $I$, then there is no adapted chart containing $p$, since any sufficiently small neighborhood $U$ of $p$ in $\mathbb{R^2}$ intersects $S$ in infinitely many components. Using Tu's definitions, I need to show that given a neighborhood $U$ of $p$, there exists no homeomorphism $\phi$ from $U$ onto an open set of $V \subset\mathbb{R^2}$ with the property that $U \cap S$ is the pre-image with respect to $\phi$ of the $x$ or $y$ axes intersected with $V$. I am not sure where the fact that $U \cap S$ has infinitely many components comes into play. I tried to derive a contradiction using this fact; but even if restrict my attention to connected neighborhoods $U$ of $p$, the intersection of the connected set $\phi(U)$ with the $x$ or $y$ axes might have infinitely many components (I think), so there's no contradiction with the fact that homeomorphism preserves components. I would appreciate any help!
I'm running 1.0.1.83 and keep getting messages to update. Clicking the update link takes me to the App Store, from where I can download the new app, but that still seems to have the version 1.0.1.83 tag, rather than 1.0.1.84. So, I seem to be locked in an update loop rather than being able to use the app. Hopefully this is just affecting me rather than all alpha-testers of the app?
The alpha channel launch page says there is version 1.0.1.84 to install but actually installs 1.0.1.83 resulting in the app asking to update again. Can't use alpha app as result.
I am using the glossary package. I want to include terms in the glossary that are not referred to in the text. That sounds weird, but it's not --- the terms are actually included in a figure, and I don't intend to write about them in the body of the text, but rather refer my reader to the glossary. How can I force the inclusion of a term in the glossary without using the \gls command or otherwise referencing the term in the text. I took a look at the manual but it was not clear to me how to accomplish this even in light of that info. thanks
Is there a command so that the glossary will also display elements without links (an equivalent of \nocite in BibTeX)?
I once read a story about the future! Brain cybernetics were common. If you were "average" you got average brain implants. If you were wealthy you got the latest-and-greatest tech. It was illegal to replace implants (or add new tech) at a later age. One of the characters did so anyway (ended up being hired as a hacker for one of the major leaders in the book). He had a phrase like, "doc, you might as well just close my skull with a zipper 'cause I'll be back" or some such. Kids coming out of hypersleep/cryogenics would turn on their implants, which turned everyone walking around them into NPC characters in their games, and start running around playing games. The book had a strong theme about sanity, mental disorders, and how they were embraced productively rather than shunned socially. I remember an old guy who painstakingly re-drew his tattoos rather than having them permanently inked because it would drive him nuts seeing them go blurry with time (he also overfocused on his work and had to be told to eat, he drank something frothy). The protagonist was a multiple-personality. One of them was, well... randy. (Sorry, I'm a guy, we remember stuff like that.) Getting the multiple personalities to work one-with-another to get the protagonist out of trouble was a key theme in the story. One of the personalities was stark raving mad (considered socially to be a bad thing), but ended up being useful because the madness allowed her to see the dangers lurking in "hyperspace" (I'm not sure that was the word used) so navigators could avoid them. The madness of one of her personalities was critical in saving the ship near the end of the story. At a guess, I read this back in the mid to late 90s.
I'm looking for a story about a youthful (late teens?) female protagonist who begins the story by making an emergency escape from an orbital habitat. The protagonist is actually host to multiple disassociated (as many as seven?) identities, of whom she is initially unaware. They are capable of holding council internally, however. Some of the identities/personalities are more sexual than others, leading to intercourse that only some of the personalities actively consented to. Another spoiler-free notable story piece is a race of aliens who mark their 'naturally present' personalities/identities with a glyph or character on their bodies before venturing into public spaces. FTL in this story must be performed by a non-human pilot, while the remainder of the occupants are either put to sleep or in suspended animation (I don't recall), due to eldritch somethings in the great beyond that will drive human pilots mad. The driving action in the story is the protagonist's flight from corrupt human government groups that brutally experimented on her as a child to deliberately induce disassociated identities in an attempt to yield a viable human FTL pilot. The experiments were in fact successful, and the climactic scene involves the protagonist, now reconciled to her multiple personhood, piloting allies through an FTL jump. I believe it was written in either in the late nineties or early aughts.
One derivation I was verifying holds true if: $$Q^{-1}\left(Q^{-1}+P^{-1}\right)^{-1}P^{-1}=\left(Q+P\right)^{-1}$$ where Q and P are positive definite matrices. I've done some numerical tests and I incline to believe that. But, where does this come from? I could not derive it from .
I need to prove that if $A$, $B$ and $(A + B)$ are invertible then $(A^{-1} + B^{-1})^{-1} = A(A + B)^{-1}B$ I'm a bit lost with this one, I can't find a way to make any assumptions about $(A^{-1} + B^{-1})$, Neither by using $A^{-1}$, $B^{-1}$ and $(A + B)^{-1}$. If someone could clue me in I'll be grateful. UPDATE: Thanks for all of your input - it really helped, I got a solution, I'd like to know if my way of proving it is valid: $(A^{-1} + B^{-1})^{-1} = A(A + B)^{-1}B$ multiplying both sides by $A^{-1}$ and $B^{-1}$ $A^{-1}(A^{-1} + B^{-1})^{-1}B^{-1} = (A+B)^{-1}$ now multiplying both sides by $(A + B)$, I get to $(A+B)(A^{-1}(A^{-1} + B^{-1})^{-1}B^{-1}) = I$ Lets call $(A^{-1}(A^{-1} + B^{-1})^{-1}B^{-1})$ -> $C$ Now I determine that $C$ is $(A+B)^{-1}$, because $(A+B)C$ equals the Identity Matrix. So lastly to verify that I place $C$ in the original equation: $(A^{-1} + B^{-1})^{-1} = A(A^{-1}(A^{-1} + B^{-1})^{-1}B^{-1})B$ and from this I get: $(A^{-1} + B^{-1})^{-1} = (A^{-1} + B^{-1})^{-1}$
Consider the following: \documentclass{article} \setlength\parindent{0pt} \begin{document} content \hfill content \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r} one & two \\ three & four \end{tabular*} content \hfill content \end{document} How can I remove the whitespace at either side of the tabular?
How do you guys go about controlling column padding in tables? Update To clarify, I'm looking for a way to control both vertical and horizontal padding. So, if I had a simple table like in the following code snippet, I could pad the columns and make them look a bit less... ugly. :P \begin{tabular}{|l|l|} \hline column 1 & column 2 \\ \hline I really would like this less & crammed\\ \hline \end{tabular} I tried this by using the command \vspace but it leaves gaps in the vertical lines.
library(lme4) library(merTools) data(sleepstudy) fm1 <- lmer(Reaction ~ Days + (Days|Subject), data=sleepstudy) PI <- predictInterval(merMod = fm1, newdata = sleepstudy, level = 0.95, n.sims = 1000, stat = "median", type="linear.prediction", include.resid.var = TRUE) My question is: is there a rule of thumb of what the value of n.sims should be? EDIT My data contains 20686 rows (i.e. 20686 response variables) and 20 predictors. For such dataset, how many bootstrap samples are required? Is there any plots or papers that I can refer to that explain the number of bootstrap samples as a function of data size?
I wonder if someone knows any general rules of thumb regarding the number of bootstrap samples one should use, based on characteristics of the data (number of observations, etc.) and/or the variables included?
I've seen several documentaries explaining that the diameter of the universe is currently estimated at over 90 billion light-years. And which that - in the face of the age of the universe being about 13.7 billion years - that doesn't contradict the "speed of light" limit, because in the very beginning "space - not matter - could expand faster than light". What does it mean? All I can see is that we can actually visualize galaxies 13.5 billion light-years away from us in every direction (Isn't it?). Therefore 13.5 billion years ago they were up to 27 billion light-years apart from one another, having had "only" 0.2 billion years from big bang to reach those positions ... This is not "space" expanding, this is matter composing galaxies having travelled much faster than light! Moreover, they all keep saying that - in peering at galaxies 13.5 billion light-years away from us - we are close to looking at the "beginnings of the universe". But if the Big Bang was 13.7 billion years ago, we (the matter now building up our planet) were together with them (the matter composing those far away galaxies) just 0.2 billion years before ... How can we see light coming from so far away from us, emitted by objects which were together with us "just a little while" before?
I was reading through the Wikipedia article on and came across the fact that the most distant Quasar is 29 Billion Light years. This is what the exactly says The highest redshift quasar known (as of June 2011[update]) is ULAS-J1120+0641, with a redshift of 7.085, which corresponds to a proper distance of approximately 29 billion light-years from Earth. Now I come to understand that the singularity is believed to be around 13.8 Billion years ago. So how is this possible? Does the presence of such a quasar negate the Big Bang Theory? I'm not a student of Physics and was reading this out of (whimsical) curiosity. Is there something I'm missing here or the "proper distance" mentioned in the fact is a concept that explains this? Edit: My Bad! Here's how.. A simple google search led me to which says the farthest quasar found is 12.9 billion LYs and not 29 billion. So in the end we have just proven that wikipedia needs more moderation.
Hi I am trying to update a label in my WPF GUI from another class, which is not the GUI with this code: System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke(new Action(() => { ((MainWindow)System.Windows.Application.Current.MainWindow) .lblError.Content = exception.Message; })); Sometimes however I get the following exception and the update does not work: Exception thrown: 'System.InvalidOperationException' in WindowsBase.dll (" The calling thread can not access this object because the object is owned by another thread .") Why does my delegate not work? Is there an easy way to do what I want to do (update a label of my GUI from another class) without too much effort?
Which is the simplest way to update a Label from another Thread? I have a Form running on thread1, and from that I'm starting another thread (thread2). While thread2 is processing some files I would like to update a Label on the Form with the current status of thread2's work. How could I do that?
i try to get name by id. I have this model. public class Category() { public int Id { get; set; } public string Name { get; set; } public int ParentId { get; set; } } I want to see the id, the category name, and the subcategory name relative to parentId in the view, but I don't know how to do it.
I have a List<int> and a List<customObject>. The customObject class has an ID property. How can I get a List<customObject> containing only the objects where the ID property is in the List<int> using LINQ? Edit: I accepted Konrads answer because it is easier/more intuitive to read.
Let $a,b,c$ be integers such that $\gcd(a,6)=3=\gcd(b,6)$. Show that $\gcd(a+b,6)=6$. Attempt: Let $d = \gcd(a+b,6)$. Then, by definition, $d \mid (a+b)$ and $d \mid 6$. It means that $d=1,2,3$ or $6$. On the other hand, we have $3\mid a$ and $3 \mid b$. Write $a = 3m$ and $b=3n$ for some integers $m$ and $n$. Then, $a+b=3m+3n=3(m+n)$ and so $3 \mid (a+b)$. But, $d \mid (a+b)$. Now, $a+b = dp$ for some integer $p$. Thus, we have $3 \mid dp$ which means $3 \mid d$ or $3 \mid p$. If $3 \mid d$, then $d=3k$ for some integer $k$. Hence, $d$ is either $3$ or $6$. But, how to get $d=6$?
I was working my way through some number theoretic proofs and being a newbie am stuck on this problem : If $(x, 4) = 2$ and $(y, 4) =2$, then $(x + y, 4) = 4$, where $(a,b)$ denotes the greatest common divisor of $a$ and $b$. My Solution (Incorrect) $x-4 = 2t$ $y-4 = 2p$ $x + y - 8 = 2(t+p) \Rightarrow x + y - 4 = 2f + 4 = 2(f+2)\Rightarrow 2$ divides $(x+y , 4)$ My Question: My solution is definitely inadequate. Can someone help me out?
Light which reflects off a diffuse reflector is scattered preferentially in certain directions, as can be seen in the following image: Why isn't light scattered uniformly in every direction by a diffuse reflector?
Lambert's Cosine Law for Lambertian Reflectors states that the radiant intensity $I$ (watts per square meter per steradian) of reflected light as a function of the angle $\theta$ from the normal to the surface of the reflector is $I(\theta)=I\cos\theta$. Because of this law, uniformly-lit diffusely-reflecting planar surfaces (which approximate perfect Lambertian Reflectors) also appear uniformly-lit to an observer, which is to say that the radiant intensity of light reaching the observer from such a planar surface is constant no matter where on the surface the observer looks. So far so good. There is, however, a deep mystery lurking beneath this simple principle, because it would seem that it would be far more parsimonious for the radiant intensity of light reflected by a Lambertian Reflector to be constant for all $\theta$ (i.e. have no angular dependence) at the "cost" of having the observer perceive an angular dependence to the radiant intensity of light reflected by a uniformly-lit planar Lambertian Reflector. Why is the observer "privileged" in such a manner by Lambert's Cosine Law?
I was searching and I didn't find any help or description of the topic. Specifically I was searching the differences of Super User and Unix & Linux. Where is the information of the topics of each Q&A site?
What's the difference between , , and ? In general, what's a rule for deciding where to post a question when I have one (which might apply to any of those 3)? If I'm having a problem with Linux Mint, which seems likely to be the same in Ubuntu, is it appropriate to post it on Ask Ubuntu?
The following LaTeX code produces a table with one row and three columns. Each cell contains two short words word-wrapped so that one name is above the other. A design requirement of this table is the ability to force a word-wrap on a short sentence and control cell padding. \documentclass[twoside]{report} \usepackage{array} \newcolumntype{M}{>{\centering\let\newline\\\arraybackslash\hspace{2pt}}m{1cm}} \makeatletter \begin{document} \begin{tabular}{|M|M|M|} \hline Sue Tim & Sam Jake & Eddy John \\[3ex] \hline \end{tabular} \end{document} This code will produce the following output: The problem here is that the last cell is not vertically centered like the other two cells. Vertical padding is controlled by \\[3ex] on line 8 while horizontal padding is controlled by m{1cm} on line 3. How can I modify this code so that the last cell looks like the first two cells?
Unfortunatly, I have a problem with m-columns (array package) in tables with adjusted row height. Somehow in the last column (only there) the text is not centered vertically. Check it out: \documentclass{article} \usepackage{array} \begin{document} \begin{tabular}{|m{0.18cm}|m{0.18cm}|m{0.18cm}|} \hline a & b & c \\[2ex] \hline 0 & 0 & 0 \\ \hline \end{tabular} \end{document}
I'm creating a html website using HTML, PHP and MySQL but on HTML appears some a diamond icon on characters with accent. There is some prints to help you out. I set this meta too: <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> HTML Page: PHPMyAdmin: PS.: This question is not a replication of other question! If it is please tell me the link because I searched the same question and nothing found!!!
I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur? This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.
I was wondering if there were a way in python to loop through a list and check if a list element was of a certain type. Something like this in incorrect pseudo code. listt = ['3109', datetime.timedelta(0, 240), datetime.timedelta(0, 60), '2411', datetime.timedelta(0, 2160), '3109'] for i in listt: if type(i) is class.__str__: print('success') Is it possible to check for type like this? Also, I found myself unable to iterate through a list with timedelta objects so I've had to except a TypeError every time I encounter one. That is not shown in this code. I appreciate any help. Thanks
How do I see the type of a variable whether it is unsigned 32 bit, signed 16 bit, etc.? How do I view it?
I use my TV monitor to stream video while I'm working on my computer screen. My computer is about to crap out. Do I need to purchase a dual video card in order to make this work or will just one video input and one HDMI port be enough to run them at the same time? I don't care if they show the same or separate images...I can always work split screen, I just need to be able to SEE them both at the same time.
I am researching on hardware requirements for my new PC. One of my requirements is to have dual monitor display to use while programming. I understand that most integrated graphics cards do not support dual monitors (?), and I will need a standalone graphics card for this. But I also want a quiet PC, and graphics cards can be quite noisy. I am not a gamer, and other than dual monitors, I don't anticipate much need for a dedicated graphics card (though an added boost to UIs would be a nice to have). What should I look for in a low-end, relatively silent and less power-hungry graphics card for my purpose? How do I calculate how much memory it should have? What should I look for in terms of output ports? (I am intending to use two 22 or 21 inch 1080p monitors - an area I need to research into as well). I will be running Windows 8.1.
Sometimes, either because of a memory leak or the computationally-intensive nature of a program, applications can start to slow down and ultimately freeze the whole system by claiming too much RAM or CPU time (or at least I think that's what's happening - please enlighten me if it's more complicated). I was wondering if it was possible to ringfence a certain amount of RAM or 'CPU time' for use purely by important system applications (basically anything not explicitly started by me - including the desktop environment) so that a greedy application can't freeze the whole system. If it is possible, I'd also be curious as to why Ubuntu doesn't do it by default.
I have a process for an application which needs to run, but ends up using far too much IO usage for what it does. And really crashes my computer, making it impossible to do anything else whilst it is running. So I was wondering if there is a way to limit IO usage, RAM and CPU for a given process? And its sub-processes of course. This is on my Ubuntu 18.04 LTS system.
Here I state and try to answer three variations of the twin paradox 1) "Classical" problem, no acceleration, no turn around Consider the case where there's a stationary planet, and a moving spaceship moving at close to the speed of light, starting at the left going right at constant velocity. Now imagine at some instant, two beings spawn on earth and in the spaceship. They are both aged 0 at that point. Now as the spaceship continues, both frames remain inertial. Which twin is older at any given point? According to one of the answers here (the 4th answer down to be exact): , there is no solution to this paradox. Either A or B will be older depending on who you ask (person A or B or anyone else). Is this problem reasonable and is the "solution" correct? 2) Normal problem, no acceleration, yes turn around Everyone knows this one; the paradox is resolved because the person traveling changes direction. . Been there, done that. 3) Weird problem, no acceleration, no turn around, curved universe? Now I was thinking, "what if I combine the two?". Imagine the earth is like an asteroids game, or it's a sphere/torus. Going in a certain direction for long enough means that I eventually end up where I started. Consider the case I stated in (1), where two beings aged 0 appear on the earth and on the spaceship. The spaceship proceeds to go at a constant velocity to the right, never changing direction, never under any gravitational field, but due to the nature of the universe they are in, the spaceship twin ends up reaching the earth again. Now at this point, who is older? The solution for (2) won't work because there's no turning point, right? In the link I provided: You do this by just putting a sheet above the one you started with (or to the side, if moving in that direction). Nothing wrong with that, and no edges to worry about crossing. The trick is though, when the traveler gets to this new point, you yell "surprise" and identify the new point with the point in the original sheet using the symmetry of the torus. So the poor sap thinks they're getting away from their twin, only for you to change the nice new spot they picked out for themselves to the place they started from. It's a mathematical sleight-of-hand, but it is the easiest way to see exactly who is younger in the Twin Paradox on the torus. And my question that I don't feel like the other question sufficiently addresses: A specification question: I don't quite see how this particular "mathematical sleight of hand" makes it so that the moving twin is aging less. Sorry if I'm being slow, but could anyone explain that part more thoroughly? I still don't see how even in an inertial constant-velocity frames one twin is aging slower. Feel free to tell me that this problem is nonsensical and stupid--I'm a complete noob so there is a high chance that I have no idea what I'm talking about (please tell me if that's the case)
I'm reading about the twin paradox in special relativity - if there are two identical twins, one of whom who sets off in a high speed rocket to a planet, and then heads back, will find the twin who remained on Earth to have aged comparatively more due to time dilation. However, from the perspective of the travelling twin, it was the Earth that was moving and so the Earth twin should be the younger one. The 'paradox' can be resolved by realising that the travelling twin does not remain in an inertial frame for all time, since he has to turn around at the planet and hence accelerate. Now, there are three possible curvatures the universe could have - positive, negative, or flat. As far as I'm aware, we're quite sure it's flat. However, if it was positive, does this mean that the travelling twin, if he travelled long enough, would loop back to Earth eventually? And therefore he would be able to return to Earth without having changed inertial reference frame, and then we would actually have a paradox? I'm thinking perhaps that travelling through curved space itself constitutes acceleration, since in a way you're changing direction? In which case the travelling twin wouldn't remain in an inertial reference frame and we could solve the 'paradox' as before?
import numpy as np a = np.arange(36) print a.shape (36,) a = a.reshape(3,*(3,4)) print a.shape (3,3,4) Firstly, I think *(3,4) may be a parameter. So I help(np.reshape). a : array_like Array to be reshaped. newshape : int or tuple of ints The new shape should be compatible with the original shape. If an integer, then the result will be a 1-D array of that length. One shape dimension can be -1. In this case, the value is inferred from the length of the array and remaining dimensions. order : {'C', 'F', 'A'}, optional Read the elements of `a` using this index order, and place the elements into the reshaped array using this index order. 'C' means to read / write the elements using C-like index order, with the last axis index changing fastest, back to the first axis index changing slowest. 'F' means to read / write the elements using Fortran-like index order, with the first index changing fastest, and the last index changing slowest. Note that the 'C' and 'F' options take no account of the memory layout of the underlying array, and only refer to the order of indexing. 'A' means to read / write the elements in Fortran-like index order if `a` is Fortran *contiguous* in memory, C-like order otherwise. I can not find the correct parameter which can match *(3,4).So how can I comprehend the usage of *(3,4) in this way?
In the following method definitions, what does the * and ** do for param2? def foo(param1, *param2): def bar(param1, **param2):
I modified /etc/resolv.conf to configure DNS for my VPN. Now I would like to modify it again but I can't. The operation is not permitted even if I use sudo nano /etc/resolv.conf I tried to start in recovery mode but I have the same problem. How can I restore this file?
Is /etc/resolv.conf useless in (Precise Pangolin)? I see that the DNS server information is stored in now. The nmcli command line tool can list that for you. If I want to add one more server, will adding it to /etc/resolv.conf by using the resolvconf package help?
I created this program to run infinite times asking the user to enter a choice(rock or paper or scissor), which seems to work fine. The problem is no else ....if or if ....else statements are satisfied. Whatever input i give it just prints out the else statement in the else statement, (Enter a valid choice). I cant find the mistake i made so ill link my code below..... Thanks in advance. import java.util.Scanner; import java.util.Random; public class apples { public static void main(String args[]){ Scanner input = new Scanner(System.in); Random number = new Random(); String rps[] = {"rock", "paper", "scissor"}; String player; String ai; int rand, pscore=0, aiscore=0; while(1 < 2){ System.out.println("Take your pick \nrock \npaper \nscissor"); player = input.nextLine(); rand = number.nextInt(3); ai = rps[rand]; System.out.println(ai); if(player == ai){ pscore+=0; aiscore+=0; System.out.println("Your opponent chose " + ai + "\tYour score= "+ pscore + "\tOpponents score = "+aiscore); System.out.print("\n"); continue; }else{ if(player == "rock" && ai == "paper"){ aiscore+=1; pscore+=0; System.out.println("Your opponent chose " + ai + "\tYour score= "+ pscore + "\tOpponents score = "+aiscore); System.out.print("\n"); continue; }else if(player == "rock" && ai == "scissor"){ pscore+=1; aiscore+=0; System.out.println("Your opponent chose " + ai + "\tYour score= "+ pscore + "\tOpponents score = "+aiscore); System.out.print("\n"); continue; }else if(player == "paper" && ai == "rock"){ pscore+=1; aiscore+=0; System.out.println("Your opponent chose " + ai + "\tYour score= "+ pscore + "\tOpponents score = "+aiscore); System.out.print("\n"); continue; }else if(player == "paper" && ai == "scissor"){ aiscore+=1; pscore+=0; System.out.println("Your opponent chose " + ai + "\tYour score= "+ pscore + "\tOpponents score = "+aiscore); System.out.print("\n"); continue; }else if(player == "scissor" && ai == "rock"){ aiscore+=1; pscore+=0; System.out.println("Your opponent chose " + ai + "\tYour score= "+ pscore + "\tOpponents score = "+aiscore); System.out.print("\n"); continue; }else if(player == "scissor" && ai == "paper"){ aiscore+=0; pscore+=1; System.out.println("Your opponent chose " + ai + "\tYour score= "+ pscore + "\tOpponents score = "+aiscore); System.out.print("\n"); continue; }else{ System.out.println("Enter a valid choice"); System.out.print("\n"); continue; } } } } }
I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference?
I have some USD bills of 2003-2006. The money changers in India do not accept them. Some accept but offer the exchange at 10% discount than the quoted rate. Are the bills legal tender. I also have smaller denomination bills of 2009-2-13. What about their validity?
I received from my Dad 150 American Dollars about 12 years ago. I never have thought to change this money but a few days I tried change it in a currency exchange in Sydney and the guy didn't change it because the series are old. What do I have to do to change this money?
Hi I think I see a lot of people having knowledge in depth in field of computer science. My question is in python3, is there a way to check if an input statement or a string value is a float? I am expecting something like str.isfloat() Thank you for taking a look for this poor student :)
What is the best possible way to check if a string can be represented as a number in Python? The function I currently have right now is: def is_number(s): try: float(s) return True except ValueError: return False Which, not only is ugly and slow, seems clunky. However I haven't found a better method because calling float in the main function is even worse.
Let $\gamma$ be a continuously differentiable closed curve in the complex plane with parameter interval $[a,b]$, and assume that $\gamma (t) \ne 0$ for all $ t \in [a,b]$. Define the index of $\gamma$ to be $$\text{Ind} (\gamma) = \frac{1}{2\pi i}\int_{a}^{b} \frac{\gamma'(t)}{\gamma (t)} dt$$ Prove that this is always an integer. In the hint it's mentioned there is a function $\phi$ on $[a,b]$ with $\phi ' =\frac{\gamma'}{\gamma}$ and $\phi(a)=0$. I can understand that the primitive of $\frac{\gamma'}{\gamma}$ exists since it is continuous and integrable but cannot understand why $\phi(a)=0$ which plays a vital role in the proof.
Let $f$ be holomorphic in an open $\Omega \subset \mathbb{C}$ and $\gamma$ a closed curve in $\text{int}(\Omega)$, along which $f$ is never zero. Are these hypotheses enough to claim $\frac{1}{2\pi i}\int_{\gamma}\frac{f'(z)}{f(z)}dz$ is an integer? If not, what are the necessary and sufficient conditions for that? I can prove that's an integer for some particular cases, for example when $\Omega$ is convex and $\gamma$ is a circle. But I've seen people claming this in many other contexts, like when $\Omega$ is an annulus around $0$ and $\gamma $ is an arbitrary curve inside it. This isn't obvious to me at all. Thanks!
I bought a used 3DS XL off Craigslist and the person had 3 digital copy games on the system when he sold it to me. He said I should be able to redownload at least 2 of them that he was pretty sure of when I reset it and set up my own account on it. However, since doing the system reset and getting a NNID set up for myself they are not listed in redownload-able software. I contacted Nintendo support via chat line and they said that there was noting that can be done because the games still belong to the previous owner still. Is there ANY way to get around this? I have contacted the person I bought it from & they said they would try to find their NNID stuff and I just haven't heard from them yet. They were both great games & really want them back since they were included in the total price I paid for the system & all its stuff that came with.
December 2014 I decided to buy a Nintendo 3DS XL off of eBay, and found one with hard copies of games, and Ocarina of Time 3D installed onto the device, so when it arrived at first I was super happy as I had these games, but soon realized that I wanted to make the 3DS my own, by factory resetting it so I can create my own profile and change the settings to my choosing. However, I was told that by doing this it will delete the system installed games, as a game is linked with the previous owner's account or something. So long story short, I want to know if there is a way to keep these games after a factory reset. If there isn't a way then I wasted money on a game that I can't even keep. Update - January 2015 I decided to perform a factory reset on my 3DS as I wanted a new NNID more than I wanted the downloaded games. I removed the SD card and began the process. After I did this I fully expected for the titles to no longer be on my 3DS. So I set it up, and they weren't there. No surprise there. But, I made an account on e-shop, and decided to check on the re-downloadable software thing, just in case the games happened to be there. AND THEY WERE! I downloaded them and they work perfectly fine! I have no idea how this happened! So so shocked, but happy. Can anyone explain why this happened? As the games should have been linked to the previous owner's NNID, so how did I get them back when I made my own NNID on a factory reset console?
After the death of Pain, the fake Madara fights Konan to know the location of Pain's body...During this he mentions that the Rinnegan is his and he wants it back...I couldn't understand this.. Was Pain born with Rinnegan or was it implanted by fake Madara?
How was it exactly that Nagato came upon his Rinnegan? Madara states that it was his, and that he gave it to him: how did he do that? Did he transplant it into Nagato, or did he transfer it otherwise? Note: I do not recall whether this was explained in the manga or not.
I have a Google Sheet that has its data pulled in from another sheet. The destination sheet has text that is formatted (not conditional formatting) - for example the headings are one colour text and the notes are another. This formatting is obviously done on the destination sheet as I cant get formatting to pull through from the original. However when ever additional data is added or removed on the original sheet and therefore updated on this sheet, the text colour all changes - so it stays in the original cell and isn't specific to the text. Is there any easy to fix to this?
I am importing a certain range of data from a master sheet and would like to maintain the formatting for those cells. It seems as though this only works within a sheet: . This would be the perfect option, except I am unsure how I can reference the master sheet's key.
To begin with I am new in Ubuntu and I am trying to install Ubuntu 14.04 to my PC. I have a Sony Vaio VPCF24P1E. I have read many questions and answers about the same topic and I still cannot find a solution. The steps I tried are: Install Ubuntu to a USB -->Done // Create an undefined partition of my HD -->Done // Turn off fast boot in Windows 8 -->Done // Turn off secure boot --> <> I tried to disable secure boot in bios but no choice of doing that was found. Then i tried from windows after Advanced Restart but there was no choice (tile for that wasnt there) for UEFI Firmware Settings. I am out of solutions... so any help would be appreciated.
I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS. Should I do it with Wubi, or through the Live USB/DVD? What steps do I need to take to correctly install Ubuntu?
I am trying to use Child to Parent Relationship queries, but the ! doesn't cover the parent record's accessibility. Say I am owning a Contact, but I don't have access to its parent record 'Account'. Does this relationship query give access to the parent record 'Account' by passing the security layer?
A->B are two objects connected using lookup relationships. If somehow, I get read only access to child record but do not have access on parent record then still i am able to see data from parent record through formula fields. Similarly will SOQL in Apex also allow me to fetch fields from parent record regardless of using 'WITH Sharing ' keyword at class level?
I defined a class group property with some props inside and did the register and unregister with a pointer, but in the main body of the script how do you access the properties inside the group property? Note: I can define a scene property and modify the value but cannot do it with a property from the group property. Any add-on example showing how to do this would be nice too!
I was watching this on making a custom UI tab using Python, and in the line from bpy.types import Menu, Panel, UIList, I see the names of objects that look like they can all be used to make different UI elements. Does bpy.types contain all the objects that people use when they want to make custom UI elements?
I have tried to find a download for mod loader but no one seems to have it. I've had no luck finding a download or following video tutorials to help. I want to get the Explosives+ mod so would be grateful if someone could provide a link to a compatible modloader.
I'm having a really, really hard time figuring out how to install mods on Minecraft. I've looked everywhere I can think of for help but the information is almost always outdated or unhelpful. I've seen on several sites about the use of something called Forge. The Mod I want to use requires 1.6.4 Forge and I have both Forge and the Mod folders sitting in my downloads folder. I haven't installed any kind of mods for any game prior to this and I have little clue to the technical side of Minecraft, so please keep this in mind when you give me an answer please! Things that might help you figure out how to help me: I want to play this mod and am using the 1.6.4 Forge given on a link that website gives
function onEdit(event) { var timezone = "GMT-7"; var timestamp_format = "MM-dd-yyyy-hh:mm"; // Timestamp Format. var updateColName = "Ext Warehouse"; var timeStampColName = "Date/Time Change"; var sheet = event.source.getSheetByName('EXT Changes'); //Name of the sheet where you want to run this script. var actRng = event.source.getActiveRange(); var editColumn = actRng.getColumn(); var index = actRng.getRowIndex(); var headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues(); var dateCol = headers[0].indexOf(timeStampColName); var updateCol = headers[0].indexOf(updateColName); updateCol = updateCol+1; if (dateCol > -1 && index > 1 && editColumn == updateCol) { // only timestamp if 'Last Updated' header exists, but not in the header row itself! var cell = sheet.getRange(index, dateCol + 1); var date = Utilities.formatDate(new Date(), timezone, timestamp_format); cell.setValue(date); } } And this one: function onEdit(event) { var timezone = "GMT-7"; var timestamp_format = "MM-dd-yyyy-hh:mm"; // Timestamp Format. var updateColName = "Completed"; var timeStampColName = "Date/Time Completed"; var sheet = event.source.getSheetByName('EXT Changes'); //Name of the sheet where you want to run this script. var actRng = event.source.getActiveRange(); var editColumn = actRng.getColumn(); var index = actRng.getRowIndex(); var headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues(); var dateCol = headers[0].indexOf(timeStampColName); var updateCol = headers[0].indexOf(updateColName); updateCol = updateCol+1; if (dateCol > -1 && index > 1 && editColumn == updateCol) { // only timestamp if 'Last Updated' header exists, but not in the header row itself! var cell = sheet.getRange(index, dateCol + 1); var date = Utilities.formatDate(new Date(), timezone, timestamp_format); cell.setValue(date); } }
I am trying to run all three of these in any order but only the third runs: 1. function onEdit(){ var sh = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); var editedCell = sh.getActiveRange().getColumnIndex(); if(editedCell == 10) { var range = sh.getRange("A:O"); range.sort([{column: 1}, {column: 14, ascending: true}, {column: 5, ascending: false}]); } } 2. function onEdit() { var sheetName = "PRE-APPRAISAL"; var s = SpreadsheetApp.getActiveSheet(); if (s.getName() !== sheetName) return; var r = s.getActiveCell(); if( r.getColumn() != 'J' ) { //checks the column var row = r.getRow(); var time = new Date(); time = Utilities.formatDate(time, "GMT-08:00", "MM/dd/yy, hh:mm"); SpreadsheetApp.getActiveSheet().getRange('H' + row.toString()).setValue(time);} } 3. function onEdit() { var sheetName = "POST-APPRAISAL"; var s = SpreadsheetApp.getActiveSheet(); if (s.getName() !== sheetName) return; var r = s.getActiveCell(); if( r.getColumn() != 'J' ) { //checks the column var row = r.getRow(); var time = new Date(); time = Utilities.formatDate(time, "GMT-08:00", "MM/dd/yy, hh:mm"); SpreadsheetApp.getActiveSheet().getRange('H' + row.toString()).setValue(time);} }
I was playing on my phone but my phone suddenly got reformatted. I cannot load my village as outlined in the answer to because I was not connected to Google while playing, I was connected using my Facebook account instead. Is there any way I can get it back?
I unintentionally and stupidly wiped my Clash of Clans game data. I went to Application Manager on my Android and clicked 'Clear data'. (I used this for fixes before and it never started a new game.) Now, my level 60 or so base has been wiped as if was to start a new game. Have I doomed myself to starting again or is there a way in which I can retrieve my old game save? Maybe by contacting Supercell? I have a snapshot of my base.
I came across the following sentence on an English website for ESL students. Since/Because she stopped eating chocolate last week, she's eating more fruit! They asked to choose between the two words Since and Because. It turned out that the right word was Because, but I'm not sure of that because, for me, the meaning of sentence is not clear enough. I expressed my doub in a comment, then they replied: "She's stopped eating chocolate because it contains too much sugar, and has started to eat more fruit because it's just as sweet, tasty, and healthier. It's possible!" Yes, it's possible, but one might stop eating chocolate for more than one reason. I mean, there is not any logical reason to link "stop eating chocolate" with "eating more fruit". Since might be just as correct and consistent. Moreover, Since may refer to time and make the sentence clearer and more logical to me. I hope I have been clear.
Is there any difference between since and because? Example: Bob gave him a candy because he was nice. Bob gave him a candy since he was nice. Note: If someone has a better example, please post it in the comments
Should I choose to install ubuntu on a virtual machine? Because I am using windows 10
I would like to set-up a PC to run ubuntu most of the time, but also need to run XP for specific applications and testing. In the past I would have simply set up a dual boot machine and then restart and boot into windows XP as needed. However since the machine has multiple cores and significant memory, I think I can use Virtual Box, Xen, or VMWare hypervisors. I am thinking of making Ubuntu the "host" VM and having XP as a guest VM. This would be especially nice for testing/debug/development since it is possible to run applications in both OS's simultaneously. I've never setup a virtual machine before and think that by asking the questions below I can avoid some trial-and-error. Basically, I need to decide if a dual boot or VM setup is more appropriate for what I want to do. Here's my questions: I do not always need to have XP running. Do the hypervisors allow me to shut the guest VM down so that the host VM can then immediately use all memory and processor resources? When I then bring up the guest VM, is it easy to provision how much memory and other resources are used by it? Ideally, I'd like to pre-configure this in advance and then toggle the guest VM off/on without thinking about it. Is it possible or advisable to have the host OS be 64bit and the guest OS be 32bit? Alternatively, if both VM's are 32 bit and I have 8G of RAM, can the hypervisor provision each VM with 4G of RAM when they are running simultaneously? Which hypervisors are best for set-ups such as I described?
Let $F$ be a finite extension of the finite field $K$ and $\alpha \in F$. The mapping $L: \beta \in F \mapsto \alpha \beta \in F$ is a linear transformation of $F$, considered as a vector space over $K$. Prove that the characteristic polynomial $g(x)$ of alpha over $K$ is equal to the characteristic polynomial of the linear transformation $T$; that is $g(x) = det(xI - L)$, where $I$ is the identity transform.
This is problem 31b) from Dummit and Foote chapter 14.2. I am looking for a hint on how to attack the problem, since I have been thinking about it for a couple of hours but I don't even know where to start. The problem says: Let $K$ be a finite extension of $F$ of degree $n$. Let $\alpha$ be an element of $K$. Prove that the minimal polynomial for $\alpha$ over $F$ is the same as the minimal polynomial for the linear transformation $T_{\alpha}$. In this problem, $T_{\alpha}$ is an $F$-linear transformation of $K$ that arises from $\alpha$ acting by left multiplication on $K$. I appreciate any helpful suggestions on how to start attacking the problem or any possible hint. Thanks!
My students (and some younger colleagues) are increasingly stating (verbal) and writing phrases as such: "The operating system needed updated." or "The application needs fixed." I was of the understanding that the phrase 'to be' was required between the words needs or needed and the following verb.
I'm from Central Pennsylvania, and apparently, we have a strange language construct in this area. I was recently talking about how "my car needs washed" to a friend from NJ, and she told me that my sentence was grammatically incorrect. I realize she's right, and I realize my options are "my car needs to be washed" or "my car needs washing". But I'm not clear on the precise rule being invoked.
I use the Dvorak keyboard layout. When I switch to a guest session it defaults to the Dvorak layout as well. Unfortunately this only produces gibberish for most people typing. Is there a way to set the default guest session keyboard layout?
First, my ultimate goal is the same as in . I am a Dvorak user, but I want QWERTY, not Dvorak, to be the default keyboard layout in a guest session. If you know a direct answer to that instead of to the question below, that will also be appreciated. I can change the keyboard layout to QWERTY with setxkbmap -layout us. Some googling tells me that if I create a shell script /etc/guest-session/prefs.sh, it will be run when the guest session starts. So I created a prefs.sh file containing just that command: setxkbmap -layout us What I expected to happen was to be able to run a guest session and automatically have the keyboard layout set to QWERTY. What actually happened was that when I tried running a guest session, it simply failed and brought me back to the login screen. I must be misunderstanding something, but I don't know what. Any ideas? If relevant: I'm using Ubuntu 12.04.
Japan, Turkey, and Poland will each be facing a United States even more confident than it was after the second fall of the Soviet Union. Source: The Next 100 Years by George Friedman I used to see a definite article - "the" with "United States". Even more peculiar it makes that fact that "States" is a plural noun and plural nouns don't take an "a" article.
From The Imitation Game (2014), more spefically, from a WW2-era newsreel snippet inserted into the movie to keep the viewer up to date with the events: "The German Army has fanned out across Europe, From Poland to Serbia, Lithuania to Denmark, Norway to France. The Nazi flag now flies from more than two dozen national capitals. Their campaign mounts in fury as a free Europe crumbles". (The newsreel is in an "old newscaster voice", clearly framed as contemporary with the events; there is some black-and-white historical footage being shown while this voice pronounces the words.) Why a free Europe and not the free Europe? Everybody knew what the word Europe meant, and everybody knew what the free Europe was: it was the part of Europe not under the Nazi rule. Why introduce it all over again with the indefinite article? I feel that the indefinite article might be okay here, but I would like to be able to explain this usage to someone else. Maybe we could read the sentence as a shortening of Their campaign mounts in fury as the part of Europe that is a free Europe crumbles. ("partitive use" of the indefinite article?)
I'm trying to import a python file to my application which is written in python. I have the following code: import os from os.path import basename class specificClass: def dothing(self,path): runcommand = __import__("/root/"+ os.path.splitext(os.path.basename(path))[0]+ "/" + os.path.splitext(os.path.basename(path))[0] +"/sa/update.py") runcommand.main() When I run it, it gives me the following error: ImportError: Import by filename is not supported.
How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option.
I have this code... public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment final RelationShipAdapter adapter = null; lvRelationShipAllUser.setOnItemClickListener(new AdapterView.OnItemClickListener(){ @Override public void onItemClick(AdapterView<?> parent, View view, int i, long l) { int test = i; connectOrDisconnectUser(test); } }); lvRelationShipAllUser = (ListView) getView().findViewById(R.id.lvRelationShip); lvRelationShipAllUser.setAdapter(adapter); //context = BlankFragment.this; return inflater.inflate(R.layout.relationship, container, false); } The error says: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setOnItemClickListener(android.widget.AdapterView$OnItemClickListener)' on a null object reference On this line: lvRelationShipAllUser.setOnItemClickListener(new AdapterView.OnItemClickListener(){ Whats the issue....? When it's in this own class (No Fragments) there is no issue.
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?
Thats my json string or part of it: "/Date(1423232459000)/" I do var date= $.parseJSON(item.createdAt); but an error is thrown in the console: Uncaught SyntaxError: Unexpected token / How can I fix that or read the date?
I'm taking my first crack at with jQuery. I'm getting my data onto my page, but I'm having some trouble with the JSON data that is returned for Date data types. Basically, I'm getting a string back that looks like this: /Date(1224043200000)/ From someone totally new to JSON - How do I format this to a short date format? Should this be handled somewhere in the jQuery code? I've tried the jQuery.UI.datepicker plugin using $.datepicker.formatDate() without any success. FYI: Here's the solution I came up with using a combination of the answers here: function getMismatch(id) { $.getJSON("Main.aspx?Callback=GetMismatch", { MismatchId: id }, function (result) { $("#AuthMerchId").text(result.AuthorizationMerchantId); $("#SttlMerchId").text(result.SettlementMerchantId); $("#CreateDate").text(formatJSONDate(Date(result.AppendDts))); $("#ExpireDate").text(formatJSONDate(Date(result.ExpiresDts))); $("#LastUpdate").text(formatJSONDate(Date(result.LastUpdateDts))); $("#LastUpdatedBy").text(result.LastUpdateNt); $("#ProcessIn").text(result.ProcessIn); } ); return false; } function formatJSONDate(jsonDate) { var newDate = dateFormat(jsonDate, "mm/dd/yyyy"); return newDate; } This solution got my object from the callback method and displayed the dates on the page properly using the date format library.
I edited a post which was in need to have the code formatting fix, and at the same time the post's author fixed what I was fixing before I hit the Save Edits button! Now my edit, which there is no need for, is in pending review. So how can I remove suggested edit in pending review?
Edits made by users who do not have edit privileges are placed in a queue until it is peer reviewed. E.g., I edited someone else's answer. but changed my mind. If I'd edited my own question/answer, there would be a "Rollback" button, but there's no such button in the scenario I'm describing (at least none that I can see). This is more relevant today because users can only have at most five edits waiting in the queue, and allowing one to cancel an edit would permit them to free up one of their five pending edits for something else. Is there a way to remove one's edit from the peer review queue?
I would like to ask you about your opinions how to utilize two SSD disks on webserver.. I read many articles about raid, disk mounting, lvm, disk cache, etc. but still I am not sure how to decide which solution would be best for future using & utilization.. (I don't need do custom backups because of scheduled backups on provider side) See below for a brief description of the server. Thanks in advance for tips Are there also any other options than RAID? There are any benefits of using SSD disk as cache storage on fully SSD server? 2 threads Xeon 1.70 GHz 8GB RAM 2× 60GB SSD Automatic internal + external backups Snapshots SW - Debian 8, Apache, MariaDB, ISPConfig Edit: Server is VPS
This is a about RAID levels. What are: the RAID levels typically used (including the RAID-Z family)? deployments are they commonly found in? benefits and pitfalls of each?
My java class has 2 private methods, method1 and method2. method1 invokes method2. How can I test method1 at the same time mocking method2 using any of the java testing frameworks? Edited question: I am using this syntax to invoke a private method: Whitebox.invokeMethod(myClass, "myPrivateMethod","myParameter"); "myPrivateMethod" invokes another private method: "anotherPrivateMethod". I would like to mock "anotherPrivateMethod". I usually do this using syntax: PowerMockito.doReturn("mockedResponse").when(myClass, "anotherPrivateMethod", "anyParameter"); The combination above does not seem to work. Basically, when I first use PowerMockito to mock "anotherPrivateMethod" and use Whitebox to invoke the "myPrivateMethod", the mock is not working. I am not getting "mockedResponse" but instead the actual "anotherPrivateMethod" is getting invoked. What am I doing wrong?
How do I unit test (using xUnit) a class that has internal private methods, fields or nested classes? Or a function that is made private by having (static in C/C++) or is in a private () namespace? It seems bad to change the access modifier for a method or function just to be able to run a test.
As I was studying linear algebra from various books I came to know about Cayley -Hamilton theorem. It states that: An $n×n$ matrix satisfies it's own characteristic equation. I see in various books that they have given a big proof for this. But this seems quite obvious to me. Because characteristic equation of an $n×n$ matrix A is given by: $det(xI_n-A)=0$, where $I_n$ is the $n×n$ identity matrix. If we put $x=A$ in the lhs of the characteristic equation we get: $det(A.I_n-A)=det(A-A)=det(O_n)=0$, where $O_n$ is the zero matrix of order n. Is there any mistake in my idea? If not then why are they giving so much bigger proofs.
Cayley Hamilton Theorem states that if $A$ is an $n \times n$ matrix over the field $F$ then $p(A) = 0$. We note that $p(\lambda) = \det(\lambda I - A)$. Hence, why can't we just substitute $\lambda$ with $A$ and directly prove Cayley-Hamilton Theorem by saying that $p(A) = p(\lambda) = \det(\lambda I - A) = \det(AI - A) = 0$?
I'm a Canadian traveling to the US next month. I haven't traveled internationally before and I'm not sure how money works. Am I able to use my credit card in the US? I have a $2000 limit, will USD transactions apply to that via the exchange rate or something else? Is my card able to be preauthorized by a US merchant? Can I withdraw from US ATMs using my debit card?
Recently my wife and I traveled to Italy and before we left we got about 85% of our money in travelers checks and the other 15% we carried on in cash. When we arrived there, no one would take our travelers checks and many places did not accept credit cards. Eventually, we found some currency exchange places that would take the travelers checks and give us Euro's, but at a 7-15% fee, which was not really a very fun surprise. While I was under the impression that it is safer to use travelers checks, it seems that they were not really accepted (the usual explanation being fraud). So the question is, is it best to just exchange your currency at home and carry all of it with you when you travel or are there other alternatives to carrying cash that are safer and cost effective?
I just started having this problem recently, but it will freeze when I am in the middle of coding and it seems to be happening more frequently. I do tend to have a ton of tabs open in chrome while I am working, but I don't know where to start in seeing what the problem is here. When it freezes, the mouse will still move but the screen is totally frozen and I have to do a hard reboot. I have tried hotkeys for terminals and other things, but nothing works
All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when... just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an In what order should I try various solutions before deciding to pull the power plug? What should I do when starting up Ubuntu fails? Is there a diagnostic procedure I can follow?
I need to display the difference between two dates in a text box using JavaScript. I tried the following code but it did not work: function showdatediff(){ //get value of the two dates var date1 = document.getElementById('date1').value; var date2 = document.getElementById('date2').value; //cheack the diffrence var timeDiff = Math.abs(date2.getTime() - date1.getTime()); var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24)); document.bookform.displaytextbox.value = (diffDays); }
How do I get the number of days between two dates in JavaScript? For example, given two dates in input boxes: <input id="first" value="1/1/2000"/> <input id="second" value="1/1/2001"/> <script> alert(datediff("day", first, second)); // what goes here? </script>
I have ubuntu 12.04 lts. I am new to ubuntu and i get this warning that 0 bytes are remaining on the volume /boot. i asked a question : So I Got replies saying i should remove unused kernels. Can anyone explain to me in simple language what is a kernel and how do i remove unused kernels. Thank you :)
Every time I install a new Linux kernel, it gets left in the grub_config, making the boot menu longer each time. I know I can manually search through the installed packages and remove them. Does Ubuntu provide any easier way to clean them up or keep them from showing in the boot list?
When I was writing a program, I made a typo. I have wrote i[data] instead data[i]. However the program was successful compiled and worked right. Operator[] behavior with arrays: #include <iostream> using namespace std; int main() { int data[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; cout << data[6] << endl; // prints 6 cout << 6[data]; // prints 6 return 0; } Similar operator[] behavior with pointers: #include <iostream> using namespace std; int main() { char* str = "Hello, world!"; cout << str[9] << endl; //prints 'r' cout << 9[str]; //prints 'r' return 0; } Why data[i] equals i[data]?
As Joel points out in , in (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a] Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?
Question is just as the title says. Let's say a script prompts the user to input something, and stores said input into a variable. What's the easiest way to check if that user input/variable is a number in perl?
Is there a simple way in Perl that will allow me to determine if a given variable is numeric? Something along the lines of: if (is_number($x)) { ... } would be ideal. A technique that won't throw warnings when the -w switch is being used is certainly preferred.
I have a privileges everywhere, but where i deploy a project with webParts, Visual studio, show me following error : Error 1 Error occurred in deployment step 'Recycle IIS Application Pool': Object reference not set to an instance of an object. How to solve this proble. Thank you previously!
I get this error in the deployment step of a share-point farm based project. Most of the suggested solutions on the net are a simple Visual Studio re-start, however, a simple VS restart won't fix this. Any ideas on what might be causing this?
When I try to apt-get update, I have this error: W: The repository 'http://ppa.launchpad.net/upubuntu-com/flareget-amd64/ubuntu xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. . . . E: Le téléchargement de quelques fichiers d'index a échoué, ils ont été ignorés, ou les anciens ont été utilisés à la place.
When updating, I get the following error message: W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file. Here, I find another statement on this error: This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need. Is this what I should do?
Is there a package with LaTeX symbols for the poset relations "covers" and "is covered by", as seen in ? I've tried creating ⋅> and <⋅ symbols on my own using \cdot, <, and >, but the spacing between the two symbols tends to vary, as does the surrounding space, in ways that don't look good.
I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?
I have 2 lines, and I want to get the point where they intersect. I am looking to have a point created on the point of intersection. How can this be done?
I need to put a point at the intersection of two edges. Below is a picture with red circles around where I need points to be placed.
I am using LaTeX package for a documentation. The figures in the text have references in their captions. Due to the 'List of Figures' section being present in the beginning of the Document, the citation order is initialising at this section. Eg. The first figure with a citation in its caption is on Page 10. The citation should be [7], but as it is the first figure in the document, and the List of Figures section is at the beginning, the citation in the caption is [1]. Kindly assist
When using the \cite command in figure captions and the ieeetr bibliography style, then BibTeX numbers the citations as appearing earlier than they do in reality (i.e. the first citation in the document ends up being [42]). Is there any way to get BibTeX to ignore the \listoffigures section when numbering?
How I can find Longest Running Query and SPID on SQL Server 2008?
Can anyone help me to find a below given details for long running query. ProcessID, process name, database, host ,user ,process login time, query start time and query duration. I am looking for a query or an SP which gives me this data.
After voting to close as off-topic, I'm unable to see which option I chose by clicking on the close button again: There is no link to click through and see the counts associated with each off-topic close reason. Can we add one? Something like: Yes, I realise the numbers don't add up. My Paint-fu isn't great.
If I've already voted to close a question, it would still be nice to see the details of others' votes — the suggested migration if it's being marked as off topic, or the suggested duplicate if it's being marked as an exact duplicate, for instance. Instead, I only see "You have already voted to close this question" and the overall category.
I frequently see users across all communities with a display name of "user" followed by a bunch of numbers, or in terms of a regex, user\d+. This doesn't seem like an elaborate username choice, so what's going on?
It's been more than a month since I have started using . It has these users with user names in the format of "user-random number". I have observed them in some of the stack activities, most of the time asking questions. Does the moderators create them for their own purpose. If yes what purpose do they serve? I mean a user is free to have any user name. But it's just a hunch that such users are actually moderators. I may be wrong; just need some clarification.
It seems like everyone just uses set.seed(123) or set.seed(1234) when they are doing random sampling. If so many people use just a select few integers for set.seed(), doesn't that mean that everyone is drawing from the same state of the random number generator and therefore all results are not a true random sample?
In almost all of the analysis work that I've ever done I use: set.seed(42) It's an homage to Hitchhiker's Guide to the Galaxy. But I'm wondering if I'm creating bias by using the same seed over and over.
I have a question about what to do with ground wires. I am installing a new light fixture above my dining room table. Fixture comes with a ground wire obviously. Main electrical wiring has the normal black and white wire AND a bare copper wire (which I’m assuming is another ground wire). In addition it appears that my octagonal electric junction box also has a green copper ground wire attached to box with a screw, so I now have three grounding wires. Light fixture mounting bracket has the normal green screw that I should be attaching a ground wire. Question: Is which wire do I attach to the mounting bracket ground screw AND what to do with the other grounding wires??
I am replacing a light fixture in my bathroom and have the following setup: The electrical box is plastic The wire coming from supply has black (hot), white (neutral) and copper (ground). The light fixture comes with a metal bracket for attaching to the electrical box that has a green screw The light fixture has black, white and copper wires. The instructions supplied with the fixture dont give me an example of how to wire it up if there is an existing ground wire coming from supply. It only tells me to attach the copper wire of the light fixture to the green screw. So I'm curious what I should do with the ground from the supply. Looking online, my options appear to be this: So I think since the electrical box is plastic, I should just connect the ground of the supply with the ground of the light fixture with the wire nut. Do I need to connect both of them together with the green grounding screw on the light fixture as well, or would that only be if the electrical box was metal?
I am writing a bash shell script at the moment and one of the specifications is that I need to print an error message if the first argument, $1, is not -e or -d, this is what I have done: if [ "$1" != "-e" ] || [ "$1" != "-d" ]; then echo "Error: First argument must be either -e or -d" exit 1 fi this does not seem to work however, as even if i used -e or -d for the first argument, this error message is still printed. What am I doing wrong and how do I fix this?
I tried to check if the PHONE_TYPE variable contains one of three valid values. if [ "$PHONE_TYPE" != "NORTEL" ] || [ "$PHONE_TYPE" != "NEC" ] || [ "$PHONE_TYPE" != "CISCO" ] then echo "Phone type must be nortel,cisco or nec" exit fi The above code did not work for me, so I tried this instead: if [ "$PHONE_TYPE" == "NORTEL" ] || [ "$PHONE_TYPE" == "NEC" ] || [ "$PHONE_TYPE" == "CISCO" ] then : # do nothing else echo "Phone type must be nortel,cisco or nec" exit fi Are there cleaner ways for this type of task?
Sorry if this has been asked before. Hope you'll bear with Linux newbie.... Fairly new to Ubuntu. Installed it on my desktop previously running win7. I backed up my data in the C partition and thought that would be sufficient if I did a clean install of Ubuntu 14.04 it would not touch the other partitions. Unfortunately that's not the case I guess. I guess I chose the wrong option while installing Ubuntu (erase hard disk or something like that). I thought it'd only format the c drive. Now I can't see any other mounted or unmounted partitions in file manager. The command 'sudo blkid' doesn't list any partitions with ntfs or fat file systems either. So just wanted to ask is there any way to get my data on other partitions back?
I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions (C:) Vista (D:) Entertainment (E:) Work (F:) Sources and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB. I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse? I need these data badly as I don't have a backup for them.
I typed the "Hello, World" program in the Ubuntu text editor. The file, 'hello' was saved to the documents folder, which I verified, is there. However, the "c" compiler, version 7.4.0-1, cannot find 'hello.' Moreover, the program 'find' cannot find it either. I would appreciate any help you can give me.
I'm trying to write a basic program in C using gedit or sublime text (which I prefer), but no matter what I do when I try to compile or run, or even while writing, I have no option to use 'stdio.h' or any similar package. Even when I start typing #include <st the only word completion sublime suggests is 'struct'. I've read dozens of threads, but all managed to fix this by installing gcc, which I've tried to reinstall multiple times, with no luck. This is the output from gcc -v: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.2.0-8ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3) ` This is the code: #include <stdio.h> int main(void) { printf("hello, world\n"); } When I compile using gcc, I get nothing, no error at least. but when I try to run using just ./hello.c this is what I get.
I will be soon ending my bachelors degree and choosing masters major. In my interest is newly opened major and I managed to get information about last years recruitment process, namely how many people actually went for recruitment process. Knowing this fact I started to wonder how much can I actually infer from that information. After all this is minimal dataset of just one entry. However I also thought that it is not a totally random process and there shouldn't be much variation in such a case. My question is then - how would you draw a conclusion and how sure would you be about it in the case of process that is rather known (recruitment), but you have only small piece of information about it?
I am wondering what we can say, if anything, about the population mean, $\mu$ when all I have is one measurement, $y_1$ (sample size of 1). Obviously, we'd love to have more measurements, but we can't get them. It seems to me that since the sample mean, $\bar{y}$, is trivially equal to $y_1$, then $E[\bar{y}]=E[y_1]=\mu$. However, with a sample size of 1, the sample variance is undefined, and thus our confidence in using $\bar{y}$ as an estimator of $\mu$ is also undefined, correct? Would there be any way to constrain our estimate of $\mu$ at all?
I'm seeing a lot of questions recently along the lines of, "Convert this SQL query to LINQ for me" followed by a copy/paste of a SQL query. I've started voting to close when I see these under "Must show a minimal understanding" but each time I see that others are happy to provide answers. Just wondering what the consensus is here?
This morning I ran across the following 'question' on SO, where the user is asking for his VB.NET code to be converted to C# -- I don't feel like this is a real question, but what does everyone else think
I am trying to use var in replace method. See below code, I wanted to replace all "xyz" from myString. var myString = "abc qwer xyz abc qwer xyz abc qwer xyz"; var myNewString = myString.replace(/xyz/g,""); console.log(myNewString); Output: abc qwer abc qwer abc qwer But when I define variable for "xyz" it is not recognizing it. var myString = "abc qwer xyz abc qwer xyz abc qwer xyz"; var setWord = "xyz"; var myNewString = myString.replace(/setWord/g,""); console.log(myNewString); Output: abc qwer xyz abc qwer xyz abc qwer xyz Can anyone help me to understand why I am not able to define variable in replace method along with Regular Expression.
I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it. However, I can't figure out how to pass a variable in to a regex. I can do this already which will replace all the instances of "B" with "A". "ABABAB".replace(/B/g, "A"); But I want to do something like this: String.prototype.replaceAll = function(replaceThis, withThis) { this.replace(/replaceThis/g, withThis); }; But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?
I'm trying to prove that $\sqrt{x} \leq 2^{\pi(x)}$ for all $x \geq 0 \in \mathbb R$, where $\pi$ is the prime-counting function. To do this, I note that $2^{\pi(x)}$ may be viewed as the number of different products we may produce from the $\pi(x)$ different primes that are at most $x$; since in each such product the power of each prime is at most one, each product is squarefree. Since by convention 1 is squarefree, then $2^{\pi(x)}$ is precisely the number of squarefree numbers at most $x$. Furthermore, $\lceil \sqrt{x}\rceil = \left|\{n^2 : n^2 \leq x\}\right|$ (with equality if and only if $x$ is a square), so that proving that $\sqrt{x} \leq 2^{\pi(x)}$ is equivalent to showing that there is an injection $$f : \{n^2 \in \mathbb Z : n^2 \leq x\} \to \{n : n \leq x \text{ and $n$ is squarefree}\}.$$ Supposing that for any integer $n \geq 1$ there is some squarefree number $k$ such that $n^2 < k < (n + 1)^2$, then producing such an injective function is trivial. But I do not see a way to prove this last claim: that between any two squares there is a squarefree number. How does one prove this statement?
Is there a squarefree ( with two prime divisors) betweem any two consecutive squares?
I have an old AMD64 box that was working quite nicely on in 12.04 LTS with onboard Nvidia GeForce 6150SE nForce 430 chip but ONLY running Nvidia 302.7 which I learned the HARD way after trying just about every other driver. My son gave me an Nvidia GeForce 8800GTS card and my nightmare began. To make a VERY long story short, the new to me graphics card ran just fine in the XP part of the dual-boot but Linux was Hell. Finally I gave up and "upgraded" to Ubuntu 14.04 LTS in an effort to fix the problem. I'm about sixty hours in and removed the 8800GTS card. I just want my system to work again. Nouveau graphics so slow they look like they are in another time zone. Move the mouse, go get a cup of coffee, and when I come back, I see the cursor move. I know that sudo sh NVIDIA-Linux-x86_64-302.07.run has fixed my graphics problems in the past. However, I get the error that [...]/version.h does not exist, most likely reason is that source files in /lib/modules/3.13.0-32-generic/build have not been configured. HOW do I get them configured? Yes, I have updated, upgraded, installed linux linux-headers-generic ubuntu-minimal ubuntu-standard ubuntu-desktop and linux-generic all without having a version.h file appear. And yes, I wiped my drive and made a fresh install of 14.04 after removing the 8800 card because the gui was horribly broken. Can anyone offer help getting my box to work with just the onboard graphics? I do not care about the 8800 card. I am pretty sure if I can JUST install nvidia 302.7 that my life will return to the halcyon days of 12.04, but in 14.04. Thank you.
I just ordered the Nvidia GTX card. I have a dilemma, though. Should I keep using the driver which is available in "additional drivers" in Ubuntu, or should I install the driver from the Nvidia site? So which driver is the best for me?
I want to find an example of ideal $Q$ such that $\sqrt{Q}$ is prime, but $Q$ is not primary. It is clear that our domain would not be PID because $\sqrt{Q}$ should not be maximal ideal.
Is it true that an ideal $I$ in a commutative ring is primary iff $Rad(I)$ is prime? If not, what are some nice counterexamples?
I can't remember what keys I pressed, but for some reason I can't see anything of model outside of this pyramid. Any help on how I can get rid of it and see my model again would be helpful. Thanks.
When looking at my objects in 3d view I'm seeing a gray cone that seems to be hiding other objects. Can anyone help me turn this off and explain what it is please. Screenshots attached.
Here is the problem 1-8 in Lee's introduction to smooth manifolds: An angle function on a subset $U \subset S^1$ is a continuous function $ \theta: U\to \mathbb R$ such that $e^{i\theta(z)}=z$ for all $z \in U$. Show that there exists an angle function on an open subset $U\subset S^1$ if and only if $U \neq S^1.$ For any such angle function, show that $(U,\theta)$ is a smooth coordinate chart for $S^1$ with its standard smooth structure. I wonder if $U\ne S^1$ is sufficient for the existence of such a continuous angle function(I feel that the statement should be "there exists an angle function on an open subset $U\subset S^1$ if and only if $U$ is not dense in $S^1.$"). Let's take a special case when $U=S^1-\{-1\}$. Suppose there is such a continuous angle function $ \theta: U\to \mathbb R$ such that $e^{i\theta(z)}=z$ for all $z \in U$. Then we must have $\theta(z)=arg(z)+2k\pi$. However, It seems that there will always be a "jump" somewhere on the circle making $\theta$ discontinuous. For example, if we define $\theta(z)=\arg(z)$, then when $z$ approaches $-1$ from the first quadrant and the four quadrant separately, $\theta(z)$ approaches to $\pi$ or $-\pi$.(This argument turns out to be wrong, see the answers and comments given below by repliers) Since professor Lee doesn't make any corrections to this problem, it should be correct as given. But how to define such a continuous angle function for arbitrary proper open subset of $S^1$? Thanks in advance!
Let $S^1\subseteq\mathbb{C}$ be the unit circle and let $U\subseteq S^1$ be open. How to show that there exist a continuous function $$\theta:U\to\mathbb{R}$$ such that $$e^{i\theta(z)}=z$$ for all $z\in U$ if and only if $U\neq S^1$? I have been able to show the $\Rightarrow$ direction but not the other one. $(\Rightarrow)$ If such a continuous $\theta:S^1\to\mathbb{R}$ exist, then it is injective and so $\theta(S^1)$ is a subset of $\mathbb{R}$ that is homeomorphic to $S^1$. Now, $S^1$ is compact and connected so $\theta(S^1)$ is a closed interval $[a,b]$. But removing a point from $[a,b]$ gives two connected components, while removing a point from $S^1$ still gives a connected space. Hence, $[a,b]\not\cong S^1$, so $\theta$ doesn't exist. How would you show the $\Leftarrow$ direction? Edit: This is an exercise in topology with no assumed prior knowledge of complex analysis. Note that we only need to show continuity of $\theta$ (not analyticity). The question is phrased in terms of complex numbers for simplicity of notation, but it is to be interpreted in terms of subspace of $\mathbb{R}^2$.
I have a machine that seems to have some issues, and I would like to install directly from the iso image already on the HDD. I cannot for some reason boot from a LiveCD nor from a USB stick. I attached the HDD to another machine and dumped the iso to the desktop and reinstalled to the machine with issues.
I don't want to burn a CD, DVD or USB memory stick. And I don't care about saving the existing operating system (Linux Mint). I want to install Ubuntu (actually Kubuntu 12.04 LTS) to the computer directly from the ISO image. The image is for the Kubuntu Live DVD (3.5 GB). The computer is now booted into Linux Mint. A set of command line steps would be satisfactory. In my mind, I simply need to trick the existing system into thinking I inserted a CD/DVD, right? I know there is a similar question already but it does not have a good answer. The answer basically says, "see this link." I reviewed the link and I decided that StackExchange needs a good answer to this question. Furthermore, most answers at other places on the Internet assume the user is coming to Ubuntu from Windows. So I think this question is one that needs a good answer here. Thanks
I've run rfkill list all and it is hard blocked now. I've run lspci and get network controller as Broadcom and Ethernet as Qualcommm Atheros Please help, thanks lspci -knn | grep Net -A3; rfkill list 02:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n [14e4:4365] (rev 01) Subsystem: Lenovo BCM43142 802.11b/g/n [17aa:0611] Kernel modules: wl 03:00.0 Ethernet controller [0200]: Qualcomm Atheros QCA8172 Fast Ethernet [1969:10a0] (rev 10) 0: hci0: Bluetooth Soft blocked: no Hard blocked: no
I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible. What are the steps to install Broadcom wireless drivers for a BCM43xx card? I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc. lspci -vnn | grep Network showed: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b] iwconfig showed: lo no wireless extensions. eth0 no wireless extensions. NOTE: Answer below is updated every time new information is added and confirmed working.
Once i login through putty i see one ram usage and when run free -m i see another different one . which one is right? and whats the correct way to get real ram usage?
free -m currently puts out something like this. I would like to know using grep/awk how we can get the total free amount. i.e. 9083
I am wonder what will happen as a certificate template with a 2 years validity period (for example) will issue a certificate when the CA certificate expires in 1 year. I can think of 2 things that could possible happen, but this is just guessing, thats why I would like to know. I think possibly the following will happen: You can a notification of some sort. The issued certificate will get an expiration date of 1 year, not 2. Can anyone tell me what will happen?
In 2004, I set up a small certification authority using OpenSSL on Linux and the simple management scripts provided with OpenVPN. In accordance with the guides I found at the time, I set the validity period for the root CA certificate to 10 years. Since then, I have signed many certificates for OpenVPN tunnels, web sites and e-mail servers, all of which also have a validity period of 10 years (this may have been wrong, but I didn't know better at the time). I have found many guides about setting up a CA, but only very little information about its management, and in particular, about what has to be done when the root CA certificate expires, which will happen some time in 2014. So I have the following questions: Will the certificates that have a validity period extending after the expiry of the root CA certificate become invalid as soon as the latter expires, or will they continue to be valid (because they were signed during the validity period of the CA certificate)? What operations are needed to renew the root CA certificate and ensure a smooth transition over its expiry? Can I somehow re-sign the current root CA certificate with a different validity period, and upload the newly-signed cert to clients so that client certificates remain valid? Or do I need to replace all client certificates with new ones signed by a new root CA certificate? When should the root CA certificate be renewed? Close to expiry, or a reasonable time before expiry? If the renewal of the root CA certificate becomes a major piece of work, what can I do better now to ensure a smoother transition at the next renewal (short of setting the validity period to 100 years, of course)? The situation is made slightly more complicated by the fact that my only access to some of the clients is through an OpenVPN tunnel that uses a certificate signed by the current CA certificate, so if I have to replace all client certs, I will need to copy the new files to the client, restart the tunnel, cross my fingers and hope that it comes up afterwards.
How is acceleration calculated when only the direction changes and the magnitude remains the same? Guys, I know that my previous examples didn’t make sense and I’m sorry because I’m totally new to this topic and also I don’t think ya’ll actually understand my question. Acceleration is change in velocity over change in time,right? So, if the magnitude of velocity changes and the direction is same, acceleration is obviously given a value (for e.g. 2 $m/s ^2$ etc) and the direction of acceleration is the direction of change of magnitude of velocity. My question is, what if only the direction changes? What if there’s this super advanced object that can change its direction without changing the magnitude of velocity? How will the acceleration be calculated in that case? How can the magnitude of acceleration have value since there is no change in speed ( magnitude of velocity)? I’m also aware about Uniform Circular Motion and how acceleration changes constantly even when the magnitude of velocity doesn’t change and how it can be calculated. But uniform circular motion is not an one dimensional direction change. It will be of huge help if you could explain how acceleration is calculated when magnitude of velocity remains same and only direction of velocity changes in 1D motion (I.e., it goes in the opposite direction and for simplicity let’s assume that this body/object needs very little time to change its velocity from positive to negative) I’m still yet to learn calculus so if these calculations include calculus please do explain it a little in detail. Also, if an object can not change direction without changing speed in 1D motion, then please explain giving an example where the object takes very little time to change direction/ go back. I just want to know how the direction change is shown in acceleration. Thank you for baring with me and for your time.
The formal definition of acceleration is It is the measure of how fast the velocity changes with respect to time. Now, when the magnitude of velocity changes, acceleration $$\vec{a} = \frac{d \vec{v}}{dt}$$ and its unit is $m.s^{-2}$ . But what about the case where the velocity only changes its direction keeping its magnitude constant? The definition can then be Acceleration is the measure of how fast the velocity changes its direction with respect to time. But how can I calculate the acceleration then?? What should be the unit then??? Please help.
Thanos' stated motivation in Avengers: Infinity War is to solve the problems of scarcity and overpopulation, by wiping out half of the living beings in the universe, which he needs all of the Infinity Stones to do. However, the Reality Gem allows him to control reality itself, which he uses in the film to transform Knowhere into a burning ruin. This appears to be applied permanently, since it's still destroyed after he teleports away. He uses the same power later on to show Titan as a green paradise. It seems to be some sort of illusion or vision in that case, but we know from earlier that he's capable of actually changing the planet itself if he so chooses, and presumably any other. So, what gives? If Thanos wants to solve the problem of scarcity, why doesn't he just do it with the Reality Gem?
If I had a gauntlet with essentially unlimited power, and my goal was to help make sure life in the universe was able to prosper, then my first thought toward this goal probably would not be to extinguish half of all life. This doesn't directly help anyone, and it is, at best, a temporary solution, since populations will eventually grow back. Assuming that I am not, in fact, secretly in love with an avatar of death itself, why would I choose to commit universal genocide instead of directly solving the limited resource problem? So, to be specific, my question is: In-universe, what is Thanos's motivation for attempting to do this instead of more reasonable alternatives?