might be a silly question but I cant get the query running. This is my code:  ArrayList<Attraction> getAttraction(Object[] obj) throws SQLException {      Connection connection = facade.getConnection();      ArrayList<Attraction> attractions = new ArrayList<>();      // Check obj value     System.out.println(java.util.Arrays.toString(obj));      PreparedStatement ps = connection.prepareStatement("SELECT DISTINCT attra.attractid,attractname,x,y,z,age,weight,"             + "height,duration,price,status FROM attraction attra "             + "INNER JOIN attrib_bridge ab ON attra.attractId = ab.attractId "             + "INNER JOIN attribute attri ON ab.attributeId = attri.attributeid"             + "WHERE attri.attributename IN ?");      ps.setString(1, java.util.Arrays.toString(obj));      ResultSet rs = ps.executeQuery();       while(rs.next()){          // Initialize attraction object         Attraction attraction = new Attraction();          attraction.setAttractionId(rs.getInt(1));         attraction.setAttractionName(rs.getString(2));         attraction.setxLocation(rs.getInt(3));         attraction.setyLocation(rs.getInt(4));         attraction.setzLocation(rs.getInt(5));         attraction.setMinAge(rs.getInt(6));         attraction.setMaxWeight(rs.getInt(7));         attraction.setMinHeight(rs.getInt(8));          attraction.setRideDuration(rs.getInt(9));         attraction.setPriceRide(rs.getInt(10));         attraction.setStatus(rs.getString(11));          // Add new object to to movies         attractions.add(attraction);     }      return attractions; }   And this is the error I get :     [Gentle rides, Thrill rides, Transport rides]   com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in >your SQL syntax; check the manual that corresponds to your MySQL server version >for the right syntax to use near 'attri.attributename IN '[Gentle rides, Thrill >rides, Transport rides]'' at line 1      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)       at java.lang.reflect.Constructor.newInstance(Unknown Source)       at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)       at com.mysql.jdbc.Util.getInstance(Util.java:386)       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)       at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)       at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)       at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)       at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2293)       at com.ThemeParkG02.rs.control.manager.ManageAttraction.getAttraction(ManageAttraction.java:123)       at com.ThemeParkG02.rs.control.manager.Facade.getAttraction(Facade.java:85)       at com.ThemeParkG02.rs.control.listener.ViewAttractionListListener.run(ViewAttractionListListener.java:32)     I'm really dizzy right now. The values is out but I the query is not working. The '[' and ']' really blocking my goal. Any input guys?   Thanks in advance.

What are the best workarounds for using a SQL IN clause with instances of java.sql.PreparedStatement, which is not supported for multiple values due to SQL injection attack security issues: One ? placeholder represents one value, rather than a list of values.  Consider the following SQL statement:  SELECT my_column FROM my_table where search_column IN (?)   Using preparedStatement.setString( 1, "'A', 'B', 'C'" ); is essentially a non-working attempt at a workaround of the reasons for using ? in the first place.    What workarounds are available?


According to the info in the following locations:          The probability density function for a left-truncated normal distribution should be:  $f(x) = {{1 \over \sigma}\phi({{x-\mu} \over \sigma})\over{1-\Phi({{a-\mu} \over \sigma})}}$  for all x >= a  However, I'm getting some weird results when I do that.  if I take $\sigma$ = 1.0 and $\mu$=0.0 and $a$=1.0, that gives:  $f(x) = {\phi(x) \over {1-\Phi(1)}}$  If I then plugin a number near the truncation point (say 1.1), I get:  $f(x) \approx {0.212 \over {0.159}} \approx 1.3$  Clearly that's wrong (the PDF should be in the range (0.0, 1.0) for all X).  Except, everywhere I look leads me to the definition of f above, so I can't figure out what I'm doing wrong.  Clearly though, I've gotten something wrong.  I know this is an embarrassingly simple question, but I'd appreciate any help you might be able to give. Do you know what I'm doing wrong?

On the , there is this line:      $p(\mathrm{height}|\mathrm{male}) = 1.5789$ (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.)    How can a value $>1$ be OK? I thought all probability values were expressed in the range $0 \leq p \leq 1$. Furthermore, given that it is possible to have such a value, how is that value obtained in the example shown on the page?


I want to use the Defects4j dataset,when I do this follow the page of github:     $ defects4j checkout Lang Can't locate DBI.pm in @INC    (you may need to install the DBI module)    (@INC contains:    /c/Users/Liu Fang/defects4j/framework/lib    /c/Users/Liu Fang/defects4j/framework    /c/Users/Liu Fang/defects4j/framework/core    /c/Users/Liu Fang/defects4j/framework/core    /usr/lib/perl5/site_perl    /usr/share/perl5/site_perl    /usr/lib/perl5/vendor_perl    /usr/share/perl5/vendor_perl     /usr/lib/perl5/core_perl    /usr/share/perl5/core_perl .    ) at /c/Users/Liu Fang/defects4j/framework/core/DB.pm line 43.   [Added line breaks for readability]

I get this error:  Can't locate Foo.pm in @INC  Is there an easier way to install it than downloading, untarring, making, etc?


He loves.   I’ve read some things about intransitive verbs, recently. Can “He loves”. be thought of as a complete sentence, and grammatical?  And, can     A wind comes.   and     He has.   be thought of as complete sentences, and both grammatical?

A star shoots.   I read something like this somewhere. Can this be thought of as a complete sentence? How does one analyze this, grammatically? It looks as though it is missing some phrase. On the other hand we do say shooting star, so it isn't very clear if this is a complete sentence or not.  So, it may seem like a complete sentence? I guess, “A man runs.” and “It bites.”, seem like this, too? Same with: "A twig swayed.", "A ball rolls.", "A man jumps."


I've managed to remove Ribbon Bar from file explorer in Windows 10, but it has replaced it with a Command Bar which I never use and only clutters the view and distracts me. How do I remove this command bar?

I've tried removing the ribbon bar according to  guide, using Winaero's Remove Ribbon tool. Instead of just removing it, it replaces the ribbon with the command bar, containing tools that I either have no use for or  that I can access by right clicking inside the folder. Google gives me no answers so I come to you.  How can I remove the ribbon in Windows 10 without replacing it with the command bar, or anything else for that matter?


How big in diameter should the lens of the imaginary telescope to be so we can see the American flag from e.g. some observatory in Hawaii?

After Apollo 11 first landed on the Moon in 1969, there have been conspiracy theories that this never really happened and that it was all a hoax.  In 2010 NASA released photos from its Lunar Reconnaissance Orbiter (LRO) mission of some landing sites which showed both a lunar lander and footprints (as dark trails).  The question is, how big (aperture) of a telescope would you theoretically need on earth to see the lunar module or even better, the dark trail of footprints?  What about from orbit, without the atmosphere, would a smaller diameter scope work, how big would it need to be?


I have a virtual function that returns a unique pointer of a base class. I'd like to override it and return a unique pointer of a derived, but the compiler won't let me do it: struct X {}; struct Y : X {};  struct A {     virtual std::unique_ptr<X>& make() = 0; }; struct B : A {     std::unique_ptr<Y>& make() final;     // error: invalid covariant return type for ‘virtual std::unique_ptr<Y>& B::make()’     // note: overridden function is ‘virtual std::unique_ptr<X>& A::make()’ };  This would work if I were returning raw pointers. Is there any way to make it work with unique pointers too? I would like to do this, because in some points in my code I have a B& and expect it to return an Y. Any C++ standard is fine.

I have code like this:  class RetInterface {...}  class Ret1: public RetInterface {...}  class AInterface {   public:      virtual boost::shared_ptr<RetInterface> get_r() const = 0;      ... };  class A1: public AInterface {   public:      boost::shared_ptr<Ret1> get_r() const {...}      ... };   This code does not compile.  In visual studio it raises     C2555: overriding virtual function return type differs and is not   covariant   If I do not use boost::shared_ptr but return raw pointers, the code compiles (I understand this is due to  in C++). I can see the problem is because boost::shared_ptr of Ret1 is not derived from boost::shared_ptr of RetInterface. But I want to return boost::shared_ptr of Ret1 for use in other classes, else I must cast the returned value after the return.      Am I doing something wrong?  If not, why is the language like this - it should be extensible to handle conversion between smart pointers in this scenario? Is there a desirable workaround?


Why is Gauss's law used to calculate electric field only for "infinite" cases such as an infinite sheet, infinite wire, etc.? Why does the equation of calculating electric field near an "infinitely" non conductor charged sheet which is equal to $\sigma/2 \epsilon$ not work for finite sheet (with uniformly charge distribution)?Likewise why we do not use Gauss's law to compute electric field near an "finitely" long wire instead of an  infinite wire?(Above description only for the view of my 12th class textbook,l don't know about any higher study book which may compute the electric field near a finite object using Gauss's law and advanced Calculus).[1]:

One of my physics books has a nice example on how to use Gauss's Law to find the electric field of a long (infinite) charged wire.  However, at the very end of the example, the author ends by saying Gauss's Law cannot be used to find the electric field of finite-length charged wire.  I could not understand why not.    Please this is not a homework problem or nothing like that. This is just a question I have and I have not being able to solve it in my mind yet.


I would like examine if the job satisfaction of part-time workers is higher or lower compared to full-time workers.  My dataset consists of 4125 cross-sectional observations.  independent variable: employment status (1 = full-time, 2 = part-time)  dependent variable: job satisfaction (0 = Very dissatisfied, 25 = Dissatisfied, 50 = Neutral, 75 = Satisfied 100 = Very satisfied)  What kind of statistical test do I need?  How could I incorporate (categorical) control variables (e.g. age, gender, tenure, etc.)?

I would like examine if the job satisfaction of part-time workers is higher or lower compared to full-time workers.  My dataset consists of 4125 cross-sectional observations.  independent variable: employment status (1 = full-time, 2 = part-time)  dependent variable: job satisfaction (0 = Very dissatisfied, 25 = Dissatisfied, 50 = Neutral, 75 = Satisfied 100 = Very satisfied)  What kind of statistical test do I need for my analysis?  How could I incorporate (categorical) control variables (e.g. age, gender, tenure, etc.)?


I'm placing images inside hbox where the hbox located inside the vbox  FileInputStream seats_fileInputStream = new FileInputStream("seat.png");     Image seats_image = new Image(seats_fileInputStream,50,50,false,false);      ImageView[] seats = new ImageView[30];      for(int i = 0;i<30;i++){     seats[i] = new ImageView(seats_image);     }      HBox seatsRaw_hbox[] = new HBox[4];     VBox seatsLine_vbox = new VBox();      for(int i=0;i<5;i++){              for(int j=0;j<6;j++){            seatsRaw_hbox[i].getChildren().addAll(seats[j]);                           }             seatsLine_vbox.getChildren().addAll(seatsRaw_hbox[i]);      }    in should display 6 images in each hbox where there is 5 hboxes it total and place them into the vbox. But I keep getting       java.lang.NullPointerException runtime error in the line      seatsRaw_hbox[i].getChildren().addAll(seats[j]);

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?


This is the IPA for "better": /ˈbet̬.ɚ/ What's the little arrow mark under the "t"? Is it emphasis? Or something else?

In the IPA.It has a diacritic, voiced.This mark always be used in AmE,japanese...  such as water /ˈwɔːt̬ ər/,party /ˈpɑːrt̬i/,私  /ɰat̬aɕi/. So,if a voiceless consonant plus this voiced mark, how to distinguish them? For example t̬ and d.


I recently installed Ubuntu 14.04. I am not able to install any software because it is not accepting my password.  However I am able to log in to my account using the same password on my pc.

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


Let $f:[0,1] \to [0,1]$ be a continuous function with $f(0) = f(1)$. Prove that for every positive integer, $n, \exists c_n \in [0,1]$ such that $f(c_n) = f(c_n+1/n), c_n \in [0,1-\frac{1}{n}].$  With this problem, the only thing coming to my mind in terms of $n$ being a positive integer is that as $n$ goes to bigger and bigger, $f(c_n + \frac{1}{n})$ goes to closer and closer to $f(c_n + 0) = f(c_n),$ that's all. I can't come up anything in terms of using IVT to this. And, since $f(a) = f(b)$, I know I can't apply Rolle's theorem to this because the problem didn't say $f$ is differentiable. Any help? Thanks.   Edit: Even though the conditions are the same with , the functions are still different. And, the answers for that question are clearly not helpful to solve my problem.

Determine all $a\in[0,1]$ such that for ${\it every}$ continuous function $f:[0,1]\to \mathbb{R}$ with $f(0)=f(1)$ there exists at least one $x$ where $f(x) = f(x+a)$.   First of all, $a=0,1/2,1$ are obviously good values. Secondly, no $1/2<a<1$ works (look at $f = \sin(2\pi x)$).  I remember trying to solve this several years ago. I think I started by dividing $[0,1]$ into regions where $f\geq 0$ and $f<0$. Then studied each interval and all pairs of intervals with the same sign. However, this seems like a problem that should have a simple solution and I would love to see it.


Is there a way to give a command, such as /say or /tellraw a time delay?  For example I want my command to say something after ten seconds, but I don't really want a bunch of repeaters everywhere. Is there a way to do this with command blocks or alternative methods?

I found 11 questions like this on gamingSE already, but none of them have proper and up-to-date answers. So I'm creating this Q&A:  How do you either activate a command x seconds/minutes/hours/… in the future or every x seconds/minutes/… in a loop?  Repeating command blocks and ticking functions execute 20 times per second, redstone is  in many situations and most of the extremely fancy solutions, like falling blocks in cobwebs, have broken over time or are needlessly complicated.


in some textbook i read that one can describe wave displacement by y(t)=Asin(ωt+ϕ) and y(t)=Acos(ωt+ϕ) . i know both these terms are periodic but how one can use any of these equations in numericals and get the correct answer because both these terms have different trigonometric values ???

In simple harmonic motion, you can use either the sin or cos form of the equation but my question is which one do you use when and why?  I am having a tough time understanding this, so any help would be thoroughly appreciated


How can I call a method using String in Java. For example,      String a = "call";     int b = a();      private static int call() {          return 1;     }   I know that it's got something to do with reflection, but I am not sure how to get it to work.

If I have two variables:  Object obj; String methodName = "getName";   Without knowing the class of obj, how can I call the method identified by methodName on it?  The method being called has no parameters, and a String return value. It's a getter for a Java bean.


I have read these questions:           And none of these answered the viewpoint of somebody being inside the black hole. What I found out on this site is that for an infalling observer, nothing special happens (other then being spagettified) but clocks seem to run normally, and an infalling observer would not even notice the event horizon.  For an infalling observer's view, there is no such thing as event horizon. What I did not find is what does somebody see when inside the black hole? Can you look out? Can I see past the horizon?  Question:   Do I see the outside world when looking out from inside the black hole? Can I see past the horizon from inside it?

I've heard that, from the perspective of an external observer, something falling into a black hole will eventually look "frozen": light waves will move to the infrared and further into lower frequencies.  But what about that unfortunate individual falling into such a black hole? What will he/she see when looking back at our universe?   For instance, I wonder, will it be the ultimate end of the Universe? Can someone who just crossed events horizon of the black hole still receive messages from our side?


I would like to ask if there is a way to add navigation circles to the Copenhagen theme. Let me expalin it better:   1. on the left hand side of the header there is a list of the sections.  2. on the right hand side of the header there is a list of the subsections (if there are any). I don't have subsections.  I would like to have on the right hand side as many navigation circles as frames, situated at the same height as the corresponding section. I saw this configuration in some presentation, but I am unable to replicate it.  As I am unable to show you an example with a real slide, next I show a scketch of how I want the header (each x is for a navigation circle and treat · as white spaces):  |··························|····················|  |···········Section 1 | xxx·············|   |···········Section 2 | xxxxx·········|  |···········Section 3 | xx ··············|  |··························|····················|  Where section 1 has 3 frames, section 2 has 5 frames and section 3 has 2 frames.  Thanks for your help.  Mihaela

I'd like to combine the split and miniframes themes of beamer. For example, I would have the miniframes appear in the right half of the title bar (where the subsections appear). If there are any subsections, I'd have the miniframes below or next to the subsection title. This is a sample document.  \documentclass[compress,aspectratio=43]{beamer}  \useoutertheme{miniframes} \useoutertheme{split} %\setbeamertemplate{headline}[miniframes theme] \usecolortheme{whale}  \begin{document}  \section{First Section} \frame{} \frame{} \frame{}  \section{Second Section}  \subsection{sub1} \frame{} \frame{} \frame{}  \subsection{sub2} \frame{} \frame{} \frame{}  \end{document}   I won't ask if it's possible, because everything is possible with TeX, but rather whether someone can help me :)  To show what I mean, these are the headlines with miniframes:    These are with split:    And I want something like this mockup:


Currently I am working on old project developed in python 2.7 & django 1.9.13 & during development I have found below kind of code.  from django.contrib.contenttypes.models import ContentType model_type = ContentType.objects.get(app_label=app_name, model=model_name) model_type.model_class().objects.filter(id=10).update(**{'emp_comment': 'hello'})   I have read about ContentType & know how it works but still not have much clear ideas but what I am not able to figure out is **{'emp_comment': 'hello'}.  I have search online for such kind of syntax but not able to find so anyone have idea how above code works ?

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


A codebase was delivered to me for deploy and maintenance. It happens to be a very messy codebase that grow without code cleaning. So, I suspect that there is about of 80% of dead code there. By dead code here I mean legacy code that is not in use anymore, but is there sitting on the codebase. This number is more a felling than a measurement, the application is simple, there is about 3ain tables and a single flow, I've been tweaking for some months ... Also we have low low low traffic, so no millions of requests per second ...  I want to use something like code coverage to get a heat map of the code, so I can eliminate code that is for sure not in use,  did anyone tried something like that? What are the options?

How can I find any unused functions in a PHP project?  Are there features or APIs built into PHP that will allow me to analyse my codebase - for example , ?  Are these APIs feature rich enough for me not to have to rely on a third party tool to perform this type of analysis?


I have a question on topology: how to prove that $P: E\times F\rightarrow E; P((x,y))=x$ is open  such that the first question is: $f:E\rightarrow F$ is open iff $\forall x\in E, \forall V\in \mathcal{V}_x. f(V)\in \mathcal{V}_{f(x)}$  I say let $(x,y)\in E$ and $V\in \mathcal{V}_{(x,y)}$ I have to prove that $P(V)\in \mathcal{V}_x$   But I don't know how to do this.

Full question: A function $f$ from a space $X, \tau$ to a space $Y, \tau'$ is said to be open if $f(V)$ is open in $Y$ whenever $V$ is an open subset of $X$. Prove that the projection $p_i$ from the product space $X_I S_i \tau$ into $S_i \tau_i$ is open for each $i \in I$.  Attempt: Let $S = \Pi_{i \in I} S_i$ be the product space. Then, let $p_i: S, \tau \to S_i, \tau_i$ be the projection $p_i(s) = s_i$ for each $s \in S$. Then, $p_i$ is continuous for all $i \in I$.  Then, if $V_i$ is open in $S_i$, then $p_i^{-1}(V_i) = S$ is one of the open sets in the basis, namely $\{\Pi_I V_i : V_i \text{ open in } S_i \text{ and } V_i = S_i \text{ for all but at most finitely many i}\}$, and we see clearly that $V_i$ fits the criteria for all $i \in I$ because we defined $V_i$ as being open in $S_i$ and $I$ is a finitely countable set, hence there will be at most finitely many $i$ for which $V_i = S_i$.  Thus, the projection $p_i$ is open for each $i \in I$.  I'm not sure if I tackled this correctly and wanted to make sure I was on the right track or got it right.


Is there a comma before 'just' in the sentence below?  If you love yourself just ignore them because no matter how hard you try they won't understand.

There is a recommendation to put a comma after an if-clause which is placed at the beginning of a sentence. For example:     If there was the time when songs like this were not needed, I would not live to see it.   But here is the sentence:     If you had married this girl you would have been wretched.   Why does it go with no comma?


I want to make a combintronic proof for this. So far, I have we want to form a committee of k members with a president from n amount of people. Thus on the left side we can select the k members from the n amount of people and then select a president from there. How would I go about doing the Right side though?

This is a question from my first proofs homework and I am confused about the combinatorial argument aspect. I already did the algebraic proof. I think I am supposed to put into words what both sides represent? So the LHS would be the number of ways of picking a committee of $k$ members from $n$ people, or number of subsets of size $k$ from a total of $n$, but I don't know how to articulate what is happening on the RHS.


Suppose $1\le p < r < q < \infty$. Prove that $L^p\cap L^q \subset L^r$.    So suppose $f\in L^p\cap L^q$. Then both $\int |f|^p d\mu$ and $\int|f|^q d\mu$ exist. For each $x$ in the domain of $f$, $|f(x)|^r$ is between $|f(x)|^p$ and $|f(x)|^q$.   So $|f|^r\le\max(|f|^p,|f|^q)=\frac12({|f|^p+|f|^q+||f|^p-|f|^q|})$.  The RHS is integrable, and since $|f|^r$ is bounded above by an integrable function, it is also integrable. So $f\in L^r$.  Is my argument correct?    Actually is this still true when $q=\infty$? In this case, we have $1\le p < r < \infty$. Is $L^p\cap L^{\infty}$ necessarily a subset of $L^r$? Why?  Please show that if $f\in L^p\cap L^{\infty}$, then $||f||_r \le ||f|_p^{p/r} ||f||_{\infty}^{1-p/r}$  EDIT: Thanks for the link to the first part of my question. I'm still quite interested in the case $q = \infty$.

If $f \in L_p \cap L_q$ and $1 \leq p < r < q < \infty$ then $f \in L_r$.   Proof: Let $E = \{ x \in X: \left\lvert f \right\rvert \leq 1 \}$. Then, $$\int \left\lvert f \right\rvert^r \mathrm{d}\mu = \int_E \left\lvert f \right\rvert^r \mathrm{d}\mu+\int_{E^C} \left\lvert f \right\rvert^r \mathrm{d}\mu \leq \int_E \left\lvert f \right\rvert^p \mathrm{d}\mu+\int_{E^C} \left\lvert f \right\rvert^q \mathrm{d}\mu$$ $$\leq \int \left\lvert f \right\rvert^p \mathrm{d}\mu+\int \left\lvert f \right\rvert^q \mathrm{d}\mu < \infty.$$ Thus, $f \in L_r$.  I just want to make sure I am somehow not missing anything. Thanks


\documentclass[11pt]{article} \usepackage{physics} \usepackage{blindtext} \usepackage{amsmath} \usepackage{bm} \usepackage{cancel} \usepackage{sidecap} \usepackage{array} \usepackage[utf8]{inputenc} \usepackage{enumerate}  \title{} \author{Author:\\ \hfill\\ Registration Number: } \date{Date:}  \begin{document} \maketitle  \section{}  \subsection{}  \begin{enumerate}[i.]  \item my text \item my text \item my text  \noindent\rule{12.6cm}{0.7pt}  \item   \begin{equation}              \frac{y[n]}{x[n]} = \frac{1}{2}  \end{equation}  \item   \end{enumerate}  \end{document}   This is the outline of the document but I'm getting the error "missing $ inserted ... $". I've never had a problem with using the equations before so any help would be appreciated.

Is there a way to insert a blank line between two equations in align environment?  From what I understand a blank line is interpreted as \par and \par is not allowed in align. Can I disable this "feature" in align environment?  Reason:  I like my code to be in 80 column format. So when I hit M-q (fill-paragraph) without blank lines, the code looks like this:  \begin{align}   \min \sum_{k \in K} \sum_{(i,j) \in A} c_{ij} x_{ij}^k + \sum_{(i,j)     \in A} f_{ij} y_{ij} \\ \sum_{j \in V_i^+} x_{ij}^k - \sum_{j \in     V_i^-} x_{ji}^k = \begin{cases} d^k & \text{si } i = O(k) \\ -d^k     & \text{si } i = D(k) \\ 0 & \text{sinon} \end{cases} & \quad   \quad \forall i \in V, \; \forall k \in K \\ \sum_{k \in K} x_{ij}^k   \le u_{ij} y_{ij} & \quad \quad \forall (i,j) \in A \end{align}   instead of this:  \begin{align}   \min \sum_{k \in K} \sum_{(i,j) \in A} c_{ij} x_{ij}^k + \sum_{(i,j)     \in A} f_{ij} y_{ij} \\    \sum_{j \in V_i^+} x_{ij}^k - \sum_{j \in V_i^-} x_{ji}^k   = \begin{cases} d^k & \text{si } i = O(k) \\ -d^k & \text{si } i =     D(k) \\ 0 & \text{sinon} \end{cases} & \quad \quad \forall i \in   V, \; \forall k \in K \\    \sum_{k \in K} x_{ij}^k \le u_{ij} y_{ij} & \quad \quad \forall   (i,j) \in A \end{align}   which is easier (for me) to read and edit.


Lewis Namier once remarked:     Although we know that most men's actions are conditioned by factors other than reason, in practice we have to assume their rational character.   Does Namier’s assumption of the ‘rational character’ of action hold for the moderators of SE forums? My impression is that once an individual is granted SE moderator status, they have the unilateral ability to interpret and determine the underlying meaning, tone and manner of all comment threads (this matters only when threads become fractious).    Are moderators immune from justifiable accusations of procedural browbeating, bullying and goading of lower status participants?  What functions are in place that act as checks and balances on the arbitrary exercise of moderator power?

One or more of the following things happened to me on a Stack Exchange site:   My post(s) were wrongly deleted or locked by a moderator A moderator posted a wrong comment on one of my posts I was suspended, but did not do anything wrong I asked a meta question, but the question was closed and/or deleted A moderator discredited me in public ...   I think a moderator has abused their power, but I feel powerless against them.  What recourse do I have now? What can I do when I feel that a moderator has abused their power, and has been repeatedly unfair in their dealings with me?


So I wanted to automate my SSH logins. The host I'm with doesn't allow key authentication on this server, so I had to be more inventive.  I don't know much about shell scripting, but some research showed me the command 'expect' and some scripts using it for exactly this purpose. I set up a script and ran it, it worked perfectly to login.  #!/usr/bin/env expect -f  set password "my_password"  match_max 1000  spawn ssh -p 2222 "my_username"@11.22.11.22  expect "*?assword:*" send -- "$password\r" send -- "\r"  expect eof   Initially, it runs as it should.  Last login: Wed May 12 21:07:52 on ttys002 esther:~ user$ expect expect-test.exp spawn ssh -p 2222 my_username@11.22.11.22 my_username@11.22.11.22's password:  Last login: Wed May 12 15:44:43 2010 from 20.10.20.10   -jailshell-3.2$    But that's where the success ends.  Commands do not work, but hitting enter just makes a new line. Arrow keys and other non-alphanumeric keys produce symbols like '^[[C', '^[[A', '^[OQ' etc.[1]  No other prompt appears except the two initially created by the expect script. Any ignored commands will be executed by my local shell once expect times out. An example:  -jailshell-3.2$ whoami ls pwd hostname   (...time passes, expect times out...)  esther:~ user$ whoami user  esther:~ ciaran$ ls Books       Documents   Movies      Public       Code        Downloads   Music       Sites        Desktop     Library     Pictures    expect-test.exp  esther:~ ciaran$ pwd /Users/ciaran  esther:~ ciaran$ hostname esther.local   As I said, I have no shell scripting experience, but I think it's being caused because I'm still "inside of" expect, but not "inside of" SSH. Is there any way to terminate expect once I've logged in, and have it hand over the SSH session to me?  I've tried commands like 'close' and 'exit', after " send -- "\r" ". Yeah, they do what I want and expect dies, but it vindictively takes the SSH session down with it, leaving me back where I started. What I really need is for expect to do its job and terminate, leaving the SSH session back in my hands as if I did it manually.  All help is appreciated, thanks. [1] I know there's a name for this, but I don't know what it is. And this is one of those frightening things which can't be googled, because the punctuation characters are ignored. As a side question, what's the story here?

How can I use expect to send a password to an ssh connection.  say the password was p@ssword and the ssh command was ssh me@127.0.0.1  What would I do with expect to a make it input the password when it says  me@127.0.0.1's password: ?  The proper action of using an SSH key pair isn't an option because I would have to use ssh (scp) to put the key on the server, which would ask for a password.


I am trying to model a packet data with 1 dimensional CNN but I have a very imbalanced classes in my target. I have 3 classes as class 0 has 53000 cases, class 1 has 300 cases and class 2 has 150 cases. Thanks in advance! I have tried what you have suggested but I do not think I am getting a good results(loss and accuracy), from the model.

I know that there is a possibility in Keras with the class_weights parameter dictionary at fitting, but I couldn't find any example. Would somebody so kind to provide one?  By the way, in this case the appropriate praxis is simply to weight up the minority class proportionally to its underrepresentation?


Related to questions:      Is it possible for two gates to be simultaneously active on the same world?  In the Stargate SG-1 episode Touchstone, it is revealed that the N.I.D. were using the second gate around the same time S.G. one were using theirs. Yet in episodes such as Stargate SG-1's Watergate, Stargate Command is unable to dial out due to another active wormhole.

How come Earth has two Stargates, and why does one of them get "priority"?


I have been asked to design my first billboard which will be 8ft x 40ft. Can someone help me on what dimensions and dpi/ppi it is best to use on Adobe Photoshop. Thank you

For wall-sized graphics and large banners (e.g. 3m × 5m), what is an acceptable PPI for print? As I understand it 300 ppi is the typical for 'small' artworks (esp. for clean text resolution). However, for small artworks, the audience usually engages at a much closer distance. Therefore, in the interests of keeping a bitmap file down to a reasonable size, can you get away with a much-reduced PPI for a large format/banner print?


Installed Ubuntu Mate 16.04 LTS alongside Win 7 Pro last night and both times I have rebooted to Windows 7 the clock has been ~ 5 hours fast. The clock indicates correctly in Ubuntu and I selected the Central Time Zone during the Ubuntu setup. Is there a permanent way to correct this beyond resetting the clock continuously?

Dual boot system Windows XP Pro and Ubuntu 12.04.  I have the bios set for the correct time and Ubuntu set for US Eastern time.  Ubuntu will boot up and the time will be off by -4 hours.  If I correct the time in Ubuntu then when I boot up in Windows XP the time will be off by + 4 hours.  This is a fresh install of 12.04. I did not have this problem before reinstalling Ubuntu.


If $m|n$. Why the map $f\colon \mathbb{Z}_n^\times \to \mathbb{Z}_m^\times$ given by $a \mod{n}\mapsto a \mod m$ is a surjective homomorphism of groups?  Attempt: I proved it is well a well defined homomorphism because the canonical projection $\overline{f}\colon \mathbb{Z}_n \to \mathbb{Z}_m$ is a surjective ring homomorphism, it extends $f$ and maps units to units.  But I can't prove surjectiveness. Given $a\in\mathbb{Z}$ such that $(a,m)=1$ I'm looking for a $k\in\mathbb{Z}$ such that $(a+k\cdot m,n)=1$. I don't know why one of the $n/m$ candidates for such $k$ makes the number $a+k\cdot m$ an unit modulo $n$.

Not sure if this is the right proof (i found it online):   Since $n\mid m$, if we factor $m = p_1^{\alpha_1}p_2^{\alpha_2}\cdots p_k^{\alpha_k}$, then $n = p_1^{\beta_1}p_2^{\beta_2}\cdots p_k^{\beta_k} $ with $\beta_i \leq \alpha_i$. On the other hand, by the Chinese Remainder Theorem: $$(\mathbb Z_m)^\times \cong (\mathbb Z_{p_1^{\alpha_1}})^\times \times (\mathbb Z_{p_2^{\alpha_2}})^\times \times\dots \times (\mathbb Z_{p_k^{\alpha_k}})^ \times $$  $$(\mathbb Z_n)^\times \cong (\mathbb Z_{p_1^{\beta_1}})^\times \times (\mathbb Z_{p_2^{\beta_2}})^\times \times \dots \times(\mathbb Z_{p_k^{\beta_k}})^\times$$   Now, if we define: $$\pi: \mathbb Z_m \longrightarrow \mathbb Z_n,\,\,\, a+(m) \mapsto a+(n)$$  then: $$\pi: \mathbb Z_{p_1^{\alpha_1}} \times \mathbb Z_{p_2^{\alpha_2}} \times \dots \times\mathbb Z_{p_k^{\alpha_k}} \longrightarrow \mathbb Z_{p_1^{\beta_1}} \times \mathbb Z_{p_2^{\beta_2}} \times \dots \times\mathbb Z_{p_k^{\beta_k}}$$ has map: $(a+p_1^{\alpha_1},a+p_2^{\alpha_2}, \dots, a+p_k^{\alpha_k}) \mapsto (a+p_1^{\beta_1},a+p_2^{\beta_2}, \dots, a+p_r^{\beta_k})$  It suffices to show that the statement holds for $n =p^{\beta}$ and $m = p^{\alpha}$ with $\beta \leq \alpha.$ First, we notice that $(a,p^{\alpha})=1 \Leftrightarrow (a, p^{\beta}) =1$, both means that $p \nmid a$. Now, the projection: $$\pi: \mathbb Z/p^{\alpha}\mathbb Z \longrightarrow \mathbb Z/p^{\beta}\mathbb Z$$ maps $(\mathbb Z/p^{\alpha}\mathbb Z)^ \times$ to $(\mathbb Z/p^{\beta}\mathbb Z)^\times$, but $a+(p^{\alpha}) \in (\mathbb Z/p^{\alpha}\mathbb Z)^ \times$ iff $(a,p^{\alpha})=1 \Rightarrow (a, p^{\beta}) =1 $, that is $a+(p^{\beta}) \in (\mathbb Z/p^{\beta}\mathbb Z)^ \times$.  Now it is onto since if $\pi(a+(p^{\alpha})) = a+(p^{\beta}) \in (\mathbb Z/p^{\beta}\mathbb Z)^ \times$, then $(a, p^{\beta}) =1$ and this implies that $(a,p^{\alpha})=1$, so $a+(p^{\alpha}) \in (\mathbb Z/p^{\alpha}\mathbb Z)^ \times$  Then the natural surjective ring projection is also surjective on the units.


So basically I made a UI with text fields and buttons. I want to have focus on the submit button when the window first starts up, but i get a null pointer exception right on that method.  submitBTN.requestFocus();   Is there something I'm missing?

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


I would like to affect all my elements containing a class almost similar, i could iterate and use the iterator to do the job, but i am wondering if we could use a regex in this case:  $('.player').removeClass('player-1 player-2 player-3'); //player-n   Can the jQuery removeClass (and globaly the jquery methods which affects the DOM) treat a regex here ?  I am trying this:  $('.player').removeClass('/player-[0-9]+/');   The regex match i have tested it , but it doesn't work on my DOM, does jQuery support the regex in this case?

I have a div with id="a" that may have any number of classes attached to it, from several groups. Each group has a specific prefix. In the javascript, I don't know which class from the group is on the div. I want to be able to clear all classes with a given prefix and then add a new one. If I want to remove all of the classes that begin with "bg", how do I do that? Something like this, but that actually works:  $("#a").removeClass("bg*");


I am trying to extract the tar.gz folder into a new destination, but it throws the following error? How can I do the changes in Linux command to extract those folder.  $ tar -zxvf IUS17.05_g311_lnx86_GPLV3_N20170504.tar.gz /cad/local/apps/cadence/xcelium tar: /cad/local/apps/cadence/xcelium: Not found in archive tar: Exiting with failure status due to previous errors

When I run gunzip -dc /path_to_tar.gz_file/zip1.tar.gz | tar xf - in the directory where the tar.gz file is located, it extracts just fine.  How do I tell it to place the contents from the tar.gz file into a specific directory?  I tried this gunzip -dc /path_to_tar.gz_file/zip1.tar.gz | tar xf /target_directory with a tar error.  I should also note here that I am attempting to do this in a bash script and that I'm running Solaris 10.


Prove by mathematical induction that  $$\sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}$$ holds $\forall n\in\mathbb{N}$.    (1) Assume that $n=1$. Then  left side is $1^2 =1$ and right side is $6/6 = 1$, so both sided are equal and expression holds for $n = 1$.  (2) Let $k \in \mathbb{N}$ is given. Assume that for $n = k$ expression holds. Then for $n = k+1$ we get $$\sum_{i = 1}^{k+1} i^2 = \left(\sum_{i = 1}^{k} i^2\right) + (k+1)^2 = \frac{k(k+1)(2k+1)}{6} + k^2 + 2k + 1 = \frac{2k^3 + 9k^2 + 13k + 6}{6}.$$ Factoring the result we get that $\frac{2k^3 + 9k^2 + 13k + 6}{6} = \frac{(k+1)(k+2)(2k+3)}{6}$ and thus expression holds for $n = k+1$.  Combining (1) and (2) we can conclude that the expression holds $\forall n \in \mathbb{N}$.    I have a few questions:   Is my proof correct? If you would be a math professor, is this style of writing math proofs right and sufficient for freshman? Or is there something I miss?


I'm new to the Linux world but decided to try Ubuntu and so far I like it.   But after installing the ATI driver a weird thing occured. Whenever I turn on my laptop, it starts normally up to the part where I can choose the OS I'd like to boot (with purple background) and when I hit Enter to boot the Ubuntu, it just beeps and stays black, nothing happens.  I tried to find a solution but got nothing so far.  When I boot in recovery mode (root) and try to purge the driver, 3 lines appear :  W: Not using locking for read only lock file /var/lib/dpkg/lock E: Unable  to write to /var/cache/apt/ E: The package lists or status file could not be parsed or opened.   It's like that will all commands I try.  I'd really like to use Ubuntu and maybe at some point I'll remove Windows entirely but for now it's just unusable.  I have a request, if someone replies, please try to explain everything step by step since I'm new to this.   P.S. I am really sorry if there is already a post answering to this.

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


am very sure that my graphics card nvidia geforce 210 is causing BSOD, because when i remove the graphic card and use the on-board graphics there are no such errors.   I have got 3 BSODs up to date. the 3 dump files are   Please go through the dump files and help me fix the issue.   thank you in advance.

I've started getting random blue screens from my (admittedly aged PC). Unfortunately it reboots straight away so I don't get chance to read the error. It's been happening when browsing Stack Overflow in Google Chrome and Firefox so I'm assuming that it's something fairly fundamental.  Most of the time it puts up the "Report the error to Microsoft" dialog and I've checked the data files it wants to send but can't find the information there. I'll freely admit I could be looking in the wrong place.  I'm running Windows XP SP3 and I'm fully up to date with the updates.  The CPU is an Athlon XP 2600+, I've got 2 GB of RAM installed, an nVidia Quadro4 980 XGL driving two DELL 2001FP flat panels at 1600 x 1200 pixels (32 bits/pixel).  I've checked the CPU fan (which has been recently replaced) and that seems to be turning freely. The insides are a little dusty, but not excessively so.  So I need to either stop it rebooting or find out where the error code is stored so I can read it after the reboot.  UPDATE 22/09/2009  OK - just had the BSOD and it's in win32k.sys. I'm doing some research to see if I can find anything that might help. If I get stuck I'll post a new question. Thanks for all the suggestions.


I need to look up for agreements from '2014-06-01' to $today. I am trying to make loop.   $today=date('Y-m-d 00:00:00');  $first_day=$my_counter['Counter']['created'];  $pointer = $first_day;            while ($pointer < $today) :             echo $pointer."<br>";             $pointer = $pointer + '24:00:00';  // +86400 or +1d not work                         endwhile;

Say I have a string coming in, "2007-02-28", what's the simplest code I could write to turn that into "2007-03-01"? Right now I'm just using strtotime(), then adding 24*60*60, then using date(), but just wondering if there is a cleaner, simpler, or more clever way of doing it.


Suppose that there are $N=4$ points ($A,B,C,D$) on a 2D space. Connect the four points, and then form a quadrilateral $Q$. After unknown linear transformation (shifting, scaling and rotation), we obtian a new quadrilateral $Q'$. If we know the new coordinates of $Q'$, namely   $A'=(x'_1,y'_1),B'=(x'_2,y'_2),C'=(x'_3,y'_3),D'=(x'_4,y'_4).$  Also we know the coordinates of $A,B,C$  $A=(x_1,y_1),B=(x_2,y_2),C=(x_3,y_3).$  The points $A,B,C$ are not colinear.   Question: How to obtain the coordinates of point $D$?  Generally, if $N=100$, what's the solution?   Similarly, we konw the coordinates of $Q'=\{(x'_1,y'_1),(x'_2,y'_2),...,(x'_{100},y'_{100})\}$, and the non-colinear three points $A=(x_1,y_1),B=(x_2,y_2),C=(x_3,y_3).$    To make the question be more interesting, I further consider that even after a rigid transformation, it is unlikely that the known points will precisely align, since the pratical measurements used to localize the points are likely to have errors.  I also found a solution, named coordinate system registration:     The approach is given by solving the follwing optimization problem  $(t,s,R)=\arg\min\limits_{t,s,R}\sum\limits_i^N\Vert Q''_i-Q'_i\Vert^2$,   s.t.   $Q'_i=sRQ_i+t$  where $Q''$ represents the one obtained by measurement$, s$ the scaling operation, $R$ the rotation, and $t$ the shift. The link above gives the close-formed solution of $s,Q,t$.   Share with someone with interest!

Consider a plane $\mathbb{R}^2$ and an affine transformation $T: \mathbb{R}^2\to \mathbb{R}^2$ that maps points $A,B,C$ to points $A',B',C'$ correspondingly. We know that $A,B,C$ are not on the same straight line and so $T$ is determined uniquely. Given an arbitrary point $M$ how to find $T(M)$?  Basically, I'm trying to write a program that takes as input 14 numbers—the coordinates of the points $A,B,C, A',B',C',M$ and outputs two numbers—the coordinates of $M'=T(M)$, provided $A,B,C$ are not on the same straight line. How should I proceed?


I have a shapefile consisting of Ireland District Electoral Areas (DEA), in which there are over 3000 polygons. Secondly, I have a shapefile consisting of the Land Use classifications in Ireland. A DEA in the first shapefile can contain many classifications from the second shapefile. So far, I have used the ArcGIS union tool to combine both shapefiles, but I'm unsure how to proceed. I'm wanting to record in a separate column of the attribute table, the dominant land classification per DEA. I only want to know the dominant land classification (in terms of the DEA) and not the rest of the classifications intersecting that DEA. Here is a sample figure of the unified DEA and Land Use classification shapefiles, categorised by land use. It is easier to see in the pink regions the outline of the DEA in which there can be numerous land classifications.

First, I have a shapefile consisting of square grids and each grid has an ID. Second, I have a shapefile consisting of different zones (with IDs).  A grid ID in the first shapefile can contain many zone IDs from the second shapefile.  I want to know what is the dominant zone ID inside a grid and record that in a table. I only want to know the dominant zone (in terms of the area) and not the rest of the zones intersecting that grid. In the end, I would want a 2-column table with all the grid IDs in the first column and the corresponding dominant zone ID (or the largest zone in terms of area) in the second column.  Here is a sample figure.  By just looking at the figure, I could tell that in Grid ID 1, the dominant zone/area is Zone ID 1.  In Grid ID 2, the dominant zone/area is Zone ID 2.  And in Grid ID 3, the dominant zone/area is Zone ID 3.  I would like to have a table with two columns, with each grid showing only the ID of the dominant area.


One of my server computers shows a "broken pipe" message while I'm using SSH after 10 minutes even though I execute simulation program programmed with python3.5.   I tried    Editing sshd_config and ssh_config files Ignoring power-save mode Re-installing Ubuntu 16.04 Using tmux for the simulation.    In addition, after the disconnection between the server and local client, I tried tmux attach command but it didn't work.   The most weird thing is only the one server shows this symptom. Other server works well without any broken pipe message.   What should I do?

What can I do to configure SSH on both client and servers to prevent Write Failed: broken pipe errors? It often occurs if you sleep your client computer and resume later.


One of the stack sites I'm a member of has always made me feel that it is too harsh on beginners. Those with several Ks of reputation act too strictly on beginners in comments. For example, in some questions which are not asked in proper technical language, but it is very apparent that what one beginner is trying to ask, they'll show-off some "heavy"  words and/or try to troll the questioner and are more likely to demoralise than help an individual. It adversely affects both, questioner and impression of the stack community on a visitor.   Like come on,  we all once started from beginning, why can't we be kind? Until when are we going to allow bullying in comments? Haven't you felt that trolling anytime? Am I the only one who feels like that?

There is a distinct decline in the level of civility on all the sites here.  Some of this is due to new users coming in and posting spam and other nonsense, but the off-topic and downvote buttons are doing a pretty good job of keeping this under control. Unfortunately, a lot of this is coming from more experienced users, and the site's built-in moderation system does not (and probably cannot) handle this very well.  Folks are rushing to pound new users down with "this belongs on meta!", "this is off topic", "this is a duplicate!" and "read the Help!". (Which is correct, but should be done nicer) All this, of course, is accompanied by a flurry of downvotes.  This is not very welcoming to new users who don't know about meta, the Help, or what counts as off-topic. Now I am not proposing that we just allow off-topic, meta, or duplicate questions.  However, I think we could be gentler in the way we express these sorts of things.  Explain what meta and the FAQ are and provide useful links.  Just using please and thank-you when asking folks to read the FAQ or post something on meta would be an improvement.  I also think we could rein in the downvoting a bit.  Not that we shouldn't vote stuff down, but unless a new user's post is clearly spam, voting it down to -1 or -2 should be sufficient to send a message without piling on. I like Stack Exchange and I want it to become a resource for everyone, not just an elitist site for high-rep users on the sites.


My /dev/sda1 is 465.76G space on Gparted which is Mount/Inuse I need to create a separate partition of 60G space for kali Linux. The Unallocated space can it be increased and used for installation?   I will be grateful if anyone can help me out with this.

So I've been having some trouble recently with Ubuntu and decided it was time to switch to windows. But I have no ntfs partitions on my hard disk and GParted will not let me resize my one large partition (/dev/sda1) so that I can allocate some ntfs space to install windows on.  Any help would be greatly appreciated, I've had this problem for quite some time now and it had just become one big headache.  Thanks in advance!


int main(void) {   int a=0, b=20;   char x=1, y=10;   if(a,b,x,y)     printf("bye");   return 0; }   How does "if" condition in the above code work work? Would the value of "y" be only considered by "if"?


Disclaimer: This might seem like a very dumb question. But I rather ask it and learn than to never ask at all and always wonder. Also, to me it is confusing, you guys are probably much more advance in math than I am.  Let's say you have a "zig-zag step" pattern, you can show that the the total length of the diagonal zig-zag step is 20 for a 10 in by 10 in width and height. As shown in the picture. But as you make the "zig-zag" smaller and smaller the "zig-zag" total should still remain 20, but instead it seems to be $10\sqrt{2}$. I get this it is a triangle now and this is the formula for the diagonal of the triangle, but if the diagonal can really be made of this zig-zag step pattern where the zig-zag are infinitely small, shouldn't it be 20 by that logic?  I get the Pythagorean theorem and everything, but in terms of calculus a the zig zag steps can turn into a triangle by making the length of an individual zig-zag infinitely small, making infinitely many zig-zags. So why is it $10\sqrt{2}$, over $20$.

What is wrong with this proof?    Is $\pi=4?$


sum= 0; for (i = n; i > o; i = i/3)    for (j = 0; j < n^3; j++)                  sum++;  what is the time complexity (in Θ- notation) in terms of n?  so far, i've gotten to this point:  The running time is O(n^3).Because the for loops’ conditions are depend on n and n 2, respectively i don't feel right about it. would appreciate any help, thanks.

sum = 0;  for (i = 0; i < n; i++)    for (j = 1; j < n^3; j = 3*j)                  sum++;   what is the time complexity (in $\Theta$-notation) in terms of $n$?  so far, this is what i've done: The running time is $\Theta(N^4)$  Because the for loop’s condition is depend on $n$ and is incremented by $1$, and  then inside running time is $\mathcal{O}(1)$. i feel i'm wrong here. any help would be appreciated.


I have a folder showing read only attributes. I am logged in as administrator. Tried unchecking the mark. Explorer shows "updating attributes", but when I check attributes again it has the read only check mark again. Ran cmd as an administrator and executedattrib -r /s /d to no avail. changing the owner to myself didn't help either. This is my folder with documents, and I don't have any of them open.  What can be locking files in read only state? How can I change that?

I have some files/directories on an external hard drive connected using USB to my Windows XP laptop. I am trying to delete those files but every time I try, I get an error "Cannot delete ....: Access Denied. Make sure disk is not full or write protected and that the file is not currently in use".  I checked that the directory is not is use. However, the permissions are set to read-only. Even if I remove the "read-only" checkbox, in Properties->Attributes, it automatically comes back again. How do I fix this? Is it a virus that is automatically changing it back to read-only?  regards,  JP


Let's suppose $R$ is a ring and $D \subset R$ is a multiplicative subset.   If we look at these two $D^{-1}R$-modules:   $D^{-1}(\operatorname{Hom}_R(M,N))$ and $\operatorname{Hom}_{D^{-1}R}(D^{-1}M,D^{-1}N)$ and consider the naturally defined homomorphism from $D^{-1}\operatorname{Hom}_R(M,N)) \rightarrow$  $\operatorname{Hom}_{D^{-1}R}(D^{-1}M,D^{-1}N)$  is there an example of $R, D, M, N$, when the homomorphism is not an isomorphism?

Let $M,N$ be $R$-modules with $M$ finitely generated and let $S\subseteq R$ be multiplicatively closed. Then there exists a module isomorphism   $$S^{-1}\text{Hom}_R(M,N) \xrightarrow{\sim} \text{Hom}_{S^{-1}R}(S^{-1}M,S^{-1}N).$$   As homework, I found a 'proof' of this statement. However,  claims to prove me wrong. I am having trouble in finding the error in my proof. Could someone help me out?  I did prove there exists a map $\phi:S^{-1}\text{Hom}_R(M,N) \to\text{Hom}_{S^{-1}R}(S^{-1}M,S^{-1}N)$ defined by $f/s\mapsto(m/t\mapsto f(m)/st)$, and I am fairly confident that it contains no mistake.     Proof: Let $m_1,\dotsc,m_n$ be the generators for M. Let $f\in \text{Hom}_{S^{-1}R}(S^{-1}M,S^{-1}N)$ be given.   Choose $n_i\in N$ and $s_i\in S$ such that $f(m_i/1)=n_i/s_i$.   Define $\pi_f = s_1\dotsm s_n$. Then   $$\pi f(m/1) = \pi f\left( \sum_{i=1}^n r_i m_i \right) = \pi \sum_{i=1}^n r_i f(m_i) = \pi \sum_{i=1}^n r_i n_i/s_i = \left(\sum_{i=1}\left(\prod_{j=1, j\neq i}^n s_i\right)r_in_i\right)/1,$$   so $\pi f(m/1) \in N$ using the canonical embedding in $S^{-1}N$, so $m\mapsto \pi f(m/1)$ is a map $M\to N$ and is clearly an homomorphism.   If we define the map $\psi:\text{Hom}_{S^{-1}R}(S^{-1}M,S^{-1}N)\to S^{-1}\text{Hom}_{R}(M,N)$ as $$ f \mapsto (m\mapsto \pi_f f(m)) / \pi_f,$$ then we clearly have a homomorphism if it is well-defined.      Proof: It remains to check that the element we map to does not depend on choice of $\pi_f$.   But if we have both $\pi_f$ and $\pi_f'$ for which $\pi_f f$ and $\pi_f' f$ are homomorphisms to $N$, then   $$(\pi_f f(m))/\pi_f = (\pi_f\pi_f' f(m))/(\pi_f\pi_f') = (\pi_f' f(m))/(\pi_f')$$   for all $m\in M$, so $\psi$ is in fact well defined.   It is now easy to check that $\psi$ and $\phi$ are inverses, which makes them homomorphisms.


I used Jmeter to test stress of my application, i can check information of server RAM, CPU while testing. Base on the information, how can i calculate value of highest CCU (concurrent users) while the server can run well.

This is a  about capacity planning for web sites. Related:      What are some recommended tools and methods of capacity planning for web sites and web-applications? Please feel free to describe different tools and techniques for different web-servers, frameworks, etc., as well as best-practices that apply to web servers in general.


If p is the probability that a man aged x will die in a year then the   probability that out of n men $A_1, A_2 ,A_3 ...A_n$, each aged x,   $A_1$ will die in an year and be the first to die is: ?      a) $1- (1- p)^{n-1}$       b)$(1-p)^n$      c) $\dfrac 1n [1- (1-p)^n]$      d) $\dfrac 1n (1-p)^n$   Attempt:   Order of dying matters.   Choose $r$  out of $n-1$ and arrange them (i.e. their deaths) in $r!$ ways.   So $P(E)  = p\times{^{n-1}C_0} (1- p)^{n-1}+ p \times p\times {^{n-1}C_1} (1-p)^{n-1} + p\times p^2 \times 2!\times {^{n-1}C_2} (1- p)^{n-2}+...$  $\implies P(E) = p \sum_{r=0}^{n-1} {^{n-1}}C_r (1-p)^{n-1-r}p^r \times r!$  But this doesn't match any of the options.   Could someone please tell me where I have gone wrong?   Edit: My prime focus is the mistake that I have made in solving which that question doesn't cover. therefore, please don't mark it as a duplicate

Let $p$ be the probability that a man aged $x$ years will die in a year time.Then what is the probability that out of $n$ men $A_1,A_2,....,A_n$ each aged $x$ years,$A_1$ will die and will be the first to die?  The probability that a man aged $x$ years will die in a year time$=p$  The probability that a man aged $x$ years will not die in a year time$=1-p$  But from here on,i got stuck.Some hints and suggestions are welcome.


Important Notice: Observe that although this question is very similar to many other questions such as the one in , this problem only assumes continuity at $0$, but not on $[0,1]$. Here is the question: Assume $g$ is (Riemann) integrable on $[0, 1]$ and continuous at $0$. Show $\lim_{n \to \infty} \int_0^1 g(x^n) dx = g(0)$. My attempt at this question: I split up the integral into two parts from $[0,1-\alpha]$ and $[1-\alpha,1]$. For $[0,1-\alpha]$, there is uniform continuity, so the limit $n \to \infty$ can be shifted inside the integral to get $g(0)$. But how do I keep the integral over $[1-\alpha,1]$ to be small? Note: This is Exercise $7.4.10$ in Abbott, Understanding Analysis, 2nd edition.

$$\lim\limits_{n\to\infty} \int_{0}^{1} f(x^n)dx = f(0)$$  when f is continuous on $[0,1]$  I know it can be proved using bounded convergence theorem but,  I wanna know proof using only basic properties of riemann integral and fundamental theorem of calculus and MVT for integrals ...   Thank you.


I just rendered an image with the 1920 x 1080 resolution, but when the image was done rendering it was 960 x 540. I don't know why it is coming out different from the dimensions specified in the render, what is the reasoning behind that? This is a Cycles Render, if that makes a difference. My rendering setup below:

When I hit F12 to render an image and zoom in it is quickly pixelated. How can I render a higher res display? I have looked through the settings and couldn't find a solution.


I checked implementation of System.out.println(), which is as follows and I have read  question.  public void println(int x) {     synchronized (this) {         print(x);         newLine();     } }   According to above implementation the lock is on this object, so what is the advantage of using synchronized block instead of synchronized method in the above case?

Can any one tell me the advantage of synchronized method over synchronized block with an example?


Someone know how to cron a salesforce job every 3 months, on the 1st at 9am? any ideas?

We need to accomplish the following:  On the 1st day of each quarter, we would like to update all open opportunities that have "close date" in the past quarter and set the new "close date" to be the last day of this new quarter.  I'm new to SFDC, but from my research it seems triggers or Time-dependent workflow may not do this. Can we write and schedule a cron script to do this?  Any help will be greatly appreciated! Thanks!


My motog 2 is draining the battery drastically as fast as it can. Please help me. I couldn't carry a charger all the tym. I have consulted the customer care service they provided me two links to reboot and reset the settings. But it doesn't works. Help me thank you.

What can I do to get better battery life on my Droid? Battery life seems awful. Less than 15 hours or so on normal usage.


We know every Hilbert Space $\mathcal{H}$ is isometrically isomorphic to its dual, not linearly but antilinearly. This is carried out by defining $\mathcal{H}_*$ to be same $\mathcal{H}$ in the sense of additive group and by altering the scalar multiplication in $\mathcal{H}$. We define $\lambda.x=\bar{\lambda}x$ in $\mathcal{H}_*$ and a new inner product $\langle x,y \rangle_*=\langle y,x \rangle$. Then $\mathcal{H}_*$ is a Hilbert space with the norm being the same as $\mathcal{H}$. Then the map $v:\mathcal{H}\rightarrow (\mathcal{H}_*)^*$ such that $v(x)y=\langle y,x \rangle_*=\langle x,y \rangle$. This map is the desired isometric isomorphism. Now my question is that if this property is satisfied by any Banach space $X$, then can it be made into a Hilbert space? I would just like to mention that the examples I could think of were mainly $\mathcal{L}_2(X,\mu)$ and the space of Hilbert Schmidt operators $\mathcal{L}_2\mathcal{(H)}$.

Let $X$ be a Banach space and suppose that $X$ is isometric to its continuous dual space $X^*$. Must $X$ be hilbertable in the sense that there exists an inner product which induces the norm on $X$? The converse of this statement is the Riesz representation theorem for hilbert spaces; I am wondering if the theorem can be stengthened to "if and only if".


I am using conditional formatting with a custom formula. I want to highlight rows in the range A2:B11 if the values in $B2 (column B starting at row 2) is greater than the value in the cell D5.  I can get it to work if I "hardcode" the value (which I presently happen to know to be 326), by using the formula =$B2>326; but if the value changes, I don't want to have to update the formula. How can I refer to the value in cell D5? I tried =$B2>D5, but that doesn't work (and I don't know why).

This is more a curiosity question than a fix to a problem, because I found a few ways to fix it already.  From what I could gather, if I want to apply a conditional formatting based on the value of another cell, I have to use a custom formula. However, in the list, there are a couple options that would seem to be much more relevant: "Greater than (or equal to)", "Lesser than (or equal to)", "Is (not) equal to", "Is (not) between". But I'm starting to think that they are not so useful.  Here I have a column of numbers ranging from 10 to 30; I want to highlight them in green if they're greater than or equal to a number (20) set in another cell. From a few other questions here and on SO, it would seem that I should use a custom formula as something like =K7>=K4, but instead I still wanted to try the options in the list that seemed more intuitive.    As you can see though, it does some weird things, where it consider 11 to be under 20 (which is true AFAIK), but everything else above 11 is either equal or greater than 20.  My guess is that putting =K4 in the "Value or formula" field didn't quite link to the actual K4 cell, but I can't figure out why it does what it does here.  If I put "20" in the field, it highlights the right cells (but it's not dynamic anymore).  Edit: putting =K$4 works like a charm. Quite literally, in this case.


$$ \frac{\sum_{r=0}^{24}\binom{100}{4r}\binom{100}{4r+2}}{\sum_{r=1}^{25}\binom{200}{8r-6}} $$  I tried this problem using Complex number approach and arrived at the solution. When I tried the numerical 'normally' by summing up the binomial coefficients using various properties I was encountering some difficulty in simplifying it.  Can anybody give an alternate approach to this problem?


Find all integer solutions for $$x^3+1=y^2.$$   Attempt: By guessing, I found five pairs of integer solutions for the equation: $(2, \pm 3)$, $(0, 1)$, $(-1, 0)$ and $(0, -1)$, but really I don't know how to solve it analytically without guessing. Some people lead this problem to the Catalan?

How to prove that the only integral solutions to the equation $$y^{2}=x^{3}-1$$ is $x=1, y=0$.  I rewrote the equation as $y^{2}+1=x^{3}$ and then we can factorize $y^{2}+1$ as $$y^{2}+1 = (y+i) \cdot (y-i)$$ in $\mathbb{Z}[i]$. Next i claim that the factor's $y+i$ and $y-i$ are co-prime. But i am not able to show this. Any help would be useful. Moreover, i would also like to see different proofs of this question.  Extending Consider the equation $$y^{a}=x^{b}-1$$ where $a,b \in \mathbb{Z}$ and $(a,b)=1$ and $a < b$. Then is there any result which states about the nature of the solution to this equation.


Is the following statement true?     A continuous function $f:\mathbb{R}\rightarrow\mathbb{R}$ is injective if and only if $f$ is strictly increasing or strictly decreasing.      If it's true give a proof. If it's false give a counter-example.    I think the answer is false but I just can't think of a counter-example. Any help would be useful.

I would like to prove the statement in the title.  Proof: We prove that if $f$ is not strictly decreasing, then it must be strictly increasing. So suppose $x < y$.  And that's pretty much how far I got.  Help will be appreciated.


The differences between adjacent squares are the odd numbers:  0 1 4 9 16 25 …  1 3 5 7  9 …  The differences between adjacent odd numbers are 2 = 2!  I found that this truth is more general: If the differences between adjacent powers of $n$ are written out, and the differences of those differences etc, the $(n+1)$th sequence is {n!, n!, …}  Is this a well-known theorem? Does it have an easy proof?

Consider a function such that it takes in polynomial function and creates an array of its outputs and then using that array creates another new array by calculating the absolute difference between the first $2$ values and keeps doing this until it reaches an array full of zeros.    This is much easier to show you by example.  For example take $F(x)= x^2$, the first array would be   $1,4,9,16,25,36,49,64,81$ and so on, the second would be  $3,5,7,9,11,13,15,17,19$ ( the difference between the first value and the second one)  but the third one is where it gets interesting as if we continue the pattern we would get an array filled with only $2$'s and after that it would only be zeros.  Lets do another example, $F(x)=x^3$  $1,8,27,64,125,216,343$  $7,19,37,61,91,\dotsc$ but here is the interesting part if we continue this   $12,18,24,30,\dotsc$ and once more then we get   $6,6,6,6,6,\dotsc$ after that it would just be an array of zeros  There are $2$ main observation that I made about this  Firstly, the value that is begin repeated indefinitely is equals to the factorial of the functions power. Meaning that for $F(x)=x^2$ the value being repeated is $2!$. For $F(x)=x^3$ , it's $3! $ and this is true for all polynomials (I tried it up to $x^7$, after that it got too messy)  Secondly, the value that is repeated always occurs on the $n$th iteration of the function. Meaning that for $F(x)=x^2$, we have to go through the processes $2$ times before we find the value. For $F(x)=x^3$, we have to go through it $3$ times before getting the value.  Is there any way to prove this and does this mean anything at all?


I was writing a pretty long title and nobody told me that I reached 196 chars already... everything seemed to be ok.        But then I removed focus from the title box and... suddenly saw that apparently I have already written more than 150 chars!        Could it tell me before I remove the focus? I mean, it should say that I exceeded the limit while I am writing, not after I write my title.

I just ran into this while writing .  [I originally wrote:     you need a minimum of X reputation to comment on questions that are not your own, and on answers that are not to your own questions   But had to shorten it to:     you need a minimum of X reputation to comment]   First, it didn't tell me that I'd gone over the character limit for the title until after I had already tabbed out of the title field.  Second, it didn't tell me how much I'd gone over or anything. I had to copy-paste the text I'd written into my text editor in order to get some real-time feedback on the exact character count, to help figure out how to best shorten it.


let $V$ be a real vector space. I would like to know what is meant by a "polynomial map" $f:\times^k V\rightarrow \mathbb{R}.$  I suppose the space $\times^k V$ is the cartesian product $V^k$ and therefore a vector space by itself. In algebra textbooks I could found the definition of polynomials $R[X]$ or even $R[X_1,...,X_n]$ for any ring $R$. But in the above situation, $\mathbb{R}$ is the only ring I can recognize.   My background is more in the realm of analysis than in algebra. So I would be very happy if anyone can tell me with my issue in simple language...  Best wishes

My advisor and I are working through a paper on partition functions, and we got to the following passage:     Fix $n \in \mathbb N$ and let $W := ((\mathbb R^n)^{\otimes 3})^{C_3}$, where the $C_3$ means that we are looking at the subspace that is invariant under cyclic actions. Let $\mathcal O(W)$ denote the algebra of polynomials on $W$. For any $q \in \mathcal O(W)$, let $dq$ denote its derivative in $\mathcal O(W) \otimes W^*$.   We have been completely unable to track down any books or other sources on this algebra of polynomials. The paper does not have any references in this paragraph, and none of the references define these polynomials. I'm now wondering:  1) Are there any books or articles that explain what this algebra of polynomials is? The section on multilinear algebra in our library contained no books explaining it, and googling doesn't seem to turn up anything relevant.  2) Could anyone tell me what an element in this algebra looks like?  3) How is the derivative of this kind of polynomial defined? If it was just a formal derivative, shouldn't it be in $\mathcal O(W)$, not $\mathcal O(W) \otimes W^*$?


Let's say I have git commit history like this(newer -> older):  C -> B -> A  after C's commit, I came to realize that there is something wrong with A.Maybe a test case which is suppose to be in that commit,but actually it wasn't there. So how can I deal with this situation? Make a new commit and melt it into A?how?  Problem solved:   git checkout A git checkout -b fix edit git add files git commit --amend git rebase fix master

Suppose you have:  A-B-C   Now your build/test fails. The fix should be merged in A.  My current work-flow is like this:  $ git commit -m "fixA"  A-B-C-fixA  $ git rebase -i A~1   And squash fixA in A, result in:   A'-B-C   Is there a command to do something like:  A-B-C + (index with fix for A)  $ git commit -supperdupper A    Result:  A'-B-C


I need some help in doing a logic that would convert a numeric value to corresponding MS Excel header value.  For example:  1 = "A" 2 = "B" 3 = "C" 4 = "D" 5 = "E" ......... 25 = "Y" 26 = "Z" 27 = "AA" 28 = "AB" 29 = "AC" 30 = "AD" .........  Would appreciate some .NET codes (C# or VB) for this. Thanks.

How do you convert a numerical number to an Excel column name in C# without using automation getting the value directly from Excel.  Excel 2007 has a possible range of 1 to 16384, which is the number of columns that it supports. The resulting values should be in the form of excel column names, e.g. A, AA, AAA etc.


Problem: Show that the product of any five consecutive positive integers cannot be a perfect square.  Proof: Let $N=n \times (n+1) \times (n+2) \times (n+3) \times (n+4)$, where $n \in \mathbb{N}$. We know the that N must have at least:    one factor is divisible by 5,  two or three factors are even,  one factor of the even factors, is divisible by $4$,  and one factor is divisible by $3$.   To proof the statement above we need to assume that the product of any five consecutive positive integers is a perfect square to lead us to a contradiction. Hence, I know there will be cases for us to test for. However, I am unsure where to start after mentioning everything above. Can anyone help me from here?

How can we prove that the product of $5$ consecutive integers cannot be a perfect square?


I came across the following problem and I have been cracking my head with it:  Prove or disprove that there are no functions $f$ and $g$ such that   $$f(x,g(y-x)+g(z-x))=y^2+z^2$$  for all $x,y,z \in \mathbb{R}$.  The point is that I never had contact with functional equations before so I don't even have the idea of how to start this.  However I did try some things, but I don't really know what to do with them exactly because I lack theory.  Considering $y=z=\alpha$, leaving $x$ free, this yields:  $$f(x,2g(\alpha-x))=2\alpha^2$$  Also, if I consider $x=y=\beta$, leaving $z$ free, this yields:  $$f(\beta,g(0)+g(z-\beta))=\beta^2+z^2$$  And, if I consider $x=z=\gamma$, leaving $y$ free, this yields:  $$f(\gamma,g(y-\gamma)+g(0))=y^2+\gamma^2$$  Finally, if I consider $x=y=z=\delta$:  $$f(\delta,2g(0))=2\delta^2$$  Could you help? Also, would appreciate some suggestions for basic literature in functional equations.

How do I show that if there are functions $f,g$ such that$$ f(g(x)+g(y))=bx+cy $$holds for all $b,c\in\mathbb{R}$, then we necessarily have $b=c$? Is this even true? It seems so, but I'm just not sure how to explain it in detail and using theory from functional equations. Any ideas?  Extra: In addition, I'd like to prove that there are no pair of functions $f,g$ such that$$ y^2+z^2=f(x,g(y-x)+g(z-x)). $$ Any ideas on how to prove this? Plus, does anyone know some literature regarding this type of problems?


Why is it that comparison of two strings having identical contents (s1==s2) returns true but (s3==s4) returns false if we initiate s1 and s2 with "=" but s3 and s4 with String constructor? #JAVA Like  String s1="s"; String s2="s";  String s3= new String("s"); String s4= new String("s");

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 installed a program (taskwarrior.org) manually --- cmake, make, make install, etc.  How do I completely uninstall a program installed this way?  There was no 'uninstall' script in the downloaded zip file.

I used source code to build one package such as below:  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib --with-package-name="Myplugin" --with-package-origin="http://www.ubuntu.org/" --enable-gtk-doc --disable-static make make install   But unfortunately, i discovered that its the latest version, and has lot of bugs, so i need to remove it/uninstall it. But how can i do so? I tried make clean; make uninstall but still i see it exist:  # pkg-config --list-all | grep Myplugin myplugin-.... $ ls /usr/lib/myplugin/libXYZ.so exist....   How do you remove this now?


Currently, I'm at 52 when Team Kakashi meets Sasuke. I really want to see Naruto in sage mode which is somewhere around 150 episode. So which all episodes (fillers) can I skip?

For both the original Naruto series and Shippuuden, which episodes should I watch if I want to avoid the filler? I'm only interested in core plot and character developments.  To make this question a bit more concrete: Which episodes are directly based off the manga, and which were produced with unique content for only the anime? At what points did the anime "catch up" to the manga and require non-manga-related content to continue airing episodes while the manga produced new content?


I calculate a data log likelihood (evaluated at a set of parameters to be estimated), and my task is to find the set of parameters that maximize my log likelihood.  My problem is: thought there are a bunch of matlab optimization algorithms that can give me the estimated parameter (like fminserch, patternsearch), they don't give the t-stats (or standard error) of each estimate....So if I want to check the robustness of the estimation, what should I do?  Thank you :)


So I want to subdivide this wall but whenever I try to subdivide this face the edge I have marked gets subdived for some reason.How can I fix this?

I want to subdivide a face whose neighbour's faces are subdivided.   Here is an example of such a face:    How can I subdivide selected faces?


I create a cron by crontab -e and enter: 00 17 * * * mkdir /root/file1  at time 17:00 I don't find a file1 created by cron.... Please tell me what I do....

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


I can clock the PWM to drive motors at most any reasonable frequency, but is there a "best" PWM frequency for motor control?  What must be considered when choosing a PWM Hz? Is there a most efficient Hz per motor?  If so, is there a way to calculate that based on measured motor characteristics such as L, C, and R?    (This is the  we are using to drive an antenna rotor.)

I'll be using a microcontroller to create a PWM signal for motor control. I understand how PWM and duty cycle works, however I am unsure about an ideal frequency. I do not have my motor in yet, so I can't just test it and find out.  The picture depicts a graph of RPM vs Voltage. It's linear from 50 RPM @ 8 V to 150 RPM @ 24 V. I will not be varying voltage, just the time it receives a given voltage. So can I assume a linear response? At a 10% duty and 24 V supply it would run at a speed of 15 RPM? If it makes a difference, I'll include the setup. I am running 24 V directly to an H-bridge that controls the motor. Obviously I have two PWM pins going from the MCU to the gates of the two enable MOSFETS.


I just started learning Blender yesterday (via blender guru's doughnut), so I'm pretty new to this, though I have some experience using Maya in college. That was a few years ago so I'm pretty rusty in all regards. I decided to try making something on my own now and I thought that the blockbuster sign would be fun to design.   I have the shape all finished, now I just need to slap the decal on there that says "Blockbuster" - and this is where I'm running into trouble. I'm sure this is absurdly easy but I can't figure out how to get this image onto my model. I've been searching for a video to find out how to do this for like an hour with no luck. If anyone could point me in the right direction, that would be great!

I'm designing this animal-type creature, and want to add a transparent .png image to its face with the face features (object has a subsurf). On the left is the image with the features, on the right is the part of the object where I want it to be.    I tried to import the image as a plane, but matching the shape of the plane with the face didn't work, and the lines of the face left shadows on the head, and could be seen as a different object from some angles (although it's the closest I've gotten yet). It looked like this:    So , I tried selecting the faces of the head that the features should go over, and create a new material for it. Unfortunately, since the .png is transparent, the result produced was this:    (where it's impossible to tell the transparency from a black background default color, and where I wouldn't know where to start to adjust size and position).  I also tried UV mapping, but then the whole object became black with the features repeated all over.   Is it something I have to go into Nodes for? I'm kind of stuck here. Creating a new material and applying it is simple, but applying a material that is an image is a bit more complex it seems... Ideally, I would reproduce the same technique for the adhesive bandage on its arm (seen on the right of image 1).


Example: If someone says they're wrong and they're right, so someone corrects them, telling them they're right, they deny it again, can you say "You're" instead of "You are"

Possible Duplicate:    I was having an SMS conversation with a friend and somehow "Yes you're" came into play in retaliation to a comment. Example:  Person 1: "You are bad at English". Person 2: "No I are not.". Person 1: "Yes you're".  Is that acceptable? I would assume that it is. Think of "don't". You can say:  "No, don't."  or  "I don't."  and it is a contraction like "you're". So, is it okay?


Let $d=\gcd(a,b)$ and $m=\operatorname{lcm}(a,b)$. Prove that $dm=|ab|$.   Can I just show that since $\operatorname{lcm}(a,b)=|ab|$ iff $\gcd(a,b)=1$, then $dm=(1)|ab|=|ab|$? Or is there a more simple proof to this?

I was reading a text book and came across the following:  Important Results (This comes immediately after LCM:) If 2 [integers] $a$ and $b$ are given, and their $LCM$ and $HCF$ are $L$ and $H$ respectively, then $L \times H = a \times b$  Can some please help me understand why the above result is true? Thanks in advance.


I have some code which brings up a pop-up after a timer is met. Currently the code is designed so that when you click the element it closes, I just want to reverse this so that when you click off the element (anywhere else on screen) that it closes.   Thanks in advance for any help.

I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area.  Is something like this possible with jQuery?  $("#menuscontainer").clickOutsideThisElement(function() {     // Hide the menus });


I'm making several assumptions, not sure if any are correct:   there is a black hole at the center of a galaxy the black hole is eating the galaxy   Eventually the galaxy will be gone, right?  Has this been observed? Do we know what happens afterwards?  Posting here since astronomy got merged into physics

I've recently learned that the general consensus is that several (if not, most) galaxies have super massive black holes in their center, in particular the Milky Way. This, at least to me, makes perfect sense seeing as we are in a spiral galaxy which means we need something to "spiral" around (a large body or a bunch of mass).  But seeing as we're rotating around this massive black hole, won't we inevitably end up sucked in by it? Aren't we spinning towards the center of the galaxy, or are we staying steady where we are?


Which is better or correct?     That’s good advice that I certainly could do with heeding.      That’s good advice that I could certainly do with heeding.

I struggle constantly or is it I constantly struggle with the usage of such words. I don't even what they are called in English grammar.   My question: how do I know whether I'm grammatically correct when using such words?  Examples: Is it      I certainly will complete the report   or      I will certainly complete the report   Is it     I struggle constantly with English   or     I constantly struggle with English   Is it     Am I grammatically correct?   or     Am I correct grammatically?   I hope you get the idea.


let say we have a Qt/qml based desktop application, this is using mysql as local db .   Note: We will be releasing the new build every 2 weeks.  Here the Problem is, There is a chance of changes in local db like new column added, removal of some fields, new table added, deleted. So due to this changes all the time we are updating entire DB. we can say deleting the entire database and updating with new schema. so every time we are losing old records, because we are not updating only having changes in schema level.  Direct straight forward answer: We can compare two schema with (old_release.sql - new_release.sql) their changes, based on the changes result we can create one alter query instead of entire table changes.This can be possible for current build to immediate next build( n to n+1 ) or current build immediate lower version build ( n to n-1 ). But not possible for [n to n+3] or [n to n-5]  But here the problem is, Let say one client is using version_1.0 build, we wants to upgrade him to version_1.1 means no problem every direct release we have alter query file.We can use this to solve. But if the client is using version_1.0 and we wants to upgrade him to version_2.5 means we does not have any alter query compatibility between version_1.0 - version_2.5 we only having version version_2.4 - version_2.5. That means we can have, n to n+1 n to n-1  not for, n to n+2.  Note: some point there is chance of revert also e.g - version_2.5 to version_1.0  So Question is, Is there any way to understand differences between two schema's ? Any tool ? Any algorithm ?

I'm currently developing an application using a MySQL database.  The database-structure is still in flux and changes while development progresses (I change my local copy, leaving the one on the test-server alone).  Is there a way to compare the two instances of the database to see if there were any changes?  While currently simply discarding the previous test server database is fine, as testing starts entering test data it could get a bit tricky. The same though more so will happen again later in production...  Is there an easy way to incrementally make changes to the production database, preferably by automatically creating a script to modify it?     Tools mentioned in the answers:    (Commercial)     (Commercial)   (Commercial)


So I am trying to put some regex together that looks for 2 instances of a national insurance number. But it needs to find the NIN regardless of its placement so it doesn't matter if there are other words in between or on new lines.    ((\W|^)([a-zA-Z]{2}(|\s|\W))([0-9]{2}(|\s|\W)){3}([a-zA-Z]{1})(.*)){2,}     This is as close as i've got however this only works when on the same line it doesn't work if the NIN is on a different line

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


Let $\,{x\in\mathbb{C}}\,$, show that:    $$ S_{\small-}=\sum_{n=1}^{\infty}\space\frac{2^{-n}}{{x}^{2^{-n}}+1}\,=\frac{1}{\log{x}}-\frac{1}{x-1}\qquad\qquad\qquad\tag{1} $$    $$ S_{\small+}=\sum_{n=0}^{\infty}\space\frac{2^{+n}}{{x}^{2^{+n}}+1}\,=\frac{1}{x-1}\qquad\qquad\qquad\qquad\qquad\tag{2} $$    $$ S\,\,=\sum_{-\infty}^{+\infty}\space\frac{2^n}{\,{x}^{2^n}\,\,\,+1}\,=S_{\small-}+S_{\small+}=\frac{1}{\log{x}}\qquad\qquad\qquad\tag{3} $$    And find the convergence range of each sum.    In a , the OP start by introducing $\,{(2)}\,$ as a known identity, and gives a turly remarkable proof in the comment:  $$ \sum_{n=0}^m\log{(x^{2^n}+y^{2^n})} =\log{\prod_{n=0}^m(x^{2^n}+y^{2^n})} =\log{\frac{(x-y)}{x-y}\prod_{n=0}^m(x^{2^n}+y^{2^n})} =\log{\frac{x^{2^{m+1}}-y^{2^{m+1}}}{x-y}} $$  Then differentiate with respect to ${y}$, substitute ${y=1}$, and limit $\,{m\to\infty}\,$ give the result.     Could this approach work to proof $\,{(1)}\,$? notice for ${x=1}$:  $$ S_{\small-}=\sum_{n=1}^{\infty}\frac{1}{2^{n+1}}\,=\frac{1}{2} \qquad=\qquad \lim_{\small x\to1}\left[\frac{1}{\log{x}}-\frac{1}{x-1}\right]=\frac{1}{2} $$  New alternative methods are highly welcomed. Thanks.

$\displaystyle\sum_{i=0}^n \frac{2^i}{1+x^{2^{i}}}$  What technique is applicable here? I can't find a way to manipulate this sum to make it telescope. Just guide me.


I have a small app I'm building and when I hand it off to other team members to work on I'd like to abstract out them having to execute the python script with args directly, and instead have them call on a shell script to do it automatically.  Repo structure below:  src/     app.py     module_name.py scripts/     runAppWithArgs.sh   In runAppWithArgs.sh, I thought to cd ../src and then execute my python code, however I found that if I called on the script as ./scripts/runAppWithArgs.sh (i.e from the top-level directory) since the 'working directory' isn't scripts/, I'm getting errors because it doesn't know how to cd into src/ correctly.  What is the fix for this?  At a high level I would like to "assert" that the shell script is running in the right directory context, and the only workaround i can think of seems kind of hacky where I try to parse out the working directory from pwd and then move to the correct directory as-needed, although I think that will require some hard coding that I'm not comfortable doing.  Any pointers would be appreciated!

How do I get the path of the directory in which a  script is located, inside that script? I want to use a Bash script as a launcher for another application. I want to change the working directory to the one where the Bash script is located, so I can operate on the files in that directory, like so: $ ./application


I have completed my bachelors and masters in engineering from a top UK uni and I am currently working towards my PhD at a low ranked uni (50th in the UK) mainly because it was one of the very few project in my field and with partial funding for non-EU students. My question is how negatively will the ranking of my new university affect me when applying for research jobs / post docs in the future?

What I'm trying to understand is, to what degree does the status/rank of the University (where one completes his/her Ph.D) matter while shaping his/her career after graduation? I would like to know the weight given to one's school in both the following cases:   While applying for post-docs/faculty positions in academia While applying to industrial research labs   For instance, I've read on some forums (I can't locate the link now) that while considering prospective applications for tenure-track faculty positions, very few Universities accept a candidate who has completed his/her Ph.D from a lower ranked school having a lesser "brand" value, irrespective of the fact whether he/she has published equally original work as his/her counterpart from an Ivy league college. How much truth is in this statement? It would be really great if someone already in academia, either as a newly-accepted faculty or someone on the Faculty Hiring committee could share their experiences/statistics on this regard. I'm simply interested to know the answer, without commenting at all on whether such a practice is justifiable.  Similarly, what about recruitment to internationally acclaimed research labs (like  or ) - what importance do they place on the pedigree of a candidate's college, before taking into consideration what they published ?  I'm personally interested in answers related to the field of Computer Science (theory), but the question is applicable to any prospective grad student in any discipline in my opinion. Feel free to share your personal experiences post-Ph.D in detail, as that would give me (and future viewers of this question) about what its like to carve a career once you are out of school!


I have to find Vo in the network given below using Thevenin’s theorem. After removing load resistance i.e. 1k ohm, i know that Ix=V2k/2k but I am stuck on finding voltage across the 2k ohm i.e. V2k. I am familiar with voltage dividers but confused by the current source

I want to calculate Vo by Thevenin's theorem. First I removed the RL(1k)    Now I have to calculate Vth. Can I say that Vth is 6V? or Vth=6V + voltage through 2k?  If both these options are wrong, then tell me any law or procedure to find Vth?


I have a piece of text that uses a 2 different colours, one for the titles and one for the paragraphs. Is there any way the colours can be edited using something like Recolour Artwork, so that you don't have to select the single pieces but just change the colours in the block of text.

As shown in the following image, how can I change the color of "Ms" or "Mr" in one go?  Is there any existing function that can be used or is it possible to script?


My greetings to the community. I have a specific task which i have managed to perform using python. I need to do the same task faster and i believe i found a way but i need some help with that. My problem is the lack of understanding of the problem in 3d-space and more specifically the matrix transformations in local/global coordinates. I have an object which i need to move in a specific direction by 1cm in local coordinates. the lower object in the figure is the original position and the upper is the target position. therefoer the movement is towards Z in local coordinates.  What i do is: new_location = Vector((0, 0, 1)) # move by 1cm in the Z-direction trans = Matrix.Translation(new_location)  # create transformation matrix object.matrix_world @= trans  mat = object.matrix_world verts = [mat @ v.co for v in object.data.vertices]  This works just fine but it is slow due to the translation of each vertice in the last loop. I think i can do the same (correct me if i'm wrong) using bpy.ops.transform.translate. something like this: bpy.ops.transform.translate(value=(0, 0, 1), orient_type='LOCAL',                             orient_matrix=((1, 0, 0), (0, 1, 0), (0, 1, 0)), orient_matrix_type='LOCAL',                             mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH',                             proportional_size=1, use_proportional_connected=False,                             use_proportional_projected=False, release_confirm=True)  but what i can't figure out the correct values of "value" and "orient_matrix". thanks in advance

I'm looking to replace list comprehensions like the following with something more efficient and I was wondering if numpy can be used.  [obj.matrix_world @ v.co for v in obj.data.vertices]   I can do this, which is significantly faster, but still lacks the matrix multiplication, that needs to happen for each coordinate.  coords = np.empty((len(obj.data.vertices), 3), 'f') obj.data.vertices.foreach_get('co', np.reshape(coords, len(obj.data.vertices) * 3))   I was hoping it would just be  np.matrix(obj.matrix_world) @ coords   But that fails with (FWIW, It's just a cube, hence (8, 3))  ValueError: shapes (4,4) and (8,3) not aligned: 4 (dim 1) != 8 (dim 0)   Similarly, doing   for co in coords:     np.matrix(obj.matrix_world) @ co   fails with  ValueError: shapes (4,4) and (3,) not aligned: 4 (dim 1) != 3 (dim 0)   So I've hit a wall now. Numpy can't multiply a 4x4 matrix with a 3d vector, but Blender can. How do I solve this in a numpy way?    edit:  Based on @JoseConseco's excellent reply below, this is what I'm doing now  mx = active.matrix_world verts = active.data.vertices vert_count = len(verts)  coords = np.empty((vert_count, 3), 'f') verts.foreach_get('co', np.reshape(coords, vert_count * 3))  coords_4d = np.ones((vert_count, 4), 'f') coords_4d[:, :-1] = coords  coords = np.einsum('ij,aj->ai', mx, coords_4d)[:, :-1]   Note, that there's no need to convert the (mathutils) Matrix into an np array. It works fine just like that.  Based on my tests, doing this via numpy is ~3 times faster than the list comprehension.


I have a file that contains entries that are indexed by a key:  \newglossaryentry{[alpha key]} {     [some lines with arbitrary content] }   Two entries may be separated by one or more lines. How would I sort these entries based on their key? A subsidiary question is what regular expression for this pattern?   Thanks.

If I have a file with contents similar to:  FirstSection     Unique first line in first section     Unique second line in first section  SecondSection     Unique first line in second section     Unique second line in second section  ...  NthSection     Unique first line in Nth section     Unique second line in Nth section   Is it possible to use unix commands (e.g. sort, awk) to sort the file alphabetically by the first non-indented line in each three line group, whilst keeping the indented lines under their existing group?


I came across the problem below:  Calvin has to cross several signals when he walks from his home to school. Each of these signals operate independently. They alternate every 80 seconds between green light and red light.At each signal, there is a counter display that tells him how long it will be before the current signal light changes. Calvin has a magic wand which lets him turn a signal from red to green instantaneously. However, this wand comes with limited battery life, so he can use it only for a specified number of times.  a. If the total number of signals is 2 and Calvin can use his magic wand only once, then what is the expected waiting time at the signals when Calvin optimally walks from his home to school?  b. What if the number of signals is 3 and Calvin can use his magic wand only once?  I found that it was asked before  but I am not able to understand the accepted answer. The accepted answer states that it takes 40 seconds for the lights to change from Red to Green and from Green to Red.  But should it not be 80 seconds as stated in the question?

How to solve this problem. I have reckoned that I need to take as optimization problem finding minimum value for waiting time. Any suggestions?  Calvin has to cross several signals when he walks from his home to school. Each of these signals operate independently. They alternate every 80 seconds between green light and red light.At each signal, there is a counter display that tells him how long it will be before the current signal light changes. Calvin has a magic wand which lets him turn a signal from red to green instantaneously. However, this wand comes with limited battery life, so he can use it only for a specified number of times.  a. If the total number of signals is 2 and Calvin can use his magic wand only once, then what is the expected waiting time at the signals when Calvin optimally walks from his home to school?  b. What if the number of signals is 3 and Calvin can use his magic wand only once?


I have a simple Linux bash file: /home/jack/lib/env.bash It is supposed to register the directory relative to the bash file (/home/jack/lib/opt in this case) as environment variable. #!/bin/bash export MYFOLDER=$PWD/opt  However, if I run it from a different folder like: *****:/home/jack/a/b/c$ source /home/jack/lib/env.bash  It registers /home/jack/a/b/c/opt to MYFOLDER in the env list instead. How to fix?