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
15,397,138
I am using jQuery [Isotope](http://isotope.metafizzy.co/). It's a great plugin but I'm having a little issue with aligning the items in masonry mode. My container is 960px wide and my goal is to get 4 items to line up perfectly as if it were using the 960px grid system. So, both the left and right edges would be touchi...
2013/03/13
[ "https://Stackoverflow.com/questions/15397138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You probably need to change the `DataSource.DataSet` instead: ``` procedure SetDataFromDataSet(const aDataSource: TDataSource; const aNewDataSet: TDataSet); begin aDataSource.DataSet.Close; aDataSource.DataSet := aNewDataSet; if not aNewDataSet.Active then aNewDataSet.Open; end; ``` Sample use: ``` SetD...
The secret lies in: DBGrid1.DataSource.Enabled:=False; ...making changes... DBGrid1.DataSource.Enabled:=True; Tested with D5Pro
15,397,138
I am using jQuery [Isotope](http://isotope.metafizzy.co/). It's a great plugin but I'm having a little issue with aligning the items in masonry mode. My container is 960px wide and my goal is to get 4 items to line up perfectly as if it were using the 960px grid system. So, both the left and right edges would be touchi...
2013/03/13
[ "https://Stackoverflow.com/questions/15397138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can change the Dataset shown by a DBGrid quite easily at runtime quite easily. There two approaches: 1: use a single DataSource assigned to DBGrid.DataSource and change the DataSource.DataSet to the desired DataSet. Here is a simple example with all assignments made at runtime. ``` procedure TForm1.FormCreate(Sen...
Tested with Delphi5 pro. ``` procedure TForm1.setDataSourceDataSet(var newDataSource:TDataSource); begin if DBgrid1.DataSource = nil then begin DBgrid1.DataSource:=newDataSource; end else begin if DBgrid1.DataSource.Name = newDataSource.Name then exit; DBGrid1.DataSource.Enabled:=False; DBgrid1.DataSource:=newDataS...
15,397,138
I am using jQuery [Isotope](http://isotope.metafizzy.co/). It's a great plugin but I'm having a little issue with aligning the items in masonry mode. My container is 960px wide and my goal is to get 4 items to line up perfectly as if it were using the 960px grid system. So, both the left and right edges would be touchi...
2013/03/13
[ "https://Stackoverflow.com/questions/15397138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can change the Dataset shown by a DBGrid quite easily at runtime quite easily. There two approaches: 1: use a single DataSource assigned to DBGrid.DataSource and change the DataSource.DataSet to the desired DataSet. Here is a simple example with all assignments made at runtime. ``` procedure TForm1.FormCreate(Sen...
The secret lies in: DBGrid1.DataSource.Enabled:=False; ...making changes... DBGrid1.DataSource.Enabled:=True; Tested with D5Pro
15,397,138
I am using jQuery [Isotope](http://isotope.metafizzy.co/). It's a great plugin but I'm having a little issue with aligning the items in masonry mode. My container is 960px wide and my goal is to get 4 items to line up perfectly as if it were using the 960px grid system. So, both the left and right edges would be touchi...
2013/03/13
[ "https://Stackoverflow.com/questions/15397138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Tested with Delphi5 pro. ``` procedure TForm1.setDataSourceDataSet(var newDataSource:TDataSource); begin if DBgrid1.DataSource = nil then begin DBgrid1.DataSource:=newDataSource; end else begin if DBgrid1.DataSource.Name = newDataSource.Name then exit; DBGrid1.DataSource.Enabled:=False; DBgrid1.DataSource:=newDataS...
The secret lies in: DBGrid1.DataSource.Enabled:=False; ...making changes... DBGrid1.DataSource.Enabled:=True; Tested with D5Pro
53,057,207
I'm successfully to install mecab-python3, but I get an error on import. ``` !import mecab --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-32-71af23e59d14> in <module>() ----> 1 import mecab ModuleNo...
2018/10/30
[ "https://Stackoverflow.com/questions/53057207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3762307/" ]
Going off the instructions here: <https://pypi.org/project/mecab-python3/> You'll need a few prereqs: ``` !apt-get install mecab mecab-ipadic-utf8 libmecab-dev swig ``` Then, ``` !pip install mecab-python3==0.8.0 ``` Here's a full notebook example: <https://colab.research.google.com/drive/1Ofq1kyVhLuGW2WFDbGVuk...
I'm the mecab-python3 maintainer. It looks like your problem is that the module is not `mecab` but `MeCab` - note the capitalization. Note that since v0.996.1, released slightly after this question was asked, you do not need to install any prerequisites. Also version 0.8 is no longer available. You'll also need to i...
47,149,658
I found the question [Where HDFS stores files locally by default?](https://stackoverflow.com/questions/2358402/where-hdfs-stores-files-locally-by-default). My HDFS store data in /tmp/ folder which is deleted by system. I want to change **where HDFS stores files locally** . I am looking in hdfs-default.xml but canno...
2017/11/07
[ "https://Stackoverflow.com/questions/47149658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5250620/" ]
Thank @ultimoTG for a hint. So, my solution is find the file name `hdfs-default.xml` (this file is reference only, change config here **NOT WORK**) in my hadoop directory. ``` $HADOOP_HOME/share/doc/hadoop/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml ``` Then, I copy the line I want to change from `hdfs-def...
Look for `dfs.datanode.data.dir`. Docs here - <http://hadoop.apache.org/docs/r2.8.2/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml>
47,149,658
I found the question [Where HDFS stores files locally by default?](https://stackoverflow.com/questions/2358402/where-hdfs-stores-files-locally-by-default). My HDFS store data in /tmp/ folder which is deleted by system. I want to change **where HDFS stores files locally** . I am looking in hdfs-default.xml but canno...
2017/11/07
[ "https://Stackoverflow.com/questions/47149658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5250620/" ]
Look for `dfs.datanode.data.dir`. Docs here - <http://hadoop.apache.org/docs/r2.8.2/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml>
When you first extracted your hadoop, hdfs-site.xml is present in $HADOOP\_HOME/etc/hadoop and is empty by default. You can add the following configuration to your hdfs-site.xml to change your local store location: ``` <property> <name>dfs.data.dir</name> <value>path_to_dir</value> </property> <proper...
47,149,658
I found the question [Where HDFS stores files locally by default?](https://stackoverflow.com/questions/2358402/where-hdfs-stores-files-locally-by-default). My HDFS store data in /tmp/ folder which is deleted by system. I want to change **where HDFS stores files locally** . I am looking in hdfs-default.xml but canno...
2017/11/07
[ "https://Stackoverflow.com/questions/47149658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5250620/" ]
Thank @ultimoTG for a hint. So, my solution is find the file name `hdfs-default.xml` (this file is reference only, change config here **NOT WORK**) in my hadoop directory. ``` $HADOOP_HOME/share/doc/hadoop/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml ``` Then, I copy the line I want to change from `hdfs-def...
When you first extracted your hadoop, hdfs-site.xml is present in $HADOOP\_HOME/etc/hadoop and is empty by default. You can add the following configuration to your hdfs-site.xml to change your local store location: ``` <property> <name>dfs.data.dir</name> <value>path_to_dir</value> </property> <proper...
570,261
I'm trying to create a Vagrant base box following the 2 resources here: * <http://docs-v1.vagrantup.com/v1/docs/base_boxes.html> * <https://github.com/fespinoza/checklist_and_guides/wiki/Creating-a-vagrant-base-box-for-ubuntu-12.04-32bit-server> Using Ubuntu 12.10 (with LAMP) as the OS, I have 1 problem. I couldn't p...
2013/03/23
[ "https://superuser.com/questions/570261", "https://superuser.com", "https://superuser.com/users/96853/" ]
I think this source can help : <http://docs-v1.vagrantup.com/v1/docs/host_only_networking.html> good luck ;)
What worked for me was [enabling bridged networking](https://www.vagrantup.com/docs/networking/public_network.html#dhcp) in the `Vagrantfile`: ``` Vagrant.configure("2") do |config| config.vm.network "public_network" end ```
570,261
I'm trying to create a Vagrant base box following the 2 resources here: * <http://docs-v1.vagrantup.com/v1/docs/base_boxes.html> * <https://github.com/fespinoza/checklist_and_guides/wiki/Creating-a-vagrant-base-box-for-ubuntu-12.04-32bit-server> Using Ubuntu 12.10 (with LAMP) as the OS, I have 1 problem. I couldn't p...
2013/03/23
[ "https://superuser.com/questions/570261", "https://superuser.com", "https://superuser.com/users/96853/" ]
You can't just access a Vagrant box with its IP address from the host system. Vagrant's networking is meant to define an abstraction layer that works across multiple providers. The easiest way to access services on your Vagrant box is to configure port forwarding. In your Vagrantfile, see the section *Vagrant.configur...
I think this source can help : <http://docs-v1.vagrantup.com/v1/docs/host_only_networking.html> good luck ;)
570,261
I'm trying to create a Vagrant base box following the 2 resources here: * <http://docs-v1.vagrantup.com/v1/docs/base_boxes.html> * <https://github.com/fespinoza/checklist_and_guides/wiki/Creating-a-vagrant-base-box-for-ubuntu-12.04-32bit-server> Using Ubuntu 12.10 (with LAMP) as the OS, I have 1 problem. I couldn't p...
2013/03/23
[ "https://superuser.com/questions/570261", "https://superuser.com", "https://superuser.com/users/96853/" ]
You can't just access a Vagrant box with its IP address from the host system. Vagrant's networking is meant to define an abstraction layer that works across multiple providers. The easiest way to access services on your Vagrant box is to configure port forwarding. In your Vagrantfile, see the section *Vagrant.configur...
I had a similar issue, just with the private network setup and the static IP. The IP address I used for months (`192.168.10.10`) was suddenly unreachable, although I was able to access the virtual machine with `vagrant ssh`. Changing the static IP to `192.168.10.192` solved the problem. The solution here was to change...
570,261
I'm trying to create a Vagrant base box following the 2 resources here: * <http://docs-v1.vagrantup.com/v1/docs/base_boxes.html> * <https://github.com/fespinoza/checklist_and_guides/wiki/Creating-a-vagrant-base-box-for-ubuntu-12.04-32bit-server> Using Ubuntu 12.10 (with LAMP) as the OS, I have 1 problem. I couldn't p...
2013/03/23
[ "https://superuser.com/questions/570261", "https://superuser.com", "https://superuser.com/users/96853/" ]
You can't just access a Vagrant box with its IP address from the host system. Vagrant's networking is meant to define an abstraction layer that works across multiple providers. The easiest way to access services on your Vagrant box is to configure port forwarding. In your Vagrantfile, see the section *Vagrant.configur...
I had to manually start the network on my host-system as `ip addr` showed it was DOWN: ``` sudo ip link set up dev vboxnet0 ```
570,261
I'm trying to create a Vagrant base box following the 2 resources here: * <http://docs-v1.vagrantup.com/v1/docs/base_boxes.html> * <https://github.com/fespinoza/checklist_and_guides/wiki/Creating-a-vagrant-base-box-for-ubuntu-12.04-32bit-server> Using Ubuntu 12.10 (with LAMP) as the OS, I have 1 problem. I couldn't p...
2013/03/23
[ "https://superuser.com/questions/570261", "https://superuser.com", "https://superuser.com/users/96853/" ]
I had a similar issue, just with the private network setup and the static IP. The IP address I used for months (`192.168.10.10`) was suddenly unreachable, although I was able to access the virtual machine with `vagrant ssh`. Changing the static IP to `192.168.10.192` solved the problem. The solution here was to change...
I think this source can help : <http://docs-v1.vagrantup.com/v1/docs/host_only_networking.html> good luck ;)
570,261
I'm trying to create a Vagrant base box following the 2 resources here: * <http://docs-v1.vagrantup.com/v1/docs/base_boxes.html> * <https://github.com/fespinoza/checklist_and_guides/wiki/Creating-a-vagrant-base-box-for-ubuntu-12.04-32bit-server> Using Ubuntu 12.10 (with LAMP) as the OS, I have 1 problem. I couldn't p...
2013/03/23
[ "https://superuser.com/questions/570261", "https://superuser.com", "https://superuser.com/users/96853/" ]
What worked for me was [enabling bridged networking](https://www.vagrantup.com/docs/networking/public_network.html#dhcp) in the `Vagrantfile`: ``` Vagrant.configure("2") do |config| config.vm.network "public_network" end ```
on Ubuntu 12 host/Ubuntu 12 guest the following worked for me with discourse I add host IP determined by vagrant and guest IP determined by Vagrant to firewall exceptions
570,261
I'm trying to create a Vagrant base box following the 2 resources here: * <http://docs-v1.vagrantup.com/v1/docs/base_boxes.html> * <https://github.com/fespinoza/checklist_and_guides/wiki/Creating-a-vagrant-base-box-for-ubuntu-12.04-32bit-server> Using Ubuntu 12.10 (with LAMP) as the OS, I have 1 problem. I couldn't p...
2013/03/23
[ "https://superuser.com/questions/570261", "https://superuser.com", "https://superuser.com/users/96853/" ]
I found the solution here: <http://docs.vagrantup.com/v2/getting-started/networking.html> I just needed to set up port forwarding.
on Ubuntu 12 host/Ubuntu 12 guest the following worked for me with discourse I add host IP determined by vagrant and guest IP determined by Vagrant to firewall exceptions
570,261
I'm trying to create a Vagrant base box following the 2 resources here: * <http://docs-v1.vagrantup.com/v1/docs/base_boxes.html> * <https://github.com/fespinoza/checklist_and_guides/wiki/Creating-a-vagrant-base-box-for-ubuntu-12.04-32bit-server> Using Ubuntu 12.10 (with LAMP) as the OS, I have 1 problem. I couldn't p...
2013/03/23
[ "https://superuser.com/questions/570261", "https://superuser.com", "https://superuser.com/users/96853/" ]
I found the solution here: <http://docs.vagrantup.com/v2/getting-started/networking.html> I just needed to set up port forwarding.
I think this source can help : <http://docs-v1.vagrantup.com/v1/docs/host_only_networking.html> good luck ;)
570,261
I'm trying to create a Vagrant base box following the 2 resources here: * <http://docs-v1.vagrantup.com/v1/docs/base_boxes.html> * <https://github.com/fespinoza/checklist_and_guides/wiki/Creating-a-vagrant-base-box-for-ubuntu-12.04-32bit-server> Using Ubuntu 12.10 (with LAMP) as the OS, I have 1 problem. I couldn't p...
2013/03/23
[ "https://superuser.com/questions/570261", "https://superuser.com", "https://superuser.com/users/96853/" ]
You can't just access a Vagrant box with its IP address from the host system. Vagrant's networking is meant to define an abstraction layer that works across multiple providers. The easiest way to access services on your Vagrant box is to configure port forwarding. In your Vagrantfile, see the section *Vagrant.configur...
What worked for me was [enabling bridged networking](https://www.vagrantup.com/docs/networking/public_network.html#dhcp) in the `Vagrantfile`: ``` Vagrant.configure("2") do |config| config.vm.network "public_network" end ```
570,261
I'm trying to create a Vagrant base box following the 2 resources here: * <http://docs-v1.vagrantup.com/v1/docs/base_boxes.html> * <https://github.com/fespinoza/checklist_and_guides/wiki/Creating-a-vagrant-base-box-for-ubuntu-12.04-32bit-server> Using Ubuntu 12.10 (with LAMP) as the OS, I have 1 problem. I couldn't p...
2013/03/23
[ "https://superuser.com/questions/570261", "https://superuser.com", "https://superuser.com/users/96853/" ]
You can't just access a Vagrant box with its IP address from the host system. Vagrant's networking is meant to define an abstraction layer that works across multiple providers. The easiest way to access services on your Vagrant box is to configure port forwarding. In your Vagrantfile, see the section *Vagrant.configur...
on Ubuntu 12 host/Ubuntu 12 guest the following worked for me with discourse I add host IP determined by vagrant and guest IP determined by Vagrant to firewall exceptions
4,031,262
I have two lists List that I need to combine in third list and remove duplicate values from that lists A bit hard to explain, so let me show an example of what the code looks like and what I want as a result, in sample I use int type not ResultAnalysisFileSql class. first\_list = [1, 12, 12, 5] second\_list = [12, 5...
2010/10/27
[ "https://Stackoverflow.com/questions/4031262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/206730/" ]
Have you had a look at [Enumerable.Union](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.union) > > **This method excludes duplicates from the return set**. This is different > behavior to the Concat > method, which returns all the elements > in the input sequences including > duplicates. > > >...
why not simply eg ``` var newList = list1.Union(list2)/*.Distinct()*//*.ToList()*/; ``` oh ... according to [the documentation](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.union) you can leave out the `.Distinct()` > > This method excludes duplicates from > the return set > > >
4,031,262
I have two lists List that I need to combine in third list and remove duplicate values from that lists A bit hard to explain, so let me show an example of what the code looks like and what I want as a result, in sample I use int type not ResultAnalysisFileSql class. first\_list = [1, 12, 12, 5] second\_list = [12, 5...
2010/10/27
[ "https://Stackoverflow.com/questions/4031262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/206730/" ]
Have you had a look at [Enumerable.Union](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.union) > > **This method excludes duplicates from the return set**. This is different > behavior to the Concat > method, which returns all the elements > in the input sequences including > duplicates. > > >...
Use Linq's Union: ``` using System.Linq; var l1 = new List<int>() { 1,2,3,4,5 }; var l2 = new List<int>() { 3,5,6,7,8 }; var l3 = l1.Union(l2).ToList(); ```
4,031,262
I have two lists List that I need to combine in third list and remove duplicate values from that lists A bit hard to explain, so let me show an example of what the code looks like and what I want as a result, in sample I use int type not ResultAnalysisFileSql class. first\_list = [1, 12, 12, 5] second\_list = [12, 5...
2010/10/27
[ "https://Stackoverflow.com/questions/4031262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/206730/" ]
Have you had a look at [Enumerable.Union](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.union) > > **This method excludes duplicates from the return set**. This is different > behavior to the Concat > method, which returns all the elements > in the input sequences including > duplicates. > > >...
``` List<int> first_list = new List<int>() { 1, 12, 12, 5 }; List<int> second_list = new List<int>() { 12, 5, 7, 9, 1 }; var result = first_list.Union(second_list); ```
4,031,262
I have two lists List that I need to combine in third list and remove duplicate values from that lists A bit hard to explain, so let me show an example of what the code looks like and what I want as a result, in sample I use int type not ResultAnalysisFileSql class. first\_list = [1, 12, 12, 5] second\_list = [12, 5...
2010/10/27
[ "https://Stackoverflow.com/questions/4031262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/206730/" ]
Have you had a look at [Enumerable.Union](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.union) > > **This method excludes duplicates from the return set**. This is different > behavior to the Concat > method, which returns all the elements > in the input sequences including > duplicates. > > >...
Union has not good performance : this [article](http://alicebobandmallory.com/articles/2012/10/18/merge-collections-without-duplicates-in-c) describe about compare them with together ``` var dict = list2.ToDictionary(p => p.Number); foreach (var person in list1) { dict[person.Number] = person; } var merged = d...
4,031,262
I have two lists List that I need to combine in third list and remove duplicate values from that lists A bit hard to explain, so let me show an example of what the code looks like and what I want as a result, in sample I use int type not ResultAnalysisFileSql class. first\_list = [1, 12, 12, 5] second\_list = [12, 5...
2010/10/27
[ "https://Stackoverflow.com/questions/4031262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/206730/" ]
why not simply eg ``` var newList = list1.Union(list2)/*.Distinct()*//*.ToList()*/; ``` oh ... according to [the documentation](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.union) you can leave out the `.Distinct()` > > This method excludes duplicates from > the return set > > >
Use Linq's Union: ``` using System.Linq; var l1 = new List<int>() { 1,2,3,4,5 }; var l2 = new List<int>() { 3,5,6,7,8 }; var l3 = l1.Union(l2).ToList(); ```
4,031,262
I have two lists List that I need to combine in third list and remove duplicate values from that lists A bit hard to explain, so let me show an example of what the code looks like and what I want as a result, in sample I use int type not ResultAnalysisFileSql class. first\_list = [1, 12, 12, 5] second\_list = [12, 5...
2010/10/27
[ "https://Stackoverflow.com/questions/4031262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/206730/" ]
why not simply eg ``` var newList = list1.Union(list2)/*.Distinct()*//*.ToList()*/; ``` oh ... according to [the documentation](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.union) you can leave out the `.Distinct()` > > This method excludes duplicates from > the return set > > >
``` List<int> first_list = new List<int>() { 1, 12, 12, 5 }; List<int> second_list = new List<int>() { 12, 5, 7, 9, 1 }; var result = first_list.Union(second_list); ```
4,031,262
I have two lists List that I need to combine in third list and remove duplicate values from that lists A bit hard to explain, so let me show an example of what the code looks like and what I want as a result, in sample I use int type not ResultAnalysisFileSql class. first\_list = [1, 12, 12, 5] second\_list = [12, 5...
2010/10/27
[ "https://Stackoverflow.com/questions/4031262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/206730/" ]
Union has not good performance : this [article](http://alicebobandmallory.com/articles/2012/10/18/merge-collections-without-duplicates-in-c) describe about compare them with together ``` var dict = list2.ToDictionary(p => p.Number); foreach (var person in list1) { dict[person.Number] = person; } var merged = d...
Use Linq's Union: ``` using System.Linq; var l1 = new List<int>() { 1,2,3,4,5 }; var l2 = new List<int>() { 3,5,6,7,8 }; var l3 = l1.Union(l2).ToList(); ```
4,031,262
I have two lists List that I need to combine in third list and remove duplicate values from that lists A bit hard to explain, so let me show an example of what the code looks like and what I want as a result, in sample I use int type not ResultAnalysisFileSql class. first\_list = [1, 12, 12, 5] second\_list = [12, 5...
2010/10/27
[ "https://Stackoverflow.com/questions/4031262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/206730/" ]
Union has not good performance : this [article](http://alicebobandmallory.com/articles/2012/10/18/merge-collections-without-duplicates-in-c) describe about compare them with together ``` var dict = list2.ToDictionary(p => p.Number); foreach (var person in list1) { dict[person.Number] = person; } var merged = d...
``` List<int> first_list = new List<int>() { 1, 12, 12, 5 }; List<int> second_list = new List<int>() { 12, 5, 7, 9, 1 }; var result = first_list.Union(second_list); ```
14,339,255
I try to develop a first app that download images from the net and show them in a gridview. The gridview is a fragment of a main Activity. The download process is made with an AsyncTask in the onCreate Function. In order not to download again the images while changing orientation, i set the `android:configChanges="orie...
2013/01/15
[ "https://Stackoverflow.com/questions/14339255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1216281/" ]
It is not possible. A Fragment cannot update it's layout dynamically. You do have some other options however. *1*. Not a fan of this, but you may have a Fragment's layout with both the portrait and the horizontal views at the same time and show and hide. fragment\_library.xml: ``` <?xml version="1.0" encoding="utf-8...
It is possible if you will use oncongi change method. please see this link [Change Fragment layout on orientation change](https://stackoverflow.com/questions/7442811/change-fragment-layout-on-orientation-change)
13,242,543
I am trying to turn a "simplified" sql query into a working SQLite one to use against XnViews databases, meaning the database layout is at best suboptimal for what I'm trying to do AND I can't change anything about that. Example would be "(cat\_10 and cat\_12) and (cat\_5 or cat\_7)". This should be used against the ...
2012/11/06
[ "https://Stackoverflow.com/questions/13242543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1025177/" ]
Your original query doesn't do what is intended. `WHERE ic IN (10, 12) GROUP BY if HAVING count(if) = 2` would yield the right result even when you have `ic`s in 10 and 10 again but not 12 at all. This is against your textual description of what you want. This is where an inner query to fetch results for 12 and 10 is n...
Ok I got it working as I originally planned surprisingly. ``` SELECT Folders.Pathname || Images.Filename AS File FROM Images JOIN Folders ON Images.FolderID = Folders.FolderID LEFT JOIN ( SELECT f, Cats, t4.if AS Tagged FROM t2 JOIN ( SELECT if, ' ' || group_concat(ic,' ') || ' ' AS Cats FROM t3 GROUP ...
13,242,543
I am trying to turn a "simplified" sql query into a working SQLite one to use against XnViews databases, meaning the database layout is at best suboptimal for what I'm trying to do AND I can't change anything about that. Example would be "(cat\_10 and cat\_12) and (cat\_5 or cat\_7)". This should be used against the ...
2012/11/06
[ "https://Stackoverflow.com/questions/13242543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1025177/" ]
Your original query doesn't do what is intended. `WHERE ic IN (10, 12) GROUP BY if HAVING count(if) = 2` would yield the right result even when you have `ic`s in 10 and 10 again but not 12 at all. This is against your textual description of what you want. This is where an inner query to fetch results for 12 and 10 is n...
A hackish approach which would be simpler and I believe faster is ``` SELECT DISTINCT ifc FROM t3 WHERE ifc IN ( SELECT ifc FROM t3 WHERE ic = 10 ) AND ifc IN ( SELECT ifc FROM t3 WHERE i...
13,242,543
I am trying to turn a "simplified" sql query into a working SQLite one to use against XnViews databases, meaning the database layout is at best suboptimal for what I'm trying to do AND I can't change anything about that. Example would be "(cat\_10 and cat\_12) and (cat\_5 or cat\_7)". This should be used against the ...
2012/11/06
[ "https://Stackoverflow.com/questions/13242543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1025177/" ]
Your original query doesn't do what is intended. `WHERE ic IN (10, 12) GROUP BY if HAVING count(if) = 2` would yield the right result even when you have `ic`s in 10 and 10 again but not 12 at all. This is against your textual description of what you want. This is where an inner query to fetch results for 12 and 10 is n...
If you have to use an intersect as you have done you should change your upper query which is wrong. Since you have to ensure every `if` has a 10 and 12 as `ic` then you can't get away without two separate queries for that. Something like: ``` SELECT ifc FROM t3 WHERE ifc IN ( SELECT ifc ...
10,108,820
I have a simple function that I'd like to test (perhaps mostly to appease simplecov). The function is: ``` module Utils extend self def blather(msg) msg = "=== " + msg STDERR.puts(msg) Rails.logger.debug(msg) end end ``` The [RSpec documentation for stubbing](https://www.relishapp.com/rspec/rspec...
2012/04/11
[ "https://Stackoverflow.com/questions/10108820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/558639/" ]
Firstly, you should typically use `$stderr` rather than `STDERR`. ``` module Utils extend self def blather(msg) msg = "=== " + msg $stderr.puts(msg) Rails.logger.debug(msg) end end ``` To answer your question, you can do the following in RSpec: ``` describe Utils do context "blather" do it...
Duh. STDIO is not a class -- it is an instance of IO, so changing: ``` STDERR.any_instance.should_receive(:puts).with("=== zoo") ``` to ``` STDERR.should_receive(:puts).with("=== zoo") ``` makes the test pass.
10,108,820
I have a simple function that I'd like to test (perhaps mostly to appease simplecov). The function is: ``` module Utils extend self def blather(msg) msg = "=== " + msg STDERR.puts(msg) Rails.logger.debug(msg) end end ``` The [RSpec documentation for stubbing](https://www.relishapp.com/rspec/rspec...
2012/04/11
[ "https://Stackoverflow.com/questions/10108820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/558639/" ]
Firstly, you should typically use `$stderr` rather than `STDERR`. ``` module Utils extend self def blather(msg) msg = "=== " + msg $stderr.puts(msg) Rails.logger.debug(msg) end end ``` To answer your question, you can do the following in RSpec: ``` describe Utils do context "blather" do it...
There are many ways to write to stderr, so it's usually better to test the resulting string instead of requiring `puts` was called once with specific arguments. As long as your function uses `$stderr` (which is intended to changable) rather than `STDERR` const, you can use rspec's beautiful [`output` matcher](https://...
10,108,820
I have a simple function that I'd like to test (perhaps mostly to appease simplecov). The function is: ``` module Utils extend self def blather(msg) msg = "=== " + msg STDERR.puts(msg) Rails.logger.debug(msg) end end ``` The [RSpec documentation for stubbing](https://www.relishapp.com/rspec/rspec...
2012/04/11
[ "https://Stackoverflow.com/questions/10108820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/558639/" ]
There are many ways to write to stderr, so it's usually better to test the resulting string instead of requiring `puts` was called once with specific arguments. As long as your function uses `$stderr` (which is intended to changable) rather than `STDERR` const, you can use rspec's beautiful [`output` matcher](https://...
Duh. STDIO is not a class -- it is an instance of IO, so changing: ``` STDERR.any_instance.should_receive(:puts).with("=== zoo") ``` to ``` STDERR.should_receive(:puts).with("=== zoo") ``` makes the test pass.
9,126,948
Is it possible to limit the number of changesets keeping only the last Nth versions ? To avoid infinite growth of the database it could be useful to set "keep only the last X version and discard the older" (I have some projects that the changesets of 2 years ago are completely useless!)
2012/02/03
[ "https://Stackoverflow.com/questions/9126948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1169500/" ]
I wouldn't recommend that approach, you never know when having the old version of a file is going to be useful. Code lives for a lot longer than you think and I look after numerous systems where code from over a decade ago is still maintained. TFS is pretty efficient at storing code (a mixture of deltas and compressi...
You can use `tf destroy` with `/stopat:X`, where `X` represends the changeset ID it 'll stop deleting. The ref to TF Destroy is [here](http://msdn.microsoft.com/en-us/library/bb386005.aspx). Ensure you know what you 're doing, preferably with tests: `tf destroy` is a one-way ticket, any action can't be undone.
36,297
The gemara Avodah Zara (20) explains that praising a non-Jew is a violation of "lo sechaneim", and this is quoted in the Rambam (Hil. Avodah Zara 10:6) and the Shulchan Aruch (Y"D 151, and Shach s.k. 18 says that this applies to all non-Jews). However, it seems like we aren't so careful about this. After all, Chazal t...
2014/03/13
[ "https://judaism.stackexchange.com/questions/36297", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/5083/" ]
The Rambam in Hilchot Avodat Kochavim 10:1 states that the seven nations are included in the prohibition of lo techaneim, but Jews and Gerei Toshav are not. This seemingly leaves generic idol worship up in the air. The context of the verse in Deuteronomy is clearly restricted to the seven nations, although most Rishoni...
I knew a Rav in Jerusalem who would refer to Shakespeare and other great gentile authors, only semi-sarcastically, as "moreinu v'rabbenu." I've never heard that one isn't supposed to praise a gentile. We don't poskin directly from the gemara.
36,297
The gemara Avodah Zara (20) explains that praising a non-Jew is a violation of "lo sechaneim", and this is quoted in the Rambam (Hil. Avodah Zara 10:6) and the Shulchan Aruch (Y"D 151, and Shach s.k. 18 says that this applies to all non-Jews). However, it seems like we aren't so careful about this. After all, Chazal t...
2014/03/13
[ "https://judaism.stackexchange.com/questions/36297", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/5083/" ]
The Tzitz Eliezer has a well explained Tshuva on Lo Sechonem, and goes through heterim on the subject. It goes through the Rambam praising Aristotle, and Gemaras praising Goyim, and Goyish nations. [Tzitz Eliezer Chelek 15, Siman 47](http://hebrewbooks.org/pdfpager.aspx?req=14514&st=&pgnum=133)
I knew a Rav in Jerusalem who would refer to Shakespeare and other great gentile authors, only semi-sarcastically, as "moreinu v'rabbenu." I've never heard that one isn't supposed to praise a gentile. We don't poskin directly from the gemara.
10,976,104
I have following setup: 1. Ubuntu Lucid 32 VM created by [Vagrant](http://vagrantup.com/). 2. Folder from which Vagrant is started with some CSS and JS files. The folder is mounted inside VM at address /vagrant/. 3. [grunt.js](https://github.com/cowboy/grunt) with watch task started from VM, watching for changes in cs...
2012/06/11
[ "https://Stackoverflow.com/questions/10976104", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1008291/" ]
File/Path watchers depend on OS's lower level facilities like inotify on Linux or kqueue on BSD systems. These mechanisms work directly with the filesystem drivers and they will not see the changes on network mounts. If your script will work on the virtual OS, then you might change the direction of sharing. Instead of ...
**Note:** I am not presenting any complete solution and I am no JavaScript programmer **Section on grunt.js issue on watching file** Source: <https://github.com/cowboy/grunt/blob/master/tasks/watch.js> Section where it performs watching of file. It uses fs.statSync (Synchronous stat): ``` // Get last modified time ...
10,976,104
I have following setup: 1. Ubuntu Lucid 32 VM created by [Vagrant](http://vagrantup.com/). 2. Folder from which Vagrant is started with some CSS and JS files. The folder is mounted inside VM at address /vagrant/. 3. [grunt.js](https://github.com/cowboy/grunt) with watch task started from VM, watching for changes in cs...
2012/06/11
[ "https://Stackoverflow.com/questions/10976104", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1008291/" ]
File/Path watchers depend on OS's lower level facilities like inotify on Linux or kqueue on BSD systems. These mechanisms work directly with the filesystem drivers and they will not see the changes on network mounts. If your script will work on the virtual OS, then you might change the direction of sharing. Instead of ...
I had the same issue running a CentOS 7 VM with VirtualBox on a Windows 10 host: browsersync was not able to detect changes in the VBox Shared folder. What helped me is tuning the watch process a little bit. Browsersync uses [chokidar](https://github.com/paulmillr/chokidar) to monitor the files. Setting `usePolling: tr...
10,976,104
I have following setup: 1. Ubuntu Lucid 32 VM created by [Vagrant](http://vagrantup.com/). 2. Folder from which Vagrant is started with some CSS and JS files. The folder is mounted inside VM at address /vagrant/. 3. [grunt.js](https://github.com/cowboy/grunt) with watch task started from VM, watching for changes in cs...
2012/06/11
[ "https://Stackoverflow.com/questions/10976104", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1008291/" ]
**Note:** I am not presenting any complete solution and I am no JavaScript programmer **Section on grunt.js issue on watching file** Source: <https://github.com/cowboy/grunt/blob/master/tasks/watch.js> Section where it performs watching of file. It uses fs.statSync (Synchronous stat): ``` // Get last modified time ...
I had the same issue running a CentOS 7 VM with VirtualBox on a Windows 10 host: browsersync was not able to detect changes in the VBox Shared folder. What helped me is tuning the watch process a little bit. Browsersync uses [chokidar](https://github.com/paulmillr/chokidar) to monitor the files. Setting `usePolling: tr...
24,960,817
I'm trying to update my project to the newest version of Spring, Hibernate etc. and the issue I'm facing now is the migration of the database configuration from my old XML configuration file to the annotation (I really like the annotated based configuration). Below is my old configuration: ``` <!-- Configure SessionFa...
2014/07/25
[ "https://Stackoverflow.com/questions/24960817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1554654/" ]
Here is what I have with Hibernate 4 and spring 3.2: You need to use [@EnableTransactionManagement](http://docs.spring.io/spring/docs/3.1.x/javadoc-api/org/springframework/transaction/annotation/EnableTransactionManagement.html) for your config class. ``` @Configuration @EnableTransactionManagement @PropertySource({ "...
Based on Jama's answer I've updated my configuration and tried to minimize it as possible. The result is a configuration class and a property file: ``` @EnableAutoConfiguration @ComponentScan @EnableAspectJAutoProxy @EnableTransactionManagement @PropertySource(value = { "classpath:/appcontext/application.properties" }...
80,159
We were debating on Psalm 150:6 help me what does the Bible means when it says "let everything that has BREATH praise the LORD
2022/12/05
[ "https://hermeneutics.stackexchange.com/questions/80159", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/53015/" ]
Not so fast - we need to keep in mind that the Bible, especially Hebrew, is extremely rich in metaphors. For example: * Job 12:8 - Or speak to the earth, and it will teach you; let the fish of the sea inform you. * Job 38:7 - while the morning stars sang together and all the sons of God shouted for joy? * Isa 55:12 - ...
Psalm 150: > > 5 praise him with the clash of cymbals, > praise him with resounding cymbals. > 6 Let **everything** that has breath praise the LORD. Praise the LORD. > > > From the immediate context, "everything" refers to humans. In the broader context, 5 chapters earlier, Psalm 145: > > 21 My mouth will spea...
55,270,182
I want to create a page similar to trello in javascript using vue.js What can I use to make such sliding frames - arrays with tasks inside? it is about an element that can be grabbed with a mouse and moved to another place
2019/03/20
[ "https://Stackoverflow.com/questions/55270182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9730816/" ]
Trello board is an implementation of a `Kanban board`. So while searching in Google, that should be your keyword. <https://github.com/BrockReece/vue-kanban> e.g. is what you are looking for.
Found this example for your concern : <https://vuejsexamples.com/a-realtime-kanban-board-in-vue-js-and-hamoni-sync/>. It seems to be quite what you need to begin with...
48,997,676
I have a problem when i process files in php. When processing small files, it can be seen the output. But, when large files it shows the warning like this : > > PHP Fatal error: Out of memory (allocated 1068498944) (tried to allocate 133955584 bytes) in C:\xampp\htdocs\ujian\_online\application\views\data\_soal\view\...
2018/02/26
[ "https://Stackoverflow.com/questions/48997676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7010994/" ]
Not knowing the full structure of your tables, I'll give it my best shot. ``` SELECT u.* -- This will give you all info on all users FROM users u INNER JOIN purchases p ON p.userID = u.ID WHERE u.registrationDate BETWEEN NOW() - INTERVAL 30 DAY AND NOW() ``` I think this'll work, given the lim...
How about ``` SELECT DISTINCT u.id, u.whatever FROM user_table u INNER JOIN purchase_table p ON (u.id = p.userid) WHERE u.signup >= DATE_FORMAT(NOW() ,'%Y-%m-01') ``` This should get you the current calendar month's signups who have made a purchase.
4,575,931
I have a bunch of CGPoints from a CCTMXLayer I want to save to NSUserDefaults but cannot seem to figure out an elegant way of doing so. Originally I was hoping to save an NSDictionary with an NSMutableSet for a value containing several NSValues (valueWithCGPoint). From what I can tell neither NSMutableSet or NSValue i...
2011/01/01
[ "https://Stackoverflow.com/questions/4575931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/454704/" ]
There exists a pair of functions `NSStringFromCGPoint` and `CGPointFromString`. You can use these to produce an array of strings representing the points for serialization, and then convert back when you're finished.
Box them in `NSValue` objects. Once they're in there, you can write the `NSValues` out to disk (since they conform to `<NSCoding>`) or put them in `NSUserDefaults` or whatever.
67,235,076
I was getting an error by using acc and val\_acc in keras, so I searched on stack overflow and got an answer saying that try changing acc to accuracy and val\_acc to value\_accuracy. My initial code: ``` import matplotlib.pyplot as plt plt.plot(history.history['acc']) plt.plot(history.history['val_acc']) plt.title('M...
2021/04/23
[ "https://Stackoverflow.com/questions/67235076", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15750072/" ]
You must specify `validation_split` or `validation_data` in `model.fit()` method. For example: ``` history = model.fit(X_train, y_train, validation_split=0.25, epochs=100, batch_size=10) ``` Here I used 25% of data as a validation.
You need to add `validation_data` in your `model. fit`. ``` X_train, X_test, y_train ,y_test = train_test_split(X, y, test_size=0.2,random_state = 0) history = model.fit(X_train, y_train, validation_data=(X_test, y_test), epochs=100, batch_...
23,583,352
``` SELECT account_name ,sum(total_balance) from transaction where account_name IN('cash','a/r','supplies','prepaid','land','gold') AS total_assets ORDER BY account_name ``` > > 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use ne...
2014/05/10
[ "https://Stackoverflow.com/questions/23583352", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3607176/" ]
You have an alias in the wrong place. ``` SELECT account_name ,sum(total_balance) from transaction where account_name IN('cash','a/r','supplies','prepaid','land','gold') AS total_assets ORDER BY account_name ``` should be ``` SELECT account_name ,sum(total_balance) AS total_assets from transaction where account_n...
remove `AS total_assets` ``` SELECT account_name ,sum(total_balance) from transaction where account_name IN('cash','a/r','supplies','prepaid','land','gold') ORDER BY account_name ```
23,583,352
``` SELECT account_name ,sum(total_balance) from transaction where account_name IN('cash','a/r','supplies','prepaid','land','gold') AS total_assets ORDER BY account_name ``` > > 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use ne...
2014/05/10
[ "https://Stackoverflow.com/questions/23583352", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3607176/" ]
remove `AS total_assets` ``` SELECT account_name ,sum(total_balance) from transaction where account_name IN('cash','a/r','supplies','prepaid','land','gold') ORDER BY account_name ```
Move the `as total_assets` into the `select` clause. This is used to define a column alias: ``` select account_name, sum(total_balance) as total_assets from transaction where account_name in ('cash', 'a/r', 'supplies', 'prepaid', 'land', 'gold') order by account_name; ```
23,583,352
``` SELECT account_name ,sum(total_balance) from transaction where account_name IN('cash','a/r','supplies','prepaid','land','gold') AS total_assets ORDER BY account_name ``` > > 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use ne...
2014/05/10
[ "https://Stackoverflow.com/questions/23583352", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3607176/" ]
You have an alias in the wrong place. ``` SELECT account_name ,sum(total_balance) from transaction where account_name IN('cash','a/r','supplies','prepaid','land','gold') AS total_assets ORDER BY account_name ``` should be ``` SELECT account_name ,sum(total_balance) AS total_assets from transaction where account_n...
Move the `as total_assets` into the `select` clause. This is used to define a column alias: ``` select account_name, sum(total_balance) as total_assets from transaction where account_name in ('cash', 'a/r', 'supplies', 'prepaid', 'land', 'gold') order by account_name; ```
43,884
Browsing through a previous [question](https://ux.stackexchange.com/questions/11165/studies-showing-significant-usability-differences-between-windows-and-mac-os-x?rq=1) on the usability between Windows and Mac OS, I thought an interesting question would be to see if there were any studies done on the impact of changing...
2013/08/19
[ "https://ux.stackexchange.com/questions/43884", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/27659/" ]
I don't know and cannot find evidence of entire companies making such a switch. I tend to see a couple of scenarios: 1. Totally invested in a Windows or Linux based platform with a bunch of proprietary software and unable to make the switch even if they wanted to. 2. Having to support numerous novices with everything ...
As I used to work as a user researcher on Office:Mac, I can tell you that there has been plenty of research on this very topic. However, I can't share specific results, since that research is proprietary to Microsoft. With that in mind, I can share some things about conducting this sort of research in general. The fir...
3,574,644
I want to show the location of an address in Google Maps. How do I get the latitude and longitude of an address using the Google Maps API?
2010/08/26
[ "https://Stackoverflow.com/questions/3574644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421645/" ]
``` public void goToLocationFromAddress(String strAddress) { //Create coder with Activity context - this Geocoder coder = new Geocoder(this); List<Address> address; try { //Get latLng from String address = coder.getFromLocationName(strAddress, 5); //check for null if (a...
I know I am too late for the contribution of 10 years old question, in the year 2021. The following code is fully complete working code. code for activity\_main.xml:- ``` <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://...
3,574,644
I want to show the location of an address in Google Maps. How do I get the latitude and longitude of an address using the Google Maps API?
2010/08/26
[ "https://Stackoverflow.com/questions/3574644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421645/" ]
Ud\_an's solution with updated API's **Note**: [LatLng](https://developers.google.com/android/reference/com/google/android/gms/maps/model/LatLng) class is part of Google Play Services. **Mandatory**: ``` <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="andr...
If you want to place your address in google map then easy way to use following ``` Intent searchAddress = new Intent(Intent.ACTION_VIEW,Uri.parse("geo:0,0?q="+address)); startActivity(searchAddress); ``` OR if you needed to get lat long from your address then use **Google Place Api** following create a method th...
3,574,644
I want to show the location of an address in Google Maps. How do I get the latitude and longitude of an address using the Google Maps API?
2010/08/26
[ "https://Stackoverflow.com/questions/3574644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421645/" ]
``` public GeoPoint getLocationFromAddress(String strAddress) { Geocoder coder = new Geocoder(this); List<Address> address; GeoPoint p1 = null; try { address = coder.getFromLocationName(strAddress, 5); if (address == null) { return null; } Address location =...
If you want to place your address in google map then easy way to use following ``` Intent searchAddress = new Intent(Intent.ACTION_VIEW,Uri.parse("geo:0,0?q="+address)); startActivity(searchAddress); ``` OR if you needed to get lat long from your address then use **Google Place Api** following create a method th...
3,574,644
I want to show the location of an address in Google Maps. How do I get the latitude and longitude of an address using the Google Maps API?
2010/08/26
[ "https://Stackoverflow.com/questions/3574644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421645/" ]
The following code will work for google apiv2: ``` public void convertAddress() { if (address != null && !address.isEmpty()) { try { List<Address> addressList = geoCoder.getFromLocationName(address, 1); if (addressList != null && addressList.size() > 0) { double lat ...
``` public void goToLocationFromAddress(String strAddress) { //Create coder with Activity context - this Geocoder coder = new Geocoder(this); List<Address> address; try { //Get latLng from String address = coder.getFromLocationName(strAddress, 5); //check for null if (a...
3,574,644
I want to show the location of an address in Google Maps. How do I get the latitude and longitude of an address using the Google Maps API?
2010/08/26
[ "https://Stackoverflow.com/questions/3574644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421645/" ]
An answer to Kandha problem above : > > It throws the "java.io.IOException service not available" > i already gave those permission and include the library...i can get map view...it throws that IOException at geocoder... > > > I just added a catch IOException after the try and it solved the problem ``` cat...
``` public LatLang getLatLangFromAddress(String strAddress){ Geocoder coder = new Geocoder(this, Locale.getDefault()); List<Address> address; try { address = coder.getFromLocationName(strAddress,5); if (address == null) { return new LatLang(-10000, -10000); } ...
3,574,644
I want to show the location of an address in Google Maps. How do I get the latitude and longitude of an address using the Google Maps API?
2010/08/26
[ "https://Stackoverflow.com/questions/3574644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421645/" ]
This is how you can find the latitude and longitude of where we have click on map. ``` public boolean onTouchEvent(MotionEvent event, MapView mapView) { //---when user lifts his finger--- if (event.getAction() == 1) { GeoPoint p = mapView.getProjection().fromPixels( ...
``` public LatLang getLatLangFromAddress(String strAddress){ Geocoder coder = new Geocoder(this, Locale.getDefault()); List<Address> address; try { address = coder.getFromLocationName(strAddress,5); if (address == null) { return new LatLang(-10000, -10000); } ...
3,574,644
I want to show the location of an address in Google Maps. How do I get the latitude and longitude of an address using the Google Maps API?
2010/08/26
[ "https://Stackoverflow.com/questions/3574644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421645/" ]
Ud\_an's solution with updated API's **Note**: [LatLng](https://developers.google.com/android/reference/com/google/android/gms/maps/model/LatLng) class is part of Google Play Services. **Mandatory**: ``` <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="andr...
``` public LatLang getLatLangFromAddress(String strAddress){ Geocoder coder = new Geocoder(this, Locale.getDefault()); List<Address> address; try { address = coder.getFromLocationName(strAddress,5); if (address == null) { return new LatLang(-10000, -10000); } ...
3,574,644
I want to show the location of an address in Google Maps. How do I get the latitude and longitude of an address using the Google Maps API?
2010/08/26
[ "https://Stackoverflow.com/questions/3574644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421645/" ]
``` public GeoPoint getLocationFromAddress(String strAddress) { Geocoder coder = new Geocoder(this); List<Address> address; GeoPoint p1 = null; try { address = coder.getFromLocationName(strAddress, 5); if (address == null) { return null; } Address location =...
An answer to Kandha problem above : > > It throws the "java.io.IOException service not available" > i already gave those permission and include the library...i can get map view...it throws that IOException at geocoder... > > > I just added a catch IOException after the try and it solved the problem ``` cat...
3,574,644
I want to show the location of an address in Google Maps. How do I get the latitude and longitude of an address using the Google Maps API?
2010/08/26
[ "https://Stackoverflow.com/questions/3574644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421645/" ]
``` public GeoPoint getLocationFromAddress(String strAddress) { Geocoder coder = new Geocoder(this); List<Address> address; GeoPoint p1 = null; try { address = coder.getFromLocationName(strAddress, 5); if (address == null) { return null; } Address location =...
``` yourButton.setOnClickListener { AppUtil.hideSoftKeyboard(this) if (yourEdittext.text.isNotEmpty()) { var location: LatLng? = null if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { val coder = Geocoder(this@WeatherMapActivity) ...
3,574,644
I want to show the location of an address in Google Maps. How do I get the latitude and longitude of an address using the Google Maps API?
2010/08/26
[ "https://Stackoverflow.com/questions/3574644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421645/" ]
``` yourButton.setOnClickListener { AppUtil.hideSoftKeyboard(this) if (yourEdittext.text.isNotEmpty()) { var location: LatLng? = null if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { val coder = Geocoder(this@WeatherMapActivity) ...
``` public LatLang getLatLangFromAddress(String strAddress){ Geocoder coder = new Geocoder(this, Locale.getDefault()); List<Address> address; try { address = coder.getFromLocationName(strAddress,5); if (address == null) { return new LatLang(-10000, -10000); } ...
59,780,120
To deploy my Laravel app to my server, I decided to just download the zip file and unzip it in the folder. However, I made some changes on my server and I would like to push them to GitHub. Since there is no .git folder, I don't get how am I supposed to commit the changes or pull from the repository. Can you help me ...
2020/01/17
[ "https://Stackoverflow.com/questions/59780120", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If you have a repo already that has commits do: ``` git clone git@REPO_LOCATION_INFO ``` Check out a new branch on your local: ``` git checkout -b branch-name ``` Make your changes, save, add, commit, and push them: ``` git add . git commit -m "My commit message" git push origin branch-name ``` then open a pul...
I've successfully done that following way: 1. Rename repo zip downloaded (without .git) `mv repo repo-bak` 2. Clone original repo `git clone <url>` 3. move .git file to zip downloaded repo `mv repo/.git repo-bak` 4. delete cloned repo `rm -rf repo` 5. change the name back to the original `mv repo-bak repo` 6...
58,020,247
I am working on a script that take 1 string argument and a file. I want it so that if a file is put in that doesn't exist, then it will display the "*filename* cannot be read" message. That part does work however it also displays a "grep: grep.txt: No such file or directory" message. Is there any way to stop the grep ...
2019/09/20
[ "https://Stackoverflow.com/questions/58020247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11057683/" ]
Always figure out the answer 3 minutes after posting ... Make sure you are not importing the Mockito argument matcher with `ArgumentMatcher.any()`
My issue was `@MockkBean` was actually not working as expected(just creating a mock but not injecting it). I dealed with this by manually overriding bean with mockk/spyk in `@TestConfiguration`.
27,696,129
Basically I have 4 ordinary view controllers, with one of them being the 'home' view controller which holds the main content. The other three are used for checking notifications, creating new content etc. The problem is this - I only want to load the home view controller once (when the app starts up), so when I navigat...
2014/12/29
[ "https://Stackoverflow.com/questions/27696129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3763709/" ]
I suggest you try it this way: **XSLT 1.0 + EXSLT set:distinct()** ``` <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://services.xxx.com/ClientService" xmlns:set="http://exslt.org/sets" extension-element-prefixes="se...
Not going to write a whole XSLT file, but have you tried the following approach? ``` <xsl:foreach select="tns:client"> <xsl:if test=" not( preceding-sibling::tns:getClientRS[ not(./tns:ClientID = current()/tns:ClientID ) ] ) "> <xsl:variable name="ClientID" select="tns:ClientID"/> ``` Then loop...
37,537,317
How to create a user on redhat instance during the launch? I tried include the following commands in the user data but didn't work. Any idea why? or is there another way of creating a user using userdata? ``` sudo su useradd -s /bin/bash -m -d /home/testuser -g root testuser echo P@ssc0deT3st | passwd testuser --stdi...
2016/05/31
[ "https://Stackoverflow.com/questions/37537317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5844018/" ]
The best way about it would be to transform your notification data before displaying it. You can use regular expression for it or just parse your date and then use date methods. ```js angular.module('app', []); angular .module('app') .controller('Example', function ($scope) { const inputData = [ {t...
In your controller modify the notif\_date like this. ``` notifications.forEach(function(notification){ notification.notif_date = new Date(notification.notif_date); }) ``` and try angular date [filter](https://docs.angularjs.org/api/ng/filter/date) in the view. ``` <span>Month:{{notification.notif_date | date...
306,276
I wanted to disable `systemd` unwanted attempts to automatically start `wpa_supplicant`. I thougth I could simply run a ``` sudo systemctl disable wpa_supplicant.service --global ``` and I would not be seeing a wpa\_supplicant in `ps -ef` output anymore. Anyway this did not work. How can I make it work? My problem...
2016/08/28
[ "https://unix.stackexchange.com/questions/306276", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/24394/" ]
I ran into the same issue as yours. After some digging, I found a folder called: ``` /usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service ``` This is file is used to allow the service to be activated by d-bus. d-bus can activate the service even if it is disabled. I confirmed that this was happening by r...
I tried following BrettB's suggestion, but it had no effect on my system. (Ubuntu 18.04.) However, the following did work: ``` sudo systemctl disable wpa_supplicant ```
306,276
I wanted to disable `systemd` unwanted attempts to automatically start `wpa_supplicant`. I thougth I could simply run a ``` sudo systemctl disable wpa_supplicant.service --global ``` and I would not be seeing a wpa\_supplicant in `ps -ef` output anymore. Anyway this did not work. How can I make it work? My problem...
2016/08/28
[ "https://unix.stackexchange.com/questions/306276", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/24394/" ]
I ran into the same issue as yours. After some digging, I found a folder called: ``` /usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service ``` This is file is used to allow the service to be activated by d-bus. d-bus can activate the service even if it is disabled. I confirmed that this was happening by r...
All the previous answers are excessive. You can just disable NetworkManager's use of `wpa_supplicant` to manage wifi clients: ``` nmcli radio wifi off ``` After this, NetworkManager won't try to manage wifi devices as clients. Now you can just disable/stop the `wpa_supplicant` service without worrying that it will s...
306,276
I wanted to disable `systemd` unwanted attempts to automatically start `wpa_supplicant`. I thougth I could simply run a ``` sudo systemctl disable wpa_supplicant.service --global ``` and I would not be seeing a wpa\_supplicant in `ps -ef` output anymore. Anyway this did not work. How can I make it work? My problem...
2016/08/28
[ "https://unix.stackexchange.com/questions/306276", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/24394/" ]
I ran into the same issue as yours. After some digging, I found a folder called: ``` /usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service ``` This is file is used to allow the service to be activated by d-bus. d-bus can activate the service even if it is disabled. I confirmed that this was happening by r...
It isn't really systemd that's being annoying here, it's NetworkManager. You can tell NetworkManager to ignore wlan0. There are some good ideas in this thread already. I thought I'd add what I do to this list. * @GChuf's method - Force NetworkManager to fail by deleting systemd files. Delete files so NetworkManager i...
306,276
I wanted to disable `systemd` unwanted attempts to automatically start `wpa_supplicant`. I thougth I could simply run a ``` sudo systemctl disable wpa_supplicant.service --global ``` and I would not be seeing a wpa\_supplicant in `ps -ef` output anymore. Anyway this did not work. How can I make it work? My problem...
2016/08/28
[ "https://unix.stackexchange.com/questions/306276", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/24394/" ]
The `sudo systemctl disable wpa_supplicant` + `sudo systemctl stop wpa_supplicant` will ONLY *temporarily disable* `wpa_supplicant` service until the network manager *restarts* and/or the system *reboots*. So, to **correctly** and/or **completely** disable the `wpa_supplicant` service from running again in the future ...
I tried following BrettB's suggestion, but it had no effect on my system. (Ubuntu 18.04.) However, the following did work: ``` sudo systemctl disable wpa_supplicant ```
306,276
I wanted to disable `systemd` unwanted attempts to automatically start `wpa_supplicant`. I thougth I could simply run a ``` sudo systemctl disable wpa_supplicant.service --global ``` and I would not be seeing a wpa\_supplicant in `ps -ef` output anymore. Anyway this did not work. How can I make it work? My problem...
2016/08/28
[ "https://unix.stackexchange.com/questions/306276", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/24394/" ]
I tried following BrettB's suggestion, but it had no effect on my system. (Ubuntu 18.04.) However, the following did work: ``` sudo systemctl disable wpa_supplicant ```
It isn't really systemd that's being annoying here, it's NetworkManager. You can tell NetworkManager to ignore wlan0. There are some good ideas in this thread already. I thought I'd add what I do to this list. * @GChuf's method - Force NetworkManager to fail by deleting systemd files. Delete files so NetworkManager i...
306,276
I wanted to disable `systemd` unwanted attempts to automatically start `wpa_supplicant`. I thougth I could simply run a ``` sudo systemctl disable wpa_supplicant.service --global ``` and I would not be seeing a wpa\_supplicant in `ps -ef` output anymore. Anyway this did not work. How can I make it work? My problem...
2016/08/28
[ "https://unix.stackexchange.com/questions/306276", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/24394/" ]
The `sudo systemctl disable wpa_supplicant` + `sudo systemctl stop wpa_supplicant` will ONLY *temporarily disable* `wpa_supplicant` service until the network manager *restarts* and/or the system *reboots*. So, to **correctly** and/or **completely** disable the `wpa_supplicant` service from running again in the future ...
All the previous answers are excessive. You can just disable NetworkManager's use of `wpa_supplicant` to manage wifi clients: ``` nmcli radio wifi off ``` After this, NetworkManager won't try to manage wifi devices as clients. Now you can just disable/stop the `wpa_supplicant` service without worrying that it will s...
306,276
I wanted to disable `systemd` unwanted attempts to automatically start `wpa_supplicant`. I thougth I could simply run a ``` sudo systemctl disable wpa_supplicant.service --global ``` and I would not be seeing a wpa\_supplicant in `ps -ef` output anymore. Anyway this did not work. How can I make it work? My problem...
2016/08/28
[ "https://unix.stackexchange.com/questions/306276", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/24394/" ]
The `sudo systemctl disable wpa_supplicant` + `sudo systemctl stop wpa_supplicant` will ONLY *temporarily disable* `wpa_supplicant` service until the network manager *restarts* and/or the system *reboots*. So, to **correctly** and/or **completely** disable the `wpa_supplicant` service from running again in the future ...
It isn't really systemd that's being annoying here, it's NetworkManager. You can tell NetworkManager to ignore wlan0. There are some good ideas in this thread already. I thought I'd add what I do to this list. * @GChuf's method - Force NetworkManager to fail by deleting systemd files. Delete files so NetworkManager i...
306,276
I wanted to disable `systemd` unwanted attempts to automatically start `wpa_supplicant`. I thougth I could simply run a ``` sudo systemctl disable wpa_supplicant.service --global ``` and I would not be seeing a wpa\_supplicant in `ps -ef` output anymore. Anyway this did not work. How can I make it work? My problem...
2016/08/28
[ "https://unix.stackexchange.com/questions/306276", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/24394/" ]
All the previous answers are excessive. You can just disable NetworkManager's use of `wpa_supplicant` to manage wifi clients: ``` nmcli radio wifi off ``` After this, NetworkManager won't try to manage wifi devices as clients. Now you can just disable/stop the `wpa_supplicant` service without worrying that it will s...
It isn't really systemd that's being annoying here, it's NetworkManager. You can tell NetworkManager to ignore wlan0. There are some good ideas in this thread already. I thought I'd add what I do to this list. * @GChuf's method - Force NetworkManager to fail by deleting systemd files. Delete files so NetworkManager i...
186,286
I have built a little C# application that allows visualization of perpective transformations with a matrix, in 2D XYW space. Now I would like to be able to calculate the matrix from the four corners of the transformed square. Here is a screenshot to help you understand what I am working with: ![Screenshot](https://i.s...
2012/02/28
[ "https://math.stackexchange.com/questions/186286", "https://math.stackexchange.com", "https://math.stackexchange.com/users/26832/" ]
Let T be the unknown transformation matrix (3X3). Let A be the matrix of original co-ordinates (4X3). Let B be the matrix of new co-ordinates (4X3). Now A\*T = B. Solve for 9 unknowns using 12 equations to get the transformation. As you can see you need only 3 points, not 4 to fully define the transformation.
First lets the the naming straight. 2D means two-dimensional so this space only needs two axis - X and Y. For transformations in this space you only need a two dimensional matrix, lets call it T. To find T you only need two points (in fact you find out one matrix for two points and then you can check if it also works f...
186,286
I have built a little C# application that allows visualization of perpective transformations with a matrix, in 2D XYW space. Now I would like to be able to calculate the matrix from the four corners of the transformed square. Here is a screenshot to help you understand what I am working with: ![Screenshot](https://i.s...
2012/02/28
[ "https://math.stackexchange.com/questions/186286", "https://math.stackexchange.com", "https://math.stackexchange.com/users/26832/" ]
Let T be the unknown transformation matrix (3X3). Let A be the matrix of original co-ordinates (4X3). Let B be the matrix of new co-ordinates (4X3). Now A\*T = B. Solve for 9 unknowns using 12 equations to get the transformation. As you can see you need only 3 points, not 4 to fully define the transformation.
When the image of a square in space can be an arbitrary quadrilateral (a non-parallelogram) then the map in question cannot be linear and is not obtained by applying a matrix to the coordinates of the original points in space. Instead the mapping functions are of the form $$\xi={a\_1 x+ b\_1 y+ c\_1\over a\_2 x+ b\_2 y...
186,286
I have built a little C# application that allows visualization of perpective transformations with a matrix, in 2D XYW space. Now I would like to be able to calculate the matrix from the four corners of the transformed square. Here is a screenshot to help you understand what I am working with: ![Screenshot](https://i.s...
2012/02/28
[ "https://math.stackexchange.com/questions/186286", "https://math.stackexchange.com", "https://math.stackexchange.com/users/26832/" ]
I'll use $f(x, y)$ to represent the 2D point $(x, y)$ multiplied by an assumed 3x3 transformation matrix: $\begin{pmatrix} x'\\ y'\\ z' \end{pmatrix} := \begin{pmatrix} a & b & c\\ d & e & f\\ g & h & i \end{pmatrix} \begin{pmatrix} x\\ y\\ 1 \end{pmatrix}$ $f(x, y) := \begin{pmatrix} \frac{x'}{z'}\\ \frac{y'}{z'} \e...
Let T be the unknown transformation matrix (3X3). Let A be the matrix of original co-ordinates (4X3). Let B be the matrix of new co-ordinates (4X3). Now A\*T = B. Solve for 9 unknowns using 12 equations to get the transformation. As you can see you need only 3 points, not 4 to fully define the transformation.
186,286
I have built a little C# application that allows visualization of perpective transformations with a matrix, in 2D XYW space. Now I would like to be able to calculate the matrix from the four corners of the transformed square. Here is a screenshot to help you understand what I am working with: ![Screenshot](https://i.s...
2012/02/28
[ "https://math.stackexchange.com/questions/186286", "https://math.stackexchange.com", "https://math.stackexchange.com/users/26832/" ]
I'll use $f(x, y)$ to represent the 2D point $(x, y)$ multiplied by an assumed 3x3 transformation matrix: $\begin{pmatrix} x'\\ y'\\ z' \end{pmatrix} := \begin{pmatrix} a & b & c\\ d & e & f\\ g & h & i \end{pmatrix} \begin{pmatrix} x\\ y\\ 1 \end{pmatrix}$ $f(x, y) := \begin{pmatrix} \frac{x'}{z'}\\ \frac{y'}{z'} \e...
First lets the the naming straight. 2D means two-dimensional so this space only needs two axis - X and Y. For transformations in this space you only need a two dimensional matrix, lets call it T. To find T you only need two points (in fact you find out one matrix for two points and then you can check if it also works f...
186,286
I have built a little C# application that allows visualization of perpective transformations with a matrix, in 2D XYW space. Now I would like to be able to calculate the matrix from the four corners of the transformed square. Here is a screenshot to help you understand what I am working with: ![Screenshot](https://i.s...
2012/02/28
[ "https://math.stackexchange.com/questions/186286", "https://math.stackexchange.com", "https://math.stackexchange.com/users/26832/" ]
I'll use $f(x, y)$ to represent the 2D point $(x, y)$ multiplied by an assumed 3x3 transformation matrix: $\begin{pmatrix} x'\\ y'\\ z' \end{pmatrix} := \begin{pmatrix} a & b & c\\ d & e & f\\ g & h & i \end{pmatrix} \begin{pmatrix} x\\ y\\ 1 \end{pmatrix}$ $f(x, y) := \begin{pmatrix} \frac{x'}{z'}\\ \frac{y'}{z'} \e...
When the image of a square in space can be an arbitrary quadrilateral (a non-parallelogram) then the map in question cannot be linear and is not obtained by applying a matrix to the coordinates of the original points in space. Instead the mapping functions are of the form $$\xi={a\_1 x+ b\_1 y+ c\_1\over a\_2 x+ b\_2 y...
3,675
I need to track number of visits of my publication, but site allows only to insert images, and no javascript. I would like to insert white 1x1 pixel image. Are the any internet services which provide such functionality and count number of visits via such approach? P.S. I am not sure that this site is correct place t...
2010/10/09
[ "https://webmasters.stackexchange.com/questions/3675", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/2278/" ]
Ultimately, Google Analytics does exactly the same thing, however, the image URL is created using Javascript. If you really, really wanted to use Google Analytics for your site, (albeit with limited functionality) you might take a look at [Troubleshooting The Tracking Code](http://code.google.com/apis/analytics/docs/t...
I believe [Extreme Tracking](http://extremetracking.com/?free) uses only an image - it's free and the stats are quite useful. You could resize/hide the button, however, there is a chance it could be against their TOS to do that.
23,839,318
I have the following code. var json = callback + '(' + Utilities.jsonStringify(range.getValues()) +')'; return ContentService.createTextOutput(json).setMimeType(ContentService.MimeType.JAVASCRIPT); When I call that app from another page I get the following error: Refused to execute script from '<https://script.goog...
2014/05/23
[ "https://Stackoverflow.com/questions/23839318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3626700/" ]
There's a plugin available, called [videojs-ima](https://github.com/googleads/videojs-ima), developed by Google. In fact it's just a bridge between video.js and [IMA sdk](https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/). [Introduction page](https://developers.google.com/interactive-media-ads/vi...
Just looking for the same: [VPAID & VAST standard](https://stackoverflow.com/questions/23559486/vpaid-vast-standard) At this time it seems that there's no solution for this. Sad, because videojs is so feature complete. Just stumbled upon another player: <http://www.hdflvplayer.net/> This player seems to support VPAI...
23,839,318
I have the following code. var json = callback + '(' + Utilities.jsonStringify(range.getValues()) +')'; return ContentService.createTextOutput(json).setMimeType(ContentService.MimeType.JAVASCRIPT); When I call that app from another page I get the following error: Refused to execute script from '<https://script.goog...
2014/05/23
[ "https://Stackoverflow.com/questions/23839318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3626700/" ]
I'm currently working in a plugin for video.js for adding support to VPAID: <https://github.com/MailOnline/videojs-vast-vpaid> demo: <http://mailonline.github.io/videojs-vast-vpaid/> if someone has some issues with the FLASH VPAID please report here: <https://github.com/MailOnline/VPAIDFLASHClient> if someone has so...
Just looking for the same: [VPAID & VAST standard](https://stackoverflow.com/questions/23559486/vpaid-vast-standard) At this time it seems that there's no solution for this. Sad, because videojs is so feature complete. Just stumbled upon another player: <http://www.hdflvplayer.net/> This player seems to support VPAI...
23,839,318
I have the following code. var json = callback + '(' + Utilities.jsonStringify(range.getValues()) +')'; return ContentService.createTextOutput(json).setMimeType(ContentService.MimeType.JAVASCRIPT); When I call that app from another page I get the following error: Refused to execute script from '<https://script.goog...
2014/05/23
[ "https://Stackoverflow.com/questions/23839318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3626700/" ]
I'm currently working in a plugin for video.js for adding support to VPAID: <https://github.com/MailOnline/videojs-vast-vpaid> demo: <http://mailonline.github.io/videojs-vast-vpaid/> if someone has some issues with the FLASH VPAID please report here: <https://github.com/MailOnline/VPAIDFLASHClient> if someone has so...
There's a plugin available, called [videojs-ima](https://github.com/googleads/videojs-ima), developed by Google. In fact it's just a bridge between video.js and [IMA sdk](https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/). [Introduction page](https://developers.google.com/interactive-media-ads/vi...
7,068,143
I have a project that I'm working on that uses a gem we've created internally. It's not hosted on rubygems.org or github. But we do have it in our repository and in a path on our local machine. In our Gemfile, we have something similar to this: ``` gem "our-custom-gem", :path => "/path-to/our-custom-gem" ``` We're ...
2011/08/15
[ "https://Stackoverflow.com/questions/7068143", "https://Stackoverflow.com", "https://Stackoverflow.com/users/749768/" ]
**Breaking news!** > > Since Bundler 1.2, the bundle package command can also package :git > and :path dependencies besides .gem files. This needs to be explicitly > enabled via the --all option. Once used, the --all option will be > remembered. > > > Documentation: <http://gembundler.com/man/bundle-package.1....
Judging from this [pull requerst](https://github.com/carlhuda/bundler/issues/67), it's a feature planned for 1.1. One of the core developers gave [this workaround](https://github.com/carlhuda/bundler/issues/67#issuecomment-154741), though: ``` cd vendor/git git clone git://github.com/foo/foo.git ``` > > Then, in y...
29,597,252
I'm trying to construct a typed genetic programming solution with [DEAP](http://deap.readthedocs.org/). I start the program with a photo of a black & white triangle and the 3 vertices of a different triangle. The hope is for the program to come up with a program which moves the vertices of the given triangle closer t...
2015/04/13
[ "https://Stackoverflow.com/questions/29597252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/75033/" ]
I've found a fix for this problem. When I need the input type only in terminals (as you did) I create an identity function: ``` pset.addPrimitive(idem, [MyClass], MyClass) ``` Which creates long branches of nested idems of the right depth: idem(idem(idem(x)))... Then I stringify the primitivetree, replace all of t...
First I discovered that if I added a bunch of integer terminals the error disappeared. In one example I just added a bunch of integers. ``` for i in range(0, PLANE_SIZE): pset.addTerminal(i, int, name=str(i)) ``` I found some insight to the issue in the comments [here](https://gist.github.com/macrintr/9876942); a...
13,725,301
I have the following code. ``` $(document).ready(function(){ $('#listing img') .attr('width', 250) .removeAttr('height').removeAttr('align').removeAttr('style') .wrap('<p />'); }); ``` Is there a more efficient way of removing multiple attributes?
2012/12/05
[ "https://Stackoverflow.com/questions/13725301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1696060/" ]
Yes : ``` .removeAttr('height align style') ``` From [the documentation](http://api.jquery.com/removeAttr/) : > > as of version 1.7, it can be a space-separated list of attributes. > > >
Yes, you can remove it in that way: ``` $('#listing img').removeAttr('height align style'); ``` you can also add those attributes as follows: ``` $('#listing img').attr({ height: "20", align: left }).css({ color: red, text-align: center }); ```
245,400
Can anyone point me to an example or share some code on how to search multiple sites libraries with a single API Rest call? For example, I have a side called Document Archive and in that archive I have two document lists called Archive1 and Archive2. Here is the URL I am using to search: ``` https://example.com/TS/EDM...
2018/07/17
[ "https://sharepoint.stackexchange.com/questions/245400", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/76147/" ]
Of you look at the documentation (<https://docs.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference>) you see that you can use AND, NOT and OR in your search query. Another suggestion would be to use the SharePoint Search Query tool to fastly iterate: <https://github.com...
Try changing the URL to ``` https://example.com/TS/EDMS/_api/search/query?querytext='Tequila+AND+path:https://example.com/TS/EDMS/GSSCDocs/' ``` Hope that helps
245,400
Can anyone point me to an example or share some code on how to search multiple sites libraries with a single API Rest call? For example, I have a side called Document Archive and in that archive I have two document lists called Archive1 and Archive2. Here is the URL I am using to search: ``` https://example.com/TS/EDM...
2018/07/17
[ "https://sharepoint.stackexchange.com/questions/245400", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/76147/" ]
Of you look at the documentation (<https://docs.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference>) you see that you can use AND, NOT and OR in your search query. Another suggestion would be to use the SharePoint Search Query tool to fastly iterate: <https://github.com...
I appreciate all the responses and help. Here is how I "fixed" my problem (all my fault): ``` http://<site>/_api/search/query?querystring='Tequila(path:http://<path>)'&rowlimit=33&trimduplicates=true ``` The problem I was having was the single quote after the querystring was in the wrong place. I had it after the se...
24,963,081
Im trying to read from a file and put into to the text edit and it keeps saying QIODevice::read:device not open. The .txt file is in the same location as my .qrc and .cpp file. I was following a step by step guide from online. From my understanding, they changed something when they went from Q4 to Q5. Does anyone have ...
2014/07/25
[ "https://Stackoverflow.com/questions/24963081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3878223/" ]
You're not passing the *absolute* path of the file to `QFile::open()`, and you're not checking the result of opening the file. In your case, it's a failure and `open()` returns false, but you're ignoring it, instead of fixing the problem (the wrong path) that caused it. This has zilch to do with Qt 4 -> Qt 5 upgrade, ...
It does not have anything to do with Qt version. Even though your .txt file is in the same directory as your .cpp file, you still need to add the directory. I had the same problem and that simple solution worked well. Arman Arefi
24,963,081
Im trying to read from a file and put into to the text edit and it keeps saying QIODevice::read:device not open. The .txt file is in the same location as my .qrc and .cpp file. I was following a step by step guide from online. From my understanding, they changed something when they went from Q4 to Q5. Does anyone have ...
2014/07/25
[ "https://Stackoverflow.com/questions/24963081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3878223/" ]
If you're reading from a .qrc resource file you have to run qmake ("Build->Run qmake" in Qt Creator) before it will be available.
this is mostly the case if you close a file which is not opened - so just remove the close statement for example: ``` file->close(); ``` just remove it ;)
24,963,081
Im trying to read from a file and put into to the text edit and it keeps saying QIODevice::read:device not open. The .txt file is in the same location as my .qrc and .cpp file. I was following a step by step guide from online. From my understanding, they changed something when they went from Q4 to Q5. Does anyone have ...
2014/07/25
[ "https://Stackoverflow.com/questions/24963081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3878223/" ]
You're not passing the *absolute* path of the file to `QFile::open()`, and you're not checking the result of opening the file. In your case, it's a failure and `open()` returns false, but you're ignoring it, instead of fixing the problem (the wrong path) that caused it. This has zilch to do with Qt 4 -> Qt 5 upgrade, ...
I had this problem and it turned out Qt Creator hadn't actually added the .qrc file to my project. I'm using Qt Creator 4.1.0 on a Mac and the projects view doesn't always get populated after creating a new project, first requiring a restart of Creator. My version of this problem may relate to that.
24,963,081
Im trying to read from a file and put into to the text edit and it keeps saying QIODevice::read:device not open. The .txt file is in the same location as my .qrc and .cpp file. I was following a step by step guide from online. From my understanding, they changed something when they went from Q4 to Q5. Does anyone have ...
2014/07/25
[ "https://Stackoverflow.com/questions/24963081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3878223/" ]
If you're reading from a .qrc resource file you have to run qmake ("Build->Run qmake" in Qt Creator) before it will be available.
It does not have anything to do with Qt version. Even though your .txt file is in the same directory as your .cpp file, you still need to add the directory. I had the same problem and that simple solution worked well. Arman Arefi
24,963,081
Im trying to read from a file and put into to the text edit and it keeps saying QIODevice::read:device not open. The .txt file is in the same location as my .qrc and .cpp file. I was following a step by step guide from online. From my understanding, they changed something when they went from Q4 to Q5. Does anyone have ...
2014/07/25
[ "https://Stackoverflow.com/questions/24963081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3878223/" ]
It can be related to the version of Qt, since Qt5 sometimes doesn't work with MSVC2010. I have Qt 5.4 and my code gave the same error, when it was working with MSVC2010 OpenGL as a compiler. I manually added MinGW 32bit to use it as compiler and it worked. P.S. I have not installed MSVC2013 for Qt 5.4., and it works s...
It does not have anything to do with Qt version. Even though your .txt file is in the same directory as your .cpp file, you still need to add the directory. I had the same problem and that simple solution worked well. Arman Arefi
24,963,081
Im trying to read from a file and put into to the text edit and it keeps saying QIODevice::read:device not open. The .txt file is in the same location as my .qrc and .cpp file. I was following a step by step guide from online. From my understanding, they changed something when they went from Q4 to Q5. Does anyone have ...
2014/07/25
[ "https://Stackoverflow.com/questions/24963081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3878223/" ]
this is mostly the case if you close a file which is not opened - so just remove the close statement for example: ``` file->close(); ``` just remove it ;)
I had this problem and it turned out Qt Creator hadn't actually added the .qrc file to my project. I'm using Qt Creator 4.1.0 on a Mac and the projects view doesn't always get populated after creating a new project, first requiring a restart of Creator. My version of this problem may relate to that.
24,963,081
Im trying to read from a file and put into to the text edit and it keeps saying QIODevice::read:device not open. The .txt file is in the same location as my .qrc and .cpp file. I was following a step by step guide from online. From my understanding, they changed something when they went from Q4 to Q5. Does anyone have ...
2014/07/25
[ "https://Stackoverflow.com/questions/24963081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3878223/" ]
If you're reading from a .qrc resource file you have to run qmake ("Build->Run qmake" in Qt Creator) before it will be available.
You're not passing the *absolute* path of the file to `QFile::open()`, and you're not checking the result of opening the file. In your case, it's a failure and `open()` returns false, but you're ignoring it, instead of fixing the problem (the wrong path) that caused it. This has zilch to do with Qt 4 -> Qt 5 upgrade, ...
24,963,081
Im trying to read from a file and put into to the text edit and it keeps saying QIODevice::read:device not open. The .txt file is in the same location as my .qrc and .cpp file. I was following a step by step guide from online. From my understanding, they changed something when they went from Q4 to Q5. Does anyone have ...
2014/07/25
[ "https://Stackoverflow.com/questions/24963081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3878223/" ]
If you're reading from a .qrc resource file you have to run qmake ("Build->Run qmake" in Qt Creator) before it will be available.
I had this problem and it turned out Qt Creator hadn't actually added the .qrc file to my project. I'm using Qt Creator 4.1.0 on a Mac and the projects view doesn't always get populated after creating a new project, first requiring a restart of Creator. My version of this problem may relate to that.
24,963,081
Im trying to read from a file and put into to the text edit and it keeps saying QIODevice::read:device not open. The .txt file is in the same location as my .qrc and .cpp file. I was following a step by step guide from online. From my understanding, they changed something when they went from Q4 to Q5. Does anyone have ...
2014/07/25
[ "https://Stackoverflow.com/questions/24963081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3878223/" ]
You're not passing the *absolute* path of the file to `QFile::open()`, and you're not checking the result of opening the file. In your case, it's a failure and `open()` returns false, but you're ignoring it, instead of fixing the problem (the wrong path) that caused it. This has zilch to do with Qt 4 -> Qt 5 upgrade, ...
It can be related to the version of Qt, since Qt5 sometimes doesn't work with MSVC2010. I have Qt 5.4 and my code gave the same error, when it was working with MSVC2010 OpenGL as a compiler. I manually added MinGW 32bit to use it as compiler and it worked. P.S. I have not installed MSVC2013 for Qt 5.4., and it works s...
24,963,081
Im trying to read from a file and put into to the text edit and it keeps saying QIODevice::read:device not open. The .txt file is in the same location as my .qrc and .cpp file. I was following a step by step guide from online. From my understanding, they changed something when they went from Q4 to Q5. Does anyone have ...
2014/07/25
[ "https://Stackoverflow.com/questions/24963081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3878223/" ]
You're not passing the *absolute* path of the file to `QFile::open()`, and you're not checking the result of opening the file. In your case, it's a failure and `open()` returns false, but you're ignoring it, instead of fixing the problem (the wrong path) that caused it. This has zilch to do with Qt 4 -> Qt 5 upgrade, ...
this is mostly the case if you close a file which is not opened - so just remove the close statement for example: ``` file->close(); ``` just remove it ;)
25,650,055
I am using linux/cpython 3.3/bash. Here's my problem: ``` #!/usr/bin/env python3 from subprocess import Popen, PIPE, DEVNULL import time s = Popen('cat', stdin=PIPE, stdout=DEVNULL, stderr=DEVNULL) s.stdin.write(b'helloworld') s.stdin.close() time.sleep(1000) #doing stuff ``` This leaves `cat` as a zombie (and ...
2014/09/03
[ "https://Stackoverflow.com/questions/25650055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1055323/" ]
Run the subprocess from another process whose only task is to wait on it. ``` pid = os.fork() if pid == 0: s = Popen('cat', stdin=PIPE, stdout=DEVNULL, stderr=DEVNULL) s.stdin.write(b'helloworld') s.stdin.close() s.wait() sys.exit() time.sleep(1000) ```
One workaround might be to "daemonize" your cat: fork, then quickly fork again and exit in the 2nd process, with the 1st one wait()ing for the 2nd. The 3rd process can then exec() `cat`, which will inherit its file descriptors from its parent. Thus you need to create a pipe first, then close stdin in the child and dup(...
60,369,674
I want to find all possible maximum contiguous subarray averages from an array of values. Each array value represents the value at a duration, the number of seconds passed. Ex. Input = [6, 4, 3, 10, 5] Ex. Output = [5.6, 5.75, 6, 7.5, 10] Output[0] = 6+4+3+10+5 / 5 = 5.6 Output[1] = 6+4+3+10 / 4 = 5.75 Output[2] =...
2020/02/24
[ "https://Stackoverflow.com/questions/60369674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10901806/" ]
I was also getting the same error for Oozie 5.2.0 . It was very frustrating. So, here it says having 2 incompatible versions of Guava causes this error: <https://issues.apache.org/jira/browse/HIVE-22915> This is what worked for me: I checked the jars in libext folder first.There was only guava-27.0-jre.jar file. ``...
Because `Log4j2` and `Log4j` conflict,Delete all `log4j2` packages in oozie/lib. example: `log4j-1.2-api-2.6.2.jar log4j-api-2.6.2.jar log4j-core-2.6.2.jar log4j-slf4j-impl-2.6.2.jar log4j-web-2.6.2.jar`
40,469,424
How do i create a Set in F# with elements from 1111 to 6666 without any values being 0, 7 or higher. E.g. `[1111,1112,1113,1114,1115,1116,1121]` I'd like to make it a set. Thanks in advance
2016/11/07
[ "https://Stackoverflow.com/questions/40469424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6797835/" ]
You can use a sequence comprehension: ``` let values = seq { for i in 1110 .. 10 .. 6660 do for j in 1 .. 6 do yield i + j } ``` and create a set using `Set.ofSeq` e.g. ``` let s = Set.ofSeq values ```
There must be an easier way than: ``` let values = seq { for a in 1000 .. 1000 .. 6000 do for b in 100 .. 100 .. 600 do for c in 10 .. 10 .. 60 do for d in 1 .. 6 do yield a + b + c + d } ```
281,438
We have had issues with Mootools not being very backward compatible specifically in the area of drag and drop functionality. I was wondering if anyone has had any similar problems with jQuery not being backward compatible. We are starting to use it quite heavily and are thinking about upgrading to a newer version to st...
2008/11/11
[ "https://Stackoverflow.com/questions/281438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2486/" ]
jQuery seems to be nicely backward compatible. I have been using it for more than a couple of years now through several versions of the core and have not had issues when upgrading except a few minor ones with some plugins. I would say that the core seems to be fine but if you're using a lot of plugins you might run int...
jQuery is so serious about backwards compatibility that they produce a "backwards compatibility" plugin for each release: <http://docs.jquery.com/Release:jQuery_1.2#jQuery_1.1_Compatibility_Plugin>. It let people who don't need backwards compatibility save on page weight.
281,438
We have had issues with Mootools not being very backward compatible specifically in the area of drag and drop functionality. I was wondering if anyone has had any similar problems with jQuery not being backward compatible. We are starting to use it quite heavily and are thinking about upgrading to a newer version to st...
2008/11/11
[ "https://Stackoverflow.com/questions/281438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2486/" ]
jQuery seems to be nicely backward compatible. I have been using it for more than a couple of years now through several versions of the core and have not had issues when upgrading except a few minor ones with some plugins. I would say that the core seems to be fine but if you're using a lot of plugins you might run int...
*My experience* is that when upgrading, I sometimes find that stuff that used to work breaks. For instance, when upgrading from 1.7.2 to 1.8.3 I found some drag-and-drop features stopped working. Some problems may be due to deprecated jQuery functions being dropped, still in use by incompatible versions of [jQuery UI](...