qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
22,847,865
Please consider the following statement: ``` var matches = person.Contacts.Where(c => c.ContactType == searchContact.ContactType).ToList(); ``` This will filter all the records with matching ContactType of searchContact object and returns only the filtered Contacts of person. But without ToList() method call at the ...
2014/04/03
[ "https://Stackoverflow.com/questions/22847865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1710097/" ]
You are mistaken. Without calling `ToList()` or another method to force immediate execution, both statements will return an `IQueryable<T>`. Until you iterate over your query variable by using a `foreach` the query variable remains just that. This article on MSDN should explain things well: [Query Execution](http://m...
> > But without ToList() method call at the end of the Where clause, it will return all the Contacts of person. > > > No, without `ToList` it will return a query which, when iterated, will yield all of the contacts matching the value you specified to filter on. Calling `ToList` only materializes that query into th...
425,227
Update: I’ve decided I’m giving up on what I have to work with, and I’m gonna buy a new battery. I have a 13 inch MacBook Pro that I have been working on refurbishing, and I’ve run into an issue where if I unplug it from the charger it shuts down and it won’t show battery percentage. I think this might have something ...
2021/08/06
[ "https://apple.stackexchange.com/questions/425227", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/428517/" ]
Either the battery is not connected or it has failed. Did you receive any messages about “service battery”? You will likely be taking the cover off again to check.
I have just replaced a battery in a 2016 MacBook Pro 13 with a third party replacement. It was the last part of a fairly major exercise to replace the keyboard. When I turned the laptop on it worked while plugged in but failed as soon as I removed the power cable. Turns out I had failed to transfer a cable from the old...
63,018,572
My Python version is 2.7 and I am using this code: ``` df1.select(*[x for x in df1.columns if x!='fields'], F.col("fields.*")).show() ``` But I got this error: ``` File "<ipython-input-16-3d81a8b987ed>", line 1 df1.select(*[x for x in df1.columns if x!='fields'], F.col("fields.*")).show() SyntaxError: only n...
2020/07/21
[ "https://Stackoverflow.com/questions/63018572", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10241161/" ]
You will create a repository and then you will follow the instructions given [here](https://docs.github.com/en/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line) I would suggest you also to watch a video in youtube there are plenty of them
I have two solutions for you that are easy to do for most users **Option 1:** your home page click `New` button and type in the repository name, click on `Upload existing file` and select your files you want to upload **Option 2:** You could also use the github desktop app [found here](https://desktop.github.com/) an...
32,310,508
I'm having an entity framework's EDMX generated class having two properties ``` public partial class Contact : EntityBase { public string FirstName { get; set; } public string LastName { get; set; } } ``` I require additional property that should return FullName by joining FirstName and LastName. So I create...
2015/08/31
[ "https://Stackoverflow.com/questions/32310508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5284398/" ]
I know it's a few years later with no solution, but I had the exact same problem you described on one site that was working in other sites. So I did some research on what was different and to help others should they run into the same issue. **Background** * example.com is the domain * I have a WP page called "foobar"...
I know this topic is old but question is still important. I will use blog example. This method is code free, WP native solution. One caveat is that you cannot translate "blog" slug, so this method is only for one language if you don't need to have different words/slugs for other languages. 1. Create page with slug "b...
43,625,889
Imported Excel sheet To SQL server.i have selects one table . in this table have lot of Rows values. in this Rows single Employee comes in this Table many time. i want single Employee in this COlumn should have all values available from Repeated columns. i will show Sample Data for reference. ``` Name E1 E2 ...
2017/04/26
[ "https://Stackoverflow.com/questions/43625889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4648432/" ]
``` CREATE TABLE #Table1 ([Name] varchar(5), [E1] int, [E2] int, [E3] int, [E4] int, [E5] int) ; INSERT INTO #Table1 ([Name], [E1], [E2], [E3], [E4], [E5]) VALUES ('Jeni', 1, 0, 0, 0, 0), ('Jeni', 0, 0, 2, 0, 0), ('Jeni', 0, 5, 0, 0, 3), ('Priya', 0, 3, 0, 0, 0), ('Priya', 0, 0, 0, 0, 3), ...
The thing you are looking for is a Group by . To get the result you are looking for , i just made the table you described and did a group by and did a sum on the integer values. ``` select name, sum(E1),sum(E2),sum(E3),sum(E4),sum(E5) from Test Group by name ```
43,625,889
Imported Excel sheet To SQL server.i have selects one table . in this table have lot of Rows values. in this Rows single Employee comes in this Table many time. i want single Employee in this COlumn should have all values available from Repeated columns. i will show Sample Data for reference. ``` Name E1 E2 ...
2017/04/26
[ "https://Stackoverflow.com/questions/43625889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4648432/" ]
``` CREATE TABLE #Table1 ([Name] varchar(5), [E1] int, [E2] int, [E3] int, [E4] int, [E5] int) ; INSERT INTO #Table1 ([Name], [E1], [E2], [E3], [E4], [E5]) VALUES ('Jeni', 1, 0, 0, 0, 0), ('Jeni', 0, 0, 2, 0, 0), ('Jeni', 0, 5, 0, 0, 3), ('Priya', 0, 3, 0, 0, 0), ('Priya', 0, 0, 0, 0, 3), ...
``` ;With cte(Name,E1,E2,E3,E4,E5) AS ( SELECT 'Jeni' ,1 ,0 , 0, 0, 0 Union all SELECT 'Jeni' ,0 ,0 , 2, 0, 0 Union all SELECT 'Jeni' ,0 ,5 , 0, 0, 3 Union all SELECT 'Priya',0 ,3 , 0, 0, 0 Union all SELECT 'Priya',0 ,0 , 0, 0, 3 Union all SELECT 'Priya',0 ,0 , 7, 0, 0 Union all SELECT 'Priya',10,0 , 0, 0, 0 ) SELECT ...
43,625,889
Imported Excel sheet To SQL server.i have selects one table . in this table have lot of Rows values. in this Rows single Employee comes in this Table many time. i want single Employee in this COlumn should have all values available from Repeated columns. i will show Sample Data for reference. ``` Name E1 E2 ...
2017/04/26
[ "https://Stackoverflow.com/questions/43625889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4648432/" ]
The thing you are looking for is a Group by . To get the result you are looking for , i just made the table you described and did a group by and did a sum on the integer values. ``` select name, sum(E1),sum(E2),sum(E3),sum(E4),sum(E5) from Test Group by name ```
``` ;With cte(Name,E1,E2,E3,E4,E5) AS ( SELECT 'Jeni' ,1 ,0 , 0, 0, 0 Union all SELECT 'Jeni' ,0 ,0 , 2, 0, 0 Union all SELECT 'Jeni' ,0 ,5 , 0, 0, 3 Union all SELECT 'Priya',0 ,3 , 0, 0, 0 Union all SELECT 'Priya',0 ,0 , 0, 0, 3 Union all SELECT 'Priya',0 ,0 , 7, 0, 0 Union all SELECT 'Priya',10,0 , 0, 0, 0 ) SELECT ...
8,801,924
i'm testing an app of getting current location with sumsung galaxy spica, it show me another location different from my one and it isn't the same showed in the AVD!! gps is activated but i don't know where is the problem exactly. Here is my code ``` import android.location.Location; import android.location.LocationLi...
2012/01/10
[ "https://Stackoverflow.com/questions/8801924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1093645/" ]
My problem was because of the tables used diffrent engines. Table Chart used MyISAM and Chartdata used InnoDB.
remove the `NULL` in your `INSERT` query since the column `idChartdata` is set to `Auto_Increment` and try again. ``` INSERT INTO `charts`.`Chartdata`(`param1` ,`param2` ,`Chart_id`) VALUES ('2012-01-10 05:00:00', '58', '3') ```
8,801,924
i'm testing an app of getting current location with sumsung galaxy spica, it show me another location different from my one and it isn't the same showed in the AVD!! gps is activated but i don't know where is the problem exactly. Here is my code ``` import android.location.Location; import android.location.LocationLi...
2012/01/10
[ "https://Stackoverflow.com/questions/8801924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1093645/" ]
My problem was because of the tables used diffrent engines. Table Chart used MyISAM and Chartdata used InnoDB.
You are trying to add a row to chartdata, with Chart\_id = 3. Is there a chart with idChart = 3? Trie to add a chart with id = 3 first, then perform your query. [edit] Nvm, you solved it already. :D
253,363
``` expr = Uncompress[FromCharacterCode[ Flatten[ImageData[Import["https://i.stack.imgur.com/Pva9y.png"], "Byte"]]]]; ListLinePlot[expr, PlotRange -> All,ImageSize -> 1000] ``` [![enter image description here](https://i.stack.imgur.com/ddFBm.png)](https://i.stack.imgur.com/ddFBm.png) As we see, it just 4 Callout...
2021/08/15
[ "https://mathematica.stackexchange.com/questions/253363", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/21532/" ]
Now knowing `R = 8.31451` redefine your function ``` cv[T_?NumericQ, DT_?NumericQ] := Block[{x},9 R (T/DT)^3*NIntegrate[(x^4Exp[x])/(Exp[x] - 1)^2, {x, 0, DT/T}]]; ``` The fit should minimize `J[DT` ``` J[DT_?NumericQ] := Total@Map[(Cv[#[[1]], DT] - #[[2]])^2 &, Capacity] Table[ {DT, J [DT]} , {DT, 150, 250, 1}]...
``` Cv[T_?NumericQ, DT_?NumericQ] := Module[{R = 8.31451, a}, a = DT/T; 9 R NIntegrate[(x^4 Exp[x])/(Exp[x] - 1)^2, {x, 0, a}]/a^3] dfit = d /. FindFit[Capacity, Cv[t, d], {d}, t] (* 210.986 *) g[1] = ListPlot[Capacity]; g[2] = Plot[Cv[t, dfit], {t, 0, 300}]; Show[{g[1], g[2]}] ``` [![enter image description h...
50,610,832
I've had a discussion with some people at work and we couldn't come to a conclusion. We've faced a dilemma - how do you manage different configuration values for different environments? We've come up with some options, but none of them seemed to satisfy us: - Separate config files (i.e. `config.test`, `config.pr...
2018/05/30
[ "https://Stackoverflow.com/questions/50610832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3822311/" ]
You can put all these configuration in single config file config.py. ``` class Base(): DEBUG = False TESTING = False class DevelopmentConfig(Base): DEBUG = True DEVELOPMENT = True DATABASE_URI = "mysql+mysqldb://root:root@localhost/demo" class TestingConfig(Base): DEBUG = False TESTING = ...
One approach would be to write a "template" for each kind of configuration file, where the template contains mostly plain text, but with a few placeholders. Here is an example template configuration file, using the notation `${foo}` to denote a placeholder. ``` serverName = "${serverName}" listenPort = "${serverPort...
50,610,832
I've had a discussion with some people at work and we couldn't come to a conclusion. We've faced a dilemma - how do you manage different configuration values for different environments? We've come up with some options, but none of them seemed to satisfy us: - Separate config files (i.e. `config.test`, `config.pr...
2018/05/30
[ "https://Stackoverflow.com/questions/50610832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3822311/" ]
You can put all these configuration in single config file config.py. ``` class Base(): DEBUG = False TESTING = False class DevelopmentConfig(Base): DEBUG = True DEVELOPMENT = True DATABASE_URI = "mysql+mysqldb://root:root@localhost/demo" class TestingConfig(Base): DEBUG = False TESTING = ...
It's usually a bad idea to commit your configuration settings to source control, particularly when those settings include passwords or other secrets. I prefer using environment variables to pass those values to the program. The most flexible way I've found is to use the `argparse` module, and use the environment variab...
50,610,832
I've had a discussion with some people at work and we couldn't come to a conclusion. We've faced a dilemma - how do you manage different configuration values for different environments? We've come up with some options, but none of them seemed to satisfy us: - Separate config files (i.e. `config.test`, `config.pr...
2018/05/30
[ "https://Stackoverflow.com/questions/50610832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3822311/" ]
You can put all these configuration in single config file config.py. ``` class Base(): DEBUG = False TESTING = False class DevelopmentConfig(Base): DEBUG = True DEVELOPMENT = True DATABASE_URI = "mysql+mysqldb://root:root@localhost/demo" class TestingConfig(Base): DEBUG = False TESTING = ...
We ended up using a method similar to this [one](https://stackoverflow.com/a/50611386/3822311). We had a base settings file, and environment specific files that simply imported everything from the base file base.py: ```py SAMPLE_CONFIG_VARIABLE = SAMPLE_CONFIG_VALUE ``` prod.py: ```py from base.py import * ``` S...
50,610,832
I've had a discussion with some people at work and we couldn't come to a conclusion. We've faced a dilemma - how do you manage different configuration values for different environments? We've come up with some options, but none of them seemed to satisfy us: - Separate config files (i.e. `config.test`, `config.pr...
2018/05/30
[ "https://Stackoverflow.com/questions/50610832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3822311/" ]
You can put all these configuration in single config file config.py. ``` class Base(): DEBUG = False TESTING = False class DevelopmentConfig(Base): DEBUG = True DEVELOPMENT = True DATABASE_URI = "mysql+mysqldb://root:root@localhost/demo" class TestingConfig(Base): DEBUG = False TESTING = ...
If we are using flask, then we could do environment specific config management like this : ``` -- project folder structure config/ default.py production.py development.py instance/ config.py myapp/ __init__.py ``` During app initialization., ``` # app/__init__.py app = Flask(__name__, instance_relat...
50,610,832
I've had a discussion with some people at work and we couldn't come to a conclusion. We've faced a dilemma - how do you manage different configuration values for different environments? We've come up with some options, but none of them seemed to satisfy us: - Separate config files (i.e. `config.test`, `config.pr...
2018/05/30
[ "https://Stackoverflow.com/questions/50610832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3822311/" ]
It's usually a bad idea to commit your configuration settings to source control, particularly when those settings include passwords or other secrets. I prefer using environment variables to pass those values to the program. The most flexible way I've found is to use the `argparse` module, and use the environment variab...
One approach would be to write a "template" for each kind of configuration file, where the template contains mostly plain text, but with a few placeholders. Here is an example template configuration file, using the notation `${foo}` to denote a placeholder. ``` serverName = "${serverName}" listenPort = "${serverPort...
50,610,832
I've had a discussion with some people at work and we couldn't come to a conclusion. We've faced a dilemma - how do you manage different configuration values for different environments? We've come up with some options, but none of them seemed to satisfy us: - Separate config files (i.e. `config.test`, `config.pr...
2018/05/30
[ "https://Stackoverflow.com/questions/50610832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3822311/" ]
We ended up using a method similar to this [one](https://stackoverflow.com/a/50611386/3822311). We had a base settings file, and environment specific files that simply imported everything from the base file base.py: ```py SAMPLE_CONFIG_VARIABLE = SAMPLE_CONFIG_VALUE ``` prod.py: ```py from base.py import * ``` S...
One approach would be to write a "template" for each kind of configuration file, where the template contains mostly plain text, but with a few placeholders. Here is an example template configuration file, using the notation `${foo}` to denote a placeholder. ``` serverName = "${serverName}" listenPort = "${serverPort...
50,610,832
I've had a discussion with some people at work and we couldn't come to a conclusion. We've faced a dilemma - how do you manage different configuration values for different environments? We've come up with some options, but none of them seemed to satisfy us: - Separate config files (i.e. `config.test`, `config.pr...
2018/05/30
[ "https://Stackoverflow.com/questions/50610832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3822311/" ]
It's usually a bad idea to commit your configuration settings to source control, particularly when those settings include passwords or other secrets. I prefer using environment variables to pass those values to the program. The most flexible way I've found is to use the `argparse` module, and use the environment variab...
If we are using flask, then we could do environment specific config management like this : ``` -- project folder structure config/ default.py production.py development.py instance/ config.py myapp/ __init__.py ``` During app initialization., ``` # app/__init__.py app = Flask(__name__, instance_relat...
50,610,832
I've had a discussion with some people at work and we couldn't come to a conclusion. We've faced a dilemma - how do you manage different configuration values for different environments? We've come up with some options, but none of them seemed to satisfy us: - Separate config files (i.e. `config.test`, `config.pr...
2018/05/30
[ "https://Stackoverflow.com/questions/50610832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3822311/" ]
We ended up using a method similar to this [one](https://stackoverflow.com/a/50611386/3822311). We had a base settings file, and environment specific files that simply imported everything from the base file base.py: ```py SAMPLE_CONFIG_VARIABLE = SAMPLE_CONFIG_VALUE ``` prod.py: ```py from base.py import * ``` S...
If we are using flask, then we could do environment specific config management like this : ``` -- project folder structure config/ default.py production.py development.py instance/ config.py myapp/ __init__.py ``` During app initialization., ``` # app/__init__.py app = Flask(__name__, instance_relat...
80,808
Kryptonite is green.... Can the Green Lantern defend himself against Kryptonians? Or can the ring not make something that acts sufficiently like kryptonite?
2015/02/03
[ "https://scifi.stackexchange.com/questions/80808", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/3823/" ]
**Yes.** This has actually happened on a number of occasions; ![enter image description here](https://i.stack.imgur.com/SysCK.jpg) ![enter image description here](https://i.stack.imgur.com/dMNjr.jpg) ![enter image description here](https://i.stack.imgur.com/9Kzw8.jpg)
The Green Lantern rings are capable of creating Kryptonite and Kryptonite Radiation because the rings are capable of Energy Projection and can therefore mimic certain types of materials and energy signatures. [From Wikia](https://dc.fandom.com/wiki/Green_Lantern_Ring): > > Energy Projection: The ring can be used to ...
24,198,485
I have TABLE 1: `r_profile_token` Columns: ``` r_sequence int(45) AI PK r_profileid varchar(45) r_token varchar(300) r_deviceType int(1) r_date date r_time time ``` and TABLE 2: `r_token_arn` Columns: ``` r_token varchar(300) PK r_arn varchar(300) ``` I need a result ...
2014/06/13
[ "https://Stackoverflow.com/questions/24198485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3760915/" ]
Use a `WHERE` clause. ``` SELECT B.R_ARN, A.R_DEVICETYPE FROM COFFEE2.R_PROFILE_TOKEN A INNER JOIN COFFEE2.R_TOKEN_ARN B ON A.R_TOKEN=B.R_TOKEN WHERE R_PROFILEID = 'SOME_VALUE'; ``` If you want for a single profileid, then use ``` WHERE R_PROFILEID = 'SOME_VALUE'; ``` If you want for a range of profileIds , ...
You need to put a `where` condition in your MYSql query. ``` select b.r_arn, a.r_deviceType from coffee2.r_profile_token a INNER JOIN coffee2.r_token_arn b on a.r_token=b.r_token where r_profileid = "Specific value"; ```
24,198,485
I have TABLE 1: `r_profile_token` Columns: ``` r_sequence int(45) AI PK r_profileid varchar(45) r_token varchar(300) r_deviceType int(1) r_date date r_time time ``` and TABLE 2: `r_token_arn` Columns: ``` r_token varchar(300) PK r_arn varchar(300) ``` I need a result ...
2014/06/13
[ "https://Stackoverflow.com/questions/24198485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3760915/" ]
You need to put a `where` condition in your MYSql query. ``` select b.r_arn, a.r_deviceType from coffee2.r_profile_token a INNER JOIN coffee2.r_token_arn b on a.r_token=b.r_token where r_profileid = "Specific value"; ```
``` select b.r_arn, a.r_deviceType, a.r_profileid from r_profile_token a INNER JOIN r_token_arn b on a.r_token=b.r_token; ```
24,198,485
I have TABLE 1: `r_profile_token` Columns: ``` r_sequence int(45) AI PK r_profileid varchar(45) r_token varchar(300) r_deviceType int(1) r_date date r_time time ``` and TABLE 2: `r_token_arn` Columns: ``` r_token varchar(300) PK r_arn varchar(300) ``` I need a result ...
2014/06/13
[ "https://Stackoverflow.com/questions/24198485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3760915/" ]
You can try this Query against your requirements. ``` SELECT b.r_arn, a.r_deviceType , a.r_profileid FROM r_profile_token a INNER JOIN r_token_arn b ON a.r_token=b.r_token where r_profileid='profile name'; ```
You need to put a `where` condition in your MYSql query. ``` select b.r_arn, a.r_deviceType from coffee2.r_profile_token a INNER JOIN coffee2.r_token_arn b on a.r_token=b.r_token where r_profileid = "Specific value"; ```
24,198,485
I have TABLE 1: `r_profile_token` Columns: ``` r_sequence int(45) AI PK r_profileid varchar(45) r_token varchar(300) r_deviceType int(1) r_date date r_time time ``` and TABLE 2: `r_token_arn` Columns: ``` r_token varchar(300) PK r_arn varchar(300) ``` I need a result ...
2014/06/13
[ "https://Stackoverflow.com/questions/24198485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3760915/" ]
Use a `WHERE` clause. ``` SELECT B.R_ARN, A.R_DEVICETYPE FROM COFFEE2.R_PROFILE_TOKEN A INNER JOIN COFFEE2.R_TOKEN_ARN B ON A.R_TOKEN=B.R_TOKEN WHERE R_PROFILEID = 'SOME_VALUE'; ``` If you want for a single profileid, then use ``` WHERE R_PROFILEID = 'SOME_VALUE'; ``` If you want for a range of profileIds , ...
``` select b.r_arn, a.r_deviceType, a.r_profileid from r_profile_token a INNER JOIN r_token_arn b on a.r_token=b.r_token; ```
24,198,485
I have TABLE 1: `r_profile_token` Columns: ``` r_sequence int(45) AI PK r_profileid varchar(45) r_token varchar(300) r_deviceType int(1) r_date date r_time time ``` and TABLE 2: `r_token_arn` Columns: ``` r_token varchar(300) PK r_arn varchar(300) ``` I need a result ...
2014/06/13
[ "https://Stackoverflow.com/questions/24198485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3760915/" ]
Use a `WHERE` clause. ``` SELECT B.R_ARN, A.R_DEVICETYPE FROM COFFEE2.R_PROFILE_TOKEN A INNER JOIN COFFEE2.R_TOKEN_ARN B ON A.R_TOKEN=B.R_TOKEN WHERE R_PROFILEID = 'SOME_VALUE'; ``` If you want for a single profileid, then use ``` WHERE R_PROFILEID = 'SOME_VALUE'; ``` If you want for a range of profileIds , ...
You can try this Query against your requirements. ``` SELECT b.r_arn, a.r_deviceType , a.r_profileid FROM r_profile_token a INNER JOIN r_token_arn b ON a.r_token=b.r_token where r_profileid='profile name'; ```
24,198,485
I have TABLE 1: `r_profile_token` Columns: ``` r_sequence int(45) AI PK r_profileid varchar(45) r_token varchar(300) r_deviceType int(1) r_date date r_time time ``` and TABLE 2: `r_token_arn` Columns: ``` r_token varchar(300) PK r_arn varchar(300) ``` I need a result ...
2014/06/13
[ "https://Stackoverflow.com/questions/24198485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3760915/" ]
You can try this Query against your requirements. ``` SELECT b.r_arn, a.r_deviceType , a.r_profileid FROM r_profile_token a INNER JOIN r_token_arn b ON a.r_token=b.r_token where r_profileid='profile name'; ```
``` select b.r_arn, a.r_deviceType, a.r_profileid from r_profile_token a INNER JOIN r_token_arn b on a.r_token=b.r_token; ```
34,623,259
Very similar to [How to prevent jquery to override "this"](https://stackoverflow.com/questions/11053932/how-to-prevent-jquery-to-override-this) but in ES6. This is my class: ``` class FeedbackForm { constructor(formEl) { this.$form = $(formEl) this.$form.submit(this.sendStuff) this.alerts = $('#somethi...
2016/01/05
[ "https://Stackoverflow.com/questions/34623259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/404623/" ]
You can associate the `FeedbackForm` instance with the form element using a symbol. Then, inside the event listener, `this` or `e.currentTarget` will be the form element. Using the symbol you retrieve the `FeedbackForm` instance. ```js const myFeedbackForm = Symbol(); class FeedbackForm { constructor(formEl) { ...
Try initializing a second sort of storage variable from outside of the scope of both functions inside the main one: ``` var that; class FeedbackForm { constructor(formEl) { this.$form = $(formEl) this.alerts = $('#something'); that = this; this.$form.submit(this.sendStuff) } /** * Sends...
34,623,259
Very similar to [How to prevent jquery to override "this"](https://stackoverflow.com/questions/11053932/how-to-prevent-jquery-to-override-this) but in ES6. This is my class: ``` class FeedbackForm { constructor(formEl) { this.$form = $(formEl) this.$form.submit(this.sendStuff) this.alerts = $('#somethi...
2016/01/05
[ "https://Stackoverflow.com/questions/34623259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/404623/" ]
You can use an [arrow function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions): > > An arrow function expression (also known as fat arrow function) has a shorter syntax compared to function expressions **and lexically binds the this value** > > > This should do it: `...
Try initializing a second sort of storage variable from outside of the scope of both functions inside the main one: ``` var that; class FeedbackForm { constructor(formEl) { this.$form = $(formEl) this.alerts = $('#something'); that = this; this.$form.submit(this.sendStuff) } /** * Sends...
34,623,259
Very similar to [How to prevent jquery to override "this"](https://stackoverflow.com/questions/11053932/how-to-prevent-jquery-to-override-this) but in ES6. This is my class: ``` class FeedbackForm { constructor(formEl) { this.$form = $(formEl) this.$form.submit(this.sendStuff) this.alerts = $('#somethi...
2016/01/05
[ "https://Stackoverflow.com/questions/34623259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/404623/" ]
You can use an [arrow function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions): > > An arrow function expression (also known as fat arrow function) has a shorter syntax compared to function expressions **and lexically binds the this value** > > > This should do it: `...
You can associate the `FeedbackForm` instance with the form element using a symbol. Then, inside the event listener, `this` or `e.currentTarget` will be the form element. Using the symbol you retrieve the `FeedbackForm` instance. ```js const myFeedbackForm = Symbol(); class FeedbackForm { constructor(formEl) { ...
42,644,261
I am trying to use rest api basic authentication and testing it through postman. On the authorization field, I used Type as Basic Auth and used the username and password in the field as in image below: [![enter image description here](https://i.stack.imgur.com/elB1G.png)](https://i.stack.imgur.com/elB1G.png) Then it a...
2017/03/07
[ "https://Stackoverflow.com/questions/42644261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5182454/" ]
just copy paste this code and you get your output in this format ==> > > Basic YWRtaW46YWRtaW4= > > > ``` $token = $this->input->get_request_header('Authorization'); print_r($token); die; ```
What I understand is you want to print the value from the header. There is a way to print it to the console or to the Test tab. ``` var (name) = postman.getResponseHeader("value-you-want-to-print"); // to console console.log((name)); // to Test tests[(name)] = (name); ```
32,459,606
I have a few integer lists of different length of which I want to preserve the order. I will be using them as alternative to each other, never 2 at the same time. The number of lists might grow in the future, although I expect it never to reach a value like 50 or so. I might want to insert one value within this list. T...
2015/09/08
[ "https://Stackoverflow.com/questions/32459606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2436175/" ]
Relational databases like SQL Server typically don't have "arrays" or "lists" - if you need to store more than one value - they have **tables** for that. And no - it's in no way *cumbersome* for a database like SQL Server to have even **thousands** of tables - if you really must..... After all - handling tables is the ...
A kind of this? ``` ListId ItemOrder ItemValue 1 1 10 1 4 7 1 2 5 2 1 55 1 7 23 2 4 15 Select ItemValue FROM [Table] WHERE ListId = 1 Order By ItemOrder ``` Here Each list has an ID (you can use a clustered index here) and t...
306,520
I was trying to get some insight into how to solve *non-linear regression* model problems. Unfortunately, I've never attended a lecture on statistical math. Here is the [link](http://hspm.sph.sc.edu/courses/J716/pdf/716-5%20Non-linear%20regression.pdf): In page number 4, they said, calculate the least square regressi...
2013/02/17
[ "https://math.stackexchange.com/questions/306520", "https://math.stackexchange.com", "https://math.stackexchange.com/users/62706/" ]
Hints: 1) Show the set $\,M:=\{r\in R\;\;;\;r\,\,\,\text{is not invertible}\}$ is an ideal in $\,R\,$ 2) Deduce $\,M\,$ is a maximal ideal (and, in fact, the *only* maximal ideal) of $\,R\,$ Your ring $\,R\,$ is what's called a [local ring](http://en.wikipedia.org/wiki/Local_ring) , a rather important class of rings...
**Hint** $\ $ Every prime $\rm\:p \ne 3\:$ becomes a unit in $\rm\,R\,$ since $\rm\:1/p\in R.\:$ But the prime $\rm\,p = 3\,$ is not a unit in $\rm\,R\,$ since $\rm\,1/3\not\in R.\:$ Hence $\rm\ (n) = (2^a 3^b 5^c\cdots) = (3^b)\:$ in $\rm\,R,\,$ and $\rm\,3\nmid 1\:\Rightarrow\:3^b\nmid 1.$
306,520
I was trying to get some insight into how to solve *non-linear regression* model problems. Unfortunately, I've never attended a lecture on statistical math. Here is the [link](http://hspm.sph.sc.edu/courses/J716/pdf/716-5%20Non-linear%20regression.pdf): In page number 4, they said, calculate the least square regressi...
2013/02/17
[ "https://math.stackexchange.com/questions/306520", "https://math.stackexchange.com", "https://math.stackexchange.com/users/62706/" ]
Hints: 1) Show the set $\,M:=\{r\in R\;\;;\;r\,\,\,\text{is not invertible}\}$ is an ideal in $\,R\,$ 2) Deduce $\,M\,$ is a maximal ideal (and, in fact, the *only* maximal ideal) of $\,R\,$ Your ring $\,R\,$ is what's called a [local ring](http://en.wikipedia.org/wiki/Local_ring) , a rather important class of rings...
Step 1: Let $I$ be an ideal in $R$. Show that $\mathfrak{i} = I \cap \mathbb{Z}$ is an ideal of $\mathbb{Z}$ and that $I = \{ \frac{i}{s} \ | \ i \in \mathfrak{i}, s \in \mathbb{Z}^+, \ 3 \nmid s \}$. Deduce that if $\mathfrak{i} = n \mathbb{Z}$, then $I = n R$. Thus all ideals of $R$ are principal and generated by ele...
306,520
I was trying to get some insight into how to solve *non-linear regression* model problems. Unfortunately, I've never attended a lecture on statistical math. Here is the [link](http://hspm.sph.sc.edu/courses/J716/pdf/716-5%20Non-linear%20regression.pdf): In page number 4, they said, calculate the least square regressi...
2013/02/17
[ "https://math.stackexchange.com/questions/306520", "https://math.stackexchange.com", "https://math.stackexchange.com/users/62706/" ]
Step 1: Let $I$ be an ideal in $R$. Show that $\mathfrak{i} = I \cap \mathbb{Z}$ is an ideal of $\mathbb{Z}$ and that $I = \{ \frac{i}{s} \ | \ i \in \mathfrak{i}, s \in \mathbb{Z}^+, \ 3 \nmid s \}$. Deduce that if $\mathfrak{i} = n \mathbb{Z}$, then $I = n R$. Thus all ideals of $R$ are principal and generated by ele...
**Hint** $\ $ Every prime $\rm\:p \ne 3\:$ becomes a unit in $\rm\,R\,$ since $\rm\:1/p\in R.\:$ But the prime $\rm\,p = 3\,$ is not a unit in $\rm\,R\,$ since $\rm\,1/3\not\in R.\:$ Hence $\rm\ (n) = (2^a 3^b 5^c\cdots) = (3^b)\:$ in $\rm\,R,\,$ and $\rm\,3\nmid 1\:\Rightarrow\:3^b\nmid 1.$
1,970,786
To find max/min of $(\sin p+\cos p)^{10}$. I have to find value of $p$ such that the expression is max/min. I tried to manipulate expression so as to get rid of at least $\sin$ or $\cos$. Then I can put what is left over equals to $1$ to get the maximum. But I'm unable to do that.
2016/10/16
[ "https://math.stackexchange.com/questions/1970786", "https://math.stackexchange.com", "https://math.stackexchange.com/users/261331/" ]
Hint: $$ \sin p+\cos p=\sqrt{2}\sin\left(p+\frac{\pi}{4}\right) $$
$(\sin p + \cos p)^{10} = (\sin^2 p + 2\sin p\cos p + \cos^2 p)^5 = (1+\sin 2p)^5$ Function $x\mapsto (1+x)^5$ is monotone increasing, thus, extremes of $(1+\sin 2p)^5$ are the same as extremes of $\sin 2p$.
1,970,786
To find max/min of $(\sin p+\cos p)^{10}$. I have to find value of $p$ such that the expression is max/min. I tried to manipulate expression so as to get rid of at least $\sin$ or $\cos$. Then I can put what is left over equals to $1$ to get the maximum. But I'm unable to do that.
2016/10/16
[ "https://math.stackexchange.com/questions/1970786", "https://math.stackexchange.com", "https://math.stackexchange.com/users/261331/" ]
Hint: $$ \sin p+\cos p=\sqrt{2}\sin\left(p+\frac{\pi}{4}\right) $$
Another way would be this \begin{aligned} (\sin p + \cos p)^{10} &= (\sin p + \cos p)^{2\times5}\\ &=(\sin^2p+\cos^2p+2\sin p\cos p)^5\\ &=(1+\sin{2p})^5 \end{aligned} Since $-1\leq \sin{2p}\leq 1$ then $$0\leq(1+\sin{2p})^5=(\sin p + \cos p)^{10}\leq32$$ where $p=-\pi/4$ and $p=\pi/4$ correspond to the minimum and max...
43,995,848
I want to add tooltip for title and subtitle for `highcharts`. Here is my JS Fiddle [JSFiddle](https://jsfiddle.net/v9n67zvx/9)
2017/05/16
[ "https://Stackoverflow.com/questions/43995848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3937114/" ]
Highcharts does not have hooks for title/subtitle events. You need to set events for mouseover/mouseout, build the tooltip and toggle its visibility. on chart's load ``` var title = document.querySelector('.highcharts-title') var tooltip = document.createElement('span') tooltip.setAttribute('class', 'tooltip') toolti...
``` title: { text: 'example', useHTML: true, widthAdjust: -400 }, subtitle: { text: 'Example1', useHTML: true , widthAdjust: -400 }, ```
38,491,171
I am using a modified version of a query similiar to another question here:[Convert SQL Server query to MySQL](https://stackoverflow.com/questions/5522433/convert-sql-server-query-to-mysql/5522462#5522462) ``` Select * from ( SELECT tbl.*, @counter := @counter +1 counter FROM (select @counter:=0) initvar, tbl Where c...
2016/07/20
[ "https://Stackoverflow.com/questions/38491171", "https://Stackoverflow.com", "https://Stackoverflow.com/users/455582/" ]
You need to do the enumeration for each client: ``` SELECT * FROM (SELECT tbl.*, @counter := @counter +1 counter (@rn := if(@c = client_id, @rn + 1, if(@c := client_id, 1, 1) ) ) FROM (select @c := -1, @rn := 0) initvar CROSS JOIN tbl ...
Using Gordon's answer as a starting point, I think this might be closer to what you need. ``` SELECT t.* , (@counter := @counter+1) AS overallRow , (@clientRow := if(@prevClient = t.client_id, @clientRow + 1, if(@prevClient := t.client_id, 1, 1) -- This just updates @prevClient without creating...
194,167
I have a list of Accounts (think possibly dozens or low hundreds) and some end user who wants to just click one button to have all the reports of a certain format generated for them instead of needing to navigate to a different webpage for each item to then click some "generate X" button. So, for example I have a lis...
2017/10/01
[ "https://salesforce.stackexchange.com/questions/194167", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/49458/" ]
Printing pretty PDFs in Visualforce is a kind of art. Takes a while to produce something pleasant to look that will also behave OK. For example your single print of Account record might take 3 pages. If you bulk print several accounts - you don't want last one to display "*page 10 of 12, 11 of 12, 12 of 12*". You want ...
I gather this is a Visualforce-based PDF template. Do you want the result PDFs to get attached to some record? Do you want them to be e-mailed? Do you want existing ones to get re-created/duplicated upon that action? Do you want them all to end up in the same PDF file, or separate? In any case it is possible. Dependi...
12,659,417
from java.lang.StringCoding : ``` String csn = (charsetName == null) ? "ISO-8859-1" : charsetName; ``` This is what is used from Java.lang.getBytes() , in linux jdk 7 I was always under the impression that UTF-8 is the default charset ? Thanks
2012/09/30
[ "https://Stackoverflow.com/questions/12659417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190032/" ]
It is a bit complicated ... --------------------------- Java ***tries*** to use the default character encoding to return bytes using String.getBytes(). * The default charset is provided by the system file.encoding property. * This is cached and there is no use in changing it via the System.setProperty(..) after the J...
That's for compatibility reason. Historically, all java methods on Windows and Unix not specifying a charset were using the common one at the time, that is `"ISO-8859-1"`. As mentioned by Isaac and the javadoc, the default platform encoding is used (see [Charset.java](http://grepcode.com/file/repository.grepcode.com/...
12,659,417
from java.lang.StringCoding : ``` String csn = (charsetName == null) ? "ISO-8859-1" : charsetName; ``` This is what is used from Java.lang.getBytes() , in linux jdk 7 I was always under the impression that UTF-8 is the default charset ? Thanks
2012/09/30
[ "https://Stackoverflow.com/questions/12659417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190032/" ]
The parameterless `String.getBytes()` method *doesn't* use ISO-8859-1 by default. It will use the default platform encoding, if that can be determined. If, however, that's either missing or is an unrecognized encoding, it falls back to ISO-8859-1 as a "default default". You should *very* rarely see this in practice. N...
That's for compatibility reason. Historically, all java methods on Windows and Unix not specifying a charset were using the common one at the time, that is `"ISO-8859-1"`. As mentioned by Isaac and the javadoc, the default platform encoding is used (see [Charset.java](http://grepcode.com/file/repository.grepcode.com/...
12,659,417
from java.lang.StringCoding : ``` String csn = (charsetName == null) ? "ISO-8859-1" : charsetName; ``` This is what is used from Java.lang.getBytes() , in linux jdk 7 I was always under the impression that UTF-8 is the default charset ? Thanks
2012/09/30
[ "https://Stackoverflow.com/questions/12659417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190032/" ]
That's for compatibility reason. Historically, all java methods on Windows and Unix not specifying a charset were using the common one at the time, that is `"ISO-8859-1"`. As mentioned by Isaac and the javadoc, the default platform encoding is used (see [Charset.java](http://grepcode.com/file/repository.grepcode.com/...
Elaborate on Skeet's answer (which is of course the correct one) In [java.lang.String](http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/String.java#993)'s source `getBytes()` calls `StringCoding.encode(char[] ca, int off, int len)` which has on its first line : ``` String csn = C...
12,659,417
from java.lang.StringCoding : ``` String csn = (charsetName == null) ? "ISO-8859-1" : charsetName; ``` This is what is used from Java.lang.getBytes() , in linux jdk 7 I was always under the impression that UTF-8 is the default charset ? Thanks
2012/09/30
[ "https://Stackoverflow.com/questions/12659417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190032/" ]
It is a bit complicated ... --------------------------- Java ***tries*** to use the default character encoding to return bytes using String.getBytes(). * The default charset is provided by the system file.encoding property. * This is cached and there is no use in changing it via the System.setProperty(..) after the J...
The parameterless `String.getBytes()` method *doesn't* use ISO-8859-1 by default. It will use the default platform encoding, if that can be determined. If, however, that's either missing or is an unrecognized encoding, it falls back to ISO-8859-1 as a "default default". You should *very* rarely see this in practice. N...
12,659,417
from java.lang.StringCoding : ``` String csn = (charsetName == null) ? "ISO-8859-1" : charsetName; ``` This is what is used from Java.lang.getBytes() , in linux jdk 7 I was always under the impression that UTF-8 is the default charset ? Thanks
2012/09/30
[ "https://Stackoverflow.com/questions/12659417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190032/" ]
It is a bit complicated ... --------------------------- Java ***tries*** to use the default character encoding to return bytes using String.getBytes(). * The default charset is provided by the system file.encoding property. * This is cached and there is no use in changing it via the System.setProperty(..) after the J...
Elaborate on Skeet's answer (which is of course the correct one) In [java.lang.String](http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/String.java#993)'s source `getBytes()` calls `StringCoding.encode(char[] ca, int off, int len)` which has on its first line : ``` String csn = C...
12,659,417
from java.lang.StringCoding : ``` String csn = (charsetName == null) ? "ISO-8859-1" : charsetName; ``` This is what is used from Java.lang.getBytes() , in linux jdk 7 I was always under the impression that UTF-8 is the default charset ? Thanks
2012/09/30
[ "https://Stackoverflow.com/questions/12659417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190032/" ]
The parameterless `String.getBytes()` method *doesn't* use ISO-8859-1 by default. It will use the default platform encoding, if that can be determined. If, however, that's either missing or is an unrecognized encoding, it falls back to ISO-8859-1 as a "default default". You should *very* rarely see this in practice. N...
Elaborate on Skeet's answer (which is of course the correct one) In [java.lang.String](http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/String.java#993)'s source `getBytes()` calls `StringCoding.encode(char[] ca, int off, int len)` which has on its first line : ``` String csn = C...
53,623,263
In oracle is it possible to join a static list to a table? The list I have is something like this ``` ID 1 2 3 4 5 6 ``` I don't want to create a table for this list But then I want to join the list to an existing table that has the ID's in it... hoping to do a left join with the list Is this possible?
2018/12/05
[ "https://Stackoverflow.com/questions/53623263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2206329/" ]
You are lookig for a `WITH` clause that contains `UNION`s of `SELECT FROM DUAL`. Like : ``` WITH my_list AS ( select 'A' my_value from dual UNION ALL select 'B' my_value from dual UNION ALL select 'C' my_value from dual ) SELECT * FROM my_list LEFT JOIN my_table ON my_table.my_field = my_list...
You can generate the ID list in a CTE and then join it to whatever you want. ``` with id_list as ( select rownum as id from dual connect by level <= 6 ) select * from id_list; ID 1 2 3 4 5 6 ``` <https://livesql.oracle.com/apex/livesql/s/hm2mczgx5udiig9vhryo86mfm>
3,479,490
C# Visual Studio 2010 I am loading a complex html page into a webbrowser control. But, I don't have the ability to modify the webpage. I want to click a link on the page automatically from the windows form. But, the ID appears to be randomly generated each time the page is loaded (so I believe referencing the ID will ...
2010/08/13
[ "https://Stackoverflow.com/questions/3479490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/419038/" ]
Something like this should work: ``` HtmlElement link = webBrowser.Document.GetElementByID("u_lp_id_58547") link.InvokeMember("Click") ``` EDIT: Since the IDs are generated randomly, another option may be to identify the links by their `InnerText`; along these lines. ``` HtmlElementCollection links = webBrowser.D...
Perhaps you will have to isolate the link ID value using more of the surrounding HTML context as a "target" and then extract the new random ID. In the past I have used the "[HtmlAgilityPack](http://htmlagilitypack.codeplex.com/)" to easily parse "screen-scraped" HTML to isolate areas of interest within a page - this l...
34,933
I want to use `<S-Tab>` to do the reverse of `<Tab>` in insert mode in Lua. (If this is complicated in Lua then VimScript is OK) How?
2021/11/09
[ "https://vi.stackexchange.com/questions/34933", "https://vi.stackexchange.com", "https://vi.stackexchange.com/users/10189/" ]
Is `<C-d>` what you want? `:h i_CTRL-D` ``` *i_CTRL-D* CTRL-D Delete one shiftwidth of indent at the start of the current line. The indent is always rounded to a 'shiftwidth' (this is vi compatible). ``` If so ``` inoremap <S-Tab> <C-d> ```
``` vim.api.nvim_set_keymap('i', '<S-Tab>', "v:lua.check_back_space() ? '<BS>' : '<NOP>'", EXPR_NOREF_NOERR_TRUNC) ``` where `EXPR_...` is ``` local EXPR_NOREF_NOERR_TRUNC = { expr = true, noremap = true, silent = true, nowait = true } ``` and `check_back_space` can be implemented easily.
55,452,576
I am trying to make a horizontal "navigation bar" of some sort, and can't figure out how to center the table I'm using. Is the table the right way to do it and if so, how would I go about centering it properly? This is my CSS ```css table.topbar { width: 100%; height: 100px; background-color: #efc700; margin:...
2019/04/01
[ "https://Stackoverflow.com/questions/55452576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11290639/" ]
Use flexbox ```css nav { display: flex; justify-content: space-between; } ``` ```html <nav> <a href="#">Home</a> <a href="#">About</a> <a href="#">Contact</a> </nav> ```
You can use [Bootstrap](https://getbootstrap.com/) library. There are lots of table templates are given. You can use one of them. I also put code on fiddle you check link below. Hope it will help. ``` [2]: https://jsfiddle.net/anshulsharma989/ykw0mj93/1/ ``` **Edit: Core HTML and CSS implementation.** **HTML CODE:...
55,452,576
I am trying to make a horizontal "navigation bar" of some sort, and can't figure out how to center the table I'm using. Is the table the right way to do it and if so, how would I go about centering it properly? This is my CSS ```css table.topbar { width: 100%; height: 100px; background-color: #efc700; margin:...
2019/04/01
[ "https://Stackoverflow.com/questions/55452576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11290639/" ]
Use flexbox ```css nav { display: flex; justify-content: space-between; } ``` ```html <nav> <a href="#">Home</a> <a href="#">About</a> <a href="#">Contact</a> </nav> ```
Mmm... you can use unordered list with css too . Here's an example: ```html <!DOCTYPE html> <html> <head> <style> ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #333; } li { float:left; width: 33.3%; } li a { display: block; color: white; ...
55,452,576
I am trying to make a horizontal "navigation bar" of some sort, and can't figure out how to center the table I'm using. Is the table the right way to do it and if so, how would I go about centering it properly? This is my CSS ```css table.topbar { width: 100%; height: 100px; background-color: #efc700; margin:...
2019/04/01
[ "https://Stackoverflow.com/questions/55452576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11290639/" ]
Use flexbox ```css nav { display: flex; justify-content: space-between; } ``` ```html <nav> <a href="#">Home</a> <a href="#">About</a> <a href="#">Contact</a> </nav> ```
Make it simple by using `Flex` just add below **CSS** will resolve your issue. Thanks ``` tr { display: flex; align-items: center; height: 100%; justify-content: space-around; } ```
11,493,590
I use jQuery ajax to refresh a div every 2 seconds. How to stop this refresh after 60 seconds (example, if user is inactive) ? ``` setInterval(function() { $.ajax({ url: "feeds.php", cache: false }).done(function( html ) { $('#feeds').replaceWith('<div id="feeds">'+html+'</div>'); }); }, 2000); ``` ...
2012/07/15
[ "https://Stackoverflow.com/questions/11493590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1527134/" ]
Assign the setInterval handle to a variable, which you will use to clear it after 60 seconds. ``` var interval = setInterval(function(){ ... }, 2000); // start a 60 second timer setTimeout(function(){ window.clearInterval(interval); }, 60000); ```
Not so hard. ``` var myInterval = setInterval(function(){},2000); setTimeout(function() { clearInterval( myInterval ); } ``` I'm not sure if this has leaks.
11,493,590
I use jQuery ajax to refresh a div every 2 seconds. How to stop this refresh after 60 seconds (example, if user is inactive) ? ``` setInterval(function() { $.ajax({ url: "feeds.php", cache: false }).done(function( html ) { $('#feeds').replaceWith('<div id="feeds">'+html+'</div>'); }); }, 2000); ``` ...
2012/07/15
[ "https://Stackoverflow.com/questions/11493590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1527134/" ]
Assign the setInterval handle to a variable, which you will use to clear it after 60 seconds. ``` var interval = setInterval(function(){ ... }, 2000); // start a 60 second timer setTimeout(function(){ window.clearInterval(interval); }, 60000); ```
``` //store the ajax call into a variable var chr = $.ajax({ .....} //use setTimeout to invoke its abort() method after 1000 ms (1 second) setTimeout(function(){ chr.abort() }, 1000); ```
12,249,437
> > **Possible Duplicate:** > > [What's the @ in front of a string in C#?](https://stackoverflow.com/questions/556133/whats-the-in-front-of-a-string-in-c) > > > why do we use `@` to replace `\` with another string using `string.replace(@"\","$$")` i'm using `C#` windows application
2012/09/03
[ "https://Stackoverflow.com/questions/12249437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426157/" ]
The `@` in front of a string literal makes it a [*verbatim string literal*](http://msdn.microsoft.com/en-us/library/aa691090%28v=vs.71%29.aspx), so the backslash `\` does not need to be doubled. You can use `"\\"` instead of `@"\"` for the same effect.
Because if you didn't, you'd have to escape `\` with `\\` `@` is used to what's called [verbatim strings](http://msdn.microsoft.com/en-us/library/aa691090%28v=vs.71%29.aspx)
12,249,437
> > **Possible Duplicate:** > > [What's the @ in front of a string in C#?](https://stackoverflow.com/questions/556133/whats-the-in-front-of-a-string-in-c) > > > why do we use `@` to replace `\` with another string using `string.replace(@"\","$$")` i'm using `C#` windows application
2012/09/03
[ "https://Stackoverflow.com/questions/12249437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426157/" ]
Because if you didn't, you'd have to escape `\` with `\\` `@` is used to what's called [verbatim strings](http://msdn.microsoft.com/en-us/library/aa691090%28v=vs.71%29.aspx)
Because the backslash is treated as an escape character and you would get an 'Unrecognised escape sequence' error if you didn't use '@'. Using '@' tells the compiler to ignore escape characters. [this](http://www.c-sharpcorner.com/uploadfile/hirendra_singh/verbatim-strings-in-C-Sharp-use-of-symbol-in-string-literals/) ...
12,249,437
> > **Possible Duplicate:** > > [What's the @ in front of a string in C#?](https://stackoverflow.com/questions/556133/whats-the-in-front-of-a-string-in-c) > > > why do we use `@` to replace `\` with another string using `string.replace(@"\","$$")` i'm using `C#` windows application
2012/09/03
[ "https://Stackoverflow.com/questions/12249437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426157/" ]
Because if you didn't, you'd have to escape `\` with `\\` `@` is used to what's called [verbatim strings](http://msdn.microsoft.com/en-us/library/aa691090%28v=vs.71%29.aspx)
The [C# Language Specification](http://go.microsoft.com/fwlink/?LinkId=199552) 2.4.4.5 String literals states: > > C# supports two forms of string literals: regular string literals and > verbatim string literals. > > > A regular string literal consists of zero or more characters enclosed > in double quotes, as in...
12,249,437
> > **Possible Duplicate:** > > [What's the @ in front of a string in C#?](https://stackoverflow.com/questions/556133/whats-the-in-front-of-a-string-in-c) > > > why do we use `@` to replace `\` with another string using `string.replace(@"\","$$")` i'm using `C#` windows application
2012/09/03
[ "https://Stackoverflow.com/questions/12249437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426157/" ]
The `@` in front of a string literal makes it a [*verbatim string literal*](http://msdn.microsoft.com/en-us/library/aa691090%28v=vs.71%29.aspx), so the backslash `\` does not need to be doubled. You can use `"\\"` instead of `@"\"` for the same effect.
In C#, you can prefix a string with `@` to make it verbatim, so you don't need to escape special characters. ``` @"\" ``` is identical to ``` "\\" ```
12,249,437
> > **Possible Duplicate:** > > [What's the @ in front of a string in C#?](https://stackoverflow.com/questions/556133/whats-the-in-front-of-a-string-in-c) > > > why do we use `@` to replace `\` with another string using `string.replace(@"\","$$")` i'm using `C#` windows application
2012/09/03
[ "https://Stackoverflow.com/questions/12249437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426157/" ]
The `@` in front of a string literal makes it a [*verbatim string literal*](http://msdn.microsoft.com/en-us/library/aa691090%28v=vs.71%29.aspx), so the backslash `\` does not need to be doubled. You can use `"\\"` instead of `@"\"` for the same effect.
Because the backslash is treated as an escape character and you would get an 'Unrecognised escape sequence' error if you didn't use '@'. Using '@' tells the compiler to ignore escape characters. [this](http://www.c-sharpcorner.com/uploadfile/hirendra_singh/verbatim-strings-in-C-Sharp-use-of-symbol-in-string-literals/) ...
12,249,437
> > **Possible Duplicate:** > > [What's the @ in front of a string in C#?](https://stackoverflow.com/questions/556133/whats-the-in-front-of-a-string-in-c) > > > why do we use `@` to replace `\` with another string using `string.replace(@"\","$$")` i'm using `C#` windows application
2012/09/03
[ "https://Stackoverflow.com/questions/12249437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426157/" ]
The `@` in front of a string literal makes it a [*verbatim string literal*](http://msdn.microsoft.com/en-us/library/aa691090%28v=vs.71%29.aspx), so the backslash `\` does not need to be doubled. You can use `"\\"` instead of `@"\"` for the same effect.
The [C# Language Specification](http://go.microsoft.com/fwlink/?LinkId=199552) 2.4.4.5 String literals states: > > C# supports two forms of string literals: regular string literals and > verbatim string literals. > > > A regular string literal consists of zero or more characters enclosed > in double quotes, as in...
12,249,437
> > **Possible Duplicate:** > > [What's the @ in front of a string in C#?](https://stackoverflow.com/questions/556133/whats-the-in-front-of-a-string-in-c) > > > why do we use `@` to replace `\` with another string using `string.replace(@"\","$$")` i'm using `C#` windows application
2012/09/03
[ "https://Stackoverflow.com/questions/12249437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426157/" ]
In C#, you can prefix a string with `@` to make it verbatim, so you don't need to escape special characters. ``` @"\" ``` is identical to ``` "\\" ```
Because the backslash is treated as an escape character and you would get an 'Unrecognised escape sequence' error if you didn't use '@'. Using '@' tells the compiler to ignore escape characters. [this](http://www.c-sharpcorner.com/uploadfile/hirendra_singh/verbatim-strings-in-C-Sharp-use-of-symbol-in-string-literals/) ...
12,249,437
> > **Possible Duplicate:** > > [What's the @ in front of a string in C#?](https://stackoverflow.com/questions/556133/whats-the-in-front-of-a-string-in-c) > > > why do we use `@` to replace `\` with another string using `string.replace(@"\","$$")` i'm using `C#` windows application
2012/09/03
[ "https://Stackoverflow.com/questions/12249437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426157/" ]
In C#, you can prefix a string with `@` to make it verbatim, so you don't need to escape special characters. ``` @"\" ``` is identical to ``` "\\" ```
The [C# Language Specification](http://go.microsoft.com/fwlink/?LinkId=199552) 2.4.4.5 String literals states: > > C# supports two forms of string literals: regular string literals and > verbatim string literals. > > > A regular string literal consists of zero or more characters enclosed > in double quotes, as in...
12,249,437
> > **Possible Duplicate:** > > [What's the @ in front of a string in C#?](https://stackoverflow.com/questions/556133/whats-the-in-front-of-a-string-in-c) > > > why do we use `@` to replace `\` with another string using `string.replace(@"\","$$")` i'm using `C#` windows application
2012/09/03
[ "https://Stackoverflow.com/questions/12249437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1426157/" ]
The [C# Language Specification](http://go.microsoft.com/fwlink/?LinkId=199552) 2.4.4.5 String literals states: > > C# supports two forms of string literals: regular string literals and > verbatim string literals. > > > A regular string literal consists of zero or more characters enclosed > in double quotes, as in...
Because the backslash is treated as an escape character and you would get an 'Unrecognised escape sequence' error if you didn't use '@'. Using '@' tells the compiler to ignore escape characters. [this](http://www.c-sharpcorner.com/uploadfile/hirendra_singh/verbatim-strings-in-C-Sharp-use-of-symbol-in-string-literals/) ...
34,460,820
I've got several divs stacked up using ng-repeat. I'm using ng-leave to slide a div up when it is deleted. What I'd like is for all of the divs below the deleted one to slide up with the deleted one, so there is never any empty space. As I have it, the deleted div leaves an empty space where it was during the 1s trans...
2015/12/25
[ "https://Stackoverflow.com/questions/34460820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5585657/" ]
With Git 2.20 Q4 2018), [`git submodule`](https://git-scm.com/docs/git-submodule) will be notably *faster* because "`git submodule update`" is getting rewritten piece-by-piece into C. See [commit ee69b2a](https://github.com/git/git/commit/ee69b2a90c5031bffb3341c5e50653a6ecca89ac), [commit 74d4731](https://github.com/...
Since there is no change to actually checkout and copy, that leaves two main root causes: * the url of the submodule is slow to respond * or `git submodule update` was optimized since the old git 1.9: see if the issue persists [with the latest git 2.6.4](https://launchpad.net/~git-core/+archive/ubuntu/ppa) found in th...
34,460,820
I've got several divs stacked up using ng-repeat. I'm using ng-leave to slide a div up when it is deleted. What I'd like is for all of the divs below the deleted one to slide up with the deleted one, so there is never any empty space. As I have it, the deleted div leaves an empty space where it was during the 1s trans...
2015/12/25
[ "https://Stackoverflow.com/questions/34460820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5585657/" ]
Since there is no change to actually checkout and copy, that leaves two main root causes: * the url of the submodule is slow to respond * or `git submodule update` was optimized since the old git 1.9: see if the issue persists [with the latest git 2.6.4](https://launchpad.net/~git-core/+archive/ubuntu/ppa) found in th...
Another thing worth trying is the `--progress` option which shows the usual percentage progress like `git clone` would: ``` git submodule update --progress ``` Related: [How to show progress for submodule fetching?](https://stackoverflow.com/questions/32944468/how-to-show-progress-for-submodule-fetching)
34,460,820
I've got several divs stacked up using ng-repeat. I'm using ng-leave to slide a div up when it is deleted. What I'd like is for all of the divs below the deleted one to slide up with the deleted one, so there is never any empty space. As I have it, the deleted div leaves an empty space where it was during the 1s trans...
2015/12/25
[ "https://Stackoverflow.com/questions/34460820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5585657/" ]
With Git 2.20 Q4 2018), [`git submodule`](https://git-scm.com/docs/git-submodule) will be notably *faster* because "`git submodule update`" is getting rewritten piece-by-piece into C. See [commit ee69b2a](https://github.com/git/git/commit/ee69b2a90c5031bffb3341c5e50653a6ecca89ac), [commit 74d4731](https://github.com/...
The way I debug the process of updating submodules: ``` GIT_TRACE=1 GIT_CURL_VERBOSE=1 git submodule update ```
34,460,820
I've got several divs stacked up using ng-repeat. I'm using ng-leave to slide a div up when it is deleted. What I'd like is for all of the divs below the deleted one to slide up with the deleted one, so there is never any empty space. As I have it, the deleted div leaves an empty space where it was during the 1s trans...
2015/12/25
[ "https://Stackoverflow.com/questions/34460820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5585657/" ]
With Git 2.20 Q4 2018), [`git submodule`](https://git-scm.com/docs/git-submodule) will be notably *faster* because "`git submodule update`" is getting rewritten piece-by-piece into C. See [commit ee69b2a](https://github.com/git/git/commit/ee69b2a90c5031bffb3341c5e50653a6ecca89ac), [commit 74d4731](https://github.com/...
Another thing worth trying is the `--progress` option which shows the usual percentage progress like `git clone` would: ``` git submodule update --progress ``` Related: [How to show progress for submodule fetching?](https://stackoverflow.com/questions/32944468/how-to-show-progress-for-submodule-fetching)
34,460,820
I've got several divs stacked up using ng-repeat. I'm using ng-leave to slide a div up when it is deleted. What I'd like is for all of the divs below the deleted one to slide up with the deleted one, so there is never any empty space. As I have it, the deleted div leaves an empty space where it was during the 1s trans...
2015/12/25
[ "https://Stackoverflow.com/questions/34460820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5585657/" ]
The way I debug the process of updating submodules: ``` GIT_TRACE=1 GIT_CURL_VERBOSE=1 git submodule update ```
Another thing worth trying is the `--progress` option which shows the usual percentage progress like `git clone` would: ``` git submodule update --progress ``` Related: [How to show progress for submodule fetching?](https://stackoverflow.com/questions/32944468/how-to-show-progress-for-submodule-fetching)
48,802,412
I am getting error Unexpected request processing error when trying to get rates in sabre soap api. Here is my request xml: ``` <soapenv:Body> <ns:HotelRateDescriptionRQ ReturnHostCommand="false" Version="2.3.0"> <ns:AvailRequestSegment> <!--Optional:--> ...
2018/02/15
[ "https://Stackoverflow.com/questions/48802412", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2391947/" ]
I have fixed this problem, the problem because i use token from service TokenCreateRQ, it should use service SessionCreateRS
Possible Solutions: 1) have you set the ns: arrcordingly ? `xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"` 2) Did you set the service type in the header accordingly? `<eb:Service eb:type="OTA">HotelPr...
51,578,339
I would like to get the class of Foo< T >.class (exactly Foo < T>, neither T.class nor Foo.class) ``` public class A extends B<C<D>>{ public A() { super(C<D>.class); // not work } } ``` On StackOverflow has a instruction for obtaining generic class by injecting into constructor but it's not my case becaus...
2018/07/29
[ "https://Stackoverflow.com/questions/51578339", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4800811/" ]
Check the below code:- ``` private void addStampToImage(Bitmap originalBitmap) { int extraHeight = (int) (originalBitmap.getHeight() * 0.15); Bitmap newBitmap = Bitmap.createBitmap(originalBitmap.getWidth(), originalBitmap.getHeight() + extraHeight, Bitmap.Config.ARGB_8888); Canvas canvas = ...
try this one i think help to you /\*\* \* FOR WATER-MARK \*/ ``` public static Bitmap waterMark(Bitmap src, String watermark, Point location, int color, int alpha, int size, boolean underline) { int[] pixels = new int[100]; //get source image width and height int widthSreen = s...
1,536,757
If I'm working in a terminal window in Linux, is there a keyboard shortcut I can use to select output displayed on previous lines? If I select something with the mouse I can copy using `Ctrl` + `Shift` + `C`, but is there a way to select without using the mouse at all. I'm using either Gnome terminal or KDE konsole in ...
2009/10/08
[ "https://Stackoverflow.com/questions/1536757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/186248/" ]
You can use the `screen` application and enter copy mode with `Ctrl`+`a`, `Esc`. Start selecting text with `Space` and end selecting text with `Space`. Insert text with `Ctrl`+`a`, `]`
Screen and Emacs `M-x shell`, for example, allow for keyboard access to the scrollback buffer. This was also one of the features of Plan 9 (but I guess it was mouse-oriented, at least primarily); you might want to take a look at `9term` and/or Sam, the Plan 9 editor.
1,536,757
If I'm working in a terminal window in Linux, is there a keyboard shortcut I can use to select output displayed on previous lines? If I select something with the mouse I can copy using `Ctrl` + `Shift` + `C`, but is there a way to select without using the mouse at all. I'm using either Gnome terminal or KDE konsole in ...
2009/10/08
[ "https://Stackoverflow.com/questions/1536757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/186248/" ]
You can use the `screen` application and enter copy mode with `Ctrl`+`a`, `Esc`. Start selecting text with `Space` and end selecting text with `Space`. Insert text with `Ctrl`+`a`, `]`
Daniel Micay's [Termite](https://github.com/thestinger/termite/) sports a "selection mode". Pressing `Ctrl`+`Shift`+`Space` will activate it. It's got vim-like key bindings. `v` or `V` will select à la `vim`'s visual mode, `y` will yank, `Esc` will exit selection mode.
1,536,757
If I'm working in a terminal window in Linux, is there a keyboard shortcut I can use to select output displayed on previous lines? If I select something with the mouse I can copy using `Ctrl` + `Shift` + `C`, but is there a way to select without using the mouse at all. I'm using either Gnome terminal or KDE konsole in ...
2009/10/08
[ "https://Stackoverflow.com/questions/1536757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/186248/" ]
You can use the `screen` application and enter copy mode with `Ctrl`+`a`, `Esc`. Start selecting text with `Space` and end selecting text with `Space`. Insert text with `Ctrl`+`a`, `]`
`$ emacs -g '80x24' --eval '(term "/bin/bash")'` ``` C-c C-k char mode C-c C-j line mode C-space Selecting text in terminal without using the mouse M-w copy to X11 clipboard ``` C - Ctrl M - Alt
1,536,757
If I'm working in a terminal window in Linux, is there a keyboard shortcut I can use to select output displayed on previous lines? If I select something with the mouse I can copy using `Ctrl` + `Shift` + `C`, but is there a way to select without using the mouse at all. I'm using either Gnome terminal or KDE konsole in ...
2009/10/08
[ "https://Stackoverflow.com/questions/1536757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/186248/" ]
Daniel Micay's [Termite](https://github.com/thestinger/termite/) sports a "selection mode". Pressing `Ctrl`+`Shift`+`Space` will activate it. It's got vim-like key bindings. `v` or `V` will select à la `vim`'s visual mode, `y` will yank, `Esc` will exit selection mode.
Screen and Emacs `M-x shell`, for example, allow for keyboard access to the scrollback buffer. This was also one of the features of Plan 9 (but I guess it was mouse-oriented, at least primarily); you might want to take a look at `9term` and/or Sam, the Plan 9 editor.
1,536,757
If I'm working in a terminal window in Linux, is there a keyboard shortcut I can use to select output displayed on previous lines? If I select something with the mouse I can copy using `Ctrl` + `Shift` + `C`, but is there a way to select without using the mouse at all. I'm using either Gnome terminal or KDE konsole in ...
2009/10/08
[ "https://Stackoverflow.com/questions/1536757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/186248/" ]
Screen and Emacs `M-x shell`, for example, allow for keyboard access to the scrollback buffer. This was also one of the features of Plan 9 (but I guess it was mouse-oriented, at least primarily); you might want to take a look at `9term` and/or Sam, the Plan 9 editor.
`$ emacs -g '80x24' --eval '(term "/bin/bash")'` ``` C-c C-k char mode C-c C-j line mode C-space Selecting text in terminal without using the mouse M-w copy to X11 clipboard ``` C - Ctrl M - Alt
1,536,757
If I'm working in a terminal window in Linux, is there a keyboard shortcut I can use to select output displayed on previous lines? If I select something with the mouse I can copy using `Ctrl` + `Shift` + `C`, but is there a way to select without using the mouse at all. I'm using either Gnome terminal or KDE konsole in ...
2009/10/08
[ "https://Stackoverflow.com/questions/1536757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/186248/" ]
Daniel Micay's [Termite](https://github.com/thestinger/termite/) sports a "selection mode". Pressing `Ctrl`+`Shift`+`Space` will activate it. It's got vim-like key bindings. `v` or `V` will select à la `vim`'s visual mode, `y` will yank, `Esc` will exit selection mode.
`$ emacs -g '80x24' --eval '(term "/bin/bash")'` ``` C-c C-k char mode C-c C-j line mode C-space Selecting text in terminal without using the mouse M-w copy to X11 clipboard ``` C - Ctrl M - Alt
258,999
The following code runs perfectly fine when using the regular `latex` command. ``` \documentclass[a4paper,11pt]{book} \usepackage{hyperref} \renewcommand{\sectionautorefname}[1]{Section~} \begin{document} Test \end{document} ``` When running with `htlatex` however, the hyperref package stops early, and the `sectiona...
2015/08/06
[ "https://tex.stackexchange.com/questions/258999", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/37967/" ]
Try to move your redefinition after preamble, lot of stuff is done after preamble in `tex4ht`: ``` \documentclass[a4paper,11pt]{book} \usepackage{hyperref} \begin{document} \renewcommand{\sectionautorefname}[1]{my section~} \section{hello}\label{sec:hello} Test \autoref{sec:hello} \end{document} ``` [![enter image ...
I've used `\ifcsdef` which tests if a command is already defined (without `\`). If it's defined then use `\renewcommand` else `\newcommand` or `\providecommand`. ``` \documentclass[a4paper,11pt]{book} \usepackage{etoolbox} \usepackage{hyperref} \ifcsdef{sectionautorefname}{% \renewcommand{\sectionautorefname}[1]{...
2,342,358
I'm interested in the $F$-algebra $$F[x\_1, \dots, x\_n]/(x\_1^2, \dots, x\_n^2).$$ and its representations. Is there a name for this algebra? I was led to this while searching for commuting matrices $A\_1, \dots, A\_n$ such that $A\_i^2 = 0$ for each $i$, and $$A\_1 A\_2 \cdots A\_n \neq 0.$$ It's easy to find such ...
2017/06/30
[ "https://math.stackexchange.com/questions/2342358", "https://math.stackexchange.com", "https://math.stackexchange.com/users/125932/" ]
When we say the group $\mathbb{Z}\_4$, we're actually talking about $(\mathbb{Z}\_4, +)$, meaning the operation over the group is $+$, not $\times$. Thus, 1 is a generator, because every element of $\mathbb{Z}\_4$ can be written as $n \times 1= 1+1+1 + \dots$ Now you may ask, why wouldnt we give $\mathbb{Z}\_4$ the $\...
The number $1$ generates $\mathbb{Z}\_4$ because $\mathbb{Z}\_4=\{1,1+1,1+1+1,1+1+1+1\}$.
2,342,358
I'm interested in the $F$-algebra $$F[x\_1, \dots, x\_n]/(x\_1^2, \dots, x\_n^2).$$ and its representations. Is there a name for this algebra? I was led to this while searching for commuting matrices $A\_1, \dots, A\_n$ such that $A\_i^2 = 0$ for each $i$, and $$A\_1 A\_2 \cdots A\_n \neq 0.$$ It's easy to find such ...
2017/06/30
[ "https://math.stackexchange.com/questions/2342358", "https://math.stackexchange.com", "https://math.stackexchange.com/users/125932/" ]
The number $1$ generates $\mathbb{Z}\_4$ because $\mathbb{Z}\_4=\{1,1+1,1+1+1,1+1+1+1\}$.
Formally speaking, we *define* a group to be an **ordered pair** of a set $G$ coupled with a binary operation $\*$ and satisfies the group axioms, which we write as $(G,\*)$. In this case, our set is $\mathbb{Z}\_4$ (set of residues modulo $4$) and our operation is $+$, so we can write the group as $(\mathbb{Z}\_4,+)$....
2,342,358
I'm interested in the $F$-algebra $$F[x\_1, \dots, x\_n]/(x\_1^2, \dots, x\_n^2).$$ and its representations. Is there a name for this algebra? I was led to this while searching for commuting matrices $A\_1, \dots, A\_n$ such that $A\_i^2 = 0$ for each $i$, and $$A\_1 A\_2 \cdots A\_n \neq 0.$$ It's easy to find such ...
2017/06/30
[ "https://math.stackexchange.com/questions/2342358", "https://math.stackexchange.com", "https://math.stackexchange.com/users/125932/" ]
When we say the group $\mathbb{Z}\_4$, we're actually talking about $(\mathbb{Z}\_4, +)$, meaning the operation over the group is $+$, not $\times$. Thus, 1 is a generator, because every element of $\mathbb{Z}\_4$ can be written as $n \times 1= 1+1+1 + \dots$ Now you may ask, why wouldnt we give $\mathbb{Z}\_4$ the $\...
Formally speaking, we *define* a group to be an **ordered pair** of a set $G$ coupled with a binary operation $\*$ and satisfies the group axioms, which we write as $(G,\*)$. In this case, our set is $\mathbb{Z}\_4$ (set of residues modulo $4$) and our operation is $+$, so we can write the group as $(\mathbb{Z}\_4,+)$....
66,878,014
Im working on a larger project but I'm trying out a simpler version of countdown timer with only seconds and not minutes. Code below description So basically I have 60 seconds in html(id="initial"). I have button with a function called timer. In javascript i get the value in the h3 tag, by using parseint on the variab...
2021/03/30
[ "https://Stackoverflow.com/questions/66878014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13076656/" ]
They can run the script by running it from the directory where it is saved: ``` cd dir/with/script ./script.sh ``` Or ``` ~/bin/script.sh ``` If the script is saved in the bin directory in the home of the user.
Define a shell alias. For example, the following alias is called `x` and it executes `ls -alF *.py`: ```sh $ alias x="ls -alF *.py" ``` No files need to be written in order for a shell alias to be defined or used. Now you can type `x` into a shell prompt in the shell where you defined the alias, and it will return ...
66,878,014
Im working on a larger project but I'm trying out a simpler version of countdown timer with only seconds and not minutes. Code below description So basically I have 60 seconds in html(id="initial"). I have button with a function called timer. In javascript i get the value in the h3 tag, by using parseint on the variab...
2021/03/30
[ "https://Stackoverflow.com/questions/66878014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13076656/" ]
They can run the script by running it from the directory where it is saved: ``` cd dir/with/script ./script.sh ``` Or ``` ~/bin/script.sh ``` If the script is saved in the bin directory in the home of the user.
Your script can call a script within the same folder, to add an alias to the bash session and create variables for your script to run, this would be available for the duration of the bash session. Once you have ended this bash session, the alias and the variables, the script created would be lost.
4,160,007
I finished an application and the users want to "sex up the interaction feeling" by adding some sound samples that should be played when some specified acitons occur. For the programming point of view that isn't too difficult, but how do I get some good audio samples? How do you solve this problem? Create your own sou...
2010/11/11
[ "https://Stackoverflow.com/questions/4160007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can get some decent sounds from [flashkit](http://www.flashkit.com/soundfx/) - there is also some on [findsounds](http://www.findsounds.com/) and [freesounds](http://www.freesound.org/). Use these in conjunction with a simple audio editing program. I use [audacity](http://audacity.sourceforge.net/) (its for mac onl...
What kind of sound samples are you looking to find? Like individual instruments, like a drum kit, or sound effects? As far as editing goes, Reaper is the best free sound editor you can find.
4,160,007
I finished an application and the users want to "sex up the interaction feeling" by adding some sound samples that should be played when some specified acitons occur. For the programming point of view that isn't too difficult, but how do I get some good audio samples? How do you solve this problem? Create your own sou...
2010/11/11
[ "https://Stackoverflow.com/questions/4160007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
What kind of sound samples are you looking to find? Like individual instruments, like a drum kit, or sound effects? As far as editing goes, Reaper is the best free sound editor you can find.
We used a site called spinboom for some buttons and powerup sounds for an indie game with some friends. Not free though.. <https://www.spinboom.com/index.php/sound>
4,160,007
I finished an application and the users want to "sex up the interaction feeling" by adding some sound samples that should be played when some specified acitons occur. For the programming point of view that isn't too difficult, but how do I get some good audio samples? How do you solve this problem? Create your own sou...
2010/11/11
[ "https://Stackoverflow.com/questions/4160007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can get some decent sounds from [flashkit](http://www.flashkit.com/soundfx/) - there is also some on [findsounds](http://www.findsounds.com/) and [freesounds](http://www.freesound.org/). Use these in conjunction with a simple audio editing program. I use [audacity](http://audacity.sourceforge.net/) (its for mac onl...
We used a site called spinboom for some buttons and powerup sounds for an indie game with some friends. Not free though.. <https://www.spinboom.com/index.php/sound>
8,406,305
I am struggling to find a way to perform better linear regression. I have been using the [Moore-Penrose pseudoinverse](http://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_pseudoinverse) and [QR decomposition](http://en.wikipedia.org/wiki/Qr_decomposition) with [JAMA library](http://math.nist.gov/javanumerics/jama/), but...
2011/12/06
[ "https://Stackoverflow.com/questions/8406305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1062571/" ]
I don't fully understand your question, but I've used [Apache Commons Math](http://commons.apache.org/math/userguide/stat.html#a1.4_Simple_regression) to do linear regressions before.
If you want to use a more generic external tool for this, use Octave. I think it's more suitable for these kind of things. If not, take a look to: [Logistic Regression in Java](https://stackoverflow.com/questions/7182748/logistic-regression-in-java) Specifically: <http://commons.apache.org/math/userguide/overview.html...
7,200,475
I've tried many ways to manage RenderTransform within ScrollViewer (Windows Phone 7 Silverlight), but it seems to me almost impossible now. What I got is Grid with with its sizes inside ScrollViewer and I want to change grid's content size from code by RenderTransform by it do nothing! ``` <ScrollViewer x:Name="...
2011/08/26
[ "https://Stackoverflow.com/questions/7200475", "https://Stackoverflow.com", "https://Stackoverflow.com/users/676653/" ]
Better idea... put your Grid content into an ItemsControl, and perform a ScaleTransform on the ItemsControl. ``` <Grid> <ItemsControl x:Name="ContentScaler"> <Image x:Name="backgroundImage" Source="/Images/backgrounds/Happy rainbow.png" Stretch="Fill"/> </ItemsControl> </Grid> ``` And in the code-beh...
I'm not sure if this is exactly what you need but if you insert an extra grid like this... ``` <ScrollViewer Grid.Row="1" x:Name="scrollViewer" Width="800" Height="480" HorizontalScrollBarVisibility="Visible" VerticalSc...
5,185,137
I had an argument with my colleagues over the difference between 32-bit and 64-bit Excel 2007. I said the main difference is that in 64-bit version, we'll be able to add more than 65536 rows where as in 32-bit we won't be able to add more than 65536 rows. Please clarify this.
2011/03/03
[ "https://Stackoverflow.com/questions/5185137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/643517/" ]
No, both 32 and 64 bit versions support more than 65536 rows, and have done since Excel 2007 was released. The main difference is that you can work with very large workbooks in the 64 bit version. The downside of the 64 bit version is that, at present, there is poor support from 3rd party add-ins. **Update** This w...
The main difference is that the 32 bit version only has access to 2GB of memory. Very large integer calculations *might* also be faster in the 64 bit version. Both versions can deal with more than 65536 rows.
5,185,137
I had an argument with my colleagues over the difference between 32-bit and 64-bit Excel 2007. I said the main difference is that in 64-bit version, we'll be able to add more than 65536 rows where as in 32-bit we won't be able to add more than 65536 rows. Please clarify this.
2011/03/03
[ "https://Stackoverflow.com/questions/5185137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/643517/" ]
No, both 32 and 64 bit versions support more than 65536 rows, and have done since Excel 2007 was released. The main difference is that you can work with very large workbooks in the 64 bit version. The downside of the 64 bit version is that, at present, there is poor support from 3rd party add-ins. **Update** This w...
Excel 2007 has only a 32-bit version. Excel 2010 introduced the 64-bit option, which Microsoft actually doesn't recommend unless you really really need it for huge databases.
5,185,137
I had an argument with my colleagues over the difference between 32-bit and 64-bit Excel 2007. I said the main difference is that in 64-bit version, we'll be able to add more than 65536 rows where as in 32-bit we won't be able to add more than 65536 rows. Please clarify this.
2011/03/03
[ "https://Stackoverflow.com/questions/5185137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/643517/" ]
Excel 2007 has only a 32-bit version. Excel 2010 introduced the 64-bit option, which Microsoft actually doesn't recommend unless you really really need it for huge databases.
The main difference is that the 32 bit version only has access to 2GB of memory. Very large integer calculations *might* also be faster in the 64 bit version. Both versions can deal with more than 65536 rows.
5,735,712
I am new to Grails and Groovy however my problem is a simple but strange one. I am making calls to a remote web service as follows: ``` public Boolean addInvites(eventid,sessionkey ){ String url = this.API_URL+"AddInvites?apikey=${sessionkey}&eventid=${eventid}&userids[]=5&userids[]=23"; def call...
2011/04/20
[ "https://Stackoverflow.com/questions/5735712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/425810/" ]
Edit the first location and then use `.` to repeat the action at each additional location.
I'd reverse the order of your steps. Instead of marking each location, then performing the change on all at once, just edit the first location, then use `.` to do the same to each of the others. This doesn't add any keystrokes to your use case; instead of hitting some key to mark a spot beforehand, you hit `.` afterw...
28,699
I'm at a hallway filled with proximity mines and things are **not** going well. ![DANGER, DANGER](https://i.stack.imgur.com/bTseM.png) I've tried to crouch past them or in between them but they're very sensitive and I don't think that's a possibility. Shooting them sets them off without me getting killed but it's ala...
2011/08/25
[ "https://gaming.stackexchange.com/questions/28699", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1070/" ]
I just shot them. It "alarms" people, but they get over it, and it doesn't count as being "detected". I habitually alarm people in order to draw them away from their friends so I can put the beat down on them. I tried sneaking up on them a couple of times, but it didn't work worth a damn for me...I think partly becaus...
You can just shoot the mines and hide until alert passes
28,699
I'm at a hallway filled with proximity mines and things are **not** going well. ![DANGER, DANGER](https://i.stack.imgur.com/bTseM.png) I've tried to crouch past them or in between them but they're very sensitive and I don't think that's a possibility. Shooting them sets them off without me getting killed but it's ala...
2011/08/25
[ "https://gaming.stackexchange.com/questions/28699", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1070/" ]
It's not hard at all if you take these steps. In fact, if you do the following you can't even set them off accidentally (unless you jump or knock something over). 1. Press Caps Lock, or whatever key you've mapped for "Toggle Walk", to switch from fast movement to slow movement. 2. Crouch. 3. Shuffle over to the mine w...
I just shot them. It "alarms" people, but they get over it, and it doesn't count as being "detected". I habitually alarm people in order to draw them away from their friends so I can put the beat down on them. I tried sneaking up on them a couple of times, but it didn't work worth a damn for me...I think partly becaus...
28,699
I'm at a hallway filled with proximity mines and things are **not** going well. ![DANGER, DANGER](https://i.stack.imgur.com/bTseM.png) I've tried to crouch past them or in between them but they're very sensitive and I don't think that's a possibility. Shooting them sets them off without me getting killed but it's ala...
2011/08/25
[ "https://gaming.stackexchange.com/questions/28699", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1070/" ]
The solution to disabling mines is to walk incredibly slowly (as slowly as possible, then slower). You'll be able to disable and pick up the mine for placement/selling later. You could also disable them via explosion (see @Chris and @OrigamiRobot's answers), but that is not preferable for stealth.
You can just shoot the mines and hide until alert passes
28,699
I'm at a hallway filled with proximity mines and things are **not** going well. ![DANGER, DANGER](https://i.stack.imgur.com/bTseM.png) I've tried to crouch past them or in between them but they're very sensitive and I don't think that's a possibility. Shooting them sets them off without me getting killed but it's ala...
2011/08/25
[ "https://gaming.stackexchange.com/questions/28699", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1070/" ]
It's not hard at all if you take these steps. In fact, if you do the following you can't even set them off accidentally (unless you jump or knock something over). 1. Press Caps Lock, or whatever key you've mapped for "Toggle Walk", to switch from fast movement to slow movement. 2. Crouch. 3. Shuffle over to the mine w...
You can just shoot the mines and hide until alert passes
28,699
I'm at a hallway filled with proximity mines and things are **not** going well. ![DANGER, DANGER](https://i.stack.imgur.com/bTseM.png) I've tried to crouch past them or in between them but they're very sensitive and I don't think that's a possibility. Shooting them sets them off without me getting killed but it's ala...
2011/08/25
[ "https://gaming.stackexchange.com/questions/28699", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1070/" ]
It's not hard at all if you take these steps. In fact, if you do the following you can't even set them off accidentally (unless you jump or knock something over). 1. Press Caps Lock, or whatever key you've mapped for "Toggle Walk", to switch from fast movement to slow movement. 2. Crouch. 3. Shuffle over to the mine w...
The solution to disabling mines is to walk incredibly slowly (as slowly as possible, then slower). You'll be able to disable and pick up the mine for placement/selling later. You could also disable them via explosion (see @Chris and @OrigamiRobot's answers), but that is not preferable for stealth.
28,699
I'm at a hallway filled with proximity mines and things are **not** going well. ![DANGER, DANGER](https://i.stack.imgur.com/bTseM.png) I've tried to crouch past them or in between them but they're very sensitive and I don't think that's a possibility. Shooting them sets them off without me getting killed but it's ala...
2011/08/25
[ "https://gaming.stackexchange.com/questions/28699", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1070/" ]
It's not hard at all if you take these steps. In fact, if you do the following you can't even set them off accidentally (unless you jump or knock something over). 1. Press Caps Lock, or whatever key you've mapped for "Toggle Walk", to switch from fast movement to slow movement. 2. Crouch. 3. Shuffle over to the mine w...
I believe EMP grenades will disable them, but you would need quite a few of them to pull it off.
28,699
I'm at a hallway filled with proximity mines and things are **not** going well. ![DANGER, DANGER](https://i.stack.imgur.com/bTseM.png) I've tried to crouch past them or in between them but they're very sensitive and I don't think that's a possibility. Shooting them sets them off without me getting killed but it's ala...
2011/08/25
[ "https://gaming.stackexchange.com/questions/28699", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1070/" ]
I cannot find a way to disable mines either. In that spot, I picked up a barrel and threw it down the hall to safely trigger all the mines. This will alert a lot of people, however.
I just shot them. It "alarms" people, but they get over it, and it doesn't count as being "detected". I habitually alarm people in order to draw them away from their friends so I can put the beat down on them. I tried sneaking up on them a couple of times, but it didn't work worth a damn for me...I think partly becaus...
28,699
I'm at a hallway filled with proximity mines and things are **not** going well. ![DANGER, DANGER](https://i.stack.imgur.com/bTseM.png) I've tried to crouch past them or in between them but they're very sensitive and I don't think that's a possibility. Shooting them sets them off without me getting killed but it's ala...
2011/08/25
[ "https://gaming.stackexchange.com/questions/28699", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1070/" ]
It's not hard at all if you take these steps. In fact, if you do the following you can't even set them off accidentally (unless you jump or knock something over). 1. Press Caps Lock, or whatever key you've mapped for "Toggle Walk", to switch from fast movement to slow movement. 2. Crouch. 3. Shuffle over to the mine w...
I cannot find a way to disable mines either. In that spot, I picked up a barrel and threw it down the hall to safely trigger all the mines. This will alert a lot of people, however.
28,699
I'm at a hallway filled with proximity mines and things are **not** going well. ![DANGER, DANGER](https://i.stack.imgur.com/bTseM.png) I've tried to crouch past them or in between them but they're very sensitive and I don't think that's a possibility. Shooting them sets them off without me getting killed but it's ala...
2011/08/25
[ "https://gaming.stackexchange.com/questions/28699", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1070/" ]
I believe EMP grenades will disable them, but you would need quite a few of them to pull it off.
I just shot them. It "alarms" people, but they get over it, and it doesn't count as being "detected". I habitually alarm people in order to draw them away from their friends so I can put the beat down on them. I tried sneaking up on them a couple of times, but it didn't work worth a damn for me...I think partly becaus...
28,699
I'm at a hallway filled with proximity mines and things are **not** going well. ![DANGER, DANGER](https://i.stack.imgur.com/bTseM.png) I've tried to crouch past them or in between them but they're very sensitive and I don't think that's a possibility. Shooting them sets them off without me getting killed but it's ala...
2011/08/25
[ "https://gaming.stackexchange.com/questions/28699", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/1070/" ]
I believe EMP grenades will disable them, but you would need quite a few of them to pull it off.
You can just shoot the mines and hide until alert passes
26,600,987
I am getting an error on the first line of the below code. The error is ``` error: expected ‘,’ or ‘...’ before ‘distances’ ``` and I don't get what is actually wrong with it. I am using ideone, if that helps, but I don't think that is causing the problem. ``` vector<string> Most(bitset<4> treasure, int distance, s...
2014/10/28
[ "https://Stackoverflow.com/questions/26600987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4188360/" ]
Change these parameter declarations ``` int[] distances, string[] paths ``` to ``` int distances[], string paths[] ``` The syntax you use is valid in C# not in C++. Are you sure that the function is valid? It is always returns an empty vector. And take into account that original object used as argument path will...
This compiles.. although I am not sure what it should do: ``` #include <vector> #include <string> #include <bitset> using namespace std; // I modified the function signature from "string[] paths" to "string* paths", // the same for `int[] distances` vector<string> Most(bitset<4> treasure, int distance, string path, ...