qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
42,229,078 | I am trying to hide print button and some text when print a page. I have following files:
test.html
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="http... | 2017/02/14 | [
"https://Stackoverflow.com/questions/42229078",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2067148/"
] | Change your print function to :
```
window.print();
```
Add css below :
```
@media print {
#button-container {
display : none !important;
}
}
``` | Maybe you can try `document.getElementById("print").style.display = 'none';` |
42,229,078 | I am trying to hide print button and some text when print a page. I have following files:
test.html
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="http... | 2017/02/14 | [
"https://Stackoverflow.com/questions/42229078",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2067148/"
] | with jquery you can hide the print button when clicked and show it back after print with:
```
$('#PrintDiv').click(function(){
$(this).hide();
var contents = document.getElementById("wrapper").innerHTML;
var frame1 = document.createElement('iframe');
frame1.name = "frame1";
frame1.style... | Here is a CSS to achieve what you want to do (hide print button and any other content on print page)
Please add **no-print** class to any element that you want to hide on a print page.
```
@media print {
.no-print
{
display: none !important;
}
}
``` |
14,034,825 | I'm trying to learn Scala and both IDE and REPL are complaining about string interpolation:
```
scala> val name = "World"
name: java.lang.String = World
scala> val message = s"Hello $name"
<console>:1: error: ';' expected but string literal found.
val message = s"Hello $name"
^
```
What is the ... | 2012/12/25 | [
"https://Stackoverflow.com/questions/14034825",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1255825/"
] | String interpolation is not available in 2.9.2. It was [coined in 2.10.0](http://docs.scala-lang.org/overviews/core/string-interpolation.html). | I wanted to answer back on my own question for the osx peeps: the brew install for scala is done like this (from my confluence instance):
**Install Scala 2.10.0**
Scala has akka actors in the language so it's better to use it than the 2.9.x that brew installs.
Someone was nice enough to make a brew install for scala... |
266,532 | Can anyone point me to an implementation in R or Python of a constrained clustering algorithm? In case this is overly broad, I am hoping to exploit known must-link/cannot-link pairs to improve the clusters (topics) generated by more common clustering algorithms, be they single (e.g. K-means) or multi-membership models ... | 2017/03/09 | [
"https://stats.stackexchange.com/questions/266532",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/18063/"
] | I have a python [implementation](https://github.com/Behrouz-Babaki/copkmeans) of COP-Kmeans. There, you can also find links to other implementations of constrained clustering algorithms. | The R package `conclust` provides this functionality. See
[CRAN - conclust](https://cran.r-project.org/web/packages/conclust/conclust.pdf) |
3,709,878 | Is there a way to embed a playlist of youtube videos in HTML by listing the youtube videos in the embed code, rather than defining a playlist in my youtube account? | 2010/09/14 | [
"https://Stackoverflow.com/questions/3709878",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/64334/"
] | This is quit simple
Just use the embed code (iframe or object code) and a parameter to the url
After playlist= you add the youtube id's comma seperated
Here an example
```
http://www.youtube.com/v/uG53Ce5_dI0?version=3&playlist=YW8p8JO2hQw,UouwabEZy2E,IXJ9uiT4nEM,bRcdlZ87GVY,IA96yoK9l7M,ZEU4rugs-74
``` | I think you will find that this isn't possible with the YouTube API (I may be incorrect here), but I have been unable to find anything of the sort on the internet.
Also, everything I found which related to YouTube play-list embedding required you to login beforehand.
**Update:**
I found this: <http://www.php-help.ro/... |
28,467,285 | I have a little program that I've cobbled together to download patents. I'd like to bind the escape key to a function to close the window, but I don't really know how to make this happen. I've bound the escape key to a "quit" function, but can someone help me figure out how to write the function to close the text input... | 2015/02/12 | [
"https://Stackoverflow.com/questions/28467285",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4553282/"
] | First of all, quit is a built-in method so I'd use another name. Otherwise, here's the function:
```
import sys
def close(event):
master.withdraw() # if you want to bring it back
sys.exit() # if you want to exit the entire thing
master.bind('<Escape>', close)
``` | You should use the safer exit method than `sys.exit()`. In my example, `root.destroy()` is a safe, dependable way to exit your Tkinter app. destroy() just terminates the mainloop and deletes all widgets. So it seems to be safer if you call your app from another Tkinter app, or if you have multiple mainloops.
```
impor... |
28,467,285 | I have a little program that I've cobbled together to download patents. I'd like to bind the escape key to a function to close the window, but I don't really know how to make this happen. I've bound the escape key to a "quit" function, but can someone help me figure out how to write the function to close the text input... | 2015/02/12 | [
"https://Stackoverflow.com/questions/28467285",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4553282/"
] | First of all, quit is a built-in method so I'd use another name. Otherwise, here's the function:
```
import sys
def close(event):
master.withdraw() # if you want to bring it back
sys.exit() # if you want to exit the entire thing
master.bind('<Escape>', close)
``` | You can use `destroy()` method within lambda expression to safely exit. I have used in `python 3.7.x`.
```
import tkinter as tk
root = tk.Tk()
root.bind("<Escape>", lambda x: root.destroy())
root.mainloop()
``` |
28,467,285 | I have a little program that I've cobbled together to download patents. I'd like to bind the escape key to a function to close the window, but I don't really know how to make this happen. I've bound the escape key to a "quit" function, but can someone help me figure out how to write the function to close the text input... | 2015/02/12 | [
"https://Stackoverflow.com/questions/28467285",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4553282/"
] | You can use `destroy()` method within lambda expression to safely exit. I have used in `python 3.7.x`.
```
import tkinter as tk
root = tk.Tk()
root.bind("<Escape>", lambda x: root.destroy())
root.mainloop()
``` | You should use the safer exit method than `sys.exit()`. In my example, `root.destroy()` is a safe, dependable way to exit your Tkinter app. destroy() just terminates the mainloop and deletes all widgets. So it seems to be safer if you call your app from another Tkinter app, or if you have multiple mainloops.
```
impor... |
44,668,416 | I am trying to create test data for a Django model in my project using [factoryboy](http://factoryboy.readthedocs.io/en/latest/). The data is being generated through `Faker` except one field, that is a `ManyToManyField`; a many to many relationship with another builtin model from `django.contrib.auth.model` named group... | 2017/06/21 | [
"https://Stackoverflow.com/questions/44668416",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1439913/"
] | You need to pass in the member\_roles when making the voucher factory. For example:
```
VoucherFactory.create(member_roles=[member_role1, member_role2])
```
See <http://factoryboy.readthedocs.io/en/latest/recipes.html#simple-many-to-many-relationship> where it states:
*When calling UserFactory() or UserFactory.buil... | If you want to generate your dependencies within the factory, use:
```py
class VoucherFactory(django.DjangoModelFactory):
class Meta:
model = 'app.Voucher'
code = Faker('first_name')
is_enabled = fuzzy.FuzzyChoice([True, False])
start_date = fuzzy.FuzzyDateTime(datetime.datetime.now(pytz.utc))... |
61,046,292 | How can I change every 1 character to the word "one".
I want to change only if it's alone, for example, `11` has to remain like this.
The following command won't find it on the beginning or on the end of the line:
```
sed -Ei 's/([^0-9])0([^0-9])/\nulla\2/g' $1
``` | 2020/04/05 | [
"https://Stackoverflow.com/questions/61046292",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13100010/"
] | My intuition is that you are using too many partitions. I would make a first try by significantly reducing their numbers. You can find this interesting [post](https://medium.com/@adrianchang/apache-spark-partitioning-e9faab369d14) on the subject.
If your partitions are balanced, you have `29 millions /80k partitions ... | I have found the solution using *repartitionByRange* in the first dataframe. Usign with the correct id and number of partitions it balance the number of rows in each partition. |
29,122,839 | I have a good running PowerShell environment which pre-loads several settings, functions and modules from my profile file `C:\Users\Paebbels\Documents\WindowsPowerShell\Microsoft. PowerShell_profile.ps1`.
Is it possible to load the same profile file into the integrated powershell console of PowerShell's ISE? | 2015/03/18 | [
"https://Stackoverflow.com/questions/29122839",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3719459/"
] | If you put the code in
```
C:\Users\Paebbels\Documents\WindowsPowerShell\profile.ps1
```
instead, both ISE and the console host will load it. | Add a copy of this file called:
```
C:\Users\Paebbels\Documents\WindowsPowerShell\Microsoft.PowerShellise_profile.ps1
``` |
63,893,843 | I have an object `Entry` with following fields as id, scene\_info and rating. As can be seen, the object has attributes that are types to other classes `Scene` and `Item`. I want to convert this object to dictionary.
```
Entry(id=None, scene_info=Scene(Recipes=[Item(ID='rec.chicky-nuggies', SpawnerIdx=0), Item(ID='rec... | 2020/09/15 | [
"https://Stackoverflow.com/questions/63893843",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2005490/"
] | I usually do it this way:
```py
class Bar:
# child class
# some init code...
def encode(self):
return vars(self)
class Foo:
# parent class
# some init code...
def encode(self):
return vars(self)
def to_json(self, indent=None):
return json.dumps(self, default=lamb... | For the class types (Entry\Scene\Item), you can create a function the returns the arguments as a dictionary.
Try this code:
```
def getargs(**kwargs):
return kwargs # already a dictionary
Entry = Scene = Item = getargs # all functions do same thing
x = Entry(id=None, scene_info=Scene(Recipes=[Item(ID='rec.chic... |
63,893,843 | I have an object `Entry` with following fields as id, scene\_info and rating. As can be seen, the object has attributes that are types to other classes `Scene` and `Item`. I want to convert this object to dictionary.
```
Entry(id=None, scene_info=Scene(Recipes=[Item(ID='rec.chicky-nuggies', SpawnerIdx=0), Item(ID='rec... | 2020/09/15 | [
"https://Stackoverflow.com/questions/63893843",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2005490/"
] | I usually do it this way:
```py
class Bar:
# child class
# some init code...
def encode(self):
return vars(self)
class Foo:
# parent class
# some init code...
def encode(self):
return vars(self)
def to_json(self, indent=None):
return json.dumps(self, default=lamb... | You can use the Pydantic model's `Entry.json()`, this will convert everything including nested models to a string which can then be converted back to a dictionary by using something like `json.loads()` |
63,893,843 | I have an object `Entry` with following fields as id, scene\_info and rating. As can be seen, the object has attributes that are types to other classes `Scene` and `Item`. I want to convert this object to dictionary.
```
Entry(id=None, scene_info=Scene(Recipes=[Item(ID='rec.chicky-nuggies', SpawnerIdx=0), Item(ID='rec... | 2020/09/15 | [
"https://Stackoverflow.com/questions/63893843",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2005490/"
] | The prefered way to go would be using modifing class definition as stated by [Tenacious B](https://stackoverflow.com/users/12442479/tenacious-b), but if you want a fast solution you can use the *recursive* function stated below.
```
def class2dict(instance, built_dict={}):
if not hasattr(instance, "__dict__"):
... | For the class types (Entry\Scene\Item), you can create a function the returns the arguments as a dictionary.
Try this code:
```
def getargs(**kwargs):
return kwargs # already a dictionary
Entry = Scene = Item = getargs # all functions do same thing
x = Entry(id=None, scene_info=Scene(Recipes=[Item(ID='rec.chic... |
63,893,843 | I have an object `Entry` with following fields as id, scene\_info and rating. As can be seen, the object has attributes that are types to other classes `Scene` and `Item`. I want to convert this object to dictionary.
```
Entry(id=None, scene_info=Scene(Recipes=[Item(ID='rec.chicky-nuggies', SpawnerIdx=0), Item(ID='rec... | 2020/09/15 | [
"https://Stackoverflow.com/questions/63893843",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2005490/"
] | The prefered way to go would be using modifing class definition as stated by [Tenacious B](https://stackoverflow.com/users/12442479/tenacious-b), but if you want a fast solution you can use the *recursive* function stated below.
```
def class2dict(instance, built_dict={}):
if not hasattr(instance, "__dict__"):
... | You can use the Pydantic model's `Entry.json()`, this will convert everything including nested models to a string which can then be converted back to a dictionary by using something like `json.loads()` |
4,339,037 | On XP and above, my System32 folder is at C:\WINDOWS\system32. On Windows 2000 it is at C:\WINNT\system32. Is there a
```
System.getProperty("something");
```
or some way that I can get the location of the System32 folder? | 2010/12/02 | [
"https://Stackoverflow.com/questions/4339037",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/489041/"
] | Since I think NT, the way to get it through environment variables is: `%WINDIR%\system32`
You can do this:
```
String sysdir = System.getenv("WINDIR") + "\\system32";
```
More default environment variables for windows on Wikipedia: <http://en.wikipedia.org/wiki/Environment_variable#Examples_from_Microsoft_Windows>
... | The environment variable SYSTEMROOT will give you the location of the windows install point (something like 'C:\Windows'). Construction of the full path to the System32 directory is of course, simple ('C:\Windows\System32'). |
4,339,037 | On XP and above, my System32 folder is at C:\WINDOWS\system32. On Windows 2000 it is at C:\WINNT\system32. Is there a
```
System.getProperty("something");
```
or some way that I can get the location of the System32 folder? | 2010/12/02 | [
"https://Stackoverflow.com/questions/4339037",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/489041/"
] | Since I think NT, the way to get it through environment variables is: `%WINDIR%\system32`
You can do this:
```
String sysdir = System.getenv("WINDIR") + "\\system32";
```
More default environment variables for windows on Wikipedia: <http://en.wikipedia.org/wiki/Environment_variable#Examples_from_Microsoft_Windows>
... | This should work:
```
String system32Path = System.getenv("SystemRoot") + "\\system32";
```
On my installation of Windows XP, typing `set SystemRoot` in a Command Prompt returns C:\Windows |
56,281 | I am trying to open and edit an executable linux script on a Pi, what I have is something like this:
```
import os
os.system("sudo nano /etc/rc.local")
```
then I want to edit the content, then save the file and reboot the Pi
any suggestions? | 2016/10/13 | [
"https://raspberrypi.stackexchange.com/questions/56281",
"https://raspberrypi.stackexchange.com",
"https://raspberrypi.stackexchange.com/users/54912/"
] | The L Pee's answer is the best way to edit the file. However if you are using python and, for example, you want a script to run on boot under a set of circumstances already determined by your python script, then one method I saw somewhere on the internet which avoids root issues is...
Read the original file:
```
with... | I'd go with the following command at the $ prompt, where the '/etc/rc.local' represents the path to the file and the file name,
```
sudo nano /etc/rc.local
```
Make your changes then to exit
```
<ctl> x
```
'y' and Return to save the file.
Then
```
sudo reboot
```
Alternatively if you prefer to u... |
32,274,874 | I'm trying to parse a JSON object in PHP. My efforts have lead to ending up with this var\_dump:
```
string(5) "Malta"
string(2) "mt"
string(11) "St Julian's"
string(5) "Malta"
string(2) "mt"
string(11) "St Julian's"
```
Now what I want is just to print "Malta". All efforts of trying have failed and I need a hint in... | 2015/08/28 | [
"https://Stackoverflow.com/questions/32274874",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/580150/"
] | My issue was that when `GetPrivateQueuesByMachine` is used to get the queue, it uses a access mode of `SendAndReceive` which is asking for more permissions then I had. I had to use the MessageQueue constructor to specify the AccessMode. (In this case Peek.)
In the end, I was able to get this to work using code similar... | I too had the same problem. In my case, I was initializing Message Queue in parent thread and accessing Peek function in child thread.
In case you are using multi threading, try to keep initialization and access of function in same thread. |
32,274,874 | I'm trying to parse a JSON object in PHP. My efforts have lead to ending up with this var\_dump:
```
string(5) "Malta"
string(2) "mt"
string(11) "St Julian's"
string(5) "Malta"
string(2) "mt"
string(11) "St Julian's"
```
Now what I want is just to print "Malta". All efforts of trying have failed and I need a hint in... | 2015/08/28 | [
"https://Stackoverflow.com/questions/32274874",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/580150/"
] | My issue was that when `GetPrivateQueuesByMachine` is used to get the queue, it uses a access mode of `SendAndReceive` which is asking for more permissions then I had. I had to use the MessageQueue constructor to specify the AccessMode. (In this case Peek.)
In the end, I was able to get this to work using code similar... | That the queue shows up in various utilities just doesn't tell you that much. Such a utility is pretty unlikely to be peeking at messages. In general, the default access permissions allows everybody to see the queue and post messages to it. But not retrieve them.
On the machine that owns this queue, use Control Panel ... |
7,710,378 | I'm working for an iPhone project. I would like to use an UI Automation testing for my app. I'm completely new to testing.
I went though this [document](http://alexvollmer.com/posts/2010/07/03/working-with-uiautomation/) its quiet easy to understand but it doesn't say so much about scripts. I'm new to AppleScript also... | 2011/10/10 | [
"https://Stackoverflow.com/questions/7710378",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/777682/"
] | It is really simple.
Goto <http://www.yourdomain.com/admin/config/people/accounts/settings>
There is an "Emails" section in which you can edit all emails sent by the core user module.
Add [HTML Mail](http://drupal.org/project/htmlmail) module to be sure that Drupal will add the good headers and you are done ! | It's definitely possible, at the end of the day the Drupal core files are just plain old PHP. While it's an extremely bad idea to hack core files (it sounds like you already know why) all you'd need to do is change the code to do what you want it to do.
The good news though is that someone has already written a module... |
7,710,378 | I'm working for an iPhone project. I would like to use an UI Automation testing for my app. I'm completely new to testing.
I went though this [document](http://alexvollmer.com/posts/2010/07/03/working-with-uiautomation/) its quiet easy to understand but it doesn't say so much about scripts. I'm new to AppleScript also... | 2011/10/10 | [
"https://Stackoverflow.com/questions/7710378",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/777682/"
] | It is really simple.
Goto <http://www.yourdomain.com/admin/config/people/accounts/settings>
There is an "Emails" section in which you can edit all emails sent by the core user module.
Add [HTML Mail](http://drupal.org/project/htmlmail) module to be sure that Drupal will add the good headers and you are done ! | All the emails are being sent from the system and the content is editable as we want. To stylize the emails, i am using html mail module as suggested by CLive.
The new account creation, account cancellation emails can be found in "Account settings" page when you login as a admin.
All other emails are set from "Actio... |
9,088,030 | This is my manifest:
```
{
"name": "rabbi",
"version": "1.0",
"description": "something",
"browser_action": {
"default_icon": "icon.png",
"popup": "popup.html"
},
"content_scripts": [ {
"js": ["jquery-1.7.1.min.js", "rabbi.js"],
"matches": [ "http://*.facebook.com/*", "http://facebook.... | 2012/01/31 | [
"https://Stackoverflow.com/questions/9088030",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/537943/"
] | You are injecting a script, not a html document. So you don't need the `<script type="text/javascript"></script>` tag.
as a side note: With the property `"run_at": "document_end"` your script is injected when the DOM is completely constructed. Which is in fact at the same time `$(document).ready` fires. This means you... | `rabbi.js` is a JavaScript file so you can remove the HTML.
```
$(document).ready(function(){
alert("Thanks for visiting!");
});
``` |
9,088,030 | This is my manifest:
```
{
"name": "rabbi",
"version": "1.0",
"description": "something",
"browser_action": {
"default_icon": "icon.png",
"popup": "popup.html"
},
"content_scripts": [ {
"js": ["jquery-1.7.1.min.js", "rabbi.js"],
"matches": [ "http://*.facebook.com/*", "http://facebook.... | 2012/01/31 | [
"https://Stackoverflow.com/questions/9088030",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/537943/"
] | you specified that you should run your script at `"run_at": "document_end"` this is after the dom ready event has fired (so you don't need it) | `rabbi.js` is a JavaScript file so you can remove the HTML.
```
$(document).ready(function(){
alert("Thanks for visiting!");
});
``` |
9,088,030 | This is my manifest:
```
{
"name": "rabbi",
"version": "1.0",
"description": "something",
"browser_action": {
"default_icon": "icon.png",
"popup": "popup.html"
},
"content_scripts": [ {
"js": ["jquery-1.7.1.min.js", "rabbi.js"],
"matches": [ "http://*.facebook.com/*", "http://facebook.... | 2012/01/31 | [
"https://Stackoverflow.com/questions/9088030",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/537943/"
] | You are injecting a script, not a html document. So you don't need the `<script type="text/javascript"></script>` tag.
as a side note: With the property `"run_at": "document_end"` your script is injected when the DOM is completely constructed. Which is in fact at the same time `$(document).ready` fires. This means you... | you specified that you should run your script at `"run_at": "document_end"` this is after the dom ready event has fired (so you don't need it) |
2,801,498 | >
> Is it true: Let $\{a\_n\}$ be real sequence. If $|a\_{n+1}-a\_n|<\frac1{3^n}$ for all $n$, then $\{a\_n\}$ convergent.
>
>
>
I am asking this, because I was pointed out that there is a real sequence $\{a\_n\}$ such that $|a\_{n+1}-a\_n|<\frac1{n}$, yet $\{a\_n\}$ not convergent. | 2018/05/30 | [
"https://math.stackexchange.com/questions/2801498",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/94817/"
] | Note that the *sequence* $(a\_n)\_n$ converges if, and only if, the *series* $\sum\_n (a\_{n+1}-a\_n)$ converges. *(Can you see why?)*
But if we have $$\forall n\,\qquad \lvert a\_{n+1}-a\_n \rvert < \frac{1}{3^n}$$
then by comparison with $\sum\_n \frac{1}{3^n}$ the series $\sum\_n \lvert a\_{n+1}-a\_n \rvert$ conver... | Let $m > n$. Now,
$$
|a\_m - a\_n| \leq \sum\_{i=n}^{m+1}|a\_{i+1} - a\_i| \leq \sum\_{i=n}^{m+1}\frac{1}{3^i} \leq \sum\_{i \geq n}\frac{1}{3^i} \xrightarrow{n \to \infty} 0
$$
Hence $(a\_n)\_{n \geq 1}$ is a Cauchy sequence and therefore by completeness of the reals, it converges. As someone else has said, we can e... |
2,801,498 | >
> Is it true: Let $\{a\_n\}$ be real sequence. If $|a\_{n+1}-a\_n|<\frac1{3^n}$ for all $n$, then $\{a\_n\}$ convergent.
>
>
>
I am asking this, because I was pointed out that there is a real sequence $\{a\_n\}$ such that $|a\_{n+1}-a\_n|<\frac1{n}$, yet $\{a\_n\}$ not convergent. | 2018/05/30 | [
"https://math.stackexchange.com/questions/2801498",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/94817/"
] | Note that the *sequence* $(a\_n)\_n$ converges if, and only if, the *series* $\sum\_n (a\_{n+1}-a\_n)$ converges. *(Can you see why?)*
But if we have $$\forall n\,\qquad \lvert a\_{n+1}-a\_n \rvert < \frac{1}{3^n}$$
then by comparison with $\sum\_n \frac{1}{3^n}$ the series $\sum\_n \lvert a\_{n+1}-a\_n \rvert$ conver... | Hint: if $|a\_{n+1}-a\_n|<\frac{1}{3^n}$, how large can $\sum\_{k=0}^\infty|a\_{n+k+1}-a\_{n+k}|$ be? What does this tell you about $|a\_m-a\_n|$ if $m>n$? |
2,801,498 | >
> Is it true: Let $\{a\_n\}$ be real sequence. If $|a\_{n+1}-a\_n|<\frac1{3^n}$ for all $n$, then $\{a\_n\}$ convergent.
>
>
>
I am asking this, because I was pointed out that there is a real sequence $\{a\_n\}$ such that $|a\_{n+1}-a\_n|<\frac1{n}$, yet $\{a\_n\}$ not convergent. | 2018/05/30 | [
"https://math.stackexchange.com/questions/2801498",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/94817/"
] | Note that the *sequence* $(a\_n)\_n$ converges if, and only if, the *series* $\sum\_n (a\_{n+1}-a\_n)$ converges. *(Can you see why?)*
But if we have $$\forall n\,\qquad \lvert a\_{n+1}-a\_n \rvert < \frac{1}{3^n}$$
then by comparison with $\sum\_n \frac{1}{3^n}$ the series $\sum\_n \lvert a\_{n+1}-a\_n \rvert$ conver... | One sequence $a\_n$ which diverges even though $|a\_{n+1}-a\_n|\to 0$ is
$$
a\_n=\sum\_{k=1}^n\frac1n\\
a\_{n+1}-a\_n=\frac1{n+1}
$$
The general requirement for convergence by comparing the terms of the sequence (and not referring to an actual limit which may or may not be one of the terms of the sequence), is the Cauc... |
2,801,498 | >
> Is it true: Let $\{a\_n\}$ be real sequence. If $|a\_{n+1}-a\_n|<\frac1{3^n}$ for all $n$, then $\{a\_n\}$ convergent.
>
>
>
I am asking this, because I was pointed out that there is a real sequence $\{a\_n\}$ such that $|a\_{n+1}-a\_n|<\frac1{n}$, yet $\{a\_n\}$ not convergent. | 2018/05/30 | [
"https://math.stackexchange.com/questions/2801498",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/94817/"
] | Note that the *sequence* $(a\_n)\_n$ converges if, and only if, the *series* $\sum\_n (a\_{n+1}-a\_n)$ converges. *(Can you see why?)*
But if we have $$\forall n\,\qquad \lvert a\_{n+1}-a\_n \rvert < \frac{1}{3^n}$$
then by comparison with $\sum\_n \frac{1}{3^n}$ the series $\sum\_n \lvert a\_{n+1}-a\_n \rvert$ conver... | In general is the series of general term $s\_n = |a\_{n+1} -a\_n|$ converges then the sequence $(a\_n)\_n$ converges too.
Indeed, assume $\sum s\_n<\infty$ then $(a\_n)\_n$ will a Cauchy sequence as follows ,
$$ |a\_{n+p} -a\_n| \le \sum\_{j=0}^{p-1} |a\_{n+j+1}-a\_{n+j}|= \sum\_{j=0}^{p-1} s\_{n+j} = \sum\_{k= n}^{n... |
33,642,014 | So, I Am trying to create some code, and for whatever reason the following always gives the same output, "Great! let's continue"
I am fairly new programmer, so any explanation has about why this is happening and how I can fix it is welcome. Thank you!
```
#python 2
UserAnswer = raw_input('Is your age and birthday co... | 2015/11/11 | [
"https://Stackoverflow.com/questions/33642014",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5548769/"
] | You can use the following code to validate `IPv6` and `IPv4` addresses:
```
public static bool IsValidIP(string address)
{
IPAddress ip;
if (!IPAddress.TryParse(address, out ip)) return false;
switch (ip.AddressFamily)
{
case AddressFamily.InterNetwork:
if (address.Length > 6 && ad... | The way that MS parses the string you're entering makes it a valid IP address. They've added a kind of shorthand for dealing with parts of an IP and then they fill in the blanks.
If you look into the remarks section on [this](https://msdn.microsoft.com/en-us/library/system.net.ipaddress.parse(v=vs.110).aspx) page you'... |
33,642,014 | So, I Am trying to create some code, and for whatever reason the following always gives the same output, "Great! let's continue"
I am fairly new programmer, so any explanation has about why this is happening and how I can fix it is welcome. Thank you!
```
#python 2
UserAnswer = raw_input('Is your age and birthday co... | 2015/11/11 | [
"https://Stackoverflow.com/questions/33642014",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5548769/"
] | You can use the following code to validate `IPv6` and `IPv4` addresses:
```
public static bool IsValidIP(string address)
{
IPAddress ip;
if (!IPAddress.TryParse(address, out ip)) return false;
switch (ip.AddressFamily)
{
case AddressFamily.InterNetwork:
if (address.Length > 6 && ad... | There are many completely valid representations of an IP Address than just 0.0.0.0 format. "192" probably parses to 0.0.0.192, which is why the program isn't crashing AND why it's length is 4.
If you must only accepted dotted notation, use string.Split combined with int.Parse and create an IPAddress instance yourself. |
39,636,550 | Hello I have model users, in which there is a foreign key of Orders model.
Now sails will automatically generate route `/users/:id/orders`. I have to disable this route. How to do this ? I have already tried to disable all routes of orders using: `_config : { actions: false, rest: false, shortcuts: false }` but it stil... | 2016/09/22 | [
"https://Stackoverflow.com/questions/39636550",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6573592/"
] | You can achieve this by adding custom routes, which will overwrite the blueprint action.
Use <http://sailsjs.org/documentation/concepts/routes/custom-routes#?response-target-syntax>
```
'/users/:id/orders': {response: 'forbidden'}
```
or <http://sailsjs.org/documentation/concepts/routes/custom-routes#?function-targ... | **You could control the access to this model through policies.**
For blocking everything put the code below inside your `/config/policies.js` file:
```
Orders : {
'*': false
},
```
**You could also overwrite the route**
In `/config/routes.js`:
`'/:collection/:id/:model': {response: 'forbidden'}`
**Or you cou... |
272,790 | In a scene from my book, a character, Nastia, has been shot and she's taking small steps to a staircase. But as she staggers, at one point, she can't handle the pain so she tumbles down the stairs and knocks out. With the way I phrased it below, I just don't feel like it gives off a very professional or emotional vibe ... | 2015/09/08 | [
"https://english.stackexchange.com/questions/272790",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/112874/"
] | **Blacking out** is the phrase I believe you're looking for, meaning ["to become unconscious."](http://idioms.thefreedictionary.com/black+out)
The example given by the link is:
>
> After I fell, I must have *blacked out*.
>
>
> | If you want to using "knocking," you'll have to grammatically deliver a blow to make the person unconscious. You have several choices:
**Active voice**:
>
> She tumbled down the staircase, the fall **knocking** her out.
>
>
>
**Passive voice**:
>
> She tumbled down the staircase. She **was knocked** out by the... |
12,065 | As the Skyrim remaster is out today, we need to determine how to tag it.
According to [this discussion](https://gaming.meta.stackexchange.com/questions/10065/what-to-do-with-reworked-remastered-games), it should get a new tag if it's a rework with new mechanics, but it shouldn't get a new tag if it's just updated grap... | 2016/10/28 | [
"https://gaming.meta.stackexchange.com/questions/12065",
"https://gaming.meta.stackexchange.com",
"https://gaming.meta.stackexchange.com/users/134619/"
] | As of this writing, we have two questions about original *Skyrim* vs. *Skyrim: Special Edition*:
* [Are there any differences between Skyrim & Skyrim: Special Edition?](https://gaming.stackexchange.com/questions/289683/what-are-the-differences-between-skyrim-skyrim-special-edition)
* [Are there any different quests in... | Similarly — if this is still the consensus — let's merge [skyrim-anniversary-edition](https://gaming.stackexchange.com/questions/tagged/skyrim-anniversary-edition "show questions tagged 'skyrim-anniversary-edition'") with [the-elder-scrolls-v-skyrim](https://gaming.stackexchange.com/questions/tagged/the-elder-scrolls-v... |
37,899,115 | So I'm trying to show the modal template when a row is selected on the table.
The problem I am having is that when a row is clicked, a black shadowed line appears which is about 2px thick. It's supposed to be the modal I'm guessing but the modal isn't actually there in full with it's content.
Any ideas where I'm goin... | 2016/06/18 | [
"https://Stackoverflow.com/questions/37899115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6483395/"
] | You can do it easily like following using `split()` method.
```js
var str = 'http://localhost:8000/test/';
var arr = str.split('/');
console.log(arr[arr.length-2])
``` | The section of the URL you are referring to is called the path, in Javascript this can be accessed by reading the contents of the `location.pathname` property.
You can then use a regular expression to access only the final directory name (between the last two slashes). |
37,899,115 | So I'm trying to show the modal template when a row is selected on the table.
The problem I am having is that when a row is clicked, a black shadowed line appears which is about 2px thick. It's supposed to be the modal I'm guessing but the modal isn't actually there in full with it's content.
Any ideas where I'm goin... | 2016/06/18 | [
"https://Stackoverflow.com/questions/37899115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6483395/"
] | The section of the URL you are referring to is called the path, in Javascript this can be accessed by reading the contents of the `location.pathname` property.
You can then use a regular expression to access only the final directory name (between the last two slashes). | Don't you guys like regex? I think it is simpler.
```
s = 'http://localhost:8000/test/';
var content = s.match(/\/([^/]+)\/[^/]*$/)[1];
``` |
37,899,115 | So I'm trying to show the modal template when a row is selected on the table.
The problem I am having is that when a row is clicked, a black shadowed line appears which is about 2px thick. It's supposed to be the modal I'm guessing but the modal isn't actually there in full with it's content.
Any ideas where I'm goin... | 2016/06/18 | [
"https://Stackoverflow.com/questions/37899115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6483395/"
] | The section of the URL you are referring to is called the path, in Javascript this can be accessed by reading the contents of the `location.pathname` property.
You can then use a regular expression to access only the final directory name (between the last two slashes). | JS `split()` function does magic with `location.pathname` .
```
var str = location.pathname.split('/');
var requiredString = str[str.length -2];
```
`requiredString` will contain required string, you may console log it by `console.log(requiredString)` or use it anywhere else in the program. |
37,899,115 | So I'm trying to show the modal template when a row is selected on the table.
The problem I am having is that when a row is clicked, a black shadowed line appears which is about 2px thick. It's supposed to be the modal I'm guessing but the modal isn't actually there in full with it's content.
Any ideas where I'm goin... | 2016/06/18 | [
"https://Stackoverflow.com/questions/37899115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6483395/"
] | The section of the URL you are referring to is called the path, in Javascript this can be accessed by reading the contents of the `location.pathname` property.
You can then use a regular expression to access only the final directory name (between the last two slashes). | ```
let arr = link.split('/');
let fileName = arr[arr.length - 2] + "/" + arr[arr.length - 1];
```
It will return all data after second last `/`. |
37,899,115 | So I'm trying to show the modal template when a row is selected on the table.
The problem I am having is that when a row is clicked, a black shadowed line appears which is about 2px thick. It's supposed to be the modal I'm guessing but the modal isn't actually there in full with it's content.
Any ideas where I'm goin... | 2016/06/18 | [
"https://Stackoverflow.com/questions/37899115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6483395/"
] | The section of the URL you are referring to is called the path, in Javascript this can be accessed by reading the contents of the `location.pathname` property.
You can then use a regular expression to access only the final directory name (between the last two slashes). | You can use :
window.location.pathname
returns the path and filename of the current page.
with the split() function
To learn more about window.location in w3 School :
<https://www.w3schools.com/js/js_window_location.asp>
```
//window.location.pathname return /test
var path=window.location.pathname.split("/");
... |
37,899,115 | So I'm trying to show the modal template when a row is selected on the table.
The problem I am having is that when a row is clicked, a black shadowed line appears which is about 2px thick. It's supposed to be the modal I'm guessing but the modal isn't actually there in full with it's content.
Any ideas where I'm goin... | 2016/06/18 | [
"https://Stackoverflow.com/questions/37899115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6483395/"
] | You can do it easily like following using `split()` method.
```js
var str = 'http://localhost:8000/test/';
var arr = str.split('/');
console.log(arr[arr.length-2])
``` | Don't you guys like regex? I think it is simpler.
```
s = 'http://localhost:8000/test/';
var content = s.match(/\/([^/]+)\/[^/]*$/)[1];
``` |
37,899,115 | So I'm trying to show the modal template when a row is selected on the table.
The problem I am having is that when a row is clicked, a black shadowed line appears which is about 2px thick. It's supposed to be the modal I'm guessing but the modal isn't actually there in full with it's content.
Any ideas where I'm goin... | 2016/06/18 | [
"https://Stackoverflow.com/questions/37899115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6483395/"
] | You can do it easily like following using `split()` method.
```js
var str = 'http://localhost:8000/test/';
var arr = str.split('/');
console.log(arr[arr.length-2])
``` | JS `split()` function does magic with `location.pathname` .
```
var str = location.pathname.split('/');
var requiredString = str[str.length -2];
```
`requiredString` will contain required string, you may console log it by `console.log(requiredString)` or use it anywhere else in the program. |
37,899,115 | So I'm trying to show the modal template when a row is selected on the table.
The problem I am having is that when a row is clicked, a black shadowed line appears which is about 2px thick. It's supposed to be the modal I'm guessing but the modal isn't actually there in full with it's content.
Any ideas where I'm goin... | 2016/06/18 | [
"https://Stackoverflow.com/questions/37899115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6483395/"
] | You can do it easily like following using `split()` method.
```js
var str = 'http://localhost:8000/test/';
var arr = str.split('/');
console.log(arr[arr.length-2])
``` | ```
let arr = link.split('/');
let fileName = arr[arr.length - 2] + "/" + arr[arr.length - 1];
```
It will return all data after second last `/`. |
37,899,115 | So I'm trying to show the modal template when a row is selected on the table.
The problem I am having is that when a row is clicked, a black shadowed line appears which is about 2px thick. It's supposed to be the modal I'm guessing but the modal isn't actually there in full with it's content.
Any ideas where I'm goin... | 2016/06/18 | [
"https://Stackoverflow.com/questions/37899115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6483395/"
] | You can do it easily like following using `split()` method.
```js
var str = 'http://localhost:8000/test/';
var arr = str.split('/');
console.log(arr[arr.length-2])
``` | You can use :
window.location.pathname
returns the path and filename of the current page.
with the split() function
To learn more about window.location in w3 School :
<https://www.w3schools.com/js/js_window_location.asp>
```
//window.location.pathname return /test
var path=window.location.pathname.split("/");
... |
3,257 | I recently noticed this keypad on our front porch. As far as I can tell, it's not connected to anything. Does anyone know what it was for? A security system perhaps? Garage door?

 | 2010/12/02 | [
"https://diy.stackexchange.com/questions/3257",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/722/"
] | My guess is that it is a security keypad. The DNS on the cover could be from D.N. Security Services, Inc. a company from Northern California that was acquired by Universal Services of America in 2009: <http://www.universalpro.com/news2.html>. | Looks like a wireless garage door keypad. |
69,156,447 | I want some help on creating delegation on selected azure subnets. My code is as per below details.
**Variables defined in my variable file**
```
variable “subnets” {
type = map(any)
}
```
**My tfvar file contains below values**
```
subnets = {
mlops-aue-snt-aks = [“10.255.232.0/24”]
mlops-aue-snt-stg = [“10.255.2... | 2021/09/13 | [
"https://Stackoverflow.com/questions/69156447",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16895340/"
] | You can do this with `dynamic blocks` and the by changing your `subnets` a bit.
```
subnets = {
mlops-aue-snt-aks = {
cidr = [“10.255.232.0/24”]
service_delegation = false
}
# the rest in same format
mlops-aue-snt-db1 = {
cidr = [“10.255.235.0/26”]
se... | Check out this [repo](https://github.com/JamesDLD/terraform-azurerm-Az-VirtualNetwork/blob/master/main.tf). This is not my work and I am not taking credit for it. I have just decided to share it so that it can be useful for devs looking for a solution for this common problem. |
8,126,994 | I'm working against a SQL Server database that regularly has DateTime columns that can be null. I'm using LINQ to SQL to connect my WinForms (VB.NET) program to the data.
I've extended some of the LINQ objects and added a couple of `Nullable(Of DateTime)` properties. Basically, I'm calculating whether a particular val... | 2011/11/14 | [
"https://Stackoverflow.com/questions/8126994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/394484/"
] | If you're supplying a value to the `Nullable` constructor then it will have the given value, which would result in the scenario you're describing where `HasValue` is true.
To declare a nullable with a `HasValue` of `false` you can take either of these approaches:
```
Dim x As Nullable(Of DateTime)
Dim y As DateTime?
... | Ahmad's answer is good. There is also an empty constructor, even though strangely, there's no trace of it on MSDN:
```
Dim x As New Nullable(Of DateTime)
Debug.Assert(x.HasValue = False)
```
As expected, HasValue is false. If you have a Nullable(T) with a value, and want to remove that value, you'd just set it to No... |
234,955 | I read a lot of answers to questions very similar to this one, but I couldn't find something that really fits my problem. Here's the situation. I have a machine whose address is "machine1@address", and from this one I reach "machine2@different\_address". Now, I have to send/get files to/from machine2 directly from/on m... | 2015/10/09 | [
"https://unix.stackexchange.com/questions/234955",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/137731/"
] | Since FUSE is "File System in User Space", this could derive in undesired mounts, or virtual file system structures in your system that you didn't foresee/want to be there at all.
Changing ownership of devices implies that other users may use directly these devices without needing administrative rights (root/sudo). Ch... | Yes - just check that users in the `fuse` group are really meant to use fuse (and also the file permissions on `/dev/fuse`). |
922,161 | I am trying to connect to my FTP server via File Explorer. I am sure I configured my settings and passive mode correctly, but I still get this error message:

I am not sure why this happens so I am asking for some advice
>
> Edit: I was able to connect using command prom... | 2018/07/16 | [
"https://serverfault.com/questions/922161",
"https://serverfault.com",
"https://serverfault.com/users/478996/"
] | See picture:
[](https://i.stack.imgur.com/aAGwM.png)
I guess this is the problem that the file manager does not automatically convert to an external IP. So if you want to solve this problem, set it directly to the external IP directly on the FTP server.If yo... | The problem was that my NAT Router field was set to the ip address of my router page, all I had to do was change it to the public ip of my website and it works :) |
31,688,237 | I need to set special styles for `li.done` depending on whether they are before or after `li.current`. How can I do that using jQuery or CSS?
```css
ul { list-style: none; padding: 0; margin: 0; }
ul li {
display:inline-table;
padding: 5px 12px;
color: #ddd;
background-color: #bbb;
margin: 0;
}
.don... | 2015/07/28 | [
"https://Stackoverflow.com/questions/31688237",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2743865/"
] | You can achieve this just with CSS by using the `~` selector. From the [W3 documentation](http://www.w3.org/TR/css3-selectors/#general-sibling-combinators):
>
> **General sibling combinator**
>
>
> The general sibling combinator is made of the "tilde" (U+007E, ~) character that separates two sequences of simple sel... | You should take a look at jQuerys `.prevAll()` and `.nextAll()`.
```
var current = $(".current");
current.prevAll(".done").addClass("before");
current.nextAll(".done").addclass("after");
```
Please note that you will have to redo this every time you change the current element.
The documentation can be found [here](... |
48,498,621 | When trying to write a Regex expression in C#, the Regex itself is correct and matches the string:
```
String telRegex = @"(^0[0-9]{10})|(\(0[0-9]{4}\)[0-9]{6}$)";
Match telRegexResult = Regex.Match(textBox1.Text, telRegex);
if (telRegexResult.Success) {
MessageBox.Show("Your Regex Matches!");
} else MessageBox.Sh... | 2018/01/29 | [
"https://Stackoverflow.com/questions/48498621",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9283044/"
] | Your regex includes an alternation, which means it captures either:
```
^0[0-9]{10}
```
Or:
```
\(0[0-9]{4}\)[0-9]{6}$
```
You'll note therefore that neither side includes *both* the `^` start of line and `$` end of line matches, which is what you require to ensure that the entire string is matched.
Try the fol... | As an alternative, you could use [conditional matching with expression](https://learn.microsoft.com/en-us/dotnet/standard/base-types/alternation-constructs-in-regular-expressions#Conditional_Expr). Although the length of pattern is the same as @Iridium's one, this shows that there are always several ways to do the same... |
9,593,803 | I've got this XML file that I am parsing using the parser [here](https://github.com/bcaccinolo/XML-to-NSDictionary) and I'm running into an issue. The parser takes the XML and creates a dictionary out of it if there is only one item in the XML with the same structure, or an array of dictionaries if there is more than o... | 2012/03/06 | [
"https://Stackoverflow.com/questions/9593803",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1027644/"
] | Try out this link:
```
if([eventsArray isKindOfClass:[NSDictionary class]]) {
//there's only one item in the XML
} else {
//there's more than one item in the XML
}
```
Hope this helps. | I'd do:
```
if ([eventsArray isKindOfClass:[NSArray class]])
////
else if ([eventsArray isKindOfClass:[NSDictionary class]])
////
else
////
``` |
13,036,736 | If I have something a string that looks like "TEST(10,20,30)" how would I be able to pull just the 10 out of this string.
I have tried
```
/\(([^\)]+)\)/
```
and that gets the inside of the parenthesis, but when I trie to add in a comma e.g.
```
/\(([^\),]+)\)/
```
then nothing matches. | 2012/10/23 | [
"https://Stackoverflow.com/questions/13036736",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1718089/"
] | That is because you need to tell the regex to match the stuff between your comma and the closing bracket, too (or leave it out):
```
/\(([^),]+)/
```
or
```
/\(([^),]+)[^)]*\)/
```
As you can see you also don't need to escape parentheses inside character classes. | Hope this can guide you in the right direction:
```
irb(main):001:0> str = "TEST(10,20,30)"
=> "TEST(10,20,30)"
irb(main):002:0> str =~ /\w+\(([^,]+),.+\)/
=> 0
irb(main):003:0> $~[1]
=> "10"
```
The regex does this:
**\w+**
One or more word characters ("TEST")
**(([^,]+)**
A group for anything that is n... |
13,036,736 | If I have something a string that looks like "TEST(10,20,30)" how would I be able to pull just the 10 out of this string.
I have tried
```
/\(([^\)]+)\)/
```
and that gets the inside of the parenthesis, but when I trie to add in a comma e.g.
```
/\(([^\),]+)\)/
```
then nothing matches. | 2012/10/23 | [
"https://Stackoverflow.com/questions/13036736",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1718089/"
] | That is because you need to tell the regex to match the stuff between your comma and the closing bracket, too (or leave it out):
```
/\(([^),]+)/
```
or
```
/\(([^),]+)[^)]*\)/
```
As you can see you also don't need to escape parentheses inside character classes. | >
> how would I be able to pull just the 10 out of this string.
>
>
>
Use `lookahead` and `lookbehind`
```
(?<=\()\d+(?=,)
```
works [here](http://fiddle.re/dkm5) |
13,036,736 | If I have something a string that looks like "TEST(10,20,30)" how would I be able to pull just the 10 out of this string.
I have tried
```
/\(([^\)]+)\)/
```
and that gets the inside of the parenthesis, but when I trie to add in a comma e.g.
```
/\(([^\),]+)\)/
```
then nothing matches. | 2012/10/23 | [
"https://Stackoverflow.com/questions/13036736",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1718089/"
] | In this case, the pattern of the part you want to pick up is much simpler than the pattern of the part that you want to throw out.
```
"TEST(10,20,30)"[/\d+/] # => 10
``` | Hope this can guide you in the right direction:
```
irb(main):001:0> str = "TEST(10,20,30)"
=> "TEST(10,20,30)"
irb(main):002:0> str =~ /\w+\(([^,]+),.+\)/
=> 0
irb(main):003:0> $~[1]
=> "10"
```
The regex does this:
**\w+**
One or more word characters ("TEST")
**(([^,]+)**
A group for anything that is n... |
13,036,736 | If I have something a string that looks like "TEST(10,20,30)" how would I be able to pull just the 10 out of this string.
I have tried
```
/\(([^\)]+)\)/
```
and that gets the inside of the parenthesis, but when I trie to add in a comma e.g.
```
/\(([^\),]+)\)/
```
then nothing matches. | 2012/10/23 | [
"https://Stackoverflow.com/questions/13036736",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1718089/"
] | >
> how would I be able to pull just the 10 out of this string.
>
>
>
Use `lookahead` and `lookbehind`
```
(?<=\()\d+(?=,)
```
works [here](http://fiddle.re/dkm5) | Hope this can guide you in the right direction:
```
irb(main):001:0> str = "TEST(10,20,30)"
=> "TEST(10,20,30)"
irb(main):002:0> str =~ /\w+\(([^,]+),.+\)/
=> 0
irb(main):003:0> $~[1]
=> "10"
```
The regex does this:
**\w+**
One or more word characters ("TEST")
**(([^,]+)**
A group for anything that is n... |
13,036,736 | If I have something a string that looks like "TEST(10,20,30)" how would I be able to pull just the 10 out of this string.
I have tried
```
/\(([^\)]+)\)/
```
and that gets the inside of the parenthesis, but when I trie to add in a comma e.g.
```
/\(([^\),]+)\)/
```
then nothing matches. | 2012/10/23 | [
"https://Stackoverflow.com/questions/13036736",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1718089/"
] | In this case, the pattern of the part you want to pick up is much simpler than the pattern of the part that you want to throw out.
```
"TEST(10,20,30)"[/\d+/] # => 10
``` | >
> how would I be able to pull just the 10 out of this string.
>
>
>
Use `lookahead` and `lookbehind`
```
(?<=\()\d+(?=,)
```
works [here](http://fiddle.re/dkm5) |
9,966,056 | I am using SOAP , and got this returnString.
```
<?xml version="1.0" encoding="UTF-8" ?>
<result>
<a>dddddddddddd5</a>
<b>ccccc+</b>
<c>hi</c>
</result>
```
How can I retrieve the value from tag and assign it to a NSString?? | 2012/04/01 | [
"https://Stackoverflow.com/questions/9966056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1497488/"
] | Well it's the usual [url encoding](http://en.wikipedia.org/wiki/Url_encoding)
So they stand for `[`, respectively `]` | The data would probably have been posted originally from a web form looking a bit like this (but probably much more complicated):
```
<form action="http://example.com" method="post">
User login <input name="user[login]" /><br />
User password <input name="user[password]" /><br />
<input type="submit" />
... |
9,966,056 | I am using SOAP , and got this returnString.
```
<?xml version="1.0" encoding="UTF-8" ?>
<result>
<a>dddddddddddd5</a>
<b>ccccc+</b>
<c>hi</c>
</result>
```
How can I retrieve the value from tag and assign it to a NSString?? | 2012/04/01 | [
"https://Stackoverflow.com/questions/9966056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1497488/"
] | As per this answer over [here](https://stackoverflow.com/a/5082400/1108032): `str='foo%20%5B12%5D'` encodes `foo [12]`:
```
%20 is space
%22 is quotes
%5B is '['
and %5D is ']'
```
This is called [percent encoding](http://en.wikipedia.org/wiki/Percent-encoding) and is used in encoding special characters in the url p... | Not least important is why these symbols occur in url.
See <https://www.php.net/manual/en/function.parse-str.php#76792>, specifically:
```
parse_str('foo[]=1&foo[]=2&foo[]=3', $bar);
```
the above produces:
```
$bar = ['foo' => ['1', '2', '3'] ];
```
and what is THE method to separate query vars in arrays (in php... |
9,966,056 | I am using SOAP , and got this returnString.
```
<?xml version="1.0" encoding="UTF-8" ?>
<result>
<a>dddddddddddd5</a>
<b>ccccc+</b>
<c>hi</c>
</result>
```
How can I retrieve the value from tag and assign it to a NSString?? | 2012/04/01 | [
"https://Stackoverflow.com/questions/9966056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1497488/"
] | As per this answer over [here](https://stackoverflow.com/a/5082400/1108032): `str='foo%20%5B12%5D'` encodes `foo [12]`:
```
%20 is space
%22 is quotes
%5B is '['
and %5D is ']'
```
This is called [percent encoding](http://en.wikipedia.org/wiki/Percent-encoding) and is used in encoding special characters in the url p... | Well it's the usual [url encoding](http://en.wikipedia.org/wiki/Url_encoding)
So they stand for `[`, respectively `]` |
9,966,056 | I am using SOAP , and got this returnString.
```
<?xml version="1.0" encoding="UTF-8" ?>
<result>
<a>dddddddddddd5</a>
<b>ccccc+</b>
<c>hi</c>
</result>
```
How can I retrieve the value from tag and assign it to a NSString?? | 2012/04/01 | [
"https://Stackoverflow.com/questions/9966056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1497488/"
] | As per this answer over [here](https://stackoverflow.com/a/5082400/1108032): `str='foo%20%5B12%5D'` encodes `foo [12]`:
```
%20 is space
%22 is quotes
%5B is '['
and %5D is ']'
```
This is called [percent encoding](http://en.wikipedia.org/wiki/Percent-encoding) and is used in encoding special characters in the url p... | The data would probably have been posted originally from a web form looking a bit like this (but probably much more complicated):
```
<form action="http://example.com" method="post">
User login <input name="user[login]" /><br />
User password <input name="user[password]" /><br />
<input type="submit" />
... |
9,966,056 | I am using SOAP , and got this returnString.
```
<?xml version="1.0" encoding="UTF-8" ?>
<result>
<a>dddddddddddd5</a>
<b>ccccc+</b>
<c>hi</c>
</result>
```
How can I retrieve the value from tag and assign it to a NSString?? | 2012/04/01 | [
"https://Stackoverflow.com/questions/9966056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1497488/"
] | Well it's the usual [url encoding](http://en.wikipedia.org/wiki/Url_encoding)
So they stand for `[`, respectively `]` | To find out these values you can simply use Console in your browser and do the following
```js
console.log(decodeURI('user%5Blogin%5D=username&user%5Bpassword%5D=123456'))
``` |
9,966,056 | I am using SOAP , and got this returnString.
```
<?xml version="1.0" encoding="UTF-8" ?>
<result>
<a>dddddddddddd5</a>
<b>ccccc+</b>
<c>hi</c>
</result>
```
How can I retrieve the value from tag and assign it to a NSString?? | 2012/04/01 | [
"https://Stackoverflow.com/questions/9966056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1497488/"
] | `[]` is replaced by `%5B%5D` at URL encoding time. | Not least important is why these symbols occur in url.
See <https://www.php.net/manual/en/function.parse-str.php#76792>, specifically:
```
parse_str('foo[]=1&foo[]=2&foo[]=3', $bar);
```
the above produces:
```
$bar = ['foo' => ['1', '2', '3'] ];
```
and what is THE method to separate query vars in arrays (in php... |
9,966,056 | I am using SOAP , and got this returnString.
```
<?xml version="1.0" encoding="UTF-8" ?>
<result>
<a>dddddddddddd5</a>
<b>ccccc+</b>
<c>hi</c>
</result>
```
How can I retrieve the value from tag and assign it to a NSString?? | 2012/04/01 | [
"https://Stackoverflow.com/questions/9966056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1497488/"
] | To find out these values you can simply use Console in your browser and do the following
```js
console.log(decodeURI('user%5Blogin%5D=username&user%5Bpassword%5D=123456'))
``` | Not least important is why these symbols occur in url.
See <https://www.php.net/manual/en/function.parse-str.php#76792>, specifically:
```
parse_str('foo[]=1&foo[]=2&foo[]=3', $bar);
```
the above produces:
```
$bar = ['foo' => ['1', '2', '3'] ];
```
and what is THE method to separate query vars in arrays (in php... |
9,966,056 | I am using SOAP , and got this returnString.
```
<?xml version="1.0" encoding="UTF-8" ?>
<result>
<a>dddddddddddd5</a>
<b>ccccc+</b>
<c>hi</c>
</result>
```
How can I retrieve the value from tag and assign it to a NSString?? | 2012/04/01 | [
"https://Stackoverflow.com/questions/9966056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1497488/"
] | They represent `[` and `]`. The encoding is called ["URL encoding"](http://en.wikipedia.org/wiki/Percent-encoding). | To take a quick look, you can percent-en/decode using [this online tool](http://www.url-encode-decode.com). |
9,966,056 | I am using SOAP , and got this returnString.
```
<?xml version="1.0" encoding="UTF-8" ?>
<result>
<a>dddddddddddd5</a>
<b>ccccc+</b>
<c>hi</c>
</result>
```
How can I retrieve the value from tag and assign it to a NSString?? | 2012/04/01 | [
"https://Stackoverflow.com/questions/9966056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1497488/"
] | The data would probably have been posted originally from a web form looking a bit like this (but probably much more complicated):
```
<form action="http://example.com" method="post">
User login <input name="user[login]" /><br />
User password <input name="user[password]" /><br />
<input type="submit" />
... | Not least important is why these symbols occur in url.
See <https://www.php.net/manual/en/function.parse-str.php#76792>, specifically:
```
parse_str('foo[]=1&foo[]=2&foo[]=3', $bar);
```
the above produces:
```
$bar = ['foo' => ['1', '2', '3'] ];
```
and what is THE method to separate query vars in arrays (in php... |
9,966,056 | I am using SOAP , and got this returnString.
```
<?xml version="1.0" encoding="UTF-8" ?>
<result>
<a>dddddddddddd5</a>
<b>ccccc+</b>
<c>hi</c>
</result>
```
How can I retrieve the value from tag and assign it to a NSString?? | 2012/04/01 | [
"https://Stackoverflow.com/questions/9966056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1497488/"
] | To take a quick look, you can percent-en/decode using [this online tool](http://www.url-encode-decode.com). | The data would probably have been posted originally from a web form looking a bit like this (but probably much more complicated):
```
<form action="http://example.com" method="post">
User login <input name="user[login]" /><br />
User password <input name="user[password]" /><br />
<input type="submit" />
... |
23,345,914 | I have a data frame like
```
ID DATE TS_EVENT X Y Z
ID0026A 2013-01-03 2013-01-03 8:31:09 PM 25 0 0
ID0026A 2013-01-03 2013-01-03 8:31:09 PM 0 0 0
ID0026A 2013-01-03 2013-01-03 11:22:55 PM 0 0 0
ID0026A 2013-01-03 2013-01-03 11:36:05 PM 0 0 0
ID0026A 20... | 2014/04/28 | [
"https://Stackoverflow.com/questions/23345914",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2436608/"
] | with ddply
```
d$DATE <- ymd(d$DATE)
d$TS_EVENT <- ymd_hms(d$TS_EVENT)
plyr::ddply(d, .(ID, DATE), summarise, ts = max(TS_EVENT), date = max(DATE),
x = tail(X,1), y = tail(Y, 1), z = tail(Z, 1))
ID DATE ts date x y z
1 ID0026A 2013-01-03 2013-01-03 11:36:05 2013-0... | Try something like this (t is your data frame):
```
t <- t[ !duplicated(t[c("ID","DATE")], fromLast=TRUE), ][c("ID","DATE","X","Y","Z")]
```
Function duplicated will combine ID and DATE into a unique key, and get the last entry (i.e. latest DATE for that ID). Then add the fields you want to your data frame. Hope th... |
23,345,914 | I have a data frame like
```
ID DATE TS_EVENT X Y Z
ID0026A 2013-01-03 2013-01-03 8:31:09 PM 25 0 0
ID0026A 2013-01-03 2013-01-03 8:31:09 PM 0 0 0
ID0026A 2013-01-03 2013-01-03 11:22:55 PM 0 0 0
ID0026A 2013-01-03 2013-01-03 11:36:05 PM 0 0 0
ID0026A 20... | 2014/04/28 | [
"https://Stackoverflow.com/questions/23345914",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2436608/"
] | Per @PauloCardoso request, here's the `data.table` solution
```
library(data.table)
idx <- setDT(df)[, .I[TS_EVENT == max(TS_EVENT)], by = c("ID", "DATE")]$V1
unique(df[idx, -3, with = F], by = c("ID", "DATE"))
## ID DATE X Y Z
## 1: ID0026A 2013-01-03 0 0 0
## 2: ID0026A 2013-03-27 100 354 25
``` | Try something like this (t is your data frame):
```
t <- t[ !duplicated(t[c("ID","DATE")], fromLast=TRUE), ][c("ID","DATE","X","Y","Z")]
```
Function duplicated will combine ID and DATE into a unique key, and get the last entry (i.e. latest DATE for that ID). Then add the fields you want to your data frame. Hope th... |
18,568,144 | I've following layout in bootstrap- fluid layout
```
<div class="container">
<div class="row-fluid">
<div class="span3 offset1"> </div>
<div class="span3"> </div>
<div class="span3"> </div>
</div>
</div>
```
My problem is i want to align all the three spans perfectly center aligned
As i am using... | 2013/09/02 | [
"https://Stackoverflow.com/questions/18568144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2334937/"
] | There should be a row in there.
```
<div class="container">
<div class="row-fluid">
<div class="span3 offset1"> </div>
<div class="span3"> </div>
<div class="span3"> </div>
</div>
</div>
```
A non-bootstrap way to solve this:
```
<div class="container">
<div style="width: 80%; margi... | Like this
```
<div class="row-fluid">
<div class="span3 offset1"> </div>
<div class="span3"> </div>
<div class="span3"> </div>
</div>
<div class="container">
```
instead of :
```
<div class="row-fluid">
```
i think click on this below link duplicate question
[Is it possible to horizontally center... |
18,568,144 | I've following layout in bootstrap- fluid layout
```
<div class="container">
<div class="row-fluid">
<div class="span3 offset1"> </div>
<div class="span3"> </div>
<div class="span3"> </div>
</div>
</div>
```
My problem is i want to align all the three spans perfectly center aligned
As i am using... | 2013/09/02 | [
"https://Stackoverflow.com/questions/18568144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2334937/"
] | Bootstrap's spans are floated to the left. You can override this behavior by using this:
```
<div class="container">
<div class="span9" style="float: none; margin-left: auto; margin-right: auto">
<div class="row-fluid">
<div class="span4">... </div>
<div class="span4">... </div>
<div class... | There should be a row in there.
```
<div class="container">
<div class="row-fluid">
<div class="span3 offset1"> </div>
<div class="span3"> </div>
<div class="span3"> </div>
</div>
</div>
```
A non-bootstrap way to solve this:
```
<div class="container">
<div style="width: 80%; margi... |
18,568,144 | I've following layout in bootstrap- fluid layout
```
<div class="container">
<div class="row-fluid">
<div class="span3 offset1"> </div>
<div class="span3"> </div>
<div class="span3"> </div>
</div>
</div>
```
My problem is i want to align all the three spans perfectly center aligned
As i am using... | 2013/09/02 | [
"https://Stackoverflow.com/questions/18568144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2334937/"
] | Bootstrap's spans are floated to the left. You can override this behavior by using this:
```
<div class="container">
<div class="span9" style="float: none; margin-left: auto; margin-right: auto">
<div class="row-fluid">
<div class="span4">... </div>
<div class="span4">... </div>
<div class... | Like this
```
<div class="row-fluid">
<div class="span3 offset1"> </div>
<div class="span3"> </div>
<div class="span3"> </div>
</div>
<div class="container">
```
instead of :
```
<div class="row-fluid">
```
i think click on this below link duplicate question
[Is it possible to horizontally center... |
506,239 | I'm dealing with a FortiGate 100D for the first time, and am scratching my head as there doesn't seem to be an easy way to mirror ports in the switch; which is really a facility that I presumed it would provide.
Ideally, I want to mirror one (or more) ports to another port, so that I can track the traffic that is flow... | 2013/05/09 | [
"https://serverfault.com/questions/506239",
"https://serverfault.com",
"https://serverfault.com/users/53232/"
] | From the FortiOS CLI reference, under system > switch-interface:
```
config system switch-interface
edit <group_name>
set member <iflist>
set span {enable | disable}
set span-dest-port <portnum>
set span-direction {rx | tx | both}
set span-source-port <portlist>
set type {hub | switch | hardw... | The above answer is for older models (4.0).
For newer models (5.0-5.4), [look here](http://kb.fortinet.com/kb/documentLink.do?externalID=FD36798)
From the article:
The Switch Port Analyzer (SPAN) feature is now available for hardware switch interfaces on FortiGate models with built-in hardware switches (for example,... |
14,561,613 | I have var a=99.90090 i wan to fix it to only 99 and dislpaly it on text box but the orinigal value of var a should remain same.
I want like this as we do in iphone
```
SevereEIULabel.text=[NSString stringWithFormat:@"%.2f",appDelegate.Same_Vaccination_SevereEI_Unvaccinated];
``` | 2013/01/28 | [
"https://Stackoverflow.com/questions/14561613",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1808433/"
] | a = 99.90090;
```
b = a.toFixed(0); // 100
b = a.toFixed(1); // 99.9
```
**EDIT**
b = parseInt(99.90090); // 99
**EDIT 2**
```
<input type="text" id="my_field" name="my_field" value="" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script>
a = 99.90090;
$('#my_field').val(parseInt(a));
<... | why so serious.............
```
<script type="text/javascript">
function fnc()
{
var value=99.90090;
testvalue=parseInt(value);
document.getElementById("atext").value=testvalue;
}
</script>
<input type="text" value="" id="atext" />
<input type="button" onclick="fnc()" value="click me" />
``` |
14,561,613 | I have var a=99.90090 i wan to fix it to only 99 and dislpaly it on text box but the orinigal value of var a should remain same.
I want like this as we do in iphone
```
SevereEIULabel.text=[NSString stringWithFormat:@"%.2f",appDelegate.Same_Vaccination_SevereEI_Unvaccinated];
``` | 2013/01/28 | [
"https://Stackoverflow.com/questions/14561613",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1808433/"
] | a = 99.90090;
```
b = a.toFixed(0); // 100
b = a.toFixed(1); // 99.9
```
**EDIT**
b = parseInt(99.90090); // 99
**EDIT 2**
```
<input type="text" id="my_field" name="my_field" value="" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script>
a = 99.90090;
$('#my_field').val(parseInt(a));
<... | Check this code and let me know if i am wrong with what you are asking to implement -
```
var a=99.90090;
document.write(parseInt(a.toString()));
``` |
14,561,613 | I have var a=99.90090 i wan to fix it to only 99 and dislpaly it on text box but the orinigal value of var a should remain same.
I want like this as we do in iphone
```
SevereEIULabel.text=[NSString stringWithFormat:@"%.2f",appDelegate.Same_Vaccination_SevereEI_Unvaccinated];
``` | 2013/01/28 | [
"https://Stackoverflow.com/questions/14561613",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1808433/"
] | a = 99.90090;
```
b = a.toFixed(0); // 100
b = a.toFixed(1); // 99.9
```
**EDIT**
b = parseInt(99.90090); // 99
**EDIT 2**
```
<input type="text" id="my_field" name="my_field" value="" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script>
a = 99.90090;
$('#my_field').val(parseInt(a));
<... | ```
var a =99.90090;
temp = parseInt(a);
document.write(temp);
```
check my code and remind me if any changes needed |
956,666 | >
> Show $K(\alpha)$ is a splitting field of $\text {Irr}(\alpha,K)$ over $K$ $\iff$ $K \subset K(\alpha)$ is a normal extension.
>
>
>
I see that if $K \subset K(\alpha)$ is a normal extension, then $\text {Irr}(\alpha,K)$ splits over $K(\alpha)$ by definition and $K(\alpha)$ is by definition a splitting field of... | 2014/10/03 | [
"https://math.stackexchange.com/questions/956666",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/86379/"
] | You probably need the following equivalent definition:
Let $\;K/F\;$ be an algebraic field extension and let $\;\overline F\;$ be a (the) fixed algebraic closure field of $\;F\;$ containing $\;K\;$ then
\*\*Def.:\*\*$\;\;\;$ The extension $\;K/F\;$ is normal iff every $\;F$- embedding $\;K\hookrightarrow \overline F\... | Let $f(x)=\text {Irr}(\alpha,K)(x). $ Given $\sigma:K(\alpha) \hookrightarrow \overline K$ fixing $K$, since $f(\sigma(\alpha))=\sigma(f(\alpha))=0, \sigma(K(\alpha))\subseteq K(\alpha)$. For any $\beta\in K(\alpha)$, let $T=\{\gamma\in K(\alpha)\mid \text{Irr}(\gamma,K)(\beta)=0\}$. Then $K(T)\subseteq K(\alpha)$, and... |
14,300,161 | In my html code:
```html
<div data-role="fieldcontain" id="containdiv" class="no-field-separator">
<label for="field1" class="ui-hidden-accessible">To</label>
<input type="search" name="field1" id="field1" autocorrect="off" autocapitalize="off" autocomplete="off" placeholder="Field #1?" value="" />
<input ... | 2013/01/13 | [
"https://Stackoverflow.com/questions/14300161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/194982/"
] | You can try this.
```
.ui-helper-hidden-accessible { display:none; }
``` | Not sure if you can disable what jQuery Mobile is doing, but if I'm understanding your needs, have you tried something like just hiding the element?
```
$(".ui-helper-hidden-accessible").hide();
```
Hope this helps. |
14,300,161 | In my html code:
```html
<div data-role="fieldcontain" id="containdiv" class="no-field-separator">
<label for="field1" class="ui-hidden-accessible">To</label>
<input type="search" name="field1" id="field1" autocorrect="off" autocapitalize="off" autocomplete="off" placeholder="Field #1?" value="" />
<input ... | 2013/01/13 | [
"https://Stackoverflow.com/questions/14300161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/194982/"
] | Hide the class on focus:
```
$( ".selector" ).autocomplete({
focus: function (event, ui) {
$(".ui-helper-hidden-accessible").hide();
event.preventDefault();
}
});
``` | Not sure if you can disable what jQuery Mobile is doing, but if I'm understanding your needs, have you tried something like just hiding the element?
```
$(".ui-helper-hidden-accessible").hide();
```
Hope this helps. |
14,300,161 | In my html code:
```html
<div data-role="fieldcontain" id="containdiv" class="no-field-separator">
<label for="field1" class="ui-hidden-accessible">To</label>
<input type="search" name="field1" id="field1" autocorrect="off" autocapitalize="off" autocomplete="off" placeholder="Field #1?" value="" />
<input ... | 2013/01/13 | [
"https://Stackoverflow.com/questions/14300161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/194982/"
] | Hide the class on focus:
```
$( ".selector" ).autocomplete({
focus: function (event, ui) {
$(".ui-helper-hidden-accessible").hide();
event.preventDefault();
}
});
``` | You can try this.
```
.ui-helper-hidden-accessible { display:none; }
``` |
14,300,161 | In my html code:
```html
<div data-role="fieldcontain" id="containdiv" class="no-field-separator">
<label for="field1" class="ui-hidden-accessible">To</label>
<input type="search" name="field1" id="field1" autocorrect="off" autocapitalize="off" autocomplete="off" placeholder="Field #1?" value="" />
<input ... | 2013/01/13 | [
"https://Stackoverflow.com/questions/14300161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/194982/"
] | You can try this.
```
.ui-helper-hidden-accessible { display:none; }
``` | Try this :
```
$(".ui-helper-hidden-accessible").remove();
``` |
14,300,161 | In my html code:
```html
<div data-role="fieldcontain" id="containdiv" class="no-field-separator">
<label for="field1" class="ui-hidden-accessible">To</label>
<input type="search" name="field1" id="field1" autocorrect="off" autocapitalize="off" autocomplete="off" placeholder="Field #1?" value="" />
<input ... | 2013/01/13 | [
"https://Stackoverflow.com/questions/14300161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/194982/"
] | Hide the class on focus:
```
$( ".selector" ).autocomplete({
focus: function (event, ui) {
$(".ui-helper-hidden-accessible").hide();
event.preventDefault();
}
});
``` | Try this :
```
$(".ui-helper-hidden-accessible").remove();
``` |
34,085,290 | I am trying to add "jQuery.UI.Theme.Redmond" in my ASP.NET web forms application through Nuget Package Manager but, I am seeing the following error,
[](https://i.stack.imgur.com/EXxt5.png)
I am having latest boostrap (3.3.6), jquery (2.1.4) in my ASP... | 2015/12/04 | [
"https://Stackoverflow.com/questions/34085290",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4872454/"
] | I know this is late but just for the record :
Downgrade the version of jQuery to something less than 2.0.0 and more than 1.6.0. You can do this by going to *Tools/NuGet Package Manager/Manage NuGet packages for Solution/*.
Now go to Installed tab and search for jQuery. Then on the right side change the version as de... | Also works with jQuery 2.2.4, latest version for this moment is 3.0.0.1 |
34,085,290 | I am trying to add "jQuery.UI.Theme.Redmond" in my ASP.NET web forms application through Nuget Package Manager but, I am seeing the following error,
[](https://i.stack.imgur.com/EXxt5.png)
I am having latest boostrap (3.3.6), jquery (2.1.4) in my ASP... | 2015/12/04 | [
"https://Stackoverflow.com/questions/34085290",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4872454/"
] | I know this is late but just for the record :
Downgrade the version of jQuery to something less than 2.0.0 and more than 1.6.0. You can do this by going to *Tools/NuGet Package Manager/Manage NuGet packages for Solution/*.
Now go to Installed tab and search for jQuery. Then on the right side change the version as de... | Based on the error your are getting,
JQuery.UI.Theme.Redmond 1.10.3 requires jQuery version of 1.6.0 and upward && less than jQuery version 2.0.0
You have jquery (2.1.4) installed which is why you are getting the error because the version installed is over the jQuery 2.0.0 limit
you will need to decrease the version ... |
34,085,290 | I am trying to add "jQuery.UI.Theme.Redmond" in my ASP.NET web forms application through Nuget Package Manager but, I am seeing the following error,
[](https://i.stack.imgur.com/EXxt5.png)
I am having latest boostrap (3.3.6), jquery (2.1.4) in my ASP... | 2015/12/04 | [
"https://Stackoverflow.com/questions/34085290",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4872454/"
] | I know this is late but just for the record :
Downgrade the version of jQuery to something less than 2.0.0 and more than 1.6.0. You can do this by going to *Tools/NuGet Package Manager/Manage NuGet packages for Solution/*.
Now go to Installed tab and search for jQuery. Then on the right side change the version as de... | if you have downloaded the packages and select them locally for installation, you need to download all the required Dependencies and copy them to your local nuGet packages path.
about bootstrap Version = 4.5.2, as you can see dependencies:
jQuery (> = 3.0.0 && <4.0.0)
popper.js (> = 1.16.1 && <2.0.0)
<https://www.nug... |
34,085,290 | I am trying to add "jQuery.UI.Theme.Redmond" in my ASP.NET web forms application through Nuget Package Manager but, I am seeing the following error,
[](https://i.stack.imgur.com/EXxt5.png)
I am having latest boostrap (3.3.6), jquery (2.1.4) in my ASP... | 2015/12/04 | [
"https://Stackoverflow.com/questions/34085290",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4872454/"
] | if you have downloaded the packages and select them locally for installation, you need to download all the required Dependencies and copy them to your local nuGet packages path.
about bootstrap Version = 4.5.2, as you can see dependencies:
jQuery (> = 3.0.0 && <4.0.0)
popper.js (> = 1.16.1 && <2.0.0)
<https://www.nug... | Also works with jQuery 2.2.4, latest version for this moment is 3.0.0.1 |
34,085,290 | I am trying to add "jQuery.UI.Theme.Redmond" in my ASP.NET web forms application through Nuget Package Manager but, I am seeing the following error,
[](https://i.stack.imgur.com/EXxt5.png)
I am having latest boostrap (3.3.6), jquery (2.1.4) in my ASP... | 2015/12/04 | [
"https://Stackoverflow.com/questions/34085290",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4872454/"
] | if you have downloaded the packages and select them locally for installation, you need to download all the required Dependencies and copy them to your local nuGet packages path.
about bootstrap Version = 4.5.2, as you can see dependencies:
jQuery (> = 3.0.0 && <4.0.0)
popper.js (> = 1.16.1 && <2.0.0)
<https://www.nug... | Based on the error your are getting,
JQuery.UI.Theme.Redmond 1.10.3 requires jQuery version of 1.6.0 and upward && less than jQuery version 2.0.0
You have jquery (2.1.4) installed which is why you are getting the error because the version installed is over the jQuery 2.0.0 limit
you will need to decrease the version ... |
73,154,457 | Trying to do
```
1*2^-2
```
tried code
```
echo "$((1 * (1/2**2)))" == 0
printf %.3f "$((1 * (1/2**2)))" == 0.000
also tried echo 1/2 | bc == 0
```
Problem seems that division operator is only not working maybe its a bug in cygwin
Executing code in cygwin bash
Help | 2022/07/28 | [
"https://Stackoverflow.com/questions/73154457",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19257035/"
] | If `awk` is available:
```
$ awk 'BEGIN { print 1 * (1/2**2), 1* (1/2^2) }'
0.25 0.25
$ awk 'BEGIN { printf "%.3f / %.3f", 1 * (1/2**2), 1* (1/2^2) }'
0.250 / 0.250
``` | ```
echo "scale = 2; 1 * 2^-2" | bc
```
Also bc -l option works as suggested in comment |
34,574 | After going through the renaming guides from the doc folder in vim I found a way to replace text with the input `:%s/frompattern/topattern/g`.
Reaching the renaming files with the file browser tutorial/guide I managed to learn the MR and R method stated in the netrw-R help file.
Then I tried to use the text replacing ... | 2021/09/23 | [
"https://vi.stackexchange.com/questions/34574",
"https://vi.stackexchange.com",
"https://vi.stackexchange.com/users/38051/"
] | Netrw doesn't support file renames based on buffer changes (the way emacs dired does it).
There are external tools like `vidir` and `qmv` that runs vim (to be precise `EDITOR`) with directory contents where you can change filenames to be renamed "en masse".
It looks like this:
[ plugin has the possibility to rename files based on modification made on a Vim buffer.
1. Open the folder that contains the files that you want to rename: `:Fern path_to_folder`
2. Select the files you want to rename using the Fern action mark (`a` `mark` or `m`)
3. ... |
34,574 | After going through the renaming guides from the doc folder in vim I found a way to replace text with the input `:%s/frompattern/topattern/g`.
Reaching the renaming files with the file browser tutorial/guide I managed to learn the MR and R method stated in the netrw-R help file.
Then I tried to use the text replacing ... | 2021/09/23 | [
"https://vi.stackexchange.com/questions/34574",
"https://vi.stackexchange.com",
"https://vi.stackexchange.com/users/38051/"
] | Netrw doesn't support file renames based on buffer changes (the way emacs dired does it).
There are external tools like `vidir` and `qmv` that runs vim (to be precise `EDITOR`) with directory contents where you can change filenames to be renamed "en masse".
It looks like this:
[ tool, but of course I would say that as I wrote it
The main feature is that it's really simple and "obvious" to use it, which is important because I don't do batch renames very often. Every time I wanted to do batch renames I always had to figure out... |
164,492 | [Imagine] I have a compressed video file. How it's better to slightly change it? What software should I use?
Examples of tasks:
1. Make the video slowdown on some moment + draw a circle or freehand line on some part of image.
2. Blur some parts of video (e.g. censor it).
3. Fix something minor in it (manually erasing... | 2010/07/16 | [
"https://superuser.com/questions/164492",
"https://superuser.com",
"https://superuser.com/users/27264/"
] | As of PowerPoint 2010, there is a feature called [Broadcast Slide Show](https://web.archive.org/web/20100608094712/http://blogs.msdn.com:80/b/powerpoint/archive/2009/10/09/introducing-broadcast-slide-show.aspx). This feature (accessed via the Slide Show tab on the ribbon) will give you a link that you can send out to a... | Popular streaming video site [Ustream](http://www.ustream.tv/) supports doing this through [third-party software](http://helpcenter.ustream.tv/content/adding-graphics-and-other-effects). The 3rd party software for Macs is free, but for Windows costs. |
164,492 | [Imagine] I have a compressed video file. How it's better to slightly change it? What software should I use?
Examples of tasks:
1. Make the video slowdown on some moment + draw a circle or freehand line on some part of image.
2. Blur some parts of video (e.g. censor it).
3. Fix something minor in it (manually erasing... | 2010/07/16 | [
"https://superuser.com/questions/164492",
"https://superuser.com",
"https://superuser.com/users/27264/"
] | As of PowerPoint 2010, there is a feature called [Broadcast Slide Show](https://web.archive.org/web/20100608094712/http://blogs.msdn.com:80/b/powerpoint/archive/2009/10/09/introducing-broadcast-slide-show.aspx). This feature (accessed via the Slide Show tab on the ribbon) will give you a link that you can send out to a... | Using the answers to [this](https://superuser.com/questions/78515/is-there-any-software-that-can-capture-the-screen-and-turn-it-into-a-fake-webcam) question, you can capture Powerpoint (or any other application) and use it as a camera input to whatever streaming software you like to use. |
6,229,772 | ```
<div id="prettyphoto" align="left"> <a href="http://images.idealer1.com/getimage/999/<?php echo $image['vpid'] ?>.jpg" rel="prettyPhoto[gallery2]"><img src="http://images.idealer1.com/getimage/700/<?php echo $image['vpid'] ?>.jpg" width="100" alt="" /></a>
<ul class="gallery clearfix">
<?php foreach ($images ... | 2011/06/03 | [
"https://Stackoverflow.com/questions/6229772",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/155286/"
] | You could use [**`array_shift()`**](http://www.php.net/manual/en/function.array-shift.php):
```
<?php $firstImage = array_shift($images); ?>
<!-- do something with $firstImage -->
<?php foreach ($images as $image): ?>
...
<?php endforeach; ?>
```
or if you don't need a reference to the first image, [**`array_sli... | you can use some idea from this:
```
foreach($array as $key=>$value)
{
if($key==0)
echo "code for the large image";
else
echo "code for the thumbnail image";
}
``` |
6,229,772 | ```
<div id="prettyphoto" align="left"> <a href="http://images.idealer1.com/getimage/999/<?php echo $image['vpid'] ?>.jpg" rel="prettyPhoto[gallery2]"><img src="http://images.idealer1.com/getimage/700/<?php echo $image['vpid'] ?>.jpg" width="100" alt="" /></a>
<ul class="gallery clearfix">
<?php foreach ($images ... | 2011/06/03 | [
"https://Stackoverflow.com/questions/6229772",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/155286/"
] | You could use [**`array_shift()`**](http://www.php.net/manual/en/function.array-shift.php):
```
<?php $firstImage = array_shift($images); ?>
<!-- do something with $firstImage -->
<?php foreach ($images as $image): ?>
...
<?php endforeach; ?>
```
or if you don't need a reference to the first image, [**`array_sli... | You can iterate the array "manually", with next(), current(), etc:
```
<?php
$images = array(
array('vpid' => 1, ),
array('vpid' => 2, ),
array('vpid' => 3, ),
array('vpid' => 4, ),
);
$image = current($images);
?>
<div id="prettyphoto" align="left"> <a href="http://images.idealer1.com/getimage/999/<?... |
6,229,772 | ```
<div id="prettyphoto" align="left"> <a href="http://images.idealer1.com/getimage/999/<?php echo $image['vpid'] ?>.jpg" rel="prettyPhoto[gallery2]"><img src="http://images.idealer1.com/getimage/700/<?php echo $image['vpid'] ?>.jpg" width="100" alt="" /></a>
<ul class="gallery clearfix">
<?php foreach ($images ... | 2011/06/03 | [
"https://Stackoverflow.com/questions/6229772",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/155286/"
] | You can iterate the array "manually", with next(), current(), etc:
```
<?php
$images = array(
array('vpid' => 1, ),
array('vpid' => 2, ),
array('vpid' => 3, ),
array('vpid' => 4, ),
);
$image = current($images);
?>
<div id="prettyphoto" align="left"> <a href="http://images.idealer1.com/getimage/999/<?... | you can use some idea from this:
```
foreach($array as $key=>$value)
{
if($key==0)
echo "code for the large image";
else
echo "code for the thumbnail image";
}
``` |
31,305,945 | I recently began using two-factor authentication on GitHub, and I am now unable to use git over https on private repos in the usual way:
```
peter@computer:~$ git clone https://github.com/[...]/MyPrivateRepo
Cloning into 'MyPrivateRepo'...
Username for 'https://github.com': [...]
Password for 'https://[...]@github.com... | 2015/07/09 | [
"https://Stackoverflow.com/questions/31305945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2729534/"
] | To everyone struggling, what worked for me was creating personal access token and then using it as a **username AND password** (in the prompt that opened). | 1st: Get personal access token. <https://github.com/settings/tokens>
2nd: Put account & the token. Example is here:
```sh
$ git push
Username for 'https://github.com': # Put your GitHub account name
Password for 'https://{USERNAME}@github.com': # Put your Personal access token
```
Link on how to create... |
31,305,945 | I recently began using two-factor authentication on GitHub, and I am now unable to use git over https on private repos in the usual way:
```
peter@computer:~$ git clone https://github.com/[...]/MyPrivateRepo
Cloning into 'MyPrivateRepo'...
Username for 'https://github.com': [...]
Password for 'https://[...]@github.com... | 2015/07/09 | [
"https://Stackoverflow.com/questions/31305945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2729534/"
] | As per [@Nitsew's](https://stackoverflow.com/a/31305980/1023074) answer, Create your [personal access token](https://github.com/settings/tokens) and use your token as your username and enter with blank password.
Later you won't need any credentials to access all your private repo(s).
**Updates 2021:** *(It worked for... | To everyone struggling, what worked for me was creating personal access token and then using it as a **username AND password** (in the prompt that opened). |
31,305,945 | I recently began using two-factor authentication on GitHub, and I am now unable to use git over https on private repos in the usual way:
```
peter@computer:~$ git clone https://github.com/[...]/MyPrivateRepo
Cloning into 'MyPrivateRepo'...
Username for 'https://github.com': [...]
Password for 'https://[...]@github.com... | 2015/07/09 | [
"https://Stackoverflow.com/questions/31305945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2729534/"
] | If your repo have 2FA enabled. Highly suggest to use the app provided by github.com
Here is the link: <https://desktop.github.com/>
After you downloaded it and installed it. Follow the withard, the app will ask you to provide the one time password for login. Once you filled in the one time password, you could see you... | * Create [personal access token](https://github.com/settings/tokens)
+ For example your token: AAAEEEEDDDDDEEEDDDDDD
+ Owner of repo: facebook
+ Repo name: react
* Run this command with your repo information:
+ `git clone https://AAAEEEEDDDDDEEEDDDDDD@github.com/facebook/react.git` |
31,305,945 | I recently began using two-factor authentication on GitHub, and I am now unable to use git over https on private repos in the usual way:
```
peter@computer:~$ git clone https://github.com/[...]/MyPrivateRepo
Cloning into 'MyPrivateRepo'...
Username for 'https://github.com': [...]
Password for 'https://[...]@github.com... | 2015/07/09 | [
"https://Stackoverflow.com/questions/31305945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2729534/"
] | It generally comes to mind that you have set up two-factor authentication, after a few password trials and maybe a password reset. So, how can we git clone a private repository using two-factor authentication? It is simple, using access tokens.
**How to Authenticate Git using Access Tokens**
1. Go to <https://github.... | If your repo have 2FA enabled. Highly suggest to use the app provided by github.com
Here is the link: <https://desktop.github.com/>
After you downloaded it and installed it. Follow the withard, the app will ask you to provide the one time password for login. Once you filled in the one time password, you could see you... |
31,305,945 | I recently began using two-factor authentication on GitHub, and I am now unable to use git over https on private repos in the usual way:
```
peter@computer:~$ git clone https://github.com/[...]/MyPrivateRepo
Cloning into 'MyPrivateRepo'...
Username for 'https://github.com': [...]
Password for 'https://[...]@github.com... | 2015/07/09 | [
"https://Stackoverflow.com/questions/31305945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2729534/"
] | As per [@Nitsew's](https://stackoverflow.com/a/31305980/1023074) answer, Create your [personal access token](https://github.com/settings/tokens) and use your token as your username and enter with blank password.
Later you won't need any credentials to access all your private repo(s).
**Updates 2021:** *(It worked for... | If your repo have 2FA enabled. Highly suggest to use the app provided by github.com
Here is the link: <https://desktop.github.com/>
After you downloaded it and installed it. Follow the withard, the app will ask you to provide the one time password for login. Once you filled in the one time password, you could see you... |
31,305,945 | I recently began using two-factor authentication on GitHub, and I am now unable to use git over https on private repos in the usual way:
```
peter@computer:~$ git clone https://github.com/[...]/MyPrivateRepo
Cloning into 'MyPrivateRepo'...
Username for 'https://github.com': [...]
Password for 'https://[...]@github.com... | 2015/07/09 | [
"https://Stackoverflow.com/questions/31305945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2729534/"
] | It generally comes to mind that you have set up two-factor authentication, after a few password trials and maybe a password reset. So, how can we git clone a private repository using two-factor authentication? It is simple, using access tokens.
**How to Authenticate Git using Access Tokens**
1. Go to <https://github.... | * Create [personal access token](https://github.com/settings/tokens)
+ For example your token: AAAEEEEDDDDDEEEDDDDDD
+ Owner of repo: facebook
+ Repo name: react
* Run this command with your repo information:
+ `git clone https://AAAEEEEDDDDDEEEDDDDDD@github.com/facebook/react.git` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.