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 |
|---|---|---|---|---|---|
55,109,736 | I get the error message below.
If you haven't installed orca yet, you can do so using conda as follows:
```
$ conda install -c plotly plotly-orca
```
Alternatively, see other installation methods in the orca project README at
<https://github.com/plotly/orca>.
I tried:
`!pip install plotly-orca`, but that throws an... | 2019/03/11 | [
"https://Stackoverflow.com/questions/55109736",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1380254/"
] | As a workaround put:
```
from matplotlib.axes._axes import _log as matplotlib_axes_logger
matplotlib_axes_logger.setLevel('ERROR')
``` | ```
c=np.array([0.5, 0.5, 0.5]).reshape(1,-1)
``` |
55,109,736 | I get the error message below.
If you haven't installed orca yet, you can do so using conda as follows:
```
$ conda install -c plotly plotly-orca
```
Alternatively, see other installation methods in the orca project README at
<https://github.com/plotly/orca>.
I tried:
`!pip install plotly-orca`, but that throws an... | 2019/03/11 | [
"https://Stackoverflow.com/questions/55109736",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1380254/"
] | You can also make your c argument 2D with:
```
c=color.reshape(1,-1)
```
or
```
c=np.array([color])
```
or just change your original color array to 2D:
```
color = cm.nipy_spectral(float(i) / n_clusters).reshape(1,-1)
```
p.s.: As I need 50 reputation to comment, I just open a new answer, though th... | First produce data and define a color:
```
import numpy
import matplotlib
import matplotlib.pyplot
#Make the color you actually want:
Color = numpy.array([.5, .6, .7])
#Make some data:
Vals = numpy.random.uniform( size = (10, 3) )
PointCount = Vals.shape[0]
Xvals = Vals[:, 0]
Yvals = Vals[:, 1]
Zvals = Vals[:, 2]
`... |
55,109,736 | I get the error message below.
If you haven't installed orca yet, you can do so using conda as follows:
```
$ conda install -c plotly plotly-orca
```
Alternatively, see other installation methods in the orca project README at
<https://github.com/plotly/orca>.
I tried:
`!pip install plotly-orca`, but that throws an... | 2019/03/11 | [
"https://Stackoverflow.com/questions/55109736",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1380254/"
] | First produce data and define a color:
```
import numpy
import matplotlib
import matplotlib.pyplot
#Make the color you actually want:
Color = numpy.array([.5, .6, .7])
#Make some data:
Vals = numpy.random.uniform( size = (10, 3) )
PointCount = Vals.shape[0]
Xvals = Vals[:, 0]
Yvals = Vals[:, 1]
Zvals = Vals[:, 2]
`... | ```
c=np.array([0.5, 0.5, 0.5]).reshape(1,-1)
``` |
55,109,736 | I get the error message below.
If you haven't installed orca yet, you can do so using conda as follows:
```
$ conda install -c plotly plotly-orca
```
Alternatively, see other installation methods in the orca project README at
<https://github.com/plotly/orca>.
I tried:
`!pip install plotly-orca`, but that throws an... | 2019/03/11 | [
"https://Stackoverflow.com/questions/55109736",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1380254/"
] | You can also make your c argument 2D with:
```
c=color.reshape(1,-1)
```
or
```
c=np.array([color])
```
or just change your original color array to 2D:
```
color = cm.nipy_spectral(float(i) / n_clusters).reshape(1,-1)
```
p.s.: As I need 50 reputation to comment, I just open a new answer, though th... | ```
c=np.array([0.5, 0.5, 0.5]).reshape(1,-1)
``` |
6,407,112 | Here is my web.config file:
```
<system.net>
<mailSettings>
<smtp from="xxx@gmail.com" >
<network host="smtp.gmail.com" port="587" userName="xxx@gmail.com" password="yyy" />
</smtp>
</mailSettings>
</system.net>
```
I need to enable TLS, a requirement of my email server. However ... | 2011/06/20 | [
"https://Stackoverflow.com/questions/6407112",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5274/"
] | Its actually equivalent - TLS is kinda of broader than SSL. So use `enableSsl= "true"` for enabling TLS. As per [MSDN documentation](http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.enablessl.aspx), that will force SMTPClient to use [RFC 3207](http://www.ietf.org/rfc/rfc3207.txt)
(and RFC uses both te... | TLS (Transport Level Security) is the slightly broader term that has replaced SSL (Secure Sockets Layer) in securing HTTP communications. So what you are being asked to do is enable SSL.
There is no setting in Web.Config for System.Net.Mail (.net 2.0) that maps to EnableSSL property of System.Net.Mail.SmtpClient.
R... |
34,121,343 | I am developing in MVC 5, and I am receiving an error on a GET that can return multiple records (900+).
This page also POSTs a multiple row update, but I am receiving the infinite loop on the GET. If the page has a lot of records returned (120ish+), I get the infinite loop error. It doesn't seem to happen on pages wi... | 2015/12/06 | [
"https://Stackoverflow.com/questions/34121343",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4304653/"
] | Your function:
```
DECLARE
BEGIN
END;
... something
END;
```
Add another BEGIN at begin or move your IF inside existing BEGIN END block and remove second END.
EDIT: after clarification
```
CREATE OR REPLACE FUNCTION f2 (v_nume employees.last_name%TYPE DEFAULT 'Bell')
RETURN NUMBER
IS
salariu employees.... | Oracle saves the compile errors in a table. I use the following query for retrieving the PL/SQL errors in my stored procs/funcs:
```
SELECT '*** ERROR in ' || TYPE || ' "' || NAME || '", line ' || LINE || ', position ' || POSITION || ': ' || TEXT
FROM SYS.USER_ERRORS
```
You could try running it and see if it help... |
34,121,343 | I am developing in MVC 5, and I am receiving an error on a GET that can return multiple records (900+).
This page also POSTs a multiple row update, but I am receiving the infinite loop on the GET. If the page has a lot of records returned (120ish+), I get the infinite loop error. It doesn't seem to happen on pages wi... | 2015/12/06 | [
"https://Stackoverflow.com/questions/34121343",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4304653/"
] | ```
Try this. It will definelty help you out.
CREATE OR REPLACE FUNCTION f2(
v_nume employees.last_name%TYPE DEFAULT 'Bell')
RETURN NUMBER
IS
salariu employees.salary%type;
outretvalue NUMBER(2) := 0;
lv_cnt PLS_INTEGER;
BEGIN
SELECT salary INTO salariu FROM employees WHERE last_name = v_nume;
RETURN s... | Oracle saves the compile errors in a table. I use the following query for retrieving the PL/SQL errors in my stored procs/funcs:
```
SELECT '*** ERROR in ' || TYPE || ' "' || NAME || '", line ' || LINE || ', position ' || POSITION || ': ' || TEXT
FROM SYS.USER_ERRORS
```
You could try running it and see if it help... |
14,112 | I am an undergraduate and I do not know much about the rules of writing an email.
The email system used by our university is not convenient at all: it responds slowly, often crashes, and its common to miss important emails.
I need to email profs in our school and other universities. Is it necessary for me to use the e... | 2013/11/15 | [
"https://academia.stackexchange.com/questions/14112",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/6962/"
] | In the cases I'm familiar with (U.S. universities), using your own e-mail account should be completely fine, subject to some obvious caveats. One is that it's best to have an e-mail address that doesn't look foolish or offensive. People sometimes choose very strange usernames, and you don't want that to reflect poorly ... | Use of University's Email Address or Personal Email varies on content being communicated in the email.
* If you are communicating about your assignments or discussing something in the capacity of being a student, e.g., discussing topic or classes schedule, **you should prefer your University's Email address to communi... |
14,112 | I am an undergraduate and I do not know much about the rules of writing an email.
The email system used by our university is not convenient at all: it responds slowly, often crashes, and its common to miss important emails.
I need to email profs in our school and other universities. Is it necessary for me to use the e... | 2013/11/15 | [
"https://academia.stackexchange.com/questions/14112",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/6962/"
] | In the cases I'm familiar with (U.S. universities), using your own e-mail account should be completely fine, subject to some obvious caveats. One is that it's best to have an e-mail address that doesn't look foolish or offensive. People sometimes choose very strange usernames, and you don't want that to reflect poorly ... | This depends entirely on the rules of your university, the preferences of the respective professor, and your own long-term convenience:
* The possible conflicts with rules of the university have been explained by the other answers already.
* The respective professor (or whoever you are mailing to) may have specific pr... |
14,112 | I am an undergraduate and I do not know much about the rules of writing an email.
The email system used by our university is not convenient at all: it responds slowly, often crashes, and its common to miss important emails.
I need to email profs in our school and other universities. Is it necessary for me to use the e... | 2013/11/15 | [
"https://academia.stackexchange.com/questions/14112",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/6962/"
] | In the cases I'm familiar with (U.S. universities), using your own e-mail account should be completely fine, subject to some obvious caveats. One is that it's best to have an e-mail address that doesn't look foolish or offensive. People sometimes choose very strange usernames, and you don't want that to reflect poorly ... | In the UK, universities are very strict about information they will release -- for example we would not tell someone which courses a student was on.
This means that any email that comes from a non-university account must be treated carefully -- if by replying I appear to acknowledge the sender's name, and that they ar... |
14,112 | I am an undergraduate and I do not know much about the rules of writing an email.
The email system used by our university is not convenient at all: it responds slowly, often crashes, and its common to miss important emails.
I need to email profs in our school and other universities. Is it necessary for me to use the e... | 2013/11/15 | [
"https://academia.stackexchange.com/questions/14112",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/6962/"
] | This depends entirely on the rules of your university, the preferences of the respective professor, and your own long-term convenience:
* The possible conflicts with rules of the university have been explained by the other answers already.
* The respective professor (or whoever you are mailing to) may have specific pr... | Use of University's Email Address or Personal Email varies on content being communicated in the email.
* If you are communicating about your assignments or discussing something in the capacity of being a student, e.g., discussing topic or classes schedule, **you should prefer your University's Email address to communi... |
14,112 | I am an undergraduate and I do not know much about the rules of writing an email.
The email system used by our university is not convenient at all: it responds slowly, often crashes, and its common to miss important emails.
I need to email profs in our school and other universities. Is it necessary for me to use the e... | 2013/11/15 | [
"https://academia.stackexchange.com/questions/14112",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/6962/"
] | In the UK, universities are very strict about information they will release -- for example we would not tell someone which courses a student was on.
This means that any email that comes from a non-university account must be treated carefully -- if by replying I appear to acknowledge the sender's name, and that they ar... | Use of University's Email Address or Personal Email varies on content being communicated in the email.
* If you are communicating about your assignments or discussing something in the capacity of being a student, e.g., discussing topic or classes schedule, **you should prefer your University's Email address to communi... |
14,112 | I am an undergraduate and I do not know much about the rules of writing an email.
The email system used by our university is not convenient at all: it responds slowly, often crashes, and its common to miss important emails.
I need to email profs in our school and other universities. Is it necessary for me to use the e... | 2013/11/15 | [
"https://academia.stackexchange.com/questions/14112",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/6962/"
] | In the UK, universities are very strict about information they will release -- for example we would not tell someone which courses a student was on.
This means that any email that comes from a non-university account must be treated carefully -- if by replying I appear to acknowledge the sender's name, and that they ar... | This depends entirely on the rules of your university, the preferences of the respective professor, and your own long-term convenience:
* The possible conflicts with rules of the university have been explained by the other answers already.
* The respective professor (or whoever you are mailing to) may have specific pr... |
28,256,197 | How to get a better animation, dinamically, even when browser is busy or idle, for different devices which have different hardware capacity.
I have tried many ways and still cannot find the right way to make the game to display a better animation.
This is what i tried:
```
var now;
var then = Date.now();
var delta;
... | 2015/01/31 | [
"https://Stackoverflow.com/questions/28256197",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You should use `requestAnimationFrame` instead of `setInterval`.
Read [this article](http://creativejs.com/resources/requestanimationframe/) or [this one](https://hacks.mozilla.org/2011/08/animating-with-javascript-from-setinterval-to-requestanimationframe/).
The latter one is in fact exactly discussing your approach... | You should use `requestAnimationFrame`. It will queue up a callback to run on the next time the browser renders a frame. To achieve constant updating, call the update function recursively.
var update = function(){
//Do stuff
requestAnimationFrame(update)
} |
28,256,197 | How to get a better animation, dinamically, even when browser is busy or idle, for different devices which have different hardware capacity.
I have tried many ways and still cannot find the right way to make the game to display a better animation.
This is what i tried:
```
var now;
var then = Date.now();
var delta;
... | 2015/01/31 | [
"https://Stackoverflow.com/questions/28256197",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | To get a smooth animation, you must :
• Synchronise on the screen.
• Compute the time elapsed within your game.
• Animate only using this game time.
Synchronizing with the screen is done by using requestAnimationFrame (rAF).
When you write :
```
requestAnimationFrame( myCalbBack ) ;
```
You are re... | You should use `requestAnimationFrame` instead of `setInterval`.
Read [this article](http://creativejs.com/resources/requestanimationframe/) or [this one](https://hacks.mozilla.org/2011/08/animating-with-javascript-from-setinterval-to-requestanimationframe/).
The latter one is in fact exactly discussing your approach... |
28,256,197 | How to get a better animation, dinamically, even when browser is busy or idle, for different devices which have different hardware capacity.
I have tried many ways and still cannot find the right way to make the game to display a better animation.
This is what i tried:
```
var now;
var then = Date.now();
var delta;
... | 2015/01/31 | [
"https://Stackoverflow.com/questions/28256197",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | To get a smooth animation, you must :
• Synchronise on the screen.
• Compute the time elapsed within your game.
• Animate only using this game time.
Synchronizing with the screen is done by using requestAnimationFrame (rAF).
When you write :
```
requestAnimationFrame( myCalbBack ) ;
```
You are re... | You should use `requestAnimationFrame`. It will queue up a callback to run on the next time the browser renders a frame. To achieve constant updating, call the update function recursively.
var update = function(){
//Do stuff
requestAnimationFrame(update)
} |
50,155,322 | i can't see text when I set winBox visibility to false, although I set condition that (i) should be equal to text length. if I remove it so it works but text still on screen. where is the fail and how I can hide the text after being played.
thanks
```
private HBox winBox;
public void win(){
String winMs = "Level ... | 2018/05/03 | [
"https://Stackoverflow.com/questions/50155322",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8743155/"
] | The key here is `setOnFinished`. Like @Fabian said, use it outside the loop, that way it catches when the final fade finishes.
```
fade.setOnFinished((event) -> {
winBox.setVisible(false);
});
```
>
> Full Code:
>
>
>
```
import javafx.animation.FadeTransition;
import javafx.application.Application;
import... | You need to have following condition
```
if(i == winMs.toCharArray().length - 1)
winBox.setVisible(false);
```
Instead of
```
if(i == winMs.toCharArray().length)
winBox.setVisible(false);
``` |
917,203 | We have a dedicated server with a few applications running including a Vbulletin forum and Wordpress site. The main resource intensive application is a PHP chat application that utilizes MYSQL also.
Every day at around the same time the server seems to go offline or locks up. CPU load is higher but still within range.... | 2018/06/19 | [
"https://serverfault.com/questions/917203",
"https://serverfault.com",
"https://serverfault.com/users/474551/"
] | Here are my new results after some tweaks: (I don't get those crashes anymore after mainly using some csf tweaks to control the amount of time it scans the server)
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inacc... | Suggestions to consider for your my.cnf-ini [mysqld} section
```
key_buffer_size=3G # from 4G - only 20% used
key_cache_age_threshold=64800 # from 300 second purge to reduce key_reads
key_cache_division_limit=50 # from 100 for Hot/Warm split of RAM
key_cache_block_size=16384 # from 1024 to reduce CPU usage to mana... |
9,560,500 | I have been having this debate with a friend where i have a library (its python but I didn't include that as a tag as the question is applicable to any language) that has a few dependencies. The debate is whether to provide a default environment in the initialization or force the user of the code to explicitly set one.... | 2012/03/05 | [
"https://Stackoverflow.com/questions/9560500",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4653/"
] | I don't have any references, but here are my thoughts as a potential user of said library.
I think it's good to have a default configuration available to allow developers to quickly evaluate the library. I don't want to have to go through a bunch of configuration just to see if the library will do what I need. Once I'... | It depends. If you can provide sensible defaults, you might want to do that: it will make life easer on the occasional user of the library as they can set only the relevant settings, as opposed to the whole environment (with possibly settings the implications of which they don't fully understand (yet)). You are correct... |
9,560,500 | I have been having this debate with a friend where i have a library (its python but I didn't include that as a tag as the question is applicable to any language) that has a few dependencies. The debate is whether to provide a default environment in the initialization or force the user of the code to explicitly set one.... | 2012/03/05 | [
"https://Stackoverflow.com/questions/9560500",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4653/"
] | I don't have any references, but here are my thoughts as a potential user of said library.
I think it's good to have a default configuration available to allow developers to quickly evaluate the library. I don't want to have to go through a bunch of configuration just to see if the library will do what I need. Once I'... | Although not exactly identical in terms of problem domain, this strikes me as the [Convention over Configuration](http://en.wikipedia.org/wiki/Convention_over_configuration) argument.
There has been quite a lot momentum behind CoC in recent years, and in my mind, it makes a whole lot of sense. As long as flexibility i... |
9,560,500 | I have been having this debate with a friend where i have a library (its python but I didn't include that as a tag as the question is applicable to any language) that has a few dependencies. The debate is whether to provide a default environment in the initialization or force the user of the code to explicitly set one.... | 2012/03/05 | [
"https://Stackoverflow.com/questions/9560500",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4653/"
] | I don't have any references, but here are my thoughts as a potential user of said library.
I think it's good to have a default configuration available to allow developers to quickly evaluate the library. I don't want to have to go through a bunch of configuration just to see if the library will do what I need. Once I'... | I think your question needs some clarification. For starters, I don't think a library should have any runtime configuration. In terms of dependencies, library dependencies should be handled in a manner appropriate to the environment they are being written for. In python, those dependencies should be in the setup.py fil... |
9,560,500 | I have been having this debate with a friend where i have a library (its python but I didn't include that as a tag as the question is applicable to any language) that has a few dependencies. The debate is whether to provide a default environment in the initialization or force the user of the code to explicitly set one.... | 2012/03/05 | [
"https://Stackoverflow.com/questions/9560500",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4653/"
] | It depends. If you can provide sensible defaults, you might want to do that: it will make life easer on the occasional user of the library as they can set only the relevant settings, as opposed to the whole environment (with possibly settings the implications of which they don't fully understand (yet)). You are correct... | Although not exactly identical in terms of problem domain, this strikes me as the [Convention over Configuration](http://en.wikipedia.org/wiki/Convention_over_configuration) argument.
There has been quite a lot momentum behind CoC in recent years, and in my mind, it makes a whole lot of sense. As long as flexibility i... |
9,560,500 | I have been having this debate with a friend where i have a library (its python but I didn't include that as a tag as the question is applicable to any language) that has a few dependencies. The debate is whether to provide a default environment in the initialization or force the user of the code to explicitly set one.... | 2012/03/05 | [
"https://Stackoverflow.com/questions/9560500",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4653/"
] | It depends. If you can provide sensible defaults, you might want to do that: it will make life easer on the occasional user of the library as they can set only the relevant settings, as opposed to the whole environment (with possibly settings the implications of which they don't fully understand (yet)). You are correct... | I think your question needs some clarification. For starters, I don't think a library should have any runtime configuration. In terms of dependencies, library dependencies should be handled in a manner appropriate to the environment they are being written for. In python, those dependencies should be in the setup.py fil... |
9,560,500 | I have been having this debate with a friend where i have a library (its python but I didn't include that as a tag as the question is applicable to any language) that has a few dependencies. The debate is whether to provide a default environment in the initialization or force the user of the code to explicitly set one.... | 2012/03/05 | [
"https://Stackoverflow.com/questions/9560500",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4653/"
] | Although not exactly identical in terms of problem domain, this strikes me as the [Convention over Configuration](http://en.wikipedia.org/wiki/Convention_over_configuration) argument.
There has been quite a lot momentum behind CoC in recent years, and in my mind, it makes a whole lot of sense. As long as flexibility i... | I think your question needs some clarification. For starters, I don't think a library should have any runtime configuration. In terms of dependencies, library dependencies should be handled in a manner appropriate to the environment they are being written for. In python, those dependencies should be in the setup.py fil... |
49,631,352 | I am trying to create a VSI with vGPU. What field in the JSON payload do I pass in on the POST to create a vGPU VSI? What field in the JSON payload do I interrogate on a get that indicates the VSI is a vGPU device? | 2018/04/03 | [
"https://Stackoverflow.com/questions/49631352",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5652547/"
] | As far as I know static variables only resets at the time when application restarts otherwise they remains same all over the app | You need to restart your application to reinitialise static variables
```
Intent mStartActivity = new Intent(context, StartActivity.class);
int mPendingIntentId = 123456;
PendingIntent mPendingIntent = PendingIntent.getActivity(context, mPendingIntentId, mStartActivity, PendingIntent.FLAG_CANCEL_CURRENT)... |
47,564,902 | Hi I am push a ViewController (CustomViewContoller - QuickBlox) from a tabbar.
Please look at the screenshot below.
a view is litle bit up from the tabbar top.
But, When I use the same scenario without tabbar it is looking fine.
Please let me know what is the issue around there.
[
```
`randrange` takes an upper and lower bound and returns an int. | You could go:
```
self.y = random.randint(self.radius, self.height - self.radius)
```
but you also need to change:
```
self.my_canvas.create_oval(self.x - self.radius, \
self.height / 2 + self.radius, \
self.x + self.radius, \
self.height / 2 - se... |
25,800,011 | Hi I'm learning the basic of C++ and I'm in the process of doing an assignment. I'm asking if there is a simpler way to write this part.
```
if ( 100 >= projectgrade && 0<= projectgrade ) {}
else
{
cout<<endl<<"invalid data, please retry again.";
cin.ignore();
cin.get();
return EXIT_SUCCESS;
}
if ( 10... | 2014/09/12 | [
"https://Stackoverflow.com/questions/25800011",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4033203/"
] | ```
if ( (projectgrade <0) || (projectgrade > 100) || (midtermgrade <0) || (midtermgrade > 100) || (finalexamgrade < 0) || (finalexamgrade > 100))
{
cout<<endl<<"invalid data, please retry again.";
cin.ignore();
cin.get();
return EXIT_SUCCESS;
}
``` | Well, if you examine your logic it's if any of the grades is less then 0 or greater then 100, so something like this -
```
if ( projectgrade < 0 || projectgrade > 100 ||
midtermgrade < 0 || midtermgrade > 100 ||
finalexamgrade < 0 || finalexamgrade > 100
) {
cout<<endl<<"invalid data, please retry ag... |
25,800,011 | Hi I'm learning the basic of C++ and I'm in the process of doing an assignment. I'm asking if there is a simpler way to write this part.
```
if ( 100 >= projectgrade && 0<= projectgrade ) {}
else
{
cout<<endl<<"invalid data, please retry again.";
cin.ignore();
cin.get();
return EXIT_SUCCESS;
}
if ( 10... | 2014/09/12 | [
"https://Stackoverflow.com/questions/25800011",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4033203/"
] | ```
if ( (projectgrade <0) || (projectgrade > 100) || (midtermgrade <0) || (midtermgrade > 100) || (finalexamgrade < 0) || (finalexamgrade > 100))
{
cout<<endl<<"invalid data, please retry again.";
cin.ignore();
cin.get();
return EXIT_SUCCESS;
}
``` | In C++11 you can write:
```
auto failure = [](){
cout << "invalid data, please try again" << endl;
cin.ignore();
cin.get();
return 0;
};
```
and then use it when failures happen:
```
if ( !(100 >= projectgrade && 0<= projectgrade) )
return failure();
// do more stuff
if ( !(100 >= midtermgrade ... |
25,800,011 | Hi I'm learning the basic of C++ and I'm in the process of doing an assignment. I'm asking if there is a simpler way to write this part.
```
if ( 100 >= projectgrade && 0<= projectgrade ) {}
else
{
cout<<endl<<"invalid data, please retry again.";
cin.ignore();
cin.get();
return EXIT_SUCCESS;
}
if ( 10... | 2014/09/12 | [
"https://Stackoverflow.com/questions/25800011",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4033203/"
] | ```
if ( (projectgrade <0) || (projectgrade > 100) || (midtermgrade <0) || (midtermgrade > 100) || (finalexamgrade < 0) || (finalexamgrade > 100))
{
cout<<endl<<"invalid data, please retry again.";
cin.ignore();
cin.get();
return EXIT_SUCCESS;
}
``` | First you may add a function for the test
```
bool is_valid_grade(int grade)
{
return 0 <= grade && grade <= 100;
}
```
or
```
bool is_valid_grade(unsigned int grade)
{
return grade <= 100; // unsigned cannot be negative
}
```
then use it like:
```
if (is_valid_grade(projectgrade)
&& is_valid_grade(m... |
25,800,011 | Hi I'm learning the basic of C++ and I'm in the process of doing an assignment. I'm asking if there is a simpler way to write this part.
```
if ( 100 >= projectgrade && 0<= projectgrade ) {}
else
{
cout<<endl<<"invalid data, please retry again.";
cin.ignore();
cin.get();
return EXIT_SUCCESS;
}
if ( 10... | 2014/09/12 | [
"https://Stackoverflow.com/questions/25800011",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4033203/"
] | Well, if you examine your logic it's if any of the grades is less then 0 or greater then 100, so something like this -
```
if ( projectgrade < 0 || projectgrade > 100 ||
midtermgrade < 0 || midtermgrade > 100 ||
finalexamgrade < 0 || finalexamgrade > 100
) {
cout<<endl<<"invalid data, please retry ag... | In C++11 you can write:
```
auto failure = [](){
cout << "invalid data, please try again" << endl;
cin.ignore();
cin.get();
return 0;
};
```
and then use it when failures happen:
```
if ( !(100 >= projectgrade && 0<= projectgrade) )
return failure();
// do more stuff
if ( !(100 >= midtermgrade ... |
25,800,011 | Hi I'm learning the basic of C++ and I'm in the process of doing an assignment. I'm asking if there is a simpler way to write this part.
```
if ( 100 >= projectgrade && 0<= projectgrade ) {}
else
{
cout<<endl<<"invalid data, please retry again.";
cin.ignore();
cin.get();
return EXIT_SUCCESS;
}
if ( 10... | 2014/09/12 | [
"https://Stackoverflow.com/questions/25800011",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4033203/"
] | Well, if you examine your logic it's if any of the grades is less then 0 or greater then 100, so something like this -
```
if ( projectgrade < 0 || projectgrade > 100 ||
midtermgrade < 0 || midtermgrade > 100 ||
finalexamgrade < 0 || finalexamgrade > 100
) {
cout<<endl<<"invalid data, please retry ag... | First you may add a function for the test
```
bool is_valid_grade(int grade)
{
return 0 <= grade && grade <= 100;
}
```
or
```
bool is_valid_grade(unsigned int grade)
{
return grade <= 100; // unsigned cannot be negative
}
```
then use it like:
```
if (is_valid_grade(projectgrade)
&& is_valid_grade(m... |
3,173,081 | Given a periodic function $f:[0,2\pi] \rightarrow \mathbb{R}$ one calculates the Fourier coefficients $a\_k$ and $b\_k$ by
$$a\_k \sim \int\_0^{2\pi}f(t)\cos(kt)\mathrm{d}t$$
$$b\_k \sim \int\_0^{2\pi}f(t)\sin(kt)\mathrm{d}t$$
In turn one has $f(t) = a(t) + b(t)$ with
$$a(t) \sim \sum\_{k=0}^\infty a\_k\cos(kt)$$
... | 2019/04/03 | [
"https://math.stackexchange.com/questions/3173081",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/1792/"
] | As it is rather hard for me to enter into your conventions, I thought the best thing I could do is to show you how I compute the coefficients of such a series.
I am going to stick to formulas (Eqn. 2) and (Eqn. 4) for a periodic function $f$ with period $P$ that can be found in the excellent Wikipedia article : <https... | Thanks to user Jean Marie's valuable answer and comments I found the mistake I've made.
When - correctly - calculating $a\_k$ and $b\_k$ by
$$a\_k \sim \int\_0^{2\pi}(a(t) + b(t))\cos(kt)\mathrm{d}t$$
$$b\_k \sim \int\_0^{2\pi}(a(t) + b(t))\sin(kt)\mathrm{d}t$$
and not by
$$a\_k \sim \int\_0^{2\pi}a(t)\cos(kt)\ma... |
34,895,129 | I have the following SQL Server query
```
SELECT DISTINCT
e.idetapa, t.idtramo, m.idmunicipio, m.nombre
FROM
terapia h, municipios m, tramos t, rutas r, etapas e
WHERE
r.idruta = 15
AND h.consume = 's'
AND h.idmunicipio = m.idmunicipio
AND r.idruta = t.idruta
AND e.idruta = r.idruta... | 2016/01/20 | [
"https://Stackoverflow.com/questions/34895129",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1275059/"
] | `country=us` URL param solved this for me, mentioned in [this github project](https://github.com/zeantsoi/GoogleBooks#geolocation), but not documented in the [volumes list](https://developers.google.com/books/docs/v1/reference/volumes/list) route of course
[This blog](https://bibwild.wordpress.com/2011/09/07/google-bo... | Ok I have no idea if this will work. But you can supply the ip address in your request. This may or may not work if it doesn't let me know and I will delete this.
```
var bookService = new BooksService(new BaseClientService.Initializer()
{
ApiKey = "xxxx",
ApplicationName = "BooksService Authentication S... |
29,828,884 | I have a question about the NORMAL PROCESS OF AUTHENTICATION.
I have google a lot, and read a lot, but still can not very clear about the process of authentication,
what is actually the sessionID?
Why we store sessionID in database, because I think session ID will some time be expired. why we still need to store the... | 2015/04/23 | [
"https://Stackoverflow.com/questions/29828884",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4182643/"
] | If you know for certain that you'll be explicitly instantiating the template, simply put the explicit instantiation declaration (the `extern template` line) into the header, so it gets included with the template.
There is no problem with this line being present in the instantiating file—the standard explicitly allows ... | You can put the `extern template` declarations right into your header file where the `template` is defined. For example:
In file `useful.hxx`:
```
#ifndef USEFUL_HXX
#define USEFUL_HXX
namespace my
{
template <typename T>
T
do_useful_stuff(T x)
{
return x;
}
extern template int do_useful_stuff(in... |
29,828,884 | I have a question about the NORMAL PROCESS OF AUTHENTICATION.
I have google a lot, and read a lot, but still can not very clear about the process of authentication,
what is actually the sessionID?
Why we store sessionID in database, because I think session ID will some time be expired. why we still need to store the... | 2015/04/23 | [
"https://Stackoverflow.com/questions/29828884",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4182643/"
] | If you know for certain that you'll be explicitly instantiating the template, simply put the explicit instantiation declaration (the `extern template` line) into the header, so it gets included with the template.
There is no problem with this line being present in the instantiating file—the standard explicitly allows ... | >
> I can also see it being a little difficult to enforce this convention for future developers of our code as they may add a template instantiation and forget the appropriate extern template line, especially since no error will be generated.
>
>
>
I dont see how to detect missing extern entries but you can use st... |
29,828,884 | I have a question about the NORMAL PROCESS OF AUTHENTICATION.
I have google a lot, and read a lot, but still can not very clear about the process of authentication,
what is actually the sessionID?
Why we store sessionID in database, because I think session ID will some time be expired. why we still need to store the... | 2015/04/23 | [
"https://Stackoverflow.com/questions/29828884",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4182643/"
] | You can put the `extern template` declarations right into your header file where the `template` is defined. For example:
In file `useful.hxx`:
```
#ifndef USEFUL_HXX
#define USEFUL_HXX
namespace my
{
template <typename T>
T
do_useful_stuff(T x)
{
return x;
}
extern template int do_useful_stuff(in... | >
> I can also see it being a little difficult to enforce this convention for future developers of our code as they may add a template instantiation and forget the appropriate extern template line, especially since no error will be generated.
>
>
>
I dont see how to detect missing extern entries but you can use st... |
1,864,968 | I wanted to resolve the determinant of the next (nxn) matrix via recurrence relations:
$$
\begin{vmatrix}
a & 1 & 0 & 0 & 0 & 0 &.... 0 & 0 & 0 & 0 & 0\\
1 & a & 1 & 0 & 0 & 0 &.... 0 & 0 & 0 & 0 & 0 \\
0 & 1 & a & 1 & 0 & 0 &.... 0 & 0 & 0 & 0 & 0\\
0 & 0 & 1 & a & 1 & 0 &.... 0 & 0 & 0 & 0 & 0\\
.. & .. & .. & .... | 2016/07/20 | [
"https://math.stackexchange.com/questions/1864968",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/355116/"
] | You plug your initial conditions in, so you get
$$D\_1=a = C\_1\*(\frac{a}{2} + \frac{\sqrt{a^2-4}}{2}) + C\_2\*(\frac{a}{2} - \frac{\sqrt{a^2-4}}{2})\\D\_2=a^2-1 = C\_1\*(\frac{a}{2} + \frac{\sqrt{a^2-4}}{2})^2 + C\_2\*(\frac{a}{2} - \frac{\sqrt{a^2-4}}{2})^2$$
These are two equations in the two unknowns $C\_1,C\_2$. ... | To solve for the constants we just evaluate the expression for $D\_n$ at $n=1$ and $n=2$, as well as use the information that $D\_1=a$ and $D\_2=a^2-1$ to get
$$C\_1\left(\frac{a}{2}+\frac{\sqrt{a^2-4}}{2}\right)+C\_2\left(\frac{a}{2}-\frac{\sqrt{a^2-4}}{2}\right)=a$$
$$C\_1\left(\frac{a}{2}+\frac{\sqrt{a^2-4}}{2}\righ... |
27,309,485 | I am unsure of the errors that I am getting when I try to launch this app on a tablet. I have implemented all the correct permissions, meta-data and implemented the correct API key inside the manifest. I have also done everything needed inside the mainactivity and the layout. Please read the error log below and let me ... | 2014/12/05 | [
"https://Stackoverflow.com/questions/27309485",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2499631/"
] | Use the mapFragment element as below in the `xml`
```
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_below="@+id/linear... | ```
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_below="@+id/lineartab" />
```
You are usin Inner fragment I think that is the problem. Instea... |
16,935,702 | I am new to Perl and wish to know if the following logic works in Perl :-
I have to execute a command using Perl script with some arguments and I need to prepare that
arguments list, some of the arguments are also optional ( may or may not present)
```
push(@args, $arguments[0]);
push(@args, @controller);
push(@args... | 2013/06/05 | [
"https://Stackoverflow.com/questions/16935702",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148399/"
] | The arguments to a subroutine are passed in an array. It looks like you already realise that as you're building up your arguments in `@args`.
If your subroutine is just expecting a list of arguments of arguments, then there are some problems with your approach.
Firstly, as you've realised, if you push an empty array ... | Why are `@controller` and `@member` arrays?
Could you pass in more than one controller (if present)? Or, did you think that both arguments to `push` must be arrays?
The second argument can be a scalar value. Test before you push:
```
push(@args, $arguments[0]);
push(@args, $controller) if defined $controller;
push(@... |
19,722,721 | I have used following code from <http://w3schools.com>. But in this I can use only once. I want to use it more than one times because I want to create FAQ panel in HTML
but it is from ID and I can use it only once.
```
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</scri... | 2013/11/01 | [
"https://Stackoverflow.com/questions/19722721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2944124/"
] | [demo](http://jsfiddle.net/crustyashish/M3WGw/)
**script:**
```
$(function(){
$('a.toggle').click(function(){
$('.myContent').stop().slideToggle(500);
return false;
});
});
```
**HTML**
```
<a href="#" style="background-color: #99CCFF; padding: 5px 10px;" class="toggle">CLICK</a>
<div>
... | change the `id` to `class` and then use class selectors in css and jQuery
```
<div class="flip">Click to slide the panel down or up</div>
<div class="panel">Hello world!</div>
<div class="flip">Click to slide the panel down or up</div>
<div class="panel">Hello world!</div>
<div class="flip">Click to slide the panel do... |
10,343,985 | I am writing a rails app, and I would like to use node.js and socket.io to integrate a chat feature into my app. I plan on having my rails app deployed on one server, and my chat deployed on a much smaller server (to save money). My reasoning for this is, it is OK if a chat message takes 30s to send, but it is not OK f... | 2012/04/27 | [
"https://Stackoverflow.com/questions/10343985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/887128/"
] | So here is the solution I decided upon. Instead of figuring out what client files I need to serve, I decided to let the Node server handle the client javascript. In order to ensure that the Node server does not bottleneck the Rails server, I lazy load the socket.io-client file. The relevant coffee script is:
```
$ ->... | Most probably you are running into the "Same Origin Policy" restriction. (Check your console log) Your main page is downloaded from the RoR host, so your scripts can only initiate a connection to that host.
In other words, this may not be possible. |
48,210,395 | It's the first time that I face this stranger problem. I have an `UIViewController` that I create with it's `XIB` file. The screen has two views viewA and viewB. The viewA has those values `top = 0`, `leading = 0`, `trailing = 0`. The `viewA.height = safeArea.height/2`. The viewB constraints are `top = 0`, `leading = 0... | 2018/01/11 | [
"https://Stackoverflow.com/questions/48210395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6061492/"
] | It looks to me as though when 'i' finally increments to equal 'LastRow', it will write the First Sheet with LastRow's data, increment past the value of 'LastRow' (i = i + 1) and attempt to write the remaining sheets with the blank cells that exist beyond the LastRow. Then the loop is exited because i > LastRow by 4.
... | Try this:
```
For i = 2 to LastRow
Worksheets("Sheet" & i).Range("A2").Value = wb1.Range("B" & i).value
Worksheets("Sheet" & i).Range("B2").Value = wb1.Range("C" & i).value
Worksheets("Sheet" & i).Range("C2").Value = wb1.Range("D" & i).value
Worksheets("Sheet" & i).Range("D2").Value = wb1.Range("E" &... |
48,210,395 | It's the first time that I face this stranger problem. I have an `UIViewController` that I create with it's `XIB` file. The screen has two views viewA and viewB. The viewA has those values `top = 0`, `leading = 0`, `trailing = 0`. The `viewA.height = safeArea.height/2`. The viewB constraints are `top = 0`, `leading = 0... | 2018/01/11 | [
"https://Stackoverflow.com/questions/48210395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6061492/"
] | It looks to me as though when 'i' finally increments to equal 'LastRow', it will write the First Sheet with LastRow's data, increment past the value of 'LastRow' (i = i + 1) and attempt to write the remaining sheets with the blank cells that exist beyond the LastRow. Then the loop is exited because i > LastRow by 4.
... | Try to do your code like this:
```
sht2.Range("A" & i) = wb1.Range("A" & i).Value
sht2.Range("B" & i) = wb1.Range("B" & i).Value
sht2.Range("C" & i) = wb1.Range("C" & i).Value
sht2.Range("D" & i) = wb1.Range("D" & i).Value
```
Thus on every sheet you would get a copy from `wb1`. Another option is the usage of `Offse... |
48,210,395 | It's the first time that I face this stranger problem. I have an `UIViewController` that I create with it's `XIB` file. The screen has two views viewA and viewB. The viewA has those values `top = 0`, `leading = 0`, `trailing = 0`. The `viewA.height = safeArea.height/2`. The viewB constraints are `top = 0`, `leading = 0... | 2018/01/11 | [
"https://Stackoverflow.com/questions/48210395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6061492/"
] | It looks to me as though when 'i' finally increments to equal 'LastRow', it will write the First Sheet with LastRow's data, increment past the value of 'LastRow' (i = i + 1) and attempt to write the remaining sheets with the blank cells that exist beyond the LastRow. Then the loop is exited because i > LastRow by 4.
... | If all you are trying to do is copy each row to a new sheet, then this will work for you:
```
Sub tgr()
Dim wb As Workbook
Dim SourceWS As Worksheet
Dim Headers As Range
Dim SourceData As Range
Dim DataRow As Range
Set wb = ActiveWorkbook
Set SourceWS = wb.Sheets("Source")
Set Headers... |
48,210,395 | It's the first time that I face this stranger problem. I have an `UIViewController` that I create with it's `XIB` file. The screen has two views viewA and viewB. The viewA has those values `top = 0`, `leading = 0`, `trailing = 0`. The `viewA.height = safeArea.height/2`. The viewB constraints are `top = 0`, `leading = 0... | 2018/01/11 | [
"https://Stackoverflow.com/questions/48210395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6061492/"
] | It looks to me as though when 'i' finally increments to equal 'LastRow', it will write the First Sheet with LastRow's data, increment past the value of 'LastRow' (i = i + 1) and attempt to write the remaining sheets with the blank cells that exist beyond the LastRow. Then the loop is exited because i > LastRow by 4.
... | You should probably take this approach.
```
The range for the code example below looks like this
Column A : Header in A1 = Country, A2:A? = Country names
Column B : Header in B1 = Name, B2:B? = Names
Column C : Header in C1 = Gender, C2:C? = F or M
Column D : Header in D1 = Birthday, D2:D? = Dates
```
1: Set filter ... |
655,228 | I downloaded Ubuntu 14.04.2 - desktop. When I try to open the file, I have the following error message:
```
NO MOUNTABLE FILE SYSTEM.
```
What should I do to solve this problem? | 2015/08/01 | [
"https://askubuntu.com/questions/655228",
"https://askubuntu.com",
"https://askubuntu.com/users/435318/"
] | First in order to create a bootable USB on mac for Ubuntu you should follow these instructions I took from the Arch Wiki:
To be able to use dd on your USB device on a Mac you have to do some special maneuvers. First of all insert your usb device, OS X will automount it, and in Terminal.app run:
diskutil list
Figure ... | >
> When I try to open the file
>
>
>
This is not an application or software installer and this is not how you install Ubuntu. You need to create a bootable medium, [boot it](https://support.apple.com/en-us/HT204417), and [then you can install Ubuntu](https://askubuntu.com/q/6328/40581). Macs with up to date firmw... |
655,228 | I downloaded Ubuntu 14.04.2 - desktop. When I try to open the file, I have the following error message:
```
NO MOUNTABLE FILE SYSTEM.
```
What should I do to solve this problem? | 2015/08/01 | [
"https://askubuntu.com/questions/655228",
"https://askubuntu.com",
"https://askubuntu.com/users/435318/"
] | >
> When I try to open the file
>
>
>
This is not an application or software installer and this is not how you install Ubuntu. You need to create a bootable medium, [boot it](https://support.apple.com/en-us/HT204417), and [then you can install Ubuntu](https://askubuntu.com/q/6328/40581). Macs with up to date firmw... | It seems Ubuntu ISOs have some partition map shenanigans that make them unreadable using regular OS X tools. At least that's true for Ubuntu 15.10 and Mac OS X 10.8, but there are reports on the web regarding other versions too.
The only tool I was able to find that can successfully burn a Ubuntu ISO to USB is [UNetbo... |
655,228 | I downloaded Ubuntu 14.04.2 - desktop. When I try to open the file, I have the following error message:
```
NO MOUNTABLE FILE SYSTEM.
```
What should I do to solve this problem? | 2015/08/01 | [
"https://askubuntu.com/questions/655228",
"https://askubuntu.com",
"https://askubuntu.com/users/435318/"
] | >
> When I try to open the file
>
>
>
This is not an application or software installer and this is not how you install Ubuntu. You need to create a bootable medium, [boot it](https://support.apple.com/en-us/HT204417), and [then you can install Ubuntu](https://askubuntu.com/q/6328/40581). Macs with up to date firmw... | ISO or DMG should be created *from a valid file system*. For instance:
```
$ diskutil list
/dev/disk3 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *4.0 GB disk3
1: EFI EFI ... |
655,228 | I downloaded Ubuntu 14.04.2 - desktop. When I try to open the file, I have the following error message:
```
NO MOUNTABLE FILE SYSTEM.
```
What should I do to solve this problem? | 2015/08/01 | [
"https://askubuntu.com/questions/655228",
"https://askubuntu.com",
"https://askubuntu.com/users/435318/"
] | First in order to create a bootable USB on mac for Ubuntu you should follow these instructions I took from the Arch Wiki:
To be able to use dd on your USB device on a Mac you have to do some special maneuvers. First of all insert your usb device, OS X will automount it, and in Terminal.app run:
diskutil list
Figure ... | It seems Ubuntu ISOs have some partition map shenanigans that make them unreadable using regular OS X tools. At least that's true for Ubuntu 15.10 and Mac OS X 10.8, but there are reports on the web regarding other versions too.
The only tool I was able to find that can successfully burn a Ubuntu ISO to USB is [UNetbo... |
655,228 | I downloaded Ubuntu 14.04.2 - desktop. When I try to open the file, I have the following error message:
```
NO MOUNTABLE FILE SYSTEM.
```
What should I do to solve this problem? | 2015/08/01 | [
"https://askubuntu.com/questions/655228",
"https://askubuntu.com",
"https://askubuntu.com/users/435318/"
] | First in order to create a bootable USB on mac for Ubuntu you should follow these instructions I took from the Arch Wiki:
To be able to use dd on your USB device on a Mac you have to do some special maneuvers. First of all insert your usb device, OS X will automount it, and in Terminal.app run:
diskutil list
Figure ... | ISO or DMG should be created *from a valid file system*. For instance:
```
$ diskutil list
/dev/disk3 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *4.0 GB disk3
1: EFI EFI ... |
403,202 | I need to show a screen or something, saying 'Loading' or whatever while long process are working.
I am creating a application with the Windows Media Encoder SDK and it takes awhile to initialize the encoder. I would like for a screen to pop up saying 'Loading' while it is starting the encoder, and then for it to disa... | 2008/12/31 | [
"https://Stackoverflow.com/questions/403202",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48654/"
] | Create a Form that will serve as the "Loading" dialog. When you're ready to initialize the encoder, display this form using the `ShowDialog()` method. This causes it to stop the user from interacting with the form that is showing the loading dialog.
The loading dialog should be coded in such a way that when it loads, ... | There are many ways you could do this. The most simple might be to show a modal dialog, then kick off the other process, once it is completed you an then close the displayed dialog. You will need to handle the display of the standard X to close though. However, doing that all in the standard UI thread would lock the UI... |
403,202 | I need to show a screen or something, saying 'Loading' or whatever while long process are working.
I am creating a application with the Windows Media Encoder SDK and it takes awhile to initialize the encoder. I would like for a screen to pop up saying 'Loading' while it is starting the encoder, and then for it to disa... | 2008/12/31 | [
"https://Stackoverflow.com/questions/403202",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48654/"
] | Create a Form that will serve as the "Loading" dialog. When you're ready to initialize the encoder, display this form using the `ShowDialog()` method. This causes it to stop the user from interacting with the form that is showing the loading dialog.
The loading dialog should be coded in such a way that when it loads, ... | Two things you can try.
After setting your label (as mentioned in the comment to Mitchel) call `Application.DoEvents()`
Another option you have is to run the initialization code for the encoder in a BackgroundWorker process. |
5,012,321 | I wanted to know if there are any run time advantages to Generics provided from Java5. I mean, I know that we can achieve type safety for classes/collections and allow a range of possible objects for a generic, but are there any benefits that we get at Run time ahead of compilation time? | 2011/02/16 | [
"https://Stackoverflow.com/questions/5012321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/618989/"
] | Java generics are removed at runtime via [erasure](http://download.oracle.com/javase/tutorial/java/generics/erasure.html), so the performance should be identical. | Some information about them is available through reflection (say in <http://download.oracle.com/javase/6/docs/api/java/lang/reflect/Constructor.html#getTypeParameters%28%29> ) but they don't make your programs run better.
CoolBeans, I took him to mean "beyond" compilation time benefits. |
5,012,321 | I wanted to know if there are any run time advantages to Generics provided from Java5. I mean, I know that we can achieve type safety for classes/collections and allow a range of possible objects for a generic, but are there any benefits that we get at Run time ahead of compilation time? | 2011/02/16 | [
"https://Stackoverflow.com/questions/5012321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/618989/"
] | Java generics are removed at runtime via [erasure](http://download.oracle.com/javase/tutorial/java/generics/erasure.html), so the performance should be identical. | Yes - but it's very minor.
When you use generics, you don't need to use `instanceof` and casting everywhere, so the bytecode instructions that do type checking for those instructions are no generated. On the downside, you can wind up with some fairly low-level errors at runtime if you link to old versions of your clas... |
5,012,321 | I wanted to know if there are any run time advantages to Generics provided from Java5. I mean, I know that we can achieve type safety for classes/collections and allow a range of possible objects for a generic, but are there any benefits that we get at Run time ahead of compilation time? | 2011/02/16 | [
"https://Stackoverflow.com/questions/5012321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/618989/"
] | Some information about them is available through reflection (say in <http://download.oracle.com/javase/6/docs/api/java/lang/reflect/Constructor.html#getTypeParameters%28%29> ) but they don't make your programs run better.
CoolBeans, I took him to mean "beyond" compilation time benefits. | Yes - but it's very minor.
When you use generics, you don't need to use `instanceof` and casting everywhere, so the bytecode instructions that do type checking for those instructions are no generated. On the downside, you can wind up with some fairly low-level errors at runtime if you link to old versions of your clas... |
815,727 | For example, in $x^2 - 8x$, if you are asked to 'complete' the square, how do you deduce the third term (C) ? | 2014/05/31 | [
"https://math.stackexchange.com/questions/815727",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/154379/"
] | The 3rd term is: $\left(\dfrac{-8}{2}\right)^2 = 16$. In general, if you have:
$x^2 + ax$, then the 3rd term is: $\dfrac{a^2}{4}$ | $$x^2-8x=(x^2-2\cdot x\cdot4+4^2)-4^2=(x-4)^2-4^2$$ |
43,856,870 | I posted the other day about how to toggle [multiple hidden fields to appear via CSS & Javascript](https://stackoverflow.com/questions/43812711/how-to-toggle-multiple-hidden-fields-to-appear-via-css-javascript)
I was able to implement it using one of the drop-down choices, in this case "Branch."
I want to, in the s... | 2017/05/08 | [
"https://Stackoverflow.com/questions/43856870",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6950512/"
] | You can use the `flsl()` function ("find last set bit, long"):
```
let x = 9
let p = flsl(x)
print(p) // 4
```
The result is `4` because `flsl()` and the related functions number the bits starting at 1, the least significant bit.
On Intel platforms you can use the `_bit_scan_reverse` intrinsic,
in my test in a macO... | You can use the the properties `leadingZeroBitCount` and `trailingZeroBitCount` to find the Most Significant Bit and Least Significant Bit.
For example,
```
let i: Int = 95
let lsb = i.trailingZeroBitCount
let msb = Int.bitWidth - 1 - i.leadingZeroBitCount
print("i: \(i) = \(String(i, radix: 2))") // i: 95 = 101111... |
52,860 | Has anyone managed to authenticate yours to the network via 802.1x using Google Directory? I have a case where whole company is using Google Apps and G-Suite with a custom domain and they would like to access wireless network without setting addition LDAP directory. Wireless equipment is aerohive (so radius server is a... | 2018/08/28 | [
"https://networkengineering.stackexchange.com/questions/52860",
"https://networkengineering.stackexchange.com",
"https://networkengineering.stackexchange.com/users/738/"
] | Google have just released [Secure LDAP](https://support.google.com/cloudidentity/answer/9048516) which does what you want. Note you'll need to set add Cloud Identity to your G-Suite domain. I don't know if you'll be able to get Aerohive to talk directly to it, or if you'll need to put FreeRADIUS in between.
Other exis... | This feature is available in G Suite Enterprise, Cloud Identity Premium and G Suite for Education. If you have G Suite Basic or Business, you can add Cloud Identity Premium on top of existing license or upgrade to G Suite Enterprise |
52,860 | Has anyone managed to authenticate yours to the network via 802.1x using Google Directory? I have a case where whole company is using Google Apps and G-Suite with a custom domain and they would like to access wireless network without setting addition LDAP directory. Wireless equipment is aerohive (so radius server is a... | 2018/08/28 | [
"https://networkengineering.stackexchange.com/questions/52860",
"https://networkengineering.stackexchange.com",
"https://networkengineering.stackexchange.com/users/738/"
] | Google have just released [Secure LDAP](https://support.google.com/cloudidentity/answer/9048516) which does what you want. Note you'll need to set add Cloud Identity to your G-Suite domain. I don't know if you'll be able to get Aerohive to talk directly to it, or if you'll need to put FreeRADIUS in between.
Other exis... | Yes, I managed to authenticate the network via 802.1x using Cloud ID Secure LDAP.
It was `Cisco2504 + FreeRADIUS + Cloud ID Premium`.
At the end, Authentication Protocol I used in Android was `802.1x EAP-TTLS/PAP`.
I think that because `Cloud ID Secure LDAP` doesn't provide `ntPassword` attribute, only way to authen... |
453,416 | A strange compound of Latin and English. Reasonably common in epistemology and the philosophy of science. (Academic philosophers are not uneasy at creating new words when the need arises.)
Questions:
1. Should it be italicized as a whole, as in *ad hocness*? Or not at all?
2. When ascribing something a lack of ad hoc... | 2018/07/04 | [
"https://english.stackexchange.com/questions/453416",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/306173/"
] | 1. He may go. He might be. He could leave.
2. He may have gone. He might have been. He could have left.
That second pair are *NOT* using present perfect. Present prefect would be something like
3. He has gone.
All modals take a verb in the infinitive, which means it cannot be present anything.
If you want to call *... | There is a comprehensive discussion and analysis of "have" after modals in [McCawley's text](https://books.google.com/books/about/The_Syntactic_Phenomena_of_English.html?id=k6-C5AWWqjQC), and much of it is available on line at this reference. Look at page 220 and the following discussion, or search on "tense replacemen... |
2,253,337 | I have already used partial fractions and let $w=z-1$ to get to
$$\frac{1}{h}-\sum\_{n=-1}^{\infty}{(-1)^{n+1}\frac{h^{n}}{2^{n+2}}}.$$
I know I can't have the $\frac{1}{h}$ in front of the sum. How do I get rid of this? | 2017/04/26 | [
"https://math.stackexchange.com/questions/2253337",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/422226/"
] | One way, perhaps clearer, to see it - Observe that $\;0<z-1<2\implies0<\frac{z-1}2<1\;$ , so using the geometric series development:
$$\frac z{(z-1)(z+1)}=\frac12\left(\frac1{z-1}+\frac1{z+1}\right)=\frac1{2(z-1)}+\frac12\frac1{z-1+2}=$$$${}$$
$$=\frac1{2(z-1)}+\frac14\frac1{1+\frac{z-1}2}=\frac1{2(z-1)}+\frac14\sum\... | A Laurent series *can* start with a negative power (conventionally, a Taylor series should have only non-negative powers).
I would expand in $z-1$ because that seems to be what the question asks for when it says $0<z-1<2$ rather than $1<z<3$.
So the series becomes
$$
\sum\_{k=-1}^\infty a\_k (z-1)^k
$$
with
$$
a\_k ... |
39,516,562 | I'm trying to generate a second webpack bundle that's dependent on another bundle. Every page needs bundle-one, but only some pages need bundle-two.
For instance, let's say I have the following entry point scripts (these are trivial examples, just using them to get the point across):
**bundle-one.js**
```
import $ f... | 2016/09/15 | [
"https://Stackoverflow.com/questions/39516562",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1492393/"
] | **Option 1**
Have two separate Webpack configs, one for each bundle. In your first bundle, [expose `jQuery` as a global variable when you first require it](https://stackoverflow.com/questions/29080148/expose-jquery-to-real-window-object-with-webpack) using the [expose-loader](https://github.com/webpack/expose-loader):... | You can do this in the following way using the provide plugin -
```
//webpack.config.js
module.exports = {
entry: './index.js',
output: {
filename: '[name].js'
},
externals: {
jquery: 'jQuery'
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
})
]
};
```
This can be useful... |
9,665,817 | I am trying to use jsoup to obtain two values from an ASP page.
Code is as follow:
```
package webscraper;
import java.io.IOException;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;
import org.jsoup.select.Elements;... | 2012/03/12 | [
"https://Stackoverflow.com/questions/9665817",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1263896/"
] | You can easily get an access token. Just create an app and login using `app_id` and `app_secret`:
```
$response = file_get_contents('https://graph.facebook.com/oauth/access_token?type=client_cred&client_id=some_app_id&client_secret=the_appsecret');
$token = str_replace('access_token=', '', $response);
```
Works for ... | I don't think you can, it looks like they are [deprecating the offline\_access permission](https://developers.facebook.com/docs/offline-access-deprecation/). Further down in the page it mentions extending the current token by 60 days. Perhaps that may help? |
9,665,817 | I am trying to use jsoup to obtain two values from an ASP page.
Code is as follow:
```
package webscraper;
import java.io.IOException;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;
import org.jsoup.select.Elements;... | 2012/03/12 | [
"https://Stackoverflow.com/questions/9665817",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1263896/"
] | You can easily get an access token. Just create an app and login using `app_id` and `app_secret`:
```
$response = file_get_contents('https://graph.facebook.com/oauth/access_token?type=client_cred&client_id=some_app_id&client_secret=the_appsecret');
$token = str_replace('access_token=', '', $response);
```
Works for ... | Check out my post from a couple of days ago (look at me Updated section in the original post).
[Displaying Facebook posts to non-Facebook users](https://stackoverflow.com/questions/9634608/displaying-facebook-posts-to-non-facebook-users)
Because the offline\_access permission is being deprecated, you're going to hav... |
2,934,788 | I'm using PHP for file uploads. In the [PHP manual](http://www.php.net/manual/en/features.file-upload.post-method.php) it shows an example using a `MAX_FILE_SIZE` hidden field, saying that it will detect on the client side (i.e. the browser) whether the file is too large or not.
I've just tried the example in Firefox,... | 2010/05/29 | [
"https://Stackoverflow.com/questions/2934788",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37947/"
] | On **MAX\_FILE\_SIZE**
Read This:
...At <http://pk.php.net/manual/en/features.file-upload.post-method.php> and equivalent locations in other formats, it is stated
that browsers take the value of a MAX\_FILE\_SIZE form field into
account.
**This information** is repeated elsewhere on the web and in books, but
appears... | As far as I know there is no simple, cross-browser solution to achieve this. The only working solutions are Flash or Java based since these technologies can access filesystem and get file info.
Example scripts: [YUI2 Uploader](http://developer.yahoo.com/yui/uploader/), [FancyUpload](http://digitarald.de/project/fancyu... |
2,934,788 | I'm using PHP for file uploads. In the [PHP manual](http://www.php.net/manual/en/features.file-upload.post-method.php) it shows an example using a `MAX_FILE_SIZE` hidden field, saying that it will detect on the client side (i.e. the browser) whether the file is too large or not.
I've just tried the example in Firefox,... | 2010/05/29 | [
"https://Stackoverflow.com/questions/2934788",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37947/"
] | On **MAX\_FILE\_SIZE**
Read This:
...At <http://pk.php.net/manual/en/features.file-upload.post-method.php> and equivalent locations in other formats, it is stated
that browsers take the value of a MAX\_FILE\_SIZE form field into
account.
**This information** is repeated elsewhere on the web and in books, but
appears... | This probably only works on Firefox 3.6 for now:
```
<script type="text/javascript">
function checkSize()
{
var input = document.getElementById("upload");
// check for browser support (may need to be modified)
if(input.files && input.files.length == 1)
{
... |
2,934,788 | I'm using PHP for file uploads. In the [PHP manual](http://www.php.net/manual/en/features.file-upload.post-method.php) it shows an example using a `MAX_FILE_SIZE` hidden field, saying that it will detect on the client side (i.e. the browser) whether the file is too large or not.
I've just tried the example in Firefox,... | 2010/05/29 | [
"https://Stackoverflow.com/questions/2934788",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37947/"
] | On **MAX\_FILE\_SIZE**
Read This:
...At <http://pk.php.net/manual/en/features.file-upload.post-method.php> and equivalent locations in other formats, it is stated
that browsers take the value of a MAX\_FILE\_SIZE form field into
account.
**This information** is repeated elsewhere on the web and in books, but
appears... | If you are using MAX\_FILE\_SIZE hidden field properly, the file uploading will just stop when the uploaded size reaches the specified value. And thus saves users the trouble of waiting for a big file being transferred.
You have to check whether the file upload is stopped, in the server side by using the [error code](h... |
2,934,788 | I'm using PHP for file uploads. In the [PHP manual](http://www.php.net/manual/en/features.file-upload.post-method.php) it shows an example using a `MAX_FILE_SIZE` hidden field, saying that it will detect on the client side (i.e. the browser) whether the file is too large or not.
I've just tried the example in Firefox,... | 2010/05/29 | [
"https://Stackoverflow.com/questions/2934788",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37947/"
] | This probably only works on Firefox 3.6 for now:
```
<script type="text/javascript">
function checkSize()
{
var input = document.getElementById("upload");
// check for browser support (may need to be modified)
if(input.files && input.files.length == 1)
{
... | As far as I know there is no simple, cross-browser solution to achieve this. The only working solutions are Flash or Java based since these technologies can access filesystem and get file info.
Example scripts: [YUI2 Uploader](http://developer.yahoo.com/yui/uploader/), [FancyUpload](http://digitarald.de/project/fancyu... |
2,934,788 | I'm using PHP for file uploads. In the [PHP manual](http://www.php.net/manual/en/features.file-upload.post-method.php) it shows an example using a `MAX_FILE_SIZE` hidden field, saying that it will detect on the client side (i.e. the browser) whether the file is too large or not.
I've just tried the example in Firefox,... | 2010/05/29 | [
"https://Stackoverflow.com/questions/2934788",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37947/"
] | As far as I know there is no simple, cross-browser solution to achieve this. The only working solutions are Flash or Java based since these technologies can access filesystem and get file info.
Example scripts: [YUI2 Uploader](http://developer.yahoo.com/yui/uploader/), [FancyUpload](http://digitarald.de/project/fancyu... | If you are using MAX\_FILE\_SIZE hidden field properly, the file uploading will just stop when the uploaded size reaches the specified value. And thus saves users the trouble of waiting for a big file being transferred.
You have to check whether the file upload is stopped, in the server side by using the [error code](h... |
2,934,788 | I'm using PHP for file uploads. In the [PHP manual](http://www.php.net/manual/en/features.file-upload.post-method.php) it shows an example using a `MAX_FILE_SIZE` hidden field, saying that it will detect on the client side (i.e. the browser) whether the file is too large or not.
I've just tried the example in Firefox,... | 2010/05/29 | [
"https://Stackoverflow.com/questions/2934788",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37947/"
] | This probably only works on Firefox 3.6 for now:
```
<script type="text/javascript">
function checkSize()
{
var input = document.getElementById("upload");
// check for browser support (may need to be modified)
if(input.files && input.files.length == 1)
{
... | If you are using MAX\_FILE\_SIZE hidden field properly, the file uploading will just stop when the uploaded size reaches the specified value. And thus saves users the trouble of waiting for a big file being transferred.
You have to check whether the file upload is stopped, in the server side by using the [error code](h... |
67,105 | When I reply to a comment in the WP backend in the "Comments" section (edit-comments.php) I can only post the reply as the logged in user.
Is it possible to select a certain user like in the "Add new post" section (post-new.php) where I have a dropdown with all users that are allowed to write posts? | 2012/10/04 | [
"https://wordpress.stackexchange.com/questions/67105",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/21110/"
] | Yes, add an user-select field in the comment form:
```
add_action('comment_form_after_fields', function(){
// allow only users who can moderate comments to do this
if(!current_user_can('moderate_comments'))
return;
$user = wp_get_current_user();
wp_dropdown_users(array(
'name' => 'alt_comment_us... | I couldn't get the method by @onetrickpony to work within 20 minutes or so, and granted it's been a while since his post, so things may have changed.
I ended going free plugin shopping and found the Switch Users plugin, which just worked straight out of the box. I have my main user disabled in WordFence and only login... |
128,229 | My requirement is to execute a system command like (ls) or C program when a trigger executes. Is there any way to create a trigger function to solve this problem. | 2016/02/04 | [
"https://dba.stackexchange.com/questions/128229",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/77039/"
] | You can easily do what *@a\_horse\_with\_no\_name* suggests in his comment. But there is also an interesting way to do it, using PL/pgSQL as the function language.
This uses a feature of the [`COPY`](http://www.postgresql.org/docs/current/static/sql-copy.html) command, introduced in PostgreSQL 9.3. It can now take a ... | If you just need to look at something relative to `$PGDATA` you can use [pg\_ls\_data](http://www.postgresql.org/docs/current/static/functions-admin.html#FUNCTIONS-ADMIN-GENFILE)
```
SELECT pg_ls_dir('pg_xlog');
```
Otherwise, a simple function like this:
```
CREATE OR REPLACE FUNCTION ls(location text) RETURNS te... |
128,229 | My requirement is to execute a system command like (ls) or C program when a trigger executes. Is there any way to create a trigger function to solve this problem. | 2016/02/04 | [
"https://dba.stackexchange.com/questions/128229",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/77039/"
] | You can easily do what *@a\_horse\_with\_no\_name* suggests in his comment. But there is also an interesting way to do it, using PL/pgSQL as the function language.
This uses a feature of the [`COPY`](http://www.postgresql.org/docs/current/static/sql-copy.html) command, introduced in PostgreSQL 9.3. It can now take a ... | Python-equivalent alternative to @Kassandry's Perl solution.
```
CREATE OR REPLACE FUNCTION ls(location text) RETURNS text AS $BODY$
global location
import subprocess
return subprocess.check_output(["ls", "-l", location])
$BODY$ LANGUAGE plpythonu;
``` |
128,229 | My requirement is to execute a system command like (ls) or C program when a trigger executes. Is there any way to create a trigger function to solve this problem. | 2016/02/04 | [
"https://dba.stackexchange.com/questions/128229",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/77039/"
] | If you just need to look at something relative to `$PGDATA` you can use [pg\_ls\_data](http://www.postgresql.org/docs/current/static/functions-admin.html#FUNCTIONS-ADMIN-GENFILE)
```
SELECT pg_ls_dir('pg_xlog');
```
Otherwise, a simple function like this:
```
CREATE OR REPLACE FUNCTION ls(location text) RETURNS te... | Python-equivalent alternative to @Kassandry's Perl solution.
```
CREATE OR REPLACE FUNCTION ls(location text) RETURNS text AS $BODY$
global location
import subprocess
return subprocess.check_output(["ls", "-l", location])
$BODY$ LANGUAGE plpythonu;
``` |
30,092,078 | I am calling a VB.Net function in JavaScript and the function returns a string value which should be stored in the JavaScript variable.
The function is getting called but when I display the javascript variable in alert it shows the value as undefined. Is there any problem in returning values from VB.NET functions to J... | 2015/05/07 | [
"https://Stackoverflow.com/questions/30092078",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2511116/"
] | I see a basic problem with your function. I assume you are looking for text files (files ending in `.txt`), yet once you find one you never return the filename from the function; you just return `True`.
You need to modify your function like this:
```
def check_input_file():
input_file = raw_input('Please enter a ... | It's very hard to tell, given that you keep giving us code that either raises completely unrelated exceptions, or that works with no problems.
But I think I can guess what you're after anyway.
In your *real* code, you do something like this:
```
def function():
inputFile = raw_input('Type in file name: ')
... |
74,022,519 | So, i am trying to build some financial chart with flutter using sfcartesian charts (syncfusion), and nearly got my desired result. But i cant find a way to remove the colored circle next to the formatted text i have on my tooltip (see image)
Here are my tooltip settings:
```
tooltipBehavior: TooltipBehavior(... | 2022/10/11 | [
"https://Stackoverflow.com/questions/74022519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19753707/"
] | I don't know exactly option to remove that color cirle, but usually I will implement my own tooltip widget then it can easily modify, you can try like this :
```
tooltipBehavior : TooltipBehavior(
enable: true,
canShowMarker: false,
tooltipPosition: TooltipPosition.pointer,
builder: (data, point, series, point... | Greetings from Syncfusion.
We have validated your code snippet and we would like to let you know that you have set the border color for the tooltip in your code. As a result, the border color is applied to the tooltip label. You can achieve your requirement by removing the borderColor property in TooltipBehavior.
```... |
15,168 | I rarely hear *благодарю*, so I was wondering under which circumstances would one use that word? Are *благодарю* and *спасибо* interchangeable? | 2017/10/20 | [
"https://russian.stackexchange.com/questions/15168",
"https://russian.stackexchange.com",
"https://russian.stackexchange.com/users/9603/"
] | They are interchangeable to a certain degree. `Благодарю` is much more formal. In some cases, it might also be considered more polite. This being said, `Спасибо` is absolutely "safe" and polite in any situation. When in doubt, I would suggest using `Спасибо`, as `Благодарю` may sound a bit awkward, outdated or even sar... | `Благодарю` it is almost like `спасибо` but a bit you are wearing a top hat and a walking stick. Person considered to have a unique style(if he always use this word), be a bit fancy, or just formal. |
15,168 | I rarely hear *благодарю*, so I was wondering under which circumstances would one use that word? Are *благодарю* and *спасибо* interchangeable? | 2017/10/20 | [
"https://russian.stackexchange.com/questions/15168",
"https://russian.stackexchange.com",
"https://russian.stackexchange.com/users/9603/"
] | They are interchangeable to a certain degree. `Благодарю` is much more formal. In some cases, it might also be considered more polite. This being said, `Спасибо` is absolutely "safe" and polite in any situation. When in doubt, I would suggest using `Спасибо`, as `Благодарю` may sound a bit awkward, outdated or even sar... | Actually the truth behind these two words are pretty interesting. Благодарю in general is a high vibrational word and is used everywhere where спасибо is used and now people are using it more often, because спасибо actually means спаси бог in shortened which translation is god help, save me god etc. there is also an an... |
15,168 | I rarely hear *благодарю*, so I was wondering under which circumstances would one use that word? Are *благодарю* and *спасибо* interchangeable? | 2017/10/20 | [
"https://russian.stackexchange.com/questions/15168",
"https://russian.stackexchange.com",
"https://russian.stackexchange.com/users/9603/"
] | They are interchangeable to a certain degree. `Благодарю` is much more formal. In some cases, it might also be considered more polite. This being said, `Спасибо` is absolutely "safe" and polite in any situation. When in doubt, I would suggest using `Спасибо`, as `Благодарю` may sound a bit awkward, outdated or even sar... | "Благодарю" means "I express thanks" while "спасибо" means "I am glad".
The thing is one can express thanks even if he is not really glad or for somebody else. This makes благодарю more formal and impersonal. "Okay, I do not really feel glad, but you did it for me so I express thanks because of etiquette or whatever".... |
15,168 | I rarely hear *благодарю*, so I was wondering under which circumstances would one use that word? Are *благодарю* and *спасибо* interchangeable? | 2017/10/20 | [
"https://russian.stackexchange.com/questions/15168",
"https://russian.stackexchange.com",
"https://russian.stackexchange.com/users/9603/"
] | They are interchangeable to a certain degree. `Благодарю` is much more formal. In some cases, it might also be considered more polite. This being said, `Спасибо` is absolutely "safe" and polite in any situation. When in doubt, I would suggest using `Спасибо`, as `Благодарю` may sound a bit awkward, outdated or even sar... | Literally "благодарю" ~ "благо дарю" means "[I am] giving blessing [to you]" or "sharing good"
Whereas "Спасибо" ~ "спаси [тебя] Бог" means "[May] God save [you]" |
15,168 | I rarely hear *благодарю*, so I was wondering under which circumstances would one use that word? Are *благодарю* and *спасибо* interchangeable? | 2017/10/20 | [
"https://russian.stackexchange.com/questions/15168",
"https://russian.stackexchange.com",
"https://russian.stackexchange.com/users/9603/"
] | `Благодарю` it is almost like `спасибо` but a bit you are wearing a top hat and a walking stick. Person considered to have a unique style(if he always use this word), be a bit fancy, or just formal. | Actually the truth behind these two words are pretty interesting. Благодарю in general is a high vibrational word and is used everywhere where спасибо is used and now people are using it more often, because спасибо actually means спаси бог in shortened which translation is god help, save me god etc. there is also an an... |
15,168 | I rarely hear *благодарю*, so I was wondering under which circumstances would one use that word? Are *благодарю* and *спасибо* interchangeable? | 2017/10/20 | [
"https://russian.stackexchange.com/questions/15168",
"https://russian.stackexchange.com",
"https://russian.stackexchange.com/users/9603/"
] | "Благодарю" means "I express thanks" while "спасибо" means "I am glad".
The thing is one can express thanks even if he is not really glad or for somebody else. This makes благодарю more formal and impersonal. "Okay, I do not really feel glad, but you did it for me so I express thanks because of etiquette or whatever".... | Actually the truth behind these two words are pretty interesting. Благодарю in general is a high vibrational word and is used everywhere where спасибо is used and now people are using it more often, because спасибо actually means спаси бог in shortened which translation is god help, save me god etc. there is also an an... |
15,168 | I rarely hear *благодарю*, so I was wondering under which circumstances would one use that word? Are *благодарю* and *спасибо* interchangeable? | 2017/10/20 | [
"https://russian.stackexchange.com/questions/15168",
"https://russian.stackexchange.com",
"https://russian.stackexchange.com/users/9603/"
] | Literally "благодарю" ~ "благо дарю" means "[I am] giving blessing [to you]" or "sharing good"
Whereas "Спасибо" ~ "спаси [тебя] Бог" means "[May] God save [you]" | Actually the truth behind these two words are pretty interesting. Благодарю in general is a high vibrational word and is used everywhere where спасибо is used and now people are using it more often, because спасибо actually means спаси бог in shortened which translation is god help, save me god etc. there is also an an... |
17,377,102 | I need to highlight all word that user search for it inside my gridview
I try this
```
public string Highlight(string InputTxt)
{
string Outputtext = "";
Regex RegExp ;
string[] separators = { ",", ".", "!", "?", ";", ":", " " };
string[] words = InputTxt.Split(separators, StringSplitOptions.Remove... | 2013/06/29 | [
"https://Stackoverflow.com/questions/17377102",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1336886/"
] | If you want to fix the problem that makes content fall underneath the footer div after adding **position: absolute** and **bottom: 10px** to the **footer** in the **css** code
You should add some css codes in **body**, so it should be like this
```
body{
position: relative; /* to make footer in the bottom of the ... | In your CSS file, change #Footer to below code:
```
#Footer {
clear: both; /*may be omitted*/
position: absolute;
bottom: 0;
background-color: #15317E;
width: 100%;
height: 40px; /* or anything you like */
}
```
In your CSS, body must have the following:
```
position:relative;
```
botto... |
34,990,003 | I am trying to add custom unicode font(<http://www.freebanglafont.com/catetory.php?b=173>) with Laravel TCPDF. But it throwing error like
"TCPDF ERROR: Could not include font definition file:"
My controller code:
```
$pdf->setFontSubsetting(true);
$fontname = TCPDF_FONTS::addTTFfont(public_path().'/fonts/SolaimanLipi... | 2016/01/25 | [
"https://Stackoverflow.com/questions/34990003",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4932075/"
] | Try placing your font in the `tcpdf/fonts` folder or setting the `K_PATH_FONTS` constant to the location of your font. Either way, it is unnecessary (and probably unwise) to keep your font folder in the `public` folder. | Check the TCPDF tools folder, there is a script for adding font. You will find the instruction and example in convert\_fonts\_examples.txt.
1. First, copy the .ttf font file in tcpdf\tools\
2. In a terminal go to tcpdf\tools folder run the following code
>
> php tcpdf\_addfont.php -b -t TrueTypeUnicode -i arial.ttf
... |
22,050,413 | I am fairly new to using p/invoke calls and am wondering if someone can guide me on how to retrieve the raw pixel data (unsigned char\*) from an hbitmap.
This is my scenario:
I am loading a **.NET Bitmap** object on the **C#** side and sending it's IntPtr to my unmanaged c++ method. Once I receive the hbitmap ptr on... | 2014/02/26 | [
"https://Stackoverflow.com/questions/22050413",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2052036/"
] | The `GetHbitmap` method does not retrieve pixel data. It yields a GDI bitmap handle, of type `HBITMAP`. Your unmanaged code would receive that as a parameter of type `HBITMAP`. You can obtain the pixel data from that using GDI calls. But it is not, in itself, the raw pixels.
In fact, I'm pretty sure you are attacking ... | Apparently sending in the Pointer from Scan0 is equivalent to what I was searching for. I am able to manipulate the data as expected by sending in an IntPtr retrieved from the bitmapData.Scan0 method.
```
Bitmap srcBitmap = new Bitmap(m_testImage);
Rectangle rect = new Rectangle(0, 0, srcBitmap.Width, srcBitmap.Height... |
22,050,413 | I am fairly new to using p/invoke calls and am wondering if someone can guide me on how to retrieve the raw pixel data (unsigned char\*) from an hbitmap.
This is my scenario:
I am loading a **.NET Bitmap** object on the **C#** side and sending it's IntPtr to my unmanaged c++ method. Once I receive the hbitmap ptr on... | 2014/02/26 | [
"https://Stackoverflow.com/questions/22050413",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2052036/"
] | The `GetHbitmap` method does not retrieve pixel data. It yields a GDI bitmap handle, of type `HBITMAP`. Your unmanaged code would receive that as a parameter of type `HBITMAP`. You can obtain the pixel data from that using GDI calls. But it is not, in itself, the raw pixels.
In fact, I'm pretty sure you are attacking ... | First, an `HBITMAP` shouldn't be a `unsigned char*`. If you are passing an `HBITMAP` to C++ then the parameter should be an `HBITMAP`:
`int Resize::ResizeImage(HBITMAP hBmp)`
Next to convert from `HBITMAP` to pixels:
```
std::vector<unsigned char> ToPixels(HBITMAP BitmapHandle, int &width, int &height)
{
... |
22,050,413 | I am fairly new to using p/invoke calls and am wondering if someone can guide me on how to retrieve the raw pixel data (unsigned char\*) from an hbitmap.
This is my scenario:
I am loading a **.NET Bitmap** object on the **C#** side and sending it's IntPtr to my unmanaged c++ method. Once I receive the hbitmap ptr on... | 2014/02/26 | [
"https://Stackoverflow.com/questions/22050413",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2052036/"
] | First, an `HBITMAP` shouldn't be a `unsigned char*`. If you are passing an `HBITMAP` to C++ then the parameter should be an `HBITMAP`:
`int Resize::ResizeImage(HBITMAP hBmp)`
Next to convert from `HBITMAP` to pixels:
```
std::vector<unsigned char> ToPixels(HBITMAP BitmapHandle, int &width, int &height)
{
... | Apparently sending in the Pointer from Scan0 is equivalent to what I was searching for. I am able to manipulate the data as expected by sending in an IntPtr retrieved from the bitmapData.Scan0 method.
```
Bitmap srcBitmap = new Bitmap(m_testImage);
Rectangle rect = new Rectangle(0, 0, srcBitmap.Width, srcBitmap.Height... |
43,125,553 | Am I correct in assuming that `getDataPoint()` is a method as opposed to a function when used in this context?
```
class Globals: NSObject{
static let sharedInstance = Globals()
func getDataPoint() -> Int {
var theValue: Int
//Some JSON code here
return theValue
}
}
class GameScene: SKScen... | 2017/03/30 | [
"https://Stackoverflow.com/questions/43125553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6287472/"
] | A method is not "opposed to a function" so the question is meaningless. A method *is* a function — a function declared at the top level of a type declaration.
```
func function() {}
class Class {
func method() {}
func anotherMethod() {
func function() { }
}
}
``` | It’s a method. This is just an artefact of Swift’s shorthand for referring to methods and properties without the `self.` qualifier.
```
func foo() {
print(\(getDataPoint()))
}
```
is exactly the same as writing
```
func foo() {
print(\(self.getDataPoint()))
}
``` |
183,647 | >
> Mrs Weasley fussed over the state of his socks and tried to force him to eat **fourth helpings** at every meal.
>
>
>
The word "**helping**" is a countable noun, meaning *a single portion of food taken at a meal*. So, I might think **four helpings at every meal** seems to be more reasonable. On the other hand... | 2018/10/25 | [
"https://ell.stackexchange.com/questions/183647",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/59517/"
] | You are correct that "*four* helpings every meal" probably makes more sense. This particular use refers to the common idiomatic expression "second helping", meaning a second portion of whatever was served the first time around.
>
> "Would anyone like a **second helping**?" Mom asked, standing over the table with a f... | Compare:
>
> Would you like a second helping?
>
>
>
or
>
> No second helpings! We are saving the rest of the cake for your cousins, who will be back from the game momentarily.
>
>
>
Without the article the ordinal is a determiner, here referring to a specific helping in the sequence of helpings. |
183,647 | >
> Mrs Weasley fussed over the state of his socks and tried to force him to eat **fourth helpings** at every meal.
>
>
>
The word "**helping**" is a countable noun, meaning *a single portion of food taken at a meal*. So, I might think **four helpings at every meal** seems to be more reasonable. On the other hand... | 2018/10/25 | [
"https://ell.stackexchange.com/questions/183647",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/59517/"
] | You are correct that "*four* helpings every meal" probably makes more sense. This particular use refers to the common idiomatic expression "second helping", meaning a second portion of whatever was served the first time around.
>
> "Would anyone like a **second helping**?" Mom asked, standing over the table with a f... | I think that the expression is related to
[**second helping**](https://en.wiktionary.org/wiki/second_helping)
>
> A **second portion** of the same thing, usually of food; seconds; **refill**.
>
> *He had already eaten six sausages, but that did not stop him reaching
> for a second helping.*
>
>
>
If we extra... |
183,647 | >
> Mrs Weasley fussed over the state of his socks and tried to force him to eat **fourth helpings** at every meal.
>
>
>
The word "**helping**" is a countable noun, meaning *a single portion of food taken at a meal*. So, I might think **four helpings at every meal** seems to be more reasonable. On the other hand... | 2018/10/25 | [
"https://ell.stackexchange.com/questions/183647",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/59517/"
] | You are correct that "*four* helpings every meal" probably makes more sense. This particular use refers to the common idiomatic expression "second helping", meaning a second portion of whatever was served the first time around.
>
> "Would anyone like a **second helping**?" Mom asked, standing over the table with a f... | I think the issue here is that the helpings are served *sequentially*, not *concurrently*.
If someone puts the equivalent of four servings of food on one large plate, it would be completely correct to describe that as "four helpings". However, if you are served one helping, eat it, and then get *another* one, the next... |
8,210,446 | I installed gitosis on my Ubuntu 10.4 Server via
```
apt-get install gitosis
```
Then I initialized the admin repository with
```
sudo -H -u gitosis gitosis-init < nameOfThePublicKeyFile
```
After this I thought that it the admin repository is only clonable for clients that offer the private key that fit... | 2011/11/21 | [
"https://Stackoverflow.com/questions/8210446",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1051926/"
] | I think I found the error and it has nothing to do with gitosis.
I found out that my tortoisgit client on windows somehow caches the correct private key file of a git connection if it cloned a repository succesfully once. Even if I provide a wrong keyfile afterwards.(I don't know where it saves it but I saw it in the ... | It is always useful, when the GUI fails (here TortoiseGit) to revert to the CLI (msysgit or git itself) to see if the issue persists.
You saw that it might be related to an authentication cache problem within TortoiseGit, and [bug 659](http://code.google.com/p/tortoisegit/issues/detail?id=659&q=authentication) does il... |
22,864,708 | I'm using Visual Studio 2010, .NET 4.0. When I debug my program, it doesn't shows me the XamlParseException, but when I install my program and run it, the exception is thrown and my program stops working. How do I configure VS10 to show me the XamlParseException? How do I debug this exception? | 2014/04/04 | [
"https://Stackoverflow.com/questions/22864708",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2969075/"
] | >
> How do I configure VS10 to show me the XamlParseException?
>
>
>
This question has already been answered but unfortunately using the solution provided will not solve your problem. Let me try to explain why:
In the **Debug** -> **Exceptions** dialog box you can turn on **Break when an exception is** either **T... | In Visual Studio menu you have `Debug->Exceptions`
Here you can configure the exceptions you want your debugger to stop at.
Verify that `Common Language Runtime Exception` is checked for `Thrown` column |
22,864,708 | I'm using Visual Studio 2010, .NET 4.0. When I debug my program, it doesn't shows me the XamlParseException, but when I install my program and run it, the exception is thrown and my program stops working. How do I configure VS10 to show me the XamlParseException? How do I debug this exception? | 2014/04/04 | [
"https://Stackoverflow.com/questions/22864708",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2969075/"
] | >
> How do I configure VS10 to show me the XamlParseException?
>
>
>
This question has already been answered but unfortunately using the solution provided will not solve your problem. Let me try to explain why:
In the **Debug** -> **Exceptions** dialog box you can turn on **Break when an exception is** either **T... | verdesrobert and blacai both answers the question you ask in the title, **but that won't help you** if as you say the code is the same. Normally your code would have crashed on the same exception in your debugging environment too, regardless of exception settings.
So clearly there's some kind of difference between you... |
22,864,708 | I'm using Visual Studio 2010, .NET 4.0. When I debug my program, it doesn't shows me the XamlParseException, but when I install my program and run it, the exception is thrown and my program stops working. How do I configure VS10 to show me the XamlParseException? How do I debug this exception? | 2014/04/04 | [
"https://Stackoverflow.com/questions/22864708",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2969075/"
] | >
> How do I configure VS10 to show me the XamlParseException?
>
>
>
This question has already been answered but unfortunately using the solution provided will not solve your problem. Let me try to explain why:
In the **Debug** -> **Exceptions** dialog box you can turn on **Break when an exception is** either **T... | Check you have the following option selected.
 |
8,730 | In order to get an identical setup between machines with identical hardware, I cloned the drive from one onto the other, then did the ip and hostname configuration to differentiate the two Linux machines. Everything seems to work fine except for scp. (NFS and even ssh between the machines work fine)
Looking at the re... | 2009/05/15 | [
"https://serverfault.com/questions/8730",
"https://serverfault.com",
"https://serverfault.com/users/1543/"
] | You can regenerate new host ssh keys using the following command:
```
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
```
If you are on OSX, the location is actually at /etc/ssh\_host\_dsa\_key. Also, you can substitute rsa for dsa if you prefer. | You probably have an entry in **/etc/hosts** that makes the cloned machine think it is the original one.
And if these are **virtual machines**, ensure that their virtual network cards have different MAC addresses. |
8,730 | In order to get an identical setup between machines with identical hardware, I cloned the drive from one onto the other, then did the ip and hostname configuration to differentiate the two Linux machines. Everything seems to work fine except for scp. (NFS and even ssh between the machines work fine)
Looking at the re... | 2009/05/15 | [
"https://serverfault.com/questions/8730",
"https://serverfault.com",
"https://serverfault.com/users/1543/"
] | You can regenerate new host ssh keys using the following command:
```
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
```
If you are on OSX, the location is actually at /etc/ssh\_host\_dsa\_key. Also, you can substitute rsa for dsa if you prefer. | i suspect that the destination have some problem, like read-only filesystem, corrupted filesystem, no sftp, no directory,etc
but anyway, i recommend you to bypass scp and use rsync, it a lot smarter than scp.
```
rsync -avx file_or_dir destination_host:somedir/
```
it will copy files, directories, recursive, with r... |
8,730 | In order to get an identical setup between machines with identical hardware, I cloned the drive from one onto the other, then did the ip and hostname configuration to differentiate the two Linux machines. Everything seems to work fine except for scp. (NFS and even ssh between the machines work fine)
Looking at the re... | 2009/05/15 | [
"https://serverfault.com/questions/8730",
"https://serverfault.com",
"https://serverfault.com/users/1543/"
] | You probably have an entry in **/etc/hosts** that makes the cloned machine think it is the original one.
And if these are **virtual machines**, ensure that their virtual network cards have different MAC addresses. | i suspect that the destination have some problem, like read-only filesystem, corrupted filesystem, no sftp, no directory,etc
but anyway, i recommend you to bypass scp and use rsync, it a lot smarter than scp.
```
rsync -avx file_or_dir destination_host:somedir/
```
it will copy files, directories, recursive, with r... |
41,152,377 | I have the following setup where I'm trying to use an array of array structure. I'm not sure how to get the key value once the value is found in the array of arrays.
```
$testboat = 'smallest boat';
$allboats = array(40=>array(1=>'big boat',
2=>'bigger boat'
),
... | 2016/12/14 | [
"https://Stackoverflow.com/questions/41152377",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4398966/"
] | Use the `$key => $value` syntax of `foreach()`. Also, no need to loop through the inner arrays:
```
foreach($allboats as $key => $boats){
if(in_array($testboat, $boats)) {
echo $key;
break; //if you want to stop after found
}
}
```
If you want to get the outer key and the inner key:
```
fore... | ```
$testboat = 'smallest boat';
$allboats = array(40=>array(1=>'big boat',
2=>'bigger boat'
),
30=>array(1=>'little boat',
2=>'tiny boat',
3=>'smallest boat'));
foreach($allboats as $id => $boats)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.