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 |
|---|---|---|---|---|---|
16,229,009 | I am very beginner to `PHP`. I want to create an `XML` file dynamically and i know how to do that. But here in this case, in the `XML` file, one node should contain an attribute *"name"* with a value from `$_POST` variable. How to write `PHP` code for creating `XML` file which contain a node with attribute *"name"*. | 2013/04/26 | [
"https://Stackoverflow.com/questions/16229009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2322331/"
] | You're only inserting the columns `ordid`, `deliveryaddress` and `spid` into `SHOPORDER` which means the others will probably default to `NULL`.
However, you've declared `custId` as `NOT NULL` so that's not allowed. You can actually tell what the complaint is by looking at the error message:
```
ORA-01400: cannot ins... | The problem is that this:
```
INSERT INTO SHOPORDER(ordid, deliveryaddress, spid)
VALUES (41, NULL, 23);
```
uses the default values for all columns that you don't specify an explicit value for, so it's equivalent to this:
```
INSERT INTO SHOPORDER(ordid, deliveryaddress, custid, spid)
VALUES (41, NULL, NULL, 23);
... |
16,229,009 | I am very beginner to `PHP`. I want to create an `XML` file dynamically and i know how to do that. But here in this case, in the `XML` file, one node should contain an attribute *"name"* with a value from `$_POST` variable. How to write `PHP` code for creating `XML` file which contain a node with attribute *"name"*. | 2013/04/26 | [
"https://Stackoverflow.com/questions/16229009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2322331/"
] | You're only inserting the columns `ordid`, `deliveryaddress` and `spid` into `SHOPORDER` which means the others will probably default to `NULL`.
However, you've declared `custId` as `NOT NULL` so that's not allowed. You can actually tell what the complaint is by looking at the error message:
```
ORA-01400: cannot ins... | ```
CREATE TABLE SHOPORDER(
ordid Number(4),
deliveryaddress varchar2(30),
custid Number(4) NOT NULL,
spid Number(4) NOT NULL,
CONSTRAINT orderpk PRIMARY KEY (ordid),
CONSTRAINT orderfk1 FOREIGN KEY (custid) REFERENCES CUSTOMER(custid),
CONSTRAINT orderfk2 FOREIGN KEY (spid) REFERENCES SALESPERSON(spid)
);
INSERT INTO... |
16,229,009 | I am very beginner to `PHP`. I want to create an `XML` file dynamically and i know how to do that. But here in this case, in the `XML` file, one node should contain an attribute *"name"* with a value from `$_POST` variable. How to write `PHP` code for creating `XML` file which contain a node with attribute *"name"*. | 2013/04/26 | [
"https://Stackoverflow.com/questions/16229009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2322331/"
] | The problem is that this:
```
INSERT INTO SHOPORDER(ordid, deliveryaddress, spid)
VALUES (41, NULL, 23);
```
uses the default values for all columns that you don't specify an explicit value for, so it's equivalent to this:
```
INSERT INTO SHOPORDER(ordid, deliveryaddress, custid, spid)
VALUES (41, NULL, NULL, 23);
... | ```
CREATE TABLE SHOPORDER(
ordid Number(4),
deliveryaddress varchar2(30),
custid Number(4) NOT NULL,
spid Number(4) NOT NULL,
CONSTRAINT orderpk PRIMARY KEY (ordid),
CONSTRAINT orderfk1 FOREIGN KEY (custid) REFERENCES CUSTOMER(custid),
CONSTRAINT orderfk2 FOREIGN KEY (spid) REFERENCES SALESPERSON(spid)
);
INSERT INTO... |
115,290 | The following question was asked in JEE Advanced 2017:
>
> [](https://i.stack.imgur.com/WA3DW.jpg)
>
>
>
The answers given are option A and B. I was able to get B as the correct answer but A look like the wrong option to me.
My approach for option (A) and checking ... | 2019/05/14 | [
"https://chemistry.stackexchange.com/questions/115290",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/57143/"
] | First, Cannizzaro reaction is not given by ketones (your statement says ketones give cannizzaro reaction).
Counter to your analysis, the following reaction will not occur since $\ce{H}$ bonded to methyl group is not sufficiently acidic for hydroxide ion to attack. Refer to $\mathrm{p}K\_\mathrm{a}$ values given by Mat... | The Cannizzaro reaction is a chemical reaction that involves the base-induced disproportionation of two molecules of a *non-enolizable aldehyde* to give a primary alcohol and a carboxylic acid ([Wikipedia](https://en.wikipedia.org/wiki/Cannizzaro_reaction)).
The haloform reaction requires a methyl ketone as the substr... |
1,073,689 | Im trying to add printing functionality to my app. I display the CPrintDialog to get the printer options. How do I get the printing range option enabled ? Currently this option is disabled when I doModal() the dialog. | 2009/07/02 | [
"https://Stackoverflow.com/questions/1073689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | What arguments are you passing to the CPrintDialog constructor? The constructor is declared as
```
CPrintDialog(BOOL bPrintSetupOnly,
DWORD dwFlags = PD_ALLPAGES|PD_USEDEVMODECOPIES|PD_NOPAGENUMS|
PD_HIDEPRINTTOFILE|PD_NOSELECTION,
CWnd* pParentWnd = NULL);
```
so if you don't supply a va... | Does your printing code set the amount of pages that are going to be printed? I don't have any code at hand but I think it's in OnPreparePrintDC() or something like that, where you set m\_MaxPage or so member of the object you get as an argument. |
307,934 | I have [this project](https://github.com/mafagafogigante/dungeon) that has several license notes (all GNU GPLv3) on the top of the source files.
They are all following the "rule" that the year in the copyright notice should be the year on which the file was last modified.
I wonder if I can substitute
`Copyright (C) ... | 2016/01/21 | [
"https://softwareengineering.stackexchange.com/questions/307934",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/149436/"
] | If it's part of your process, then yes. If it's specifically not part of your process, then no.
If it's not specified, the best thing is to ask the developers if they would like you to notify them if you fix bugs in their code and to respect their individual wishes.
If you don't want to do that or it's too complicat... | Just make sure it is constructive criticism, and tell him how you fixed the bug, so he doesn't make the bug again. |
307,934 | I have [this project](https://github.com/mafagafogigante/dungeon) that has several license notes (all GNU GPLv3) on the top of the source files.
They are all following the "rule" that the year in the copyright notice should be the year on which the file was last modified.
I wonder if I can substitute
`Copyright (C) ... | 2016/01/21 | [
"https://softwareengineering.stackexchange.com/questions/307934",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/149436/"
] | I think, if you found a bug in some developer's area, the best course of action would be to ask that developer to code review your changes.
This way you are not hurting somebody's ego, you are just doing your job (fixing a bug assigned to you, and making sure you don't break more as a result of the 'fix').
Build a co... | Just make sure it is constructive criticism, and tell him how you fixed the bug, so he doesn't make the bug again. |
307,934 | I have [this project](https://github.com/mafagafogigante/dungeon) that has several license notes (all GNU GPLv3) on the top of the source files.
They are all following the "rule" that the year in the copyright notice should be the year on which the file was last modified.
I wonder if I can substitute
`Copyright (C) ... | 2016/01/21 | [
"https://softwareengineering.stackexchange.com/questions/307934",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/149436/"
] | At the very least, you should notify them that you have discovered a potential bug with their code. This could be considered criticism (and you must be certainly be constructive when criticizing); but there is also potential that what you have found is *not actually a bug*.
By notifying the responsible party, you aren... | Just make sure it is constructive criticism, and tell him how you fixed the bug, so he doesn't make the bug again. |
307,934 | I have [this project](https://github.com/mafagafogigante/dungeon) that has several license notes (all GNU GPLv3) on the top of the source files.
They are all following the "rule" that the year in the copyright notice should be the year on which the file was last modified.
I wonder if I can substitute
`Copyright (C) ... | 2016/01/21 | [
"https://softwareengineering.stackexchange.com/questions/307934",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/149436/"
] | If it's part of your process, then yes. If it's specifically not part of your process, then no.
If it's not specified, the best thing is to ask the developers if they would like you to notify them if you fix bugs in their code and to respect their individual wishes.
If you don't want to do that or it's too complicat... | I think, if you found a bug in some developer's area, the best course of action would be to ask that developer to code review your changes.
This way you are not hurting somebody's ego, you are just doing your job (fixing a bug assigned to you, and making sure you don't break more as a result of the 'fix').
Build a co... |
307,934 | I have [this project](https://github.com/mafagafogigante/dungeon) that has several license notes (all GNU GPLv3) on the top of the source files.
They are all following the "rule" that the year in the copyright notice should be the year on which the file was last modified.
I wonder if I can substitute
`Copyright (C) ... | 2016/01/21 | [
"https://softwareengineering.stackexchange.com/questions/307934",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/149436/"
] | If it's part of your process, then yes. If it's specifically not part of your process, then no.
If it's not specified, the best thing is to ask the developers if they would like you to notify them if you fix bugs in their code and to respect their individual wishes.
If you don't want to do that or it's too complicat... | Are you the maintainer of the code? If so fix the bug, document the fix, and don't go pointing fingers to who's "to blame" for it in the first place.
Is someone else the maintainer? What were you doing digging through their code in the first place? Notify them that you found a potential problem and where it's locate... |
307,934 | I have [this project](https://github.com/mafagafogigante/dungeon) that has several license notes (all GNU GPLv3) on the top of the source files.
They are all following the "rule" that the year in the copyright notice should be the year on which the file was last modified.
I wonder if I can substitute
`Copyright (C) ... | 2016/01/21 | [
"https://softwareengineering.stackexchange.com/questions/307934",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/149436/"
] | If it's part of your process, then yes. If it's specifically not part of your process, then no.
If it's not specified, the best thing is to ask the developers if they would like you to notify them if you fix bugs in their code and to respect their individual wishes.
If you don't want to do that or it's too complicat... | At the very least, you should notify them that you have discovered a potential bug with their code. This could be considered criticism (and you must be certainly be constructive when criticizing); but there is also potential that what you have found is *not actually a bug*.
By notifying the responsible party, you aren... |
307,934 | I have [this project](https://github.com/mafagafogigante/dungeon) that has several license notes (all GNU GPLv3) on the top of the source files.
They are all following the "rule" that the year in the copyright notice should be the year on which the file was last modified.
I wonder if I can substitute
`Copyright (C) ... | 2016/01/21 | [
"https://softwareengineering.stackexchange.com/questions/307934",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/149436/"
] | I think, if you found a bug in some developer's area, the best course of action would be to ask that developer to code review your changes.
This way you are not hurting somebody's ego, you are just doing your job (fixing a bug assigned to you, and making sure you don't break more as a result of the 'fix').
Build a co... | Are you the maintainer of the code? If so fix the bug, document the fix, and don't go pointing fingers to who's "to blame" for it in the first place.
Is someone else the maintainer? What were you doing digging through their code in the first place? Notify them that you found a potential problem and where it's locate... |
307,934 | I have [this project](https://github.com/mafagafogigante/dungeon) that has several license notes (all GNU GPLv3) on the top of the source files.
They are all following the "rule" that the year in the copyright notice should be the year on which the file was last modified.
I wonder if I can substitute
`Copyright (C) ... | 2016/01/21 | [
"https://softwareengineering.stackexchange.com/questions/307934",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/149436/"
] | I think, if you found a bug in some developer's area, the best course of action would be to ask that developer to code review your changes.
This way you are not hurting somebody's ego, you are just doing your job (fixing a bug assigned to you, and making sure you don't break more as a result of the 'fix').
Build a co... | At the very least, you should notify them that you have discovered a potential bug with their code. This could be considered criticism (and you must be certainly be constructive when criticizing); but there is also potential that what you have found is *not actually a bug*.
By notifying the responsible party, you aren... |
307,934 | I have [this project](https://github.com/mafagafogigante/dungeon) that has several license notes (all GNU GPLv3) on the top of the source files.
They are all following the "rule" that the year in the copyright notice should be the year on which the file was last modified.
I wonder if I can substitute
`Copyright (C) ... | 2016/01/21 | [
"https://softwareengineering.stackexchange.com/questions/307934",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/149436/"
] | At the very least, you should notify them that you have discovered a potential bug with their code. This could be considered criticism (and you must be certainly be constructive when criticizing); but there is also potential that what you have found is *not actually a bug*.
By notifying the responsible party, you aren... | Are you the maintainer of the code? If so fix the bug, document the fix, and don't go pointing fingers to who's "to blame" for it in the first place.
Is someone else the maintainer? What were you doing digging through their code in the first place? Notify them that you found a potential problem and where it's locate... |
309,661 | What is more gold efficient to destroy a turret faster: buying ad or attack speed?
To be more precise, if I was to to attack the tower with 1 item either, "[Dagger](http://leagueoflegends.wikia.com/wiki/Dagger)" or "[Long-Sword](http://leagueoflegends.wikia.com/wiki/Long_Sword)", which would destroy it faster? Also, w... | 2017/05/24 | [
"https://gaming.stackexchange.com/questions/309661",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/187651/"
] | No, currently remounting is not possible. As OP mentioned in their answer, remounting was restricted to the closed beta.
However some theories have been put forward as to why remounting was removed by the time the game was released. [Some](https://steamcommunity.com/app/444090/discussions/0/343787920116528584/) claim ... | There is currently no way to get back on your horse once you have dismounted.
There was a remount button during the game's closed beta, but it was removed before the game's public release. |
4,482,011 | Let $G\geq H,K$ such that $[G:H]<\infty$ prove $[G:H]=\sum[K:(K\cap gHg^{-1})]$
my attempt
I've tried to make a group action of G on the coesets of H with conjugation and to try understand the orbits/stabilizers and I tried to figure out how the right index behaves so it might lead to me to know when the cosets hav... | 2022/06/28 | [
"https://math.stackexchange.com/questions/4482011",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/628914/"
] | Consider the coset space $G/H$, the subgroup $K$ should act on $G/H$ via left multiplication (not conjugation!) $k \cdot gH = kgH$.
We can partition $G/H$ using the orbits of $K$ so, for a chosen set of representatives $\{g\_i\}$ from each orbit we have:
$$G/H = \bigsqcup\_i {\rm Orb}(g\_iH) = \bigsqcup\_i Kg\_iH. $$
... | The action is $K\curvearrowright G/H$ by left multiplication. The orbits correspond to double cosets $KgH$ (every orbit is a collection of cosets of $H$ whose union is a double coset). For every orbit, we can pick a particular representative $gH$, and then the size of the orbit equals $[K:\mathrm{Stab}(gH)]$ by the orb... |
16,356,138 | I have two arrays like this.
```
$array1=array(1,2,3,4,5,7);
$array2=array(1,2,3,4,5,6);
```
So, the output should bring the difference in both arrays.
The output should be.
1,2,3,4,5 -> These numbers exist in both arrays, **so these should be ignored**.
7 and 6 -> These numbers are the un-common in both arrays, ... | 2013/05/03 | [
"https://Stackoverflow.com/questions/16356138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/549481/"
] | try this
```
array_merge(array_diff($array1,$array2),array_diff($array2,$array1))
``` | ```
foreach($array1 as $key => $value) {
if($value != $array2[$key]) {
echo "\$array1[" . $key . "] (" . $value . ") is different to \$array2[" . $key . "] (" . $array2[$key] . "<br />";
}
}
``` |
29,774,247 | I have two files.
file A has, 3 columns
Sno,name,age,key,checkvalue
file B has 3 columns
Sno,title,age
I want to merge these two into final file C which has
Sno,name,age,key,checkvalue
I tried renaming "title" to "name" and then I used "Add constants" to add the other two field.
but, when i try to merge these, I ge... | 2015/04/21 | [
"https://Stackoverflow.com/questions/29774247",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4711937/"
] | I would suggest writing a plugin that modifies the admin interface as oppose to modifying the WordPress core, including it in a theme, or using a third party plugin. In your plugin use the admin\_enqueue\_scripts add\_action, as shown below to load your scripts while in the admin.
```
function load_custom_wp_admin_scr... | I would recommend using a plugin called [Add Admin JavaScript](https://wordpress.org/plugins/add-admin-javascript/). This lets you add your JS to every admin page easily, and you can either use a file or inline JS. |
2,699,919 | Using the open-cover definition of compactness (if X is a topological space, a collection of sets {$U\_{\alpha}|\alpha\in A$} with each being open in X, is said to be an **open cover** of X if $X=\bigcup\_{\alpha\in
A}U\_\alpha$. The space $X$ is compact if for every open cover of $X$, there is a finite subcollection o... | 2018/03/20 | [
"https://math.stackexchange.com/questions/2699919",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/525188/"
] | So suppose we have a compact space $X$ and a continuous surjective $f:X \to Y$, and we want to show $Y$ is compact:
Let $\mathcal{U} = \{O\_a, a \in A\}$ be an arbitrary open cover of $Y$, indexed by some set $A$.
Then define $\mathcal{V}:=\{f^{-1}[O\_a]: a \in A\}$.
All members of $\mathcal{V}$ are open subsets of... | $X=f^{-1}\left(\displaystyle\bigcup\_{i}G\_{i}\right)=\displaystyle\bigcup\_{i}f^{-1}(G\_{i})=f^{-1}(G\_{i\_{1}})\cup\cdots\cup f^{-1}(G\_{i\_{N}})$, then $Y=f(X)\subseteq G\_{i\_{1}}\cup\cdots\cup G\_{i\_{N}}$. |
19,160,381 | We're designing an internal-only library that will serve as a core business object model for several upcoming applications. It covers mostly Customers of various types and Documents of various types.
Obviously we want to ensure that if you're going to use these objects, and especially if you're going to serialize them... | 2013/10/03 | [
"https://Stackoverflow.com/questions/19160381",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Restlet offers a Restlet -> Servlet adapter with the `org.restlet.ext.servlet.ServerServlet` class. You should bind this to the desired path, and let it know the name of your `Application` like this:
```
serve("/api/*").with(ServerServlet.class);
getServletContext().setAttribute(
"org.restlet.application", "com.yo... | Well, i tought you add your old web.xml. But this should solve your problem.
```
serve("/api/*").with(ApiServlet.class);
```
If you are not using plain Servlet as implementation of your REST api, it will be a bit tricky. Jersey can be integrated with Guice either. |
50,064,746 | I'm struggling with a super simple transaction. It always fails with the message "Transaction failed all retries" but there are no error messages besides that on the `logcat`.
When I debug it, I see that it's being retried several times. I really don't know why, as other transactions run without issue.
I just want to... | 2018/04/27 | [
"https://Stackoverflow.com/questions/50064746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1108397/"
] | According to the [documentation about transactions](https://firebase.google.com/docs/firestore/manage-data/transactions):
>
> If a transaction reads documents and another client modifies any of
> those documents, Cloud Firestore retries the transaction. This feature
> ensures that the transaction runs on up-to-date... | There is no need to use transaction in such a case. To copy a document from a location to another, please use the following method:
```
public void cloneFirestoreDocument(DocumentReference fromPath, final DocumentReference toPath) {
fromPath.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {
... |
12,522,279 | I want to create a directory structure in Windows from within SAS. Preferably using a method that will allow me to specify a UNC naming convention such as:
```
\\computername\downloads\x\y\z
```
I have seen many examples for SAS on the web using the DOS `mkdir` command called via `%sysexec()` or the `x`command. The ... | 2012/09/20 | [
"https://Stackoverflow.com/questions/12522279",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/214994/"
] | I'm on WinXP as well, using SAS 9.3 TS1M1. The following works for me as advertised:
```
122 options noxwait;
123 data _null_;
124 rc = system('mkdir \\W98052442n3m1\public\x\y\z');
125 put rc=;
126 run;
rc=0
NOTE: DATA statement used (Total process time):
real time 1.68 seconds
cpu tim... | This seems to work just fine with the dos window remaining open. You may need the XSYNC option. I am using 9.3 TS1M1 64 bit under VMWARE on a MAC:
```
options xwait xsync;
x mkdir c:\newdirectory;
``` |
12,522,279 | I want to create a directory structure in Windows from within SAS. Preferably using a method that will allow me to specify a UNC naming convention such as:
```
\\computername\downloads\x\y\z
```
I have seen many examples for SAS on the web using the DOS `mkdir` command called via `%sysexec()` or the `x`command. The ... | 2012/09/20 | [
"https://Stackoverflow.com/questions/12522279",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/214994/"
] | You need to use the `mkdir` option `-p` which will create all the sub folders
i.e.
```
x mkdir -p "c:\newdirectory\level 1\level 2";
``` | I'm on WinXP as well, using SAS 9.3 TS1M1. The following works for me as advertised:
```
122 options noxwait;
123 data _null_;
124 rc = system('mkdir \\W98052442n3m1\public\x\y\z');
125 put rc=;
126 run;
rc=0
NOTE: DATA statement used (Total process time):
real time 1.68 seconds
cpu tim... |
12,522,279 | I want to create a directory structure in Windows from within SAS. Preferably using a method that will allow me to specify a UNC naming convention such as:
```
\\computername\downloads\x\y\z
```
I have seen many examples for SAS on the web using the DOS `mkdir` command called via `%sysexec()` or the `x`command. The ... | 2012/09/20 | [
"https://Stackoverflow.com/questions/12522279",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/214994/"
] | You need to quote your x commands, e.g.
```
x 'mkdir "c:\this\that\something else"' ;
```
Also, I've never had a problem using UNC paths, e.g.
```
x "\\server.domain\share\runthis.exe" ;
``` | This seems to work just fine with the dos window remaining open. You may need the XSYNC option. I am using 9.3 TS1M1 64 bit under VMWARE on a MAC:
```
options xwait xsync;
x mkdir c:\newdirectory;
``` |
12,522,279 | I want to create a directory structure in Windows from within SAS. Preferably using a method that will allow me to specify a UNC naming convention such as:
```
\\computername\downloads\x\y\z
```
I have seen many examples for SAS on the web using the DOS `mkdir` command called via `%sysexec()` or the `x`command. The ... | 2012/09/20 | [
"https://Stackoverflow.com/questions/12522279",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/214994/"
] | You need to use the `mkdir` option `-p` which will create all the sub folders
i.e.
```
x mkdir -p "c:\newdirectory\level 1\level 2";
``` | This seems to work just fine with the dos window remaining open. You may need the XSYNC option. I am using 9.3 TS1M1 64 bit under VMWARE on a MAC:
```
options xwait xsync;
x mkdir c:\newdirectory;
``` |
12,522,279 | I want to create a directory structure in Windows from within SAS. Preferably using a method that will allow me to specify a UNC naming convention such as:
```
\\computername\downloads\x\y\z
```
I have seen many examples for SAS on the web using the DOS `mkdir` command called via `%sysexec()` or the `x`command. The ... | 2012/09/20 | [
"https://Stackoverflow.com/questions/12522279",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/214994/"
] | Here is a trick that uses the LIBNAME statement to make a directory
`options dlcreatedir;
libname newdir "/u/sascrh/brand_new_folder";`
I believe this is more reliable than an X statement.
Source: [SAS trick: get the LIBNAME statement to create folders for you](https://blogs.sas.com/content/sasdummy/2013/07/02/use-d... | This seems to work just fine with the dos window remaining open. You may need the XSYNC option. I am using 9.3 TS1M1 64 bit under VMWARE on a MAC:
```
options xwait xsync;
x mkdir c:\newdirectory;
``` |
12,522,279 | I want to create a directory structure in Windows from within SAS. Preferably using a method that will allow me to specify a UNC naming convention such as:
```
\\computername\downloads\x\y\z
```
I have seen many examples for SAS on the web using the DOS `mkdir` command called via `%sysexec()` or the `x`command. The ... | 2012/09/20 | [
"https://Stackoverflow.com/questions/12522279",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/214994/"
] | You need to use the `mkdir` option `-p` which will create all the sub folders
i.e.
```
x mkdir -p "c:\newdirectory\level 1\level 2";
``` | You need to quote your x commands, e.g.
```
x 'mkdir "c:\this\that\something else"' ;
```
Also, I've never had a problem using UNC paths, e.g.
```
x "\\server.domain\share\runthis.exe" ;
``` |
12,522,279 | I want to create a directory structure in Windows from within SAS. Preferably using a method that will allow me to specify a UNC naming convention such as:
```
\\computername\downloads\x\y\z
```
I have seen many examples for SAS on the web using the DOS `mkdir` command called via `%sysexec()` or the `x`command. The ... | 2012/09/20 | [
"https://Stackoverflow.com/questions/12522279",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/214994/"
] | You need to use the `mkdir` option `-p` which will create all the sub folders
i.e.
```
x mkdir -p "c:\newdirectory\level 1\level 2";
``` | Here is a trick that uses the LIBNAME statement to make a directory
`options dlcreatedir;
libname newdir "/u/sascrh/brand_new_folder";`
I believe this is more reliable than an X statement.
Source: [SAS trick: get the LIBNAME statement to create folders for you](https://blogs.sas.com/content/sasdummy/2013/07/02/use-d... |
37,347,237 | I have the following html/css:
```css
#wrapper {
width: 400px;
background-color: red;
}
#text {
margin-right: 50px;
}
#subcontent {
float: right;
width: 50px;
}
```
```html
<div id="wrapper">
<div id="subcontent">
<img src="http://lorempicsum.com/futurama/50/50/1" width="50">
</div>
... | 2016/05/20 | [
"https://Stackoverflow.com/questions/37347237",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/412004/"
] | Cool. If I understand your question correctly, you are trying to change the order of the HTML, yet have the output still look the same?
If this is the case, you need to give `#text` AND `#subcontent` a `float:left;` add a clearing div and use a `calc` width on your text to make sure that the image will always fit in w... | Something like this?
```css
#wrapper {
width: 400px;
background-color: red;
position: relative;
}
#text {
margin-right: 50px;
}
#subcontent {
position: absolute;
top: 0;
right: 0;
width: 50px;
}
```
```html
<div id="wrapper">
<div id="text">Lorem ipsum dolor sit amet, consectetur adipi... |
37,347,237 | I have the following html/css:
```css
#wrapper {
width: 400px;
background-color: red;
}
#text {
margin-right: 50px;
}
#subcontent {
float: right;
width: 50px;
}
```
```html
<div id="wrapper">
<div id="subcontent">
<img src="http://lorempicsum.com/futurama/50/50/1" width="50">
</div>
... | 2016/05/20 | [
"https://Stackoverflow.com/questions/37347237",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/412004/"
] | Cool. If I understand your question correctly, you are trying to change the order of the HTML, yet have the output still look the same?
If this is the case, you need to give `#text` AND `#subcontent` a `float:left;` add a clearing div and use a `calc` width on your text to make sure that the image will always fit in w... | Float is a pain.
Try to use flex and media queries for a responsive design :
**Note:** since you mention rtl reading, I strongly advise you to have a look on the flex-direction property ([MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction))
```css
#wrapper {
display: flex;
width: 400px;
ba... |
678,019 | I'm attempting to learn Ruby on Rails. I'm pretty confident with the basics and writing my own models, controllers and views, although I only know the basics.
Lately I've found that, when I start a new application, most of my models nicely fit into the REST philosophy, and I end up just writing most of the same scaff... | 2009/03/24 | [
"https://Stackoverflow.com/questions/678019",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/40667/"
] | Rails' fanatical devotion to choosing smart defaults is exactly why you observe that when you hand write code it ends up looking like the code generated by scaffolding. Personally I really enjoy using scaffolds because there's only a couple of tweaks needed at the end (layouts, CSS, validations, etc etc) for those real... | I think the idea is that you use it to generate 'generic' code, and then rewrite/refactor it to your specific requirements.
I think there is no problem using the code out of the box generator if it does what you want - as long as you remember what it all does from a security point of view (e.g. don't leave in edit/upd... |
678,019 | I'm attempting to learn Ruby on Rails. I'm pretty confident with the basics and writing my own models, controllers and views, although I only know the basics.
Lately I've found that, when I start a new application, most of my models nicely fit into the REST philosophy, and I end up just writing most of the same scaff... | 2009/03/24 | [
"https://Stackoverflow.com/questions/678019",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/40667/"
] | I'm not sure if the culture is really against scaffolding or not, but I, for one, love it.
Now, what I do know is that there was sort of a small backlash against scaffolding for a while. This was because basically every Rails tutorial was basically 'whoa, just type
```
ruby script/generate scaffolding Post title:str... | I think the idea is that you use it to generate 'generic' code, and then rewrite/refactor it to your specific requirements.
I think there is no problem using the code out of the box generator if it does what you want - as long as you remember what it all does from a security point of view (e.g. don't leave in edit/upd... |
678,019 | I'm attempting to learn Ruby on Rails. I'm pretty confident with the basics and writing my own models, controllers and views, although I only know the basics.
Lately I've found that, when I start a new application, most of my models nicely fit into the REST philosophy, and I end up just writing most of the same scaff... | 2009/03/24 | [
"https://Stackoverflow.com/questions/678019",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/40667/"
] | Rails' fanatical devotion to choosing smart defaults is exactly why you observe that when you hand write code it ends up looking like the code generated by scaffolding. Personally I really enjoy using scaffolds because there's only a couple of tweaks needed at the end (layouts, CSS, validations, etc etc) for those real... | It is a myth that scaffold is meant only for newbies. It is a great tool to kick start you application really quickly. Of course you will need to modify the generated code to suit your requirements. Having said that, it never hurts to have a ready -made code, most of which will be used as is. |
678,019 | I'm attempting to learn Ruby on Rails. I'm pretty confident with the basics and writing my own models, controllers and views, although I only know the basics.
Lately I've found that, when I start a new application, most of my models nicely fit into the REST philosophy, and I end up just writing most of the same scaff... | 2009/03/24 | [
"https://Stackoverflow.com/questions/678019",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/40667/"
] | I'm not sure if the culture is really against scaffolding or not, but I, for one, love it.
Now, what I do know is that there was sort of a small backlash against scaffolding for a while. This was because basically every Rails tutorial was basically 'whoa, just type
```
ruby script/generate scaffolding Post title:str... | It is a myth that scaffold is meant only for newbies. It is a great tool to kick start you application really quickly. Of course you will need to modify the generated code to suit your requirements. Having said that, it never hurts to have a ready -made code, most of which will be used as is. |
106,240 | In Family Guy, season 16, episode 7, Putin is entering Peter's house and declaring he needs the bathroom because he "George Brent himself". I have googled this, as instructed by Peter, but could not find out what it means. What does it mean? | 2020/01/12 | [
"https://movies.stackexchange.com/questions/106240",
"https://movies.stackexchange.com",
"https://movies.stackexchange.com/users/78465/"
] | It's a reference to hall-of-fame baseball player George Brett.
<https://deadspin.com/george-brett-would-like-to-tell-you-about-that-time-he-5052185>
It's basically a reference to defecating in one's pants. | According to [Urban Dictionary](https://www.urbandictionary.com/define.php?term=George%20Brett), it means:
>
> Having uncontrollable watery diarrhea that runs down the back of your leg, usually after eating bad shellfish or possibly Mexican food.
>
>
> *I pulled a George Brett on my drive home from Red Lobster and ... |
34,301,138 | I am trying to consume data from API which is in the following format. Where `count` can be more than one -
```
{u'count': 1, u'previous': None, u'results': [{u'url': u'http://127.0.0.1:8000/offapp/cities/', u'city_name': u'Kolkata', u'id': 1}], u'next': None}
```
I am using the following method to consume json -
... | 2015/12/15 | [
"https://Stackoverflow.com/questions/34301138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4966987/"
] | I have not used requests json but looking at the documentation you should be using it as a dictionary as the regular json module.
In your code use `'cities': data['results']` and then in your template use `city.city_name`.
Django templates use dot lookups: when the template system encounters a dot in a variable name, ... | It looks like `'city_name'` is a property of `data.results[0]`, not `data.city`. Sorry I can't test the `requests.get(url).json()`, so it may need to be `data['results'][0]` |
3,846,338 | >
> If $\frac{(a-b)(c-d)}{(b-c)(d-a)} = \frac{2016}{2017}$ , find $\frac{(a-c)(b-d)}{(a-b)(c-d)}$ .
>
>
>
**What I Tried** :- First I thought for a moment and found out that I can write this :
$$\frac{(a-c)(b-d)}{(b-c)(d-a)} = \frac{(a-c)(b-d)}{(a-b)(c-d)} \* \frac{2016}{2017}$$
But how is it going to help?
Then... | 2020/09/30 | [
"https://math.stackexchange.com/questions/3846338",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/772237/"
] | Let
$$t=\frac{(a-b)(c-d)}{(b-c)(d-a)}=\frac{ac+bd-ad-bc}{ac+bd-ab-cd}$$
then
$$t-1=\frac{ab+cd-ad-bc}{ac+bd-ab-cd}=\frac{(a-c)(b-d)}{(b-c)(d-a)}$$
so
$$\frac{(a-c)(b-d)}{(a-b)(c-d)}=\frac{t-1}{t}.$$ | Quite similar approach:
$$\frac{2016}{2017}=1-\frac{1}{2017}$$
$$\frac{(a-b)(c-d)}{(b-c)(d-a)}=1-\frac{1}{(b-c)(d-a)}$$
After reducing we get:
$$(a-c)(b-d)=-1=-\frac{(a-b)(c-d)}{(a-b)(c-d)}$$
Or:
$$\frac{(a-c)(b-d)}{(a-b)(c-d)}=\frac{-1}{(a-b)(c-d)}=-\frac{1}{2016}$$ |
4,171,782 | I seem to be having trouble getting a 'proper' connection between my Java server and my JavaScript client. It appears to connect okay, the client sends its header okay, but that's as far as it gets. The `onopen` or `onmessage` functions are never triggered at all.
Here's the code for the Java server:
```
import java... | 2010/11/13 | [
"https://Stackoverflow.com/questions/4171782",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/501360/"
] | There's a challenge-response aspect to the protocol that you appear to be missing - the client sends two extra headers and some random data:
```
GET /demo HTTP/1.1
Host: example.com
Connection: Upgrade
**Sec-WebSocket-Key2: 12998 5 Y3 1 .P00**
Sec-WebSocket-Protocol: sample
Upgrade: WebSocket
**Sec-WebSocket-Key1: 4 ... | There are many possible problems here. HTTP is a request-response protocol. You aren't supposed to send first from the server: you should send a request from the client first. The end of line terminator is defined as \r\n in HTTP. You should be creating a new thread per connection at the server. You should close the ou... |
16,370 | I am currently working on data imbalance using SMOTE for binary and other algorithms for the multi-class problem.
I have the idea how to create the synthetic example to bring noticeable accuracy on a given dataset.
I want to go into deep and understand how a classifier, especially SVM handle the data with the synthet... | 2017/01/17 | [
"https://datascience.stackexchange.com/questions/16370",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/27925/"
] | I think that in order to understand how the SVM handles the new synthetic
data, you should look at the loss function SVM uses, i.e. hinge loss and the behavior on an imbalanced dataset. Intuitively this function will try to fit the hyperplane that best separates the data. For example imagine you have a dataset that is ... | How about using a GAN ( Generative Adversarial Network) to generate undisdinguishable data for your imbalanced dataset. An example for this can be seen here: (<https://github.com/osh/KerasGAN>). |
34,378,602 | I am working with EditText which take WebUrl in input.For that I am using `LinkMovementMethod` Make links in the EditText clickable.
Problem is that :
>
> If the last part of the text is a link, clicking anywhere causes the
> link to be opened.
>
>
>
I want when I am clicking on **click here to edit** area edit... | 2015/12/20 | [
"https://Stackoverflow.com/questions/34378602",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2949612/"
] | Daniel Lew wrote the blog post about it several days ago. He suggests next solution:
```
// Make links in the EditText clickable
editText.setMovementMethod(LinkMovementMethod.getInstance());
// Setup my Spannable with clickable URLs
Spannable spannable = new SpannableString("http://blog.danlew.net");
Linkify.addLin... | check the following code.
```
EditText inputText;
//Edittext is clickable at right side.
inputText.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
final int DRAWABLE_LEFT = 0;
final int DRAWABLE_TOP = 1;
f... |
575,951 | Is there an easy way to manually (ie. not through code) find the size (in bytes, KB, etc) of a block of selected text? Currently I am taking the text, cutting/pasting into a new text document, saving it, then clicking "properties" to get an estimate of the size.
I am developing mainly in visual studio 2008 but I need ... | 2009/02/22 | [
"https://Stackoverflow.com/questions/575951",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66478/"
] | This question isn't meaningful as asked. Text can be encoded in different formats; ASCII, UTF-8, UTF-16, etc. The memory consumed by a block of text depends on which encoding you decide to use for it.
EDIT: To answer the question you've stated now (how do I determine which function is returning a "smaller" block of te... | I don't see the difference between using the code written by the app you're pasting into, and using some other code. Being a python person myself, whenever I want to check length of some text I just do it in the interactive interpreter. Surely some equivalent solution more suited to your tastes would be appropriate? |
575,951 | Is there an easy way to manually (ie. not through code) find the size (in bytes, KB, etc) of a block of selected text? Currently I am taking the text, cutting/pasting into a new text document, saving it, then clicking "properties" to get an estimate of the size.
I am developing mainly in visual studio 2008 but I need ... | 2009/02/22 | [
"https://Stackoverflow.com/questions/575951",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66478/"
] | ended up just cutting/pasting the text into MS Word and using the char count feature in there | I don't see the difference between using the code written by the app you're pasting into, and using some other code. Being a python person myself, whenever I want to check length of some text I just do it in the interactive interpreter. Surely some equivalent solution more suited to your tastes would be appropriate? |
60,362,054 | I'm trying to implement comments form in my Django Blog. I was going through this tutorial(<https://djangocentral.com/creating-comments-system-with-django/>), but there is an error happened in the end. The error page is saying:
>
> NoReverseMatch at /post/firstpost/
>
>
> Reverse for 'user-posts' with arguments '(... | 2020/02/23 | [
"https://Stackoverflow.com/questions/60362054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12311517/"
] | Personally I like to add the reference table to the original table. For example, (using `dplyr`) you might do something like:
```
df2 %>% left_join(df1, by = "a1") %>% mutate(new_b1 = ifelse(!is.na(b1), b1, a1))
```
Which results in
```
d1 a1 b1 new_b1
1 sale b2 bb2 bb2
2 sale2 c2 cc2 cc2
3 sale3 d2... | One `base R` possibility could be:
```
pmax(df2$a1, df1$b1[match(df2$a1, df1$a1)], na.rm = TRUE)
[1] "bb2" "cc2" "d2"
```
It requires to import your data using `stringsAsFactors = FALSE`.
Or:
```
ifelse(is.na(matching), df2$a1, matching); matching <- df1$b1[match(df2$a1, df1$a1)]
``` |
42,308,782 | I'm new with the Swift programming language.
Here is my problem. I created a UIWebView. Now I want to open some link in the Safari browser instead in the WebView.
I searched on the Internet different solutions like:
```
func webView(webView: UIWebView, shouldStartLoadWithRequest request: NSURLRequest, navigationType: ... | 2017/02/17 | [
"https://Stackoverflow.com/questions/42308782",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7583214/"
] | A straightforward approach could be to add to the movement component a desired destination along with the actual one. Then update only the former within the movement system.
On the other side, the collision system will try to apply the new position by switching it with the desired one and check for collisions one en... | Not every entity that moves is influenced by physics in a simulation...
I would split the `MovementSystem` into two types
1. Movement for entities which are physics influenced.
2. Movement for entities which are *not* physics influenced.
In the case of the latter, you can go ahead and take the direction on the `Move... |
42,308,782 | I'm new with the Swift programming language.
Here is my problem. I created a UIWebView. Now I want to open some link in the Safari browser instead in the WebView.
I searched on the Internet different solutions like:
```
func webView(webView: UIWebView, shouldStartLoadWithRequest request: NSURLRequest, navigationType: ... | 2017/02/17 | [
"https://Stackoverflow.com/questions/42308782",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7583214/"
] | In an ECS structure, your movement system doesn't care about your physics. The physics would have a system of it's own.
The `Movement` system updates a `Position` component based on some other component, say, `Velocity`.
The `Physics` system updates the `Velocity` component based on forces.
And the `Collision` s... | Not every entity that moves is influenced by physics in a simulation...
I would split the `MovementSystem` into two types
1. Movement for entities which are physics influenced.
2. Movement for entities which are *not* physics influenced.
In the case of the latter, you can go ahead and take the direction on the `Move... |
65,926,437 | I'm trying to make a simple switch that changes a variable (in this case switchvalue) when I hit a key. My approach doesn't seem to be working, the key detection is working as far as I can tell.
```
import turtle
from turtle import Turtle, Screen
screen = Screen()
jack = Turtle("turtle")
jack.color("red", "green")
j... | 2021/01/27 | [
"https://Stackoverflow.com/questions/65926437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Windows sends the debugger a specific set of events, you can find them in the documentation of [WaitForDebugEvent](https://learn.microsoft.com/en-us/windows/win32/api/debugapi/nf-debugapi-waitfordebugevent).
One of these events is `CREATE_THREAD_DEBUG_INFO`, **which is sent when Windows has created but not yet start... | 1. The terms in question do not necessarily have precise definitions in common jargon. The x64dbg docs you linked give these definitions:
>
> Thread Entry
> ------------
>
>
> Set a single-shoot breakpoint on the entry of the thread when a thread is about to run.
>
>
>
and
>
> Thread Start
> ------------
>
>... |
19,529,667 | Okay for a class I had to build a queue ADT and use that ADT to create an application that does basic adding/subtracting. The problem is that when I try to invoke the queue's methods that have an exception linked to them I get " error: unreported exception FullCollectionException; must be caught or declared to be throw... | 2013/10/22 | [
"https://Stackoverflow.com/questions/19529667",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2789574/"
] | Let's say you have `word1` and `word2`:
```
String biggerWord;
String smallerWord;
if (word1.length() > word2.length()) {
biggerWord = word1;
smallerWord = word2;
} else {
biggerWord = word2;
smallerWord = word1;
}
for (int i = 0; i < smallerWord.length(); i++) {
if (biggerWord.contains(String.va... | A really nice way is to sort the string alphabetically.
```
sortedWord1 = new String(Arrays.sort(word1.toCharArray()));
sortedWord2 = new String(Arrays.sort(word2.toCharArray()));
```
What that does is turn the words into character arrays, sort them alphabetically, then makes them into a string again.
The next st... |
220,422 | Given a sequence of integers and an integer `N`, output the number of contiguous subsequences that contain at least `N` distinct integers. Each integer in the sequence is non-negative and will not be larger than the size of the sequence.
For example, with the sequence `1,2,2,3` and `N=2`, there are 5 contiguous subseq... | 2021/03/08 | [
"https://codegolf.stackexchange.com/questions/220422",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/101295/"
] | JavaScript (ES6), 93 bytes
==========================
*Saved 18 bytes thanks to @user81655*
*Saved 2 bytes thanks to @tsh*
Expects `(N)(sequence)`.
```javascript
n=>C=a=>eval('for(i=j=a.length,c=s=0;~j;c+=c<n?(C[v=a[--j]]=-~C[v])<2:-!--C[s-=~j,a[--i]])s')
```
[Try it online!](https://tio.run/##bZfLbhxHEkX3/grNy... | [C (gcc)](https://gcc.gnu.org/), ~~108~~ 104 bytes
==================================================
*-4 bytes thanks to @Noodle9*
Takes three inputs, \$ A \$ *(the array)*, \$ S \$ *(the size of the array)*, and \$ N \$ *(the minimum distinct integers allowed)*.
```c
s;f(A,S,N)int*A;{int c[1<<20]={},n=0,l=S;for(s=... |
220,422 | Given a sequence of integers and an integer `N`, output the number of contiguous subsequences that contain at least `N` distinct integers. Each integer in the sequence is non-negative and will not be larger than the size of the sequence.
For example, with the sequence `1,2,2,3` and `N=2`, there are 5 contiguous subseq... | 2021/03/08 | [
"https://codegolf.stackexchange.com/questions/220422",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/101295/"
] | JavaScript (ES6), 93 bytes
==========================
*Saved 18 bytes thanks to @user81655*
*Saved 2 bytes thanks to @tsh*
Expects `(N)(sequence)`.
```javascript
n=>C=a=>eval('for(i=j=a.length,c=s=0;~j;c+=c<n?(C[v=a[--j]]=-~C[v])<2:-!--C[s-=~j,a[--i]])s')
```
[Try it online!](https://tio.run/##bZfLbhxHEkX3/grNy... | [Python 3](https://docs.python.org/3/), ~~189~~ \$\cdots\$ ~~157~~ 152 bytes
============================================================================
Saved a whopping ~~16~~ 32 bytes thanks to [ovs](https://codegolf.stackexchange.com/users/64121/ovs)!!!
Saved 5 bytes thanks to [Jonathan Allan](https://codegolf.... |
220,422 | Given a sequence of integers and an integer `N`, output the number of contiguous subsequences that contain at least `N` distinct integers. Each integer in the sequence is non-negative and will not be larger than the size of the sequence.
For example, with the sequence `1,2,2,3` and `N=2`, there are 5 contiguous subseq... | 2021/03/08 | [
"https://codegolf.stackexchange.com/questions/220422",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/101295/"
] | JavaScript (ES6), 93 bytes
==========================
*Saved 18 bytes thanks to @user81655*
*Saved 2 bytes thanks to @tsh*
Expects `(N)(sequence)`.
```javascript
n=>C=a=>eval('for(i=j=a.length,c=s=0;~j;c+=c<n?(C[v=a[--j]]=-~C[v])<2:-!--C[s-=~j,a[--i]])s')
```
[Try it online!](https://tio.run/##bZfLbhxHEkX3/grNy... | [Python 3.8 (pre-release)](https://docs.python.org/3.8/), 138 bytes
===================================================================
```python
def f(a,n):
c=0;l=1+max(a);m=[0]*l;j=len(a)
for v in a:
while(n>(d:=l-m.count(0)))*j:m[a[-j]]+=1;j-=1
c-=~j*(d>=n);m[v]-=1
return c
```
[Try it online!](https://tio... |
220,422 | Given a sequence of integers and an integer `N`, output the number of contiguous subsequences that contain at least `N` distinct integers. Each integer in the sequence is non-negative and will not be larger than the size of the sequence.
For example, with the sequence `1,2,2,3` and `N=2`, there are 5 contiguous subseq... | 2021/03/08 | [
"https://codegolf.stackexchange.com/questions/220422",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/101295/"
] | JavaScript (ES6), 93 bytes
==========================
*Saved 18 bytes thanks to @user81655*
*Saved 2 bytes thanks to @tsh*
Expects `(N)(sequence)`.
```javascript
n=>C=a=>eval('for(i=j=a.length,c=s=0;~j;c+=c<n?(C[v=a[--j]]=-~C[v])<2:-!--C[s-=~j,a[--i]])s')
```
[Try it online!](https://tio.run/##bZfLbhxHEkX3/grNy... | [JavaScript (Node.js)](https://nodejs.org), ~~82~~ 78 bytes
===========================================================
```javascript
n=>s=>s.map(A=_=>{for(n-=!A[_],A[_]=-~A[_];!n;)n+=!--A[s[i++]];m+=i},i=m=0)&&m
```
[Try it online!](https://tio.run/##bZfLjhxFEEX3/RfeoBmcA5XvTKxG8oKvsCxk@YGM8IyFEUJC8OvmnKiBjRG0u6YrK... |
220,422 | Given a sequence of integers and an integer `N`, output the number of contiguous subsequences that contain at least `N` distinct integers. Each integer in the sequence is non-negative and will not be larger than the size of the sequence.
For example, with the sequence `1,2,2,3` and `N=2`, there are 5 contiguous subseq... | 2021/03/08 | [
"https://codegolf.stackexchange.com/questions/220422",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/101295/"
] | [C (gcc)](https://gcc.gnu.org/), ~~108~~ 104 bytes
==================================================
*-4 bytes thanks to @Noodle9*
Takes three inputs, \$ A \$ *(the array)*, \$ S \$ *(the size of the array)*, and \$ N \$ *(the minimum distinct integers allowed)*.
```c
s;f(A,S,N)int*A;{int c[1<<20]={},n=0,l=S;for(s=... | [JavaScript (Node.js)](https://nodejs.org), ~~82~~ 78 bytes
===========================================================
```javascript
n=>s=>s.map(A=_=>{for(n-=!A[_],A[_]=-~A[_];!n;)n+=!--A[s[i++]];m+=i},i=m=0)&&m
```
[Try it online!](https://tio.run/##bZfLjhxFEEX3/RfeoBmcA5XvTKxG8oKvsCxk@YGM8IyFEUJC8OvmnKiBjRG0u6YrK... |
220,422 | Given a sequence of integers and an integer `N`, output the number of contiguous subsequences that contain at least `N` distinct integers. Each integer in the sequence is non-negative and will not be larger than the size of the sequence.
For example, with the sequence `1,2,2,3` and `N=2`, there are 5 contiguous subseq... | 2021/03/08 | [
"https://codegolf.stackexchange.com/questions/220422",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/101295/"
] | [Python 3](https://docs.python.org/3/), ~~189~~ \$\cdots\$ ~~157~~ 152 bytes
============================================================================
Saved a whopping ~~16~~ 32 bytes thanks to [ovs](https://codegolf.stackexchange.com/users/64121/ovs)!!!
Saved 5 bytes thanks to [Jonathan Allan](https://codegolf.... | [JavaScript (Node.js)](https://nodejs.org), ~~82~~ 78 bytes
===========================================================
```javascript
n=>s=>s.map(A=_=>{for(n-=!A[_],A[_]=-~A[_];!n;)n+=!--A[s[i++]];m+=i},i=m=0)&&m
```
[Try it online!](https://tio.run/##bZfLjhxFEEX3/RfeoBmcA5XvTKxG8oKvsCxk@YGM8IyFEUJC8OvmnKiBjRG0u6YrK... |
220,422 | Given a sequence of integers and an integer `N`, output the number of contiguous subsequences that contain at least `N` distinct integers. Each integer in the sequence is non-negative and will not be larger than the size of the sequence.
For example, with the sequence `1,2,2,3` and `N=2`, there are 5 contiguous subseq... | 2021/03/08 | [
"https://codegolf.stackexchange.com/questions/220422",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/101295/"
] | [Python 3.8 (pre-release)](https://docs.python.org/3.8/), 138 bytes
===================================================================
```python
def f(a,n):
c=0;l=1+max(a);m=[0]*l;j=len(a)
for v in a:
while(n>(d:=l-m.count(0)))*j:m[a[-j]]+=1;j-=1
c-=~j*(d>=n);m[v]-=1
return c
```
[Try it online!](https://tio... | [JavaScript (Node.js)](https://nodejs.org), ~~82~~ 78 bytes
===========================================================
```javascript
n=>s=>s.map(A=_=>{for(n-=!A[_],A[_]=-~A[_];!n;)n+=!--A[s[i++]];m+=i},i=m=0)&&m
```
[Try it online!](https://tio.run/##bZfLjhxFEEX3/RfeoBmcA5XvTKxG8oKvsCxk@YGM8IyFEUJC8OvmnKiBjRG0u6YrK... |
44,389 | For years, I have been earning and saving my money in my bank account, putting aside emergency and future funds into my "savings" account, and money for bills and personal expenses in my "checking" account.
This has served me well, but I fear this is a road to short-term satisfaction, long-term disaster. Besides a 3%... | 2015/02/12 | [
"https://money.stackexchange.com/questions/44389",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/20835/"
] | In general, the higher the return (such as interest), the higher the risk. If there were a high-return no-risk investment, enough people would buy it to drive the price up and make it a low-return no-risk investment.
Interest rates are low now, but so is inflation. They generally go up and down together. So, as a low ... | CDs may be one good option if you have a sense of when you may need the money(-ish), especially with more generous early withdrawal penalties. You can also take a look at investing in a mix of stock and bond funds, which will lower you volatility compared to stocks, but increase your returns over bonds. |
5,223,431 | I have some text
```
I01:00:00:05
I01:00:00:04
I01:00:00:03
I01:00:00:02
I01:00:00:01
```
Is there a regex that will find each one?
I tried:
`var locs = txt.match(/(([A-Z]\d\d\:\d\d\:\d\d\:\d\d)+)+/);`
And it finds 5 copies of the first pattern that matches.
Is there a way to get an array with each of them in it... | 2011/03/07 | [
"https://Stackoverflow.com/questions/5223431",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/614376/"
] | if you include the 'g' flag at the end it should work.
```
var locs = txt.match(/(([A-Z]\d\d\:\d\d\:\d\d\:\d\d)+)+/g);
``` | You are simply missing the g flag on your regexp and it will find all the occurences that match the pattern.
Like so:
```
var locs = txt.match(/(([A-Z]\d\d\:\d\d\:\d\d\:\d\d)+)+/g);
```
*of course if that pattern is actually good ;)* |
5,223,431 | I have some text
```
I01:00:00:05
I01:00:00:04
I01:00:00:03
I01:00:00:02
I01:00:00:01
```
Is there a regex that will find each one?
I tried:
`var locs = txt.match(/(([A-Z]\d\d\:\d\d\:\d\d\:\d\d)+)+/);`
And it finds 5 copies of the first pattern that matches.
Is there a way to get an array with each of them in it... | 2011/03/07 | [
"https://Stackoverflow.com/questions/5223431",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/614376/"
] | if you include the 'g' flag at the end it should work.
```
var locs = txt.match(/(([A-Z]\d\d\:\d\d\:\d\d\:\d\d)+)+/g);
``` | Write your regular expression to match a single instance, and use the global specifier `/g` to get a collection of matches (**note the modification to regular expression**):
```
var locs = txt.match(/([A-Z]\d\d\:\d\d\:\d\d\:\d\d)/g);
```
<http://rubular.com/r/L2ZNyz2yJy> |
5,223,431 | I have some text
```
I01:00:00:05
I01:00:00:04
I01:00:00:03
I01:00:00:02
I01:00:00:01
```
Is there a regex that will find each one?
I tried:
`var locs = txt.match(/(([A-Z]\d\d\:\d\d\:\d\d\:\d\d)+)+/);`
And it finds 5 copies of the first pattern that matches.
Is there a way to get an array with each of them in it... | 2011/03/07 | [
"https://Stackoverflow.com/questions/5223431",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/614376/"
] | if you include the 'g' flag at the end it should work.
```
var locs = txt.match(/(([A-Z]\d\d\:\d\d\:\d\d\:\d\d)+)+/g);
``` | Indeed in this case the "+" sign is not necessary:
```
var locs = txt.match(/[A-Z]\d\d\:\d\d\:\d\d\:\d\d/g);
```
`locs` will be `["I01:00:00:05", "I01:00:00:04", "I01:00:00:03", "I01:00:00:02", "I01:00:00:01"]`. |
1,941,523 | I have a Java application whose UI relies heavily on audio. On Windows and OS X, everything works fine; on Linux, however, the application requires exclusive access to the sound device, a `LineUnavailableException` is thrown and no sound is heard. I'm using Kubuntu 9.10.
This means that no other application can play a... | 2009/12/21 | [
"https://Stackoverflow.com/questions/1941523",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49110/"
] | I fear that audio in Linux is a lost cause itself. But in this case, it really is a [known Java Bug](http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6271108). You should try to figure out what sound architecture you are using. I think the default for Ubuntu is [PulseAudio](http://en.wikipedia.org/wiki/PulseAudio)/[A... | Java Sound is terrible for high-precision or low-latency tasks, and almost totally dysfunctional on Linux. Abandon ship now before you sink more time into it.
After Java Sound I tried OpenAL which wasn't great on Linux either.
Currently I'm using FMOD which is unfortunately closed-source.
The open source way to go wou... |
1,941,523 | I have a Java application whose UI relies heavily on audio. On Windows and OS X, everything works fine; on Linux, however, the application requires exclusive access to the sound device, a `LineUnavailableException` is thrown and no sound is heard. I'm using Kubuntu 9.10.
This means that no other application can play a... | 2009/12/21 | [
"https://Stackoverflow.com/questions/1941523",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49110/"
] | I fear that audio in Linux is a lost cause itself. But in this case, it really is a [known Java Bug](http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6271108). You should try to figure out what sound architecture you are using. I think the default for Ubuntu is [PulseAudio](http://en.wikipedia.org/wiki/PulseAudio)/[A... | I was able to play audio sound on GNU/Linux (Ubuntu 10.10) using the OpenJDK with some tweaks. I believe the the LineUnavailableException was a bug in PulseAudio and was fixed in 10.10.
I needed to specify the Format (something not needed on Windows).
```
AudioInputStream audioIn = AudioSystem.getAudioInputStream(in)... |
1,941,523 | I have a Java application whose UI relies heavily on audio. On Windows and OS X, everything works fine; on Linux, however, the application requires exclusive access to the sound device, a `LineUnavailableException` is thrown and no sound is heard. I'm using Kubuntu 9.10.
This means that no other application can play a... | 2009/12/21 | [
"https://Stackoverflow.com/questions/1941523",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49110/"
] | I fear that audio in Linux is a lost cause itself. But in this case, it really is a [known Java Bug](http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6271108). You should try to figure out what sound architecture you are using. I think the default for Ubuntu is [PulseAudio](http://en.wikipedia.org/wiki/PulseAudio)/[A... | i got this code from somewhere in internet, the sound comes up most time, occasionally doesn't come up
```
import java.util.*;
import java.text.*;
import java.io.*;
import java.net.*;
import javax.sound.sampled.*;
public class Sound2
{
public static
void main (String name[])
{
playSound ( "somesou... |
1,941,523 | I have a Java application whose UI relies heavily on audio. On Windows and OS X, everything works fine; on Linux, however, the application requires exclusive access to the sound device, a `LineUnavailableException` is thrown and no sound is heard. I'm using Kubuntu 9.10.
This means that no other application can play a... | 2009/12/21 | [
"https://Stackoverflow.com/questions/1941523",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49110/"
] | I fear that audio in Linux is a lost cause itself. But in this case, it really is a [known Java Bug](http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6271108). You should try to figure out what sound architecture you are using. I think the default for Ubuntu is [PulseAudio](http://en.wikipedia.org/wiki/PulseAudio)/[A... | Send an mplayer command through a shell. Most easy solution. |
1,941,523 | I have a Java application whose UI relies heavily on audio. On Windows and OS X, everything works fine; on Linux, however, the application requires exclusive access to the sound device, a `LineUnavailableException` is thrown and no sound is heard. I'm using Kubuntu 9.10.
This means that no other application can play a... | 2009/12/21 | [
"https://Stackoverflow.com/questions/1941523",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49110/"
] | I was able to play audio sound on GNU/Linux (Ubuntu 10.10) using the OpenJDK with some tweaks. I believe the the LineUnavailableException was a bug in PulseAudio and was fixed in 10.10.
I needed to specify the Format (something not needed on Windows).
```
AudioInputStream audioIn = AudioSystem.getAudioInputStream(in)... | Java Sound is terrible for high-precision or low-latency tasks, and almost totally dysfunctional on Linux. Abandon ship now before you sink more time into it.
After Java Sound I tried OpenAL which wasn't great on Linux either.
Currently I'm using FMOD which is unfortunately closed-source.
The open source way to go wou... |
1,941,523 | I have a Java application whose UI relies heavily on audio. On Windows and OS X, everything works fine; on Linux, however, the application requires exclusive access to the sound device, a `LineUnavailableException` is thrown and no sound is heard. I'm using Kubuntu 9.10.
This means that no other application can play a... | 2009/12/21 | [
"https://Stackoverflow.com/questions/1941523",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49110/"
] | Java Sound is terrible for high-precision or low-latency tasks, and almost totally dysfunctional on Linux. Abandon ship now before you sink more time into it.
After Java Sound I tried OpenAL which wasn't great on Linux either.
Currently I'm using FMOD which is unfortunately closed-source.
The open source way to go wou... | i got this code from somewhere in internet, the sound comes up most time, occasionally doesn't come up
```
import java.util.*;
import java.text.*;
import java.io.*;
import java.net.*;
import javax.sound.sampled.*;
public class Sound2
{
public static
void main (String name[])
{
playSound ( "somesou... |
1,941,523 | I have a Java application whose UI relies heavily on audio. On Windows and OS X, everything works fine; on Linux, however, the application requires exclusive access to the sound device, a `LineUnavailableException` is thrown and no sound is heard. I'm using Kubuntu 9.10.
This means that no other application can play a... | 2009/12/21 | [
"https://Stackoverflow.com/questions/1941523",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49110/"
] | I was able to play audio sound on GNU/Linux (Ubuntu 10.10) using the OpenJDK with some tweaks. I believe the the LineUnavailableException was a bug in PulseAudio and was fixed in 10.10.
I needed to specify the Format (something not needed on Windows).
```
AudioInputStream audioIn = AudioSystem.getAudioInputStream(in)... | i got this code from somewhere in internet, the sound comes up most time, occasionally doesn't come up
```
import java.util.*;
import java.text.*;
import java.io.*;
import java.net.*;
import javax.sound.sampled.*;
public class Sound2
{
public static
void main (String name[])
{
playSound ( "somesou... |
1,941,523 | I have a Java application whose UI relies heavily on audio. On Windows and OS X, everything works fine; on Linux, however, the application requires exclusive access to the sound device, a `LineUnavailableException` is thrown and no sound is heard. I'm using Kubuntu 9.10.
This means that no other application can play a... | 2009/12/21 | [
"https://Stackoverflow.com/questions/1941523",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49110/"
] | I was able to play audio sound on GNU/Linux (Ubuntu 10.10) using the OpenJDK with some tweaks. I believe the the LineUnavailableException was a bug in PulseAudio and was fixed in 10.10.
I needed to specify the Format (something not needed on Windows).
```
AudioInputStream audioIn = AudioSystem.getAudioInputStream(in)... | Send an mplayer command through a shell. Most easy solution. |
1,941,523 | I have a Java application whose UI relies heavily on audio. On Windows and OS X, everything works fine; on Linux, however, the application requires exclusive access to the sound device, a `LineUnavailableException` is thrown and no sound is heard. I'm using Kubuntu 9.10.
This means that no other application can play a... | 2009/12/21 | [
"https://Stackoverflow.com/questions/1941523",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49110/"
] | Send an mplayer command through a shell. Most easy solution. | i got this code from somewhere in internet, the sound comes up most time, occasionally doesn't come up
```
import java.util.*;
import java.text.*;
import java.io.*;
import java.net.*;
import javax.sound.sampled.*;
public class Sound2
{
public static
void main (String name[])
{
playSound ( "somesou... |
24,455,175 | I am developing an android app with Google+ API. I am having multiple activities which each require one instance of GoogleApiClient.
As I understand from [this post](https://stackoverflow.com/questions/22368520/how-to-correctly-use-google-plus-sign-in-with-multiple-activities) it is possible to call the same instance ... | 2014/06/27 | [
"https://Stackoverflow.com/questions/24455175",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3721780/"
] | It's not expensive to create multiple instances of `GoogleApiClient`. In fact it will help with efficiency if you use more than just one API. Only the services you specifically request will be spooled up. So if one activity uses Plus and another uses Drive, the Plus service doesn't have to be spooled up when you're on ... | I have just had this same dilema. To get round this I used the BaseGameUtil... not sure if your using that but if you are then it is simple you can just have each activity extend the BaseGameActivity, add the required methods and then create a GoogleApiClient obj and getApiClient which will then give you the means to u... |
54,597,908 | I have a Spock test that uses `where` clause. In Eclipse the test file was opened with Groovy Editor, but the data variables both in the code ("testName") and in the `where` clause (testNum and testName) are underlined. The maven build works fine.
Can someone let me know how to fix this issue in Eclipse?
```
@Unrol... | 2019/02/08 | [
"https://Stackoverflow.com/questions/54597908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4521196/"
] | I did not use Eclipse for quite some time, but maybe defining test parameters could be less confusing for Eclipse:
```
@Unroll
def 'Test #testNum'(String testNum, String testName) {
def tname = testName
......
where:
testNum | testName
'1' | 'test #1'
}
``` | I can get rid of the underlines by running the Spock transform add this to the end of eclipse.ini:
```
-Dgreclipse.globalTransformsInReconcile=org.spockframework.compiler.SpockTransform
```
However, the inferred type of testName is Object (see my comment under the other answer).
[![Eclipse Groovy editor with Spock ... |
56,779,120 | I need to have custom timeout in a specific `should` command in cypress.
I have this json file which has global timeout:
```
{
"viewportWidth": 1600,
"defaultCommandTimeout": 10000
}
```
There is a specific case that I need a higher timeout, I would like something like this:
```
cy.get('body').should('contain'... | 2019/06/26 | [
"https://Stackoverflow.com/questions/56779120",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4680038/"
] | tl;dr
-----
Just pass the timeout to `get`, it will pass it down to `should`.
```js
cy.get('body', {timeout: 30000}).should('contain','success')
```
Explanation
-----------
This is explained in [`should`'s official documentation in the Timeouts section](https://docs.cypress.io/api/commands/should.html#Timeouts):
... | You probably want to move your `{timeout: 30000}` option to the parent command, like this:
```
cy.get('body', {timeout: 30000}).should('contain','success')
```
In this way the parent command's default assertions, and all subsequent assertions inherit this timeout overriding the default command timeout.
Read more her... |
22,296,981 | I am new to XMPP protocol, i tried to find good examples of sending and receiving IQ packets in XMPP ANDROID, but i failed, I tried using the following chunk of code but it did not help.
**CODE:**
```
final IQ iq = new IQ() {
public String getChildElementXML() {
return "<iq type='get' from='9f30dacb@web.vliv... | 2014/03/10 | [
"https://Stackoverflow.com/questions/22296981",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2794682/"
] | Haven't tested it yet, but try
```
IQ iq = new IQ();
iq.setTo("destination@server");
iq.setFrom("9f30dacb@web.vlivetech.com/9f30dacb");
iq.setType(IQ.Type.GET);
iq.setPacketID("1");
connection.sendPacket(iq);
``` | I think you should use the correct address of destination, that includes the resource from destination, like this example
```
iq.setTo("destination@dominio_destination.com/recurso_destination");
```
Now you can send the packet:
```
connection.sendPacket(iq);
``` |
12,628,807 | Fancybox is loading well and everything opens as I want it to, but the issue occurs in the background-- it's visible (and disturbing) that my entire page shifts exactly 8 pixels to the right when the box loads and returns to normal position on box closing.
I can't link to the site as it's on a dev server behind our co... | 2012/09/27 | [
"https://Stackoverflow.com/questions/12628807",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/566043/"
] | I just solved it by adding "margin-right: auto !important" to my body element :) This over rules Fancyboxes own margin-right: 0. | Well I just commented the following line in fancybox CSS
```
/*.fancybox-lock {
overflow: hidden;
}
*/
```
And it started to work fine on:
* fancyBox - jQuery Plugin
* version: 2.1.4 (Thu, 10 Jan 2013) |
12,628,807 | Fancybox is loading well and everything opens as I want it to, but the issue occurs in the background-- it's visible (and disturbing) that my entire page shifts exactly 8 pixels to the right when the box loads and returns to normal position on box closing.
I can't link to the site as it's on a dev server behind our co... | 2012/09/27 | [
"https://Stackoverflow.com/questions/12628807",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/566043/"
] | I just solved it by adding "margin-right: auto !important" to my body element :) This over rules Fancyboxes own margin-right: 0. | This did it for me...
```
.fancybox-lock {
overflow: hidden !important;
padding-right: 17px;
}
.fancybox-lock body {
overflow: hidden !important;
}
``` |
12,628,807 | Fancybox is loading well and everything opens as I want it to, but the issue occurs in the background-- it's visible (and disturbing) that my entire page shifts exactly 8 pixels to the right when the box loads and returns to normal position on box closing.
I can't link to the site as it's on a dev server behind our co... | 2012/09/27 | [
"https://Stackoverflow.com/questions/12628807",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/566043/"
] | It's a known problem, here you can find out more: [issues, fancyapps @ GitHub](https://github.com/fancyapps/fancyBox/issues/360)
I'm using fancybox2 (version 2.1.5).
I've solved the problem by slightly modifying the 'jquery.fancybox.css'-file:
Find the 'Overlay helper'-section (starts at line 165) and change two rule... | I used fancybox **v.2.1.4** with a **fixed, centered background** image for the body, and forcing vertical scrollbar to always showing.
```
body{
background: url('../img/sfondo.jpg') fixed center top;
overflow-y: scroll;
}
```
Despite having forced the display of scrollbar, I had the background-image shift probl... |
12,628,807 | Fancybox is loading well and everything opens as I want it to, but the issue occurs in the background-- it's visible (and disturbing) that my entire page shifts exactly 8 pixels to the right when the box loads and returns to normal position on box closing.
I can't link to the site as it's on a dev server behind our co... | 2012/09/27 | [
"https://Stackoverflow.com/questions/12628807",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/566043/"
] | It's a known problem, here you can find out more: [issues, fancyapps @ GitHub](https://github.com/fancyapps/fancyBox/issues/360)
I'm using fancybox2 (version 2.1.5).
I've solved the problem by slightly modifying the 'jquery.fancybox.css'-file:
Find the 'Overlay helper'-section (starts at line 165) and change two rule... | In version 2.1.3, comment out lines 1802-1807 (below) in jquery.fancybox.js.
```
if (!this.overlay) {
this.margin = D.height() > W.height() || $('body').css('overflow-y') === 'scroll' ? $('body').css('margin-right') : false;
this.el = document.all && !document.querySelector ? $('html') : $('body');
this.create(... |
12,628,807 | Fancybox is loading well and everything opens as I want it to, but the issue occurs in the background-- it's visible (and disturbing) that my entire page shifts exactly 8 pixels to the right when the box loads and returns to normal position on box closing.
I can't link to the site as it's on a dev server behind our co... | 2012/09/27 | [
"https://Stackoverflow.com/questions/12628807",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/566043/"
] | You can disable the locking feature:
```
$(".fancybox").fancybox({
helpers : {
overlay : {
locked : false
}
}
});
```
Worked for me. | You are facing that problem for scrollbar! just trace the scrollbar width and use that width as '*.fancybox-lock*'s '*margin-right*'.
for example,
```
.fancybox-lock{
margin-right: [your calculated width] !important;
}
```
This will solve your problem for sure, because i also had that problem once. |
12,628,807 | Fancybox is loading well and everything opens as I want it to, but the issue occurs in the background-- it's visible (and disturbing) that my entire page shifts exactly 8 pixels to the right when the box loads and returns to normal position on box closing.
I can't link to the site as it's on a dev server behind our co... | 2012/09/27 | [
"https://Stackoverflow.com/questions/12628807",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/566043/"
] | I had a very similar situation recently with Fancybox v2. My initial page had content below the fold and therefore had a scrollbar (perhaps the OP did as well, it's not clear). Firing the Fancybox link caused the same shift in page body and clearing the scrollbar; closing the Fancybox image shifted the body back and re... | I used fancybox **v.2.1.4** with a **fixed, centered background** image for the body, and forcing vertical scrollbar to always showing.
```
body{
background: url('../img/sfondo.jpg') fixed center top;
overflow-y: scroll;
}
```
Despite having forced the display of scrollbar, I had the background-image shift probl... |
12,628,807 | Fancybox is loading well and everything opens as I want it to, but the issue occurs in the background-- it's visible (and disturbing) that my entire page shifts exactly 8 pixels to the right when the box loads and returns to normal position on box closing.
I can't link to the site as it's on a dev server behind our co... | 2012/09/27 | [
"https://Stackoverflow.com/questions/12628807",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/566043/"
] | It's a known problem, here you can find out more: [issues, fancyapps @ GitHub](https://github.com/fancyapps/fancyBox/issues/360)
I'm using fancybox2 (version 2.1.5).
I've solved the problem by slightly modifying the 'jquery.fancybox.css'-file:
Find the 'Overlay helper'-section (starts at line 165) and change two rule... | This did it for me...
```
.fancybox-lock {
overflow: hidden !important;
padding-right: 17px;
}
.fancybox-lock body {
overflow: hidden !important;
}
``` |
12,628,807 | Fancybox is loading well and everything opens as I want it to, but the issue occurs in the background-- it's visible (and disturbing) that my entire page shifts exactly 8 pixels to the right when the box loads and returns to normal position on box closing.
I can't link to the site as it's on a dev server behind our co... | 2012/09/27 | [
"https://Stackoverflow.com/questions/12628807",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/566043/"
] | I had a very similar situation recently with Fancybox v2. My initial page had content below the fold and therefore had a scrollbar (perhaps the OP did as well, it's not clear). Firing the Fancybox link caused the same shift in page body and clearing the scrollbar; closing the Fancybox image shifted the body back and re... | Well I just commented the following line in fancybox CSS
```
/*.fancybox-lock {
overflow: hidden;
}
*/
```
And it started to work fine on:
* fancyBox - jQuery Plugin
* version: 2.1.4 (Thu, 10 Jan 2013) |
12,628,807 | Fancybox is loading well and everything opens as I want it to, but the issue occurs in the background-- it's visible (and disturbing) that my entire page shifts exactly 8 pixels to the right when the box loads and returns to normal position on box closing.
I can't link to the site as it's on a dev server behind our co... | 2012/09/27 | [
"https://Stackoverflow.com/questions/12628807",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/566043/"
] | I just solved it by adding "margin-right: auto !important" to my body element :) This over rules Fancyboxes own margin-right: 0. | If your problem is fixed elements jumping when Fancybox opens, simple add a padding-right: 17px to those elements in your CSS, contained in the .fancybox-lock class. |
12,628,807 | Fancybox is loading well and everything opens as I want it to, but the issue occurs in the background-- it's visible (and disturbing) that my entire page shifts exactly 8 pixels to the right when the box loads and returns to normal position on box closing.
I can't link to the site as it's on a dev server behind our co... | 2012/09/27 | [
"https://Stackoverflow.com/questions/12628807",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/566043/"
] | I had the same issue recently. Find `.fancybox-lock` in the fancybox CSS, and change it to:
```
.fancybox-lock {
overflow: hidden;
margin: 0 !important;
}
```
Voila! :D | I just solved it by adding "margin-right: auto !important" to my body element :) This over rules Fancyboxes own margin-right: 0. |
50,156,958 | I am using a plugin to remove links from inside all posts in wordpress.
I wanted to upgrade the code, so that it would not only remove links, but also replace selected words.
I auto import content, and sometimes it contain "bad words" and i was thinking i could replace these bad words with something more child friendl... | 2018/05/03 | [
"https://Stackoverflow.com/questions/50156958",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9735272/"
] | The scenario where you will get `std::bad_alloc` thrown is, in most situations, the scenario where you have tried to allocate too much memory, and the system has nothing left to give. In most situations, that's not a recoverable error. It might make sense to wrap your entire program in a try-catch block to maybe emit a... | >
> Since I have read that every element in a vector is created on the heap
>
>
>
`std::vector` owns an heap-allocated contiguous buffer. The elements are added to the buffer. Every element is not allocated individually.
If the buffer is full, `std::vector` automatically allocates a new bigger one and moves every... |
50,156,958 | I am using a plugin to remove links from inside all posts in wordpress.
I wanted to upgrade the code, so that it would not only remove links, but also replace selected words.
I auto import content, and sometimes it contain "bad words" and i was thinking i could replace these bad words with something more child friendl... | 2018/05/03 | [
"https://Stackoverflow.com/questions/50156958",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9735272/"
] | >
> for example is something like this even necessary?:
>
>
>
As stated in [documentation](http://en.cppreference.com/w/cpp/container/vector/push_back)
>
> If an exception is thrown (which can be due to Allocator::allocate() or element copy/move constructor/assignment), this function has no effect (strong except... | >
> Since I have read that every element in a vector is created on the heap
>
>
>
`std::vector` owns an heap-allocated contiguous buffer. The elements are added to the buffer. Every element is not allocated individually.
If the buffer is full, `std::vector` automatically allocates a new bigger one and moves every... |
3,144,605 | I'd like to be able to get the AST for a given OCaml program (I'd like to walk the AST and generate an instrumented version of the code or do some kind of transformation, for example). Do any of the OCaml tools support this functionality? | 2010/06/29 | [
"https://Stackoverflow.com/questions/3144605",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46190/"
] | Since OCaml 4.02.1 it is possible to use the [PPX tools written bu Alain Frisch](https://github.com/alainfrisch/ppx_tools) to precisely do this. Example:
```
% ocamlfind ppx_tools/dumpast -e "1 + 2"
1 + 2
==>
{pexp_desc =
Pexp_apply ({pexp_desc = Pexp_ident {txt = Lident "+"}},
[("", {pexp_desc = Pexp_constant (C... | What you're looking for is [camlp4][1]. I haven't used camlp4 before, so I can't attest to it's virtues as software. I have heard of people using camlp5 [<http://pauillac.inria.fr/~ddr/camlp5/]> which, according to wikipedia, has better documentation than the current version of camlp4. |
3,144,605 | I'd like to be able to get the AST for a given OCaml program (I'd like to walk the AST and generate an instrumented version of the code or do some kind of transformation, for example). Do any of the OCaml tools support this functionality? | 2010/06/29 | [
"https://Stackoverflow.com/questions/3144605",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46190/"
] | Since OCaml 4.02.1 it is possible to use the [PPX tools written bu Alain Frisch](https://github.com/alainfrisch/ppx_tools) to precisely do this. Example:
```
% ocamlfind ppx_tools/dumpast -e "1 + 2"
1 + 2
==>
{pexp_desc =
Pexp_apply ({pexp_desc = Pexp_ident {txt = Lident "+"}},
[("", {pexp_desc = Pexp_constant (C... | [camlp4](http://brion.inria.fr/gallium/index.php/Camlp4) is a way to go. Here is a [motivating example](http://caml.inria.fr/svn/ocaml/trunk/camlp4/Camlp4Filters/Camlp4Profiler.ml). The docs are sparse - true, but one can make his way reading through wiki, existing examples, [tutorials](http://martin.jambon.free.fr/ext... |
3,144,605 | I'd like to be able to get the AST for a given OCaml program (I'd like to walk the AST and generate an instrumented version of the code or do some kind of transformation, for example). Do any of the OCaml tools support this functionality? | 2010/06/29 | [
"https://Stackoverflow.com/questions/3144605",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46190/"
] | Since OCaml 4.02.1 it is possible to use the [PPX tools written bu Alain Frisch](https://github.com/alainfrisch/ppx_tools) to precisely do this. Example:
```
% ocamlfind ppx_tools/dumpast -e "1 + 2"
1 + 2
==>
{pexp_desc =
Pexp_apply ({pexp_desc = Pexp_ident {txt = Lident "+"}},
[("", {pexp_desc = Pexp_constant (C... | You can use `compiler-libs` to achieve this. See `Parsetree`, `Asttypes`, and `Ast_helper`. |
74,385,324 | I am trying to show Activity indicator view on API call in my swiftUI application. I have created the Activity Indicator view and it's working fine but I want to disable the user interaction while it is being displayed. To achieve this I have also tried **allowsHitTesting(false)** modifier but of no use :( When I am cl... | 2022/11/10 | [
"https://Stackoverflow.com/questions/74385324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10469417/"
] | You dont need to use `.allowsHitTesting(false)` modifier.
Just mark your blur view is not user-interactable. I tested on simulator.
```
func makeUIView(context: UIViewRepresentableContext<BlurView>) -> UIVisualEffectView {
let effect = UIBlurEffect(style: .systemMaterial)
let view = UIVisualEffectView(effect: ... | If you want to disable the `Button` in your `ContentView`, you will have to apply the `.allowsHitTesting(_:)` modifier on the button, instead of `Loading()` (or `BlurView`). It is your button that is checking for taps, after all, not the progress indicator.
```
struct ContentView: View {
var body: some View {
... |
3,018,419 | I'm in the process of migrating a library that is written in C++ and has a C# wrapper. The C# wrapper (`LibWrapper`) has a set of classes with namespaces, like:
```
namespace MyNamespace
class MyClass
class MyOtherClass
```
My new library, `LibraryCS` contains the same namespaces and class names as `LibWrapper... | 2010/06/10 | [
"https://Stackoverflow.com/questions/3018419",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7277/"
] | In order to load both of these classes in the same executable, you could to load them in a separate Application Domain. This would let you test the assembly, then fully unload it and load the second one and test it.
For details on how to do this, see [How to: Load Assemblies into an Application Domain](http://msdn.mic... | You could load the first assembly at runtime then use reflection to instantiate it and execute it's method. Then unload that assembly, load the second assembly and use reflection to create it and run its methods.
It'd probably be easier to use 2 separate processes then compare the resulting output... |
3,018,419 | I'm in the process of migrating a library that is written in C++ and has a C# wrapper. The C# wrapper (`LibWrapper`) has a set of classes with namespaces, like:
```
namespace MyNamespace
class MyClass
class MyOtherClass
```
My new library, `LibraryCS` contains the same namespaces and class names as `LibWrapper... | 2010/06/10 | [
"https://Stackoverflow.com/questions/3018419",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7277/"
] | You can use an [extern alias](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/extern-alias) to reference types with the same fully qualified name from different assemblies. Select the reference to LibraryCS and update Aliases in the properties page from "global" to "LibraryCS", and add `exte... | In order to load both of these classes in the same executable, you could to load them in a separate Application Domain. This would let you test the assembly, then fully unload it and load the second one and test it.
For details on how to do this, see [How to: Load Assemblies into an Application Domain](http://msdn.mic... |
3,018,419 | I'm in the process of migrating a library that is written in C++ and has a C# wrapper. The C# wrapper (`LibWrapper`) has a set of classes with namespaces, like:
```
namespace MyNamespace
class MyClass
class MyOtherClass
```
My new library, `LibraryCS` contains the same namespaces and class names as `LibWrapper... | 2010/06/10 | [
"https://Stackoverflow.com/questions/3018419",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7277/"
] | You can use an [extern alias](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/extern-alias) to reference types with the same fully qualified name from different assemblies. Select the reference to LibraryCS and update Aliases in the properties page from "global" to "LibraryCS", and add `exte... | You could load the first assembly at runtime then use reflection to instantiate it and execute it's method. Then unload that assembly, load the second assembly and use reflection to create it and run its methods.
It'd probably be easier to use 2 separate processes then compare the resulting output... |
3,018,419 | I'm in the process of migrating a library that is written in C++ and has a C# wrapper. The C# wrapper (`LibWrapper`) has a set of classes with namespaces, like:
```
namespace MyNamespace
class MyClass
class MyOtherClass
```
My new library, `LibraryCS` contains the same namespaces and class names as `LibWrapper... | 2010/06/10 | [
"https://Stackoverflow.com/questions/3018419",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7277/"
] | Saw this question and answer and it helped me. How ever for those who need a detailed explanation on the same, i found a [link](https://blogs.msdn.microsoft.com/abhinaba/2005/11/30/c-2-0-using-different-versions-of-the-same-dll-in-one-application/) which is really useful.
Extract from the link.
**Using different vers... | You could load the first assembly at runtime then use reflection to instantiate it and execute it's method. Then unload that assembly, load the second assembly and use reflection to create it and run its methods.
It'd probably be easier to use 2 separate processes then compare the resulting output... |
3,018,419 | I'm in the process of migrating a library that is written in C++ and has a C# wrapper. The C# wrapper (`LibWrapper`) has a set of classes with namespaces, like:
```
namespace MyNamespace
class MyClass
class MyOtherClass
```
My new library, `LibraryCS` contains the same namespaces and class names as `LibWrapper... | 2010/06/10 | [
"https://Stackoverflow.com/questions/3018419",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7277/"
] | You can use an [extern alias](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/extern-alias) to reference types with the same fully qualified name from different assemblies. Select the reference to LibraryCS and update Aliases in the properties page from "global" to "LibraryCS", and add `exte... | Saw this question and answer and it helped me. How ever for those who need a detailed explanation on the same, i found a [link](https://blogs.msdn.microsoft.com/abhinaba/2005/11/30/c-2-0-using-different-versions-of-the-same-dll-in-one-application/) which is really useful.
Extract from the link.
**Using different vers... |
48,193,148 | In my code I Want answer `[('22', '254', '15', '36')]` but got `[('15', '36')]`. My regex `(?:([0-1]?[0-9]{0,2}|2?[0-4]?[0-9]|25[0-5]?)\.){3}` is not run for 3 time may be!
```
import re
def fun(st):
print(re.findall("(?:([0-1]?[0-9]{0,2}|2?[0-4]?[0-9]|25[0-5]?)\.){3}([0-1]?[0-9]{0,2}|2?[0-4]?[0-9]|25[0-5]?)",st))... | 2018/01/10 | [
"https://Stackoverflow.com/questions/48193148",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6922087/"
] | Overview
--------
As I mentioned in the comments below your question, most regex engines only capture the last match. So when you do `(...){3}`, only the last match is captured: E.g. `(.){3}` used against `abc` will only return `c`.
Also, note that changing your regex to `(2[0-4]\d|25[0-5]|[01]?\d{1,2})` performs muc... | You only have two capturing groups in your regex:
```
(?: # non-capturing group
( # group 1
[0-1]?[0-9]{0,2}|2?[0-4]?[0-9]|25[0-5]?
)\.
){3}
( # group 2
[0-1]?[0-9]{0,2}|2?[0-4]?[0-9]|25[0-5]?
)
```
That the first group can be repeated 3 times doesn't make it capture 3 times. The r... |
48,193,148 | In my code I Want answer `[('22', '254', '15', '36')]` but got `[('15', '36')]`. My regex `(?:([0-1]?[0-9]{0,2}|2?[0-4]?[0-9]|25[0-5]?)\.){3}` is not run for 3 time may be!
```
import re
def fun(st):
print(re.findall("(?:([0-1]?[0-9]{0,2}|2?[0-4]?[0-9]|25[0-5]?)\.){3}([0-1]?[0-9]{0,2}|2?[0-4]?[0-9]|25[0-5]?)",st))... | 2018/01/10 | [
"https://Stackoverflow.com/questions/48193148",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6922087/"
] | You only have two capturing groups in your regex:
```
(?: # non-capturing group
( # group 1
[0-1]?[0-9]{0,2}|2?[0-4]?[0-9]|25[0-5]?
)\.
){3}
( # group 2
[0-1]?[0-9]{0,2}|2?[0-4]?[0-9]|25[0-5]?
)
```
That the first group can be repeated 3 times doesn't make it capture 3 times. The r... | I encountered a very similar issue.
I found two solutions, using the official documentation.
The answer of @ctwheels above did mention the **cause** of the problem, and I really appreciate it, but it did not provide a solution.
Even when trying the *lookbehind* and the *lookahead*, it did not work.
1. First solution:
... |
48,193,148 | In my code I Want answer `[('22', '254', '15', '36')]` but got `[('15', '36')]`. My regex `(?:([0-1]?[0-9]{0,2}|2?[0-4]?[0-9]|25[0-5]?)\.){3}` is not run for 3 time may be!
```
import re
def fun(st):
print(re.findall("(?:([0-1]?[0-9]{0,2}|2?[0-4]?[0-9]|25[0-5]?)\.){3}([0-1]?[0-9]{0,2}|2?[0-4]?[0-9]|25[0-5]?)",st))... | 2018/01/10 | [
"https://Stackoverflow.com/questions/48193148",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6922087/"
] | Overview
--------
As I mentioned in the comments below your question, most regex engines only capture the last match. So when you do `(...){3}`, only the last match is captured: E.g. `(.){3}` used against `abc` will only return `c`.
Also, note that changing your regex to `(2[0-4]\d|25[0-5]|[01]?\d{1,2})` performs muc... | I encountered a very similar issue.
I found two solutions, using the official documentation.
The answer of @ctwheels above did mention the **cause** of the problem, and I really appreciate it, but it did not provide a solution.
Even when trying the *lookbehind* and the *lookahead*, it did not work.
1. First solution:
... |
7,409,939 | I have two types `User` and `Area`.
```
public class User : IEntity
{
public int UserId { get; set; }
public string Username { get; set; }
public int AreaId { get; set; }
public string CreatedByUserName { get; set; }
public DateTime CreatedDateTim... | 2011/09/14 | [
"https://Stackoverflow.com/questions/7409939",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/822229/"
] | You can filter `Areas` before sending it to the dictionary.
```
var dictionary = Areas.Where(s => s.Users.Any()).ToDictionary...
``` | It is very strange for areas to have users wich do not match the AreaId that contains them but nevertheless:
```
var usersByArea = (from area in areas
let areaUsers = area.Users.Where(u => u.AreaId == area.Id).ToList()
where areaUsers.Count > 0
selec... |
18,565,478 | How do I change the fonts and colors for Typescript in webstorm, there seems to be a place for this sort of thing for every other language but not Typescript.
Any help would be appreciated. | 2013/09/02 | [
"https://Stackoverflow.com/questions/18565478",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1624921/"
] | You can change the font/colors used for TypeScript by changing JavaScript settings in Settings/Editor/Colors&Fonts. Please vote for [this ticket](http://youtrack.jetbrains.com/issue/WEB-2073) - this is a request for a separate TypeScript color scheme | You are right. Its missing as shown:
 |
18,565,478 | How do I change the fonts and colors for Typescript in webstorm, there seems to be a place for this sort of thing for every other language but not Typescript.
Any help would be appreciated. | 2013/09/02 | [
"https://Stackoverflow.com/questions/18565478",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1624921/"
] | You are right. Its missing as shown:
 | I am using webstorm 10:
```
Ctrl+Alt+S
Search for typescript under Colors & Fonts
Here you can change the fonts and colors for typescript only
``` |
18,565,478 | How do I change the fonts and colors for Typescript in webstorm, there seems to be a place for this sort of thing for every other language but not Typescript.
Any help would be appreciated. | 2013/09/02 | [
"https://Stackoverflow.com/questions/18565478",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1624921/"
] | You can change the font/colors used for TypeScript by changing JavaScript settings in Settings/Editor/Colors&Fonts. Please vote for [this ticket](http://youtrack.jetbrains.com/issue/WEB-2073) - this is a request for a separate TypeScript color scheme | I am using webstorm 10:
```
Ctrl+Alt+S
Search for typescript under Colors & Fonts
Here you can change the fonts and colors for typescript only
``` |
2,991,490 | This is **part of a homework problem** I am working on. In light of this, please **do not post an entire solution**. I've been told that we do not have to use anything but Fermat's little theorem and a bit of group theory to prove this result. And I'm honestly out of ideas on how to do it. Every resource I've found see... | 2018/11/09 | [
"https://math.stackexchange.com/questions/2991490",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/18266/"
] | We can try to "hide" the polynomial part, for example: look at the [Vandermonde determinant](https://en.wikipedia.org/wiki/Vandermonde_matrix) (the polynomial is hidden here)
$$
\det\begin{bmatrix}1&x\_1&x\_1^2&\dots&x\_1^m\\1&x\_2&x\_2^2&\dots&x\_2^m\\1&x\_3&x\_3^2&\dots&x\_3^m\\\vdots&\vdots&\vdots&\ddots&\vdots\\1&x... | Rule Number 1. $(\mathbb Z/p\mathbb Z)^\times$ is cyclic, generated by some element $a$ of order $p-1$. So whatever solution you are after, it must be a power of $a$. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.