qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
50,656
Whenever I hear someone like, say, Daniel Dennett say that consciousness is an "illusion", I'm always left pretty much stumped. Firstly, both the terms "consciousness" and "illusion" are generally left undefined, although this is more apparent with the term "illusion". With this, I have to use the default definitions o...
2018/04/06
[ "https://philosophy.stackexchange.com/questions/50656", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/-1/" ]
This phrasing is used by different philosophers for different purposes, so one must take the phrase in context. However, in general, it is used in reference to the idea that consciousness is a thing which is separable from other things. Denett argues that consciousness does not exist except as an image which describes...
Your scepticism of Dennett is well-grounded. Claims similar to Dennetts were given by Skinner under the rubric of behavioral psychology where one supposed thinking things (*res cogitans*) were merely things, that is automatons, and one was not supposed to ask a man about his inner self, his *telos* or his intentions, o...
50,656
Whenever I hear someone like, say, Daniel Dennett say that consciousness is an "illusion", I'm always left pretty much stumped. Firstly, both the terms "consciousness" and "illusion" are generally left undefined, although this is more apparent with the term "illusion". With this, I have to use the default definitions o...
2018/04/06
[ "https://philosophy.stackexchange.com/questions/50656", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/-1/" ]
> > From Google: > > > il·lu·sion > > > noun > > > 1. a thing that is or is likely to be wrongly perceived or interpreted by the senses > 2. a deceptive appearance or impression > 3. a false idea or belief. > > > Daniel Dennett in *Consciousness Explained* lays out his argument for how consciousness is illus...
When I run across problematic statements of this sort, I always prefer to follow Wittgenstein and look for the error in language that lies behind it. This is precisely the kind of 'philosophy' he thought needed therapy more than analysis. The first step in that Wittgensteinian therapy is to step back and consider what...
50,656
Whenever I hear someone like, say, Daniel Dennett say that consciousness is an "illusion", I'm always left pretty much stumped. Firstly, both the terms "consciousness" and "illusion" are generally left undefined, although this is more apparent with the term "illusion". With this, I have to use the default definitions o...
2018/04/06
[ "https://philosophy.stackexchange.com/questions/50656", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/-1/" ]
> > From Google: > > > il·lu·sion > > > noun > > > 1. a thing that is or is likely to be wrongly perceived or interpreted by the senses > 2. a deceptive appearance or impression > 3. a false idea or belief. > > > Daniel Dennett in *Consciousness Explained* lays out his argument for how consciousness is illus...
Your scepticism of Dennett is well-grounded. Claims similar to Dennetts were given by Skinner under the rubric of behavioral psychology where one supposed thinking things (*res cogitans*) were merely things, that is automatons, and one was not supposed to ask a man about his inner self, his *telos* or his intentions, o...
50,656
Whenever I hear someone like, say, Daniel Dennett say that consciousness is an "illusion", I'm always left pretty much stumped. Firstly, both the terms "consciousness" and "illusion" are generally left undefined, although this is more apparent with the term "illusion". With this, I have to use the default definitions o...
2018/04/06
[ "https://philosophy.stackexchange.com/questions/50656", "https://philosophy.stackexchange.com", "https://philosophy.stackexchange.com/users/-1/" ]
Your scepticism of Dennett is well-grounded. Claims similar to Dennetts were given by Skinner under the rubric of behavioral psychology where one supposed thinking things (*res cogitans*) were merely things, that is automatons, and one was not supposed to ask a man about his inner self, his *telos* or his intentions, o...
When I run across problematic statements of this sort, I always prefer to follow Wittgenstein and look for the error in language that lies behind it. This is precisely the kind of 'philosophy' he thought needed therapy more than analysis. The first step in that Wittgensteinian therapy is to step back and consider what...
34,333
[Here](https://en.wikipedia.org/wiki/R%C3%A9ti_endgame_study), I've read through the famous Réti endgame study. However, there is a possibility that both sides can get a queen. For example, take a look at this variation. ``` [FEN "7K/8/k1P5/7p/8/8/8/8 w - - 0 1"] 1.Kg7 h4 2.Kf6 h3 3.Ke7 h2 4.c7 h1=Q 5.c8=Q+ * ``` I...
2021/03/02
[ "https://chess.stackexchange.com/questions/34333", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/16801/" ]
> > considering my 41.75 per cent winning chance, how do I have to play in order to defeat my opponent if he/she and I both get a queen? > > > First of all you need to understand what is meant by "41.75% winning chance". It does NOT mean that your chances of winning are 41.75%. What it means is that in 41.75% of t...
In this specific position, there is nothing better than to force a queen trade (and the draw) by playing ... Qb7+. Most good players would have agreed tp a draw no later than the 3rd move as they know that this position will end with in a draw with just reasonable moves. There are examples of both sides queening, but ...
34,333
[Here](https://en.wikipedia.org/wiki/R%C3%A9ti_endgame_study), I've read through the famous Réti endgame study. However, there is a possibility that both sides can get a queen. For example, take a look at this variation. ``` [FEN "7K/8/k1P5/7p/8/8/8/8 w - - 0 1"] 1.Kg7 h4 2.Kf6 h3 3.Ke7 h2 4.c7 h1=Q 5.c8=Q+ * ``` I...
2021/03/02
[ "https://chess.stackexchange.com/questions/34333", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/16801/" ]
"41.75% win" seems even worsely misleading. The value is technically true for a random position: [some stats](https://ulthiel.com/math/other/endgames/), but based on the immensely high probability that QxQ or a skewer wins on the spot. (35%, minus K protects his Q, for the capture alone, see below.) In a "neutral" posi...
In this specific position, there is nothing better than to force a queen trade (and the draw) by playing ... Qb7+. Most good players would have agreed tp a draw no later than the 3rd move as they know that this position will end with in a draw with just reasonable moves. There are examples of both sides queening, but ...
34,333
[Here](https://en.wikipedia.org/wiki/R%C3%A9ti_endgame_study), I've read through the famous Réti endgame study. However, there is a possibility that both sides can get a queen. For example, take a look at this variation. ``` [FEN "7K/8/k1P5/7p/8/8/8/8 w - - 0 1"] 1.Kg7 h4 2.Kf6 h3 3.Ke7 h2 4.c7 h1=Q 5.c8=Q+ * ``` I...
2021/03/02
[ "https://chess.stackexchange.com/questions/34333", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/16801/" ]
> > considering my 41.75 per cent winning chance, how do I have to play in order to defeat my opponent if he/she and I both get a queen? > > > First of all you need to understand what is meant by "41.75% winning chance". It does NOT mean that your chances of winning are 41.75%. What it means is that in 41.75% of t...
"41.75% win" seems even worsely misleading. The value is technically true for a random position: [some stats](https://ulthiel.com/math/other/endgames/), but based on the immensely high probability that QxQ or a skewer wins on the spot. (35%, minus K protects his Q, for the capture alone, see below.) In a "neutral" posi...
37,570,854
sorry for my bad english i am working in javascript and i have build an array i want to enter values in this array. ``` var attribute_sets = []; $('.attribute_set :selected').each(function(i, selected){ attribute_sets[i]['id'] = $(selected).val(); // getting id attribute_sets[i]['name'] = $(selected).text()...
2016/06/01
[ "https://Stackoverflow.com/questions/37570854", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2328626/" ]
I would recommend an extension like this: ``` extension NSMutableArray { public func appendWithSuffix(strNewEntry:String) { var n = 1 var new = strNewEntry if self.containsObject(strNewEntry) { new = strNewEntry + "_\(n)" while self.containsObject( new ){ n += 1 new ...
``` - (IBAction)SaveText:(id)sender { if (array.count==0) { [array addObject:_txtAddText.text]; }else { for(NSString *string in array) { if ([string containsString:_txtAddText.text] ) { count = count+1; NSString *Localstring =[N...
3,704
I am making something for outdoor use and I've painted it with a matte exterior latex paint. I'm satisfied with the protection that the paint will offer but I'm experimenting with ways to make it look nicer. Right now I am considering glossy finishes. I have found that I much prefer the appearance and texture of shell...
2016/03/21
[ "https://woodworking.stackexchange.com/questions/3704", "https://woodworking.stackexchange.com", "https://woodworking.stackexchange.com/users/1250/" ]
> > My question is, how should I expect a fairly thick shellac finish (over paint) to behave outdoors over time? It will be exposed to sunlight, a wide range of temperatures, and plenty of rain, snow, and ice. > > > I'm going to reference [this thread](https://advice.thisoldhouse.com/showthread.php?8804-Urethane-o...
Shellac doesn't do well with water, that's your starting point here. It's also relatively brittle and with the expected movement in the wood you're likely to see problems with cracking. Bonding to the paint shouldn't be an issue initially at least, the perceived wisdom is that "shellac sticks to everything and everyt...
3,704
I am making something for outdoor use and I've painted it with a matte exterior latex paint. I'm satisfied with the protection that the paint will offer but I'm experimenting with ways to make it look nicer. Right now I am considering glossy finishes. I have found that I much prefer the appearance and texture of shell...
2016/03/21
[ "https://woodworking.stackexchange.com/questions/3704", "https://woodworking.stackexchange.com", "https://woodworking.stackexchange.com/users/1250/" ]
> > My question is, how should I expect a fairly thick shellac finish (over paint) to behave outdoors over time? It will be exposed to sunlight, a wide range of temperatures, and plenty of rain, snow, and ice. > > > I'm going to reference [this thread](https://advice.thisoldhouse.com/showthread.php?8804-Urethane-o...
Shellac is perhaps the worst choice for the outdoor use. If you ever set a wet glass on shellac finished furniture, you'll notice a white ring. Water softens shellac and overtime it will wear away from the surface. When it softens with water, it has a tacky feel which is a magnet for dust. When it dries, any dust or di...
3,704
I am making something for outdoor use and I've painted it with a matte exterior latex paint. I'm satisfied with the protection that the paint will offer but I'm experimenting with ways to make it look nicer. Right now I am considering glossy finishes. I have found that I much prefer the appearance and texture of shell...
2016/03/21
[ "https://woodworking.stackexchange.com/questions/3704", "https://woodworking.stackexchange.com", "https://woodworking.stackexchange.com/users/1250/" ]
> > My question is, how should I expect a fairly thick shellac finish (over paint) to behave outdoors over time? It will be exposed to sunlight, a wide range of temperatures, and plenty of rain, snow, and ice. > > > I'm going to reference [this thread](https://advice.thisoldhouse.com/showthread.php?8804-Urethane-o...
I've wondered this and done some experimentation myself. Shellac is the most beautiful finish, IMO, and non-toxic, natural, has character, etc--so of course I would like to use it. The answer is not so simple. The clear sanding-sealer and "clear" slightly colored shellacs are not good for outdoors. I tried it on my dec...
3,704
I am making something for outdoor use and I've painted it with a matte exterior latex paint. I'm satisfied with the protection that the paint will offer but I'm experimenting with ways to make it look nicer. Right now I am considering glossy finishes. I have found that I much prefer the appearance and texture of shell...
2016/03/21
[ "https://woodworking.stackexchange.com/questions/3704", "https://woodworking.stackexchange.com", "https://woodworking.stackexchange.com/users/1250/" ]
Shellac doesn't do well with water, that's your starting point here. It's also relatively brittle and with the expected movement in the wood you're likely to see problems with cracking. Bonding to the paint shouldn't be an issue initially at least, the perceived wisdom is that "shellac sticks to everything and everyt...
Shellac is perhaps the worst choice for the outdoor use. If you ever set a wet glass on shellac finished furniture, you'll notice a white ring. Water softens shellac and overtime it will wear away from the surface. When it softens with water, it has a tacky feel which is a magnet for dust. When it dries, any dust or di...
3,704
I am making something for outdoor use and I've painted it with a matte exterior latex paint. I'm satisfied with the protection that the paint will offer but I'm experimenting with ways to make it look nicer. Right now I am considering glossy finishes. I have found that I much prefer the appearance and texture of shell...
2016/03/21
[ "https://woodworking.stackexchange.com/questions/3704", "https://woodworking.stackexchange.com", "https://woodworking.stackexchange.com/users/1250/" ]
Shellac doesn't do well with water, that's your starting point here. It's also relatively brittle and with the expected movement in the wood you're likely to see problems with cracking. Bonding to the paint shouldn't be an issue initially at least, the perceived wisdom is that "shellac sticks to everything and everyt...
I've wondered this and done some experimentation myself. Shellac is the most beautiful finish, IMO, and non-toxic, natural, has character, etc--so of course I would like to use it. The answer is not so simple. The clear sanding-sealer and "clear" slightly colored shellacs are not good for outdoors. I tried it on my dec...
2,600,439
I'm using the [colorbox](http://colorpowered.com/colorbox/) plugin for jQuery. I know I don't have to have a close button, and `overlayClose: false` will prevent the window from being closed by clicking the overlay. Is there a way to remove the `Esc` key-listener event?
2010/04/08
[ "https://Stackoverflow.com/questions/2600439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/231435/" ]
property -> escKey:false
From looking at the source, the escape key is bound to the `keydown.cbox_close` event from line 165: ``` // Set Navigation Key Bindings $(document).bind("keydown.cbox_close", function (e) { if (e.keyCode === 27) { e.preventDefault(); cboxPublic.close(); ...
2,600,439
I'm using the [colorbox](http://colorpowered.com/colorbox/) plugin for jQuery. I know I don't have to have a close button, and `overlayClose: false` will prevent the window from being closed by clicking the overlay. Is there a way to remove the `Esc` key-listener event?
2010/04/08
[ "https://Stackoverflow.com/questions/2600439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/231435/" ]
From looking at the source, the escape key is bound to the `keydown.cbox_close` event from line 165: ``` // Set Navigation Key Bindings $(document).bind("keydown.cbox_close", function (e) { if (e.keyCode === 27) { e.preventDefault(); cboxPublic.close(); ...
As `overlayClose: false`, for ESC you can make `escKey:false`
2,600,439
I'm using the [colorbox](http://colorpowered.com/colorbox/) plugin for jQuery. I know I don't have to have a close button, and `overlayClose: false` will prevent the window from being closed by clicking the overlay. Is there a way to remove the `Esc` key-listener event?
2010/04/08
[ "https://Stackoverflow.com/questions/2600439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/231435/" ]
property -> escKey:false
As `overlayClose: false`, for ESC you can make `escKey:false`
39,900,734
I have the following code. It works for the first directory but not the second one... What I am trying to do is to count the lines on each of the files in different directory. ``` import csv import copy import os import sys import glob os.chdir('Deployment/Work/test1/src') names={} for fn in glob.glob('*.c'): wit...
2016/10/06
[ "https://Stackoverflow.com/questions/39900734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1645601/" ]
You'll either have to return to the root directory using as many `..` as required, store the root directory or specify a full directory from your home: ``` curr_path = os.getcwd() os.chdir('Deployment/Work/test2/src') os.chdir(curr_path) os.chdir('Deployment/Work/test2/src') ``` Or: ``` os.chdir('Deployment/Work/t...
Your `os.chdir` is interpreted relative to the current working directory. Your first `os.chdir` changes the working directory. The system tries to find the second path relative to the first path. There are several ways to solve this. You can keep track of the current directory and change back to it. Else make the seco...
39,900,734
I have the following code. It works for the first directory but not the second one... What I am trying to do is to count the lines on each of the files in different directory. ``` import csv import copy import os import sys import glob os.chdir('Deployment/Work/test1/src') names={} for fn in glob.glob('*.c'): wit...
2016/10/06
[ "https://Stackoverflow.com/questions/39900734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1645601/" ]
Your `os.chdir` is interpreted relative to the current working directory. Your first `os.chdir` changes the working directory. The system tries to find the second path relative to the first path. There are several ways to solve this. You can keep track of the current directory and change back to it. Else make the seco...
I suppose the script is not working because you are trying to change the directory using a relative path. This means that when you execute the first `os.chdir` you change your working directory from the current one to `'Deployment/Work/test1/src'` and when you call `os.chdir` the second time the function tries to chang...
39,900,734
I have the following code. It works for the first directory but not the second one... What I am trying to do is to count the lines on each of the files in different directory. ``` import csv import copy import os import sys import glob os.chdir('Deployment/Work/test1/src') names={} for fn in glob.glob('*.c'): wit...
2016/10/06
[ "https://Stackoverflow.com/questions/39900734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1645601/" ]
You'll either have to return to the root directory using as many `..` as required, store the root directory or specify a full directory from your home: ``` curr_path = os.getcwd() os.chdir('Deployment/Work/test2/src') os.chdir(curr_path) os.chdir('Deployment/Work/test2/src') ``` Or: ``` os.chdir('Deployment/Work/t...
I suppose the script is not working because you are trying to change the directory using a relative path. This means that when you execute the first `os.chdir` you change your working directory from the current one to `'Deployment/Work/test1/src'` and when you call `os.chdir` the second time the function tries to chang...
13,493,327
I have an old VISIO file with external data on it. The source file of the data does not exist anymore. I have tried to copy and paste the data from visio to excel with no success. Then I tried to access the data through VBA and I don't understand the results I get: (The amount of rows is currect, yet the data is somet...
2012/11/21
[ "https://Stackoverflow.com/questions/13493327", "https://Stackoverflow.com", "https://Stackoverflow.com/users/445192/" ]
works best Alt+R then T then 1.
The hot key to run something is Ctrl-F11.
13,493,327
I have an old VISIO file with external data on it. The source file of the data does not exist anymore. I have tried to copy and paste the data from visio to excel with no success. Then I tried to access the data through VBA and I don't understand the results I get: (The amount of rows is currect, yet the data is somet...
2012/11/21
[ "https://Stackoverflow.com/questions/13493327", "https://Stackoverflow.com", "https://Stackoverflow.com/users/445192/" ]
The hot key to run something is Ctrl-F11.
Refer to [Shortcut for selecting run configuration in Eclipse IDE](https://stackoverflow.com/questions/28926894/shortcut-for-selecting-run-configuration-in-eclipse-ide) which said to use ALT+R, N, and then type a name, which shows Run Configurations for me. **Best option:** * Assign (bind) a shortcut via Window > Pre...
13,493,327
I have an old VISIO file with external data on it. The source file of the data does not exist anymore. I have tried to copy and paste the data from visio to excel with no success. Then I tried to access the data through VBA and I don't understand the results I get: (The amount of rows is currect, yet the data is somet...
2012/11/21
[ "https://Stackoverflow.com/questions/13493327", "https://Stackoverflow.com", "https://Stackoverflow.com/users/445192/" ]
works best Alt+R then T then 1.
Refer to [Shortcut for selecting run configuration in Eclipse IDE](https://stackoverflow.com/questions/28926894/shortcut-for-selecting-run-configuration-in-eclipse-ide) which said to use ALT+R, N, and then type a name, which shows Run Configurations for me. **Best option:** * Assign (bind) a shortcut via Window > Pre...
165,894
Assume $x\gt 0$, how does one simplify $$e^{(-x^2t)/i}\ ?$$ I don't understand how we could change the i under to the top so I could use Euler's formula
2012/07/02
[ "https://math.stackexchange.com/questions/165894", "https://math.stackexchange.com", "https://math.stackexchange.com/users/26728/" ]
Remember that $-i^2 = 1$ implies that $-i = \frac{1}{i}.$ Then apply Euler's formula as you mention.
$\frac{1}{i}=-i$. In general, $\frac{1}{a+bi}=\frac{a-bi}{a^2+b^2}$. You can probably figure out the rest.
1,615,657
Trying to send an e-mail via SMTP, its not working, any help? ``` //SMTP info $host = "smtp.gmail.com"; $username = "taylor.mitchellstjoseph@googlemail.com"; $password = "password"; $from = "Taylor";//From email address $to = "taylor@t-webdesign.co.uk";//Change this to your inbox $headers = array ('From' => $from, 'T...
2009/10/23
[ "https://Stackoverflow.com/questions/1615657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/195257/" ]
Please check your PHP logs and see if there are any errors reported. The syntax looks right.
Your $from might be your problem. That isn't exactly a valid email address. Try either changing it to a real address or omitting altogether.
1,615,657
Trying to send an e-mail via SMTP, its not working, any help? ``` //SMTP info $host = "smtp.gmail.com"; $username = "taylor.mitchellstjoseph@googlemail.com"; $password = "password"; $from = "Taylor";//From email address $to = "taylor@t-webdesign.co.uk";//Change this to your inbox $headers = array ('From' => $from, 'T...
2009/10/23
[ "https://Stackoverflow.com/questions/1615657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/195257/" ]
Please check your PHP logs and see if there are any errors reported. The syntax looks right.
The [google documentation](http://mail.google.com/support/bin/answer.py?hl=en&answer=13287) says that ports 465 or 587 should be used for connections to the SMTP server. It seems that [Mail\_smtp](http://pear.php.net/package/Mail/docs/latest/Mail/Mail_smtp.html) uses 25 by default. Try an explicit value of 465 or 587 w...
1,615,657
Trying to send an e-mail via SMTP, its not working, any help? ``` //SMTP info $host = "smtp.gmail.com"; $username = "taylor.mitchellstjoseph@googlemail.com"; $password = "password"; $from = "Taylor";//From email address $to = "taylor@t-webdesign.co.uk";//Change this to your inbox $headers = array ('From' => $from, 'T...
2009/10/23
[ "https://Stackoverflow.com/questions/1615657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/195257/" ]
Please check your PHP logs and see if there are any errors reported. The syntax looks right.
It looks to my like your $from is not a valid email address. You could try replacing this with something more along the lines of "name@example.com". However, I have had little success with the standard PHP SMTP library, so I always use the open source [phpmailer](http://phpmailer.worxware.com/) instead. It's just as e...
1,615,657
Trying to send an e-mail via SMTP, its not working, any help? ``` //SMTP info $host = "smtp.gmail.com"; $username = "taylor.mitchellstjoseph@googlemail.com"; $password = "password"; $from = "Taylor";//From email address $to = "taylor@t-webdesign.co.uk";//Change this to your inbox $headers = array ('From' => $from, 'T...
2009/10/23
[ "https://Stackoverflow.com/questions/1615657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/195257/" ]
Please check your PHP logs and see if there are any errors reported. The syntax looks right.
Note that many ISPs require you to use their own SMTP server and block other ones.
1,615,657
Trying to send an e-mail via SMTP, its not working, any help? ``` //SMTP info $host = "smtp.gmail.com"; $username = "taylor.mitchellstjoseph@googlemail.com"; $password = "password"; $from = "Taylor";//From email address $to = "taylor@t-webdesign.co.uk";//Change this to your inbox $headers = array ('From' => $from, 'T...
2009/10/23
[ "https://Stackoverflow.com/questions/1615657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/195257/" ]
Your $from might be your problem. That isn't exactly a valid email address. Try either changing it to a real address or omitting altogether.
The [google documentation](http://mail.google.com/support/bin/answer.py?hl=en&answer=13287) says that ports 465 or 587 should be used for connections to the SMTP server. It seems that [Mail\_smtp](http://pear.php.net/package/Mail/docs/latest/Mail/Mail_smtp.html) uses 25 by default. Try an explicit value of 465 or 587 w...
1,615,657
Trying to send an e-mail via SMTP, its not working, any help? ``` //SMTP info $host = "smtp.gmail.com"; $username = "taylor.mitchellstjoseph@googlemail.com"; $password = "password"; $from = "Taylor";//From email address $to = "taylor@t-webdesign.co.uk";//Change this to your inbox $headers = array ('From' => $from, 'T...
2009/10/23
[ "https://Stackoverflow.com/questions/1615657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/195257/" ]
Your $from might be your problem. That isn't exactly a valid email address. Try either changing it to a real address or omitting altogether.
It looks to my like your $from is not a valid email address. You could try replacing this with something more along the lines of "name@example.com". However, I have had little success with the standard PHP SMTP library, so I always use the open source [phpmailer](http://phpmailer.worxware.com/) instead. It's just as e...
1,615,657
Trying to send an e-mail via SMTP, its not working, any help? ``` //SMTP info $host = "smtp.gmail.com"; $username = "taylor.mitchellstjoseph@googlemail.com"; $password = "password"; $from = "Taylor";//From email address $to = "taylor@t-webdesign.co.uk";//Change this to your inbox $headers = array ('From' => $from, 'T...
2009/10/23
[ "https://Stackoverflow.com/questions/1615657", "https://Stackoverflow.com", "https://Stackoverflow.com/users/195257/" ]
Your $from might be your problem. That isn't exactly a valid email address. Try either changing it to a real address or omitting altogether.
Note that many ISPs require you to use their own SMTP server and block other ones.
50,986,573
I need to count the courses in the row manner. It means college name after course are add in a one row ``` College_name course_name1 course_name2 course_name3 course_name4 ---------------------------------------------------------------------------- ABC College computer bca cdb xbc ...
2018/06/22
[ "https://Stackoverflow.com/questions/50986573", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7251160/" ]
You created the wrong project type. You created a `.Net Standard Class Library` [![enter image description here](https://i.stack.imgur.com/L24RP.png)](https://i.stack.imgur.com/L24RP.png) but you need to create a normal `Class Library` under `Windows Desktop` in the new project template [![enter image description he...
[![enter image description here](https://i.stack.imgur.com/93V7c.png)](https://i.stack.imgur.com/93V7c.png) Find this in your apps and features menu and try to uninstall. Then install it back and take a look what you got.
50,986,573
I need to count the courses in the row manner. It means college name after course are add in a one row ``` College_name course_name1 course_name2 course_name3 course_name4 ---------------------------------------------------------------------------- ABC College computer bca cdb xbc ...
2018/06/22
[ "https://Stackoverflow.com/questions/50986573", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7251160/" ]
I just got this error like you then I Copy that from my friend. and pass C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework ![](https://i.stack.imgur.com/ij8wU.png) ![](https://i.stack.imgur.com/zbcNg.png)
[![enter image description here](https://i.stack.imgur.com/93V7c.png)](https://i.stack.imgur.com/93V7c.png) Find this in your apps and features menu and try to uninstall. Then install it back and take a look what you got.
50,986,573
I need to count the courses in the row manner. It means college name after course are add in a one row ``` College_name course_name1 course_name2 course_name3 course_name4 ---------------------------------------------------------------------------- ABC College computer bca cdb xbc ...
2018/06/22
[ "https://Stackoverflow.com/questions/50986573", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7251160/" ]
You created the wrong project type. You created a `.Net Standard Class Library` [![enter image description here](https://i.stack.imgur.com/L24RP.png)](https://i.stack.imgur.com/L24RP.png) but you need to create a normal `Class Library` under `Windows Desktop` in the new project template [![enter image description he...
I just got this error like you then I Copy that from my friend. and pass C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework ![](https://i.stack.imgur.com/ij8wU.png) ![](https://i.stack.imgur.com/zbcNg.png)
29,001
I work on my computer at office in 45-50 minutes blocks and then take a break. During the break, I walk around and drink a glass of water and do a fixed number of pushups. Just over a year ago, I started with a fairly small number of pushups (20) during every break. For an 8 hour day, it would result in 8×20 = 160 push...
2016/02/21
[ "https://fitness.stackexchange.com/questions/29001", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/-1/" ]
* Edit: The assumption is that you are healthy, and have no weight issues, especially that you are not over-weight, and not too old. * Supposing you have 10 minutes to train per "break" (not really a break any more...), the maximum amount of push-ups you will possibly be able to do (down the road) during one single bre...
Sorry to spoil your dreams pal, but I would say you could, at maximum, only do a **truly** safe number of about 300 push ups, three times per week. Sorry to rat on your accepted answer, but doing 5000 push ups a day five times a week will damage you for good. Here will be some side effects of 100-200 push ups twice a w...
31,201,251
I have the following array of strings: ``` var words = new List<string> { "Win", "Care", "q10", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat", "Sun" }; ``` I want to get all combinations from the array (use all words in each combination) e.g. 1. WinCareq10MonTueWedThurFriSatSun 2. Monq10TueWedThurFriSatSunWinCare 3. ...
2015/07/03
[ "https://Stackoverflow.com/questions/31201251", "https://Stackoverflow.com", "https://Stackoverflow.com/users/795420/" ]
The problem is that you have **multiple DataContexts** and by default **Binding** works with the **DataContext** of current element if it is specified, and datacontext of parent if not(and so on). so there is 2 simple solutions: * specify **DataContext** of element directly(only if that element does not have one) * u...
Just set properly DataContext. For example in grid ``` <Grid.DataContext> <viewmodel:YourViewModel /> </Grid.DataContext> ``` And now you can bind it ``` <ItemsControl ItemsSource="{Binding Model.ButtonsRaw1}"> ``` There we bind ItemsSource from our model. Or you have an alternative way to do it from Resource....
39,906,135
I am completely new to Elm, and I am going through the [examples](http://elm-lang.org/examples) to get acquainted with the language. The problem is that I can not run the markdown example. The code is as follows: ``` import Markdown main = Markdown.toHtml [] markdown markdown = """ # This is Markdown [Markdown](h...
2016/10/06
[ "https://Stackoverflow.com/questions/39906135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/308065/" ]
Make sure to run the `elm package install` command in the same directory where you are trying to build the code. To verify, you can look to see that there is an `elm-stuff` directory. Package installations are local to the project itself. They aren't system wide, so if you start a new project, you'll have to run `elm ...
The steps to be followed: * Install the Elm with a configure editor (Atom App one of the good ELM Plugin) * Once you done with installation follow the given steps @<https://atom.io/packages/language-elm> * Once you practicing the example codes using "<http://elm-lang.org/examples>" you may tried copying the same code ...
15,413,354
``` package blurbProject; import java.util.Random; import java.util.Scanner; public class BlurbMaker { Random generator = new Random(); //"Random" number generator for the Whatzits public BlurbMaker()//constructor { generator = null; }//close constructor public BlurbMaker(Random iniGenerator)//initialize constru...
2013/03/14
[ "https://Stackoverflow.com/questions/15413354", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2041920/" ]
Remove this line in the no-argument constructor. ``` generator = null; ``` You are "resetting" a previously initialized `Random` instance and causing an `NPE` to be thrown on the first attempted method call using that instance: An alternative to initialize the `Random` `generator` might be: ``` private final Rand...
You call the no-argument constructor to BlurbMaker(), which initializes generator to null. You then call a method on generator, which is null. Hence the NPE.
2,830,936
I'm trying to remove all BBCode Tags from a string. ``` [url]www.google.com[/url] ``` becomes ``` www.google.com ``` I have a regex that works in php to find them all, just dont know how to remove them in .net RegEx to Find BBCode ``` |[[\/\!]*?[^\[\]]*?]|si ```
2010/05/13
[ "https://Stackoverflow.com/questions/2830936", "https://Stackoverflow.com", "https://Stackoverflow.com/users/328536/" ]
Your regular expression looks like it won't work so I tried a different one: ``` string s = "[url]www.google.com[/url] [url=www.google.com]www.google.com[/url]"; s = Regex.Replace(s, @"\[[^]]+\]", ""); ``` Result: ``` www.google.com www.google.com ``` Also, you will need this using statement at the top of your fi...
I you use *Codekicker.BBCode* library ([this](https://www.nuget.org/packages/CodeKicker.BBCode/) or [that](https://www.nuget.org/packages/BBCode/)) then this code will strip known bbcode tags: ``` parser.ParseSyntaxTree(@"[url]www.google.com[/url] [url=www.google.com]www.google.com[/url]").ToText() ``` This will str...
14,425,202
I've got two columns in my Excel spreadsheet that I want to be mutually exclusive. e.g. B1 formula: IF(A1 contains "yes" then B1 set to "-") and also A1 formula: IF(B1 contains "yes" then A1 set to "-") Basically this should mean that when one cell is changed to "Yes", the other cell beside it automatically changes to...
2013/01/20
[ "https://Stackoverflow.com/questions/14425202", "https://Stackoverflow.com", "https://Stackoverflow.com/users/841197/" ]
How about something like this: ``` ' On cell A1 =IF(B1="Yes","-","Yes") ' On cell B1 =IF(A1="Yes","-","Yes") ``` The downside is that after A1 is given a value of "Yes" or "-", it no longer has the function as its value. This potentially isn't a issue - just leave B1 with the function and the set A1 as needed (B1 w...
This can only be achieved in VBA. Copy the following code in the module of your worksheet (e.g. `Sheet1`): ``` Private mBlnIsRunning As Boolean Private Sub Worksheet_Change(ByVal Target As Range) If Application.Intersect(Target, Me.Range("A1:B1")) _ Is Nothing Then Exit Sub 'Prevent endless loop ...
229,059
The most common kind of deviation is the standard deviation. $$ \text{Sd}(x) = \sqrt{\text{Mean}((x - \text{Mean}(x))^2)}$$ The standard deviation is very similar to the mean absolute deviance or $$ \text{MAD}(x) = \text{Mean}(|x - \text{Mean}(x)|)$$ but is often simpler to calculate or obeys nice algebraic propert...
2016/08/09
[ "https://stats.stackexchange.com/questions/229059", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/111109/" ]
You may come up with infinite number of dispersion measures. It's a lost cause to compare the variance to each and everyone of them. There are two features of variance that are attractive to me. First, it's a smooth function. For instance, the mean absolute deviation is not. Second, it's one of the central moments: $...
In some sense, a related and deeper question is why do people tend to use the [$L\_2$ norm](http://mathworld.wolfram.com/L2-Norm.html) instead of the $L\_1$ norm or indeed other norms? In the two-dimensional Euclidean vector space, why do people tend to use $\sqrt{x^2+y^2}$ (i.e. $L\_2$ norm) as a measure of distance i...
229,059
The most common kind of deviation is the standard deviation. $$ \text{Sd}(x) = \sqrt{\text{Mean}((x - \text{Mean}(x))^2)}$$ The standard deviation is very similar to the mean absolute deviance or $$ \text{MAD}(x) = \text{Mean}(|x - \text{Mean}(x)|)$$ but is often simpler to calculate or obeys nice algebraic propert...
2016/08/09
[ "https://stats.stackexchange.com/questions/229059", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/111109/" ]
I'm surprised no one has mentioned the really essential property that Variance is additive for independent random variables: $$\mbox{Var}(a\_1X\_1+\cdots+a\_nX\_n)=\sum\_{i=1}^na\_i^2\mbox{Var}(X\_i),$$ and the equally nice linearity properties that covariance shares. This becomes completely intractable without the s...
In some sense, a related and deeper question is why do people tend to use the [$L\_2$ norm](http://mathworld.wolfram.com/L2-Norm.html) instead of the $L\_1$ norm or indeed other norms? In the two-dimensional Euclidean vector space, why do people tend to use $\sqrt{x^2+y^2}$ (i.e. $L\_2$ norm) as a measure of distance i...
32,601,264
I have 3 `Buttons` in an aspx page. One for `Save as Draft`, 2nd for `Cancel` and 3rd for `submit`. Now I want that whenever I click on any of the 3 `Buttons` then all the 3 `Buttons` should get disabled.
2015/09/16
[ "https://Stackoverflow.com/questions/32601264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4019034/" ]
You can try like this: ``` private void ButtonDisable(Control ct) { foreach(Control c in ct.Controls) { if (c is Button) { c.Enabled = false;; } } } ```
You can do the same with jQuery ``` $(":submit").click( function () { $(":submit").each( function() { $(this).prop('disabled', true); }); }); ``` It will disable your buttons before starting execution of any server side code
32,601,264
I have 3 `Buttons` in an aspx page. One for `Save as Draft`, 2nd for `Cancel` and 3rd for `submit`. Now I want that whenever I click on any of the 3 `Buttons` then all the 3 `Buttons` should get disabled.
2015/09/16
[ "https://Stackoverflow.com/questions/32601264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4019034/" ]
You can try like this: ``` private void ButtonDisable(Control ct) { foreach(Control c in ct.Controls) { if (c is Button) { c.Enabled = false;; } } } ```
This can also be done using JavaScript (without jQuery). The following code uses `document.querySelectorAll` which would work in all modern browsers. ``` var button = document.querySelectorAll('button'); [].forEach.call(button, function (btn) { btn.addEventListener("click", function (e) { e.preventDefault...
32,601,264
I have 3 `Buttons` in an aspx page. One for `Save as Draft`, 2nd for `Cancel` and 3rd for `submit`. Now I want that whenever I click on any of the 3 `Buttons` then all the 3 `Buttons` should get disabled.
2015/09/16
[ "https://Stackoverflow.com/questions/32601264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4019034/" ]
You can try like this: ``` private void ButtonDisable(Control ct) { foreach(Control c in ct.Controls) { if (c is Button) { c.Enabled = false;; } } } ```
Here is small and sweet answer. Give common cssclass to all buttons and then use following code for OnClientClick="funDisableButtons()" event. ``` function funDisableButtons() { $(".className").attr("disabled", true); } ```
26,896,944
I'm trying to implement my own transport layer protocol, but I'm perfectly happy to leave the network layer as-is and not need to mess with the actual IP header information. But of course, when calling recvfrom() on a raw socket, you are given the raw IP datagram, while the sockaddr struct is not filled in. Is ther...
2014/11/12
[ "https://Stackoverflow.com/questions/26896944", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1850415/" ]
The IP header will always be included when receiving on a SOCK\_RAW socket. Per [`raw(7)`](http://man7.org/linux/man-pages/man7/raw.7.html): > > The IPv4 layer generates an IP header when sending a packet unless the `IP_HDRINCL` socket option is enabled on the socket. When it is enabled, the packet must contain an I...
Use `recvmsg()` with the `msg[]` buffers initialized so that the first one receives the IP header, then the second one will only contain data.
1,666,501
I need to create HTTPS call a to remote server that return a data the response of that server dose not include a valid HTTP protocol and i am getting that error System.Net.WebException: The server committed a protocol violation. Section=ResponseStatusLine i all ready did that [useUnsafeHeaderParsing](http://www...
2009/11/03
[ "https://Stackoverflow.com/questions/1666501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45946/" ]
I the end i did have chaise and i wrote some simple code in VB6 I turn it to a DLL registered that DLL and add referens to .net project he made the call fro me VB6 dose not preform HTTP protocol validation ugly but working ``` Option Explicit Dim UrlStr As String Public Sub InitUrlStr(ByVal pUrlStr As S...
You could use the [ServerCertificateValidationCallback](http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.servercertificatevalidationcallback.aspx) callback to ignore certificate validation errors: ``` ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, sslP...
1,666,501
I need to create HTTPS call a to remote server that return a data the response of that server dose not include a valid HTTP protocol and i am getting that error System.Net.WebException: The server committed a protocol violation. Section=ResponseStatusLine i all ready did that [useUnsafeHeaderParsing](http://www...
2009/11/03
[ "https://Stackoverflow.com/questions/1666501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45946/" ]
I the end i did have chaise and i wrote some simple code in VB6 I turn it to a DLL registered that DLL and add referens to .net project he made the call fro me VB6 dose not preform HTTP protocol validation ugly but working ``` Option Explicit Dim UrlStr As String Public Sub InitUrlStr(ByVal pUrlStr As S...
You most likely have a problem on the other side of the server. I would be willing to bet that you are not getting through to the other site at all. If you're talking to a standard Apache or IIS server, they do a pretty good job of implementing HTTP. Your connection may be interrupted. Try doing your operation using a ...
1,666,501
I need to create HTTPS call a to remote server that return a data the response of that server dose not include a valid HTTP protocol and i am getting that error System.Net.WebException: The server committed a protocol violation. Section=ResponseStatusLine i all ready did that [useUnsafeHeaderParsing](http://www...
2009/11/03
[ "https://Stackoverflow.com/questions/1666501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45946/" ]
I the end i did have chaise and i wrote some simple code in VB6 I turn it to a DLL registered that DLL and add referens to .net project he made the call fro me VB6 dose not preform HTTP protocol validation ugly but working ``` Option Explicit Dim UrlStr As String Public Sub InitUrlStr(ByVal pUrlStr As S...
HTTP is a fairly simple protocol on top of TCP. You can use a plain socket, and send the `GET` command yourself.
144,746
It appears that we are having a problem with the disk i/o speed on our Windows 2003 Enterprise Edition server (64-bit). As we were initializing a database that created two 1G tablespaces on 3 different machines, it became obvious that the two smaller machines (each 32-bit Windows 2003 Standard Edition with less RAM) ki...
2010/05/24
[ "https://serverfault.com/questions/144746", "https://serverfault.com", "https://serverfault.com/users/43829/" ]
Try benchmarking the 'service-bare' machine with [IOZone](http://www.iozone.org/), this will tell you if you have an IO-subsystem or application-level issue.
Could this help? [MSDN : Database File Initialization](http://msdn.microsoft.com/en-us/library/ms175935.aspx) From the article: *Data and log files are initialized to overwrite any existing data left on the disk from previously deleted files. Data and log files are first initialized by filling the files with zeros w...
3,395,197
I was wondering how I could show that $\displaystyle \sum\_{x\leq Z}d(x)^2\ll Z(\log 2Z)^3$, where $d(x)$ counts the number of divisors of $x$. I tried to prove this in the following fashion (and failed spectacularly): Wlog assume $Z$ is an integer. Note that we have for a given $\epsilon>0$, there exists a constant ...
2019/10/15
[ "https://math.stackexchange.com/questions/3395197", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
To show just the domination $$\sum\_{n \leqslant Z} d(n)^2 \ll Z(\log Z)^3$$ (for $Z \geqslant 2$, so that I can use $\log Z$ instead of $\log (2Z)$) we can use a simple but non-obvious trick. For notational convenience and transparency I'll use the Iverson bracket $$[P] = \begin{cases} 1 &\text{if } P, \\ 0 &\text{if ...
Expanding Conrad's comment, Euler's product gives us $$ \sum\_{n\geq 1}\frac{\tau(n)^2}{n^s}=\prod\_{p}\left(1+\frac{\tau(p)^2}{p^s}+\frac{\tau(p^2)^2}{p^{2s}}+\ldots\right)=\frac{\zeta(s)^4}{\zeta(2s)} $$ hence the abscissa of convergence of the Dirichlet series in the LHS is $1$. The RHS has a pole of order $4$ at $s...
63,805,157
I have: ``` <input name="input4" type="text" id="input4" disabled="disabled" class="jsx-3771882255" data-id="0"> ``` I want get data of data-id by C#; ``` string s=input4.Attributes["data-id"].ToString(); //(can'tuse this!) ```
2020/09/09
[ "https://Stackoverflow.com/questions/63805157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14245595/" ]
You have the disabled attribute set on your text box, this will not get submitted to the server, use the readonly attribute instead of the disabled attribute.
@vuong quang - Can you check my code and implement it's working for me and also I shared my code with a screenshot. **HTML Code** Add runat="server" ``` <input type="text" name="name" value="0" data-id="101" runat="server" id="txtvalue" /> ``` [HTML Code](https://i.stack.imgur.com/XGGtt.png) **Code behind** ``` ...
50,668,764
I have created two separate functions on VBA. Ideally, a user will have 2x buttons assigned to these macros. One button to validate the data `myCheck()` and the other button to submit the data `onSubmit()`. `myCheck()` function is a Boolean and is set up to be either true of false as indicator whether to run `onSub...
2018/06/03
[ "https://Stackoverflow.com/questions/50668764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8981066/" ]
Your button needs to be linked to the 'Execute' macro. It will first test your check and only execute submit when <> False. There is no need for 2 buttons when you can link all this together with one. You will get the same desired output with one less step needed by the user. I also changed your functions here to "Publ...
Declare a Public variable of myCheck in your modules. Made is possible to check if the your first check button being pressed or not. For instance mybutton.tag = true. ``` Public myCheck as boolean ``` then everything should be OK. It runs as it will be always false. ``` Sub mybutton_click() myCheck ' calls t...
22,996,683
I have a large binary file that I am reading and I would like to compare the current position with an unsigned long long int. However, based on the C++ documentation, it isn't clear to me if: 1. What is the return type of tellg() 2. How can I compare tellg() with the unsigned long long int? 3. Is it possible that the ...
2014/04/10
[ "https://Stackoverflow.com/questions/22996683", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2955541/" ]
**Q** What is the return type of tellg()? **A** The return type of `istream::tellg()` is `streampos`. Check out [std::istream::tellg](http://www.cplusplus.com/reference/istream/istream/tellg/?kw=tellg). **Q** How can I compare tellg() with the unsigned long long int? **A** The return value of `tellg()` is an integra...
R Sahu did a good job on answering the questions, however I was getting overflows when storing the result of `.tellg()` in an `int` and did some extra investigation. TL;DR: Use `std::streamoff` (read as "stream offset") as a integer type to store the result of `tellg()`. ----------------------------------------------...
17,419,330
I need some XSLT (or *something* - see below) to replace newlines in all attributes with an alternative character. I am having to process legacy XML which stores all data as attributes, and uses new-lines to express cardinality. For example: ``` <sample> <p att="John Paul Ringo"></p> </sample> ``` These...
2013/07/02
[ "https://Stackoverflow.com/questions/17419330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1239406/" ]
It seem's to be hard to make this. As I found in [Are line breaks in XML attribute values allowed?](https://stackoverflow.com/questions/449627/are-line-breaks-in-xml-attribute-values-valid) - new line character in attribute is valid but XML parser normalizes it (<https://stackoverflow.com/a/8188290/1324394>) so it is p...
XSLT only sees the XML after it has been processed by the XML parser, which will have done the attribute value normalization. I think that some XML parsers have an option to suppress attribute value normalization. If you don't have access to such a parser, I think that doing a textual replace of (\r?\n) by `&#x0A;` pr...
17,419,330
I need some XSLT (or *something* - see below) to replace newlines in all attributes with an alternative character. I am having to process legacy XML which stores all data as attributes, and uses new-lines to express cardinality. For example: ``` <sample> <p att="John Paul Ringo"></p> </sample> ``` These...
2013/07/02
[ "https://Stackoverflow.com/questions/17419330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1239406/" ]
I have solved(ish) the issue by preprocessing the XML with [JSoup](http://jsoup.org/) (which is a nod to @Ian Roberts's comment about parsing the XML with a non-XML tool). JSoup is (or was) designed for HTML documents, however works well in this context. My code is as follows: ```java @Test public void verifyNewlineE...
XSLT only sees the XML after it has been processed by the XML parser, which will have done the attribute value normalization. I think that some XML parsers have an option to suppress attribute value normalization. If you don't have access to such a parser, I think that doing a textual replace of (\r?\n) by `&#x0A;` pr...
54,242,720
I have one array that I am trying to combine all the sub values that have the same key name and add an extra if there is only 2 with the same key name. her is a saml example of the array this array hase 92 rows ``` Array ( [0] => Array ( [N_127y4Gral] => Array ( [0] => 302 ...
2019/01/17
[ "https://Stackoverflow.com/questions/54242720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5737023/" ]
If the column is a string column just filter values by string `contains`. Assuming your df is `group`. Since you want all the results to show, you could make this not-elegant-solution that makes 3 dataframes: **first, the ones that contains CONTRATO:** ``` df1 = group.loc[group['VALOR_NEW'].fillna('nada').str.contain...
IIUC, you need to check your grouped dataframes for `'Contrato'` in the `'VALOR_NEW'` column within the first three rows. This check should do it: ``` if (group['VALOR_NEW'].head(3) == 'Contrato').any(): print(group) ```
54,242,720
I have one array that I am trying to combine all the sub values that have the same key name and add an extra if there is only 2 with the same key name. her is a saml example of the array this array hase 92 rows ``` Array ( [0] => Array ( [N_127y4Gral] => Array ( [0] => 302 ...
2019/01/17
[ "https://Stackoverflow.com/questions/54242720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5737023/" ]
You can use something like this: ``` my_list = list(df.groupby('CHAMADO').apply(lambda x: x[:3][x[:3]['VALOR_NEW'].str.contains('Contrato',na=False)])['CHAMADO'].values) #[2019000518, 2019000523, 2019000524] ``` This gives a list of the group which contains the word `Contrato` in the first 3 rows. ``` >>df[df.CHAMA...
IIUC, you need to check your grouped dataframes for `'Contrato'` in the `'VALOR_NEW'` column within the first three rows. This check should do it: ``` if (group['VALOR_NEW'].head(3) == 'Contrato').any(): print(group) ```
7,480,253
Which is the faster: 1. a regexp to search the contents of a large file for specific pattern, or 2. an `array_search` to search a large array to match value at any index.
2011/09/20
[ "https://Stackoverflow.com/questions/7480253", "https://Stackoverflow.com", "https://Stackoverflow.com/users/896107/" ]
other things being equal, I would expect the array search to always be faster, not having to read a file and not having to parse and execute a regex.
It will depend on the type of data you have, the type of data you are searching for, and the amount. You really need to try it and find which works for you, there isn't really a right answer any of us can give you without knowing the context and specific implementations. Take a look at the [benchmark](http://pear.php....
35,012,439
I have this code: ``` query_posts(array( 'paged' => $paged, 'post_status' => 'publish', 'posts_per_page' => 6, 'cat' => $term_id, 'orderby' => 'date', 'order' => 'DESC', 'post_type' => 'post' )); while (have_posts()) { the_post(); ... } ``` But I still get 10 posts not only 6. Al...
2016/01/26
[ "https://Stackoverflow.com/questions/35012439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/999295/" ]
You are still using the default query. Use this instead: ``` // The Query $the_query = new WP_Query( array( 'paged' => $paged, 'post_status' => 'publish', 'posts_per_page' => 6, 'cat' => $term_id, 'orderby' => 'date', 'order' => 'DESC', 'post_type' => 'post' )); // The Loop if ...
Try this ``` $args = array ( 'paged' => $paged, 'post_status' => 'publish', 'posts_per_page' => 6, 'cat' => $term_id, 'orderby' => 'date', 'order' => 'DESC', 'post_type' => 'post' ); $query = new WP_Query($args); if ( $query->have_posts() ) : while ( $query->have_p...
35,012,439
I have this code: ``` query_posts(array( 'paged' => $paged, 'post_status' => 'publish', 'posts_per_page' => 6, 'cat' => $term_id, 'orderby' => 'date', 'order' => 'DESC', 'post_type' => 'post' )); while (have_posts()) { the_post(); ... } ``` But I still get 10 posts not only 6. Al...
2016/01/26
[ "https://Stackoverflow.com/questions/35012439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/999295/" ]
You are still using the default query. Use this instead: ``` // The Query $the_query = new WP_Query( array( 'paged' => $paged, 'post_status' => 'publish', 'posts_per_page' => 6, 'cat' => $term_id, 'orderby' => 'date', 'order' => 'DESC', 'post_type' => 'post' )); // The Loop if ...
This one will work for you. modify direct global variable. ``` global $query_string; query_posts("{$query_string}&posts_per_page=6"); while (have_posts()) { the_post(); ... } ```
9,594,133
> > **Possible Duplicate:** > > [What are the differences between struct and class in C++](https://stackoverflow.com/questions/92859/what-are-the-differences-between-struct-and-class-in-c) > > [C++ - struct vs. class](https://stackoverflow.com/questions/4791883/c-struct-vs-class) > > > How are structures di...
2012/03/07
[ "https://Stackoverflow.com/questions/9594133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/882445/" ]
Structures and classes are identical; the language standard uses the term "class" to refer to both. The only difference between defining a class using the `struct` or the `class` keyword is the default accessibility of members and base classes; there is no difference in their runtime behaviour or performance. An "obje...
main thing is by default variables are private in a class and by default they are public in structures. also you can google this and find a million and one topics on this. for example <http://blog.stevedoria.net/20050913/differences-between-cpp-classes-and-structs>
35,508,177
I'm having some trouble sending push notifications to Android and iOS devices using Django + GCM. --- Problem 1: Android receive push when in background but the method `onMessageReceived` is not called. So I can't handle the received data. iOS only receive push if the app is opened or minimized, if the app is closed,...
2016/02/19
[ "https://Stackoverflow.com/questions/35508177", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2077248/" ]
You can do this: ``` >>> def zipp (a,b): ... return [[x,y] for x, y in zip(a, b)] >>> zipp(a, b) [[[1, 2, 3], 'Python'], [[4, 5, 6], 'Java']] ``` > > It must become a function... > > > Note that you use `zip` directly, without defining any extra functions: ``` >>> print(list([x, y] for x, y in zip(a, b))) ...
I think you do not understand how the function works. When you call a function, if the function returns a value, the loops will not continue. The `i` are not simultaneously returned.
56,886,571
Is there a way to achieve exporting the entire active records in a rails application to csv where each relation is a sheet of csv or there is another way to export full db data.Any suggestions?
2019/07/04
[ "https://Stackoverflow.com/questions/56886571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10476417/" ]
I solved this issue by clearing cache for Nuget Packages.
I know I'm a bit late but since the answer for this matter did not work for me, here is how I solved it: First of all, it's obviously a NuGet packages problem, so I searched in my .nuget folder at C:\Users{yourUser}.nuget\packages and looked inside some of the folders, in my case the Android support libraries folders,...
56,886,571
Is there a way to achieve exporting the entire active records in a rails application to csv where each relation is a sheet of csv or there is another way to export full db data.Any suggestions?
2019/07/04
[ "https://Stackoverflow.com/questions/56886571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10476417/" ]
I solved this issue by clearing cache for Nuget Packages.
Neither of the above solutions worked for me. I encountered the error opening an Xamarin project that was created in VS 2015 on VS 2019. I changed the "Compile using android version" in the manifest to Android 9.0, updated the NuGet packages, but this error remained. I also attempted the tried-and-true deleting ".vs", ...
56,886,571
Is there a way to achieve exporting the entire active records in a rails application to csv where each relation is a sheet of csv or there is another way to export full db data.Any suggestions?
2019/07/04
[ "https://Stackoverflow.com/questions/56886571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10476417/" ]
I solved this issue by clearing cache for Nuget Packages.
I was getting Program type already present: androidx.appcompat.content.res.AppCompatResources$ColorStateListCacheEntry error. I had 2 references a)Xamarin.AndroidX.Appcompat and b)Xmarin.Androidx.appcompat.content.res.AppCompatResources I removed the reference Xmarin.Androidx.appcompat.content.res.AppCompatResources ...
56,886,571
Is there a way to achieve exporting the entire active records in a rails application to csv where each relation is a sheet of csv or there is another way to export full db data.Any suggestions?
2019/07/04
[ "https://Stackoverflow.com/questions/56886571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10476417/" ]
I know I'm a bit late but since the answer for this matter did not work for me, here is how I solved it: First of all, it's obviously a NuGet packages problem, so I searched in my .nuget folder at C:\Users{yourUser}.nuget\packages and looked inside some of the folders, in my case the Android support libraries folders,...
Neither of the above solutions worked for me. I encountered the error opening an Xamarin project that was created in VS 2015 on VS 2019. I changed the "Compile using android version" in the manifest to Android 9.0, updated the NuGet packages, but this error remained. I also attempted the tried-and-true deleting ".vs", ...
56,886,571
Is there a way to achieve exporting the entire active records in a rails application to csv where each relation is a sheet of csv or there is another way to export full db data.Any suggestions?
2019/07/04
[ "https://Stackoverflow.com/questions/56886571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10476417/" ]
I know I'm a bit late but since the answer for this matter did not work for me, here is how I solved it: First of all, it's obviously a NuGet packages problem, so I searched in my .nuget folder at C:\Users{yourUser}.nuget\packages and looked inside some of the folders, in my case the Android support libraries folders,...
I was getting Program type already present: androidx.appcompat.content.res.AppCompatResources$ColorStateListCacheEntry error. I had 2 references a)Xamarin.AndroidX.Appcompat and b)Xmarin.Androidx.appcompat.content.res.AppCompatResources I removed the reference Xmarin.Androidx.appcompat.content.res.AppCompatResources ...
57,217
I know that I can update my ECT record (using InfoPath forms I created for the external lists), by passing the BdcIdentity (ID) to the form and it will find that record and enable me to edit. How do I edit a record without the BdcIdentity ID. Say I know some of the other IDs I need to uniquely identify a record. EG, M...
2013/01/16
[ "https://sharepoint.stackexchange.com/questions/57217", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/3003/" ]
Just for others who might come across this, try a full refresh by pressing CTRL+F5. This is likely a cache issue, especially if it only occurs in one browser. This happened to me after the Default Website was started while the Portal Web App was stopped and I hit the site. Once I stopped the Default Website and started...
Since the new version of IE, it cache all get requests. So that is possible that the site is already cached. Try to empty it and then it will be working.
14,985,478
Why deleting non-existing record does not raise an error in sqlalchemy. no feedback on whether the record was deleted or not. ``` session.query(Element).filter(Element.id==ElementId).delete() ``` Thank you for your clarification.
2013/02/20
[ "https://Stackoverflow.com/questions/14985478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2072669/" ]
I don't think it is an error. For example it is perfectly legal to issue a query to delete records in sql that "don't exist" If i have a table 'posts' with a column 'id'. with no records `DELETE FROM posts WHERE ID > 0;` It is perfectly valid sql, there is no error, even though there are no rows I am not too famili...
Actually, sqlalchemy delete operation returns number of affected rows. So you can check and if affected rows is 0 then you can raise error. ``` effected_rows = session.query(Element).filter(Element.id==ElementId).delete() if effected_rows == 0: # raise exception else: # delete element ``` This works for me.
14,985,478
Why deleting non-existing record does not raise an error in sqlalchemy. no feedback on whether the record was deleted or not. ``` session.query(Element).filter(Element.id==ElementId).delete() ``` Thank you for your clarification.
2013/02/20
[ "https://Stackoverflow.com/questions/14985478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2072669/" ]
I don't think it is an error. For example it is perfectly legal to issue a query to delete records in sql that "don't exist" If i have a table 'posts' with a column 'id'. with no records `DELETE FROM posts WHERE ID > 0;` It is perfectly valid sql, there is no error, even though there are no rows I am not too famili...
Adding an answer to @madogan, the edit queue was full and hence writing a new answer. I've expanded his answer more in detail in a working solution: ``` class NoEntryFoundException(Exception): pass def delete_row_entry(element_id: int): effected_rows = session.query(Element).filter(Element.id == element_id)....
14,985,478
Why deleting non-existing record does not raise an error in sqlalchemy. no feedback on whether the record was deleted or not. ``` session.query(Element).filter(Element.id==ElementId).delete() ``` Thank you for your clarification.
2013/02/20
[ "https://Stackoverflow.com/questions/14985478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2072669/" ]
Actually, sqlalchemy delete operation returns number of affected rows. So you can check and if affected rows is 0 then you can raise error. ``` effected_rows = session.query(Element).filter(Element.id==ElementId).delete() if effected_rows == 0: # raise exception else: # delete element ``` This works for me.
Adding an answer to @madogan, the edit queue was full and hence writing a new answer. I've expanded his answer more in detail in a working solution: ``` class NoEntryFoundException(Exception): pass def delete_row_entry(element_id: int): effected_rows = session.query(Element).filter(Element.id == element_id)....
30,399,844
I prematurely removed the Heroku Postgres Hobby Basic add-on from my account which housed a database I was using (I removed it via the dashboard). Is there any way to recover this database? I tried to add the add-on again but it was a fresh database. Thanks for any help!
2015/05/22
[ "https://Stackoverflow.com/questions/30399844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/697056/" ]
So after talking with Heroku, I actually getting my database back. I had looked through the log files and found this command had been run: ``` $ Detach HEROKU_POSTGRESQL_COLOR ``` Apparently the database wasn't actually removed/deleted but just disconnected from my account. They were able to locate it again and reat...
Once the database is removed -- it (and all of its data) are gone for good :( If you had previously taken database snapshots using pgbackups you can likely still access the data (as another commenter mentioned). Sorry for your loss :(
28,946,789
how can i print the whole multidimensional array by using foreach? ``` <?php $shop=array // main array ( "laptop"=>array ( "conpaq", "IBM", "DELL", "Lenovo" ), "printer"=>array ( "canon", "Hp" ), "Tabs"=>array ( "Hp", "Dell", "deny" ) ); ```
2015/03/09
[ "https://Stackoverflow.com/questions/28946789", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3659869/" ]
This one is a simple list using recursion, it also have tabs to make it more clear when there's a new array-group. Please try it and adjust for your code. ``` $shop = array( 'computers' => array( 'dell' => array( 'i7' => array( 'model1' =...
for 2 levels and without recursion. Recusion would be better but this will work. ``` foreach($shop as $value) { if (is_array($value)) { foreach($shop as $value) { echo "$value<br />"; } } else { echo "$value<br />"; } } ?> ```
654,566
My Apache web server logged following messages to `access.log`: ``` 46.22.173.131 - - [23/Dec/2014:15:34:54 +0100] "GET http://pl.wikipedia.org/wiki/Special:Search?search=&go=Go HTTP/1.1" 302 482 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" 182.254.156.77 - - [23/Dec/2014:16:53:22 +0100] "GET http://www.ly...
2014/12/24
[ "https://serverfault.com/questions/654566", "https://serverfault.com", "https://serverfault.com/users/260018/" ]
<http://wiki.apache.org/httpd/ProxyAbuse>: > > Why do I see requests for foreign sites appearing in my log files? > > > An access\_log entry showing this situation could look like this: > > > 63.251.56.142 - - [25/Jul/2002:12:48:04 -0700] "GET <http://www.yahoo.com/> HTTP/1.0" 200 1456 > > For this log line,...
In addition to the great answer from faker, the `302` response code is because of the HTTPS redirect you have configured. To verify if you are vulnerable to the same exploit via HTTPS, run these commands [[source]](http://www.bearfruit.org/2008/04/17/telnet-for-testing-ssl-https-websites/): ``` openssl s_client -conn...
654,566
My Apache web server logged following messages to `access.log`: ``` 46.22.173.131 - - [23/Dec/2014:15:34:54 +0100] "GET http://pl.wikipedia.org/wiki/Special:Search?search=&go=Go HTTP/1.1" 302 482 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" 182.254.156.77 - - [23/Dec/2014:16:53:22 +0100] "GET http://www.ly...
2014/12/24
[ "https://serverfault.com/questions/654566", "https://serverfault.com", "https://serverfault.com/users/260018/" ]
<http://wiki.apache.org/httpd/ProxyAbuse>: > > Why do I see requests for foreign sites appearing in my log files? > > > An access\_log entry showing this situation could look like this: > > > 63.251.56.142 - - [25/Jul/2002:12:48:04 -0700] "GET <http://www.yahoo.com/> HTTP/1.0" 200 1456 > > For this log line,...
As @faker notes it is important to configure your web server so that it can't be used as a public proxy. That should be the default behavior (i.e., proxying disabled) unless you've explicitly enabled one or more of the proxy modules (look at your httpd.conf for LoadModule statements that refer to proxy modules) and hav...
654,566
My Apache web server logged following messages to `access.log`: ``` 46.22.173.131 - - [23/Dec/2014:15:34:54 +0100] "GET http://pl.wikipedia.org/wiki/Special:Search?search=&go=Go HTTP/1.1" 302 482 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" 182.254.156.77 - - [23/Dec/2014:16:53:22 +0100] "GET http://www.ly...
2014/12/24
[ "https://serverfault.com/questions/654566", "https://serverfault.com", "https://serverfault.com/users/260018/" ]
In addition to the great answer from faker, the `302` response code is because of the HTTPS redirect you have configured. To verify if you are vulnerable to the same exploit via HTTPS, run these commands [[source]](http://www.bearfruit.org/2008/04/17/telnet-for-testing-ssl-https-websites/): ``` openssl s_client -conn...
As @faker notes it is important to configure your web server so that it can't be used as a public proxy. That should be the default behavior (i.e., proxying disabled) unless you've explicitly enabled one or more of the proxy modules (look at your httpd.conf for LoadModule statements that refer to proxy modules) and hav...
9,619,963
I have a .NET webforms application that consumes data from a WCF/REST web service. Most of the time, we use shared classes to pass data back and forth, and that works well. However, occasionally we need to display this data in a Datagrid or similar .NET control, and the most convenient way to do this is via a Dataset...
2012/03/08
[ "https://Stackoverflow.com/questions/9619963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/157806/" ]
I know you can feed your DataSet not just with data but also with schema, something like ``` dataSet.ReadXmlSchema(new System.IO.StreamReader("schema.xsd")); ``` so if you have the xsd should be fine.
If you know your XSD ahead of time, you can generate a class file from that and then tweak it to ensure you have the right data types (strings for zip code). [XML Schema Definition Tool (Xsd.exe)](http://msdn.microsoft.com/en-us/library/x6c1kb0s%28v=vs.100%29.aspx) Once your create your class file, you can use [XmlSe...
35,660,127
I am trying to make an app that takes inputed string and then separates every character by space, and finally show it. For example, when I input "pizza" it should output "p i z z a". Unfortunately, the following code, which I wrote, does not work: ``` @IBOutlet var input: UITextField! @IBOutlet var output: UITextFiel...
2016/02/26
[ "https://Stackoverflow.com/questions/35660127", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5985868/" ]
You can create an array of your string characters and use joinWithSeparator to join it with a space: ``` extension String { var spacedString: String { return characters.map{String($0)}.joinWithSeparator(" ") } } "pizza".spacedString ```
You make three mistakes here: 1) You are assigning new value to `input.text` every time in the loop, not append to the end of the result string. 2) You loop thru the `input.text` and at the same time, you are changing the value inside `input.text` which causes some problem when doing `input.text![character]` 3) You ...
151,815
This query string parser is intended to parse the parameters and values of a parser query string. I'm particularly concerned about my use of `std::move(...)`. I haven't used C++ almost 15 years and have never done so professionally, so any and all feedback is welcome. **HttpUtility.h:** ``` class UrlUtil final { pub...
2017/01/05
[ "https://codereview.stackexchange.com/questions/151815", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/127504/" ]
Looks largely correct on the surface. Of course there's plenty to fix! ``` class UrlUtil final { public: static std::string urlDecode(const std::string &urlEncodedString); }; ``` * Personally, I despise `final`. It serves no purpose in the average codebase, but it *does* gratuitously break several metaprogrammin...
> > Question 1: because this is a `const&`, this is not bad practice, correct? > > > Returning a `const&` is fine IMO, but there is a caveat: you must not let the reference live longer than the object. Things like this will be invalid (I think, but at least it's questionable whether it's valid, which is a problem)...
512,041
Is there a formula I can use that will change all cells with one character to something else? For example, I have cells with single letters and no matter what the letter is I want that cell to contain the word Member. **More Info:** I get spreadsheets that contain, up to 40,000 rows. Column B will have names in the ...
2012/11/28
[ "https://superuser.com/questions/512041", "https://superuser.com", "https://superuser.com/users/176695/" ]
Your question is hard to understand.  I’m guessing that you mean that you have a collection of cells (say, column A) that contain text values like “” *(blank)*, `A`, `AA`, `AAA`, etc., and you want to display “” *(blank)*, `Member`, `AA`, `AAA`, etc.  Try setting `B1` to ``` =IF(LEN(A1)=1, "Member", A1) ``` and then...
Not sure if you are saying you want the cell that has a single letter ('a' for example) to change to the word Member or not, but here is what I think you are trying to do ``` A B 1 a =IF(A1="a","Member","") 2 a =IF(A2="a","Member","") 3 b .. 4 c .. ``` the resulting excel spreadsheet would look like this for each ...
512,041
Is there a formula I can use that will change all cells with one character to something else? For example, I have cells with single letters and no matter what the letter is I want that cell to contain the word Member. **More Info:** I get spreadsheets that contain, up to 40,000 rows. Column B will have names in the ...
2012/11/28
[ "https://superuser.com/questions/512041", "https://superuser.com", "https://superuser.com/users/176695/" ]
Not sure if you are saying you want the cell that has a single letter ('a' for example) to change to the word Member or not, but here is what I think you are trying to do ``` A B 1 a =IF(A1="a","Member","") 2 a =IF(A2="a","Member","") 3 b .. 4 c .. ``` the resulting excel spreadsheet would look like this for each ...
You may ave solved this one already, but I just stumbled across it looking for something else. Have you tried `Ctrl`+`H` in *Options*? It lets you search entire cells for a single letter, though you would have to repeat this for each letter of the alphabet.
512,041
Is there a formula I can use that will change all cells with one character to something else? For example, I have cells with single letters and no matter what the letter is I want that cell to contain the word Member. **More Info:** I get spreadsheets that contain, up to 40,000 rows. Column B will have names in the ...
2012/11/28
[ "https://superuser.com/questions/512041", "https://superuser.com", "https://superuser.com/users/176695/" ]
Your question is hard to understand.  I’m guessing that you mean that you have a collection of cells (say, column A) that contain text values like “” *(blank)*, `A`, `AA`, `AAA`, etc., and you want to display “” *(blank)*, `Member`, `AA`, `AAA`, etc.  Try setting `B1` to ``` =IF(LEN(A1)=1, "Member", A1) ``` and then...
You say that you want to use a formula, but also that you want to “change … cells …”.  This is a combination that generally doesn’t work.  Here are three things that are feasible: 1. A formula to display a value in an additional column in which single-character values are replaced by “Member”. 2. A procedure to actual...
512,041
Is there a formula I can use that will change all cells with one character to something else? For example, I have cells with single letters and no matter what the letter is I want that cell to contain the word Member. **More Info:** I get spreadsheets that contain, up to 40,000 rows. Column B will have names in the ...
2012/11/28
[ "https://superuser.com/questions/512041", "https://superuser.com", "https://superuser.com/users/176695/" ]
Your question is hard to understand.  I’m guessing that you mean that you have a collection of cells (say, column A) that contain text values like “” *(blank)*, `A`, `AA`, `AAA`, etc., and you want to display “” *(blank)*, `Member`, `AA`, `AAA`, etc.  Try setting `B1` to ``` =IF(LEN(A1)=1, "Member", A1) ``` and then...
You may ave solved this one already, but I just stumbled across it looking for something else. Have you tried `Ctrl`+`H` in *Options*? It lets you search entire cells for a single letter, though you would have to repeat this for each letter of the alphabet.
512,041
Is there a formula I can use that will change all cells with one character to something else? For example, I have cells with single letters and no matter what the letter is I want that cell to contain the word Member. **More Info:** I get spreadsheets that contain, up to 40,000 rows. Column B will have names in the ...
2012/11/28
[ "https://superuser.com/questions/512041", "https://superuser.com", "https://superuser.com/users/176695/" ]
You say that you want to use a formula, but also that you want to “change … cells …”.  This is a combination that generally doesn’t work.  Here are three things that are feasible: 1. A formula to display a value in an additional column in which single-character values are replaced by “Member”. 2. A procedure to actual...
You may ave solved this one already, but I just stumbled across it looking for something else. Have you tried `Ctrl`+`H` in *Options*? It lets you search entire cells for a single letter, though you would have to repeat this for each letter of the alphabet.
10,699
> > **Possible Duplicate:** > > [Is there a 'rule of thumb' that I can use to estimate depth of field while shooting?](https://photo.stackexchange.com/questions/6047/is-there-a-rule-of-thumb-that-i-can-use-to-estimate-depth-of-field-while-shooti) > > > How do you estimate the aperture needed to produce suffici...
2011/04/08
[ "https://photo.stackexchange.com/questions/10699", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/3775/" ]
I would either stop down as far as I can get away with, or shoot and check the image on the rear LCD. I'm sure there's an approximation of the DOF formula that's simple enough to do a quick mental calculation, after guessing your subject distance and reading the focal length off the lens, but it's important to underst...
> > What methods do you use to visualise depth of field? > > > When I used a Nikon FE, I used to look through the viewfinder and press the "stop-down"/"depth of field preview (DOF)" button. None of my cameras since have had one. It is certainly a feature I miss. Nowadays I mostly guess.
10,699
> > **Possible Duplicate:** > > [Is there a 'rule of thumb' that I can use to estimate depth of field while shooting?](https://photo.stackexchange.com/questions/6047/is-there-a-rule-of-thumb-that-i-can-use-to-estimate-depth-of-field-while-shooti) > > > How do you estimate the aperture needed to produce suffici...
2011/04/08
[ "https://photo.stackexchange.com/questions/10699", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/3775/" ]
Experience! Once you've taken enough photos at various apertures and distances, you will have the experience to get the DOF right on the first or second try, without having to measure distances or perform calculations. With an accurate enough estimate, bracketing should get you quickly to the right aperture. Many camer...
> > What methods do you use to visualise depth of field? > > > When I used a Nikon FE, I used to look through the viewfinder and press the "stop-down"/"depth of field preview (DOF)" button. None of my cameras since have had one. It is certainly a feature I miss. Nowadays I mostly guess.
10,699
> > **Possible Duplicate:** > > [Is there a 'rule of thumb' that I can use to estimate depth of field while shooting?](https://photo.stackexchange.com/questions/6047/is-there-a-rule-of-thumb-that-i-can-use-to-estimate-depth-of-field-while-shooti) > > > How do you estimate the aperture needed to produce suffici...
2011/04/08
[ "https://photo.stackexchange.com/questions/10699", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/3775/" ]
DoF calculators are good for when you can take your time setting up a landscape shot (and if your lens has a focus distance scale), but for more dynamic situations there are general rules of thumb that can help you. For wildlife or portraits, you should be fine pretty much wide open on a normal lens - about f/4-f/5.6 ...
> > What methods do you use to visualise depth of field? > > > When I used a Nikon FE, I used to look through the viewfinder and press the "stop-down"/"depth of field preview (DOF)" button. None of my cameras since have had one. It is certainly a feature I miss. Nowadays I mostly guess.
43,596,548
I have some legacy code that uses an explicitly linked-list to hold an event list that is periodically looped through. Instead of defining a 'next' pointer in each event-node, I thought a vector would be more compact & more efficient, however, the conversion of something I thought to be straight forward, has me going i...
2017/04/24
[ "https://Stackoverflow.com/questions/43596548", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1345497/" ]
Just to be clear, @user4581301's comments were instrumental in solving what was, basically a semantic problem caused by the original design's over-use of similarly spelled names such as event v. event\_ & events with some spellings being used for more than one type. When I went to proofread the multiple variations made...
``` Your code commented by me: #define dummy_defs //#define USE_LL #ifndef USE_LL #include <vector> //object library type (might or not be an issue) using std::vector; // 'std' means 'provided' here #endif #ifdef dummy_defs #define QueuedAfterReading 1 //your type definition ...
32,229,443
Seems simple but I can't figure it out. ``` let getRandom = randomSequenceGenerator(min: 1, max: 20) for _ in 1...20 { println(getRandom()) } ``` getRandom prints out 20 non-repeating numbers into the console... PERFECT. I want to get those 20 non-repeating numbers into an array so I can use them. I can't seem ...
2015/08/26
[ "https://Stackoverflow.com/questions/32229443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1601827/" ]
You never assign any value to `name` in your `Boy` instance, I've added some explanatory comments: ``` // Creates a Person (not a Boy) Person person = new Person(); // Sets the name on that Person person.printinfo("WOLFSKIN", "Test Address"); // Creates an *entirely separate object*, an instance of Boy Boy boy = new...
You are referencing `name` from an instance of `Boy`, but it's been assigned in an instance of `Person`, hence it's `null`. You can obviate that by adding: ``` boy.printinfo("WOLFSKIN", "Test Address"); ```
32,229,443
Seems simple but I can't figure it out. ``` let getRandom = randomSequenceGenerator(min: 1, max: 20) for _ in 1...20 { println(getRandom()) } ``` getRandom prints out 20 non-repeating numbers into the console... PERFECT. I want to get those 20 non-repeating numbers into an array so I can use them. I can't seem ...
2015/08/26
[ "https://Stackoverflow.com/questions/32229443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1601827/" ]
You never assign any value to `name` in your `Boy` instance, I've added some explanatory comments: ``` // Creates a Person (not a Boy) Person person = new Person(); // Sets the name on that Person person.printinfo("WOLFSKIN", "Test Address"); // Creates an *entirely separate object*, an instance of Boy Boy boy = new...
From your example, you appear to think that `this` returns the instance of your super class, when it actually returns the instance of the class it is in. In your example, `this` refers to your `Boy` class and its fields, when you seem to want it to refer to `Person`. `Boy` does not have the same `name` as `Person` unle...
70,673,543
i have a DF ``` User A B C u1 1 0.3 5 u1 5 4 5 u1 6 1.3 2 U2 5 6.2 11 U2 1 7 6.5 ``` the output that i want : ``` User combine U1 [1,0.3 ,5,5 ,4, 5,6 ,1.3, 2] U2 [5,6.2,11,1,7,6.5] ``` i tried : ``` DF['combine'] =DF.apply(lambd...
2022/01/11
[ "https://Stackoverflow.com/questions/70673543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17835821/" ]
We can first `agg` the column into `list` , the `groupby` with `sum` ``` out = df[['A','B','C']].agg(list,1).groupby(df['User'],sort=False).sum().to_frame('combine').reset_index() Out[621]: User combine 0 u1 [1.0, 0.3, 5.0, 5.0, 4.0, 5.0, 6.0, 1.3, 2.0] 1 U2 ...
Reformat your dataframe then group by `User` column and transform to a list: ``` out = df.set_index('User').stack().groupby(level=0, sort=False).apply(list) \ .rename('combine').reset_index() print(out) # Output User combine 0 u1 [1.0, 0.3, 5.0, 5.0, 4.0, 5.0, 6.0, ...
70,673,543
i have a DF ``` User A B C u1 1 0.3 5 u1 5 4 5 u1 6 1.3 2 U2 5 6.2 11 U2 1 7 6.5 ``` the output that i want : ``` User combine U1 [1,0.3 ,5,5 ,4, 5,6 ,1.3, 2] U2 [5,6.2,11,1,7,6.5] ``` i tried : ``` DF['combine'] =DF.apply(lambd...
2022/01/11
[ "https://Stackoverflow.com/questions/70673543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17835821/" ]
We can first `agg` the column into `list` , the `groupby` with `sum` ``` out = df[['A','B','C']].agg(list,1).groupby(df['User'],sort=False).sum().to_frame('combine').reset_index() Out[621]: User combine 0 u1 [1.0, 0.3, 5.0, 5.0, 4.0, 5.0, 6.0, 1.3, 2.0] 1 U2 ...
You can use the underlying numpy array: ``` (df.groupby('User', sort=False) .apply(lambda x:x.drop(columns='User').values.ravel().tolist()) .to_frame(name='combine') .reset_index() ) ``` Output: ``` User combine 0 u1 [1.0, 0.3, 5.0, 5.0, 4.0, 5.0, 6.0, 1.3, 2.0]...
3,446,059
If $A$ is a matrix for which its eigenvectors are only multiples of $\begin{pmatrix}1\\ 0\\ 0\end{pmatrix}$, then in general, can it be said that $A$ has repeated eigenvalues? Also, this matrix $A$ cannot be diagonalizable?
2019/11/22
[ "https://math.stackexchange.com/questions/3446059", "https://math.stackexchange.com", "https://math.stackexchange.com/users/613675/" ]
Since your vector is $3\times 1$, the matrix is $3\times 3$. For it to be diagonalizable, there have to be three linearly independent eigenvectors. Since every eigenvector is a multiple of the single vector, the matrix cannot have three linearly independent eigenvectors, so your matrix is *definitely* not diagonalizabl...
If you want a better understanding about eigenvectors, or start from eigenvectors and eigenvalues and then reason about the possible transformations they could belong to, eigencircles are a good tool. They were introduced/defined in 2006 by Englefield and Farr. Too bad eigencircles only work for 2x2 matrices. Set $A=\...
48,580,563
I just cannot make it up why cucumber does not see the steps. Here is my structure. Currently only test.feature matters, as i tried to simplify everything: [![enter image description here](https://i.stack.imgur.com/JYHmz.png)](https://i.stack.imgur.com/JYHmz.png) Here is my test.feature: [![enter image description...
2018/02/02
[ "https://Stackoverflow.com/questions/48580563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5226289/" ]
For [random access iterator](http://en.cppreference.com/w/cpp/concept/RandomAccessIterator) this form can be used - and it is fine: ``` template <class InputIt, class N, class OutputIt> InputIt copy_n_advance_input(InputIt it, N dist, OutputIt outIt) { std::copy_n(it, dist, outIt); return std::next(it, dist); ...
I know this is an old question, but... Recently I've run into similar issue, and I feel pretty sad when I see there isn't any good solution for this problem... Nevertheless, I've tried to write an iterator wrapper like what [Toby Speight](https://stackoverflow.com/users/4850040/toby-speight/ "Toby Speight") said, and ...
48,580,563
I just cannot make it up why cucumber does not see the steps. Here is my structure. Currently only test.feature matters, as i tried to simplify everything: [![enter image description here](https://i.stack.imgur.com/JYHmz.png)](https://i.stack.imgur.com/JYHmz.png) Here is my test.feature: [![enter image description...
2018/02/02
[ "https://Stackoverflow.com/questions/48580563", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5226289/" ]
You could create an **iterator adapter** that always works through a *reference* to the supplied iterator. Here's the basic skeleton of such an adapter: ``` #include <iterator> template<typename InputIterator> struct IteratorReference { InputIterator& it; IteratorReference(InputIterator& it) : it(it)...
I know this is an old question, but... Recently I've run into similar issue, and I feel pretty sad when I see there isn't any good solution for this problem... Nevertheless, I've tried to write an iterator wrapper like what [Toby Speight](https://stackoverflow.com/users/4850040/toby-speight/ "Toby Speight") said, and ...
20,042,324
I want to design a box with some transparency in it in CSS or CSS3 which must work in IE8, I made this code, it is working fine in other browsers, but in IE8 the box is becoming completely transparent, how to fix this problem? > > > ``` > .price_tag { > position: absolute; > height: 146px; > width: 295px...
2013/11/18
[ "https://Stackoverflow.com/questions/20042324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2787428/" ]
With SWI-Prolog and the library(clpfd) you can ask question like that. ``` ?- use_module(library(clpfd)). % library(apply_macros) compiled into apply_macros 0,00 sec, 39 clauses % library(assoc) compiled into assoc 0,03 sec, 143 clauses % library(clpfd) compiled into clpfd 0,11 sec, 1,456 clauses true. ?- 4 #= 2 ...
Because you seem to have asked the same question before, the short answer: No, you cannot ask this question like this. You would have to implement this yourself. The `library(clpfd)` mentioned does pretty much what you need. At the least, you can try and look at the implementation for inspiration.
20,042,324
I want to design a box with some transparency in it in CSS or CSS3 which must work in IE8, I made this code, it is working fine in other browsers, but in IE8 the box is becoming completely transparent, how to fix this problem? > > > ``` > .price_tag { > position: absolute; > height: 146px; > width: 295px...
2013/11/18
[ "https://Stackoverflow.com/questions/20042324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2787428/" ]
With SWI-Prolog and the library(clpfd) you can ask question like that. ``` ?- use_module(library(clpfd)). % library(apply_macros) compiled into apply_macros 0,00 sec, 39 clauses % library(assoc) compiled into assoc 0,03 sec, 143 clauses % library(clpfd) compiled into clpfd 0,11 sec, 1,456 clauses true. ?- 4 #= 2 ...
You can use [`between/3`](http://www.swi-prolog.org/pldoc/man?section=arith) to generate integers: ``` ?- between(1,1000,Y), X is 2 ^ Y, X == 4. Y = 2, X = 4 ; false. ?- between(1,1000,Y), X is 2 ^ Y, X == 32. Y = 5, X = 32 ; false. ``` You can also use `inf` for the second argument of `between/3`, but without some...
20,042,324
I want to design a box with some transparency in it in CSS or CSS3 which must work in IE8, I made this code, it is working fine in other browsers, but in IE8 the box is becoming completely transparent, how to fix this problem? > > > ``` > .price_tag { > position: absolute; > height: 146px; > width: 295px...
2013/11/18
[ "https://Stackoverflow.com/questions/20042324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2787428/" ]
With SWI-Prolog and the library(clpfd) you can ask question like that. ``` ?- use_module(library(clpfd)). % library(apply_macros) compiled into apply_macros 0,00 sec, 39 clauses % library(assoc) compiled into assoc 0,03 sec, 143 clauses % library(clpfd) compiled into clpfd 0,11 sec, 1,456 clauses true. ?- 4 #= 2 ...
you can check *instantiation status* of a variable ``` % E is X^Y % here are accepted patterns % % exp(+,+,-) % exp(-,+,+) % exp(+,-,+) % exp(X,Y,E) :- var(E) -> E is X^Y % note: will throw an error if either X or Y are not bound to number ; var(X) -> compute_base_of_exp_here(Y,E,X) % note: as above, with ...
20,042,324
I want to design a box with some transparency in it in CSS or CSS3 which must work in IE8, I made this code, it is working fine in other browsers, but in IE8 the box is becoming completely transparent, how to fix this problem? > > > ``` > .price_tag { > position: absolute; > height: 146px; > width: 295px...
2013/11/18
[ "https://Stackoverflow.com/questions/20042324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2787428/" ]
You can use [`between/3`](http://www.swi-prolog.org/pldoc/man?section=arith) to generate integers: ``` ?- between(1,1000,Y), X is 2 ^ Y, X == 4. Y = 2, X = 4 ; false. ?- between(1,1000,Y), X is 2 ^ Y, X == 32. Y = 5, X = 32 ; false. ``` You can also use `inf` for the second argument of `between/3`, but without some...
Because you seem to have asked the same question before, the short answer: No, you cannot ask this question like this. You would have to implement this yourself. The `library(clpfd)` mentioned does pretty much what you need. At the least, you can try and look at the implementation for inspiration.
20,042,324
I want to design a box with some transparency in it in CSS or CSS3 which must work in IE8, I made this code, it is working fine in other browsers, but in IE8 the box is becoming completely transparent, how to fix this problem? > > > ``` > .price_tag { > position: absolute; > height: 146px; > width: 295px...
2013/11/18
[ "https://Stackoverflow.com/questions/20042324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2787428/" ]
you can check *instantiation status* of a variable ``` % E is X^Y % here are accepted patterns % % exp(+,+,-) % exp(-,+,+) % exp(+,-,+) % exp(X,Y,E) :- var(E) -> E is X^Y % note: will throw an error if either X or Y are not bound to number ; var(X) -> compute_base_of_exp_here(Y,E,X) % note: as above, with ...
Because you seem to have asked the same question before, the short answer: No, you cannot ask this question like this. You would have to implement this yourself. The `library(clpfd)` mentioned does pretty much what you need. At the least, you can try and look at the implementation for inspiration.