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
23,189,106
Its a simple question and wont take too much time. Suppose this: ``` Class A{ ... } Class B{ @OneToMany private A a; } ``` It means that one B can have many A or many A can have one B?
2014/04/21
[ "https://Stackoverflow.com/questions/23189106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3551820/" ]
If you are not receiving any POST data, you have to check for the [`post_max_size`](http://www.php.net/manual/en/ini.core.php#ini.post-max-size) directive and comparing to how much POST data you are sending to the server. As you already experienced, the behavior of having no post data is clearly described on the [docs...
``` {!! Form::open(['url' => 'notebook.store', 'method' => 'post', 'enctype' => 'multipart/form-data']) !!} <div class="form-group"> {!! Form::file('logo', null, ['class' => 'form-control']) !!} </div> {!! Form::submit('Upload', ['class' => 'btn btn-primary']) !!} ```
23,189,106
Its a simple question and wont take too much time. Suppose this: ``` Class A{ ... } Class B{ @OneToMany private A a; } ``` It means that one B can have many A or many A can have one B?
2014/04/21
[ "https://Stackoverflow.com/questions/23189106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3551820/" ]
Use this: ``` {{ Form::open(array('route' => 'notebook.store', 'enctype' => 'multipart/form-data')) }} ``` For any reason this: ``` {{ Form::open(array('route' => 'notebook.store', 'files' => true)) }} ``` does not work!
Its not working because you are adding files=>true to the route array: ``` {{ Form::open(array('route' => 'notebook.store', 'files' => true)) }} ``` Instead try this ``` {{ Form::model(array('route'=>array('notebook.store'),'files'=>true)) }} ```
23,189,106
Its a simple question and wont take too much time. Suppose this: ``` Class A{ ... } Class B{ @OneToMany private A a; } ``` It means that one B can have many A or many A can have one B?
2014/04/21
[ "https://Stackoverflow.com/questions/23189106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3551820/" ]
Use this: ``` {{ Form::open(array('route' => 'notebook.store', 'enctype' => 'multipart/form-data')) }} ``` For any reason this: ``` {{ Form::open(array('route' => 'notebook.store', 'files' => true)) }} ``` does not work!
``` {!! Form::open(['url' => 'notebook.store', 'method' => 'post', 'enctype' => 'multipart/form-data']) !!} <div class="form-group"> {!! Form::file('logo', null, ['class' => 'form-control']) !!} </div> {!! Form::submit('Upload', ['class' => 'btn btn-primary']) !!} ```
2,256,009
I'm reading a book that claims that $\binom{n}{0}+\binom{n}{1}+\dots+\binom{n}{n}=2^{n}$ Is there a easy proof for this?
2017/04/28
[ "https://math.stackexchange.com/questions/2256009", "https://math.stackexchange.com", "https://math.stackexchange.com/users/318550/" ]
We can use the [binomial theorem](https://en.wikipedia.org/wiki/Binomial_theorem#Theorem_statement), which states that $$ (x+y)^n = {n \choose 0}x^n y^0 + {n \choose 1}x^{n-1}y^1 + {n \choose 2}x^{n-2}y^2 + \cdots + {n \choose n-1}x^1 y^{n-1} + {n \choose n}x^0 y^n. $$ Set $x=1$ and $y=1$ to obtain the result.
$$(1+x)^n=^nC\_0+^nC\_1x+^nC\_2x^2+........^nC\_n(x)^n\tag{Binomial Expansion}$$ Just put $x=1$ and Tada!
2,256,009
I'm reading a book that claims that $\binom{n}{0}+\binom{n}{1}+\dots+\binom{n}{n}=2^{n}$ Is there a easy proof for this?
2017/04/28
[ "https://math.stackexchange.com/questions/2256009", "https://math.stackexchange.com", "https://math.stackexchange.com/users/318550/" ]
We can use the [binomial theorem](https://en.wikipedia.org/wiki/Binomial_theorem#Theorem_statement), which states that $$ (x+y)^n = {n \choose 0}x^n y^0 + {n \choose 1}x^{n-1}y^1 + {n \choose 2}x^{n-2}y^2 + \cdots + {n \choose n-1}x^1 y^{n-1} + {n \choose n}x^0 y^n. $$ Set $x=1$ and $y=1$ to obtain the result.
Say you have a set of objects of two types, say red and blue balls, otherwise indistinguishable. In how many ways can you take $n$ of them and arrange them? The classic answer is your RHS, $2^n $. But you can also think of it like this: there are $\binom{n}{0}$ ways to have $0$ red balls in our collection, $\binom{n}{1...
2,256,009
I'm reading a book that claims that $\binom{n}{0}+\binom{n}{1}+\dots+\binom{n}{n}=2^{n}$ Is there a easy proof for this?
2017/04/28
[ "https://math.stackexchange.com/questions/2256009", "https://math.stackexchange.com", "https://math.stackexchange.com/users/318550/" ]
We can use the [binomial theorem](https://en.wikipedia.org/wiki/Binomial_theorem#Theorem_statement), which states that $$ (x+y)^n = {n \choose 0}x^n y^0 + {n \choose 1}x^{n-1}y^1 + {n \choose 2}x^{n-2}y^2 + \cdots + {n \choose n-1}x^1 y^{n-1} + {n \choose n}x^0 y^n. $$ Set $x=1$ and $y=1$ to obtain the result.
There are $2^{n}$ ordered strings of zeros and ones. The number of such strings with $k$ ones is $\binom{n}{k}$. Since every such string has some number, $0 \leq k \leq n$, of ones, it must be $2^{n} = \sum\_{k = 0}^{n}\binom{n}{k}$.
381,132
When I click on the "Edit" button in a post in stackoverflow.com, I always get a red box saying > > Suggested edit queue is full > > > [![Enter image description here](https://i.stack.imgur.com/2sqRy.png)](https://i.stack.imgur.com/2sqRy.png) Where can I find my last edited post that is in the queue to be review...
2022/08/10
[ "https://meta.stackexchange.com/questions/381132", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/1239323/" ]
You don't have any pending suggested edits; we can see this [on your profile](https://stackoverflow.com/users/16079539/gold79?tab=activity&sort=suggestions). What the message is trying to say is that there is no room for *anybody* to suggest new edits, because there are too many pending ones (and too few reviewers). Se...
There is no way to get your edit to be reviewed faster unfortunately, you just have to wait. It usually depends on what site you are on. E.g. if you are on Stack Overflow, then chances are you are going have to wait a while, as there are thousands of edits waiting to be reviewed at any one time. On lower traffic sites ...
57,404,722
I have a table T1 in production: ``` CREATE TABLE T1 ( "SPECIFIC_UNCERTAINTY" NUMBER ) ``` And today I saw its content like this: [![number column with ZERO at end](https://i.stack.imgur.com/nHs1C.png)](https://i.stack.imgur.com/nHs1C.png) Row 1 & 2 has zero at end, while row 3 is a normal value. I'd like to a...
2019/08/08
[ "https://Stackoverflow.com/questions/57404722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/423905/" ]
both `div` tags have same `padding`, and I've just found something wrong in your code. in your CSS code, ``` /* It means applying background-color at .button1 and .button2 > a */ .button1, .button2 a { background-color: #b0f4e6; } ``` so, this codes would be like it ``` .button1, .button2{ background-color: #b...
you can try `[attribute^=value]` selector. in this case , will use `[class^="button"]`
57,404,722
I have a table T1 in production: ``` CREATE TABLE T1 ( "SPECIFIC_UNCERTAINTY" NUMBER ) ``` And today I saw its content like this: [![number column with ZERO at end](https://i.stack.imgur.com/nHs1C.png)](https://i.stack.imgur.com/nHs1C.png) Row 1 & 2 has zero at end, while row 3 is a normal value. I'd like to a...
2019/08/08
[ "https://Stackoverflow.com/questions/57404722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/423905/" ]
both `div` tags have same `padding`, and I've just found something wrong in your code. in your CSS code, ``` /* It means applying background-color at .button1 and .button2 > a */ .button1, .button2 a { background-color: #b0f4e6; } ``` so, this codes would be like it ``` .button1, .button2{ background-color: #b...
better u write ur code like this: > > HTML > > > ``` <div class="button1"><p class="pButton"><a href="#">Login to view List</a></p></div> </div> <div class="login"> <div class="button2"><p class="pButton"><a href="#">Login to see Profile</a></p></div> ``` > > CSS > > > ``` .button1 , .button2 { ba...
57,404,722
I have a table T1 in production: ``` CREATE TABLE T1 ( "SPECIFIC_UNCERTAINTY" NUMBER ) ``` And today I saw its content like this: [![number column with ZERO at end](https://i.stack.imgur.com/nHs1C.png)](https://i.stack.imgur.com/nHs1C.png) Row 1 & 2 has zero at end, while row 3 is a normal value. I'd like to a...
2019/08/08
[ "https://Stackoverflow.com/questions/57404722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/423905/" ]
both `div` tags have same `padding`, and I've just found something wrong in your code. in your CSS code, ``` /* It means applying background-color at .button1 and .button2 > a */ .button1, .button2 a { background-color: #b0f4e6; } ``` so, this codes would be like it ``` .button1, .button2{ background-color: #b...
```css .login { text-align: center; } .button1 ,.button2{ display: inline-block; } .button1 a, .button2 a { background-color: #b0f4e6; padding:20px 10px; color:black; } ``` ```html <div class="login"> <div class="button1"><p class="pButton"><a href="#">Login to see list</a></p></div> ...
38,784,445
I have made some modifications to configuration files to run the project locally, and will never push these to the central repository. Now, this makes the workflow annoying, as those changes are always present and restricts me to using handy shortcuts like `git add .` and `git checkout .` without commiting or reseting...
2016/08/05
[ "https://Stackoverflow.com/questions/38784445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5705247/" ]
The way to handle this is to take the (real) configuration files out of the repository. You can keep template config files inside so people have some kind of examples. Alternatively, if you really want to keep the config files inside (do they have passwords in them?) you can create a directory for your config files, h...
You can use use `stash` to make your changes hidden away while adding or committing files. when the new new updates are done you can apply the stash to your branch. [Recommended Read](https://git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning)
38,784,445
I have made some modifications to configuration files to run the project locally, and will never push these to the central repository. Now, this makes the workflow annoying, as those changes are always present and restricts me to using handy shortcuts like `git add .` and `git checkout .` without commiting or reseting...
2016/08/05
[ "https://Stackoverflow.com/questions/38784445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5705247/" ]
The way to handle this is to take the (real) configuration files out of the repository. You can keep template config files inside so people have some kind of examples. Alternatively, if you really want to keep the config files inside (do they have passwords in them?) you can create a directory for your config files, h...
**Description** If you want `git` to ignore files, add them to your `.gitignore`. If these files are already tracked, you might need to untrack them before `git` can ignore them. For that you can run > > `git rm --cached <filename>.<extension>` > > > **Example** ``` git rm --cached development.log ``` For m...
38,784,445
I have made some modifications to configuration files to run the project locally, and will never push these to the central repository. Now, this makes the workflow annoying, as those changes are always present and restricts me to using handy shortcuts like `git add .` and `git checkout .` without commiting or reseting...
2016/08/05
[ "https://Stackoverflow.com/questions/38784445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5705247/" ]
You can use use `stash` to make your changes hidden away while adding or committing files. when the new new updates are done you can apply the stash to your branch. [Recommended Read](https://git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning)
**Description** If you want `git` to ignore files, add them to your `.gitignore`. If these files are already tracked, you might need to untrack them before `git` can ignore them. For that you can run > > `git rm --cached <filename>.<extension>` > > > **Example** ``` git rm --cached development.log ``` For m...
52,419,330
How to arrange nested divs next to each other using inline block or flex I have 3 elements in my html. One icon, and two text elements. I want the icon to be on left and then the text on top of each other. I am trying to do this using following html and css, which works partially. The icon is way down and I tried m...
2018/09/20
[ "https://Stackoverflow.com/questions/52419330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/291224/" ]
Use `display:flex` to `wrap` div and remove unnecessary code(`inline/inline-block`) ```css body { background-color: #D2D5DD; } .wrap{ display:flex; } .tag-header { text-transform: uppercase; letter-spacing: 1px; color: #0083cb; } .tag-description { font-weight: 100; font-size: 12px; paddi...
Maybe this way: ``` .wrap{ display: flex; align-items: center; } ```
52,419,330
How to arrange nested divs next to each other using inline block or flex I have 3 elements in my html. One icon, and two text elements. I want the icon to be on left and then the text on top of each other. I am trying to do this using following html and css, which works partially. The icon is way down and I tried m...
2018/09/20
[ "https://Stackoverflow.com/questions/52419330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/291224/" ]
Use `display:flex` to `wrap` div and remove unnecessary code(`inline/inline-block`) ```css body { background-color: #D2D5DD; } .wrap{ display:flex; } .tag-header { text-transform: uppercase; letter-spacing: 1px; color: #0083cb; } .tag-description { font-weight: 100; font-size: 12px; paddi...
Another simpler method to use when trying to align components in HTML is to make use of the table structure. Sometimes aligning of certain components don't work when using CSS because there might be a conflicting style element. So a method I prefer using to ensure that my components are perfectly in line, is to encap...
52,419,330
How to arrange nested divs next to each other using inline block or flex I have 3 elements in my html. One icon, and two text elements. I want the icon to be on left and then the text on top of each other. I am trying to do this using following html and css, which works partially. The icon is way down and I tried m...
2018/09/20
[ "https://Stackoverflow.com/questions/52419330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/291224/" ]
Another simpler method to use when trying to align components in HTML is to make use of the table structure. Sometimes aligning of certain components don't work when using CSS because there might be a conflicting style element. So a method I prefer using to ensure that my components are perfectly in line, is to encap...
Maybe this way: ``` .wrap{ display: flex; align-items: center; } ```
53,272,490
Intro ----- I am a little lost on the proper way to hold a data structure of multiple derived classes. I am relatively new to C++, so sorry if I have idiotic errors/misconceptions. At the moment, I use a `vector<Base*>*`, which makes sense to me. However, I run into some issues when I try to use the objects contained...
2018/11/13
[ "https://Stackoverflow.com/questions/53272490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8807288/" ]
If you have more than one column that you'd like to summarize, you can use QAsena's approach and add `summarise_at` function like so: ``` pitchingstat %>% group_by(PitcherID) %>% summarise_at(vars(col1:coln), mean, na.rm = TRUE) ``` Check out link below for more examples: <https://dplyr.tidyverse.org/reference/summa...
Replace the first argument (`pitchingstat`) with the name of the column you want to aggregate (or a vector thereof)
53,272,490
Intro ----- I am a little lost on the proper way to hold a data structure of multiple derived classes. I am relatively new to C++, so sorry if I have idiotic errors/misconceptions. At the moment, I use a `vector<Base*>*`, which makes sense to me. However, I run into some issues when I try to use the objects contained...
2018/11/13
[ "https://Stackoverflow.com/questions/53272490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8807288/" ]
If you have more than one column that you'd like to summarize, you can use QAsena's approach and add `summarise_at` function like so: ``` pitchingstat %>% group_by(PitcherID) %>% summarise_at(vars(col1:coln), mean, na.rm = TRUE) ``` Check out link below for more examples: <https://dplyr.tidyverse.org/reference/summa...
How about?: ``` library(tidyverse) aggpitch <- pitchingstat %>% group_by(PitcherID) %>% summarise(pitcher_mean = mean(variable)) #replace 'variable' with your variable of interest here ``` or ``` library(tidyverse) aggpitch <- pitchingstat %>% select(var_1, var_2) group_by(PitcherID) %>% summarise(pitc...
66,236,859
I have been deploying containers on GCP Compute Engine VMs using google's Container Optimized OS. I have been slightly struggling to understand the shutdown behavior of the deployed containers when the host VM is stopped in GCP. When my containers receive a SIGTERM or SIGINT signal, they perform some cleanup behavior ...
2021/02/17
[ "https://Stackoverflow.com/questions/66236859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10308314/" ]
I had the same problem and I found a workaround (not perfect but works for me). Add as part of your **startup-script**: ``` mkdir -p /etc/systemd/system/docker.service.d printf "[Service]\nExecStop=/bin/sh -c 'docker stop \$(docker ps -q)'" > /etc/systemd/system/docker.service.d/override.conf ``` Usually (and also i...
I've went through the logs and found nothing that would point me to a solution. There may be however a workaround for this. You can use [shutdown script](https://cloud.google.com/compute/docs/shutdownscript#use_a_local_shutdown_script) to stop your containers more "gracefully" before VM shutdown; You can provide the...
60,129,048
I have a ribbon-based UI which has one combobox and one dropdown box. I have created the following methods to load these controls with content: For the Combobox: ``` internal void LoadComboBox(RibbonComboBox YourCbx, List<string> YourList) { if (YourCbx.Items.Count > 0) You...
2020/02/08
[ "https://Stackoverflow.com/questions/60129048", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9709251/" ]
On the topic of the data cleaning. When i import data from .csv files i have used often: apoc.map.clean function to remove empty values <http://neo4j-contrib.github.io/neo4j-apoc-procedures/3.5/utilities/map-functions/> Also while parsing big CSV files I often remove keys that I don't need ``` LOAD CSV WITH HEADERS...
I would use Kettle. It has connectors to read from a big range of data sources and write to Neo4j. <https://medium.com/neo4j/getting-started-with-kettle-and-neo4j-32ff15b991f9> <https://github.com/neo4j-examples/kettle-plugin-examples>
4,596,657
i have this script that is meant to move a file from one folder to another but i get an error,: ``` $photo= $_POST['camera']; // i.e. 45647.jpg //move file to userpics/ folder rename ("../uploads/$photo", "../userpics/$photo"); ``` but i get this error: ``` Warning: rename(/uploads/1czcec43s.jpg\n,/use...
2011/01/04
[ "https://Stackoverflow.com/questions/4596657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/560795/" ]
Your filenames are containing linebreaks `\n`. This may well be the source of the error. Try calling [`trim`](http://php.net/trim): ``` $photo = trim($_POST['camera']); // i.e. 45647.jpg rename ("../uploads/$photo", "../userpics/$photo"); ``` Also, for goodness sake add some sanity checking to your code. Your user c...
There are an \n (linefeed) at the end of the used POST parameter. Have you tried remove it? Notice: the presented code is highly vulnerable.
30,622,741
I want to know if return pointer from a C function is good/bad design? If it is a bad practice, what would be a good practice in the following example: The question is a continued part of: [c function return static variable](https://stackoverflow.com/questions/30621760/c-function-return-static-variable) in `data.h` f...
2015/06/03
[ "https://Stackoverflow.com/questions/30622741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3057900/" ]
The only reason it is bad is because you don't have any memory managing structure behind it. In your current code, you have a memory leak because you allocate a `person` struct via malloc() but do not free it. Consider writing a wrapper function that handles that memory management for you like so: ``` void freePerson...
It's a matter of decision more than everything else. Both options are valid as long as you're aware of each pro's and con's Returning pointer pros: 1. Encapsulation of memory allocation 2. Support dynamic memory sizes on the fly Returning pointer cons: 1. only one possible out parameter 2. Memory has to be alloca...
30,622,741
I want to know if return pointer from a C function is good/bad design? If it is a bad practice, what would be a good practice in the following example: The question is a continued part of: [c function return static variable](https://stackoverflow.com/questions/30621760/c-function-return-static-variable) in `data.h` f...
2015/06/03
[ "https://Stackoverflow.com/questions/30622741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3057900/" ]
The only reason it is bad is because you don't have any memory managing structure behind it. In your current code, you have a memory leak because you allocate a `person` struct via malloc() but do not free it. Consider writing a wrapper function that handles that memory management for you like so: ``` void freePerson...
To be a good design you must have a matching function that frees the allocated memory when it is no longer needed.
30,622,741
I want to know if return pointer from a C function is good/bad design? If it is a bad practice, what would be a good practice in the following example: The question is a continued part of: [c function return static variable](https://stackoverflow.com/questions/30621760/c-function-return-static-variable) in `data.h` f...
2015/06/03
[ "https://Stackoverflow.com/questions/30622741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3057900/" ]
The only reason it is bad is because you don't have any memory managing structure behind it. In your current code, you have a memory leak because you allocate a `person` struct via malloc() but do not free it. Consider writing a wrapper function that handles that memory management for you like so: ``` void freePerson...
It is bad practice to return pointers to private variables. Also, with the current design, your .c file can only have one instance of the person object. And almost needless to say, the same code which dynamically allocates an object should also be responsible of freeing it. Code which is written so that some other mo...
30,622,741
I want to know if return pointer from a C function is good/bad design? If it is a bad practice, what would be a good practice in the following example: The question is a continued part of: [c function return static variable](https://stackoverflow.com/questions/30621760/c-function-return-static-variable) in `data.h` f...
2015/06/03
[ "https://Stackoverflow.com/questions/30622741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3057900/" ]
It is bad practice to return pointers to private variables. Also, with the current design, your .c file can only have one instance of the person object. And almost needless to say, the same code which dynamically allocates an object should also be responsible of freeing it. Code which is written so that some other mo...
It's a matter of decision more than everything else. Both options are valid as long as you're aware of each pro's and con's Returning pointer pros: 1. Encapsulation of memory allocation 2. Support dynamic memory sizes on the fly Returning pointer cons: 1. only one possible out parameter 2. Memory has to be alloca...
30,622,741
I want to know if return pointer from a C function is good/bad design? If it is a bad practice, what would be a good practice in the following example: The question is a continued part of: [c function return static variable](https://stackoverflow.com/questions/30621760/c-function-return-static-variable) in `data.h` f...
2015/06/03
[ "https://Stackoverflow.com/questions/30622741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3057900/" ]
It is bad practice to return pointers to private variables. Also, with the current design, your .c file can only have one instance of the person object. And almost needless to say, the same code which dynamically allocates an object should also be responsible of freeing it. Code which is written so that some other mo...
To be a good design you must have a matching function that frees the allocated memory when it is no longer needed.
31,656
I see that it is really popular with web services nowadays to have their phone number in the header of the website. Is it really that effective? Does it make the company look more legit?
2013/01/10
[ "https://ux.stackexchange.com/questions/31656", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/23108/" ]
In general, adding information like phone numbers or physical addresses to a site, makes it appear more trustworthy (or 'legit'). In a number of tests that I know of, this has been the case. However, the side effect of putting your number in your header is that people will call you more, so don't do it unless you can ...
We made a user test about it. We have a hotel reservation portal and we have telephone support for it. People look around in the portal, choose a hotel, but before reservation they like to ensure about it, and call the number in the header. It makes the page reliable.
31,656
I see that it is really popular with web services nowadays to have their phone number in the header of the website. Is it really that effective? Does it make the company look more legit?
2013/01/10
[ "https://ux.stackexchange.com/questions/31656", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/23108/" ]
In general, adding information like phone numbers or physical addresses to a site, makes it appear more trustworthy (or 'legit'). In a number of tests that I know of, this has been the case. However, the side effect of putting your number in your header is that people will call you more, so don't do it unless you can ...
If it's a common user task to visit the site to get the phone number and then call, then your users will appreciate it. If the business wants then to do this, even better! It's a UX pattern I always apply when designing a site for a business where the service performed is not necessarily done online. If the number i...
34,699,857
**Situation :** I've got following, simple jQuery code : ``` $('img').each(function() { $(this).mouseenter(function() { $(this).css('opacity','1'); }); $(this).mouseleave(function() { $(this).css('opacity','0.4'); ...
2016/01/09
[ "https://Stackoverflow.com/questions/34699857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4765875/" ]
This can be as said previously be done without using javascript CSS: ``` img { opacity: 0.4; //include this css lastly, and if this doesn't work add !important transition: all 0.5s; -webkit-transition: all 0.5s; } img:hover{ opacity:1; //include this css lastly, and if this doe...
Try this: ``` img { opacity: 0.4; -webkit-transition: opacity 0.5s; transition: opacity 0.5s; } ``` **P.S.** Prefixed properties should be before the unprefixed ones. (and please check our comments on using `:hover` instead of that jQuery code.)
24,590,887
Ok I want to pass two variables from a controller to a model but I get some kind of error. Am I passing variables on right way? My syntax is: Controller: ``` public function add_tag(){ if(isset($_POST['id_slike']) && isset($_POST['id_taga'])){ $slika = $_POST['id_slike']; ...
2014/07/05
[ "https://Stackoverflow.com/questions/24590887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Add elements like this: ``` l.add((CheckBox)findViewById(R.id.checkBox101)); l.add((CheckBox)findViewById(R.id.checkBox102)); l.add((CheckBox)findViewById(R.id.checkBox103)); [..] ``` or ``` l.add(0, (CheckBox)findViewById(R.id.checkBox101)); l.add(1, (CheckBox)findViewById(R.id.checkBox102)); l.add(2, (CheckBox)fi...
As you did not provide the whole source code and did not post the stack trace, this answer is based on assumptions. Although you initialize the `ArrayList l` with a capacity of 60, its size is still 0. Adding an element at index 1 is therefore impossible, as [stated in the docs](http://docs.oracle.com/javase/7/docs/ap...
24,590,887
Ok I want to pass two variables from a controller to a model but I get some kind of error. Am I passing variables on right way? My syntax is: Controller: ``` public function add_tag(){ if(isset($_POST['id_slike']) && isset($_POST['id_taga'])){ $slika = $_POST['id_slike']; ...
2014/07/05
[ "https://Stackoverflow.com/questions/24590887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Add elements like this: ``` l.add((CheckBox)findViewById(R.id.checkBox101)); l.add((CheckBox)findViewById(R.id.checkBox102)); l.add((CheckBox)findViewById(R.id.checkBox103)); [..] ``` or ``` l.add(0, (CheckBox)findViewById(R.id.checkBox101)); l.add(1, (CheckBox)findViewById(R.id.checkBox102)); l.add(2, (CheckBox)fi...
You have to start at index 0 not index 1. That's why java is giving a error saying index 1 does not exist because index 0 was never initialized. ``` l.add(0,(CheckBox)findViewById(R.id.checkBox101)); l.add(1,(CheckBox)findViewById(R.id.checkBox102)); . . . l.add(58,(CheckBox)findViewById(R.id....
15,868,852
I'm adding my program to start up with: ``` TCHAR szPath[MAX_PATH]; GetModuleFileName(NULL,szPath,MAX_PATH); HKEY newValue; RegOpenKey(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",&newValue); RegSetValueEx(newValue,"myprogram",0,REG_SZ,(LPBYTE)szPath,sizeof(szPath)); RegCloseKey(newValue); ret...
2013/04/07
[ "https://Stackoverflow.com/questions/15868852", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1642297/" ]
you can check the registry function output.... Here I am giving the Idea you can use it... ``` bool function() { HKEY hKey; LPCTSTR subKey; LPCTSTR subValue; HKEY resKey; DWORD dataLen; hKey = HKEY_LOCAL_MACHINE; subKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"; long key ...
You can use `RegCreateKeyEx()` to create a new key or open an existing key. The "..." you see in `RegEdit` is because the column is not wide enough -- double-click at the end of the column-header to resize the column.
15,868,852
I'm adding my program to start up with: ``` TCHAR szPath[MAX_PATH]; GetModuleFileName(NULL,szPath,MAX_PATH); HKEY newValue; RegOpenKey(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",&newValue); RegSetValueEx(newValue,"myprogram",0,REG_SZ,(LPBYTE)szPath,sizeof(szPath)); RegCloseKey(newValue); ret...
2013/04/07
[ "https://Stackoverflow.com/questions/15868852", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1642297/" ]
The value you wrote out is `MAX_PATH` bytes wide, regardless of how long the path really is. Thus you probably have a lot of non-printing characters after the .exe, and that's why you see the "...". The documentation says the last parameter is the size in *bytes* of the string, including the null terminator. So we nee...
You can use `RegCreateKeyEx()` to create a new key or open an existing key. The "..." you see in `RegEdit` is because the column is not wide enough -- double-click at the end of the column-header to resize the column.
15,868,852
I'm adding my program to start up with: ``` TCHAR szPath[MAX_PATH]; GetModuleFileName(NULL,szPath,MAX_PATH); HKEY newValue; RegOpenKey(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",&newValue); RegSetValueEx(newValue,"myprogram",0,REG_SZ,(LPBYTE)szPath,sizeof(szPath)); RegCloseKey(newValue); ret...
2013/04/07
[ "https://Stackoverflow.com/questions/15868852", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1642297/" ]
The value you wrote out is `MAX_PATH` bytes wide, regardless of how long the path really is. Thus you probably have a lot of non-printing characters after the .exe, and that's why you see the "...". The documentation says the last parameter is the size in *bytes* of the string, including the null terminator. So we nee...
you can check the registry function output.... Here I am giving the Idea you can use it... ``` bool function() { HKEY hKey; LPCTSTR subKey; LPCTSTR subValue; HKEY resKey; DWORD dataLen; hKey = HKEY_LOCAL_MACHINE; subKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"; long key ...
15,868,852
I'm adding my program to start up with: ``` TCHAR szPath[MAX_PATH]; GetModuleFileName(NULL,szPath,MAX_PATH); HKEY newValue; RegOpenKey(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",&newValue); RegSetValueEx(newValue,"myprogram",0,REG_SZ,(LPBYTE)szPath,sizeof(szPath)); RegCloseKey(newValue); ret...
2013/04/07
[ "https://Stackoverflow.com/questions/15868852", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1642297/" ]
you can check the registry function output.... Here I am giving the Idea you can use it... ``` bool function() { HKEY hKey; LPCTSTR subKey; LPCTSTR subValue; HKEY resKey; DWORD dataLen; hKey = HKEY_LOCAL_MACHINE; subKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"; long key ...
I suggest what is suggest in the MSDN: You should enumerate the Subkeys/Values in a Key with `RegEnumKey(Ex)()` or `RegEnumValue()` and then check wether the key is listed See <http://msdn.microsoft.com/en-us/library/windows/desktop/ms724861%28v=vs.85%29.aspx> and <http://msdn.microsoft.com/en-us/library/windows/desk...
15,868,852
I'm adding my program to start up with: ``` TCHAR szPath[MAX_PATH]; GetModuleFileName(NULL,szPath,MAX_PATH); HKEY newValue; RegOpenKey(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",&newValue); RegSetValueEx(newValue,"myprogram",0,REG_SZ,(LPBYTE)szPath,sizeof(szPath)); RegCloseKey(newValue); ret...
2013/04/07
[ "https://Stackoverflow.com/questions/15868852", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1642297/" ]
The value you wrote out is `MAX_PATH` bytes wide, regardless of how long the path really is. Thus you probably have a lot of non-printing characters after the .exe, and that's why you see the "...". The documentation says the last parameter is the size in *bytes* of the string, including the null terminator. So we nee...
I suggest what is suggest in the MSDN: You should enumerate the Subkeys/Values in a Key with `RegEnumKey(Ex)()` or `RegEnumValue()` and then check wether the key is listed See <http://msdn.microsoft.com/en-us/library/windows/desktop/ms724861%28v=vs.85%29.aspx> and <http://msdn.microsoft.com/en-us/library/windows/desk...
60,287,464
**How do I get the placeholder/text at the start top-left of the textarea? It is at the centre right now.** ```css .input-textarea { width: 100%; min-height: 100px; resize: vertical; padding: 1em; border-radius: 3px; } ``` ```html <label class="comment-label" for="comments">Comments</label> <input t...
2020/02/18
[ "https://Stackoverflow.com/questions/60287464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Ideally there would be a way at install-time (in `setup.py`) to detect whether the package is being installed into a "u2 environment" or not, and could fail the installation (with an appropriate error message) if that's the case. With this solution, you won't be able to provide built distributions (wheels) since they ...
You can specify the url to the package in `install_requires` using setuptools (requires pip version 18.1 or greater). [Requirement specifiers](https://pip.pypa.io/en/stable/reference/pip_install/#requirement-specifiers) Example *setup.py* ``` import setuptools setuptools.setup( name='MyPackage', version='...
60,287,464
**How do I get the placeholder/text at the start top-left of the textarea? It is at the centre right now.** ```css .input-textarea { width: 100%; min-height: 100px; resize: vertical; padding: 1em; border-radius: 3px; } ``` ```html <label class="comment-label" for="comments">Comments</label> <input t...
2020/02/18
[ "https://Stackoverflow.com/questions/60287464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
It's a case where it would be nice if Python projects had namespaces (`pip install com.rocket.u2py` and `import com.rocket.u2py as u2py`). From my point of view there are 2 aspects to consider: at the *project* level, at the *package* level. **1.** project (distribution package) I believe it is a bad practice to for...
You can specify the url to the package in `install_requires` using setuptools (requires pip version 18.1 or greater). [Requirement specifiers](https://pip.pypa.io/en/stable/reference/pip_install/#requirement-specifiers) Example *setup.py* ``` import setuptools setuptools.setup( name='MyPackage', version='...
1,661,940
Counting to 7 in binary looks like this: 0 1 10 11 100 101 110 111 The highest value is always to the left. But would it make more sense to to it like this? Is there a way that this was picked, or was it a random decision? 0 1 01 11 001 101 011 111
2016/02/18
[ "https://math.stackexchange.com/questions/1661940", "https://math.stackexchange.com", "https://math.stackexchange.com/users/315693/" ]
It's an arbitrary convention that we write 42 to mean 4 tens and 2 ones, as opposed to 4 ones and 2 tens. Somewhere down the line it was decided, and we've been stuck with it ever since. The way binary numbers (base 2) are represented follows the convention for base 10 numbers: the binary number 110 represents 1 four, ...
You might as well have asked why are decimal numbers ordered the way they are, that is, "four hundred and forty two" is written like this: 442 (least significant digit to most significant digit from right to left). It might seem counter-intuitive at first because Latin languages are written from left to right, however...
4,220,803
I'm working on a project on an unreliable system which I'm assuming can fail at any point. What I want to guarantee is that if I write\_state and the machine fails mid-operation, a read\_state will either read a valid state or no state at all. I've implemented something which I think will work below -- I'm interested i...
2010/11/18
[ "https://Stackoverflow.com/questions/4220803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284870/" ]
My vague recollection from the way databases work is this. It involves three files. A control file, the target database file and a pending transaction log. The control file has a global transaction counter and a hash or other checksum. This is a small file that's one physical block in size. One OS-level write. Have a...
I think you can simplify a few things ``` def read_file(name): try: with open(name,'rb') as f return f.read() except IOError: return '' ``` --- ``` if valid1: return data1 elif valid2: return data2 else: raise Exception('Theoretically, this never happens...') ``` Yo...
4,220,803
I'm working on a project on an unreliable system which I'm assuming can fail at any point. What I want to guarantee is that if I write\_state and the machine fails mid-operation, a read\_state will either read a valid state or no state at all. I've implemented something which I think will work below -- I'm interested i...
2010/11/18
[ "https://Stackoverflow.com/questions/4220803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284870/" ]
Your two copies won't work. The filesystem can reorder things so that both files have been truncated before any has been written to disk. There are a few filesystem operations that are guaranteed to be atomic: renaming a file over another is one, insofar as the file will either be in one place or another. However, as ...
I think you can simplify a few things ``` def read_file(name): try: with open(name,'rb') as f return f.read() except IOError: return '' ``` --- ``` if valid1: return data1 elif valid2: return data2 else: raise Exception('Theoretically, this never happens...') ``` Yo...
4,220,803
I'm working on a project on an unreliable system which I'm assuming can fail at any point. What I want to guarantee is that if I write\_state and the machine fails mid-operation, a read\_state will either read a valid state or no state at all. I've implemented something which I think will work below -- I'm interested i...
2010/11/18
[ "https://Stackoverflow.com/questions/4220803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284870/" ]
Under UNIX like systems the usual answer is to do the link dance. Create the file under a unique name (use the tmpfile module) then use the os.link() function to create a hard link to the destination name after you synchronized the contents into the desired (publication) state. Under this scheme your readers don't see...
I think you can simplify a few things ``` def read_file(name): try: with open(name,'rb') as f return f.read() except IOError: return '' ``` --- ``` if valid1: return data1 elif valid2: return data2 else: raise Exception('Theoretically, this never happens...') ``` Yo...
4,220,803
I'm working on a project on an unreliable system which I'm assuming can fail at any point. What I want to guarantee is that if I write\_state and the machine fails mid-operation, a read\_state will either read a valid state or no state at all. I've implemented something which I think will work below -- I'm interested i...
2010/11/18
[ "https://Stackoverflow.com/questions/4220803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284870/" ]
I will add a heretic response: what about using sqlite? Or, possibly, bsddb, however that seems to be deprecated and you would have to use a third-party module.
I think you can simplify a few things ``` def read_file(name): try: with open(name,'rb') as f return f.read() except IOError: return '' ``` --- ``` if valid1: return data1 elif valid2: return data2 else: raise Exception('Theoretically, this never happens...') ``` Yo...
4,220,803
I'm working on a project on an unreliable system which I'm assuming can fail at any point. What I want to guarantee is that if I write\_state and the machine fails mid-operation, a read\_state will either read a valid state or no state at all. I've implemented something which I think will work below -- I'm interested i...
2010/11/18
[ "https://Stackoverflow.com/questions/4220803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284870/" ]
Your two copies won't work. The filesystem can reorder things so that both files have been truncated before any has been written to disk. There are a few filesystem operations that are guaranteed to be atomic: renaming a file over another is one, insofar as the file will either be in one place or another. However, as ...
My vague recollection from the way databases work is this. It involves three files. A control file, the target database file and a pending transaction log. The control file has a global transaction counter and a hash or other checksum. This is a small file that's one physical block in size. One OS-level write. Have a...
4,220,803
I'm working on a project on an unreliable system which I'm assuming can fail at any point. What I want to guarantee is that if I write\_state and the machine fails mid-operation, a read\_state will either read a valid state or no state at all. I've implemented something which I think will work below -- I'm interested i...
2010/11/18
[ "https://Stackoverflow.com/questions/4220803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284870/" ]
I will add a heretic response: what about using sqlite? Or, possibly, bsddb, however that seems to be deprecated and you would have to use a third-party module.
My vague recollection from the way databases work is this. It involves three files. A control file, the target database file and a pending transaction log. The control file has a global transaction counter and a hash or other checksum. This is a small file that's one physical block in size. One OS-level write. Have a...
4,220,803
I'm working on a project on an unreliable system which I'm assuming can fail at any point. What I want to guarantee is that if I write\_state and the machine fails mid-operation, a read\_state will either read a valid state or no state at all. I've implemented something which I think will work below -- I'm interested i...
2010/11/18
[ "https://Stackoverflow.com/questions/4220803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284870/" ]
Your two copies won't work. The filesystem can reorder things so that both files have been truncated before any has been written to disk. There are a few filesystem operations that are guaranteed to be atomic: renaming a file over another is one, insofar as the file will either be in one place or another. However, as ...
Under UNIX like systems the usual answer is to do the link dance. Create the file under a unique name (use the tmpfile module) then use the os.link() function to create a hard link to the destination name after you synchronized the contents into the desired (publication) state. Under this scheme your readers don't see...
4,220,803
I'm working on a project on an unreliable system which I'm assuming can fail at any point. What I want to guarantee is that if I write\_state and the machine fails mid-operation, a read\_state will either read a valid state or no state at all. I've implemented something which I think will work below -- I'm interested i...
2010/11/18
[ "https://Stackoverflow.com/questions/4220803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284870/" ]
Your two copies won't work. The filesystem can reorder things so that both files have been truncated before any has been written to disk. There are a few filesystem operations that are guaranteed to be atomic: renaming a file over another is one, insofar as the file will either be in one place or another. However, as ...
I will add a heretic response: what about using sqlite? Or, possibly, bsddb, however that seems to be deprecated and you would have to use a third-party module.
4,220,803
I'm working on a project on an unreliable system which I'm assuming can fail at any point. What I want to guarantee is that if I write\_state and the machine fails mid-operation, a read\_state will either read a valid state or no state at all. I've implemented something which I think will work below -- I'm interested i...
2010/11/18
[ "https://Stackoverflow.com/questions/4220803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284870/" ]
I will add a heretic response: what about using sqlite? Or, possibly, bsddb, however that seems to be deprecated and you would have to use a third-party module.
Under UNIX like systems the usual answer is to do the link dance. Create the file under a unique name (use the tmpfile module) then use the os.link() function to create a hard link to the destination name after you synchronized the contents into the desired (publication) state. Under this scheme your readers don't see...
60,759,637
I want to request ACCESS\_NOTIFICATION\_POLICY permission from the user, so I used the following code: ``` if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !notificationManager.isNotificationPolicyAccessGranted()) { //Permission not granted so we will ask for it. In...
2020/03/19
[ "https://Stackoverflow.com/questions/60759637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9138343/" ]
"We’ve also removed the option to enable/disable auto-import from the settings, as the improvements mentioned above have made it redundant." <https://blog.jetbrains.com/idea/2020/01/intellij-idea-2020-1-eap/?_ga=2.209144210.1862481759.1584865190-1304159286.1579103926#maven_and_gradle_importing_updates>
Press `ctrl` + `shift` + `a` to open the "actions" dialog. From there, type "import maven projects automatically". Click that option and it should work.
60,759,637
I want to request ACCESS\_NOTIFICATION\_POLICY permission from the user, so I used the following code: ``` if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !notificationManager.isNotificationPolicyAccessGranted()) { //Permission not granted so we will ask for it. In...
2020/03/19
[ "https://Stackoverflow.com/questions/60759637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9138343/" ]
Search "Enable auto-reload after any changes" in the action dialog. They have renamed and relocated the functionality to the Maven tool window as a control with the latest version.
Press `ctrl` + `shift` + `a` to open the "actions" dialog. From there, type "import maven projects automatically". Click that option and it should work.
60,759,637
I want to request ACCESS\_NOTIFICATION\_POLICY permission from the user, so I used the following code: ``` if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !notificationManager.isNotificationPolicyAccessGranted()) { //Permission not granted so we will ask for it. In...
2020/03/19
[ "https://Stackoverflow.com/questions/60759637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9138343/" ]
By following ways you can Import `Maven` projects automatically: For `InteliJ IDEA 14` upwards: ``` Click Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Importing -> TICK "Import Maven projects automatically". ``` For `InteliJ IDEA 2020` upwards: ``` Click Settings -> Build, Execution, Deploym...
Press `ctrl` + `shift` + `a` to open the "actions" dialog. From there, type "import maven projects automatically". Click that option and it should work.
60,759,637
I want to request ACCESS\_NOTIFICATION\_POLICY permission from the user, so I used the following code: ``` if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !notificationManager.isNotificationPolicyAccessGranted()) { //Permission not granted so we will ask for it. In...
2020/03/19
[ "https://Stackoverflow.com/questions/60759637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9138343/" ]
Search "Enable auto-reload after any changes" in the action dialog. They have renamed and relocated the functionality to the Maven tool window as a control with the latest version.
"We’ve also removed the option to enable/disable auto-import from the settings, as the improvements mentioned above have made it redundant." <https://blog.jetbrains.com/idea/2020/01/intellij-idea-2020-1-eap/?_ga=2.209144210.1862481759.1584865190-1304159286.1579103926#maven_and_gradle_importing_updates>
60,759,637
I want to request ACCESS\_NOTIFICATION\_POLICY permission from the user, so I used the following code: ``` if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !notificationManager.isNotificationPolicyAccessGranted()) { //Permission not granted so we will ask for it. In...
2020/03/19
[ "https://Stackoverflow.com/questions/60759637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9138343/" ]
By following ways you can Import `Maven` projects automatically: For `InteliJ IDEA 14` upwards: ``` Click Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Importing -> TICK "Import Maven projects automatically". ``` For `InteliJ IDEA 2020` upwards: ``` Click Settings -> Build, Execution, Deploym...
"We’ve also removed the option to enable/disable auto-import from the settings, as the improvements mentioned above have made it redundant." <https://blog.jetbrains.com/idea/2020/01/intellij-idea-2020-1-eap/?_ga=2.209144210.1862481759.1584865190-1304159286.1579103926#maven_and_gradle_importing_updates>
60,759,637
I want to request ACCESS\_NOTIFICATION\_POLICY permission from the user, so I used the following code: ``` if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !notificationManager.isNotificationPolicyAccessGranted()) { //Permission not granted so we will ask for it. In...
2020/03/19
[ "https://Stackoverflow.com/questions/60759637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9138343/" ]
"We’ve also removed the option to enable/disable auto-import from the settings, as the improvements mentioned above have made it redundant." <https://blog.jetbrains.com/idea/2020/01/intellij-idea-2020-1-eap/?_ga=2.209144210.1862481759.1584865190-1304159286.1579103926#maven_and_gradle_importing_updates>
[![enter image description here](https://i.stack.imgur.com/G2G6q.png)](https://i.stack.imgur.com/G2G6q.png) They have added now in build tools -> select Any changes for reload project after changes in the build scripts.
60,759,637
I want to request ACCESS\_NOTIFICATION\_POLICY permission from the user, so I used the following code: ``` if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !notificationManager.isNotificationPolicyAccessGranted()) { //Permission not granted so we will ask for it. In...
2020/03/19
[ "https://Stackoverflow.com/questions/60759637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9138343/" ]
Search "Enable auto-reload after any changes" in the action dialog. They have renamed and relocated the functionality to the Maven tool window as a control with the latest version.
[![enter image description here](https://i.stack.imgur.com/G2G6q.png)](https://i.stack.imgur.com/G2G6q.png) They have added now in build tools -> select Any changes for reload project after changes in the build scripts.
60,759,637
I want to request ACCESS\_NOTIFICATION\_POLICY permission from the user, so I used the following code: ``` if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !notificationManager.isNotificationPolicyAccessGranted()) { //Permission not granted so we will ask for it. In...
2020/03/19
[ "https://Stackoverflow.com/questions/60759637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9138343/" ]
By following ways you can Import `Maven` projects automatically: For `InteliJ IDEA 14` upwards: ``` Click Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Importing -> TICK "Import Maven projects automatically". ``` For `InteliJ IDEA 2020` upwards: ``` Click Settings -> Build, Execution, Deploym...
[![enter image description here](https://i.stack.imgur.com/G2G6q.png)](https://i.stack.imgur.com/G2G6q.png) They have added now in build tools -> select Any changes for reload project after changes in the build scripts.
1,384,373
Ruby tempfile instances automatically delete their corresponding file when the references are released. However, I have one machine on which this is not the case. The code is ``` irb> require 'tempfile' => true irb> t = Tempfile.new('test32') => #<File:/tmp/test32.27778.0> irb> exit ``` on all of my test machines, t...
2009/09/05
[ "https://Stackoverflow.com/questions/1384373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8047/" ]
OK, continuing the question's comment thread... Ruby, or really, `Tempfile`, uses the garbage collector to manage finalizers. (I presume it works this way rather than via Kernel::at\_exit in order to delete the file earlier in a long-running ruby.) Anyway, something seems different about GC on one system. Let's try to...
In 1.8.7 there's an issue with the finalizer and the garbage collector, and it sounds likely from the description that you're running into the same thing in 1.8.6. We managed to fix the problem in our rails app by monkey patching Tempfile. Might work for you too. Code: <http://github.com/jwinky/ruby_tempfile_ioerror>
13,520,933
I have next JSP page that works on Google App Engine: ``` <%@ page contentType="text/html; charset=windows-1251" language="java" %> <%@ page import="com.wedding.Register" %> <!DOCTYPE html> <html> <head> <title>Test</title> <link href="css/bootstrap.min.css" rel="stylesheet"> <script src=...
2012/11/22
[ "https://Stackoverflow.com/questions/13520933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1548214/" ]
A `<button/>` enclosed in a `<form/>`, by default, submits it. So, you need to stop the form submission. In the following example I will stick with jQuery instead of your mix of JavaScript and jQuery. ``` /* Bind the submit event */ $("form").submit(function() { /* Request an HTTP 400 */ $.ajax({ url: "http:/...
Have you tried surrounding the function submitMyForm(button) around jquery document ready? ``` $(document).ready(function(){ function submitMyForm(button) { var myForm = $(button).closest('form'); $.ajax({ url: $(myForm).attr('action'), type: "post", ...
39,522,460
When I try to run my project that ran perfectly before upgrading to Xcode 8 I keep getting the error > > “Use Legacy Swift Language Version” (SWIFT\_VERSION) is required to be > configured correctly for targets which use Swift. Use the [Edit > > Convert > To Current Swift Syntax…] menu to choose a Swift version or...
2016/09/16
[ "https://Stackoverflow.com/questions/39522460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6797346/" ]
> > i)Select every target of Test in Project. ii)Navigate to General tab. > iii)Host application name is **empty** ,so Update with appropriate host name . > > > **Build again** and it will work fine .
[![enter image description here](https://i.stack.imgur.com/eFqXS.png)](https://i.stack.imgur.com/eFqXS.png) So if you select your test target under the general tab, you should see a testing section and a "Host Application" prompt with it. If you select the field to the right, you should be able to select your host app...
50,203,241
Ive upgraded my angular application from version 5 to 6 and im getting this error from the following code. ``` const request = this.evidenceService.get().map((res) => res.data) .catch(error => Observable.of(null)); ``` > > Property 'map' does not exist on type 'Observable'. > > >
2018/05/06
[ "https://Stackoverflow.com/questions/50203241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1548432/" ]
Operator chaining has been transitioned to the use of .pipe() in RXJS v6, you should follow the [recommended migration path for RXJS](https://github.com/ReactiveX/rxjs/blob/master/docs_app/content/guide/v6/migration.md). Additionally, the *catch* operator has been renamed to *catchError*. Here is how it should be done...
according to <https://www.academind.com/learn/javascript/rxjs-6-what-changed/> ***in past*** ``` import 'rxjs/add/operator/map' myObservable .map(data => data * 2) .subscribe(...); ``` ***now*** ``` import { map } from 'rxjs/operators'; myObservable .pipe(map(data => data * 2)) .subscribe(...); ```
50,203,241
Ive upgraded my angular application from version 5 to 6 and im getting this error from the following code. ``` const request = this.evidenceService.get().map((res) => res.data) .catch(error => Observable.of(null)); ``` > > Property 'map' does not exist on type 'Observable'. > > >
2018/05/06
[ "https://Stackoverflow.com/questions/50203241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1548432/" ]
Operator chaining has been transitioned to the use of .pipe() in RXJS v6, you should follow the [recommended migration path for RXJS](https://github.com/ReactiveX/rxjs/blob/master/docs_app/content/guide/v6/migration.md). Additionally, the *catch* operator has been renamed to *catchError*. Here is how it should be done...
[This solved my problem](https://github.com/webmaxru/pwa-workshop-angular/issues/2) here is the code: ``` import { map } from "rxjs/operators"; ``` \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*Example\*\*Below\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\...
50,203,241
Ive upgraded my angular application from version 5 to 6 and im getting this error from the following code. ``` const request = this.evidenceService.get().map((res) => res.data) .catch(error => Observable.of(null)); ``` > > Property 'map' does not exist on type 'Observable'. > > >
2018/05/06
[ "https://Stackoverflow.com/questions/50203241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1548432/" ]
Operator chaining has been transitioned to the use of .pipe() in RXJS v6, you should follow the [recommended migration path for RXJS](https://github.com/ReactiveX/rxjs/blob/master/docs_app/content/guide/v6/migration.md). Additionally, the *catch* operator has been renamed to *catchError*. Here is how it should be done...
Use ``` .pipe(map((res) => res.data)) ``` instead of ``` .map((res) => res.data) ```
50,203,241
Ive upgraded my angular application from version 5 to 6 and im getting this error from the following code. ``` const request = this.evidenceService.get().map((res) => res.data) .catch(error => Observable.of(null)); ``` > > Property 'map' does not exist on type 'Observable'. > > >
2018/05/06
[ "https://Stackoverflow.com/questions/50203241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1548432/" ]
Operator chaining has been transitioned to the use of .pipe() in RXJS v6, you should follow the [recommended migration path for RXJS](https://github.com/ReactiveX/rxjs/blob/master/docs_app/content/guide/v6/migration.md). Additionally, the *catch* operator has been renamed to *catchError*. Here is how it should be done...
If anyone is facing error that json is not supported while writing the following, ``` .pipe(map((res) => res.json())) ``` Then I think in later version of angular it is safe to remove .json . and It will work Perfectly.
50,203,241
Ive upgraded my angular application from version 5 to 6 and im getting this error from the following code. ``` const request = this.evidenceService.get().map((res) => res.data) .catch(error => Observable.of(null)); ``` > > Property 'map' does not exist on type 'Observable'. > > >
2018/05/06
[ "https://Stackoverflow.com/questions/50203241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1548432/" ]
according to <https://www.academind.com/learn/javascript/rxjs-6-what-changed/> ***in past*** ``` import 'rxjs/add/operator/map' myObservable .map(data => data * 2) .subscribe(...); ``` ***now*** ``` import { map } from 'rxjs/operators'; myObservable .pipe(map(data => data * 2)) .subscribe(...); ```
[This solved my problem](https://github.com/webmaxru/pwa-workshop-angular/issues/2) here is the code: ``` import { map } from "rxjs/operators"; ``` \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*Example\*\*Below\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\...
50,203,241
Ive upgraded my angular application from version 5 to 6 and im getting this error from the following code. ``` const request = this.evidenceService.get().map((res) => res.data) .catch(error => Observable.of(null)); ``` > > Property 'map' does not exist on type 'Observable'. > > >
2018/05/06
[ "https://Stackoverflow.com/questions/50203241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1548432/" ]
according to <https://www.academind.com/learn/javascript/rxjs-6-what-changed/> ***in past*** ``` import 'rxjs/add/operator/map' myObservable .map(data => data * 2) .subscribe(...); ``` ***now*** ``` import { map } from 'rxjs/operators'; myObservable .pipe(map(data => data * 2)) .subscribe(...); ```
Use ``` .pipe(map((res) => res.data)) ``` instead of ``` .map((res) => res.data) ```
50,203,241
Ive upgraded my angular application from version 5 to 6 and im getting this error from the following code. ``` const request = this.evidenceService.get().map((res) => res.data) .catch(error => Observable.of(null)); ``` > > Property 'map' does not exist on type 'Observable'. > > >
2018/05/06
[ "https://Stackoverflow.com/questions/50203241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1548432/" ]
according to <https://www.academind.com/learn/javascript/rxjs-6-what-changed/> ***in past*** ``` import 'rxjs/add/operator/map' myObservable .map(data => data * 2) .subscribe(...); ``` ***now*** ``` import { map } from 'rxjs/operators'; myObservable .pipe(map(data => data * 2)) .subscribe(...); ```
If anyone is facing error that json is not supported while writing the following, ``` .pipe(map((res) => res.json())) ``` Then I think in later version of angular it is safe to remove .json . and It will work Perfectly.
50,203,241
Ive upgraded my angular application from version 5 to 6 and im getting this error from the following code. ``` const request = this.evidenceService.get().map((res) => res.data) .catch(error => Observable.of(null)); ``` > > Property 'map' does not exist on type 'Observable'. > > >
2018/05/06
[ "https://Stackoverflow.com/questions/50203241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1548432/" ]
[This solved my problem](https://github.com/webmaxru/pwa-workshop-angular/issues/2) here is the code: ``` import { map } from "rxjs/operators"; ``` \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*Example\*\*Below\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\...
Use ``` .pipe(map((res) => res.data)) ``` instead of ``` .map((res) => res.data) ```
50,203,241
Ive upgraded my angular application from version 5 to 6 and im getting this error from the following code. ``` const request = this.evidenceService.get().map((res) => res.data) .catch(error => Observable.of(null)); ``` > > Property 'map' does not exist on type 'Observable'. > > >
2018/05/06
[ "https://Stackoverflow.com/questions/50203241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1548432/" ]
[This solved my problem](https://github.com/webmaxru/pwa-workshop-angular/issues/2) here is the code: ``` import { map } from "rxjs/operators"; ``` \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*Example\*\*Below\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\...
If anyone is facing error that json is not supported while writing the following, ``` .pipe(map((res) => res.json())) ``` Then I think in later version of angular it is safe to remove .json . and It will work Perfectly.
50,203,241
Ive upgraded my angular application from version 5 to 6 and im getting this error from the following code. ``` const request = this.evidenceService.get().map((res) => res.data) .catch(error => Observable.of(null)); ``` > > Property 'map' does not exist on type 'Observable'. > > >
2018/05/06
[ "https://Stackoverflow.com/questions/50203241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1548432/" ]
Use ``` .pipe(map((res) => res.data)) ``` instead of ``` .map((res) => res.data) ```
If anyone is facing error that json is not supported while writing the following, ``` .pipe(map((res) => res.json())) ``` Then I think in later version of angular it is safe to remove .json . and It will work Perfectly.
29,203,114
I used PHP to create an HTML page, which compiles a list of data points and pushes them into an array, declares the array in the header, and also echo's a huge list of form input objects into the body. The list I'm working with is just under 15,000 lines which are put into 1 array. I more or less created a search box...
2015/03/23
[ "https://Stackoverflow.com/questions/29203114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4701515/" ]
I don't know about all the rest of it (too much text for my reading tastes!) but wrt the answer you posted, this part of it: ``` awk 'BEGIN{FS="__"} NF == 10 && $1 >= "'$backDATE'" && $4 == "'$x'" && $6 == "CLOSED" {while ( "date +%a -d "$1"" | getline newDAY){if (newDAY == "'$y'") print $2" "$3}}' /home/absolute/path...
Ok, so I ended up using this: ``` >backDATE=150000; > for x in $listOFsites; do > for y in Sun Mon Tue Wed Thu Fri Sat; do > totalHOURS=$( awk 'BEGIN{FS="__"} NF == 10 && $1 >= "'$backDATE'" && $4 == "'$x'" && $6 == "CLOSED" {while ( ( "date +%a -d \""$1"\"" | getline newDAY) > 0 ){if (newDAY ==...
72,763,605
sorry but I just started learning python not too long ago and I'm stuck in thisprogram code, I just can't get it to work like it should. ``` class Dog(): def __init__(self,name,breed,owner): self.name = name self.breed = breed self.owner = owner class Person(): def __init__(self,name):...
2022/06/26
[ "https://Stackoverflow.com/questions/72763605", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19421032/" ]
You can use `__str__` or `__repr__` to get all the object's attributes in a more human-readable format. `__str__` (read as "dunder (double-underscore) string") and `__repr__` (read as "dunder-repper" (for "representation")) are both special methods that return **strings based on the state of the object**. ``` class D...
when you assign `self.owner = owner` self.owner stores the reference of owner object you should access the name value by mentioning the attribute `self.owner = owner.name`. ``` class Dog(): def __init__(self,name,breed,owner): self.name = name self.breed = breed self.owner_name = owner.name...
72,763,605
sorry but I just started learning python not too long ago and I'm stuck in thisprogram code, I just can't get it to work like it should. ``` class Dog(): def __init__(self,name,breed,owner): self.name = name self.breed = breed self.owner = owner class Person(): def __init__(self,name):...
2022/06/26
[ "https://Stackoverflow.com/questions/72763605", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19421032/" ]
You can use `__str__` or `__repr__` to get all the object's attributes in a more human-readable format. `__str__` (read as "dunder (double-underscore) string") and `__repr__` (read as "dunder-repper" (for "representation")) are both special methods that return **strings based on the state of the object**. ``` class D...
You should add `__repr__` and `__str__` methods to the Person class. Or just `__repr__`. ``` class Person: def __init__(self,name): self.name=name def __repr__(self) return str(self.name) ```
72,763,605
sorry but I just started learning python not too long ago and I'm stuck in thisprogram code, I just can't get it to work like it should. ``` class Dog(): def __init__(self,name,breed,owner): self.name = name self.breed = breed self.owner = owner class Person(): def __init__(self,name):...
2022/06/26
[ "https://Stackoverflow.com/questions/72763605", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19421032/" ]
when you assign `self.owner = owner` self.owner stores the reference of owner object you should access the name value by mentioning the attribute `self.owner = owner.name`. ``` class Dog(): def __init__(self,name,breed,owner): self.name = name self.breed = breed self.owner_name = owner.name...
You should add `__repr__` and `__str__` methods to the Person class. Or just `__repr__`. ``` class Person: def __init__(self,name): self.name=name def __repr__(self) return str(self.name) ```
14,713,955
I have been trying to create a simple portal to track logs from a mobile application. As such, I have used entity framework and MVC3 to help me with this. However recently I have been stuck when trying to retrieve the entity from the database. Here is the Run class: ``` namespace LifestyleGuide.Models { [DataCont...
2013/02/05
[ "https://Stackoverflow.com/questions/14713955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2029253/" ]
If you are using hostName with wild cards (eg. "www.example1.com|example1.com"), you need to set targetHostName="www.example1.com" on your entry. Even if you only have one domain, set targetHostName, as there is one thing/function that only looks at targetHostName. Eg. GetItemUrl() doesn't work as planned without a ta...
Have you set the hostName value of the <site> entry in web.config? ``` <site name="example1" hostName="www.example1.com" ... /> <site name="example2" hostName="www.example2.com" ... /> ``` There's a very good blog post on this here: <http://blog.paulgeorge.co.uk/2011/05/01/sitecore-linkmanager-inside-out-muti-site-...
34,771,626
This is the error received: ``` C:\code\workspace\test_app_polymer>pub get Resolving dependencies... Git error. Command: git fetch fatal: Not a git repository (or any of the parent directories): .git ``` It seems that whatever it is looking at, at that point is not a git repo. The command I used to clone my repo wa...
2016/01/13
[ "https://Stackoverflow.com/questions/34771626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1404049/" ]
There were 2 issues i needed to address. the concept of pub get. When i was doing it, it was not giving me a password spot to enter in things like IntelliJ. So because of this, I removed the password. Dont worry it isnt my normal id\_rsa, but instead just a little dev one. Anyways, now that it wont pass the password i...
There was a bug introduced recently and already fixed AFAIK. Until you get the updated version just add `.git` ``` url: git@git.foo.com:portal_ng/ui_polymer.git ``` I think this should fix it.
23,370,516
I have problems with gnuplot histogram. I have file data and want to create xtics manually. Here my data: ``` 5 10 15 20 25 30 35 ``` Here my gnuplot: ``` set terminal pngcairo enhanced font "arial,10" fontscale 1.0 size 500, 350 set output 'histograms.2.png' set boxwidth 0.9 absolute set style fill solid...
2014/04/29
[ "https://Stackoverflow.com/questions/23370516", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1000766/" ]
I hope I understand your question. You can perhaps do the following: Arrange your data file like this (say in file1.dat): ``` "Legend 1" 5 "Legend 2" 10 "Legend 3" 15 "Legend 4" 20 "Legend 5" 25 "Legend 6" 30 "Legend 7" 35 ``` Then have the following in your Gnuplot script: ``` file1 = "file1.dat" set style data h...
Maybe the problem is here -->using($0):xtic("sdaf") title "Legend 1", set it to $1 instead of $0
26,918,752
On Azure, <http://azure.microsoft.com/en-us/documentation/articles/virtual-networks-create-site-to-site-cross-premises-connectivity/> the following is stated in relation to site to site connectivity. > > A VPN device with a public IPv4 address. You'll need the IP address in > order to complete the wizard. > > > ...
2014/11/13
[ "https://Stackoverflow.com/questions/26918752", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4072345/" ]
I don't see to be limiting at all. And yes, this is the case. It is on the official documentation before all. When talk about Point-to-Site, I believe you missunderstand the service a bit. Azure Point-to-Site connectivity allows a single computer or laptop (named `Point`) to connect to Azure VPN Gateway (`Site`). In ...
To tell you the truth I am not sure that the Azure VPN gateway device supports IPSec NAT of any kind at all, whether Point-to-Site or Site-to-Site. Below are my findings. My best lead so far is finding #4. 1. In all my research over the past week, it seems like it’s presently impossible to achieve this with Azure. See...
56,170,367
Trying to calculate the range between different steps in my data-table and return the median for each calculation using this SQL code: ``` SELECT median(datediff(seconds,one,two)) as step_one, median(datediff(seconds,two,three)) as step_two, FROM Table ``` This returns the following error message: > > [0A00...
2019/05/16
[ "https://Stackoverflow.com/questions/56170367", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7158458/" ]
If a statement includes multiple calls to sort-based aggregate functions (LISTAGG, PERCENTILE\_CONT, or MEDIAN), they must all use the same ORDER BY values. Note that MEDIAN applies an implicit order by on the expression value. From <https://docs.aws.amazon.com/redshift/latest/dg/r_PERCENTILE_CONT.html>
For this query as there is no group by, you can simply break down the query in two parts: ``` Select step_one, step_two From (SELECT median(datediff(seconds,one,two)) as step_one FROM Table) as a, (SELECT median(datediff(seconds,two,three)) as step_two, FROM Table) as b ``` But in mo...
90,079
White wine and red wine have great flavors when added to a dish. But because I'm on medication, I'm not able to use wine (my body would have odd reactions when I consume food cooked in white wine) I wonder what is flavor-wise the closest nonalcoholic substitute for white wine and red wine? I have looked at [What is a ...
2018/05/30
[ "https://cooking.stackexchange.com/questions/90079", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/67406/" ]
I depends on the recipe, but generally no, white wine vinegar is a very different product than white wine. Vinegar is produced when bacteria eat alcohol and produce acid which changes the flavor dramatically. If the recipe calls for acid already (for instance lemon juice) then it can work, you just reduce the additiona...
If you can't get de-alcoholised wine or don't want to (as it's had the alcohol removed that's still off-limits for some people) you'd be better off using a mixture of grape juice and lemon juice, possibly with water. There are various non-brewed wine-like drinks but they're less appealing than they sound. The proporti...
51,909,972
I'am newbie on ReactJs, I want when I select the product name the price will be displayed, after that I put the Quantity and the total column will be displayed the result of Quantity\*Price. I try to display the price, but the problem the total column always displayed NaN. As you can see the code below : ``` class Ajo...
2018/08/18
[ "https://Stackoverflow.com/questions/51909972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10106154/" ]
Find in code any reference to 'remove\_wpcf7' and find method is assigned in filter/hook. In this case you can find, for example a method inside a class called incorrectly. For example: `add_filter('filter_name', 'method');`. You can fix, for example, by add: `add_filter('filter_name', array($this, 'method'));` or if ...
Try to add this function to your WP. Here is the code to add in the function.php file of your theme: ``` function remove_wpcf7(){ } ```
51,909,972
I'am newbie on ReactJs, I want when I select the product name the price will be displayed, after that I put the Quantity and the total column will be displayed the result of Quantity\*Price. I try to display the price, but the problem the total column always displayed NaN. As you can see the code below : ``` class Ajo...
2018/08/18
[ "https://Stackoverflow.com/questions/51909972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10106154/" ]
Find in code any reference to 'remove\_wpcf7' and find method is assigned in filter/hook. In this case you can find, for example a method inside a class called incorrectly. For example: `add_filter('filter_name', 'method');`. You can fix, for example, by add: `add_filter('filter_name', array($this, 'method'));` or if ...
If you're here because of Timber/Twig this is an example of the correct way to use add\_filter with timber/context: ``` add_filter('timber/context', function($context) { $context['promo_modal'] = get_field('promo_modal', 'option'); return $context; }); ```
51,909,972
I'am newbie on ReactJs, I want when I select the product name the price will be displayed, after that I put the Quantity and the total column will be displayed the result of Quantity\*Price. I try to display the price, but the problem the total column always displayed NaN. As you can see the code below : ``` class Ajo...
2018/08/18
[ "https://Stackoverflow.com/questions/51909972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10106154/" ]
Finally found the solution ... It related to the Server Time Settings. If anyone else is experiencing a similar issue with their Google Authentication feature, you will need to ensure your Server's time settings are in sync with the 'Internet's Clock'. 1. Login into your VPS; 2. Head to `Tools & Settings > General S...
Try to add this function to your WP. Here is the code to add in the function.php file of your theme: ``` function remove_wpcf7(){ } ```
51,909,972
I'am newbie on ReactJs, I want when I select the product name the price will be displayed, after that I put the Quantity and the total column will be displayed the result of Quantity\*Price. I try to display the price, but the problem the total column always displayed NaN. As you can see the code below : ``` class Ajo...
2018/08/18
[ "https://Stackoverflow.com/questions/51909972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10106154/" ]
If you're here because of Timber/Twig this is an example of the correct way to use add\_filter with timber/context: ``` add_filter('timber/context', function($context) { $context['promo_modal'] = get_field('promo_modal', 'option'); return $context; }); ```
Try to add this function to your WP. Here is the code to add in the function.php file of your theme: ``` function remove_wpcf7(){ } ```
51,909,972
I'am newbie on ReactJs, I want when I select the product name the price will be displayed, after that I put the Quantity and the total column will be displayed the result of Quantity\*Price. I try to display the price, but the problem the total column always displayed NaN. As you can see the code below : ``` class Ajo...
2018/08/18
[ "https://Stackoverflow.com/questions/51909972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10106154/" ]
Finally found the solution ... It related to the Server Time Settings. If anyone else is experiencing a similar issue with their Google Authentication feature, you will need to ensure your Server's time settings are in sync with the 'Internet's Clock'. 1. Login into your VPS; 2. Head to `Tools & Settings > General S...
If you're here because of Timber/Twig this is an example of the correct way to use add\_filter with timber/context: ``` add_filter('timber/context', function($context) { $context['promo_modal'] = get_field('promo_modal', 'option'); return $context; }); ```
3,580,727
I am trying to prove $\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt3$ for an acute triangle. There is: $$\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt{3\sum\frac{b^2+c^2-a^2}{a^2+2bc}}$$ So we have to prove: $\sum\frac{b^2+c^2-a^2}{a^2+2bc}\leq 1 $ We observe that $\frac{b^2+c^2-a^2}{a^2+2bc}=\frac{(b+c)^2}{...
2020/03/14
[ "https://math.stackexchange.com/questions/3580727", "https://math.stackexchange.com", "https://math.stackexchange.com/users/625509/" ]
As the general formula for cubics is not taught, the fist step is to hope that at least one of the roots is rational. By the rational root theorem, such a root (of an integer polynomial with highest coefficient $1$) must be a divisor of the constant term, i.e., $\in\{\pm1,\pm2,\pm3,\pm4\pm6,\pm12\}$. After finitely man...
Most of the time you will not be able to factorise polynomials easily. In fact, sometimes the cubics are difficult to do it. For example, try to factorise the following: $$x^3-2x+8 = f(x)$$ It is almost impossible to do it, unless you know the cubic formula. In this example, the only real root is $$\sqrt[3]{\frac{-3...
3,580,727
I am trying to prove $\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt3$ for an acute triangle. There is: $$\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt{3\sum\frac{b^2+c^2-a^2}{a^2+2bc}}$$ So we have to prove: $\sum\frac{b^2+c^2-a^2}{a^2+2bc}\leq 1 $ We observe that $\frac{b^2+c^2-a^2}{a^2+2bc}=\frac{(b+c)^2}{...
2020/03/14
[ "https://math.stackexchange.com/questions/3580727", "https://math.stackexchange.com", "https://math.stackexchange.com/users/625509/" ]
As the general formula for cubics is not taught, the fist step is to hope that at least one of the roots is rational. By the rational root theorem, such a root (of an integer polynomial with highest coefficient $1$) must be a divisor of the constant term, i.e., $\in\{\pm1,\pm2,\pm3,\pm4\pm6,\pm12\}$. After finitely man...
If you happen to notice the relatively spot-able root of $x=1$, you can then factor out $x-1$ from the polynomial, and continue on with the resulting quadratic factor.
3,580,727
I am trying to prove $\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt3$ for an acute triangle. There is: $$\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt{3\sum\frac{b^2+c^2-a^2}{a^2+2bc}}$$ So we have to prove: $\sum\frac{b^2+c^2-a^2}{a^2+2bc}\leq 1 $ We observe that $\frac{b^2+c^2-a^2}{a^2+2bc}=\frac{(b+c)^2}{...
2020/03/14
[ "https://math.stackexchange.com/questions/3580727", "https://math.stackexchange.com", "https://math.stackexchange.com/users/625509/" ]
For this specific problem there is a trick: decompose the middle term and do a partial factorization like this: \begin{align} x^3-13x+12=\\ x^3-12x-x+12 = \\ x(x^2-1) - 12(x-1) = \\ x(x-1)(x+1) - 12(x-1) = \\ (x-1)(x^2+x-12) = \\(x-1)(x+4)(x-3) \end{align} But this is a special case: in the general case you have to f...
As the general formula for cubics is not taught, the fist step is to hope that at least one of the roots is rational. By the rational root theorem, such a root (of an integer polynomial with highest coefficient $1$) must be a divisor of the constant term, i.e., $\in\{\pm1,\pm2,\pm3,\pm4\pm6,\pm12\}$. After finitely man...
3,580,727
I am trying to prove $\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt3$ for an acute triangle. There is: $$\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt{3\sum\frac{b^2+c^2-a^2}{a^2+2bc}}$$ So we have to prove: $\sum\frac{b^2+c^2-a^2}{a^2+2bc}\leq 1 $ We observe that $\frac{b^2+c^2-a^2}{a^2+2bc}=\frac{(b+c)^2}{...
2020/03/14
[ "https://math.stackexchange.com/questions/3580727", "https://math.stackexchange.com", "https://math.stackexchange.com/users/625509/" ]
Since the coefficient of $x^3$ is 1, then the integer roots of $f(x)$ (if it exists) are divisors of constant term. In this case, the divisor of $12$. Let's try for $x=1$. Luckily, we get $f(1)=1^3-13\cdot1+12=0$. So, $x=1$ is a root of $f(x)$ and $x-1$ is a factor of $f(x)$. Divide $f(x)$ by $x-1$ to get the other fa...
As the general formula for cubics is not taught, the fist step is to hope that at least one of the roots is rational. By the rational root theorem, such a root (of an integer polynomial with highest coefficient $1$) must be a divisor of the constant term, i.e., $\in\{\pm1,\pm2,\pm3,\pm4\pm6,\pm12\}$. After finitely man...
3,580,727
I am trying to prove $\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt3$ for an acute triangle. There is: $$\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt{3\sum\frac{b^2+c^2-a^2}{a^2+2bc}}$$ So we have to prove: $\sum\frac{b^2+c^2-a^2}{a^2+2bc}\leq 1 $ We observe that $\frac{b^2+c^2-a^2}{a^2+2bc}=\frac{(b+c)^2}{...
2020/03/14
[ "https://math.stackexchange.com/questions/3580727", "https://math.stackexchange.com", "https://math.stackexchange.com/users/625509/" ]
For this specific problem there is a trick: decompose the middle term and do a partial factorization like this: \begin{align} x^3-13x+12=\\ x^3-12x-x+12 = \\ x(x^2-1) - 12(x-1) = \\ x(x-1)(x+1) - 12(x-1) = \\ (x-1)(x^2+x-12) = \\(x-1)(x+4)(x-3) \end{align} But this is a special case: in the general case you have to f...
Most of the time you will not be able to factorise polynomials easily. In fact, sometimes the cubics are difficult to do it. For example, try to factorise the following: $$x^3-2x+8 = f(x)$$ It is almost impossible to do it, unless you know the cubic formula. In this example, the only real root is $$\sqrt[3]{\frac{-3...
3,580,727
I am trying to prove $\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt3$ for an acute triangle. There is: $$\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt{3\sum\frac{b^2+c^2-a^2}{a^2+2bc}}$$ So we have to prove: $\sum\frac{b^2+c^2-a^2}{a^2+2bc}\leq 1 $ We observe that $\frac{b^2+c^2-a^2}{a^2+2bc}=\frac{(b+c)^2}{...
2020/03/14
[ "https://math.stackexchange.com/questions/3580727", "https://math.stackexchange.com", "https://math.stackexchange.com/users/625509/" ]
Since the coefficient of $x^3$ is 1, then the integer roots of $f(x)$ (if it exists) are divisors of constant term. In this case, the divisor of $12$. Let's try for $x=1$. Luckily, we get $f(1)=1^3-13\cdot1+12=0$. So, $x=1$ is a root of $f(x)$ and $x-1$ is a factor of $f(x)$. Divide $f(x)$ by $x-1$ to get the other fa...
Most of the time you will not be able to factorise polynomials easily. In fact, sometimes the cubics are difficult to do it. For example, try to factorise the following: $$x^3-2x+8 = f(x)$$ It is almost impossible to do it, unless you know the cubic formula. In this example, the only real root is $$\sqrt[3]{\frac{-3...
3,580,727
I am trying to prove $\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt3$ for an acute triangle. There is: $$\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt{3\sum\frac{b^2+c^2-a^2}{a^2+2bc}}$$ So we have to prove: $\sum\frac{b^2+c^2-a^2}{a^2+2bc}\leq 1 $ We observe that $\frac{b^2+c^2-a^2}{a^2+2bc}=\frac{(b+c)^2}{...
2020/03/14
[ "https://math.stackexchange.com/questions/3580727", "https://math.stackexchange.com", "https://math.stackexchange.com/users/625509/" ]
For this specific problem there is a trick: decompose the middle term and do a partial factorization like this: \begin{align} x^3-13x+12=\\ x^3-12x-x+12 = \\ x(x^2-1) - 12(x-1) = \\ x(x-1)(x+1) - 12(x-1) = \\ (x-1)(x^2+x-12) = \\(x-1)(x+4)(x-3) \end{align} But this is a special case: in the general case you have to f...
If you happen to notice the relatively spot-able root of $x=1$, you can then factor out $x-1$ from the polynomial, and continue on with the resulting quadratic factor.
3,580,727
I am trying to prove $\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt3$ for an acute triangle. There is: $$\sum \sqrt \frac{b^2+c^2-a^2}{a^2+2bc} \leq \sqrt{3\sum\frac{b^2+c^2-a^2}{a^2+2bc}}$$ So we have to prove: $\sum\frac{b^2+c^2-a^2}{a^2+2bc}\leq 1 $ We observe that $\frac{b^2+c^2-a^2}{a^2+2bc}=\frac{(b+c)^2}{...
2020/03/14
[ "https://math.stackexchange.com/questions/3580727", "https://math.stackexchange.com", "https://math.stackexchange.com/users/625509/" ]
Since the coefficient of $x^3$ is 1, then the integer roots of $f(x)$ (if it exists) are divisors of constant term. In this case, the divisor of $12$. Let's try for $x=1$. Luckily, we get $f(1)=1^3-13\cdot1+12=0$. So, $x=1$ is a root of $f(x)$ and $x-1$ is a factor of $f(x)$. Divide $f(x)$ by $x-1$ to get the other fa...
If you happen to notice the relatively spot-able root of $x=1$, you can then factor out $x-1$ from the polynomial, and continue on with the resulting quadratic factor.
66,161,626
I'm using Visual Studio to run py file. I'm very new to OOP, so I'm having a difficulty to debug this issue. It says name "mng" is not defined and "Manager" object has no attribute "salary". How should I fix this issue? ``` class Employee: MIN_SALARY = 30000 def __init__(self, name, salary=MIN_SALARY): ...
2021/02/11
[ "https://Stackoverflow.com/questions/66161626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13715709/" ]
There are a few issues with this code. But, your error could be solve with: ``` class Employee: MIN_SALARY = 30000 def __init__(self, name, salary=MIN_SALARY): self.name = name if salary >= Employee.MIN_SALARY: ``` `self.salary` was not declare before the comparison. So, manager do not have...
You have to assign something to an attribute before you can use it. Just change your logic a bit. ``` def __init__(self, name, salary=MIN_SALARY): self.name = name self.salary = salary if self.salary < Employee.MIN_SALARY: self.salary = Employee.MIN_SALARY ``` Or you could use...
171,329
`Replace[x, {{x -> a}, {x -> b},{y->c}}]` gives `{a,b,x}`. How to get just `{a,b}` from the above expression?
2018/04/17
[ "https://mathematica.stackexchange.com/questions/171329", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/34732/" ]
I assume you're trying to use this for a more general case. Knowing what the general case is would help me know which solution would be generalizable to your situation. One way is to use ReplaceList with Flatten: ``` Flatten[ReplaceList[x, {{x -> a}, {x -> b}, {y -> c}}]] ``` Or more simply: ``` ReplaceList[x, {x ...
Add an extra replacement to each list such that if nothing matches you return `Nothing` ``` nullrep = _ :> Nothing (* _ :> Nothing *) Replace[x, {{x -> a, nullrep}, {x -> b, nullrep}, {y -> c, nullrep}}] (* {a, b} *) ```
62,442,444
I am using WSO2 Community Edition : [![enter image description here](https://i.stack.imgur.com/3iZwU.png)](https://i.stack.imgur.com/3iZwU.png) I was trying to add the entitlement extension according to this URL : <https://docs.wso2.com/m/mobile.action#page/97563684> So I clone the GIT repo from here, and do the mav...
2020/06/18
[ "https://Stackoverflow.com/questions/62442444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4609326/" ]
Since when using `group by` each row index will be a tuple `(2012-04-21,1)`,`(2012-04-21,2)`,`(2012-04-22,1)`: ``` from datetime import datetime import pandas as pd import io s_e=""" Id Timestamp Data ProductId Date 2012-04-21 19389576 2012-04-21 00:04:03.533 39.0 1 2012-04-21 2012...
Try to do a dual selector by adding each one into a set of parenthesis and in between add a ampersand &: ``` df[(df[“Date”] == “2020-04-21”)& (df[“ItemId”] == 2)] ```
62,442,444
I am using WSO2 Community Edition : [![enter image description here](https://i.stack.imgur.com/3iZwU.png)](https://i.stack.imgur.com/3iZwU.png) I was trying to add the entitlement extension according to this URL : <https://docs.wso2.com/m/mobile.action#page/97563684> So I clone the GIT repo from here, and do the mav...
2020/06/18
[ "https://Stackoverflow.com/questions/62442444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4609326/" ]
IIUC, If you want to simply print the data for each group use: ``` for key, group in df.groupby(['ItemId', 'Date']): print(key) print(group) ``` This prints: ``` (1, '2012-04-21') Id Timestamp Data ItemId Date 2012-04-21 19389576 2012-04-21 00:04:03.533 39.0 ...
Try to do a dual selector by adding each one into a set of parenthesis and in between add a ampersand &: ``` df[(df[“Date”] == “2020-04-21”)& (df[“ItemId”] == 2)] ```
62,442,444
I am using WSO2 Community Edition : [![enter image description here](https://i.stack.imgur.com/3iZwU.png)](https://i.stack.imgur.com/3iZwU.png) I was trying to add the entitlement extension according to this URL : <https://docs.wso2.com/m/mobile.action#page/97563684> So I clone the GIT repo from here, and do the mav...
2020/06/18
[ "https://Stackoverflow.com/questions/62442444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4609326/" ]
Since when using `group by` each row index will be a tuple `(2012-04-21,1)`,`(2012-04-21,2)`,`(2012-04-22,1)`: ``` from datetime import datetime import pandas as pd import io s_e=""" Id Timestamp Data ProductId Date 2012-04-21 19389576 2012-04-21 00:04:03.533 39.0 1 2012-04-21 2012...
IIUC, If you want to simply print the data for each group use: ``` for key, group in df.groupby(['ItemId', 'Date']): print(key) print(group) ``` This prints: ``` (1, '2012-04-21') Id Timestamp Data ItemId Date 2012-04-21 19389576 2012-04-21 00:04:03.533 39.0 ...
19,632,453
``` function ShowMessage() { var url = '/primes/PrimesServlet'; var result = CQ.HTTP.eval(url); var i = Number(document.getElementById("input").value); var str = document.getElementById("test"); // if(result.checkPrimes(i)) // Want to call here str.innerHTML = i + " là số nguyên tố"; // else...
2013/10/28
[ "https://Stackoverflow.com/questions/19632453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2801197/" ]
> > I want to call method checkPrimes(long n) from function javascript "ShowMessage()" but I can't. > > > **Yes you cannot.** Java plays on server side and javascript plays on client side. Java needs compiled code and Javascript is just a scripting language interpreted by the browser. What you need is just make...
you can not call methods using javascript because javascript runs in client side and javacodes lies in server side. to call a method `checkPrimes` you can use ajax.
19,632,453
``` function ShowMessage() { var url = '/primes/PrimesServlet'; var result = CQ.HTTP.eval(url); var i = Number(document.getElementById("input").value); var str = document.getElementById("test"); // if(result.checkPrimes(i)) // Want to call here str.innerHTML = i + " là số nguyên tố"; // else...
2013/10/28
[ "https://Stackoverflow.com/questions/19632453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2801197/" ]
> > I want to call method checkPrimes(long n) from function javascript "ShowMessage()" but I can't. > > > **Yes you cannot.** Java plays on server side and javascript plays on client side. Java needs compiled code and Javascript is just a scripting language interpreted by the browser. What you need is just make...
You could ether use AJAX-Calls or write a controller and call it via a request from the JavaScript. The proble is (as the others said), that javascript runs in the browser of the client and your businesslogic runs on the webserver. With AJAX you can trigger the server to execute code.
19,632,453
``` function ShowMessage() { var url = '/primes/PrimesServlet'; var result = CQ.HTTP.eval(url); var i = Number(document.getElementById("input").value); var str = document.getElementById("test"); // if(result.checkPrimes(i)) // Want to call here str.innerHTML = i + " là số nguyên tố"; // else...
2013/10/28
[ "https://Stackoverflow.com/questions/19632453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2801197/" ]
> > I want to call method checkPrimes(long n) from function javascript "ShowMessage()" but I can't. > > > **Yes you cannot.** Java plays on server side and javascript plays on client side. Java needs compiled code and Javascript is just a scripting language interpreted by the browser. What you need is just make...
You can't call like that. You should do operation on `doGet` or `doPost` methods than write the result `on PrintWriter.write` method. ``` public class PrimesServlet extends HttpServlet { protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOExcep...