qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
8,603,259
I've got a question about the facebook graph api. I have a example facebook page: <https://www.facebook.com/pages/TheBestCompany/250721784993387> And i want to get the images from all the people that liked that page. I've found on this site that it is **not** possible to find the people that liked a external page. b...
2011/12/22
[ "https://Stackoverflow.com/questions/8603259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111460/" ]
``` $dom = new DOMDocument; $dom->loadXML($xml); $elements = $dom->getElementsByTagName('*'); foreach($elements as $element) { if ( ! $element->hasChildNodes() OR $element->nodeValue == '') { $element->parentNode->removeChild($element); } } echo $dom->saveXML(); ``` [CodePad](http://codepad.viper-...
If you're going to be a lot of this, just do something like: ``` $value[] = "2"; $value[] = "4"; $value[] = ""; $xml = '<parentnode>'; for($i=1,$m=count($value); $i<$m+1; $i++) $xml .= !empty($value[$i-1]) ? "<tag{$i}>{$value[$i-1]}</tag{$i}>" : null; $xml .= '</parentnode>'; echo $xml; ``` Ideally though,...
8,603,259
I've got a question about the facebook graph api. I have a example facebook page: <https://www.facebook.com/pages/TheBestCompany/250721784993387> And i want to get the images from all the people that liked that page. I've found on this site that it is **not** possible to find the people that liked a external page. b...
2011/12/22
[ "https://Stackoverflow.com/questions/8603259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111460/" ]
You can use [XPath](http://docs.php.net/DOMXPath) with the [predicate](http://www.w3.org/TR/xpath/#predicates) `not(node())` to select all elements that do not have child nodes. ``` <?php $doc = new DOMDocument; $doc->preserveWhiteSpace = false; $doc->loadxml('<parentnode> <tag1>2</tag1> <tag2>4</tag2> <ta...
``` $dom = new DOMDocument; $dom->loadXML($xml); $elements = $dom->getElementsByTagName('*'); foreach($elements as $element) { if ( ! $element->hasChildNodes() OR $element->nodeValue == '') { $element->parentNode->removeChild($element); } } echo $dom->saveXML(); ``` [CodePad](http://codepad.viper-...
8,603,259
I've got a question about the facebook graph api. I have a example facebook page: <https://www.facebook.com/pages/TheBestCompany/250721784993387> And i want to get the images from all the people that liked that page. I've found on this site that it is **not** possible to find the people that liked a external page. b...
2011/12/22
[ "https://Stackoverflow.com/questions/8603259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111460/" ]
``` $dom = new DOMDocument; $dom->loadXML($xml); $elements = $dom->getElementsByTagName('*'); foreach($elements as $element) { if ( ! $element->hasChildNodes() OR $element->nodeValue == '') { $element->parentNode->removeChild($element); } } echo $dom->saveXML(); ``` [CodePad](http://codepad.viper-...
The solution that worked with my production PHP SimpleXMLElement object code, by using Xpath, was: ``` /* * Remove empty (no children) and blank (no text) XML element nodes, but not an empty root element (/child::*). * This does not work recursively; meaning after empty child elements are removed, parents are not re...
8,603,259
I've got a question about the facebook graph api. I have a example facebook page: <https://www.facebook.com/pages/TheBestCompany/250721784993387> And i want to get the images from all the people that liked that page. I've found on this site that it is **not** possible to find the people that liked a external page. b...
2011/12/22
[ "https://Stackoverflow.com/questions/8603259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111460/" ]
You can use [XPath](http://docs.php.net/DOMXPath) with the [predicate](http://www.w3.org/TR/xpath/#predicates) `not(node())` to select all elements that do not have child nodes. ``` <?php $doc = new DOMDocument; $doc->preserveWhiteSpace = false; $doc->loadxml('<parentnode> <tag1>2</tag1> <tag2>4</tag2> <ta...
If you're going to be a lot of this, just do something like: ``` $value[] = "2"; $value[] = "4"; $value[] = ""; $xml = '<parentnode>'; for($i=1,$m=count($value); $i<$m+1; $i++) $xml .= !empty($value[$i-1]) ? "<tag{$i}>{$value[$i-1]}</tag{$i}>" : null; $xml .= '</parentnode>'; echo $xml; ``` Ideally though,...
8,603,259
I've got a question about the facebook graph api. I have a example facebook page: <https://www.facebook.com/pages/TheBestCompany/250721784993387> And i want to get the images from all the people that liked that page. I've found on this site that it is **not** possible to find the people that liked a external page. b...
2011/12/22
[ "https://Stackoverflow.com/questions/8603259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111460/" ]
The solution that worked with my production PHP SimpleXMLElement object code, by using Xpath, was: ``` /* * Remove empty (no children) and blank (no text) XML element nodes, but not an empty root element (/child::*). * This does not work recursively; meaning after empty child elements are removed, parents are not re...
If you're going to be a lot of this, just do something like: ``` $value[] = "2"; $value[] = "4"; $value[] = ""; $xml = '<parentnode>'; for($i=1,$m=count($value); $i<$m+1; $i++) $xml .= !empty($value[$i-1]) ? "<tag{$i}>{$value[$i-1]}</tag{$i}>" : null; $xml .= '</parentnode>'; echo $xml; ``` Ideally though,...
8,603,259
I've got a question about the facebook graph api. I have a example facebook page: <https://www.facebook.com/pages/TheBestCompany/250721784993387> And i want to get the images from all the people that liked that page. I've found on this site that it is **not** possible to find the people that liked a external page. b...
2011/12/22
[ "https://Stackoverflow.com/questions/8603259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111460/" ]
This works recursively and removes nodes that: * contain only spaces * do not have attributes * do not have child notes ``` // not(*) does not have children elements // not(@*) does not have attributes // text()[normalize-space()] nodes that include whitespace text while (($node_list = $xpath->query('//*[not(*) and n...
If you're going to be a lot of this, just do something like: ``` $value[] = "2"; $value[] = "4"; $value[] = ""; $xml = '<parentnode>'; for($i=1,$m=count($value); $i<$m+1; $i++) $xml .= !empty($value[$i-1]) ? "<tag{$i}>{$value[$i-1]}</tag{$i}>" : null; $xml .= '</parentnode>'; echo $xml; ``` Ideally though,...
8,603,259
I've got a question about the facebook graph api. I have a example facebook page: <https://www.facebook.com/pages/TheBestCompany/250721784993387> And i want to get the images from all the people that liked that page. I've found on this site that it is **not** possible to find the people that liked a external page. b...
2011/12/22
[ "https://Stackoverflow.com/questions/8603259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111460/" ]
You can use [XPath](http://docs.php.net/DOMXPath) with the [predicate](http://www.w3.org/TR/xpath/#predicates) `not(node())` to select all elements that do not have child nodes. ``` <?php $doc = new DOMDocument; $doc->preserveWhiteSpace = false; $doc->loadxml('<parentnode> <tag1>2</tag1> <tag2>4</tag2> <ta...
The solution that worked with my production PHP SimpleXMLElement object code, by using Xpath, was: ``` /* * Remove empty (no children) and blank (no text) XML element nodes, but not an empty root element (/child::*). * This does not work recursively; meaning after empty child elements are removed, parents are not re...
8,603,259
I've got a question about the facebook graph api. I have a example facebook page: <https://www.facebook.com/pages/TheBestCompany/250721784993387> And i want to get the images from all the people that liked that page. I've found on this site that it is **not** possible to find the people that liked a external page. b...
2011/12/22
[ "https://Stackoverflow.com/questions/8603259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111460/" ]
You can use [XPath](http://docs.php.net/DOMXPath) with the [predicate](http://www.w3.org/TR/xpath/#predicates) `not(node())` to select all elements that do not have child nodes. ``` <?php $doc = new DOMDocument; $doc->preserveWhiteSpace = false; $doc->loadxml('<parentnode> <tag1>2</tag1> <tag2>4</tag2> <ta...
This works recursively and removes nodes that: * contain only spaces * do not have attributes * do not have child notes ``` // not(*) does not have children elements // not(@*) does not have attributes // text()[normalize-space()] nodes that include whitespace text while (($node_list = $xpath->query('//*[not(*) and n...
8,603,259
I've got a question about the facebook graph api. I have a example facebook page: <https://www.facebook.com/pages/TheBestCompany/250721784993387> And i want to get the images from all the people that liked that page. I've found on this site that it is **not** possible to find the people that liked a external page. b...
2011/12/22
[ "https://Stackoverflow.com/questions/8603259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111460/" ]
This works recursively and removes nodes that: * contain only spaces * do not have attributes * do not have child notes ``` // not(*) does not have children elements // not(@*) does not have attributes // text()[normalize-space()] nodes that include whitespace text while (($node_list = $xpath->query('//*[not(*) and n...
The solution that worked with my production PHP SimpleXMLElement object code, by using Xpath, was: ``` /* * Remove empty (no children) and blank (no text) XML element nodes, but not an empty root element (/child::*). * This does not work recursively; meaning after empty child elements are removed, parents are not re...
63,860,763
In case the customer pays online (using for example PayPal) the WooCommerce creates order and then wait for the payment. This "waiting" is order status `pending`. No stock is being reduced during this period which is very bad. The stock is reduced after the succesfull payment by changing the order status to `on-hold`. ...
2020/09/12
[ "https://Stackoverflow.com/questions/63860763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13681589/" ]
You can simply add the following code line to allow stock to be reduced on pending order status *(WooCommerce will do the job triggering [the function `wc_maybe_reduce_stock_levels()`](https://github.com/woocommerce/woocommerce/blob/4.5.1/includes/wc-stock-functions.php#L79-L108) on pending orders*): ``` add_action( '...
Well this is the only working solution I found now: ``` add_action( 'woocommerce_checkout_create_order', 'force_new_order_status', 20, 1 ); function force_new_order_status( $order ) { if( ! $order->has_status('on-hold') ) $order->set_status( 'on-hold', 'Forced status by a custom script (this note is not necc...
63,860,763
In case the customer pays online (using for example PayPal) the WooCommerce creates order and then wait for the payment. This "waiting" is order status `pending`. No stock is being reduced during this period which is very bad. The stock is reduced after the succesfull payment by changing the order status to `on-hold`. ...
2020/09/12
[ "https://Stackoverflow.com/questions/63860763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13681589/" ]
You can simply add the following code line to allow stock to be reduced on pending order status *(WooCommerce will do the job triggering [the function `wc_maybe_reduce_stock_levels()`](https://github.com/woocommerce/woocommerce/blob/4.5.1/includes/wc-stock-functions.php#L79-L108) on pending orders*): ``` add_action( '...
You need to add stock reducing hook (as LoicTheAztec already answered), but you need to also remove the opposite wc\_maybe\_increase\_stock\_levels hook too. To remove it correctly, you need to run it when it is already hooked, so you need to wrap it into init hook. **Following works for me (Woocommerce 5.4.1) - ensur...
63,860,763
In case the customer pays online (using for example PayPal) the WooCommerce creates order and then wait for the payment. This "waiting" is order status `pending`. No stock is being reduced during this period which is very bad. The stock is reduced after the succesfull payment by changing the order status to `on-hold`. ...
2020/09/12
[ "https://Stackoverflow.com/questions/63860763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13681589/" ]
Well this is the only working solution I found now: ``` add_action( 'woocommerce_checkout_create_order', 'force_new_order_status', 20, 1 ); function force_new_order_status( $order ) { if( ! $order->has_status('on-hold') ) $order->set_status( 'on-hold', 'Forced status by a custom script (this note is not necc...
You need to add stock reducing hook (as LoicTheAztec already answered), but you need to also remove the opposite wc\_maybe\_increase\_stock\_levels hook too. To remove it correctly, you need to run it when it is already hooked, so you need to wrap it into init hook. **Following works for me (Woocommerce 5.4.1) - ensur...
7,896
I have a problem with a sentence "A list of items grouped by category". There are two possible ways to understand this sentence: 1. (A list of items) that is grouped by category 2. A list of (items that are grouped by category) How to write it correctly?
2011/01/03
[ "https://english.stackexchange.com/questions/7896", "https://english.stackexchange.com", "https://english.stackexchange.com/users/2312/" ]
This is indeed a classic. The question has been asked many times around the web, and there appear to be two schools: one that agrees with you, and one that thinks both constructions are acceptable and interprets both as 15 sweets. I think those people are nuts, but, hey, they might be the majority. I say, why use a con...
A recent article from the OpenSecrets.org website bears the headline “[Dark Money Spending Three Times More Than at Same Time in 2012 Cycle, CRP Testifies](https://www.opensecrets.org/news/2014/04/dark-money-spending-three-times-more-than-at-same-time-in-2012-cycle-crp-testifies/)” (April 30, 2014). A graph in the [act...
25,843,418
I have a file input with multiple attribute I want when user select multiple file in this control split those files and create multiple file input with each one having only one of those files selected. This allow a user to select multiple files at once but delete them individually if he wants. Beside i want to ajax ...
2014/09/15
[ "https://Stackoverflow.com/questions/25843418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4022919/" ]
You can use one of the free jQuery plugins available. [jQuery File Upload Demo](http://blueimp.github.io/jQuery-File-Upload/index.html) [Uplodify](http://www.uploadify.com/)
You cannot set the "files" or "value" attribute on a file input - therefore you can't just create new file inputs and fill them with one file each. But you can use the new HTML5 FormData object to upload each file separately. So you just display the original file input's "files" attribute as a list. The user can de-sel...
40,654,046
I want to ask about for each here's my HTML ``` <select class="namaKota" id="fromCity"></select> ``` my data in js ``` var listCity = { "Popular": [ {"cityname":"London","code":"LDN"}, {"cityname":"Rome","code":"ROM"}, {"cityname":"Madrid","code":"MDR"} ], "Germany": [ ...
2016/11/17
[ "https://Stackoverflow.com/questions/40654046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5361782/" ]
The layout you have in your image uses `<optgroup>` elements to group the `<option>`. Therefore you need two loops; one to create the `optgroups` from the keys of the object, and another to populate the actual `option` within those groups. Try this: ```js var listCity = { "Popular": [ { "cityname": "London", "...
You need to create `optGroup` element with `option` element which needs to be added `select` element. ``` var select = $("select#fromCity"); //Iterate list City for (var key in listCity) { var cities = listCity[key]; //Create optGroup var optGroup = $('<optgroup/>', { label: key }) for (...
22,061,417
Getting these errors when attempting to post stuff to a database from a form: ``` Notice: Undefined index: formUser in /Applications/MAMP/htdocs/Crewniverse/index.php on line 49 Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in /Applications/MAMP/htdocs/Crewniverse/index.php on line 49 No...
2014/02/27
[ "https://Stackoverflow.com/questions/22061417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2766253/" ]
Obviously it will create only 2 tow when size is 4, when size is 6 it will create 3 row. remove it statement from loop if you want to create rows equal to number if size
remove if statements from loop and create rows normally. change your loop with this for (int arrayCounter = 0; arrayCounter < (documentList.size()/2); arrayCounter++) and for last row you can have if statement which will compare if (documentList.size()/2)-1 == arrayCounter).. then you will get what you are looking fo...
22,061,417
Getting these errors when attempting to post stuff to a database from a form: ``` Notice: Undefined index: formUser in /Applications/MAMP/htdocs/Crewniverse/index.php on line 49 Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in /Applications/MAMP/htdocs/Crewniverse/index.php on line 49 No...
2014/02/27
[ "https://Stackoverflow.com/questions/22061417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2766253/" ]
Obviously it will create only 2 tow when size is 4, when size is 6 it will create 3 row. remove it statement from loop if you want to create rows equal to number if size
Don't use scriptlets in jsp, Jsp is is view layer, use as a view. there is servlet/java-beans to put your all java code. There is jstl taglib, which has many inbuild functions, use it. you can get it from [here](http://mvnrepository.com/artifact/jstl/jstl/1.2) In your case to loop over a list do like this: * Add jst...
33,130,554
I can easily write a little parse program to do this task, but I just know that some linux command line tool guru can teach me something new here. I've pulled apart a bunch of files to gather some data within such that I can create a table with it. The data is presently in the format: ``` .serviceNum=6360, ...
2015/10/14
[ "https://Stackoverflow.com/questions/33130554", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5445938/" ]
Perl to the rescue: ``` perl -pe 'chomp if $. % 3' < input ``` * `-p` processes the input line by line printing each line; * [chomp](http://p3rl.org/chomp) removes the final newline; * [$.](http://p3rl.org/perlvar#%24NR) contains the input line number; * `%` is the modulo operator.
``` perl -alne '$a.=$_; if($.%3==0){print $a; $a=""}' filename ```
33,130,554
I can easily write a little parse program to do this task, but I just know that some linux command line tool guru can teach me something new here. I've pulled apart a bunch of files to gather some data within such that I can create a table with it. The data is presently in the format: ``` .serviceNum=6360, ...
2015/10/14
[ "https://Stackoverflow.com/questions/33130554", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5445938/" ]
Use cat and paste and see the magic ``` cat inputfile.txt | paste - - - ```
Perl to the rescue: ``` perl -pe 'chomp if $. % 3' < input ``` * `-p` processes the input line by line printing each line; * [chomp](http://p3rl.org/chomp) removes the final newline; * [$.](http://p3rl.org/perlvar#%24NR) contains the input line number; * `%` is the modulo operator.
33,130,554
I can easily write a little parse program to do this task, but I just know that some linux command line tool guru can teach me something new here. I've pulled apart a bunch of files to gather some data within such that I can create a table with it. The data is presently in the format: ``` .serviceNum=6360, ...
2015/10/14
[ "https://Stackoverflow.com/questions/33130554", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5445938/" ]
Use cat and paste and see the magic ``` cat inputfile.txt | paste - - - ```
``` perl -alne '$a.=$_; if($.%3==0){print $a; $a=""}' filename ```
10,755,197
I have this script which fires scrolling to next/prev when "N" and "P" keys on keyboard are pressed. My question is how to stop this from firing when the user type these letters normally in any form (such as search field, login field, and so on.) because when I press n e.g. John in a form it does not write N instead it...
2012/05/25
[ "https://Stackoverflow.com/questions/10755197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1385112/" ]
The event object has a `target` property which tells you where the event actually occurred (after which it bubbled up to your document-level handler). So you can test `evt.target` against form field elements and, if it's a match, don't do your special logic. Probably the easiest way to do that is to use [`closest`](ht...
I think something like ``` $('form').on('keydown', function(event) {event.stopPropagation();}); ``` should do the trick if you don't need keyboard controls from inside of a form.
10,755,197
I have this script which fires scrolling to next/prev when "N" and "P" keys on keyboard are pressed. My question is how to stop this from firing when the user type these letters normally in any form (such as search field, login field, and so on.) because when I press n e.g. John in a form it does not write N instead it...
2012/05/25
[ "https://Stackoverflow.com/questions/10755197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1385112/" ]
The event object has a `target` property which tells you where the event actually occurred (after which it bubbled up to your document-level handler). So you can test `evt.target` against form field elements and, if it's a match, don't do your special logic. Probably the easiest way to do that is to use [`closest`](ht...
Use the `target` property of the [`Event` object](https://developer.mozilla.org/en/DOM/event), which points to the source DOM node. So, you could easily use ``` var nn = evt.target.nodeName.toLowerCase(); if (nn != "input" && nn != "textarea") // do your special handling ``` but it might be easier to check for e...
15,684,402
So I have this simple if loop ``` chick<-lapply(1:length(t),function(i){ if(t[[i]]<0.01){ chick=1 }else 0 }) ``` So basically when t<0.01 it print outs 1 if not it prints 0 but there are times when I have data that has NA values like the one below....how can I assign the NA values 0 as well coz I'll get an error si...
2013/03/28
[ "https://Stackoverflow.com/questions/15684402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2214558/" ]
use `is.na` ``` if(t[!is.na(t)][[i]]<0.01) ... ``` --- More importatnly though, since you are assigning to `chick`, do not try to also assign inside your `lapply` (or similar) statement. It will give you results different from what you are expecting. Instead try ``` chick <- lapply(1:length(t),function(i) if(...
The following with check whether `t[[i]]` is either `NA` or less than `0.01`: ``` if (is.na(t[[i]]) || t[[i]] < 0.01) { .... ```
15,684,402
So I have this simple if loop ``` chick<-lapply(1:length(t),function(i){ if(t[[i]]<0.01){ chick=1 }else 0 }) ``` So basically when t<0.01 it print outs 1 if not it prints 0 but there are times when I have data that has NA values like the one below....how can I assign the NA values 0 as well coz I'll get an error si...
2013/03/28
[ "https://Stackoverflow.com/questions/15684402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2214558/" ]
use `is.na` ``` if(t[!is.na(t)][[i]]<0.01) ... ``` --- More importatnly though, since you are assigning to `chick`, do not try to also assign inside your `lapply` (or similar) statement. It will give you results different from what you are expecting. Instead try ``` chick <- lapply(1:length(t),function(i) if(...
Or you could just use... ``` chick <- numeric( length(t) ) chick[ t < 0.01 ] <- 1 ``` ... and avoid loops and checking for NA altogether.
15,684,402
So I have this simple if loop ``` chick<-lapply(1:length(t),function(i){ if(t[[i]]<0.01){ chick=1 }else 0 }) ``` So basically when t<0.01 it print outs 1 if not it prints 0 but there are times when I have data that has NA values like the one below....how can I assign the NA values 0 as well coz I'll get an error si...
2013/03/28
[ "https://Stackoverflow.com/questions/15684402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2214558/" ]
use `is.na` ``` if(t[!is.na(t)][[i]]<0.01) ... ``` --- More importatnly though, since you are assigning to `chick`, do not try to also assign inside your `lapply` (or similar) statement. It will give you results different from what you are expecting. Instead try ``` chick <- lapply(1:length(t),function(i) if(...
Why not just this (invert the test and return 0 for the complementary test as well as for NA): ``` chick <- ifelse(is.na(t)|t>=0.01, 0, 1) ``` This should work because FALSE|NA will return FALSE. See the ?Logic page. It's also more efficient that looping with `lapply`. I suppose if you need the results in list form...
80,604
I create a software in order to solve a step of an specific problem. The results obtained (aided by the software) are going to be published in some journal. The focus of the publication is far away from that step. The software may be very useful for other people because that step is involved in many common problems. I...
2016/11/28
[ "https://academia.stackexchange.com/questions/80604", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/44674/" ]
What do you mean by "and the cites counted"? Do you mean something like Google Scholar will index it? If so, then the common route in CS is to publish *something* that introduces the program (although the code often lives on github). Then people will often cite that paper and or the repo whenever they use your program...
You're already publishing something, and this would be the ideal object to cite for people that will use your software in the future. I would suggest putting the software on a repository, or even on your own website. Then just ask that people cite your paper if they use your software for a publication. Some examples...
80,604
I create a software in order to solve a step of an specific problem. The results obtained (aided by the software) are going to be published in some journal. The focus of the publication is far away from that step. The software may be very useful for other people because that step is involved in many common problems. I...
2016/11/28
[ "https://academia.stackexchange.com/questions/80604", "https://academia.stackexchange.com", "https://academia.stackexchange.com/users/44674/" ]
What do you mean by "and the cites counted"? Do you mean something like Google Scholar will index it? If so, then the common route in CS is to publish *something* that introduces the program (although the code often lives on github). Then people will often cite that paper and or the repo whenever they use your program...
One option is to put it onto Github, which allows you to mint a DOI so that it can be easily cited by others, which in turn allows you to quantify its impact. If you are a member of an academic institution you should check with your library services. Increasingly they regard themselves as custodians of data, and so ma...
28,776
[Niccolò Tartaglia](https://en.wikipedia.org/wiki/Niccol%C3%B2_Fontana_Tartaglia) was an Italian mathematician, engineer and bookkeeper, living in the 16th century in the Republic of Venice. Tartaglia published many books, including his "General Trattato di Numeri", an acclaimed compilation of the mathematics known at ...
2016/03/11
[ "https://puzzling.stackexchange.com/questions/28776", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/8874/" ]
(I'm assuming throughout that the concentration of wine at the end needs to be 50%.) Unless I'm missing something: There are $n$ pints of wine to begin with. After the first 3 pints are taken, you have an $(n-3)/n$ fraction of wine after the water is put back. After the second 3 pints are taken and replaced, you ju...
The answer is > > $14.542$ pints if he replaces wine with water after taking 3 pints of wine. > > > Let say you have 300 units of wine and you take off 3 pints of wine and add 3 pints of wine 3 times. **I. Theft** After you take off 3 pints of wine (3p) and add 3 pints of wine and add water the new concentrati...
28,776
[Niccolò Tartaglia](https://en.wikipedia.org/wiki/Niccol%C3%B2_Fontana_Tartaglia) was an Italian mathematician, engineer and bookkeeper, living in the 16th century in the Republic of Venice. Tartaglia published many books, including his "General Trattato di Numeri", an acclaimed compilation of the mathematics known at ...
2016/03/11
[ "https://puzzling.stackexchange.com/questions/28776", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/8874/" ]
(I'm assuming throughout that the concentration of wine at the end needs to be 50%.) Unless I'm missing something: There are $n$ pints of wine to begin with. After the first 3 pints are taken, you have an $(n-3)/n$ fraction of wine after the water is put back. After the second 3 pints are taken and replaced, you ju...
Let $x$ be the starting amount of pints of wine. Now just focus on the amount of water in the barrel. After the first step there is 3 pints of water in the barrel. Because the content of the barrel is still $x$ pints the amount of water per pint is therefore $3/x$ So in the second step we take $3$ times $3/x$ water ...
28,776
[Niccolò Tartaglia](https://en.wikipedia.org/wiki/Niccol%C3%B2_Fontana_Tartaglia) was an Italian mathematician, engineer and bookkeeper, living in the 16th century in the Republic of Venice. Tartaglia published many books, including his "General Trattato di Numeri", an acclaimed compilation of the mathematics known at ...
2016/03/11
[ "https://puzzling.stackexchange.com/questions/28776", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/8874/" ]
(I'm assuming throughout that the concentration of wine at the end needs to be 50%.) Unless I'm missing something: There are $n$ pints of wine to begin with. After the first 3 pints are taken, you have an $(n-3)/n$ fraction of wine after the water is put back. After the second 3 pints are taken and replaced, you ju...
Here is an alternate line of reasoning based on *astralfenix*'s very helpful answer to solving the puzzle: ``` p = Capacity of barrel in pints ((p - 3) / p) ** 3 = 0.5 (p - 3) / p = 0.5 ** (1 / 3) C = 0.5 ** (1 / 3) (p - 3) / p = C p - 3 = C * p p - 3 - C * p = 0 p - C * p = 3 1 * p - C * p = 3 (1 - C) * p = 3 p = 3 /...
28,776
[Niccolò Tartaglia](https://en.wikipedia.org/wiki/Niccol%C3%B2_Fontana_Tartaglia) was an Italian mathematician, engineer and bookkeeper, living in the 16th century in the Republic of Venice. Tartaglia published many books, including his "General Trattato di Numeri", an acclaimed compilation of the mathematics known at ...
2016/03/11
[ "https://puzzling.stackexchange.com/questions/28776", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/8874/" ]
(I'm assuming throughout that the concentration of wine at the end needs to be 50%.) Unless I'm missing something: There are $n$ pints of wine to begin with. After the first 3 pints are taken, you have an $(n-3)/n$ fraction of wine after the water is put back. After the second 3 pints are taken and replaced, you ju...
Each time wine is replaced the wine remaining is $\frac{n-3}{n}$. $\frac{(n-3)^3}{n^3} = \frac{1}{2}$ $\frac{2(n-3)^3}{n^3} = 1$ $2(n-3)^3 = n^3$ $\sqrt[3]{2(n-3)^3} = \sqrt[3]{n^3}$ $(n-3)\sqrt[3]{2} = n$ $n\sqrt[3]{2} - n - 3\sqrt[3]{2} = 0$ $n\sqrt[3]{2} - n = 3\sqrt[3]{2}$ $n(\sqrt[3]{2} - 1) = 3\sqrt[3]{2}...
28,776
[Niccolò Tartaglia](https://en.wikipedia.org/wiki/Niccol%C3%B2_Fontana_Tartaglia) was an Italian mathematician, engineer and bookkeeper, living in the 16th century in the Republic of Venice. Tartaglia published many books, including his "General Trattato di Numeri", an acclaimed compilation of the mathematics known at ...
2016/03/11
[ "https://puzzling.stackexchange.com/questions/28776", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/8874/" ]
The answer is > > $14.542$ pints if he replaces wine with water after taking 3 pints of wine. > > > Let say you have 300 units of wine and you take off 3 pints of wine and add 3 pints of wine 3 times. **I. Theft** After you take off 3 pints of wine (3p) and add 3 pints of wine and add water the new concentrati...
Here is an alternate line of reasoning based on *astralfenix*'s very helpful answer to solving the puzzle: ``` p = Capacity of barrel in pints ((p - 3) / p) ** 3 = 0.5 (p - 3) / p = 0.5 ** (1 / 3) C = 0.5 ** (1 / 3) (p - 3) / p = C p - 3 = C * p p - 3 - C * p = 0 p - C * p = 3 1 * p - C * p = 3 (1 - C) * p = 3 p = 3 /...
28,776
[Niccolò Tartaglia](https://en.wikipedia.org/wiki/Niccol%C3%B2_Fontana_Tartaglia) was an Italian mathematician, engineer and bookkeeper, living in the 16th century in the Republic of Venice. Tartaglia published many books, including his "General Trattato di Numeri", an acclaimed compilation of the mathematics known at ...
2016/03/11
[ "https://puzzling.stackexchange.com/questions/28776", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/8874/" ]
The answer is > > $14.542$ pints if he replaces wine with water after taking 3 pints of wine. > > > Let say you have 300 units of wine and you take off 3 pints of wine and add 3 pints of wine 3 times. **I. Theft** After you take off 3 pints of wine (3p) and add 3 pints of wine and add water the new concentrati...
Each time wine is replaced the wine remaining is $\frac{n-3}{n}$. $\frac{(n-3)^3}{n^3} = \frac{1}{2}$ $\frac{2(n-3)^3}{n^3} = 1$ $2(n-3)^3 = n^3$ $\sqrt[3]{2(n-3)^3} = \sqrt[3]{n^3}$ $(n-3)\sqrt[3]{2} = n$ $n\sqrt[3]{2} - n - 3\sqrt[3]{2} = 0$ $n\sqrt[3]{2} - n = 3\sqrt[3]{2}$ $n(\sqrt[3]{2} - 1) = 3\sqrt[3]{2}...
28,776
[Niccolò Tartaglia](https://en.wikipedia.org/wiki/Niccol%C3%B2_Fontana_Tartaglia) was an Italian mathematician, engineer and bookkeeper, living in the 16th century in the Republic of Venice. Tartaglia published many books, including his "General Trattato di Numeri", an acclaimed compilation of the mathematics known at ...
2016/03/11
[ "https://puzzling.stackexchange.com/questions/28776", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/8874/" ]
Let $x$ be the starting amount of pints of wine. Now just focus on the amount of water in the barrel. After the first step there is 3 pints of water in the barrel. Because the content of the barrel is still $x$ pints the amount of water per pint is therefore $3/x$ So in the second step we take $3$ times $3/x$ water ...
Here is an alternate line of reasoning based on *astralfenix*'s very helpful answer to solving the puzzle: ``` p = Capacity of barrel in pints ((p - 3) / p) ** 3 = 0.5 (p - 3) / p = 0.5 ** (1 / 3) C = 0.5 ** (1 / 3) (p - 3) / p = C p - 3 = C * p p - 3 - C * p = 0 p - C * p = 3 1 * p - C * p = 3 (1 - C) * p = 3 p = 3 /...
28,776
[Niccolò Tartaglia](https://en.wikipedia.org/wiki/Niccol%C3%B2_Fontana_Tartaglia) was an Italian mathematician, engineer and bookkeeper, living in the 16th century in the Republic of Venice. Tartaglia published many books, including his "General Trattato di Numeri", an acclaimed compilation of the mathematics known at ...
2016/03/11
[ "https://puzzling.stackexchange.com/questions/28776", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/8874/" ]
Let $x$ be the starting amount of pints of wine. Now just focus on the amount of water in the barrel. After the first step there is 3 pints of water in the barrel. Because the content of the barrel is still $x$ pints the amount of water per pint is therefore $3/x$ So in the second step we take $3$ times $3/x$ water ...
Each time wine is replaced the wine remaining is $\frac{n-3}{n}$. $\frac{(n-3)^3}{n^3} = \frac{1}{2}$ $\frac{2(n-3)^3}{n^3} = 1$ $2(n-3)^3 = n^3$ $\sqrt[3]{2(n-3)^3} = \sqrt[3]{n^3}$ $(n-3)\sqrt[3]{2} = n$ $n\sqrt[3]{2} - n - 3\sqrt[3]{2} = 0$ $n\sqrt[3]{2} - n = 3\sqrt[3]{2}$ $n(\sqrt[3]{2} - 1) = 3\sqrt[3]{2}...
28,776
[Niccolò Tartaglia](https://en.wikipedia.org/wiki/Niccol%C3%B2_Fontana_Tartaglia) was an Italian mathematician, engineer and bookkeeper, living in the 16th century in the Republic of Venice. Tartaglia published many books, including his "General Trattato di Numeri", an acclaimed compilation of the mathematics known at ...
2016/03/11
[ "https://puzzling.stackexchange.com/questions/28776", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/8874/" ]
Each time wine is replaced the wine remaining is $\frac{n-3}{n}$. $\frac{(n-3)^3}{n^3} = \frac{1}{2}$ $\frac{2(n-3)^3}{n^3} = 1$ $2(n-3)^3 = n^3$ $\sqrt[3]{2(n-3)^3} = \sqrt[3]{n^3}$ $(n-3)\sqrt[3]{2} = n$ $n\sqrt[3]{2} - n - 3\sqrt[3]{2} = 0$ $n\sqrt[3]{2} - n = 3\sqrt[3]{2}$ $n(\sqrt[3]{2} - 1) = 3\sqrt[3]{2}...
Here is an alternate line of reasoning based on *astralfenix*'s very helpful answer to solving the puzzle: ``` p = Capacity of barrel in pints ((p - 3) / p) ** 3 = 0.5 (p - 3) / p = 0.5 ** (1 / 3) C = 0.5 ** (1 / 3) (p - 3) / p = C p - 3 = C * p p - 3 - C * p = 0 p - C * p = 3 1 * p - C * p = 3 (1 - C) * p = 3 p = 3 /...
895,361
Is there a recommended (and preferably free) way in ColdFusion to access a remote file that is protected by NTLM authentication? The cfhttp tag appears to only support Basic authentication.
2009/05/21
[ "https://Stackoverflow.com/questions/895361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3420/" ]
This CFX Tag - [CFX\_HTTP5](http://www.cftagstore.com/tags/cfxhttp5.cfm) - should do what you need. It does cost $50, but perhaps it's worth the cost? Seems like a small price to pay.
Here is some code I found in: <http://www.bpurcell.org/downloads/presentations/securing_cfapps_examples.zip> There are also examples for ldap, webservices, and more.. I'll paste 2 files here so you can have an idea, code looks like it should still work. ``` <cfapplication name="example2" sessionmanagement="Yes" logi...
895,361
Is there a recommended (and preferably free) way in ColdFusion to access a remote file that is protected by NTLM authentication? The cfhttp tag appears to only support Basic authentication.
2009/05/21
[ "https://Stackoverflow.com/questions/895361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3420/" ]
This CFX Tag - [CFX\_HTTP5](http://www.cftagstore.com/tags/cfxhttp5.cfm) - should do what you need. It does cost $50, but perhaps it's worth the cost? Seems like a small price to pay.
You could try following the guidance here: [<http://cfsilence.com/blog/client/index.cfm/2008/3/17/ColdFusionSharepoint-Integration--Part-1--Authenticating>](http://cfsilence.com/blog/client/index.cfm/2008/3/17/ColdFusionSharepoint-Integration--Part-1--Authenticating) Here is what it boils down to you doing: ``` edit ...
895,361
Is there a recommended (and preferably free) way in ColdFusion to access a remote file that is protected by NTLM authentication? The cfhttp tag appears to only support Basic authentication.
2009/05/21
[ "https://Stackoverflow.com/questions/895361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3420/" ]
This CFX Tag - [CFX\_HTTP5](http://www.cftagstore.com/tags/cfxhttp5.cfm) - should do what you need. It does cost $50, but perhaps it's worth the cost? Seems like a small price to pay.
If the code from Brandon Purcell that uses the `jrun.security.NTauth` class doesn't work for you in `cf9` (it didn't for me) the fix is to use the `coldfusion.security.NTAuthentication` class instead. Everything worked fine for me.
895,361
Is there a recommended (and preferably free) way in ColdFusion to access a remote file that is protected by NTLM authentication? The cfhttp tag appears to only support Basic authentication.
2009/05/21
[ "https://Stackoverflow.com/questions/895361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3420/" ]
This CFX Tag - [CFX\_HTTP5](http://www.cftagstore.com/tags/cfxhttp5.cfm) - should do what you need. It does cost $50, but perhaps it's worth the cost? Seems like a small price to pay.
In my case I fixed this problem using 'NTLM Authorization Proxy Server' <http://www.tldp.org/HOWTO/Web-Browsing-Behind-ISA-Server-HOWTO-4.html> work fine for me :)
895,361
Is there a recommended (and preferably free) way in ColdFusion to access a remote file that is protected by NTLM authentication? The cfhttp tag appears to only support Basic authentication.
2009/05/21
[ "https://Stackoverflow.com/questions/895361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3420/" ]
Here is some code I found in: <http://www.bpurcell.org/downloads/presentations/securing_cfapps_examples.zip> There are also examples for ldap, webservices, and more.. I'll paste 2 files here so you can have an idea, code looks like it should still work. ``` <cfapplication name="example2" sessionmanagement="Yes" logi...
You could try following the guidance here: [<http://cfsilence.com/blog/client/index.cfm/2008/3/17/ColdFusionSharepoint-Integration--Part-1--Authenticating>](http://cfsilence.com/blog/client/index.cfm/2008/3/17/ColdFusionSharepoint-Integration--Part-1--Authenticating) Here is what it boils down to you doing: ``` edit ...
895,361
Is there a recommended (and preferably free) way in ColdFusion to access a remote file that is protected by NTLM authentication? The cfhttp tag appears to only support Basic authentication.
2009/05/21
[ "https://Stackoverflow.com/questions/895361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3420/" ]
Here is some code I found in: <http://www.bpurcell.org/downloads/presentations/securing_cfapps_examples.zip> There are also examples for ldap, webservices, and more.. I'll paste 2 files here so you can have an idea, code looks like it should still work. ``` <cfapplication name="example2" sessionmanagement="Yes" logi...
In my case I fixed this problem using 'NTLM Authorization Proxy Server' <http://www.tldp.org/HOWTO/Web-Browsing-Behind-ISA-Server-HOWTO-4.html> work fine for me :)
895,361
Is there a recommended (and preferably free) way in ColdFusion to access a remote file that is protected by NTLM authentication? The cfhttp tag appears to only support Basic authentication.
2009/05/21
[ "https://Stackoverflow.com/questions/895361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3420/" ]
If the code from Brandon Purcell that uses the `jrun.security.NTauth` class doesn't work for you in `cf9` (it didn't for me) the fix is to use the `coldfusion.security.NTAuthentication` class instead. Everything worked fine for me.
You could try following the guidance here: [<http://cfsilence.com/blog/client/index.cfm/2008/3/17/ColdFusionSharepoint-Integration--Part-1--Authenticating>](http://cfsilence.com/blog/client/index.cfm/2008/3/17/ColdFusionSharepoint-Integration--Part-1--Authenticating) Here is what it boils down to you doing: ``` edit ...
895,361
Is there a recommended (and preferably free) way in ColdFusion to access a remote file that is protected by NTLM authentication? The cfhttp tag appears to only support Basic authentication.
2009/05/21
[ "https://Stackoverflow.com/questions/895361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3420/" ]
If the code from Brandon Purcell that uses the `jrun.security.NTauth` class doesn't work for you in `cf9` (it didn't for me) the fix is to use the `coldfusion.security.NTAuthentication` class instead. Everything worked fine for me.
In my case I fixed this problem using 'NTLM Authorization Proxy Server' <http://www.tldp.org/HOWTO/Web-Browsing-Behind-ISA-Server-HOWTO-4.html> work fine for me :)
26,946,975
I work with android, I want to draw design like this ![enter image description here](https://i.stack.imgur.com/S7TeN.png) There are two LinearLayuots ( blue and white ), I want add picture their borders, I have tryied to use minus margin but not work Can Anybody help me?
2014/11/15
[ "https://Stackoverflow.com/questions/26946975", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2834421/" ]
I finally managed to access logs of the appengine VM using [volumes](https://docs.docker.com/userguide/dockervolumes/) of docker. And hacking a file of the google-cloud-sdk after browsing the python code. However, since I am working on Mac OS X, some extra things where needed because of the VirtualBox layer in between...
Just as a completion to your initial answer @Nicolas, I've created a small shell script that will 1. Builds the project 2. Launch docker 3. Launch a console that will show the latest logs 4. Launch the `gcloud preview app` command I'm sharing the .sh file with you now: ``` #!/bin/sh mvn clean install #build via M...
379,345
I was wondering what the state machine for a video player would be like. I can think of two states : playing and paused. * When the video is playing and the user clicks on a point in the progress bar the video is paused (the video player transitions from the playing state to paused state) until the user stops press...
2018/10/02
[ "https://softwareengineering.stackexchange.com/questions/379345", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/316628/" ]
If you want to hold onto "classical" state machines whose transition functions only depend on the current state and incoming inputs you have to rethink how you want to model the application's state. Formally, you can simulate transitions depending on the previous state (in terms of your current application) by buildin...
Usually, next state *s**i*+1 in a finite state machine is fully defined by a current state *si* and an incoming signal *m*. In other words: *s**i*+1 = *f*(*si*, *m*) > > Can a state machine transition depend on [both the current and] the previous state? > > > Yes, it can. The resulting construct still qualifies ...
340,192
I have a problem with a oneway web method that open a moss site (probably because in a oneway webmethod the context is null) Is possible to rewrite this code to remove the null reference exception? (without the oneway attribute i don't have the exception) ``` [SoapDocumentMethod(OneWay = true)] [WebMethod(Des...
2008/12/04
[ "https://Stackoverflow.com/questions/340192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43162/" ]
i have found a workaround to solve my problem.Create new HttpContext. The question now is: is it the right solution or there are implications that i don't consider? the method that i use to change the context is this: ``` //Call this before call new SPSite() private static void ChangeContext(string webUrl) {...
The only implication that I see is that you are actually using a new HttpContext. Well..duh :) Anyway, this will have implications if you also have input- and outputfilters set up. For example if you are using WebServiceExtensions (WSE) with your own input and outputfilters. In that case, you should store the data in...
340,192
I have a problem with a oneway web method that open a moss site (probably because in a oneway webmethod the context is null) Is possible to rewrite this code to remove the null reference exception? (without the oneway attribute i don't have the exception) ``` [SoapDocumentMethod(OneWay = true)] [WebMethod(Des...
2008/12/04
[ "https://Stackoverflow.com/questions/340192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43162/" ]
i have found a workaround to solve my problem.Create new HttpContext. The question now is: is it the right solution or there are implications that i don't consider? the method that i use to change the context is this: ``` //Call this before call new SPSite() private static void ChangeContext(string webUrl) {...
Use this will work for you: ``` SPWeb web = SPContext.Current.Web ```
19,458,150
I have a form where I must choose a file, then I want to get the $\_FILES['image'] array to be able to pass it as an argument to a Jquery function. How can I do it ? Thank you
2013/10/18
[ "https://Stackoverflow.com/questions/19458150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/891623/" ]
You can use hex code directly in `RewriteRule`: ``` RewriteEngine On RewriteRule ^\xE2\x80\xA6/(myfile\.htm)$ mydirectory/$1 [L,NE,NC,R] ```
I needed to redirect <http://www.bentonswcd.org/resources/rural-living/%20%E2%80%8E> to <http://www.bentonswcd.org/resources/rural-living/>. I tried the suggestion here and in these other posts and none worked: [Trying to Redirect 301 %E2%80%A6 in htaccess file](https://stackoverflow.com/questions/16183230/trying-to-r...
752,691
When resetting IPTables, the apt-get and wget command functions correctly and also downloads what I want. But once I activate this firewall, it isn't functional. Pings still work. I want to allow all outgoing connections. That's why I added "iptables -P OUTPUT ACCEPT" at the end. IPTables Firewall: <http://pastebin.c...
2016/01/29
[ "https://serverfault.com/questions/752691", "https://serverfault.com", "https://serverfault.com/users/-1/" ]
This is what your are looking for. It will pause the sequence and put an icon on the desktop. When you are finished doing what ever you need to install, you complete the image by clicking on the desktop icon. [How to setup LTI-Pause](http://deploymentbunny.com/2011/05/10/ltipause-vbs-take-a-break-in-deployment/ "LTI-P...
If the drivers are in exe form then use the `install application` task sequence task. If they are in `inf`/`ini` form then add them to the MDT driver database and use the install driver task. If you can use a `command prompt` or `powershell` to install them then use the command prompt command or powershell command tas...
121,974
I have a diskless host 'A', that has a directory NFS mounted on server 'B'. A process on A writes to two files F1 and F2 in that directory, and a process on B monitors these files for changes. Assume that B polls for changes faster than A is expected to make them. Process A seeks the head of the files, writes data, and...
2010/03/11
[ "https://serverfault.com/questions/121974", "https://serverfault.com", "https://serverfault.com/users/15222/" ]
I wouldn't rely on consistent ordering across the network. NFS itself generally only guarantees that *after* one client *closes* a file, another client *opening* it should see those changes. (And this says nothing about the observed behavior on the server's filesystem.) What are your NFS client, server, and protocol v...
You might like to see [the answer to another question](https://stackoverflow.com/questions/2422500/safely-lock-a-file-then-move-windows/2422535#2422535), which links to a description of Transactional NTFS. It's really cool, and might help your situation.
121,974
I have a diskless host 'A', that has a directory NFS mounted on server 'B'. A process on A writes to two files F1 and F2 in that directory, and a process on B monitors these files for changes. Assume that B polls for changes faster than A is expected to make them. Process A seeks the head of the files, writes data, and...
2010/03/11
[ "https://serverfault.com/questions/121974", "https://serverfault.com", "https://serverfault.com/users/15222/" ]
This > > Assume that B polls for changes > > > and > > Specifically, if A alternately writes to one file, and then the other, is it reasonable to expect that B will notice alternating changes to F1 and F2? Or could B conceivably detect a series of changes on F1 and then a series on F2? > > > mean that no m...
You might like to see [the answer to another question](https://stackoverflow.com/questions/2422500/safely-lock-a-file-then-move-windows/2422535#2422535), which links to a description of Transactional NTFS. It's really cool, and might help your situation.
18,049
Please suggest the word which means "understandable by specific group". I just forgot that.
2011/03/26
[ "https://english.stackexchange.com/questions/18049", "https://english.stackexchange.com", "https://english.stackexchange.com/users/530/" ]
There are lots of words covering the general concept, but they're usually used by people who are *not* members of the "specific group", so they tend to be pejorative. **Esoteric** strikes me as somewhat less value-laden than most.
While not a direct answer to your question, the term **jargon** refers to language (words and phrases) that are common in one specific group but not used that way outside the group. For example, in medical jargon, a heart attack is called a myocardial infarction.
18,049
Please suggest the word which means "understandable by specific group". I just forgot that.
2011/03/26
[ "https://english.stackexchange.com/questions/18049", "https://english.stackexchange.com", "https://english.stackexchange.com/users/530/" ]
There are lots of words covering the general concept, but they're usually used by people who are *not* members of the "specific group", so they tend to be pejorative. **Esoteric** strikes me as somewhat less value-laden than most.
An "in-joke" is a term used describe an event that is humourous only to a small group of insiders to whom the full history leading up to the event is known, thereby allowing them to find humour in the situation that would otherwise to an outsider not appear to be humourous.
18,049
Please suggest the word which means "understandable by specific group". I just forgot that.
2011/03/26
[ "https://english.stackexchange.com/questions/18049", "https://english.stackexchange.com", "https://english.stackexchange.com/users/530/" ]
There are lots of words covering the general concept, but they're usually used by people who are *not* members of the "specific group", so they tend to be pejorative. **Esoteric** strikes me as somewhat less value-laden than most.
You *may* be looking for the word **shibboleth**. From [Wikipedia](http://en.wikipedia.org/wiki/Shibboleth): > > A shibboleth ( /ˈʃɪbəlɛθ/ or /ˈʃɪbələθ/) is any distinguishing practice that is indicative of one's social or regional origin. > > > It is also used to mean words used by a members of a group to distin...
18,049
Please suggest the word which means "understandable by specific group". I just forgot that.
2011/03/26
[ "https://english.stackexchange.com/questions/18049", "https://english.stackexchange.com", "https://english.stackexchange.com/users/530/" ]
While not a direct answer to your question, the term **jargon** refers to language (words and phrases) that are common in one specific group but not used that way outside the group. For example, in medical jargon, a heart attack is called a myocardial infarction.
An "in-joke" is a term used describe an event that is humourous only to a small group of insiders to whom the full history leading up to the event is known, thereby allowing them to find humour in the situation that would otherwise to an outsider not appear to be humourous.
18,049
Please suggest the word which means "understandable by specific group". I just forgot that.
2011/03/26
[ "https://english.stackexchange.com/questions/18049", "https://english.stackexchange.com", "https://english.stackexchange.com/users/530/" ]
While not a direct answer to your question, the term **jargon** refers to language (words and phrases) that are common in one specific group but not used that way outside the group. For example, in medical jargon, a heart attack is called a myocardial infarction.
You *may* be looking for the word **shibboleth**. From [Wikipedia](http://en.wikipedia.org/wiki/Shibboleth): > > A shibboleth ( /ˈʃɪbəlɛθ/ or /ˈʃɪbələθ/) is any distinguishing practice that is indicative of one's social or regional origin. > > > It is also used to mean words used by a members of a group to distin...
69,884,335
I am following this tutorial: <https://www.baeldung.com/spring-boot-react-crud> When I start the React server and try to fetch the json object(s) from REST API and display them in the map, the player data is not displayed despite following the tutorial. The only thing displayed is the word 'Players' but no player da...
2021/11/08
[ "https://Stackoverflow.com/questions/69884335", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17320369/" ]
if you bind the element to property using wire:model, you can hook the lifecycle as mentioned above ``` public function updatedCourseId($value) { dd($value); } ``` in a different approach, you can listen for the event using wire:change, and for that, you must define the event in listener property like ``` <x-se...
you should hook to the updated method in the lifecycle. <https://laravel-livewire.com/docs/2.x/lifecycle-hooks> ``` public function updatedCourseId(){ dd("here"); } ``` Also remove wire:change
85,247
I am managing an e-store site created by another colleague, that was badly created from the start. Because of the structure, pagination and user browser capabilities combined with lack of meta robots directives to "noindex" certain pages it ended up with over 20k pages indexed in Google. I am working on a website res...
2015/09/21
[ "https://webmasters.stackexchange.com/questions/85247", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/37417/" ]
``` by another colleague, that was badly created from the start ``` my deepest condolences:) The main point you should consider, is whether pages you want to get rid of have EXTERNAL links. This should be the basis for your decision to 301 or 404 them: * if they have external link, 301 them to save the link equity ...
For restructuring of ecommerce websites, perhaps not on a scale as yours, I would do what Evgeniy says above. What I would also do, from an SEO perspective, is if you have any spam/poor/dodgy links pointing to any of the pages you are going to 404, use a 410 response instead - once Google crawls you a couple of times, ...
17,997,685
I am trying to set up a simple maven project that will run a bunch of unit tests written in Python. I believe I need a plugin for this job and I came across one such plugin - [jython-compile-maven-plugin](http://mavenjython.sourceforge.net/compile/plugin-info.html) However, I believe that this plugin allows the user t...
2013/08/01
[ "https://Stackoverflow.com/questions/17997685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2630271/" ]
I have also faced this same issue and solved it by changing the port from 465 to 587. In ColdFusion Administrator check the 'Enable TLS Connection to mail server' check box and remove check from 'Enable SSL connection to mail server'. Now you can verify the connection. Thanks
You need to check the 'Enable TLS Connection to mail server' checkbox as well. I was unable to verify the connection on my test server using the settings you have specified - but using my own credentials. I was able to verify connection when TLS was enabled.
17,997,685
I am trying to set up a simple maven project that will run a bunch of unit tests written in Python. I believe I need a plugin for this job and I came across one such plugin - [jython-compile-maven-plugin](http://mavenjython.sourceforge.net/compile/plugin-info.html) However, I believe that this plugin allows the user t...
2013/08/01
[ "https://Stackoverflow.com/questions/17997685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2630271/" ]
You need to check the 'Enable TLS Connection to mail server' checkbox as well. I was unable to verify the connection on my test server using the settings you have specified - but using my own credentials. I was able to verify connection when TLS was enabled.
I've seen this issue a lot recently, due to Google making some changes to the way that you access GMail accounts. Specifically, you may find a setting in your account that refers to allowing access to 'Less secure apps'. Essentially, Google are trying to force oAuth style authentication, and denying access via usernam...
17,997,685
I am trying to set up a simple maven project that will run a bunch of unit tests written in Python. I believe I need a plugin for this job and I came across one such plugin - [jython-compile-maven-plugin](http://mavenjython.sourceforge.net/compile/plugin-info.html) However, I believe that this plugin allows the user t...
2013/08/01
[ "https://Stackoverflow.com/questions/17997685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2630271/" ]
You need to check the 'Enable TLS Connection to mail server' checkbox as well. I was unable to verify the connection on my test server using the settings you have specified - but using my own credentials. I was able to verify connection when TLS was enabled.
As others have mentioned, double check your SSL/TLS options and port numbers. Also check for leading/trailing spaces in your SMTP credentials. I spent 20 mins troubleshooting this issue once and it turned out to be caused by a trailing space in the SMTP username field.. :/
17,997,685
I am trying to set up a simple maven project that will run a bunch of unit tests written in Python. I believe I need a plugin for this job and I came across one such plugin - [jython-compile-maven-plugin](http://mavenjython.sourceforge.net/compile/plugin-info.html) However, I believe that this plugin allows the user t...
2013/08/01
[ "https://Stackoverflow.com/questions/17997685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2630271/" ]
I have also faced this same issue and solved it by changing the port from 465 to 587. In ColdFusion Administrator check the 'Enable TLS Connection to mail server' check box and remove check from 'Enable SSL connection to mail server'. Now you can verify the connection. Thanks
Removing username and password worked for me in CF11.
17,997,685
I am trying to set up a simple maven project that will run a bunch of unit tests written in Python. I believe I need a plugin for this job and I came across one such plugin - [jython-compile-maven-plugin](http://mavenjython.sourceforge.net/compile/plugin-info.html) However, I believe that this plugin allows the user t...
2013/08/01
[ "https://Stackoverflow.com/questions/17997685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2630271/" ]
I have also faced this same issue and solved it by changing the port from 465 to 587. In ColdFusion Administrator check the 'Enable TLS Connection to mail server' check box and remove check from 'Enable SSL connection to mail server'. Now you can verify the connection. Thanks
I've seen this issue a lot recently, due to Google making some changes to the way that you access GMail accounts. Specifically, you may find a setting in your account that refers to allowing access to 'Less secure apps'. Essentially, Google are trying to force oAuth style authentication, and denying access via usernam...
17,997,685
I am trying to set up a simple maven project that will run a bunch of unit tests written in Python. I believe I need a plugin for this job and I came across one such plugin - [jython-compile-maven-plugin](http://mavenjython.sourceforge.net/compile/plugin-info.html) However, I believe that this plugin allows the user t...
2013/08/01
[ "https://Stackoverflow.com/questions/17997685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2630271/" ]
I have also faced this same issue and solved it by changing the port from 465 to 587. In ColdFusion Administrator check the 'Enable TLS Connection to mail server' check box and remove check from 'Enable SSL connection to mail server'. Now you can verify the connection. Thanks
As others have mentioned, double check your SSL/TLS options and port numbers. Also check for leading/trailing spaces in your SMTP credentials. I spent 20 mins troubleshooting this issue once and it turned out to be caused by a trailing space in the SMTP username field.. :/
17,997,685
I am trying to set up a simple maven project that will run a bunch of unit tests written in Python. I believe I need a plugin for this job and I came across one such plugin - [jython-compile-maven-plugin](http://mavenjython.sourceforge.net/compile/plugin-info.html) However, I believe that this plugin allows the user t...
2013/08/01
[ "https://Stackoverflow.com/questions/17997685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2630271/" ]
Removing username and password worked for me in CF11.
I've seen this issue a lot recently, due to Google making some changes to the way that you access GMail accounts. Specifically, you may find a setting in your account that refers to allowing access to 'Less secure apps'. Essentially, Google are trying to force oAuth style authentication, and denying access via usernam...
17,997,685
I am trying to set up a simple maven project that will run a bunch of unit tests written in Python. I believe I need a plugin for this job and I came across one such plugin - [jython-compile-maven-plugin](http://mavenjython.sourceforge.net/compile/plugin-info.html) However, I believe that this plugin allows the user t...
2013/08/01
[ "https://Stackoverflow.com/questions/17997685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2630271/" ]
Removing username and password worked for me in CF11.
As others have mentioned, double check your SSL/TLS options and port numbers. Also check for leading/trailing spaces in your SMTP credentials. I spent 20 mins troubleshooting this issue once and it turned out to be caused by a trailing space in the SMTP username field.. :/
17,997,685
I am trying to set up a simple maven project that will run a bunch of unit tests written in Python. I believe I need a plugin for this job and I came across one such plugin - [jython-compile-maven-plugin](http://mavenjython.sourceforge.net/compile/plugin-info.html) However, I believe that this plugin allows the user t...
2013/08/01
[ "https://Stackoverflow.com/questions/17997685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2630271/" ]
I've seen this issue a lot recently, due to Google making some changes to the way that you access GMail accounts. Specifically, you may find a setting in your account that refers to allowing access to 'Less secure apps'. Essentially, Google are trying to force oAuth style authentication, and denying access via usernam...
As others have mentioned, double check your SSL/TLS options and port numbers. Also check for leading/trailing spaces in your SMTP credentials. I spent 20 mins troubleshooting this issue once and it turned out to be caused by a trailing space in the SMTP username field.. :/
73,357,902
When I am trying to run my app on my phone it is getting successfully installed in my phone but I am getting white screen instead of my splash page . Attaching my xml code and java code for your reference . Your help is highly appreciated !! activity\_main.xml ``` <?xml version="1.0" encoding="utf-8"?> <RelativeLayou...
2022/08/15
[ "https://Stackoverflow.com/questions/73357902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14533440/" ]
**`SOLUTION 1`** You should set the initial state as `{}` empty object to `response` as: ``` let [response, setResponse] = useState({}); ``` Because you are accessing it in JSX as: ``` {response.employee_salary} ``` The initial value is `undefined`. So your response is `undefined` and you can't access the proper...
useEffect is starting working after first render [docs](https://beta.reactjs.org/learn/synchronizing-with-effects#what-are-effects-and-how-are-they-different-from-events) so in first render this state is undefined. You can fix it in some ways 1. ```js { response?.employee_salary } ``` 2. ```js {response?.employee...
40,437,299
Emulator Image - API 17, armeabi-v7a `tools$ emulator -avd Nexus_5_API_17 dyld: Library not loaded: /tmp/darwin-x86_64-clang-3.5/lib/libc++.1.dylib Referenced from: /Users/madhav/Library/Android/sdk/tools/./emulator Reason: image not found Trace/BPT trap: 5`
2016/11/05
[ "https://Stackoverflow.com/questions/40437299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4708811/" ]
Check your .profile and .bashrc to see if DYLD\_FALLBACK\_LIBRARY\_PATH is set there and if so try commenting out those lines. For me, the Muse SDK had put in a line with this that broke the Android emulator.
As mentioned by Joshua, you need to remove or comment the line added by other applications. The last line of my `.bash_profile` after fix now is: ``` #export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:/Applications/Muse" ```
45,307,541
``` function Hello() { function HelloAgain(){ } } function MyFunction(){ ... } ``` Here I need to call the function HelloAgain() from MyFunction(). Can you suggest any possible solution for this scenario.
2017/07/25
[ "https://Stackoverflow.com/questions/45307541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8364649/" ]
You can't, the HelloAgain function is in a closure and is scoped to that closure. You could return the HelloAgain function and then call it from anywhere you can call Hello. ``` function Hello () { function HelloAgain () {} return HelloAgain; } function MyFunction () { Hello().HelloAgain(); } ``` But that s...
You can't. The scope of `HelloAgain` il limited to the `Hello` function. This is the only way to make private scope in javascript.
64,688,864
I am trying to initialize 2 dynamic arrays which class student will have an array containing all the courses registered and class course will have an array containing all the students registered to the class. I defined class Course and Student like this: ``` #include <iostream> #include <string> #include <stdlib.h> us...
2020/11/04
[ "https://Stackoverflow.com/questions/64688864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Or with Python: ``` import boto3 response = boto3.client("ssm").describe_parameters( ParameterFilters=[ { 'Key': 'Name', 'Option': 'Contains', 'Values': [ 'token', ] }, ] ) ```
I think this is what you are after: ``` aws ssm describe-parameters --parameter-filters Key=Name,Values=token,Option=Contains ```
68,796,367
I want to do something like this in Notepad++. Example text: Text1~Text2 ~Text3 ~Text4 ~ How can I remove the spaces before ~ character and replace ~ with comma instead using Notepad++? The output should be: Sample Output: Text1,Text2,Text3,Text4, Thanks all for your help.
2021/08/16
[ "https://Stackoverflow.com/questions/68796367", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16674872/" ]
Easiest way is try to replace all on the application. Use Ctrl + H key
What you are looking for is a simple replacement. Use `Ctrl + H` key combination which will show up find and replace popup. In the first input box write `~` and in the second one write `,` and then click on `replace all` button. If your text is more complicated than what you've told, give us a piece of text so that I ...
1,334,518
Let $\{a\_0,a\_1,a\_2...\}$ be a sequence of real numbers let $s\_n=\sum a\_{2k}$. If $\lim\_{n\rightarrow \infty} s\_n $ exists then $\sum a\_m$ exists. Is it true? I don§t find a counter example
2015/06/22
[ "https://math.stackexchange.com/questions/1334518", "https://math.stackexchange.com", "https://math.stackexchange.com/users/294365/" ]
This is false. Let $$ a\_n = \begin{cases}0 \text{, if } n \text{ is even} \\ 1 \text{, otherwise} \end{cases} $$ Then $\lim\_{n \rightarrow \infty} s\_n = 0$, but $\sum\_{m=1}^\infty a\_m = \infty$.
Let: $$\begin{cases} a\_m = 0 \text{ if m is even} \\ a\_m = 1 \text{ if m is odd }\end{cases}$$ Then $\sum a\_{2k}=0$ and $\sum a\_m =\infty$.
172
For a movie I'm working on, I need some small rugby crowd ambiences. So I went to a pub to record some, but the TV was up a bit too present. It's non-distinct, but audible nonetheless. My question is whether sport on TV (so a presenter, some crowds and some names of players and teams) is okay to record or are there le...
2010/03/07
[ "https://sound.stackexchange.com/questions/172", "https://sound.stackexchange.com", "https://sound.stackexchange.com/users/2/" ]
At least in the US (probably the same everywhere), you can't use it unless you can obtain permission from broadcaster who owns the rights, which you probably will not be able to do without some sort of contract and payment to the rights holder.
I am afraid that it is the same in the UK, you can not include any broadcast content without it being licensed.
172
For a movie I'm working on, I need some small rugby crowd ambiences. So I went to a pub to record some, but the TV was up a bit too present. It's non-distinct, but audible nonetheless. My question is whether sport on TV (so a presenter, some crowds and some names of players and teams) is okay to record or are there le...
2010/03/07
[ "https://sound.stackexchange.com/questions/172", "https://sound.stackexchange.com", "https://sound.stackexchange.com/users/2/" ]
At least in the US (probably the same everywhere), you can't use it unless you can obtain permission from broadcaster who owns the rights, which you probably will not be able to do without some sort of contract and payment to the rights holder.
It's probably illegal, but, then again, so is everything else. If there's no likelihood of being sued, you should use it illegally to protest against the ever-encroaching tentacles of copyright law.
172
For a movie I'm working on, I need some small rugby crowd ambiences. So I went to a pub to record some, but the TV was up a bit too present. It's non-distinct, but audible nonetheless. My question is whether sport on TV (so a presenter, some crowds and some names of players and teams) is okay to record or are there le...
2010/03/07
[ "https://sound.stackexchange.com/questions/172", "https://sound.stackexchange.com", "https://sound.stackexchange.com/users/2/" ]
Agreed with above, but it sounds like a great reason to ply a bunch of friends with some foamy libations and record rugby walla, probably also doing a separate semi-ADR session with someone doing the play-by-play. I'd volunteer my voice and liver if I lived closer to ya. :-)
I am afraid that it is the same in the UK, you can not include any broadcast content without it being licensed.
172
For a movie I'm working on, I need some small rugby crowd ambiences. So I went to a pub to record some, but the TV was up a bit too present. It's non-distinct, but audible nonetheless. My question is whether sport on TV (so a presenter, some crowds and some names of players and teams) is okay to record or are there le...
2010/03/07
[ "https://sound.stackexchange.com/questions/172", "https://sound.stackexchange.com", "https://sound.stackexchange.com/users/2/" ]
I am afraid that it is the same in the UK, you can not include any broadcast content without it being licensed.
It's probably illegal, but, then again, so is everything else. If there's no likelihood of being sued, you should use it illegally to protest against the ever-encroaching tentacles of copyright law.
172
For a movie I'm working on, I need some small rugby crowd ambiences. So I went to a pub to record some, but the TV was up a bit too present. It's non-distinct, but audible nonetheless. My question is whether sport on TV (so a presenter, some crowds and some names of players and teams) is okay to record or are there le...
2010/03/07
[ "https://sound.stackexchange.com/questions/172", "https://sound.stackexchange.com", "https://sound.stackexchange.com/users/2/" ]
Agreed with above, but it sounds like a great reason to ply a bunch of friends with some foamy libations and record rugby walla, probably also doing a separate semi-ADR session with someone doing the play-by-play. I'd volunteer my voice and liver if I lived closer to ya. :-)
It's probably illegal, but, then again, so is everything else. If there's no likelihood of being sued, you should use it illegally to protest against the ever-encroaching tentacles of copyright law.
53,112,509
I'm new to JavaScript and I'm having trouble trying to make my functions work properly. ```js function myFunction() { // This part appends a number before a label with the class "enum" var enumField = document.getElementsByClassName('enum'); for (var z = 0; z <= enumField.length; z++) { var span = docu...
2018/11/02
[ "https://Stackoverflow.com/questions/53112509", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6164555/" ]
You're actually just looping once more than you need to. Since arrays are zero indexed, you don't want `z <= enumField.length` but rather `z < enumField.length`. Since this error was halting the function, nothing continued. ```js function myFunction() { // This part appends a number before a label with the clas...
It's caused by your for loop condition. You probably get an Array Index Out of Bounds exception. you use ``` z <= enumField.length ``` but it should be ``` z < enumField.length ```
52,433,394
*Question below context* **Context:** For this program to be submitted and work properly I need to be able to input 8.68 for the amount that gets scanned in. The program then needs to be able to calculate how many of each coin type needs to be given as well as the remaining balance after you give ***x*** amount of the...
2018/09/20
[ "https://Stackoverflow.com/questions/52433394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10393544/" ]
> > (Even when I use a different amount in the beginning, it will break at a different point if the amount of coin, in this instance the dimes have a value of 0) > > > That's a big clue. So let's look at the dimes... ``` bal = bal % (numDimes * 10); ``` So, let's say `numDimes` is 0. Then `(numDimes * 10)` is a...
Step 1 - Convert money into whole numbers of the lowest unit. Since code is to count to the "penny", take input and round/convert to whole number of cents. ``` #include <math.h> double amount; printf("Please enter the amount to be paid: $"); //ask how much to be paid scanf("%lf", &amount); long iamount = lround(amoun...
52,433,394
*Question below context* **Context:** For this program to be submitted and work properly I need to be able to input 8.68 for the amount that gets scanned in. The program then needs to be able to calculate how many of each coin type needs to be given as well as the remaining balance after you give ***x*** amount of the...
2018/09/20
[ "https://Stackoverflow.com/questions/52433394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10393544/" ]
> > (Even when I use a different amount in the beginning, it will break at a different point if the amount of coin, in this instance the dimes have a value of 0) > > > That's a big clue. So let's look at the dimes... ``` bal = bal % (numDimes * 10); ``` So, let's say `numDimes` is 0. Then `(numDimes * 10)` is a...
> > Because of the way numDimes is calculated, it will always produce the correct answer as long as numDimes > 0. But bal % 10 will produce the same result. – Barmar > > > So what I ended up doing was easier than I originally thought I was going to have to do, I just used mod *coin value*. Thanks for all the comme...
53,656,121
I am trying to write a simple game, and in that game, there is a class called `Fighter`, and instances of that class can attack other instances. I want to make an instance of that class that is always defined and has special properties(i know how to do that please don't try to answer that) so that it can be used as a ...
2018/12/06
[ "https://Stackoverflow.com/questions/53656121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4429205/" ]
What you probably want is: ``` public class Fighter { public static final Fighter ADMIN_FIGHTER = new Fighter(whatever-args ...); ```
you can use Singleton pattern like this ``` public final class AdminFighter { private static final AdminFighter instance = new AdminFighter(); private AdminFighter(){} public static AdminFighter instance() { return instance; } } ``` so whereever you are in the project you can use like this ``` Ad...
4,399,304
Is there some way to check if an object exists? I keep getting an "object required" error. I know the object does not exist and I would like to bypass a part of my code should that be the case. I don't know what I have not tried... ``` var codeName = document.getElementById('testCode'); //I have tried if(...
2010/12/09
[ "https://Stackoverflow.com/questions/4399304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/54197/" ]
Try: ``` var codeName = document.getElementById(code[i]) || null; if (codeName) {/* action when codeName != null */} ``` if you want to be sure codeName is an Object: ``` if (codeName && codeName instanceof Object) { /* action when codeName != null and Object */ } ```
In ruby `nil` is equivalent to `false`. So try to check just: `if codeName`
4,399,304
Is there some way to check if an object exists? I keep getting an "object required" error. I know the object does not exist and I would like to bypass a part of my code should that be the case. I don't know what I have not tried... ``` var codeName = document.getElementById('testCode'); //I have tried if(...
2010/12/09
[ "https://Stackoverflow.com/questions/4399304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/54197/" ]
``` var codeList = document.getElementById('codeList'); if(!codeList && !codeList.value && !codeList.value.length) return; var code = codeList.value.split(","), itemCount = code.length; if(!itemCount) return; for (var i=0, i<itemCount; i++) { var codeName = document.getElementById(code[i]); if(!codename || ...
I don't do a whole lot of JS coding, but it seems like your [i] is the problem. As far as I know, [] is used for accessing a field of an array, and you don't have an array. Just use "code" + i
4,399,304
Is there some way to check if an object exists? I keep getting an "object required" error. I know the object does not exist and I would like to bypass a part of my code should that be the case. I don't know what I have not tried... ``` var codeName = document.getElementById('testCode'); //I have tried if(...
2010/12/09
[ "https://Stackoverflow.com/questions/4399304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/54197/" ]
Try: ``` var codeName = document.getElementById(code[i]) || null; if (codeName) {/* action when codeName != null */} ``` if you want to be sure codeName is an Object: ``` if (codeName && codeName instanceof Object) { /* action when codeName != null and Object */ } ```
``` <div id='code1'></div> var itemCount = 10; var len = 10; len = itemCount; for (var i=0;i<len; i++) { var codeName = document.getElementById('code'+ i); if(codeName == null) alert("Nope " + i); else alert("Yep " + i); } ```
4,399,304
Is there some way to check if an object exists? I keep getting an "object required" error. I know the object does not exist and I would like to bypass a part of my code should that be the case. I don't know what I have not tried... ``` var codeName = document.getElementById('testCode'); //I have tried if(...
2010/12/09
[ "https://Stackoverflow.com/questions/4399304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/54197/" ]
After the `getElementById` call, `codeName` is either a DOM Element or null. You can use an alert to see which: ``` alert(codeName); ``` So `if (codename != null)` should work. Does the error happen before it gets that far? I would try adding alerts to see the values as the code runs. Or step through this code in a...
I don't know what `document` is, but you could try something like ``` if(document.getElementById('code'+[i]) == null) { //...do Something } ``` so testing if it exists *before* you using it...
4,399,304
Is there some way to check if an object exists? I keep getting an "object required" error. I know the object does not exist and I would like to bypass a part of my code should that be the case. I don't know what I have not tried... ``` var codeName = document.getElementById('testCode'); //I have tried if(...
2010/12/09
[ "https://Stackoverflow.com/questions/4399304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/54197/" ]
After the `getElementById` call, `codeName` is either a DOM Element or null. You can use an alert to see which: ``` alert(codeName); ``` So `if (codename != null)` should work. Does the error happen before it gets that far? I would try adding alerts to see the values as the code runs. Or step through this code in a...
I don't do a whole lot of JS coding, but it seems like your [i] is the problem. As far as I know, [] is used for accessing a field of an array, and you don't have an array. Just use "code" + i
4,399,304
Is there some way to check if an object exists? I keep getting an "object required" error. I know the object does not exist and I would like to bypass a part of my code should that be the case. I don't know what I have not tried... ``` var codeName = document.getElementById('testCode'); //I have tried if(...
2010/12/09
[ "https://Stackoverflow.com/questions/4399304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/54197/" ]
``` var codeList = document.getElementById('codeList'); if(!codeList && !codeList.value && !codeList.value.length) return; var code = codeList.value.split(","), itemCount = code.length; if(!itemCount) return; for (var i=0, i<itemCount; i++) { var codeName = document.getElementById(code[i]); if(!codename || ...
``` <div id='code1'></div> var itemCount = 10; var len = 10; len = itemCount; for (var i=0;i<len; i++) { var codeName = document.getElementById('code'+ i); if(codeName == null) alert("Nope " + i); else alert("Yep " + i); } ```
4,399,304
Is there some way to check if an object exists? I keep getting an "object required" error. I know the object does not exist and I would like to bypass a part of my code should that be the case. I don't know what I have not tried... ``` var codeName = document.getElementById('testCode'); //I have tried if(...
2010/12/09
[ "https://Stackoverflow.com/questions/4399304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/54197/" ]
``` var codeList = document.getElementById('codeList'); if(!codeList && !codeList.value && !codeList.value.length) return; var code = codeList.value.split(","), itemCount = code.length; if(!itemCount) return; for (var i=0, i<itemCount; i++) { var codeName = document.getElementById(code[i]); if(!codename || ...
I don't know what `document` is, but you could try something like ``` if(document.getElementById('code'+[i]) == null) { //...do Something } ``` so testing if it exists *before* you using it...
4,399,304
Is there some way to check if an object exists? I keep getting an "object required" error. I know the object does not exist and I would like to bypass a part of my code should that be the case. I don't know what I have not tried... ``` var codeName = document.getElementById('testCode'); //I have tried if(...
2010/12/09
[ "https://Stackoverflow.com/questions/4399304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/54197/" ]
Try: ``` var codeName = document.getElementById(code[i]) || null; if (codeName) {/* action when codeName != null */} ``` if you want to be sure codeName is an Object: ``` if (codeName && codeName instanceof Object) { /* action when codeName != null and Object */ } ```
``` var codeList = document.getElementById('codeList'); if(!codeList && !codeList.value && !codeList.value.length) return; var code = codeList.value.split(","), itemCount = code.length; if(!itemCount) return; for (var i=0, i<itemCount; i++) { var codeName = document.getElementById(code[i]); if(!codename || ...
4,399,304
Is there some way to check if an object exists? I keep getting an "object required" error. I know the object does not exist and I would like to bypass a part of my code should that be the case. I don't know what I have not tried... ``` var codeName = document.getElementById('testCode'); //I have tried if(...
2010/12/09
[ "https://Stackoverflow.com/questions/4399304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/54197/" ]
After the `getElementById` call, `codeName` is either a DOM Element or null. You can use an alert to see which: ``` alert(codeName); ``` So `if (codename != null)` should work. Does the error happen before it gets that far? I would try adding alerts to see the values as the code runs. Or step through this code in a...
Try: ``` var codeName = document.getElementById(code[i]) || null; if (codeName) {/* action when codeName != null */} ``` if you want to be sure codeName is an Object: ``` if (codeName && codeName instanceof Object) { /* action when codeName != null and Object */ } ```
4,399,304
Is there some way to check if an object exists? I keep getting an "object required" error. I know the object does not exist and I would like to bypass a part of my code should that be the case. I don't know what I have not tried... ``` var codeName = document.getElementById('testCode'); //I have tried if(...
2010/12/09
[ "https://Stackoverflow.com/questions/4399304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/54197/" ]
After the `getElementById` call, `codeName` is either a DOM Element or null. You can use an alert to see which: ``` alert(codeName); ``` So `if (codename != null)` should work. Does the error happen before it gets that far? I would try adding alerts to see the values as the code runs. Or step through this code in a...
Would a try/catch work for you? **[Example](http://www.jsfiddle.net/subhaze/v4MAg/)** ``` function toDoStuff(elem) { codeName = document.getElementById(elem); if (!codeName) throw "Object isn't here yet!" } for (var i = 0; i < 5; i++) { try { toDoStuff('someElem'); } catch (err) { if (...
27,322,689
I have a program that dynamically generates UIButtons in the center of the screen with push of another button. The buttons are not updating the x-coordinates when I rotate the device. Here is my code for creating buttons: ``` - (IBAction)createButton:(UIButton *)sender { UIButton *button = [UIButton buttonWithTy...
2014/12/05
[ "https://Stackoverflow.com/questions/27322689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4329921/" ]
for anyone interested here's how i got round this. I created a shared service between the two controllers. and created a callback on the service. i registered the call back on ctrl2 so when the shared variable changed the controller2 will do what i want it to and scope is freshed. ```html <html> <head> <script ...
General example of how to pass variables from one controller to other ``` <html> <head> <meta charset="ISO-8859-1"> <title>Basic Controller</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"> </script> </head> <body ng-app="myApp"> ...
2,858,134
I have created a control and the mosemove for that control makes it change color, but I want to change it back to default when my mouse moves out of that control. I would have thought WM\_MOUSELEAVE would do it but it didn't. Thanks
2010/05/18
[ "https://Stackoverflow.com/questions/2858134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146780/" ]
That would be the correct message. Are you calling [TrackMouseEvent](http://msdn.microsoft.com/en-us/library/ms646265(VS.85).aspx)?
You could try with WM\_MOUSELEAVE (we have this in a CView derived class ) But I think the best way is to use \_TrackMouseEvent. Max.
19,084,382
Using RStudio --> CompilePDF In a .Rnw document to be processed with pdflatex, I'd like to get a list of all user (me) packages loaded via library() or require() in the document. I tried to use sessionInfo(), as in ``` \AtEndDocument{ \medskip \textbf{Packages used}: \Sexpr{names(sessionInfo()$loadedOnly)}. ...
2013/09/29
[ "https://Stackoverflow.com/questions/19084382", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1873697/" ]
Without cache (`cache = FALSE`), what you want is basically ``` unique(c(.packages(), loadedNamespaces())) ``` With cache enabled, it is slightly more complicated, because the package names are cached as well; the second time you compile the document, these packages are not loaded unless you have invalidated the cac...
So what you want is all the packages which are loaded except the base packages and knitr. If I then list all the packages and exclude those, you'll get what you want: ``` p <- setdiff(.packages(), c("knitr", "stats", "graphics", "grDevices", "utils", "datasets", "methods", "base")) p ``` You'll h...
19,084,382
Using RStudio --> CompilePDF In a .Rnw document to be processed with pdflatex, I'd like to get a list of all user (me) packages loaded via library() or require() in the document. I tried to use sessionInfo(), as in ``` \AtEndDocument{ \medskip \textbf{Packages used}: \Sexpr{names(sessionInfo()$loadedOnly)}. ...
2013/09/29
[ "https://Stackoverflow.com/questions/19084382", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1873697/" ]
So what you want is all the packages which are loaded except the base packages and knitr. If I then list all the packages and exclude those, you'll get what you want: ``` p <- setdiff(.packages(), c("knitr", "stats", "graphics", "grDevices", "utils", "datasets", "methods", "base")) p ``` You'll h...
The problem with this approach is that the \Sexpr{} within the \AtEndDocument{} block in the preamble is evaluated at knit-time (the beginning of the .Rnw file, so it returns an empty list. In the generated .tex file, this appears as ``` \AtEndDocument{ \medskip \textbf{Packages used}: . } ``` The only way this will...
19,084,382
Using RStudio --> CompilePDF In a .Rnw document to be processed with pdflatex, I'd like to get a list of all user (me) packages loaded via library() or require() in the document. I tried to use sessionInfo(), as in ``` \AtEndDocument{ \medskip \textbf{Packages used}: \Sexpr{names(sessionInfo()$loadedOnly)}. ...
2013/09/29
[ "https://Stackoverflow.com/questions/19084382", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1873697/" ]
So what you want is all the packages which are loaded except the base packages and knitr. If I then list all the packages and exclude those, you'll get what you want: ``` p <- setdiff(.packages(), c("knitr", "stats", "graphics", "grDevices", "utils", "datasets", "methods", "base")) p ``` You'll h...
A somewhat different, perhaps more explicit and detailed approach, expanding on answers given previously. This would appear in the `\backmatter` of a book. The value `nColOut` is the number of columns of the printed table containing the list of packages used. ``` \cleardoublepage \printindex \cleardoublepage \chapte...
19,084,382
Using RStudio --> CompilePDF In a .Rnw document to be processed with pdflatex, I'd like to get a list of all user (me) packages loaded via library() or require() in the document. I tried to use sessionInfo(), as in ``` \AtEndDocument{ \medskip \textbf{Packages used}: \Sexpr{names(sessionInfo()$loadedOnly)}. ...
2013/09/29
[ "https://Stackoverflow.com/questions/19084382", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1873697/" ]
Without cache (`cache = FALSE`), what you want is basically ``` unique(c(.packages(), loadedNamespaces())) ``` With cache enabled, it is slightly more complicated, because the package names are cached as well; the second time you compile the document, these packages are not loaded unless you have invalidated the cac...
The problem with this approach is that the \Sexpr{} within the \AtEndDocument{} block in the preamble is evaluated at knit-time (the beginning of the .Rnw file, so it returns an empty list. In the generated .tex file, this appears as ``` \AtEndDocument{ \medskip \textbf{Packages used}: . } ``` The only way this will...
19,084,382
Using RStudio --> CompilePDF In a .Rnw document to be processed with pdflatex, I'd like to get a list of all user (me) packages loaded via library() or require() in the document. I tried to use sessionInfo(), as in ``` \AtEndDocument{ \medskip \textbf{Packages used}: \Sexpr{names(sessionInfo()$loadedOnly)}. ...
2013/09/29
[ "https://Stackoverflow.com/questions/19084382", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1873697/" ]
Without cache (`cache = FALSE`), what you want is basically ``` unique(c(.packages(), loadedNamespaces())) ``` With cache enabled, it is slightly more complicated, because the package names are cached as well; the second time you compile the document, these packages are not loaded unless you have invalidated the cac...
A somewhat different, perhaps more explicit and detailed approach, expanding on answers given previously. This would appear in the `\backmatter` of a book. The value `nColOut` is the number of columns of the printed table containing the list of packages used. ``` \cleardoublepage \printindex \cleardoublepage \chapte...