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
3,339,591
I cannot make difference between conditional statement and biconditional statement I make difference between them when they are used in Natural language but I don't know which one to pick if its not clear. One example is this in first I think that was not biconditional statement but it turns on that is it. Example: “p:...
2019/08/30
[ "https://math.stackexchange.com/questions/3339591", "https://math.stackexchange.com", "https://math.stackexchange.com/users/694966/" ]
This is an English question, not a math one. In English, if ... then often means if and only if. In math it is clear that an implication is true if the antecedent is false. You have to look at the context. In this case, there is a clear English implication that if you don't finish your meal you cannot have dessert, whi...
> > Example: “p: If you finish your meal, then q: you can have dessert.” in my head you can finish the meal without eating the desert, is not like "must". > > > A simple test: Negate both the antecedent and consequent. If the statement is still true, then you have a biconditional relationship. Applying this test...
23,812,996
Let's consider this Java class : ``` public class A { int att1; UnknownDataType att2; } ``` And let's consider these implications : * **IF** att1 is equal to 1 **THEN** att2 should be of type DataType1. * **IF** att1 is equal to 2 **THEN** att2 should be of type DataType2. I honestly cannot yet imagine how...
2014/05/22
[ "https://Stackoverflow.com/questions/23812996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2766382/" ]
This is not a good design. You want to use generics ... ``` public class A<UnknownDataType> { UnknownDataType type; } A<String> aString = new A<String>(); A<Integer> aInteger = new A<Integer>(); ```
I usually use one of 3 approaches here: 1. Quick'n'dirty: If att2 is not exposed directly then just set its type to Object and cast when necessary using att1. 2. If the types are used in a similar way - there is room to create a common interface. In that case this becomes simple and allows to only use att1 when you ne...
23,812,996
Let's consider this Java class : ``` public class A { int att1; UnknownDataType att2; } ``` And let's consider these implications : * **IF** att1 is equal to 1 **THEN** att2 should be of type DataType1. * **IF** att1 is equal to 2 **THEN** att2 should be of type DataType2. I honestly cannot yet imagine how...
2014/05/22
[ "https://Stackoverflow.com/questions/23812996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2766382/" ]
This is not a good design. You want to use generics ... ``` public class A<UnknownDataType> { UnknownDataType type; } A<String> aString = new A<String>(); A<Integer> aInteger = new A<Integer>(); ```
This is a little tough with out knowing the exact goal of your software. There could be a few ways to approach this. Let's list a few potential scenarios Is there anything in common between the UnknownDataType that you need to store? Maybe that data type should be an interface and you store the interface instead of th...
23,812,996
Let's consider this Java class : ``` public class A { int att1; UnknownDataType att2; } ``` And let's consider these implications : * **IF** att1 is equal to 1 **THEN** att2 should be of type DataType1. * **IF** att1 is equal to 2 **THEN** att2 should be of type DataType2. I honestly cannot yet imagine how...
2014/05/22
[ "https://Stackoverflow.com/questions/23812996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2766382/" ]
I usually use one of 3 approaches here: 1. Quick'n'dirty: If att2 is not exposed directly then just set its type to Object and cast when necessary using att1. 2. If the types are used in a similar way - there is room to create a common interface. In that case this becomes simple and allows to only use att1 when you ne...
This is a little tough with out knowing the exact goal of your software. There could be a few ways to approach this. Let's list a few potential scenarios Is there anything in common between the UnknownDataType that you need to store? Maybe that data type should be an interface and you store the interface instead of th...
9,827
From [McCoy Memory Alpha](http://en.memory-alpha.org/wiki/Leonard_McCoy) > > On stardate 41153.7, the 137-year old Admiral Leonard McCoy inspected the USS Enterprise-D during its first mission. He commented on the great significance of the ship's name to Lieutenant Commander Data, telling Data "You treat her like a l...
2012/01/27
[ "https://scifi.stackexchange.com/questions/9827", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/976/" ]
According Leonard McCoy's memory beta wiki page, the novel Encounter at Farpoint explains how he got there and why he wasn't at the ship's launch: > > In 2363, McCoy suffered an injury after tripping over one of his > great-great-grandchildrens' toys which necessitated a stay at Bethesda > Starfleet Hospital, preve...
According to the book McCoy simply wanted to see the new Enterprise. As was stated above, he missed his opportunity to tour the ship before the actual launch with other dignitaries because he was laid up in the hospital. By the time he was discharged the Enterprise had left spacedock for its shakedown cruise. So as the...
9,827
From [McCoy Memory Alpha](http://en.memory-alpha.org/wiki/Leonard_McCoy) > > On stardate 41153.7, the 137-year old Admiral Leonard McCoy inspected the USS Enterprise-D during its first mission. He commented on the great significance of the ship's name to Lieutenant Commander Data, telling Data "You treat her like a l...
2012/01/27
[ "https://scifi.stackexchange.com/questions/9827", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/976/" ]
According to the book McCoy simply wanted to see the new Enterprise. As was stated above, he missed his opportunity to tour the ship before the actual launch with other dignitaries because he was laid up in the hospital. By the time he was discharged the Enterprise had left spacedock for its shakedown cruise. So as the...
Heart. Just for the heart factor. Plus very few ships in Starfleet bear multiple alpha-numeric designations, with ships like the Enterprise, Yamato and the London being exceptions to the rule. So he has an emotional attachment to the namesake. With good reason, given the rich history of the various Enterprises in fle...
9,827
From [McCoy Memory Alpha](http://en.memory-alpha.org/wiki/Leonard_McCoy) > > On stardate 41153.7, the 137-year old Admiral Leonard McCoy inspected the USS Enterprise-D during its first mission. He commented on the great significance of the ship's name to Lieutenant Commander Data, telling Data "You treat her like a l...
2012/01/27
[ "https://scifi.stackexchange.com/questions/9827", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/976/" ]
You're overthinking it. This kind of thing happens all the time in the real world. Short answer: "because he's an Admiral and wanted to". Obviously TNG wanted to create a better connection with TOS, so they brought him on. However, in world, it makes perfect sense. If you were old and had been on a previous one, would...
Heart. Just for the heart factor. Plus very few ships in Starfleet bear multiple alpha-numeric designations, with ships like the Enterprise, Yamato and the London being exceptions to the rule. So he has an emotional attachment to the namesake. With good reason, given the rich history of the various Enterprises in fle...
9,827
From [McCoy Memory Alpha](http://en.memory-alpha.org/wiki/Leonard_McCoy) > > On stardate 41153.7, the 137-year old Admiral Leonard McCoy inspected the USS Enterprise-D during its first mission. He commented on the great significance of the ship's name to Lieutenant Commander Data, telling Data "You treat her like a l...
2012/01/27
[ "https://scifi.stackexchange.com/questions/9827", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/976/" ]
According Leonard McCoy's memory beta wiki page, the novel Encounter at Farpoint explains how he got there and why he wasn't at the ship's launch: > > In 2363, McCoy suffered an injury after tripping over one of his > great-great-grandchildrens' toys which necessitated a stay at Bethesda > Starfleet Hospital, preve...
Heart. Just for the heart factor. Plus very few ships in Starfleet bear multiple alpha-numeric designations, with ships like the Enterprise, Yamato and the London being exceptions to the rule. So he has an emotional attachment to the namesake. With good reason, given the rich history of the various Enterprises in fle...
9,827
From [McCoy Memory Alpha](http://en.memory-alpha.org/wiki/Leonard_McCoy) > > On stardate 41153.7, the 137-year old Admiral Leonard McCoy inspected the USS Enterprise-D during its first mission. He commented on the great significance of the ship's name to Lieutenant Commander Data, telling Data "You treat her like a l...
2012/01/27
[ "https://scifi.stackexchange.com/questions/9827", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/976/" ]
He just wanted to see the ship one more time, I think. Also, Chekov is still alive in the 24th Century as the head of Starfleet Intelligence (I think) & so is Uhura, who became an Admiral (in the novels) which makes sense as they were both relatively young during TOS (Chekov was fresh out of the Academy back then).
Heart. Just for the heart factor. Plus very few ships in Starfleet bear multiple alpha-numeric designations, with ships like the Enterprise, Yamato and the London being exceptions to the rule. So he has an emotional attachment to the namesake. With good reason, given the rich history of the various Enterprises in fle...
9,827
From [McCoy Memory Alpha](http://en.memory-alpha.org/wiki/Leonard_McCoy) > > On stardate 41153.7, the 137-year old Admiral Leonard McCoy inspected the USS Enterprise-D during its first mission. He commented on the great significance of the ship's name to Lieutenant Commander Data, telling Data "You treat her like a l...
2012/01/27
[ "https://scifi.stackexchange.com/questions/9827", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/976/" ]
Upon further digging, I think the answer is right in the episode script, and my initial guess was wrong - he was inspecting Enterprise-D specifically in his capacity as Dr and ex-CMO. > > WORF: Commander Data is on a special assignment, sir. He's using our shuttlecraft to transfer an admiral over to the Hood. > > ...
He just wanted to see the ship one more time, I think. Also, Chekov is still alive in the 24th Century as the head of Starfleet Intelligence (I think) & so is Uhura, who became an Admiral (in the novels) which makes sense as they were both relatively young during TOS (Chekov was fresh out of the Academy back then).
9,827
From [McCoy Memory Alpha](http://en.memory-alpha.org/wiki/Leonard_McCoy) > > On stardate 41153.7, the 137-year old Admiral Leonard McCoy inspected the USS Enterprise-D during its first mission. He commented on the great significance of the ship's name to Lieutenant Commander Data, telling Data "You treat her like a l...
2012/01/27
[ "https://scifi.stackexchange.com/questions/9827", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/976/" ]
Dr. McCoy, as the Branch Admiral of Starfleet Medical, is most likely the Surgeon General of Starfleet. He's the man responsible for the whole of Starfleet's medical personnel, and as such, has the right to inspect, in person or by proxy, any and/or all medical staff and facilities in Starfleet. Likewise, the Fleet or...
According to the book McCoy simply wanted to see the new Enterprise. As was stated above, he missed his opportunity to tour the ship before the actual launch with other dignitaries because he was laid up in the hospital. By the time he was discharged the Enterprise had left spacedock for its shakedown cruise. So as the...
9,827
From [McCoy Memory Alpha](http://en.memory-alpha.org/wiki/Leonard_McCoy) > > On stardate 41153.7, the 137-year old Admiral Leonard McCoy inspected the USS Enterprise-D during its first mission. He commented on the great significance of the ship's name to Lieutenant Commander Data, telling Data "You treat her like a l...
2012/01/27
[ "https://scifi.stackexchange.com/questions/9827", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/976/" ]
According Leonard McCoy's memory beta wiki page, the novel Encounter at Farpoint explains how he got there and why he wasn't at the ship's launch: > > In 2363, McCoy suffered an injury after tripping over one of his > great-great-grandchildrens' toys which necessitated a stay at Bethesda > Starfleet Hospital, preve...
Dr. McCoy, as the Branch Admiral of Starfleet Medical, is most likely the Surgeon General of Starfleet. He's the man responsible for the whole of Starfleet's medical personnel, and as such, has the right to inspect, in person or by proxy, any and/or all medical staff and facilities in Starfleet. Likewise, the Fleet or...
9,827
From [McCoy Memory Alpha](http://en.memory-alpha.org/wiki/Leonard_McCoy) > > On stardate 41153.7, the 137-year old Admiral Leonard McCoy inspected the USS Enterprise-D during its first mission. He commented on the great significance of the ship's name to Lieutenant Commander Data, telling Data "You treat her like a l...
2012/01/27
[ "https://scifi.stackexchange.com/questions/9827", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/976/" ]
Dr. McCoy, as the Branch Admiral of Starfleet Medical, is most likely the Surgeon General of Starfleet. He's the man responsible for the whole of Starfleet's medical personnel, and as such, has the right to inspect, in person or by proxy, any and/or all medical staff and facilities in Starfleet. Likewise, the Fleet or...
He just wanted to see the ship one more time, I think. Also, Chekov is still alive in the 24th Century as the head of Starfleet Intelligence (I think) & so is Uhura, who became an Admiral (in the novels) which makes sense as they were both relatively young during TOS (Chekov was fresh out of the Academy back then).
9,827
From [McCoy Memory Alpha](http://en.memory-alpha.org/wiki/Leonard_McCoy) > > On stardate 41153.7, the 137-year old Admiral Leonard McCoy inspected the USS Enterprise-D during its first mission. He commented on the great significance of the ship's name to Lieutenant Commander Data, telling Data "You treat her like a l...
2012/01/27
[ "https://scifi.stackexchange.com/questions/9827", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/976/" ]
According Leonard McCoy's memory beta wiki page, the novel Encounter at Farpoint explains how he got there and why he wasn't at the ship's launch: > > In 2363, McCoy suffered an injury after tripping over one of his > great-great-grandchildrens' toys which necessitated a stay at Bethesda > Starfleet Hospital, preve...
He just wanted to see the ship one more time, I think. Also, Chekov is still alive in the 24th Century as the head of Starfleet Intelligence (I think) & so is Uhura, who became an Admiral (in the novels) which makes sense as they were both relatively young during TOS (Chekov was fresh out of the Academy back then).
2,257
I have been trying to develop solutions with ArcPad 10 Studio for a while now and finding it restrictive. I would like to use the Visual Studio environment to develop ArcPad 10 solutions (form development and coding). Does anyone know if this is possible?
2010/09/29
[ "https://gis.stackexchange.com/questions/2257", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/655/" ]
No, as far as I know you have to use the ArcPad Studio and are forced to deveop with VBScript or JScript.
It is possible to interact with ArcPad via a .NET application. Take a look at this developer sample from ESRI. I believe this is targeting ArcPad 8 but I would imagine the functionality still exists in ArcPad 10. <http://resources.arcgis.com/gallery/file/arcpad/details?entryID=03F8487A-1422-2418-342C-99098367450F> Yo...
2,257
I have been trying to develop solutions with ArcPad 10 Studio for a while now and finding it restrictive. I would like to use the Visual Studio environment to develop ArcPad 10 solutions (form development and coding). Does anyone know if this is possible?
2010/09/29
[ "https://gis.stackexchange.com/questions/2257", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/655/" ]
I like to think of ArcPad customizers and ArcPad developers as two types of people with different workflows in ArcPad. ArcPad customizers are GIS integrators. They use ArcPad as an out of the box product and use the provided Quick Forms and ArcPad Studio to perform customization such as control placement of forms and ...
It is possible to interact with ArcPad via a .NET application. Take a look at this developer sample from ESRI. I believe this is targeting ArcPad 8 but I would imagine the functionality still exists in ArcPad 10. <http://resources.arcgis.com/gallery/file/arcpad/details?entryID=03F8487A-1422-2418-342C-99098367450F> Yo...
2,257
I have been trying to develop solutions with ArcPad 10 Studio for a while now and finding it restrictive. I would like to use the Visual Studio environment to develop ArcPad 10 solutions (form development and coding). Does anyone know if this is possible?
2010/09/29
[ "https://gis.stackexchange.com/questions/2257", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/655/" ]
No, as far as I know you have to use the ArcPad Studio and are forced to deveop with VBScript or JScript.
I like to think of ArcPad customizers and ArcPad developers as two types of people with different workflows in ArcPad. ArcPad customizers are GIS integrators. They use ArcPad as an out of the box product and use the provided Quick Forms and ArcPad Studio to perform customization such as control placement of forms and ...
55,440,503
I am trying to make Selenium click upvote buttons on a reddit-like website. The site has entries from different users and each entry has a upvote and downvote button below it. What i want to do is to make Selenium click on the first upvote button ( which belongs to the entry at the top ) on the page. I tried to use "C...
2019/03/31
[ "https://Stackoverflow.com/questions/55440503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8125224/" ]
The element that you are trying to click is under `shadow dom` as mentioned in the html structure and currently selenium does not support operation on the elements under the shadow dom. Reference: <https://medium.com/rate-engineering/a-guide-to-working-with-shadow-dom-using-selenium-b124992559f> So, if you want to...
If you want to click on the first one you could use `Driver.find_elements_by_xpath(//*[@id="eksico-chevron-up-thick"]/path)[1].click()`
149,889
I'm looking for the appropriate English term for what I'd call a "große Persönlichkeit" in German. * This is *not* about someone who is famous, * neither about someone who tries to appear superior than others by making them small * but means someone who is wise, reflected, (possibly brave), emotionally stable and inde...
2014/02/04
[ "https://english.stackexchange.com/questions/149889", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27352/" ]
In daily usage, people refer to someone as being "small" or "petty" to express the idea behind the "kleine" person you mention. In terms of the "große," I don't think there's a single word that encompasses all that you describe. I think instead, speakers normally apply something specific, or simply say "he/she is a le...
A quick translation of "große Persönlichkeit" via translate.google.com yielded "Great Personality". From your description of what you are trying to convey, I believe that other terms could be "Uplifting Personality" or "Positive Influence".
149,889
I'm looking for the appropriate English term for what I'd call a "große Persönlichkeit" in German. * This is *not* about someone who is famous, * neither about someone who tries to appear superior than others by making them small * but means someone who is wise, reflected, (possibly brave), emotionally stable and inde...
2014/02/04
[ "https://english.stackexchange.com/questions/149889", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27352/" ]
What comes to my mind is "a person of great character" or "of noble character", where "[character](http://www.merriam-webster.com/dictionary/character)" has the meaning > > moral excellence and firmness > > > [This site](http://www.artofmanliness.com/2013/06/25/what-is-character-its-3-true-qualities-and-how-to-de...
In daily usage, people refer to someone as being "small" or "petty" to express the idea behind the "kleine" person you mention. In terms of the "große," I don't think there's a single word that encompasses all that you describe. I think instead, speakers normally apply something specific, or simply say "he/she is a le...
149,889
I'm looking for the appropriate English term for what I'd call a "große Persönlichkeit" in German. * This is *not* about someone who is famous, * neither about someone who tries to appear superior than others by making them small * but means someone who is wise, reflected, (possibly brave), emotionally stable and inde...
2014/02/04
[ "https://english.stackexchange.com/questions/149889", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27352/" ]
You could also do *magnanimous* which is the older English adjective taken from Aristotle's account of the virtuous person. The new adjective in more recent translations is "great-hearted" man. Among the virtues Aristotle includes as requirements are social graces and forms of generosity that seem coterminable with wh...
In daily usage, people refer to someone as being "small" or "petty" to express the idea behind the "kleine" person you mention. In terms of the "große," I don't think there's a single word that encompasses all that you describe. I think instead, speakers normally apply something specific, or simply say "he/she is a le...
149,889
I'm looking for the appropriate English term for what I'd call a "große Persönlichkeit" in German. * This is *not* about someone who is famous, * neither about someone who tries to appear superior than others by making them small * but means someone who is wise, reflected, (possibly brave), emotionally stable and inde...
2014/02/04
[ "https://english.stackexchange.com/questions/149889", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27352/" ]
You might try to translate "große Persönlichket" as "gracious" person. You could possibly call them "grand" (but not *grandiose*). You might also call them "generous", though you would have to add context to clarify that you don't necessarily mean with money, but rather emotionally. When contrasting this behaviour wit...
A quick translation of "große Persönlichkeit" via translate.google.com yielded "Great Personality". From your description of what you are trying to convey, I believe that other terms could be "Uplifting Personality" or "Positive Influence".
149,889
I'm looking for the appropriate English term for what I'd call a "große Persönlichkeit" in German. * This is *not* about someone who is famous, * neither about someone who tries to appear superior than others by making them small * but means someone who is wise, reflected, (possibly brave), emotionally stable and inde...
2014/02/04
[ "https://english.stackexchange.com/questions/149889", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27352/" ]
What comes to my mind is "a person of great character" or "of noble character", where "[character](http://www.merriam-webster.com/dictionary/character)" has the meaning > > moral excellence and firmness > > > [This site](http://www.artofmanliness.com/2013/06/25/what-is-character-its-3-true-qualities-and-how-to-de...
A quick translation of "große Persönlichkeit" via translate.google.com yielded "Great Personality". From your description of what you are trying to convey, I believe that other terms could be "Uplifting Personality" or "Positive Influence".
149,889
I'm looking for the appropriate English term for what I'd call a "große Persönlichkeit" in German. * This is *not* about someone who is famous, * neither about someone who tries to appear superior than others by making them small * but means someone who is wise, reflected, (possibly brave), emotionally stable and inde...
2014/02/04
[ "https://english.stackexchange.com/questions/149889", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27352/" ]
You could also do *magnanimous* which is the older English adjective taken from Aristotle's account of the virtuous person. The new adjective in more recent translations is "great-hearted" man. Among the virtues Aristotle includes as requirements are social graces and forms of generosity that seem coterminable with wh...
A quick translation of "große Persönlichkeit" via translate.google.com yielded "Great Personality". From your description of what you are trying to convey, I believe that other terms could be "Uplifting Personality" or "Positive Influence".
149,889
I'm looking for the appropriate English term for what I'd call a "große Persönlichkeit" in German. * This is *not* about someone who is famous, * neither about someone who tries to appear superior than others by making them small * but means someone who is wise, reflected, (possibly brave), emotionally stable and inde...
2014/02/04
[ "https://english.stackexchange.com/questions/149889", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27352/" ]
What comes to my mind is "a person of great character" or "of noble character", where "[character](http://www.merriam-webster.com/dictionary/character)" has the meaning > > moral excellence and firmness > > > [This site](http://www.artofmanliness.com/2013/06/25/what-is-character-its-3-true-qualities-and-how-to-de...
You might try to translate "große Persönlichket" as "gracious" person. You could possibly call them "grand" (but not *grandiose*). You might also call them "generous", though you would have to add context to clarify that you don't necessarily mean with money, but rather emotionally. When contrasting this behaviour wit...
149,889
I'm looking for the appropriate English term for what I'd call a "große Persönlichkeit" in German. * This is *not* about someone who is famous, * neither about someone who tries to appear superior than others by making them small * but means someone who is wise, reflected, (possibly brave), emotionally stable and inde...
2014/02/04
[ "https://english.stackexchange.com/questions/149889", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27352/" ]
You could also do *magnanimous* which is the older English adjective taken from Aristotle's account of the virtuous person. The new adjective in more recent translations is "great-hearted" man. Among the virtues Aristotle includes as requirements are social graces and forms of generosity that seem coterminable with wh...
You might try to translate "große Persönlichket" as "gracious" person. You could possibly call them "grand" (but not *grandiose*). You might also call them "generous", though you would have to add context to clarify that you don't necessarily mean with money, but rather emotionally. When contrasting this behaviour wit...
149,889
I'm looking for the appropriate English term for what I'd call a "große Persönlichkeit" in German. * This is *not* about someone who is famous, * neither about someone who tries to appear superior than others by making them small * but means someone who is wise, reflected, (possibly brave), emotionally stable and inde...
2014/02/04
[ "https://english.stackexchange.com/questions/149889", "https://english.stackexchange.com", "https://english.stackexchange.com/users/27352/" ]
What comes to my mind is "a person of great character" or "of noble character", where "[character](http://www.merriam-webster.com/dictionary/character)" has the meaning > > moral excellence and firmness > > > [This site](http://www.artofmanliness.com/2013/06/25/what-is-character-its-3-true-qualities-and-how-to-de...
You could also do *magnanimous* which is the older English adjective taken from Aristotle's account of the virtuous person. The new adjective in more recent translations is "great-hearted" man. Among the virtues Aristotle includes as requirements are social graces and forms of generosity that seem coterminable with wh...
11,010,591
I have many many files in a folder, and I want to process them one after another, I need to have a global dictionary to record the user identifier and the flowcount, but if my code is like this, when the second or third file is processed, the user\_dict for last file will lose. Because if an user id in the second file...
2012/06/13
[ "https://Stackoverflow.com/questions/11010591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504283/" ]
You can open multiple files in your python script, and use your for loop to take care each of them ``` for filename in os.listdir(folderpath): filepath = os.path.join(folderpath, filename) fd = open(filepath, 'r') # here is your code for line in fd.readlines(): .... ```
You can always declare ``` global user_dict ``` in your code... But is this the best approach? Maybe you should use a class: ``` class FileProcessor(object): def __init__(self): self.user_dict = dict() def process_file(file_name): .... self.user_dict[]... ``` and then: ``` proce...
7,268,772
``` class base {}; class der : public base{}; der d1; der d2(d1); ``` This statement invokes default constructor of class base then copy constructor of claas der. My question is why C++ has not provided the feature of calling copy constructor of base class while creating object of derive class by copying another obj...
2011/09/01
[ "https://Stackoverflow.com/questions/7268772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/923236/" ]
Short version ------------- > > This statement invokes default constructor of class base then copy constructor of claas der. > > > No, it doesn't. > > My question is why C++ has not provided the feature of calling copy constructor of base class while creating object of derive class by copying another object of ...
> > This statement invokes default constructor of class base then copy constructor of claas der. > > > No it does not. The first line invokes the default construct of class `der`, which invokes the default constructor of class `base`. The second line invokes the copy constructor of class `der`, because you're cop...
7,268,772
``` class base {}; class der : public base{}; der d1; der d2(d1); ``` This statement invokes default constructor of class base then copy constructor of claas der. My question is why C++ has not provided the feature of calling copy constructor of base class while creating object of derive class by copying another obj...
2011/09/01
[ "https://Stackoverflow.com/questions/7268772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/923236/" ]
Short version ------------- > > This statement invokes default constructor of class base then copy constructor of claas der. > > > No, it doesn't. > > My question is why C++ has not provided the feature of calling copy constructor of base class while creating object of derive class by copying another object of ...
The compiler-generated copy-constructor will invoke the copy constructor of the base class. You have probably added a user-defined copy constructor for `der`. In such a case you must explicitly invoke the copy constructor of the base class. ``` der::der(const der& other): base(other), ... {} ```
7,268,772
``` class base {}; class der : public base{}; der d1; der d2(d1); ``` This statement invokes default constructor of class base then copy constructor of claas der. My question is why C++ has not provided the feature of calling copy constructor of base class while creating object of derive class by copying another obj...
2011/09/01
[ "https://Stackoverflow.com/questions/7268772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/923236/" ]
Short version ------------- > > This statement invokes default constructor of class base then copy constructor of claas der. > > > No, it doesn't. > > My question is why C++ has not provided the feature of calling copy constructor of base class while creating object of derive class by copying another object of ...
Copy constructor of the derived class call the default constructor of the base class. Below sample programs demonstrates the same. ``` #include <iostream> using namespace std; class Base { public: Base(){ cout<<"Base"<<endl; } Base(int i){ cout<<"Base int "<<endl; } Base(const Base& obj){ cout<<"Base CC...
64,398,870
[![enter image description here](https://i.stack.imgur.com/MhlLM.png)](https://i.stack.imgur.com/MhlLM.png) I bought a complete app but when I install it in my own environment then it gets back this error.
2020/10/17
[ "https://Stackoverflow.com/questions/64398870", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11856004/" ]
> > Try upgrading from expo sdk 37 to expo sdk 38 by running expo upgrade > > > Looks like there is an open issue on Github. Try this: [Invariant Violation: Native module cannot be null](https://github.com/react-native-push-notification-ios/push-notification-ios/issues/43)
(I already solved this problem to move my file into a new project). But now I'm fetching a new error. I already replace all ListView component with FlatList, and also I have no Icon or Spinner that's I import from react-native or native-base. But it's getting back this error. [![enter image description here](https://i...
43,223,483
I'm trying to change the background colour of a main activity when an item from a pop up menu in a sub-activity is selected. However, when I run the app and choose said item, the app crashes. This is the sub-activity code: ``` public class Modify extends AppCompatActivity { Button button, submit; EditText edit; @Over...
2017/04/05
[ "https://Stackoverflow.com/questions/43223483", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1790030/" ]
babel is a transpiler, webpack is a bundler and yarn (or npm) is a package manager. These tools are for different purposes. And usually we use *all* of them together. React has a very handy tool called [Create React App](https://github.com/facebookincubator/create-react-app). With this tool you don't need to configure...
This is best place to start up with ReactJS > > In older versions you need to setup react with babel and webpack but now on current latest version you can directly start with [Create React App](https://github.com/facebookincubator/create-react-app) > > > [ReactJS Installation and startup guide](https://reactjs.or...
43,223,483
I'm trying to change the background colour of a main activity when an item from a pop up menu in a sub-activity is selected. However, when I run the app and choose said item, the app crashes. This is the sub-activity code: ``` public class Modify extends AppCompatActivity { Button button, submit; EditText edit; @Over...
2017/04/05
[ "https://Stackoverflow.com/questions/43223483", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1790030/" ]
babel is a transpiler, webpack is a bundler and yarn (or npm) is a package manager. These tools are for different purposes. And usually we use *all* of them together. React has a very handy tool called [Create React App](https://github.com/facebookincubator/create-react-app). With this tool you don't need to configure...
You can start working with react using [create react app](https://github.com/facebookincubator/create-react-app)(along with official [react documentation](https://facebook.github.io/react/)) which will provide you app structure with no build configuration. So there is no need to worry about babel, webpack. you will get...
65,484,212
It looks like if I place a `FlatButton.icon` under the `body` of a `Scaffold`, then its `onPressed` almost never gets called? Are there any bugs associated with `FlatButton.icon`'s `onPressed` call? Following is my **code:** ``` // My main.dart import 'package:flutter/material.dart'; void main() { runApp(MyApp());...
2020/12/28
[ "https://Stackoverflow.com/questions/65484212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6626554/" ]
Try changing the method in `DrawingPanel` from `painting` to `paint`, which will get called when run. `paint` is a method inherited from `JPanel`. Edit: As mentioned by [NomadMaker](https://stackoverflow.com/users/9732672/nomadmaker), use `paintComponent()` not `paint()` here. Read [this](https://stackoverflow.com/que...
You should override paintComponent like so: ``` ... @Override public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D pen = (Graphics2D) g; ... } ``` Also some suggestions: * You can extending `JComponent` instead of `JPanel` (It should work both ways) * You can use `setSize` or `setPr...
65,484,212
It looks like if I place a `FlatButton.icon` under the `body` of a `Scaffold`, then its `onPressed` almost never gets called? Are there any bugs associated with `FlatButton.icon`'s `onPressed` call? Following is my **code:** ``` // My main.dart import 'package:flutter/material.dart'; void main() { runApp(MyApp());...
2020/12/28
[ "https://Stackoverflow.com/questions/65484212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6626554/" ]
Here's what I get after making your code runnable, fixing your `JFrame` method calls and fixing your drawing `JPanel`. [![Image GUI](https://i.stack.imgur.com/BHkI0.png)](https://i.stack.imgur.com/BHkI0.png) Swing applications should always start with a call to the `SwingUtilities` `invokeLater` method. This method e...
You should override paintComponent like so: ``` ... @Override public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D pen = (Graphics2D) g; ... } ``` Also some suggestions: * You can extending `JComponent` instead of `JPanel` (It should work both ways) * You can use `setSize` or `setPr...
14,714,416
I need to make a request to a page on a different domain when a user clicks a link in order to keep the session alive on that domain. I don't care about the response data (except *maybe* the status code so I can make sure the page hasn't gone down). I tried issuing a request via `$.ajax` but the same-origin policy is d...
2013/02/05
[ "https://Stackoverflow.com/questions/14714416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/65387/" ]
You can send request using Image "class": ``` var img = new Image(); img.onerror = img.onload = function() { console.log('Sended') } img.src = "http://google.com?hey=google&rnd=" + Math.random() // random is used to prevent caching ``` But unless response isn't a picture, you'll not get any information about resourc...
This seems to work: ``` $('#myelement').on('click',function() { $('<iframe>', {src:'http://otherdomain.com/page'}).hide().load(function() { $(this).remove(); //clean up the DOM // do stuff }).appendTo('body'); }); ```
67,091,717
Similar: [writing a data.frame using cat](https://stackoverflow.com/questions/25511282/writing-a-data-frame-using-cat) however this is about appending to a file, I want to write a new file. I have a header, and a dataframe which I want to write to a file using cat(): ``` header <- "This is the top row,\n w...
2021/04/14
[ "https://Stackoverflow.com/questions/67091717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7919144/" ]
You can use `cat` with `write.table`. ``` header <- "This is the top row,\n where the header info is.\n" cat(header, file = 'file.txt') write.table(df, 'file.txt', append = TRUE, row.names = FALSE, col.names = FALSE) ```
Give this a crack: ``` cat( paste0( header, paste0( trimws( gsub( "^\\d+", "", capture.output( print( df ) ) ), "left"), collapse = "\n") ), file = "path/to/file.txt", sep = "\n")...
67,091,717
Similar: [writing a data.frame using cat](https://stackoverflow.com/questions/25511282/writing-a-data-frame-using-cat) however this is about appending to a file, I want to write a new file. I have a header, and a dataframe which I want to write to a file using cat(): ``` header <- "This is the top row,\n w...
2021/04/14
[ "https://Stackoverflow.com/questions/67091717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7919144/" ]
Give this a crack: ``` cat( paste0( header, paste0( trimws( gsub( "^\\d+", "", capture.output( print( df ) ) ), "left"), collapse = "\n") ), file = "path/to/file.txt", sep = "\n")...
`kable` can format the data frame and return a vector that `cat` can write to a file. It can also do the desired rounding and alignment. ``` library(knitr) # store the header text as a vector for better spacing header <- c("This is the top row", "where the header info is.") df <- data.frame(val1= runif(3...
67,091,717
Similar: [writing a data.frame using cat](https://stackoverflow.com/questions/25511282/writing-a-data-frame-using-cat) however this is about appending to a file, I want to write a new file. I have a header, and a dataframe which I want to write to a file using cat(): ``` header <- "This is the top row,\n w...
2021/04/14
[ "https://Stackoverflow.com/questions/67091717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7919144/" ]
You can use `cat` with `write.table`. ``` header <- "This is the top row,\n where the header info is.\n" cat(header, file = 'file.txt') write.table(df, 'file.txt', append = TRUE, row.names = FALSE, col.names = FALSE) ```
`kable` can format the data frame and return a vector that `cat` can write to a file. It can also do the desired rounding and alignment. ``` library(knitr) # store the header text as a vector for better spacing header <- c("This is the top row", "where the header info is.") df <- data.frame(val1= runif(3...
1,181,664
I installed Ubuntu 19.04 on an HP Spectre x360 with 4k Oled Display. Many issues I've encountered with the screen (such as not being able to tweak its screen brightness the usual way and instead needing to set it via command line) but now I see that I'm not able to adjust the screen brightness while keeping Night Light...
2019/10/17
[ "https://askubuntu.com/questions/1181664", "https://askubuntu.com", "https://askubuntu.com/users/918140/" ]
I control this using the Gnome Extension Adjust Brightness Icon [![enter image description here](https://i.stack.imgur.com/2oP7o.png)](https://i.stack.imgur.com/2oP7o.png) This places a lightbulb icon on the top bar which, when you click on it adjusts the screen brightness in steps. The cycle is 4 steps; the 4th ste...
Eyesome ======= If you can't solve the problem, I wrote a bash script called [eyesome](https://askubuntu.com/questions/829814/set-initial-startup-background-brightness-depending-on-daytime/887249#887249) that lets you control brightness and color temperature (gamma) at the same time. Additional benefits: * Define thr...
1,181,664
I installed Ubuntu 19.04 on an HP Spectre x360 with 4k Oled Display. Many issues I've encountered with the screen (such as not being able to tweak its screen brightness the usual way and instead needing to set it via command line) but now I see that I'm not able to adjust the screen brightness while keeping Night Light...
2019/10/17
[ "https://askubuntu.com/questions/1181664", "https://askubuntu.com", "https://askubuntu.com/users/918140/" ]
I control this using the Gnome Extension Adjust Brightness Icon [![enter image description here](https://i.stack.imgur.com/2oP7o.png)](https://i.stack.imgur.com/2oP7o.png) This places a lightbulb icon on the top bar which, when you click on it adjusts the screen brightness in steps. The cycle is 4 steps; the 4th ste...
if you look in the app store you will find OLED Dimmer. It works with dell xps 15 7590 and Ubuntu 19.10. I would imagine it would work with your system too but cannot say for sure,
1,181,664
I installed Ubuntu 19.04 on an HP Spectre x360 with 4k Oled Display. Many issues I've encountered with the screen (such as not being able to tweak its screen brightness the usual way and instead needing to set it via command line) but now I see that I'm not able to adjust the screen brightness while keeping Night Light...
2019/10/17
[ "https://askubuntu.com/questions/1181664", "https://askubuntu.com", "https://askubuntu.com/users/918140/" ]
Eyesome ======= If you can't solve the problem, I wrote a bash script called [eyesome](https://askubuntu.com/questions/829814/set-initial-startup-background-brightness-depending-on-daytime/887249#887249) that lets you control brightness and color temperature (gamma) at the same time. Additional benefits: * Define thr...
if you look in the app store you will find OLED Dimmer. It works with dell xps 15 7590 and Ubuntu 19.10. I would imagine it would work with your system too but cannot say for sure,
33,766,296
EDIT 2: I got the solution. Anytime someone wants the code I'd be happy to provide. Peace. Topic: I'm trying an experiment of echoing strings that I receive in my arduino. So this is the code so far: ``` byte byteRead = 0; bool readable = LOW; char fullString[50]; int index = 0; void setup() { Serial.begin(9600);...
2015/11/17
[ "https://Stackoverflow.com/questions/33766296", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5419703/" ]
that's my String Echo ``` #define MAX_BUFFER_SIZE 0xFF char buffer[MAX_BUFFER_SIZE]; void setup() { Serial.begin(115200); buffer[0] = '\0'; } void loop() { while (Serial.available() > 0) { char incomingByte; size_t i = 0; do { incomingByte = Serial.read(); buffer[i++] = incomingByte; ...
You want to echo the string read, so just echo the input. ``` void setup() { Serial.begin(9600); } void loop() { int c = Serial.read(); if (c >= 0) Serial.write(c); } ```
74,300
In [Have any prominent politicians in the West called for Ukraine to surrender territory to Russia?](https://politics.stackexchange.com/questions/74257/have-any-prominent-politicians-in-the-west-called-for-ukraine-to-surrender-terri) user @o.m. states that: > > He is a member of the German parliament for the AfD, a n...
2022/07/18
[ "https://politics.stackexchange.com/questions/74300", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/7434/" ]
There is no official term "Nazi party" in Germany. A right-wing party can be a "subject of extended investigation to verify a suspicion" if it has far-right tendencies. The AfD is such a case [1]: > > **1. The claim filed by AfD to stop BfV from classifying it as a ‘Verdachtsfall’ (subject of extended investigation t...
This seems to be a complicated question, there is no oficial confirmation and deniel as well acording to [this article](https://correctiv.org/faktencheck/2018/04/24/sind-afd-mitglieder-nach-gerichtsbeschluss-alle-nazis/): > > **Are AfD members "all Nazis" according to court order?** > > > The Offenburg district cou...
74,300
In [Have any prominent politicians in the West called for Ukraine to surrender territory to Russia?](https://politics.stackexchange.com/questions/74257/have-any-prominent-politicians-in-the-west-called-for-ukraine-to-surrender-terri) user @o.m. states that: > > He is a member of the German parliament for the AfD, a n...
2022/07/18
[ "https://politics.stackexchange.com/questions/74300", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/7434/" ]
This was about a specific case. A public television program had called Alice Weidel a "Nazi-Schlampe" (which is here translated as Nazi bitch). The court explicitly referred to the context at hand - Weidel had clamoured for an end to "political correctness", and the TV host had replied with the most political uncorrect...
This seems to be a complicated question, there is no oficial confirmation and deniel as well acording to [this article](https://correctiv.org/faktencheck/2018/04/24/sind-afd-mitglieder-nach-gerichtsbeschluss-alle-nazis/): > > **Are AfD members "all Nazis" according to court order?** > > > The Offenburg district cou...
74,300
In [Have any prominent politicians in the West called for Ukraine to surrender territory to Russia?](https://politics.stackexchange.com/questions/74257/have-any-prominent-politicians-in-the-west-called-for-ukraine-to-surrender-terri) user @o.m. states that: > > He is a member of the German parliament for the AfD, a n...
2022/07/18
[ "https://politics.stackexchange.com/questions/74300", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/7434/" ]
This was about a specific case. A public television program had called Alice Weidel a "Nazi-Schlampe" (which is here translated as Nazi bitch). The court explicitly referred to the context at hand - Weidel had clamoured for an end to "political correctness", and the TV host had replied with the most political uncorrect...
There is no official term "Nazi party" in Germany. A right-wing party can be a "subject of extended investigation to verify a suspicion" if it has far-right tendencies. The AfD is such a case [1]: > > **1. The claim filed by AfD to stop BfV from classifying it as a ‘Verdachtsfall’ (subject of extended investigation t...
47,191,412
I have windows 7 64 bit and Python 3.6 I literally dig entire web for solving this - and nothing works sadly. ``` AttributeError Traceback (most recent call last) <ipython-input-150-80ee8bd5f0f2> in <module>() ----> serial.Serial() AttributeError: module 'serial' has no attribute 'Serial'...
2017/11/08
[ "https://Stackoverflow.com/questions/47191412", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7666246/" ]
I had the same problem with Python3 3.6.3.1 installed under Cygwin. I replaced 3.6.3.1 with 3.4.5.1 and the script worked again. OK, but not a good long term solution. Better solution: I reinstalled Python3 3.6.3.1, and then did **"pip install pyserial"**, and then I was able to run my script. No additional modules sh...
There's another python module called 'serial', that you might have on your system. I was using a program that imports the 'serial' module, and on my Linux machine it worked when executed by one user, and failed when executed as another user. When running the program as user2, I got the following traceback: ``` Traceb...
47,191,412
I have windows 7 64 bit and Python 3.6 I literally dig entire web for solving this - and nothing works sadly. ``` AttributeError Traceback (most recent call last) <ipython-input-150-80ee8bd5f0f2> in <module>() ----> serial.Serial() AttributeError: module 'serial' has no attribute 'Serial'...
2017/11/08
[ "https://Stackoverflow.com/questions/47191412", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7666246/" ]
I had the same problem with Python3 3.6.3.1 installed under Cygwin. I replaced 3.6.3.1 with 3.4.5.1 and the script worked again. OK, but not a good long term solution. Better solution: I reinstalled Python3 3.6.3.1, and then did **"pip install pyserial"**, and then I was able to run my script. No additional modules sh...
If you are on a Windows machine using the Windows Subsystem for Linux (WSL), instead of a virtual machine, you will get this error. To fix it, go into `powershell` and enter the command: ``` wsl --shutdown ``` Restarting `powershell`, and running the `pyautogui` script again, worked.
47,191,412
I have windows 7 64 bit and Python 3.6 I literally dig entire web for solving this - and nothing works sadly. ``` AttributeError Traceback (most recent call last) <ipython-input-150-80ee8bd5f0f2> in <module>() ----> serial.Serial() AttributeError: module 'serial' has no attribute 'Serial'...
2017/11/08
[ "https://Stackoverflow.com/questions/47191412", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7666246/" ]
If you are on a Windows machine using the Windows Subsystem for Linux (WSL), instead of a virtual machine, you will get this error. To fix it, go into `powershell` and enter the command: ``` wsl --shutdown ``` Restarting `powershell`, and running the `pyautogui` script again, worked.
There's another python module called 'serial', that you might have on your system. I was using a program that imports the 'serial' module, and on my Linux machine it worked when executed by one user, and failed when executed as another user. When running the program as user2, I got the following traceback: ``` Traceb...
407,833
I'm quite sure I'm missing something obvious, but I can't seem to work out the following problem (web search indicates that it has a solution, but I didn't manage to locate one -- hence the formulation): > > Prove that there exists a surjection $2^{\aleph\_0} \to \aleph\_1$ without using the Axiom of Choice. > > > ...
2013/05/31
[ "https://math.stackexchange.com/questions/407833", "https://math.stackexchange.com", "https://math.stackexchange.com/users/43351/" ]
In what follows, by a "real", I mean a subset of $\omega\times\omega$, that is, a binary relation on $\omega$. (You can start with a bijection $\pi:\mathbb R\to\mathcal P(\omega\times\omega)$, which can be constructed without choice, so this is fine.) If this relation happens to be a well-order of $\omega$ in order ty...
One of my favorite ways is to fix a bijection between $\Bbb N$ and $\Bbb Q$, say $q\_n$ is the $n$th rational. Now we map $A\subseteq\Bbb N$ to $\alpha$ if $\{q\_n\mid n\in A\}$ has order type $\alpha$ (ordered with the usual order of the rationals), and $0$ otherwise. Because every countable ordinal can be embedded ...
69,447,700
I want to add two csv's to one dataframe. The 2 Dataframes are similar but not the same. The Date is about 10 min apart. The length can be diffrent two. I need a left joint but how can I make wehen ther is no data it should be replaced with a zero or a null? out1.csv: ``` date,speed 2021-10-03 02:00:01,5.0 2021-10-03...
2021/10/05
[ "https://Stackoverflow.com/questions/69447700", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14378640/" ]
Formula solution would be: `=SUM(FILTERXML("<y><z>"&SUBSTITUTE(A1,"-","</z><z>")&"</z></y>","//z"))` where `A1` would contain the given text. Side note: this formula `FILTERXML` only works on Windows systems.
This seems to work fine for me. Keep out, your locale might interpret the dot differently: ``` Sub test() Dim s As String s = "0.4-2-10-0.5" a = Split(s, "-") Dim sum As Double sum = 0 For Each t In a sum = sum + CDbl(t) Next t End Sub ```
69,447,700
I want to add two csv's to one dataframe. The 2 Dataframes are similar but not the same. The Date is about 10 min apart. The length can be diffrent two. I need a left joint but how can I make wehen ther is no data it should be replaced with a zero or a null? out1.csv: ``` date,speed 2021-10-03 02:00:01,5.0 2021-10-03...
2021/10/05
[ "https://Stackoverflow.com/questions/69447700", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14378640/" ]
Since you've tagged `Excel 2010`, P.b's `FILTERXML` set-up won't be an option for you. Try: `=SUMPRODUCT(0+TRIM(MID(SUBSTITUTE(A1,"-",REPT(" ",25)),1+25*(ROW(INDEX(A:A,1):INDEX(A:A,1+LEN(A1)-LEN(SUBSTITUTE(A1,"-",""))))-1),25)))`
This seems to work fine for me. Keep out, your locale might interpret the dot differently: ``` Sub test() Dim s As String s = "0.4-2-10-0.5" a = Split(s, "-") Dim sum As Double sum = 0 For Each t In a sum = sum + CDbl(t) Next t End Sub ```
69,447,700
I want to add two csv's to one dataframe. The 2 Dataframes are similar but not the same. The Date is about 10 min apart. The length can be diffrent two. I need a left joint but how can I make wehen ther is no data it should be replaced with a zero or a null? out1.csv: ``` date,speed 2021-10-03 02:00:01,5.0 2021-10-03...
2021/10/05
[ "https://Stackoverflow.com/questions/69447700", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14378640/" ]
Since you've tagged `Excel 2010`, P.b's `FILTERXML` set-up won't be an option for you. Try: `=SUMPRODUCT(0+TRIM(MID(SUBSTITUTE(A1,"-",REPT(" ",25)),1+25*(ROW(INDEX(A:A,1):INDEX(A:A,1+LEN(A1)-LEN(SUBSTITUTE(A1,"-",""))))-1),25)))`
Formula solution would be: `=SUM(FILTERXML("<y><z>"&SUBSTITUTE(A1,"-","</z><z>")&"</z></y>","//z"))` where `A1` would contain the given text. Side note: this formula `FILTERXML` only works on Windows systems.
49,725,238
I need to send my data through stream, So I chose Avro for data serialization and deserialization. But the existing implementation using avro readers, doesn't support backward compatibility. Write serialized data into file and read from file support backward compatibility. How can I achieve backward compatibility, with...
2018/04/09
[ "https://Stackoverflow.com/questions/49725238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6328527/" ]
You may have to define what scope you are looking for backward compatibility. Are you expecting new attributes to be added? OR are you going to remove any attributes? To handle both of these scenarios, there are different options available. As described on the [confluent blog](https://docs.confluent.io/current/avro.ht...
Backward compatibility means that you can encode data with an older schema and the data can still be decoded by a reader that knows the latest schema. [Explanation from Confluent's website](https://docs.confluent.io/current/avro.html#backward-compatibility) So in order to decode Avro data with backward compatibility,...
165,491
``` $ mkdir backup && mv * backup/ mv: cannot move `backup' to a subdirectory of itself, `backup/backup' ``` Works, but issues a warning. Also exit code is 1. How to do it properly (but not [much] longer)?
2010/07/19
[ "https://superuser.com/questions/165491", "https://superuser.com", "https://superuser.com/users/27264/" ]
bash: ``` shopt -s extglob mkdir backup && mv !(backup) backup ```
Also bash, and sh (afaik): ``` $ mkdir .backup && mv * .backup/ && mv .backup backup ```
71,410,420
I am looking to make a query in SQL SERVER that will allow me to display in a grouping the string that appears in most cases. Not the amount, not the maximum, but the string that is displayed in most cases: | colA | colB | colC | | --- | --- | --- | | A | 10 | ccc | | A | 20 | aaa | | A | 35 | bbb | | A | 25 | aaa | |...
2022/03/09
[ "https://Stackoverflow.com/questions/71410420", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17019046/" ]
The simplest way is to calculate a `ROW_NUMBER` or a `DENSE_RANK` on the COUNT of records per ColA & ColC. A `DENSE_RANK = 1` could show more than 1 top if there's a tie. > > > ``` > SELECT > ColA > , TotalColB AS Total > , ColC AS Lable > FROM > ( > SELECT ColA, ColC > , TotalColB = SUM(SUM(ColB)) OVER (PAR...
Here is another way to do it ``` select t.ColA, sum(t.total) as ColB, max(s2.ColC) from ( select s.ColA, s.ColC, sum(ColB) as total, count(1) as numbers from strings s group by s.ColA, s.ColC ) t outer apply ( select top 1 ...
10,204,213
I have some html content with apostrophe inside a div, It renders correctly in all other browsers other than IE. You will get a clear idea from the screen-shot On other browsers ![enter image description here](https://i.stack.imgur.com/YimfO.png) On IE ![enter image description here](https://i.stack.imgur.com/HLWH...
2012/04/18
[ "https://Stackoverflow.com/questions/10204213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1125792/" ]
use this > > > ``` > [arrname replaceObjectAtIndex:1 withObject:[NSNumber numberWithInt:13]];//13 is the age you want to change > > ``` > >
Supposing your `NSMutableArray` consists of `NSMutableDictionary` objects, **try something like this :** ``` NSMutableDictionary* entry = [entries objectAtIndex:index]; [entry setValue:@"newAge" forKey:@"Age"]; ```
10,204,213
I have some html content with apostrophe inside a div, It renders correctly in all other browsers other than IE. You will get a clear idea from the screen-shot On other browsers ![enter image description here](https://i.stack.imgur.com/YimfO.png) On IE ![enter image description here](https://i.stack.imgur.com/HLWH...
2012/04/18
[ "https://Stackoverflow.com/questions/10204213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1125792/" ]
``` Person *person = (Person *)[myArray objectAtIndex:1]; person.age = 2; ``` Assuming `Person` is your custom object stored in the array
Supposing your `NSMutableArray` consists of `NSMutableDictionary` objects, **try something like this :** ``` NSMutableDictionary* entry = [entries objectAtIndex:index]; [entry setValue:@"newAge" forKey:@"Age"]; ```
10,204,213
I have some html content with apostrophe inside a div, It renders correctly in all other browsers other than IE. You will get a clear idea from the screen-shot On other browsers ![enter image description here](https://i.stack.imgur.com/YimfO.png) On IE ![enter image description here](https://i.stack.imgur.com/HLWH...
2012/04/18
[ "https://Stackoverflow.com/questions/10204213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1125792/" ]
try this ``` -insertObject:atIndex: or replaceObjectAtIndex:withObject: ```
Supposing your `NSMutableArray` consists of `NSMutableDictionary` objects, **try something like this :** ``` NSMutableDictionary* entry = [entries objectAtIndex:index]; [entry setValue:@"newAge" forKey:@"Age"]; ```
10,204,213
I have some html content with apostrophe inside a div, It renders correctly in all other browsers other than IE. You will get a clear idea from the screen-shot On other browsers ![enter image description here](https://i.stack.imgur.com/YimfO.png) On IE ![enter image description here](https://i.stack.imgur.com/HLWH...
2012/04/18
[ "https://Stackoverflow.com/questions/10204213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1125792/" ]
You should use `NSMutableDictionary` to save name,age,phone,address and add this dictionary to your array. ``` [[arry objectAtIndex:1] setObject:@"value" forKey:@"key"]; ``` Like this you can change value.
Supposing your `NSMutableArray` consists of `NSMutableDictionary` objects, **try something like this :** ``` NSMutableDictionary* entry = [entries objectAtIndex:index]; [entry setValue:@"newAge" forKey:@"Age"]; ```
10,204,213
I have some html content with apostrophe inside a div, It renders correctly in all other browsers other than IE. You will get a clear idea from the screen-shot On other browsers ![enter image description here](https://i.stack.imgur.com/YimfO.png) On IE ![enter image description here](https://i.stack.imgur.com/HLWH...
2012/04/18
[ "https://Stackoverflow.com/questions/10204213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1125792/" ]
Perhaps this will help you. ``` - (void)viewDidLoad { [super viewDidLoad]; productArray=[[NSMutableArray alloc]init]; PersonDetail *personObj = [[PersonDetail alloc] init]; personObj.firstName = @"Adeem"; personObj.lastName = @"Basraa"; personObj.phoneNumber = @"123456789"; [productArray addObject:personObj]; [perso...
Supposing your `NSMutableArray` consists of `NSMutableDictionary` objects, **try something like this :** ``` NSMutableDictionary* entry = [entries objectAtIndex:index]; [entry setValue:@"newAge" forKey:@"Age"]; ```
10,204,213
I have some html content with apostrophe inside a div, It renders correctly in all other browsers other than IE. You will get a clear idea from the screen-shot On other browsers ![enter image description here](https://i.stack.imgur.com/YimfO.png) On IE ![enter image description here](https://i.stack.imgur.com/HLWH...
2012/04/18
[ "https://Stackoverflow.com/questions/10204213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1125792/" ]
``` Person *person = (Person *)[myArray objectAtIndex:1]; person.age = 2; ``` Assuming `Person` is your custom object stored in the array
use this > > > ``` > [arrname replaceObjectAtIndex:1 withObject:[NSNumber numberWithInt:13]];//13 is the age you want to change > > ``` > >
10,204,213
I have some html content with apostrophe inside a div, It renders correctly in all other browsers other than IE. You will get a clear idea from the screen-shot On other browsers ![enter image description here](https://i.stack.imgur.com/YimfO.png) On IE ![enter image description here](https://i.stack.imgur.com/HLWH...
2012/04/18
[ "https://Stackoverflow.com/questions/10204213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1125792/" ]
``` Person *person = (Person *)[myArray objectAtIndex:1]; person.age = 2; ``` Assuming `Person` is your custom object stored in the array
try this ``` -insertObject:atIndex: or replaceObjectAtIndex:withObject: ```
10,204,213
I have some html content with apostrophe inside a div, It renders correctly in all other browsers other than IE. You will get a clear idea from the screen-shot On other browsers ![enter image description here](https://i.stack.imgur.com/YimfO.png) On IE ![enter image description here](https://i.stack.imgur.com/HLWH...
2012/04/18
[ "https://Stackoverflow.com/questions/10204213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1125792/" ]
``` Person *person = (Person *)[myArray objectAtIndex:1]; person.age = 2; ``` Assuming `Person` is your custom object stored in the array
You should use `NSMutableDictionary` to save name,age,phone,address and add this dictionary to your array. ``` [[arry objectAtIndex:1] setObject:@"value" forKey:@"key"]; ``` Like this you can change value.
10,204,213
I have some html content with apostrophe inside a div, It renders correctly in all other browsers other than IE. You will get a clear idea from the screen-shot On other browsers ![enter image description here](https://i.stack.imgur.com/YimfO.png) On IE ![enter image description here](https://i.stack.imgur.com/HLWH...
2012/04/18
[ "https://Stackoverflow.com/questions/10204213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1125792/" ]
``` Person *person = (Person *)[myArray objectAtIndex:1]; person.age = 2; ``` Assuming `Person` is your custom object stored in the array
Perhaps this will help you. ``` - (void)viewDidLoad { [super viewDidLoad]; productArray=[[NSMutableArray alloc]init]; PersonDetail *personObj = [[PersonDetail alloc] init]; personObj.firstName = @"Adeem"; personObj.lastName = @"Basraa"; personObj.phoneNumber = @"123456789"; [productArray addObject:personObj]; [perso...
14,042,594
I have table as below ``` create table myTable (id int, col1 varchar(20), col2 varchar(20), col3 varchar(20), col4 varchar(20), col5 varchar(20), col6 varchar(20), col7 varchar(20), ...
2012/12/26
[ "https://Stackoverflow.com/questions/14042594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1066828/" ]
If you are using Castle Windsor 3.0 or newer, you can use lazy resolving. See [What's new in Windsor 3 for more details](https://github.com/castleproject/Windsor/blob/master/docs/whats-new-3.0.md). Registration process changes a bit (new component loader must be registered). After that, you are just registering com...
In general, you can do that with the [Typed Factory Facility](https://github.com/castleproject/Windsor/blob/master/docs/typed-factory-facility.md). In a nutshell, when you resolve the component that uses those services, instead of giving it an email or sms service, you give it a **factory** that can create them (which...
14,042,594
I have table as below ``` create table myTable (id int, col1 varchar(20), col2 varchar(20), col3 varchar(20), col4 varchar(20), col5 varchar(20), col6 varchar(20), col7 varchar(20), ...
2012/12/26
[ "https://Stackoverflow.com/questions/14042594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1066828/" ]
If you are using Castle Windsor 3.0 or newer, you can use lazy resolving. See [What's new in Windsor 3 for more details](https://github.com/castleproject/Windsor/blob/master/docs/whats-new-3.0.md). Registration process changes a bit (new component loader must be registered). After that, you are just registering com...
Just an example to simplify (based on Marcin Deptuła answer) ``` // activate Lazy initialization feature for all Components .Register(Component.For<ILazyComponentLoader>().ImplementedBy<LazyOfTComponentLoader>()) // register rest of component(s) .Register(Component.For<IIssueRepository>().ImplementedBy<IssueRepo...
14,042,594
I have table as below ``` create table myTable (id int, col1 varchar(20), col2 varchar(20), col3 varchar(20), col4 varchar(20), col5 varchar(20), col6 varchar(20), col7 varchar(20), ...
2012/12/26
[ "https://Stackoverflow.com/questions/14042594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1066828/" ]
Just an example to simplify (based on Marcin Deptuła answer) ``` // activate Lazy initialization feature for all Components .Register(Component.For<ILazyComponentLoader>().ImplementedBy<LazyOfTComponentLoader>()) // register rest of component(s) .Register(Component.For<IIssueRepository>().ImplementedBy<IssueRepo...
In general, you can do that with the [Typed Factory Facility](https://github.com/castleproject/Windsor/blob/master/docs/typed-factory-facility.md). In a nutshell, when you resolve the component that uses those services, instead of giving it an email or sms service, you give it a **factory** that can create them (which...
4,284,805
If a and b a positive real numbers find the maximum value of ax+by in terms of a and b given that $x^2+y^2 \le 1$. I started by letting $k = ax+by$ giving the line $y=\frac{-ax}{b} + \frac{k}{b}$. Now we want to find the largest value of k such that the line still intersects the unit circle. Graphically it can be seen...
2021/10/23
[ "https://math.stackexchange.com/questions/4284805", "https://math.stackexchange.com", "https://math.stackexchange.com/users/981015/" ]
Applying Cauchy-Schwarz Inequality $$(ax+by)^2\leq (a^2+b^2)(x^2+y^2)\leq (a^2+b^2) \times 1 =(a^2+b^2)$$ $$ax+by \leq \sqrt{a^2+b^2}$$
I think your question is equivalent to proving the tangent of a circle always intersects the radius at a 90 degree angle. You can find the full proof here: [How to prove that the tangent to a circle is perpendicular to the radius drawn to the point of contact?](https://math.stackexchange.com/questions/158955/how-to-pr...
4,284,805
If a and b a positive real numbers find the maximum value of ax+by in terms of a and b given that $x^2+y^2 \le 1$. I started by letting $k = ax+by$ giving the line $y=\frac{-ax}{b} + \frac{k}{b}$. Now we want to find the largest value of k such that the line still intersects the unit circle. Graphically it can be seen...
2021/10/23
[ "https://math.stackexchange.com/questions/4284805", "https://math.stackexchange.com", "https://math.stackexchange.com/users/981015/" ]
The right triangle you are looking at has one vertex $A$ at the origin, another vertex $B$ at the point $(0, k/b)$, and the third vertex $C$ (a right angle) at the point of tangency between the line and the circle. You've established two of the side lengths of this triangle. The third side length, call it $L$, satisfie...
I think your question is equivalent to proving the tangent of a circle always intersects the radius at a 90 degree angle. You can find the full proof here: [How to prove that the tangent to a circle is perpendicular to the radius drawn to the point of contact?](https://math.stackexchange.com/questions/158955/how-to-pr...
130,389
I'm not looking for a plug and play method like BEST in R but rather a mathematical explanation of what are some Bayesian methods I can use to test the difference between the mean of two samples.
2014/12/26
[ "https://stats.stackexchange.com/questions/130389", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/61501/" ]
With a Bayesian analysis you have more things to specify (that is actually a good thing, since it gives much more flexibility and ability to model what you believe the truth to be). Are you assuming normals for the likelihoods? Will the 2 groups have the same variance? One straight forward approach is to model the 2 m...
> > a mathematical explanation of what are some Bayesian methods I can use to test the difference between the mean of two samples. > > > There are several approaches to "testing" this. I'll mention a couple: * If you want an explicit *decision* you could look at decision theory. * A pretty simple thing that's som...
130,389
I'm not looking for a plug and play method like BEST in R but rather a mathematical explanation of what are some Bayesian methods I can use to test the difference between the mean of two samples.
2014/12/26
[ "https://stats.stackexchange.com/questions/130389", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/61501/" ]
This is a good question, that seems to pop up a lot: [link 1](https://stats.stackexchange.com/questions/15777/what-is-the-bayesian-counterpart-to-a-two-sample-t-test-with-unequal-variances/47240#47240), [link 2](https://stats.stackexchange.com/questions/104932/bayesian-alternative-or-complement-to-the-student-t-test). ...
With a Bayesian analysis you have more things to specify (that is actually a good thing, since it gives much more flexibility and ability to model what you believe the truth to be). Are you assuming normals for the likelihoods? Will the 2 groups have the same variance? One straight forward approach is to model the 2 m...
130,389
I'm not looking for a plug and play method like BEST in R but rather a mathematical explanation of what are some Bayesian methods I can use to test the difference between the mean of two samples.
2014/12/26
[ "https://stats.stackexchange.com/questions/130389", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/61501/" ]
The excellent answer by user1068430 implemented in Python ```py import numpy as np from pylab import plt def dnorm(x, mu, sig): return 1/(sig * np.sqrt(2 * np.pi)) * np.exp(-(x - mu)**2 / (2 * sig**2)) def dexp(x, l): return l * np.exp(- l*x) def like(parameters): [mu1, sig1, mu2, sig2] = parameters ...
With a Bayesian analysis you have more things to specify (that is actually a good thing, since it gives much more flexibility and ability to model what you believe the truth to be). Are you assuming normals for the likelihoods? Will the 2 groups have the same variance? One straight forward approach is to model the 2 m...
130,389
I'm not looking for a plug and play method like BEST in R but rather a mathematical explanation of what are some Bayesian methods I can use to test the difference between the mean of two samples.
2014/12/26
[ "https://stats.stackexchange.com/questions/130389", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/61501/" ]
This is a good question, that seems to pop up a lot: [link 1](https://stats.stackexchange.com/questions/15777/what-is-the-bayesian-counterpart-to-a-two-sample-t-test-with-unequal-variances/47240#47240), [link 2](https://stats.stackexchange.com/questions/104932/bayesian-alternative-or-complement-to-the-student-t-test). ...
> > a mathematical explanation of what are some Bayesian methods I can use to test the difference between the mean of two samples. > > > There are several approaches to "testing" this. I'll mention a couple: * If you want an explicit *decision* you could look at decision theory. * A pretty simple thing that's som...
130,389
I'm not looking for a plug and play method like BEST in R but rather a mathematical explanation of what are some Bayesian methods I can use to test the difference between the mean of two samples.
2014/12/26
[ "https://stats.stackexchange.com/questions/130389", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/61501/" ]
The excellent answer by user1068430 implemented in Python ```py import numpy as np from pylab import plt def dnorm(x, mu, sig): return 1/(sig * np.sqrt(2 * np.pi)) * np.exp(-(x - mu)**2 / (2 * sig**2)) def dexp(x, l): return l * np.exp(- l*x) def like(parameters): [mu1, sig1, mu2, sig2] = parameters ...
> > a mathematical explanation of what are some Bayesian methods I can use to test the difference between the mean of two samples. > > > There are several approaches to "testing" this. I'll mention a couple: * If you want an explicit *decision* you could look at decision theory. * A pretty simple thing that's som...
130,389
I'm not looking for a plug and play method like BEST in R but rather a mathematical explanation of what are some Bayesian methods I can use to test the difference between the mean of two samples.
2014/12/26
[ "https://stats.stackexchange.com/questions/130389", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/61501/" ]
This is a good question, that seems to pop up a lot: [link 1](https://stats.stackexchange.com/questions/15777/what-is-the-bayesian-counterpart-to-a-two-sample-t-test-with-unequal-variances/47240#47240), [link 2](https://stats.stackexchange.com/questions/104932/bayesian-alternative-or-complement-to-the-student-t-test). ...
The excellent answer by user1068430 implemented in Python ```py import numpy as np from pylab import plt def dnorm(x, mu, sig): return 1/(sig * np.sqrt(2 * np.pi)) * np.exp(-(x - mu)**2 / (2 * sig**2)) def dexp(x, l): return l * np.exp(- l*x) def like(parameters): [mu1, sig1, mu2, sig2] = parameters ...
3,127,238
How do I convert java.util.Map[String, Object] to scala.collection.immutable.Map[String, Any], so that all values in the original map (integers, booleans etc.) are converted to the right value to work well in Scala.
2010/06/27
[ "https://Stackoverflow.com/questions/3127238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/129750/" ]
As VonC says, `scala.collections.JavaConversion` supports mutable collections only, but you don't have to use a separate library. Mutable collections are derived from `TraversableOnce` which defines a `toMap` method that returns an immutable Map: ``` import scala.collection.JavaConversions._ val m = new java.util.Has...
The **[`JavaConversions`](http://www.scala-lang.org/archives/rc-api/scala/collection/JavaConversions$.html)** package of Scala2.8 deals only with mutable collections. The [**scalaj-collection**](http://github.com/scalaj/scalaj-collection) library might help here. ``` java.util.Map[A, B] #asScala: scala.collecti...
3,127,238
How do I convert java.util.Map[String, Object] to scala.collection.immutable.Map[String, Any], so that all values in the original map (integers, booleans etc.) are converted to the right value to work well in Scala.
2010/06/27
[ "https://Stackoverflow.com/questions/3127238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/129750/" ]
As VonC says, `scala.collections.JavaConversion` supports mutable collections only, but you don't have to use a separate library. Mutable collections are derived from `TraversableOnce` which defines a `toMap` method that returns an immutable Map: ``` import scala.collection.JavaConversions._ val m = new java.util.Has...
In order to convert convert java.util.Map[String, Object] to scala.collection.immutable.Map[String,Object] , you need to simple import below statement in Scala Project and clean build. ``` import collection.JavaConversions._ ``` Refer to below code: ``` var empMap= Map[String.Object]() var emp= new Employee(empMap)...
12,357,170
For learning purposes I'm building a simple messaging program that I think can work with local storage. Another question about 2 dimensional arrays is in the comments. ``` <!DOCTYPE HTML> <html>      <head>              <title>waGwan?</title>              <meta charset="utf-8"/> ...
2012/09/10
[ "https://Stackoverflow.com/questions/12357170", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1656125/" ]
It looks like there are hacks and workarounds that get you part way there but for what you're trying to do you need a fully working solution so it looks like **you can't** which is too bad, I love a good hack :) Edit: future readers should read the comments for a full discussion.
One idea is to save the current date at the start of the program, to a variable that is nil until it is first set. Then you have the date when the app is first run. You may also check the date of the Documents folder which is created when the App is downloaded. If you store this date as a user preference variable the...
24,436,274
I am studying the implementation of `strtok` and have a question. On this line, `s [-1] = 0`, I don't understand how `tok` is limited to the first token since we had previously assigned it everything contained in `s`. ``` char *strtok(char *s, const char *delim) { static char *last; return strtok_r(s, delim, ...
2014/06/26
[ "https://Stackoverflow.com/questions/24436274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3780071/" ]
`tok` was not previously assigned "everything contained in `s`". It was set to point to the same address as the address in `s`. The `s[-1] = 0;` line is equivalent to `*(s - 1) = '\0';`, which sets the location just before where `s` is pointing to zero. By setting that location to zero, returning the current value of...
There are two ways to reach the statement `return(tok);`. One way is that at the point where `tok = s;` occurs, `s` contains none of the delimiter characters (contents of `delim`). That means `s` is a single token. The `for` loop ends when `c == 0`, that is, at the null byte at the end of `s`, and `strtok_r` returns `t...
24,436,274
I am studying the implementation of `strtok` and have a question. On this line, `s [-1] = 0`, I don't understand how `tok` is limited to the first token since we had previously assigned it everything contained in `s`. ``` char *strtok(char *s, const char *delim) { static char *last; return strtok_r(s, delim, ...
2014/06/26
[ "https://Stackoverflow.com/questions/24436274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3780071/" ]
This took much more space than I anticipated when I started, but I think it offers a useful explanation along with the others. (it became more of a mission really) **NOTE:** This combination of `strtok` and `strtok_r` attempt to provide a reentrant implementation of the usual `strtok` from `string.h` by saving the add...
There are two ways to reach the statement `return(tok);`. One way is that at the point where `tok = s;` occurs, `s` contains none of the delimiter characters (contents of `delim`). That means `s` is a single token. The `for` loop ends when `c == 0`, that is, at the null byte at the end of `s`, and `strtok_r` returns `t...
16,351,743
How to format MySQL query date to this format? Current my variable is getting this 08/13/2013 but in my database is 2013-08-13. ``` $sql_stmt = "select * from abs where myname = 'david' and date between '$start' and '$end' order by log_id;"; ```
2013/05/03
[ "https://Stackoverflow.com/questions/16351743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2010278/" ]
Try: ``` $sql_stmt = "select * from abs where myname = 'david' and date between STR_TO_DATE('$start', '%m/%d/%Y') and STR_TO_DATE('$end', '%m/%d/%Y') order by log_id;"; ```
see the examples in the date format section [HERE](https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-format) UPDATE you can format it almost anyway, check this [**SQLFIDDLE**](http://sqlfiddle.com/#!2/ac953/2)
16,351,743
How to format MySQL query date to this format? Current my variable is getting this 08/13/2013 but in my database is 2013-08-13. ``` $sql_stmt = "select * from abs where myname = 'david' and date between '$start' and '$end' order by log_id;"; ```
2013/05/03
[ "https://Stackoverflow.com/questions/16351743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2010278/" ]
Try: ``` $sql_stmt = "select * from abs where myname = 'david' and date between STR_TO_DATE('$start', '%m/%d/%Y') and STR_TO_DATE('$end', '%m/%d/%Y') order by log_id;"; ```
you can convert the output string into variable date format and then compare it. ``` $sql_stmt = "select *,DATE_FORMAT(date, '%d/%c/%Y') as date1 from abs where myname = 'david' and date1 between '$start' and '$end' order by log_id;"; ```
16,351,743
How to format MySQL query date to this format? Current my variable is getting this 08/13/2013 but in my database is 2013-08-13. ``` $sql_stmt = "select * from abs where myname = 'david' and date between '$start' and '$end' order by log_id;"; ```
2013/05/03
[ "https://Stackoverflow.com/questions/16351743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2010278/" ]
Try: ``` $sql_stmt = "select * from abs where myname = 'david' and date between STR_TO_DATE('$start', '%m/%d/%Y') and STR_TO_DATE('$end', '%m/%d/%Y') order by log_id;"; ```
We have ``` mysql> SELECT DATE_FORMAT('1997-10-04 22:23:00', '%W %M %Y'); -> 'Saturday October 1997' ``` and we can possibly adapt your solution to ``` $sql_stmt = "select * from abs where myname = 'david' and DATE_FORMAT(date, '%W %M %Y') between STR_TO_DATE('$start', '%m/%d/%Y') ...
22,707,906
I need to export packages deployed in SSISDB by any means to make it automated; so a command line, C# or T-SQL would be fine. I don't want the manual way used by Visual Studio. Thanks
2014/03/28
[ "https://Stackoverflow.com/questions/22707906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1901545/" ]
I finally got it. Use stored procedure in SSISDB "catalog.get\_project" which will return project\_stream. Save it to a file with ".zip" extension and extract the packages from it. This is because [as per Microsoft documentation](http://download.microsoft.com/download/1/7/5/175A7833-6F75-418D-8800-86D44D1D712D/%5BMS-I...
IsDeploymentWizard is a good option. You can see parameter usage by typing ``` IsDeploymentWizard -h ``` on the command line.
571,928
Because space is a delimiter when parsing macro names, I got used to ending macros in running text with `{}` like in `text \foobar{} text`, because I find the escaped space in `text \foobar\ text` disturbing. Sometimes this habit spills over into math mode. Obviously ``` \[ \sum{}^{...} \] ``` does not work as i...
2020/11/22
[ "https://tex.stackexchange.com/questions/571928", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/85123/" ]
TeX creates math list which is (roughly speaking) a sequence of atoms, each atom has nucleus+subscript+superscript. Each part of the atom can be empty. The sequence of atoms are converted to the definite `\hboxes` (raised or lowered) in the second pas of scanning math mode material. First example `\sum{}^a` creates fi...
In the first version, `\sum` and `{}^{...}` are independent of each other. The second is typeset the same way, independently of `\sum`. The result of `\[ \sum{}^{a}\qquad {}^{a} \]`: [![enter image description here](https://i.stack.imgur.com/JhFWR.png)](https://i.stack.imgur.com/JhFWR.png) In the second version, the ...
571,928
Because space is a delimiter when parsing macro names, I got used to ending macros in running text with `{}` like in `text \foobar{} text`, because I find the escaped space in `text \foobar\ text` disturbing. Sometimes this habit spills over into math mode. Obviously ``` \[ \sum{}^{...} \] ``` does not work as i...
2020/11/22
[ "https://tex.stackexchange.com/questions/571928", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/85123/" ]
TeX creates math list which is (roughly speaking) a sequence of atoms, each atom has nucleus+subscript+superscript. Each part of the atom can be empty. The sequence of atoms are converted to the definite `\hboxes` (raised or lowered) in the second pas of scanning math mode material. First example `\sum{}^a` creates fi...
The technical reason is that, in math mode, `{}` is a math atom and is not something that gets discarded. It's generally not a good idea to define macros to stand for text, because this reduces readability of the code, but in some occasions some macro that's not to be followed by arguments has to be used. The typical ...
4,999,851
I'm trying to inflate an custom alertdialog and encountered something strange. ``` layout = inflater.inflate(R.layout.call_or_sms_dialog,(ViewGroup)findViewById(R.id.contacts)); ``` The inflate() method takes 2 argument, the resource to be inflated and the optional view to be the parent of the generated dialog. My p...
2011/02/15
[ "https://Stackoverflow.com/questions/4999851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/584187/" ]
> > > > > > "contacts" is a xml file that contains the controls for this particular activity > > > > > > > > > If it's an XML, you cannot access it by using `R.id`; but something like `R.xml` or `R.layout`. Of course, if you are using `findViewById` you must pass a valid id (something referenced by `R.id`). S...
The second argument is meant to be an existing view, not the root view of the layout you are inflating. Is this the problem? You can always just pass `null` as the second argument.
4,999,851
I'm trying to inflate an custom alertdialog and encountered something strange. ``` layout = inflater.inflate(R.layout.call_or_sms_dialog,(ViewGroup)findViewById(R.id.contacts)); ``` The inflate() method takes 2 argument, the resource to be inflated and the optional view to be the parent of the generated dialog. My p...
2011/02/15
[ "https://Stackoverflow.com/questions/4999851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/584187/" ]
> > > > > > "contacts" is a xml file that contains the controls for this particular activity > > > > > > > > > If it's an XML, you cannot access it by using `R.id`; but something like `R.xml` or `R.layout`. Of course, if you are using `findViewById` you must pass a valid id (something referenced by `R.id`). S...
``` Please try this code: LayoutInflater inflater = LayoutInflater.from(this); AlertDialog alertDialog = new AlertDialog.Builder(this).create(); alertDialog.setTitle("SET YOUR TITLE"); View view = inflater.inflate(R.layout.call_or_sms_dialog, null); v = (ViewGroup)findViewById(R.id.contacts); alertDialog.setView...
4,999,851
I'm trying to inflate an custom alertdialog and encountered something strange. ``` layout = inflater.inflate(R.layout.call_or_sms_dialog,(ViewGroup)findViewById(R.id.contacts)); ``` The inflate() method takes 2 argument, the resource to be inflated and the optional view to be the parent of the generated dialog. My p...
2011/02/15
[ "https://Stackoverflow.com/questions/4999851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/584187/" ]
``` Please try this code: LayoutInflater inflater = LayoutInflater.from(this); AlertDialog alertDialog = new AlertDialog.Builder(this).create(); alertDialog.setTitle("SET YOUR TITLE"); View view = inflater.inflate(R.layout.call_or_sms_dialog, null); v = (ViewGroup)findViewById(R.id.contacts); alertDialog.setView...
The second argument is meant to be an existing view, not the root view of the layout you are inflating. Is this the problem? You can always just pass `null` as the second argument.
256,223
A friend of mine got her iPhone stolen. When entering iCloud to activate the "Find my iPhone" feature, I see that her account has 3 phones associated with it. The 3 phones are named: * Iphone * Iphone * (Name)'s Iphone. How can I know which is her current one? Her previous models are a iPhone 4S, an iPhone 5 and an i...
2016/10/06
[ "https://apple.stackexchange.com/questions/256223", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/36725/" ]
It's too late now to identify the iPhone. This must be done **prior** to losing the device, when you're able to provide a name for it. Find iPhone doesn't list the specific device. To name the device, go to `Settings -> General -> About` and in the **Name** field enter a specific device name (for example, 'PaulJ's iPh...
Thanks everybody for your answers. In the end, as usual, I found the answer in the most stupid way possible: I went to the "Settings" section in iCloud.com, and in "My devices", it shows the currently backed up devices. The iPhone that shows up there is the "(name)'s iPhone" one. (It hasn't appeared yet, though :-( ).
256,223
A friend of mine got her iPhone stolen. When entering iCloud to activate the "Find my iPhone" feature, I see that her account has 3 phones associated with it. The 3 phones are named: * Iphone * Iphone * (Name)'s Iphone. How can I know which is her current one? Her previous models are a iPhone 4S, an iPhone 5 and an i...
2016/10/06
[ "https://apple.stackexchange.com/questions/256223", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/36725/" ]
If you load the image of your device in "Find My iPhone" in a new tab, you are able to get the model identifier ID from the URL. As an example, here's the URL for an iPad that I lost quite a while ago: ``` https://statici.icloud.com/fmipmobile/deviceImages-9.0/iPad/iPad2,1/locked-nolocation_ipad.png ``` I wasn't sur...
It's too late now to identify the iPhone. This must be done **prior** to losing the device, when you're able to provide a name for it. Find iPhone doesn't list the specific device. To name the device, go to `Settings -> General -> About` and in the **Name** field enter a specific device name (for example, 'PaulJ's iPh...
256,223
A friend of mine got her iPhone stolen. When entering iCloud to activate the "Find my iPhone" feature, I see that her account has 3 phones associated with it. The 3 phones are named: * Iphone * Iphone * (Name)'s Iphone. How can I know which is her current one? Her previous models are a iPhone 4S, an iPhone 5 and an i...
2016/10/06
[ "https://apple.stackexchange.com/questions/256223", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/36725/" ]
Out of curiosity I logged into my account to see if there was any way of differentiating. Other than the iPad and the Mac mini, they are remarkably difficult to tell apart. This is further compounded by the name issue. That said, in the below image, the top iPhone is a 7, the next one is a 5, the next one is a 5s, the...
Thanks everybody for your answers. In the end, as usual, I found the answer in the most stupid way possible: I went to the "Settings" section in iCloud.com, and in "My devices", it shows the currently backed up devices. The iPhone that shows up there is the "(name)'s iPhone" one. (It hasn't appeared yet, though :-( ).
256,223
A friend of mine got her iPhone stolen. When entering iCloud to activate the "Find my iPhone" feature, I see that her account has 3 phones associated with it. The 3 phones are named: * Iphone * Iphone * (Name)'s Iphone. How can I know which is her current one? Her previous models are a iPhone 4S, an iPhone 5 and an i...
2016/10/06
[ "https://apple.stackexchange.com/questions/256223", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/36725/" ]
If you load the image of your device in "Find My iPhone" in a new tab, you are able to get the model identifier ID from the URL. As an example, here's the URL for an iPad that I lost quite a while ago: ``` https://statici.icloud.com/fmipmobile/deviceImages-9.0/iPad/iPad2,1/locked-nolocation_ipad.png ``` I wasn't sur...
Out of curiosity I logged into my account to see if there was any way of differentiating. Other than the iPad and the Mac mini, they are remarkably difficult to tell apart. This is further compounded by the name issue. That said, in the below image, the top iPhone is a 7, the next one is a 5, the next one is a 5s, the...
256,223
A friend of mine got her iPhone stolen. When entering iCloud to activate the "Find my iPhone" feature, I see that her account has 3 phones associated with it. The 3 phones are named: * Iphone * Iphone * (Name)'s Iphone. How can I know which is her current one? Her previous models are a iPhone 4S, an iPhone 5 and an i...
2016/10/06
[ "https://apple.stackexchange.com/questions/256223", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/36725/" ]
If you load the image of your device in "Find My iPhone" in a new tab, you are able to get the model identifier ID from the URL. As an example, here's the URL for an iPad that I lost quite a while ago: ``` https://statici.icloud.com/fmipmobile/deviceImages-9.0/iPad/iPad2,1/locked-nolocation_ipad.png ``` I wasn't sur...
Thanks everybody for your answers. In the end, as usual, I found the answer in the most stupid way possible: I went to the "Settings" section in iCloud.com, and in "My devices", it shows the currently backed up devices. The iPhone that shows up there is the "(name)'s iPhone" one. (It hasn't appeared yet, though :-( ).
33,230,600
I'm a nub scripter and am trying to write a really simple script to taskkill 2 programs and then uninstall 1 of them. I wrote it in Powershell and stuck it in SCCM for deployment...however every time I deploy it, it's not running the last line to uninstall the program. Here's the code: ```js # Closing Outlook ins...
2015/10/20
[ "https://Stackoverflow.com/questions/33230600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4310432/" ]
You may try this ``` SELECT * FROM T1, T2 WHERE REGEXP_REPLACE(T2.Name_Status, '^(.+?)_(.+?)ed$', '\1') = T1.name AND REGEXP_REPLACE(T2.Name_Status, '^(.+?)_(.+?)ed$', '\2') = T1.status ```
This would work out fine ``` SELECT name_status FROM(SELECT * FROM tbl1, tbl2 WHERE tbl2.name_status REGEXP concat(tbl1.name,"_",tbl1.status)) as temp ```
898,328
![enter image description here](https://i.stack.imgur.com/Ia731.gif) Imagine two similiar circles. We rotate one on half of the other circumference. It gives a sphere with volume of $1/2(2πr) \cdot πr^2 = π^2r^3$
2014/08/15
[ "https://math.stackexchange.com/questions/898328", "https://math.stackexchange.com", "https://math.stackexchange.com/users/122210/" ]
The problem is that the points closer to the center line of the circle don't move a distance of $2\pi r$ when the circle is rotated $2\pi$ radians. Rather a point at distance $h$ from the center line moves a distance of $2\pi h$. Now at distance $h$ the length of the rotating segment parallel to the center line is $2\s...
It is only the top of the semicircle that travels $2\pi$, That gives a contribution to the volume of $2\pi$ times the area of the top. Other parts of the semicircle - near the diameter - travel much shorter distances, so contribute smaller multiples of their area to the volume.
898,328
![enter image description here](https://i.stack.imgur.com/Ia731.gif) Imagine two similiar circles. We rotate one on half of the other circumference. It gives a sphere with volume of $1/2(2πr) \cdot πr^2 = π^2r^3$
2014/08/15
[ "https://math.stackexchange.com/questions/898328", "https://math.stackexchange.com", "https://math.stackexchange.com/users/122210/" ]
It is only the top of the semicircle that travels $2\pi$, That gives a contribution to the volume of $2\pi$ times the area of the top. Other parts of the semicircle - near the diameter - travel much shorter distances, so contribute smaller multiples of their area to the volume.
For a more general view, any dimension, it turns out that the easy way to find the volume of higher dimensional spheres, including the one in $\mathbb R^3,$ is by adding two to the dimension and using polar coordinates. Given that the $n$-volume of the sphere of radius $R$ in $\mathbb R^n$ is $$ \omega\_n R^n, $$ the e...
898,328
![enter image description here](https://i.stack.imgur.com/Ia731.gif) Imagine two similiar circles. We rotate one on half of the other circumference. It gives a sphere with volume of $1/2(2πr) \cdot πr^2 = π^2r^3$
2014/08/15
[ "https://math.stackexchange.com/questions/898328", "https://math.stackexchange.com", "https://math.stackexchange.com/users/122210/" ]
The problem is that the points closer to the center line of the circle don't move a distance of $2\pi r$ when the circle is rotated $2\pi$ radians. Rather a point at distance $h$ from the center line moves a distance of $2\pi h$. Now at distance $h$ the length of the rotating segment parallel to the center line is $2\s...
For a more general view, any dimension, it turns out that the easy way to find the volume of higher dimensional spheres, including the one in $\mathbb R^3,$ is by adding two to the dimension and using polar coordinates. Given that the $n$-volume of the sphere of radius $R$ in $\mathbb R^n$ is $$ \omega\_n R^n, $$ the e...