body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
I searched a lot and there are resources which point to e-bay and others but all that is third party. I would like to buy JUST THE KEY for Windows 7 NOT the media, so I can make the already working copy of Windows 7 legal/activated. Reason for this is to save some money. I have the media just give me the key, and only charge me for the key.
Does anyone know how to install a new serial on a working copy of Windows 7 - I get notified that my software is not genuine but cannot reenter the serial
I've recently had a stream of downvotes without comment on a number of my answers. I personally feel these answers are of objectively good quality and I fear I am being targeted out of spite. Could someone please investigate? I'm not sure who it is but the only person I've gotten into a tif was recenlty on this question, where I felt the answer was misleading and didn't answer the question.
I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause. During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected". What does this mean, and what caused it? Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers? Is there any way to earn it back?
When simplifying an equation such as $x^4 + x^4$, I know the answer is $2x^4$, but what I don't understand is why don't you add the exponents along with the $x$? $x^4$ is $x \cdot x \cdot x \cdot x$, right? So why can't you simplify/add them, and have the answer be $2x^8$?
I am working on a problem and I am confused if exponents can be split up in the manner below. $$x^{k+2} = x^{k+1}+x^{k+1} = 2x^{k+1} $$ I apologize if this is a simple question I tried to look up exponent rules but I couldn't find exponents + a number.
This is a question about JavaScript Prototype Chaining. I've read some documentation about this, and the syntax doesn't really make much sense to me. The way I've understood JavaScript Prototypes is essentially some syntactic candy that wraps around a function call which just adds properties to a new object named this. Basically, turning what you might do in JavaScript without prototypes from this: function PsuedoClass(arg0, arg1){ var this = {}; this.arg0 = arg0; this.arg1 = arg1; return this; } var obj = PsuedoClass(0, 1); into what we all know and love: function PsuedoClass(arg0, arg1){ this.arg0 = arg0; this.arg1 = arg1; } var obj = new PsuedoClass(0, 1); So naturally, the way one might expect to do inheritance in JavaScript would essentially to be call the constructor functions in a chain. It only makes sense, Apply all the properties from both PsuedoClasses into one object. The whole obj.prototype thing just seems out of the blue to me. It seems to destroy the natural flow that JavaScript seems to lead you on. It would be much more intuitive if just using PsuedoClass.call(this, arg0, arg1); would be enough. And it almost does, except then javascript's instanceof operator fails. And there's more arguments than just increased readability that JavaScript's obj.prototype should be removed. It simplifies the JavaScript Inheritance, reducing things from 2 lines to 1. If they'd make PsuedoClass.call(this, arg0, arg1) cause this to be an instanceof PsuedoClass, it'd make it possible to do things like this: function CustomRowClass(){ this.someCustomMethod = function(){} } var tableRow = document.getElementById('myRow'); CustomRowClass.call(tableRow); console.log(tableRow instanceof CustomRowClass); //returning true tableRow.someCustomMethod(); I'm really not trying to bash JavaScript as a whole here, I think the language does make a lot of sense in many ways, its just this Prototype chaining is not what I expected it to be, and it doesn't really make intuitive sense. Am I missing something here, is there a way to understand this obj.prototype in an intuitive way? Everything about it just throws things off for me. Or is there a simple way to use PsuedoClass.call(this, arg0, arg1); and get the desired instanceof behavior?
I'm not that into dynamic programming languages but I've written my fair share of JavaScript code. I never really got my head around this prototype-based programming, does any one know how this works? var obj = new Object(); obj.prototype.test = function() { alert('Hello?'); }; var obj2 = new obj(); obj2.test(); I remember a lot discussion I had with people a while back (I'm not exactly sure what I'm doing) but as I understand it, there's no concept of a class. It's just an object, and instances of those objects are clones of the original, right? But what is the exact purpose of this ".prototype" property in JavaScript? How does it relate to instantiating objects? Update: correct way var obj = new Object(); // not a functional object obj.prototype.test = function() { alert('Hello?'); }; // this is wrong! function MyObject() {} // a first class functional object MyObject.prototype.test = function() { alert('OK'); } // OK Also these really helped a lot.
I have looked through some of the previous questions posted on this topic, and I think mine is different. Is there a flaw in defining division by zero? For example, define $\frac{a}{0} = \infty_a$ it would seem like things work now, for example, $\frac{a/0}{b/0}=\frac{\infty_a}{\infty_b}=a/b$. What could go wrong with this idea, or more specifically, is it defined in some branch of mathematics?
We add negative numbers and zero to natural sequence to make it closed under subtraction, the same thing happens with division (rational numbers) and root of -1 (complex numbers). Why this trick isn't performed with division by zero?
I installed ubuntu 13.10 on my laptop but it won't boot into unity just command line and says running in low graphics mode. How do I fix this. I have an HP 15-g029wm laptop with amd radeon hd 3330 graphics
Note: This is an attempt to create a canonical question that covers all instances of "low-graphics mode" error that occurs to a user, including but not limited to installation of wrong drivers, incorrect or invalid lightdm greeters, low disk space, incorrect installation of graphics card like ATI and Nvidia, incorrect configuration of xorg.conf file while setting up multiple monitors among others. If you are experiencing the "low-graphics mode" error when trying to login but none of the following answers work for you, please do ask a new question and then update the answers of this canonical question as and when your new question gets answered. When I try to boot into my computer, I am getting this error: The system is running in low-graphics mode Your screen, graphics cards, and input device settings could not be detected correctly. You will need to configure these yourself. How do I fix the failsafe X mode and login into my computer? Answer index:
Should you be lucky to visit the Seoul, you will be happy. If you are lucky to visit the Seoul, you will be happy. What is the difference between the two sentences in meaning? And what is the reason we change the order of the sentence 'you should' into 'should you'?
Should you be lucky to invite the Seoul, If you are lucky to invite the Seoul, What is the difference between the two sentences in meaning? And what is the reason we change the order from 'you should' into 'should you'?
Do I get the cards from the highest arena I was in if I get a chest from the shop
Will cards from a higher arena than you appear in the card shop, or will only cards from the arena you are in (or below) when it refreshes be available to purchase?
The question in the title is the following: If $f : \mathbb{R}^n \to \mathbb{R}$ is differentiable and $f(0) = 0$, prove that there exist $g_i : \mathbb{R}^n \to \mathbb{R}$ such that $$f(x) = \sum_{i = 1}^{n} x_i g_{i}(x).$$ And the hint provided is the following: If $h_x(t) = f(tx)$, then $f(x) = \int_{0}^{1} h_x^{'}(t)dt.$ I followed the hint and got the result below, $$f(x) = \int_{0}^{1} \sum_{i = 1}^{n}x_i D_if(tx)dt.$$ Now I'd like to bring the sum outside due to linearity of the integral, but for that I need to show that the functions $h_i : \mathbb{R} \to \mathbb{R}$ defined by $h_i(t) = D_i f(tx)$ are integrable. How do I show this? I know that there are differentiable real valued functions whose derivatives are not integrable, so I don't know if this result is true at all (by this I mean I think it's possible to slightly tweak such a function with non integrable derivative to get a counterexample). Am I right in thinking so? All the solutions I can find to this problem (for example, here: ) just expand the integral without considering integrability of the $h_i$s so I might be missing something basic here. Any help is appreciated.
Problem 2-35 on page 34 of Spivak's Calculus on Manifolds states If $f: \mathbb{R}^n: \to \mathbb{R}$ is differentiable and $f(0) =0$, prove that there exist $g_i: \mathbb{R}^n \to \mathbb{R}$ such that $f(x) = \sum_{i=1}^n x^ig_i(x)$. Hint: if $h_x(t) = f(tx)$, then $f(x) = \int_0^1 h_x'(t)$. I understand the answer he wants, but hasn't he left out a hypothesis that would ensure $h_x'(t)$ is integrable? (For instance the continuity of $df$.) Secondly, I'm wondering if this theorem is used anywhere. Perhaps in differential geometry it might be useful to write locally $f \in C^\infty (M)$ as $\sum_i g_i(x) x_i$ for some coordinates $x_i$.
I have just had my new PC delivered. I have a Macbook running and am now downloading the iso file. Do I need to follow the instructions on the to create an OS X bootable usb and start the PC with it? Or is this only for installing Ubuntu on OS X machines? So what should I do in my case?
I have a netbook that I want to install Ubuntu onto. I do have a good Mac computer that I can make a bootable USB drive from, but I'm confused on how to go about making it.
The equation to be proved is: $\sum_{j=0}^n(-1)^j\dbinom{n}{j} = \dbinom{n}{0} - \dbinom{n}{1} + ... \pm \dbinom{n}{n}=0$ But if i take the base case ($n = 1$) i get $\sum_{j=0}^n(-1)^j\dbinom{n}{j} = \dbinom{n}{0} - \dbinom{n}{1}$ But this evaluates to $\frac{n!}{0!n!} - \frac{n!}{1!(n-1)!}$ I don't think the above statement evaluates to zero. Could this be an error? The book is Spivak's Calculus and the problem is 2-3(e)(ii)
Let $n$ be a positive integer. Prove that \begin{align} \sum_{k=0}^n \left(-1\right)^k \binom{n}{k} = 0 . \end{align} I tried to solve it using induction, but that got me nowhere. I think the easiest way to prove it is to think of a finite set of $n$ elements, but I can't find the solution.
I am using a notebook without a CD burner and want to install Ubuntu. I could use an USB stick as an installation medium but I would like to do something different: I would like to use my old PC and put the HDD from the laptop into it. Than make this HDD as a installation medium using a Ubuntu DVD (the old PC has a CD burner). In the next step I would like to put the prepared HDD into the laptop and install Ubuntu on the same HDD (from the same HDD). Is something like this possible?
I know that I can create/burn bootable CD/DVD or live USB and can boot/install from it. But suppose I am currently running GNU/Linux and I've ISO file of another GNU/Linux that I want to install on my hard disk, then Can I directly boot from ISO from hard disk and try/install that GNU/Linux operating system?
I thought game engine are something like Unity or Unreal. They have a editor with scene editor, some Physics library, some scripting editor and tools to improve the workflow of developer. Furthermore, I thought game engine should independent of the actually game.(i.e.) The game engine should not have any game logic in it. However, I watched this game engine video and I am totally confused. . In the game engine video, I don't see the game engine anywhere because it seemed as though the professor developed the game straightaway. I hope someone can explain the exact difference between a game engine and the actual game.
I am new to Game Development, All I have developed is some 2d Games, using Game Maker by . There game development is much more easy, just as simple as Drag and Drop. But, Now I wish to evolve in Game Development, and wanna try some hands with the common programming languages like, Java, C++ or C. In order to achieve this, I came around the first topic, Game Engine. So, What is Game Engine.? That is a broad question, with various answers. I came out with some conclusion after reading various links, Wikipedia: A game engine is a system designed for the creation and development of video games. The core functionality typically provided by a game engine includes a rendering engine for 2D or 3D graphics, a physics engine or collision detection (and collision response), sound, scripting, animation, artificial intelligence, networking, streaming, memory management, threading, localization support, and a scene graph. It exists to abstract the (sometime platform-dependent) details of doing common game-related tasks, like rendering, physics, and input, so that developers (artists, designers, scripters and, yes, even other programmers) can focus on the details that make their games unique. Engines offer reusable components that can be manipulated to bring a game to life. Loading, displaying, and animating models, collision detection between objects, physics, input, graphical user interfaces, and even portions of a game's artificial intelligence can all be components that make up the engine. Now what I understand is, Game Engine takes care of all the common work, like physics, loading etc... As far my question is concerned, what is a Game Engine (Programmatically)? Is it a Library? With pre-defined functions and classes, which can be inherited? Or what so ever, what is it?
I am trying to compile an (R) markdown document that includes a journal style file. The following line produces the following error: \newcommand\@titlenote{} %! LaTeX Error: Command \@ already defined. % Or name \end... illegal, see p.192 of the manual. I'm not really familiar with macros so I don't know if this should be valid or not! I know that it is used later in the style file: \let\footnote\thanks {\fontsize{20}{22}\usefont{OT1}{phv}{b}{n} \@title \par {\small{\@titlenote}} } \vskip 1.5em {\@author \par} \end{minipage} \vskip 1em \par } In case this isn't enough information, this is my full setup. This markdown in foo.Rmd --- title: "The foo bar: a novel metal bar for holding fire doors" author: - name: Bar Baz affiliation: - Bar Institute email: [email protected] abstract: | Lorem ipsum dolor. keywords: Foo, Bar, Baz output: BiocWorkflowTools::f1000_article: includes: in_header: f1000_styles.sty urlcolor: Orange subparagraph: yes geometry: "hmargin=1.8cm,vmargin=2.2cm" --- Lorem ipsum dolor. where f1000_styles.sty is available . This document can be built by running rmarkdown::render("foo.Rmd"). Sorry that it's a bit roundabout. This is as close to minimal as I managed.
Many LaTeX “hacks” begin with \makeatletter and end with \makeatother. What do these commands do?
I'm learning about conic sections as defined using focci. Every derivation I find for the hyperbola get's this definition out of the blue: $b²=c²-a²$ It totally looks like a triangle somewhere, but when I see $a$ and $c$ they are parallel and I cant find how to form a triangle from them. for example it's just stated Let's define $b^2 = c^2 - a^2$ and make the substitution into the equation. With no explaination. also justs states Remove the square roots by suitable squarings and use the relation $b^{2}=c^{2}-a^{2}$ to obtain the equation of the hyperbola: For reference, I'm defining $a,b,c$ as in the following image, where $b$ is a distance along the $y$ axis $a$ and $c$ are distances along the $x$ axis (to the vertex and focus respectively) The question: why is the pythagorean theorem applied here, is there a sneaky triangle that can be defined? how/why does $c$ suddenly become a hipotenuse?
When I teach conics, I give a simple geometric argument for the Pythagorean relation for ellipses. (By "Pythagorean relation" I mean the fact that the square of the focal length $c$ is the difference of the squares of the semimajor and semiminor axes, i.e. $c^2=|a^2-b^2|$ for the ellipse defined by $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$.) The picture argument goes as follows: just draw the obvious isosceles triangle from the two foci to one of the two points at the end of the minor axis. We see two right triangles; in each, one leg is the focal length $c$ and the other leg is the semiminor axis, while the hypotenuse is the semimajor axis. The result follows from the Pythagorean theorem applied to this right triangle. But when it comes to the Pythagorean relation for hyperbolas, I can't think of an equally convincing picture to draw. Instead I have to give a rather inelegant algebraic argument for the relation $c^2=a^2+b^2$ (for the hyperbola defined by $\frac{x^2}{a^2}-\frac{y^2}{b^2}=1$, with focal length $c$), directly from the definition of the hyperbola. The messy details are below.* Now, obviously there is an asymmetry between the argument for the ellipse and the argument for the hyperbola: the ellipse argument is almost trivial and doesn't involve working straight from the locus definition, but the hyperbola argument is tedious and does require working straight from the definition. So, my question: Is there an equally persuasive picture I could draw to convince high school students of the Pythagorean relation for hyperbolas -- without having to get technical with points at infinity, say? The natural triangle to draw is the right triangle with legs from the center to a vertex and from that vertex to an asymptote, which has legs of length $a$ and $b$; but then the problem becomes why the length along the asymptote should be equal to $c$. I doubt there is a purely (Euclidean) geometrical reason because this triangle lies on the asymptote, not on the hyperbola itself; I suspect some sort of limiting procedure will be required. [*] The tedious algebraic details: The foci lie at $(\pm c,0)$. Say $a>b$. Then hyperbola is the locus of points $(x,y)$ such that $$\left|\sqrt{(x+c)^2+y^2}-\sqrt{(x-c)^2+y^2}\right|=2a$$ Assume for simplicity the expression between the absolute value bars is positive. (The algebra is even more tedious if we don't make such a simplifying assumption.) Then moving the right root to the other side and squaring gives $$(x+c)^2+y^2=4a^2+(x-c)^2+y^2+4a\sqrt{(x-c)^2+y^2}$$ Simplifying gives $$xc-a^2=a\sqrt{(x-c)^2+y^2}$$ and upon squaring again we have $$x^2c^2-2xca^2+a^4=a^2(x^2-2xc+c^2+y^2)=a^2x^2-2xca^2+c^2a^2+a^2y^2$$ which reduces to $$x^2(c^2-a^2)-y^2a^2=a^2(c^2-a^2)$$ Defining $b^2:=c^2-a^2$ brings the equation into the form $x^2/a^2+y^2/b^2=1$, and the Pythagorean relation follows from the definition of $b$.
I'm having trouble understanding the behavior of a WP_Post variable (and / or possibly the behavior of var_dump itself). As far as I know, var_dump will inspect all data from a variable. From the PHP documentation: This function displays structured information about one or more expressions that includes its type and value. Arrays and objects are explored recursively with values indented to show structure. Then, why is it that var_dump($post) doesn't show metadata, whereas var_dump($post->metadata) does? I've already read the offficial documentation, specially , as well as . I assume the explanation is there, in plain sight -- however, it's still unclear to me. What's going on here? Is it some basic PHP behavior that I'm not aware? (I'm not sure if this question is because a lack of understanding how WordPress works or how PHP works. Sorry if this is the wrong site to ask).
I want to add additional items to the data returned as . So for every function/query that returns a WP_Post object I want my additional data added. Example of returned result: WP_Post (object) => [ // Default data returned by WP_Post ID => int, post_author => string, post_name => string, post_type => string, post_title => string, post_date => string, post_date_gmt => string, post_content => string, post_excerpt => string, post_status => string, comment_status => string, ping_status => string, post_password => string, post_parent => int, post_modified => string, post_modified_gmt => string, comment_count => string, menu_order => string, // Additional data I want to add extra_data_1 => array, more_data_key => string, another_added => string ] For example when the functions or are run they will return the WP_Post object along with my additional data. I've tried finding the appropriate but this has been unsuccessful. I am hoping I can do something like: // This is concept code add_action('pre_wp_post_return', function($data) { $data->extra_data_1 = get_post_meta($data->ID, 'extra_data'); $data->more_data_key = get_post_meta($data->ID, 'more_data', true); $data->another_added = get_post_meta($data->ID, 'another_data', true); return $data; }); My reasoning is I am having to build a custom API for WP that uses a range of different core functions which return WP_Post objects. Being able to add my additional data in one place would prevent me from duplicating code. I hope this is clear enough. Any help would be great!
I have three c++ files, sort.cpp defines a bubble sort function that takes an array, the length of the array and a function that is used to do the comparison. sort.h contains the function prototype inside a namespace. main.cpp is used to test the implementation. sort.h: #ifndef SORT_H #define SORT_H namespace sort { template <typename T> void bubble(T*, int, bool (*)(T, T)); } #endif sort.cpp: #include "sort.h" template <typename T> void sort::bubble(T *array, int length, bool (*compare)(T, T)) { while (length != 0) { int newLength {0}; for (int i {0}; i < length - 1; ++i) { if (compare(array[i], array[i+1])) { T temp {array[i]}; array[i] = array[i+1]; array[i+1] = temp; newLength = i + 1; } } length = newLength; } } main.cpp: #include <iostream> #include "sort.h" bool larger(int x, int y) { return x > y; } int main() { int arr[] {3, 5, 1, 3, 7, 2}; sort::bubble(arr, 6, larger); for(const auto e: arr) std::cout << e << ' '; std::cout << '\n'; return 0; } When I compile with g++ main.cpp sort.cpp -std=c++11 I get the error Undefined symbols for architecture x86_64: "void sort::bubble<int>(int*, int, bool (*)(int, int))", referenced from: _main in main-767bbd.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Do I get the error because the compiler doesn't know which types I'm going to use when compiling sort.cpp? So the compiler doesn't generate any function off of the template and then the linker can't find it when I use it in main.cpp? How can I solve this issue?
Quote from : The only portable way of using templates at the moment is to implement them in header files by using inline functions. Why is this? (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)
QueryRunner qr = new QueryRunner(C3P0Util.getDataSource()); qr.update("DELETE FROM course_access " + "WHERE user_id = ? " + "AND course_id NOT IN (?)", user_id, courseIdList); String user_id = "2" String courseIdList = "101,102,104,105,106,108,109" But the results are not correct only the result same as DELETE FROM course_access WHERE user_id=2 AND course_id NOT IN (101) The table structure looks like this id course_id user_id 1 101 1 2 102 1 3 105 1 4 104 1 5 106 1 6 108 1 11 110 1 12 101 2 26 101 8 27 102 8 28 105 8 29 104 8 30 106 8 31 108 8 32 110 8 33 113 8 34 115 1 35 107 1 36 115 8 37 109 8 38 109 1 39 107 8 40 116 8 41 116 1 98 102 2 99 103 2 100 104 2 101 105 2 102 106 2 103 107 2 104 108 2 105 109 2
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?
We all know that this refers to the actual instance of a class...but it seems to me that most people are not using it. So, should I be using it? My thoughts about it are as follows: Since this refers to the actual instance of a class, it should be used to access any member of that class. public void(String newValue) { this.privateVariable = newValue; } This should guarantee that the value is not assigned to an object with the same name within the scope (which could also end up as undefined behavior, anyway). But, what if an underscore is used to separate private from non-private fields: public voud(String newValue) { _privateVariable = newValue; } this seems in that case a little redundant and unnecessary. So, are there good reasons to use or not use this? Or am I just racking my brain about nothing?
I was curious about how other people use the this keyword. I tend to use it in constructors, but I may also use it throughout the class in other methods. Some examples: In a constructor: public Light(Vector v) { this.dir = new Vector(v); } Elsewhere public void SomeMethod() { Vector vec = new Vector(); double d = (vec * vec) - (this.radius * this.radius); }
Consider the equation $$\frac{d^2u}{dt^2}=c^2\frac{d^2u}{dx^2}$$ where c is some constant. Define new variables, $\sigma=x-ct $ and $\gamma=x+ct$. Now show that the equation becomes $$\frac{d^2u}{d\gamma d\sigma}$$ Can somebody explain what is happening here. I do not know what $u$ is nor what it is a function of. Would this have anything to deal with the wave equation in Physics? This question is the same as to
I have the following question: Show that if $z=x+ct$ and $y=x-ct$ then: $$\frac{\partial^2 u}{\partial t^2}-c^2\frac{\partial^2u}{\partial x^2}=0\text{ implies } \frac{\partial^2 u}{\partial z \partial y}=0$$ If I had $u$ it would follow trivially I imagine, but I don't have $u$. It would seem that $u$ is linear in $t,x$ and since $t,x$ are linear in $y,z$ it seems logically consistent, but I am not sure what to do. Perhaps this is related to harmonic functions. What should I first do to get this started? Perhaps I notice that $c=\frac{z-x}{t} \text{ and } c=\frac{x-y}{t}$ and thus $\frac{z-x}{t} =\frac{x-y}{t}\implies x-y=z-x\implies 2x=y+z$
Define $a^2$ as $a * a, a^3 = a * a * a$, and for a positive integer $n, a^n= a * a * \cdots * a$ ($n$ copies of $a$). (a) If $(G,*)$ is an abelian group, then show that $(a * b)^n = a^n * b^n$ for all positive integers $n$. (b) If $n$ is a positive integer, then show that $(a^n)^{-1} = (a^{-1})^n$. By being an abelian group, commutative property w.r.t. $*$ is there. (a) Need show that $(a * b)^n = a^n * b^n,\ \forall n\in\mathbb{N}$. Stuck ... (b) If $n$ is a positive integer, then show that $(a^n)^{-1} = (a^{-1})^n$. Unable to think of any approach.
If $ \langle G, \star \rangle $ is an abelian group, then for all $a, b \in G$, show that $(a \star b)^{n} = a^{n} \star b^{n}$. I am stuck at the first step, unable to figure out how to start. I am just beginning on group theory, and know that an abelian group obeys commutativity, associativity, has an identity element, and each element is invertible. I am unable to figure out how to apply this for the proof. Any hints on how I should get started?
For the following question: We call an undirected graph a basic graph if its adjacency matrix is such that all diagonal entries are zero and all off-diagonal entries are less than or equal to one. Let $G = (V,E)$ be a basic graph. We call any set of three distinct vertices $\{u,v,w\} \in V$ a trinity, if each pair of vertices in the set is connected by an edge. I need to find an expression for the number of trinitys (made up term for this question) contained in a basic graph, in terms of the trace of an appropriate matrix and ended up obtaining the expression trace(A³)/6. Would this be correct?
The trivial approach of counting the number of triangles in a simple graph $G$ of order $n$ is to check for every triple $(x,y,z) \in {V(G)\choose 3}$ if $x,y,z$ forms a triangle. This procedure gives us the algorithmic complexity of $O(n^3)$. It is well known that if $A$ is the adjacency matrix of $G$ then the number of triangles in $G$ is $tr(A^3)/6.$ Since matrix multiplication can be computed in time $O(n^{2.37})$ it is natural to ask: Is there any (known) faster method for computing the number of triangles of a graph?
i am in the process of creation of simple Document Map for the following C# source. public class Person { public string Name { get; set; } public int Age { get; set; } public string DoSomething(string x) { return "Hello " + x; } } The results should be presented in treeview or listview, in following manner: Person -- Name -- Age -- DoSomething() So, question is, is there a regex or library which handles C# source code?
Which parsers are available for parsing C# code? I'm looking for a C# parser that can be used in C# and give me access to line and file informations about each artefact of the analysed code.
Question is as stated above. Can someone explain if (and how) $$\iint f(x)g(y)\,dx,dy=\int f(x)\,dx*\int g(y)\,dy$$ I found this website, but I don't get why they use $x\leq y\leq b$. It makes a bit more sense (in my mind), to have $0\leq y\leq x$, but I still don't undersand how to finish/solve this logic.
Can I argue that: \begin{align} \left(\int_a^b f(x) \,dx\right) \left(\int_c^d g(y) \,dy\right) &= \int_a^b f(x) \int_c^d g(y) \,dy \,dx \\ &= \int_a^b \int_c^d f(x) g(y) \,dy \,dx \end{align} since the same would be true for a product of finite sums?
I'm interested to split a larger, irregular polygon into smaller ones. I know the area of the resulting polygon, and I know that the line I want to split it by should be parallel to one of the sides of the original polygon (line AB in the image below). I'm also curious if i can do this in one go. For example I have the big polygon (of 2400 sqm for example), and I know I want to split it as follows: (Division 1: 200 sqm, next one 140 sqm, next one 100 sqm, and so on) resulting in 10 new polygons of unequal area, but all of them having edges parallel to side AB of the original polygon. I work in ArcMap 10.1, but I can use QGIS 2.4 as well if there is some plugin that might help me.
I have several thousand irregularly shaped polygons in a shapefile. I want to be able to split each polygon into three areas, and to specify what the size of those areas (they sum to the previous total area). It does not matter what the sub-polygon shape is, as this is for visualization purposes. How can I go about doing this? Is there a standard algorithm that exists that I can use? One approach I considered was to get all the points that make up the polygon. Then, I would join two randomly together using a straight line, split the polygon, then check if the area was within a satisfactory tolerance. If it was too small, I would change the point in one direction; if it was too large, I would change to a point in the opposite direction.
How can I write this formula: 1) I have tried to use $ \stackrel {}{}$ but it does not give the right form. And how to align these equations 2) 3)
Which book (free or otherwise) was the most useful to you when you started learning LaTeX? I am frequently asked this question by friends who want to learn LaTeX, and I recommend the book which got me started, , but I feel that there might be better options around. Also see .
I found out that Unity will be discontinued by Ubuntu so I want to know if there's an available replacement for it. I'm mainly interested in the universal menu bar at the top of Unity (like in macOS), is there another desktop environment that does this?
that it will drop Unity 7 from Ubuntu 18.04 onwards, reverting back to the Gnome desktop environment. I know all the larger desktop environments quite well, Gnome, KDE and Xfce; however, Unity is the one I am more comfortable with and on which I I feel more productive. I would therefore like to know if there any desktop environments forked from Unity 7 that could be installed on Ubuntu. I understand we are still one year away from the shift, but it is never too early to test the alternatives and eventually choose a project to contribute to.
When there are same-name builtin, keyword and/or external command, what is the order in which the Bash shell decides which to run? For example, keyword time and external command time, builtin printf and external command printf from coreutils.
If I execute the test command in bash, test(evaluates conditional expression) built-in utility is started: $ type test test is a shell builtin $ type -a test test is a shell builtin test is /usr/local/bin/test test is /usr/bin/test $ However, as seen in output of type -a test above, there is another test in /usr/local/bin directory and yet another one in /usr/bin directory. How are executables ordered, i.e. are the built-in commands always preferred and then the rest of the commands depend on the directory order in $PATH variable? In addition, is it possible to change the order of the executables started, e.g. if I type in test, then /usr/bin/test is started instead of bash-builtin test?
I am going to home or house explain difference between home and house with examples
Can you explain more? I do not know when we can use them in the sentence. Can we use them instead of each other? They have a beautiful home. They have a beautiful house.
I am using an Android One mobile phone. When I try to install apps via WiFi I get Error Code: 495, but, when I do the same via mobile data it's working fine. When follow the procedure mentioned in I get a "Connection Time Out Error". If I try a second time I can see the "Installing..." indicator appear, but I don't see any downloading file information and finally I get the same Error Code: 495. What could be the problem? How to solve this issue?
"Facebook" could not be downloaded due to an error. (495) How do I solve this error?
The following data is coming from an ajax response and then I've appended it to the DOM. <label class="switch"> <input name="new" value=1 type="checkbox" id="switchButton" data-id="'+order.id+'" data-toggle="toggle"> <span class="slider round"></span> </label> I used the follwoing method to sellect the checkbox value and toggle the state of the setButton div but it is not working. the jquery code is placed inside document ready function. $('#switchButton').click(function(){ $('#setButton').toggle(); }); The div which i want to hide and show is as follow: <div class="setButton" style="display: none;" id="setButton"> <button type="button" name="button"></button> </div> Note: When I do the functionality in JavaScript it works but it misses some clicks, say once it is clicked the button will be displayed but when click again it doesn't hide it and when clicked again it will hide it.
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
Running: Kubuntu 18.04 (os set to Japanese today) However Firefox is still set to English, I went through the options on Firefox; there is an option to change preferred languages for viewing pages but how do I set the language for the UI?
Is it possible to change the language of a particular application so that when opened it shows in Spanish for example while the rest are in English? I have Spanish and English installed in Ubuntu and am using English as the default one but I would like a way to change the language for a particular application without having to change the whole language of the system.
(B) According to some analysts, the gains in the stock market reflect growing confidence in the economy to avoid the recession, what many feared earlier in the year, rather to come This is an excerpt from GMAT Question. some instructor has given this response - * it appears that this choice is trying to substitute "what" for "which". that is not acceptable. Can some one explain in detail why the usage of what is wrong here? The whole complete sentence - According to some analysts, the gains in the stock market reflect growing confidence that the economy will avoid the recession that many had feared earlier in the year and instead come in for a “soft landing,” followed by a gradual increase in business activity. (A) that the economy will avoid the recession that many had feared earlier in the year and instead come (B) in the economy to avoid the recession, what many feared earlier in the year, rather to come (C) in the economy’s ability to avoid the recession, something earlier in the year many had feared, and instead to come (D) in the economy to avoid the recession many were fearing earlier in the year, and rather to come (E) that the economy will avoid the recession that was feared earlier this year by many, with it instead coming Which one is correct. It is GMAT question.
Sometimes I can't see which clause fits the best. What "check-up" could be done to make sure which one is the right one? For example, 1) He will do anything that is needed. or He will do anything what is needed. 2) They always ignore that is so obvious. or They always ignore what is so obvious. 3) All that I have is yours. or All what I have is yours. My take is the correct ones are 1) that 2) that 3) what/that??? But I am not sure. I think it has to do something with different types or dependent clauses, but I don't know how to go about them in this case. Any suggestions? Here is an interesting example How do I know what I think, until I see what I say? VERSUS How do I know that I think, until I see what I say? I think both are correct meaning two different things.
My question is how to prove that $f(x) = 4x(16 - x)(6 - x)$ has its maximum at point $x_0 = \frac{8}{3}$. I am trying to use arithmetic-geometric inequality, but I am unable to solve it.
Some people may carelessly say that you need calculus to find such a thing as a local maximum of $f(x) = x^3 - 20x^2 + 96x$. Certainly calculus is sufficient, but whether it's necessary is another question. There's a global maximum if you restrict the domain to $[0,8]$, and $f$ is $0$ at the endpoints and positive between them. Say the maximum is at $x_0$. One would have $$ \frac{f(x)-f(x_0)}{x-x_0}\begin{cases} >0 & \text{if }x<x_0, \\ <0 & \text{if }x>x_0. \end{cases} $$ This difference quotient is undefined when $x=x_0$, but mere algebra tells us that the numerator factors and we get $$ \frac{(x-x_0)g(x)}{x-x_0} = g(x) $$ where $g(x)$ is a polynomial whose coefficients depend on $x_0$. Then of course one seeks its zeros since it should change signs at $x_0$. Have we tacitly used the intermediate value theorem, or the extreme value theorem? To what extent can those be avoided? Must one say that if there is a maximum point, then it is at a zero of $g(x)$? And can we say that without the intermediate value theorem? (At least in the case of this function, I think we stop short of needing the so-called fundamental theorem of algebra to tell us some zeros of $g$ exist!)
I am unable to connect to a open hidden network (without password) The network is the following (from iwlist wlan0 scan) Cell 0 - Address: 11:22:33:44:55:66 Channel:5 Frequency:2.### GHz (Channel 1) Quality=50/70 Signal level=-42 dBm Encryption key:off ESSID:"" What is the right wpa_supplicant.config to connect to this open hidden network? In particular What is the key_mgmt field for this open network? (instead of WPA-PSK) Wrong guess: network={ ssid="11:22:33:44:55:66 scan_ssid=1 mode=0 proto=WPA2 key_mgmt=WPA-PSK pairwise=CCMP group=CCMP auth_alg=OPEN priority=1 psk="" }
I need to connect to a hidden network without password with wpa_supplicant: iwlist <interface> scan output: Cell 02 - Address: 11:22:33:44:55:66 Channel:1 Frequency:2.412 GHz (Channel 1) Quality=67/70 Signal level=-43 dBm Encryption key:on ESSID:"" Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s 9 Mb/s; 12 Mb/s; 18 Mb/s Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s Mode:Master Extra:tsf=################## Extra: Last beacon: 248ms ago IE: Unknown: ###### IE: Unknown: ################## IE: Unknown: ##### IE: Unknown: ############## IE: Unknown: ###### IE: Unknown: ############### IE: IEEE 802.11i/WPA2 Version 1 Group Cipher : TKIP Pairwise Ciphers (1) : CCMP Authentication Suites (1) : PSK IE: WPA Version 1 Group Cipher : TKIP Pairwise Ciphers (2) : CCMP TKIP Authentication Suites (1) : PSK IE: Unknown: ################### What is the wpa_supplicant configuration file needed to connect to this network? Wrong guess: network={ ssid="" bssid=11:22:33:44:55:66 }
I'm new to Ubuntu. I know that windows has a feature that allows you to remove your USB flash drive without having to go to the drive, right click and choosing safely remove. This prevents you from corrupting your files if you quickly unplug your flash. What I want to know is. Does Ubuntu have a similar feature? can I just unplug my USB devices and my files wont get corrupted or must I always go to the drive right click and chose safely remove? Thank you.
How I can safely remove a USB external drive? Ubuntu 12.10 does not come with this option, only to "Unmount" the disk, but not "Eject". I have tried both USB sticks and with my external hard drive.
I have already seen all related questions but none of them worked.
So the new item, Elytra on 1.9 are supposed to make you glide. I have used them at my friend's house when we were playing snapshots but when the update came out, I tried them at my house and all that happened was I fell to my death. Does anyone know what I'm doing wrong and how I can fix it?
I understand what this C++ function does, but I don't understand why the return statement is written this way: int intDivide(int num, int denom){ return assert(denom!=0), num/denom; } There is only one statement here, because there is only one ; but the comma confuses me. Why not write: int intDivide(int num, int denom){ assert(denom!=0); return num/denom; } Aside from "elegance" is there something to be gained in the first version? What exactly is that comma doing anyway? Does it break a single statement into 2 parts such that essentially the above 2 versions are identical?
What does the , operator do in C?
I'm currently learning about functions and I need a clarification regarding some basic concepts since every book I read seems to change something here and there. The concepts of domain and codomain are quite clear and I have no issues about them. I have issues understanding the range and the image set. First, I used to believe the range and the image set were much like the same thing. Now, after more reading it seems that range and image set are not exactly the same thing. From what I have understood, the range is the image set of the domain. But I can have image sets of subsets of the domain (not equal to the domain) which will not be the range but just image sets of these subsets. Saying the same but differently, the range is always an image set, but an image set does not necessarily has to be the range. My question is simple, is this understanding of the topic correct?
Can someone please explain to me in layman what each means? Perhaps with some examples with functions (inputs to outputs/numeric values in them)? Especially range, image, and preimage. So far this is my understanding: Domain is basically the input $x$ in $f(x)$. Codomain is what $f(x)$ produces as an output such as $y$ when $f(x) = y$. Range sounds like codomain but with some restriction? Image I have little understanding of but I think it is basically a relation between domain to codomain given that we take a subset of our function (Eg; it is the input to output process of our function given we put a restriction on the domain as $x$ can only go from $0$ to $1$). Preimage is just walking backward on the "image" process? (Inverse image?) Going from our "subsetted" output back to our "subsetted" input? I am very frustrated that I can't seem to grasp these basic concepts so I would greatly appreciate any help from anyone who can break this down for me and help me understand it without too much mathematical notation. Thank you!
I am using below code to dynamically add a chunk of html to a div using innerHTML property. Here is my html code: <body> <form> <div id="date_in"><input type="date" name="arrival"/></div> <div id="dat_out"><input type="date" name="departure"/></div> <div id="submit"><input type="submit" value="Submit"/></div> </form> </body> After the closing body tag I am adding the following JavaScript, <script type"text/javascript"> var inDate= document.getElementById("date_in"); var inCal= document.createElement("div"); inCal.id="inCal"; inDate.appendChild(inCal); document.getElementById("inCal").innerHTML= '<div id="calHeading"> <span id="left">Left</span> <spanid="yearMonth">curMonth curYear</span> <span id="right">Right</span> </div> <div id="weeKDays"> <span>S</span> <span>M</span> <span>T</span> <span>W</span> <span>TH</span> <span>F</span> <span>SA</span> </div>'; </script> I the above code, innerhtml mark-up is not being added, I can see that in view source. What could be wrong with this piece of code?
Is there a character in JavaScript to break up a line of code so that it is read as continuous despite being on a new line? Something like.... 1. alert ( "Please Select file 2. \ to delete" );
I encrypted my installation of Ubuntu 14.04 while installing it, later I switched the driver of my ATI Radeon HD 6970 to "fglrx-updates". After that I could only close but not open any programs. I guessed that a reboot would help and the Ubuntu cryptsetup login screen looked a lot more primitive (text based). Also I can't login any more. Error message "cryptsetup failed, bad password or options?" I've done some research and apparently quite a few people face problems with those proprietary drivers, also while booting. For some the cryptsetup login screen looks different too, but I can't even get past the encryption. I'd prefer to not lose the installation, is there a different way than formating and reinstalling?
I activated disk encryption for my Ubuntu 15.10 64bit installation and get every time after entering the (correct) password the error message: cryptsetup: unknown fstype, bad password or options? But after few seconds (without any further interaction) this error message is replaced by the expected message: cryptsetup: sda5_crypt set up successfully That's it and the system is started. Any suggestions what could be the problem? Is it merely cosmetic or serious?
Is there a function that will express any given number in words? For example: If a number is 1432, then this function will return "One thousand four hundred and thirty two".
In PHP, is there an easy way to convert a number to a word? For instance, 27 to twenty-seven.
Using Java tools, wscompile for RPC wsimport for Document etc.. I can use WSDL to generate the stub and Classes required to hit the SOAP Web Service. But I have no idea how I can do the same in REST. How can I get the Java classes required for hitting the REST Web Service. What is the way to hit the service anyway? Can anyone show me the way?
With JSR 311 and its implementations we have a powerful standard for exposing Java objects via REST. However on the client side there seems to be something missing that is comparable to Apache Axis for SOAP - something that hides the web service and marshals the data transparently back to Java objects. How do you create Java RESTful clients? Using HTTPConnection and manual parsing of the result? Or specialized clients for e.g. Jersey or Apache CXR?
I extracted CodeIgnitor to XAMPP's htdocs and when I tried to access index.php like this: h t t p://127.0.0.1/ci/index.php I get the following error message: Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server. Error 403...... How can I troubleshoot this problem?
This is a about the use of a *AMPP's stack. I recently had a talk with some experienced people and they suggested to me not to use a WAMP stack, and instead install apache, mysql and php separately. I don't understand why they have suggested this, though, so can anyone tell me? Is there a particular disadvantage of WAMP, or a particular advantage to installing all of them separately? Since a WAMP stack itself is composed of apache, mysql and php, then what's the difference between using the WAMP stack and installing them all separately?
I know that it is possible to check if a URL redirects, as mentioned in the following question and its answer. using the following code: eq = urllib2.Request(url=url, headers=headers) resp = urllib2.urlopen(req, timeout=3) redirected = resp.geturl() != url # redirected will be a boolean True/False However, I have list of Millions of URLs. Currently it is discussed wether one of them is a harmful URL or redirects to a harmful URL. I want to know if it is possible to check for redirect without opening a direct connection to the redirecting website to avoid creating a connection with a harmful website?
Looking at the source of urllib2 it looks like the easiest way to do it would be to subclass HTTPRedirectHandler and then use build_opener to override the default HTTPRedirectHandler, but this seems like a lot of (relatively complicated) work to do what seems like it should be pretty simple.
I wish to install Windows 7 on my mac. I had a copy of Win7 years ago, and I believe I allowed the automatic upgrade to Win10 to happen, on my current PC. Tonight I entered my old Win7 product key here: ...and it validates, and allows me to download a Win7 disc image file. Questions are... 1) Shouldn't that product key have expired for Win7? 2) Is there any scenario where my Win7 product key might be available to use (unassigned)? Thanks for any advice in advance. I'm just trying to get a totally legal Win7 installation, wouldn't mind paying.
Many posts around that subject, but this case is a bit specific (I think) since it's not about a migration nor a cloning. Initially Windows 7 on a 500GB HDD (OEM) then upgrade to Windows 10 (offered by Microsoft) Now we have a brand new 550GB SSD and would like to install a fresh Windows on it (and get rid of the old one on the HDD). Do we have to install the initial (Win 7) or the upgraded (Win 10) on the SSD? What happens with the license, will Microsoft accept the license "transfer" automatically? We'd prefer to install Windows 7, unless 10 is mandatory (or recommended). Edit Actually we'll go for win 10 since we need to switch languages after the install (thanks @Ramhound). Thus the question is back to the classical Win 10 reinstall, and is definitely a dupe . . .
I discovered last week that an elected moderator can modify a user's name. The user had a username that was clearly meant to insult one particular elected moderator. This was discussed in chat, and the moderator decided to make a minimal change to the user's username. While it was funny to see this happen to an obvious troll, it did make me wonder. I'd have expected that only Stack Exchange personnel would have this kind of power. So the question is - what else can a moderator do to my profile? For example, can a moderator also completely rewrite the "About me" section? I can understand that under rare circumstances, material must be removed from these sections. But I would have expected that elected mods would only be able to make these things go black. Could they also completely rewrite it if they wanted to?
Some people have a diamond after their username (e.g. ) What special privileges do diamond moderators have? How can I become a diamond moderator? Who are the diamond moderators? How many are there? For more information, see in the . Note: not to confuse with certain Stack Exchange employees, for example members or "community managers", who often have diamonds as well, but are not ordinary moderators.
In "The Wolverine", during the final battle, the Silver Samurai heats up his sword and cuts off Wolverine's Adamantium claws: Then, after the Silver Samurai has been injured, Wolverine grows back his original bone claws: But, in "Days of Future Past", Wolverine has his Adamantium claws again. There was no real explanation as to how he got them back, as he still had his bone claws at the end scene where Magneto and Charles Xavier come to see him. So what is the in-universe or out-of-universe explanation for Wolverine getting his Adamantium claws back?
"The Wolverine" movie is a prequel for "Days of Future Past" (because it shows DoFP related scenes on the after-credits). So Wolverine has bone claws when The Wolverine movie ends, and on DoFP it has adamantium claws again, is there any explanation for this? maybe on the comics, or something?
I am trying to add to an array list using a passed in object, but I keep getting a nullpointer exception when executing the line "order.add(shape)" below. public void addSquare(Square shape) { System.out.println(shape.toString()); order.add(shape); } How do I fix the exception? Do I need to initiate shape somewhere?
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?
E: The repository 'https://download.docker.com/linux/debian focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. I'm getting this error when I tried installing docker from . Anyhow, now I don't want it, but I can't find it anywhere in sources. I ran $ sudo nano /etc/apt/sources.list but I cant find the docker repository to remove. How do I remove docker repository?
When updating, I get the following error message: W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file. Here, I find another statement on this error: This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need. Is this what I should do?
I have a burn mark texture and the problem is that when I put it on a plane and adjust the UV mapping instead of there being one burn mark loads show up. How do I get only one?
Update As of 2.76 there is a . In Blender Internal there was an option to turn this off (called ) Is there a way to do this with Cycles? I know you can just scale your textures up with a transparent background, but you end up with textures much bigger than they need to be. Is there a way to this, and if not, why not?
Someone commented one of my answers (on Arquade ) saying they down voted because of the lack of "freehand circles". Is this a joke? Could someone explain it? I don't think they actually did down vote the answer (or if they did someone up-voted at the same time). My answer did contain a picture with a square that I had inserted but it wasn't freehand.
Catchphrases and concepts that spread from person to person are known as [memes], which, courtesy the Internet, can now explode across the Earth like a highly contagious virus (hence "going viral"). As with their real-life counterparts, some infectious diseases are global (pandemic), while others are endemic to specific regions. Stack Overflow, and now even more predominantly Meta Stack Exchange, have seen more than their fair share of these pathological social constructs spread through the user base. They are now ingrained units of our collective culture as SOpedians (a term which I hate, by the way). Just as travelers' immune systems can be assaulted by new diseases in new places, new users are increasingly likely to be miffed by an ingrained meme and left sitting scratching their heads. I therefore propose that this space be used to document the memes endemic to Stack Exchange's culture. Each meme should be listed in a separate answer and I hope that we as a community will be able to provide greater context to each one. Please actually explain each meme in a way understandable to those not already in the know. Especially considering that a lot of these memes aren't really understandable to newer users who weren't around in the early years of the network, or are based on system features that no longer exist. On other Stack Exchange sites [memes]:
Suppose I have a categorical variable neighborhood, which can take the classes Neighborhood1, Neighborhood2, Neighborhood3. I would like to know which neighborhoods can be grouped and what neighborhoods differ in their effect from the rest, and then merge the ones with similar effects into one class. I thought about running a logistic regression model and group all the classes with no statistical significance into one. (A note here, I would run the model with no intercept, because the baseline class method wouldn't be appropriate) Do you think that is viable? Any other suggestion on how to proceed?
I've read that it's bad to do this, but am looking for details as to why. Suppose we're trying to fit the linear model $Y_i = \beta_0 + \beta_1 X_{1i} + \beta_2 X_{2i} + \epsilon_i$ where $Y$ is continuous and $X$s are categorical with many levels. We don't have any opinion on how the levels should be grouped. We then calculate the average response for each level of the predictors, then collapse levels with similar averages. How badly does this screw up parameter estimates and inferences on them, and why?
I've got a LaTeX novel writing project with lots of character quotations. I use Focuswriter to create chapter text files (ASCII, UTF-8). There is no LaTeX markup in the chapter files. A LaTeX master file will include all the code, and have lots of \include{chapter} files, etc. So, I need LaTeX to be able to understand that right and left quotes are not special characters, and I don't want to have to code them into the chapter files. Does UTF-8 add this automatically within LaTeX or XeTeX? Or, is there a package that understand those for pdfTeX or XeTeX?
There are several types of in the English language (and in other languages there are even more). There are also several ways in LaTeX to represent these. I have seen editors, that are capable of directly entering “ and ”. And I have also seen things like this `''. So, what is the best way to do English quotation marks in LaTeX?
I've gotten a couple of meshes from the internet and I need to texture them for a class project. I've learnt the basics of unwrapping cones, spheres, cubes etc. but when it comes to more complex objects, I'm clueless. So how would I UV unwrap something like a blanket draped over a bed? Thanks in advance!
I'm attempting to make a texture for a model i've been working on, so i've been trying to get a decent UV map, However whenever I do it usually ends up either very distorted or a lot of unrecognizable pieces or several different UV maps. What are some easier ways of unwrapping/UV Mapping?
I have a very simple circuit but have no idea on what or how to chose a diode for it. It is for a uni project and we are being marked on our justification for choosing the diodes. Is there such thing as a normal diode? That simply blocks current in one direction and is not designed for anything else? There are so many different types I don't know where to start. I need to place diodes where I have indicated on the schematic. Can anyone suggest any specific models? I've figure the highest forward current will be around 25A, while voltage is around 100V. – Schematic created using
I am trying to find a suitable diode to place on the wire that connects c and e in the circuit, with the cathode on the right hand side. I need to justify why I chose the specific diode as well. However I have no idea on what to chose in terms of forward current and voltage rating as when I start putting other diodes in the circuit later (which is the next step), the currents and voltages through that wire change. I suppose my question is, am I suppose to find out what the highest current is in that wire out of all possible future diode configurations and then use that? And would I be right in using a power (rectifier) diode rather than Zener etc? – Schematic created using
For the Quadratic Form $X^TAX; X\in\mathbb{R}^n, A\in\mathbb{R}^{n \times n}$ (which simplifies to $\Sigma_{i=0}^n\Sigma_{j=0}^nA_{ij}x_ix_j$), I tried to take the derivative wrt. X ($\Delta_X X^TAX$) and ended up with the following: The $k^{th}$ element of the derivative represented as $\Delta_{X_k}X^TAX=[\Sigma_{i=1}^n(A_{ik}x_k+A_{ki})x_i] + A_{kk}x_k(1-x_k)$ Does this result look right? Is there an alternative form? I'm trying to get to the $\mu_0$ of Gaussian Discriminant Analysis by maximizing the log likelihood and I need to take the derivative of a Quadratic form. Either the result I mentioned above is wrong (shouldn't be because I went over my arithmetic several times) or the form I arrived at above is not the terribly useful to my problem (because I'm unable to proceed). I can give more details about the problem or the steps I put down to arrive at the above result, but I didn't want to clutter to start off. Please let me know if more details are necessary. Any link to related material is also much appreciated.
It's stated that the gradient of: $$\frac{1}{2}x^TAx - b^Tx +c$$ is $$\frac{1}{2}A^Tx + \frac{1}{2}Ax - b$$ How do you grind out this equation? Or specifically, how do you get from $x^TAx$ to $A^Tx + Ax$?
I found the two meanings of the verb 'to catch the train, bus etc' in British English: 1) we are getting the stop/station, waiting and boarding 2) we are getting the stop/station, waiting and boarding and do all these things IN TIME. There is the example from the related topic (BrE): How shall we get to London next week?" "I've looked at the timetable, and I think we should catch the 10:49" and I can't undestarnd how this example reffers with my two meanings of the verb 'to catch the train, bus etc'? I think it is more natural to use 'to take' or 'to get' instead of 'to catch'.
Could anyone help me with finding the difference between saying "catch a bus/train/etc" and "take a train/bus/etc"? I'm afraid I haven't been able to glean one from my dictionary.
I'm fairly noobish over here, but delving into the details of the major experiments. The particle nature of a photon has me stumped though. So hopefully there is already an explanation to this I have missed that someone can link too. I can't figure out why light is considered to have a particle nature: We use the photoelectric effect to kick off a tiny amount of energy (at some point the amplitude isn't enough to excite an electron when we hit infrared) and a photo multiplier tube to detect that tiny amount of energy on the other end. We are measuring, though, that an electron has been excited and produced a tiny current that is then multiplied. Why do we then say that that electron was excited by a particle? As opposed to a peak of a tiny wave from one or more electron(s) being excited on the emission side? How do we know it comes from a point and ends at at point; assuming that this is the fundamental essence of 'particle' nature?
Lamb 1969 states, A misconception which most physicists acquire in their formative years is that the photoelectric effect requires the quantization of the electromagnetic field for its explanation. [...] In fact we shall see that the photoelectric effect may be completely explained without invoking the concept of "light quanta." The paper gives a description in which an atom is ionized by light, with the atom being treated quantum-mechanically but the light being treated as a classical wave. Is it true that all the standard treatments in textbooks are getting this wrong? Lamb and Scully "The photoelectric effect without photons," in "Polarization, Matière et Rayonnement," Volume in Honour of A. Kastler (Presses Universitaires de France, Paris, 1969) -- can be found online by googling
I have tried installing this package (needed for android studio). This is the error i'm getting E: Unable to locate package lib32bz2-1.0 E: Couldn't find any package by glob 'lib32bz2-1.0' E: Couldn't find any package by regex 'lib32bz2-1.0' I have already tried: sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install lib32bz2-1.0 & sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install lib32bz2-1.0:i386 I also searched on and did not find lib32bz2-1.0 for Ubuntu 16.04. So how do i get this package which is available for trusty and precise?
I am trying to install Simplicity studio on Ubuntu 15.04 (64-bit) and I get this error E: Unable to locate package lib32bz2-1.0 E: Couldn't find any package by regex 'lib32bz2-1.0' I tried to install lib32bz2-1.0 package, again I get the same error. How to install package lib32bz2-1.0 on Ubuntu 15.04(64-bit)
Hi I am using opengl and I am having a problem if I go further from the skybox with the camera I get black areas, a smaller radius of the skybox will make the camera too close to the object to stay inside the skybox and increasing it obviously doesn't help. : Here is the code for the skybox: glEnable(GL_TEXTURE_2D); glPushMatrix(); qobj = gluNewQuadric(); glTranslated(50,0,0); glBindTexture(GL_TEXTURE_2D, underwater); gluQuadricTexture(qobj,true); gluQuadricNormals(qobj,GL_SMOOTH); gluSphere(qobj,100,100,100); glPopMatrix();
I created a skybox in OpenGL (through LWJGL), but the only way I found to render it behind all objects was to make it very big. This leads to ugly edges between the 6 skybox planes. Optimally, I would draw a small skybox and disable DepthTesting on all other objects, but since I want those to display in the right depth order, that isn't possible. How can I do this?
Is there a way to remove a header and footer from a Google Drive document?
Once you add a header to a Google document, it offsets the top of the document even if empty, and receives click events. How can you then remove the header? I am aware that you can reduce the header's effects by decreasing the page's top margin, and reducing the font size in the header—those are not the solutions I am looking for. I would like a way to actually REMOVE it.
I am very confused!! In my Question class, I am trying to print a question in an array and the corresponding multiple choice answers stored in a separate 2D array. I put that in a loop and am passing int row from the main method and trying to get user input and pass that back to my Question class. Probably doesn't make sense but I get a null point error. Here's all of my code public class Question{ private int selectedAnswer; public String[] questions = { "Favourite sweet", "Favourite subject at Hogwarts", "Dream vacation", "Favourite Drink", "Dream House", "What do you desire the most?", "Favourite dress robe colour", "Pick a muggle career", "Pick a creature" }; private String[][] options = { {"1.Acid Pops","2.Sherbert Lemons","3.Bertie Bott's Every Flavour Beans", "4.Cake","5.Hagrid's Rock Cakes","6.Chocolate Frogs","7.Ginger Newt", "8.I hate sweets"}, {"1.Care of Magical Creatures","2.Charms","3.Defense Against the Dark Arts", "4.Divination","5.Herbology","6.History of Magic","7.Muggle Studies","8.Potions", "9.Study of Ancient Runes","10.Transfiguration"}, {"1.Anywhere with friends","2.Egypt","3.Hogwarts","4.Museum","5.India","6.Forest", "7.Can't be bothered with a vacation"}, {"1.Unicorn blood", "2.Pumpkin Juice", "3.Butter beer", "4.Coca-Cola", "5.Tea", "6.Coffee", "7.Brandy"}, {"1.The Burrow", "2.A Cottage", "3.Thirteen Grimmauld Place", "4.Malfoy Manor"}, {"1.Friends", "2.Success", "3.Money", "4.Power"}, {"1.Black", "2.Red", "3.Pink", "4.Green", "5.Orange", "6.Blue"}, {"1.Lawyer", "2.Teacher", "3.Social Worker", "4.Prime Minister", "5.Google Employee"}, {"1.Centaur", "2.Basilisk", "3.Unicorn", "4.Thestral", "5.Phoenix", "6.Hippogriff", "7.Dementor"} }; private String[] quizQuestion; private String[][] quizOptions; //new update: private String quizQuestion; private String[] quizOptions public Question(int row){ for(int i= row; i< questions.length; i++){ **quizQuestion[i] = questions[i];** //null point error quizQuestion = questions[i]; // new update for(int j = row; j < options[i].length; j++){ quizOptions[i][j] = options[i][j]; quizOptions[i] = options[i][j]; // new update } } } public String[] getQuizQuestion(){ **return this.quizQuestion;** //null point error } public String[][] getQuizOptions(){ return this.quizOptions; } public void setSelectedAnswer(int userInput){ selectedAnswer = userInput; } } Main method import java.util.Scanner; public class Main{ public static void main(String[] args){ Question q = new Question(0); System.out.println(q.getQuizQuestion()); System.out.println(q.getQuizOptions()); Scanner keyboard = new Scanner (System.in); int userInput = keyboard.nextInt(); System.out.println("Select an answer: "); q.setSelectedAnswer(userInput); } }
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'm having trouble resizing my hard drive partition. Before, I was running OS X Lion in the free space above Macintosh HD 2. Now that I deleted the Lion partition, I am unable to resize Macintosh HD 2 to the full capacity of my hard drive.
I have 2 partitions, I reduced the size of one and want to expand the other to fill the now available space. How do I expand the Lion Partition into the empty grey space beneath Macintosh HD partition?
For the line integral of non-vector field functions, I know that you can kind of consider the line integral to be the area of a fence, with the base of the fence slinking along the curve of interest and the roof of the fence bordering on a function f(x,y). But for the line integral of a vector field, I'm not sure how I should visualize or conceptualize it. Any help would be awesome!
I can understand how the line integral of a scalar function has pure-mathematical significance, representing an area beneath a curve. But is there a pure significance to the line integral of a vector field? The only understanding I have of this is the physical example of work done on a moving particle. Thanks for any insight.
How can I change the arrow color in beamer? by default they're blue triangles I tried \setbeamertemplate{itemize items}[triangle, red] and \setbeamertemplate{itemize items}[triangle]{\color{red}} I want to make this for all slides in my presentation. (Note to self: 20 years coding experience and nothing in Latex is where I expect it to be).
I would like to change the color of itemize item and itemize subitem (the bullet) throughout the presentation. I was wondering how I can do that. Here is my MWE: \documentclass [11 pt, xcolor=pdftex,x11names,table]{beamer} \usepackage{pgf, pgfpages} \usepackage[latin1]{inputenc} \usepackage[english]{babel} \usepackage{beamerhighlight} \usepackage{colortbl} \usepackage{color} \usepackage{pdfpages} \usepackage[absolute,overlay]{textpos} \usepackage{url} \usepackage{graphicx} \mode<presentation> { \usetheme{Madrid} \usefonttheme{professionalfonts} \setbeamertemplate{itemize item}{$\blacksquare$} \setbeamertemplate{itemize subitem}{$\blacktriangleright$} } \usepackage{hyperref} \begin{document} \begin{frame} \begin{itemize} \item hey \end{itemize} \end{frame} \end {document}
Suppose $E$ is a splitting field of a polynomial $f(x)$ over $F$ and $K$ a subfield of $E/F$. Can any monomorphism of $K \to E$ be extended to an automorphism of $E$?
It's a common theorem in field theory that if $\varphi: F\to\overline{F}$ is a field isomorphism, and if $E$ and $\overline{E}$ are splitting fields of monic polynomials $f(x)$ and $\overline{f}(x)$, respectively, where $\overline{f}$ is the image of $f$ under $\varphi$, then $\varphi$ can be extended to an isomorphism of $E$ and $\overline{E}$. I'm wondering about the following: Suppose $E$ is a splitting field of a polynomial $f(x)$, and $k$ is a subfield of $E/F$. Can any monomorphism of $\varphi:k\hookrightarrow E$ be extended to a field isomorphism of $E$? Defining $\overline{k}:=\varphi(k)$, I get the case that $\varphi:k\to\overline{k}$ is a field isomorphism, and $f(x)$ and $\overline{f}(x)$ both split over $E$, when regarded as polynomials in $k$ and $\overline{k}$. But is $E$ still a splitting field of $f(x)$ and $\overline{f}(x)$ as polynomials in $k$ and $\overline{k}$, or is it possibly too big to be a splitting field? If it is a splitting field, then I suppose it would follow that any monomorphism on a subfield can be extended to an isomorphism of the splitting field.
An Echo knight's echo is an object, which makes it hard to turn invisible, as invisibility and greater invisibility only affect creatures. What options, from any non-homebrew source, allow you to turn an object (thats not being worn or carried by an invisible creature) invisible in 5e?
I'm the DM of a 5th-level party whose PCs have a handful of illusion spells in their repertoire. The players have on at least one occasion mentioned the idea of using one of these spells to hide some important object -- not by covering it with the image of another solid object, but with an illusion of open air. The question "" already covers that scenario, where the accepted answer strongly implies it shouldn't work. But what about spells that are expressly designed to make objects invisible? Invisibility (and Greater Invisibility) works on creatures and their equipment, but the types of objects the players want to hide are things that can't exactly be carried on someone's person (e.g. a cart, a statue, a mound of dirt from digging a deep hole). The only spell in the Player's Handbook I found that describes making an object invisible is Sequester, but it's overkill for this situation (7th-level spell, 5k gp in material components, also blocks divination, lasts until dispelled). Are there any other effects (spells, items, or otherwise) that can make an object or volume invisible? I'll accept any official or playtest publication as a valid resource. I don't necessarily need it to be available/affordable to 5th-level PCs, but I'd prefer something near the level/value of Invisibility, since I'm looking for similar utility.
I have just installed TeX Live 2015 using "install-tl-WINDOWS.bat"on windows 10-64bits. When I click in "TeX Live Manager",nothing happens. if I execute "tlmgr-gui" in a command line, nothing happens & no message appear. if I execute "tlmgr -gui" or "tlmgr --gui" in a command line,I got this: The locale codeset (cp720) isn't one that perl can decode, stopped at C:\texlive\2015\tlpkg\tlperl\lib/Encode/Locale.pm line 123. Compilation failed in require at C:\texlive\2015\tlpkg\tlperl\lib/LWP/UserAgent.pm line 1001.. what is the mistake?
When I want to update packages of texlive 2015 I get this error? what is the problem? tlmgr update --list The locale codeset (cp720) isn't one that perl can decode, stopped at C:\texlive \2015\tlpkg\tlperl\lib/Encode/Locale.pm line 123. Compilation failed in require at C:\texlive\2015\tlpkg\tlperl\lib/LWP/UserAgent. pm line 1001.
Why is this happening? I've updated my machine last week. W: GPG error: http://repo.mysql.com trusty InRelease: The following signatures were invalid: KEYEXPIRED 1487236823 KEYEXPIRED 1487236823 KEYEXPIRED 1487236823
The error I am having when trying to update my package list. W: GPG error: http://download.opensuse.org ./ Release: The following signatures were invalid: KEYEXPIRED 1436387333 W: Failed to fetch http://ppa.launchpad.net/samrog131/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.
Cannot find a logout-link/button. Yes, asked before - answered before. Lots of time. Know that. Unfortunetaly no one of the answers do the job. If I log off Google, I'm still logged in to stackoverflow. If I'm logged off stackoverflow I'm still seing my credentials, as I see them - not how "foreign" people should see them. Reason? I want to see my profile as other see it. Suggestion: There should be a "how people see you"-feature.
Why does logging in to Stack Overflow keep me signed in to my Gmail email after logging out and regardless of the Stay signed in checkbox? Steps to reproduce: Browse to and confirm you are logged out Browse to and confirm you are logged out Click login Click Google Enter Email/Password and confirm Stay signed in is unchecked Click Sign in Click logout (up top) Click Logout (down below) Browse to and confirm you are still logged in Click Sign out <- Shouldn't clicking Logout on Stack Overflow be doing the same thing as this? Browse to and confirm you are logged out Answers are making sense but my frustration is that clicking Logout (twice) on StackOverflow essentially does nothing. If I proceed to click login and Gmail I am immediately authenticated because I still have an active Gmail cookie. In order to effectively logout I need to click Logout twice on Stack Overflow and then manually browse to and Sign out.
I am using Java and have been trying to split my string input into 3 parts. For example, my input will be "AND 1 1", and I am expecting it to go into my if-loop where the condition is parts[0] == "AND". But this is not the case, and I am not sure why. My code is listed below Scanner stringInput = new Scanner(System.in); String input = stringInput.next(); System.out.printf("%s\n", input); String[] parts = input.split(" "); if (parts[0] == "AND") { if (parts[1] == parts[2] && parts[1] == "1") System.out.printf("1\n"); else System.out.printf("0\n"); } else { if (parts[1] == "1" || parts[2] == "0") System.out.printf("1\n"); else System.out.printf("0\n"); }
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?
Recently my minecraft account was hacked. I was lucky and got an email from mojang asking to confirm if it was me who logged in and changed my name. I changed that password and kicked out any logged in people. When i logged back on I noticed that my username and skin was changed. I changed my skin back and then tried to change back my username. It said i had to wait 30 days. I was wondering if i am able to email mojang or anyone on their support team about this. anyways im really hoping some people can help. (I WILL NOT HACK OR DO ANYTHING ILLEGAL)
How do I change my name in minecraft name earlier than the 30 days please, I need help. My name is really dumb and I would like to change it early. I do not hack and I would like to change it early with NO hacks. I already looked up this question but I got no help . I tried looking up and I am quite impatient. is the link I used
Things I know already 1) Rubber sheet analogy of GR is yet another misleading piece of info 2) differential geometry makes sense 3) equivalence principle makes sense 4) special relativity makes sense I am trying to develop a better understanding of curvature in space-time. Current Dilema Trying to refine understanding of the effect of curved space-time on a stationary object. We all know that stationary objects do fall. Curvature, I reasoned, can surely only be experienced, (and therefore only cause an effect, such as an apparent acceleration), if an object has a trajectory; if it is moving relative to the curve. Massive stationary objects have a trajectory only in time, so the answer must be that curvature of time alone can be responsible for the effects we call gravity. Question I Think I Need to Ask This is a theoretical scenario. A point mass is; a) stationary in b) a spatially flat volume, which c) is curved in time in a simple way (a geometry that is purely theoretical, but allows the question to focus on the effects of time) d) by what mechanism does this mass experience a change in velocity? I know I haven't used many mainstream GR terms, but I hope the question makes sense. Other Aspects Curved space is not a massive conceptual challenge, but curvature in space-time is more difficult. There seem to be less familiar concepts to relate distortions of the temporal dimension to. The answer I am not looking for is that GR can only be "understood" by directly using the maths. In this case I would initially think that would really just mean you don't know (It's not like the philosophy struggle people go through with, for example, the meaning of wave-functions). However, I'd be happy to be pointed to a mathematical treatment of this kind of scenario that I can scrutinise; (that will be easier for me if lower level constructs are used). Thanks in advance for your help.
They say that gravity is technically not a real force and that it's caused by objects traveling a straight path through curved space, and that space becomes curved by mass, giving the illusion of a force of gravity. That makes perfect sense for planetary orbits, but a lot less sense for the expression of gravity that we are the most familiar with in our day-to-day lives: "what goes up must come down." Imagine that I hold a ball in my hand, several feet off the ground, with my fingers curled around it, and my hand is above the ball. Then I open my fingers, releasing my grip on it, being very careful to not impart any momentum to the ball from my hand as I do so. An object at rest remains at rest unless acted upon by an outside force. If the ball is not moving (relative to my inertial reference frame), it has no path to travel that's any different from the Earth's path through space. It should remain at rest, hanging there in the air. And yet it falls, demonstrating that an outside force (gravity) did indeed act upon it. How does curved space explain this?
Consider the system of simultaneous linear equations \begin{align} a_{11} &x_1 &&\; + \;&& a_{12} x_2 &&\; + \cdots + \;&& a_{1n} x_n &&\; = \;&&& 0 \\ a_{21} &x_1 &&\; + \;&& a_{22} x_2 &&\; + \cdots + \;&& a_{2n} x_n &&\; = \;&&& 0 \\ \vdots\;&\; && && \;\;\;\vdots\;\;\; && && \;\;\;\vdots\;\;\; && &&& \vdots \\ a_{m1} &x_1 &&\; + \;&& a_{m2} x_2 &&\; + \cdots + \;&& a_{mn} x_n &&\; = \;&&& 0 \\ \end{align} for constants $a_{ij}$ and unknowns $x_j$ , in the case where $m < n$ prove that there must exist infinitely many solutions to this system of equations. Okay, so it's pretty easy to prove that this set of equations must have solutions because we have m equations and n values, we x_1=x_n=0 is our trivial solution and if we have more than this one solution, then out null space will be greater than {0} which implies we don't have an injective set of equations. As m is less than n we know the system is not injective, which tells us there must be non-zero solutions. But I want to show these solutions are infinite which means for x_n solutions, the solution should include a parameter. How can I go about this?
I learnt that for the equation: $Ax=b$ There is one solution if $A$ is invertible. But if $A$ is singular there are infinity solutions or no solutions at all. If $A$ is singular is it possible to determine whether there are no solutions or infinity solutions?
I've just put Ubuntu 13.04 on my ASUS B400A-XH51 laptop and am having a problem with the touchpad: It has discrete left and right buttons, and the left one works fine, but the right one does nothing when pressed. (I can still do a right click by using a two-finger tap, although I would rather disable tapping and just use the discrete buttons.) Also, if I put my finger on the lower-right area of the touchpad while clicking the discrete left button, it acts as a right-click -- as though Ubuntu thinks it is a clickpad. Any ideas for how to make the right button work? (Similar to an issue with ASUS G46VW: ) Here is the output of "xinput --list" ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ ETPS/2 Elantech Touchpad id=13 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ Power Button id=8 [slave keyboard (3)] ↳ Sleep Button id=9 [slave keyboard (3)] ↳ USB2.0 HD UVC WebCam id=10 [slave keyboard (3)] ↳ Asus WMI hotkeys id=11 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
I have a Sony VAIO E14. The touchpad detects all clicks as Left clicks. In Windows 7, pressing on the right side of the touchpad is recognised as a right click. How can I enable right clicking? greg@greg-SVE14A1C5E:~$ xinput ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=11 [slave pointer (2)] ... greg@greg-SVE14A1C5E:~$ grep "TouchPad: buttons:" /var/log/Xorg.0.log [ 23.112] (--) synaptics: SynPS/2 Synaptics TouchPad: buttons: left double triple
I wanted to create a method to search through a array list to see if the objects in the array list end with the given char character and then return the count of the character as a int. public int OccurencesOfCharacter(Char givenCharacter){ .... } Here's my array List private ArrayList<Class> list; For example if the Array List Contained [ Games, iphones] and my given occurrence character was 's' i want to return 2 because it appears twice at the end of the strings.
I have the string a.b.c.d I want to count the occurrences of '.' in an idiomatic way, preferably a one-liner. (Previously I had expressed this constraint as "without a loop", in case you're wondering why everyone's trying to answer without using a loop).
My son got lost in the Nether and can't find the portal back to his world. He tried building another portal but it didn't take him back. He's using the app on an iPad and I have no clue on how to help him, he's pretty devastated and thinks everything is lost forever.
I made a castle on Minecraft Pocket Edition that was far away from the place that I spawned. Once I had made my castle, I went to the Nether and got lost. I made a new Nether portal, went through, and ended up at a completely different portal than the one I made at the castle. Now I'm lost. I have used the compass to get back to the place that I spawned, but I still need to get back to my castle. I'm in creative mode.
I'm making JKnRnS master slave flip-flop, here is my code: library IEEE; use IEEE.std_logic_1164.all; entity JKnRnS is port( C : in STD_LOGIC; J : in STD_LOGIC; K : in STD_LOGIC; nR : in STD_LOGIC; nS : in STD_LOGIC; Q : inout STD_LOGIC; nQ : inout STD_LOGIC ); end entity; architecture JKnRnS of JKnRnS is signal Q_int: std_logic := '1'; signal NQ_int: std_logic := '0'; signal a,b,c1,d,f,e,notC: STD_LOGIC; begin a<=not(C and J and nS and NQ_int); c1<=not(d and a and nS); d <= not(nR and b and c1); b <= not(Q_int and nR and K and C); e <= not(notC and c1); f <= not(d and notC); Q_int <= not(NQ_int and e and nS); NQ_int <= not(nR and f and Q_int); notC <= not(C); Q<=Q_int; nQ<=NQ_int; end architecture; which works fine, but when I change it into: library IEEE; use IEEE.STD_LOGIC_1164.all; use IEEE.STD_LOGIC_MISC.all; entity nand_3 is generic (t_rise: TIME:= 0 ns; t_fall : TIME:= 0 ns); port( in1 : in STD_LOGIC; in2 : in STD_LOGIC; in3 : in STD_LOGIC; out1: out STD_LOGIC ); end entity; architecture nand_3 of nand_3 is begin process (in1, in2, in3) is begin out1 <= not(in1 and in2 and in3); end process; end architecture; library IEEE; use IEEE.STD_LOGIC_1164.all; entity nand_4 is port( in1 : in STD_LOGIC; in2 : in STD_LOGIC; in3 : in STD_LOGIC; in4 : in STD_LOGIC; out1 : out STD_LOGIC ); end entity; architecture nand_4 of nand_4 is begin process (in1, in2, in3, in4) is begin out1<=not(in1 and in2 and in3 and in4); end process; end architecture; library IEEE; use IEEE.std_logic_1164.all; entity JKnRnS is port( C : in STD_LOGIC; J : in STD_LOGIC; K : in STD_LOGIC; nR : in STD_LOGIC; nS : in STD_LOGIC; Q : inout STD_LOGIC; nQ : inout STD_LOGIC ); end entity; architecture JKnRnS of JKnRnS is signal Q_int: std_logic := '1'; signal NQ_int: std_logic := '0'; signal a,b,c1,d,f,e,notC: STD_LOGIC; begin E1: entity work.nand_4(nand_4) port map(in1=>C, in2=>J, in3=>nS, in4=>NQ_int, out1=>a); E2: entity work.nand_3(nand_3) port map(in1=>d, in2=>a, in3=>nS, out1=>c1); d <= not(nR and b and c1); b <= not(Q_int and nR and K and C); e <= not(notC and c1); f <= not(d and notC); Q_int <= not(NQ_int and e and nS); NQ_int <= not(nR and f and Q_int); notC <= not(C); Q<=Q_int; nQ<=NQ_int; end architecture; I get an error: KERNEL: Error: KERNEL_0160 Delta count overflow. Increase the iteration limit using -i argument for asim or the matching entry in simulation preferences. What is wrong here?
I'm using quartus II to design a JK Flip Flop. However, my results show unknown output. Why is it? Intended design circuit: VHDL code: library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity JKFlipFlopGate is port( J,K,Clk : in std_logic; --JK Flip-Flop gate input 1 & 2 Q,Qbar : out std_logic --JK Flip-Flop gate output ); end JKFlipFlopGate; architecture result of JKFlipFlopGate is signal out1,out2,out3,out4 : std_logic; begin out1 <= NOT(J AND Clk AND out4); out2 <= NOT(K AND Clk AND out3); out3 <= out1 NAND out4; out4 <= out2 NAND out3; Q <= out3; Qbar <= out4; end result;
I am trying to install ubuntu alongside windows 7 using a usb flash drive and when I went to install it I got this message: "This machine's firmware has started the installer in UEFI mode but it looks like there may be existing operating systems already installed using "BIOS compatibility mode". If you continue to install Debian in UEFI mode, it might be difficult to reboot the machine into any BIOS-mode operating systems later. If you wish to install in UEFI mode and don't care about keeping the ability to boot one of the existing systems, you have the option to force that here. If you wish to keep the option to boot an existing operating system, you should choose NOT to force UEFI installation here." Then I have to options, 1. Go Back and 2. Continue in UEFI mode I clicked go back and it still proceeded to the next part of the installation, so I quit so I can ask here if I am doing something wrong because I don't want to mess with anything in windows 7 or my BIOS after I install ubuntu. I have used this flash drive to install ubuntu alongside windows 7 on two other pcs and never got that message. What does this message mean? Should I be doing something differently? I don't even know what Debian is (I am trying to install Ubuntu)?
I try to install Ubuntu 16.04 next to Windows 10. Windows is installed on legacy bios and then upgraded to Windows 10. When I try to install Ubuntu from USB stick, it shows a message titled "Force UEFI installation?". It says that the machine's firmware started the installer in UEFI mode but there is an OS installed using BIOS compatibility mode. If I force installation I won't be able to boot Windows. How can I start the installer in legacy mode? BIOS of the machine supports legacy and UEFI modes. Legacy support is enabled. But USB disk is always recognized as EFI. USB disk's name is shown as "EFI USB Disk" in BIOS. I cannot change that. I burned the USB with both startup disk creator on ubuntu 14.04 and pendrive software on Windows. Same result. Thanks.
I ran a proc univariate on a SAS data set and one of the output results was: Test -Statistic- -----p Value------ Student's t t 73.93231 Pr > |t| <.0001 How should I interpret this? Does it mean that the probability that an observation will be > 73.93 is very small (< .0001)
After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests. It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results. Many computerized tools report test results in terms of "p values" or "t values". How would you explain the following points to college students taking their first course in statistics: What does a "p-value" mean in relation to the hypothesis being tested? Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?
The integral $$ \int_0^\infty \int_0^\infty \frac{e^{-(x+y)}}{x + y}\,dx\,dy $$ is (A) infinite (B) finite, but cannot be evaluated in closed form (C) $1$ (D) $2$ I have tried with integration by parts in succession and ending up with value $1/2$. But there is no such option. The correct option is (C) $1$. Where I am going wrong?
Question : The integral $$ \int_{0}^{ \infty} \int_{0}^{ \infty} \frac { e^{-(x+y)}}{x+y} \mathop{dx}\mathop{dy} $$ is (a) infinite (b) finite but can not be evaluated in closed form (c) 1 (d) 2 . I tried substituting $u=x+y$ and $v=y$ that led me no where . I'm not even sure about convergence of integral .Any help would be greatly appreciated .
A box contains 10 pens, and the probability that any given pen is defective is $p$. The expected value is $\sum_{X = 0}^{10} X \binom{10}{X}p^X(1-p)^{10-X}$. Using the binomial theorem, I know that $\sum_{X = 0}^{10} \binom{10}{X}p^X(1-p)^{10-X} = 1$. By testing different values of $p$, I found that the expected value is $10p$. Is there a way of proving this?
If $\mathrm P(X=k)=\binom nkp^k(1-p)^{n-k}$ for a binomial distribution, then from the definition of the expected value $$\mathrm E(X) = \sum^n_{k=0}k\mathrm P(X=k)=\sum^n_{k=0}k\binom nkp^k(1-p)^{n-k}$$ but the expected value of a Binomal distribution is $np$, so how is $$\sum^n_{k=0}k\binom nkp^k(1-p)^{n-k}=np$$
I wish to draw a rounded corner box (top-left side as a square, top-right side with 6pt radius curve and the bottom of two sides also with radius curve), in addition to that there should be shading, how can I get such a style? Is there any package available for this task?
This is my minimal example: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[rounded corners=3pt, draw, fill=red!20]{Hallo!}; \end{tikzpicture} \end{document} I'd like to define different values for rounded corners (i.e. 5pt for north-west and north-east and 2pt for south-east and south-west).
I have a map built with a shapefile for country contours and a raster from .hgt files with elevation representation. How can I only select the area corresponding to the country? I found some thing for matlab but not in QGIS. I'm thinking of using a polygon, but I am not familiar with how to do so. Or in a subtraction of the outside, but how to determine that? On the image, the red lines show the parts I want to eliminate.
I have 2 satellite images (jpeg2000 format) and 2 xyz-files from the same area. I am trying to extract certain region from the area including contour lines and the satellite image in order to import these into Google Sketchup for terrain modeling. I have been able to create contour lines from xyz-files. Anyway, I would like to first merge contours and then satellite pictures and finally extract only certain part of the data (both contours and satellite pictures). Is there some kind of instruction available that would help in a problem like this?
I want to delete all my photos from my iPhone 4s running iOS 7.0.3 but it wont let me. I have tried in numerous ways, but they don't work. I don't want to delete them one-by-one. Usage → Camera and Photos, swipe Camera Roll and delete does not work on iOS 7. I tried using Image Capture on my computer, and my device shows up on the left, but there are no image files. I tried manually deleting them from my iPhone files on my Windows 7 PC but it wont let me delete them.
How do I delete photo albums that I accidentally imported to my iPhone 4S from my PC? There is no delete available for either album or individual pictures.
My techno g9 device shows internal storage 0.99G Usb storage 12 G and Sd Card 27G. All installed apps go to the .99G which is full. So i cant dowload any new apps. Please how can i change the instal folder to the 12G usb storage or the 27G Sd card.
I would like to know whether there is a way to tell Android to install applications on the micro SD card by default instead of having to download applications to internal memory first and then having to move them to the SD card manually. Thanks
I found the code that is blocking the home button and I did want to try it, but when I run it nothing happens, even my layout doesn't show and also I have an error when I go to the home screen (see below the code). What do I do wrong? public class LockActivity extends Activity{ private LockscreenUtils mLockscreenUtils; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.layout_lock); lockHomeButton(); } public void unLockHomeButton() { mLockscreenUtils.unlock(); } public void lockHomeButton() { mLockscreenUtils.lock(LockActivity.this); } } This is where I block the home button: public class LockscreenUtils { private OverlayDialog mOverlayDialog; public void lock(Activity activity) { if (mOverlayDialog == null) { mOverlayDialog = new OverlayDialog(activity); mOverlayDialog.show(); } } public void unlock() { if (mOverlayDialog != null) { mOverlayDialog.dismiss(); mOverlayDialog = null; } } private static class OverlayDialog extends AlertDialog { public OverlayDialog(Activity activity) { super(activity, R.style.OverlayDialog); WindowManager.LayoutParams params = getWindow().getAttributes(); params.type = TYPE_SYSTEM_ERROR; params.dimAmount = 0.0F; // transparent params.width = 0; params.height = 0; params.gravity = Gravity.BOTTOM; getWindow().setAttributes(params); getWindow().setFlags(FLAG_SHOW_WHEN_LOCKED | FLAG_NOT_TOUCH_MODAL, 0xffffff); setOwnerActivity(activity); setCancelable(false); } public final boolean dispatchTouchEvent(MotionEvent motionevent) { return true; } protected final void onCreate(Bundle bundle) { super.onCreate(bundle); FrameLayout framelayout = new FrameLayout(getContext()); framelayout.setBackgroundColor(0); setContentView(framelayout); } } } These are the errors that I have: Caused by: java.lang.NullPointerException at com.example.amadey.pre_final_version.LockActivity.lockHomeButton(LockActivity.java:46) at com.example.amadey.pre_final_version.LockActivity.onCreate(LockActivity.java:31) at android.app.Activity.performCreate(Activity.java:5231) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)             at android.app.ActivityThread.access$800(ActivityThread.java:135)             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:136)             at android.app.ActivityThread.main(ActivityThread.java:5001)             at java.lang.reflect.Method.invokeNative(Native Method)             at java.lang.reflect.Method.invoke(Method.java:515)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)             at dalvik.system.NativeStart.main(Native Method)
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
I have an Aspera Jazz 7.0 which had frp turned on. Because of weird network issue, I had to reset it. But I forgot my account password and the phone number. I can go with a new account, but I can't turn off the frp . I tried fastboot. But can't hard reset it. How can I turn it off?
I won a Samsung Galaxy S6 Edge, signed into it with my Google account, played around with it, wiped it, and sold it. Now the person can't get past setup because it's saying he must login with an account previously synced to the phone. Is there anything I can do from my side to remove this lock?
I have a problem. I'm going to make "One commandblock creation", but 'Unbalanced Curly Brackets' Error pops out, when trying to use this: /summon FallingSand ~ ~1 ~ {Block:stone,Time:1,Passengers:[{id:FallingSand,Block:redstone_block,Time:1,Passengers:[{id:FallingSand,Block:activator_rail,Time:1,Passengers:[{id:MinecartCommandBlock,Command:gamerule commandBlockOutput false},{id:MinecartCommandBlock,Command:kill @e[type=MinecartCommandBlock,r=1]},{id:MinecartCommandBlock,Command:fill ~ ~-3 ~ ~ ~ ~ air}]}]}]} I was trying to find mistake using Notepad++ but everything looked fine there...
I am trying to make a chest that is called 'I' that has another chest inside called 'II' that has another chest inside called 'III' that has another chest inside called 'IV' that has another chest called 'V' that has a piece of paper called 'An important message...' and it has a lore saying 自分自身を解放する方法があります。呪文はもう一度私たちの魂を得る。しかし、我々はそれを話さなければならない - 私たちは話すないとき - 音が出ないを。我々は、すべての耳が聞こえています。だから、失敗は避けられない。そして、私は今まで私の中の悪魔で、私の内部賭けに入る後悔。不滅か。魂のひったくり。ジェイク対ゲイリー·クルック。野望は過大評価され。 I keep getting 'Unbalanced Curly Brackets' every time I try use this command. I checked with Notepad++, I'm pretty sure the curly brackets are right? Here's the command below, but what am I doing wrong? /setblock ~ ~ ~ chest 0 replace {Items:[{id:54,Count:1,Slot:13,tag:{display:{Name:"II"},Items:[{id:54,Count:1,Slot:13,tag:{display:{Name:"III"},Items:[{id:54,Count:1,Slot:13,tag:{display:{Name:"IV"},Items:[{id:54,Count:1,Slot:13,tag:{display:{Name:"V"},Items:[{id:339,Count:1,Slot:13,tag:{display:{Name:"An important message...",Lore:[自分自身を解放する方法があります。呪文はもう一度私たちの魂を得る。しかし、我々はそれを話さなければならない - 私たちは話すないとき - 音が出ないを。我々は、すべての耳が聞こえています。だから、失敗は避けられない。そして、私は今まで私の中の悪魔で、私の内部賭けに入る後悔。不滅か。魂のひったくり。ジェイク対ゲイリー·クルック。野望は過大評価され。]}}}]}}}]}}}}],display:{Name:"I"}}}
Using Java's enhanced for loop, I have for quite some time avoided using the structure if I needed the processing to be in any particular order (for example: printing out the values in a table in the same order as the collection). It seems obvious that that should be the case, but on the other hand, the syntax of the structure seems to imply that I should not rely or know about that. Perhaps embarrassingly, I have not been able to track down any documentation that explicitly says enhanced for loops are processed in first-to-last order. Does such documentation exist, and if so, where can I find it?
Consider: List<String> someList = new ArrayList<String>(); // add "monkey", "donkey", "skeleton key" to someList for (String item : someList) { System.out.println(item); } What would the equivalent for loop look like without using the for each syntax?
On my iOS 14.5.1 iPhone 7 how can I check if an SMS message has actually been sent or not? It is just a green bubble with no sent confirmation nor 'pending' indication anywhere near it in the Messages app. I don't trust my 1-0 bar fluctuating network connection. How can I find out if the message has been sent or not?
I have an iPhone 4, sometimes I get the green sms bubble and sometimes an iMessage bubble. At times it states sent as text message and sometimes it doesn't. When it doesn't does that mean the message has been sent out?
We see the mix of red light and green light as yellow light (#FFFF00). The wavelength of yellow light lies between red and green. But the wavelength of purple light lies outside of red and blue. Why can we also see the mix of red and blue as purple? Is it real ?
In computer science, we reference colours using the RGB system and TVs have pixels which consist of groups of red, green and blue lines which turn on and off to create colours. But how does this work? Why would certain amounts of red, blue and green light make something seem yellow? Is this a biological thing, where our brain performs some kind of averaging operation, or are the waves actually interacting to make light of a new wavelength? It seems RGB is a "universal triplet", as every colour within the visible spectrum can be created by combining the three in different intensities. Is RGB the only such triplet? If so, why? If not, what features must a triplet of colours have to be universal?
I can dynamically change the CQL filter, but I want to reset it to default (get WMS without any filter). Class I am using "ol.source.TileWMS" as source from GeoServer Here is my code to which I used to update the CQL filter: overlay_layer_definition_array[selected_layer].getSource().updateParams({ 'LAYERS': Lay_Param[selected_layer][1] + ':' + Lay_Param[selected_layer][2] ,'cql_filter': ''+strUser+strUser1+strUser2}); The above code works fine, but now I don't want to pass any filter, tried all of below does not work refresh() does not work 'cql_filter': nil does not work 'cql_filter': 'nil' does not work
I'm using OpenLayers to show my map with some layers. I've a field where I can add some filters with CQL code. I can successfully add a new filter to my map, and only the right points appear in my map but when I try to remove the filters it's deleting my Layer instead of my previous CQL_Filter result, so is deleting ALL the points from the map. //My var map is previously declared var layerFromMap = map.getLayersByName(input.name)[0]; //If my input is empty then I should delete the filters, like resetting the search if (input.value.length > 0) { layerFromMap.mergeNewParams({ 'CQL_FILTER': input.value }); layerFromMap.redraw(); } else { delete layerFromMap.params.CQL_FILTER; layerFromMap.redraw(); } When input is empty layerFromMapparams.CQL_FILTER is deleting my layer from the map, so all the points are deleted. Why is this happening? How can I only remove the filter so all the points appear again?
Question is to factorise $x^5+x^2+1$ into irreducible polynomials in $\mathbb{Z}$[x]. But I'm fairly sure $x^5+x^2+1$ is already irreducible, but not sure how to prove this as neither Eisenstein's criterion nor showing that it is irreducible mod(p) will work. The only thing I have so far is to write it as $x^2(x+1)(x^2-x+1)+1$ and show that these are all irreducible, but not sure that that counts.
So here is my question: i would like to determine if whether or not the polynomial $x^5+x^2+1$ in $Z[x]$ is irreducible and if not then find the factors. I tried a lot to find it. I really think it is already irreducible but I don't know how to prove it. I tried Eisenstein's criteria which doesn't work here, I tried to check this criteria also after changing $x$ as $ax+b$ but everything I check was too complicated. I tried for the modulus with prime numbers of $Z$, and I'm not sure of my following argument: The polynomial $\mod 2$ stays $x^5+x^2+1$. But if $x$ is odd then $x^5$ and $x^2$ are odd too. Then the polynomial is given by $1+1+1=3=1 \mod 2$ which is irreducible (not sure if I have the right to say that). And if $x$ is even, then $x^5$ and $x^2$ are even too. The polynomial is thus given by $0+0+1=1 \mod 2$ which is irreducible. Hence the polynomial is irreducible $\mod 2$ and since it's a monic polynomial it implies it is irreducible in $Z[x]$ Is my argument correct? If not if you have any clue please I would like to have some :) Thank you and good night!
I'm using biblatex, with the biber backend on pdflatex. The default line-spacing in my document is double spaced and the line-spacing in my bibliography is also double spaced. How can I make the spacing within individual entries single spaced while keeping the spacing between entries as it is (double spaced).
How can you control (in my case reduce) the spacing of the bibliography in biblatex? I used to use \begin{spacing}{0.9} \bibliographystyle{plain} \bibliography{refs} \end{spacing} and \setlength{\bibsep}{0.0pt}. But how do you do the equivalent in biblatex? EDIT: I should maybe have mentioned I am using \begin{refsection} \printbibliography[heading=subbibliography] \end{refsection} [..] \begin{refsection} to get multiple bibliographies and I would like to be able to control the spacing per bib. \printbibliography[heading=subbibliography] \end{refsection}
The highest energy accelerator till date is the LHC which operates at an energy scale of perhaps 10-100 TeV. In SI units this is about $\sim 10^{-6}-10^{-5}$ Joule which is several orders of magnitude smaller than the energy scales we are used to in daily life. For example, the work done and heat produced by thermodynamic engines are hundreds of Joules. Why is then particle physics regarded as the 'high energy physics'? 'High' with respect to what? I feel this has something to do with very small masses of the elementary particles. Incidentally, why is it difficult to reach energies as high as hundreds of Joules for elementary particles?
Considering that $7$ TeV is more or less the same kinetic energy as a mosquito flying, why is it considered to be a great amount of energy at the LHC? I mean, a giant particle accelerator that can only provide 7 TeV of energy? (14 in the mass center, if I understood well). Is it because particles are so small that this amount of energy, in proportions, is then really huge?
I found this Python script that prints all permutations of given variables. I am a complete Python newby, but after a few modifications it does almost exactly what I need. Here is what I got so far: blocks = [ "0", "1a", "2a", "2b" ] # variables num_blocks = len( blocks ) num_places = 4 # number of places for i in range( pow( len( blocks ), num_places ) ): value = i indexes = [] while value: indexes.append( value % num_blocks ) value = value // num_blocks # print( i + 1 ) # alternatively print number of each permutation for j in range( len( indexes ), num_places ): print blocks[ num_blocks - 1 ] for j in range( len( indexes ) - 1, -1, -1 ): print( blocks[ num_blocks - 1 - indexes[ j ] ] ) print " " # add a line break after each entry The output is 2b 2b 2b 2b 2b 2b 2b 2a etc. How can I A) change the output to 2b2b2b2b 2b2b2b2a etc. and B) only print occurences that include the last variable, in this case "2b". For the purpose of this example, I only included four variables: 0, 1a, 2a, 2b. The script prints all possible combinations of these four variables, from 0000 to 2b2b2b2b and anything in between. Is it possible to print only combinations that include the last variable 2b? So for example 2b2a1a0 or 1a1a02b, but not 2a2a1a0 or 2a01a1a? Later on, many more variables will be included (3a, 3b, etc.), but the script shall only list permutations including the last variable. Thanks in advance! George EDITED to clarify second question.
I'd like to do it in Python. What I'd like to do in this example in C: #include <stdio.h> int main() { int i; for (i=0; i<10; i++) printf("."); return 0; } Output: .......... In Python: >>> for i in range(10): print('.') . . . . . . . . . . >>> print('.', '.', '.', '.', '.', '.', '.', '.', '.', '.') . . . . . . . . . . In Python print will add a \n or space, how can I avoid that? Now, it's just an example, don't tell me I can first build a string then print it. I'd like to know how to "append" strings to stdout.
I was encoding (from terminal) into base64. But I guess the commands are not executing properly. $ echo 123456789 | base64 MTIzNDU2Nzg5Cg== And then when I did the same on , I got this result MTIzNDU2Nzg5 I thought that maybe echo is being encoded as well so i ran $ echo | base64 Cg== I guess i was right, but that didn't help either as in another instance: $ echo qwertyuiop | base64 cXdlcnR5dWlvcAo= and when the same was encoded using the result was cXdlcnR5dWlvcA== And not suprisingly i the results from base64encode were accepted(in SMTP) So, what am i missing here? and how can i sucessfully convert the string or number into base64?
I am using the java based neo4j graph database on lubuntu 15.04. The neo4j HTTP authentication header uses base64 encoding of 'username:password' (not including quotes). Using wireshark I can see the base64 code generated by neo4j. However if I use the ubuntu coreutils base64 to encode the same string I get a slightly different encoding. This encoding is not accepted by neo4j. Both encodings decode to the correct username:password string Example username=neo4j and password=@N Neo4j gives the encoded value of neo4j:@N as bmVvNGo6QE4= which decodes to neo4j:@N as expected $ echo 'bmVvNGo6QE4=' | base64 --decode neo4j:@N Ubuntu coreutils base64 returns the encoded value of neo4j:@N as bmVvNGo6QE4K (which differs in the last character) but still decodes correctly; $ echo 'neo4j:@N' | base64 bmVvNGo6QE4K $ echo 'bmVvNGo6QE4K' | base64 --decode neo4j:@N Why is this? What do I need to do get consistent encoding?
is there any way in typescript by which I can get length of an object: Something like this: say I have an object: public customer:any={ "name":"Bhushan", "eid":"879546", "dept":"IT" } Now I am trying to get its length in typescript. ie. when I am doing customer.length(), I should be able to get value 3 as it has 3 elements. I tried Object.getOwnPropertyNames(customer.value) but its returning 2 whereas I have 3 elements in my object. any inputs?
I have a JavaScript object. Is there a built-in or accepted best practice way to get the length of this object? const myObject = new Object(); myObject["firstname"] = "Gareth"; myObject["lastname"] = "Simpson"; myObject["age"] = 21;