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 |
|---|---|---|---|---|---|
41,699,160 | I have an activity with coordinator layout.inside activity there is a fragment with Recycler view and float button.how can I show/hide float button when Scroll Recycler view and avoid to use fab behavior?!
in activity layout:
CoordinatorLayout----->AppBarLayout---->Toolbar and FrameLayout and Bottom bar view
in fragm... | 2017/01/17 | [
"https://Stackoverflow.com/questions/41699160",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5723268/"
] | This code works just fine:
```
mRecycler.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
if(dy > 0){
mFab.hide();
} else{
... | **Solution in Kotlin**
```
recycler_view = findViewById(R.id.recycler_view)
recycler_view.addOnScrollListener(object : RecyclerView.OnScrollListener(){
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
if(dy > 0){
fab.hide();
... |
41,699,160 | I have an activity with coordinator layout.inside activity there is a fragment with Recycler view and float button.how can I show/hide float button when Scroll Recycler view and avoid to use fab behavior?!
in activity layout:
CoordinatorLayout----->AppBarLayout---->Toolbar and FrameLayout and Bottom bar view
in fragm... | 2017/01/17 | [
"https://Stackoverflow.com/questions/41699160",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5723268/"
] | I modified Leondro's method such that the FAB will hide when there's scrolling and show when the scrolling stops.
```
scrollListener = new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
switch (newState) {
case Recyc... | Here is working solution:
```
class HideOnScrollFabBehavior(context: Context?, attrs: AttributeSet?) : FloatingActionButton.Behavior() {
// changes visibility from GONE to INVISIBLE when fab is hidden because
// due to CoordinatorLayout.onStartNestedScroll() implementation
// child view's (here, fab) onSt... |
41,699,160 | I have an activity with coordinator layout.inside activity there is a fragment with Recycler view and float button.how can I show/hide float button when Scroll Recycler view and avoid to use fab behavior?!
in activity layout:
CoordinatorLayout----->AppBarLayout---->Toolbar and FrameLayout and Bottom bar view
in fragm... | 2017/01/17 | [
"https://Stackoverflow.com/questions/41699160",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5723268/"
] | I modified Leondro's method such that the FAB will hide when there's scrolling and show when the scrolling stops.
```
scrollListener = new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
switch (newState) {
case Recyc... | You can add this property in your floating action button:
app:layout\_behavior="@string/hide\_bottom\_view\_on\_scroll\_behavior" |
41,699,160 | I have an activity with coordinator layout.inside activity there is a fragment with Recycler view and float button.how can I show/hide float button when Scroll Recycler view and avoid to use fab behavior?!
in activity layout:
CoordinatorLayout----->AppBarLayout---->Toolbar and FrameLayout and Bottom bar view
in fragm... | 2017/01/17 | [
"https://Stackoverflow.com/questions/41699160",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5723268/"
] | I modified Leondro's method such that the FAB will hide when there's scrolling and show when the scrolling stops.
```
scrollListener = new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
switch (newState) {
case Recyc... | **Solution in Kotlin**
```
recycler_view = findViewById(R.id.recycler_view)
recycler_view.addOnScrollListener(object : RecyclerView.OnScrollListener(){
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
if(dy > 0){
fab.hide();
... |
41,699,160 | I have an activity with coordinator layout.inside activity there is a fragment with Recycler view and float button.how can I show/hide float button when Scroll Recycler view and avoid to use fab behavior?!
in activity layout:
CoordinatorLayout----->AppBarLayout---->Toolbar and FrameLayout and Bottom bar view
in fragm... | 2017/01/17 | [
"https://Stackoverflow.com/questions/41699160",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5723268/"
] | You can add this property in your floating action button:
app:layout\_behavior="@string/hide\_bottom\_view\_on\_scroll\_behavior" | Here is working solution:
```
class HideOnScrollFabBehavior(context: Context?, attrs: AttributeSet?) : FloatingActionButton.Behavior() {
// changes visibility from GONE to INVISIBLE when fab is hidden because
// due to CoordinatorLayout.onStartNestedScroll() implementation
// child view's (here, fab) onSt... |
41,699,160 | I have an activity with coordinator layout.inside activity there is a fragment with Recycler view and float button.how can I show/hide float button when Scroll Recycler view and avoid to use fab behavior?!
in activity layout:
CoordinatorLayout----->AppBarLayout---->Toolbar and FrameLayout and Bottom bar view
in fragm... | 2017/01/17 | [
"https://Stackoverflow.com/questions/41699160",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5723268/"
] | You can add this property in your floating action button:
app:layout\_behavior="@string/hide\_bottom\_view\_on\_scroll\_behavior" | **Solution in Kotlin**
```
recycler_view = findViewById(R.id.recycler_view)
recycler_view.addOnScrollListener(object : RecyclerView.OnScrollListener(){
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
if(dy > 0){
fab.hide();
... |
34,948,539 | I am in the process of optimizing and refactoring a large ERP-type ASP.NET application to achieve a faster development experience.
We currently have a large model (600+ tables/entities) that is created when the application starts which take around 15 seconds. (At this point, we are using NHibernate with code-first mapp... | 2016/01/22 | [
"https://Stackoverflow.com/questions/34948539",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/463192/"
] | It's a good practice to use `DbContext` per each request.
If you render partial pages on your View it's better if you still use same context.
Your context disposed automatically at the end of your request in general (Of cource there are some exceptions if you create your context on application start for example but y... | So far this is exactly the model I've been using and it all went just fine. The DbContext should exist for as little as possible and should represent the database context (get it?) for the related actions you are operating. It's pretty much the same as having a new controller instance for every request in ASP.NET MVC.
... |
34,948,539 | I am in the process of optimizing and refactoring a large ERP-type ASP.NET application to achieve a faster development experience.
We currently have a large model (600+ tables/entities) that is created when the application starts which take around 15 seconds. (At this point, we are using NHibernate with code-first mapp... | 2016/01/22 | [
"https://Stackoverflow.com/questions/34948539",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/463192/"
] | >
> I was wondering if it would be a good practice to have one DbContext
> per page which would include only the required entities/mappings to
> use this page.
>
>
>
I don't think this is a good idea to have one dedicated DbContext type per page.
* Each DbContext's type model will hold a memory footprint during... | It's a good practice to use `DbContext` per each request.
If you render partial pages on your View it's better if you still use same context.
Your context disposed automatically at the end of your request in general (Of cource there are some exceptions if you create your context on application start for example but y... |
34,948,539 | I am in the process of optimizing and refactoring a large ERP-type ASP.NET application to achieve a faster development experience.
We currently have a large model (600+ tables/entities) that is created when the application starts which take around 15 seconds. (At this point, we are using NHibernate with code-first mapp... | 2016/01/22 | [
"https://Stackoverflow.com/questions/34948539",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/463192/"
] | It's a good practice to use `DbContext` per each request.
If you render partial pages on your View it's better if you still use same context.
Your context disposed automatically at the end of your request in general (Of cource there are some exceptions if you create your context on application start for example but y... | Entity Framework 6 added support for using multiple models in a single database, including migrations. But each of the models needs to be independent from the other models, i.e. no shared tables and entities. Sharing entities can be done but migrations become more complicated.
This blog post, [Data Points - EF6 Code F... |
34,948,539 | I am in the process of optimizing and refactoring a large ERP-type ASP.NET application to achieve a faster development experience.
We currently have a large model (600+ tables/entities) that is created when the application starts which take around 15 seconds. (At this point, we are using NHibernate with code-first mapp... | 2016/01/22 | [
"https://Stackoverflow.com/questions/34948539",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/463192/"
] | >
> I was wondering if it would be a good practice to have one DbContext
> per page which would include only the required entities/mappings to
> use this page.
>
>
>
I don't think this is a good idea to have one dedicated DbContext type per page.
* Each DbContext's type model will hold a memory footprint during... | So far this is exactly the model I've been using and it all went just fine. The DbContext should exist for as little as possible and should represent the database context (get it?) for the related actions you are operating. It's pretty much the same as having a new controller instance for every request in ASP.NET MVC.
... |
34,948,539 | I am in the process of optimizing and refactoring a large ERP-type ASP.NET application to achieve a faster development experience.
We currently have a large model (600+ tables/entities) that is created when the application starts which take around 15 seconds. (At this point, we are using NHibernate with code-first mapp... | 2016/01/22 | [
"https://Stackoverflow.com/questions/34948539",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/463192/"
] | >
> I was wondering if it would be a good practice to have one DbContext
> per page which would include only the required entities/mappings to
> use this page.
>
>
>
I don't think this is a good idea to have one dedicated DbContext type per page.
* Each DbContext's type model will hold a memory footprint during... | Entity Framework 6 added support for using multiple models in a single database, including migrations. But each of the models needs to be independent from the other models, i.e. no shared tables and entities. Sharing entities can be done but migrations become more complicated.
This blog post, [Data Points - EF6 Code F... |
19,743,851 | I want to encode a string into `base64` and transfer it through a socket and decode it back.
But after decoding it gives different answer.
Following is my code and result is "77+9x6s="
```
import javax.xml.bind.DatatypeConverter;
public class f{
public static void main(String a[]){
String s... | 2013/11/02 | [
"https://Stackoverflow.com/questions/19743851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1669106/"
] | The accepted answer uses the Apache Commons package but this is how I did it using Java's native libraries
**Java 11 and up**
```
import java.util.Base64;
public class Base64Encoding {
public static void main(String[] args) {
Base64.Encoder enc = Base64.getEncoder();
Base64.Decoder dec = Base64.... | ```
import javax.xml.bind.DatatypeConverter;
public class f{
public static void main(String a[]){
String str = new String(DatatypeConverter.printBase64Binary(new String("user:123").getBytes()));
String res = DatatypeConverter.parseBase64Binary(str);
System.out.println(res);
}
}
``` |
19,743,851 | I want to encode a string into `base64` and transfer it through a socket and decode it back.
But after decoding it gives different answer.
Following is my code and result is "77+9x6s="
```
import javax.xml.bind.DatatypeConverter;
public class f{
public static void main(String a[]){
String s... | 2013/11/02 | [
"https://Stackoverflow.com/questions/19743851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1669106/"
] | You can use following approach:
```
import org.apache.commons.codec.binary.Base64;
// Encode data on your side using BASE64
byte[] bytesEncoded = Base64.encodeBase64(str.getBytes());
System.out.println("encoded value is " + new String(bytesEncoded));
// Decode data on other side, by processing encoded data
byte[] va... | The following is a good solution -
```
import android.util.Base64;
String converted = Base64.encodeToString(toConvert.toString().getBytes(), Base64.DEFAULT);
String stringFromBase = new String(Base64.decode(converted, Base64.DEFAULT));
```
That's it. A single line encoding and decoding. |
19,743,851 | I want to encode a string into `base64` and transfer it through a socket and decode it back.
But after decoding it gives different answer.
Following is my code and result is "77+9x6s="
```
import javax.xml.bind.DatatypeConverter;
public class f{
public static void main(String a[]){
String s... | 2013/11/02 | [
"https://Stackoverflow.com/questions/19743851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1669106/"
] | The accepted answer uses the Apache Commons package but this is how I did it using Java's native libraries
**Java 11 and up**
```
import java.util.Base64;
public class Base64Encoding {
public static void main(String[] args) {
Base64.Encoder enc = Base64.getEncoder();
Base64.Decoder dec = Base64.... | For Spring Users , Spring Security has a Base64 class in the `org.springframework.security.crypto.codec` package that can also be used for encoding and decoding of Base64.
Ex.
```
public static String base64Encode(String token) {
byte[] encodedBytes = Base64.encode(token.getBytes());
return new String(encoded... |
19,743,851 | I want to encode a string into `base64` and transfer it through a socket and decode it back.
But after decoding it gives different answer.
Following is my code and result is "77+9x6s="
```
import javax.xml.bind.DatatypeConverter;
public class f{
public static void main(String a[]){
String s... | 2013/11/02 | [
"https://Stackoverflow.com/questions/19743851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1669106/"
] | Java 8 now supports BASE64 Encoding and Decoding. You can use the following classes:
`java.util.Base64`, `java.util.Base64.Encoder` and `java.util.Base64.Decoder`.
Example usage:
```
// encode with padding
String encoded = Base64.getEncoder().encodeToString(someByteArray);
// encode without padding
String encoded = ... | The accepted answer uses the Apache Commons package but this is how I did it using Java's native libraries
**Java 11 and up**
```
import java.util.Base64;
public class Base64Encoding {
public static void main(String[] args) {
Base64.Encoder enc = Base64.getEncoder();
Base64.Decoder dec = Base64.... |
19,743,851 | I want to encode a string into `base64` and transfer it through a socket and decode it back.
But after decoding it gives different answer.
Following is my code and result is "77+9x6s="
```
import javax.xml.bind.DatatypeConverter;
public class f{
public static void main(String a[]){
String s... | 2013/11/02 | [
"https://Stackoverflow.com/questions/19743851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1669106/"
] | You can use following approach:
```
import org.apache.commons.codec.binary.Base64;
// Encode data on your side using BASE64
byte[] bytesEncoded = Base64.encodeBase64(str.getBytes());
System.out.println("encoded value is " + new String(bytesEncoded));
// Decode data on other side, by processing encoded data
byte[] va... | For Spring Users , Spring Security has a Base64 class in the `org.springframework.security.crypto.codec` package that can also be used for encoding and decoding of Base64.
Ex.
```
public static String base64Encode(String token) {
byte[] encodedBytes = Base64.encode(token.getBytes());
return new String(encoded... |
19,743,851 | I want to encode a string into `base64` and transfer it through a socket and decode it back.
But after decoding it gives different answer.
Following is my code and result is "77+9x6s="
```
import javax.xml.bind.DatatypeConverter;
public class f{
public static void main(String a[]){
String s... | 2013/11/02 | [
"https://Stackoverflow.com/questions/19743851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1669106/"
] | For Spring Users , Spring Security has a Base64 class in the `org.springframework.security.crypto.codec` package that can also be used for encoding and decoding of Base64.
Ex.
```
public static String base64Encode(String token) {
byte[] encodedBytes = Base64.encode(token.getBytes());
return new String(encoded... | ```
import javax.xml.bind.DatatypeConverter;
public class f{
public static void main(String a[]){
String str = new String(DatatypeConverter.printBase64Binary(new String("user:123").getBytes()));
String res = DatatypeConverter.parseBase64Binary(str);
System.out.println(res);
}
}
``` |
19,743,851 | I want to encode a string into `base64` and transfer it through a socket and decode it back.
But after decoding it gives different answer.
Following is my code and result is "77+9x6s="
```
import javax.xml.bind.DatatypeConverter;
public class f{
public static void main(String a[]){
String s... | 2013/11/02 | [
"https://Stackoverflow.com/questions/19743851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1669106/"
] | Java 8 now supports BASE64 Encoding and Decoding. You can use the following classes:
`java.util.Base64`, `java.util.Base64.Encoder` and `java.util.Base64.Decoder`.
Example usage:
```
// encode with padding
String encoded = Base64.getEncoder().encodeToString(someByteArray);
// encode without padding
String encoded = ... | The following is a good solution -
```
import android.util.Base64;
String converted = Base64.encodeToString(toConvert.toString().getBytes(), Base64.DEFAULT);
String stringFromBase = new String(Base64.decode(converted, Base64.DEFAULT));
```
That's it. A single line encoding and decoding. |
19,743,851 | I want to encode a string into `base64` and transfer it through a socket and decode it back.
But after decoding it gives different answer.
Following is my code and result is "77+9x6s="
```
import javax.xml.bind.DatatypeConverter;
public class f{
public static void main(String a[]){
String s... | 2013/11/02 | [
"https://Stackoverflow.com/questions/19743851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1669106/"
] | The following is a good solution -
```
import android.util.Base64;
String converted = Base64.encodeToString(toConvert.toString().getBytes(), Base64.DEFAULT);
String stringFromBase = new String(Base64.decode(converted, Base64.DEFAULT));
```
That's it. A single line encoding and decoding. | ```
import javax.xml.bind.DatatypeConverter;
public class f{
public static void main(String a[]){
String str = new String(DatatypeConverter.printBase64Binary(new String("user:123").getBytes()));
String res = DatatypeConverter.parseBase64Binary(str);
System.out.println(res);
}
}
``` |
19,743,851 | I want to encode a string into `base64` and transfer it through a socket and decode it back.
But after decoding it gives different answer.
Following is my code and result is "77+9x6s="
```
import javax.xml.bind.DatatypeConverter;
public class f{
public static void main(String a[]){
String s... | 2013/11/02 | [
"https://Stackoverflow.com/questions/19743851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1669106/"
] | Java 8 now supports BASE64 Encoding and Decoding. You can use the following classes:
`java.util.Base64`, `java.util.Base64.Encoder` and `java.util.Base64.Decoder`.
Example usage:
```
// encode with padding
String encoded = Base64.getEncoder().encodeToString(someByteArray);
// encode without padding
String encoded = ... | For Spring Users , Spring Security has a Base64 class in the `org.springframework.security.crypto.codec` package that can also be used for encoding and decoding of Base64.
Ex.
```
public static String base64Encode(String token) {
byte[] encodedBytes = Base64.encode(token.getBytes());
return new String(encoded... |
19,743,851 | I want to encode a string into `base64` and transfer it through a socket and decode it back.
But after decoding it gives different answer.
Following is my code and result is "77+9x6s="
```
import javax.xml.bind.DatatypeConverter;
public class f{
public static void main(String a[]){
String s... | 2013/11/02 | [
"https://Stackoverflow.com/questions/19743851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1669106/"
] | You can use following approach:
```
import org.apache.commons.codec.binary.Base64;
// Encode data on your side using BASE64
byte[] bytesEncoded = Base64.encodeBase64(str.getBytes());
System.out.println("encoded value is " + new String(bytesEncoded));
// Decode data on other side, by processing encoded data
byte[] va... | ```
import javax.xml.bind.DatatypeConverter;
public class f{
public static void main(String a[]){
String str = new String(DatatypeConverter.printBase64Binary(new String("user:123").getBytes()));
String res = DatatypeConverter.parseBase64Binary(str);
System.out.println(res);
}
}
``` |
1,085 | While writing articles about algebraic topology, I have had to typeset spectral sequences. These are tools for calculating homology and cohomology. Examples appear on page 10 of [this book](http://www.math.cornell.edu/~hatcher/SSAT/SSch1.pdf) by Hatcher.
So far I've typeset these using xypic, but I'm not completely s... | 2010/08/04 | [
"https://tex.stackexchange.com/questions/1085",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/517/"
] | As long as there's no good package specialized in spectral sequences I would use
* TikZ with its nodes and arrows,
* its matrix library and a matrix of math nodes,
* also shapes and colors are no problem with TikZ.
Here's a very simple demo example which you could extend:
```
\documentclass{article}
\usepackage{tikz... | My go at it would be to say that [mlpost](http://mlpost.lri.fr/) is quite advisable. If you don't know how to program with OCaml, it takes some learning, of course. But if you are trying to achieve non-trivial things, I'd say it's the way to go. |
1,085 | While writing articles about algebraic topology, I have had to typeset spectral sequences. These are tools for calculating homology and cohomology. Examples appear on page 10 of [this book](http://www.math.cornell.edu/~hatcher/SSAT/SSch1.pdf) by Hatcher.
So far I've typeset these using xypic, but I'm not completely s... | 2010/08/04 | [
"https://tex.stackexchange.com/questions/1085",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/517/"
] | As long as there's no good package specialized in spectral sequences I would use
* TikZ with its nodes and arrows,
* its matrix library and a matrix of math nodes,
* also shapes and colors are no problem with TikZ.
Here's a very simple demo example which you could extend:
```
\documentclass{article}
\usepackage{tikz... | For completeness, let me add the `sseq` package by Tilman Bauer. I haven't used it personally, but it seems to be pretty popular with topologists who have to typeset large diagrams where the ”turtle-like” behavior can be nice (together with loops) and arrows don't need to be named.
There is also `luasseq` which is bas... |
1,085 | While writing articles about algebraic topology, I have had to typeset spectral sequences. These are tools for calculating homology and cohomology. Examples appear on page 10 of [this book](http://www.math.cornell.edu/~hatcher/SSAT/SSch1.pdf) by Hatcher.
So far I've typeset these using xypic, but I'm not completely s... | 2010/08/04 | [
"https://tex.stackexchange.com/questions/1085",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/517/"
] | As long as there's no good package specialized in spectral sequences I would use
* TikZ with its nodes and arrows,
* its matrix library and a matrix of math nodes,
* also shapes and colors are no problem with TikZ.
Here's a very simple demo example which you could extend:
```
\documentclass{article}
\usepackage{tikz... | I have written a specialized [spectral sequences package](http://ctan.org/pkg/spectralsequences?lang=en "Spectral Sequences Package").
For example, see the following links (sources at the same path but with a ".tex" extension instead of a ".pdf" extension).
<http://ctan.mirrors.hoobly.com/graphics/pgf/contrib/spectra... |
1,085 | While writing articles about algebraic topology, I have had to typeset spectral sequences. These are tools for calculating homology and cohomology. Examples appear on page 10 of [this book](http://www.math.cornell.edu/~hatcher/SSAT/SSch1.pdf) by Hatcher.
So far I've typeset these using xypic, but I'm not completely s... | 2010/08/04 | [
"https://tex.stackexchange.com/questions/1085",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/517/"
] | I'm not a user of spectral sequences (although I know what they are and what they look like). Here is a sort of meta-answer. For TeX articles on the [arXiv](http://www.arxiv.org) you can download the TeX source. So when you see a nicely typeset spectral sequence, look for the paper on the arXiv, download the source and... | My go at it would be to say that [mlpost](http://mlpost.lri.fr/) is quite advisable. If you don't know how to program with OCaml, it takes some learning, of course. But if you are trying to achieve non-trivial things, I'd say it's the way to go. |
1,085 | While writing articles about algebraic topology, I have had to typeset spectral sequences. These are tools for calculating homology and cohomology. Examples appear on page 10 of [this book](http://www.math.cornell.edu/~hatcher/SSAT/SSch1.pdf) by Hatcher.
So far I've typeset these using xypic, but I'm not completely s... | 2010/08/04 | [
"https://tex.stackexchange.com/questions/1085",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/517/"
] | I'm not a user of spectral sequences (although I know what they are and what they look like). Here is a sort of meta-answer. For TeX articles on the [arXiv](http://www.arxiv.org) you can download the TeX source. So when you see a nicely typeset spectral sequence, look for the paper on the arXiv, download the source and... | For completeness, let me add the `sseq` package by Tilman Bauer. I haven't used it personally, but it seems to be pretty popular with topologists who have to typeset large diagrams where the ”turtle-like” behavior can be nice (together with loops) and arrows don't need to be named.
There is also `luasseq` which is bas... |
1,085 | While writing articles about algebraic topology, I have had to typeset spectral sequences. These are tools for calculating homology and cohomology. Examples appear on page 10 of [this book](http://www.math.cornell.edu/~hatcher/SSAT/SSch1.pdf) by Hatcher.
So far I've typeset these using xypic, but I'm not completely s... | 2010/08/04 | [
"https://tex.stackexchange.com/questions/1085",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/517/"
] | I'm not a user of spectral sequences (although I know what they are and what they look like). Here is a sort of meta-answer. For TeX articles on the [arXiv](http://www.arxiv.org) you can download the TeX source. So when you see a nicely typeset spectral sequence, look for the paper on the arXiv, download the source and... | I have written a specialized [spectral sequences package](http://ctan.org/pkg/spectralsequences?lang=en "Spectral Sequences Package").
For example, see the following links (sources at the same path but with a ".tex" extension instead of a ".pdf" extension).
<http://ctan.mirrors.hoobly.com/graphics/pgf/contrib/spectra... |
1,085 | While writing articles about algebraic topology, I have had to typeset spectral sequences. These are tools for calculating homology and cohomology. Examples appear on page 10 of [this book](http://www.math.cornell.edu/~hatcher/SSAT/SSch1.pdf) by Hatcher.
So far I've typeset these using xypic, but I'm not completely s... | 2010/08/04 | [
"https://tex.stackexchange.com/questions/1085",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/517/"
] | For completeness, let me add the `sseq` package by Tilman Bauer. I haven't used it personally, but it seems to be pretty popular with topologists who have to typeset large diagrams where the ”turtle-like” behavior can be nice (together with loops) and arrows don't need to be named.
There is also `luasseq` which is bas... | My go at it would be to say that [mlpost](http://mlpost.lri.fr/) is quite advisable. If you don't know how to program with OCaml, it takes some learning, of course. But if you are trying to achieve non-trivial things, I'd say it's the way to go. |
1,085 | While writing articles about algebraic topology, I have had to typeset spectral sequences. These are tools for calculating homology and cohomology. Examples appear on page 10 of [this book](http://www.math.cornell.edu/~hatcher/SSAT/SSch1.pdf) by Hatcher.
So far I've typeset these using xypic, but I'm not completely s... | 2010/08/04 | [
"https://tex.stackexchange.com/questions/1085",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/517/"
] | I have written a specialized [spectral sequences package](http://ctan.org/pkg/spectralsequences?lang=en "Spectral Sequences Package").
For example, see the following links (sources at the same path but with a ".tex" extension instead of a ".pdf" extension).
<http://ctan.mirrors.hoobly.com/graphics/pgf/contrib/spectra... | My go at it would be to say that [mlpost](http://mlpost.lri.fr/) is quite advisable. If you don't know how to program with OCaml, it takes some learning, of course. But if you are trying to achieve non-trivial things, I'd say it's the way to go. |
1,085 | While writing articles about algebraic topology, I have had to typeset spectral sequences. These are tools for calculating homology and cohomology. Examples appear on page 10 of [this book](http://www.math.cornell.edu/~hatcher/SSAT/SSch1.pdf) by Hatcher.
So far I've typeset these using xypic, but I'm not completely s... | 2010/08/04 | [
"https://tex.stackexchange.com/questions/1085",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/517/"
] | I have written a specialized [spectral sequences package](http://ctan.org/pkg/spectralsequences?lang=en "Spectral Sequences Package").
For example, see the following links (sources at the same path but with a ".tex" extension instead of a ".pdf" extension).
<http://ctan.mirrors.hoobly.com/graphics/pgf/contrib/spectra... | For completeness, let me add the `sseq` package by Tilman Bauer. I haven't used it personally, but it seems to be pretty popular with topologists who have to typeset large diagrams where the ”turtle-like” behavior can be nice (together with loops) and arrows don't need to be named.
There is also `luasseq` which is bas... |
68,602,931 | ```
export default function MyQuestions() {
const router = useRouter();
const [auth, setAuth] = useState(false);
const checkAuth = async () => {
const loggedInUsername = await getUsername();
if (router.query.username === loggedInUsername) return setAuth(true);
return;
};
checkAuth();
```
This ... | 2021/07/31 | [
"https://Stackoverflow.com/questions/68602931",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14794997/"
] | I haven't used `nextjs` but i suppose it happens because it is executed on every render of the router component.
If you want to use it once, just call it in a use effect when the component mounts.
```js
useEffect(() => {
checkAuth();
}, []) // This will run once, when the component mounts
``` | There is no need to return the setState call:
```
const checkAuth = async () => {
const loggedInUsername = await getUsername();
if (router.query.username === loggedInUsername) setAuth(true);
};
```
Also because you are calling the checkAuth() function right after you call it. Setting state in... |
68,602,931 | ```
export default function MyQuestions() {
const router = useRouter();
const [auth, setAuth] = useState(false);
const checkAuth = async () => {
const loggedInUsername = await getUsername();
if (router.query.username === loggedInUsername) return setAuth(true);
return;
};
checkAuth();
```
This ... | 2021/07/31 | [
"https://Stackoverflow.com/questions/68602931",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14794997/"
] | What are the conditions under which the check should be re-run? This is what [useEffect](https://reactjs.org/docs/hooks-reference.html#useeffect) is intended for. `useEffect` accepts a function to run the desired effect, and a list of dependencies to specify when an effect should be run -
```js
import { useRouter } fr... | I haven't used `nextjs` but i suppose it happens because it is executed on every render of the router component.
If you want to use it once, just call it in a use effect when the component mounts.
```js
useEffect(() => {
checkAuth();
}, []) // This will run once, when the component mounts
``` |
68,602,931 | ```
export default function MyQuestions() {
const router = useRouter();
const [auth, setAuth] = useState(false);
const checkAuth = async () => {
const loggedInUsername = await getUsername();
if (router.query.username === loggedInUsername) return setAuth(true);
return;
};
checkAuth();
```
This ... | 2021/07/31 | [
"https://Stackoverflow.com/questions/68602931",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14794997/"
] | What are the conditions under which the check should be re-run? This is what [useEffect](https://reactjs.org/docs/hooks-reference.html#useeffect) is intended for. `useEffect` accepts a function to run the desired effect, and a list of dependencies to specify when an effect should be run -
```js
import { useRouter } fr... | There is no need to return the setState call:
```
const checkAuth = async () => {
const loggedInUsername = await getUsername();
if (router.query.username === loggedInUsername) setAuth(true);
};
```
Also because you are calling the checkAuth() function right after you call it. Setting state in... |
12,935,965 | I have an application in which some operations are performed by MDB. These MDB all use a `@RunAs(SYSTEM)` annotation to mark them as system elements.
One of these MDB has to run some code which is protecetd through `@RolesAllowed(WORKSPACE)`, which the `SYSTEM` role doesn't have, obviously, but which the `user` (a hu... | 2012/10/17 | [
"https://Stackoverflow.com/questions/12935965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15619/"
] | Like Mike Braun answer suggest, this is **not** possible according to JavaEE specifications.
And that is unfortunate. But, what is a little less unfortunate is that there is some code to do that kind of things (application-server specific), hidden in that application server implementation of `@RunAs`. In Glassfish, th... | I assume that *SYSTEM* is a role, while with *user* you really mean the user who send eg a JMS message to say a queue the MDB is listening on?
If you want to set a Principal with the exact roles as that user (basically propagate the user's security context or do a container login from within the MDB), then this is unf... |
12,935,965 | I have an application in which some operations are performed by MDB. These MDB all use a `@RunAs(SYSTEM)` annotation to mark them as system elements.
One of these MDB has to run some code which is protecetd through `@RolesAllowed(WORKSPACE)`, which the `SYSTEM` role doesn't have, obviously, but which the `user` (a hu... | 2012/10/17 | [
"https://Stackoverflow.com/questions/12935965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15619/"
] | I assume that *SYSTEM* is a role, while with *user* you really mean the user who send eg a JMS message to say a queue the MDB is listening on?
If you want to set a Principal with the exact roles as that user (basically propagate the user's security context or do a container login from within the MDB), then this is unf... | Have a look at:
[A recent question here](https://stackoverflow.com/questions/12779566/login-a-user-programmatically-via-jaas)
Its a more generic approach. Working in JBoss for me. |
12,935,965 | I have an application in which some operations are performed by MDB. These MDB all use a `@RunAs(SYSTEM)` annotation to mark them as system elements.
One of these MDB has to run some code which is protecetd through `@RolesAllowed(WORKSPACE)`, which the `SYSTEM` role doesn't have, obviously, but which the `user` (a hu... | 2012/10/17 | [
"https://Stackoverflow.com/questions/12935965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15619/"
] | Like Mike Braun answer suggest, this is **not** possible according to JavaEE specifications.
And that is unfortunate. But, what is a little less unfortunate is that there is some code to do that kind of things (application-server specific), hidden in that application server implementation of `@RunAs`. In Glassfish, th... | Have a look at:
[A recent question here](https://stackoverflow.com/questions/12779566/login-a-user-programmatically-via-jaas)
Its a more generic approach. Working in JBoss for me. |
20,682 | I walk about 1.5 miles to work, mostly along a busy, smelly road. There is an alternative route I could take of similar length along off-road quiet tracks which would be much nicer, but to take this route I need to cross a river.
The river is maybe 20-30 meters across and slow-flowing, but there is no bridge for a mil... | 2019/04/23 | [
"https://lifehacks.stackexchange.com/questions/20682",
"https://lifehacks.stackexchange.com",
"https://lifehacks.stackexchange.com/users/10973/"
] | Here is an out-of-the-box idea. (Some might go further and suggest that it's an out-of-my-mind idea.) Your issue might be a blessing in disguise.
You can't be the only one who needs a better way to get across the water. There must be others who want or need a ride.
Become an entrepreneur.
Consider changing your line... | While I was scouting for crepe conveyor belt cooking systems recently, I came across cheap inflatable rafts too. Apparently a 1-person inflatable raft can weigh about 1.3 kg (about 3 pounds). A light battery-powered inflator can weigh less than 1.5 pounds. A telescoping paddle or small emergency paddle can weigh 1 poun... |
20,682 | I walk about 1.5 miles to work, mostly along a busy, smelly road. There is an alternative route I could take of similar length along off-road quiet tracks which would be much nicer, but to take this route I need to cross a river.
The river is maybe 20-30 meters across and slow-flowing, but there is no bridge for a mil... | 2019/04/23 | [
"https://lifehacks.stackexchange.com/questions/20682",
"https://lifehacks.stackexchange.com",
"https://lifehacks.stackexchange.com/users/10973/"
] | General advices in order to cross a river
-----------------------------------------
1. Scout Around
Invest a little time in finding the best place to make your crossing. Avoid bends in the river, where water whips around the fastest. Once you find a suitable spot, walk downstream a few hundred feet to make sure there... | The most obvious solution I see here is to swim across. The distance is less than a length in an Olympic size pool (50m), and if you can plan things to be able to easily exit the river some way downstream of your entry point (in both directions) a slow current won't be a problem -- though you may need some practice to ... |
20,682 | I walk about 1.5 miles to work, mostly along a busy, smelly road. There is an alternative route I could take of similar length along off-road quiet tracks which would be much nicer, but to take this route I need to cross a river.
The river is maybe 20-30 meters across and slow-flowing, but there is no bridge for a mil... | 2019/04/23 | [
"https://lifehacks.stackexchange.com/questions/20682",
"https://lifehacks.stackexchange.com",
"https://lifehacks.stackexchange.com/users/10973/"
] | General advices in order to cross a river
-----------------------------------------
1. Scout Around
Invest a little time in finding the best place to make your crossing. Avoid bends in the river, where water whips around the fastest. Once you find a suitable spot, walk downstream a few hundred feet to make sure there... | Since you mention that you could cycle, it opens up the option to use an **amphibious bicycle**.
It would use flotation devices that fold down and outwards so that you can use it on the street as well with no issues, and covert it to amphib mode quickly (perhaps even with the push of a button). With the usual designs,... |
20,682 | I walk about 1.5 miles to work, mostly along a busy, smelly road. There is an alternative route I could take of similar length along off-road quiet tracks which would be much nicer, but to take this route I need to cross a river.
The river is maybe 20-30 meters across and slow-flowing, but there is no bridge for a mil... | 2019/04/23 | [
"https://lifehacks.stackexchange.com/questions/20682",
"https://lifehacks.stackexchange.com",
"https://lifehacks.stackexchange.com/users/10973/"
] | General advices in order to cross a river
-----------------------------------------
1. Scout Around
Invest a little time in finding the best place to make your crossing. Avoid bends in the river, where water whips around the fastest. Once you find a suitable spot, walk downstream a few hundred feet to make sure there... | If you are an adventurous sort of person, you can make a rope bridge with a climbing rope and a small pulley:
[](https://i.stack.imgur.com/7y4fy.jpg)
Make sure to use a st... |
20,682 | I walk about 1.5 miles to work, mostly along a busy, smelly road. There is an alternative route I could take of similar length along off-road quiet tracks which would be much nicer, but to take this route I need to cross a river.
The river is maybe 20-30 meters across and slow-flowing, but there is no bridge for a mil... | 2019/04/23 | [
"https://lifehacks.stackexchange.com/questions/20682",
"https://lifehacks.stackexchange.com",
"https://lifehacks.stackexchange.com/users/10973/"
] | Since you mention that you could cycle, it opens up the option to use an **amphibious bicycle**.
It would use flotation devices that fold down and outwards so that you can use it on the street as well with no issues, and covert it to amphib mode quickly (perhaps even with the push of a button). With the usual designs,... | The most obvious solution I see here is to swim across. The distance is less than a length in an Olympic size pool (50m), and if you can plan things to be able to easily exit the river some way downstream of your entry point (in both directions) a slow current won't be a problem -- though you may need some practice to ... |
20,682 | I walk about 1.5 miles to work, mostly along a busy, smelly road. There is an alternative route I could take of similar length along off-road quiet tracks which would be much nicer, but to take this route I need to cross a river.
The river is maybe 20-30 meters across and slow-flowing, but there is no bridge for a mil... | 2019/04/23 | [
"https://lifehacks.stackexchange.com/questions/20682",
"https://lifehacks.stackexchange.com",
"https://lifehacks.stackexchange.com/users/10973/"
] | Since you mention that you could cycle, it opens up the option to use an **amphibious bicycle**.
It would use flotation devices that fold down and outwards so that you can use it on the street as well with no issues, and covert it to amphib mode quickly (perhaps even with the push of a button). With the usual designs,... | If you cycle to work, you can travel faster, which means that you may be able to go out of your way to a bridge, cross there, and head to work from the other side of the bridge. If there’s a place to park, you could drive to a parking space near the bridge, then walk or cycle the rest of the way.
Or consider crossing ... |
20,682 | I walk about 1.5 miles to work, mostly along a busy, smelly road. There is an alternative route I could take of similar length along off-road quiet tracks which would be much nicer, but to take this route I need to cross a river.
The river is maybe 20-30 meters across and slow-flowing, but there is no bridge for a mil... | 2019/04/23 | [
"https://lifehacks.stackexchange.com/questions/20682",
"https://lifehacks.stackexchange.com",
"https://lifehacks.stackexchange.com/users/10973/"
] | Here is an out-of-the-box idea. (Some might go further and suggest that it's an out-of-my-mind idea.) Your issue might be a blessing in disguise.
You can't be the only one who needs a better way to get across the water. There must be others who want or need a ride.
Become an entrepreneur.
Consider changing your line... | If you cycle to work, you can travel faster, which means that you may be able to go out of your way to a bridge, cross there, and head to work from the other side of the bridge. If there’s a place to park, you could drive to a parking space near the bridge, then walk or cycle the rest of the way.
Or consider crossing ... |
20,682 | I walk about 1.5 miles to work, mostly along a busy, smelly road. There is an alternative route I could take of similar length along off-road quiet tracks which would be much nicer, but to take this route I need to cross a river.
The river is maybe 20-30 meters across and slow-flowing, but there is no bridge for a mil... | 2019/04/23 | [
"https://lifehacks.stackexchange.com/questions/20682",
"https://lifehacks.stackexchange.com",
"https://lifehacks.stackexchange.com/users/10973/"
] | If you are an adventurous sort of person, you can make a rope bridge with a climbing rope and a small pulley:
[](https://i.stack.imgur.com/7y4fy.jpg)
Make sure to use a st... | While I was scouting for crepe conveyor belt cooking systems recently, I came across cheap inflatable rafts too. Apparently a 1-person inflatable raft can weigh about 1.3 kg (about 3 pounds). A light battery-powered inflator can weigh less than 1.5 pounds. A telescoping paddle or small emergency paddle can weigh 1 poun... |
20,682 | I walk about 1.5 miles to work, mostly along a busy, smelly road. There is an alternative route I could take of similar length along off-road quiet tracks which would be much nicer, but to take this route I need to cross a river.
The river is maybe 20-30 meters across and slow-flowing, but there is no bridge for a mil... | 2019/04/23 | [
"https://lifehacks.stackexchange.com/questions/20682",
"https://lifehacks.stackexchange.com",
"https://lifehacks.stackexchange.com/users/10973/"
] | If you are an adventurous sort of person, you can make a rope bridge with a climbing rope and a small pulley:
[](https://i.stack.imgur.com/7y4fy.jpg)
Make sure to use a st... | The most obvious solution I see here is to swim across. The distance is less than a length in an Olympic size pool (50m), and if you can plan things to be able to easily exit the river some way downstream of your entry point (in both directions) a slow current won't be a problem -- though you may need some practice to ... |
20,682 | I walk about 1.5 miles to work, mostly along a busy, smelly road. There is an alternative route I could take of similar length along off-road quiet tracks which would be much nicer, but to take this route I need to cross a river.
The river is maybe 20-30 meters across and slow-flowing, but there is no bridge for a mil... | 2019/04/23 | [
"https://lifehacks.stackexchange.com/questions/20682",
"https://lifehacks.stackexchange.com",
"https://lifehacks.stackexchange.com/users/10973/"
] | If you are an adventurous sort of person, you can make a rope bridge with a climbing rope and a small pulley:
[](https://i.stack.imgur.com/7y4fy.jpg)
Make sure to use a st... | If you cycle to work, you can travel faster, which means that you may be able to go out of your way to a bridge, cross there, and head to work from the other side of the bridge. If there’s a place to park, you could drive to a parking space near the bridge, then walk or cycle the rest of the way.
Or consider crossing ... |
49,665,599 | I am currently trying to run mysql server on a mac, but the Start MySQL Server from the preferences pane doesn't work, and neither does starting it from the Terminal. I have found a lot of fixes, but none of them work. This is my first time using MySQL, I have very little (just a bit of Java) programming experience, an... | 2018/04/05 | [
"https://Stackoverflow.com/questions/49665599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6526395/"
] | I uninstalled and reinstalled SQL with Homebrew using these instructions: <http://stefan.magnuson.co/articles/osx/reinstalling-mysql-on-osx-with-homebrew/> Now it works. | This small diagnosis worked for me in MAC...
open Your Terminal and use the following command to check all the instances or mysql that are currently running in your machine.
```
1) ps -ef | grep mysql
```
If you found any process Id with the above command.
```
2) sudo kill -9 [PID]
```
Where [PID] is the process... |
278,390 | ![example of table[1]](https://i.stack.imgur.com/o4iMI.png)
I'm running into problems while trying to edit some data.
I'm trying to merge a number of land-use categories into less categories. So for example I have 5 types of "forest" which I want to merge into just one attribute.
All of this is in a single layer a... | 2018/04/05 | [
"https://gis.stackexchange.com/questions/278390",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/118059/"
] | Use the dissolve tool on your "Type" category. This will dissolve all polygons with like attributes into larger polygons | So since I couldn't figure out how to combine the rows by within the attribute table itself, I did it the long way around.
I selected the categories I wanted with "Select by attribute" and created a new layer from the selection. After that I had to repair the geometry but was then able to dissolve the new layer and e... |
278,390 | ![example of table[1]](https://i.stack.imgur.com/o4iMI.png)
I'm running into problems while trying to edit some data.
I'm trying to merge a number of land-use categories into less categories. So for example I have 5 types of "forest" which I want to merge into just one attribute.
All of this is in a single layer a... | 2018/04/05 | [
"https://gis.stackexchange.com/questions/278390",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/118059/"
] | Use the dissolve tool on your "Type" category. This will dissolve all polygons with like attributes into larger polygons | You seem to have a solution, but I thought I would add two more.
Using the Dissolve Tool would be the best option, but requires some work upfront.
First, you need to decide on the categories you want to define. So Grassland, Urban, Forest etc. Then you need to decide what categories in your current dataset will fit in... |
19,256,319 | I am busy writing an integration test for a custom annotation processor. In order to do this I have a specific set of .java source files that I am running through javac in order to test my implementation. These are loaded by my test as a resource. This means that my source tree looks something like the following:
```
... | 2013/10/08 | [
"https://Stackoverflow.com/questions/19256319",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/761648/"
] | For me it worked when I added the resource folder to the Compiler Exclude List.
Initial setup:

Rebuild project gives me this output:

Now I add the `src/test/resources` to the Co... | Using Idea 2016.3.3, go to Project Structure>src>test>resources then right click on it and select TestResources.
Then add an exclusion rule to Settings>Build, Execution, Deployment> Compiler> Excludes for your resources folder.
Also remove .java extension from Settings>Build, Execution, Deployment> Compiler>Resource ... |
47,156,927 | I have a list displaying passenger titles:
```
public List<string> GetPassengerNames()
{
List<string> titleList = new List<string>();
var passengerTitles = _driver.FindElements(PassengerDetailsElements.TitleField);
foreach (var passengerTitle in passengerTitles)
{
SelectElement passengerTitl... | 2017/11/07 | [
"https://Stackoverflow.com/questions/47156927",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1096892/"
] | You could just use string join. I haven't checked this in visual studio, but it should work.
```
var passengersList = string.Join(", ", _passengerDetails.GetPassengerNames());
``` | Try this code
```
var resultString = string.Join(",", passengersList);
``` |
47,156,927 | I have a list displaying passenger titles:
```
public List<string> GetPassengerNames()
{
List<string> titleList = new List<string>();
var passengerTitles = _driver.FindElements(PassengerDetailsElements.TitleField);
foreach (var passengerTitle in passengerTitles)
{
SelectElement passengerTitl... | 2017/11/07 | [
"https://Stackoverflow.com/questions/47156927",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1096892/"
] | You could just use string join. I haven't checked this in visual studio, but it should work.
```
var passengersList = string.Join(", ", _passengerDetails.GetPassengerNames());
``` | The code that you are using to add the list to the session is correct, if you want to retrieve the same from session means you have to use the following lines, instead for saving as a concatenated string, retrieving them and split to get the values. try this:
```
var passengerList = (List<string>)ScenarioContext.Curre... |
54,861,198 | I am receiving `[BadMethodCallException] Method isNotEmpty does not exist` whenever I am using chunk method on a Eloquent Model.
I am receiving this error on all my servers (testing, staging and production) but not on my local machine even though all 4 machines have same versions of php, laravel.
**Stacktrace**
>
>... | 2019/02/25 | [
"https://Stackoverflow.com/questions/54861198",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4535741/"
] | in my case I'am just passing httpClient as param to the exported function,
for exemple
```
getData(){
.....
return exportedFunctionToGetData(this.httpClient);}
```
and in the header of the exported function :
```
exportedFunctionToGetData(httpClient : httpClient){...}
```
dont forget to import httpClient in... | HttpClient is a service that is by default provided by `HttpClientModule`.
import this in your AppModule
```
import { HttpClientModule } from '@angular/common/http'
....
@NgModule....
imports: [
HttpClientModule
]
class AppModule {
}
``` |
47,023,274 | Swift has this handy syntax:
```swift
enum Foo {
case bar
case baz
}
func hoge(foo: Foo) {
}
hoge(foo: .bar) // This
```
Which is mirrored in places other than `enum`s:
```
struct Qux {
static let `default` = Qux()
}
func hoge(qux: Qux) {
}
hoge(qux: .default) // This
```
I am not sure what to cal... | 2017/10/30 | [
"https://Stackoverflow.com/questions/47023274",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/453435/"
] | It is called an *implicit member expression*. From [the grammar section of the language guide](https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Expressions.html#//apple_ref/swift/grammar/implicit-member-expression):
>
> An implicit member expression is an abbreviat... | From Apple's [Swift book](https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Enumerations.html#//apple_ref/doc/uid/TP40014097-CH12-ID145):
>
> The values defined in an enumeration (such as north, south, east, and west) are its enumeration cases.
>
>
> |
272,980 | I'm currently organising an [unconference](http://en.wikipedia.org/wiki/Unconference) that will have a significant part of it's schedule given over to the ways in which people can contribute to Ubuntu, along with some workshops on topics like packaging, ISO testing and app development. This event has run for several ye... | 2013/03/27 | [
"https://askubuntu.com/questions/272980",
"https://askubuntu.com",
"https://askubuntu.com/users/-1/"
] | Two routes for this:
1. * Change your launchpad username to that of the conference (or create a new launchpad membership, if that's allowed)
* Apply for and then gain membership under that username.It's slow and not guaranteed if you don't already have membership.
2. Email rt@ubuntu.com and plead your case.
It shoul... | **Ubuntu Email**
The right to have an Ubuntu email address alias (@ubuntu.com) is a privilege that all members (direct/indirect) of the Ubuntu members team on Launchpad possess. For information about Ubuntu membership, see [Membership](https://wiki.ubuntu.com/Membership).
The address is taken from your Launchpad user... |
272,980 | I'm currently organising an [unconference](http://en.wikipedia.org/wiki/Unconference) that will have a significant part of it's schedule given over to the ways in which people can contribute to Ubuntu, along with some workshops on topics like packaging, ISO testing and app development. This event has run for several ye... | 2013/03/27 | [
"https://askubuntu.com/questions/272980",
"https://askubuntu.com",
"https://askubuntu.com/users/-1/"
] | **Ubuntu Email**
The right to have an Ubuntu email address alias (@ubuntu.com) is a privilege that all members (direct/indirect) of the Ubuntu members team on Launchpad possess. For information about Ubuntu membership, see [Membership](https://wiki.ubuntu.com/Membership).
The address is taken from your Launchpad user... | @ChrisWilson, I don't think so.
@ubuntu.com email address are specially suited for personal Ubuntu members for their award of contributing substantively and prolongly to Ubuntu. I have never seen a event getting a @ubuntu.com address.
You should rather get your own @ubuntuunconference.com or that sort of thing. Maybe... |
272,980 | I'm currently organising an [unconference](http://en.wikipedia.org/wiki/Unconference) that will have a significant part of it's schedule given over to the ways in which people can contribute to Ubuntu, along with some workshops on topics like packaging, ISO testing and app development. This event has run for several ye... | 2013/03/27 | [
"https://askubuntu.com/questions/272980",
"https://askubuntu.com",
"https://askubuntu.com/users/-1/"
] | Two routes for this:
1. * Change your launchpad username to that of the conference (or create a new launchpad membership, if that's allowed)
* Apply for and then gain membership under that username.It's slow and not guaranteed if you don't already have membership.
2. Email rt@ubuntu.com and plead your case.
It shoul... | @ChrisWilson, I don't think so.
@ubuntu.com email address are specially suited for personal Ubuntu members for their award of contributing substantively and prolongly to Ubuntu. I have never seen a event getting a @ubuntu.com address.
You should rather get your own @ubuntuunconference.com or that sort of thing. Maybe... |
28,726,444 | Is there a way/switch to restrict the size of long doubles to 64 bits when compiling using GCC? | 2015/02/25 | [
"https://Stackoverflow.com/questions/28726444",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/833060/"
] | Possibly [via `-mlong-double-64` command line switch](https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options), but the question is: **why do you want to do that?**
The x86 ABI and [x86-64 System V](http://www.x86-64.org/documentation_folder/abi-0.99.pdf) ABI mandate a `long ... | Since typically (read: all platforms that I know of) `double` is 64bit, using long double *explicitely* demands a more-precise floating point number. Thus, there's no way to revert that. |
8,127,518 | I want XAMPP to be accessible from my internet IP address.
The problem is that the router login page is displayed when I type in my internet IP address. I think it uses port `80`.
I have manually set my IP address to `192.168.5.44`.
I have changed the default port of Apache from port `80` to port `6065`
and port for... | 2011/11/14 | [
"https://Stackoverflow.com/questions/8127518",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/478636/"
] | I think the issue is that your root panel is not resizing, so none of the elements internal to that panel ever need to resize.
Try changing:
```
panel(layout: new MigLayout()) {
```
to
```
panel(layout: new MigLayout('fill')) {
``` | Try
```
panel(layout: new MigLayout(**"fillx"**)) {
``` |
8,127,518 | I want XAMPP to be accessible from my internet IP address.
The problem is that the router login page is displayed when I type in my internet IP address. I think it uses port `80`.
I have manually set my IP address to `192.168.5.44`.
I have changed the default port of Apache from port `80` to port `6065`
and port for... | 2011/11/14 | [
"https://Stackoverflow.com/questions/8127518",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/478636/"
] | As others have commented, you must set appropriate layout constraints when instantiating MigLayout.
If you have the [miglayout plugin](http://docs.codehaus.org/display/GRIFFON/miglayout+Plugin) then the code can be shortened to the following
```
application(title: ...) {
migLayout layoutConstraints: 'fill'
lab... | Try
```
panel(layout: new MigLayout(**"fillx"**)) {
``` |
8,127,518 | I want XAMPP to be accessible from my internet IP address.
The problem is that the router login page is displayed when I type in my internet IP address. I think it uses port `80`.
I have manually set my IP address to `192.168.5.44`.
I have changed the default port of Apache from port `80` to port `6065`
and port for... | 2011/11/14 | [
"https://Stackoverflow.com/questions/8127518",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/478636/"
] | I think the issue is that your root panel is not resizing, so none of the elements internal to that panel ever need to resize.
Try changing:
```
panel(layout: new MigLayout()) {
```
to
```
panel(layout: new MigLayout('fill')) {
``` | As others have commented, you must set appropriate layout constraints when instantiating MigLayout.
If you have the [miglayout plugin](http://docs.codehaus.org/display/GRIFFON/miglayout+Plugin) then the code can be shortened to the following
```
application(title: ...) {
migLayout layoutConstraints: 'fill'
lab... |
71,759,527 | I'm working with this URL:
`https://fiaresultsandstatistics.motorsportstats.com/results/2021-monaco-grand-prix/session-facts/0976b01f-e26a-420f-a6e9-3371897fc88b?fact=LapTime`
so far I've done this to isolate the text I want.
```
soup = BeautifulSoup(data.text, 'html.parser')
all_scripts = soup.find_all('script')
ft... | 2022/04/05 | [
"https://Stackoverflow.com/questions/71759527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16595186/"
] | You can use findall() on specific attributes like findall(\_class = "car") or findall(id="driver") you will have to inspect the HTML to be specific and you can also use regex to pull specific strings out like this:
```
def ElementsWithRegexByClass(soup: BeautifulSoup, class_string: str):
return soup.find_all(class... | It sounds like you're trying to send a HTTP GET request to that URL. I've taken the liberty of Using `Inspect Element` (Usually one of the `FN` keys, `F11` on Firefox which is what I use) to verify that it returns a JSON - which it does!
Specifically the action you want to take - `fact` is specified as a query at the ... |
61,945,094 | I have searched the internet for some hours now.
I cannot find this trivial thing.
I am using a Windows PC.
I am using Spring boot and using all the defaults.
I want to log to a file and am using YAML application format.
My `application.yml`is in `src/main/resources`.
Its contents are exactly those:
```
spring:
logg... | 2020/05/21 | [
"https://Stackoverflow.com/questions/61945094",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13592682/"
] | Wow! I finally got it working. The successful `application.yml` for me was this:
```
logging:
file.name: logs/app.log
pattern:
console: "%d [%t] %-5level %logger{36} - %msg%n"
file: "%d [%t] %-5level %logger{36} - %msg%n"
level:
com.m2evorah: DEBUG
org.springframework: DEBUG
org.hibernate: DE... | `logging.file` property is not under `spring` property tree.
In your case path is defined as `spring.logging.file`.
Yaml should look like this:
```
logging:
file.name: logs/app.log
pattern:
console: "%d [%t] %-5level %logger{36} - %msg%n"
file: "%d [%t] %-5level %logger{36} - %msg%n"
level:
com.m2e... |
61,945,094 | I have searched the internet for some hours now.
I cannot find this trivial thing.
I am using a Windows PC.
I am using Spring boot and using all the defaults.
I want to log to a file and am using YAML application format.
My `application.yml`is in `src/main/resources`.
Its contents are exactly those:
```
spring:
logg... | 2020/05/21 | [
"https://Stackoverflow.com/questions/61945094",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13592682/"
] | `logging.file` property is not under `spring` property tree.
In your case path is defined as `spring.logging.file`.
Yaml should look like this:
```
logging:
file.name: logs/app.log
pattern:
console: "%d [%t] %-5level %logger{36} - %msg%n"
file: "%d [%t] %-5level %logger{36} - %msg%n"
level:
com.m2e... | Instead of putting the logging configuration in `application.yml` create `log4j.properties/log4j.yml` file in the same `src/main/resources` folder and put the below configurations
```
# Root logger option
log4j.rootLogger=INFO, file
# Direct log messages to a log file
log4j.appender.file=org.apache.log4j.DailyRolling... |
61,945,094 | I have searched the internet for some hours now.
I cannot find this trivial thing.
I am using a Windows PC.
I am using Spring boot and using all the defaults.
I want to log to a file and am using YAML application format.
My `application.yml`is in `src/main/resources`.
Its contents are exactly those:
```
spring:
logg... | 2020/05/21 | [
"https://Stackoverflow.com/questions/61945094",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13592682/"
] | Wow! I finally got it working. The successful `application.yml` for me was this:
```
logging:
file.name: logs/app.log
pattern:
console: "%d [%t] %-5level %logger{36} - %msg%n"
file: "%d [%t] %-5level %logger{36} - %msg%n"
level:
com.m2evorah: DEBUG
org.springframework: DEBUG
org.hibernate: DE... | Instead of putting the logging configuration in `application.yml` create `log4j.properties/log4j.yml` file in the same `src/main/resources` folder and put the below configurations
```
# Root logger option
log4j.rootLogger=INFO, file
# Direct log messages to a log file
log4j.appender.file=org.apache.log4j.DailyRolling... |
7,183,649 | >
> **Possible Duplicate:**
>
> [Caret in objective C](https://stackoverflow.com/questions/1912023/caret-in-objective-c)
>
>
>
I just want to know what this ^ symbol means in Objective-C. | 2011/08/24 | [
"https://Stackoverflow.com/questions/7183649",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/295491/"
] | It can mean several things:
```
type (^name)(arguments)
```
is a declaration of a block object.
```
^(arguments) { ... }
```
is a block object literal
```
x ^ y
```
is the bitwise XOR operator | It is used to define blocks in later versions of iOS. See <http://developer.apple.com/library/ios/#documentation/cocoa/Conceptual/Blocks/Articles/00_Introduction.html> |
7,183,649 | >
> **Possible Duplicate:**
>
> [Caret in objective C](https://stackoverflow.com/questions/1912023/caret-in-objective-c)
>
>
>
I just want to know what this ^ symbol means in Objective-C. | 2011/08/24 | [
"https://Stackoverflow.com/questions/7183649",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/295491/"
] | It can mean several things:
```
type (^name)(arguments)
```
is a declaration of a block object.
```
^(arguments) { ... }
```
is a block object literal
```
x ^ y
```
is the bitwise XOR operator | It means a couple of things:
1. It can mean bitwise `XOR`.
2. It can also signify a pointer to a block (just like `*` is marks a pointer to a function). |
38,792 | I suppose this question is probably elementary for experts, but I'd like to present my arguments, about which I have some doubts, and see if they are correct, or if corrections and improvements are possible.
The setting is as follows: $k$ is the base field of characteristic zero, $G$ a connected semisimple $k$-group, ... | 2010/09/15 | [
"https://mathoverflow.net/questions/38792",
"https://mathoverflow.net",
"https://mathoverflow.net/users/9246/"
] | One method for computing branching rules in favorable situations is to use the Littelmann path model---this has a wiki page
<http://en.wikipedia.org/wiki/Littelmann_path_model>
In this situation (of semisimple $G$ and with $H$ the Levi subgroup of a parabolic) irreducibles essentially never remain irreducible.
Edi... | If you
(a) work on the level of Lie algebras, with restriction to a standard Levi, and
(b) want to find out precisely which irreps remain irreducible under this restriction,
then I believe the following paper may be relevant:
<https://arxiv.org/abs/1409.4133>
Specifically, see Remark 3.4 on page 9. |
69,254,625 | I need to update one attribute of an object for a single validation. I need to revert that in any case and before the Validation raises an error.
I'm currently confused if this is actually the most beautiful way to revert something before the Exception raises because then I have to duplicate the revert code.
`finally` ... | 2021/09/20 | [
"https://Stackoverflow.com/questions/69254625",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5951401/"
] | Finally block should be fine, as shown below:
```
amount = 15
def throw_me_an_error():
try:
amount = 20
print("I've set the amount to 20.")
test = 'hey' + 1
except Exception as e:
print('Exception thrown')
raise e
else:
print('Else part')
finally:
... | As pointed out in the other answers, finally works indeed fine:
```py
>>> try:
... try:
... print(1)
... x += 1
... except Exception:
... raise
... finally:
... print(2)
... except Exception:
... print(3)
...
1
2
3
``` |
180,967 | I have an older Slant Fin Liberty oil furnace that safeties out sometime around 4 hours. It seems to be intermittent because I have seen it do more than one cycle. The recent history on it is about a month ago I changed the electrodes, nozzle and filter. It was running fine until a couple of days ago. I noticed pressin... | 2019/12/24 | [
"https://diy.stackexchange.com/questions/180967",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/110411/"
] | I wanted to share the additional steps I took to troubleshoot the issue and describe what was ultimately causing the issue. The problem comes down to a weak and short spark. I was able to test the spark and witness that it was very quick and dim. I replaced the transformer and the protector relay. I likely did not have... | No tape! If any gets loose and into system, it will screw up the pump and gun. Use something like Gasolia thread sealant. The valve you describe that works opposite of normal valves.... That is a special valve that is supposed to shutoff in high heat (a fire) |
16,830,453 | ```
echo "No of days:";
$var1 = file_get_contents('path to file');
echo $var1;
$var2= "-".$var1." days"; // var2= -2 days
$today = date("M d, Y");
echo $today;
$NewDate=Date(strtotime($var2));
echo date('M d, Y', $NewDate);
```
Error:Warning: date() expects parameter 2 to be long, | 2013/05/30 | [
"https://Stackoverflow.com/questions/16830453",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1627309/"
] | From [IN (Transact-SQL)](http://msdn.microsoft.com/en-us/library/ms177682.aspx)
>
> Including an extremely large number of values (many thousands) in an
> IN clause can consume resources and return errors 8623 or 8632. To
> work around this problem, store the items in the IN list in a table.
>
>
>
So I would re... | Do a backup from your production database (with many rows) and play with it locally on you development machine. The optimization may take some time it may actually be quite hard if you are new to sql. Break down the Query into several temporary tables and join them toghether in the end. Try and remove the dbo.GetFeeds(... |
16,919,727 | I want to disable a button for a specific time in JavaFX application. Is there any option to do this? If not, is there any work around for this?
Below is my code in application. I tried `Thread.sleep`, but i know this is not the good way to stop the user from clicking on next button.
```
nextButton.setDisable(true);
... | 2013/06/04 | [
"https://Stackoverflow.com/questions/16919727",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2262069/"
] | You could use the simple approach of a thread that provides the relevant GUI calls (through `runLater()` of course):
```
new Thread() {
public void run() {
Platform.runLater(new Runnable() {
public void run() {
myButton.setDisable(true);
}
}
try {
... | The method to disable a JavaFX control is:
```
myButton.setDisable(true);
```
You can implement the time logic programmatically in any way you wish, either by polling a timer or by having this method invoked in response to some event.
If you have created this button instance through FXML in SceneBuilder, then you s... |
16,919,727 | I want to disable a button for a specific time in JavaFX application. Is there any option to do this? If not, is there any work around for this?
Below is my code in application. I tried `Thread.sleep`, but i know this is not the good way to stop the user from clicking on next button.
```
nextButton.setDisable(true);
... | 2013/06/04 | [
"https://Stackoverflow.com/questions/16919727",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2262069/"
] | You could also be using the `Timeline`:
```
final Button myButton = new Button("Wait for " + delayTime + " seconds.");
myButton.setDisable(true);
final Timeline animation = new Timeline(
new KeyFrame(Duration.seconds(delayTime),
new EventHandler<ActionEvent>() {
@Overrid... | The method to disable a JavaFX control is:
```
myButton.setDisable(true);
```
You can implement the time logic programmatically in any way you wish, either by polling a timer or by having this method invoked in response to some event.
If you have created this button instance through FXML in SceneBuilder, then you s... |
16,919,727 | I want to disable a button for a specific time in JavaFX application. Is there any option to do this? If not, is there any work around for this?
Below is my code in application. I tried `Thread.sleep`, but i know this is not the good way to stop the user from clicking on next button.
```
nextButton.setDisable(true);
... | 2013/06/04 | [
"https://Stackoverflow.com/questions/16919727",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2262069/"
] | The method to disable a JavaFX control is:
```
myButton.setDisable(true);
```
You can implement the time logic programmatically in any way you wish, either by polling a timer or by having this method invoked in response to some event.
If you have created this button instance through FXML in SceneBuilder, then you s... | Or you could use a Service and bind the running property to the disableProperty of the button do you want to disable.
```
public void start(Stage stage) throws Exception {
VBox vbox = new VBox(10.0);
vbox.setAlignment(Pos.CENTER);
final Button button = new Button("Your Button Name");
button.setO... |
16,919,727 | I want to disable a button for a specific time in JavaFX application. Is there any option to do this? If not, is there any work around for this?
Below is my code in application. I tried `Thread.sleep`, but i know this is not the good way to stop the user from clicking on next button.
```
nextButton.setDisable(true);
... | 2013/06/04 | [
"https://Stackoverflow.com/questions/16919727",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2262069/"
] | You could use the simple approach of a thread that provides the relevant GUI calls (through `runLater()` of course):
```
new Thread() {
public void run() {
Platform.runLater(new Runnable() {
public void run() {
myButton.setDisable(true);
}
}
try {
... | You could also be using the `Timeline`:
```
final Button myButton = new Button("Wait for " + delayTime + " seconds.");
myButton.setDisable(true);
final Timeline animation = new Timeline(
new KeyFrame(Duration.seconds(delayTime),
new EventHandler<ActionEvent>() {
@Overrid... |
16,919,727 | I want to disable a button for a specific time in JavaFX application. Is there any option to do this? If not, is there any work around for this?
Below is my code in application. I tried `Thread.sleep`, but i know this is not the good way to stop the user from clicking on next button.
```
nextButton.setDisable(true);
... | 2013/06/04 | [
"https://Stackoverflow.com/questions/16919727",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2262069/"
] | You could use the simple approach of a thread that provides the relevant GUI calls (through `runLater()` of course):
```
new Thread() {
public void run() {
Platform.runLater(new Runnable() {
public void run() {
myButton.setDisable(true);
}
}
try {
... | Or you could use a Service and bind the running property to the disableProperty of the button do you want to disable.
```
public void start(Stage stage) throws Exception {
VBox vbox = new VBox(10.0);
vbox.setAlignment(Pos.CENTER);
final Button button = new Button("Your Button Name");
button.setO... |
16,919,727 | I want to disable a button for a specific time in JavaFX application. Is there any option to do this? If not, is there any work around for this?
Below is my code in application. I tried `Thread.sleep`, but i know this is not the good way to stop the user from clicking on next button.
```
nextButton.setDisable(true);
... | 2013/06/04 | [
"https://Stackoverflow.com/questions/16919727",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2262069/"
] | You could also be using the `Timeline`:
```
final Button myButton = new Button("Wait for " + delayTime + " seconds.");
myButton.setDisable(true);
final Timeline animation = new Timeline(
new KeyFrame(Duration.seconds(delayTime),
new EventHandler<ActionEvent>() {
@Overrid... | Or you could use a Service and bind the running property to the disableProperty of the button do you want to disable.
```
public void start(Stage stage) throws Exception {
VBox vbox = new VBox(10.0);
vbox.setAlignment(Pos.CENTER);
final Button button = new Button("Your Button Name");
button.setO... |
649,936 | Does anyone knows the default username/password to access a Canon Pixma Pro-100 printer from the WEB? e.g. When I type `http://10.165.16.100` in the address bar of IE I get a prompt to log on. I don't seem to be able to figure that out.
On a side note: The reason I'm trying to access the printer through the web interf... | 2013/09/25 | [
"https://superuser.com/questions/649936",
"https://superuser.com",
"https://superuser.com/users/216122/"
] | Username: ADMIN
Password: canon
\*Case sensitive. | I can't find any reference to the default credentials, but what I did find is that supposedly if you don't recall the administration password (their term for it), you should be able to click on "Help" at that screen and just follow the instructions. Presumably they'll tell you how to reset it at that point, but there's... |
649,936 | Does anyone knows the default username/password to access a Canon Pixma Pro-100 printer from the WEB? e.g. When I type `http://10.165.16.100` in the address bar of IE I get a prompt to log on. I don't seem to be able to figure that out.
On a side note: The reason I'm trying to access the printer through the web interf... | 2013/09/25 | [
"https://superuser.com/questions/649936",
"https://superuser.com",
"https://superuser.com/users/216122/"
] | Username: ADMIN
Password: canon
\*Case sensitive. | From the [canon webmanual](http://ugp01.c-ij.com/ij/webmanual/Manual/W/MX490%20series/EN/AFG/afg_remoteui.html):
Entering Username and Administrator's Password
From the authentication screen, enter the Username and Password.
Username: ADMIN
Password: See "[About the Administrator Password](http://ugp01.c-ij.com/ij/web... |
649,936 | Does anyone knows the default username/password to access a Canon Pixma Pro-100 printer from the WEB? e.g. When I type `http://10.165.16.100` in the address bar of IE I get a prompt to log on. I don't seem to be able to figure that out.
On a side note: The reason I'm trying to access the printer through the web interf... | 2013/09/25 | [
"https://superuser.com/questions/649936",
"https://superuser.com",
"https://superuser.com/users/216122/"
] | Username: ADMIN
Password: canon
\*Case sensitive. | Here's the info from
<http://ugp01.c-ij.com/ij/webmanual/Others1/EN/PW/pw_default.html>
Note that BOTH the username AND the password are case sensitive, at
least on the PIXMA Pro-100 model. This information was ridiculously
hard to find, and it wasn't in the setup instructions that came with
my Pro-100 printer. Als... |
33,360,683 | I am trying to recursively print some html code using heredoc syntax but the php code gets displayed as a comment.
```
<?php
$amount = 9;
function loadpostings($i) {
if ($i == $amount) return;
$idnum = intostring($i);
$postingblock = <<<BLOCK
<div class="posting" id="posting$idnum">
<img clas... | 2015/10/27 | [
"https://Stackoverflow.com/questions/33360683",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4339681/"
] | Please use ip address 'ws://192.168:3000/websocket' instead of 'ws://localhost:3000/websocket' | So this [repo](https://github.com/spencercarli/meteor-todos-react-native-2) has an excellent solution to this problem, and it works with both iOS and Android, in my experience.
So I found a sort of solution, though I am absolutely sure it can be optimized. This way I was able to subscribe to 3 separate Meteor collect... |
814,936 | Consider this code:
```
using Microsoft.Office.Interop.Word;
ApplicationClass _application = new ApplicationClass();
```
Can I get the PID from the Winword.exe process that was launched by the \_application?
I need the PID because with corrupted files, I just can't quit the ApplicationClass, even using this code:
... | 2009/05/02 | [
"https://Stackoverflow.com/questions/814936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/98070/"
] | Finally, I figure out the way to solved File in Use lock by user 'name' while word document not open by user but our program will produce blank title in background processes, we can kill those dummy WINWORD on background as well.
[](https://i.stack.i... | No, unfortunately there is no way to associate an instance of ApplicationClass with a running process of Word.
Why do you need to kill the instance of Word? Couldn't you just ask it to close all of its documents and then simply stop using that instance? If you remove all references to the class eventually the [GC](ht... |
814,936 | Consider this code:
```
using Microsoft.Office.Interop.Word;
ApplicationClass _application = new ApplicationClass();
```
Can I get the PID from the Winword.exe process that was launched by the \_application?
I need the PID because with corrupted files, I just can't quit the ApplicationClass, even using this code:
... | 2009/05/02 | [
"https://Stackoverflow.com/questions/814936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/98070/"
] | <http://www.codekeep.net/snippets/7835116d-b254-466e-ae66-666e4fa3ea5e.aspx>
```
///Return Type: DWORD->unsigned int
///hWnd: HWND->HWND__*
///lpdwProcessId: LPDWORD->DWORD*
[System.Runtime.InteropServices.DllImportAttribute( "user32.dll", EntryPoint = "GetWindowThreadProcessId" )]
public static extern int GetWindowTh... | No, unfortunately there is no way to associate an instance of ApplicationClass with a running process of Word.
Why do you need to kill the instance of Word? Couldn't you just ask it to close all of its documents and then simply stop using that instance? If you remove all references to the class eventually the [GC](ht... |
814,936 | Consider this code:
```
using Microsoft.Office.Interop.Word;
ApplicationClass _application = new ApplicationClass();
```
Can I get the PID from the Winword.exe process that was launched by the \_application?
I need the PID because with corrupted files, I just can't quit the ApplicationClass, even using this code:
... | 2009/05/02 | [
"https://Stackoverflow.com/questions/814936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/98070/"
] | Here is how to do it.
```
//Set the AppId
string AppId = ""+DateTime.Now.Ticks(); //A random title
//Create an identity for the app
this.oWordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
this.oWordApp.Application.Caption = AppId;
this.oWordApp.Application.Visible = true;
while (GetProcessIdByWindowTi... | The usual way to get it is to change Word's title to something unique and hop through the top-level window list until you find it (EnumWindows). |
814,936 | Consider this code:
```
using Microsoft.Office.Interop.Word;
ApplicationClass _application = new ApplicationClass();
```
Can I get the PID from the Winword.exe process that was launched by the \_application?
I need the PID because with corrupted files, I just can't quit the ApplicationClass, even using this code:
... | 2009/05/02 | [
"https://Stackoverflow.com/questions/814936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/98070/"
] | Here is how to do it.
```
//Set the AppId
string AppId = ""+DateTime.Now.Ticks(); //A random title
//Create an identity for the app
this.oWordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
this.oWordApp.Application.Caption = AppId;
this.oWordApp.Application.Visible = true;
while (GetProcessIdByWindowTi... | No, unfortunately there is no way to associate an instance of ApplicationClass with a running process of Word.
Why do you need to kill the instance of Word? Couldn't you just ask it to close all of its documents and then simply stop using that instance? If you remove all references to the class eventually the [GC](ht... |
814,936 | Consider this code:
```
using Microsoft.Office.Interop.Word;
ApplicationClass _application = new ApplicationClass();
```
Can I get the PID from the Winword.exe process that was launched by the \_application?
I need the PID because with corrupted files, I just can't quit the ApplicationClass, even using this code:
... | 2009/05/02 | [
"https://Stackoverflow.com/questions/814936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/98070/"
] | Here is how to do it.
```
//Set the AppId
string AppId = ""+DateTime.Now.Ticks(); //A random title
//Create an identity for the app
this.oWordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
this.oWordApp.Application.Caption = AppId;
this.oWordApp.Application.Visible = true;
while (GetProcessIdByWindowTi... | There may be some error in the Word file. As a result, when you open the file with the method `Word.ApplicationClass.Documents.Open()`, there will be a dialog shown and the process will hang.
Use `Word.ApplicationClass.Documents.OpenNoRepairDialog()` instead. I found it fixed the problem. |
814,936 | Consider this code:
```
using Microsoft.Office.Interop.Word;
ApplicationClass _application = new ApplicationClass();
```
Can I get the PID from the Winword.exe process that was launched by the \_application?
I need the PID because with corrupted files, I just can't quit the ApplicationClass, even using this code:
... | 2009/05/02 | [
"https://Stackoverflow.com/questions/814936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/98070/"
] | <http://www.codekeep.net/snippets/7835116d-b254-466e-ae66-666e4fa3ea5e.aspx>
```
///Return Type: DWORD->unsigned int
///hWnd: HWND->HWND__*
///lpdwProcessId: LPDWORD->DWORD*
[System.Runtime.InteropServices.DllImportAttribute( "user32.dll", EntryPoint = "GetWindowThreadProcessId" )]
public static extern int GetWindowTh... | ```
public void OpenWord(string Path, bool IsVisible)
{
MessageFilter.Register();
object oMissing = Missing.Value;
GUIDCaption = Guid.NewGuid().ToString();
wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
wordApp.Visible = IsVisible;
wordApp.Captio... |
814,936 | Consider this code:
```
using Microsoft.Office.Interop.Word;
ApplicationClass _application = new ApplicationClass();
```
Can I get the PID from the Winword.exe process that was launched by the \_application?
I need the PID because with corrupted files, I just can't quit the ApplicationClass, even using this code:
... | 2009/05/02 | [
"https://Stackoverflow.com/questions/814936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/98070/"
] | There may be some error in the Word file. As a result, when you open the file with the method `Word.ApplicationClass.Documents.Open()`, there will be a dialog shown and the process will hang.
Use `Word.ApplicationClass.Documents.OpenNoRepairDialog()` instead. I found it fixed the problem. | No, unfortunately there is no way to associate an instance of ApplicationClass with a running process of Word.
Why do you need to kill the instance of Word? Couldn't you just ask it to close all of its documents and then simply stop using that instance? If you remove all references to the class eventually the [GC](ht... |
814,936 | Consider this code:
```
using Microsoft.Office.Interop.Word;
ApplicationClass _application = new ApplicationClass();
```
Can I get the PID from the Winword.exe process that was launched by the \_application?
I need the PID because with corrupted files, I just can't quit the ApplicationClass, even using this code:
... | 2009/05/02 | [
"https://Stackoverflow.com/questions/814936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/98070/"
] | Here is how to do it.
```
//Set the AppId
string AppId = ""+DateTime.Now.Ticks(); //A random title
//Create an identity for the app
this.oWordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
this.oWordApp.Application.Caption = AppId;
this.oWordApp.Application.Visible = true;
while (GetProcessIdByWindowTi... | And on our street came the holiday!
How much blood "Word" drank from me ...
What are the ways to get a PID:
1. Get a list of processes, run WORD, get a list of processes, among which will be the desired process.
Drawback if multithreading, it will be a big problem!!!
2. Through the installation a unique name for the ... |
814,936 | Consider this code:
```
using Microsoft.Office.Interop.Word;
ApplicationClass _application = new ApplicationClass();
```
Can I get the PID from the Winword.exe process that was launched by the \_application?
I need the PID because with corrupted files, I just can't quit the ApplicationClass, even using this code:
... | 2009/05/02 | [
"https://Stackoverflow.com/questions/814936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/98070/"
] | The usual way to get it is to change Word's title to something unique and hop through the top-level window list until you find it (EnumWindows). | No, unfortunately there is no way to associate an instance of ApplicationClass with a running process of Word.
Why do you need to kill the instance of Word? Couldn't you just ask it to close all of its documents and then simply stop using that instance? If you remove all references to the class eventually the [GC](ht... |
814,936 | Consider this code:
```
using Microsoft.Office.Interop.Word;
ApplicationClass _application = new ApplicationClass();
```
Can I get the PID from the Winword.exe process that was launched by the \_application?
I need the PID because with corrupted files, I just can't quit the ApplicationClass, even using this code:
... | 2009/05/02 | [
"https://Stackoverflow.com/questions/814936",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/98070/"
] | And on our street came the holiday!
How much blood "Word" drank from me ...
What are the ways to get a PID:
1. Get a list of processes, run WORD, get a list of processes, among which will be the desired process.
Drawback if multithreading, it will be a big problem!!!
2. Through the installation a unique name for the ... | Before you start your application, list all running Word processes, start your application, and list running Word processes again. The process found in the second list and not found in the first one is the right one:
```
var oPL1 = from proc in Process.GetProcessesByName("WINWORD") select proc.Id;
var app = new Word.A... |
48,699,388 | >
> Run-time error '52': Bad file name or number
>
>
>
I would like to ask for your help and suggestions as to why my code encounters a "run-time error '52': bad file name or number" when I am using a computer which do not really have access to the directory drive. I tried it on my personal computer and it showed ... | 2018/02/09 | [
"https://Stackoverflow.com/questions/48699388",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7910806/"
] | `Dir()` throws an error if the left part of the directory does not exist. However the `FileSystemObject` simply returns `False` without throwing an error.
```
Public Function FolderExists(ByVal Path As String) As Boolean
With CreateObject("Scripting.FileSystemObject")
FolderExists = .FolderExists(Path)
... | Going off of what [@Jeeped](https://stackoverflow.com/users/4039065/jeeped) said in your comments, use Error Handling - [[1]](http://www.cpearson.com/excel/errorhandling.htm) - [[2]](https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/on-error-statement) - [[3]](https://msdn.microsoft.co... |
50,969 | I have seen the document for libgdx and managed to move the character and also to implement bounds but the document does not show how to implement jumping.
I have downloaded the superjumper demo code but it is too confusing for me.
Is there anyone here who can guide me?
Say for example we have a spritebatch:
```
Spr... | 2013/03/13 | [
"https://gamedev.stackexchange.com/questions/50969",
"https://gamedev.stackexchange.com",
"https://gamedev.stackexchange.com/users/27372/"
] | >
> **NOTE:**
> Apparently, in libgdx, the origin is at the lower left corner of the
> screen. You should switch "IncreaseYCoordinate" with
> "DecreaseYCoordinate" in your actual code.
>
>
>
Jumping, at the base, is language and framework agnostic. You should look at it that way if you wish to learn anything.
"... | For making a sprite "jump", it needs to be assigned to a box2d body. Then you can apply an linear impulse to the physic body when screen is touched.
Example :
For making the code more simplier, you can begin with inserting something like this in your render() method :
```
If (Gdx.input.isTouched()) {
Bo... |
50,969 | I have seen the document for libgdx and managed to move the character and also to implement bounds but the document does not show how to implement jumping.
I have downloaded the superjumper demo code but it is too confusing for me.
Is there anyone here who can guide me?
Say for example we have a spritebatch:
```
Spr... | 2013/03/13 | [
"https://gamedev.stackexchange.com/questions/50969",
"https://gamedev.stackexchange.com",
"https://gamedev.stackexchange.com/users/27372/"
] | >
> **NOTE:**
> Apparently, in libgdx, the origin is at the lower left corner of the
> screen. You should switch "IncreaseYCoordinate" with
> "DecreaseYCoordinate" in your actual code.
>
>
>
Jumping, at the base, is language and framework agnostic. You should look at it that way if you wish to learn anything.
"... | My advice would be to have another look at the superjumper code. The jumping code in the superjumper demo is [here](https://github.com/libgdx/libgdx/blob/master/demos/superjumper/superjumper/src/com/badlogicgames/superjumper/Bob.java).
Lines 69-79 set up jumping in response to hitting a platform or hitting a spring. I... |
166,764 | Express the vector $\vec{u} = 2\hat{i}+4\hat{j}+5\hat{k}$ as a sum of a vector $\vec{a}$ parallel to $\vec{v}=2\hat{i}-\hat{j}-2\hat{k}$ and a vector $\vec{b}$ perpendicular to $\vec{v}$. | 2012/07/04 | [
"https://math.stackexchange.com/questions/166764",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/34359/"
] | To show that $1$ is not even:
I assume you can prove or accept that $a \cdot 0 = 0$ for all $a \in \mathbb{Z}$, the product of a positive and negative number is negative, and $2a > a$ when $a >0$.
If $1$ is even, then there must exists $a < 1$ such that $2a = 1$. However, the only $a < 1$, which is an integer, is $0... | **Hint** $\ $ Your induction step uses $\rm\:n\,$ even $\rm\,\Rightarrow\: n\!+\!1\:$ odd, and $\rm\:n\,$ odd $\rm\,\Rightarrow\:n\!+\!1\:$ even. The converses are both true, e.g. $\rm\,n\!+\!1\,$ odd $\,\Rightarrow$ $\rm\,n\!+\!1 = 2k\!+\!1\,$ $\Rightarrow$ $\rm\,n = 2k,\,$ since $\rm\,j\!+\!1 = k\!+\!1\,$ $\Rightarro... |
38,532,644 | I have two tables like below:
`users` table:
```
id - fname - lname
```
`users_projects` table:
```
id - user_id - title
```
my models are inside a directory called `Models`:
`Users` model :
```
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Users extends Model
{
//
public funct... | 2016/07/22 | [
"https://Stackoverflow.com/questions/38532644",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3369042/"
] | I think you may have your relationships set up a little wrong. If a user can have more than one project, in your user model ...
```
public function usersProjects()
{
return $this->hasMany(UsersProjects::class);
}
```
You might want to use a little simpler naming too ...
```
public function Projects()
{
retu... | Could you specify the relationships between the tables? (one to one, one to many) at first sight, I think that the relations are wrong |
30,432,506 | I have a table that contains data that needs to be checked periodically throughout the day in order to ensure that it is being updated properly.
Every single day this table should be inserted with data like so:
```
CORRECT
| Date | Unit | Paid |
| 1/1/12 | Unit A | YES |
| 1/1/12 | Unit B | YES ... | 2015/05/25 | [
"https://Stackoverflow.com/questions/30432506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2472753/"
] | You can use a [Tally Table](http://www.sqlservercentral.com/articles/T-SQL/62867/) to generate all combinations of `Date` and `Unit`. After you get all the combinations, you can use `NOT EXISTS` to get the missing data.
[**SQL Fiddle**](http://sqlfiddle.com/#!6/e3e88/3/0)
```
DECLARE @minDate AS DATE
DECLARE @maxDate... | Well, in that case I would probably do something like this:
```
DECLARE @FromDate date, @ToDate date
-- Or you can use Max and Min date from your table
SELECT @FromDate = '2015-01-01',
@ToDate = '2015-01-07'
-- use a recursive cte to get all the dates between from date and to date
;With CTE AS (
SELECT @Fr... |
5,515,280 | i am able to connect but my connection is not working. i am making a window base app , which delete the data from table in database and return a value. connection is done, but its not deleting any data or returning the value. MY code is:
For example
Connectionname DAC; :: Create connection
DAC = new Connectioinname... | 2011/04/01 | [
"https://Stackoverflow.com/questions/5515280",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/643092/"
] | First you need a page to load a url from the webserver controller which generates the image:
```
<img src="/matplot/makegraph?arg1=foo" />
```
Then, embed the matplotlib code into the `makegraph` controller. You just need to capture the canvas rendered PNG in a memory buffer, then create an HTTP response and write t... | Just to update for python3
>
> The StringIO and cStringIO modules are gone. Instead, import the io
> module and use io.StringIO
> <https://docs.python.org/3.5/whatsnew/3.0.html?highlight=cstringio>
>
>
>
So now would be something like:
```
import io
from matplotlib.figure import Figure
from matplotlib im... |
17,248,671 | Using fitBounds function of Google Map API v3 always makes the bound smaller than the canvas size as follwing:
```
gMap.fitBounds(bounds);
new google.maps.Rectangle({
strokeColor: '#0000FF',
strokeOpacity: 0.8,
strokeWeight: 1,
fillColor: ... | 2013/06/22 | [
"https://Stackoverflow.com/questions/17248671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/746537/"
] | `protected` really allows any class in the inheritance chain access. There's only one case really where a child property or method would/should be accessed by a parent: the parent declares and calls a `protected` method and the child *overrides* it.
```
class Foo {
public function bar() {
$this->baz();
... | Protected can be access from the class that defines it any any inherited classes.
For example
```
class test {
protected function foo() {
}
public function foobar() {
$this->foo(); //is allowed here
}
}
class testa extends test {
public function bar() {
$this->foo()... |
48,374,869 | I have found a great relational database on internet. It's look about trains and plane ticketing booking. here's the image
[relationship database](https://i.stack.imgur.com/GN3M3.png)
My goal is, create real database based on that image. When I start analyze the Database pict, I bit confused with the Passenger and Cu... | 2018/01/22 | [
"https://Stackoverflow.com/questions/48374869",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9249697/"
] | The line in your code that is comparing elements is this one:
```
if self[i] > self[i + 1]
```
With this logic, you swap if the first element is higher than the second, meaning your result will be sorted in ascending order.
You can replace it as follows:
```
if prc.call(self[i], self[i + 1]) == 1
```
and then ca... | Try to the following:
```
# ....
for i in 0...len
condition =
if block_given?
yield(self[i], self[i + 1]).positive?
else
self[i] > self[i + 1]
end
if condition
self[i], self[i + 1] = self[i + 1], self[i]
swapped = true
end
end
# ....
# Usage:
my_array.bubble_sort!
my_array.bubbl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.