qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
20,108,899
I am using the autoreload-server example which is working great for reloading namespaces on changes to the .clj files using ns-tracker. <https://github.com/pedestal/samples/blob/master/auto-reload-server/dev/dev.clj> However, it is not picking up changes to enlive templates in the resources/public dir. I've added my...
2013/11/20
[ "https://Stackoverflow.com/questions/20108899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76815/" ]
The only mention of `type_info` on that page is > > TypeInfo is a simple wrapper around type\_info class that lets us store it as a key in std::map. > > > C++11 has `std::type_index` in `<typeindex>` which fulfills exactly this role. In general elements of a `map` do not need to be assignable, nor as of C++11 cop...
I asked myself the same question about this exact article, but then I realized that the code listing should have been provided, and it was. So `TypeInfo` is a straightforward wrapper around `type_info`. ``` class TypeInfo{ public: explicit TypeInfo(const type_info& info) : _typeInfo(info) {}; bool operator < ...
83,389
Sorry for asking such a basic question. I am reading books on OpenGL4 but in most examples they generally render only objects. So I understand how to deal with vertex buffers and vertex array buffers, etc. but my question is does it work when you have say hundred of objects to draw? Should you have 1 vbo for example a...
2014/09/13
[ "https://gamedev.stackexchange.com/questions/83389", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/18490/" ]
Even when you have hundreds of objects to draw, typically those are many copies of the *same* object. E.g., you might a stack of 10 crates, or two goblins, or a hundred trees. You only need to store this identical data once. You'd then have a structure similar to: ``` struct Material { Shader shader; vector<Textur...
You probably would want to do it like this: Have a VBO (+index buffer) for each mesh in the scene (a mesh is just the collection of vertices and indices). Have your objects separately hold a reference to their meshes and store their transformation. From there you can have multiple objects referencing the same mesh ...
10
I've read that corn based food could be harmful to dogs. Is this true? If so, what would be a good alternative?
2013/10/08
[ "https://pets.stackexchange.com/questions/10", "https://pets.stackexchange.com", "https://pets.stackexchange.com/users/22/" ]
The subject of corn and grain based dog food is one that is contentious and subject to a lot of debate. Numerous studies have been done on this subject and many heated opinions exist on this. Many veterinarians believe in corn based dog food and how it is highly digestible and contains many health benefits for a dog. ...
I've had a few vets, and all of them say that corn based food is bad. This may be a biased opinion since they each sell some kind of specialty brand pet food. Their explanation is that while domesticated dogs can eat corn based food because they get used to it, their digestive system is built to handle meat. When I a...
10
I've read that corn based food could be harmful to dogs. Is this true? If so, what would be a good alternative?
2013/10/08
[ "https://pets.stackexchange.com/questions/10", "https://pets.stackexchange.com", "https://pets.stackexchange.com/users/22/" ]
I've had a few vets, and all of them say that corn based food is bad. This may be a biased opinion since they each sell some kind of specialty brand pet food. Their explanation is that while domesticated dogs can eat corn based food because they get used to it, their digestive system is built to handle meat. When I a...
Dogs were domesticated from wild dogs and wolves, with domestic dogs being found around 30,000 years ago. Some wolves are thought to have evolved around 700,000 years ago. Their main caloric and nutrient source is other animals, thus in oversimplified terms they are though of as carnivores. While they like to munch o...
10
I've read that corn based food could be harmful to dogs. Is this true? If so, what would be a good alternative?
2013/10/08
[ "https://pets.stackexchange.com/questions/10", "https://pets.stackexchange.com", "https://pets.stackexchange.com/users/22/" ]
The subject of corn and grain based dog food is one that is contentious and subject to a lot of debate. Numerous studies have been done on this subject and many heated opinions exist on this. Many veterinarians believe in corn based dog food and how it is highly digestible and contains many health benefits for a dog. ...
Dogs were domesticated from wild dogs and wolves, with domestic dogs being found around 30,000 years ago. Some wolves are thought to have evolved around 700,000 years ago. Their main caloric and nutrient source is other animals, thus in oversimplified terms they are though of as carnivores. While they like to munch o...
28,755,145
I am trying to launch Guestbook.go example from kubernetes doc as follows: <https://github.com/GoogleCloudPlatform/kubernetes/tree/master/examples/guestbook-go> I have modified the guestbook-service.json in the above link to include PublicIPs ``` { "apiVersion": "v1beta1", "kind": "Service", "id": "guestbook"...
2015/02/26
[ "https://Stackoverflow.com/questions/28755145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3006942/" ]
(sorry for the delay in answering your question) PublicIPs are defined on every host node, so if you make sure that you round-robin packets into the host nodes from your external load balancer, (e.g. an edge router) then you can have redundancy, even if one of the host machines fails. --brendan
You should use `kubectl proxy  --accept-hosts='^*$' --address='0.0.0.0' --port=8001` to expose your kube-proxy port to the public IP or internal iP
7,215,653
First, I could not ask this on most hardware forums, because they are mostly populated by gamers. Additionally, it is difficult to get an opinion from sysadmins, because they have a fairly different perspective as well. So perhaps, amongst developers, I might be able to deduce a realistic trend. What I want to know ...
2011/08/27
[ "https://Stackoverflow.com/questions/7215653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/915637/" ]
<http://www.intel.com/content/www/us/en/processor-comparison/comparison-chart.html> I did a comparison for you as a fact. Here Quad core is 2.20 GHz where dual core is 2.3 GHz. Now check out this comparison and see the "Max Turbo Frequency". You will notice that even though quad core has less GHz but when it hit tur...
Even if they were equivalent speeds, the quad core is executing twice as many instructions per cycle as the duo core. 0.4 Mhz isn't going to make a huge difference.
7,215,653
First, I could not ask this on most hardware forums, because they are mostly populated by gamers. Additionally, it is difficult to get an opinion from sysadmins, because they have a fairly different perspective as well. So perhaps, amongst developers, I might be able to deduce a realistic trend. What I want to know ...
2011/08/27
[ "https://Stackoverflow.com/questions/7215653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/915637/" ]
The problem with multi-processors/multi-core processors has been and still is memory bandwidth. Most applications in daily use have not been written to economize on memory bandwidth. This means that for typical, everyday use you'll run out of bandwidth when your apps are doing something (i e not waiting for user input)...
Even if they were equivalent speeds, the quad core is executing twice as many instructions per cycle as the duo core. 0.4 Mhz isn't going to make a huge difference.
7,215,653
First, I could not ask this on most hardware forums, because they are mostly populated by gamers. Additionally, it is difficult to get an opinion from sysadmins, because they have a fairly different perspective as well. So perhaps, amongst developers, I might be able to deduce a realistic trend. What I want to know ...
2011/08/27
[ "https://Stackoverflow.com/questions/7215653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/915637/" ]
<http://www.intel.com/content/www/us/en/processor-comparison/comparison-chart.html> I did a comparison for you as a fact. Here Quad core is 2.20 GHz where dual core is 2.3 GHz. Now check out this comparison and see the "Max Turbo Frequency". You will notice that even though quad core has less GHz but when it hit tur...
The problem with multi-processors/multi-core processors has been and still is memory bandwidth. Most applications in daily use have not been written to economize on memory bandwidth. This means that for typical, everyday use you'll run out of bandwidth when your apps are doing something (i e not waiting for user input)...
22,364,468
I have a problem using python. I have a txt file, and it contains 500 abstracts from 500 papers, and what i want to do is to split this txt file into 500 file, with each txt file contains only 1 abstract. for now, I found out, for each abstract, there is one line at the end, starting with "PMID", so I'm thinking split ...
2014/03/12
[ "https://Stackoverflow.com/questions/22364468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2942662/" ]
Nope! `cat` does not buffer the entire file contents in memory before emitting any. Instead it reads and writes content in chunks determined by its internal buffer sizes. If you wish to remove I/O disk overhead from your performance benchmark, I suggest you have plenty of ram and then `cat` the file to `/dev/null` *b...
You could use tmpfs (on \*nix like OSs) if your libs really need a file handle. If not, your test program should just initialize some memory, possibly by reading a file, and compress that. In both cases you should consider turning off swapping for the test.
22,364,468
I have a problem using python. I have a txt file, and it contains 500 abstracts from 500 papers, and what i want to do is to split this txt file into 500 file, with each txt file contains only 1 abstract. for now, I found out, for each abstract, there is one line at the end, starting with "PMID", so I'm thinking split ...
2014/03/12
[ "https://Stackoverflow.com/questions/22364468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2942662/" ]
Nope! `cat` does not buffer the entire file contents in memory before emitting any. Instead it reads and writes content in chunks determined by its internal buffer sizes. If you wish to remove I/O disk overhead from your performance benchmark, I suggest you have plenty of ram and then `cat` the file to `/dev/null` *b...
If you don't have enough memory to hold the file in memory, you have to do I/O. If you do have plenty of memory then just run the benchmark twice, linux will keep the file in the page cache, see * <http://en.wikipedia.org/wiki/Page_cache> * <http://www.tldp.org/LDP/lki/lki-4.html>
3,462,079
I have an array of thousands of quads; 4-sided 3D polygons. All I know are the coordinates of the quad corners. A subset of these quads define the closed outer shell of a 3D shape. The remaining quads are on the inside of this closed solid. How do I figure out which quads are part of the shell and which quads are par...
2010/08/11
[ "https://Stackoverflow.com/questions/3462079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/81947/" ]
This might be hard to implement if your shape self intersects, but if you can find one quad that you know is on the surface (possibly one furthest away from the centroid) then map out concentric circles of quads around it. Then find a continuous ring of quads outside that and so on, until you end up at the "opposite" s...
How about this? Calculate the normal vector of a quad (call this the 'current' quad). Do an intersection test with that vector and all the remaining quads. If it intersects another quad in the positive portion of the vector you know the current quad is an internal quad. Repeat for all the remaining quads. This assume...
3,462,079
I have an array of thousands of quads; 4-sided 3D polygons. All I know are the coordinates of the quad corners. A subset of these quads define the closed outer shell of a 3D shape. The remaining quads are on the inside of this closed solid. How do I figure out which quads are part of the shell and which quads are par...
2010/08/11
[ "https://Stackoverflow.com/questions/3462079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/81947/" ]
How about this? Calculate the normal vector of a quad (call this the 'current' quad). Do an intersection test with that vector and all the remaining quads. If it intersects another quad in the positive portion of the vector you know the current quad is an internal quad. Repeat for all the remaining quads. This assume...
You may be able to make your problem easier by reducing the number of quads that you have to deal with. You know that some of the quads form a closed shell. Therefore, those quads are connected at their edges. If three mutually adjacent edges of a quad (that is, the edges form a closed loop) overlap the edge of anothe...
3,462,079
I have an array of thousands of quads; 4-sided 3D polygons. All I know are the coordinates of the quad corners. A subset of these quads define the closed outer shell of a 3D shape. The remaining quads are on the inside of this closed solid. How do I figure out which quads are part of the shell and which quads are par...
2010/08/11
[ "https://Stackoverflow.com/questions/3462079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/81947/" ]
This might be hard to implement if your shape self intersects, but if you can find one quad that you know is on the surface (possibly one furthest away from the centroid) then map out concentric circles of quads around it. Then find a continuous ring of quads outside that and so on, until you end up at the "opposite" s...
It can be done quite easily if the shape is convex. When the shape is concave it is much harder. In the convex case find the centroid by computing the average of all of the points. This gives a point that is in the interior for which the following property holds: > > If you project four rays from the > centroid to ...
3,462,079
I have an array of thousands of quads; 4-sided 3D polygons. All I know are the coordinates of the quad corners. A subset of these quads define the closed outer shell of a 3D shape. The remaining quads are on the inside of this closed solid. How do I figure out which quads are part of the shell and which quads are par...
2010/08/11
[ "https://Stackoverflow.com/questions/3462079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/81947/" ]
It can be done quite easily if the shape is convex. When the shape is concave it is much harder. In the convex case find the centroid by computing the average of all of the points. This gives a point that is in the interior for which the following property holds: > > If you project four rays from the > centroid to ...
You may be able to make your problem easier by reducing the number of quads that you have to deal with. You know that some of the quads form a closed shell. Therefore, those quads are connected at their edges. If three mutually adjacent edges of a quad (that is, the edges form a closed loop) overlap the edge of anothe...
3,462,079
I have an array of thousands of quads; 4-sided 3D polygons. All I know are the coordinates of the quad corners. A subset of these quads define the closed outer shell of a 3D shape. The remaining quads are on the inside of this closed solid. How do I figure out which quads are part of the shell and which quads are par...
2010/08/11
[ "https://Stackoverflow.com/questions/3462079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/81947/" ]
This might be hard to implement if your shape self intersects, but if you can find one quad that you know is on the surface (possibly one furthest away from the centroid) then map out concentric circles of quads around it. Then find a continuous ring of quads outside that and so on, until you end up at the "opposite" s...
Consider that all of the quads live inside a large sealed box. Pick one quad. Do raytracing; treat that quad as a light source, and treat all other quads as reflective and fuzzy, where a hit to a quad will send light in all directions from that surface, but not around corners. If no light rays hit the external box af...
3,462,079
I have an array of thousands of quads; 4-sided 3D polygons. All I know are the coordinates of the quad corners. A subset of these quads define the closed outer shell of a 3D shape. The remaining quads are on the inside of this closed solid. How do I figure out which quads are part of the shell and which quads are par...
2010/08/11
[ "https://Stackoverflow.com/questions/3462079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/81947/" ]
This might be hard to implement if your shape self intersects, but if you can find one quad that you know is on the surface (possibly one furthest away from the centroid) then map out concentric circles of quads around it. Then find a continuous ring of quads outside that and so on, until you end up at the "opposite" s...
You may be able to make your problem easier by reducing the number of quads that you have to deal with. You know that some of the quads form a closed shell. Therefore, those quads are connected at their edges. If three mutually adjacent edges of a quad (that is, the edges form a closed loop) overlap the edge of anothe...
3,462,079
I have an array of thousands of quads; 4-sided 3D polygons. All I know are the coordinates of the quad corners. A subset of these quads define the closed outer shell of a 3D shape. The remaining quads are on the inside of this closed solid. How do I figure out which quads are part of the shell and which quads are par...
2010/08/11
[ "https://Stackoverflow.com/questions/3462079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/81947/" ]
Consider that all of the quads live inside a large sealed box. Pick one quad. Do raytracing; treat that quad as a light source, and treat all other quads as reflective and fuzzy, where a hit to a quad will send light in all directions from that surface, but not around corners. If no light rays hit the external box af...
You may be able to make your problem easier by reducing the number of quads that you have to deal with. You know that some of the quads form a closed shell. Therefore, those quads are connected at their edges. If three mutually adjacent edges of a quad (that is, the edges form a closed loop) overlap the edge of anothe...
49,955,821
I have code like this, I want to check in the time range that has overtime and sum it. currently, am trying `out.hour+1` with this code, but didn't work. ``` overtime_all = 5 overtime_total_hours = 0 out = datetime.time(14, 30) while overtime_all > 0: overtime200 = object.filter(time__range=...
2018/04/21
[ "https://Stackoverflow.com/questions/49955821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9380270/" ]
Your scope variable `x` should hold the value of `data.contacts[1]`, to get the value of `Gge's` with single quote from company name. There is no such scenario in AngularJS where it omits the single quote from the JSON value. Be sure of your JSON again. ```js var app = angular.module('myApp', []); app.controller('myC...
Please check this :"Gge\'s" . Please try to put unicode of ' this then try to parse it then it will resolve the problem.
49,955,821
I have code like this, I want to check in the time range that has overtime and sum it. currently, am trying `out.hour+1` with this code, but didn't work. ``` overtime_all = 5 overtime_total_hours = 0 out = datetime.time(14, 30) while overtime_all > 0: overtime200 = object.filter(time__range=...
2018/04/21
[ "https://Stackoverflow.com/questions/49955821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9380270/" ]
Your scope variable `x` should hold the value of `data.contacts[1]`, to get the value of `Gge's` with single quote from company name. There is no such scenario in AngularJS where it omits the single quote from the JSON value. Be sure of your JSON again. ```js var app = angular.module('myApp', []); app.controller('myC...
You must know that the JSON key "contacts", has a JSON array as its value. to access your value "Gge\'s", you will have to access, ``` x = data.contacts[1].company; ``` where your data is : ``` data = {"contacts":[{"id":"1","company":"Cutting","contact":"Russell Chimera"},{"id":"2","company":"Gge\'s","contact":"Ma...
49,955,821
I have code like this, I want to check in the time range that has overtime and sum it. currently, am trying `out.hour+1` with this code, but didn't work. ``` overtime_all = 5 overtime_total_hours = 0 out = datetime.time(14, 30) while overtime_all > 0: overtime200 = object.filter(time__range=...
2018/04/21
[ "https://Stackoverflow.com/questions/49955821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9380270/" ]
Your scope variable `x` should hold the value of `data.contacts[1]`, to get the value of `Gge's` with single quote from company name. There is no such scenario in AngularJS where it omits the single quote from the JSON value. Be sure of your JSON again. ```js var app = angular.module('myApp', []); app.controller('myC...
In my case I just removed commented lines in JSON file(post in postman) as JSON won't take comments in them.
49,955,821
I have code like this, I want to check in the time range that has overtime and sum it. currently, am trying `out.hour+1` with this code, but didn't work. ``` overtime_all = 5 overtime_total_hours = 0 out = datetime.time(14, 30) while overtime_all > 0: overtime200 = object.filter(time__range=...
2018/04/21
[ "https://Stackoverflow.com/questions/49955821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9380270/" ]
You must know that the JSON key "contacts", has a JSON array as its value. to access your value "Gge\'s", you will have to access, ``` x = data.contacts[1].company; ``` where your data is : ``` data = {"contacts":[{"id":"1","company":"Cutting","contact":"Russell Chimera"},{"id":"2","company":"Gge\'s","contact":"Ma...
Please check this :"Gge\'s" . Please try to put unicode of ' this then try to parse it then it will resolve the problem.
49,955,821
I have code like this, I want to check in the time range that has overtime and sum it. currently, am trying `out.hour+1` with this code, but didn't work. ``` overtime_all = 5 overtime_total_hours = 0 out = datetime.time(14, 30) while overtime_all > 0: overtime200 = object.filter(time__range=...
2018/04/21
[ "https://Stackoverflow.com/questions/49955821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9380270/" ]
You must know that the JSON key "contacts", has a JSON array as its value. to access your value "Gge\'s", you will have to access, ``` x = data.contacts[1].company; ``` where your data is : ``` data = {"contacts":[{"id":"1","company":"Cutting","contact":"Russell Chimera"},{"id":"2","company":"Gge\'s","contact":"Ma...
In my case I just removed commented lines in JSON file(post in postman) as JSON won't take comments in them.
1,821,700
According to Mathematica, $$\sum\_{k=0}^\infty \frac{(G+k)\_{G-1}}{2^k}=2(G-1)!(2^{G}-1)$$ where $$(G+k)\_{G-1}=\frac{(G+k)!}{(G+k-G+1)!}=\frac{(G+k)!}{(k+1)!}$$ is the falling factorial. I would like to compute this analytically, but I have nothing I've been doing works. A proof by induction led me to a more com...
2016/06/11
[ "https://math.stackexchange.com/questions/1821700", "https://math.stackexchange.com", "https://math.stackexchange.com/users/223401/" ]
Generating functions to the rescue! \begin{align\*} \sum\_{k=0}^\infty x^k &= \frac1{1-x} \\ \sum\_{k=0}^\infty x^{G+k} &= \frac{x^G}{1-x} = \frac1{1-x} - 1 - x - \cdots - x^{G-1} \\ \frac{d^{G-1}}{dx^{G-1}} \sum\_{k=0}^\infty x^{G+k} &= \frac{d^{G-1}}{dx^{G-1}} \bigg( \frac1{1-x} - 1 - x - \cdots - x^{G-1} \bigg) \\ \...
Assuming $G>0$, by using the Taylor series of the exponential function and the identity $m!=\int\_{0}^{+\infty}x^m e^{-x}\,dx$ we have: > > $$\begin{eqnarray\*}\sum\_{k\geq 0}\frac{(G+k)!}{2^k(k+1)!}&=&\sum\_{k\geq 0}\frac{1}{2^k(k+1)!}\int\_{0}^{+\infty}x^{G+k}e^{-x}\,dx\\[0.2cm]&=&\int\_{0}^{+\infty}x^G e^{-x}\sum\...
1,821,700
According to Mathematica, $$\sum\_{k=0}^\infty \frac{(G+k)\_{G-1}}{2^k}=2(G-1)!(2^{G}-1)$$ where $$(G+k)\_{G-1}=\frac{(G+k)!}{(G+k-G+1)!}=\frac{(G+k)!}{(k+1)!}$$ is the falling factorial. I would like to compute this analytically, but I have nothing I've been doing works. A proof by induction led me to a more com...
2016/06/11
[ "https://math.stackexchange.com/questions/1821700", "https://math.stackexchange.com", "https://math.stackexchange.com/users/223401/" ]
We have $$S=\sum\_{k\geq0}\frac{\left(G+k\right)!}{\left(k+1\right)!}\left(\frac{1}{2}\right)^{k}=\left(G-1\right)!\sum\_{k\geq0}\dbinom{G+k}{G-1}\left(\frac{1}{2}\right)^{k} $$ and [since holds](https://math.stackexchange.com/questions/1658490/prove-that-sum-limits-k-0r-binomnkk-binomnr1r-using-combinatoric-a?rq=1) $...
Assuming $G>0$, by using the Taylor series of the exponential function and the identity $m!=\int\_{0}^{+\infty}x^m e^{-x}\,dx$ we have: > > $$\begin{eqnarray\*}\sum\_{k\geq 0}\frac{(G+k)!}{2^k(k+1)!}&=&\sum\_{k\geq 0}\frac{1}{2^k(k+1)!}\int\_{0}^{+\infty}x^{G+k}e^{-x}\,dx\\[0.2cm]&=&\int\_{0}^{+\infty}x^G e^{-x}\sum\...
160,689
Below image shows the shape I'm trying to make seamless, I have mirrored it once along the highlighted edge and ensured the stack is in order to avoid a crease. [![Image 1](https://i.stack.imgur.com/7s7DS.png)](https://i.stack.imgur.com/7s7DS.png) However in the below image, after I've made an array of the shape I'm ...
2019/12/11
[ "https://blender.stackexchange.com/questions/160689", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/71245/" ]
Stack order: Mirror Array (With Merge option ON) Subsurf
In your mirror modifier ensure the clipping box is checked. Seams or creases are often caused by the mirror edge not lining up properly, double vertices for it the edges overlapping or not meeting. Clipping ensure the vertices can't go past the center line of the object, where it is being mirrored.
15,353,520
This is a code to exit the application. ``` if (NavigationService.CanGoBack) { while (NavigationService.RemoveBackEntry() != null) { NavigationService.RemoveBackEntry(); } } ``` Can anybody tell me if it is permitted from Windows Phone Certification Requirements pe...
2013/03/12
[ "https://Stackoverflow.com/questions/15353520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1458198/" ]
You should not disrupt the normal application flow by doing this. The user expects to close the application either by hitting the back button, or the Windows key. The user might also expect to resume the application work via Fast App Switching. Besides, your method won't exit the application because at one point you ...
In one of my application, my task was to exit when a user reset his/her account. The application is in the store so there is no problem. i'm sure you can achieve exit with this code and it will be ok: ``` var g = new Microsoft.Xna.Framework.Game(); g.Exit(); ``` just add reference to `Microsoft.X...
55,243,773
I have installed jupypter on Ubuntu 18.04. when I try to open .ipynb file it says trying to connect to server and fails eventaully. When I looked at the console I saw the following error : ImportError: cannot import name 'create\_prompt\_application' as follows ``` [I 14:37:41.311 NotebookApp] KernelRestarter: resta...
2019/03/19
[ "https://Stackoverflow.com/questions/55243773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3468778/" ]
`sudo pip3 uninstall ipython` `sudo pip3 install ipython` the error solved for me Try it out. `sudo pip3 install 'prompt-toolkit<2.1.0,>=2.0.0' --force-reinstall`
For me the solution was to follow these steps: ``` python3 -m venv venv source venv/bin/activate pip install jupyter python -m jupyter notebook ``` I hope this helps anybody.
55,243,773
I have installed jupypter on Ubuntu 18.04. when I try to open .ipynb file it says trying to connect to server and fails eventaully. When I looked at the console I saw the following error : ImportError: cannot import name 'create\_prompt\_application' as follows ``` [I 14:37:41.311 NotebookApp] KernelRestarter: resta...
2019/03/19
[ "https://Stackoverflow.com/questions/55243773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3468778/" ]
It is best to upgrade `jupyter-console` with this command: ``` pip3 install --upgrade --force jupyter-console ``` Then it will be compatible with later versions of `prompt-toolkit`. More details in [this github issue](https://github.com/jupyter/jupyter_console/issues/158).
For me the solution was to follow these steps: ``` python3 -m venv venv source venv/bin/activate pip install jupyter python -m jupyter notebook ``` I hope this helps anybody.
108,301
Can I get an illustration on how a choir master can conduct a piece of music written in 6/8 time? Thanks.
2020/12/04
[ "https://music.stackexchange.com/questions/108301", "https://music.stackexchange.com", "https://music.stackexchange.com/users/73427/" ]
Since 6/8 is essentially two time, down up works just fine. Each movement will encompass three quavers, so instead of counting 1 2 3 4 5 6, the count will be **1**(2 3) **2**(2 3). If it's incredibly slow, there could be an opportunity to count two lots of three, but that would be unusual.
In concert band, I've seen slow 6/8 time - or slow 6/4 time - conducted like 4/4 time, except with an extra flick of the hand at Beats "2" and "3" of the 4/4 conducting pattern. The conducting pattern for slow 6/8 time therefore looks like this from your point of view: Down -> Left -> Flick -> Right -> Flick -> Up Fa...
108,301
Can I get an illustration on how a choir master can conduct a piece of music written in 6/8 time? Thanks.
2020/12/04
[ "https://music.stackexchange.com/questions/108301", "https://music.stackexchange.com", "https://music.stackexchange.com/users/73427/" ]
In conducting course I attended, we were taught four patterns. It depends on tempo and which beats are stressed. 1. If the tempo is fast and 1st and 4th beats are stressed, you conduct like 2/4 (on the stressed beats). 2. If the tempo is fast and 1st, 3rd and 5th beats are stressed, you conduct like 3/4 (on the stress...
In concert band, I've seen slow 6/8 time - or slow 6/4 time - conducted like 4/4 time, except with an extra flick of the hand at Beats "2" and "3" of the 4/4 conducting pattern. The conducting pattern for slow 6/8 time therefore looks like this from your point of view: Down -> Left -> Flick -> Right -> Flick -> Up Fa...
67,973,126
``` interface FormValues { key: string; value: any; } const array: FormValues[] = [ { key: 'A', value: 1 // number }, { key: 'A', value: 1 // number }, { key: 'A', value: 'str' // string }, { key: 'C', value: { a: 1, b:...
2021/06/14
[ "https://Stackoverflow.com/questions/67973126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5031009/" ]
You need to decide what makes two distinct objects "equal". In JavaScript, all built-in comparisons of objects (which includes arrays) are [by reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects#comparing_objects). That means `['a','2'] === ['a','2']` is `false` because two dis...
This will combine any duplicate keys, creating a new property `values` to hold the array of combined values (from like keys). ```js const array = [{key: 'A', value: 1},{key: 'A', value: 'str'},{key: 'C', value: { a: 1, b: '2'}},{key: 'B',value: true}] const arrayUniqueByKey = [array.reduce((b, a) => { let f = b.fin...
67,973,126
``` interface FormValues { key: string; value: any; } const array: FormValues[] = [ { key: 'A', value: 1 // number }, { key: 'A', value: 1 // number }, { key: 'A', value: 'str' // string }, { key: 'C', value: { a: 1, b:...
2021/06/14
[ "https://Stackoverflow.com/questions/67973126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5031009/" ]
You need to decide what makes two distinct objects "equal". In JavaScript, all built-in comparisons of objects (which includes arrays) are [by reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects#comparing_objects). That means `['a','2'] === ['a','2']` is `false` because two dis...
You can use [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) combined with [JSON.stringify()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) and finaly get the `result` array of values with [Object...
60,290,139
I write add-ins for Revit. These add-ins depend on the Revit API libraries. These libraries change with each new version of Revit (2018, 2019, 2020, etc). Unfortunately they are not backward compatible so I can't use my add-in from 2018 with 2020. This means that I maintain separate repositories of my own code for 2018...
2020/02/18
[ "https://Stackoverflow.com/questions/60290139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/180529/" ]
Are you sure that your 2018 add-in cannot be used in Revit 2020? In many cases, if not most, the opposite is true. In general, you can use an add-in compiled for a previous version of Revit in later versions as well. If you are making calls to Revit API functionality that changed between the versions, you can hand...
I have the same issue with an Add-in I wrote. Due to an API change, I have to make separate versions depending on the year associated with the Addin. I set-up a solution with separate projects for each version and shared code and libraries to reduce the amount of duplicate code. Unfortunately, I set this up after creat...
39,949,818
Trying to place an element after match second or more dots in a text if it has a specific number of characters. Example: ``` <div id="mytext"> This is just a example. I need to find a solution. I will appreciate any help. Thank you. </div> <script> var chars = 55; if ($('#mytext').text().length > chars){ //add <br>...
2016/10/10
[ "https://Stackoverflow.com/questions/39949818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6047145/" ]
You can try this ```js var chars = 55; if ($('#mytext').text().length > chars){ var text = $('#mytext').text(); // div text var chars_text = text.substring(0, chars); // chars text var rest = text.replace(chars_text, '').replace(/\./g,'. <span>After Dot</span>'); // rest of text and replace dot of ...
this way : With JQUERY Substring ``` <p> this is test string with jquery . test 1 2 3 4 45 5 . test test test </p> <b></b> <script> var a = $('p').text(); var _output = ''; var _allow_index = 40; if (a.length > _allow_index) { var x = a.split('.'); for(var i=0; i<x...
39,949,818
Trying to place an element after match second or more dots in a text if it has a specific number of characters. Example: ``` <div id="mytext"> This is just a example. I need to find a solution. I will appreciate any help. Thank you. </div> <script> var chars = 55; if ($('#mytext').text().length > chars){ //add <br>...
2016/10/10
[ "https://Stackoverflow.com/questions/39949818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6047145/" ]
You can try this ```js var chars = 55; if ($('#mytext').text().length > chars){ var text = $('#mytext').text(); // div text var chars_text = text.substring(0, chars); // chars text var rest = text.replace(chars_text, '').replace(/\./g,'. <span>After Dot</span>'); // rest of text and replace dot of ...
Doing that doesn't seem to be a very good practise, for instance length may vary for localised languages. Besides, you're assuming you have a plain text, rather than an HTML text and length is different in both cases. You may want to use html() instead of text(). However here is a way for the given case: ``` var conta...
39,949,818
Trying to place an element after match second or more dots in a text if it has a specific number of characters. Example: ``` <div id="mytext"> This is just a example. I need to find a solution. I will appreciate any help. Thank you. </div> <script> var chars = 55; if ($('#mytext').text().length > chars){ //add <br>...
2016/10/10
[ "https://Stackoverflow.com/questions/39949818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6047145/" ]
You can try this ```js var chars = 55; if ($('#mytext').text().length > chars){ var text = $('#mytext').text(); // div text var chars_text = text.substring(0, chars); // chars text var rest = text.replace(chars_text, '').replace(/\./g,'. <span>After Dot</span>'); // rest of text and replace dot of ...
You just need to add this property in CSS. ``` <div id="mytext"> This is just a example. I need to find a solution. I will appreciate any help. Thank you. </div> <style> div#mytext{ word-wrap: break-word; } </style> ```
73,736,884
I have to produce randomly generated, normally distributed numbers, based on an astronomical table containing a most probable value and a standard deviation. The peculiar thing is that the standard deviation is not given by one, but two numbers - an upper standard deviation of the error and a lower, something like this...
2022/09/15
[ "https://Stackoverflow.com/questions/73736884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5838180/" ]
For one, `mb_convert_encoding($payload, 'unicode')` converts the input to UTF-16BE, not UTF-8. You would want `mb_convert_encoding($payload, 'UTF-8')`. For two, using `mb_convert_encoding()` without specifying the *source* encoding causes the function to *assume* that the input is using the system's default encoding, ...
Instead of trying to re-assemble the payload from the already decoded JSON, you should take the data directly as you received it. Facebook sends `Content-Type: application/json`, which means PHP will not populate $\_POST to begin with - but you can read the entire request body using `file_get_contents('php://input')`....
30,296,949
I'm getting the error message of > > Wrong number of arguments or invalid property assignment > > > at this line: ``` Set hello = Range("O" & row, "Q" & row, "W" & row) ``` However, the macro runs smoothly with `Set hello = Range("O" & row)`. So it means this macro is okay with one cell selection, but gettin...
2015/05/18
[ "https://Stackoverflow.com/questions/30296949", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4910875/" ]
You might be trying to partition your [`DENSE_RANK`](https://msdn.microsoft.com/en-IN/library/ms173825.aspx) for group. You just need to order them like this `DENSE_RANK()OVER(ORDER BY column1 column2 column3 column4)`. **Complete Query** ``` SELECT column1 column2 column3 column4, ROW_NUMBER()OVER(PARTITION BY colum...
Try this: ``` DECLARE @t TABLE(column1 VARCHAR(10), column2 VARCHAR(10), column3 VARCHAR(10), column4 VARCHAR(10)) INSERT INTO @t VALUES ('abc', 'pqr', 'austria', 'type1'), ('abc', 'pqr', 'austria', 'type1'), ('abc', 'pqr', 'austria', 'type2'), ('abc', 'pqr', 'austria', 'type2'), ('xy...
11,537,578
here is the problem ``` public ActionResult One() { if(condition) return View() else return Two() } public ActionResult Two() { return View() } ``` how can I do that without error
2012/07/18
[ "https://Stackoverflow.com/questions/11537578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1333814/" ]
Just return the view by name (`return view("nameOfView")`), or use `RedirectToAction` or `RedirectToRoute`
oh I've solved the problem ``` public ActionResult Two() { return View("Two") } ```
11,537,578
here is the problem ``` public ActionResult One() { if(condition) return View() else return Two() } public ActionResult Two() { return View() } ``` how can I do that without error
2012/07/18
[ "https://Stackoverflow.com/questions/11537578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1333814/" ]
Simply use: ``` public ActionResult One() { if(condition) return View() else return View("Two") } ```
oh I've solved the problem ``` public ActionResult Two() { return View("Two") } ```
11,537,578
here is the problem ``` public ActionResult One() { if(condition) return View() else return Two() } public ActionResult Two() { return View() } ``` how can I do that without error
2012/07/18
[ "https://Stackoverflow.com/questions/11537578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1333814/" ]
Change your code to: ``` public ActionResult One() { if(condition) return View(); else RedirectToAction("Two"); } public ActionResult Two() { return View(); } ```
oh I've solved the problem ``` public ActionResult Two() { return View("Two") } ```
332,208
When I try to convert a word document using the ooextract python script from open office like ``` /usr/local/bin/ooextract.py myDocument.doc myDocument.pdf ``` the open office deamon (sOffice.bin) takes 100% CPU load forever. We are using Open Office 2.6.3 on a virtual machine running debian squeeze 2.6.32-5-amd64 ...
2011/09/05
[ "https://superuser.com/questions/332208", "https://superuser.com", "https://superuser.com/users/96752/" ]
I had a similar issue. To debug it, I put the test document under version control and removed significant chunks of it at a time; ensuring I took note of what structures were removed. This let me isolate it to an issue with 2.4.1 and a Table, containing a Row, with lots of text content. The table was allowed to split ...
It seem to be related to Open Office Version 2.6.3, with Open Office 3.3.0 we do not have the problem anymore.
10,975,372
How to completely disable transparency of given `PNGObject`? By the way I am using PNGImage unit of Version 1.564.
2012/06/11
[ "https://Stackoverflow.com/questions/10975372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/715707/" ]
I don't think it's possible to permanently disable `TPNGObject` image transparency. Or at least I couldn't find a property for doing this. And it should have been controlled by a property since when you assign or load an image, the `TPNGObject` takes the image parameters (including transparency) from the image file ass...
For just drawing a TPNGObject (Delphi PNGComponents library) to some background color (in example: white) with alpha blending, try this: ``` uses PNGImage, PNGFunctions; procedure TForm1.Button1Click(Sender: TObject); var png: TPNGObject; bmp: TBitmap; begin try // load PNG png := TPNGObject.Create; ...
13,172,265
hello im trying to have multiple jquery cycle galleries on one page. ifeel like i have the code right but its not working... can anyone look at and help? it doesnt seem to finding my .next and .prev classes? jquery: ``` $('.cycle').each(function() { var slideshow = $(this); var next = slideshow.closest('.nex...
2012/11/01
[ "https://Stackoverflow.com/questions/13172265", "https://Stackoverflow.com", "https://Stackoverflow.com/users/537253/" ]
The `closest` selects the closest parent not the closest element, you can use `find` method. ``` var next = slideshow.parent().find('.next'); var prev = slideshow.parent().find('.prev'); ``` Note that IDs must be unique, if you have several wrappers with ID of `woodwood` your markup is invalid.
Problem is with finding `.next` and `.prev` Change theses lines, ``` var next = slideshow.closest('.next'); var prev = slideshow.closest('.prev'); ``` To, ``` var next = $('.next'); var prev = $('.prev'); ``` DEMO: <http://jsfiddle.net/muthkum/egZ3y/1/>
11,476,848
The company I am at is using Netbeans with PHP Codeigniter. Unfortunately, the default Netbeans code "Format" option does not produce the Codeigniter code standard that some of our developers want. Does anyone know of a Netbeans plugin to format code in different way, or based on different standards?
2012/07/13
[ "https://Stackoverflow.com/questions/11476848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/816260/" ]
Try > > Tools -> Options -> Editor -> Formating > > >
Well maybe it is possible to style PHP code like CI does. I tried to find configuration for that (there is import feature in Netbeans), but struggled. What could be possible is to manually match CI PHP code formatting style. You need to go to Tools->Options->Editor->Formatting select PHP from "Language" drop-down menu ...
26,245,378
So I have an ajax call like this: ``` $.ajax({ type: "GET", url: "Home/GetFullView", success: function (data) { $("#sched").html(data); }, fail: function () { } }); ``` Where "Home" is the controller and "GetFullView" is the action. Sometimes the call works. However sometimes it crashes ...
2014/10/07
[ "https://Stackoverflow.com/questions/26245378", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2292081/" ]
Introduce a leading `/` ``` url: "/Home/GetFullView", ```
you need a `local url` like: `url: "/Home/GetFullView"`
26,245,378
So I have an ajax call like this: ``` $.ajax({ type: "GET", url: "Home/GetFullView", success: function (data) { $("#sched").html(data); }, fail: function () { } }); ``` Where "Home" is the controller and "GetFullView" is the action. Sometimes the call works. However sometimes it crashes ...
2014/10/07
[ "https://Stackoverflow.com/questions/26245378", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2292081/" ]
Introduce a leading `/` ``` url: "/Home/GetFullView", ```
To get your relative path fully qualified, use this: ``` url: "~/Home/GetFullView" ``` This will then give you the right qualified path whether you are at the website or application level.
12,233,436
i have following code i am trying to compare two get in order to get into if statement but i something wrong with is code. **the following code should run if the time is above 23:29 and less then 08:10...** ``` $gettime="04:39"; // getting this from database $startdate = strtotime("23:29"); $startdate1 = date("H:i",...
2012/09/02
[ "https://Stackoverflow.com/questions/12233436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1641368/" ]
You are comparing the string with a date. $gettime is a string and you are comparing it with a time object. You need to convert $gettime to a time object by calling $gettime = strtotime($gettime), and then you can compare it using > or < like you have above.
For comparing times, you should use the provided PHP classes The DateTime::diff will return an object with time difference info: <http://www.php.net/manual/en/datetime.diff.php>
12,233,436
i have following code i am trying to compare two get in order to get into if statement but i something wrong with is code. **the following code should run if the time is above 23:29 and less then 08:10...** ``` $gettime="04:39"; // getting this from database $startdate = strtotime("23:29"); $startdate1 = date("H:i",...
2012/09/02
[ "https://Stackoverflow.com/questions/12233436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1641368/" ]
Assuming you're receiving the time from the DB in a `date` format (and not as a `string`): change: ``` if($gettime >= strtotime($startdate1) && $gettime <= strtotime($enddate1)) ``` to: ``` if($gettime >= strtotime($startdate1) || $gettime <= strtotime($enddate1)) ```
For comparing times, you should use the provided PHP classes The DateTime::diff will return an object with time difference info: <http://www.php.net/manual/en/datetime.diff.php>
12,233,436
i have following code i am trying to compare two get in order to get into if statement but i something wrong with is code. **the following code should run if the time is above 23:29 and less then 08:10...** ``` $gettime="04:39"; // getting this from database $startdate = strtotime("23:29"); $startdate1 = date("H:i",...
2012/09/02
[ "https://Stackoverflow.com/questions/12233436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1641368/" ]
Make sure your comaring the right types of data, time stamps with time stamps and not w/ strings etc... ``` $gettime= strtotime("22:00"); // getting this from database $startdate = strtotime("21:00"); //$startdate1 = date("H:i", $startdate); $enddate = strtotime("23:00"); //$enddate1 = date("H:i", $enddate); //this...
For comparing times, you should use the provided PHP classes The DateTime::diff will return an object with time difference info: <http://www.php.net/manual/en/datetime.diff.php>
12,233,436
i have following code i am trying to compare two get in order to get into if statement but i something wrong with is code. **the following code should run if the time is above 23:29 and less then 08:10...** ``` $gettime="04:39"; // getting this from database $startdate = strtotime("23:29"); $startdate1 = date("H:i",...
2012/09/02
[ "https://Stackoverflow.com/questions/12233436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1641368/" ]
Make sure your comaring the right types of data, time stamps with time stamps and not w/ strings etc... ``` $gettime= strtotime("22:00"); // getting this from database $startdate = strtotime("21:00"); //$startdate1 = date("H:i", $startdate); $enddate = strtotime("23:00"); //$enddate1 = date("H:i", $enddate); //this...
You are comparing the string with a date. $gettime is a string and you are comparing it with a time object. You need to convert $gettime to a time object by calling $gettime = strtotime($gettime), and then you can compare it using > or < like you have above.
12,233,436
i have following code i am trying to compare two get in order to get into if statement but i something wrong with is code. **the following code should run if the time is above 23:29 and less then 08:10...** ``` $gettime="04:39"; // getting this from database $startdate = strtotime("23:29"); $startdate1 = date("H:i",...
2012/09/02
[ "https://Stackoverflow.com/questions/12233436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1641368/" ]
You are comparing the string with a date. $gettime is a string and you are comparing it with a time object. You need to convert $gettime to a time object by calling $gettime = strtotime($gettime), and then you can compare it using > or < like you have above.
You may refer to PHP documentation about `DateTime::diff` function at their website <http://php.net/manual/en/datetime.diff.php> You may also go through this stackoverflow question **[How to calculate the difference between two dates using PHP?](https://stackoverflow.com/questions/676824/how-to-calculate-the-differenc...
12,233,436
i have following code i am trying to compare two get in order to get into if statement but i something wrong with is code. **the following code should run if the time is above 23:29 and less then 08:10...** ``` $gettime="04:39"; // getting this from database $startdate = strtotime("23:29"); $startdate1 = date("H:i",...
2012/09/02
[ "https://Stackoverflow.com/questions/12233436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1641368/" ]
Make sure your comaring the right types of data, time stamps with time stamps and not w/ strings etc... ``` $gettime= strtotime("22:00"); // getting this from database $startdate = strtotime("21:00"); //$startdate1 = date("H:i", $startdate); $enddate = strtotime("23:00"); //$enddate1 = date("H:i", $enddate); //this...
Assuming you're receiving the time from the DB in a `date` format (and not as a `string`): change: ``` if($gettime >= strtotime($startdate1) && $gettime <= strtotime($enddate1)) ``` to: ``` if($gettime >= strtotime($startdate1) || $gettime <= strtotime($enddate1)) ```
12,233,436
i have following code i am trying to compare two get in order to get into if statement but i something wrong with is code. **the following code should run if the time is above 23:29 and less then 08:10...** ``` $gettime="04:39"; // getting this from database $startdate = strtotime("23:29"); $startdate1 = date("H:i",...
2012/09/02
[ "https://Stackoverflow.com/questions/12233436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1641368/" ]
Assuming you're receiving the time from the DB in a `date` format (and not as a `string`): change: ``` if($gettime >= strtotime($startdate1) && $gettime <= strtotime($enddate1)) ``` to: ``` if($gettime >= strtotime($startdate1) || $gettime <= strtotime($enddate1)) ```
You may refer to PHP documentation about `DateTime::diff` function at their website <http://php.net/manual/en/datetime.diff.php> You may also go through this stackoverflow question **[How to calculate the difference between two dates using PHP?](https://stackoverflow.com/questions/676824/how-to-calculate-the-differenc...
12,233,436
i have following code i am trying to compare two get in order to get into if statement but i something wrong with is code. **the following code should run if the time is above 23:29 and less then 08:10...** ``` $gettime="04:39"; // getting this from database $startdate = strtotime("23:29"); $startdate1 = date("H:i",...
2012/09/02
[ "https://Stackoverflow.com/questions/12233436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1641368/" ]
Make sure your comaring the right types of data, time stamps with time stamps and not w/ strings etc... ``` $gettime= strtotime("22:00"); // getting this from database $startdate = strtotime("21:00"); //$startdate1 = date("H:i", $startdate); $enddate = strtotime("23:00"); //$enddate1 = date("H:i", $enddate); //this...
You may refer to PHP documentation about `DateTime::diff` function at their website <http://php.net/manual/en/datetime.diff.php> You may also go through this stackoverflow question **[How to calculate the difference between two dates using PHP?](https://stackoverflow.com/questions/676824/how-to-calculate-the-differenc...
58,133,507
I need ti use this `AutoFac` in ASP core 3.0 When I use this code in startu up: ``` public IServiceProvider ConfigureServices(IServiceCollection services) { services.AddControllers(); return services.BuildAutofacServiceProvider(); } ``` It show me this error: > > 'ConfigureServices returning an System.ISe...
2019/09/27
[ "https://Stackoverflow.com/questions/58133507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11196342/" ]
Startup syntax has changed for configuring Autofac for ASP.NET Core 3.0+ In addition to using the following on the host builder ``` .UseServiceProviderFactory(new AutofacServiceProviderFactory()) ``` In `Startup` do the following format ``` public void ConfigureServices(IServiceCollection services) { //... nor...
Instead of `Host` in Program.cs you can use `WebHost` ``` public class Program { public static void Main(string[] args) { CreateWebHostBuilder(args).Build().Run(); } public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .UseStartup<Startup>(); } ...
58,133,507
I need ti use this `AutoFac` in ASP core 3.0 When I use this code in startu up: ``` public IServiceProvider ConfigureServices(IServiceCollection services) { services.AddControllers(); return services.BuildAutofacServiceProvider(); } ``` It show me this error: > > 'ConfigureServices returning an System.ISe...
2019/09/27
[ "https://Stackoverflow.com/questions/58133507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11196342/" ]
Startup syntax has changed for configuring Autofac for ASP.NET Core 3.0+ In addition to using the following on the host builder ``` .UseServiceProviderFactory(new AutofacServiceProviderFactory()) ``` In `Startup` do the following format ``` public void ConfigureServices(IServiceCollection services) { //... nor...
Instead of Host use WebHost in Program.cs It work for me ...
58,133,507
I need ti use this `AutoFac` in ASP core 3.0 When I use this code in startu up: ``` public IServiceProvider ConfigureServices(IServiceCollection services) { services.AddControllers(); return services.BuildAutofacServiceProvider(); } ``` It show me this error: > > 'ConfigureServices returning an System.ISe...
2019/09/27
[ "https://Stackoverflow.com/questions/58133507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11196342/" ]
Startup syntax has changed for configuring Autofac for ASP.NET Core 3.0+ In addition to using the following on the host builder ``` .UseServiceProviderFactory(new AutofacServiceProviderFactory()) ``` In `Startup` do the following format ``` public void ConfigureServices(IServiceCollection services) { //... nor...
you must change program.c ``` public static void Main(string[] args) { CreateWebHostBuilder(args).Build().Run(); } public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .ConfigureLogging(options => options.ClearProviders()) .UseStartup<Startup>();...
58,133,507
I need ti use this `AutoFac` in ASP core 3.0 When I use this code in startu up: ``` public IServiceProvider ConfigureServices(IServiceCollection services) { services.AddControllers(); return services.BuildAutofacServiceProvider(); } ``` It show me this error: > > 'ConfigureServices returning an System.ISe...
2019/09/27
[ "https://Stackoverflow.com/questions/58133507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11196342/" ]
Instead of `Host` in Program.cs you can use `WebHost` ``` public class Program { public static void Main(string[] args) { CreateWebHostBuilder(args).Build().Run(); } public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .UseStartup<Startup>(); } ...
Instead of Host use WebHost in Program.cs It work for me ...
58,133,507
I need ti use this `AutoFac` in ASP core 3.0 When I use this code in startu up: ``` public IServiceProvider ConfigureServices(IServiceCollection services) { services.AddControllers(); return services.BuildAutofacServiceProvider(); } ``` It show me this error: > > 'ConfigureServices returning an System.ISe...
2019/09/27
[ "https://Stackoverflow.com/questions/58133507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11196342/" ]
Instead of `Host` in Program.cs you can use `WebHost` ``` public class Program { public static void Main(string[] args) { CreateWebHostBuilder(args).Build().Run(); } public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .UseStartup<Startup>(); } ...
you must change program.c ``` public static void Main(string[] args) { CreateWebHostBuilder(args).Build().Run(); } public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .ConfigureLogging(options => options.ClearProviders()) .UseStartup<Startup>();...
58,133,507
I need ti use this `AutoFac` in ASP core 3.0 When I use this code in startu up: ``` public IServiceProvider ConfigureServices(IServiceCollection services) { services.AddControllers(); return services.BuildAutofacServiceProvider(); } ``` It show me this error: > > 'ConfigureServices returning an System.ISe...
2019/09/27
[ "https://Stackoverflow.com/questions/58133507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11196342/" ]
you must change program.c ``` public static void Main(string[] args) { CreateWebHostBuilder(args).Build().Run(); } public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .ConfigureLogging(options => options.ClearProviders()) .UseStartup<Startup>();...
Instead of Host use WebHost in Program.cs It work for me ...
25,134,756
Hi guys i am using Html minifier [ref](http://deanhume.com/home/blogpost/a-simple-html-minifier-for-asp-net/2097),but I am getting error in code-`An opening "(" is missing the corresponding closing ").` Is there any possible way to resolve or anyone have used this,please share your way to use this minifier. Adding t...
2014/08/05
[ "https://Stackoverflow.com/questions/25134756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3859458/" ]
Thanks for suggestions. I got all of information about the interfaces with the following code. Also, InetAddress class does not work correctly in Linux. (I tried get hardware adress in linux) But the code work on windows and linux correctly. ``` import java.io.*; import java.net.*; import java.util.*; import static...
You can use the `Inet6Address` subclass see <http://docs.oracle.com/javase/6/docs/api/java/net/Inet6Address.html>
25,134,756
Hi guys i am using Html minifier [ref](http://deanhume.com/home/blogpost/a-simple-html-minifier-for-asp-net/2097),but I am getting error in code-`An opening "(" is missing the corresponding closing ").` Is there any possible way to resolve or anyone have used this,please share your way to use this minifier. Adding t...
2014/08/05
[ "https://Stackoverflow.com/questions/25134756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3859458/" ]
``` private static String getIPAddress(boolean v6) throws SocketException { Enumeration<NetworkInterface> netInts = NetworkInterface.getNetworkInterfaces(); for (NetworkInterface netInt : Collections.list(netInts)) { if (netInt.isUp() && !netInt.isLoopback()) { for (InetAddress inetAddress :...
You can use the `Inet6Address` subclass see <http://docs.oracle.com/javase/6/docs/api/java/net/Inet6Address.html>
25,134,756
Hi guys i am using Html minifier [ref](http://deanhume.com/home/blogpost/a-simple-html-minifier-for-asp-net/2097),but I am getting error in code-`An opening "(" is missing the corresponding closing ").` Is there any possible way to resolve or anyone have used this,please share your way to use this minifier. Adding t...
2014/08/05
[ "https://Stackoverflow.com/questions/25134756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3859458/" ]
Thanks for suggestions. I got all of information about the interfaces with the following code. Also, InetAddress class does not work correctly in Linux. (I tried get hardware adress in linux) But the code work on windows and linux correctly. ``` import java.io.*; import java.net.*; import java.util.*; import static...
``` private static String getIPAddress(boolean v6) throws SocketException { Enumeration<NetworkInterface> netInts = NetworkInterface.getNetworkInterfaces(); for (NetworkInterface netInt : Collections.list(netInts)) { if (netInt.isUp() && !netInt.isLoopback()) { for (InetAddress inetAddress :...
40,706,788
I'm getting the following error: > > the given data failed to pass validation. /home/vagrant/Code/laravel/ptm/vendor/laravel/framework/src/Illuminate/Foundation/Validation/ValidatesRequests.php#89 > > > When I look at the `$data`, it's filled with: ``` array:1 [ "{"_token":"Z5fv3XpoNwoMdJPRP16I09bZeX7Pb6raH3...
2016/11/20
[ "https://Stackoverflow.com/questions/40706788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3552264/" ]
It's clearly saying that the `validate()` method is throwing an exception. If you want it to not to throw an exception, update your `App\Exceptions\Handler` class and add `ValidationException` to the `$dontReport` array: ``` class Handler extends ExceptionHandler { /** * A list of the exception types that sh...
You might check the blade template for the correct case on the variables. e.g. 'name', 'email' and 'password' are case sensitive and the blade template case of the variables must match the controller's case for the variables.
6,449
Does anyone know what the proper ancient Egyptian name for the Hall of Truth, Hall of Two Truths, or Hall of Judgement is? This is the hall where a soul is weighed on a scale against the feather of Ma'at. I've tried several google searches to no avail. Ma'at means truth, and the words wADyt and iwynt both mean a specif...
2020/07/07
[ "https://mythology.stackexchange.com/questions/6449", "https://mythology.stackexchange.com", "https://mythology.stackexchange.com/users/6739/" ]
[Hebe](https://en.wikipedia.org/wiki/Hebe_(mythology)) ------------------------------------------------------ Hebe was the cup-bearer and poured ambrosia and nectar of the gods. You might know her better as the wife of Hercules, who upon his ascension to Mount Olympus "got" her from his enemy and her mother Hera as re...
In the book Odyssey, it's said that ambrosia was carried to Olympus by doves [1]: > > Here not even a bird may pass, no, not even **the timid doves that bring ambrosia to Father Jove**, but the sheer rock always carries off one of them, and Father Jove has to send another to make up their number > > > Also, Demet...
6,449
Does anyone know what the proper ancient Egyptian name for the Hall of Truth, Hall of Two Truths, or Hall of Judgement is? This is the hall where a soul is weighed on a scale against the feather of Ma'at. I've tried several google searches to no avail. Ma'at means truth, and the words wADyt and iwynt both mean a specif...
2020/07/07
[ "https://mythology.stackexchange.com/questions/6449", "https://mythology.stackexchange.com", "https://mythology.stackexchange.com/users/6739/" ]
In the book Odyssey, it's said that ambrosia was carried to Olympus by doves [1]: > > Here not even a bird may pass, no, not even **the timid doves that bring ambrosia to Father Jove**, but the sheer rock always carries off one of them, and Father Jove has to send another to make up their number > > > Also, Demet...
Demeter was the goddess of the harvest and often put on banquets for the gods and sometimes mortals. You also have Pan who was worshipped as the "party god" and/or Dionysus God of the vine.
6,449
Does anyone know what the proper ancient Egyptian name for the Hall of Truth, Hall of Two Truths, or Hall of Judgement is? This is the hall where a soul is weighed on a scale against the feather of Ma'at. I've tried several google searches to no avail. Ma'at means truth, and the words wADyt and iwynt both mean a specif...
2020/07/07
[ "https://mythology.stackexchange.com/questions/6449", "https://mythology.stackexchange.com", "https://mythology.stackexchange.com/users/6739/" ]
In the book Odyssey, it's said that ambrosia was carried to Olympus by doves [1]: > > Here not even a bird may pass, no, not even **the timid doves that bring ambrosia to Father Jove**, but the sheer rock always carries off one of them, and Father Jove has to send another to make up their number > > > Also, Demet...
**Ganymede** was a Trojan prince. Zeus turned into an eagle and kidnapped the prince, eventually bringing him to the Mount Olympus and giving him the title of the cup-bearer. Ganymede then provided the Gods with ambrosia - drink which made the Gods immortal - in his Crater (cup). In mosaic art Ganymede is shown as a ha...
6,449
Does anyone know what the proper ancient Egyptian name for the Hall of Truth, Hall of Two Truths, or Hall of Judgement is? This is the hall where a soul is weighed on a scale against the feather of Ma'at. I've tried several google searches to no avail. Ma'at means truth, and the words wADyt and iwynt both mean a specif...
2020/07/07
[ "https://mythology.stackexchange.com/questions/6449", "https://mythology.stackexchange.com", "https://mythology.stackexchange.com/users/6739/" ]
[Hebe](https://en.wikipedia.org/wiki/Hebe_(mythology)) ------------------------------------------------------ Hebe was the cup-bearer and poured ambrosia and nectar of the gods. You might know her better as the wife of Hercules, who upon his ascension to Mount Olympus "got" her from his enemy and her mother Hera as re...
Demeter was the goddess of the harvest and often put on banquets for the gods and sometimes mortals. You also have Pan who was worshipped as the "party god" and/or Dionysus God of the vine.
6,449
Does anyone know what the proper ancient Egyptian name for the Hall of Truth, Hall of Two Truths, or Hall of Judgement is? This is the hall where a soul is weighed on a scale against the feather of Ma'at. I've tried several google searches to no avail. Ma'at means truth, and the words wADyt and iwynt both mean a specif...
2020/07/07
[ "https://mythology.stackexchange.com/questions/6449", "https://mythology.stackexchange.com", "https://mythology.stackexchange.com/users/6739/" ]
[Hebe](https://en.wikipedia.org/wiki/Hebe_(mythology)) ------------------------------------------------------ Hebe was the cup-bearer and poured ambrosia and nectar of the gods. You might know her better as the wife of Hercules, who upon his ascension to Mount Olympus "got" her from his enemy and her mother Hera as re...
**Ganymede** was a Trojan prince. Zeus turned into an eagle and kidnapped the prince, eventually bringing him to the Mount Olympus and giving him the title of the cup-bearer. Ganymede then provided the Gods with ambrosia - drink which made the Gods immortal - in his Crater (cup). In mosaic art Ganymede is shown as a ha...
6,449
Does anyone know what the proper ancient Egyptian name for the Hall of Truth, Hall of Two Truths, or Hall of Judgement is? This is the hall where a soul is weighed on a scale against the feather of Ma'at. I've tried several google searches to no avail. Ma'at means truth, and the words wADyt and iwynt both mean a specif...
2020/07/07
[ "https://mythology.stackexchange.com/questions/6449", "https://mythology.stackexchange.com", "https://mythology.stackexchange.com/users/6739/" ]
Demeter was the goddess of the harvest and often put on banquets for the gods and sometimes mortals. You also have Pan who was worshipped as the "party god" and/or Dionysus God of the vine.
**Ganymede** was a Trojan prince. Zeus turned into an eagle and kidnapped the prince, eventually bringing him to the Mount Olympus and giving him the title of the cup-bearer. Ganymede then provided the Gods with ambrosia - drink which made the Gods immortal - in his Crater (cup). In mosaic art Ganymede is shown as a ha...
72,243,659
So I made this basic checkbox price app that updates the food price whenever you click on a checkbox option <https://codepen.io/shodoro/pen/GRQNXyq> However, I had to hard code the prices in the javascript, but I want to know how I can update the prices based on the value in the input tag So for this example in the i...
2022/05/14
[ "https://Stackoverflow.com/questions/72243659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19059575/" ]
solution ======== Ok, with some other research i found out how to solve my problem. But firstable I want to thank you guys for recommending me the PyScript library. The problem I was having is that i needed to connect a python file within the pyscript tag. At first i tought that I had to import it with the `import` k...
There is a new library called PyScript (it can help you run python in your HTML), all you need to do to install the cli is doing this command: `pip install pyscript-cli` (This command will install the cli not the library). then you should do this command: `pyscript wrap python_file.py` (NOTE: this will convert the pyth...
72,243,659
So I made this basic checkbox price app that updates the food price whenever you click on a checkbox option <https://codepen.io/shodoro/pen/GRQNXyq> However, I had to hard code the prices in the javascript, but I want to know how I can update the prices based on the value in the input tag So for this example in the i...
2022/05/14
[ "https://Stackoverflow.com/questions/72243659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19059575/" ]
solution ======== Ok, with some other research i found out how to solve my problem. But firstable I want to thank you guys for recommending me the PyScript library. The problem I was having is that i needed to connect a python file within the pyscript tag. At first i tought that I had to import it with the `import` k...
But than, once i typed in the command and created the html file from the python script, how do I connect it to the "newLevel" page?
4,738,051
Here's what I'm using to create my database: ``` DataMapper.setup(:default,"sqlite://my.db") class Model1 property :some_prop,String ... property :other_prop,String end DataMapper.auto_upgrade! ``` I'm using this in combination with Sinatra. Everything's ok while the script is running, ...
2011/01/19
[ "https://Stackoverflow.com/questions/4738051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31610/" ]
Try putting the full path in there (note there are 3 forward slashes): ``` DataMapper.setup(:default, "sqlite:///path/to/my/database/my.db") ``` Then you should see `my.db` under `/path/to/my/database/`
``` DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/my.db") # your schema DataMapper.finalize DataMapper.auto_upgrade! ``` Also see [docs.](http://datamapper.org/getting-started.html)
79,408
By default, `ParallelTable` will use all the processors available in a PC. Is there a way to set a limit to the number of processors used by `ParallelTable`? For example, suppose I am running a Mathematica Script which has a `ParallelTable` statement on a PC with 8 cores. I want to limit the number of cores used by the...
2015/04/09
[ "https://mathematica.stackexchange.com/questions/79408", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/534/" ]
Before evaluating `ParallelTable` just launch however many kernels you want to use: ``` LaunchKernels[4] ``` By default `ParallelTable` and the other `Parallel*` functions call `LaunchKernels[]` which will launch whatever you have configured(default is essentially `LaunchKernels[Min[$ProcessorCount, $MaxLicenseSubpr...
To demonstrate evaluation in parallel computing on different number of kernels 1)Default list of kernels run for parallel computing ``` `$ConfiguredKernels` (*("<<`1` local kernels>>", 6]}*) ``` 2) Run `ParallelTable` on all kernels: ``` LaunchKernels[]; ParallelTable[Pause[1]; f[i], {i, 6}] // AbsoluteTim...
53,503,798
I'm trying to simulate a race between a red and a blue dot. A dot wins if it equals or exceeds the value inputted into the text box for distance. As of now, when you click the "Take a step!" button, each dot's location/distance goes up by 1. What I'm not sure how to do is get that location/distance to go up by a random...
2018/11/27
[ "https://Stackoverflow.com/questions/53503798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10697564/" ]
You are incrementing the value of `redcount` and `bluecount` but that has nothing to do with `x` and `y`. I added these lines after `x=` and `y=`. Seems to fix the root cause. ``` document.getElementById("reddotspan").innerHTML=parseInt(document.getElementById("reddotspan").innerHTML)+x; redcount = document.getEleme...
You can use: ``` Math.round(Math.random()*3); ``` Math.random() returns a random number between 0 and 1. Multiply by 3 to get 3 as highest number. Round.
53,503,798
I'm trying to simulate a race between a red and a blue dot. A dot wins if it equals or exceeds the value inputted into the text box for distance. As of now, when you click the "Take a step!" button, each dot's location/distance goes up by 1. What I'm not sure how to do is get that location/distance to go up by a random...
2018/11/27
[ "https://Stackoverflow.com/questions/53503798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10697564/" ]
``` <!doctype html> <html lang="en"> <head> <title>Dot Race</title> <link href="dotrace.css" type="text/css" rel="stylesheet"></link> <script type="text/javascript"> function TakeAStep() { var x, y, redcount, bluecount, distance; x = Math.floor(Math.random() * 3) + 1 ; ...
You can use: ``` Math.round(Math.random()*3); ``` Math.random() returns a random number between 0 and 1. Multiply by 3 to get 3 as highest number. Round.
53,503,798
I'm trying to simulate a race between a red and a blue dot. A dot wins if it equals or exceeds the value inputted into the text box for distance. As of now, when you click the "Take a step!" button, each dot's location/distance goes up by 1. What I'm not sure how to do is get that location/distance to go up by a random...
2018/11/27
[ "https://Stackoverflow.com/questions/53503798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10697564/" ]
You were almost there. When you were using the ++ operator, you were modifying the current state of the innerHTML to just add one. Instead, you need to set it equal to the new value. You should also use Number.parseInt so it parses it to a number explicitly. Otherwise, if you do "0" + 1, it will result in "01". ```...
You can use: ``` Math.round(Math.random()*3); ``` Math.random() returns a random number between 0 and 1. Multiply by 3 to get 3 as highest number. Round.
53,503,798
I'm trying to simulate a race between a red and a blue dot. A dot wins if it equals or exceeds the value inputted into the text box for distance. As of now, when you click the "Take a step!" button, each dot's location/distance goes up by 1. What I'm not sure how to do is get that location/distance to go up by a random...
2018/11/27
[ "https://Stackoverflow.com/questions/53503798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10697564/" ]
You are incrementing the value of `redcount` and `bluecount` but that has nothing to do with `x` and `y`. I added these lines after `x=` and `y=`. Seems to fix the root cause. ``` document.getElementById("reddotspan").innerHTML=parseInt(document.getElementById("reddotspan").innerHTML)+x; redcount = document.getEleme...
``` <!doctype html> <html lang="en"> <head> <title>Dot Race</title> <link href="dotrace.css" type="text/css" rel="stylesheet"></link> <script type="text/javascript"> function TakeAStep() { var x, y, redcount, bluecount, distance; x = Math.floor(Math.random() * 3) + 1 ; ...
53,503,798
I'm trying to simulate a race between a red and a blue dot. A dot wins if it equals or exceeds the value inputted into the text box for distance. As of now, when you click the "Take a step!" button, each dot's location/distance goes up by 1. What I'm not sure how to do is get that location/distance to go up by a random...
2018/11/27
[ "https://Stackoverflow.com/questions/53503798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10697564/" ]
You are incrementing the value of `redcount` and `bluecount` but that has nothing to do with `x` and `y`. I added these lines after `x=` and `y=`. Seems to fix the root cause. ``` document.getElementById("reddotspan").innerHTML=parseInt(document.getElementById("reddotspan").innerHTML)+x; redcount = document.getEleme...
You were almost there. When you were using the ++ operator, you were modifying the current state of the innerHTML to just add one. Instead, you need to set it equal to the new value. You should also use Number.parseInt so it parses it to a number explicitly. Otherwise, if you do "0" + 1, it will result in "01". ```...
20,625,101
I'm trying to get this image uploading and converting script working correctly. I had the script uploading any of the valid images and renaming them fine but then I added the conversion code and I can't get it working correctly. I commented out the // imagepng($image); because that caused the success div to fill with �...
2013/12/17
[ "https://Stackoverflow.com/questions/20625101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1043630/" ]
You don't need to call `move_uploaded_file` actually. In fact, you'll not get the results you want if you do. ``` // create a new blank image $newImage = imagecreatetruecolor($width, $height); // Copy the old image to the new image imagecopyresampled($newImage, $image, 0, 0, 0, 0, $width, $height, $width_orig, $heigh...
You are just moving the uploaded file.. So.. Remove this line.. ``` header('Content-Type: image/png'); ```
3,369,769
I am trying to find out what is the value of $(-1+i)^{10}$ by using the trigonometric expression, which should simplify it by avoiding to multiply in binomial form. So far I got this (sin==sen, and excuse my shoddy writing): ![1]](https://i.stack.imgur.com/FO0Z0.jpg) But every other calculator I used to test the resu...
2019/09/25
[ "https://math.stackexchange.com/questions/3369769", "https://math.stackexchange.com", "https://math.stackexchange.com/users/628898/" ]
Write $z=-1 + i$ in polar form. That is $z=\sqrt{2}e^{i\frac{3}{4}\pi}$. Then, $z^{10} = 2^5 e^{i\frac{15}{2}\pi} $. But that an angle of $\frac{15}{2}\pi$ is the same as $\frac{3}{2} \pi$, and $e^{i\frac{3}{2}\pi} = \cos(\frac{3}{2}\pi) + i\sin(\frac{3}{2}\pi) = -i$. Then, $z^{10} = -32i$
$(-1+i)$ is a vector of length $\sqrt{2}$ and an angle of $135$ degrees. The resulting vector has a length of $\sqrt{2}^{10} = 2^5 = 32$ and an angle of $10 \cdot135 = 1350 \equiv 270 \pmod{360}$ degrees, so yes, it's $-32i$.
3,369,769
I am trying to find out what is the value of $(-1+i)^{10}$ by using the trigonometric expression, which should simplify it by avoiding to multiply in binomial form. So far I got this (sin==sen, and excuse my shoddy writing): ![1]](https://i.stack.imgur.com/FO0Z0.jpg) But every other calculator I used to test the resu...
2019/09/25
[ "https://math.stackexchange.com/questions/3369769", "https://math.stackexchange.com", "https://math.stackexchange.com/users/628898/" ]
$$-1+i=\sqrt2\exp(3\pi i/4)$$ so $$(-1+i)^{10}=32\exp(15\pi i/2)=-32i.$$ Alas, $$\sqrt2\exp(5\pi i/4)=-1-i.$$
Cartesian to polar conversion in complex plane $$a+ib =\sqrt{a^2+b^2} e^{i\cdot \tan^{-1}(b/a)}$$ Raising to $n^{th}$power $$(a+ib)^n =(a^2+b^2)^{n/2} e^{i\cdot n\cdot \tan^{-1}(b/a)}$$ $$(-1+i)^{10}=(\sqrt{2} e^{i \cdot 3 \pi/4})^{10}=32 e^{15i\pi/2}=32~ e^{12 i\pi/2} \,e^{3\pi/2}=32 (1) e^{3\pi/2} =-32i$$ as the ...
3,369,769
I am trying to find out what is the value of $(-1+i)^{10}$ by using the trigonometric expression, which should simplify it by avoiding to multiply in binomial form. So far I got this (sin==sen, and excuse my shoddy writing): ![1]](https://i.stack.imgur.com/FO0Z0.jpg) But every other calculator I used to test the resu...
2019/09/25
[ "https://math.stackexchange.com/questions/3369769", "https://math.stackexchange.com", "https://math.stackexchange.com/users/628898/" ]
$$-1+i=\sqrt2\exp(3\pi i/4)$$ so $$(-1+i)^{10}=32\exp(15\pi i/2)=-32i.$$ Alas, $$\sqrt2\exp(5\pi i/4)=-1-i.$$
Hint: Use <https://en.m.wikipedia.org/wiki/Atan2#Definition_and_computation> arg$(-1+i)=\arctan\dfrac1{-1}+\pi=\dfrac{3\pi}4$ arg$(-1+i)^{10}=10\cdot\dfrac{3\pi}4=\equiv-\dfrac\pi2\pmod{2\pi}$
3,369,769
I am trying to find out what is the value of $(-1+i)^{10}$ by using the trigonometric expression, which should simplify it by avoiding to multiply in binomial form. So far I got this (sin==sen, and excuse my shoddy writing): ![1]](https://i.stack.imgur.com/FO0Z0.jpg) But every other calculator I used to test the resu...
2019/09/25
[ "https://math.stackexchange.com/questions/3369769", "https://math.stackexchange.com", "https://math.stackexchange.com/users/628898/" ]
$$N=(-1+i)^{10}=(\sqrt{2} e^{3i\pi/4})^{10}=32 e^{15i\pi/2}=32~ e^{7i\pi} ~e^{\pi/2}= -32i.$$
Cartesian to polar conversion in complex plane $$a+ib =\sqrt{a^2+b^2} e^{i\cdot \tan^{-1}(b/a)}$$ Raising to $n^{th}$power $$(a+ib)^n =(a^2+b^2)^{n/2} e^{i\cdot n\cdot \tan^{-1}(b/a)}$$ $$(-1+i)^{10}=(\sqrt{2} e^{i \cdot 3 \pi/4})^{10}=32 e^{15i\pi/2}=32~ e^{12 i\pi/2} \,e^{3\pi/2}=32 (1) e^{3\pi/2} =-32i$$ as the ...
3,369,769
I am trying to find out what is the value of $(-1+i)^{10}$ by using the trigonometric expression, which should simplify it by avoiding to multiply in binomial form. So far I got this (sin==sen, and excuse my shoddy writing): ![1]](https://i.stack.imgur.com/FO0Z0.jpg) But every other calculator I used to test the resu...
2019/09/25
[ "https://math.stackexchange.com/questions/3369769", "https://math.stackexchange.com", "https://math.stackexchange.com/users/628898/" ]
Write $z=-1 + i$ in polar form. That is $z=\sqrt{2}e^{i\frac{3}{4}\pi}$. Then, $z^{10} = 2^5 e^{i\frac{15}{2}\pi} $. But that an angle of $\frac{15}{2}\pi$ is the same as $\frac{3}{2} \pi$, and $e^{i\frac{3}{2}\pi} = \cos(\frac{3}{2}\pi) + i\sin(\frac{3}{2}\pi) = -i$. Then, $z^{10} = -32i$
Cartesian to polar conversion in complex plane $$a+ib =\sqrt{a^2+b^2} e^{i\cdot \tan^{-1}(b/a)}$$ Raising to $n^{th}$power $$(a+ib)^n =(a^2+b^2)^{n/2} e^{i\cdot n\cdot \tan^{-1}(b/a)}$$ $$(-1+i)^{10}=(\sqrt{2} e^{i \cdot 3 \pi/4})^{10}=32 e^{15i\pi/2}=32~ e^{12 i\pi/2} \,e^{3\pi/2}=32 (1) e^{3\pi/2} =-32i$$ as the ...
3,369,769
I am trying to find out what is the value of $(-1+i)^{10}$ by using the trigonometric expression, which should simplify it by avoiding to multiply in binomial form. So far I got this (sin==sen, and excuse my shoddy writing): ![1]](https://i.stack.imgur.com/FO0Z0.jpg) But every other calculator I used to test the resu...
2019/09/25
[ "https://math.stackexchange.com/questions/3369769", "https://math.stackexchange.com", "https://math.stackexchange.com/users/628898/" ]
$$N=(-1+i)^{10}=(\sqrt{2} e^{3i\pi/4})^{10}=32 e^{15i\pi/2}=32~ e^{7i\pi} ~e^{\pi/2}= -32i.$$
Hint: Use <https://en.m.wikipedia.org/wiki/Atan2#Definition_and_computation> arg$(-1+i)=\arctan\dfrac1{-1}+\pi=\dfrac{3\pi}4$ arg$(-1+i)^{10}=10\cdot\dfrac{3\pi}4=\equiv-\dfrac\pi2\pmod{2\pi}$
3,369,769
I am trying to find out what is the value of $(-1+i)^{10}$ by using the trigonometric expression, which should simplify it by avoiding to multiply in binomial form. So far I got this (sin==sen, and excuse my shoddy writing): ![1]](https://i.stack.imgur.com/FO0Z0.jpg) But every other calculator I used to test the resu...
2019/09/25
[ "https://math.stackexchange.com/questions/3369769", "https://math.stackexchange.com", "https://math.stackexchange.com/users/628898/" ]
$$-1+i=\sqrt2\exp(3\pi i/4)$$ so $$(-1+i)^{10}=32\exp(15\pi i/2)=-32i.$$ Alas, $$\sqrt2\exp(5\pi i/4)=-1-i.$$
$(-1+i)$ is a vector of length $\sqrt{2}$ and an angle of $135$ degrees. The resulting vector has a length of $\sqrt{2}^{10} = 2^5 = 32$ and an angle of $10 \cdot135 = 1350 \equiv 270 \pmod{360}$ degrees, so yes, it's $-32i$.
3,369,769
I am trying to find out what is the value of $(-1+i)^{10}$ by using the trigonometric expression, which should simplify it by avoiding to multiply in binomial form. So far I got this (sin==sen, and excuse my shoddy writing): ![1]](https://i.stack.imgur.com/FO0Z0.jpg) But every other calculator I used to test the resu...
2019/09/25
[ "https://math.stackexchange.com/questions/3369769", "https://math.stackexchange.com", "https://math.stackexchange.com/users/628898/" ]
$$N=(-1+i)^{10}=(\sqrt{2} e^{3i\pi/4})^{10}=32 e^{15i\pi/2}=32~ e^{7i\pi} ~e^{\pi/2}= -32i.$$
$(-1+i)$ is a vector of length $\sqrt{2}$ and an angle of $135$ degrees. The resulting vector has a length of $\sqrt{2}^{10} = 2^5 = 32$ and an angle of $10 \cdot135 = 1350 \equiv 270 \pmod{360}$ degrees, so yes, it's $-32i$.
3,369,769
I am trying to find out what is the value of $(-1+i)^{10}$ by using the trigonometric expression, which should simplify it by avoiding to multiply in binomial form. So far I got this (sin==sen, and excuse my shoddy writing): ![1]](https://i.stack.imgur.com/FO0Z0.jpg) But every other calculator I used to test the resu...
2019/09/25
[ "https://math.stackexchange.com/questions/3369769", "https://math.stackexchange.com", "https://math.stackexchange.com/users/628898/" ]
$(-1+i)$ is a vector of length $\sqrt{2}$ and an angle of $135$ degrees. The resulting vector has a length of $\sqrt{2}^{10} = 2^5 = 32$ and an angle of $10 \cdot135 = 1350 \equiv 270 \pmod{360}$ degrees, so yes, it's $-32i$.
Hint: Use <https://en.m.wikipedia.org/wiki/Atan2#Definition_and_computation> arg$(-1+i)=\arctan\dfrac1{-1}+\pi=\dfrac{3\pi}4$ arg$(-1+i)^{10}=10\cdot\dfrac{3\pi}4=\equiv-\dfrac\pi2\pmod{2\pi}$
3,369,769
I am trying to find out what is the value of $(-1+i)^{10}$ by using the trigonometric expression, which should simplify it by avoiding to multiply in binomial form. So far I got this (sin==sen, and excuse my shoddy writing): ![1]](https://i.stack.imgur.com/FO0Z0.jpg) But every other calculator I used to test the resu...
2019/09/25
[ "https://math.stackexchange.com/questions/3369769", "https://math.stackexchange.com", "https://math.stackexchange.com/users/628898/" ]
Cartesian to polar conversion in complex plane $$a+ib =\sqrt{a^2+b^2} e^{i\cdot \tan^{-1}(b/a)}$$ Raising to $n^{th}$power $$(a+ib)^n =(a^2+b^2)^{n/2} e^{i\cdot n\cdot \tan^{-1}(b/a)}$$ $$(-1+i)^{10}=(\sqrt{2} e^{i \cdot 3 \pi/4})^{10}=32 e^{15i\pi/2}=32~ e^{12 i\pi/2} \,e^{3\pi/2}=32 (1) e^{3\pi/2} =-32i$$ as the ...
Hint: Use <https://en.m.wikipedia.org/wiki/Atan2#Definition_and_computation> arg$(-1+i)=\arctan\dfrac1{-1}+\pi=\dfrac{3\pi}4$ arg$(-1+i)^{10}=10\cdot\dfrac{3\pi}4=\equiv-\dfrac\pi2\pmod{2\pi}$
6,838,873
I am making requests in a loop, trying to accumulate the ID's of the objects given back each time and send to the subsequent request so that they do not get returned a second time. However, the accumulator variable (obviously) is outside of `.ajax()` success callback, and is empty when I pass it through the data object...
2011/07/27
[ "https://Stackoverflow.com/questions/6838873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2128/" ]
It looks like the issue here is that you're expecting the returned values to be appended to the `rend` string in time for the next AJAX call. This isn't going to happen, because making the calls is a synchronous process, but getting the return values is asynchronous. Instead of: ``` AJAX Post 1 (rend='') rend += 'id1,...
Not sure it's the problem, but shouldn't it be like this for a POST ? ``` function fill_div(id, count) { var rend = ""; var filler = $('#'+id); for(i = 0; i < count; i++) { $.ajax({'type':'POST', 'url':'/ads/render/', 'dataType':'json', 'data':{'rende...
6,838,873
I am making requests in a loop, trying to accumulate the ID's of the objects given back each time and send to the subsequent request so that they do not get returned a second time. However, the accumulator variable (obviously) is outside of `.ajax()` success callback, and is empty when I pass it through the data object...
2011/07/27
[ "https://Stackoverflow.com/questions/6838873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2128/" ]
It looks like the issue here is that you're expecting the returned values to be appended to the `rend` string in time for the next AJAX call. This isn't going to happen, because making the calls is a synchronous process, but getting the return values is asynchronous. Instead of: ``` AJAX Post 1 (rend='') rend += 'id1,...
when the function fill\_div executed, there is initialisation on ``` var rend = ""; ``` and when the POST request constructed, ``` 'data':"rendered="+rend ``` rend value will be empty Can you double check the variable name? :)
984,244
I've found a PHP script that lets me do what I asked in [this](https://stackoverflow.com/questions/922148/how-to-make-mechanize-not-fail-with-forms-on-this-page) SO question. I can use this just fine, but out of curiosity I'd like to recreate the following code in Python. I can of course use urllib2 to get the page, ...
2009/06/11
[ "https://Stackoverflow.com/questions/984244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23972/" ]
Similar to monkut's answer, but a little more concise. ``` import urllib, urllib2 def steam_login(username,password): data = urllib.urlencode({ 'action': 'doLogin', 'goto': '', 'steamAccountName': username, 'steamPassword': password, }) request = urllib2.Request('https://steamcommu...
I'm not familiar with PHP, but this may get you started. I'm installing the opener here which will apply it to the urlopen method. If you don't want to 'install' the opener(s) you can use the opener object directly. (opener.open(url, data)). Refer to: <http://docs.python.org/library/urllib2.html?highlight=urllib2#urll...
35,857,061
I tried to store and reload objects and their references between each other. The problem is when I reload the data from the database the references are not set correctly. Here is an example code which describes the problem. I comment the the expcted state and the real state of the output in the code. ``` [Table(Name...
2016/03/08
[ "https://Stackoverflow.com/questions/35857061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5289969/" ]
When using 3rd party libraries the following steps have prove useful to me: 1) Create a wrapper element (e.g fullcalendar-wrapper.html ) Inside it put all the script references to the external required scripts 2) Create a custom component that will have the calendar ( e.g calendar-test.html ) * Import the fullcalend...
I may assume that the issue is in two included `jQuery` libraries (one from `code.jquery.com` (the 1st `script` tag) and another one from `fullcalendar` (the 3rd `script` tag). Please try to remove one of them. And is there any error message in a Browser Developer Console?
23,199,396
How can I get a result of subtraction in words like "7 seconds"? `strftime` isn't working because the result is Fixnum. ``` a = Time.now b = Time.now #a few seconds later b - a #7.17584 (seconds) ```
2014/04/21
[ "https://Stackoverflow.com/questions/23199396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2394732/" ]
If you are using Rails, you can use [`distance_of_time_in_words`](http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#method-i-distance_of_time_in_words): ``` from_time = Time.now distance_of_time_in_words(from_time, from_time + 15.seconds, include_seconds: true) #less than 20 seconds ```
For example as follows: ``` Time.at(Time.now - 7.seconds).strftime("%H:%M:%S") # => "18:41:18" ``` and the difference between two times: ``` Time.at(Time.now - (Time.now - 7.seconds)).strftime("%1S.%5N (seconds)") # 6.99998 ``` Note: The instance method `-` returns the number of seconds between two times, `Time....
23,199,396
How can I get a result of subtraction in words like "7 seconds"? `strftime` isn't working because the result is Fixnum. ``` a = Time.now b = Time.now #a few seconds later b - a #7.17584 (seconds) ```
2014/04/21
[ "https://Stackoverflow.com/questions/23199396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2394732/" ]
If you are using Rails, you can use [`distance_of_time_in_words`](http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#method-i-distance_of_time_in_words): ``` from_time = Time.now distance_of_time_in_words(from_time, from_time + 15.seconds, include_seconds: true) #less than 20 seconds ```
Depending on your exact needs, you can also write your own method, something like this: ``` def diff_time_in_words(first_time, second_time) (second_time - first_time).round(0).to_s + " seconds" end # nil a = Time.now # 2014-04-21 09:55:55 -0500 b = Time.now # 2014-04-21 09:56:02 -0500 diff_time_in_words(a, b) # "8 s...
16,979,390
I have never done anything like this before, that's why I ask for some tips how to solve this problem. I have website which has following links: **Home, Product, Blog, About us, Contact** In Blog section I have installed Wordpress. And here is my problem/question: How can I manage the rest of the pages? I don't ...
2013/06/07
[ "https://Stackoverflow.com/questions/16979390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1409508/" ]
you can load wordpress environment in other php pages by using ``` require( 'blog/wp-load.php' ); ``` where 'blog' being your wordpress install root.
the wordpress should be installed for the entire site. and than what you can do is just make pages, even custom pages with different design for each page on the site. you can read more about it her:[Codex/Page Templates](http://codex.wordpress.org/Page_Templates) and than in the **blog** page you can just create a l...
8,828,687
Mostly out of curiosity, I would like to know if there are any edge cases that can arise from cases like: ``` <span class="class1 class2 class3 class2 class4">...</span> ``` (`class2` is listed twice) or ``` <span class="class1 class2 class3 class2 class2 class2 class3 class4 class4 class3">...</span> ``` (a mo...
2012/01/12
[ "https://Stackoverflow.com/questions/8828687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/224354/" ]
**No, none whatsoever**, unless you have the habit of using the `class` attribute: ``` [class="class1 class2"] { /* ... */ } ``` instead of: ``` .class1.class2 { /* ... */ } ``` which is terrible practice, of course. --- Also, although your question isn't tagged [javascript](/questions/tagged/javascript...
No, there is nothing *wrong* with it other than it looks weird. Any re-occurences of a class name won't affect anything, ever. It doesn't "reapply" those styles after applying styles from the class defined before it or anything. Remember that CSS will always select the style defined *last* for that level of specificity...