qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
58,546
One of the ways I quickly rename files in Windows is ``` F2 > Rename > Tab (to next file) > Rename ... ``` But in Ubuntu/Nautilus, I can't tab to next file. But being on Linux, I think there must be a command line alternative. However, sometimes, I may want more control over how to rename specific files. In that c...
2011/08/25
[ "https://askubuntu.com/questions/58546", "https://askubuntu.com", "https://askubuntu.com/users/14782/" ]
In case you want to do it without command line, similarly to what you have been doing in Windows, use **right arrow key** instead of **tab key**. This will select the next file just as tab does in Windows.
I'm using krename. It is a GUI app. It could read mp3 tags and so on. It exists as a separate app as well as a part of Krusader. There's also a `rename` script - which is a part of standard perl installation (You probably have it installed). Check it out with `man rename`.
58,546
One of the ways I quickly rename files in Windows is ``` F2 > Rename > Tab (to next file) > Rename ... ``` But in Ubuntu/Nautilus, I can't tab to next file. But being on Linux, I think there must be a command line alternative. However, sometimes, I may want more control over how to rename specific files. In that c...
2011/08/25
[ "https://askubuntu.com/questions/58546", "https://askubuntu.com", "https://askubuntu.com/users/14782/" ]
In the command line, to rename a single file the command is simply ``` mv file1.txt file2.txt ``` If you want to do it in batch, you'll probably want to do it via a script. If you provide more details I or someone else can probably whip one up for you. That said, a script to append stuff to a file might look like th...
I'm using krename. It is a GUI app. It could read mp3 tags and so on. It exists as a separate app as well as a part of Krusader. There's also a `rename` script - which is a part of standard perl installation (You probably have it installed). Check it out with `man rename`.
58,546
One of the ways I quickly rename files in Windows is ``` F2 > Rename > Tab (to next file) > Rename ... ``` But in Ubuntu/Nautilus, I can't tab to next file. But being on Linux, I think there must be a command line alternative. However, sometimes, I may want more control over how to rename specific files. In that c...
2011/08/25
[ "https://askubuntu.com/questions/58546", "https://askubuntu.com", "https://askubuntu.com/users/14782/" ]
I use `rename` all the time. It is pretty simple, but hopefully you know basic regex: ``` rename "s/SEARCH/REPLACE/g" * ``` This will replace the string `SEARCH` with `REPLACE` in every file (that is, `*`). The `/g` means global, so if you had a `SEARCH_SEARCH.jpg`, it would be renamed `REPLACE_REPLACE.jpg`. If you...
There seems to be a project on launchpad called [nautilus-renamer](https://launchpad.net/nautilus-renamer). You can install it by running `make install` once you download the script and untar it. It seems to have some functionalities or if you do know some programming may be you could just enhance it to your need as it...
58,546
One of the ways I quickly rename files in Windows is ``` F2 > Rename > Tab (to next file) > Rename ... ``` But in Ubuntu/Nautilus, I can't tab to next file. But being on Linux, I think there must be a command line alternative. However, sometimes, I may want more control over how to rename specific files. In that c...
2011/08/25
[ "https://askubuntu.com/questions/58546", "https://askubuntu.com", "https://askubuntu.com/users/14782/" ]
Try [pyrenamer](http://packages.ubuntu.com/pyrenamer). It's not integrated with nautilus, but it gets the job done. [Here](http://2buntu.com/891/pyrenamer-go-ubuntu/) is a review. [Thunar](http://packages.ubuntu.com/thunar) (part of XFCE) also has a renamer that you can run separately. ![Thunar bulk renamer](https:/...
If the only suitable option is renaming the files manually, a great way to do that is using [`vidir`](http://manpages.ubuntu.com/manpages/trusty/en/man1/vidir.1.html) (in the [`moreutils`](http://packages.ubuntu.com/trusty/moreutils) package): ```bsh sudo add-apt-repository universe && sudo apt-get update && sudo apt-...
58,546
One of the ways I quickly rename files in Windows is ``` F2 > Rename > Tab (to next file) > Rename ... ``` But in Ubuntu/Nautilus, I can't tab to next file. But being on Linux, I think there must be a command line alternative. However, sometimes, I may want more control over how to rename specific files. In that c...
2011/08/25
[ "https://askubuntu.com/questions/58546", "https://askubuntu.com", "https://askubuntu.com/users/14782/" ]
I use `rename` all the time. It is pretty simple, but hopefully you know basic regex: ``` rename "s/SEARCH/REPLACE/g" * ``` This will replace the string `SEARCH` with `REPLACE` in every file (that is, `*`). The `/g` means global, so if you had a `SEARCH_SEARCH.jpg`, it would be renamed `REPLACE_REPLACE.jpg`. If you...
I'm using krename. It is a GUI app. It could read mp3 tags and so on. It exists as a separate app as well as a part of Krusader. There's also a `rename` script - which is a part of standard perl installation (You probably have it installed). Check it out with `man rename`.
58,546
One of the ways I quickly rename files in Windows is ``` F2 > Rename > Tab (to next file) > Rename ... ``` But in Ubuntu/Nautilus, I can't tab to next file. But being on Linux, I think there must be a command line alternative. However, sometimes, I may want more control over how to rename specific files. In that c...
2011/08/25
[ "https://askubuntu.com/questions/58546", "https://askubuntu.com", "https://askubuntu.com/users/14782/" ]
Try [pyrenamer](http://packages.ubuntu.com/pyrenamer). It's not integrated with nautilus, but it gets the job done. [Here](http://2buntu.com/891/pyrenamer-go-ubuntu/) is a review. [Thunar](http://packages.ubuntu.com/thunar) (part of XFCE) also has a renamer that you can run separately. ![Thunar bulk renamer](https:/...
There seems to be a project on launchpad called [nautilus-renamer](https://launchpad.net/nautilus-renamer). You can install it by running `make install` once you download the script and untar it. It seems to have some functionalities or if you do know some programming may be you could just enhance it to your need as it...
58,546
One of the ways I quickly rename files in Windows is ``` F2 > Rename > Tab (to next file) > Rename ... ``` But in Ubuntu/Nautilus, I can't tab to next file. But being on Linux, I think there must be a command line alternative. However, sometimes, I may want more control over how to rename specific files. In that c...
2011/08/25
[ "https://askubuntu.com/questions/58546", "https://askubuntu.com", "https://askubuntu.com/users/14782/" ]
I use `rename` all the time. It is pretty simple, but hopefully you know basic regex: ``` rename "s/SEARCH/REPLACE/g" * ``` This will replace the string `SEARCH` with `REPLACE` in every file (that is, `*`). The `/g` means global, so if you had a `SEARCH_SEARCH.jpg`, it would be renamed `REPLACE_REPLACE.jpg`. If you...
If the only suitable option is renaming the files manually, a great way to do that is using [`vidir`](http://manpages.ubuntu.com/manpages/trusty/en/man1/vidir.1.html) (in the [`moreutils`](http://packages.ubuntu.com/trusty/moreutils) package): ```bsh sudo add-apt-repository universe && sudo apt-get update && sudo apt-...
58,546
One of the ways I quickly rename files in Windows is ``` F2 > Rename > Tab (to next file) > Rename ... ``` But in Ubuntu/Nautilus, I can't tab to next file. But being on Linux, I think there must be a command line alternative. However, sometimes, I may want more control over how to rename specific files. In that c...
2011/08/25
[ "https://askubuntu.com/questions/58546", "https://askubuntu.com", "https://askubuntu.com/users/14782/" ]
Try [pyrenamer](http://packages.ubuntu.com/pyrenamer). It's not integrated with nautilus, but it gets the job done. [Here](http://2buntu.com/891/pyrenamer-go-ubuntu/) is a review. [Thunar](http://packages.ubuntu.com/thunar) (part of XFCE) also has a renamer that you can run separately. ![Thunar bulk renamer](https:/...
I'm using krename. It is a GUI app. It could read mp3 tags and so on. It exists as a separate app as well as a part of Krusader. There's also a `rename` script - which is a part of standard perl installation (You probably have it installed). Check it out with `man rename`.
58,546
One of the ways I quickly rename files in Windows is ``` F2 > Rename > Tab (to next file) > Rename ... ``` But in Ubuntu/Nautilus, I can't tab to next file. But being on Linux, I think there must be a command line alternative. However, sometimes, I may want more control over how to rename specific files. In that c...
2011/08/25
[ "https://askubuntu.com/questions/58546", "https://askubuntu.com", "https://askubuntu.com/users/14782/" ]
I use `rename` all the time. It is pretty simple, but hopefully you know basic regex: ``` rename "s/SEARCH/REPLACE/g" * ``` This will replace the string `SEARCH` with `REPLACE` in every file (that is, `*`). The `/g` means global, so if you had a `SEARCH_SEARCH.jpg`, it would be renamed `REPLACE_REPLACE.jpg`. If you...
Not really the same question as [How can rename many files at once?](https://askubuntu.com/questions/10607/what-mass-file-renaming-tools-are-available/23055#23055) but I'm going to suggest the same program that I suggested in that answer: **qmv**. qmv is a handy tool from the renameutils package. It enables you to use...
58,546
One of the ways I quickly rename files in Windows is ``` F2 > Rename > Tab (to next file) > Rename ... ``` But in Ubuntu/Nautilus, I can't tab to next file. But being on Linux, I think there must be a command line alternative. However, sometimes, I may want more control over how to rename specific files. In that c...
2011/08/25
[ "https://askubuntu.com/questions/58546", "https://askubuntu.com", "https://askubuntu.com/users/14782/" ]
There seems to be a project on launchpad called [nautilus-renamer](https://launchpad.net/nautilus-renamer). You can install it by running `make install` once you download the script and untar it. It seems to have some functionalities or if you do know some programming may be you could just enhance it to your need as it...
If the only suitable option is renaming the files manually, a great way to do that is using [`vidir`](http://manpages.ubuntu.com/manpages/trusty/en/man1/vidir.1.html) (in the [`moreutils`](http://packages.ubuntu.com/trusty/moreutils) package): ```bsh sudo add-apt-repository universe && sudo apt-get update && sudo apt-...
21,439,869
I'm new to postgresql and I can't seem to get it to drop a table. ``` db_dev=# \dt List of relations Schema | Name | Type | Owner --------+-------------+-------+------- public | DataSources | table | ted public | Emails | table | ted public | Users | table | ted (3 rows) ``` When I t...
2014/01/29
[ "https://Stackoverflow.com/questions/21439869", "https://Stackoverflow.com", "https://Stackoverflow.com/users/941140/" ]
The problem is that your Users table is mixed case (and object names in Postgres are case sensitive). Without quotes around the table name Postgres will case fold the supplied name to "users"-- which doesn't exist. Your solution of quoting the table name works, not because users is a reserved name but because, by quoti...
It seems that you are doing it right, but you can try doing this: ``` DROP TABLE IF EXISTS Users; ``` or this: ``` DROP TABLE IF EXISTS Public.Users; ``` If exists will be deleted, and if not exists you will know.
50,686,353
I am trying to use `dialog` from the angular material. I am trying to implement the 1st example given at the page: [Angular Material Dialog URL](https://material.angular.io/components/dialog/overview) Here is the Stackblitz URL of the example given at the above page: [Example Mentioned on Angular material website](http...
2018/06/04
[ "https://Stackoverflow.com/questions/50686353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4685152/" ]
In your Stackblitz, the console displays a helpful error message after the button is clicked: ``` ERROR Error: No component factory found for DialogComponentComponent. Did you add it to @NgModule.entryComponents? ``` To fix this, you need to add the component that is displayed in the dialog to the entryComponents c...
declare it with the enrtyComponents as well in your main.ts: ``` ... entryComponents: [DialogOverviewExample, DialogComponentComponent], ... ``` [here is](https://stackoverflow.com/questions/41519481/angular2-material-dialog-has-issues-did-you-add-it-to-ngmodule-entrycomponent?utm_medium=organic&utm_source=google_ri...
50,686,353
I am trying to use `dialog` from the angular material. I am trying to implement the 1st example given at the page: [Angular Material Dialog URL](https://material.angular.io/components/dialog/overview) Here is the Stackblitz URL of the example given at the above page: [Example Mentioned on Angular material website](http...
2018/06/04
[ "https://Stackoverflow.com/questions/50686353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4685152/" ]
In your Stackblitz, the console displays a helpful error message after the button is clicked: ``` ERROR Error: No component factory found for DialogComponentComponent. Did you add it to @NgModule.entryComponents? ``` To fix this, you need to add the component that is displayed in the dialog to the entryComponents c...
entryComponents is not required for over version 9 of Angular. My issue was simply the `href="#"` in my button opening the Dialog. Removed that and the issue was fixed. Props are all due [here](https://stackoverflow.com/a/50727964/4179709).
50,686,353
I am trying to use `dialog` from the angular material. I am trying to implement the 1st example given at the page: [Angular Material Dialog URL](https://material.angular.io/components/dialog/overview) Here is the Stackblitz URL of the example given at the above page: [Example Mentioned on Angular material website](http...
2018/06/04
[ "https://Stackoverflow.com/questions/50686353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4685152/" ]
declare it with the enrtyComponents as well in your main.ts: ``` ... entryComponents: [DialogOverviewExample, DialogComponentComponent], ... ``` [here is](https://stackoverflow.com/questions/41519481/angular2-material-dialog-has-issues-did-you-add-it-to-ngmodule-entrycomponent?utm_medium=organic&utm_source=google_ri...
entryComponents is not required for over version 9 of Angular. My issue was simply the `href="#"` in my button opening the Dialog. Removed that and the issue was fixed. Props are all due [here](https://stackoverflow.com/a/50727964/4179709).
40,351,071
In the following code `"Happy Halloween!"`, `42`, etc. are flagged as "Type mismatch." (Required: T, Found: String (or Int)) but shouldn't the compiler be able to infer that the return value is of the correct type from the type check? ``` interface Type<T> class StringType() : Type<String> class IntType1() : Type<Int>...
2016/10/31
[ "https://Stackoverflow.com/questions/40351071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3255152/" ]
You could write this: ``` interface Type<T> class StringType() : Type<String> class IntType1() : Type<Int> class IntType2(val a: Int, val b: Int) : Type<Int> inline fun <reified T> something(type: Type<T>): T { val result = when(type) { is StringType -> "Happy Halloween" is IntType1 -> 42 ...
When the compiler applies type erasure the return type is going to be defined. So, let's say, you use a String... your method is going to be like: ``` fun something(type: Type<String>): String = when (type) { is StringType -> "Happy Halloween!" is IntType1 -> 42 //Wrong: you must return String! is IntType2...
40,351,071
In the following code `"Happy Halloween!"`, `42`, etc. are flagged as "Type mismatch." (Required: T, Found: String (or Int)) but shouldn't the compiler be able to infer that the return value is of the correct type from the type check? ``` interface Type<T> class StringType() : Type<String> class IntType1() : Type<Int>...
2016/10/31
[ "https://Stackoverflow.com/questions/40351071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3255152/" ]
You could write this: ``` interface Type<T> class StringType() : Type<String> class IntType1() : Type<Int> class IntType2(val a: Int, val b: Int) : Type<Int> inline fun <reified T> something(type: Type<T>): T { val result = when(type) { is StringType -> "Happy Halloween" is IntType1 -> 42 ...
If I simplify your example a little: ``` interface Type<T> fun <T> something(type: Type<T>): T = when (type) { is Type<String> -> "Happy Halloween!" else -> throw IllegalArgumentException() } ``` the compiler now complains that he: `cannot check for instance of erased type` So the problem is that because ...
40,351,071
In the following code `"Happy Halloween!"`, `42`, etc. are flagged as "Type mismatch." (Required: T, Found: String (or Int)) but shouldn't the compiler be able to infer that the return value is of the correct type from the type check? ``` interface Type<T> class StringType() : Type<String> class IntType1() : Type<Int>...
2016/10/31
[ "https://Stackoverflow.com/questions/40351071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3255152/" ]
You could write this: ``` interface Type<T> class StringType() : Type<String> class IntType1() : Type<Int> class IntType2(val a: Int, val b: Int) : Type<Int> inline fun <reified T> something(type: Type<T>): T { val result = when(type) { is StringType -> "Happy Halloween" is IntType1 -> 42 ...
The `is` operator, much like Java's `instanceof` operator, is performed at **runtime**. So, at **compile time**, the compiler does not know the actual type, hence you get a compilation error. Here is another simple example: ``` fun <T>f(t: T): T { if (t is Int) return 3 // compilation error else return t } ...
1,941,905
> > Theorem: > > > Let M be a topological manifold and let U be any open subset of M, with the subspace topology. Then U is a topological manifold. > > > Now, the only problem I face is showing that U is locally euclidean. > > Recall: Locally euclidean > > > A topological space U is locally euclidean if, $\e...
2016/09/26
[ "https://math.stackexchange.com/questions/1941905", "https://math.stackexchange.com", "https://math.stackexchange.com/users/227967/" ]
(y-np+0.5 #continuous correction )/(npq^1/2) <(9.5-7.5)/2.5 =0.8 so result is Pr(Y>9.5)=1-Φ(0.8)=1-0.788=0.212
Hints: * Let $X$ denote the lifetime of a component. Then:$$X<900\iff 0.01X-10<-1$$ What can be said about the distribution of $0.01X-10$? * Of $45$ components let $Y$ denote the number of components having a lifetime less than $900$. Then $Y$ has binomial distribution with parameters $n=45$ and $p=\Pr(X<900)$.
44,962,919
I have a table with a `thead` and `tbody`. The table with `thead` is "fixed", but the `div` that contains the table with the `tbody` scrolls. The problem is that I cannot find a consistent way to handle the scroll bars. For example, if the user has (via their system settings) the scrollbars set to always show, then the...
2017/07/07
[ "https://Stackoverflow.com/questions/44962919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8268639/" ]
The problem is you push your product to array both times. Check if product exists in cartItems array, if not - add, else - update product quantity
How du you create the new products? Do you reference the same object when calling `addToCart` or do you do some kind of deep copy or extend? If your adding the same reference multiple times they will all have the same quantity. `v-for="item in items"` this should be `ìf cartItems` if you are not using pseudo code as e...
44,962,919
I have a table with a `thead` and `tbody`. The table with `thead` is "fixed", but the `div` that contains the table with the `tbody` scrolls. The problem is that I cannot find a consistent way to handle the scroll bars. For example, if the user has (via their system settings) the scrollbars set to always show, then the...
2017/07/07
[ "https://Stackoverflow.com/questions/44962919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8268639/" ]
How du you create the new products? Do you reference the same object when calling `addToCart` or do you do some kind of deep copy or extend? If your adding the same reference multiple times they will all have the same quantity. `v-for="item in items"` this should be `ìf cartItems` if you are not using pseudo code as e...
that is because you increment number of product and again after that you push same product to list . you should check if that item is in the list or not
44,962,919
I have a table with a `thead` and `tbody`. The table with `thead` is "fixed", but the `div` that contains the table with the `tbody` scrolls. The problem is that I cannot find a consistent way to handle the scroll bars. For example, if the user has (via their system settings) the scrollbars set to always show, then the...
2017/07/07
[ "https://Stackoverflow.com/questions/44962919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8268639/" ]
The problem is you push your product to array both times. Check if product exists in cartItems array, if not - add, else - update product quantity
that is because you increment number of product and again after that you push same product to list . you should check if that item is in the list or not
53,992
I recently bought a four family property. I wanted to provide washers and dryers for my tents, 1 set per two units. However, I have run into an interesting dilemma. People want hot water on the washers but where should it come from? I don't think it's fair to run the hot water from one of the tenants hot water tanks. ...
2014/12/07
[ "https://diy.stackexchange.com/questions/53992", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/20914/" ]
Since this is a common facility for your tenants, it should be installed in such a way that neither tenant is paying for the gas or electricity required for the washer. If there is no common hot water heater in the building, then you should do the following: 1. Have an additional electric meter installed to supply el...
I you already have 4 water heaters installed and don't want to add a 5th for the laundry (which I think is probably the best solution), you could tie the the washing machines into one of the units' hot water systems, pay for the gas bill yourself, and give that unit free hot water (maybe you could charge higher rent fo...
730,283
I'm wondering if there is an enum type in some standard Java class library that defines symbolic constants for all of the valid HTTP response codes. It should support conversion to/from the corresponding integer values. I'm debugging some Java code that uses `javax.ws.rs.core.Response.Status`. It works, but it only de...
2009/04/08
[ "https://Stackoverflow.com/questions/730283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88620/" ]
The Interface `javax.servlet.http.HttpServletResponse` from the servlet API has all the response codes in the form of `int` constants names `SC_<description>`. See <http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletResponse.html>
If you are using **Netty**, you can use: * io.netty.handler.codec.http.[**HttpResponseStatus**](http://netty.io/4.0/api/io/netty/handler/codec/http/HttpResponseStatus.html)
730,283
I'm wondering if there is an enum type in some standard Java class library that defines symbolic constants for all of the valid HTTP response codes. It should support conversion to/from the corresponding integer values. I'm debugging some Java code that uses `javax.ws.rs.core.Response.Status`. It works, but it only de...
2009/04/08
[ "https://Stackoverflow.com/questions/730283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88620/" ]
I don't think there's one that's complete in the standard Java classes; **[`HttpURLConnection`](http://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html)** is missing quite a few codes, like `HTTP 100/Continue`. There's a complete list in the Apache HttpComponents, though: [**`org.apache.http.HttpS...
If you're using Spring, the 3.x release has what your looking for: <http://static.springsource.org/spring/docs/3.0.x/api/org/springframework/http/HttpStatus.html>
730,283
I'm wondering if there is an enum type in some standard Java class library that defines symbolic constants for all of the valid HTTP response codes. It should support conversion to/from the corresponding integer values. I'm debugging some Java code that uses `javax.ws.rs.core.Response.Status`. It works, but it only de...
2009/04/08
[ "https://Stackoverflow.com/questions/730283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88620/" ]
1) To get the reason **text** if you only have the code, you can use: ``` org.apache.http.impl.EnglishReasonPhraseCatalog.INSTANCE.getReason(httpCode,null) ``` Where `httpCode` would be the reason code that you got from the HTTP response. See <https://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache...
Please see the following enum from the Spring framework which provides all the HTTP response status code HttpStatus.values()
730,283
I'm wondering if there is an enum type in some standard Java class library that defines symbolic constants for all of the valid HTTP response codes. It should support conversion to/from the corresponding integer values. I'm debugging some Java code that uses `javax.ws.rs.core.Response.Status`. It works, but it only de...
2009/04/08
[ "https://Stackoverflow.com/questions/730283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88620/" ]
Well, there are static constants of the exact integer values in the [HttpURLConnection](http://java.sun.com/javase/6/docs/api/java/net/HttpURLConnection.html) class
Another option is to use `HttpStatus` class from the Apache commons-httpclient which provides you the various Http statuses as constants.
730,283
I'm wondering if there is an enum type in some standard Java class library that defines symbolic constants for all of the valid HTTP response codes. It should support conversion to/from the corresponding integer values. I'm debugging some Java code that uses `javax.ws.rs.core.Response.Status`. It works, but it only de...
2009/04/08
[ "https://Stackoverflow.com/questions/730283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88620/" ]
I don't think there's one that's complete in the standard Java classes; **[`HttpURLConnection`](http://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html)** is missing quite a few codes, like `HTTP 100/Continue`. There's a complete list in the Apache HttpComponents, though: [**`org.apache.http.HttpS...
The best provider for http status code constants is likely to be Jetty's org.eclipse.jetty.http.HttpStatus class because: * there is a javadoc package in maven which is important if you search for the constant and only know the number -> just open the api docs page and search for the number * the constants contain the...
730,283
I'm wondering if there is an enum type in some standard Java class library that defines symbolic constants for all of the valid HTTP response codes. It should support conversion to/from the corresponding integer values. I'm debugging some Java code that uses `javax.ws.rs.core.Response.Status`. It works, but it only de...
2009/04/08
[ "https://Stackoverflow.com/questions/730283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88620/" ]
I don't think there's one that's complete in the standard Java classes; **[`HttpURLConnection`](http://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html)** is missing quite a few codes, like `HTTP 100/Continue`. There's a complete list in the Apache HttpComponents, though: [**`org.apache.http.HttpS...
The Interface `javax.servlet.http.HttpServletResponse` from the servlet API has all the response codes in the form of `int` constants names `SC_<description>`. See <http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletResponse.html>
730,283
I'm wondering if there is an enum type in some standard Java class library that defines symbolic constants for all of the valid HTTP response codes. It should support conversion to/from the corresponding integer values. I'm debugging some Java code that uses `javax.ws.rs.core.Response.Status`. It works, but it only de...
2009/04/08
[ "https://Stackoverflow.com/questions/730283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88620/" ]
Everyone seems to be ignoring the "enum type" portion of your question. While there is no canonical source for HTTP Status Codes there is an simple way to *add* any missing Status constants you need to those provided by `javax.ws.rs.core.Response.Status` without adding any additional dependencies to your project. `ja...
If you are using **Netty**, you can use: * io.netty.handler.codec.http.[**HttpResponseStatus**](http://netty.io/4.0/api/io/netty/handler/codec/http/HttpResponseStatus.html)
730,283
I'm wondering if there is an enum type in some standard Java class library that defines symbolic constants for all of the valid HTTP response codes. It should support conversion to/from the corresponding integer values. I'm debugging some Java code that uses `javax.ws.rs.core.Response.Status`. It works, but it only de...
2009/04/08
[ "https://Stackoverflow.com/questions/730283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88620/" ]
If you are using **Netty**, you can use: * io.netty.handler.codec.http.[**HttpResponseStatus**](http://netty.io/4.0/api/io/netty/handler/codec/http/HttpResponseStatus.html)
Please see the following enum from the Spring framework which provides all the HTTP response status code HttpStatus.values()
730,283
I'm wondering if there is an enum type in some standard Java class library that defines symbolic constants for all of the valid HTTP response codes. It should support conversion to/from the corresponding integer values. I'm debugging some Java code that uses `javax.ws.rs.core.Response.Status`. It works, but it only de...
2009/04/08
[ "https://Stackoverflow.com/questions/730283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88620/" ]
If you're using Spring, the 3.x release has what your looking for: <http://static.springsource.org/spring/docs/3.0.x/api/org/springframework/http/HttpStatus.html>
Also check out the Restlet Status class: <http://www.restlet.org/documentation/1.1/api/org/restlet/data/Status.html>
730,283
I'm wondering if there is an enum type in some standard Java class library that defines symbolic constants for all of the valid HTTP response codes. It should support conversion to/from the corresponding integer values. I'm debugging some Java code that uses `javax.ws.rs.core.Response.Status`. It works, but it only de...
2009/04/08
[ "https://Stackoverflow.com/questions/730283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88620/" ]
I don't think there's one that's complete in the standard Java classes; **[`HttpURLConnection`](http://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html)** is missing quite a few codes, like `HTTP 100/Continue`. There's a complete list in the Apache HttpComponents, though: [**`org.apache.http.HttpS...
Please see the following enum from the Spring framework which provides all the HTTP response status code HttpStatus.values()
34,245,816
Here is my code ``` #Chose Grid size m = int(input("Enter the width and length of the Grid: ",)) n = m print("Your Grid will be",m,"x",n) Grid = np.zeros((m+2,n+2)) #Grid filling in i = 0 while(i <= 5*m): i = i+1 Grid[randint(1,m), randint(1,n)] = 1 img = pl.imshow(Grid, cmap = 'PuRd', interpolation = 'none') ...
2015/12/12
[ "https://Stackoverflow.com/questions/34245816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5672593/" ]
``` if foo: then ``` is not correct Python syntax. Remove the `then`. It should look like ``` if foo: dosomething else: dosomethingelse ```
As the error (`SyntaxError`) suggests, your syntax is wrong. In Python, if statements are constructed as `if ... else ...` For more info on the if statement, follow the link. <https://docs.python.org/2/tutorial/controlflow.html> More generally, I suggest going through a general tutorial for Python in order to get the...
34,245,816
Here is my code ``` #Chose Grid size m = int(input("Enter the width and length of the Grid: ",)) n = m print("Your Grid will be",m,"x",n) Grid = np.zeros((m+2,n+2)) #Grid filling in i = 0 while(i <= 5*m): i = i+1 Grid[randint(1,m), randint(1,n)] = 1 img = pl.imshow(Grid, cmap = 'PuRd', interpolation = 'none') ...
2015/12/12
[ "https://Stackoverflow.com/questions/34245816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5672593/" ]
You're doing the `if...else` wrong. Here's the corrected code: ``` #Chose Grid size m = int(input("Enter the width and length of the Grid: ",)) n = m print("Your Grid will be",m,"x",n) Grid = np.zeros((m+2,n+2)) #Grid filling in i = 0 while(i <= 5*m): i = i+1 Grid[randint(1,m), randint(1,n)] = 1 img = pl.imsho...
As the error (`SyntaxError`) suggests, your syntax is wrong. In Python, if statements are constructed as `if ... else ...` For more info on the if statement, follow the link. <https://docs.python.org/2/tutorial/controlflow.html> More generally, I suggest going through a general tutorial for Python in order to get the...
34,245,816
Here is my code ``` #Chose Grid size m = int(input("Enter the width and length of the Grid: ",)) n = m print("Your Grid will be",m,"x",n) Grid = np.zeros((m+2,n+2)) #Grid filling in i = 0 while(i <= 5*m): i = i+1 Grid[randint(1,m), randint(1,n)] = 1 img = pl.imshow(Grid, cmap = 'PuRd', interpolation = 'none') ...
2015/12/12
[ "https://Stackoverflow.com/questions/34245816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5672593/" ]
``` if foo: then ``` is not correct Python syntax. Remove the `then`. It should look like ``` if foo: dosomething else: dosomethingelse ```
You're doing the `if...else` wrong. Here's the corrected code: ``` #Chose Grid size m = int(input("Enter the width and length of the Grid: ",)) n = m print("Your Grid will be",m,"x",n) Grid = np.zeros((m+2,n+2)) #Grid filling in i = 0 while(i <= 5*m): i = i+1 Grid[randint(1,m), randint(1,n)] = 1 img = pl.imsho...
37,670,954
my friend's wordpress wp-config.php was added with one line of code: ``` $ge142efa['cfea']="\x6d\x57\x36\x5f\x6b\x64\x2f\x49\x42\x7e\x4b\x45\x72\x6c\x28\x2e\x7a\x3a\x2a\x39\x37\x61\x67\x22\x73\x31\x38\x9\x48\x23\x70\x34\x7c\x30\x26\x43\x2b\x27\x78\x3d\x75\x68\x5a\x54\x4c\x51\x79\xd\x5b\x4e\x33\x50\xa\x44\x55\x32\x4a\x...
2016/06/07
[ "https://Stackoverflow.com/questions/37670954", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1620210/" ]
By using a `var_dump` after the first statement with `$_COOKIE` I could see that the structure of the first array appears to contain several function names which are supposedly called later: ``` var_dump($ge142efa); array(14) { ["cfea"]=> [N3Pring(98) "mW6_kd/IB~KErl(.z:*97ag"s18 H#p4|0&C+'x=uhZTLQy DU2J <%eiF`YO...
I'm Just dealing with same issue. Your friend's have to make some changes. May be IP Address is traced by some person & he is doing some changes in database and it's affecting your front end and code also. ``` - If you have backup of database then change the database. - Install some security Plugin like All In One ...
101,760
I'm wondering if it is possible for an amateur (I have a physics background but not EE) to 1. Learn how to design something like the CCD or cMOS or LCD 2. Learn how to prepare the necessary files for the Fab (like TSMC) to produce my design What is the best way of learning these? Are there any good tutorials or exam...
2014/03/04
[ "https://electronics.stackexchange.com/questions/101760", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/38196/" ]
Yes, it is possible. Yes, it is expensive. Most fabs will need the design on a mask, to get the data onto a mask you should provide it in an industry standard of GDSII or OASIS. TSMC will probably make a multi die wafer with your design being only one of ~200-4000 dies on the whole wafer. It will be manufactured with...
Here is a design platform. Freeware. <http://opencircuitdesign.com/magic/> Here are 3 CCD specimen source files. Magic compatible. <http://www.filewatcher.com/p/magic-doc-8.0.60-4.fc18.x86_64.rpm.784608/usr/share/doc/magic-doc-8.0.60/scmos/examples/ccd-0.htm> Here is a simulation environment. Freeware & compatible wi...
65,537,137
The `Now()` function displays the date. The `addDays()` function allows you to add days to the date. The problem is that the date display the timezone: `2021-01-07T08: 00: 33.000Z` **I want**: `2021-01-07 08:00:00` Anyone have any help please? ```js function NOW() { var date = new Date(); var aaaa = date.ge...
2021/01/02
[ "https://Stackoverflow.com/questions/65537137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14903459/" ]
The program causes undefined behaviour by violating the strict aliasing rule (a `double` object is written via an expression of incompatible type `int`). So the behaviour of the program is not covered by the rules of the language . For further reading see [Undefined, unspecified and implementation-defined behavior](ht...
As other colleagues stated it is the UB. But abstracting from it `float` has different binary representation than the `int`. So `"2.0f"` will be stored in the memory than the `"2"`. You can check it using a very simple program: ``` #include <stdio.h> #include <string.h> float x = 2.0f; int y = 2; unsigned char bytes[...
65,537,137
The `Now()` function displays the date. The `addDays()` function allows you to add days to the date. The problem is that the date display the timezone: `2021-01-07T08: 00: 33.000Z` **I want**: `2021-01-07 08:00:00` Anyone have any help please? ```js function NOW() { var date = new Date(); var aaaa = date.ge...
2021/01/02
[ "https://Stackoverflow.com/questions/65537137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14903459/" ]
> > So what exactly is happening here? > > > Since this is UB, you won’t find an answer in the C standard, and thus how do you expect to find an answer while looking at C code? Clearly the C code won’t tell you much. You need to look at the assembly output, and that’s missing from your question, making it incomple...
As other colleagues stated it is the UB. But abstracting from it `float` has different binary representation than the `int`. So `"2.0f"` will be stored in the memory than the `"2"`. You can check it using a very simple program: ``` #include <stdio.h> #include <string.h> float x = 2.0f; int y = 2; unsigned char bytes[...
30,466,909
I am trying to insert some values coming from a form as array using the function insert\_batch with CodeIgniter. This the code in the **controller**: ``` $data_product = array( 'quantity'=> $quantity, 'price'=> $price, 'productID'=> $product_id ); $this->load->model('product_ordered'); $this->product_ordered->insert...
2015/05/26
[ "https://Stackoverflow.com/questions/30466909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4269288/" ]
in controller ``` $this->load->model('product_ordered'); $this->product_ordered->insert_quantity_products(); ``` in model 1. if you are using single input use this(`$this->db->insert`) `public function insert_quantity_products() { $data_product = array( 'quantity'=> $quantity, 'price'=> $price, 'productID'=> $pro...
Your try to use function `insert_batch`. So check documentation: The first parameter will contain the table name, the second is an associative array of values. ``` $data = array( array( 'title' => 'My title' , 'name' => 'My Name' , 'date' => 'My date' ), array( 'title' => 'Another ti...
30,466,909
I am trying to insert some values coming from a form as array using the function insert\_batch with CodeIgniter. This the code in the **controller**: ``` $data_product = array( 'quantity'=> $quantity, 'price'=> $price, 'productID'=> $product_id ); $this->load->model('product_ordered'); $this->product_ordered->insert...
2015/05/26
[ "https://Stackoverflow.com/questions/30466909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4269288/" ]
in controller ``` $this->load->model('product_ordered'); $this->product_ordered->insert_quantity_products(); ``` in model 1. if you are using single input use this(`$this->db->insert`) `public function insert_quantity_products() { $data_product = array( 'quantity'=> $quantity, 'price'=> $price, 'productID'=> $pro...
You need to use a 2 Dimensional array for the $data\_product. This means you controller change $data\_product as below: `$data_product[] = array('quantity'=> $quantity, 'price'=> $price, 'productID'=> $product_id);`
45,248,405
Got some js animated dots that work fine as text, ``` var dots = 0; $(document).ready(function() { setInterval (type, 600); }); function type() { if(dots < 3) { $('#dots').append('.'); dots++; } else { $('#dots').html(''); dots = 0; } } ``` but can not us...
2017/07/22
[ "https://Stackoverflow.com/questions/45248405", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6467195/" ]
in jQuery use `.attr('value', '.....')` or `.val()` ```js var dots = 0; $(document).ready(function() { $('#payDots').on('click', function() { $(this).attr('disabled', 'disabled'); setInterval(type, 600); }) }); function type() { var dot = '.'; if(dots < 3) { $('#payDots').val('processi...
You'd use jQuery's `val()` to set the value, and with a callback it's easy to append to the value. A small plugin that handles this could be useful, something like ``` $.fn.dots = function(time, dots) { return this.each(function(i,el) { clearInterval( $(el).data('dots') ); if ( time !== 0 ) { var d =...
45,248,405
Got some js animated dots that work fine as text, ``` var dots = 0; $(document).ready(function() { setInterval (type, 600); }); function type() { if(dots < 3) { $('#dots').append('.'); dots++; } else { $('#dots').html(''); dots = 0; } } ``` but can not us...
2017/07/22
[ "https://Stackoverflow.com/questions/45248405", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6467195/" ]
in jQuery use `.attr('value', '.....')` or `.val()` ```js var dots = 0; $(document).ready(function() { $('#payDots').on('click', function() { $(this).attr('disabled', 'disabled'); setInterval(type, 600); }) }); function type() { var dot = '.'; if(dots < 3) { $('#payDots').val('processi...
`<input>` element does not have `.innerHTML` property which is displayed. `.append()` and `.html()` set an elements' `.innerHTML` property, not `.value` property. `<input>` element has `.value` property which can be set at jQuery using `.val(function)` ```js var dots = 0; var dot = "."; $(document).ready(function...
23,914,152
This code is supposed to give the maximum value of a secondary diagonal of this matrix ``` 1 2 3 4 4 5 6 8 9 10 11 12 ``` But it's giving an incorrect answer. There seems to be a slight error in it which I can't pinpoint. ``` #include<iostream> using namespace std; int main() { int a[4][4] = {1,2,3,4,5,6,7...
2014/05/28
[ "https://Stackoverflow.com/questions/23914152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3635550/" ]
I think I have found a solution whilst messing around. I put a float and clear on the moo and it seems to have done the trick and is now wrapping round the content. I didn't think this would work for some reason but it seems to have done: ``` .moo { background:#f1f1f1; padding:10px 10px 10px 15px; margin-bottom:10px...
I would suggest adding: ``` overflow-x: auto ``` to your `.moo` styles This will make the moo container have it's own scrollbar - if this is what you want?
23,914,152
This code is supposed to give the maximum value of a secondary diagonal of this matrix ``` 1 2 3 4 4 5 6 8 9 10 11 12 ``` But it's giving an incorrect answer. There seems to be a slight error in it which I can't pinpoint. ``` #include<iostream> using namespace std; int main() { int a[4][4] = {1,2,3,4,5,6,7...
2014/05/28
[ "https://Stackoverflow.com/questions/23914152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3635550/" ]
I think I have found a solution whilst messing around. I put a float and clear on the moo and it seems to have done the trick and is now wrapping round the content. I didn't think this would work for some reason but it seems to have done: ``` .moo { background:#f1f1f1; padding:10px 10px 10px 15px; margin-bottom:10px...
The only way I can see to fix your "background" issue, is to make your `.moo` class a `position:absolute`. Then its width wouldn't be limited by the parent's overflow. But that would require you to set the `.fader-setup-drag-area` element (parent) as `position: relative` and give it a fixed height. Like this: ``` .fa...
37,025,021
I have a customer model ``` public class Customer { public int CustomerID { get; set; } public string CustomerName { get; set; } public string CustomerAddress1 { get; set; } public string CustomerAddress2 { get; set; } public string CustomerAddress3 { get; set; } pub...
2016/05/04
[ "https://Stackoverflow.com/questions/37025021", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5369591/" ]
You want to list multiple viewmodels, so create a collection: ``` var allCustomers = db.Customers.ToList(); ``` Then map that to your viewmodel: ``` var allCustomersProfiles = allCustomers.Select(c => new CustomerViewModel { CustomerAddress1 = c.CustomerAddress1, CustomerAddress2 = c.CustomerAddress2, C...
I can think of 2 ways of doing this, namely: * Return a list of customer view models containing only customer-related data * Return a customer view model with a list of customers and any non-related customer data Regarding my first option, you can return a list of customer view models to the view. This will only cont...
170,690
In *Harry Potter and the Goblet of Fire*, we see that it is possible to train yourself to resist the *Imperius Curse*. How is it that Harry, a 14 year old boy, was able to resist Barty Crouch Jr. after about an hour, but Moody, the paranoid, experienced, always prepared Auror was trapped for a whole year?
2017/09/28
[ "https://scifi.stackexchange.com/questions/170690", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/78289/" ]
Moody was kept in a trunk so it might not matter if he had fought it. --------------------------------------------------------------------- It seems like Moody was placed under the Imperius Curse after he was already captured using other methods. > > “We journeyed to his house. Moody put up a struggle. There was a c...
This question implies that Moody was under the effects of the Imperius Curse for most of a year. If that were the case, then Moody would not have been locked inside a magic trunk. If Crouch Jr. needed anything from Moody, like information, then Crouch most likely used a combination of the Imperius Curse and the Cruciat...
112,059
Suppose we have a list $L$ consisting of $N$ numbers (may include repetitions). I am curious which is more computationally intensive to calculate, the mean or the median? Naively, I would suppose calculating the mean involves summing up the $N$ numbers and then dividing by $N$, hence it has linear $O(N)$ complexity. ...
2019/07/22
[ "https://cs.stackexchange.com/questions/112059", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/104848/" ]
You can find the median in linear time using the [linear time selection algorithm](https://cs.stackexchange.com/questions/87626/help-with-deterministic-selection-algorithm). There are also faster randomized algorithms such as [quickselect](https://en.wikipedia.org/wiki/Quickselect) and [Floyd–Rivest](https://en.wikiped...
Just quickly saying how can get find the median in linear time: Say you have a million items 0 .. 999,999 then the median is the average of items 499,999 and 500,000. Run the quicksort algorithm. But after each partitioning, you don't sort both halves, you only sort the half (or two halves) containing elements #499,9...
29,387
Given a real function $f$, how can one efficiently evaluate $\int\_0^{a\_i}f(x)dx$ for millions of different $a\_i$? Applying a standard [quadrature](https://en.wikipedia.org/wiki/Numerical_integration) method (such as [Simpson's rule](https://en.wikipedia.org/wiki/Simpson%27s_rule) or [Gaussian quadrature](https://en...
2018/04/26
[ "https://scicomp.stackexchange.com/questions/29387", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/9650/" ]
Let's say you've ordered the points so that $0<a\_1<a\_2<\ldots<a\_n$. Then you have of course that $$ \int\_0^{a\_2} f(x) dx = \int\_0^{a\_1} f(x) dx + \int\_{a\_1}^{a\_2} f(x) dx. $$ In other words, if you have previously computed the integrals from zero to $a\_1$ through some numerical method, then computing the...
The standard method is [double-exponential sinc quadrature](http://www.ams.org/journals/mcom/2005-74-250/S0025-5718-04-01724-7/S0025-5718-04-01724-7.pdf). The fast convergence requires some regularity assumptions on the integrand, namely that it is the restriction to the real line of a complex differentiable function b...
29,387
Given a real function $f$, how can one efficiently evaluate $\int\_0^{a\_i}f(x)dx$ for millions of different $a\_i$? Applying a standard [quadrature](https://en.wikipedia.org/wiki/Numerical_integration) method (such as [Simpson's rule](https://en.wikipedia.org/wiki/Simpson%27s_rule) or [Gaussian quadrature](https://en...
2018/04/26
[ "https://scicomp.stackexchange.com/questions/29387", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/9650/" ]
The point of @WolfgangBangerth is exactly what I mentionend in my comment, so I'd always try this first. In the best case, with millions of partitions $[a\_{i},a\_{i+1}]\_{i\in \{0,\ldots,N-1\}}$ (where $a\_{i} < a\_{i+1}$), the length of these is quite small such that some low-order method could be appropriate. This w...
Let's say you've ordered the points so that $0<a\_1<a\_2<\ldots<a\_n$. Then you have of course that $$ \int\_0^{a\_2} f(x) dx = \int\_0^{a\_1} f(x) dx + \int\_{a\_1}^{a\_2} f(x) dx. $$ In other words, if you have previously computed the integrals from zero to $a\_1$ through some numerical method, then computing the...
29,387
Given a real function $f$, how can one efficiently evaluate $\int\_0^{a\_i}f(x)dx$ for millions of different $a\_i$? Applying a standard [quadrature](https://en.wikipedia.org/wiki/Numerical_integration) method (such as [Simpson's rule](https://en.wikipedia.org/wiki/Simpson%27s_rule) or [Gaussian quadrature](https://en...
2018/04/26
[ "https://scicomp.stackexchange.com/questions/29387", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/9650/" ]
The point of @WolfgangBangerth is exactly what I mentionend in my comment, so I'd always try this first. In the best case, with millions of partitions $[a\_{i},a\_{i+1}]\_{i\in \{0,\ldots,N-1\}}$ (where $a\_{i} < a\_{i+1}$), the length of these is quite small such that some low-order method could be appropriate. This w...
The standard method is [double-exponential sinc quadrature](http://www.ams.org/journals/mcom/2005-74-250/S0025-5718-04-01724-7/S0025-5718-04-01724-7.pdf). The fast convergence requires some regularity assumptions on the integrand, namely that it is the restriction to the real line of a complex differentiable function b...
451,295
On a personal site, I use leaflet to display a map. ``` var cartoDb = L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png', { attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>', ...
2023/02/04
[ "https://gis.stackexchange.com/questions/451295", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/160892/" ]
this is copy paste of my working web map ``` let mapConfig = { 'container': 'map', 'hash': true, 'style': { 'version': 8, 'sources': { 'carto-light': { 'type': 'raster', 'tiles': [ "https://a.basemaps.cartocdn.com/light_all/{z}/{x}...
Ok finally I got it working as expected, with better rendering. No the map has more details ! I use the code provided in the mapLibreGl example page, but using the url of Ziggy's example ``` <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Display a map</title> <meta name="viewport" content="initial-scale...
19,924,645
HTML: ``` <div class="here">This is here</div> <div class="insert">This is to be inserted</div> ``` jQuery: ``` $(document).ready(function() { var $m = $(".insert"); $(".here").before($m); }); ``` It produces the expected result - cuts the `insert` div and pastes it before the `here` div. But if the code is a...
2013/11/12
[ "https://Stackoverflow.com/questions/19924645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/998537/" ]
What you are doing is moving an existing element from one place to another; you are not creating additional copies of it. Create copies using `.clone()` method and insert into desired location: ``` $(".here").before( $m /*.attr("title", "original")*/, $m.clone() /*.attr("title", "copy # 1")*/, $m.c...
Thats because an element can exist just once. With `$(".here").before($m, $m);` You say insert element\_x before '.here' and than insert element\_x before '.here'. So it is moved and than moved again to the same place. With `$(".here").before($m, $('<div class="insert2">This is insert 2</div>'));` you're creating a ne...
19,924,645
HTML: ``` <div class="here">This is here</div> <div class="insert">This is to be inserted</div> ``` jQuery: ``` $(document).ready(function() { var $m = $(".insert"); $(".here").before($m); }); ``` It produces the expected result - cuts the `insert` div and pastes it before the `here` div. But if the code is a...
2013/11/12
[ "https://Stackoverflow.com/questions/19924645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/998537/" ]
When you give an existing DOM element as an argument to DOM insertion methods, it doesn't make a copy of the element, it just moves that element to the place you specify. A single DOM element can only be in one place at a time, so if you specify the same element twice, it moves it twice. If you want copies of the eleme...
Thats because an element can exist just once. With `$(".here").before($m, $m);` You say insert element\_x before '.here' and than insert element\_x before '.here'. So it is moved and than moved again to the same place. With `$(".here").before($m, $('<div class="insert2">This is insert 2</div>'));` you're creating a ne...
36,625,181
I've done something to my Access database, and now when I double-click a table (all Access Objects | Tables) it puts up the "Enter Parameter Value" dialog. The parameter that it is asking for is of the form TableName.ColumnName, and ColumnName is indeed a column in TableName, but TableName is NOT the table I am opening...
2016/04/14
[ "https://Stackoverflow.com/questions/36625181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/582854/" ]
Open the table in *Design View* and then open its property sheet. Make sure you examine the *table's* property sheet (it should say *"Selection type: Table Properties"* just below the *"Property Sheet"* heading). Look for `[TableName].[ColumnName]` in one of those properties. I was thinking of the *Filter* and Order...
I just ran into this same problem. The parameter mine was asking for what not even one of my field names. I finally figured out that I must have hit the space key in an empty field when I was adding some new fields to the table. I deleted about 10 empty fields to make sure I got all the mistakes and it cleared up my pr...
6,070,992
The below doesnt work and im struggling to work out why.... ``` function CommentHandler() { var Text; } var myCommentHandler = new CommentHandler(); myCommentHandler.prototype.SayHello = function () { document.write('Hello World'); } ``` I get the error : 'myCommentHandler.prototype is undefined' I jus...
2011/05/20
[ "https://Stackoverflow.com/questions/6070992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/223863/" ]
The prototype belongs to the *class*, not the *instance*: ``` CommentHandler.prototype.MyFunction = ... ``` However you can also access the prototype via the instance's `constructor` property: ``` myObj.constructor.prototype.MyFunction = ... ``` This will of course add that function to *every* instance of your Co...
I think what you actually want here is this: ``` CommentHandler.prototype.SayHello = function () { document.write('Hello World'); }; ```
6,070,992
The below doesnt work and im struggling to work out why.... ``` function CommentHandler() { var Text; } var myCommentHandler = new CommentHandler(); myCommentHandler.prototype.SayHello = function () { document.write('Hello World'); } ``` I get the error : 'myCommentHandler.prototype is undefined' I jus...
2011/05/20
[ "https://Stackoverflow.com/questions/6070992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/223863/" ]
The prototype belongs to the *class*, not the *instance*: ``` CommentHandler.prototype.MyFunction = ... ``` However you can also access the prototype via the instance's `constructor` property: ``` myObj.constructor.prototype.MyFunction = ... ``` This will of course add that function to *every* instance of your Co...
You have to use ``` CommentHandler.prototype.SayHello = function(){....} ``` You can find more about the prototype object in the following references <http://www.javascriptkit.com/javatutors/proto.shtml> <https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/prototype> <http://msdn.micro...
6,070,992
The below doesnt work and im struggling to work out why.... ``` function CommentHandler() { var Text; } var myCommentHandler = new CommentHandler(); myCommentHandler.prototype.SayHello = function () { document.write('Hello World'); } ``` I get the error : 'myCommentHandler.prototype is undefined' I jus...
2011/05/20
[ "https://Stackoverflow.com/questions/6070992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/223863/" ]
The prototype belongs to the *class*, not the *instance*: ``` CommentHandler.prototype.MyFunction = ... ``` However you can also access the prototype via the instance's `constructor` property: ``` myObj.constructor.prototype.MyFunction = ... ``` This will of course add that function to *every* instance of your Co...
You need to prototype the class function rather than the instance. Also if you want the `Text` variable to be accessible outside the constructor, in the other method functions, then you need to add the `this` keyword. ``` function CommentHandler() { this.Text = 'Hello World'; } CommentHandler.prototype.SayHello =...
6,070,992
The below doesnt work and im struggling to work out why.... ``` function CommentHandler() { var Text; } var myCommentHandler = new CommentHandler(); myCommentHandler.prototype.SayHello = function () { document.write('Hello World'); } ``` I get the error : 'myCommentHandler.prototype is undefined' I jus...
2011/05/20
[ "https://Stackoverflow.com/questions/6070992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/223863/" ]
The prototype belongs to the *class*, not the *instance*: ``` CommentHandler.prototype.MyFunction = ... ``` However you can also access the prototype via the instance's `constructor` property: ``` myObj.constructor.prototype.MyFunction = ... ``` This will of course add that function to *every* instance of your Co...
`myCommentHandler` *does not* have a prototype, because it is an instance. `CommentHandler` *does* have a prototype that can be modified. I am guessing you want to edit the object after initializing, and can do so like this: ``` myCommentHandler.SayHello = function() { document.write('Hello World'); } ``` Here i...
10,228,071
I am trying to hide a row which contains in one of the cells a specific span element. The following code is what I have so far - but there is no getElementsByTagName for a tr What else can I do to get the row? Thanks ! ``` <table id='tableContainer'> <tr><td><span id='xyz'>Hide</span></td></tr> <tr><td><span id='abc...
2012/04/19
[ "https://Stackoverflow.com/questions/10228071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343952/" ]
When you *clone* a remote repository, you can't run any client-side hooks because hooks are local to your working copy, and you're creating one from scratch. When you *pull* new changes from a remote repository, git will run your local `post-merge` hook if it exists. There is nothing run on the server as the result of...
No, there isn't any clone hook.
10,228,071
I am trying to hide a row which contains in one of the cells a specific span element. The following code is what I have so far - but there is no getElementsByTagName for a tr What else can I do to get the row? Thanks ! ``` <table id='tableContainer'> <tr><td><span id='xyz'>Hide</span></td></tr> <tr><td><span id='abc...
2012/04/19
[ "https://Stackoverflow.com/questions/10228071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343952/" ]
ok, one way to do this is to use the `clone --template` option. Specify the location where the client side hooks will be stored as value to the `--template` switch. The hooks are copied to the clone, and the post-checkout hook is fired immediately!
When you *clone* a remote repository, you can't run any client-side hooks because hooks are local to your working copy, and you're creating one from scratch. When you *pull* new changes from a remote repository, git will run your local `post-merge` hook if it exists. There is nothing run on the server as the result of...
10,228,071
I am trying to hide a row which contains in one of the cells a specific span element. The following code is what I have so far - but there is no getElementsByTagName for a tr What else can I do to get the row? Thanks ! ``` <table id='tableContainer'> <tr><td><span id='xyz'>Hide</span></td></tr> <tr><td><span id='abc...
2012/04/19
[ "https://Stackoverflow.com/questions/10228071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343952/" ]
When you *clone* a remote repository, you can't run any client-side hooks because hooks are local to your working copy, and you're creating one from scratch. When you *pull* new changes from a remote repository, git will run your local `post-merge` hook if it exists. There is nothing run on the server as the result of...
I'm late but there is a workaround: 1. Capture `git clone` execution and set a variable using `trap set_var_on_git_clone DEBUG` where `set_var_on_git_clone` is a user-defined function. (e.g. <https://gist.github.com/KeyAmam/a6afcabc3a724fc4a541aca7629c3ff6>) 2. Check the variable in `post-checkout` script and do some ...
10,228,071
I am trying to hide a row which contains in one of the cells a specific span element. The following code is what I have so far - but there is no getElementsByTagName for a tr What else can I do to get the row? Thanks ! ``` <table id='tableContainer'> <tr><td><span id='xyz'>Hide</span></td></tr> <tr><td><span id='abc...
2012/04/19
[ "https://Stackoverflow.com/questions/10228071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343952/" ]
When you *clone* a remote repository, you can't run any client-side hooks because hooks are local to your working copy, and you're creating one from scratch. When you *pull* new changes from a remote repository, git will run your local `post-merge` hook if it exists. There is nothing run on the server as the result of...
Since git version 1.6.3, the **post-checkout** hook runs on git-clone (when run without `--no-checkout`). > > It is also run after git-clone[1], unless the --no-checkout (-n) option is used. The first parameter given to the hook is the null-ref, the second the ref of the new HEAD and the flag is always 1. > > > <...
10,228,071
I am trying to hide a row which contains in one of the cells a specific span element. The following code is what I have so far - but there is no getElementsByTagName for a tr What else can I do to get the row? Thanks ! ``` <table id='tableContainer'> <tr><td><span id='xyz'>Hide</span></td></tr> <tr><td><span id='abc...
2012/04/19
[ "https://Stackoverflow.com/questions/10228071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343952/" ]
ok, one way to do this is to use the `clone --template` option. Specify the location where the client side hooks will be stored as value to the `--template` switch. The hooks are copied to the clone, and the post-checkout hook is fired immediately!
No, there isn't any clone hook.
10,228,071
I am trying to hide a row which contains in one of the cells a specific span element. The following code is what I have so far - but there is no getElementsByTagName for a tr What else can I do to get the row? Thanks ! ``` <table id='tableContainer'> <tr><td><span id='xyz'>Hide</span></td></tr> <tr><td><span id='abc...
2012/04/19
[ "https://Stackoverflow.com/questions/10228071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343952/" ]
No, there isn't any clone hook.
I'm late but there is a workaround: 1. Capture `git clone` execution and set a variable using `trap set_var_on_git_clone DEBUG` where `set_var_on_git_clone` is a user-defined function. (e.g. <https://gist.github.com/KeyAmam/a6afcabc3a724fc4a541aca7629c3ff6>) 2. Check the variable in `post-checkout` script and do some ...
10,228,071
I am trying to hide a row which contains in one of the cells a specific span element. The following code is what I have so far - but there is no getElementsByTagName for a tr What else can I do to get the row? Thanks ! ``` <table id='tableContainer'> <tr><td><span id='xyz'>Hide</span></td></tr> <tr><td><span id='abc...
2012/04/19
[ "https://Stackoverflow.com/questions/10228071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343952/" ]
ok, one way to do this is to use the `clone --template` option. Specify the location where the client side hooks will be stored as value to the `--template` switch. The hooks are copied to the clone, and the post-checkout hook is fired immediately!
I'm late but there is a workaround: 1. Capture `git clone` execution and set a variable using `trap set_var_on_git_clone DEBUG` where `set_var_on_git_clone` is a user-defined function. (e.g. <https://gist.github.com/KeyAmam/a6afcabc3a724fc4a541aca7629c3ff6>) 2. Check the variable in `post-checkout` script and do some ...
10,228,071
I am trying to hide a row which contains in one of the cells a specific span element. The following code is what I have so far - but there is no getElementsByTagName for a tr What else can I do to get the row? Thanks ! ``` <table id='tableContainer'> <tr><td><span id='xyz'>Hide</span></td></tr> <tr><td><span id='abc...
2012/04/19
[ "https://Stackoverflow.com/questions/10228071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343952/" ]
ok, one way to do this is to use the `clone --template` option. Specify the location where the client side hooks will be stored as value to the `--template` switch. The hooks are copied to the clone, and the post-checkout hook is fired immediately!
Since git version 1.6.3, the **post-checkout** hook runs on git-clone (when run without `--no-checkout`). > > It is also run after git-clone[1], unless the --no-checkout (-n) option is used. The first parameter given to the hook is the null-ref, the second the ref of the new HEAD and the flag is always 1. > > > <...
10,228,071
I am trying to hide a row which contains in one of the cells a specific span element. The following code is what I have so far - but there is no getElementsByTagName for a tr What else can I do to get the row? Thanks ! ``` <table id='tableContainer'> <tr><td><span id='xyz'>Hide</span></td></tr> <tr><td><span id='abc...
2012/04/19
[ "https://Stackoverflow.com/questions/10228071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343952/" ]
Since git version 1.6.3, the **post-checkout** hook runs on git-clone (when run without `--no-checkout`). > > It is also run after git-clone[1], unless the --no-checkout (-n) option is used. The first parameter given to the hook is the null-ref, the second the ref of the new HEAD and the flag is always 1. > > > <...
I'm late but there is a workaround: 1. Capture `git clone` execution and set a variable using `trap set_var_on_git_clone DEBUG` where `set_var_on_git_clone` is a user-defined function. (e.g. <https://gist.github.com/KeyAmam/a6afcabc3a724fc4a541aca7629c3ff6>) 2. Check the variable in `post-checkout` script and do some ...
17,118,146
In java, what is the need/use of ".class" property of an object. e.g., MyClass.class. What does .class point to.
2013/06/14
[ "https://Stackoverflow.com/questions/17118146", "https://Stackoverflow.com", "https://Stackoverflow.com/users/632942/" ]
An instance of the class `Class`. <http://javadocs.org/class>
It can be useful in some circumstances where you want to say 'any object of a particular class'. For example, in JUnit you use the class object of a class to indicate that a test is expected to throw an exception of a particular class. They can also be useful in some advanced uses of generics, to ensure that methods a...
17,118,146
In java, what is the need/use of ".class" property of an object. e.g., MyClass.class. What does .class point to.
2013/06/14
[ "https://Stackoverflow.com/questions/17118146", "https://Stackoverflow.com", "https://Stackoverflow.com/users/632942/" ]
Sometimes you need some **typing information**, e.g. when you do some **reflection**. The **.class** is specially handled by the compiler and is interpreted as a **Class** instance. If you've used C# before this is the equivalent of the **typeof** operator. e.g. if you want to dynamically get the full name of a type...
It can be useful in some circumstances where you want to say 'any object of a particular class'. For example, in JUnit you use the class object of a class to indicate that a test is expected to throw an exception of a particular class. They can also be useful in some advanced uses of generics, to ensure that methods a...
6,493,549
I recently wrote a C program that is supposed to run in a Linux environment as follows; ``` #include <stdio.h> #include <stdlib.h> void main() { system("notify-send -u normal -t 200 'You Have received a new message'"); system("cvlc /home/ashenafis/Music/BabyMessage.mp3"); return 0; } ``` Compiled it and...
2011/06/27
[ "https://Stackoverflow.com/questions/6493549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can include the browser in the sequence diagram but you should not include UI details. You should just have the requests that can be initiated via the browser. This diagram is a good example: <http://click.apache.org/docs/user-guide/htmlsingle/images/ajax/ajax-request-sequence-diagram.png>
In my view you are trying to show the sequence of interactions between objects for *purchase of a product*. In this case the web page or the view **should not be in the diagram**. The page/view is a means of interaction with the user and might be displayed as an external call to a *endpoint* which will actually deal w...
6,493,549
I recently wrote a C program that is supposed to run in a Linux environment as follows; ``` #include <stdio.h> #include <stdlib.h> void main() { system("notify-send -u normal -t 200 'You Have received a new message'"); system("cvlc /home/ashenafis/Music/BabyMessage.mp3"); return 0; } ``` Compiled it and...
2011/06/27
[ "https://Stackoverflow.com/questions/6493549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
UML sequence diagrams are used to represent or model the flow of messages, events and actions between the objects or components of a system. For this login should be the component of the system (as a class) rather then a page. Object will be ur user who tries to login. i would recommend you to go through this link for ...
In my view you are trying to show the sequence of interactions between objects for *purchase of a product*. In this case the web page or the view **should not be in the diagram**. The page/view is a means of interaction with the user and might be displayed as an external call to a *endpoint* which will actually deal w...
6,493,549
I recently wrote a C program that is supposed to run in a Linux environment as follows; ``` #include <stdio.h> #include <stdlib.h> void main() { system("notify-send -u normal -t 200 'You Have received a new message'"); system("cvlc /home/ashenafis/Music/BabyMessage.mp3"); return 0; } ``` Compiled it and...
2011/06/27
[ "https://Stackoverflow.com/questions/6493549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
YES, it is. But, it can be a business logic object and a interface / GUI object, at the same time. You could, separate the logic and the interface code into different classes / objects.
In my view you are trying to show the sequence of interactions between objects for *purchase of a product*. In this case the web page or the view **should not be in the diagram**. The page/view is a means of interaction with the user and might be displayed as an external call to a *endpoint* which will actually deal w...
6,493,549
I recently wrote a C program that is supposed to run in a Linux environment as follows; ``` #include <stdio.h> #include <stdlib.h> void main() { system("notify-send -u normal -t 200 'You Have received a new message'"); system("cvlc /home/ashenafis/Music/BabyMessage.mp3"); return 0; } ``` Compiled it and...
2011/06/27
[ "https://Stackoverflow.com/questions/6493549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can include the browser in the sequence diagram but you should not include UI details. You should just have the requests that can be initiated via the browser. This diagram is a good example: <http://click.apache.org/docs/user-guide/htmlsingle/images/ajax/ajax-request-sequence-diagram.png>
UML sequence diagrams are used to represent or model the flow of messages, events and actions between the objects or components of a system. For this login should be the component of the system (as a class) rather then a page. Object will be ur user who tries to login. i would recommend you to go through this link for ...
6,493,549
I recently wrote a C program that is supposed to run in a Linux environment as follows; ``` #include <stdio.h> #include <stdlib.h> void main() { system("notify-send -u normal -t 200 'You Have received a new message'"); system("cvlc /home/ashenafis/Music/BabyMessage.mp3"); return 0; } ``` Compiled it and...
2011/06/27
[ "https://Stackoverflow.com/questions/6493549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can include the browser in the sequence diagram but you should not include UI details. You should just have the requests that can be initiated via the browser. This diagram is a good example: <http://click.apache.org/docs/user-guide/htmlsingle/images/ajax/ajax-request-sequence-diagram.png>
YES, it is. But, it can be a business logic object and a interface / GUI object, at the same time. You could, separate the logic and the interface code into different classes / objects.
48,180,757
I am trying to achieve the "last." functionality using Proc SQL instead of data step. Say I have a dataset like below: ``` Account_Id Dept Salary Emp_Status Projects Rating 111 123 7000 Perm A 5 111 123 7000 Perm B 4 111 123 7000 Perm C 5 222 ...
2018/01/10
[ "https://Stackoverflow.com/questions/48180757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7423588/" ]
The following appears to do what you want for the sample data you have posted, assuming that you care only about the row order of your input dataset rather than the values of any particular variable to determine the order within by-groups: ``` data have; input Account_Id Dept Salary Emp_Status $ Projects $ Rating; car...
You correctly state there are no automatic variables in SAS SQL equivalent to first. or last. The data will need to have columns that support a definitive within group ordering that can be utilized for MAX selection and then applied as join criteria. `Projects` in your data is a possible candidate: ``` data have; inpu...
35,914,758
I have updated android SDK to android preview N after updating, I am getting this xml rendering error. After clicking on details it is showing following stack trace How to avoid this [![?](https://i.stack.imgur.com/PabMN.jpg)](https://i.stack.imgur.com/PabMN.jpg) ``` org.jetbrains.android.uipreview.RenderingException...
2016/03/10
[ "https://Stackoverflow.com/questions/35914758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4546990/" ]
This is bug in Android Studio. Usually you get error: **Unsupported major.minor version 52.0** **WORKAROUND:** If you have installed Android N, change Android rendering version with older one and the problem will disappear. **SOLUTION:** Install Android SDK Tools 25.1.3 (tools) or higher [![enter image description h...
NEW SOLUTION: ============= After Updating **Android SDK Tools 25.1.3** It will remove automatically that bug. **Update your SDK Tools.** [![enter image description here](https://i.stack.imgur.com/XujNT.png)](https://i.stack.imgur.com/XujNT.png) OLD SOLUTION: ============= I got same problem after updating sdk wit...
35,914,758
I have updated android SDK to android preview N after updating, I am getting this xml rendering error. After clicking on details it is showing following stack trace How to avoid this [![?](https://i.stack.imgur.com/PabMN.jpg)](https://i.stack.imgur.com/PabMN.jpg) ``` org.jetbrains.android.uipreview.RenderingException...
2016/03/10
[ "https://Stackoverflow.com/questions/35914758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4546990/" ]
This is bug in Android Studio. Usually you get error: **Unsupported major.minor version 52.0** **WORKAROUND:** If you have installed Android N, change Android rendering version with older one and the problem will disappear. **SOLUTION:** Install Android SDK Tools 25.1.3 (tools) or higher [![enter image description h...
It cause while rendering version is **Andorid API 23: AndroidN(Preview)**. Need to change it [android-n](/questions/tagged/android-n "show questions tagged 'android-n'"). It is a [Issue 203683: Unsupported major.minor version 52.0](https://code.google.com/p/android/issues/detail?id=203683)
35,914,758
I have updated android SDK to android preview N after updating, I am getting this xml rendering error. After clicking on details it is showing following stack trace How to avoid this [![?](https://i.stack.imgur.com/PabMN.jpg)](https://i.stack.imgur.com/PabMN.jpg) ``` org.jetbrains.android.uipreview.RenderingException...
2016/03/10
[ "https://Stackoverflow.com/questions/35914758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4546990/" ]
This is bug in Android Studio. Usually you get error: **Unsupported major.minor version 52.0** **WORKAROUND:** If you have installed Android N, change Android rendering version with older one and the problem will disappear. **SOLUTION:** Install Android SDK Tools 25.1.3 (tools) or higher [![enter image description h...
I had similar kind of error. I followed the steps mentioned above. I changed the preview version to older version and it worked. ![Screenshot for the same](https://i.stack.imgur.com/crFsm.png)
35,914,758
I have updated android SDK to android preview N after updating, I am getting this xml rendering error. After clicking on details it is showing following stack trace How to avoid this [![?](https://i.stack.imgur.com/PabMN.jpg)](https://i.stack.imgur.com/PabMN.jpg) ``` org.jetbrains.android.uipreview.RenderingException...
2016/03/10
[ "https://Stackoverflow.com/questions/35914758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4546990/" ]
NEW SOLUTION: ============= After Updating **Android SDK Tools 25.1.3** It will remove automatically that bug. **Update your SDK Tools.** [![enter image description here](https://i.stack.imgur.com/XujNT.png)](https://i.stack.imgur.com/XujNT.png) OLD SOLUTION: ============= I got same problem after updating sdk wit...
I had similar kind of error. I followed the steps mentioned above. I changed the preview version to older version and it worked. ![Screenshot for the same](https://i.stack.imgur.com/crFsm.png)
35,914,758
I have updated android SDK to android preview N after updating, I am getting this xml rendering error. After clicking on details it is showing following stack trace How to avoid this [![?](https://i.stack.imgur.com/PabMN.jpg)](https://i.stack.imgur.com/PabMN.jpg) ``` org.jetbrains.android.uipreview.RenderingException...
2016/03/10
[ "https://Stackoverflow.com/questions/35914758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4546990/" ]
It cause while rendering version is **Andorid API 23: AndroidN(Preview)**. Need to change it [android-n](/questions/tagged/android-n "show questions tagged 'android-n'"). It is a [Issue 203683: Unsupported major.minor version 52.0](https://code.google.com/p/android/issues/detail?id=203683)
I had similar kind of error. I followed the steps mentioned above. I changed the preview version to older version and it worked. ![Screenshot for the same](https://i.stack.imgur.com/crFsm.png)
38,263,996
I am creating this mobile app where i have to list a few labels. The code looks like this: ```ts @Component({ selector: 'code-m', template: ` <StackLayout dock="top" orientation="vertical" style="height:90%;" backgroundColor="lightgray"> <label text="Code Methods" style="bac...
2016/07/08
[ "https://Stackoverflow.com/questions/38263996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3450934/" ]
I reviewed the given example and found that you should use `ChangeDetectionStrategy.OnPush`, which to allow `view` to trigger all changes, when new values has been pushed in the array. You could also review the example below. `app.component.html` ``` <StackLayout dock="top" orientation="vertical" style="height:90%;"...
I am not sure how your data looks like in the list, but try this with the repeating label: ``` <Label *ngFor="#item of items" [text]="#item"></Label> ``` or ``` <Label *ngFor="#item of items" [text]="#item.someproperty"></Label> ``` UPDATE: Same example shown here from the official documentation <https://docs.nat...
38,263,996
I am creating this mobile app where i have to list a few labels. The code looks like this: ```ts @Component({ selector: 'code-m', template: ` <StackLayout dock="top" orientation="vertical" style="height:90%;" backgroundColor="lightgray"> <label text="Code Methods" style="bac...
2016/07/08
[ "https://Stackoverflow.com/questions/38263996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3450934/" ]
The solution to this problem was an incorrect implementation of the router. I was routing to this component from my main component using an onClick router.navigate(). Routing this way, don't know why, seemed to route correctly to the destination,it would create any static labels/buttons/etc. but not any that are depen...
I am not sure how your data looks like in the list, but try this with the repeating label: ``` <Label *ngFor="#item of items" [text]="#item"></Label> ``` or ``` <Label *ngFor="#item of items" [text]="#item.someproperty"></Label> ``` UPDATE: Same example shown here from the official documentation <https://docs.nat...
38,263,996
I am creating this mobile app where i have to list a few labels. The code looks like this: ```ts @Component({ selector: 'code-m', template: ` <StackLayout dock="top" orientation="vertical" style="height:90%;" backgroundColor="lightgray"> <label text="Code Methods" style="bac...
2016/07/08
[ "https://Stackoverflow.com/questions/38263996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3450934/" ]
The solution to this problem was an incorrect implementation of the router. I was routing to this component from my main component using an onClick router.navigate(). Routing this way, don't know why, seemed to route correctly to the destination,it would create any static labels/buttons/etc. but not any that are depen...
I reviewed the given example and found that you should use `ChangeDetectionStrategy.OnPush`, which to allow `view` to trigger all changes, when new values has been pushed in the array. You could also review the example below. `app.component.html` ``` <StackLayout dock="top" orientation="vertical" style="height:90%;"...
61,017,033
I am trying to run my Django server via 'python manage.py runserver' on a github repository i cloned and always get this runtime error message: > > class AbstractBaseUser(models.Model): > > > RuntimeError: \_\_\_\_class\_\_\_\_ not set defining 'AbstractBaseUser' as <'class 'django.contrib.auth.base\_user.AbstractB...
2020/04/03
[ "https://Stackoverflow.com/questions/61017033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13213603/" ]
You cant string aggregation. In MySQL, use `group_concat()`: ``` select studentId, studentName, group_concat(courseName order by courseName separator ', ') courseNames from mytable group by studentId, studentName ``` In SQL Server 2017 or higher, use `string_agg()`: ``` select studentId, stude...
For MySql try, ``` SELECT StudentId, StudentName, dbo.GROUP_CONCAT(CourseName) FROM TableName GROUP BY StudentId, StudentName ``` For SQL Server try, ``` select StudentId, StudentName, stuff((select '; ' + a.CourseName from TableName a Group By StudentId, StudentName ...
61,017,033
I am trying to run my Django server via 'python manage.py runserver' on a github repository i cloned and always get this runtime error message: > > class AbstractBaseUser(models.Model): > > > RuntimeError: \_\_\_\_class\_\_\_\_ not set defining 'AbstractBaseUser' as <'class 'django.contrib.auth.base\_user.AbstractB...
2020/04/03
[ "https://Stackoverflow.com/questions/61017033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13213603/" ]
Since you tag SQL Server 2008 ``` WITH CTE AS ( SELECT * FROM ( VALUES (1, 'X', 'CSE-1201'), (3, 'Y', 'CSE-1201'), (1, 'X', 'EEE-1201') ) T(StudentId, StudentName, CourseName) ) SELECT StudentId, StudentName, STUFF( ( SELECT ',' + CourseName ...
For MySql try, ``` SELECT StudentId, StudentName, dbo.GROUP_CONCAT(CourseName) FROM TableName GROUP BY StudentId, StudentName ``` For SQL Server try, ``` select StudentId, StudentName, stuff((select '; ' + a.CourseName from TableName a Group By StudentId, StudentName ...
29,640
I am almost there in my quest to reproduce the rather compact layout of the book I'm translating... one thing to go, though: I successfully used the `enumitem` package to modify the vertical and horizontal spacing of the various list environments. But how do I modify the vertical and horizontal spacing of the `quotat...
2011/09/27
[ "https://tex.stackexchange.com/questions/29640", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/6832/" ]
The [`quoting`](http://www.ctan.org/pkg/quoting) package provides a `quoting` environment with customizable font, margins, spacing... Just load it with `\usepackage{quoting}` and use either `\begin{quoting}[vskip=0pt] ... \end{quoting}` or set it up globally with `\quotingsetup{vskip=0pt}`: ``` \documentclass[twocolum...
``` \documentclass[twocolumn]{scrbook} \makeatletter \renewenvironment{quotation} {\list{}{\listparindent=0pt%whatever you need \itemindent \listparindent \leftmargin=0pt% whatever you need \rightmargin=10pt%whatever you need ...
1,287,555
I want to prove, the Laurent expansion of gamma function. \begin{align} \Gamma(z) = \frac1z-\gamma+\frac12\left(\gamma^2+\frac {\pi^2}6\right)z-\frac16\left(\gamma^3+\frac {\gamma\pi^2}2+2 \zeta(3)\right)z^2+O(z^3). \end{align} First, my guess of obtaing above expansion, is starting from the definitions of gamma func...
2015/05/18
[ "https://math.stackexchange.com/questions/1287555", "https://math.stackexchange.com", "https://math.stackexchange.com/users/164436/" ]
Let $\Gamma(z)$ be represented by the integral $$\Gamma(z)=\int\_0^\infty x^{z-1}e^{-x}\,dx\tag1$$ for $\text{Re}(z)>0$. Integrate by parts the integral in $(1)$ with $u=e^{-x}$ and $v=\frac{x^z}{z}$ reveals $$\Gamma(z)=\frac1z\int\_0^\infty x^ze^{-x}\,dx\tag2$$ Next, we expand $x^z$ in a power series of $z$ to obt...
An idea for you to develop: The Weierstrass Formula tells us that $$\frac1{\Gamma(z)}=ze^{\gamma z}\prod\_{n=1}^\infty\left(1+\frac zn\right)e^{-z/n}$$ Now take logarithms on both sides to get a more or less well known relation: $$-\log\Gamma(z)=\log z+\gamma z+\sum\_{n=1}^\infty\left[\log\left(1+\frac zn\right)-\f...
4,637,136
So, here is a puzzle-like problem: You have n light bulbs. Each one is connected to a special switch that flips the state of all the other n-1 bulbs except the bulb it is connected to. **If you start with all the bulbs turned on, can you switch all the lights off?** In my opinion, you can switch off all the bulbs ii...
2023/02/11
[ "https://math.stackexchange.com/questions/4637136", "https://math.stackexchange.com", "https://math.stackexchange.com/users/259066/" ]
Flipping a switch a second time cancels the effect of the first flip regardless of when it happens, so any solution will require at most one flip of any switch. Without loss of generality, suppose each switch can only be flipped once or not flipped. A light will be off at the end if and only if the parity of the numbe...
Well, you have already dealt with case N is odd: each press on a button doesn't change the parity of the number of on lights. Because you change the state of N-1 lights. And changing the state of 1 light change the parity. So changing the state of N-1 lights, change the parity N-1 times. And if N-1 is even, then it lea...
4,960,150
What is the best way to convert the string values to an int array, e.g.: ``` var s = '1,1,2'; ``` to: ``` var a = [1,1,2]; ``` Thanks
2011/02/10
[ "https://Stackoverflow.com/questions/4960150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/475624/" ]
``` "1,2,3".split(",").map(Number); ``` And for those browsers that don't implement `map`, take an implementation like this one from here: <https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map> `Array.prototype.map` is in ECMAScript5, so don't be afraid to augment `Array.prototype`.
*If the data is secure*, you could use `.eval()`. ``` var a = eval( '[' + s + ']'); ``` If you're not sure about security, you could use `JSON.parse`. ``` var a = JSON.parse( "[" + s + "]" ); ``` ...though you'll need to include a parser in browsers that don't support it natively.
4,960,150
What is the best way to convert the string values to an int array, e.g.: ``` var s = '1,1,2'; ``` to: ``` var a = [1,1,2]; ``` Thanks
2011/02/10
[ "https://Stackoverflow.com/questions/4960150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/475624/" ]
JavaScript is a dynamic-typed language, which means that it might not be so important for those array items to be numbers. If that's the case, you might want to consider just using `split()`: ``` var s = '1,1,2', a = s.split(","); ``` If it is important that they're numbers, then your best bet is to iterate over...
*If the data is secure*, you could use `.eval()`. ``` var a = eval( '[' + s + ']'); ``` If you're not sure about security, you could use `JSON.parse`. ``` var a = JSON.parse( "[" + s + "]" ); ``` ...though you'll need to include a parser in browsers that don't support it natively.
17,350,068
In a partial Razor view I have this: ``` @model IList<Stratent.ScanCloud.Shared.DeliveryOrderLineDto> <div id="gridDiv" style="width:100%; max-height:250px; overflow:auto; border:1px solid #d1d3d4"> @{ var grid = new WebGrid(Model, defaultSort: "Date", selectionFieldName: "Sel...
2013/06/27
[ "https://Stackoverflow.com/questions/17350068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2529162/" ]
You can specify the format of each column when you set the grid up: ``` grid.Column("InvoiceID", header: "Invoice", format: @<text>@Html.ActionLink((string)item.InvoiceID.ToString(), "Invoice", "Invoice", new { invoiceID = item.InvoiceID }, null)</text>), ``` This will generate the ap...
I know this is a bit of an old question, but I have been battling with this too. I handled it by modifying the generated HTML from the webgrid before returning it to the view for rendering. 1. Add "HtmlAgilityPack" using Package Manager - this is used to manipulate the HTML nodes. You can do it manually, but this mak...
3,184,707
I have the following route ( it's the first in my global.asax ) ``` routes.MapRoute( "AdminCompany", // Route name "{controller}.aspx/{action}/{companyId}/{id}", // URL with parameters new { controller = "Home", action = "Index", c...
2010/07/06
[ "https://Stackoverflow.com/questions/3184707", "https://Stackoverflow.com", "https://Stackoverflow.com/users/461880/" ]
only thing I can think of that is happening is that its falling back to the Default route, I did a copy paste of both your route and the html.ActionLink and it works perfectly for me displaying it like "/Order.aspx/DisplayAdmin/39068760/45456", i did replicate the same fault like you get if the naming isn't the same in...
Use the overload of ActionLink that has a RouteValueDictionary argument. It appears that you are currently using the overload with the "object" argument and it's going to a workable, but not as clean, url.
11,208
[Wikipedia - Wiener Deconvolution](http://en.wikipedia.org/wiki/Wiener_deconvolution) shows this formula: $$ \ G(f) = \frac{H^\*(f)S(f)}{ |H(f)|^2 S(f) + N(f) } $$ Could someone explain the derivation? Specifically, where does the squaring ($|H(f)|^2$) come from?
2013/10/21
[ "https://dsp.stackexchange.com/questions/11208", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/5723/" ]
The Wiener Filter can also be derived by another (Easier) way. Let's assume the following model: $$ y = h \ast x + n $$ Namely the data is a result of a linear combination (Convolution) of $ x $ with Additive Noise. If we assume the noise model is Gaussian and our data is also formed by a Gaussian distribution the...
As Jan pointed out, the wikipedia article very lucidly explains the derivation of the weiner filter. The goal of the weiner filter is to reduce the mean of the error in prediction. Hence, you would do the same. Write down the estimate of the error and then differentiate it with respect to G(f) to obtain the optimum G(f...
11,465,499
In an aspx page: ``` <asp:table id = "table1" runat ="server"></table> ``` I have created a table using Javascript from the cs file like this: ``` StringBuilder sb = new StringBuilder() sb.Append('<script>') ; sb.Append(document.write('<table><tr><td>hghj</td></tr></table>')) Table cell ; Table row; cell.Contr...
2012/07/13
[ "https://Stackoverflow.com/questions/11465499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1020779/" ]
I had a somewhat similar issue and the following solution worked for me. Hopefully it helps OP and others. In my case, the table data was dynamically being populated at run-time but when I tried to export the data to excel, I was getting a blank excel file. I solved this issue by putting my table generation code outsid...
``` public override void VerifyRenderingInServerForm(Control control) { /* Verifies that the control is rendered */ } ```
61,015,169
I have person objects that have a gender field objects the person adds to the list then I want to remove from the list people who have man ``` enum class Gender{ woman, man } fun main(args: Array<String>) { data class Person(var name: String, var surname: String, var gender: Gender) val person1 = Person("Ja...
2020/04/03
[ "https://Stackoverflow.com/questions/61015169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7418450/" ]
You have to call `remove` on the iterator itself, not the list. ``` val listIterator2 = PersonList.iterator() while (listIterator2.hasNext()) { var tmp = listIterator2.next() if (tmp.gender == Gender.man) { println( "deleted " + tmp) listIterator2.remove() } } ``` It is e...
Rather than manipulating the original list, you can produce a new list like: ``` val personList = listOf<Person>(person1, person2, person3, person4) val personListUpdated = personList.filter { it.gender != Gender.man } ``` (or, as suggested by Tenfour04 above, `removeAll` or `filterNot` can also be used to inver...
61,015,169
I have person objects that have a gender field objects the person adds to the list then I want to remove from the list people who have man ``` enum class Gender{ woman, man } fun main(args: Array<String>) { data class Person(var name: String, var surname: String, var gender: Gender) val person1 = Person("Ja...
2020/04/03
[ "https://Stackoverflow.com/questions/61015169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7418450/" ]
You have to call `remove` on the iterator itself, not the list. ``` val listIterator2 = PersonList.iterator() while (listIterator2.hasNext()) { var tmp = listIterator2.next() if (tmp.gender == Gender.man) { println( "deleted " + tmp) listIterator2.remove() } } ``` It is e...
***Iterators*** are not always helpful when another thread modifies the collection. I had tried many ways but then realized traversing the collection manually is much safer (backward for remove): ``` for (i in listPersons.size-1 downTo 0) { myList.getOrNull(i)?.apply { if (gender == Gender.man) li...
61,015,169
I have person objects that have a gender field objects the person adds to the list then I want to remove from the list people who have man ``` enum class Gender{ woman, man } fun main(args: Array<String>) { data class Person(var name: String, var surname: String, var gender: Gender) val person1 = Person("Ja...
2020/04/03
[ "https://Stackoverflow.com/questions/61015169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7418450/" ]
Rather than manipulating the original list, you can produce a new list like: ``` val personList = listOf<Person>(person1, person2, person3, person4) val personListUpdated = personList.filter { it.gender != Gender.man } ``` (or, as suggested by Tenfour04 above, `removeAll` or `filterNot` can also be used to inver...
***Iterators*** are not always helpful when another thread modifies the collection. I had tried many ways but then realized traversing the collection manually is much safer (backward for remove): ``` for (i in listPersons.size-1 downTo 0) { myList.getOrNull(i)?.apply { if (gender == Gender.man) li...
34,174,931
In a MySQL database I have to maintain I have this table with two indexes ``` CREATE TABLE users ( id INTEGER UNSIGNED NOT NULL UNIQUE AUTO_INCREMENT, -- some attributes nickname VARCHAR (20) NOT NULL UNIQUE, password VARCHAR (20) NOT NULL, -- other attributes PRIMARY KEY (id), INDEX au...
2015/12/09
[ "https://Stackoverflow.com/questions/34174931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1075119/" ]
Try jquery ui's select event: <https://api.jqueryui.com/autocomplete/#event-select>
I modified the member function: ``` this._on( this.input, { autocompleteselect: function( event, ui ) { ui.item.option.selected = true; this._trigger( "select", event, { item: ui.item.option }); if ( objPeople && ob...
34,174,931
In a MySQL database I have to maintain I have this table with two indexes ``` CREATE TABLE users ( id INTEGER UNSIGNED NOT NULL UNIQUE AUTO_INCREMENT, -- some attributes nickname VARCHAR (20) NOT NULL UNIQUE, password VARCHAR (20) NOT NULL, -- other attributes PRIMARY KEY (id), INDEX au...
2015/12/09
[ "https://Stackoverflow.com/questions/34174931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1075119/" ]
use ``` $( ".selector" ).autocomplete({ select:function(value, data) { //your selection code goes here } }); ```
I modified the member function: ``` this._on( this.input, { autocompleteselect: function( event, ui ) { ui.item.option.selected = true; this._trigger( "select", event, { item: ui.item.option }); if ( objPeople && ob...