qid int64 46k 74.7M | question stringlengths 54 37.8k | date stringlengths 10 10 | metadata listlengths 3 3 | response_j stringlengths 17 26k | response_k stringlengths 26 26k |
|---|---|---|---|---|---|
39,845,636 | I have the latest version of pip 8.1.1 on my ubuntu 16.
But I am not able to install any modules via pip as I get this error all the time.
```
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <... | 2016/10/04 | [
"https://Stackoverflow.com/questions/39845636",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5474316/"
] | I repaired mine this with command:
>
> easy\_install pip
>
>
> | This is an issue with Homebrew that occurs when upgrading pip. Working off the answer by @amangpt777, the following worked for me!
You can still access pip by using python -m pip. Hence, you can get your pip version by running:
```
python -m pip --version
```
Copy the version and update the following files with th... |
39,845,636 | I have the latest version of pip 8.1.1 on my ubuntu 16.
But I am not able to install any modules via pip as I get this error all the time.
```
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <... | 2016/10/04 | [
"https://Stackoverflow.com/questions/39845636",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5474316/"
] | I repaired mine this with command:
>
> easy\_install pip
>
>
> | I did not manage to get it to work by using `easy_install pip` or updating the pip configuration file `/usr/local/bin/pip`.
Instead, I removed pip and installed the distribution required by the conf file:
>
> Uninstalling pip:
>
>
>
`$ sudo apt purge python-pip` or `$ sudo yum remove python-pip`
>
> Reinstalli... |
39,845,636 | I have the latest version of pip 8.1.1 on my ubuntu 16.
But I am not able to install any modules via pip as I get this error all the time.
```
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <... | 2016/10/04 | [
"https://Stackoverflow.com/questions/39845636",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5474316/"
] | After upgrading from 18.0 to 18.1, I got the same error. Reinstalling the program(without using pip itself) worked for me:
```
$ curl https://bootstrap.pypa.io/get-pip.py > get-pip.py
$ sudo python get-pip.py
``` | On mac this can be fixed with brew
```
brew reinstall python
``` |
39,845,636 | I have the latest version of pip 8.1.1 on my ubuntu 16.
But I am not able to install any modules via pip as I get this error all the time.
```
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <... | 2016/10/04 | [
"https://Stackoverflow.com/questions/39845636",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5474316/"
] | Delete all of the pip/pip3 stuff under .local including the packages.
```
sudo apt-get purge python-pip python3-pip
```
Now remove all pip3 files from local
```
sudo rm -rf /usr/local/bin/pip3
```
you can check which pip is installed other wise execute below one to remove all (No worries)
```
sudo rm -rf /usr/lo... | Just relink to resolve it. Find which python : `ls -l /usr/local/bin/python`
```
ln -sf /usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/bin/pip /usr/local/bin/pip
```
Or reinstall pip: <https://pip.pypa.io/en/stable/installing/> |
39,845,636 | I have the latest version of pip 8.1.1 on my ubuntu 16.
But I am not able to install any modules via pip as I get this error all the time.
```
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <... | 2016/10/04 | [
"https://Stackoverflow.com/questions/39845636",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5474316/"
] | I had this issue for a very long time until I recently found that my 'pip' file (/usr/local/bin/pip) is trying to load the wrong version of pip. I believe you also have 8.1.1 correctly installed on your machine and can give following a try.
1. Open your /usr/local/bin/pip file. For me it looks like :
```
__requires__... | Delete all of the pip/pip3 stuff under .local including the packages.
```
sudo apt-get purge python-pip python3-pip
```
Now remove all pip3 files from local
```
sudo rm -rf /usr/local/bin/pip3
```
you can check which pip is installed other wise execute below one to remove all (No worries)
```
sudo rm -rf /usr/lo... |
39,845,636 | I have the latest version of pip 8.1.1 on my ubuntu 16.
But I am not able to install any modules via pip as I get this error all the time.
```
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <... | 2016/10/04 | [
"https://Stackoverflow.com/questions/39845636",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5474316/"
] | I repaired mine this with command:
>
> easy\_install pip
>
>
> | After a large upgrade in Mint -> 19, my system was a bit weird and I came across this problem too.
I checked the answer from @amangpt777 that may be the one to try
```
/usr/local/bin/pip # -> actually had a shebang calling python3
~/.local/bin/pip* # files were duplicated with the "sudo installed" /usr/local/bin/pip... |
39,845,636 | I have the latest version of pip 8.1.1 on my ubuntu 16.
But I am not able to install any modules via pip as I get this error all the time.
```
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <... | 2016/10/04 | [
"https://Stackoverflow.com/questions/39845636",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5474316/"
] | if you have 2 versions of pip for example `/usr/lib/pip` and `/usr/local/lib/pip` belongs to python 2.6 and 2.7.
you can delete the `/usr/lib/pip` and make a link pip=>/usr/local/lib/pip. | After a large upgrade in Mint -> 19, my system was a bit weird and I came across this problem too.
I checked the answer from @amangpt777 that may be the one to try
```
/usr/local/bin/pip # -> actually had a shebang calling python3
~/.local/bin/pip* # files were duplicated with the "sudo installed" /usr/local/bin/pip... |
39,845,636 | I have the latest version of pip 8.1.1 on my ubuntu 16.
But I am not able to install any modules via pip as I get this error all the time.
```
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <... | 2016/10/04 | [
"https://Stackoverflow.com/questions/39845636",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5474316/"
] | I had this issue for a very long time until I recently found that my 'pip' file (/usr/local/bin/pip) is trying to load the wrong version of pip. I believe you also have 8.1.1 correctly installed on your machine and can give following a try.
1. Open your /usr/local/bin/pip file. For me it looks like :
```
__requires__... | This is an issue with Homebrew that occurs when upgrading pip. Working off the answer by @amangpt777, the following worked for me!
You can still access pip by using python -m pip. Hence, you can get your pip version by running:
```
python -m pip --version
```
Copy the version and update the following files with th... |
63,835,086 | If I have a dataframe with the following layout:
```
ID# Response
1234 Covid-19 was a disaster for my business
3456 The way you handled this pandemic was awesome
```
I want to be able to count frequency of specific words from a list.
```
list=['covid','COVID','Covid-19','pandemic','coronavirus']
```
... | 2020/09/10 | [
"https://Stackoverflow.com/questions/63835086",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13000877/"
] | For each string, find number of matches.
```
dict((s, df['response'].str.count(s).fillna(0).sum()) for s in list_of_strings)
```
Note that `Series.str.count` takes a regex input. You may want to append `(?=\b)` for positive look-ahead word-endings.
`Series.str.count` returns `NA` when counting `NA`, thus, fill with... | ```
import pandas as pd
import numpy as np
df = pd.DataFrame({'sheet':['sheet1', 'sheet2', 'sheet3', 'sheet2'],
'tokenized_text':[['efcc', 'fficial', 'billiontwits', 'since', 'covid', 'landed'], ['when', 'people', 'say', 'the', 'fatality', 'rate', 'of', 'coronavirus', 'is'], ['in', 'the', 'coronavirus-induced', 'c... |
63,835,086 | If I have a dataframe with the following layout:
```
ID# Response
1234 Covid-19 was a disaster for my business
3456 The way you handled this pandemic was awesome
```
I want to be able to count frequency of specific words from a list.
```
list=['covid','COVID','Covid-19','pandemic','coronavirus']
```
... | 2020/09/10 | [
"https://Stackoverflow.com/questions/63835086",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13000877/"
] | ```
import pandas as pd
import numpy as np
df = pd.DataFrame({'sheet':['sheet1', 'sheet2', 'sheet3', 'sheet2'],
'tokenized_text':[['efcc', 'fficial', 'billiontwits', 'since', 'covid', 'landed'], ['when', 'people', 'say', 'the', 'fatality', 'rate', 'of', 'coronavirus', 'is'], ['in', 'the', 'coronavirus-induced', 'c... | Try with `np.hstack` and `Counter`:
```
from collections import Counter
a = np.hstack(df['Response'].str.split())
dct = {**dict.fromkeys(lst, 0), **Counter(a[np.isin(a, lst)])}
```
---
```
{'covid': 0, 'COVID': 0, 'Covid-19': 1, 'pandemic': 1, 'coronavirus': 0}
``` |
63,835,086 | If I have a dataframe with the following layout:
```
ID# Response
1234 Covid-19 was a disaster for my business
3456 The way you handled this pandemic was awesome
```
I want to be able to count frequency of specific words from a list.
```
list=['covid','COVID','Covid-19','pandemic','coronavirus']
```
... | 2020/09/10 | [
"https://Stackoverflow.com/questions/63835086",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13000877/"
] | ```
import pandas as pd
import numpy as np
df = pd.DataFrame({'sheet':['sheet1', 'sheet2', 'sheet3', 'sheet2'],
'tokenized_text':[['efcc', 'fficial', 'billiontwits', 'since', 'covid', 'landed'], ['when', 'people', 'say', 'the', 'fatality', 'rate', 'of', 'coronavirus', 'is'], ['in', 'the', 'coronavirus-induced', 'c... | You could do it very simply with a dict of comprehension :
```
{x:df.Response.str.count(x).sum() for x in list}
```
Output
```
{'covid': 0, 'COVID': 0, 'Covid-19': 1, 'pandemic': 1, 'coronavirus': 0}
``` |
63,835,086 | If I have a dataframe with the following layout:
```
ID# Response
1234 Covid-19 was a disaster for my business
3456 The way you handled this pandemic was awesome
```
I want to be able to count frequency of specific words from a list.
```
list=['covid','COVID','Covid-19','pandemic','coronavirus']
```
... | 2020/09/10 | [
"https://Stackoverflow.com/questions/63835086",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13000877/"
] | For each string, find number of matches.
```
dict((s, df['response'].str.count(s).fillna(0).sum()) for s in list_of_strings)
```
Note that `Series.str.count` takes a regex input. You may want to append `(?=\b)` for positive look-ahead word-endings.
`Series.str.count` returns `NA` when counting `NA`, thus, fill with... | Try with `np.hstack` and `Counter`:
```
from collections import Counter
a = np.hstack(df['Response'].str.split())
dct = {**dict.fromkeys(lst, 0), **Counter(a[np.isin(a, lst)])}
```
---
```
{'covid': 0, 'COVID': 0, 'Covid-19': 1, 'pandemic': 1, 'coronavirus': 0}
``` |
63,835,086 | If I have a dataframe with the following layout:
```
ID# Response
1234 Covid-19 was a disaster for my business
3456 The way you handled this pandemic was awesome
```
I want to be able to count frequency of specific words from a list.
```
list=['covid','COVID','Covid-19','pandemic','coronavirus']
```
... | 2020/09/10 | [
"https://Stackoverflow.com/questions/63835086",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13000877/"
] | For each string, find number of matches.
```
dict((s, df['response'].str.count(s).fillna(0).sum()) for s in list_of_strings)
```
Note that `Series.str.count` takes a regex input. You may want to append `(?=\b)` for positive look-ahead word-endings.
`Series.str.count` returns `NA` when counting `NA`, thus, fill with... | You could do it very simply with a dict of comprehension :
```
{x:df.Response.str.count(x).sum() for x in list}
```
Output
```
{'covid': 0, 'COVID': 0, 'Covid-19': 1, 'pandemic': 1, 'coronavirus': 0}
``` |
63,835,086 | If I have a dataframe with the following layout:
```
ID# Response
1234 Covid-19 was a disaster for my business
3456 The way you handled this pandemic was awesome
```
I want to be able to count frequency of specific words from a list.
```
list=['covid','COVID','Covid-19','pandemic','coronavirus']
```
... | 2020/09/10 | [
"https://Stackoverflow.com/questions/63835086",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13000877/"
] | Try with `np.hstack` and `Counter`:
```
from collections import Counter
a = np.hstack(df['Response'].str.split())
dct = {**dict.fromkeys(lst, 0), **Counter(a[np.isin(a, lst)])}
```
---
```
{'covid': 0, 'COVID': 0, 'Covid-19': 1, 'pandemic': 1, 'coronavirus': 0}
``` | You could do it very simply with a dict of comprehension :
```
{x:df.Response.str.count(x).sum() for x in list}
```
Output
```
{'covid': 0, 'COVID': 0, 'Covid-19': 1, 'pandemic': 1, 'coronavirus': 0}
``` |
9,377,801 | I would like to know how practical it would be to create a program which takes handwritten characters in some form, analyzes them, and offers corrections to the user. The inspiration for this idea is to have elementary school students in other countries or University students in America learn how to write in languages ... | 2012/02/21 | [
"https://Stackoverflow.com/questions/9377801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1223327/"
] | Character Recognition is usually implemented using Artificial Neural Networks ([ANNs](http://en.wikipedia.org/wiki/Artificial_neural_network)). It is not a straightforward task to implement seeing that there are usually lots of ways in which different people write the same character.
The good thing about neural netwo... | Have you seen <http://www.skritter.com>? They do this in combination with spaced recognition scheduling.
I guess you want to classify features such as curves in your strokes (http://en.wikipedia.org/wiki/CJK\_strokes), then as a next layer identify componenents, then estimate the most likely character. All the while s... |
9,377,801 | I would like to know how practical it would be to create a program which takes handwritten characters in some form, analyzes them, and offers corrections to the user. The inspiration for this idea is to have elementary school students in other countries or University students in America learn how to write in languages ... | 2012/02/21 | [
"https://Stackoverflow.com/questions/9377801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1223327/"
] | You can follow company links from this Wikipedia article:
<http://en.wikipedia.org/wiki/Intelligent_character_recognition>
I would not recommend that you attempt to implement a solution yourself, especially if you want to complete the task in less than a year or two of full-time work. It would be unfortunate if an in... | Have you seen <http://www.skritter.com>? They do this in combination with spaced recognition scheduling.
I guess you want to classify features such as curves in your strokes (http://en.wikipedia.org/wiki/CJK\_strokes), then as a next layer identify componenents, then estimate the most likely character. All the while s... |
26,743,269 | From the [Python docs](https://docs.python.org/2/library/heapq.html):
>
> The latter two functions [heapq.nlargest and heapq.nsmallest] perform best for smaller values of n. For
> larger values, it is more efficient to use the sorted() function.
> Also, when n==1, it is more efficient to use the built-in min() and
... | 2014/11/04 | [
"https://Stackoverflow.com/questions/26743269",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1032973/"
] | The `nsmallest` and `nlargest` methods available from `heapq` do not assume that the argument passed to them is already in heap format. Instead, they seek to "heapify" the argument as they traverse it, which will be more efficient than outright sorting for the top-k elements for small values of k, but for k exactly equ... | If you need just to pick one minimum element on a heapified list just do list[0]:
```
import heapq
lst = [1,-1,100,200]
heapq.heapify(lst)
min_value = lst[0]
```
Doc above refers to getting n smallest numbers, and heap is not the most efficient data structure to do that if n is large. |
44,773,983 | I have two following files:
**testcase\_module.py**
```
import boto3
ec2 = boto3.resource('ec2')
def f():
return ec2.instances.all()
```
**testcase\_test.py**
```
import testcase_module
import unittest.mock
class MainTest(unittest.TestCase):
@unittest.mock.patch('testcase_module.ec2', spec_set=['instanc... | 2017/06/27 | [
"https://Stackoverflow.com/questions/44773983",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1906088/"
] | Try using `mock_add_spec`.
`ec2_mock.instances.mock_add_spec(['all'], spec_set=True)`
Link: <https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.mock_add_spec> | What about doing it like this:
```
@unittest.mock.patch('testcase_module.boto3.resource', autospec=True)
def test_f(self, ec2_resource_mock):
class InstanceStub(object):
def all(self):
return [...]
ec2_resource_mock.return_value = mock.create_autospec(
EC2InstanceType, instances=Ins... |
71,957,239 | How can I get the largest key with the largest value in python dictionary. In the below example you can see 1 and 2 have same frequency. But i want to return the larger key.
```
nums = [1,2,2,3,1]
frq = {}
for i in nums:
if i not in frq:
frq[i] = 1
else:
... | 2022/04/21 | [
"https://Stackoverflow.com/questions/71957239",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11416278/"
] | Have your `key` function return a tuple of the value and the associated key. The first element of the tuple is compared first, the second will break ties.
```
>>> from collections import Counter
>>> nums = [1, 2, 2, 3, 1]
>>> frq = Counter(nums)
>>> max(frq, key=lambda n: (frq[n], n))
2
```
Note that `collections.Co... | You can use tuple comparison for the keys to compare keys based on their frequencies, and then tiebreak based on the actual value of the key only if the frequencies are the same:
```py
frequency = max(frq, key=lambda x: (frq.get(x), x))
```
With this change, this outputs:
```py
2
``` |
71,957,239 | How can I get the largest key with the largest value in python dictionary. In the below example you can see 1 and 2 have same frequency. But i want to return the larger key.
```
nums = [1,2,2,3,1]
frq = {}
for i in nums:
if i not in frq:
frq[i] = 1
else:
... | 2022/04/21 | [
"https://Stackoverflow.com/questions/71957239",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11416278/"
] | Have your `key` function return a tuple of the value and the associated key. The first element of the tuple is compared first, the second will break ties.
```
>>> from collections import Counter
>>> nums = [1, 2, 2, 3, 1]
>>> frq = Counter(nums)
>>> max(frq, key=lambda n: (frq[n], n))
2
```
Note that `collections.Co... | You can try this, which sorts first on frequency and then on key:
```py
nums = [1,2,2,3,1]
frq = {}
for i in nums:
if i not in frq:
frq[i] = 1
else:
frq[i] += 1
frequency = max(frq, key=lambda x: (frq.get(x), x))
print(frequency)
```
Output:
```
2
```
Alternatively, you can use the Count... |
38,506,250 | i want to take input from user in and each value of the input is on consecutive line.this is to be implemented in python
```
while x=int(raw_input()): ##<=showing error at this line
print(x)
gollum(x)
#the function gollum() has to be called if the input is present
``` | 2016/07/21 | [
"https://Stackoverflow.com/questions/38506250",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6590204/"
] | There are no other ways with HTTP (except what HTTP allows, as already mentioned).
But there are many other ways to transfer data from server to server, like FTP or establishing a direct socket connection.
Note that you will need install/configure such additional ways, and maybe not only on the server (for communica... | **Session :**
A session is stored on the server and cannot be accessed by the user (client). It is used to store information across the site such as login sessions. It can be used to store information in the server side, and pass between different php scripts
Note that session creates a session cookie for identificat... |
38,506,250 | i want to take input from user in and each value of the input is on consecutive line.this is to be implemented in python
```
while x=int(raw_input()): ##<=showing error at this line
print(x)
gollum(x)
#the function gollum() has to be called if the input is present
``` | 2016/07/21 | [
"https://Stackoverflow.com/questions/38506250",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6590204/"
] | You may use encrypted cookies: <https://packagist.org/packages/illuminate/cookie> to store an encoded key. Based on that decoded key you can save and read from database+Memcache layer | **Session :**
A session is stored on the server and cannot be accessed by the user (client). It is used to store information across the site such as login sessions. It can be used to store information in the server side, and pass between different php scripts
Note that session creates a session cookie for identificat... |
13,620,633 | Given the URL <http://www.smartmoney.com/quote/FAST/?story=financials&timewindow=1&opt=YB&isFinprint=1&framework.view=smi_emptyView> , how would you capture and print the contents of an entire row of data?
For example, what would it take to get an output that looked something like:
"Cash & Short Term Investments 144,... | 2012/11/29 | [
"https://Stackoverflow.com/questions/13620633",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/776739/"
] | ```
In [18]: doc.xpath(u'.//th[div[text()="Cash & Short Term Investments"]]/following-sibling::td/text()')
Out[18]: [' 144,841', ' 169,760', ' 189,252', ' 86,743', ' 57,379']
```
or you can define a little function to get the rows by text:
```
In [19]: def func(doc,txt):
...: exp=u'.//th[div[text... | let html holds the html source code:
```
import lxm.html
doc = lxml.html.document_fromstring(html)
rows_element = doc.xpath('/html/body/div/div[2]/div/div[5]/div/div/table/tbody/tr')
for row in rows_element:
print row.text_content()
```
not tested but should work
P.S.Install xpath cheker or firefinder in firef... |
17,669,095 | I'm trying find exactly what's wrong with a larger job that I'm trying to schedule with launchd for the first time. So I made the simplest python file I could think of, `print 'running test'`, titled it `com.schedulertest.plist` and then made a plist file like so:
```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE p... | 2013/07/16 | [
"https://Stackoverflow.com/questions/17669095",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1844086/"
] | So the answer was not a big deal, but it might help others to share the solution. I had simply forgotten, as we will when moving around several virtualenvs, which python I was in. If you're having trouble and your `.plist` and script seem well-formed, it won't hurt to run `which python` etc, and check the result agains... | ### Troubleshooting
* To debug `.plist`, you can check the log for any error, e.g.
```
tail -f /var/log/system.log
```
To specify custom log, use:
```
<key>StandardOutPath</key>
<string>/var/log/myjob.log</string>
<key>StandardErrorPath</key>
<string>/var/log/myjob.log</string>
```
* To find the latest exit statu... |
51,760,986 | I was going through the CPython source code I found the following piece of code from the standard library([`ast.py`](https://github.com/python/cpython/blob/master/Lib/ast.py#L60)).
```
if isinstance(node.op, UAdd):
return + operand
else:
return - operand
```
I tried the follow... | 2018/08/09 | [
"https://Stackoverflow.com/questions/51760986",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6699447/"
] | plus and minus in this context are [unary operators](https://en.wikipedia.org/wiki/Unary_operation). That is, they accept **a single operand**. This is in comparison to the binary operator `*` (for example) that operates on **two operands**. Evidently `+1` is just `1`. So the unary operator `+` in your return statement... | `return + operand` is equivalent to `return operand` (if operand is a number). The only purpose I see is to insist on the fact that we do not want the opposite of `operand`. |
51,760,986 | I was going through the CPython source code I found the following piece of code from the standard library([`ast.py`](https://github.com/python/cpython/blob/master/Lib/ast.py#L60)).
```
if isinstance(node.op, UAdd):
return + operand
else:
return - operand
```
I tried the follow... | 2018/08/09 | [
"https://Stackoverflow.com/questions/51760986",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6699447/"
] | I haven't studied the code, so I don't know for sure, but Python allows overriding [unary operator behavior](https://docs.python.org/3/library/operator.html):
>
> `__pos__(self)` Implements behavior for unary positive (e.g. +some\_object)
>
>
> `__neg__(self)` Implements behavior for negation (e.g. -some\_object)
>... | `return + operand` is equivalent to `return operand` (if operand is a number). The only purpose I see is to insist on the fact that we do not want the opposite of `operand`. |
51,760,986 | I was going through the CPython source code I found the following piece of code from the standard library([`ast.py`](https://github.com/python/cpython/blob/master/Lib/ast.py#L60)).
```
if isinstance(node.op, UAdd):
return + operand
else:
return - operand
```
I tried the follow... | 2018/08/09 | [
"https://Stackoverflow.com/questions/51760986",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6699447/"
] | plus and minus in this context are [unary operators](https://en.wikipedia.org/wiki/Unary_operation). That is, they accept **a single operand**. This is in comparison to the binary operator `*` (for example) that operates on **two operands**. Evidently `+1` is just `1`. So the unary operator `+` in your return statement... | Both `+` and `-` can be used as unary or binary operators. In your case they are used as unary operators. `return + operand` is the same as `return operand`. We are used to see them in the form of `return +operand` or `return -operand`. |
51,760,986 | I was going through the CPython source code I found the following piece of code from the standard library([`ast.py`](https://github.com/python/cpython/blob/master/Lib/ast.py#L60)).
```
if isinstance(node.op, UAdd):
return + operand
else:
return - operand
```
I tried the follow... | 2018/08/09 | [
"https://Stackoverflow.com/questions/51760986",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6699447/"
] | I haven't studied the code, so I don't know for sure, but Python allows overriding [unary operator behavior](https://docs.python.org/3/library/operator.html):
>
> `__pos__(self)` Implements behavior for unary positive (e.g. +some\_object)
>
>
> `__neg__(self)` Implements behavior for negation (e.g. -some\_object)
>... | Both `+` and `-` can be used as unary or binary operators. In your case they are used as unary operators. `return + operand` is the same as `return operand`. We are used to see them in the form of `return +operand` or `return -operand`. |
51,760,986 | I was going through the CPython source code I found the following piece of code from the standard library([`ast.py`](https://github.com/python/cpython/blob/master/Lib/ast.py#L60)).
```
if isinstance(node.op, UAdd):
return + operand
else:
return - operand
```
I tried the follow... | 2018/08/09 | [
"https://Stackoverflow.com/questions/51760986",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6699447/"
] | plus and minus in this context are [unary operators](https://en.wikipedia.org/wiki/Unary_operation). That is, they accept **a single operand**. This is in comparison to the binary operator `*` (for example) that operates on **two operands**. Evidently `+1` is just `1`. So the unary operator `+` in your return statement... | I haven't studied the code, so I don't know for sure, but Python allows overriding [unary operator behavior](https://docs.python.org/3/library/operator.html):
>
> `__pos__(self)` Implements behavior for unary positive (e.g. +some\_object)
>
>
> `__neg__(self)` Implements behavior for negation (e.g. -some\_object)
>... |
67,685,667 | I have a problem when I want to host an HTML file using python on the web server.
I go to cmd and type this in:
```
python -m http.server
```
The command works but when I open the domain name I get a list of HTML pages, which I can click and they open. How can I make it so that when I open the domain in chrome it i... | 2021/05/25 | [
"https://Stackoverflow.com/questions/67685667",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14456620/"
] | You can add additional options:
```
python -m http.server --directory C:/ESD/ --bind 127.0.0.1
```
`--directory` will tell python in which folder to look for html files, here i specified the path `C:/ESD/`
`--bind` will tell python on which ip the server should run at
If you want to directly open the file instead ... | *it works but when I open it up in chrome it shows me lists of my html files and when I click on one it goes to it.*
This is expected behavior.
*how can I do it so that when I open it in chrome it immediately shows me the main.html?*
Rename `main.html` to `index.html`. As [docs](https://docs.python.org/3/library/htt... |
25,000,994 | I tried to install pyFFTW 0.9.2 to OSX mavericks, but I encounter the following errors:
```
/usr/bin/clang -bundle -undefined dynamic_lookup
-L//anaconda/lib -arch x86_64 -arch x86_64
build/temp.macosx-10.5-x86_64-2.7/anaconda/lib/python2.7/site-packages/pyFFTW-master/pyfftw/pyfftw.o
-L//anaconda/lib -lfftw3 -lfftw3... | 2014/07/28 | [
"https://Stackoverflow.com/questions/25000994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3885085/"
] | I had the same issue on OSX 10.9.4 Maverick.
Try this:
download FFTW 3.3.4 than open a terminal window and go in the extracted FFTW directory and run these commands:
```
$ ./configure --enable-long-double --enable-threads
$ make
$ sudo make install
$ ./configure --enable-float --enable-threads
$ make
$ sudo make insta... | I'm using MacOX 10.11.4 and Python 3.5.1 installed through `conda` and the above answer didn't work for me.
I would still get this error:
```
ld: library not found for -lfftw3l
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
-------------... |
32,171,138 | I need to generate all possible strings of certain length X that satisfies the following two rules:
1. Must end with '0'
2. There can't be two or more adjacent '1'
For example, when X = 4, all 'legal' strings are [0000, 0010, 0100, 1000, 1010].
I already wrote a piece of recursive code that simply append the newly f... | 2015/08/23 | [
"https://Stackoverflow.com/questions/32171138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2759486/"
] | Assuming you're using python version >= 3.4, where `yield from` is available, you can `yield` instead of accumulating+returning. You don't need to pass around a container.
```
def generate(pre0, pre1, cur_len, max_len):
if (cur_len == max_len-1):
yield "".join((pre0, pre1, "0"))
return
if (pre... | If you were doing it in Python 3, you would adapt it as follows:
* Remove the `container` parameter.
* Change all occurrences of `container.append(*some\_value*)` to `yield *some\_value*`.
* Prepend `yield from` to all recursive calls.
To do it in Python 2, you do the same, except that Python 2 doesn’t support `yield... |
32,171,138 | I need to generate all possible strings of certain length X that satisfies the following two rules:
1. Must end with '0'
2. There can't be two or more adjacent '1'
For example, when X = 4, all 'legal' strings are [0000, 0010, 0100, 1000, 1010].
I already wrote a piece of recursive code that simply append the newly f... | 2015/08/23 | [
"https://Stackoverflow.com/questions/32171138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2759486/"
] | Lame string-based testing whether "11" is contained in the formatted string and yield if it's not (for every even number up to 2^maxlen):
```
def gen(maxlen):
pattern = "{{:0{}b}}".format(maxlen)
for i in range(0, 2**maxlen, 2):
s = pattern.format(i) # not ideal, because we always format to test for "1... | Assuming you're using python version >= 3.4, where `yield from` is available, you can `yield` instead of accumulating+returning. You don't need to pass around a container.
```
def generate(pre0, pre1, cur_len, max_len):
if (cur_len == max_len-1):
yield "".join((pre0, pre1, "0"))
return
if (pre... |
32,171,138 | I need to generate all possible strings of certain length X that satisfies the following two rules:
1. Must end with '0'
2. There can't be two or more adjacent '1'
For example, when X = 4, all 'legal' strings are [0000, 0010, 0100, 1000, 1010].
I already wrote a piece of recursive code that simply append the newly f... | 2015/08/23 | [
"https://Stackoverflow.com/questions/32171138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2759486/"
] | You can use a `filter` with [`itertools.product`](https://docs.python.org/3/library/itertools.html#itertools.product)
```
def generate(max_len):
return list(filter(lambda i: '11' not in i, (''.join(i) + '0' for i in itertools.product('01', repeat=max_len-1))))
```
This uses generators the entire time until the r... | If you were doing it in Python 3, you would adapt it as follows:
* Remove the `container` parameter.
* Change all occurrences of `container.append(*some\_value*)` to `yield *some\_value*`.
* Prepend `yield from` to all recursive calls.
To do it in Python 2, you do the same, except that Python 2 doesn’t support `yield... |
32,171,138 | I need to generate all possible strings of certain length X that satisfies the following two rules:
1. Must end with '0'
2. There can't be two or more adjacent '1'
For example, when X = 4, all 'legal' strings are [0000, 0010, 0100, 1000, 1010].
I already wrote a piece of recursive code that simply append the newly f... | 2015/08/23 | [
"https://Stackoverflow.com/questions/32171138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2759486/"
] | Lame string-based testing whether "11" is contained in the formatted string and yield if it's not (for every even number up to 2^maxlen):
```
def gen(maxlen):
pattern = "{{:0{}b}}".format(maxlen)
for i in range(0, 2**maxlen, 2):
s = pattern.format(i) # not ideal, because we always format to test for "1... | If you were doing it in Python 3, you would adapt it as follows:
* Remove the `container` parameter.
* Change all occurrences of `container.append(*some\_value*)` to `yield *some\_value*`.
* Prepend `yield from` to all recursive calls.
To do it in Python 2, you do the same, except that Python 2 doesn’t support `yield... |
32,171,138 | I need to generate all possible strings of certain length X that satisfies the following two rules:
1. Must end with '0'
2. There can't be two or more adjacent '1'
For example, when X = 4, all 'legal' strings are [0000, 0010, 0100, 1000, 1010].
I already wrote a piece of recursive code that simply append the newly f... | 2015/08/23 | [
"https://Stackoverflow.com/questions/32171138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2759486/"
] | Lame string-based testing whether "11" is contained in the formatted string and yield if it's not (for every even number up to 2^maxlen):
```
def gen(maxlen):
pattern = "{{:0{}b}}".format(maxlen)
for i in range(0, 2**maxlen, 2):
s = pattern.format(i) # not ideal, because we always format to test for "1... | You can use a `filter` with [`itertools.product`](https://docs.python.org/3/library/itertools.html#itertools.product)
```
def generate(max_len):
return list(filter(lambda i: '11' not in i, (''.join(i) + '0' for i in itertools.product('01', repeat=max_len-1))))
```
This uses generators the entire time until the r... |
22,398,881 | I have a Django app on Heroku. I set up another app on the same Heroku account.
Now I want another instance of the first app.
I just cloned the first app and pushed into the newly created app, but it's not working.
Got this error when doing `git push heroku master`
```
Running setup.py install for distribut... | 2014/03/14 | [
"https://Stackoverflow.com/questions/22398881",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2088432/"
] | This appears to be related to an issue [here](https://bitbucket.org/tarek/distribute/issue/91/install-glitch-when-using-pip-virtualenv#comment-5782834).
In other words, `distribute` has been deprecated and is being replaced with `setuptools`. Try replacing the line `distribute==0.6.27` with `setuptools>=0.7` as per th... | virtualenv is a tool to create isolated Python environments.
you will need to add the following to fix `command python setup.py egg_info failed with error code 1`, so inside your requirements.txt add this:
>
> virtualenv==12.0.7
>
>
> |
45,335,659 | Let's say I have the following simple situation:
```
import pandas as pd
def multiply(row):
global results
results.append(row[0] * row[1])
def main():
results = []
df = pd.DataFrame([{'a': 1, 'b': 2}, {'a': 3, 'b': 4}, {'a': 5, 'b': 6}])
df.apply(multiply, axis=1)
print(results)
if __name__ ... | 2017/07/26 | [
"https://Stackoverflow.com/questions/45335659",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2789863/"
] | You must declare results outside the functions like:
```
import pandas as pd
results = []
def multiply(row):
# the rest of your code...
```
### UPDATE
Also note that `list` in python is mutable, hence you don't need to specify it with global in the beginning of the functions. Example
```
def multiply(row):
... | You must move results outside of the function. I don't think there is any other way without moving the variable out.
One way is to pass results as a parameter to multiply method. |
49,495,211 | When I run **virt-manager --no-fork** on macOS 10.13 High Sierra I get the following:
```
Traceback (most recent call last):
File "/usr/local/Cellar/virt-manager/1.5.0/libexec/share/virt-manager/virt-manager", line 31, in <module>
import gi
ImportError: No module named gi
```
python version 2.7.6 on macOS
Tri... | 2018/03/26 | [
"https://Stackoverflow.com/questions/49495211",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2575019/"
] | On debian 9.7 I had the same problem, I fixed:
```sh
apt install python-gobject-2-dev python-gobject-dev libvirt-glib-1.0-dev python3-libxml2 libosinfo-1.0-dev
```
 | (Arch-linux) I have anaconda installed which breaks virt-manager. But there is no need to uninstall it, just renamed anaconda folder to anything else and virt-manager works again. When need to use anaconda, undo the folder name change. Anaconda modifies PATH environment and when the folder is not present (the trick to ... |
4,356,329 | I have a generated file with thousands of lines like the following:
`CODE,XXX,DATE,20101201,TIME,070400,CONDITION_CODES,LTXT,PRICE,999.0000,QUANTITY,100,TSN,1510000001`
Some lines have more fields and others have fewer, but all follow the same pattern of key-value pairs and each line has a TSN field.
When doing some... | 2010/12/04 | [
"https://Stackoverflow.com/questions/4356329",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/78845/"
] | Not so much better as just [more efficient...](https://stackoverflow.com/questions/2631189/python-every-other-element-idiom/2631256#2631256)
[Full explanation](https://stackoverflow.com/questions/2233204/how-does-zipitersn-work-in-python) | ```
import itertools
def grouper(n, iterable, fillvalue=None):
"grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
args = [iter(iterable)] * n
return itertools.izip_longest(fillvalue=fillvalue, *args)
record = dict(grouper(2, line.strip().split(","))
```
[source](http://docs.python.org/library/itertools.html) |
4,356,329 | I have a generated file with thousands of lines like the following:
`CODE,XXX,DATE,20101201,TIME,070400,CONDITION_CODES,LTXT,PRICE,999.0000,QUANTITY,100,TSN,1510000001`
Some lines have more fields and others have fewer, but all follow the same pattern of key-value pairs and each line has a TSN field.
When doing some... | 2010/12/04 | [
"https://Stackoverflow.com/questions/4356329",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/78845/"
] | In Python 2 you could use `izip` in the `itertools` module and the magic of generator objects to write your own function to simplify the creation of pairs of values for the `dict` records. I got the idea for `pairwise()` from a similarly named (although functionally different) [recipe](https://docs.python.org/2/library... | Not so much better as just [more efficient...](https://stackoverflow.com/questions/2631189/python-every-other-element-idiom/2631256#2631256)
[Full explanation](https://stackoverflow.com/questions/2233204/how-does-zipitersn-work-in-python) |
4,356,329 | I have a generated file with thousands of lines like the following:
`CODE,XXX,DATE,20101201,TIME,070400,CONDITION_CODES,LTXT,PRICE,999.0000,QUANTITY,100,TSN,1510000001`
Some lines have more fields and others have fewer, but all follow the same pattern of key-value pairs and each line has a TSN field.
When doing some... | 2010/12/04 | [
"https://Stackoverflow.com/questions/4356329",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/78845/"
] | Not so much better as just [more efficient...](https://stackoverflow.com/questions/2631189/python-every-other-element-idiom/2631256#2631256)
[Full explanation](https://stackoverflow.com/questions/2233204/how-does-zipitersn-work-in-python) | If we're going to abstract it into a function anyway, it's not too hard to write "from scratch":
```
def pairs(iterable):
iterator = iter(iterable)
while True:
try: yield (iterator.next(), iterator.next())
except: return
```
robert's recipe version definitely wins points for flexibility, thou... |
4,356,329 | I have a generated file with thousands of lines like the following:
`CODE,XXX,DATE,20101201,TIME,070400,CONDITION_CODES,LTXT,PRICE,999.0000,QUANTITY,100,TSN,1510000001`
Some lines have more fields and others have fewer, but all follow the same pattern of key-value pairs and each line has a TSN field.
When doing some... | 2010/12/04 | [
"https://Stackoverflow.com/questions/4356329",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/78845/"
] | In Python 2 you could use `izip` in the `itertools` module and the magic of generator objects to write your own function to simplify the creation of pairs of values for the `dict` records. I got the idea for `pairwise()` from a similarly named (although functionally different) [recipe](https://docs.python.org/2/library... | ```
import itertools
def grouper(n, iterable, fillvalue=None):
"grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
args = [iter(iterable)] * n
return itertools.izip_longest(fillvalue=fillvalue, *args)
record = dict(grouper(2, line.strip().split(","))
```
[source](http://docs.python.org/library/itertools.html) |
4,356,329 | I have a generated file with thousands of lines like the following:
`CODE,XXX,DATE,20101201,TIME,070400,CONDITION_CODES,LTXT,PRICE,999.0000,QUANTITY,100,TSN,1510000001`
Some lines have more fields and others have fewer, but all follow the same pattern of key-value pairs and each line has a TSN field.
When doing some... | 2010/12/04 | [
"https://Stackoverflow.com/questions/4356329",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/78845/"
] | ```
import itertools
def grouper(n, iterable, fillvalue=None):
"grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
args = [iter(iterable)] * n
return itertools.izip_longest(fillvalue=fillvalue, *args)
record = dict(grouper(2, line.strip().split(","))
```
[source](http://docs.python.org/library/itertools.html) | If we're going to abstract it into a function anyway, it's not too hard to write "from scratch":
```
def pairs(iterable):
iterator = iter(iterable)
while True:
try: yield (iterator.next(), iterator.next())
except: return
```
robert's recipe version definitely wins points for flexibility, thou... |
4,356,329 | I have a generated file with thousands of lines like the following:
`CODE,XXX,DATE,20101201,TIME,070400,CONDITION_CODES,LTXT,PRICE,999.0000,QUANTITY,100,TSN,1510000001`
Some lines have more fields and others have fewer, but all follow the same pattern of key-value pairs and each line has a TSN field.
When doing some... | 2010/12/04 | [
"https://Stackoverflow.com/questions/4356329",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/78845/"
] | In Python 2 you could use `izip` in the `itertools` module and the magic of generator objects to write your own function to simplify the creation of pairs of values for the `dict` records. I got the idea for `pairwise()` from a similarly named (although functionally different) [recipe](https://docs.python.org/2/library... | If we're going to abstract it into a function anyway, it's not too hard to write "from scratch":
```
def pairs(iterable):
iterator = iter(iterable)
while True:
try: yield (iterator.next(), iterator.next())
except: return
```
robert's recipe version definitely wins points for flexibility, thou... |
36,867,567 | Is there someway to import the attribute namespace of a class instance into a method?
Also, is there someway to direct output to the attribute namespace of the instance?
For example, consider this simple block of code:
```
class Name():
def __init__(self,name='Joe'):
self.name = name
def mangle_nam... | 2016/04/26 | [
"https://Stackoverflow.com/questions/36867567",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2728074/"
] | @martin-lear has correctly answered the second part of your question. To address the first part, I'd offer these observations:
Firstly, there is no language feature that lets you "import" the instance's namespace into the method scope, other than performing attribute lookups on self.
You could probably abuse `exec` o... | So in your mangle\_name function, you are getting the error becuase you have not defined the name variable
```
self.name = name + '123'
```
should be
```
self.name = self.name + '123'
```
or something similiar |
13,489,299 | I am learning python and this is from
```
http://www.learnpython.org/page/MultipleFunctionArguments
```
They have an example code that does not work- I am wondering if it is just a typo or if it should not work at all.
```
def bar(first, second, third, **options):
if options.get("action") == "sum":
pri... | 2012/11/21 | [
"https://Stackoverflow.com/questions/13489299",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/612258/"
] | `return` is a keyword in python - you can't use it as a variable name. If you change it to something else (eg `ret`) it will work fine.
```
def bar(first, second, third, **options):
if options.get("action") == "sum":
print "The sum is: %d" % (first + second + third)
if options.get("ret") == "first":
... | You probably should not use "`return`" as an argument name, because it's a Python command. |
51,998,627 | I want to provide an id (unique) to every new row added to my sql database without explicitly asking the user. I was thinking about using `bigint` and incrementing value for every row added compared to the id of the previous row.
Example :
```
name id
xyz 1
```
now for another data to be added to this table,... | 2018/08/24 | [
"https://Stackoverflow.com/questions/51998627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | How To - Fullscreen - <https://www.w3schools.com/howto/howto_js_fullscreen.asp>
This is the current "angular way" to do it.
**HTML**
```
<h2 (click)="openFullscreen()">open</h2>
<h2 (click)="closeFullscreen()">close</h2>
```
**Component**
```
import { DOCUMENT } from '@angular/common';
import { Component, Inject,... | You can try with `requestFullscreen`
I have create a demo on **[Stackblitz](https://angular-awqvmd.stackblitz.io/)**
```
fullScreen() {
let elem = document.documentElement;
let methodToBeInvoked = elem.requestFullscreen ||
elem.webkitRequestFullScreen || elem['mozRequestFullscreen']
||
elem[... |
51,998,627 | I want to provide an id (unique) to every new row added to my sql database without explicitly asking the user. I was thinking about using `bigint` and incrementing value for every row added compared to the id of the previous row.
Example :
```
name id
xyz 1
```
now for another data to be added to this table,... | 2018/08/24 | [
"https://Stackoverflow.com/questions/51998627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You can try with `requestFullscreen`
I have create a demo on **[Stackblitz](https://angular-awqvmd.stackblitz.io/)**
```
fullScreen() {
let elem = document.documentElement;
let methodToBeInvoked = elem.requestFullscreen ||
elem.webkitRequestFullScreen || elem['mozRequestFullscreen']
||
elem[... | put the following code on the top of the component (before @Component) you want to trigger:
```
interface FsDocument extends HTMLDocument {
mozFullScreenElement?: Element;
msFullscreenElement?: Element;
msExitFullscreen?: () => void;
mozCancelFullScreen?: () => void;
}
export func... |
51,998,627 | I want to provide an id (unique) to every new row added to my sql database without explicitly asking the user. I was thinking about using `bigint` and incrementing value for every row added compared to the id of the previous row.
Example :
```
name id
xyz 1
```
now for another data to be added to this table,... | 2018/08/24 | [
"https://Stackoverflow.com/questions/51998627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You can try with `requestFullscreen`
I have create a demo on **[Stackblitz](https://angular-awqvmd.stackblitz.io/)**
```
fullScreen() {
let elem = document.documentElement;
let methodToBeInvoked = elem.requestFullscreen ||
elem.webkitRequestFullScreen || elem['mozRequestFullscreen']
||
elem[... | ****This is the current "angular way" to do it.****
HTML:
Use This in Html:
```
(click)="openFullscreen()
```
NgOninit:
```
this.elem = document.documentElement;
```
TS:
Put this Function it will work...
```
openFullscreen() {
if (this.elem.requestFullscreen) {
this.elem.requestFullscreen();
} else if (this.... |
51,998,627 | I want to provide an id (unique) to every new row added to my sql database without explicitly asking the user. I was thinking about using `bigint` and incrementing value for every row added compared to the id of the previous row.
Example :
```
name id
xyz 1
```
now for another data to be added to this table,... | 2018/08/24 | [
"https://Stackoverflow.com/questions/51998627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You can try with `requestFullscreen`
I have create a demo on **[Stackblitz](https://angular-awqvmd.stackblitz.io/)**
```
fullScreen() {
let elem = document.documentElement;
let methodToBeInvoked = elem.requestFullscreen ||
elem.webkitRequestFullScreen || elem['mozRequestFullscreen']
||
elem[... | Most of the answer above are from 2018, nowdays to achieve compatibility in Chrome, Firefox, other browsers and mobile, I have determined that using `requestFullScreen` is enough
<https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen>
Here is an example on to be able to toggle between full screen... |
51,998,627 | I want to provide an id (unique) to every new row added to my sql database without explicitly asking the user. I was thinking about using `bigint` and incrementing value for every row added compared to the id of the previous row.
Example :
```
name id
xyz 1
```
now for another data to be added to this table,... | 2018/08/24 | [
"https://Stackoverflow.com/questions/51998627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | How To - Fullscreen - <https://www.w3schools.com/howto/howto_js_fullscreen.asp>
This is the current "angular way" to do it.
**HTML**
```
<h2 (click)="openFullscreen()">open</h2>
<h2 (click)="closeFullscreen()">close</h2>
```
**Component**
```
import { DOCUMENT } from '@angular/common';
import { Component, Inject,... | put the following code on the top of the component (before @Component) you want to trigger:
```
interface FsDocument extends HTMLDocument {
mozFullScreenElement?: Element;
msFullscreenElement?: Element;
msExitFullscreen?: () => void;
mozCancelFullScreen?: () => void;
}
export func... |
51,998,627 | I want to provide an id (unique) to every new row added to my sql database without explicitly asking the user. I was thinking about using `bigint` and incrementing value for every row added compared to the id of the previous row.
Example :
```
name id
xyz 1
```
now for another data to be added to this table,... | 2018/08/24 | [
"https://Stackoverflow.com/questions/51998627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | How To - Fullscreen - <https://www.w3schools.com/howto/howto_js_fullscreen.asp>
This is the current "angular way" to do it.
**HTML**
```
<h2 (click)="openFullscreen()">open</h2>
<h2 (click)="closeFullscreen()">close</h2>
```
**Component**
```
import { DOCUMENT } from '@angular/common';
import { Component, Inject,... | ****This is the current "angular way" to do it.****
HTML:
Use This in Html:
```
(click)="openFullscreen()
```
NgOninit:
```
this.elem = document.documentElement;
```
TS:
Put this Function it will work...
```
openFullscreen() {
if (this.elem.requestFullscreen) {
this.elem.requestFullscreen();
} else if (this.... |
51,998,627 | I want to provide an id (unique) to every new row added to my sql database without explicitly asking the user. I was thinking about using `bigint` and incrementing value for every row added compared to the id of the previous row.
Example :
```
name id
xyz 1
```
now for another data to be added to this table,... | 2018/08/24 | [
"https://Stackoverflow.com/questions/51998627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | How To - Fullscreen - <https://www.w3schools.com/howto/howto_js_fullscreen.asp>
This is the current "angular way" to do it.
**HTML**
```
<h2 (click)="openFullscreen()">open</h2>
<h2 (click)="closeFullscreen()">close</h2>
```
**Component**
```
import { DOCUMENT } from '@angular/common';
import { Component, Inject,... | Most of the answer above are from 2018, nowdays to achieve compatibility in Chrome, Firefox, other browsers and mobile, I have determined that using `requestFullScreen` is enough
<https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen>
Here is an example on to be able to toggle between full screen... |
51,998,627 | I want to provide an id (unique) to every new row added to my sql database without explicitly asking the user. I was thinking about using `bigint` and incrementing value for every row added compared to the id of the previous row.
Example :
```
name id
xyz 1
```
now for another data to be added to this table,... | 2018/08/24 | [
"https://Stackoverflow.com/questions/51998627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | put the following code on the top of the component (before @Component) you want to trigger:
```
interface FsDocument extends HTMLDocument {
mozFullScreenElement?: Element;
msFullscreenElement?: Element;
msExitFullscreen?: () => void;
mozCancelFullScreen?: () => void;
}
export func... | ****This is the current "angular way" to do it.****
HTML:
Use This in Html:
```
(click)="openFullscreen()
```
NgOninit:
```
this.elem = document.documentElement;
```
TS:
Put this Function it will work...
```
openFullscreen() {
if (this.elem.requestFullscreen) {
this.elem.requestFullscreen();
} else if (this.... |
51,998,627 | I want to provide an id (unique) to every new row added to my sql database without explicitly asking the user. I was thinking about using `bigint` and incrementing value for every row added compared to the id of the previous row.
Example :
```
name id
xyz 1
```
now for another data to be added to this table,... | 2018/08/24 | [
"https://Stackoverflow.com/questions/51998627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Most of the answer above are from 2018, nowdays to achieve compatibility in Chrome, Firefox, other browsers and mobile, I have determined that using `requestFullScreen` is enough
<https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen>
Here is an example on to be able to toggle between full screen... | put the following code on the top of the component (before @Component) you want to trigger:
```
interface FsDocument extends HTMLDocument {
mozFullScreenElement?: Element;
msFullscreenElement?: Element;
msExitFullscreen?: () => void;
mozCancelFullScreen?: () => void;
}
export func... |
51,998,627 | I want to provide an id (unique) to every new row added to my sql database without explicitly asking the user. I was thinking about using `bigint` and incrementing value for every row added compared to the id of the previous row.
Example :
```
name id
xyz 1
```
now for another data to be added to this table,... | 2018/08/24 | [
"https://Stackoverflow.com/questions/51998627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Most of the answer above are from 2018, nowdays to achieve compatibility in Chrome, Firefox, other browsers and mobile, I have determined that using `requestFullScreen` is enough
<https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen>
Here is an example on to be able to toggle between full screen... | ****This is the current "angular way" to do it.****
HTML:
Use This in Html:
```
(click)="openFullscreen()
```
NgOninit:
```
this.elem = document.documentElement;
```
TS:
Put this Function it will work...
```
openFullscreen() {
if (this.elem.requestFullscreen) {
this.elem.requestFullscreen();
} else if (this.... |
11,190,353 | I am with a python script. I want to open a file to retrieve data inside. I add the right path to `sys.path`:
```
sys.path.append('F:\WORK\SIMILITUDE\ALGOCODE')
sys.path.append('F:\WORK\SIMILITUDE\ALGOCODE\DTW')
```
More precisely, the file `file.txt` I will open is in DTW folder, and I also add upper folder ALGOC... | 2012/06/25 | [
"https://Stackoverflow.com/questions/11190353",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1141493/"
] | `open()` checks only the current working directory and does not traverse your system path looking for the file. Only `import` works with that mechanism.
You will either need to change your working directory before you open the file, with `os.chdir(PATH)` or to include the entire path when trying to open it. | When you try to open file with `open`, for example:
```
open("ASTM-170512.txt","r")
```
you will try to open a file in the current directory.
It does not depend on `sys.path`. The `sys.path` variable is used when you try to import modules, but not when you open files.
You need to specify the full path to file in t... |
55,056,805 | I have a simple `dataframe` as follows:
```
Condition State Value
0 A AM 0.775651
1 B XP 0.700265
2 A HML 0.688315
3 A RMSML 0.666956
4 B XAD 0.636014
5 C VAP 0.542897
6 C RMSML 0.486664
7 ... | 2019/03/08 | [
"https://Stackoverflow.com/questions/55056805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3578648/"
] | You can create the handles and labels for the legend directly from the data:
```
labels = df['Condition'].unique()
handles = [plt.Rectangle((0,0),1,1, color=colors[l]) for l in labels]
plt.legend(handles, labels, title="Conditions")
```
Complete example:
```
u = """ Condition State Value
0 A A... | So I haven't worked much with plotting directly from pandas, but you'll have to access the handles and use that to construct lists of handles and labels that you can pass to `plt.legend`.
```py
s.plot(kind='barh', color=[colors[i] for i in df['Condition']])
# Get the original handles.
original_handles = plt.gca().get_... |
31,570,675 | Couldn't find much information on try vs. if when you're checking more than one thing. I have a tuple of strings, and I want to grab an index and store the index that follows it. There are 2 cases.
```
mylist = ('a', 'b')
```
or
```
mylist = ('y', 'z')
```
I want to look at `a` or `y`, depending on which exists... | 2015/07/22 | [
"https://Stackoverflow.com/questions/31570675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2887891/"
] | Your first code snippet should rather be like below:
```
try:
item['index'] = mylist[mylist.index('a') + 1]
except ValueError:
try:
item['index'] = mylist[mylist.index('y') + 1]
except ValueError:
item['index'] = None
```
or have a for loop like this:
```
for element in ['a', 'y']:
t... | Performance-wise, exceptions in Python are not heavy like in other languages and you shouldn't worry about using them whenever it's appropriate.
That said, IMO the second code snippet is more concise and clean. |
31,570,675 | Couldn't find much information on try vs. if when you're checking more than one thing. I have a tuple of strings, and I want to grab an index and store the index that follows it. There are 2 cases.
```
mylist = ('a', 'b')
```
or
```
mylist = ('y', 'z')
```
I want to look at `a` or `y`, depending on which exists... | 2015/07/22 | [
"https://Stackoverflow.com/questions/31570675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2887891/"
] | Well my opinion is close to Rohith Subramanyam's. I think a for loop is definitely more readable, especially in the case where you have more than two elements to test !
But I still think an if block is far more logical to use (pun intended!). It is also strictly speaking less redundant in terms of lines of code:
```
... | Performance-wise, exceptions in Python are not heavy like in other languages and you shouldn't worry about using them whenever it's appropriate.
That said, IMO the second code snippet is more concise and clean. |
31,570,675 | Couldn't find much information on try vs. if when you're checking more than one thing. I have a tuple of strings, and I want to grab an index and store the index that follows it. There are 2 cases.
```
mylist = ('a', 'b')
```
or
```
mylist = ('y', 'z')
```
I want to look at `a` or `y`, depending on which exists... | 2015/07/22 | [
"https://Stackoverflow.com/questions/31570675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2887891/"
] | Well my opinion is close to Rohith Subramanyam's. I think a for loop is definitely more readable, especially in the case where you have more than two elements to test !
But I still think an if block is far more logical to use (pun intended!). It is also strictly speaking less redundant in terms of lines of code:
```
... | Your first code snippet should rather be like below:
```
try:
item['index'] = mylist[mylist.index('a') + 1]
except ValueError:
try:
item['index'] = mylist[mylist.index('y') + 1]
except ValueError:
item['index'] = None
```
or have a for loop like this:
```
for element in ['a', 'y']:
t... |
23,178,606 | My python code has been crashing with error 'GC Object already Tracked' . Trying to figure out the best approach to debug this crashes.
OS : Linux.
* Is there a proper way to debug this issue.
There were couple of suggestions in the following article.
[Python memory debugging with GDB](https://stackoverflow.com/que... | 2014/04/20 | [
"https://Stackoverflow.com/questions/23178606",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/992301/"
] | Found out the reason for this issue in my scenario (not necessarily the only reason for the GC object crash).
I used the GDB and Core dumps to debug this issue.
I have Python and C Extension Code (in shared object).
Python code registers a Callback routine with C Extension code.
In a certain workflow a thread from... | The problem is that you try to add an object to Python's cyclic garbage collector tracking twice.
Check out [this bug](http://bugs.python.org/issue6128), specifically:
* The [documentation for supporting cyclic garbage collection](https://docs.python.org/2/c-api/gcsupport.html) in Python
* [My documentation patch for... |
23,178,606 | My python code has been crashing with error 'GC Object already Tracked' . Trying to figure out the best approach to debug this crashes.
OS : Linux.
* Is there a proper way to debug this issue.
There were couple of suggestions in the following article.
[Python memory debugging with GDB](https://stackoverflow.com/que... | 2014/04/20 | [
"https://Stackoverflow.com/questions/23178606",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/992301/"
] | Found out the reason for this issue in my scenario (not necessarily the only reason for the GC object crash).
I used the GDB and Core dumps to debug this issue.
I have Python and C Extension Code (in shared object).
Python code registers a Callback routine with C Extension code.
In a certain workflow a thread from... | I ran into this problem using boost::python when our C++ code would trigger a python callback. I would occasionally get "GC object already tracked" and the program would terminate.
I was able to attach GDB to the process prior to triggering the error. One interesting thing, in the python code we were wrapping the call... |
72,890,039 | I have two list of list and I want to check what element of l1 is not in l2 and add all this element in a new list ls in l2. For example,
input:
l1 = [[1,2,3],[5,6],[7,8,9,10]]
l2 = [[1,8,10],[3,9],[5,6]]
output:
l2 = [[1,8,10],[3,9],[5,6],[2,7]]
I write this code but it is seem doesn't work...
```
ls... | 2022/07/06 | [
"https://Stackoverflow.com/questions/72890039",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19419689/"
] | This should work:
```
l1 = [[1,2,3],[5,6],[7,8,9,10]]
l2 = [[1,8,10],[3,9],[5,6]]
l1n = set([x for xs in l1 for x in xs])
l2n = set([x for xs in l2 for x in xs])
l2.append(list(l1n - l2n))
``` | You are checking whether the elements are in `l2`, not if they are in any of the sublists of `l2`. First, you should probably create a `set` from all the elements in all the sublists of `l2` to make that check faster. Then you can create a similar list comprehension on `l1` to get all the elements that are not in that ... |
72,890,039 | I have two list of list and I want to check what element of l1 is not in l2 and add all this element in a new list ls in l2. For example,
input:
l1 = [[1,2,3],[5,6],[7,8,9,10]]
l2 = [[1,8,10],[3,9],[5,6]]
output:
l2 = [[1,8,10],[3,9],[5,6],[2,7]]
I write this code but it is seem doesn't work...
```
ls... | 2022/07/06 | [
"https://Stackoverflow.com/questions/72890039",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19419689/"
] | This should work:
```
l1 = [[1,2,3],[5,6],[7,8,9,10]]
l2 = [[1,8,10],[3,9],[5,6]]
l1n = set([x for xs in l1 for x in xs])
l2n = set([x for xs in l2 for x in xs])
l2.append(list(l1n - l2n))
``` | May be you can try like this also
```
import itertools
#MERGE LIST1
l1 = [[1,2,3],[5,6],[7,8,9,10]]
merged = list(itertools.chain(*l1))
#MERGE LIST2
l2 = [[1,8,10],[3,9],[5,6]]
merged2 = list(itertools.chain(*l2))
#FIND THE ELEMENTS NOT IN SECOND LIST
newlist = [item for item in merged if item not in merged2]
#AP... |
72,890,039 | I have two list of list and I want to check what element of l1 is not in l2 and add all this element in a new list ls in l2. For example,
input:
l1 = [[1,2,3],[5,6],[7,8,9,10]]
l2 = [[1,8,10],[3,9],[5,6]]
output:
l2 = [[1,8,10],[3,9],[5,6],[2,7]]
I write this code but it is seem doesn't work...
```
ls... | 2022/07/06 | [
"https://Stackoverflow.com/questions/72890039",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19419689/"
] | You are checking whether the elements are in `l2`, not if they are in any of the sublists of `l2`. First, you should probably create a `set` from all the elements in all the sublists of `l2` to make that check faster. Then you can create a similar list comprehension on `l1` to get all the elements that are not in that ... | May be you can try like this also
```
import itertools
#MERGE LIST1
l1 = [[1,2,3],[5,6],[7,8,9,10]]
merged = list(itertools.chain(*l1))
#MERGE LIST2
l2 = [[1,8,10],[3,9],[5,6]]
merged2 = list(itertools.chain(*l2))
#FIND THE ELEMENTS NOT IN SECOND LIST
newlist = [item for item in merged if item not in merged2]
#AP... |
32,555,508 | I have a large document with a similar structure:
```
Data800,
Data900,
Data1000,
]
}
```
How would I go about removing the last character from the 3rd to last line (in this case, where the comma is positioned next to Data1000). The output should look like this:
```
Data800,
Data900,
Data1000
]
}
```
It will alwa... | 2015/09/13 | [
"https://Stackoverflow.com/questions/32555508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3139767/"
] | A simple solution using `wc` to count lines and `sed` to do the editing:
```
sed "$(( $(wc -l <file) - 2))s/,$//" file
```
That will output the edited file on stdout; you can edit inplace with `sed -i`. | In python 2.\* :
```
with open('/path/of/file', 'w+') as f:
f.write(f.read().replace(',\n]', '\n]'))
``` |
32,555,508 | I have a large document with a similar structure:
```
Data800,
Data900,
Data1000,
]
}
```
How would I go about removing the last character from the 3rd to last line (in this case, where the comma is positioned next to Data1000). The output should look like this:
```
Data800,
Data900,
Data1000
]
}
```
It will alwa... | 2015/09/13 | [
"https://Stackoverflow.com/questions/32555508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3139767/"
] | A simple solution using `wc` to count lines and `sed` to do the editing:
```
sed "$(( $(wc -l <file) - 2))s/,$//" file
```
That will output the edited file on stdout; you can edit inplace with `sed -i`. | ```
with open('a.txt', "a+") as f:
f.seek(-2, 2) # Jump to the second last byte.
counter = 0
while counter < 2: # if found EOLS still not enough
if f.read(1) == "\n": # Count EOLs
counter += 1
f.seek(-2, 1) # jump back the read byte pl... |
32,555,508 | I have a large document with a similar structure:
```
Data800,
Data900,
Data1000,
]
}
```
How would I go about removing the last character from the 3rd to last line (in this case, where the comma is positioned next to Data1000). The output should look like this:
```
Data800,
Data900,
Data1000
]
}
```
It will alwa... | 2015/09/13 | [
"https://Stackoverflow.com/questions/32555508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3139767/"
] | A simple solution using `wc` to count lines and `sed` to do the editing:
```
sed "$(( $(wc -l <file) - 2))s/,$//" file
```
That will output the edited file on stdout; you can edit inplace with `sed -i`. | Perl's [`Tie::File`](https://metacpan.org/pod/Tie::File) module makes this trivial. It has the effect of *tying* an array to a disk file, so that any changes made to the array are reflected in the file
It would look like this (untested, as I'm posting from my tablet). The path to the input file is expected as a parame... |
32,555,508 | I have a large document with a similar structure:
```
Data800,
Data900,
Data1000,
]
}
```
How would I go about removing the last character from the 3rd to last line (in this case, where the comma is positioned next to Data1000). The output should look like this:
```
Data800,
Data900,
Data1000
]
}
```
It will alwa... | 2015/09/13 | [
"https://Stackoverflow.com/questions/32555508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3139767/"
] | A simple solution using `wc` to count lines and `sed` to do the editing:
```
sed "$(( $(wc -l <file) - 2))s/,$//" file
```
That will output the edited file on stdout; you can edit inplace with `sed -i`. | The following removes commas followed by `]` or by `}` (with optional whitespace between the two):
```
perl -0777pe's/,(?=\s*[\]}])//g'
```
Usage:
```
perl -0777pe's/,(?=\s*[\]}])//g' file.in >file.out # Read from file
perl -0777pe's/,(?=\s*[\]}])//g' <file.in >file.out # Read from STDIN
perl -i~ -0777pe's/,(?=\... |
32,555,508 | I have a large document with a similar structure:
```
Data800,
Data900,
Data1000,
]
}
```
How would I go about removing the last character from the 3rd to last line (in this case, where the comma is positioned next to Data1000). The output should look like this:
```
Data800,
Data900,
Data1000
]
}
```
It will alwa... | 2015/09/13 | [
"https://Stackoverflow.com/questions/32555508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3139767/"
] | Perl's [`Tie::File`](https://metacpan.org/pod/Tie::File) module makes this trivial. It has the effect of *tying* an array to a disk file, so that any changes made to the array are reflected in the file
It would look like this (untested, as I'm posting from my tablet). The path to the input file is expected as a parame... | In python 2.\* :
```
with open('/path/of/file', 'w+') as f:
f.write(f.read().replace(',\n]', '\n]'))
``` |
32,555,508 | I have a large document with a similar structure:
```
Data800,
Data900,
Data1000,
]
}
```
How would I go about removing the last character from the 3rd to last line (in this case, where the comma is positioned next to Data1000). The output should look like this:
```
Data800,
Data900,
Data1000
]
}
```
It will alwa... | 2015/09/13 | [
"https://Stackoverflow.com/questions/32555508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3139767/"
] | Perl's [`Tie::File`](https://metacpan.org/pod/Tie::File) module makes this trivial. It has the effect of *tying* an array to a disk file, so that any changes made to the array are reflected in the file
It would look like this (untested, as I'm posting from my tablet). The path to the input file is expected as a parame... | ```
with open('a.txt', "a+") as f:
f.seek(-2, 2) # Jump to the second last byte.
counter = 0
while counter < 2: # if found EOLS still not enough
if f.read(1) == "\n": # Count EOLs
counter += 1
f.seek(-2, 1) # jump back the read byte pl... |
32,555,508 | I have a large document with a similar structure:
```
Data800,
Data900,
Data1000,
]
}
```
How would I go about removing the last character from the 3rd to last line (in this case, where the comma is positioned next to Data1000). The output should look like this:
```
Data800,
Data900,
Data1000
]
}
```
It will alwa... | 2015/09/13 | [
"https://Stackoverflow.com/questions/32555508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3139767/"
] | Perl's [`Tie::File`](https://metacpan.org/pod/Tie::File) module makes this trivial. It has the effect of *tying* an array to a disk file, so that any changes made to the array are reflected in the file
It would look like this (untested, as I'm posting from my tablet). The path to the input file is expected as a parame... | The following removes commas followed by `]` or by `}` (with optional whitespace between the two):
```
perl -0777pe's/,(?=\s*[\]}])//g'
```
Usage:
```
perl -0777pe's/,(?=\s*[\]}])//g' file.in >file.out # Read from file
perl -0777pe's/,(?=\s*[\]}])//g' <file.in >file.out # Read from STDIN
perl -i~ -0777pe's/,(?=\... |
4,756,205 | Some python 3 features and modules having been backported to python 2.7 what are the notable differences between python 3.1 and python 2.7? | 2011/01/21 | [
"https://Stackoverflow.com/questions/4756205",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/538850/"
] | I think these resources might help you:
* A [introduction to Python "3000"](http://www.python.org/doc/essays/ppt/pycon2008/Py3kAndYou.pdf) from Guido van Rossum
* [Porting your code to Python 3](http://peadrop.com/slides/mp5.pdf)
* and of course the documentation of [changes in Python 3.0](http://docs.python.org/py3k/... | If you want to use any of the python 3 function in python 2.7 then you can import **future** module at the beginning and then you can use it in your code. |
22,636,974 | I am trying to figure out how to properly make a discrete state Markov chain model with [`pymc`](http://pymc-devs.github.io/pymc/index.html).
As an example (view in [nbviewer](http://nbviewer.ipython.org/github/shpigi/pieces/blob/master/toyDbnExample.ipynb)), lets make a chain of length T=10 where the Markov state is ... | 2014/03/25 | [
"https://Stackoverflow.com/questions/22636974",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3459899/"
] | Use this:
```
$('#window')
.data("kendoWindow")
.title("Add new category")
.content("") //this little thing does magic
.refresh({
url: _url
})
.center()
.open();
```
I would however suggest you rearrange your calls:
```
$('#window')
.data("kendoWindow")
.title("Add new category")
... | You might also want to add
```
.Events(e =>
{
e.Refresh("onRefresh");
})
<script>
function onRefresh() {
this.center();
}
<script>
```
to keep the window centered after the content is loaded as it is loaded asynchronously.
(if your content height is variable) |
18,983,906 | Why is time taken to access an element in a non-homogeneous list considered as constant or How is a non-homogeneous list stored in memory in case of python?
In case of a homogeneous list, knowing the type and position, the memory location can be determined but how is it done in case of a non homogeneous list so fast a... | 2013/09/24 | [
"https://Stackoverflow.com/questions/18983906",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2216108/"
] | Expand your controller action with a new parameter:
```
public JsonResult ResolveProfileSelectionRequired(ResolveProfileSelectionRequiredModel model, bool newtransferee = false)
```
and check it inside the action. | You could use:
```
if (Request.Form["newtransferee"].ToLower() == "true")
```
or does it work if you write this instead of the manual html?
```
@Html.HiddenFor(model => model.NewTransferee)
``` |
18,983,906 | Why is time taken to access an element in a non-homogeneous list considered as constant or How is a non-homogeneous list stored in memory in case of python?
In case of a homogeneous list, knowing the type and position, the memory location can be determined but how is it done in case of a non homogeneous list so fast a... | 2013/09/24 | [
"https://Stackoverflow.com/questions/18983906",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2216108/"
] | If all you need to do is check the value of a boolean, that's just a conditional statement:
```
public JsonResult ResolveProfileSelectionRequired(ResolveProfileSelectionRequiredModel model)
{
if (model.NewTransferee)
{
// do something
}
else
{
// do something else
}
}
```
It's... | Expand your controller action with a new parameter:
```
public JsonResult ResolveProfileSelectionRequired(ResolveProfileSelectionRequiredModel model, bool newtransferee = false)
```
and check it inside the action. |
18,983,906 | Why is time taken to access an element in a non-homogeneous list considered as constant or How is a non-homogeneous list stored in memory in case of python?
In case of a homogeneous list, knowing the type and position, the memory location can be determined but how is it done in case of a non homogeneous list so fast a... | 2013/09/24 | [
"https://Stackoverflow.com/questions/18983906",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2216108/"
] | If all you need to do is check the value of a boolean, that's just a conditional statement:
```
public JsonResult ResolveProfileSelectionRequired(ResolveProfileSelectionRequiredModel model)
{
if (model.NewTransferee)
{
// do something
}
else
{
// do something else
}
}
```
It's... | You could use:
```
if (Request.Form["newtransferee"].ToLower() == "true")
```
or does it work if you write this instead of the manual html?
```
@Html.HiddenFor(model => model.NewTransferee)
``` |
13,116,026 | I am new to Python. I am writing a string function to check if a certain string contains certain multiple values. Is there a syntax in python to allow me to do something like this:
```
def strParse(str):
a = 't'
b = 'br'
c = 'ht'
if a in str AND b in str AND c in str:
print('Ok!')
```
(The pa... | 2012/10/29 | [
"https://Stackoverflow.com/questions/13116026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1507139/"
] | Almost correct, just make the `and` lower-case:
```
def strParse(str):
a = 't'
b = 'br'
c = 'ht'
if a in str and b in str and c in str:
print('Ok!')
```
Doesn't cause problems in this case, but you should avoid using variable-names that are also [built-in functions](http://docs.python.org/2/l... | Why don't you try typing this into the Python REPL? What you're trying to do is perfectly valid in python, except the `and` keyword is lowercase, not uppercase. |
13,116,026 | I am new to Python. I am writing a string function to check if a certain string contains certain multiple values. Is there a syntax in python to allow me to do something like this:
```
def strParse(str):
a = 't'
b = 'br'
c = 'ht'
if a in str AND b in str AND c in str:
print('Ok!')
```
(The pa... | 2012/10/29 | [
"https://Stackoverflow.com/questions/13116026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1507139/"
] | Almost correct, just make the `and` lower-case:
```
def strParse(str):
a = 't'
b = 'br'
c = 'ht'
if a in str and b in str and c in str:
print('Ok!')
```
Doesn't cause problems in this case, but you should avoid using variable-names that are also [built-in functions](http://docs.python.org/2/l... | ```
if all(s in text for s in (a, b, c)):
print("ok")
``` |
67,628,700 | Please help me understand this as I am new to python:
I have a list of names...
```
names = ['John', 'William', 'Amanda']
```
I need to iterate through this list and print out the names as follows:
```
1. John
2. William
3. Amanda
```
I've managed to print the list out however I'm getting this extra space betwee... | 2021/05/20 | [
"https://Stackoverflow.com/questions/67628700",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15166148/"
] | Couple of easy ways by which you can achieve this:
1. `enumerate` and `f-string`:
```
for index,item in enumerate(names,start=1):
print(f'{index}. {item}')
```
2. `enumerate` and `format function`:
```
for index,item in enumerate(names,start=1):
print('{}. {}'.format(index,item))
```
3. `enumerate` and `... | You can add a separator using the `sep` option in `print`
Like this
```
index = 1
names = ['John', 'William', 'Amanda']
for i in names:
print(index, '.' ,' ', i, sep='') #If you dont want the space between the '.' and i you may remove it
index += 1
#OUTPUT:
#1. John
#2. William
#3. Amanda
``` |
67,628,700 | Please help me understand this as I am new to python:
I have a list of names...
```
names = ['John', 'William', 'Amanda']
```
I need to iterate through this list and print out the names as follows:
```
1. John
2. William
3. Amanda
```
I've managed to print the list out however I'm getting this extra space betwee... | 2021/05/20 | [
"https://Stackoverflow.com/questions/67628700",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15166148/"
] | The most pythonic way of doing this in Python 3 is using [enumerate](https://docs.python.org/3/library/functions.html#enumerate) and [f-strings](https://docs.python.org/3/reference/lexical_analysis.html#f-strings):
```py
names = ['John', 'William', 'Amanda']
for index, item in enumerate(names, start=1):
print(f'{... | You can add a separator using the `sep` option in `print`
Like this
```
index = 1
names = ['John', 'William', 'Amanda']
for i in names:
print(index, '.' ,' ', i, sep='') #If you dont want the space between the '.' and i you may remove it
index += 1
#OUTPUT:
#1. John
#2. William
#3. Amanda
``` |
67,628,700 | Please help me understand this as I am new to python:
I have a list of names...
```
names = ['John', 'William', 'Amanda']
```
I need to iterate through this list and print out the names as follows:
```
1. John
2. William
3. Amanda
```
I've managed to print the list out however I'm getting this extra space betwee... | 2021/05/20 | [
"https://Stackoverflow.com/questions/67628700",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15166148/"
] | Couple of easy ways by which you can achieve this:
1. `enumerate` and `f-string`:
```
for index,item in enumerate(names,start=1):
print(f'{index}. {item}')
```
2. `enumerate` and `format function`:
```
for index,item in enumerate(names,start=1):
print('{}. {}'.format(index,item))
```
3. `enumerate` and `... | You can just add a space after your dote, and you don't really need the index variable. I changed your code a little bit:
**Code:**
```
names = ['John', 'William', 'Amanda']
for i in range(len(names)):
index = str(i + 1)
print(index + '. ' + names[i])
# if you don't want the space beween the dot and the... |
67,628,700 | Please help me understand this as I am new to python:
I have a list of names...
```
names = ['John', 'William', 'Amanda']
```
I need to iterate through this list and print out the names as follows:
```
1. John
2. William
3. Amanda
```
I've managed to print the list out however I'm getting this extra space betwee... | 2021/05/20 | [
"https://Stackoverflow.com/questions/67628700",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15166148/"
] | The most pythonic way of doing this in Python 3 is using [enumerate](https://docs.python.org/3/library/functions.html#enumerate) and [f-strings](https://docs.python.org/3/reference/lexical_analysis.html#f-strings):
```py
names = ['John', 'William', 'Amanda']
for index, item in enumerate(names, start=1):
print(f'{... | You can just add a space after your dote, and you don't really need the index variable. I changed your code a little bit:
**Code:**
```
names = ['John', 'William', 'Amanda']
for i in range(len(names)):
index = str(i + 1)
print(index + '. ' + names[i])
# if you don't want the space beween the dot and the... |
67,628,700 | Please help me understand this as I am new to python:
I have a list of names...
```
names = ['John', 'William', 'Amanda']
```
I need to iterate through this list and print out the names as follows:
```
1. John
2. William
3. Amanda
```
I've managed to print the list out however I'm getting this extra space betwee... | 2021/05/20 | [
"https://Stackoverflow.com/questions/67628700",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15166148/"
] | The most pythonic way of doing this in Python 3 is using [enumerate](https://docs.python.org/3/library/functions.html#enumerate) and [f-strings](https://docs.python.org/3/reference/lexical_analysis.html#f-strings):
```py
names = ['John', 'William', 'Amanda']
for index, item in enumerate(names, start=1):
print(f'{... | Couple of easy ways by which you can achieve this:
1. `enumerate` and `f-string`:
```
for index,item in enumerate(names,start=1):
print(f'{index}. {item}')
```
2. `enumerate` and `format function`:
```
for index,item in enumerate(names,start=1):
print('{}. {}'.format(index,item))
```
3. `enumerate` and `... |
67,628,700 | Please help me understand this as I am new to python:
I have a list of names...
```
names = ['John', 'William', 'Amanda']
```
I need to iterate through this list and print out the names as follows:
```
1. John
2. William
3. Amanda
```
I've managed to print the list out however I'm getting this extra space betwee... | 2021/05/20 | [
"https://Stackoverflow.com/questions/67628700",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15166148/"
] | Couple of easy ways by which you can achieve this:
1. `enumerate` and `f-string`:
```
for index,item in enumerate(names,start=1):
print(f'{index}. {item}')
```
2. `enumerate` and `format function`:
```
for index,item in enumerate(names,start=1):
print('{}. {}'.format(index,item))
```
3. `enumerate` and `... | ```
names = ['John', 'William', 'Amanda']
counter = 1
for name in names:
print(str(counter) + ". " + name)
counter += 1
```
This is what you were trying to do. Your mistake is that you're using the wrong concatenation symbol (need to use +)
[result:](https://i.stack.imgur.com/e2fDi.png) |
67,628,700 | Please help me understand this as I am new to python:
I have a list of names...
```
names = ['John', 'William', 'Amanda']
```
I need to iterate through this list and print out the names as follows:
```
1. John
2. William
3. Amanda
```
I've managed to print the list out however I'm getting this extra space betwee... | 2021/05/20 | [
"https://Stackoverflow.com/questions/67628700",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15166148/"
] | The most pythonic way of doing this in Python 3 is using [enumerate](https://docs.python.org/3/library/functions.html#enumerate) and [f-strings](https://docs.python.org/3/reference/lexical_analysis.html#f-strings):
```py
names = ['John', 'William', 'Amanda']
for index, item in enumerate(names, start=1):
print(f'{... | ```
names = ['John', 'William', 'Amanda']
counter = 1
for name in names:
print(str(counter) + ". " + name)
counter += 1
```
This is what you were trying to do. Your mistake is that you're using the wrong concatenation symbol (need to use +)
[result:](https://i.stack.imgur.com/e2fDi.png) |
5,529,075 | I'm working on an academic project aimed at studying people behavior.
The project will be divided in three parts:
1. A program to read the data from some remote sources, and build a local data pool with it.
2. A program to validate this data pool, and to keep it coherent
3. A web interface to allow people to read/ma... | 2011/04/03 | [
"https://Stackoverflow.com/questions/5529075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269931/"
] | Sounds that the main functionality needed can be found from:
[pytables](http://www.pytables.org/moin)
and
[scipy/numpy](http://www.scipy.org/) | Since you aren't an expert I recommend you to use mysql database as the backend of storing your data, it's easy to learn and you'll have a capability to query your data using SQL and write your data using python see this [MySQL Guide](http://dev.mysql.com/doc/refman/5.1/en/index.html) [Python-Mysql](http://www.kitebird... |
5,529,075 | I'm working on an academic project aimed at studying people behavior.
The project will be divided in three parts:
1. A program to read the data from some remote sources, and build a local data pool with it.
2. A program to validate this data pool, and to keep it coherent
3. A web interface to allow people to read/ma... | 2011/04/03 | [
"https://Stackoverflow.com/questions/5529075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269931/"
] | Go with a NoSQL database like MongoDB which is much easier to handle data in such a case than having to learn SQL. | Since you aren't an expert I recommend you to use mysql database as the backend of storing your data, it's easy to learn and you'll have a capability to query your data using SQL and write your data using python see this [MySQL Guide](http://dev.mysql.com/doc/refman/5.1/en/index.html) [Python-Mysql](http://www.kitebird... |
5,529,075 | I'm working on an academic project aimed at studying people behavior.
The project will be divided in three parts:
1. A program to read the data from some remote sources, and build a local data pool with it.
2. A program to validate this data pool, and to keep it coherent
3. A web interface to allow people to read/ma... | 2011/04/03 | [
"https://Stackoverflow.com/questions/5529075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/269931/"
] | Sounds that the main functionality needed can be found from:
[pytables](http://www.pytables.org/moin)
and
[scipy/numpy](http://www.scipy.org/) | Go with a NoSQL database like MongoDB which is much easier to handle data in such a case than having to learn SQL. |
52,334,508 | When trying to implement a custom `get_success_url` method in python, Django throws a `TypeError: quote_from_bytes()`error. For example:
```
class SomeView(generic.CreateView):
#...
def get_success_url(self):
return HttpResponseRedirect(reverse('index'))
``` | 2018/09/14 | [
"https://Stackoverflow.com/questions/52334508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1649917/"
] | `get_success_url` doesn't return an HttpResponseRedirect instead it should return the url you want to redirect to. So you can just return `reverse('index')`:
```
def get_success_url(self):
return reverse('index')
``` | A shortcut for HttpResponseRedirect is redirect("View\_name")
it returns an HttpResponse (HTML)
Reverse returns a url |
29,499,819 | Trying to make concentric squares in python with Turtle. Here's my attempt:
```
import turtle
def draw_square(t, size):
for i in range(4):
t.forward(size)
t.left(90)
wn = turtle.Screen()
dan = turtle.Turtle()
sizevar = 1
for i in range(10):
draw_square(dan,sizevar)
sizevar += 20
dan.penup()
... | 2015/04/07 | [
"https://Stackoverflow.com/questions/29499819",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/721938/"
] | What you're currently doing is adding an onclick event to a link that calls a function *that adds another onclick event via jQuery*.
Remove the `onclick` property and the `open_file()` function wrapper so that jQuery adds the event as you intended. | You do not need `onclick="open_file()"` this:
```
<div id='linkstofiles'>
<a id="3.txt">3.txt</a>
//other links go here
</div>
$("#linkstofiles a").click(function (event) {
var file_name = event.target.id;
$("#f_name").val(file_name);
$.ajax({
url: "docs/" + file_name,
dataType: "t... |
29,499,819 | Trying to make concentric squares in python with Turtle. Here's my attempt:
```
import turtle
def draw_square(t, size):
for i in range(4):
t.forward(size)
t.left(90)
wn = turtle.Screen()
dan = turtle.Turtle()
sizevar = 1
for i in range(10):
draw_square(dan,sizevar)
sizevar += 20
dan.penup()
... | 2015/04/07 | [
"https://Stackoverflow.com/questions/29499819",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/721938/"
] | You do not need `onclick="open_file()"` this:
```
<div id='linkstofiles'>
<a id="3.txt">3.txt</a>
//other links go here
</div>
$("#linkstofiles a").click(function (event) {
var file_name = event.target.id;
$("#f_name").val(file_name);
$.ajax({
url: "docs/" + file_name,
dataType: "t... | You don't need to bind a click event again in the function when you have `onclick` in your html.
Also for `$ is not defined`, you need to put jquery library in the head. |
29,499,819 | Trying to make concentric squares in python with Turtle. Here's my attempt:
```
import turtle
def draw_square(t, size):
for i in range(4):
t.forward(size)
t.left(90)
wn = turtle.Screen()
dan = turtle.Turtle()
sizevar = 1
for i in range(10):
draw_square(dan,sizevar)
sizevar += 20
dan.penup()
... | 2015/04/07 | [
"https://Stackoverflow.com/questions/29499819",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/721938/"
] | What you're currently doing is adding an onclick event to a link that calls a function *that adds another onclick event via jQuery*.
Remove the `onclick` property and the `open_file()` function wrapper so that jQuery adds the event as you intended. | You don't need to bind a click event again in the function when you have `onclick` in your html.
Also for `$ is not defined`, you need to put jquery library in the head. |
7,492,454 | I have 2 large, unsorted arrays (structured set of xyz coordinates) and I'm trying to find the positions of all identical subarrays (common points consisting of 3 coordinates). Example:
```
a = array([[0, 1, 2], [3, 4, 5]])
b = array([[3, 4, 5], [6, 7, 8]])
```
Here the correct subarray would be `[3, 4, 5]`, but mor... | 2011/09/20 | [
"https://Stackoverflow.com/questions/7492454",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/958582/"
] | A general solution for Python iterables (not specific to numpy or arrays) that works in linear average time (O(n+m), n is the number of subarrays and m is the number of unique subarrays):
```
a = [[0, 1, 2], [3, 4, 5]]
b = [[3, 4, 5], [6, 7, 8]]
from collections import defaultdict
indexmap = defaultdict(list)
for r... | Can you map each sub-array to its position index in a hash table? So basically, you change your data structure. After that in linear time O(n), where n is the size of the biggest hash hash table, in one loop you can O(1) query each hash table and find out if you have same sub-array present in two or more hash tables. |
7,492,454 | I have 2 large, unsorted arrays (structured set of xyz coordinates) and I'm trying to find the positions of all identical subarrays (common points consisting of 3 coordinates). Example:
```
a = array([[0, 1, 2], [3, 4, 5]])
b = array([[3, 4, 5], [6, 7, 8]])
```
Here the correct subarray would be `[3, 4, 5]`, but mor... | 2011/09/20 | [
"https://Stackoverflow.com/questions/7492454",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/958582/"
] | A general solution for Python iterables (not specific to numpy or arrays) that works in linear average time (O(n+m), n is the number of subarrays and m is the number of unique subarrays):
```
a = [[0, 1, 2], [3, 4, 5]]
b = [[3, 4, 5], [6, 7, 8]]
from collections import defaultdict
indexmap = defaultdict(list)
for r... | I did a little further experimenting and found a numpy specific way to solve this:
```
import numpy as np
a = np.arange(24).reshape(2,4,3)
b = np.arange(24, 36).reshape(2,2,3)
```
Array b receives 2 entries from a:
```
b[1,0] = a[0,1]
b[0,1] = a[1,1]
```
Finding common entries:
```
c = np.in1d(a, b).reshape(a.s... |
7,492,454 | I have 2 large, unsorted arrays (structured set of xyz coordinates) and I'm trying to find the positions of all identical subarrays (common points consisting of 3 coordinates). Example:
```
a = array([[0, 1, 2], [3, 4, 5]])
b = array([[3, 4, 5], [6, 7, 8]])
```
Here the correct subarray would be `[3, 4, 5]`, but mor... | 2011/09/20 | [
"https://Stackoverflow.com/questions/7492454",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/958582/"
] | I did a little further experimenting and found a numpy specific way to solve this:
```
import numpy as np
a = np.arange(24).reshape(2,4,3)
b = np.arange(24, 36).reshape(2,2,3)
```
Array b receives 2 entries from a:
```
b[1,0] = a[0,1]
b[0,1] = a[1,1]
```
Finding common entries:
```
c = np.in1d(a, b).reshape(a.s... | Can you map each sub-array to its position index in a hash table? So basically, you change your data structure. After that in linear time O(n), where n is the size of the biggest hash hash table, in one loop you can O(1) query each hash table and find out if you have same sub-array present in two or more hash tables. |
66,170,590 | Currently I have a program that request JSONS from specific API. The creators of the API have claimed this data is in GeoJSON but QGIS cannot read it.
So I want to extend my Python Script to converting the JSON to GEOJSON in a readable format to get into QGIS and process it further there.
However, I have a few proble... | 2021/02/12 | [
"https://Stackoverflow.com/questions/66170590",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11604150/"
] | In AuthenticatesUsers.php
```
protected function sendLoginResponse(Request $request)
{
$request->session()->regenerate();
$this->clearLoginAttempts($request);
if ($response = $this->authenticated($request, $this->guard()->user())) {
return $response;
}
return $request->wantsJson()
... | When the auth middleware detects an unauthenticated user, it will redirect the user to the login named route. You may modify this behavior by updating the redirectTo function in your application's `app/Http/Middleware/Authenticate.php` file
<https://laravel.com/docs/8.x/authentication#redirecting-unauthenticated-users... |
9,002,569 | I am using python 2.7 and I would like to do some web2py stuff. I am trying to run web2py from eclipse and I am getting the following error trying to run web2py.py script:
WARNING:web2py:GUI not available because Tk library is not installed
I am running on Windows 7 (64 bit).
Any suggestions?
Thank you | 2012/01/25 | [
"https://Stackoverflow.com/questions/9002569",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/945446/"
] | Simplest solution: The Oracle client is not installed on the remote server where the SSIS package is being executed.
Slightly less simple solution: The Oracle client is installed on the remote server, but in the wrong bit-count for the SSIS installation. For example, if the 64-bit Oracle client is installed but SSIS i... | 1.Go to My Computer Properties
2.Then click on Advance setting.
3.Go to Environment variable
4.Set the path to
```
F:\oracle\product\10.2.0\db_2\perl\5.8.3\lib\MSWin32-x86;F:\oracle\product\10.2.0\db_2\perl\5.8.3\lib;F:\oracle\product\10.2.0\db_2\perl\5.8.3\lib\MSWin32-x86;F:\oracle\product\10.2.0\db_2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.