qid
int64
20
74.4M
question
stringlengths
36
16.3k
date
stringlengths
10
10
metadata
listlengths
3
3
response_j
stringlengths
33
24k
response_k
stringlengths
33
23k
20,506,847
How can I retrieve all keys in a Hash in Ruby, also the nested ones. Duplicates should be ignored, e.g. ``` { a: 3, b: { b: 2, b: { c: 5 } } }.soberize => [:a, :b, :c] ``` What would be the fastest implementation?
2013/12/10
[ "https://Stackoverflow.com/questions/20506847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1642429/" ]
Simple recursive solution: ``` def recursive_keys(data) data.keys + data.values.map{|value| recursive_keys(value) if value.is_a?(Hash) } end def all_keys(data) recursive_keys(data).flatten.compact.uniq end ``` Usage: ``` all_keys({ a: 3, b: { b: 2, b: { c: 5 } } }) => [:a, :b, :c] ```
What about a recursive method? ``` def nested_keys(hash, array) if hash.is_a?(Hash) array |= hash.keys hash.keys.map do |key| array = nested_keys(hash[key], array) end end array end ```
11,602,072
I'm reading through K&R and the question is to: write a program to copy its input to its output, replacing each string of one or more blanks by a single blank. In my mind I think I know what I need to do, set up a boolean to know when I am in a space or not. I've attempted it and did not succeed. I've found this code a...
2012/07/22
[ "https://Stackoverflow.com/questions/11602072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1259395/" ]
At this point: ``` if(c == ' ') { if(inspace == 0) // <-- here ``` If inspace is equal to 1, it will not execute the if body, it will jump to: ``` if(c != ' ') { ``` And as long as c == ' ' above will be false, so it will skip the if body and jump to: ``` while((c = getchar()) != EOF) { ``` And this will c...
Yeah in the case you mentioned, it does not write anything and continues in the while loop and fetches the next character. If the next character is again space then it will do the same thing i.e go to next iteration without printing. Whenever it will find first non-space it will set inspace to 0 and start printing. W...
11,602,072
I'm reading through K&R and the question is to: write a program to copy its input to its output, replacing each string of one or more blanks by a single blank. In my mind I think I know what I need to do, set up a boolean to know when I am in a space or not. I've attempted it and did not succeed. I've found this code a...
2012/07/22
[ "https://Stackoverflow.com/questions/11602072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1259395/" ]
At this point: ``` if(c == ' ') { if(inspace == 0) // <-- here ``` If inspace is equal to 1, it will not execute the if body, it will jump to: ``` if(c != ' ') { ``` And as long as c == ' ' above will be false, so it will skip the if body and jump to: ``` while((c = getchar()) != EOF) { ``` And this will c...
If a condition in an if-statement is not true, the following expression is not executed. This means that everything inside the corresponding brackets is skipped and the execution resumes 'after' the closing bracket. As the following if-statement is also false, nothing is done inside this iteration of the for-loop.
11,602,072
I'm reading through K&R and the question is to: write a program to copy its input to its output, replacing each string of one or more blanks by a single blank. In my mind I think I know what I need to do, set up a boolean to know when I am in a space or not. I've attempted it and did not succeed. I've found this code a...
2012/07/22
[ "https://Stackoverflow.com/questions/11602072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1259395/" ]
At this point: ``` if(c == ' ') { if(inspace == 0) // <-- here ``` If inspace is equal to 1, it will not execute the if body, it will jump to: ``` if(c != ' ') { ``` And as long as c == ' ' above will be false, so it will skip the if body and jump to: ``` while((c = getchar()) != EOF) { ``` And this will c...
When inspace is 1 and c is ' ' the expression: ``` inspace == 0 ``` evaluates to 0 and the code ``` inspace = 1; putchar(c); ``` does not get executed. The program will then go to the next iteration of the while loop if it can, but it won't return 0 until the while loop has ended. You can simplify the while ...
284,563
I am going to move from Blogger to WordPress and I also don't want to set earlier Blogger Permalink structure in WordPress. Now I want to know if there is any way to redirect URLs as mentioned below. Current (In Blogger): ``` http://www.example.com/2017/10/seba-online-form-fill-up-2018.html ``` After (In WordPress)...
2017/11/01
[ "https://wordpress.stackexchange.com/questions/284563", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/-1/" ]
If `/seba-online-form-fill-up-2018.html` is an actual WordPress URL then this is relatively trivial to do in `.htaccess`. For example, the following one-liner using mod\_rewrite could be used. This should be placed *before* the existing WordPress directives in `.htaccess`: ``` RewriteRule ^\d{4}/\d{1,2}/(.+\.html)$ /$...
Well, there are some Data base migrator plugins for that porpuse like [Migrate DB](https://wordpress.org/plugins/wp-migrate-db/), obviuosly this is for changes inside a SQL data base used for wordpress and basically this plugin will look for the old URL to change it for the new URLS. So you can search and replace like:...
36,739,985
Here is my code at the moment ``` percentagesOff = [5,10,15.....] for percentage in percentagesOff: print("Percent off: ",percentage, end= " ") ``` and the output looks like this ``` Percent off: 5 Percent off: 10 Percent off: 15 ``` and so on. This is an example of what I want my code to look like. (have ...
2016/04/20
[ "https://Stackoverflow.com/questions/36739985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6027397/" ]
Here ``` percentagesOff = [5, 10, 15, 20] print("Percent off:\t", percentagesOff[0], '%') for percentage in percentagesOff[1:]: print("\t\t", percentage, "%") ``` Output ``` Percent off: 5 % 10 % 15 % 20 % ```
The fact is that python print add line break after your string to be printed. So, Import `import sys` and, before your loop, use that: ``` sys.stdout.write(' $10 $100 $1000\n') sys.stdout.write('Percent off:') ``` And now, you can start using print to write your table entries. You can simply a...
36,739,985
Here is my code at the moment ``` percentagesOff = [5,10,15.....] for percentage in percentagesOff: print("Percent off: ",percentage, end= " ") ``` and the output looks like this ``` Percent off: 5 Percent off: 10 Percent off: 15 ``` and so on. This is an example of what I want my code to look like. (have ...
2016/04/20
[ "https://Stackoverflow.com/questions/36739985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6027397/" ]
I really dislike teachers who tell students to accomplish something without having shown them the *right* tool for the job. I'm guessing you haven't yet been introduced to the `string.format()` method? Without which, lining up your columns will be an utter pain. You're trying to use a hammer when you need a screwdriver...
It is interesting excercise...... You can do something like this. ``` first = True for p in pe: if first == True: print("percent off: ") first = False print(p) else: .... .... ``` But you would not normally do it this way.
36,739,985
Here is my code at the moment ``` percentagesOff = [5,10,15.....] for percentage in percentagesOff: print("Percent off: ",percentage, end= " ") ``` and the output looks like this ``` Percent off: 5 Percent off: 10 Percent off: 15 ``` and so on. This is an example of what I want my code to look like. (have ...
2016/04/20
[ "https://Stackoverflow.com/questions/36739985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6027397/" ]
It is interesting excercise...... You can do something like this. ``` first = True for p in pe: if first == True: print("percent off: ") first = False print(p) else: .... .... ``` But you would not normally do it this way.
The fact is that python print add line break after your string to be printed. So, Import `import sys` and, before your loop, use that: ``` sys.stdout.write(' $10 $100 $1000\n') sys.stdout.write('Percent off:') ``` And now, you can start using print to write your table entries. You can simply a...
36,739,985
Here is my code at the moment ``` percentagesOff = [5,10,15.....] for percentage in percentagesOff: print("Percent off: ",percentage, end= " ") ``` and the output looks like this ``` Percent off: 5 Percent off: 10 Percent off: 15 ``` and so on. This is an example of what I want my code to look like. (have ...
2016/04/20
[ "https://Stackoverflow.com/questions/36739985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6027397/" ]
Here ``` percentagesOff = [5, 10, 15, 20] print("Percent off:\t", percentagesOff[0], '%') for percentage in percentagesOff[1:]: print("\t\t", percentage, "%") ``` Output ``` Percent off: 5 % 10 % 15 % 20 % ```
It is interesting excercise...... You can do something like this. ``` first = True for p in pe: if first == True: print("percent off: ") first = False print(p) else: .... .... ``` But you would not normally do it this way.
36,739,985
Here is my code at the moment ``` percentagesOff = [5,10,15.....] for percentage in percentagesOff: print("Percent off: ",percentage, end= " ") ``` and the output looks like this ``` Percent off: 5 Percent off: 10 Percent off: 15 ``` and so on. This is an example of what I want my code to look like. (have ...
2016/04/20
[ "https://Stackoverflow.com/questions/36739985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6027397/" ]
Here is one alternate solution: ``` percentagesOff = [1,2,3,4,5,6,7,8,9,10] print 'Percent off: ', percentagesOff[0] #use blanks instead of '\t' for percentage in percentagesOff[1:]: print ' '*len('Percent off: '), percentage ``` The last line, leaves one blank space for every character of...
The fact is that python print add line break after your string to be printed. So, Import `import sys` and, before your loop, use that: ``` sys.stdout.write(' $10 $100 $1000\n') sys.stdout.write('Percent off:') ``` And now, you can start using print to write your table entries. You can simply a...
36,739,985
Here is my code at the moment ``` percentagesOff = [5,10,15.....] for percentage in percentagesOff: print("Percent off: ",percentage, end= " ") ``` and the output looks like this ``` Percent off: 5 Percent off: 10 Percent off: 15 ``` and so on. This is an example of what I want my code to look like. (have ...
2016/04/20
[ "https://Stackoverflow.com/questions/36739985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6027397/" ]
I really dislike teachers who tell students to accomplish something without having shown them the *right* tool for the job. I'm guessing you haven't yet been introduced to the `string.format()` method? Without which, lining up your columns will be an utter pain. You're trying to use a hammer when you need a screwdriver...
Here is one alternate solution: ``` percentagesOff = [1,2,3,4,5,6,7,8,9,10] print 'Percent off: ', percentagesOff[0] #use blanks instead of '\t' for percentage in percentagesOff[1:]: print ' '*len('Percent off: '), percentage ``` The last line, leaves one blank space for every character of...
36,739,985
Here is my code at the moment ``` percentagesOff = [5,10,15.....] for percentage in percentagesOff: print("Percent off: ",percentage, end= " ") ``` and the output looks like this ``` Percent off: 5 Percent off: 10 Percent off: 15 ``` and so on. This is an example of what I want my code to look like. (have ...
2016/04/20
[ "https://Stackoverflow.com/questions/36739985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6027397/" ]
I really dislike teachers who tell students to accomplish something without having shown them the *right* tool for the job. I'm guessing you haven't yet been introduced to the `string.format()` method? Without which, lining up your columns will be an utter pain. You're trying to use a hammer when you need a screwdriver...
You can just pull it out of the for loop, then it gets printed only once, or you could "remember" that you already printed it by setting some boolean variable to `True`(initialized at `False`) and then checking whether that variable is `True` or `False` before printing that part of the string.
36,739,985
Here is my code at the moment ``` percentagesOff = [5,10,15.....] for percentage in percentagesOff: print("Percent off: ",percentage, end= " ") ``` and the output looks like this ``` Percent off: 5 Percent off: 10 Percent off: 15 ``` and so on. This is an example of what I want my code to look like. (have ...
2016/04/20
[ "https://Stackoverflow.com/questions/36739985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6027397/" ]
I really dislike teachers who tell students to accomplish something without having shown them the *right* tool for the job. I'm guessing you haven't yet been introduced to the `string.format()` method? Without which, lining up your columns will be an utter pain. You're trying to use a hammer when you need a screwdriver...
The fact is that python print add line break after your string to be printed. So, Import `import sys` and, before your loop, use that: ``` sys.stdout.write(' $10 $100 $1000\n') sys.stdout.write('Percent off:') ``` And now, you can start using print to write your table entries. You can simply a...
36,739,985
Here is my code at the moment ``` percentagesOff = [5,10,15.....] for percentage in percentagesOff: print("Percent off: ",percentage, end= " ") ``` and the output looks like this ``` Percent off: 5 Percent off: 10 Percent off: 15 ``` and so on. This is an example of what I want my code to look like. (have ...
2016/04/20
[ "https://Stackoverflow.com/questions/36739985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6027397/" ]
Here is one alternate solution: ``` percentagesOff = [1,2,3,4,5,6,7,8,9,10] print 'Percent off: ', percentagesOff[0] #use blanks instead of '\t' for percentage in percentagesOff[1:]: print ' '*len('Percent off: '), percentage ``` The last line, leaves one blank space for every character of...
It is interesting excercise...... You can do something like this. ``` first = True for p in pe: if first == True: print("percent off: ") first = False print(p) else: .... .... ``` But you would not normally do it this way.
36,739,985
Here is my code at the moment ``` percentagesOff = [5,10,15.....] for percentage in percentagesOff: print("Percent off: ",percentage, end= " ") ``` and the output looks like this ``` Percent off: 5 Percent off: 10 Percent off: 15 ``` and so on. This is an example of what I want my code to look like. (have ...
2016/04/20
[ "https://Stackoverflow.com/questions/36739985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6027397/" ]
You can just pull it out of the for loop, then it gets printed only once, or you could "remember" that you already printed it by setting some boolean variable to `True`(initialized at `False`) and then checking whether that variable is `True` or `False` before printing that part of the string.
The fact is that python print add line break after your string to be printed. So, Import `import sys` and, before your loop, use that: ``` sys.stdout.write(' $10 $100 $1000\n') sys.stdout.write('Percent off:') ``` And now, you can start using print to write your table entries. You can simply a...
22,105,306
So I have this script that is a counter that follows an infinite animation. The counter resets to 0 everytime an interation finishes. On the line fourth from the bottom I am trying to invoke a x.classList.toggle() to change css when the counter hits 20. When I replace the classList.toggle with an alert() function it wo...
2014/02/28
[ "https://Stackoverflow.com/questions/22105306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3355076/" ]
You can't append a `list` to a `tuple` because tuples are ["immutable"](http://docs.python.org/2/library/functions.html#tuple) (they can't be changed). It is however easy to append a *tuple* to a *list*: ``` vertices = [(0, 0), (0, 0), (0, 0)] for x in range(10): vertices.append((x, y)) ``` You can add tuples to...
You can't modify a tuple. You'll either need to replace the tuple with a new one containing the additional vertex, or change it to a list. A list is simply a modifiable tuple. ``` vertices = [[0,0],[0,0],[0,0]] for ...: vertices.append([x, y]) ```
22,105,306
So I have this script that is a counter that follows an infinite animation. The counter resets to 0 everytime an interation finishes. On the line fourth from the bottom I am trying to invoke a x.classList.toggle() to change css when the counter hits 20. When I replace the classList.toggle with an alert() function it wo...
2014/02/28
[ "https://Stackoverflow.com/questions/22105306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3355076/" ]
You can't modify a tuple. You'll either need to replace the tuple with a new one containing the additional vertex, or change it to a list. A list is simply a modifiable tuple. ``` vertices = [[0,0],[0,0],[0,0]] for ...: vertices.append([x, y]) ```
Not sure I understand you, but if you want to append x,y to each vertex you can do something like : ``` vertices = ([0,0],[0,0],[0,0]) for v in vertices: v[0] += x v[1] += y ```
22,105,306
So I have this script that is a counter that follows an infinite animation. The counter resets to 0 everytime an interation finishes. On the line fourth from the bottom I am trying to invoke a x.classList.toggle() to change css when the counter hits 20. When I replace the classList.toggle with an alert() function it wo...
2014/02/28
[ "https://Stackoverflow.com/questions/22105306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3355076/" ]
You can't append a `list` to a `tuple` because tuples are ["immutable"](http://docs.python.org/2/library/functions.html#tuple) (they can't be changed). It is however easy to append a *tuple* to a *list*: ``` vertices = [(0, 0), (0, 0), (0, 0)] for x in range(10): vertices.append((x, y)) ``` You can add tuples to...
You can concatenate two tuples: ``` >>> vertices = ([0,0],[0,0],[0,0]) >>> lst = [10, 20] >>> vertices = vertices + tuple([lst]) >>> vertices ([0, 0], [0, 0], [0, 0], [10, 20]) ```
22,105,306
So I have this script that is a counter that follows an infinite animation. The counter resets to 0 everytime an interation finishes. On the line fourth from the bottom I am trying to invoke a x.classList.toggle() to change css when the counter hits 20. When I replace the classList.toggle with an alert() function it wo...
2014/02/28
[ "https://Stackoverflow.com/questions/22105306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3355076/" ]
You can't append a `list` to a `tuple` because tuples are ["immutable"](http://docs.python.org/2/library/functions.html#tuple) (they can't be changed). It is however easy to append a *tuple* to a *list*: ``` vertices = [(0, 0), (0, 0), (0, 0)] for x in range(10): vertices.append((x, y)) ``` You can add tuples to...
You probably want a list, as mentioned above. But if you really need a tuple, you can create a new tuple by concatenating tuples: ``` vertices = ([0,0],[0,0],[0,0]) for x in (1, 2): for y in (3, 4): vertices += ([x,y],) ``` Alternatively, and for more efficiency, use a list while you're building the tupl...
22,105,306
So I have this script that is a counter that follows an infinite animation. The counter resets to 0 everytime an interation finishes. On the line fourth from the bottom I am trying to invoke a x.classList.toggle() to change css when the counter hits 20. When I replace the classList.toggle with an alert() function it wo...
2014/02/28
[ "https://Stackoverflow.com/questions/22105306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3355076/" ]
You can't append a `list` to a `tuple` because tuples are ["immutable"](http://docs.python.org/2/library/functions.html#tuple) (they can't be changed). It is however easy to append a *tuple* to a *list*: ``` vertices = [(0, 0), (0, 0), (0, 0)] for x in range(10): vertices.append((x, y)) ``` You can add tuples to...
Not sure I understand you, but if you want to append x,y to each vertex you can do something like : ``` vertices = ([0,0],[0,0],[0,0]) for v in vertices: v[0] += x v[1] += y ```
22,105,306
So I have this script that is a counter that follows an infinite animation. The counter resets to 0 everytime an interation finishes. On the line fourth from the bottom I am trying to invoke a x.classList.toggle() to change css when the counter hits 20. When I replace the classList.toggle with an alert() function it wo...
2014/02/28
[ "https://Stackoverflow.com/questions/22105306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3355076/" ]
You can concatenate two tuples: ``` >>> vertices = ([0,0],[0,0],[0,0]) >>> lst = [10, 20] >>> vertices = vertices + tuple([lst]) >>> vertices ([0, 0], [0, 0], [0, 0], [10, 20]) ```
Not sure I understand you, but if you want to append x,y to each vertex you can do something like : ``` vertices = ([0,0],[0,0],[0,0]) for v in vertices: v[0] += x v[1] += y ```
22,105,306
So I have this script that is a counter that follows an infinite animation. The counter resets to 0 everytime an interation finishes. On the line fourth from the bottom I am trying to invoke a x.classList.toggle() to change css when the counter hits 20. When I replace the classList.toggle with an alert() function it wo...
2014/02/28
[ "https://Stackoverflow.com/questions/22105306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3355076/" ]
You probably want a list, as mentioned above. But if you really need a tuple, you can create a new tuple by concatenating tuples: ``` vertices = ([0,0],[0,0],[0,0]) for x in (1, 2): for y in (3, 4): vertices += ([x,y],) ``` Alternatively, and for more efficiency, use a list while you're building the tupl...
Not sure I understand you, but if you want to append x,y to each vertex you can do something like : ``` vertices = ([0,0],[0,0],[0,0]) for v in vertices: v[0] += x v[1] += y ```
7,233,392
Is there any way I can authenticate a Facebook user without requiring them to connect in the front end? I'm trying to report the number of "likes" for an alcohol-gated page and will need to access the information with an over-21 access token, but do not want to have to log in every time I access the data. Or is there...
2011/08/29
[ "https://Stackoverflow.com/questions/7233392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/402606/" ]
When you're requesting the access token you're going to use to check the Page, request the `offline_access` extended permission and the token won't expire when you/the user logs out.
If you're using the [Graph API](https://developers.facebook.com/docs/reference/api/), when you initially get the `access_token`, add `offline_access` to the list of permissions you're requesting via the `scope` parameter. From the [permissions](https://developers.facebook.com/docs/reference/api/permissions/) documentat...
23,673,577
I have an object that is apparently double deleted despite being kept track of by smart pointers. I am new to using smart pointers so I made a simple function to test whether I am using the object correctly. ``` int *a = new int(2); std::shared_ptr<int> b(a); std::shared_ptr<int> c(a); ``` This set of lines in the ...
2014/05/15
[ "https://Stackoverflow.com/questions/23673577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3639950/" ]
A `shared_ptr` expects to *own* the pointed-at object. What you've done is to create *two* separate smart pointers, each of which thinks it has exclusive ownership of the underlying `int`. They don't know about each other's existence, they don't talk to each other. Therefore, when they go out of scope, both pointers d...
Correct usage is: ``` std::shared_ptr<int> b = std::make_shared<int>(2); std::shared_ptr<int> c = b; ```
23,673,577
I have an object that is apparently double deleted despite being kept track of by smart pointers. I am new to using smart pointers so I made a simple function to test whether I am using the object correctly. ``` int *a = new int(2); std::shared_ptr<int> b(a); std::shared_ptr<int> c(a); ``` This set of lines in the ...
2014/05/15
[ "https://Stackoverflow.com/questions/23673577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3639950/" ]
You are only allowd to make a smartpointer once from a raw pointer. All other shared pointers have to be copies of the first one in order for them to work correctly. Even better: use make shared: ``` std::shared_ptr<int> sp1 = std::make_shared<int>(2); std::shared_ptr<int> sp2 = sp1; ``` EDIT: forgot to add the se...
Correct usage is: ``` std::shared_ptr<int> b = std::make_shared<int>(2); std::shared_ptr<int> c = b; ```
23,673,577
I have an object that is apparently double deleted despite being kept track of by smart pointers. I am new to using smart pointers so I made a simple function to test whether I am using the object correctly. ``` int *a = new int(2); std::shared_ptr<int> b(a); std::shared_ptr<int> c(a); ``` This set of lines in the ...
2014/05/15
[ "https://Stackoverflow.com/questions/23673577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3639950/" ]
A `shared_ptr` expects to *own* the pointed-at object. What you've done is to create *two* separate smart pointers, each of which thinks it has exclusive ownership of the underlying `int`. They don't know about each other's existence, they don't talk to each other. Therefore, when they go out of scope, both pointers d...
You are only allowd to make a smartpointer once from a raw pointer. All other shared pointers have to be copies of the first one in order for them to work correctly. Even better: use make shared: ``` std::shared_ptr<int> sp1 = std::make_shared<int>(2); std::shared_ptr<int> sp2 = sp1; ``` EDIT: forgot to add the se...
230,264
I was reading about CMS and ERP. And got confused at this point that whether a system can both be an ERP and a CMS? is it possible?
2014/02/25
[ "https://softwareengineering.stackexchange.com/questions/230264", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/121236/" ]
Sure - you can program whatever you like. Whether it makes any sense is a different question. As for whether having an ERP/CMS hybrid makes sense or already exists - I don't think so. There are some vague similarities and overlaps in that both will typically allow you to define your own entities with fields ("document...
An example, though maybe a contrived one but one I encounterd in the wild a long time ago: An application was built that would store incoming documents pertaining to required reports sent in by customers of a financial services company. The same application also served to automatically send out reminder letters t...
230,264
I was reading about CMS and ERP. And got confused at this point that whether a system can both be an ERP and a CMS? is it possible?
2014/02/25
[ "https://softwareengineering.stackexchange.com/questions/230264", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/121236/" ]
In a very theoretical sense yes. But in most cases this would not make very much sense. The basic functionality of an ERP system is business management. The data produced here may become part of the data displayed on a web site. But normally the data here is pure text and numbers, like definitions of products, orders, ...
An example, though maybe a contrived one but one I encounterd in the wild a long time ago: An application was built that would store incoming documents pertaining to required reports sent in by customers of a financial services company. The same application also served to automatically send out reminder letters t...
230,264
I was reading about CMS and ERP. And got confused at this point that whether a system can both be an ERP and a CMS? is it possible?
2014/02/25
[ "https://softwareengineering.stackexchange.com/questions/230264", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/121236/" ]
In a very theoretical sense yes. But in most cases this would not make very much sense. The basic functionality of an ERP system is business management. The data produced here may become part of the data displayed on a web site. But normally the data here is pure text and numbers, like definitions of products, orders, ...
Sure - you can program whatever you like. Whether it makes any sense is a different question. As for whether having an ERP/CMS hybrid makes sense or already exists - I don't think so. There are some vague similarities and overlaps in that both will typically allow you to define your own entities with fields ("document...
230,264
I was reading about CMS and ERP. And got confused at this point that whether a system can both be an ERP and a CMS? is it possible?
2014/02/25
[ "https://softwareengineering.stackexchange.com/questions/230264", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/121236/" ]
Sure - you can program whatever you like. Whether it makes any sense is a different question. As for whether having an ERP/CMS hybrid makes sense or already exists - I don't think so. There are some vague similarities and overlaps in that both will typically allow you to define your own entities with fields ("document...
In most cases this would not make very much sense,ERP system generally use in business management.An CMS able to edit not only content but the entire design can be edited.Information that is not important for business prospective are edited by CMS.
230,264
I was reading about CMS and ERP. And got confused at this point that whether a system can both be an ERP and a CMS? is it possible?
2014/02/25
[ "https://softwareengineering.stackexchange.com/questions/230264", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/121236/" ]
In a very theoretical sense yes. But in most cases this would not make very much sense. The basic functionality of an ERP system is business management. The data produced here may become part of the data displayed on a web site. But normally the data here is pure text and numbers, like definitions of products, orders, ...
In most cases this would not make very much sense,ERP system generally use in business management.An CMS able to edit not only content but the entire design can be edited.Information that is not important for business prospective are edited by CMS.
286,606
In the application there is a dialog where only numeric string entries are valid. Therefore I would like to set the numeric keyboard layout. Does anyone know how to simulate key press on the keyboard or any other method to change the keyboard layout? Thanks!
2008/11/13
[ "https://Stackoverflow.com/questions/286606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22996/" ]
You don't need to. Just like full windows, you can set the edit control to be numeric input only. You can either do it [manually](http://msdn.microsoft.com/en-us/library/bb761655(VS.85).aspx) or in the dialog editor in the properites for the edit control. The SIP should automatically display the numeric keyboard when...
You can use the InputModeEditor: ``` InputModeEditor.SetInputMode(textBox1,InputMode.Numeric); ```
286,606
In the application there is a dialog where only numeric string entries are valid. Therefore I would like to set the numeric keyboard layout. Does anyone know how to simulate key press on the keyboard or any other method to change the keyboard layout? Thanks!
2008/11/13
[ "https://Stackoverflow.com/questions/286606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22996/" ]
You don't need to. Just like full windows, you can set the edit control to be numeric input only. You can either do it [manually](http://msdn.microsoft.com/en-us/library/bb761655(VS.85).aspx) or in the dialog editor in the properites for the edit control. The SIP should automatically display the numeric keyboard when...
There is only one way to do this (edit: this is referring to the SIP in non-smartphone Windows Mobile, so I'm not sure it's relevant to your question), and it does involve simulating a mouse click on the 123 button. This is only half the problem, however, since you also need to know whether the keyboard is already in n...
844,323
If $\cos{(A-B)}=\frac{3}{5}$ and $\sin{(A+B)}=\frac{12}{13}$, then find $\cos{(2B)}$. Correct answer = 63/65. I tried all identities I know but I have no idea how to proceed.
2014/06/23
[ "https://math.stackexchange.com/questions/844323", "https://math.stackexchange.com", "https://math.stackexchange.com/users/159625/" ]
Every $B(4,k)$ admits a graceful labeling. We prove this by induction on $k$. Our induction hypothesis is: every $B(4,k)$ admits a graceful labeling where the vertex of degree 1 has label 0. For $k=1$ we cyclically assign the labels $1,4,3,5$ to the vertices of the cycle. Then add one pending edge to the vertex with l...
Unfortunately I do not know how to access the referred document, so I have done some (computer-assisted) research on this, specifically for $B(5,k)$. This graph has $k+5$ vertices, so it will use vertex labels from $[0,k+5]$ (omitting only one of them). In the arrays following the vertices along the cycle have index $...
51,548,884
``` try: folderSizeInMB= int(subprocess.check_output('du -csh --block-size=1M', shell=True).decode().split()[0]) print('\t\tTotal download progress (MB):\t' + str(folderSizeInMB), end = '\r') except Exception as e: print('\t\tDownloading' + '.'*(loopCount - gv.parallelDownloads + 3), end = '\r') ``` I hav...
2018/07/26
[ "https://Stackoverflow.com/questions/51548884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2868465/" ]
The error is being shown by the shell, printing to stderr. Because you’re not redirecting its stderr, it just goes straight through to your own program’s stderr, which goes to your terminal. If you don’t want this—or any other shell features—then the simplest solution is to just not use the shell. Pass a list of argum...
You can try redirecting the stderr to null to prevent the error from displaying. ``` import sys class DevNull: def write(self, msg): pass sys.stderr = DevNull() ```
81,247
I work with reconstructing fossil skeletons of human ancestors. Bones are usually incomplete and I need to assemble whole virtual bones from laser scans of different fossil parts of the bone I have scanned. How can I efficiently delete parts I don't need so that I can assemble whole virtual bones? I know it's easy to d...
2017/06/12
[ "https://blender.stackexchange.com/questions/81247", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/40161/" ]
Hope this helps: You can try centering the mesh in an axis (X or Y most commonly) and then use `numpad 1` or `numpad 3` to get an isometric view of the mesh along that axis. (Depending on your blender config, you might need to also press `numpad 5`) Then you can press `z` and `tab` to go into wireframe mode and edit ...
You can use `Shift`+`Ctrl`+`Alt`+`M` to select non manifold vertices, essentially finding all holes and floating vertices in a mesh.
6,527,788
In Objective C I want to create a simple application that posts a string to a php file using ASIHTTPRequest. I have no need for an interface and am finding it hard to find any example code. Does anyone know where I can find code, or can anyone give me an example of such code?
2011/06/29
[ "https://Stackoverflow.com/questions/6527788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/559142/" ]
The ASIHTTPRequest documentation covers this. Specifically, [Sending a form POST with ASIFormDataRequest](http://allseeing-i.com/ASIHTTPRequest/How-to-use#sending_a_form_post_with_ASIFormDataRequest).
[This site](http://www.webdesignideas.org/2011/08/18/simple-login-app-for-iphone-tutorial/comment-page-1/#comment-34811) has a really great walkthrough on how to use ASIHTTPREQUEST to authenticate data against a database. the walkthrough breaks the entire process down file by file for you.
451,792
I am using Survival Analysis to analyse a data set, but i'm having a bit of trouble. The data consists of everyone who has/has not been terminated from employment within a 4 year period. The aim of the analysis is to uncover the median time to termination. The data includes 400 people who has experienced the event a...
2020/02/28
[ "https://stats.stackexchange.com/questions/451792", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/237783/" ]
Median survival here is the time at which 50% of your participants would still be non-terminated. The lower the risk (hazard) of an event (in your case being "terminated"), the longer it will take to get to the point where 50% of participants have had that event. An example: simulate data similar to yours: ``` set....
The name of the statistic "median survival time" can be a bit misleading - the median survival time of a population is *not* simply the median of survival times. That is, you can't simply take all the tenure lengths, find the median one, and be done. This is because many people leave for other reasons than being fired,...
69,224
I have this metric: $$ds^2=-dt^2+e^tdx^2$$ and I want to find the equation of motion (of x). for that i thought I have two options: 1. using E.L. with the Lagrangian: $L=-\dot t ^2+e^t\dot x ^2 $. 2. using the fact that for a photon $ds^2=0$ to get: $0=-dt^2+e^tdx^2$ and then: $dt=\pm e^{t/2} dx$. The problem is tha...
2013/06/26
[ "https://physics.stackexchange.com/questions/69224", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/26299/" ]
If your solution is not a null geodesic then it is wrong for a massless particle. The reason you go astray is that Lagrangian you give in (1) is incorrect for massless particles. The general action for a particle (massive or massless) is: $$ S = -\frac{1}{2} \int \mathrm{d}\xi\ \left( \sigma(\xi) \left(\frac{\mathrm{...
There is an elegant way of doing this using symmetries. Notice that this metric is space translation invariant, so it has a killing vector $\partial\_x$. There is a corresponding conserved quantity $c\_x$ along geodesics $x^\mu(\lambda)$ given by \begin{align} c\_x = g\_{\mu\nu}\dot x^\mu(\partial\_x)^\nu = e^t\dot x...
69,224
I have this metric: $$ds^2=-dt^2+e^tdx^2$$ and I want to find the equation of motion (of x). for that i thought I have two options: 1. using E.L. with the Lagrangian: $L=-\dot t ^2+e^t\dot x ^2 $. 2. using the fact that for a photon $ds^2=0$ to get: $0=-dt^2+e^tdx^2$ and then: $dt=\pm e^{t/2} dx$. The problem is tha...
2013/06/26
[ "https://physics.stackexchange.com/questions/69224", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/26299/" ]
If your solution is not a null geodesic then it is wrong for a massless particle. The reason you go astray is that Lagrangian you give in (1) is incorrect for massless particles. The general action for a particle (massive or massless) is: $$ S = -\frac{1}{2} \int \mathrm{d}\xi\ \left( \sigma(\xi) \left(\frac{\mathrm{...
I) Well, in 1+1 dimensions the light-cone (based at some point) is just two intersecting curves, which are precisely determined by the condition $$\tag{1} g\_{\mu\nu}\dot{x}^{\mu}\dot{x}^{\nu}~=~0,$$ and an initial condition cf. OP's second method. However, this eq. (1) will not determine light-like geodesics in high...
72,924,818
I've been trying for a long time to write the results to my file, but since it's a multithreaded task, the files are written in a mixed way The task that adds the file is in the get\_url function And this fonction is launched via pool.submit(get\_url,line) ``` import requests from concurrent.futures import ThreadPoo...
2022/07/09
[ "https://Stackoverflow.com/questions/72924818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19518180/" ]
You can use [`multiprocessing.Pool`](https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool) and `pool.imap_unordered` to receive processed results and write it to the file. That way the results are written only inside main thread and won't be interleaved. For example: ```py import requests i...
I agree with Andrej Kesely that we should not write to file within `get_url`. Here is my approach: ```py from concurrent.futures import ThreadPoolExecutor, as_completed def get_url(url): # Processing... title = ... return url, title if __name__ == "__main__": with open("urls.txt") as stream: ...
13,869,060
I have the following code that is trying to remove some JSESSIONID cookies from my browser. ``` String[] cookieList = "/App1/,/App2/,/App3/".split(","); for (int i = 0; i < cookieList.length; i++) { String cookiePathString = cookieList[i]; response.setContentType("text/html"); Cookie cookieToKill = ne...
2012/12/13
[ "https://Stackoverflow.com/questions/13869060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1408524/" ]
Cookie is completely messed up. The best practices for a server: 1. use Set-Cookie, not Set-Cookie2. 2. if there are multiple cookies, use a separate Set-Cookie header for each cookie. 3. use Expires, not Max-Age. 4. use the date format: `Sun, 06 Nov 1994 08:49:37 GMT` For example: ``` Set-Cookie: JSESSIONID=NO_DAT...
[This SO question](https://stackoverflow.com/questions/1716555/setting-persistent-cookie-from-java-doesnt-work-in-ie) indicates that the solution may be to call `setHttpOnly(true)`.
62,853
Also, if there is truth behind Republican support to make voting more restrictive for people in general, how long ago might this party have started advocating legislation with more restrictions? Why --- Listening to the video on [this post](https://www.cnn.com/2021/03/02/politics/supreme-court-brnovich-v-dnc-case-ana...
2021/03/03
[ "https://politics.stackexchange.com/questions/62853", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/7229/" ]
Speaking nationally, Democrats currently have a 6%-7% advantage over Republicans in terms of voter representation. In fact, Democrats have a lead among every demographic group except *white males without a college education*. However, Democratic voters tend to be clustered in urban and suburban areas, which attenuates ...
> > How long ago might this party have started advocating legislation with more restrictions? > > > For the Republican party in particular it began with [the Southern strategy](https://en.wikipedia.org/wiki/Southern_strategy) to wrest control of southern states from the Democrats by attracting conservative white v...
62,853
Also, if there is truth behind Republican support to make voting more restrictive for people in general, how long ago might this party have started advocating legislation with more restrictions? Why --- Listening to the video on [this post](https://www.cnn.com/2021/03/02/politics/supreme-court-brnovich-v-dnc-case-ana...
2021/03/03
[ "https://politics.stackexchange.com/questions/62853", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/7229/" ]
Speaking nationally, Democrats currently have a 6%-7% advantage over Republicans in terms of voter representation. In fact, Democrats have a lead among every demographic group except *white males without a college education*. However, Democratic voters tend to be clustered in urban and suburban areas, which attenuates ...
Not necessarily. If any once dominant political party wishes to win more elections without imposing "voting restrictions", they might also consider changing with the times to better represent the wider preferences of the general public.
62,853
Also, if there is truth behind Republican support to make voting more restrictive for people in general, how long ago might this party have started advocating legislation with more restrictions? Why --- Listening to the video on [this post](https://www.cnn.com/2021/03/02/politics/supreme-court-brnovich-v-dnc-case-ana...
2021/03/03
[ "https://politics.stackexchange.com/questions/62853", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/7229/" ]
> > How long ago might this party have started advocating legislation with more restrictions? > > > For the Republican party in particular it began with [the Southern strategy](https://en.wikipedia.org/wiki/Southern_strategy) to wrest control of southern states from the Democrats by attracting conservative white v...
Not necessarily. If any once dominant political party wishes to win more elections without imposing "voting restrictions", they might also consider changing with the times to better represent the wider preferences of the general public.
19,585,979
I'm using ant to package a JavaFX-based application. No problem with doing the actual JavaFX stuff, except that `fx:jar` doesn't support the `if` or `condition` tags. I want to dynamically include some platform-specific libraries, depending on a variable i set. Currently I have this: ``` <fx:fileset dir="/my/classes/f...
2013/10/25
[ "https://Stackoverflow.com/questions/19585979", "https://Stackoverflow.com", "https://Stackoverflow.com/users/568355/" ]
Many readers of this forum expect to see *some* code that you tried.... ``` program flow version 8 // will work on almost all Stata in current use gettoken what garbage : 0 if "`what'" == "" | "`garbage'" != "" | !inlist("`what'", "e", "i") { di as err "syntax is flow e or flow i" exit...
Given your comment on the answer by @NickCox, I assume you tried something like this: ``` program flow version 8 syntax [, i e] if "`i'`e'" == "" { di as err "either the i or the e option needs to be specified" exit 198 } if "`i'" != "" & "`e'" != "" { di as err "the i and e...
19,585,979
I'm using ant to package a JavaFX-based application. No problem with doing the actual JavaFX stuff, except that `fx:jar` doesn't support the `if` or `condition` tags. I want to dynamically include some platform-specific libraries, depending on a variable i set. Currently I have this: ``` <fx:fileset dir="/my/classes/f...
2013/10/25
[ "https://Stackoverflow.com/questions/19585979", "https://Stackoverflow.com", "https://Stackoverflow.com/users/568355/" ]
Many readers of this forum expect to see *some* code that you tried.... ``` program flow version 8 // will work on almost all Stata in current use gettoken what garbage : 0 if "`what'" == "" | "`garbage'" != "" | !inlist("`what'", "e", "i") { di as err "syntax is flow e or flow i" exit...
If you want `i` and `e` to be mutually exclusive options, then this is yet another alternative: ``` program flow version 8 capture syntax , e if _rc == 0 { // syntax matched what was typed <code for e> } else { syntax , i // error message and program exit if syntax is incorrec...
19,585,979
I'm using ant to package a JavaFX-based application. No problem with doing the actual JavaFX stuff, except that `fx:jar` doesn't support the `if` or `condition` tags. I want to dynamically include some platform-specific libraries, depending on a variable i set. Currently I have this: ``` <fx:fileset dir="/my/classes/f...
2013/10/25
[ "https://Stackoverflow.com/questions/19585979", "https://Stackoverflow.com", "https://Stackoverflow.com/users/568355/" ]
Given your comment on the answer by @NickCox, I assume you tried something like this: ``` program flow version 8 syntax [, i e] if "`i'`e'" == "" { di as err "either the i or the e option needs to be specified" exit 198 } if "`i'" != "" & "`e'" != "" { di as err "the i and e...
If you want `i` and `e` to be mutually exclusive options, then this is yet another alternative: ``` program flow version 8 capture syntax , e if _rc == 0 { // syntax matched what was typed <code for e> } else { syntax , i // error message and program exit if syntax is incorrec...
1,362,991
Let $\sum a\_n=a$ with terms non-negative. Let $ s\_n$ the n-nth partial sum. Prove $\sum na\_n$ converge if $\sum (a-s\_n)$ converge
2015/07/16
[ "https://math.stackexchange.com/questions/1362991", "https://math.stackexchange.com", "https://math.stackexchange.com/users/254420/" ]
$$ \begin{align} \sum\_{k=1}^nka\_k &=\sum\_{k=1}^n\sum\_{j=1}^ka\_k\\ &=\sum\_{j=1}^n\sum\_{k=j}^na\_k\\ &=\sum\_{j=1}^n(s\_n-s\_{j-1}) \end{align} $$ Taking limits, we get by [Monotone Convergence](https://en.wikipedia.org/wiki/Monotone_convergence_theorem) that $$ \begin{align} \sum\_{k=1}^\infty ka\_k &=\sum\_{j=1}...
It is easy to prove the following fact: If $(a\_n) $ is decreasing sequence and $\sum\_{j=1}^{\infty } a\_j $ converges then $\lim\_{j\to \infty } ja\_j =0.$ Now let $r\_n =\sum\_{k=n+1}^{\infty } a\_n $ and assume that $\sum\_{i=1}^{\infty} r\_n <\infty .$ Observe that $(r\_n )$ is an decreasing sequence, hence by ...
1,362,991
Let $\sum a\_n=a$ with terms non-negative. Let $ s\_n$ the n-nth partial sum. Prove $\sum na\_n$ converge if $\sum (a-s\_n)$ converge
2015/07/16
[ "https://math.stackexchange.com/questions/1362991", "https://math.stackexchange.com", "https://math.stackexchange.com/users/254420/" ]
$$ \begin{align} \sum\_{k=1}^nka\_k &=\sum\_{k=1}^n\sum\_{j=1}^ka\_k\\ &=\sum\_{j=1}^n\sum\_{k=j}^na\_k\\ &=\sum\_{j=1}^n(s\_n-s\_{j-1}) \end{align} $$ Taking limits, we get by [Monotone Convergence](https://en.wikipedia.org/wiki/Monotone_convergence_theorem) that $$ \begin{align} \sum\_{k=1}^\infty ka\_k &=\sum\_{j=1}...
This is less rigorous than the other answer but more intuitive to me (and tells us a neat thing). $\displaystyle \sum\_1^{N} (a-s\_n)=Na-\sum\_1^N(N+1-n)a\_n$. As $N \to \infty$, $\displaystyle Na-\sum\_1^N(N+1-n)a\_n \to -\sum\_1^{\infty}(1-n)a\_n = \sum\_1^{\infty} na\_n-a$. Hence $\displaystyle \sum\_1^{\infty} ...
1,362,991
Let $\sum a\_n=a$ with terms non-negative. Let $ s\_n$ the n-nth partial sum. Prove $\sum na\_n$ converge if $\sum (a-s\_n)$ converge
2015/07/16
[ "https://math.stackexchange.com/questions/1362991", "https://math.stackexchange.com", "https://math.stackexchange.com/users/254420/" ]
$$ \begin{align} \sum\_{k=1}^nka\_k &=\sum\_{k=1}^n\sum\_{j=1}^ka\_k\\ &=\sum\_{j=1}^n\sum\_{k=j}^na\_k\\ &=\sum\_{j=1}^n(s\_n-s\_{j-1}) \end{align} $$ Taking limits, we get by [Monotone Convergence](https://en.wikipedia.org/wiki/Monotone_convergence_theorem) that $$ \begin{align} \sum\_{k=1}^\infty ka\_k &=\sum\_{j=1}...
Simply note $$ \sum\_n (a-s\_n)=\sum\_n \sum\_{k=n+1}^\infty a\_k = \sum\_{k=2}^\infty \sum\_{n=1}^{k-1} a\_k =\sum\_{k=2}^\infty (k-1)a\_k. $$ Here, we can interchange the same since all commands are nonnegative. Using the assumption that $\sum\_n a\_n$ converges, this easily implies the claim (even with if and onl...
7,530,329
I am using jQuery and jQuery UI and i am trying to read a checkbox state through the addition of the "aria-pressed" property that jQuery UI Button toggle between false and true. ``` $('.slideButton').live('click', function() { alert($(this).attr('aria-pressed')); }); ``` This code however seems to read the aria-pr...
2011/09/23
[ "https://Stackoverflow.com/questions/7530329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961325/" ]
Can't you add a listener to the actual checkbox behind the label or span? ``` $("#days_list li div div div input[type='checkbox']").change(function(){ alert("Someone just clicked checkbox with id"+$(this).attr("id")); }); ``` This should work since, once you click the label, you change the value in the checkbox...
You can use a callback to execute the `alert($(this).attr('aria-pressed'));` after the toggle has completed. ``` $('.slidebutton').toggle(1000, function(){ alert($(this).attr('aria-pressed')); }); ``` I'm not too sure if your using `.toggle()` or not but you would need to use a callback either way to ensure seq...
7,420,940
I have a vbscript that runs on the command line in xp. It accepts one argument for the path to a directory. Is there a simple way to prompt the user in the command line box for this? If not, I can just echo what was passed in to show the user what they actually typed in case of typos. Thanks, James Aftermath: Here...
2011/09/14
[ "https://Stackoverflow.com/questions/7420940", "https://Stackoverflow.com", "https://Stackoverflow.com/users/543572/" ]
You can use the [`WScript.StdIn`](http://msdn.microsoft.com/en-us/library/1y8934a7%28v=VS.85%29.aspx) property to read from the the standard input. If you want to supply the path when invoking the script, you can pass the path as a parameter. You'll find it in the [`WScript.Arguments`](http://msdn.microsoft.com/en-us/l...
you can use the choice command, [choice](http://www.robvanderwoude.com/choice.php) it sets errorlevel to the value selected. I think it comes with DOS, Windows 95,98, then MS dropped it and then came back again in Windows 7 and probably Vista P.D. oh never mind, I read again and you're in XP. There are other options, ...
19,946,041
I recently discovered this script: [JS fiddle text swapper](http://jsfiddle.net/PMKDG/) - but I'd like to add a nice fade in and fade out. I guess this is a 2 part question. 1. Can I add fadeIn the way this is structured? 2. I'm guessing I'll also need a FadeOut? Help would be greatly appreciated! Thanks ``` $(fun...
2013/11/13
[ "https://Stackoverflow.com/questions/19946041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1572316/" ]
Try ``` $("#news-h3-change").fadeOut(function(){ $(this).text(txt) }).fadeIn(); ``` Demo: [Fiddle](http://jsfiddle.net/arunpjohny/93WG6/) I might suggest to use `data-*` to make it little more nice, like ``` <ul id="iso"> <li data-txt="ALLE NEWS">all-iso</li> <li data-txt="DATUM">date-iso</...
Here is another way to do it [JSFiddle](http://jsfiddle.net/PMKDG/29/) ``` $(function() { $("#all-iso, #date-iso, #actor-iso, #film-iso").on("click", function(e) { var txt = "", id = $(this).prop("id"); $('#news-h3-change').fadeOut('slow', function() { switch (id) { case "al...
51,249,250
I'm trying to edit this code to be dynamic as I'm going to schedule it to run. Normally I would input the date in the where statement as 'YYYY-MM-DD' and so to make it dynamic I changed it to DATE(). I'm not erroring out, but I'm also not pulling data. I just need help with format and my google searching isn't helping....
2018/07/09
[ "https://Stackoverflow.com/questions/51249250", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7257430/" ]
Try command ``` ionic cordova build android --prod --release ```
Any one still having this issue, a big cause of this problem is PLUGINS run `ionic cordova plugin` And have a look at your list of plugins, and uninstall All the dodgy ones, and those you arent SURE are working by running `ionic cordova plugin rm your-plugin-name` This is the problem 98% of the time.
165,197
I was once asked the following question by a student I was tutoring; and I was stumped by it: When one throws a stone why does it take the same amount of time for a stone to rise to its peak and then down to the ground? * One could say that this is an experimental observation; after one could envisage, hypothetically...
2015/02/15
[ "https://physics.stackexchange.com/questions/165197", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7993/" ]
> > When one throws a stone.... > > > Your arm is capable of propelling an object at up to around 150km/h (and that's with some practice). At that speed the many factors like air resistance are negligible. Let’s load a 16-inch shell into a gun (you will find several on the USS Iowa), aim it 45 degrees up and pres...
**Assuming that the only forces acting on the stone are the initial force exerted by the hand on the stone AND the force of gravity**, we have the following situation: Immediately after throwing, the stone has a kinetic energy in the x-direction that never changes (**conservation of energy**) and the stone has a kinet...
165,197
I was once asked the following question by a student I was tutoring; and I was stumped by it: When one throws a stone why does it take the same amount of time for a stone to rise to its peak and then down to the ground? * One could say that this is an experimental observation; after one could envisage, hypothetically...
2015/02/15
[ "https://physics.stackexchange.com/questions/165197", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7993/" ]
I would consider that since acceleration is a constant vector pointing downward, that the time the projectiles downward component takes to accelerate from V(initial) to 0 would be the same as the time it takes to accelerate the object from 0 to V(final)
Asking "Why" in physics often leads out of physics and into philosophy. Why is there light? Because God said so. Physics only answers questions about how the universe behaves and how to describe that behavior. If a why question can be answered with physics, the answer is "because it follows from a law of physics." A la...
165,197
I was once asked the following question by a student I was tutoring; and I was stumped by it: When one throws a stone why does it take the same amount of time for a stone to rise to its peak and then down to the ground? * One could say that this is an experimental observation; after one could envisage, hypothetically...
2015/02/15
[ "https://physics.stackexchange.com/questions/165197", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7993/" ]
I think its because both halves of a projectile's trajectory are symmetric in every aspect. The projectile going from its apex position to the ground is just the time reversed version of the projectile going from its initial position to the apex position.
A lot of things have to hold to get that symmetry. You have to neglect air resistance. You either have to throw it straight up, or the ground over there has to be at the the same altitude as the ground over here. You have to through it slowly enough that it comes back down (watch out for escape velocity) But if you ha...
165,197
I was once asked the following question by a student I was tutoring; and I was stumped by it: When one throws a stone why does it take the same amount of time for a stone to rise to its peak and then down to the ground? * One could say that this is an experimental observation; after one could envisage, hypothetically...
2015/02/15
[ "https://physics.stackexchange.com/questions/165197", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7993/" ]
> > One could say that this is an experimental observation; after one could envisage, hypothetically, where this is not the case. > > > This is not hypothetical once you take air resistance into account. > > One could say that the curve that the stone describes is a parabola; and the two halves are symmetric aro...
Asking "Why" in physics often leads out of physics and into philosophy. Why is there light? Because God said so. Physics only answers questions about how the universe behaves and how to describe that behavior. If a why question can be answered with physics, the answer is "because it follows from a law of physics." A la...
165,197
I was once asked the following question by a student I was tutoring; and I was stumped by it: When one throws a stone why does it take the same amount of time for a stone to rise to its peak and then down to the ground? * One could say that this is an experimental observation; after one could envisage, hypothetically...
2015/02/15
[ "https://physics.stackexchange.com/questions/165197", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7993/" ]
I would say that it is a result of time reversal symmetry. If you consider the projectile at the apex of its trajectory then all that changes under time reversal is the direction of the horizontal component of motion. This means that the trajectory of the particle to get to that point and its trajectory after that poin...
Conservation of momentum! ========================= ### Force × Time = Impulse = Δ Momentum Since the average force is the same going up and down, and since the momentum change is the same going up and down as well, the time during which the force is applied must also be the same.
165,197
I was once asked the following question by a student I was tutoring; and I was stumped by it: When one throws a stone why does it take the same amount of time for a stone to rise to its peak and then down to the ground? * One could say that this is an experimental observation; after one could envisage, hypothetically...
2015/02/15
[ "https://physics.stackexchange.com/questions/165197", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7993/" ]
(Non-kinematics math attempt but just some principles) It is a partial observation in that * It hits the ground with same speed. * Angle by which it hits the ground is the same (maybe a direction change) * It takes equal time to reach to the peak and then hit the ground They are equally strange coincidences. Which ...
**Assuming that the only forces acting on the stone are the initial force exerted by the hand on the stone AND the force of gravity**, we have the following situation: Immediately after throwing, the stone has a kinetic energy in the x-direction that never changes (**conservation of energy**) and the stone has a kinet...
165,197
I was once asked the following question by a student I was tutoring; and I was stumped by it: When one throws a stone why does it take the same amount of time for a stone to rise to its peak and then down to the ground? * One could say that this is an experimental observation; after one could envisage, hypothetically...
2015/02/15
[ "https://physics.stackexchange.com/questions/165197", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7993/" ]
I would consider that since acceleration is a constant vector pointing downward, that the time the projectiles downward component takes to accelerate from V(initial) to 0 would be the same as the time it takes to accelerate the object from 0 to V(final)
**Assuming that the only forces acting on the stone are the initial force exerted by the hand on the stone AND the force of gravity**, we have the following situation: Immediately after throwing, the stone has a kinetic energy in the x-direction that never changes (**conservation of energy**) and the stone has a kinet...
165,197
I was once asked the following question by a student I was tutoring; and I was stumped by it: When one throws a stone why does it take the same amount of time for a stone to rise to its peak and then down to the ground? * One could say that this is an experimental observation; after one could envisage, hypothetically...
2015/02/15
[ "https://physics.stackexchange.com/questions/165197", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7993/" ]
I think its because both halves of a projectile's trajectory are symmetric in every aspect. The projectile going from its apex position to the ground is just the time reversed version of the projectile going from its initial position to the apex position.
Conservation of momentum! ========================= ### Force × Time = Impulse = Δ Momentum Since the average force is the same going up and down, and since the momentum change is the same going up and down as well, the time during which the force is applied must also be the same.
165,197
I was once asked the following question by a student I was tutoring; and I was stumped by it: When one throws a stone why does it take the same amount of time for a stone to rise to its peak and then down to the ground? * One could say that this is an experimental observation; after one could envisage, hypothetically...
2015/02/15
[ "https://physics.stackexchange.com/questions/165197", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7993/" ]
Asking "Why" in physics often leads out of physics and into philosophy. Why is there light? Because God said so. Physics only answers questions about how the universe behaves and how to describe that behavior. If a why question can be answered with physics, the answer is "because it follows from a law of physics." A la...
**Assuming that the only forces acting on the stone are the initial force exerted by the hand on the stone AND the force of gravity**, we have the following situation: Immediately after throwing, the stone has a kinetic energy in the x-direction that never changes (**conservation of energy**) and the stone has a kinet...
165,197
I was once asked the following question by a student I was tutoring; and I was stumped by it: When one throws a stone why does it take the same amount of time for a stone to rise to its peak and then down to the ground? * One could say that this is an experimental observation; after one could envisage, hypothetically...
2015/02/15
[ "https://physics.stackexchange.com/questions/165197", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7993/" ]
I think its because both halves of a projectile's trajectory are symmetric in every aspect. The projectile going from its apex position to the ground is just the time reversed version of the projectile going from its initial position to the apex position.
**Assuming that the only forces acting on the stone are the initial force exerted by the hand on the stone AND the force of gravity**, we have the following situation: Immediately after throwing, the stone has a kinetic energy in the x-direction that never changes (**conservation of energy**) and the stone has a kinet...
22,594,048
How do I apply css styles to HTML tags within a class at once instead of repeating the class name each time. ``` .container h1,.container p,.container a,.container ol,.container ul,.container li, .container fieldset,.container form,.container label,.container legend, .container table { some css rules here } ``` ho...
2014/03/23
[ "https://Stackoverflow.com/questions/22594048", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1106398/" ]
Use [LESS](http://lesscss.org/). It would come out looking like this. ``` .container { h1, p, a, ol, ul, li, fieldset, form, label, legend, table { your styles here } } ``` Otherwise, you're SOL. Sorry.
You cannot reduce the current selector of yours as far as pure CSS goes. You might want to take a look at [LESS](http://lesscss.org/) or [SASS](http://sass-lang.com/) for doing that. Also, I just read your selector, seems like *you are covering almost every tag*, so if you are looking to target few properties to each...
31,234,459
I am trying to get the latitude and longitude values from a JSON array - `$response`, returned from Google, from their Geocoding services. The JSON array is returned as such (random address): ``` { "results":[ { "address_components":[ { "long_name":"57", "sh...
2015/07/05
[ "https://Stackoverflow.com/questions/31234459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
``` var_dump(json_decode($response)->results[0]->geometry->location->lat); ```
Try this: `$jsonArray = json_decode($response,true);` It's just, first you got to convert whole json string into array or object with `json_decode` function, then work with structure.
31,234,459
I am trying to get the latitude and longitude values from a JSON array - `$response`, returned from Google, from their Geocoding services. The JSON array is returned as such (random address): ``` { "results":[ { "address_components":[ { "long_name":"57", "sh...
2015/07/05
[ "https://Stackoverflow.com/questions/31234459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Either pass true as the second parameter to json\_decode function and use the array notation: ``` $obj = json_decode($json_string2, true); foreach ($obj['geometry'] as $key => $value) { $lat = $value['location']['lat']; $long = $value['location']['lng']; } ```
Try this: `$jsonArray = json_decode($response,true);` It's just, first you got to convert whole json string into array or object with `json_decode` function, then work with structure.
31,234,459
I am trying to get the latitude and longitude values from a JSON array - `$response`, returned from Google, from their Geocoding services. The JSON array is returned as such (random address): ``` { "results":[ { "address_components":[ { "long_name":"57", "sh...
2015/07/05
[ "https://Stackoverflow.com/questions/31234459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
``` var_dump(json_decode($response)->results[0]->geometry->location->lat); ```
Either pass true as the second parameter to json\_decode function and use the array notation: ``` $obj = json_decode($json_string2, true); foreach ($obj['geometry'] as $key => $value) { $lat = $value['location']['lat']; $long = $value['location']['lng']; } ```
19,125
How can I implement a hook in my template file that will change the label of a field for the "group" content type from "author" to "created by"? ![screenshot of author field](https://i.stack.imgur.com/jDhMv.png)
2012/01/08
[ "https://drupal.stackexchange.com/questions/19125", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/3846/" ]
To rename the label of a field add the preprocess function [template\_preprocess\_node](http://api.drupal.org/api/drupal/modules--node--node.module/function/template_preprocess_node/7) to your *template.php* file: ``` function *YOUR THEME*_preprocess_node(&$vars){ //Supposing that your content type name is "group" ...
I'll take a guess that there are a few different ways you can do this. 1. Use jQuery to target the element and use text replacement. You could so something like: ``` $("#my-element").each(function () { var s=$(this).text(); //get text $(this).text(s.replace('Author', 'created by')); //set the text to the replac...
19,125
How can I implement a hook in my template file that will change the label of a field for the "group" content type from "author" to "created by"? ![screenshot of author field](https://i.stack.imgur.com/jDhMv.png)
2012/01/08
[ "https://drupal.stackexchange.com/questions/19125", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/3846/" ]
To rename the label of a field add the preprocess function [template\_preprocess\_node](http://api.drupal.org/api/drupal/modules--node--node.module/function/template_preprocess_node/7) to your *template.php* file: ``` function *YOUR THEME*_preprocess_node(&$vars){ //Supposing that your content type name is "group" ...
You can also change the label from a field preprocess ``` function THEMENAME_preprocess_field(&$variables, $hook) { $field_name = $variables['element']['#field_name']; $view_mode = $variables['element']['#view_mode']; switch ($field_name) { case 'YOUR_FIELD_NAME': $variables['label'] = t('FIELD LAB...
52,679,318
I have a class Application with EmbeddedId and second column in embbbedID is forgein key and having many to one relationship with offer. ``` @Entity public class Application implements Serializable{ private Integer id; @EmbeddedId private MyKey mykey; private String resume; @Enumerated(EnumType.STRING) @NotNull...
2018/10/06
[ "https://Stackoverflow.com/questions/52679318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9498745/" ]
Your methode name is wrong, the right one is `findAllByMykey_Offer` or `findAllByMykeyOffer`, as your field is named mykey. As mentionned in the documentation <https://docs.spring.io/spring-data/jpa/docs/2.1.0.RELEASE/reference/html/> using `List<Application> findAllByMykey_Offer(String jobTitle);` is better than `Lis...
With composite key, your field name should include name of the field of embedded id. In you case it would be like this (I haven't tested it) ``` List<Application> findAllByMykeyOffer(String jobTitle); ``` Notice that `k` is lower-case here, because your field in class `Application` is named `mykey`, not `myKey`
13,009,911
I want to create a list with my database field values. There are 2 columns, name and surname. I want to create a list that stores all names in name column in a field and then add to my DTO. Is this possible?
2012/10/22
[ "https://Stackoverflow.com/questions/13009911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1759247/" ]
**Steps you can follow**: - * First you need to have a `List<String>` that will store all your names. Declare it like this: - ``` List<String> nameList = new ArrayList<String>(); ``` * Now, you have all the records fetched and stored in `ResultSet`. So I assume that you can iterate over `ResultSet` and get each `val...
It is. What have you tried ? To access the database, you need to [use JDBC](http://docs.oracle.com/javase/tutorial/jdbc/basics/index.html) and execute a query, giving you a `ResultSet`. I would create an class called `FullName` with 2 String fields `name` and `surname`. Just populate these in a loop using ``` rs.g...
13,009,911
I want to create a list with my database field values. There are 2 columns, name and surname. I want to create a list that stores all names in name column in a field and then add to my DTO. Is this possible?
2012/10/22
[ "https://Stackoverflow.com/questions/13009911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1759247/" ]
It is. What have you tried ? To access the database, you need to [use JDBC](http://docs.oracle.com/javase/tutorial/jdbc/basics/index.html) and execute a query, giving you a `ResultSet`. I would create an class called `FullName` with 2 String fields `name` and `surname`. Just populate these in a loop using ``` rs.g...
What worked for me is: ``` ResultSetMetaData rsmd = rs.getMetaData(); int columnCount = rsmd.getColumnCount(); ArrayList<String> resultList= new ArrayList<>(columnCount); while (rs.next()) { int i = 1; while(i <= columnCount) { resultList.add(rs.ge...
13,009,911
I want to create a list with my database field values. There are 2 columns, name and surname. I want to create a list that stores all names in name column in a field and then add to my DTO. Is this possible?
2012/10/22
[ "https://Stackoverflow.com/questions/13009911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1759247/" ]
**Steps you can follow**: - * First you need to have a `List<String>` that will store all your names. Declare it like this: - ``` List<String> nameList = new ArrayList<String>(); ``` * Now, you have all the records fetched and stored in `ResultSet`. So I assume that you can iterate over `ResultSet` and get each `val...
JDBC unfortunately doesn't offer any ways to conveniently do this in a one-liner. But there are other APIs, such as [jOOQ](http://www.jooq.org) (disclaimer: I work for the company behind jOOQ): ``` List<DTO> list = DSL.using(connection) .fetch("SELECT first_name, last_name FROM table") .into(DTO.class); ``` Or...
13,009,911
I want to create a list with my database field values. There are 2 columns, name and surname. I want to create a list that stores all names in name column in a field and then add to my DTO. Is this possible?
2012/10/22
[ "https://Stackoverflow.com/questions/13009911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1759247/" ]
**Steps you can follow**: - * First you need to have a `List<String>` that will store all your names. Declare it like this: - ``` List<String> nameList = new ArrayList<String>(); ``` * Now, you have all the records fetched and stored in `ResultSet`. So I assume that you can iterate over `ResultSet` and get each `val...
What worked for me is: ``` ResultSetMetaData rsmd = rs.getMetaData(); int columnCount = rsmd.getColumnCount(); ArrayList<String> resultList= new ArrayList<>(columnCount); while (rs.next()) { int i = 1; while(i <= columnCount) { resultList.add(rs.ge...
13,009,911
I want to create a list with my database field values. There are 2 columns, name and surname. I want to create a list that stores all names in name column in a field and then add to my DTO. Is this possible?
2012/10/22
[ "https://Stackoverflow.com/questions/13009911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1759247/" ]
JDBC unfortunately doesn't offer any ways to conveniently do this in a one-liner. But there are other APIs, such as [jOOQ](http://www.jooq.org) (disclaimer: I work for the company behind jOOQ): ``` List<DTO> list = DSL.using(connection) .fetch("SELECT first_name, last_name FROM table") .into(DTO.class); ``` Or...
What worked for me is: ``` ResultSetMetaData rsmd = rs.getMetaData(); int columnCount = rsmd.getColumnCount(); ArrayList<String> resultList= new ArrayList<>(columnCount); while (rs.next()) { int i = 1; while(i <= columnCount) { resultList.add(rs.ge...
31,674
Keccak/SHA-3 is new NIST standard for cryptographic hash functions. However, it is much slower than BLAKE2 in software implementations. Does Keccak have compensating advantages?
2016/01/04
[ "https://crypto.stackexchange.com/questions/31674", "https://crypto.stackexchange.com", "https://crypto.stackexchange.com/users/29901/" ]
(Disclosure: I'm one of the authors of BLAKE2, but not BLAKE.) Here are the [slides from a presentation](https://blake2.net/acns/slides.html) I gave at Applied Cryptography and Network Security 2013 about this. (Note: the performance numbers in those slides are obsolete — BLAKE2 is even faster now than it was then.) ...
Blake-2 was not part of the SHA-3 competition, Blake, its predecessor was. Blake-2 is approx 1.3 to 1.7 times faster than Blake in software, with the advantage best for the 512-bit digests. ### Performance A [software performance](http://bench.cr.yp.to/results-sha3.html) comparison between the two SHA-3 finalists sho...
39,788,564
I want for the click on the item menu, this item will change the icon. Selector for the item: button\_add\_to\_wishlist.xml ``` <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="false" android:drawable="@drawable/ic_add_fav" /> <item android:state_checked=...
2016/09/30
[ "https://Stackoverflow.com/questions/39788564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6640003/" ]
There is no command to tell Amazon S3 to archive a specific object to Amazon Glacier. Instead, [Lifecycle Rules](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) are used to identify objects. The [Lifecycle Configuration Elements](https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecyc...
You can programmatically archive a specific object on S3 to Glacier using [Lifecycle Rules](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) (with a prefix of the exact object you wish to archive). There is a [PUT lifecycle](http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecyc...
618,373
I'm unable to get the following table to have even row heights with vertical alignment ``` \renewcommand\tabularxcolumn[1]{m{#1}} ... \begin{table} \renewcommand*{\arraystretch}{1} \begin{tabularx}{\textwidth}{X X} \toprule \textbf{Route} & \textbf{Funzione} \\ \midrule \l...
2021/10/09
[ "https://tex.stackexchange.com/questions/618373", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/166526/" ]
By use of the `tabularray` package this is relative simple to accomplish: ``` \documentclass{article} \usepackage[skip=1ex]{caption} \usepackage{tabularray} \begin{document} \begin{table} \begin{tblr}{hline{1,Z}=1pt, hline{2}=0.8pt, hline{3-Y}=solid, colspec = {@{} Q[m, font=\ttfamily] X[m,j] @{}}, ...
Here is a solution with classical packages. ``` \documentclass{article} \usepackage[skip=1ex]{caption} \usepackage{booktabs,tabularx} \begin{document} \begin{table} \renewcommand{\tabularxcolumn}[1]{m{#1}} \begin{tabularx}{\textwidth}{@{}>{\rule[-16pt]{0pt}{40pt}\ttfamily}lX@{}} \toprule \multicolumn{1}{@{}l}{\bfseri...
618,373
I'm unable to get the following table to have even row heights with vertical alignment ``` \renewcommand\tabularxcolumn[1]{m{#1}} ... \begin{table} \renewcommand*{\arraystretch}{1} \begin{tabularx}{\textwidth}{X X} \toprule \textbf{Route} & \textbf{Funzione} \\ \midrule \l...
2021/10/09
[ "https://tex.stackexchange.com/questions/618373", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/166526/" ]
By use of the `tabularray` package this is relative simple to accomplish: ``` \documentclass{article} \usepackage[skip=1ex]{caption} \usepackage{tabularray} \begin{document} \begin{table} \begin{tblr}{hline{1,Z}=1pt, hline{2}=0.8pt, hline{3-Y}=solid, colspec = {@{} Q[m, font=\ttfamily] X[m,j] @{}}, ...
A solution with `{NiceTabular}` of `nicematrix`. ``` \documentclass{article} \usepackage[skip=1ex]{caption} \usepackage{nicematrix,booktabs} \begin{document} \begin{table} \begin{NiceTabular}{@{}>{\rule[-16pt]{0pt}{40pt}\ttfamily}lX[m]@{}}[hlines={2-11}] \toprule \multicolumn{1}{@{}l}{\bfseries Route} & \bfseries Fun...
10,925,268
In java exceptions have at least these four constructors: ``` Exception() Exception(String message) Exception(String message, Throwable cause) Exception(Throwable cause) ``` If you want to define your own extensions, you just have to declare a descendent exceptions and implement each desired constructor calling ...
2012/06/07
[ "https://Stackoverflow.com/questions/10925268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47633/" ]
well, this is the best I've found so far ``` class MissingConfigurationException private(ex: RuntimeException) extends RuntimeException(ex) { def this(message:String) = this(new RuntimeException(message)) def this(message:String, throwable: Throwable) = this(new RuntimeException(message, throwable)) } object Miss...
Here is a similar approach to the one of @roman-borisov but more typesafe. ``` case class ShortException(message: String = "", cause: Option[Throwable] = None) extends Exception(message) { cause.foreach(initCause) } ``` Then, you can create Exceptions in the Java manner: ``` throw ShortException() throw Shor...
10,925,268
In java exceptions have at least these four constructors: ``` Exception() Exception(String message) Exception(String message, Throwable cause) Exception(Throwable cause) ``` If you want to define your own extensions, you just have to declare a descendent exceptions and implement each desired constructor calling ...
2012/06/07
[ "https://Stackoverflow.com/questions/10925268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47633/" ]
You can use `Throwable.initCause`. ``` class MyException (message: String, cause: Throwable) extends RuntimeException(message) { if (cause != null) initCause(cause) def this(message: String) = this(message, null) } ```
Scala pattern matching in try/catch blocks works on interfaces. My solution is to use an interface for the exception name then use separate class instances. ``` trait MyException extends RuntimeException class MyExceptionEmpty() extends RuntimeException with MyException class MyExceptionStr(msg: String) extends Runt...
10,925,268
In java exceptions have at least these four constructors: ``` Exception() Exception(String message) Exception(String message, Throwable cause) Exception(Throwable cause) ``` If you want to define your own extensions, you just have to declare a descendent exceptions and implement each desired constructor calling ...
2012/06/07
[ "https://Stackoverflow.com/questions/10925268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47633/" ]
well, this is the best I've found so far ``` class MissingConfigurationException private(ex: RuntimeException) extends RuntimeException(ex) { def this(message:String) = this(new RuntimeException(message)) def this(message:String, throwable: Throwable) = this(new RuntimeException(message, throwable)) } object Miss...
You can use `Throwable.initCause`. ``` class MyException (message: String, cause: Throwable) extends RuntimeException(message) { if (cause != null) initCause(cause) def this(message: String) = this(message, null) } ```
10,925,268
In java exceptions have at least these four constructors: ``` Exception() Exception(String message) Exception(String message, Throwable cause) Exception(Throwable cause) ``` If you want to define your own extensions, you just have to declare a descendent exceptions and implement each desired constructor calling ...
2012/06/07
[ "https://Stackoverflow.com/questions/10925268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47633/" ]
You can use `Throwable.initCause`. ``` class MyException (message: String, cause: Throwable) extends RuntimeException(message) { if (cause != null) initCause(cause) def this(message: String) = this(message, null) } ```
Here is a similar approach to the one of @roman-borisov but more typesafe. ``` case class ShortException(message: String = "", cause: Option[Throwable] = None) extends Exception(message) { cause.foreach(initCause) } ``` Then, you can create Exceptions in the Java manner: ``` throw ShortException() throw Shor...
10,925,268
In java exceptions have at least these four constructors: ``` Exception() Exception(String message) Exception(String message, Throwable cause) Exception(Throwable cause) ``` If you want to define your own extensions, you just have to declare a descendent exceptions and implement each desired constructor calling ...
2012/06/07
[ "https://Stackoverflow.com/questions/10925268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47633/" ]
well, this is the best I've found so far ``` class MissingConfigurationException private(ex: RuntimeException) extends RuntimeException(ex) { def this(message:String) = this(new RuntimeException(message)) def this(message:String, throwable: Throwable) = this(new RuntimeException(message, throwable)) } object Miss...
Scala pattern matching in try/catch blocks works on interfaces. My solution is to use an interface for the exception name then use separate class instances. ``` trait MyException extends RuntimeException class MyExceptionEmpty() extends RuntimeException with MyException class MyExceptionStr(msg: String) extends Runt...
10,925,268
In java exceptions have at least these four constructors: ``` Exception() Exception(String message) Exception(String message, Throwable cause) Exception(Throwable cause) ``` If you want to define your own extensions, you just have to declare a descendent exceptions and implement each desired constructor calling ...
2012/06/07
[ "https://Stackoverflow.com/questions/10925268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47633/" ]
To me, it appears there are three different needs which have a dynamic tension with each other: 1. The convenience of the extender of `RuntimeException`; i.e. minimal code to be written to create a descendant of `RuntimeException` 2. Client's perceived ease of use; i.e. minimal code to be written at the call-site 3. C...
Scala pattern matching in try/catch blocks works on interfaces. My solution is to use an interface for the exception name then use separate class instances. ``` trait MyException extends RuntimeException class MyExceptionEmpty() extends RuntimeException with MyException class MyExceptionStr(msg: String) extends Runt...
10,925,268
In java exceptions have at least these four constructors: ``` Exception() Exception(String message) Exception(String message, Throwable cause) Exception(Throwable cause) ``` If you want to define your own extensions, you just have to declare a descendent exceptions and implement each desired constructor calling ...
2012/06/07
[ "https://Stackoverflow.com/questions/10925268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47633/" ]
Default value for `cause` is null. And for `message` it is either `cause.toString()` or null: ``` val e1 = new RuntimeException() e.getCause // res1: java.lang.Throwable = null e.getMessage //res2: java.lang.String = null val cause = new RuntimeException("cause msg") val e2 = new RuntimeException(cause) e.getMessa...
Scala pattern matching in try/catch blocks works on interfaces. My solution is to use an interface for the exception name then use separate class instances. ``` trait MyException extends RuntimeException class MyExceptionEmpty() extends RuntimeException with MyException class MyExceptionStr(msg: String) extends Runt...
10,925,268
In java exceptions have at least these four constructors: ``` Exception() Exception(String message) Exception(String message, Throwable cause) Exception(Throwable cause) ``` If you want to define your own extensions, you just have to declare a descendent exceptions and implement each desired constructor calling ...
2012/06/07
[ "https://Stackoverflow.com/questions/10925268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47633/" ]
Default value for `cause` is null. And for `message` it is either `cause.toString()` or null: ``` val e1 = new RuntimeException() e.getCause // res1: java.lang.Throwable = null e.getMessage //res2: java.lang.String = null val cause = new RuntimeException("cause msg") val e2 = new RuntimeException(cause) e.getMessa...
You can use `Throwable.initCause`. ``` class MyException (message: String, cause: Throwable) extends RuntimeException(message) { if (cause != null) initCause(cause) def this(message: String) = this(message, null) } ```
10,925,268
In java exceptions have at least these four constructors: ``` Exception() Exception(String message) Exception(String message, Throwable cause) Exception(Throwable cause) ``` If you want to define your own extensions, you just have to declare a descendent exceptions and implement each desired constructor calling ...
2012/06/07
[ "https://Stackoverflow.com/questions/10925268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47633/" ]
To me, it appears there are three different needs which have a dynamic tension with each other: 1. The convenience of the extender of `RuntimeException`; i.e. minimal code to be written to create a descendant of `RuntimeException` 2. Client's perceived ease of use; i.e. minimal code to be written at the call-site 3. C...
Here is a similar approach to the one of @roman-borisov but more typesafe. ``` case class ShortException(message: String = "", cause: Option[Throwable] = None) extends Exception(message) { cause.foreach(initCause) } ``` Then, you can create Exceptions in the Java manner: ``` throw ShortException() throw Shor...
10,925,268
In java exceptions have at least these four constructors: ``` Exception() Exception(String message) Exception(String message, Throwable cause) Exception(Throwable cause) ``` If you want to define your own extensions, you just have to declare a descendent exceptions and implement each desired constructor calling ...
2012/06/07
[ "https://Stackoverflow.com/questions/10925268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47633/" ]
well, this is the best I've found so far ``` class MissingConfigurationException private(ex: RuntimeException) extends RuntimeException(ex) { def this(message:String) = this(new RuntimeException(message)) def this(message:String, throwable: Throwable) = this(new RuntimeException(message, throwable)) } object Miss...
To me, it appears there are three different needs which have a dynamic tension with each other: 1. The convenience of the extender of `RuntimeException`; i.e. minimal code to be written to create a descendant of `RuntimeException` 2. Client's perceived ease of use; i.e. minimal code to be written at the call-site 3. C...
1,451,306
Attempting to do something very simple - compile basic win 32 c programs through windows cmd. This is something I should be able to do myself, but I am just so stuck here.. I keep stumbling into weird problems, vague errors. I dunno whether I should go into details. Using tcc ( tiny c compiler) 1. One simple hellowi...
2009/09/20
[ "https://Stackoverflow.com/questions/1451306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/161179/" ]
If I create a new project using Visual Studio it #defines the following preprocessor symbols using compiler command-line options: * `WIN32` * `_WINDOWS` * one of either `_DEBUG` or `NDEBUG` * `UNICODE` and `_UNICODE` (although the Windows headers and libraries also support non-Unicode-enabled applications, if your com...
Sounds like the kind of compiler that might be looking for INCLUDE and LIB paths in the environment. If you do "set" on the command line and don't see those vars listed, you could try setting them to the paths your compiler is using. Not sure where you would have installed this tcc tool, but look for directories named ...
1,451,306
Attempting to do something very simple - compile basic win 32 c programs through windows cmd. This is something I should be able to do myself, but I am just so stuck here.. I keep stumbling into weird problems, vague errors. I dunno whether I should go into details. Using tcc ( tiny c compiler) 1. One simple hellowi...
2009/09/20
[ "https://Stackoverflow.com/questions/1451306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/161179/" ]
Download the Windows PlatformSDK and it comes with its own command line compiler. It creates a shortcut Start->Programs->... to open a command prompt for either 32bit or 64bit. Select the 32bit variant and you get a fully initialized command prompt with compiler in your PATH and all INCLUDE, LIB and LIBPATH set. cmd> ...
Sounds like the kind of compiler that might be looking for INCLUDE and LIB paths in the environment. If you do "set" on the command line and don't see those vars listed, you could try setting them to the paths your compiler is using. Not sure where you would have installed this tcc tool, but look for directories named ...
1,451,306
Attempting to do something very simple - compile basic win 32 c programs through windows cmd. This is something I should be able to do myself, but I am just so stuck here.. I keep stumbling into weird problems, vague errors. I dunno whether I should go into details. Using tcc ( tiny c compiler) 1. One simple hellowi...
2009/09/20
[ "https://Stackoverflow.com/questions/1451306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/161179/" ]
If I create a new project using Visual Studio it #defines the following preprocessor symbols using compiler command-line options: * `WIN32` * `_WINDOWS` * one of either `_DEBUG` or `NDEBUG` * `UNICODE` and `_UNICODE` (although the Windows headers and libraries also support non-Unicode-enabled applications, if your com...
You can try gcc from [equation.com](http://www.equation.com/). It's a mingw wrapped compiler, but you don't have to worry about mingw: just download, install and use. There's no IDE either. The download page is at [<http://www.equation.com/servlet/equation.cmd?fa=fortran>](http://www.equation.com/servlet/equation.cmd?...
1,451,306
Attempting to do something very simple - compile basic win 32 c programs through windows cmd. This is something I should be able to do myself, but I am just so stuck here.. I keep stumbling into weird problems, vague errors. I dunno whether I should go into details. Using tcc ( tiny c compiler) 1. One simple hellowi...
2009/09/20
[ "https://Stackoverflow.com/questions/1451306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/161179/" ]
Download the Windows PlatformSDK and it comes with its own command line compiler. It creates a shortcut Start->Programs->... to open a command prompt for either 32bit or 64bit. Select the 32bit variant and you get a fully initialized command prompt with compiler in your PATH and all INCLUDE, LIB and LIBPATH set. cmd> ...
You can try gcc from [equation.com](http://www.equation.com/). It's a mingw wrapped compiler, but you don't have to worry about mingw: just download, install and use. There's no IDE either. The download page is at [<http://www.equation.com/servlet/equation.cmd?fa=fortran>](http://www.equation.com/servlet/equation.cmd?...
6,875,109
First of all: I want to use Java EE not Spring! I have some self defined annotations which are acting as interceptor bindings. I use the annotations on my methods like this: ```java @Logged @Secured @RequestParsed @ResultHandled public void doSomething() { // ... } ``` For some methods I want to use a single of t...
2011/07/29
[ "https://Stackoverflow.com/questions/6875109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/868859/" ]
The `position: absolute;` and the `right:-100px;` is pushing your element past the right edge of the viewport. Floating does not affect absolutely positioned elements. If you want the element to be `100px` away from the edge, make that a positive `100px`. Or, if you want it right up against the edge, make it `0`. If y...
you *can* apply `overflow:hidden;` to the body, which is how you get what you're after, but it's highly inadvisable. Another way to take the div "out of flow" is to make it `position: fixed;` but that will mean it will be visible as you scroll down.
20,883,696
I'm using Sitecore Webforms For Marketers in a multi-language environment (e.g. .com, .be, .nl en .de). There are 3 servers: 2 Content Delivery Servers (CDS) en 1 Content Management Server (CMS). On the CDS servers is no possibility to write data, so i have configured a webservice to forward the form data from the CDS ...
2014/01/02
[ "https://Stackoverflow.com/questions/20883696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3129164/" ]
Similar question was asked [here](https://stackoverflow.com/questions/20800966/how-to-get-the-sitecore-current-site-object-inside-custom-save-action-wffm) and answered by [@TwentyGotoTen](https://stackoverflow.com/users/2124993/twentygototen). The place where you need to get the current site is different than in linked...
Update your web service to pass an extra parameter for the host name (via the CD clients) and then on the service (on your CM) get the context site from that.
20,883,696
I'm using Sitecore Webforms For Marketers in a multi-language environment (e.g. .com, .be, .nl en .de). There are 3 servers: 2 Content Delivery Servers (CDS) en 1 Content Management Server (CMS). On the CDS servers is no possibility to write data, so i have configured a webservice to forward the form data from the CDS ...
2014/01/02
[ "https://Stackoverflow.com/questions/20883696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3129164/" ]
Similar question was asked [here](https://stackoverflow.com/questions/20800966/how-to-get-the-sitecore-current-site-object-inside-custom-save-action-wffm) and answered by [@TwentyGotoTen](https://stackoverflow.com/users/2124993/twentygototen). The place where you need to get the current site is different than in linked...
I created for each domain a custom save action. This solves the problem.
20,883,696
I'm using Sitecore Webforms For Marketers in a multi-language environment (e.g. .com, .be, .nl en .de). There are 3 servers: 2 Content Delivery Servers (CDS) en 1 Content Management Server (CMS). On the CDS servers is no possibility to write data, so i have configured a webservice to forward the form data from the CDS ...
2014/01/02
[ "https://Stackoverflow.com/questions/20883696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3129164/" ]
I created for each domain a custom save action. This solves the problem.
Update your web service to pass an extra parameter for the host name (via the CD clients) and then on the service (on your CM) get the context site from that.
22,069,390
My Flash plugin just won't work for Firefox on Linux Mint. I am running Linux Mint 14 Nadia 64bit. * Downloaded firefox-27.0.1.tar.bz2 * Extracted it * Ran ./firefox it works fine * Downloaded install\_flash\_player\_11\_linux.x86\_64.tar.gz * Extracted it * Copied the plugin: **cp libflashplayer.so /home/gary/.mozil...
2014/02/27
[ "https://Stackoverflow.com/questions/22069390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2818846/" ]
Rather than delay initialising the whole page it would be better to allow it all to be initialised, then initialise just the new code. In jQm v1.3.2 and earlier you could do this by adding the following code to your success callback. ``` $('#newsDescription table').trigger('create'); ``` This will allow the whole pa...
I have put `$.mobile.initializePage();` inside success callback every thing works then.