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
1,351,356
Firstly, is this explanation on how DNS works right? When we visit a site, say (www.example.com),we are doing a lookup to convert the domain name to an i.p address. So, our computer first looks at its internal DNS to see if the host name is there. If the host name is not there, it goes to the root name servers(.). Now...
2018/08/22
[ "https://superuser.com/questions/1351356", "https://superuser.com", "https://superuser.com/users/925242/" ]
> > My question is, for example.com, the authoritative name server would be the com server right? > > > No. Let `dig` it: ``` # dig example.com SOA ;; ANSWER SECTION: example.com. 3600 IN SOA sns.dns.icann.org. noc.dns.icann.org. 2018080109 7200 3600 1209600 3600 ;; AUTHORITY SECTION: e...
Mostly correct, but you've left out caching which is critical. The first time you set up a simple caching only server, the only records it knows about are the `root hints` - this points to the root servers. If you ask for `example.com` the root servers will tell which server to query for records in the `.com` - those ...
29,772,481
I am new to the FIX world. I am writing an application processing FIX messages in Java and for that I am using QuickFIX/J. I have downloaded the DataDictionary from the homepage (<http://quickfixengine.org/>). I am using the version 4.4. In the XML-file exist groups and components. But a component can contain groups a...
2015/04/21
[ "https://Stackoverflow.com/questions/29772481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2438518/" ]
Components aren't really... things. They're like macros in the FIX DataDictionary (DD). Many messages need the same set of fields, so instead of specifying the same fields in every message, the DD defines a component that other messages can include. A Group, on the other hand, is a very real thing. It's a repeating se...
From the [FIXWiki for Components](http://fixwiki.org/fixwiki/Category:Component): > > Component blocks are sets of related data fields grouped together and are referenced by the component block name in messages that they are used in. Sometimes they are referred to as "Groups". > > > Component blocks are practical...
29,772,481
I am new to the FIX world. I am writing an application processing FIX messages in Java and for that I am using QuickFIX/J. I have downloaded the DataDictionary from the homepage (<http://quickfixengine.org/>). I am using the version 4.4. In the XML-file exist groups and components. But a component can contain groups a...
2015/04/21
[ "https://Stackoverflow.com/questions/29772481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2438518/" ]
From the [FIXWiki for Components](http://fixwiki.org/fixwiki/Category:Component): > > Component blocks are sets of related data fields grouped together and are referenced by the component block name in messages that they are used in. Sometimes they are referred to as "Groups". > > > Component blocks are practical...
Just going to add some information since the accepted answer is missing this information (probably due to the fact that it is about five years old now). In QuickFIX/J you are actually able to get and set components. So you can for example simply copy the `Instrument` component from one message to another. ```java ...
29,772,481
I am new to the FIX world. I am writing an application processing FIX messages in Java and for that I am using QuickFIX/J. I have downloaded the DataDictionary from the homepage (<http://quickfixengine.org/>). I am using the version 4.4. In the XML-file exist groups and components. But a component can contain groups a...
2015/04/21
[ "https://Stackoverflow.com/questions/29772481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2438518/" ]
Components aren't really... things. They're like macros in the FIX DataDictionary (DD). Many messages need the same set of fields, so instead of specifying the same fields in every message, the DD defines a component that other messages can include. A Group, on the other hand, is a very real thing. It's a repeating se...
Just going to add some information since the accepted answer is missing this information (probably due to the fact that it is about five years old now). In QuickFIX/J you are actually able to get and set components. So you can for example simply copy the `Instrument` component from one message to another. ```java ...
38,967,439
I am figuring out a command to copy files that are modified on a Saturday. ``` find -type f -printf '%Ta\t%p\n' ``` This way the line starts with the weekday. When I combine this with a 'egrep' command using a regular expression (starts with "za") it shows only the files which start with "za". ``` find -type f ...
2016/08/16
[ "https://Stackoverflow.com/questions/38967439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6720336/" ]
The immediate problem is that `-printf` and `-exec` are independent of each other. You want to process the result of `-printf` to decide whether or not to actually run the `-exec` part. Also, of course, passing an expression in single quotes simply passes a static string, and does not evaluate the expression in any way...
What you can do is a shell expansion. Something like ``` cp $(find -type f -printf '%Ta\t%p\n' | egrep "^(za)") $DEST_DIR ``` Assuming that the result of your `find` and `grep` is just the filenames (and full paths, at that), this will copy all the files that match your criteria to whatever you set `$DEST_DIR` to. ...
82,449
Okay, I just asked a [question](https://worldbuilding.stackexchange.com/questions/82436/would-humankind-remain-the-dominat-species-in-a-world-with-twice-as-big-animals), in which mother nature transformed all animals (or brain containing living beings, if that fits better for you) into a being twice as big in order for...
2017/06/01
[ "https://worldbuilding.stackexchange.com/questions/82449", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/38611/" ]
I'm going to be a contrarian on this one. Hypothetically, if the point is to wipe out humans, would we even be capable of using animals for agricultural work? Without machinery, farming for large populations becomes difficult to sustain. While we could always hunt for meat, plowing is EXTREMELY energetically intensiv...
Well honestly if even normal animals had been organized to attack humans(even without doubling size) then humans would already have been wipedout. So, if "mother nature" is trying to destroy humans in such a roundabout way(I mean it should be able to kill us all in a thousand different ways), then I can only assume tha...
82,449
Okay, I just asked a [question](https://worldbuilding.stackexchange.com/questions/82436/would-humankind-remain-the-dominat-species-in-a-world-with-twice-as-big-animals), in which mother nature transformed all animals (or brain containing living beings, if that fits better for you) into a being twice as big in order for...
2017/06/01
[ "https://worldbuilding.stackexchange.com/questions/82449", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/38611/" ]
Well honestly if even normal animals had been organized to attack humans(even without doubling size) then humans would already have been wipedout. So, if "mother nature" is trying to destroy humans in such a roundabout way(I mean it should be able to kill us all in a thousand different ways), then I can only assume tha...
Pretty sure this will be closed soon. So I'll try to help you. First, you really can't just double the sized of animals and have them move or even exist the same way. As you pointed out their volume goes up with the cube while their surface area only goes up with the square. This is a big deal for energy exchange. Also...
82,449
Okay, I just asked a [question](https://worldbuilding.stackexchange.com/questions/82436/would-humankind-remain-the-dominat-species-in-a-world-with-twice-as-big-animals), in which mother nature transformed all animals (or brain containing living beings, if that fits better for you) into a being twice as big in order for...
2017/06/01
[ "https://worldbuilding.stackexchange.com/questions/82449", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/38611/" ]
I'm going to be a contrarian on this one. Hypothetically, if the point is to wipe out humans, would we even be capable of using animals for agricultural work? Without machinery, farming for large populations becomes difficult to sustain. While we could always hunt for meat, plowing is EXTREMELY energetically intensiv...
Are animals that are 2x bigger actually more dangerous? (not really) (Blatantly copying my answer to a similar question) This analysis assumes that all the organs of the animals are scaled evenly in all directions. **There is something called the square cube law.** There are many good things that grow with the squ...
82,449
Okay, I just asked a [question](https://worldbuilding.stackexchange.com/questions/82436/would-humankind-remain-the-dominat-species-in-a-world-with-twice-as-big-animals), in which mother nature transformed all animals (or brain containing living beings, if that fits better for you) into a being twice as big in order for...
2017/06/01
[ "https://worldbuilding.stackexchange.com/questions/82449", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/38611/" ]
Unless the animals are magically guided to specifically attack human beings, no way. Specifically, humans already did this once, about 12 thousand years ago. The giant ground sloths, giant rodents, regular lions and tigers on the American continent were systematically wiped out for practical or culinary reasons in the...
Well honestly if even normal animals had been organized to attack humans(even without doubling size) then humans would already have been wipedout. So, if "mother nature" is trying to destroy humans in such a roundabout way(I mean it should be able to kill us all in a thousand different ways), then I can only assume tha...
82,449
Okay, I just asked a [question](https://worldbuilding.stackexchange.com/questions/82436/would-humankind-remain-the-dominat-species-in-a-world-with-twice-as-big-animals), in which mother nature transformed all animals (or brain containing living beings, if that fits better for you) into a being twice as big in order for...
2017/06/01
[ "https://worldbuilding.stackexchange.com/questions/82449", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/38611/" ]
Unless the animals are magically guided to specifically attack human beings, no way. Specifically, humans already did this once, about 12 thousand years ago. The giant ground sloths, giant rodents, regular lions and tigers on the American continent were systematically wiped out for practical or culinary reasons in the...
Possibly Yes. ============= Discussion ========== ### Technology I'll begin with a rough list of [various technological achievements](https://en.wikipedia.org/wiki/Timeline_of_historic_inventions#1st_millennium_BC) by 1 AD: 1. The Great Wall of China had already been constructed in whole (by ~100BCE) and part (by ~...
82,449
Okay, I just asked a [question](https://worldbuilding.stackexchange.com/questions/82436/would-humankind-remain-the-dominat-species-in-a-world-with-twice-as-big-animals), in which mother nature transformed all animals (or brain containing living beings, if that fits better for you) into a being twice as big in order for...
2017/06/01
[ "https://worldbuilding.stackexchange.com/questions/82449", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/38611/" ]
Unless the animals are magically guided to specifically attack human beings, no way. Specifically, humans already did this once, about 12 thousand years ago. The giant ground sloths, giant rodents, regular lions and tigers on the American continent were systematically wiped out for practical or culinary reasons in the...
Are animals that are 2x bigger actually more dangerous? (not really) (Blatantly copying my answer to a similar question) This analysis assumes that all the organs of the animals are scaled evenly in all directions. **There is something called the square cube law.** There are many good things that grow with the squ...
82,449
Okay, I just asked a [question](https://worldbuilding.stackexchange.com/questions/82436/would-humankind-remain-the-dominat-species-in-a-world-with-twice-as-big-animals), in which mother nature transformed all animals (or brain containing living beings, if that fits better for you) into a being twice as big in order for...
2017/06/01
[ "https://worldbuilding.stackexchange.com/questions/82449", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/38611/" ]
Possibly Yes. ============= Discussion ========== ### Technology I'll begin with a rough list of [various technological achievements](https://en.wikipedia.org/wiki/Timeline_of_historic_inventions#1st_millennium_BC) by 1 AD: 1. The Great Wall of China had already been constructed in whole (by ~100BCE) and part (by ~...
Are animals that are 2x bigger actually more dangerous? (not really) (Blatantly copying my answer to a similar question) This analysis assumes that all the organs of the animals are scaled evenly in all directions. **There is something called the square cube law.** There are many good things that grow with the squ...
82,449
Okay, I just asked a [question](https://worldbuilding.stackexchange.com/questions/82436/would-humankind-remain-the-dominat-species-in-a-world-with-twice-as-big-animals), in which mother nature transformed all animals (or brain containing living beings, if that fits better for you) into a being twice as big in order for...
2017/06/01
[ "https://worldbuilding.stackexchange.com/questions/82449", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/38611/" ]
Possibly Yes. ============= Discussion ========== ### Technology I'll begin with a rough list of [various technological achievements](https://en.wikipedia.org/wiki/Timeline_of_historic_inventions#1st_millennium_BC) by 1 AD: 1. The Great Wall of China had already been constructed in whole (by ~100BCE) and part (by ~...
Pretty sure this will be closed soon. So I'll try to help you. First, you really can't just double the sized of animals and have them move or even exist the same way. As you pointed out their volume goes up with the cube while their surface area only goes up with the square. This is a big deal for energy exchange. Also...
82,449
Okay, I just asked a [question](https://worldbuilding.stackexchange.com/questions/82436/would-humankind-remain-the-dominat-species-in-a-world-with-twice-as-big-animals), in which mother nature transformed all animals (or brain containing living beings, if that fits better for you) into a being twice as big in order for...
2017/06/01
[ "https://worldbuilding.stackexchange.com/questions/82449", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/38611/" ]
Unless the animals are magically guided to specifically attack human beings, no way. Specifically, humans already did this once, about 12 thousand years ago. The giant ground sloths, giant rodents, regular lions and tigers on the American continent were systematically wiped out for practical or culinary reasons in the...
Pretty sure this will be closed soon. So I'll try to help you. First, you really can't just double the sized of animals and have them move or even exist the same way. As you pointed out their volume goes up with the cube while their surface area only goes up with the square. This is a big deal for energy exchange. Also...
82,449
Okay, I just asked a [question](https://worldbuilding.stackexchange.com/questions/82436/would-humankind-remain-the-dominat-species-in-a-world-with-twice-as-big-animals), in which mother nature transformed all animals (or brain containing living beings, if that fits better for you) into a being twice as big in order for...
2017/06/01
[ "https://worldbuilding.stackexchange.com/questions/82449", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/38611/" ]
I'm going to be a contrarian on this one. Hypothetically, if the point is to wipe out humans, would we even be capable of using animals for agricultural work? Without machinery, farming for large populations becomes difficult to sustain. While we could always hunt for meat, plowing is EXTREMELY energetically intensiv...
Pretty sure this will be closed soon. So I'll try to help you. First, you really can't just double the sized of animals and have them move or even exist the same way. As you pointed out their volume goes up with the cube while their surface area only goes up with the square. This is a big deal for energy exchange. Also...
47,306,791
[![](https://i.stack.imgur.com/DUo2y.png)](https://i.stack.imgur.com/DUo2y.png) I want to transpose this table which has only 1 row with client id and the response columns as response1, response2 and so on. I tried with pivot but not able to apply correctly
2017/11/15
[ "https://Stackoverflow.com/questions/47306791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5524614/" ]
Try this: ``` IF OBJECT_ID('tempdb..#DataSource') IS NOT NULL BEGIN DROP TABLE #DataSource; END; CREATE TABLE #DataSource ( [ClientID] INT ,[Response] VARCHAR(24) ); INSERT INTO #DataSource ([ClientID], [Response]) VALUES (3316, 'omellette') ,(3316, 'mmer') ,(3316, 'joy') ,(3316, 'gift')...
Try this : this can be achieve by using `[STUFF](https://learn.microsoft.com/en-us/sql/t-sql/functions/stuff-transact-sql)` ``` SELECT CLientID , STUFF(( SELECT N', ' + CAST(Response AS VARCHAR(4000)) FROM TableName t2 WHERE t1.CLientID= t2.CLientID FOR XML PATH ('')), 1, 2, '') AS Response FROM Tab...
47,306,791
[![](https://i.stack.imgur.com/DUo2y.png)](https://i.stack.imgur.com/DUo2y.png) I want to transpose this table which has only 1 row with client id and the response columns as response1, response2 and so on. I tried with pivot but not able to apply correctly
2017/11/15
[ "https://Stackoverflow.com/questions/47306791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5524614/" ]
Try this: ``` IF OBJECT_ID('tempdb..#DataSource') IS NOT NULL BEGIN DROP TABLE #DataSource; END; CREATE TABLE #DataSource ( [ClientID] INT ,[Response] VARCHAR(24) ); INSERT INTO #DataSource ([ClientID], [Response]) VALUES (3316, 'omellette') ,(3316, 'mmer') ,(3316, 'joy') ,(3316, 'gift')...
``` CREATE TABLE #table ( ClientID INT, Response VARCHAR(20) ); INSERT INTO #table (ClientID, Response) VALUES (3316, 'omellette'), (3316, 'mmer'), (3316, 'joy'), (3316, 'gift'), (3316, 'strong'), (3316, 'rrailores'), (3316, 'something else'); select * from #table ;with cte...
10,563
The scenario is as follows: * There are clients that users can access and work with. * These clients can be online or offline. * There is a central database on a server, holding all the authorization data. * The clients each hold a mirror of a part of the central database. * At regular intervals, the client go online ...
2012/01/11
[ "https://security.stackexchange.com/questions/10563", "https://security.stackexchange.com", "https://security.stackexchange.com/users/6879/" ]
Are these (local and central) databases holding authorization or authentication data (or both)? Your question refers to it using both ways. But, whichever it is, if the database is local and the user (or, equivalently, a process running as that user) has to be able to read it (e.g. to check that they have valid authen...
I should say two things: 1- This is not a good model if users have strong enough incentive to access the data they are not supposed to have access to (since it looks like they have all the data but the client software prevents them from "seeing" all of it based on the permissions defined in the database) 2- If you mu...
2,614,088
i have this CSS code: ``` h1 { font-size:22px; color:#341C12; font-weight:normal; font-style:italic; } .h1color h1{ color:#862E06; } ``` and this HTML Code ``` <h1>News <span class="h1color">&amp; events</span></h1> ``` but its not working. want i want to do is have the first h1 text to be co...
2010/04/10
[ "https://Stackoverflow.com/questions/2614088", "https://Stackoverflow.com", "https://Stackoverflow.com/users/190420/" ]
This: ``` .h1color h1{ ``` Should be: ``` h1 .h1color { ``` The order is `parent child`, if you always just have 1 span, you could also leave out the class, and do: ``` h1 span { ```
The [descendant selector](http://www.w3.org/TR/CSS2/selector.html#descendant-selectors) `.h1color h1` selects all `h1` elements that are descendants of an element with the class *h1color*. But you need all elements with the class *h1color* that are descendants of an `h1` element. So just change the order of the select...
4,200
So there is a debate about how to edit ellipses in posts on the site. This has come to a head [in this latest post](https://english.stackexchange.com/questions/129353/is-on-one-hand-on-the-other-hand-a-cliche-to-be-avoided). Here is what needs to be decided as an official policy so that we don't end up with edit wars/...
2013/09/30
[ "https://english.meta.stackexchange.com/questions/4200", "https://english.meta.stackexchange.com", "https://english.meta.stackexchange.com/users/8360/" ]
Personally I could live with any of 1,2 or (preferably) 5. Expecting people to use symbols that are not easily available on all keyboards and setups seems unnecessarily complex and, which is more, will simply be ignored by the vast majority of users. If I had to choose, I would go for 5. While I appreciate correct pun...
Unfortunately, typography and ease of use are at odds here, plus different style guides and typographers disagree about the details. The one thing that nearly everyone agrees on is that there should be **some** extra space between the dots, and it should **never** break across lines. The exact amount of space varies a...
4,200
So there is a debate about how to edit ellipses in posts on the site. This has come to a head [in this latest post](https://english.stackexchange.com/questions/129353/is-on-one-hand-on-the-other-hand-a-cliche-to-be-avoided). Here is what needs to be decided as an official policy so that we don't end up with edit wars/...
2013/09/30
[ "https://english.meta.stackexchange.com/questions/4200", "https://english.meta.stackexchange.com", "https://english.meta.stackexchange.com/users/8360/" ]
Personally I could live with any of 1,2 or (preferably) 5. Expecting people to use symbols that are not easily available on all keyboards and setups seems unnecessarily complex and, which is more, will simply be ignored by the vast majority of users. If I had to choose, I would go for 5. While I appreciate correct pun...
If I can restrain myself from editing out the first word in all those ELU questions starting with a redundant ***So*** ([like](https://english.stackexchange.com/questions/129380/) [these](https://english.stackexchange.com/questions/128106/) [three](https://english.stackexchange.com/questions/127868/)), I see no reason ...
4,200
So there is a debate about how to edit ellipses in posts on the site. This has come to a head [in this latest post](https://english.stackexchange.com/questions/129353/is-on-one-hand-on-the-other-hand-a-cliche-to-be-avoided). Here is what needs to be decided as an official policy so that we don't end up with edit wars/...
2013/09/30
[ "https://english.meta.stackexchange.com/questions/4200", "https://english.meta.stackexchange.com", "https://english.meta.stackexchange.com/users/8360/" ]
Personally I could live with any of 1,2 or (preferably) 5. Expecting people to use symbols that are not easily available on all keyboards and setups seems unnecessarily complex and, which is more, will simply be ignored by the vast majority of users. If I had to choose, I would go for 5. While I appreciate correct pun...
I really wish people would read [this posting](https://english.stackexchange.com/a/105064/2085) — which I hereunder quote in full. --- This is in [Bringhurst](https://english.stackexchange.com/a/91654/2085). To quote from the other posting’s citation, since nobody else seems to think this is a duplicate but me, I poi...
4,200
So there is a debate about how to edit ellipses in posts on the site. This has come to a head [in this latest post](https://english.stackexchange.com/questions/129353/is-on-one-hand-on-the-other-hand-a-cliche-to-be-avoided). Here is what needs to be decided as an official policy so that we don't end up with edit wars/...
2013/09/30
[ "https://english.meta.stackexchange.com/questions/4200", "https://english.meta.stackexchange.com", "https://english.meta.stackexchange.com/users/8360/" ]
Unfortunately, typography and ease of use are at odds here, plus different style guides and typographers disagree about the details. The one thing that nearly everyone agrees on is that there should be **some** extra space between the dots, and it should **never** break across lines. The exact amount of space varies a...
If I can restrain myself from editing out the first word in all those ELU questions starting with a redundant ***So*** ([like](https://english.stackexchange.com/questions/129380/) [these](https://english.stackexchange.com/questions/128106/) [three](https://english.stackexchange.com/questions/127868/)), I see no reason ...
4,200
So there is a debate about how to edit ellipses in posts on the site. This has come to a head [in this latest post](https://english.stackexchange.com/questions/129353/is-on-one-hand-on-the-other-hand-a-cliche-to-be-avoided). Here is what needs to be decided as an official policy so that we don't end up with edit wars/...
2013/09/30
[ "https://english.meta.stackexchange.com/questions/4200", "https://english.meta.stackexchange.com", "https://english.meta.stackexchange.com/users/8360/" ]
The only possible correct answer ***for a site policy*** is option 5: let the poster decide, and leave it the [expletive deleted] alone. Edit wars like in the linked example are laughable. It's an ellipsis in an internet post, folks, not a government ID number on a tax return. If you encounter a post where someone us...
Unfortunately, typography and ease of use are at odds here, plus different style guides and typographers disagree about the details. The one thing that nearly everyone agrees on is that there should be **some** extra space between the dots, and it should **never** break across lines. The exact amount of space varies a...
4,200
So there is a debate about how to edit ellipses in posts on the site. This has come to a head [in this latest post](https://english.stackexchange.com/questions/129353/is-on-one-hand-on-the-other-hand-a-cliche-to-be-avoided). Here is what needs to be decided as an official policy so that we don't end up with edit wars/...
2013/09/30
[ "https://english.meta.stackexchange.com/questions/4200", "https://english.meta.stackexchange.com", "https://english.meta.stackexchange.com/users/8360/" ]
The only possible correct answer ***for a site policy*** is option 5: let the poster decide, and leave it the [expletive deleted] alone. Edit wars like in the linked example are laughable. It's an ellipsis in an internet post, folks, not a government ID number on a tax return. If you encounter a post where someone us...
If I can restrain myself from editing out the first word in all those ELU questions starting with a redundant ***So*** ([like](https://english.stackexchange.com/questions/129380/) [these](https://english.stackexchange.com/questions/128106/) [three](https://english.stackexchange.com/questions/127868/)), I see no reason ...
4,200
So there is a debate about how to edit ellipses in posts on the site. This has come to a head [in this latest post](https://english.stackexchange.com/questions/129353/is-on-one-hand-on-the-other-hand-a-cliche-to-be-avoided). Here is what needs to be decided as an official policy so that we don't end up with edit wars/...
2013/09/30
[ "https://english.meta.stackexchange.com/questions/4200", "https://english.meta.stackexchange.com", "https://english.meta.stackexchange.com/users/8360/" ]
I really wish people would read [this posting](https://english.stackexchange.com/a/105064/2085) — which I hereunder quote in full. --- This is in [Bringhurst](https://english.stackexchange.com/a/91654/2085). To quote from the other posting’s citation, since nobody else seems to think this is a duplicate but me, I poi...
If I can restrain myself from editing out the first word in all those ELU questions starting with a redundant ***So*** ([like](https://english.stackexchange.com/questions/129380/) [these](https://english.stackexchange.com/questions/128106/) [three](https://english.stackexchange.com/questions/127868/)), I see no reason ...
4,200
So there is a debate about how to edit ellipses in posts on the site. This has come to a head [in this latest post](https://english.stackexchange.com/questions/129353/is-on-one-hand-on-the-other-hand-a-cliche-to-be-avoided). Here is what needs to be decided as an official policy so that we don't end up with edit wars/...
2013/09/30
[ "https://english.meta.stackexchange.com/questions/4200", "https://english.meta.stackexchange.com", "https://english.meta.stackexchange.com/users/8360/" ]
The only possible correct answer ***for a site policy*** is option 5: let the poster decide, and leave it the [expletive deleted] alone. Edit wars like in the linked example are laughable. It's an ellipsis in an internet post, folks, not a government ID number on a tax return. If you encounter a post where someone us...
I really wish people would read [this posting](https://english.stackexchange.com/a/105064/2085) — which I hereunder quote in full. --- This is in [Bringhurst](https://english.stackexchange.com/a/91654/2085). To quote from the other posting’s citation, since nobody else seems to think this is a duplicate but me, I poi...
50,602,291
I am getting error response correctly when I am running the project in my end. ``` { "timestamp": "2018-05-30T10:16:00.065+0000", "status": 500, "error": "Internal Server Error", "message": "No login found for username :string", "path": "/gatepass/api/v1/logins/login" } ``` But when I deploy on server It autom...
2018/05/30
[ "https://Stackoverflow.com/questions/50602291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9025494/" ]
That looks like your server (Tomcat) or your Web Application has a default 500 error page that is being applied.
This is fixed by creating a default error page such that the tomcat does not direct to error HTML page
50,602,291
I am getting error response correctly when I am running the project in my end. ``` { "timestamp": "2018-05-30T10:16:00.065+0000", "status": 500, "error": "Internal Server Error", "message": "No login found for username :string", "path": "/gatepass/api/v1/logins/login" } ``` But when I deploy on server It autom...
2018/05/30
[ "https://Stackoverflow.com/questions/50602291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9025494/" ]
i think it may helps , ``` @RequestMapping(value = "/userAuthenticationDemo",method = RequestMethod.GET , produces="application/json") public ResponseEntity<?> userAuthenticationDemo(@RequestParam("username") String username, @RequestParam("password") String password, ) { System.out.println("Authenticatio...
This is fixed by creating a default error page such that the tomcat does not direct to error HTML page
53,239,688
1) I created User Class with **make:user** command: [Console image](https://i.stack.imgur.com/kg3Ne.png) 2) I generated migration file with **make:migration** command. 3) Here is the up() function in migration file: ``` final class Version20181110133851 extends AbstractMigration { public function ...
2018/11/10
[ "https://Stackoverflow.com/questions/53239688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10633075/" ]
Why your function is slow: you use variables and (more importantly) a loop. Loops are slow. Variables also mean reads from and writes to those variables. ``` CREATE OR REPLACE FUNCTION generate_date_series_2(starts_on DATE, ends_on DATE, frequency INTERVAL) RETURNS SETOF DATE AS $BODY$ SELECT (starts_o...
**REVISED SOLUTION** This gives me 97,212 rows in under 7 seconds (approx 0.7ms per row) and also supports `leap-years` where February have 29 days: ``` SELECT t.day_of_month FROM ( SELECT ds.day_of_month , date_part('day', ds.day_of_month) AS day ...
53,239,688
1) I created User Class with **make:user** command: [Console image](https://i.stack.imgur.com/kg3Ne.png) 2) I generated migration file with **make:migration** command. 3) Here is the up() function in migration file: ``` final class Version20181110133851 extends AbstractMigration { public function ...
2018/11/10
[ "https://Stackoverflow.com/questions/53239688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10633075/" ]
**REVISED SOLUTION** This gives me 97,212 rows in under 7 seconds (approx 0.7ms per row) and also supports `leap-years` where February have 29 days: ``` SELECT t.day_of_month FROM ( SELECT ds.day_of_month , date_part('day', ds.day_of_month) AS day ...
Simple solution: ``` SELECT '2000-01-31'::DATE + ('1 MONTH'::INTERVAL)*x FROM generate_series(0,100) x; ``` **Drawback:** Since generate\_series() parameters are integers, you need to calculate them. **Massive advantage:** generate\_series() gives correct row count estimates to the optimizer when its parameters a...
53,239,688
1) I created User Class with **make:user** command: [Console image](https://i.stack.imgur.com/kg3Ne.png) 2) I generated migration file with **make:migration** command. 3) Here is the up() function in migration file: ``` final class Version20181110133851 extends AbstractMigration { public function ...
2018/11/10
[ "https://Stackoverflow.com/questions/53239688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10633075/" ]
Why your function is slow: you use variables and (more importantly) a loop. Loops are slow. Variables also mean reads from and writes to those variables. ``` CREATE OR REPLACE FUNCTION generate_date_series_2(starts_on DATE, ends_on DATE, frequency INTERVAL) RETURNS SETOF DATE AS $BODY$ SELECT (starts_o...
You may use `date_trunc` and add a month to the output of`generate_series`, the performance should be almost similar. ``` SELECT (date_trunc('month', dt) + INTERVAL '1 MONTH - 1 day') ::DATE AS frequency FROM generate_series( DATE '2018-01-31', DATE '2018-05-31', interval '1 MONTH' ) AS dt ``` [**...
53,239,688
1) I created User Class with **make:user** command: [Console image](https://i.stack.imgur.com/kg3Ne.png) 2) I generated migration file with **make:migration** command. 3) Here is the up() function in migration file: ``` final class Version20181110133851 extends AbstractMigration { public function ...
2018/11/10
[ "https://Stackoverflow.com/questions/53239688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10633075/" ]
You may use `date_trunc` and add a month to the output of`generate_series`, the performance should be almost similar. ``` SELECT (date_trunc('month', dt) + INTERVAL '1 MONTH - 1 day') ::DATE AS frequency FROM generate_series( DATE '2018-01-31', DATE '2018-05-31', interval '1 MONTH' ) AS dt ``` [**...
Simple solution: ``` SELECT '2000-01-31'::DATE + ('1 MONTH'::INTERVAL)*x FROM generate_series(0,100) x; ``` **Drawback:** Since generate\_series() parameters are integers, you need to calculate them. **Massive advantage:** generate\_series() gives correct row count estimates to the optimizer when its parameters a...
53,239,688
1) I created User Class with **make:user** command: [Console image](https://i.stack.imgur.com/kg3Ne.png) 2) I generated migration file with **make:migration** command. 3) Here is the up() function in migration file: ``` final class Version20181110133851 extends AbstractMigration { public function ...
2018/11/10
[ "https://Stackoverflow.com/questions/53239688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10633075/" ]
Why your function is slow: you use variables and (more importantly) a loop. Loops are slow. Variables also mean reads from and writes to those variables. ``` CREATE OR REPLACE FUNCTION generate_date_series_2(starts_on DATE, ends_on DATE, frequency INTERVAL) RETURNS SETOF DATE AS $BODY$ SELECT (starts_o...
Simple solution: ``` SELECT '2000-01-31'::DATE + ('1 MONTH'::INTERVAL)*x FROM generate_series(0,100) x; ``` **Drawback:** Since generate\_series() parameters are integers, you need to calculate them. **Massive advantage:** generate\_series() gives correct row count estimates to the optimizer when its parameters a...
11,347
My firm is looking for an out-of-the-box database system to store and query high-frequency tick data. What are the best options? It seems that kdb+ is the market leader in this field.
2014/05/18
[ "https://quant.stackexchange.com/questions/11347", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/8090/" ]
An alternative is the [TeaFiles file format](https://teafiles.codeplex.com/). It's simple and boasts a high performance but I believe you'll have to reinvent some wheels.
kdb+ seems to be the leader but their programming language is a pain really. Personally I use a HDF5. It is a No-SQL database. It integrates very nicely with python. I have been very happy with it so far.
11,347
My firm is looking for an out-of-the-box database system to store and query high-frequency tick data. What are the best options? It seems that kdb+ is the market leader in this field.
2014/05/18
[ "https://quant.stackexchange.com/questions/11347", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/8090/" ]
An alternative is the [TeaFiles file format](https://teafiles.codeplex.com/). It's simple and boasts a high performance but I believe you'll have to reinvent some wheels.
velocity analytics might be a choice.
11,347
My firm is looking for an out-of-the-box database system to store and query high-frequency tick data. What are the best options? It seems that kdb+ is the market leader in this field.
2014/05/18
[ "https://quant.stackexchange.com/questions/11347", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/8090/" ]
kdb+ seems to be the leader but their programming language is a pain really. Personally I use a HDF5. It is a No-SQL database. It integrates very nicely with python. I have been very happy with it so far.
velocity analytics might be a choice.
71,104,009
I want to get the total number of users in my Firebase Firestore collection. I can get it easily by writing this code: ``` const [totalUsers, setTotalUsers] = useState(0); const [newUsers, setNewUsers] = useState(0); useEffect(() => { firebase.firestore().collection("Users").get().then((querySnapshot) => { ...
2022/02/13
[ "https://Stackoverflow.com/questions/71104009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15197645/" ]
You've moved the count operation **into** a loop, which is not needed. Instead, just add the condition to your read operation and keep the rest the same: ``` useEffect(() => { firebase.firestore().collection("Users").where("usersID","!=","101010").get().then((querySnapshot) => { const TotalUsers = querySnapshot...
Firestore has just launched a native COUNT function which is very cost-efficient. Please refer to the official [documentation](https://firebase.google.com/docs/firestore/solutions/aggregation) for more information. You can also refer to this [blog](https://cloud.google.com/blog/products/databases/aggregating-data-with-...
71,104,009
I want to get the total number of users in my Firebase Firestore collection. I can get it easily by writing this code: ``` const [totalUsers, setTotalUsers] = useState(0); const [newUsers, setNewUsers] = useState(0); useEffect(() => { firebase.firestore().collection("Users").get().then((querySnapshot) => { ...
2022/02/13
[ "https://Stackoverflow.com/questions/71104009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15197645/" ]
You've moved the count operation **into** a loop, which is not needed. Instead, just add the condition to your read operation and keep the rest the same: ``` useEffect(() => { firebase.firestore().collection("Users").where("usersID","!=","101010").get().then((querySnapshot) => { const TotalUsers = querySnapshot...
Further to @Chaitra's answer. Using this code below will give you a count of documents with a query. ``` import { collection, Firestore, getCountFromServer, query, where } from '@angular/fire/firestore'; {... totalUsers: any; constructor( private fs: Firestore ){} onInit() { this.getUserCount() }...
71,104,009
I want to get the total number of users in my Firebase Firestore collection. I can get it easily by writing this code: ``` const [totalUsers, setTotalUsers] = useState(0); const [newUsers, setNewUsers] = useState(0); useEffect(() => { firebase.firestore().collection("Users").get().then((querySnapshot) => { ...
2022/02/13
[ "https://Stackoverflow.com/questions/71104009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15197645/" ]
Firestore has just launched a native COUNT function which is very cost-efficient. Please refer to the official [documentation](https://firebase.google.com/docs/firestore/solutions/aggregation) for more information. You can also refer to this [blog](https://cloud.google.com/blog/products/databases/aggregating-data-with-...
Further to @Chaitra's answer. Using this code below will give you a count of documents with a query. ``` import { collection, Firestore, getCountFromServer, query, where } from '@angular/fire/firestore'; {... totalUsers: any; constructor( private fs: Firestore ){} onInit() { this.getUserCount() }...
62,604,131
I'm trying to create a Class to manage my Cloud Firestore requests (like any SQLiteHelper Class). However, firebase uses async calls and I'm not able to return a value to other scripts. Here an example (bool return): ``` public bool CheckIfIsFullyRegistered(string idUtente) { DocumentReference docRef =...
2020/06/26
[ "https://Stackoverflow.com/questions/62604131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4651768/" ]
Unfortunately, since Firestore is acting as a frontend for some slow running I/O (disk access or a web request), any interactions you have with it will need to be asynchronous. You'll also want to avoid blocking your game loop if at all possible while performing this access. That is to say, there won't be a synchronous...
This is how i got it to work, but excuse my ignorance as i've only been using FBDB for like a week. Here is a snippet, I hope it helps someone. Create a thread task extension to our login event ``` static Task DI = new System.Threading.Tasks.Task(LoginAnon); ``` Logging in anon ``` DI = FirebaseAuth.DefaultIn...
57,941,493
I'm writing a tester for myself that is meant to work with different classes whose names are given in the form of a string. Currently, my setup looks like this: ```java public class Tester { public static void main(String[] args) throws /** some exceptions **/ { Class<?> class = Class.forName("Ex"); ...
2019/09/15
[ "https://Stackoverflow.com/questions/57941493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10638274/" ]
I think you're looking for something like this: ```js new Vue({ el: '#app', vuetify: new Vuetify(), data () { return { items: [ { id: 1, name: 'A', description: 'Short', showButtons: true }, { id: 2, name: 'B', description: 'Short', showButtons: false }, { id: 3, name: ...
Set the height and the overflow in the text area: ``` <v-card-text style="overflow-y: auto; height:100px" > <div class="body-1">{{ description }}</div> <v-divider light style="margin-top:15px;" /> <v-divider light /> </v-card-text> ``` It is better to do it by a `class`, but I use `style` here for an easy gras...
57,941,493
I'm writing a tester for myself that is meant to work with different classes whose names are given in the form of a string. Currently, my setup looks like this: ```java public class Tester { public static void main(String[] args) throws /** some exceptions **/ { Class<?> class = Class.forName("Ex"); ...
2019/09/15
[ "https://Stackoverflow.com/questions/57941493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10638274/" ]
You just have to set 'align' property to "stretch" in v-row: ``` <template> <div> <v-row align="stretch" class="ma-2"> <v-col md="4" class="pa-3" v-for="i in items" :key="i.id"> <Item :show-buttons="true" :item="i" /> </v-col> </v-row> </div> </template> ```
Set the height and the overflow in the text area: ``` <v-card-text style="overflow-y: auto; height:100px" > <div class="body-1">{{ description }}</div> <v-divider light style="margin-top:15px;" /> <v-divider light /> </v-card-text> ``` It is better to do it by a `class`, but I use `style` here for an easy gras...
57,941,493
I'm writing a tester for myself that is meant to work with different classes whose names are given in the form of a string. Currently, my setup looks like this: ```java public class Tester { public static void main(String[] args) throws /** some exceptions **/ { Class<?> class = Class.forName("Ex"); ...
2019/09/15
[ "https://Stackoverflow.com/questions/57941493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10638274/" ]
Set the height and the overflow in the text area: ``` <v-card-text style="overflow-y: auto; height:100px" > <div class="body-1">{{ description }}</div> <v-divider light style="margin-top:15px;" /> <v-divider light /> </v-card-text> ``` It is better to do it by a `class`, but I use `style` here for an easy gras...
`class="fill-height"` on the cards works for me: ```html <v-row> <v-col v-for="i in 8" :key="i" lg="4"> <v-card class="fill-height">...</v-card> </v-col> </v-row> ```
57,941,493
I'm writing a tester for myself that is meant to work with different classes whose names are given in the form of a string. Currently, my setup looks like this: ```java public class Tester { public static void main(String[] args) throws /** some exceptions **/ { Class<?> class = Class.forName("Ex"); ...
2019/09/15
[ "https://Stackoverflow.com/questions/57941493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10638274/" ]
I think you're looking for something like this: ```js new Vue({ el: '#app', vuetify: new Vuetify(), data () { return { items: [ { id: 1, name: 'A', description: 'Short', showButtons: true }, { id: 2, name: 'B', description: 'Short', showButtons: false }, { id: 3, name: ...
`class="fill-height"` on the cards works for me: ```html <v-row> <v-col v-for="i in 8" :key="i" lg="4"> <v-card class="fill-height">...</v-card> </v-col> </v-row> ```
57,941,493
I'm writing a tester for myself that is meant to work with different classes whose names are given in the form of a string. Currently, my setup looks like this: ```java public class Tester { public static void main(String[] args) throws /** some exceptions **/ { Class<?> class = Class.forName("Ex"); ...
2019/09/15
[ "https://Stackoverflow.com/questions/57941493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10638274/" ]
You just have to set 'align' property to "stretch" in v-row: ``` <template> <div> <v-row align="stretch" class="ma-2"> <v-col md="4" class="pa-3" v-for="i in items" :key="i.id"> <Item :show-buttons="true" :item="i" /> </v-col> </v-row> </div> </template> ```
`class="fill-height"` on the cards works for me: ```html <v-row> <v-col v-for="i in 8" :key="i" lg="4"> <v-card class="fill-height">...</v-card> </v-col> </v-row> ```
34,912,422
Have changed to a new server and have migrated a number of Wordpress sites. After migration, I found that the menu links were no longer working. The content is there however. I deleted the htaccess file and changed the permalinks to the default setting 'plain'. That worked fine. However, now my website is working with...
2016/01/20
[ "https://Stackoverflow.com/questions/34912422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2722090/" ]
On Linux, in order to relax access to the document root, you should edit the following file: /etc/httpd/conf/httpd.conf In case you are on Ubuntu, edit the file /etc/apache2/apache2.conf (here we have an example of /var/www) And depending on what directory level you want to relax access to, you have to change the dir...
Reference Docs for you: <https://codex.wordpress.org/Using_Permalinks> I take it when you say the menu lnks stopped working again you mean to say that the link changes fine to the new permalink format of <http://domain/post_name> right? If so you're issue lies in mod\_redirect. Either in the .htaccess in the docroot ...
34,912,422
Have changed to a new server and have migrated a number of Wordpress sites. After migration, I found that the menu links were no longer working. The content is there however. I deleted the htaccess file and changed the permalinks to the default setting 'plain'. That worked fine. However, now my website is working with...
2016/01/20
[ "https://Stackoverflow.com/questions/34912422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2722090/" ]
On Linux, in order to relax access to the document root, you should edit the following file: /etc/httpd/conf/httpd.conf In case you are on Ubuntu, edit the file /etc/apache2/apache2.conf (here we have an example of /var/www) And depending on what directory level you want to relax access to, you have to change the dir...
Issue can be the path of the files as well. Do you migrate the account with same username and same path as of the old server ? If path is different than the old server, take a mysql dump of the db, look for the path and change them to the correct new path. If paths are same, then you could fix this issue by just re...
65,813,417
I have a Laravel 5.1 install that I am upgrading. I meticulously followed the instructions available at <https://laravel.com/docs/5.3/upgrade#upgrade-5.2.0> for the upgrade, including removing **Illuminate\Foundation\Providers\ArtisanServiceProvider** and **Illuminate\Routing\ControllerServiceProvider** from the *confi...
2021/01/20
[ "https://Stackoverflow.com/questions/65813417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/265780/" ]
You first have to split the line of stdin, then you can operate on each word using a `map` function. Without splitting, the stdin is only read line by line in the `for` loop. ``` #!/usr/bin/python import sys def capitalize(t): # Don't want to double print single character if len(t) is 1: return t.upper(...
You could just use the `capitalize` method for `str` which will do exactly what you need, and then uppercase the last letter individually, something like: ``` my_string = my_string.capitalize() my_string = my_string[:-1] + my_string[-1].upper() ```
65,813,417
I have a Laravel 5.1 install that I am upgrading. I meticulously followed the instructions available at <https://laravel.com/docs/5.3/upgrade#upgrade-5.2.0> for the upgrade, including removing **Illuminate\Foundation\Providers\ArtisanServiceProvider** and **Illuminate\Routing\ControllerServiceProvider** from the *confi...
2021/01/20
[ "https://Stackoverflow.com/questions/65813417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/265780/" ]
You are operating on lines, not words, since iterating over `sys.stdin` will give you strings that consist of each line of text that you input. So your logic won't be capitalizing individual words. There is nothing wrong with your logic for capitalizing the last character of a string. The reason that you are not seemi...
You could just use the `capitalize` method for `str` which will do exactly what you need, and then uppercase the last letter individually, something like: ``` my_string = my_string.capitalize() my_string = my_string[:-1] + my_string[-1].upper() ```
65,813,417
I have a Laravel 5.1 install that I am upgrading. I meticulously followed the instructions available at <https://laravel.com/docs/5.3/upgrade#upgrade-5.2.0> for the upgrade, including removing **Illuminate\Foundation\Providers\ArtisanServiceProvider** and **Illuminate\Routing\ControllerServiceProvider** from the *confi...
2021/01/20
[ "https://Stackoverflow.com/questions/65813417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/265780/" ]
You are operating on lines, not words, since iterating over `sys.stdin` will give you strings that consist of each line of text that you input. So your logic won't be capitalizing individual words. There is nothing wrong with your logic for capitalizing the last character of a string. The reason that you are not seemi...
You first have to split the line of stdin, then you can operate on each word using a `map` function. Without splitting, the stdin is only read line by line in the `for` loop. ``` #!/usr/bin/python import sys def capitalize(t): # Don't want to double print single character if len(t) is 1: return t.upper(...
133,313
I came across a post discussing the speed of forking in Cygwin, giving an expected 'fork rate' in Windows XP of around 30-50 per-second ([link](http://old.nabble.com/Slow-fork-issue---Win-x64-td19538601.html)) I've got a Core 2 duo (1.79GHz) which I would expect to get comparable results, but it's only managing around...
2010/04/21
[ "https://superuser.com/questions/133313", "https://superuser.com", "https://superuser.com/users/3609/" ]
This has nothing to do with fork being slow. I've seen cygwin run dog slow when the windows "home" directory was on a network drive. Every single command would search there for binaries slowing things down tremendously. see if ``` while (true); do /bin/date --utc; done | uniq -c ``` is faster, if so, that is proba...
You're not seeing forks; you're seeing fork, exec, system call to read time of day clock, format and convert the output. Not to mention whatever else is time sharing in parallel. On what basis do you say the other machines "actually *were* slower"? There are a lot of things that contribute to a computer's actual speed...
133,313
I came across a post discussing the speed of forking in Cygwin, giving an expected 'fork rate' in Windows XP of around 30-50 per-second ([link](http://old.nabble.com/Slow-fork-issue---Win-x64-td19538601.html)) I've got a Core 2 duo (1.79GHz) which I would expect to get comparable results, but it's only managing around...
2010/04/21
[ "https://superuser.com/questions/133313", "https://superuser.com", "https://superuser.com/users/3609/" ]
I'm afraid there is nothing much you can do about this. Windows does not have a native `fork()` syscall so Cygwin has to emulate this. The implementation of this emulation is very inefficient though. (See [Cygwin FAQ](https://cygwin.com/cygwin-ug-net/highlights.html#ov-hi-process)) MSYS2, which is often used in appli...
You're not seeing forks; you're seeing fork, exec, system call to read time of day clock, format and convert the output. Not to mention whatever else is time sharing in parallel. On what basis do you say the other machines "actually *were* slower"? There are a lot of things that contribute to a computer's actual speed...
133,313
I came across a post discussing the speed of forking in Cygwin, giving an expected 'fork rate' in Windows XP of around 30-50 per-second ([link](http://old.nabble.com/Slow-fork-issue---Win-x64-td19538601.html)) I've got a Core 2 duo (1.79GHz) which I would expect to get comparable results, but it's only managing around...
2010/04/21
[ "https://superuser.com/questions/133313", "https://superuser.com", "https://superuser.com/users/3609/" ]
This has nothing to do with fork being slow. I've seen cygwin run dog slow when the windows "home" directory was on a network drive. Every single command would search there for binaries slowing things down tremendously. see if ``` while (true); do /bin/date --utc; done | uniq -c ``` is faster, if so, that is proba...
I'm afraid there is nothing much you can do about this. Windows does not have a native `fork()` syscall so Cygwin has to emulate this. The implementation of this emulation is very inefficient though. (See [Cygwin FAQ](https://cygwin.com/cygwin-ug-net/highlights.html#ov-hi-process)) MSYS2, which is often used in appli...
2,662
There's a survey on chess.com, [Do your friends play chess?](http://www.chess.com/survey/do-your-friends-play-chess), and the results aren't very encouraging. Personally, very few of my friends play chess. Then I read this question: [What's the most prestigious chess competition, broadcasted on TV?](https://chess.stac...
2013/08/03
[ "https://chess.stackexchange.com/questions/2662", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/1105/" ]
according to wikipedia, the USCF has experienced strong membership growth in recent times: <http://en.wikipedia.org/wiki/United_States_Chess_Federation> However, another angle would be to look at google search trends, and this suggests it is less popular, at least since 2005. For example, "chess", "learn chess" and "...
The USCF and FIDE have scholastic programs designed to get kids - boys and girls - into chess. This is one way they are trying to popularize it.
2,662
There's a survey on chess.com, [Do your friends play chess?](http://www.chess.com/survey/do-your-friends-play-chess), and the results aren't very encouraging. Personally, very few of my friends play chess. Then I read this question: [What's the most prestigious chess competition, broadcasted on TV?](https://chess.stac...
2013/08/03
[ "https://chess.stackexchange.com/questions/2662", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/1105/" ]
Chess isn't popular because all major tournaments make it lack emotion. For some reason, all major tournaments are those of *classic* chess, that is, with high quality games that last 5 hours or more. The outcome of these high quality games at the highest play level is most typically a draw. This is totally broken and ...
The USCF and FIDE have scholastic programs designed to get kids - boys and girls - into chess. This is one way they are trying to popularize it.
2,662
There's a survey on chess.com, [Do your friends play chess?](http://www.chess.com/survey/do-your-friends-play-chess), and the results aren't very encouraging. Personally, very few of my friends play chess. Then I read this question: [What's the most prestigious chess competition, broadcasted on TV?](https://chess.stac...
2013/08/03
[ "https://chess.stackexchange.com/questions/2662", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/1105/" ]
according to wikipedia, the USCF has experienced strong membership growth in recent times: <http://en.wikipedia.org/wiki/United_States_Chess_Federation> However, another angle would be to look at google search trends, and this suggests it is less popular, at least since 2005. For example, "chess", "learn chess" and "...
Chess made the top 10 most searched for games on Google for over 117 months. I think they've been recording the top searches for about 117 months. It's the most popular board game in the world. <http://www.google.com/trends/explore?q=chess>
2,662
There's a survey on chess.com, [Do your friends play chess?](http://www.chess.com/survey/do-your-friends-play-chess), and the results aren't very encouraging. Personally, very few of my friends play chess. Then I read this question: [What's the most prestigious chess competition, broadcasted on TV?](https://chess.stac...
2013/08/03
[ "https://chess.stackexchange.com/questions/2662", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/1105/" ]
Chess isn't popular because all major tournaments make it lack emotion. For some reason, all major tournaments are those of *classic* chess, that is, with high quality games that last 5 hours or more. The outcome of these high quality games at the highest play level is most typically a draw. This is totally broken and ...
according to wikipedia, the USCF has experienced strong membership growth in recent times: <http://en.wikipedia.org/wiki/United_States_Chess_Federation> However, another angle would be to look at google search trends, and this suggests it is less popular, at least since 2005. For example, "chess", "learn chess" and "...
2,662
There's a survey on chess.com, [Do your friends play chess?](http://www.chess.com/survey/do-your-friends-play-chess), and the results aren't very encouraging. Personally, very few of my friends play chess. Then I read this question: [What's the most prestigious chess competition, broadcasted on TV?](https://chess.stac...
2013/08/03
[ "https://chess.stackexchange.com/questions/2662", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/1105/" ]
Chess isn't popular because all major tournaments make it lack emotion. For some reason, all major tournaments are those of *classic* chess, that is, with high quality games that last 5 hours or more. The outcome of these high quality games at the highest play level is most typically a draw. This is totally broken and ...
Chess made the top 10 most searched for games on Google for over 117 months. I think they've been recording the top searches for about 117 months. It's the most popular board game in the world. <http://www.google.com/trends/explore?q=chess>
2,544,215
I'd like to work on a game, but for rapidly prototyping it, I'd like to keep it as simple as possible, so I'd do everything in top-down 2D in GDI+ and WinForms (hey, I like them!), so I can concentrate on the logic and architecture of the game itself. I thinking about having the whole game logic (server) in one assem...
2010/03/30
[ "https://Stackoverflow.com/questions/2544215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/72746/" ]
You should really just bite the bullet and take a look at one of the frameworks you mentioned. SDL is pretty good, but honestly, if you want to just get down to writing your game, XNA is incredible. If you are already experienced in C#, you could follow the on-line tutorials, but picking up just a single book on XN...
I'm not a game programmer, but I know that the difference between modeling physics problems in 2D and 3D is huge. I agree that it's a good idea to start with 2D, but don't expect to be able to reuse much of that code in the 3D version. 3D is a different animal.
2,544,215
I'd like to work on a game, but for rapidly prototyping it, I'd like to keep it as simple as possible, so I'd do everything in top-down 2D in GDI+ and WinForms (hey, I like them!), so I can concentrate on the logic and architecture of the game itself. I thinking about having the whole game logic (server) in one assem...
2010/03/30
[ "https://Stackoverflow.com/questions/2544215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/72746/" ]
This too long for a comment but... Your game physics world should pretty much be independent of the type of view you're using to see it. As an example, it's not uncommon for RTS (like say Warcraft III) to offer both a 3D view and a "mini map". If you think about it, Warcraft 1 that was 2D isn't that different from Warc...
I'm not a game programmer, but I know that the difference between modeling physics problems in 2D and 3D is huge. I agree that it's a good idea to start with 2D, but don't expect to be able to reuse much of that code in the 3D version. 3D is a different animal.
2,544,215
I'd like to work on a game, but for rapidly prototyping it, I'd like to keep it as simple as possible, so I'd do everything in top-down 2D in GDI+ and WinForms (hey, I like them!), so I can concentrate on the logic and architecture of the game itself. I thinking about having the whole game logic (server) in one assem...
2010/03/30
[ "https://Stackoverflow.com/questions/2544215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/72746/" ]
You should really just bite the bullet and take a look at one of the frameworks you mentioned. SDL is pretty good, but honestly, if you want to just get down to writing your game, XNA is incredible. If you are already experienced in C#, you could follow the on-line tutorials, but picking up just a single book on XN...
This too long for a comment but... Your game physics world should pretty much be independent of the type of view you're using to see it. As an example, it's not uncommon for RTS (like say Warcraft III) to offer both a 3D view and a "mini map". If you think about it, Warcraft 1 that was 2D isn't that different from Warc...
29,544,480
I have a little problem, how I can activate a tab from the main menu... when you click on the main menu select the tab and display its contents, becouse the tabs contents call's via `data-toggle="tab"` you can't use the `data-toggle="tab"`, at main menu don't works here one [screenshot](http://prntscr.com/6rna68) be...
2015/04/09
[ "https://Stackoverflow.com/questions/29544480", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4220208/" ]
I created an example in the fiddle; <http://jsfiddle.net/61gn1ezq/1>. As bpeterson76 said, create a selector that selects the correct tabs. I added `data-show-tab="tabidtoshow"` attributes in the menu, and created a script that shows the tabs using the API. ```js jQuery(function ($) { //get all tab-buttons v...
Bootstrap has an [API method](http://getbootstrap.com/javascript/#tabs) you can call to show or hide tabs. $(selector).tab('show') You'd have to come up with a strategy for building selectors to match the tabs you want to show/hide. Likewise, there's an event handler built for Show, Shown, hide, and hidden that are ...
16,614,861
I have a text file of this format: ``` EFF 3500. GRAVITY 0.00000 SDSC GRID [+0.0] VTURB 2.0 KM/S L/H 1.25 wl(nm) Inu(ergs/cm**2/s/hz/ster) for 17 mu in 1221 frequency intervals 1.000 .900 .800 .700 .600 .500 .400 .300 .250 .200 .150 .125 .100 .075 ....
2013/05/17
[ "https://Stackoverflow.com/questions/16614861", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2378781/" ]
``` >>> text = """some ... multiline ... text ... """ >>> lines = text.splitlines() >>> for i in range(len(lines)): ... lines[i].split() # split *returns* the list of tokens ... # it does *not* modify the string inplace ... ['some'] ['multiline'] ['text'] >>> lines #strings unchanged ['som...
You want something like this: ``` for line in File: fields = line.split() #fields[0] is "EFF", fields[1] is "3500.", etc. ``` The split() method returns a list of strings, it does not modify the object that is is called on.
26,772
According to the FIDE Laws of Chess: > > 4.4 If a player having the move: > > 4.4.1 touches his king and a rook he must castle on that side if it is legal to do so > > 4.4.2 **deliberately touches a rook and then his king he is not allowed to castle on that side on that move** and the situation shall > be go...
2019/10/30
[ "https://chess.stackexchange.com/questions/26772", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/4418/" ]
The FIDE Laws of Chess actually cover this with a recommendation without mentioning the problem. > > II.3.2.5.1 When castling on a physical board with a human player, it > is recommended that the king be moved outside the playing surface next > to his final position, the rook then be moved from its starting > posi...
I saw this in the chess news on a couple of sites, and it seems pretty simple to me. Pick up the K, and move it to g1, simultaneously pushing the rook off the g1 square. Then move the rook to its proper square. In any case, you should pick up the K first, and then if you also want to pick up the rook, grab it second, ...
26,772
According to the FIDE Laws of Chess: > > 4.4 If a player having the move: > > 4.4.1 touches his king and a rook he must castle on that side if it is legal to do so > > 4.4.2 **deliberately touches a rook and then his king he is not allowed to castle on that side on that move** and the situation shall > be go...
2019/10/30
[ "https://chess.stackexchange.com/questions/26772", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/4418/" ]
I saw this in the chess news on a couple of sites, and it seems pretty simple to me. Pick up the K, and move it to g1, simultaneously pushing the rook off the g1 square. Then move the rook to its proper square. In any case, you should pick up the K first, and then if you also want to pick up the rook, grab it second, ...
There are two problematic cases in Chess960 castling: ``` (1) rook starts on king’s destination square. (2) king starts on king’s destination square. ``` It is not beyond the wit of man for the FIDE Laws to handle those cases explicitly. Maybe a future version of the rules will do so. However the most important FID...
26,772
According to the FIDE Laws of Chess: > > 4.4 If a player having the move: > > 4.4.1 touches his king and a rook he must castle on that side if it is legal to do so > > 4.4.2 **deliberately touches a rook and then his king he is not allowed to castle on that side on that move** and the situation shall > be go...
2019/10/30
[ "https://chess.stackexchange.com/questions/26772", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/4418/" ]
Touch your king, then your rook. By rule 4.4.1, you are now required to castle. You can now move the king and rook to their proper squares however you like, since you are already forced into a specific move and any subsequent piece touches can't change that.
I saw this in the chess news on a couple of sites, and it seems pretty simple to me. Pick up the K, and move it to g1, simultaneously pushing the rook off the g1 square. Then move the rook to its proper square. In any case, you should pick up the K first, and then if you also want to pick up the rook, grab it second, ...
26,772
According to the FIDE Laws of Chess: > > 4.4 If a player having the move: > > 4.4.1 touches his king and a rook he must castle on that side if it is legal to do so > > 4.4.2 **deliberately touches a rook and then his king he is not allowed to castle on that side on that move** and the situation shall > be go...
2019/10/30
[ "https://chess.stackexchange.com/questions/26772", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/4418/" ]
I saw this in the chess news on a couple of sites, and it seems pretty simple to me. Pick up the K, and move it to g1, simultaneously pushing the rook off the g1 square. Then move the rook to its proper square. In any case, you should pick up the K first, and then if you also want to pick up the rook, grab it second, ...
Stian Yttervik made a comment that I think deserves to be expanded into a full answer. (I have changed the wording somewhat. That is not Stians fault) Just pretend that the King is capturing the Rook. In other words: Move the King first. Use the King to gently push the Rook off-center and firmly place the King where...
26,772
According to the FIDE Laws of Chess: > > 4.4 If a player having the move: > > 4.4.1 touches his king and a rook he must castle on that side if it is legal to do so > > 4.4.2 **deliberately touches a rook and then his king he is not allowed to castle on that side on that move** and the situation shall > be go...
2019/10/30
[ "https://chess.stackexchange.com/questions/26772", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/4418/" ]
The FIDE Laws of Chess actually cover this with a recommendation without mentioning the problem. > > II.3.2.5.1 When castling on a physical board with a human player, it > is recommended that the king be moved outside the playing surface next > to his final position, the rook then be moved from its starting > posi...
There are two problematic cases in Chess960 castling: ``` (1) rook starts on king’s destination square. (2) king starts on king’s destination square. ``` It is not beyond the wit of man for the FIDE Laws to handle those cases explicitly. Maybe a future version of the rules will do so. However the most important FID...
26,772
According to the FIDE Laws of Chess: > > 4.4 If a player having the move: > > 4.4.1 touches his king and a rook he must castle on that side if it is legal to do so > > 4.4.2 **deliberately touches a rook and then his king he is not allowed to castle on that side on that move** and the situation shall > be go...
2019/10/30
[ "https://chess.stackexchange.com/questions/26772", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/4418/" ]
The FIDE Laws of Chess actually cover this with a recommendation without mentioning the problem. > > II.3.2.5.1 When castling on a physical board with a human player, it > is recommended that the king be moved outside the playing surface next > to his final position, the rook then be moved from its starting > posi...
Touch your king, then your rook. By rule 4.4.1, you are now required to castle. You can now move the king and rook to their proper squares however you like, since you are already forced into a specific move and any subsequent piece touches can't change that.
26,772
According to the FIDE Laws of Chess: > > 4.4 If a player having the move: > > 4.4.1 touches his king and a rook he must castle on that side if it is legal to do so > > 4.4.2 **deliberately touches a rook and then his king he is not allowed to castle on that side on that move** and the situation shall > be go...
2019/10/30
[ "https://chess.stackexchange.com/questions/26772", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/4418/" ]
The FIDE Laws of Chess actually cover this with a recommendation without mentioning the problem. > > II.3.2.5.1 When castling on a physical board with a human player, it > is recommended that the king be moved outside the playing surface next > to his final position, the rook then be moved from its starting > posi...
Stian Yttervik made a comment that I think deserves to be expanded into a full answer. (I have changed the wording somewhat. That is not Stians fault) Just pretend that the King is capturing the Rook. In other words: Move the King first. Use the King to gently push the Rook off-center and firmly place the King where...
26,772
According to the FIDE Laws of Chess: > > 4.4 If a player having the move: > > 4.4.1 touches his king and a rook he must castle on that side if it is legal to do so > > 4.4.2 **deliberately touches a rook and then his king he is not allowed to castle on that side on that move** and the situation shall > be go...
2019/10/30
[ "https://chess.stackexchange.com/questions/26772", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/4418/" ]
Touch your king, then your rook. By rule 4.4.1, you are now required to castle. You can now move the king and rook to their proper squares however you like, since you are already forced into a specific move and any subsequent piece touches can't change that.
There are two problematic cases in Chess960 castling: ``` (1) rook starts on king’s destination square. (2) king starts on king’s destination square. ``` It is not beyond the wit of man for the FIDE Laws to handle those cases explicitly. Maybe a future version of the rules will do so. However the most important FID...
26,772
According to the FIDE Laws of Chess: > > 4.4 If a player having the move: > > 4.4.1 touches his king and a rook he must castle on that side if it is legal to do so > > 4.4.2 **deliberately touches a rook and then his king he is not allowed to castle on that side on that move** and the situation shall > be go...
2019/10/30
[ "https://chess.stackexchange.com/questions/26772", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/4418/" ]
Touch your king, then your rook. By rule 4.4.1, you are now required to castle. You can now move the king and rook to their proper squares however you like, since you are already forced into a specific move and any subsequent piece touches can't change that.
Stian Yttervik made a comment that I think deserves to be expanded into a full answer. (I have changed the wording somewhat. That is not Stians fault) Just pretend that the King is capturing the Rook. In other words: Move the King first. Use the King to gently push the Rook off-center and firmly place the King where...
2,161,639
I need to replace multiple instances of a certain string (question mark) with strings from an array. e.g. if the string I wish to replace appears 3 times and my array has a length of 3, the first one would be replaced by the first item in the array, the second by the second etc etc. You may recongise it's quite simila...
2010/01/29
[ "https://Stackoverflow.com/questions/2161639", "https://Stackoverflow.com", "https://Stackoverflow.com/users/261776/" ]
why not use ``` $retString = vsprintf('banana is %s, apple is %s, tomato is %s', $myArray); return $retString; ```
It gets a little ugly in PHP 5.2 because you have to use global variables to pass information between callbacks but it's very flexible otherwise. Use [`preg_replace_callback()`](http://php.net/manual/en/function.preg-replace-callback.php): ``` preg_replace_callback('!\?!', 'rep_array', $myString); $i = 0; function r...
21,634,820
Which exception should be thrown by a method that accepts multiple arguments when the arguments given are invalid **when given together**? As an example, consider ``` public Bar DoSomething(Foo f1, Foo f2) { //implementation... } ``` where completing the operation is contingent upon some relationship or similarit...
2014/02/07
[ "https://Stackoverflow.com/questions/21634820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/866022/" ]
You don't have to necessary throw an exception. In my opinion, this even should not throw an exception because is a deep part of your matching logic. I would just let matching fail (return zero or whatever you do) instead and mentioned this fact in documentation - something like "Compares two players from different tea...
ArgumentException would make sense here, as there is something wrong with the arguments being passed in. You can always add a message to your throw statement: ``` throw new ArgumentException("Players can't be on the same team!"); ``` It's probably not a good idea to throw an exception here if the user did something ...
59,926,674
I am using the [serialize](https://docs.djangoproject.com/en/3.0/topics/serialization/#djangojsonencoder) method to get a json of a Model object. However it does not work when I pass in a specific id. ``` data = serialize('json', Sample.objects.get(id=1), use_natural_foreign_keys=True) print(data) ``` It seems to on...
2020/01/27
[ "https://Stackoverflow.com/questions/59926674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9879869/" ]
You may try aggregating by `DATE_FORMAT` of your date, with the mask `%Y-%m`: ``` $results = Post::select(\DB::raw("DATE_FORMAT(created_at, '%Y-%m') AS ym, COUNT(*) AS cnt")) ->groupBy(\DB::raw("DATE_FORMAT(created_at, '%Y-%m')")) ->get(); ``` If your actual database be Postgres, then a similar approach using `TO_CH...
here you go ``` return Post::select(DB::raw('count(1) AS count'), DB::raw('DATE_FORMAT(created_at, "01-%m-%Y") AS month'))->groupBy(function($post) { // Get all posts as collection and apply groupBy method $post->created_at->format('01-m-Y'); // ex: 01-02-2019 })->get() ``` I hope this will work for you...
20,768,481
I'm attempting to make a namespace for the first time while learning programming. I am hoping there is a way around the problem I've run into that isn't particularly messy, but essentially I have a class object that keeps two dictionaries of two nested class objects. I need to be able to pass the Dictionary of NestedCl...
2013/12/25
[ "https://Stackoverflow.com/questions/20768481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3133454/" ]
There doesn't seem to be anything particularly wrong with your implementation of NestedClassB other than you need to make your constructors public if you wish to instantiate an instance of NestedClassB. By default in .Net, objects are passed by reference to function parameters, so you will have the same instance of Dic...
For anyone trying to do this: passing the instance of the wrapper class is necessary for the nested class to access methods or variables of the wrapper class. This can be done with "this" keyword.
36,309
Is it possible to throttle down the CPU speed of a VMWare image so that i can simulate a slow computer and test how my software works on a slow machine? Or is there any other way to do this? Im using VMWare Server 2.0 and its a CentOS Image.
2009/07/06
[ "https://serverfault.com/questions/36309", "https://serverfault.com", "https://serverfault.com/users/4913/" ]
This is not possible with the Player and Server products, but I believe it is in the ESXi (the free "bare-metal hypervisor" product) and the paid-for products like VMWare Workstation.
Yes, just limit that VM's CPU resources, you can go down to as low as 1Mhz (iirc). Ah, just spotted the edit/addition - don't know Server 2.0 sorry, only ESX
17,448,389
I am using the below code to show`timepicker` when clicking on an input type text. Is there a way to set a `default value` such as `01:00`for the `time picker`?? ``` $.plugin($afterSubPageLoad,{ end_time_picker:function() { $(function(){$('#actualHours').scroller({preset: 'time',theme: 'wp',display: 'modal',mode:...
2013/07/03
[ "https://Stackoverflow.com/questions/17448389", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2068446/" ]
You do it with the setValue method: ``` $('#actualHours').mobiscroll('setValue','01:00'); ```
Just define the default date or time in the `value` attibute of your `input` element depending on the local date time parameters you are using (yyyy-mm-dd , dd.mm.yyyy, ...) like : ``` <input name="user-select-datetime-to" id="user-select-datetime-to" value="03.07.2013 15:04"/> ``` or ``` <input name="user-selec...
17,448,389
I am using the below code to show`timepicker` when clicking on an input type text. Is there a way to set a `default value` such as `01:00`for the `time picker`?? ``` $.plugin($afterSubPageLoad,{ end_time_picker:function() { $(function(){$('#actualHours').scroller({preset: 'time',theme: 'wp',display: 'modal',mode:...
2013/07/03
[ "https://Stackoverflow.com/questions/17448389", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2068446/" ]
You do it with the setValue method: ``` $('#actualHours').mobiscroll('setValue','01:00'); ```
I know this is older question, but this is what I had to do in order to default the time. ``` var showModalTimePickerWithDefaultTime = function (defaultTime) { $('.item-cell.right').mobiscroll().time({ mode: 'scroller', theme: kendo.support.mobileOS.ios ? 'ios' : 'android', display: 'modal', ...
31,024
Me maw used to say to me 'at the double', meaning for me to come as quick as possible. Just wondering today: what was the origin of this saying? It seems to me that the words don't apply to anything really specifically, so can some one provide a feasible explanation?
2011/06/22
[ "https://english.stackexchange.com/questions/31024", "https://english.stackexchange.com", "https://english.stackexchange.com/users/8183/" ]
Just two points Ham and Bacon didn't make clear: double time (the command is "At the double" in the British Army and "On the double" in the American) is literally twice the speed of a normal march, so 72 paces a minute (Britsih Light Infantry pace and I believe also the norm in the USMC) becomes 144, which is pretty mu...
I was reading about gut strings for violins and various other stringed instuments and how they are made and saw this: "Once a group of five or so sets are stripped they are bunched and knotted in the center. This is known as handling the casing "on the double", that is, at the center. Such an arrangement makes it easie...
1,553,006
I have written an application suite on Windows which amongst other things installs a Firefox add-on which once run modifies the Firefox network preferences by interfacing with nsIPrefService. The extension itself resides in a folder under *Program Files* along with other parts of the application which work together wi...
2009/10/12
[ "https://Stackoverflow.com/questions/1553006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17492/" ]
Do you have a line like this at the top of your XSLT file?? ``` <xsl:output method="xml" indent="yes"/> ``` That defines what the output format is - "text" is default, "html" and "xml" are the other options. I don't know what you're doing, but when I run your XSLT file on the sample XML file provided, I get this as...
You probably write out the inner text of an xml node instead of calling apply-templates in one of your nodes. I couldn't find your attached xsl, so it's not easy to guess. But post the xslt, and I'll tell you.
1,553,006
I have written an application suite on Windows which amongst other things installs a Firefox add-on which once run modifies the Firefox network preferences by interfacing with nsIPrefService. The extension itself resides in a folder under *Program Files* along with other parts of the application which work together wi...
2009/10/12
[ "https://Stackoverflow.com/questions/1553006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17492/" ]
I suspect you are watching the transformation result in a browser. The transformation itself works perfectly, but the browser displays the plain text of the XML (since it expects HTML contents by default and ignores any tags it does not recognize, displaying their text contents only). Try `media-type="text/xml"` and ...
You probably write out the inner text of an xml node instead of calling apply-templates in one of your nodes. I couldn't find your attached xsl, so it's not easy to guess. But post the xslt, and I'll tell you.
31,650,642
I am completely new to forecasting and I am working with arrears figures and collection rates and have been asked to produce a forecast of performance over the next 12 months. I have access to Excel and SQL Server - can anyone recommend an accurate method to complete this? I need figures as opposed to graphs.
2015/07/27
[ "https://Stackoverflow.com/questions/31650642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5160108/" ]
If you are very new with MySQL I recommended to install phpMyAdmin on your server to manage your databases and privileges. --- **Solution 1 phpMyAdmin:** Login to your server console using root and run the following commands: ``` rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm ``` then ``...
Please check "/root/.mysql\_secret" file. root's password is in this file. like this: ``` sudo cat /root/.mysql_secret ```
71,673,795
I am working on a form where I need to set the values of a dropdown selection based on a prior selection. This bit is ok and I set up an internal Ajax call to deal with this ``` <script> $(document).ready(function(){ $('#hub').on('change', function(){ var hubid = $("#hub").val(); var hubtype = <?ph...
2022/03/30
[ "https://Stackoverflow.com/questions/71673795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8395618/" ]
You need to loop through `$_POST["hub_type"]` as that's a ready-made array containing what you need. Using `$typed` doesn't work because you tried to decode something which isn't JSON. Full example: ``` if( isset($_POST['ajax']) && isset($_POST['hub_id']) && isset($_POST['hub_type'])){ if(!empty($_POST['hub_type'...
``` $typed = $_POST['hub_type']; $type1 = json_encode($typed); $test1 = json_decode($type1,true); ``` I fixed the problem by using these three lines , the others were used for testing what was being received in the $Post array. This means that I can have dynamic dropdowns where one dropdown value will be used to fi...
44,431,202
1.fetching the values from a same table with different date ``` <?php $date= date("Y-m-d");; $prev_date = date('Y-m-d', strtotime($date .' -1 day')); $result_yest=mysql_query("SELECT isp,sum(sent) AS `sent_yest` FROM red_global WHERE status_date='$prev_date' and sent > 0 group by 1",$link1); $data_ye...
2017/06/08
[ "https://Stackoverflow.com/questions/44431202", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8031078/" ]
Since you have no code, let me take a stab at it. To expand on what @anderson said, Make sure you have your static files available to your app via something like ``` const staticCont = express.static(__dirname + "/public"); ``` Where "public" is, is the folder directory of all your static files. This way, any link i...
Did you public your `index.html` file in Node js, to make sure your browser can access the file?
61,560,437
I wrote the following script to find my dynamic public IP address and save how often it is changes ``` #!/usr/bin/env bash ip=0 change=0 for ((count = 10000; count != 0, change == 10; count--)); do fetch="$(dig +short myip.opendns.com @resolver1.opendns.com)" dig +short myip.opendns.com @resolver1.opendns.com...
2020/05/02
[ "https://Stackoverflow.com/questions/61560437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13454638/" ]
That's not the syntax to display data in ejs ,try this.See these [docs](https://ejs.co/) > > <%= Outputs the value into the template (HTML escaped) > > > ``` <% for(var x=0;x<user.posts.length;x++) { %> <div class="jumbotron"> <div>by <b><%= user.posts[x].author %></b> on <small><%...
The source code for the template is being rendered in the browser. This means that the view engine is not parsing it. The default view engine is Jade, but you aren't using Jade. Probably you forgot to [configure the view engine](https://expressjs.com/en/guide/using-template-engines.html): ``` app.set('view engine',...
61,560,437
I wrote the following script to find my dynamic public IP address and save how often it is changes ``` #!/usr/bin/env bash ip=0 change=0 for ((count = 10000; count != 0, change == 10; count--)); do fetch="$(dig +short myip.opendns.com @resolver1.opendns.com)" dig +short myip.opendns.com @resolver1.opendns.com...
2020/05/02
[ "https://Stackoverflow.com/questions/61560437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13454638/" ]
That's not the syntax to display data in ejs ,try this.See these [docs](https://ejs.co/) > > <%= Outputs the value into the template (HTML escaped) > > > ``` <% for(var x=0;x<user.posts.length;x++) { %> <div class="jumbotron"> <div>by <b><%= user.posts[x].author %></b> on <small><%...
Hi @odegeek what show us so far is how are you getting the data from the database and an idea of how to show it in your view. But we are missing a few pieces of information here. For example: * Which frontend framework are you using if any? * Where are you calling the backend endpoint? * Which view engine are you usin...
9,005,866
Here is my javascript object and i want to add options to dropdown? I want property name goes as value and property value go as text in each option? ``` { "": "", "CSharp40": "C# 4.0", ".NET": ".NET", "JQuery": "JQuery", "Javascript": "Javascript" } ``` The output would be like below ``` <select id="courses"> ...
2012/01/25
[ "https://Stackoverflow.com/questions/9005866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/845392/" ]
Agreed that since your data is a list, it should be in an array. But instead of manually iterating over your array, I'd propose that you use this Mustache-ier technique. Tested. ``` var courses = [ {val: "", title:""}, {val: "CSharp40", title: "C# 4.0"}, {val: ".NET", title: ".NET"}, {val: "JQuery", ti...
Ideally, your object would be an array of objects: ``` var obj = [{val:"",title:""},{val:"CSharp40",title: "C# 4.0"},{val: ".NET",title: ".NET"},{val: "JQuery",title: "JQuery"},{val: "Javascript",title: "Javascript"}]; //open select var output = '<select id="courses">'; //add each value $.each(obj,function(){ out...
579,140
Given that $z= \cos \theta + i\sin \theta$, prove that $\Re\left\{\dfrac{z-1}{z+1}\right\}=0$ How would I do this?
2013/11/24
[ "https://math.stackexchange.com/questions/579140", "https://math.stackexchange.com", "https://math.stackexchange.com/users/92690/" ]
$$\frac{z-1}{z+1}=\frac{z-1}{z+1}\frac{\overline z+1}{\overline z+1}=\frac{|z|^2-1+2i\,\text{Im}\,z}{|z+1|^2}\implies\text{Re}\,\left(\frac{z-1}{z+1}\right)=\frac{|z|^2-1}{|z+1|^2}$$ But we know that $\;z=\cos\theta+i\sin\theta\implies |z|=1\;$ , so...
$$ \begin{equation} \begin{split} \frac{z-1}{z+1} &= \frac{\cos\theta + i\sin\theta-1}{\cos\theta + i\sin\theta+1} \\ &= \frac{\cos\theta-1+i\sin\theta}{\cos\theta+1+i\sin\theta} \\ &=\frac{-2\sin^2\frac{\theta}{2} + i\sin\theta}{2\cos^2\frac{\theta}{2}+i\sin\theta} \\ &= \frac{2\sin\frac{\theta}{2}}{2\cos\frac{\theta...
579,140
Given that $z= \cos \theta + i\sin \theta$, prove that $\Re\left\{\dfrac{z-1}{z+1}\right\}=0$ How would I do this?
2013/11/24
[ "https://math.stackexchange.com/questions/579140", "https://math.stackexchange.com", "https://math.stackexchange.com/users/92690/" ]
$$\frac{z-1}{z+1}=\frac{z-1}{z+1}\frac{\overline z+1}{\overline z+1}=\frac{|z|^2-1+2i\,\text{Im}\,z}{|z+1|^2}\implies\text{Re}\,\left(\frac{z-1}{z+1}\right)=\frac{|z|^2-1}{|z+1|^2}$$ But we know that $\;z=\cos\theta+i\sin\theta\implies |z|=1\;$ , so...
Using $\displaystyle\cos2A=2\cos^2A-1=1-2\sin^2A $ and $\displaystyle\sin2A=2\cos A\sin A,$ $$\frac{\cos\theta+i\sin\theta-1}{\cos\theta+i\sin\theta+1}=\frac{-2\sin^2\frac{\theta}2+i2\sin\frac{\theta}2\cos\frac{\theta}2}{2\cos^2\frac{\theta}2+i2\sin\frac{\theta}2\cos\frac{\theta}2}$$ $$=\frac{2i\sin\frac{\theta}2\lef...
579,140
Given that $z= \cos \theta + i\sin \theta$, prove that $\Re\left\{\dfrac{z-1}{z+1}\right\}=0$ How would I do this?
2013/11/24
[ "https://math.stackexchange.com/questions/579140", "https://math.stackexchange.com", "https://math.stackexchange.com/users/92690/" ]
$$\frac{z-1}{z+1}=\frac{z-1}{z+1}\frac{\overline z+1}{\overline z+1}=\frac{|z|^2-1+2i\,\text{Im}\,z}{|z+1|^2}\implies\text{Re}\,\left(\frac{z-1}{z+1}\right)=\frac{|z|^2-1}{|z+1|^2}$$ But we know that $\;z=\cos\theta+i\sin\theta\implies |z|=1\;$ , so...
If $w=a+ib,\bar w=a-ib\implies w+\bar w=2a$ So, $w$ will be purely imaginary iff $ w+\bar w=0$ Here $$\frac{z-1}{z+1}+\overline{\left(\frac{z-1}{z+1}\right)}$$ $$=\frac{z-1}{z+1}+\frac{\bar z-1}{\bar z+1}=\frac{z\bar z-\bar z+z-1+(z\bar z+\bar z-z-1)}{(z+1)(\bar z+1)}$$ $$=\frac{2(z\bar z-1)}{z\bar z+(z+\bar z)+1}$$...
579,140
Given that $z= \cos \theta + i\sin \theta$, prove that $\Re\left\{\dfrac{z-1}{z+1}\right\}=0$ How would I do this?
2013/11/24
[ "https://math.stackexchange.com/questions/579140", "https://math.stackexchange.com", "https://math.stackexchange.com/users/92690/" ]
If $w=a+ib,\bar w=a-ib\implies w+\bar w=2a$ So, $w$ will be purely imaginary iff $ w+\bar w=0$ Here $$\frac{z-1}{z+1}+\overline{\left(\frac{z-1}{z+1}\right)}$$ $$=\frac{z-1}{z+1}+\frac{\bar z-1}{\bar z+1}=\frac{z\bar z-\bar z+z-1+(z\bar z+\bar z-z-1)}{(z+1)(\bar z+1)}$$ $$=\frac{2(z\bar z-1)}{z\bar z+(z+\bar z)+1}$$...
$$ \begin{equation} \begin{split} \frac{z-1}{z+1} &= \frac{\cos\theta + i\sin\theta-1}{\cos\theta + i\sin\theta+1} \\ &= \frac{\cos\theta-1+i\sin\theta}{\cos\theta+1+i\sin\theta} \\ &=\frac{-2\sin^2\frac{\theta}{2} + i\sin\theta}{2\cos^2\frac{\theta}{2}+i\sin\theta} \\ &= \frac{2\sin\frac{\theta}{2}}{2\cos\frac{\theta...
579,140
Given that $z= \cos \theta + i\sin \theta$, prove that $\Re\left\{\dfrac{z-1}{z+1}\right\}=0$ How would I do this?
2013/11/24
[ "https://math.stackexchange.com/questions/579140", "https://math.stackexchange.com", "https://math.stackexchange.com/users/92690/" ]
If $w=a+ib,\bar w=a-ib\implies w+\bar w=2a$ So, $w$ will be purely imaginary iff $ w+\bar w=0$ Here $$\frac{z-1}{z+1}+\overline{\left(\frac{z-1}{z+1}\right)}$$ $$=\frac{z-1}{z+1}+\frac{\bar z-1}{\bar z+1}=\frac{z\bar z-\bar z+z-1+(z\bar z+\bar z-z-1)}{(z+1)(\bar z+1)}$$ $$=\frac{2(z\bar z-1)}{z\bar z+(z+\bar z)+1}$$...
Using $\displaystyle\cos2A=2\cos^2A-1=1-2\sin^2A $ and $\displaystyle\sin2A=2\cos A\sin A,$ $$\frac{\cos\theta+i\sin\theta-1}{\cos\theta+i\sin\theta+1}=\frac{-2\sin^2\frac{\theta}2+i2\sin\frac{\theta}2\cos\frac{\theta}2}{2\cos^2\frac{\theta}2+i2\sin\frac{\theta}2\cos\frac{\theta}2}$$ $$=\frac{2i\sin\frac{\theta}2\lef...
26,579,139
I'd like to subclass [CompletableFuture](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html) to override the default `Executor`. That is, if a user invokes a method without specifying an `Executor`, I want my own `Executor` to get used instead of the one normally used by `CompletableFu...
2014/10/26
[ "https://Stackoverflow.com/questions/26579139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14731/" ]
As far as I can see, you need your own implementation of `internalComplete()` which instantiates your own equivalent of `AltResult` in case of null or exception. And your subclass `supplyAsync()` is supposed to return a new instance of your new `CompletableFuture` subclass.
Async programming is widely misunderstood. Theoretical approach is to represent async program as Petri net, where main components are tokens, places, and transitions. From programming point of view, transition should be split further into firing rule and action. Logical chain appears to be too long, programmers prefer ...
26,579,139
I'd like to subclass [CompletableFuture](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html) to override the default `Executor`. That is, if a user invokes a method without specifying an `Executor`, I want my own `Executor` to get used instead of the one normally used by `CompletableFu...
2014/10/26
[ "https://Stackoverflow.com/questions/26579139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14731/" ]
Since you didn’t show us what you have tried, we don’t have a chance to find out what you did exactly and why it failed. After you clarifications, it looks like a straight-forward decoration pattern job that doesn’t need to touch any of the `CompletableFuture`’s inner workings. ``` import java.util.concurrent.*; impor...
As far as I can see, you need your own implementation of `internalComplete()` which instantiates your own equivalent of `AltResult` in case of null or exception. And your subclass `supplyAsync()` is supposed to return a new instance of your new `CompletableFuture` subclass.
26,579,139
I'd like to subclass [CompletableFuture](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html) to override the default `Executor`. That is, if a user invokes a method without specifying an `Executor`, I want my own `Executor` to get used instead of the one normally used by `CompletableFu...
2014/10/26
[ "https://Stackoverflow.com/questions/26579139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14731/" ]
Answering the original question -- **How is one supposed to subclass CompletableFuture?** Probably starting from a clean-room CompletionStage interface implementation (rather than from the concrete CompletableFuture class) a is a better option. Please take a look here: <https://github.com/lukas-krecan/completion-stag...
As far as I can see, you need your own implementation of `internalComplete()` which instantiates your own equivalent of `AltResult` in case of null or exception. And your subclass `supplyAsync()` is supposed to return a new instance of your new `CompletableFuture` subclass.
26,579,139
I'd like to subclass [CompletableFuture](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html) to override the default `Executor`. That is, if a user invokes a method without specifying an `Executor`, I want my own `Executor` to get used instead of the one normally used by `CompletableFu...
2014/10/26
[ "https://Stackoverflow.com/questions/26579139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14731/" ]
Since you didn’t show us what you have tried, we don’t have a chance to find out what you did exactly and why it failed. After you clarifications, it looks like a straight-forward decoration pattern job that doesn’t need to touch any of the `CompletableFuture`’s inner workings. ``` import java.util.concurrent.*; impor...
Async programming is widely misunderstood. Theoretical approach is to represent async program as Petri net, where main components are tokens, places, and transitions. From programming point of view, transition should be split further into firing rule and action. Logical chain appears to be too long, programmers prefer ...
26,579,139
I'd like to subclass [CompletableFuture](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html) to override the default `Executor`. That is, if a user invokes a method without specifying an `Executor`, I want my own `Executor` to get used instead of the one normally used by `CompletableFu...
2014/10/26
[ "https://Stackoverflow.com/questions/26579139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14731/" ]
Your goal is to limit the rate of access to the web service. Your solution is to use special executor which introduces delays. This is not the best solution, because some function in the chain can spend some time for other activity, or just wait too long in the queue to processor on O/S level and thus need not be delay...
Async programming is widely misunderstood. Theoretical approach is to represent async program as Petri net, where main components are tokens, places, and transitions. From programming point of view, transition should be split further into firing rule and action. Logical chain appears to be too long, programmers prefer ...
26,579,139
I'd like to subclass [CompletableFuture](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html) to override the default `Executor`. That is, if a user invokes a method without specifying an `Executor`, I want my own `Executor` to get used instead of the one normally used by `CompletableFu...
2014/10/26
[ "https://Stackoverflow.com/questions/26579139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14731/" ]
Answering the original question -- **How is one supposed to subclass CompletableFuture?** Probably starting from a clean-room CompletionStage interface implementation (rather than from the concrete CompletableFuture class) a is a better option. Please take a look here: <https://github.com/lukas-krecan/completion-stag...
Async programming is widely misunderstood. Theoretical approach is to represent async program as Petri net, where main components are tokens, places, and transitions. From programming point of view, transition should be split further into firing rule and action. Logical chain appears to be too long, programmers prefer ...