qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
3,347,782
I'm shortly to start on an integration project that will require organisational data (line reporting etc) and starter/leaver events etc. We utilise SAP HCM, but I have no experience of SAP (BizTalk/.NET developer), and I'm still attempting to find the right people to talk to in our organisation about how to interface w...
2010/07/27
[ "https://Stackoverflow.com/questions/3347782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/204818/" ]
I'm not familiar with the HCM module specifically, but I can provide some general answers: 1. Generally, standard display functionality of the major business objects (like a User or a Job in the HR world) are exposeed via BAPIs. Assuming your Basis team has ICF (Internet Communication Framework) configured, it is pret...
The challenge with connecting directly to SAP from another system creates a non scalable architecture - point-to-point interfaces that are affected by changes or issues with both systems. Let's say you try and push out changes to employee data and the target system is not available, well SAP will most likely short dump...
56,748,966
I wan't to hide the TabBar in a Xamarin Forms Shell 4.0.0.497661 project. I try using: ``` Shell.SetTabBarIsVisible(Shell.Current, false); ``` After the page has loaded and drawed, but it has no effect. If I put in the codebehind .cs constructor after **InitializeComponent();** a null reference exception has launc...
2019/06/25
[ "https://Stackoverflow.com/questions/56748966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2233919/" ]
`TabBarIsVisible` is an [attached property](https://learn.microsoft.com/en-us/xamarin/xamarin-forms/xaml/attached-properties) of `Shell`. You should pass the page as the first parameter in the `SetTabBarIsVisible` to tell the shell hiding its tab bar. Use it like: ``` public AppShell() { InitializeComponent(); ...
Sorry, don't have enough rep. to comment. In which class are you doing `Shell.SetTabBarIsVisible(Shell.Current, false);`? Is it the `Shell` or `Current` that is null if you put it after the constructor? Edit 30/6/2019: I have tested a few things in Shell. Here's a link to the project: <https://github.com/JesperBa...
56,748,966
I wan't to hide the TabBar in a Xamarin Forms Shell 4.0.0.497661 project. I try using: ``` Shell.SetTabBarIsVisible(Shell.Current, false); ``` After the page has loaded and drawed, but it has no effect. If I put in the codebehind .cs constructor after **InitializeComponent();** a null reference exception has launc...
2019/06/25
[ "https://Stackoverflow.com/questions/56748966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2233919/" ]
Sorry, don't have enough rep. to comment. In which class are you doing `Shell.SetTabBarIsVisible(Shell.Current, false);`? Is it the `Shell` or `Current` that is null if you put it after the constructor? Edit 30/6/2019: I have tested a few things in Shell. Here's a link to the project: <https://github.com/JesperBa...
Another approach: ``` <Shell X:Class="..............: xmlns:sd="..................." Shell.IsTabBarVisible="False"> </Shell> ```
56,748,966
I wan't to hide the TabBar in a Xamarin Forms Shell 4.0.0.497661 project. I try using: ``` Shell.SetTabBarIsVisible(Shell.Current, false); ``` After the page has loaded and drawed, but it has no effect. If I put in the codebehind .cs constructor after **InitializeComponent();** a null reference exception has launc...
2019/06/25
[ "https://Stackoverflow.com/questions/56748966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2233919/" ]
In my case, I need to remove tabbar from child page, then: ***Shell.TabBarIsVisible="False"*** ``` <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" Title="Child page from shell" Shell.TabBarIsVisible="False" ...
Sorry, don't have enough rep. to comment. In which class are you doing `Shell.SetTabBarIsVisible(Shell.Current, false);`? Is it the `Shell` or `Current` that is null if you put it after the constructor? Edit 30/6/2019: I have tested a few things in Shell. Here's a link to the project: <https://github.com/JesperBa...
56,748,966
I wan't to hide the TabBar in a Xamarin Forms Shell 4.0.0.497661 project. I try using: ``` Shell.SetTabBarIsVisible(Shell.Current, false); ``` After the page has loaded and drawed, but it has no effect. If I put in the codebehind .cs constructor after **InitializeComponent();** a null reference exception has launc...
2019/06/25
[ "https://Stackoverflow.com/questions/56748966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2233919/" ]
`TabBarIsVisible` is an [attached property](https://learn.microsoft.com/en-us/xamarin/xamarin-forms/xaml/attached-properties) of `Shell`. You should pass the page as the first parameter in the `SetTabBarIsVisible` to tell the shell hiding its tab bar. Use it like: ``` public AppShell() { InitializeComponent(); ...
Another approach: ``` <Shell X:Class="..............: xmlns:sd="..................." Shell.IsTabBarVisible="False"> </Shell> ```
56,748,966
I wan't to hide the TabBar in a Xamarin Forms Shell 4.0.0.497661 project. I try using: ``` Shell.SetTabBarIsVisible(Shell.Current, false); ``` After the page has loaded and drawed, but it has no effect. If I put in the codebehind .cs constructor after **InitializeComponent();** a null reference exception has launc...
2019/06/25
[ "https://Stackoverflow.com/questions/56748966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2233919/" ]
`TabBarIsVisible` is an [attached property](https://learn.microsoft.com/en-us/xamarin/xamarin-forms/xaml/attached-properties) of `Shell`. You should pass the page as the first parameter in the `SetTabBarIsVisible` to tell the shell hiding its tab bar. Use it like: ``` public AppShell() { InitializeComponent(); ...
In my case, I need to remove tabbar from child page, then: ***Shell.TabBarIsVisible="False"*** ``` <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" Title="Child page from shell" Shell.TabBarIsVisible="False" ...
56,748,966
I wan't to hide the TabBar in a Xamarin Forms Shell 4.0.0.497661 project. I try using: ``` Shell.SetTabBarIsVisible(Shell.Current, false); ``` After the page has loaded and drawed, but it has no effect. If I put in the codebehind .cs constructor after **InitializeComponent();** a null reference exception has launc...
2019/06/25
[ "https://Stackoverflow.com/questions/56748966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2233919/" ]
In my case, I need to remove tabbar from child page, then: ***Shell.TabBarIsVisible="False"*** ``` <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" Title="Child page from shell" Shell.TabBarIsVisible="False" ...
Another approach: ``` <Shell X:Class="..............: xmlns:sd="..................." Shell.IsTabBarVisible="False"> </Shell> ```
4,026,399
We are integrating documentation authored according to DITA. The [DITA Open Toolkit](http://dita.xml.org/wiki/the-dita-open-toolkit) processes all files using java whereas we are looking for a solution that allows us to work with the DITA content on the fly from a C#-based application. Does anyone know of any .NET pro...
2010/10/26
[ "https://Stackoverflow.com/questions/4026399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23234/" ]
I don't believe there are any Microsoft-made DITA libraries available for .NET. There was a paper written for SIGDOC 2008 called "Pragmatic DITA on a budget" that refers to generating DITA content from commented C# code. A PDF is available [here.](http://portal.acm.org/citation.cfm?doid=1456536.1456577) This probably ...
It's not the cleanest solution in the world, but you could call the DITA Open Toolkit command line tools through `Process`. If you do it right, you can suppress the console window and the user won't know the difference.
4,026,399
We are integrating documentation authored according to DITA. The [DITA Open Toolkit](http://dita.xml.org/wiki/the-dita-open-toolkit) processes all files using java whereas we are looking for a solution that allows us to work with the DITA content on the fly from a C#-based application. Does anyone know of any .NET pro...
2010/10/26
[ "https://Stackoverflow.com/questions/4026399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23234/" ]
I don't believe there are any Microsoft-made DITA libraries available for .NET. There was a paper written for SIGDOC 2008 called "Pragmatic DITA on a budget" that refers to generating DITA content from commented C# code. A PDF is available [here.](http://portal.acm.org/citation.cfm?doid=1456536.1456577) This probably ...
You could use a tool like [IKVM](http://www.ikvm.net/) to turn the java toolkit jars into .net assemblies and then use the toolkit from there.
4,026,399
We are integrating documentation authored according to DITA. The [DITA Open Toolkit](http://dita.xml.org/wiki/the-dita-open-toolkit) processes all files using java whereas we are looking for a solution that allows us to work with the DITA content on the fly from a C#-based application. Does anyone know of any .NET pro...
2010/10/26
[ "https://Stackoverflow.com/questions/4026399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23234/" ]
It's not the cleanest solution in the world, but you could call the DITA Open Toolkit command line tools through `Process`. If you do it right, you can suppress the console window and the user won't know the difference.
You could use a tool like [IKVM](http://www.ikvm.net/) to turn the java toolkit jars into .net assemblies and then use the toolkit from there.
27,311
When using an electric water cooker/boiler, how to translate the following: > > The water is boiling. > > > What would be arguably the most common way in Mandarin to say this in Taiwan?
2017/10/30
[ "https://chinese.stackexchange.com/questions/27311", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/16003/" ]
> > "The water is boiling." > > > We say 水開了 in Taiwan. Nothing else. 我們都說「水開了」,好像沒有人用其他講法。
Many ways to describe water boiling, depends on the situation, say temperature or some flow within, of water. * 水開了:water has reached at 100°C * 水滾了: water has reached at 100°C * 水在沸騰: water is going up to 100°C The first one is the most common way to describe the water is boiled already.
27,311
When using an electric water cooker/boiler, how to translate the following: > > The water is boiling. > > > What would be arguably the most common way in Mandarin to say this in Taiwan?
2017/10/30
[ "https://chinese.stackexchange.com/questions/27311", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/16003/" ]
> > "The water is boiling." > > > We say 水開了 in Taiwan. Nothing else. 我們都說「水開了」,好像沒有人用其他講法。
“水開了/沸了/滾了” are all used in oral. Even “水好了” goes well (好了=燒好了, and you can use it in preparing for bath, either).
27,311
When using an electric water cooker/boiler, how to translate the following: > > The water is boiling. > > > What would be arguably the most common way in Mandarin to say this in Taiwan?
2017/10/30
[ "https://chinese.stackexchange.com/questions/27311", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/16003/" ]
“水開了/沸了/滾了” are all used in oral. Even “水好了” goes well (好了=燒好了, and you can use it in preparing for bath, either).
Many ways to describe water boiling, depends on the situation, say temperature or some flow within, of water. * 水開了:water has reached at 100°C * 水滾了: water has reached at 100°C * 水在沸騰: water is going up to 100°C The first one is the most common way to describe the water is boiled already.
624,797
I have about 100 sites built in a cms, each with its own database. Each database has the same tables. My stored procedure needs to select all of the pages in a database given a sitename. Below I am trying to pass the database name as a parameter, but it doesn't seem to work. ``` ... @site nvarchar(250) AS SELECT *...
2009/03/09
[ "https://Stackoverflow.com/questions/624797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62118/" ]
``` SELECT @dbname = quotename(dbname) SELECT @sql = ' SELECT ... FROM ' + @dbname + '.dbo.tablename WHERE ...' EXEC sp_executesql @sql, @params, ... ``` Refs: [sp\_executesql (Transact-SQL)](http://msdn.microsoft.com/en-us/library/ms188001.aspx) [The Curse and Blessings of Dynamic SQL](http://www.sommarskog.se/dyn...
Almost no DBMSes allow you to use a parameter in this manner. Build a dynamic query via concatenation and execute it.
624,797
I have about 100 sites built in a cms, each with its own database. Each database has the same tables. My stored procedure needs to select all of the pages in a database given a sitename. Below I am trying to pass the database name as a parameter, but it doesn't seem to work. ``` ... @site nvarchar(250) AS SELECT *...
2009/03/09
[ "https://Stackoverflow.com/questions/624797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62118/" ]
You can specify the database in the connection string: Data Source=myServerAddress;**Initial Catalog=myDataBase**;User Id=myUsername;Password=myPassword;
Almost no DBMSes allow you to use a parameter in this manner. Build a dynamic query via concatenation and execute it.
624,797
I have about 100 sites built in a cms, each with its own database. Each database has the same tables. My stored procedure needs to select all of the pages in a database given a sitename. Below I am trying to pass the database name as a parameter, but it doesn't seem to work. ``` ... @site nvarchar(250) AS SELECT *...
2009/03/09
[ "https://Stackoverflow.com/questions/624797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62118/" ]
Almost no DBMSes allow you to use a parameter in this manner. Build a dynamic query via concatenation and execute it.
You can use the undocumented stored procedure sp\_MSforeachdb: sp\_MSforeachdb 'SELECT \* FROM ?..table\_name\_here'
624,797
I have about 100 sites built in a cms, each with its own database. Each database has the same tables. My stored procedure needs to select all of the pages in a database given a sitename. Below I am trying to pass the database name as a parameter, but it doesn't seem to work. ``` ... @site nvarchar(250) AS SELECT *...
2009/03/09
[ "https://Stackoverflow.com/questions/624797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62118/" ]
Almost no DBMSes allow you to use a parameter in this manner. Build a dynamic query via concatenation and execute it.
If the query / procedure is being executed from a .NET application, you can also programmatically change the database of the connection object (VB.NET): ``` Using da As New SqlDataAdapter("SELECT * FROM cmsDocument WHERE published = 1", GetDatabaseConnection(ServerName)) da.SelectCommand.Connection.ChangeDatabase...
624,797
I have about 100 sites built in a cms, each with its own database. Each database has the same tables. My stored procedure needs to select all of the pages in a database given a sitename. Below I am trying to pass the database name as a parameter, but it doesn't seem to work. ``` ... @site nvarchar(250) AS SELECT *...
2009/03/09
[ "https://Stackoverflow.com/questions/624797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62118/" ]
``` SELECT @dbname = quotename(dbname) SELECT @sql = ' SELECT ... FROM ' + @dbname + '.dbo.tablename WHERE ...' EXEC sp_executesql @sql, @params, ... ``` Refs: [sp\_executesql (Transact-SQL)](http://msdn.microsoft.com/en-us/library/ms188001.aspx) [The Curse and Blessings of Dynamic SQL](http://www.sommarskog.se/dyn...
You can specify the database in the connection string: Data Source=myServerAddress;**Initial Catalog=myDataBase**;User Id=myUsername;Password=myPassword;
624,797
I have about 100 sites built in a cms, each with its own database. Each database has the same tables. My stored procedure needs to select all of the pages in a database given a sitename. Below I am trying to pass the database name as a parameter, but it doesn't seem to work. ``` ... @site nvarchar(250) AS SELECT *...
2009/03/09
[ "https://Stackoverflow.com/questions/624797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62118/" ]
``` SELECT @dbname = quotename(dbname) SELECT @sql = ' SELECT ... FROM ' + @dbname + '.dbo.tablename WHERE ...' EXEC sp_executesql @sql, @params, ... ``` Refs: [sp\_executesql (Transact-SQL)](http://msdn.microsoft.com/en-us/library/ms188001.aspx) [The Curse and Blessings of Dynamic SQL](http://www.sommarskog.se/dyn...
You can use the undocumented stored procedure sp\_MSforeachdb: sp\_MSforeachdb 'SELECT \* FROM ?..table\_name\_here'
624,797
I have about 100 sites built in a cms, each with its own database. Each database has the same tables. My stored procedure needs to select all of the pages in a database given a sitename. Below I am trying to pass the database name as a parameter, but it doesn't seem to work. ``` ... @site nvarchar(250) AS SELECT *...
2009/03/09
[ "https://Stackoverflow.com/questions/624797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62118/" ]
``` SELECT @dbname = quotename(dbname) SELECT @sql = ' SELECT ... FROM ' + @dbname + '.dbo.tablename WHERE ...' EXEC sp_executesql @sql, @params, ... ``` Refs: [sp\_executesql (Transact-SQL)](http://msdn.microsoft.com/en-us/library/ms188001.aspx) [The Curse and Blessings of Dynamic SQL](http://www.sommarskog.se/dyn...
If the query / procedure is being executed from a .NET application, you can also programmatically change the database of the connection object (VB.NET): ``` Using da As New SqlDataAdapter("SELECT * FROM cmsDocument WHERE published = 1", GetDatabaseConnection(ServerName)) da.SelectCommand.Connection.ChangeDatabase...
624,797
I have about 100 sites built in a cms, each with its own database. Each database has the same tables. My stored procedure needs to select all of the pages in a database given a sitename. Below I am trying to pass the database name as a parameter, but it doesn't seem to work. ``` ... @site nvarchar(250) AS SELECT *...
2009/03/09
[ "https://Stackoverflow.com/questions/624797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62118/" ]
You can specify the database in the connection string: Data Source=myServerAddress;**Initial Catalog=myDataBase**;User Id=myUsername;Password=myPassword;
You can use the undocumented stored procedure sp\_MSforeachdb: sp\_MSforeachdb 'SELECT \* FROM ?..table\_name\_here'
624,797
I have about 100 sites built in a cms, each with its own database. Each database has the same tables. My stored procedure needs to select all of the pages in a database given a sitename. Below I am trying to pass the database name as a parameter, but it doesn't seem to work. ``` ... @site nvarchar(250) AS SELECT *...
2009/03/09
[ "https://Stackoverflow.com/questions/624797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/62118/" ]
You can specify the database in the connection string: Data Source=myServerAddress;**Initial Catalog=myDataBase**;User Id=myUsername;Password=myPassword;
If the query / procedure is being executed from a .NET application, you can also programmatically change the database of the connection object (VB.NET): ``` Using da As New SqlDataAdapter("SELECT * FROM cmsDocument WHERE published = 1", GetDatabaseConnection(ServerName)) da.SelectCommand.Connection.ChangeDatabase...
48,054,288
Does anyone know a way to bootstrap Weld in a Spring Boot Jar application with embedded Tomcat. I have tried to use org.jboss.weld.environment.servlet.Listener with ``` import org.jboss.weld.environment.servlet.Listener; @SpringBootApplication public class MyApplication { public static void main(String[] args) ...
2018/01/02
[ "https://Stackoverflow.com/questions/48054288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1907872/" ]
Finally I managed to bootstrap Weld in a Boot Spring application that uses an embedded Tomcat. There are some problems related to both the Tomcat container that Weld uses and the management of the BOOT-INF entries in the Boot Spring generated jar. Some of the problems seem bugs and the other ones are related to the wa...
It's not that complicated. Through a lot of trial and error, just include the javassist.jar and putting all my application files in a jar so there is nothing in BOOT-INF/classes ended up working for me. I used weld 3.0.1
16,544,435
Suppose I have an object obj which has some variables in it. What I want to do is to add a new variable which has a name i gave as a parameter. For example: ``` var obj= { number:8 } function AddField(field_name,obj) { //some magical code here } ``` If I call ``` AddField('name',obj); ``` i want to be able ...
2013/05/14
[ "https://Stackoverflow.com/questions/16544435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2334907/" ]
Use square brackets notation: ``` obj[field_name] = value; ``` **REF:** <http://www.jibbering.com/faq/faq_notes/square_brackets.html#vId>
Use the bracket notation: ``` obj[field_name] = void 0; ``` This creates a new property with an undefined value.
16,544,435
Suppose I have an object obj which has some variables in it. What I want to do is to add a new variable which has a name i gave as a parameter. For example: ``` var obj= { number:8 } function AddField(field_name,obj) { //some magical code here } ``` If I call ``` AddField('name',obj); ``` i want to be able ...
2013/05/14
[ "https://Stackoverflow.com/questions/16544435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2334907/" ]
Use square brackets notation: ``` obj[field_name] = value; ``` **REF:** <http://www.jibbering.com/faq/faq_notes/square_brackets.html#vId>
If obj is already defined, you can just do `obj.field_name = null` or `obj["field_name"] = null`. I wouldn't set any value to `undefined` even though the language allows for that, simply for a semantic issue: `undefined` means "this property/variable has not been defined" and `null` means "this property/variable has no...
35,941,933
I'm working on a dynamic app in which I'm getting `CGRect` separately (x, y, width, height) values from a web service for each of the UI objects inside a view. On server, they will set frames based on following size (1080 x 1920), so lets say, if I'll get a `CGRect` with following values: (200, 20, 100, 100) then it s...
2016/03/11
[ "https://Stackoverflow.com/questions/35941933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1603234/" ]
Frame change base on the screen size and ratio iPhone 4s,5,6,6+. Here you need to change frame size by screen so here you have **"frames based on following size (1080 x 1920)"** it means you have iPhone 6+ frame now see that bellow attached image set base on **aspect ratio.** 1). iPhone 5 frame (200,20,100,100) 2). ...
I would say the frame for iPhone 6 is (234, 23, 117, 117) and iPhone 6 Plus is (258, 25, 129, 129). How I calculated? New width = (old width \* new device width) / old device width (100 \* 375) / 320 = 117 same thing for other values If using auto layouts you have to update the constraints once you receive the new...
35,941,933
I'm working on a dynamic app in which I'm getting `CGRect` separately (x, y, width, height) values from a web service for each of the UI objects inside a view. On server, they will set frames based on following size (1080 x 1920), so lets say, if I'll get a `CGRect` with following values: (200, 20, 100, 100) then it s...
2016/03/11
[ "https://Stackoverflow.com/questions/35941933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1603234/" ]
You can use these two methods to get **server** and **device** specific `CGRect`. ``` - (CGFloat) convertServerXorWidthValueToDeviceValueXorWidth:(CGFloat)sValue { CGFloat currentWidth = [UIScreen mainScreen].bounds.size.width; CGFloat value = ceilf((currentWidth * sValue) / 1080); return value; } - (CGFl...
I would say the frame for iPhone 6 is (234, 23, 117, 117) and iPhone 6 Plus is (258, 25, 129, 129). How I calculated? New width = (old width \* new device width) / old device width (100 \* 375) / 320 = 117 same thing for other values If using auto layouts you have to update the constraints once you receive the new...
559,355
self.close() is working fine in IE but not in Mozilla. Does anyone know what is the issue and how can I solve it?
2009/02/18
[ "https://Stackoverflow.com/questions/559355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/52745/" ]
Did you open the window using `window.open`? [According to the docs on window.close](https://developer.mozilla.org/En/DOM/Window.close): > > This method is only allowed to be called for windows that were opened by a script using the window.open method. If the window was not opened by a script, the following error app...
Try using `window.close()` instead.
559,355
self.close() is working fine in IE but not in Mozilla. Does anyone know what is the issue and how can I solve it?
2009/02/18
[ "https://Stackoverflow.com/questions/559355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/52745/" ]
Did you open the window using `window.open`? [According to the docs on window.close](https://developer.mozilla.org/En/DOM/Window.close): > > This method is only allowed to be called for windows that were opened by a script using the window.open method. If the window was not opened by a script, the following error app...
See my answer to [this other question](https://stackoverflow.com/questions/375406/375640#375640). You should be able to easily adapt it from ASP.NET to plain HTML. Basically, since mozilla will only let you close a window that was opened by js, you can open a new window and target \_self: ``` window.open('close.html'...
2,585,626
$$A=\begin{bmatrix}3&a&0\\0&4&1\\0&2&5\end{bmatrix}$$ Find the eigenvalues and eigenvectors and then determine for what value $a$ matrix $A$ is diagonalizable. I have found the eigenvalues: $λ\_1 = 6$ , $λ\_2 = 3$ (double root) and the eigenvectors but don't know how to find the value of $a$ to make the matrix diagon...
2017/12/30
[ "https://math.stackexchange.com/questions/2585626", "https://math.stackexchange.com", "https://math.stackexchange.com/users/383242/" ]
The matrix $A$ is diagonalisable if and only if the space of the solutions of the system$$A.\begin{bmatrix}x\\t\\z\end{bmatrix}=3\begin{bmatrix}x\\t\\z\end{bmatrix}$$has dimension $2$. So, let us consider the system$$\left\{\begin{array}{l}3x+ay=3x\\4y+z=3y\\2y+5z=3z\end{array}\right.\iff\left\{\begin{array}{l}ay=0\\y+...
The matrix $A$ is diagonalizable iff the minimal polynomial has no repeated factors. In this case, that means $A$ is diagonalizable iff the minimal polynomial is $(\lambda-6)(\lambda-3)$. Equivalently, $$ (A-6 I)(A-3I) =0, \\ \begin{bmatrix}-3&a&0\\0&-2&1\\0&2&-1\end{bmatrix} \begin{bmatrix}0&a&0\\0&1&1\\0&2&2\end{bm...
2,951,372
I am learning about exact sequences that split, in the context of modules. In this context, as I understand it, sequences that split on the left are the same as sequences that split on the right. But in non Abelian groups, is there an easy example of an exact sequence $1 \rightarrow G \rightarrow H \rightarrow K \right...
2018/10/11
[ "https://math.stackexchange.com/questions/2951372", "https://math.stackexchange.com", "https://math.stackexchange.com/users/340973/" ]
Since $t\to\sqrt{t+1}$ is concave, it follows that, for $t\in [0,1]$, $$1+(\sqrt{2}-1)t\leq \sqrt{t+1}\leq \sqrt{2}.$$ Hence $$\frac{1}{n+1}+\frac{\sqrt{2}-1}{n+2}\leq \int\_{0}^{1} t^n \sqrt{t+1} dt\leq \frac{\sqrt{2}}{n+1}.$$ It remains to show that $$ \frac{\sqrt{2}}{n+1} - \frac{1}{2n^2}\leq \frac{1}{n+1}+\frac{\s...
$$\int\_{0}^{1} t^n \sqrt{t+1} dt\leq\int\_{0}^{1} t^n \sqrt{1+1} dt=\frac{\sqrt{2}}{n+1}$$ For the left hand side, with [Beta function](https://en.wikipedia.org/wiki/Beta_function) \begin{align} \int\_{0}^{1} t^n (\sqrt{2}-\sqrt{t+1}) dt &= \int\_{0}^{1} t^n \dfrac{1-t}{\sqrt{2}+\sqrt{t+1}}\ dt \\ &\leq \dfrac12\int\_...
2,951,372
I am learning about exact sequences that split, in the context of modules. In this context, as I understand it, sequences that split on the left are the same as sequences that split on the right. But in non Abelian groups, is there an easy example of an exact sequence $1 \rightarrow G \rightarrow H \rightarrow K \right...
2018/10/11
[ "https://math.stackexchange.com/questions/2951372", "https://math.stackexchange.com", "https://math.stackexchange.com/users/340973/" ]
Since $t\to\sqrt{t+1}$ is concave, it follows that, for $t\in [0,1]$, $$1+(\sqrt{2}-1)t\leq \sqrt{t+1}\leq \sqrt{2}.$$ Hence $$\frac{1}{n+1}+\frac{\sqrt{2}-1}{n+2}\leq \int\_{0}^{1} t^n \sqrt{t+1} dt\leq \frac{\sqrt{2}}{n+1}.$$ It remains to show that $$ \frac{\sqrt{2}}{n+1} - \frac{1}{2n^2}\leq \frac{1}{n+1}+\frac{\s...
$\sqrt{t+1}$ is approximately constant on $(0,1)$, hence the following application of Cauchy-Schwarz $$ I\_n=\int\_{0}^{1}t^n\sqrt{1+t}\,dt\leq \sqrt{\int\_{0}^{1}t^{n}\,dt\int\_{0}^{1}t^n(1+t)\,dt}=\color{red}{\frac{1}{n+1}\sqrt{\frac{2n+3}{n+2}}}<\frac{\sqrt{2}}{n+1}$$ is expected to provide a tight upper bound. Ind...
53,979,619
I want to start my video at certain times of the day. This is 'script.js': ``` var player; function createPlayer() { player=new YT.Player('main-block',{ height:'400', width:'400', playerVars:{ 'rel':0, 'controls':0, 'showinfo':0, 'disable...
2018/12/30
[ "https://Stackoverflow.com/questions/53979619", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7310555/" ]
Here is the sample code : ``` data = {2165: "Money sent successfully", 2167: "Something went wrong"}; var idx = 0; var key = Object.keys(data)[idx]; var value = data[key] console.log(value); $('.currentBalance').text(value); ```
Here is the snippet: ``` for (var key in data) { if (data.hasOwnProperty(key)) { console.log(key + " -> " + data[key]); } } ```
181,153
How do I redirect this page URL, `http://localhost/wordpress_rnd/?page_id=2`, to the home URL, `http://localhost/wordpress_rnd/`, without using any plugins?
2015/03/14
[ "https://wordpress.stackexchange.com/questions/181153", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/51547/" ]
``` add_action( 'init', function() { if ( 0 === stripos( $_SERVER['REQUEST_URI'], '/page_id=2' ) ) { wp_redirect( home_url(), 301 ); exit; } } ``` Put this code in a mu-plugin or in your theme's functions.php file
Locate page.php (assuming you've created it already). After this line `<?php get_header(); ?>` add the following code: ``` <?php if(is_page('2')) { wp_redirect( home_url(), '302' ); } ?> ``` In the code above, `is_page('2')` is actually the ID of your page as you've specified in your example.
181,153
How do I redirect this page URL, `http://localhost/wordpress_rnd/?page_id=2`, to the home URL, `http://localhost/wordpress_rnd/`, without using any plugins?
2015/03/14
[ "https://wordpress.stackexchange.com/questions/181153", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/51547/" ]
The correct way to do this is using the [`template_redirect`](https://codex.wordpress.org/Plugin_API/Action_Reference/template_redirect) hook by adding a function to your `functions.php`: ``` function redirect_to_home() { if(!is_admin() && is_page('2')) { wp_redirect(home_url()); exit(); } } add_action('te...
Locate page.php (assuming you've created it already). After this line `<?php get_header(); ?>` add the following code: ``` <?php if(is_page('2')) { wp_redirect( home_url(), '302' ); } ?> ``` In the code above, `is_page('2')` is actually the ID of your page as you've specified in your example.
181,153
How do I redirect this page URL, `http://localhost/wordpress_rnd/?page_id=2`, to the home URL, `http://localhost/wordpress_rnd/`, without using any plugins?
2015/03/14
[ "https://wordpress.stackexchange.com/questions/181153", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/51547/" ]
``` add_action( 'init', function() { if ( 0 === stripos( $_SERVER['REQUEST_URI'], '/page_id=2' ) ) { wp_redirect( home_url(), 301 ); exit; } } ``` Put this code in a mu-plugin or in your theme's functions.php file
[WP\_REDIRECT](http://codex.wordpress.org/Function_Reference/wp_redirect) is the function that you need to use for redirecting in wordpress. It can be used like : ``` wp_redirect( $location, $status ); exit; //$location is required parameter. It is used to give the target url to which page will get redirected. //$stat...
181,153
How do I redirect this page URL, `http://localhost/wordpress_rnd/?page_id=2`, to the home URL, `http://localhost/wordpress_rnd/`, without using any plugins?
2015/03/14
[ "https://wordpress.stackexchange.com/questions/181153", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/51547/" ]
The correct way to do this is using the [`template_redirect`](https://codex.wordpress.org/Plugin_API/Action_Reference/template_redirect) hook by adding a function to your `functions.php`: ``` function redirect_to_home() { if(!is_admin() && is_page('2')) { wp_redirect(home_url()); exit(); } } add_action('te...
``` add_action( 'init', function() { if ( 0 === stripos( $_SERVER['REQUEST_URI'], '/page_id=2' ) ) { wp_redirect( home_url(), 301 ); exit; } } ``` Put this code in a mu-plugin or in your theme's functions.php file
181,153
How do I redirect this page URL, `http://localhost/wordpress_rnd/?page_id=2`, to the home URL, `http://localhost/wordpress_rnd/`, without using any plugins?
2015/03/14
[ "https://wordpress.stackexchange.com/questions/181153", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/51547/" ]
The correct way to do this is using the [`template_redirect`](https://codex.wordpress.org/Plugin_API/Action_Reference/template_redirect) hook by adding a function to your `functions.php`: ``` function redirect_to_home() { if(!is_admin() && is_page('2')) { wp_redirect(home_url()); exit(); } } add_action('te...
[WP\_REDIRECT](http://codex.wordpress.org/Function_Reference/wp_redirect) is the function that you need to use for redirecting in wordpress. It can be used like : ``` wp_redirect( $location, $status ); exit; //$location is required parameter. It is used to give the target url to which page will get redirected. //$stat...
46,199,236
I used a DownloadManager class like that but the problem is that for large file I have a wrong size 65536KB instead of 51328022 bytes. There are something wrong in the saveDisk method. ps: I used Qt 5.6 cuz I need to run the app on Windows Vista & XP ``` bool DownloadManager::saveToDisk(const QString &filename, QIODe...
2017/09/13
[ "https://Stackoverflow.com/questions/46199236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7998081/" ]
You need to actually run the migrations on Heroku once you have pushed the code generated by `makemigrations`. You do this via `heroku run manage.py migrate`.
run the following command from your terminal ``` heroku run python manage.py migrate ``` or you can also do: in your local `settings.py`, change your `DATABASES` variable to use the heroku one then run from the terminal ``` python manage.py makemigrations python manage.py migrate ``` but you should not normally ...
12,053,099
I have form: ``` <form id="form1" class="f_class"> <input type="button" class="jq-button" value="jq-button"/> </form> ``` And js code: ``` var f=document.getElementById("form1"); f.addEventListener("submit", function(){alert("addEventListener_submit");},false); $(".jq-button").click(function(){$("#form1").submit();...
2012/08/21
[ "https://Stackoverflow.com/questions/12053099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/886455/" ]
just correct it to: `<input type="submit" class="jq-button" value="jq-button"/>`
$().submit() triggers the jquery submit event and not the eventlisterner. I would have written it with jQuery all of the binding of events like: ``` var f = $("#form1"); f.on("submit", function() { // on requires jquery 1.7+ alert("submit"); }); $(".jq-button").on("click", (function(e) { $(this).closest("form"...
171,965
I travelled from outside of Europe to Madrid, Spain via Frankfurt, Germany. As my first point of entry into the Schengen area was Germany my immigration was done there. I had initially planned to stay for 22 days and I told the same to the immigration official. My visa-free stamp says the number 22 next to the date. H...
2022/01/30
[ "https://travel.stackexchange.com/questions/171965", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/126408/" ]
Schengen stamps do not show a period of admission. They show only the date of the border crossing. Schengen border officers do not grant a period of admission -- this is controlled only by the terms of the visa in combination with the 90/180 rule, or, for a visa-free visit, by the 90/180 rule alone. If the number 22 i...
No, that's not the purpose of the entry stamp. There is no record of your initial conversation and no system to track or enforce the purpose or planned length of stay of visa-free visitors (visa applications, on the other hand, are documented in a database). The main things that should be checked when you exit the Sche...
36,074,539
``` filename = 'SOMETHING'; eval(['load ' filename]); eval(['load ' filename '_vid1']) vid123=permute(vid,[2 1 3]); size(vid) eval(['load ' filename '_vid2']) vid123(:,:,(size(vid123,3)+1):(size(vid123,3)+size(vid,3)))=permute(vid,[2 1 3]); size(vid) ``` I know it has to do with loading a file and finding other fil...
2016/03/18
[ "https://Stackoverflow.com/questions/36074539", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4191983/" ]
Carrying on from Daniel's answer, your question is stemming from the fact that you don't quite know how `permute` works. The goal of [`permute`](http://www.mathworks.com/help/matlab/ref/permute.html) is to rearrange the dimensions of a matrix but leave the size of the matrix intact. You specify the matrix you want to "...
Just to rewrite the 7th line how it should be rewritten: ``` vid123=cat(3,vid123,permute(vid,[2 1 3]) ``` It concatenates both variables among the 3rd dimension. In case you intend to understand the original line, just put the end statement wherever it should be used and it is suddenly much more readable: ``` vid12...
33,275,320
I'm currently looking into how best to use the parallel step in a Jenkins Workflow script and am just looking to clarify my understanding of how this works. ``` parallel(firstTask: { node { // Do some stuff } }, secondTask: { node { // Do some other stuff } }) ``` In this case would ea...
2015/10/22
[ "https://Stackoverflow.com/questions/33275320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3617723/" ]
> > If I didn't have the node blocks would the task still run concurrently? > > > Yes, this: ``` parallel(firstTask: { // Do some stuff }, secondTask: { // Do some other stuff }) ``` will run non-sequential. For instance with the **Build Flow** plugin: ``` build("job 1") parallel ( {buil...
Try this, [link](http://devops-jenkins.blogspot.in) You can also run parallel jobs with passing parameters. example: ``` parallel ( {build("job 1", param1:"value1",param2:"value2")} {build("job 2",param1:"value1")} ) ```
16,353
> > (1.1)She turned up at the doorstep of my house in Cornwall. (1.2)No > way could I have sent her away. (1.3)No way, not me anyway. (1.4)Maybe > someone had kicked her out of their car the night before. (1.5)"We're > moving house." (1.6)"No space for her any more with the baby coming." > (1.7)"We never really wanted...
2014/01/24
[ "https://ell.stackexchange.com/questions/16353", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/2065/" ]
It means "around her." Usually we use about to mean "related to," and I don't recommend using it for "around" (to me it sounds dated and pretentious except in some specific expressions including this author's "she had an air of *\_* about her" where it is metaphorical, and the expression "around and about.")
Usage: ------ This is an adaptable cliche (occasionally called a [snowclone](https://en.wikipedia.org/wiki/Snowclone)): > > **X** have an air of **Y** about them > > > **X** should be a pronoun, noun, or noun phrase *(examples: "she", "Bob", "the jury deliberations")*. **Y** should be a nominal form of an adjec...
2,282,609
I want to add different buttons, vertically stacked, to a `JPanel` at run-time and use a `JScrollPane` so that all buttons will be visible (with some scrolling). In order to do this, I have added my `JPanel` to a `JScrollPane`, after which I add buttons to my `JPanel`. However, when I do this the vertical scrollbar d...
2010/02/17
[ "https://Stackoverflow.com/questions/2282609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/275416/" ]
Create the panel and scrollpane like: ``` JPanel panel = new JPanel(); JScrollPane scrollPane = new JScrollPane( panel ); ``` When you add buttons to the panel at run time the code should be: ``` panel.add( button ); panel.revalidate(); ``` As long as you are using a layout manager the preferred size will be reca...
Make scroll pane a wrapper over your panel - `new JScrollPane (myPanel)` and add it instead of naked panel in your panel's container. You also may want to play with its `setPreferredSize()` method.
1,976,069
Please, help me to identify problem in my C# code(WPF, event-handler): ``` private void Discount5Btn_Click(object sender, RoutedEventArgs e) { decimal catPr; decimal salePr; string catPrStr; catPrStr = PriceCatTBox.Text; catPr = decimal.Parse(catPrStr); saleP...
2009/12/29
[ "https://Stackoverflow.com/questions/1976069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/199722/" ]
> > And am I right in such an approach to > string-decimal conversion for > arithmetic operation? > > > I would set up two way binding with a model to store your decimal values. This will allow you to access them directly instead of parsing strings. This will also solve your error.
We can't help you because we don't know the value of `catPrStr`, you are converting from `String` to `Decimal` and most likely the value of the string being converted is incorrect.
1,976,069
Please, help me to identify problem in my C# code(WPF, event-handler): ``` private void Discount5Btn_Click(object sender, RoutedEventArgs e) { decimal catPr; decimal salePr; string catPrStr; catPrStr = PriceCatTBox.Text; catPr = decimal.Parse(catPrStr); saleP...
2009/12/29
[ "https://Stackoverflow.com/questions/1976069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/199722/" ]
Are you sure your culture (locale) settings aren't interfering? If `catPrStr` is always in the invariant culture shown in your edited question, you could use `decimal.TryParse(catPrStr, CultureInfo.InvariantCulture);` to force the usage of that culture. If the culture isn't specified, parsing is done in the current sys...
We can't help you because we don't know the value of `catPrStr`, you are converting from `String` to `Decimal` and most likely the value of the string being converted is incorrect.
1,976,069
Please, help me to identify problem in my C# code(WPF, event-handler): ``` private void Discount5Btn_Click(object sender, RoutedEventArgs e) { decimal catPr; decimal salePr; string catPrStr; catPrStr = PriceCatTBox.Text; catPr = decimal.Parse(catPrStr); saleP...
2009/12/29
[ "https://Stackoverflow.com/questions/1976069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/199722/" ]
> > And am I right in such an approach to > string-decimal conversion for > arithmetic operation? > > > I would set up two way binding with a model to store your decimal values. This will allow you to access them directly instead of parsing strings. This will also solve your error.
`decimal.TryParse(catPrStr, out catPr);` and handle the bool return from it to ensure that you have a reasonable value to process.
1,976,069
Please, help me to identify problem in my C# code(WPF, event-handler): ``` private void Discount5Btn_Click(object sender, RoutedEventArgs e) { decimal catPr; decimal salePr; string catPrStr; catPrStr = PriceCatTBox.Text; catPr = decimal.Parse(catPrStr); saleP...
2009/12/29
[ "https://Stackoverflow.com/questions/1976069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/199722/" ]
Are you sure your culture (locale) settings aren't interfering? If `catPrStr` is always in the invariant culture shown in your edited question, you could use `decimal.TryParse(catPrStr, CultureInfo.InvariantCulture);` to force the usage of that culture. If the culture isn't specified, parsing is done in the current sys...
`decimal.TryParse(catPrStr, out catPr);` and handle the bool return from it to ensure that you have a reasonable value to process.
1,976,069
Please, help me to identify problem in my C# code(WPF, event-handler): ``` private void Discount5Btn_Click(object sender, RoutedEventArgs e) { decimal catPr; decimal salePr; string catPrStr; catPrStr = PriceCatTBox.Text; catPr = decimal.Parse(catPrStr); saleP...
2009/12/29
[ "https://Stackoverflow.com/questions/1976069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/199722/" ]
Are you sure your culture (locale) settings aren't interfering? If `catPrStr` is always in the invariant culture shown in your edited question, you could use `decimal.TryParse(catPrStr, CultureInfo.InvariantCulture);` to force the usage of that culture. If the culture isn't specified, parsing is done in the current sys...
> > And am I right in such an approach to > string-decimal conversion for > arithmetic operation? > > > I would set up two way binding with a model to store your decimal values. This will allow you to access them directly instead of parsing strings. This will also solve your error.
2,113,138
I'm sure that these terms should be different since there exists a difference between parameter and argument in computer science but I'm not sure about their differences in math.
2017/01/25
[ "https://math.stackexchange.com/questions/2113138", "https://math.stackexchange.com", "https://math.stackexchange.com/users/110995/" ]
**[Variables](http://mathworld.wolfram.com/Variable.html) :** A variable is a quantity that may change within the context of a mathematical problem or experiment. Typically, we use a single letter to represent a variable. The letters $~x,~ y~$ and $~z~$ are common generic symbols used for variables. Sometimes, we will ...
Consider family of functions $\{f\_a : a\in [0,1]\}$, where $f\_a:\mathbb{R}\rightarrow \mathbb{R}$ is given by $$f\_a(x)=x^2 - a.$$ When you take some $x\in \mathbb{R}$, this is a variable. This variable becomes an argument for function $f\_1$ if you begin to consider $f\_1(x)$. In this expression, $1$ is a parameter....
36,451,650
I tried modifying the vibration pattern with the build hint android.pushVibratePattern = 1000 and did not have any luck. Thank you all in advance!
2016/04/06
[ "https://Stackoverflow.com/questions/36451650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5869384/" ]
As specified by the [`maven-assembly-plugin`](http://maven.apache.org/plugins/maven-assembly-plugin/) documentation: > > If your project wants to package your artifact in an uber-jar, the assembly plugin provides only basic support. For more control, use the **Maven Shade Plugin**. > > > --- Using the [`maven-sh...
Also encountered this issue, my need was to filter out resource files of the same name from dependency modules, solution like below: ``` <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.3</version> <executions>...
63,040,124
I Have this object: ```py myObj = [{'city':'New York', 'number': 5550}, {'city':'San Francisco', 'number': 0565}] ``` How could I use list comprehension to store only the `_city_` attribute in the list below: ```py my_new_list = [ HERE THE LIST COMPREHENSION ] ``` Output should be: "New York", "San Francisco"
2020/07/22
[ "https://Stackoverflow.com/questions/63040124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Try this: ``` my_new_list = [item['city'] for item in myObj] ``` The item value would be `{'city':'New York', 'number': 5550}` the first time and `{'city':'San Francisco', 'number': 0565}` the second time. Since these are dictionaries, we can use item['city'] to access the city value from each dictionary.
Here you go: ```py my_new_list = [row['city'] for row in myObj] ``` value ```py ['New York', 'San Francisco'] ```
67,349,007
The problem is that when entering a route that does not exist the does not work, this only happens when I separate the / login and / register routes in another component, is there any way to solve it? Thanks for reading AppRouter.js ``` import React from 'react' import { BrowserRouter as Router, Route, Sw...
2021/05/01
[ "https://Stackoverflow.com/questions/67349007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12733261/" ]
TLDR; The user will have the permissions of both groups, with any deny permission taking precedence over any allow permission. Longer answer. Users in multiple groups will get all the permissions of the combined permissions for the two groups. Permissions in AWS start with no permissions and each permission added gra...
It will be Group1 LOGICAL\_AND Group2, intersection of all the policies. E.g. Group1 allows the user to launch an instance in any region, whereas Group2 allows the user to launch an instance only in eu-west-2. Now there are two scenarios, : [Scenario-1] if Group2 does not have a deny policy, then the user will be ab...
60,449,675
I am trying to remove all the labels from an mplfinance plot. Using empty spaces on y axis still leaves the scaling label and I can't seem to reove the x labeling at all. Appreciate if anyone knew how to do this. Trying to achieve: ![Trying to achieve](https://i.stack.imgur.com/MrqxH.png) Current: ![Current](http...
2020/02/28
[ "https://Stackoverflow.com/questions/60449675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7715795/" ]
The latest version of mplfinance (0.12.5a3) has a new kwarg `axisoff=True` will remove all labels and axis lines.
It depends on what is the code. You can try: ``` plt.set_xlabel("") ``` or could you please provide an example, that will be really helpful. Thanks
6,352,190
I have 2 tables. I need to check before insertion in one table if the value exist in other table.
2011/06/15
[ "https://Stackoverflow.com/questions/6352190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/194076/" ]
IF NOT EXISTS ( SELECT \* FROM TableA WHERE Col1 = @Value) INSERT INTO TableB(Col1) SELECT @Value
Using an [INSERT trigger](http://www.google.com/search?q=SQL+Server+insert+trigger) perhaps? I'm not very sure about the syntax. ``` CREATE TRIGGER InsertTableTrigger ON Table1 FOR INSERT AS BEGIN IF EXISTS ( SELECT 1 FROM Inserted i JOIN Table1 t ON i.key = t.key ) BEGIN RAISERROR('Transaction Fai...
6,352,190
I have 2 tables. I need to check before insertion in one table if the value exist in other table.
2011/06/15
[ "https://Stackoverflow.com/questions/6352190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/194076/" ]
I suggest that, you should first check the records that is going to be inserted in each request. ``` Create Proc Testing as Set NoCount ON Set XACT_ABORT ON Begin Try Begin Tran IF Not Exists(SELECT 1 FROM Table2 i JOIN Table1 t ON i.key = t.key) Begin //Your insert statement END Commit Tra...
Using an [INSERT trigger](http://www.google.com/search?q=SQL+Server+insert+trigger) perhaps? I'm not very sure about the syntax. ``` CREATE TRIGGER InsertTableTrigger ON Table1 FOR INSERT AS BEGIN IF EXISTS ( SELECT 1 FROM Inserted i JOIN Table1 t ON i.key = t.key ) BEGIN RAISERROR('Transaction Fai...
6,352,190
I have 2 tables. I need to check before insertion in one table if the value exist in other table.
2011/06/15
[ "https://Stackoverflow.com/questions/6352190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/194076/" ]
I suggest that, you should first check the records that is going to be inserted in each request. ``` Create Proc Testing as Set NoCount ON Set XACT_ABORT ON Begin Try Begin Tran IF Not Exists(SELECT 1 FROM Table2 i JOIN Table1 t ON i.key = t.key) Begin //Your insert statement END Commit Tra...
IF NOT EXISTS ( SELECT \* FROM TableA WHERE Col1 = @Value) INSERT INTO TableB(Col1) SELECT @Value
170,697
I'm changing my site to show friendly URLs like this: ``` www.example.com/folder/topic ``` Works fine! But when I add a parameter to the URL: ``` www.example.com/folder/topic?page=2 ``` `$_GET` stops working. It doesn't recognise the parameter at all. Am I missing something? The parameter worked fine before usin...
2008/10/04
[ "https://Stackoverflow.com/questions/170697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If you are using mod\_rewrite then it is your rules that are broken. Either the query string is not being passed, or the mod\_rewrite is discarding everything past **/topic**. Try adding a rule that you can do: **www.example.com/folder/topic/2**
If you want to make your PHP URLs "friendly" you need to use something like Apache's mod\_rewrite. Google something like "apache mod\_write friendly url" and you will get plenty of articles on the subject.
170,697
I'm changing my site to show friendly URLs like this: ``` www.example.com/folder/topic ``` Works fine! But when I add a parameter to the URL: ``` www.example.com/folder/topic?page=2 ``` `$_GET` stops working. It doesn't recognise the parameter at all. Am I missing something? The parameter worked fine before usin...
2008/10/04
[ "https://Stackoverflow.com/questions/170697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If it's a mod\_rewrite problem, which it sounds like, you could add the `[QSA]` flag to your mod\_rewrite rule, to append the query string to the rewritten URL instead of throwing it away. Your rule will end up looking like: `RewriteRule from to [QSA]`
If you are using mod\_rewrite then it is your rules that are broken. Either the query string is not being passed, or the mod\_rewrite is discarding everything past **/topic**. Try adding a rule that you can do: **www.example.com/folder/topic/2**
170,697
I'm changing my site to show friendly URLs like this: ``` www.example.com/folder/topic ``` Works fine! But when I add a parameter to the URL: ``` www.example.com/folder/topic?page=2 ``` `$_GET` stops working. It doesn't recognise the parameter at all. Am I missing something? The parameter worked fine before usin...
2008/10/04
[ "https://Stackoverflow.com/questions/170697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If you are using mod\_rewrite then it is your rules that are broken. Either the query string is not being passed, or the mod\_rewrite is discarding everything past **/topic**. Try adding a rule that you can do: **www.example.com/folder/topic/2**
> > I'm changing my site to show friendly URLs > > > Are you doing this using [mod\_rewrite](http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html) or by reorganising your file structure? If the former, it's likely that your rules may need tweaking. If it's a file re-organisation, what do you get when you `print_...
170,697
I'm changing my site to show friendly URLs like this: ``` www.example.com/folder/topic ``` Works fine! But when I add a parameter to the URL: ``` www.example.com/folder/topic?page=2 ``` `$_GET` stops working. It doesn't recognise the parameter at all. Am I missing something? The parameter worked fine before usin...
2008/10/04
[ "https://Stackoverflow.com/questions/170697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If you are using mod\_rewrite then it is your rules that are broken. Either the query string is not being passed, or the mod\_rewrite is discarding everything past **/topic**. Try adding a rule that you can do: **www.example.com/folder/topic/2**
MrZebra's answer is the correct one. It will allow you to continue to use query string as you do at the end of a URL, and you don't have to anticipate its presence one way or the other.
170,697
I'm changing my site to show friendly URLs like this: ``` www.example.com/folder/topic ``` Works fine! But when I add a parameter to the URL: ``` www.example.com/folder/topic?page=2 ``` `$_GET` stops working. It doesn't recognise the parameter at all. Am I missing something? The parameter worked fine before usin...
2008/10/04
[ "https://Stackoverflow.com/questions/170697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If it's a mod\_rewrite problem, which it sounds like, you could add the `[QSA]` flag to your mod\_rewrite rule, to append the query string to the rewritten URL instead of throwing it away. Your rule will end up looking like: `RewriteRule from to [QSA]`
If you want to make your PHP URLs "friendly" you need to use something like Apache's mod\_rewrite. Google something like "apache mod\_write friendly url" and you will get plenty of articles on the subject.
170,697
I'm changing my site to show friendly URLs like this: ``` www.example.com/folder/topic ``` Works fine! But when I add a parameter to the URL: ``` www.example.com/folder/topic?page=2 ``` `$_GET` stops working. It doesn't recognise the parameter at all. Am I missing something? The parameter worked fine before usin...
2008/10/04
[ "https://Stackoverflow.com/questions/170697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If it's a mod\_rewrite problem, which it sounds like, you could add the `[QSA]` flag to your mod\_rewrite rule, to append the query string to the rewritten URL instead of throwing it away. Your rule will end up looking like: `RewriteRule from to [QSA]`
> > I'm changing my site to show friendly URLs > > > Are you doing this using [mod\_rewrite](http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html) or by reorganising your file structure? If the former, it's likely that your rules may need tweaking. If it's a file re-organisation, what do you get when you `print_...
170,697
I'm changing my site to show friendly URLs like this: ``` www.example.com/folder/topic ``` Works fine! But when I add a parameter to the URL: ``` www.example.com/folder/topic?page=2 ``` `$_GET` stops working. It doesn't recognise the parameter at all. Am I missing something? The parameter worked fine before usin...
2008/10/04
[ "https://Stackoverflow.com/questions/170697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If it's a mod\_rewrite problem, which it sounds like, you could add the `[QSA]` flag to your mod\_rewrite rule, to append the query string to the rewritten URL instead of throwing it away. Your rule will end up looking like: `RewriteRule from to [QSA]`
MrZebra's answer is the correct one. It will allow you to continue to use query string as you do at the end of a URL, and you don't have to anticipate its presence one way or the other.
313,896
I'm building a model which predicts the GDP(Quarterly) of my country. I've lots of time-series predictors(~50(Monthly), all continuous, e.g. Index of Industrial Production, etc.) but my dataset size is small(~120). I've tried using ARIMA(5,1,0) on GDP values: [![enter image description here](https://i.stack.imgur.com/f...
2017/11/15
[ "https://stats.stackexchange.com/questions/313896", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/184863/" ]
Your focal time series and the "predictors" are interrelated. You might as well want to forecast the Index of Industrial Production, using GDP as a "predictor". The classical approach to such a problem is [Vector Autoregression (VAR)](https://en.wikipedia.org/wiki/Vector_autoregression), which models - and forecasts -...
it appears to me that the error variance changed deterministically at two points in time . See <http://docplayer.net/12080848-Outliers-level-shifts-and-variance-changes-in-time-series.html> . I was responsible for seamlessly integrating this along with Intervention Detection into a commercial package that I helped to d...
313,896
I'm building a model which predicts the GDP(Quarterly) of my country. I've lots of time-series predictors(~50(Monthly), all continuous, e.g. Index of Industrial Production, etc.) but my dataset size is small(~120). I've tried using ARIMA(5,1,0) on GDP values: [![enter image description here](https://i.stack.imgur.com/f...
2017/11/15
[ "https://stats.stackexchange.com/questions/313896", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/184863/" ]
There is a lot of literature on nowcasting in general, and GDP in particular. For instance, check [GDPNow page](https://www.frbatlanta.org/cqer/research/gdpnow.aspx) on FRB Atlanta's web site, where the model description is given too. Below is their 2017 Q4 GPD forecast. As you know the GDP number release will be some ...
it appears to me that the error variance changed deterministically at two points in time . See <http://docplayer.net/12080848-Outliers-level-shifts-and-variance-changes-in-time-series.html> . I was responsible for seamlessly integrating this along with Intervention Detection into a commercial package that I helped to d...
313,896
I'm building a model which predicts the GDP(Quarterly) of my country. I've lots of time-series predictors(~50(Monthly), all continuous, e.g. Index of Industrial Production, etc.) but my dataset size is small(~120). I've tried using ARIMA(5,1,0) on GDP values: [![enter image description here](https://i.stack.imgur.com/f...
2017/11/15
[ "https://stats.stackexchange.com/questions/313896", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/184863/" ]
Your focal time series and the "predictors" are interrelated. You might as well want to forecast the Index of Industrial Production, using GDP as a "predictor". The classical approach to such a problem is [Vector Autoregression (VAR)](https://en.wikipedia.org/wiki/Vector_autoregression), which models - and forecasts -...
There is a lot of literature on nowcasting in general, and GDP in particular. For instance, check [GDPNow page](https://www.frbatlanta.org/cqer/research/gdpnow.aspx) on FRB Atlanta's web site, where the model description is given too. Below is their 2017 Q4 GPD forecast. As you know the GDP number release will be some ...
38,969,535
I’m currently facing a very strange problem in a Twig template (Symfony v2.8.9; Twig v1.24.1). The basic outline is: I’m trying to overwrite a block in a child template when a specific condition is met. Here’s a snippet of my template: ``` {% extends "@App/search/resultList.html.twig" %} {% if category.teaser %} ...
2016/08/16
[ "https://Stackoverflow.com/questions/38969535", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6528882/" ]
As far as I know, it is not possible to conditionally override a block in twig, see also **[How can I conditionally override a TWIG layout block?](https://stackoverflow.com/questions/14738772/how-can-i-conditionally-override-a-twig-layout-block)**
You have done the best practice by testing whether the variable is null or not. In many other languages you can’t do something on a null. You can use the `dump()` function to check your variables.
36,886,708
I just created a new database connection from Oracle SQL Developer called `BATCHINSERT`. But when I try to `tnsping` it I get the following error. ``` TNS Ping Utility for 64-bit Windows: Version 11.2.0.2.0 - Production on 27-APR-2016 15:28:37 Copyright (c) 1997, 2014, Oracle. All rights reserved. Used paramet...
2016/04/27
[ "https://Stackoverflow.com/questions/36886708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3440963/" ]
Your `sqlnet.ora` sets a default domain name of `WORLD`, so your `tnsnames` entry needs to have that too: ``` BatchInsert.WORLD= (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = XE) )) ``` You should then be able to `tnsping` and connect using...
SQL Developer doesn't by default read SQLNet.ORA Easy fix, in Preferences, point to the directory for your TNSNames files. [![tns directory sql developer preferences](https://i.stack.imgur.com/FekuQ.png)](https://i.stack.imgur.com/FekuQ.png) If you enable THICK Driver connections and have your $ORACLE\_HOME os var s...
50,112,493
I am new to Laravel and have just started learning about views, routes, migrations, etc. I tried to include the Font Awesome CSS library using the `link` statement, but that didn't work. I found an answer on Stack Overflow that used npm but got an error running `npm run dev` that was marked as the solved answer. I also...
2018/05/01
[ "https://Stackoverflow.com/questions/50112493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
`a: ?string` is a [Maybe type](https://flow.org/en/docs/types/primitives/#toc-maybe-types) - actually `string | null | void` in this case. `a?: string` is an [optional property](https://flow.org/en/docs/types/primitives/#toc-optional-object-properties)/[paramerter](https://flow.org/en/docs/types/primitives/#toc-option...
`a?: string` is an [optional parameter](https://flow.org/en/docs/types/functions/#optional-parameters-). From the docs: > > Optional parameters will accept missing, `undefined`, or matching types. But they will not accept `null`. > > > `a: ?string` is a [maybe type](https://flow.org/en/docs/types/maybe/). From th...
3,487,061
I am looking for examples of pseudocode problems that you may have been asked in an interview or been asked to represent as part of your job or education. I'm not looking for examples from any domain in particular, so it can be related to design patterns, algorithms, data structures, caching strategies, anything to do ...
2010/08/15
[ "https://Stackoverflow.com/questions/3487061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/389236/" ]
I haven't been asked it yet, but there is the classic FizzBuzz question. > > Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". > > >...
I have not myself ever been asked to write pseudo-code in an interview (still a student), but a friend of mine who applied to Google for a summer job was asked to write a regexp parser that could deal with a subset of regexps (iirc, alphanumeric input only and using the \*, + and {x,y} notation). I'm considering applyi...
3,487,061
I am looking for examples of pseudocode problems that you may have been asked in an interview or been asked to represent as part of your job or education. I'm not looking for examples from any domain in particular, so it can be related to design patterns, algorithms, data structures, caching strategies, anything to do ...
2010/08/15
[ "https://Stackoverflow.com/questions/3487061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/389236/" ]
I was asked to write a pseudo-code solution for this during an interview for an internship a few years ago: **Write an algorithm that, given a directory path, can count the total number of files that fall under that directory and all subdirectories.** Being able to solve this demonstrates an understanding of tree tra...
I have not myself ever been asked to write pseudo-code in an interview (still a student), but a friend of mine who applied to Google for a summer job was asked to write a regexp parser that could deal with a subset of regexps (iirc, alphanumeric input only and using the \*, + and {x,y} notation). I'm considering applyi...
3,487,061
I am looking for examples of pseudocode problems that you may have been asked in an interview or been asked to represent as part of your job or education. I'm not looking for examples from any domain in particular, so it can be related to design patterns, algorithms, data structures, caching strategies, anything to do ...
2010/08/15
[ "https://Stackoverflow.com/questions/3487061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/389236/" ]
I have not myself ever been asked to write pseudo-code in an interview (still a student), but a friend of mine who applied to Google for a summer job was asked to write a regexp parser that could deal with a subset of regexps (iirc, alphanumeric input only and using the \*, + and {x,y} notation). I'm considering applyi...
It took me a long time to figure it out, but here's my Excel VBA solution to the sentence reversing problem. ``` Public Sub SentenceReverse() Dim InSentence As String 'Input sentence string Dim OutSentence As String 'Output sentence string Dim p As Integer 'Word Start Dim q As Integer 'Word length p = 1 InSentence ...
3,487,061
I am looking for examples of pseudocode problems that you may have been asked in an interview or been asked to represent as part of your job or education. I'm not looking for examples from any domain in particular, so it can be related to design patterns, algorithms, data structures, caching strategies, anything to do ...
2010/08/15
[ "https://Stackoverflow.com/questions/3487061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/389236/" ]
I have not myself ever been asked to write pseudo-code in an interview (still a student), but a friend of mine who applied to Google for a summer job was asked to write a regexp parser that could deal with a subset of regexps (iirc, alphanumeric input only and using the \*, + and {x,y} notation). I'm considering applyi...
I don't know if this is the most elegant approach, but here's a solution to find the word that occurs most often. Here's how I approached it. 1. Find the number of words by looping through the sentence and increment a word count variable if you find a space or you reach the end of the sentence. Create a word array of ...
3,487,061
I am looking for examples of pseudocode problems that you may have been asked in an interview or been asked to represent as part of your job or education. I'm not looking for examples from any domain in particular, so it can be related to design patterns, algorithms, data structures, caching strategies, anything to do ...
2010/08/15
[ "https://Stackoverflow.com/questions/3487061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/389236/" ]
I haven't been asked it yet, but there is the classic FizzBuzz question. > > Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". > > >...
It took me a long time to figure it out, but here's my Excel VBA solution to the sentence reversing problem. ``` Public Sub SentenceReverse() Dim InSentence As String 'Input sentence string Dim OutSentence As String 'Output sentence string Dim p As Integer 'Word Start Dim q As Integer 'Word length p = 1 InSentence ...
3,487,061
I am looking for examples of pseudocode problems that you may have been asked in an interview or been asked to represent as part of your job or education. I'm not looking for examples from any domain in particular, so it can be related to design patterns, algorithms, data structures, caching strategies, anything to do ...
2010/08/15
[ "https://Stackoverflow.com/questions/3487061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/389236/" ]
I haven't been asked it yet, but there is the classic FizzBuzz question. > > Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". > > >...
I don't know if this is the most elegant approach, but here's a solution to find the word that occurs most often. Here's how I approached it. 1. Find the number of words by looping through the sentence and increment a word count variable if you find a space or you reach the end of the sentence. Create a word array of ...
3,487,061
I am looking for examples of pseudocode problems that you may have been asked in an interview or been asked to represent as part of your job or education. I'm not looking for examples from any domain in particular, so it can be related to design patterns, algorithms, data structures, caching strategies, anything to do ...
2010/08/15
[ "https://Stackoverflow.com/questions/3487061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/389236/" ]
I was asked to write a pseudo-code solution for this during an interview for an internship a few years ago: **Write an algorithm that, given a directory path, can count the total number of files that fall under that directory and all subdirectories.** Being able to solve this demonstrates an understanding of tree tra...
It took me a long time to figure it out, but here's my Excel VBA solution to the sentence reversing problem. ``` Public Sub SentenceReverse() Dim InSentence As String 'Input sentence string Dim OutSentence As String 'Output sentence string Dim p As Integer 'Word Start Dim q As Integer 'Word length p = 1 InSentence ...
3,487,061
I am looking for examples of pseudocode problems that you may have been asked in an interview or been asked to represent as part of your job or education. I'm not looking for examples from any domain in particular, so it can be related to design patterns, algorithms, data structures, caching strategies, anything to do ...
2010/08/15
[ "https://Stackoverflow.com/questions/3487061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/389236/" ]
I was asked to write a pseudo-code solution for this during an interview for an internship a few years ago: **Write an algorithm that, given a directory path, can count the total number of files that fall under that directory and all subdirectories.** Being able to solve this demonstrates an understanding of tree tra...
I don't know if this is the most elegant approach, but here's a solution to find the word that occurs most often. Here's how I approached it. 1. Find the number of words by looping through the sentence and increment a word count variable if you find a space or you reach the end of the sentence. Create a word array of ...
510,420
How can I write to parallel port through Windows XP command line?
2009/02/04
[ "https://Stackoverflow.com/questions/510420", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13440/" ]
Looking at your reply to Zoredache, your real problem is not output to the parallel port, that's trivial. Your real problem is how to get a 0xff character on stdout. This is possible with a trivial `.com` executable which invokes the relevant soft interrupt, but to be honest it's probably easier to create a file with ...
Back in the DOS days we would frequently use a command like **type filename.txt > lpt1** to print our text files.
660,162
I need some help on the following problem: > > Given that a curve $\mathbf r:I\to \Bbb R ^3$ has constant curvature $k(s)=k$, for all $s$, and constant torsion $\tau(s)=\tau$, for all $s$. Find the curve $\mathbf r$. > > > I only know that, according to the fundamental theorem, this curve exists and is unique. ...
2014/02/02
[ "https://math.stackexchange.com/questions/660162", "https://math.stackexchange.com", "https://math.stackexchange.com/users/40071/" ]
Hint: set $r=\kappa/(\kappa^2+\tau^2)$, $h=\tau/(\kappa^2+\tau^2)$. Let $s$ be the arc-length function of $\mathbf r$ with $s(t\_0)=0$ and define $\phi(t)=s(t)/\sqrt{r^2+h^2}$. We want to construct an orthonormal basis ($a\_1$, $a\_2$, $a\_3$) and a point $p\_0$ such that $$\mathbf r(t)=p\_0+r\bigl(\cos(t)a\_1+\sin(t)...
To find the arc-parameterization $\mathbf{r}=\mathbf{r}(s)$ you must resolve $$\frac{\mathbf{r}'\cdot \mathbf{r}''\times \mathbf{r}'''}{\|\mathbf{r}''^2\|}=\tau,$$ $$\|\mathbf{r}'(s)\|=1,$$ $$\|\mathbf{r}''(s)\|=k,$$ for some injective differential map $\mathbf{r}:I\hookrightarrow{\Bbb{R}}^3$ over some open interval ...
660,162
I need some help on the following problem: > > Given that a curve $\mathbf r:I\to \Bbb R ^3$ has constant curvature $k(s)=k$, for all $s$, and constant torsion $\tau(s)=\tau$, for all $s$. Find the curve $\mathbf r$. > > > I only know that, according to the fundamental theorem, this curve exists and is unique. ...
2014/02/02
[ "https://math.stackexchange.com/questions/660162", "https://math.stackexchange.com", "https://math.stackexchange.com/users/40071/" ]
Hint: set $r=\kappa/(\kappa^2+\tau^2)$, $h=\tau/(\kappa^2+\tau^2)$. Let $s$ be the arc-length function of $\mathbf r$ with $s(t\_0)=0$ and define $\phi(t)=s(t)/\sqrt{r^2+h^2}$. We want to construct an orthonormal basis ($a\_1$, $a\_2$, $a\_3$) and a point $p\_0$ such that $$\mathbf r(t)=p\_0+r\bigl(\cos(t)a\_1+\sin(t)...
Central line u = 0 of helicoid surface $ (u \cos t, u \sin t , c t) $ treated as a stand alone space curve has zero curvature and constant torsion.
38,321,791
I am looking for way how to add new objects to existing queryset, or how to implement what I want by other way. `contact = watson.filter(contacts, searchline)` This line returns queryset, which I later use to iterate. Then I want to do this to add more objects, which watson couldn't find ``` contact_in_iteration = ...
2016/07/12
[ "https://Stackoverflow.com/questions/38321791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4248765/" ]
You can use | and Q lookups. See [the docs](https://docs.djangoproject.com/en/1.9/topics/db/queries/#complex-lookups-with-q-objects). I'm not sure I've fully understood your initial query, but I think that in your case you would want to do: ``` query = Q(contacts='Foo', searchline='Bar') contact = watson.filter(query...
You should look at a queryset as a sql query that will be executed later. When constructing a queryset and save the result in a variable, you can later filter it even more, but you can not expand it. If you need a query that has more particular rules (like, you need an OR operation) you should state that when you are c...
122,229
An x in $\mathbb{R}^n$ is said to be sparse if many of it's coefficients are zeroes. x is said to be compressible(approximately sparse) if many of its coefficients are close to zero.ie Let $x=(x\_1,x\_2,....x\_n)$. Sort the absolute values of the coefficients in decreasing order with new indices as $|x\_{(1)}|\geq|x\_{...
2012/03/19
[ "https://math.stackexchange.com/questions/122229", "https://math.stackexchange.com", "https://math.stackexchange.com/users/27226/" ]
Definition is correct. $C$ is defined for *any* vector $x$, so you can't first choose $x$ and after that C. You can say that $x$ is $C,r$-compressible (or not) for fixed $C$ and $r$.
The definition looks just like the rule for determining convergent series. Using the ratio test, you can tell if a sequence of roots converges. As I recall, $\frac{1}{x}$ doesn't converge to zero. Rational values of $r$ don't converge quickly, $\frac{1}{\sqrt{x}}$, I wouldn't bet any money that's a sparse system. Are y...
137,727
I am trying to implement a kind of random walk, where at each step there are three "coin tosses" (random numbers used to determine whether or not an event takes place. the three functions are: ``` f = If[RandomReal[] < LR, # + 1, #] & g = If[RandomReal[] < OBR, # - 1, #] & h = If[RandomReal[] < beta*#*(# - 1) && # > 1...
2017/02/13
[ "https://mathematica.stackexchange.com/questions/137727", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/46598/" ]
Since you do not provide working code, I will make up a set of three functions the do work. I believe they are similar enough in form, if not in detail, for you adapt my code to your application. ``` walk3D[n_, start_] := Module[{p1, p2, p3}, p1 = .5; p2 = .3; p3 = .7; NestList[ Through[ {If[#2...
I recommend using `SetDelayed` instead of `Set` to generate different values for `RandomReal[]` each time the code is executed. namely: ``` f := If[RandomReal[] < LR, # + 1, #] & (* notice := instead of = *) g := If[RandomReal[] < OBR, # - 1, #] & h := If[RandomReal[] < beta*#*(# - 1) && # > 1, # - 2, #] & ``` so t...
34,823,210
I am not sure if I would make any sense in asking this but I have a model: ``` function update_profile_image($id, $image, $data){ $data1=array('profile_thumb'=> $data['images_urls'][$index]); $this->db->where('property_ref_id',$id); $this->db->update('vbc_property_images',$data1); } ``` Here $data is an ...
2016/01/16
[ "https://Stackoverflow.com/questions/34823210", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5626549/" ]
You can loop on the array to get the key of the image ``` foreach($data['images_urls'] as $key => $value) { if($value == $image) { $index = $key; break; } } ``` Alternative solution is to use `array_search()` ``` $index = array_search($image, $data['images_urls']); ```
If I understand your question correctly, you want to search `$data` for the value defined in `$image`, and return the key of the matching element. If so, [array\_search](http://php.net/manual/en/function.array-search.php) is what you need. `$key = array_search($image, $data);` Description from manpage: > > Searches...
37,276,534
This is probably quite trivial but I can't get it to work (linq level novice). I want to group and sum the rows for a client that fall on the same day (The date is shown in epoc/unixtime). At the moment its just showing the max as 21 (converted from Kbytes to Gbytes), and not ±26 which is what I want to see. How do ...
2016/05/17
[ "https://Stackoverflow.com/questions/37276534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5489893/" ]
In your second `printf` you have `temp.a` which is not what you want. If you change it to `temp.a.a` it will work as expected.
You can define a union with many members, but only one member can contain a value at any given time. In union you have to store in any data member and then access it using same data member. If you want to access from different data member then store it before accessing using that member. See the example below. ``` ...
37,276,534
This is probably quite trivial but I can't get it to work (linq level novice). I want to group and sum the rows for a client that fall on the same day (The date is shown in epoc/unixtime). At the moment its just showing the max as 21 (converted from Kbytes to Gbytes), and not ±26 which is what I want to see. How do ...
2016/05/17
[ "https://Stackoverflow.com/questions/37276534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5489893/" ]
What does the program do at the second printf ? ``` printf("add : 0x%x 0x%x \n",temp.a,temp.arr[0]); ``` First the arguments are pushed on the stack. Apparently the first argument to be pushed is temp.arr[0], then temp.a is pushed. So your stack will contain the entire temp.a variable ie : 3,'a' followed by temp...
You can define a union with many members, but only one member can contain a value at any given time. In union you have to store in any data member and then access it using same data member. If you want to access from different data member then store it before accessing using that member. See the example below. ``` ...
37,276,534
This is probably quite trivial but I can't get it to work (linq level novice). I want to group and sum the rows for a client that fall on the same day (The date is shown in epoc/unixtime). At the moment its just showing the max as 21 (converted from Kbytes to Gbytes), and not ±26 which is what I want to see. How do ...
2016/05/17
[ "https://Stackoverflow.com/questions/37276534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5489893/" ]
In your second `printf` you have `temp.a` which is not what you want. If you change it to `temp.a.a` it will work as expected.
In the below line first two format specifiers were consumed by the temp.a.a and temp.a.b because you are passing the whole structure variable not an individual member. ``` printf("add : 0x%x 0x%x \n",temp.a,temp.arr[0]); ``` So there is no format specifier left for temp.arr[0] to print its value to console. You sho...
37,276,534
This is probably quite trivial but I can't get it to work (linq level novice). I want to group and sum the rows for a client that fall on the same day (The date is shown in epoc/unixtime). At the moment its just showing the max as 21 (converted from Kbytes to Gbytes), and not ±26 which is what I want to see. How do ...
2016/05/17
[ "https://Stackoverflow.com/questions/37276534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5489893/" ]
What does the program do at the second printf ? ``` printf("add : 0x%x 0x%x \n",temp.a,temp.arr[0]); ``` First the arguments are pushed on the stack. Apparently the first argument to be pushed is temp.arr[0], then temp.a is pushed. So your stack will contain the entire temp.a variable ie : 3,'a' followed by temp...
In the below line first two format specifiers were consumed by the temp.a.a and temp.a.b because you are passing the whole structure variable not an individual member. ``` printf("add : 0x%x 0x%x \n",temp.a,temp.arr[0]); ``` So there is no format specifier left for temp.arr[0] to print its value to console. You sho...
17,941,812
In the JSON output, there is a field "maneuver" within a "step". In this "turn-left", "turn-right", "turn-slight-left", etc. Example is [here](http://maps.googleapis.com/maps/api/directions/json?origin=acton,ca&destination=burbank,cA&sensor=false&departure_time=1343605500&mode=bicycling) Where could I find the definit...
2013/07/30
[ "https://Stackoverflow.com/questions/17941812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2633218/" ]
**UPD** Believe it or not, but finally they documented it! Please [see here](https://developers.google.com/maps/documentation/directions/intro#Steps). --- according to [this gmaps-api-issue](https://code.google.com/p/gmaps-api-issues/issues/detail?id=4297&q=apitype=DirectionsAPI&colspec=ID%20Type%20Status%20Introduc...
when you use directions service, google maps inject some css in your `<head>` As of 2015/jun, I've got this code below. It seems google only downloads what it needs to show the directions, so, your results may vary. Background-image file at the bottom: ``` .adp-substep .adp-stepicon .adp-maneuver { backgroun...
17,941,812
In the JSON output, there is a field "maneuver" within a "step". In this "turn-left", "turn-right", "turn-slight-left", etc. Example is [here](http://maps.googleapis.com/maps/api/directions/json?origin=acton,ca&destination=burbank,cA&sensor=false&departure_time=1343605500&mode=bicycling) Where could I find the definit...
2013/07/30
[ "https://Stackoverflow.com/questions/17941812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2633218/" ]
**UPD** Believe it or not, but finally they documented it! Please [see here](https://developers.google.com/maps/documentation/directions/intro#Steps). --- according to [this gmaps-api-issue](https://code.google.com/p/gmaps-api-issues/issues/detail?id=4297&q=apitype=DirectionsAPI&colspec=ID%20Type%20Status%20Introduc...
Maneuver contains the action to take for the current step (turn left, merge, straight, etc.). This field is used to determine which icon to display, and can contain one of the following values: turn-slight-left, turn-sharp-left, uturn-left, turn-left, turn-slight-right, turn-sharp-right, uturn-right, turn-right, straig...
17,941,812
In the JSON output, there is a field "maneuver" within a "step". In this "turn-left", "turn-right", "turn-slight-left", etc. Example is [here](http://maps.googleapis.com/maps/api/directions/json?origin=acton,ca&destination=burbank,cA&sensor=false&departure_time=1343605500&mode=bicycling) Where could I find the definit...
2013/07/30
[ "https://Stackoverflow.com/questions/17941812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2633218/" ]
**UPD** Believe it or not, but finally they documented it! Please [see here](https://developers.google.com/maps/documentation/directions/intro#Steps). --- according to [this gmaps-api-issue](https://code.google.com/p/gmaps-api-issues/issues/detail?id=4297&q=apitype=DirectionsAPI&colspec=ID%20Type%20Status%20Introduc...
Just take a look on their SDK <https://github.com/googlemaps/google-maps-services-js/blob/master/src/common.ts> line 1132 ``` export enum Maneuver { turn_slight_left = "turn-slight-left", turn_sharp_left = "turn-sharp-left", uturn_left = "uturn-left", turn_left = "turn-left", turn_slight_right = "...
17,941,812
In the JSON output, there is a field "maneuver" within a "step". In this "turn-left", "turn-right", "turn-slight-left", etc. Example is [here](http://maps.googleapis.com/maps/api/directions/json?origin=acton,ca&destination=burbank,cA&sensor=false&departure_time=1343605500&mode=bicycling) Where could I find the definit...
2013/07/30
[ "https://Stackoverflow.com/questions/17941812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2633218/" ]
Here is a visual for the lazy ones :) Can't believe Google did not document this yet... **maneuver** contains the action to take for the current step (turn left, merge, straight, etc.). This field is used to determine which icon to display, and can contain one of the following values: ![Google Maps Direction API - ...
when you use directions service, google maps inject some css in your `<head>` As of 2015/jun, I've got this code below. It seems google only downloads what it needs to show the directions, so, your results may vary. Background-image file at the bottom: ``` .adp-substep .adp-stepicon .adp-maneuver { backgroun...
17,941,812
In the JSON output, there is a field "maneuver" within a "step". In this "turn-left", "turn-right", "turn-slight-left", etc. Example is [here](http://maps.googleapis.com/maps/api/directions/json?origin=acton,ca&destination=burbank,cA&sensor=false&departure_time=1343605500&mode=bicycling) Where could I find the definit...
2013/07/30
[ "https://Stackoverflow.com/questions/17941812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2633218/" ]
Here is a visual for the lazy ones :) Can't believe Google did not document this yet... **maneuver** contains the action to take for the current step (turn left, merge, straight, etc.). This field is used to determine which icon to display, and can contain one of the following values: ![Google Maps Direction API - ...
Maneuver contains the action to take for the current step (turn left, merge, straight, etc.). This field is used to determine which icon to display, and can contain one of the following values: turn-slight-left, turn-sharp-left, uturn-left, turn-left, turn-slight-right, turn-sharp-right, uturn-right, turn-right, straig...
17,941,812
In the JSON output, there is a field "maneuver" within a "step". In this "turn-left", "turn-right", "turn-slight-left", etc. Example is [here](http://maps.googleapis.com/maps/api/directions/json?origin=acton,ca&destination=burbank,cA&sensor=false&departure_time=1343605500&mode=bicycling) Where could I find the definit...
2013/07/30
[ "https://Stackoverflow.com/questions/17941812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2633218/" ]
Here is a visual for the lazy ones :) Can't believe Google did not document this yet... **maneuver** contains the action to take for the current step (turn left, merge, straight, etc.). This field is used to determine which icon to display, and can contain one of the following values: ![Google Maps Direction API - ...
Just take a look on their SDK <https://github.com/googlemaps/google-maps-services-js/blob/master/src/common.ts> line 1132 ``` export enum Maneuver { turn_slight_left = "turn-slight-left", turn_sharp_left = "turn-sharp-left", uturn_left = "uturn-left", turn_left = "turn-left", turn_slight_right = "...
17,941,812
In the JSON output, there is a field "maneuver" within a "step". In this "turn-left", "turn-right", "turn-slight-left", etc. Example is [here](http://maps.googleapis.com/maps/api/directions/json?origin=acton,ca&destination=burbank,cA&sensor=false&departure_time=1343605500&mode=bicycling) Where could I find the definit...
2013/07/30
[ "https://Stackoverflow.com/questions/17941812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2633218/" ]
when you use directions service, google maps inject some css in your `<head>` As of 2015/jun, I've got this code below. It seems google only downloads what it needs to show the directions, so, your results may vary. Background-image file at the bottom: ``` .adp-substep .adp-stepicon .adp-maneuver { backgroun...
Maneuver contains the action to take for the current step (turn left, merge, straight, etc.). This field is used to determine which icon to display, and can contain one of the following values: turn-slight-left, turn-sharp-left, uturn-left, turn-left, turn-slight-right, turn-sharp-right, uturn-right, turn-right, straig...
17,941,812
In the JSON output, there is a field "maneuver" within a "step". In this "turn-left", "turn-right", "turn-slight-left", etc. Example is [here](http://maps.googleapis.com/maps/api/directions/json?origin=acton,ca&destination=burbank,cA&sensor=false&departure_time=1343605500&mode=bicycling) Where could I find the definit...
2013/07/30
[ "https://Stackoverflow.com/questions/17941812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2633218/" ]
when you use directions service, google maps inject some css in your `<head>` As of 2015/jun, I've got this code below. It seems google only downloads what it needs to show the directions, so, your results may vary. Background-image file at the bottom: ``` .adp-substep .adp-stepicon .adp-maneuver { backgroun...
Just take a look on their SDK <https://github.com/googlemaps/google-maps-services-js/blob/master/src/common.ts> line 1132 ``` export enum Maneuver { turn_slight_left = "turn-slight-left", turn_sharp_left = "turn-sharp-left", uturn_left = "uturn-left", turn_left = "turn-left", turn_slight_right = "...
17,941,812
In the JSON output, there is a field "maneuver" within a "step". In this "turn-left", "turn-right", "turn-slight-left", etc. Example is [here](http://maps.googleapis.com/maps/api/directions/json?origin=acton,ca&destination=burbank,cA&sensor=false&departure_time=1343605500&mode=bicycling) Where could I find the definit...
2013/07/30
[ "https://Stackoverflow.com/questions/17941812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2633218/" ]
Just take a look on their SDK <https://github.com/googlemaps/google-maps-services-js/blob/master/src/common.ts> line 1132 ``` export enum Maneuver { turn_slight_left = "turn-slight-left", turn_sharp_left = "turn-sharp-left", uturn_left = "uturn-left", turn_left = "turn-left", turn_slight_right = "...
Maneuver contains the action to take for the current step (turn left, merge, straight, etc.). This field is used to determine which icon to display, and can contain one of the following values: turn-slight-left, turn-sharp-left, uturn-left, turn-left, turn-slight-right, turn-sharp-right, uturn-right, turn-right, straig...
58,242,916
Why am I getting this error? ```none Cannot read property 'target' of undefined at btn ``` I declare `btn()` in my html file. I have multiples buttons in the html invoking `btn()`. ``` function btn(event){ var theTarget = event.target; alert(theTarget.tagName); } ```
2019/10/04
[ "https://Stackoverflow.com/questions/58242916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5689051/" ]
Suggests that the `event` parameter has not been set (i.e. is undefined) when the `btn(...)` method was called. You should verify that `event` is set whenever the code tries to use that method. It might also be safer to not use `event` as the parameter name in your function - this might cause problems (i.e. it's [app...
Note: When we call the function from the HTML we get the button directly i.e. the `target`. With binding we get `event` ```js function btn(event){ var theTarget = event.target || event; alert(theTarget.tagName); } document.querySelector('#boundEvent').onclick = btn; ``` ```html <!-- In this way...