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
3,187,899
I have multiple context files. Requirement is: one particular Bean (which makes some configuration changes) to be initialized first among rest of beans. Is there a way to get this bean loaded first? *One option is using depends-on` attribute. But that would require updating all the rest of the beans, thus seems not...
2010/07/06
[ "https://Stackoverflow.com/questions/3187899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/231567/" ]
IMHO you should wait until they fix <https://jira.spring.io/browse/SPR-3948> > > One probable way is to use depends-on attribute. But again, I don't want to add this attribute in all the rest of the beans (this is probably the last resort for me). > > > Actually, you don't need to use depends-on on EACH AND EVERY...
I'm not a Spring expert and likely to be shouted down by someone who is. But until then... Where there's room for ambiguity, I would guess that Spring loads/applies stuff in the order it encounters it in the configuration files. Thus, as a first and simplest approximation, I would try to ensure that the thing you want...
3,187,899
I have multiple context files. Requirement is: one particular Bean (which makes some configuration changes) to be initialized first among rest of beans. Is there a way to get this bean loaded first? *One option is using depends-on` attribute. But that would require updating all the rest of the beans, thus seems not...
2010/07/06
[ "https://Stackoverflow.com/questions/3187899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/231567/" ]
In can be meaningful to require ordering of beans, typically for technical beans (e.g. adding MBeans) to be loaded before business beans (just like it is proposed in <http://jira.springframework.org/browse/SPR-3948>) Using BeanPostProcessor is another way to provide some ordering in your beans. Check AbstractApplicati...
I'm not a Spring expert and likely to be shouted down by someone who is. But until then... Where there's room for ambiguity, I would guess that Spring loads/applies stuff in the order it encounters it in the configuration files. Thus, as a first and simplest approximation, I would try to ensure that the thing you want...
3,187,899
I have multiple context files. Requirement is: one particular Bean (which makes some configuration changes) to be initialized first among rest of beans. Is there a way to get this bean loaded first? *One option is using depends-on` attribute. But that would require updating all the rest of the beans, thus seems not...
2010/07/06
[ "https://Stackoverflow.com/questions/3187899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/231567/" ]
I managed to influence the bean startup order by annotating my bean with `@Order`: See <http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/annotation/Order.html>
I'm not a Spring expert and likely to be shouted down by someone who is. But until then... Where there's room for ambiguity, I would guess that Spring loads/applies stuff in the order it encounters it in the configuration files. Thus, as a first and simplest approximation, I would try to ensure that the thing you want...
3,187,899
I have multiple context files. Requirement is: one particular Bean (which makes some configuration changes) to be initialized first among rest of beans. Is there a way to get this bean loaded first? *One option is using depends-on` attribute. But that would require updating all the rest of the beans, thus seems not...
2010/07/06
[ "https://Stackoverflow.com/questions/3187899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/231567/" ]
IMHO you should wait until they fix <https://jira.spring.io/browse/SPR-3948> > > One probable way is to use depends-on attribute. But again, I don't want to add this attribute in all the rest of the beans (this is probably the last resort for me). > > > Actually, you don't need to use depends-on on EACH AND EVERY...
In can be meaningful to require ordering of beans, typically for technical beans (e.g. adding MBeans) to be loaded before business beans (just like it is proposed in <http://jira.springframework.org/browse/SPR-3948>) Using BeanPostProcessor is another way to provide some ordering in your beans. Check AbstractApplicati...
3,187,899
I have multiple context files. Requirement is: one particular Bean (which makes some configuration changes) to be initialized first among rest of beans. Is there a way to get this bean loaded first? *One option is using depends-on` attribute. But that would require updating all the rest of the beans, thus seems not...
2010/07/06
[ "https://Stackoverflow.com/questions/3187899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/231567/" ]
IMHO you should wait until they fix <https://jira.spring.io/browse/SPR-3948> > > One probable way is to use depends-on attribute. But again, I don't want to add this attribute in all the rest of the beans (this is probably the last resort for me). > > > Actually, you don't need to use depends-on on EACH AND EVERY...
I managed to influence the bean startup order by annotating my bean with `@Order`: See <http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/annotation/Order.html>
3,187,899
I have multiple context files. Requirement is: one particular Bean (which makes some configuration changes) to be initialized first among rest of beans. Is there a way to get this bean loaded first? *One option is using depends-on` attribute. But that would require updating all the rest of the beans, thus seems not...
2010/07/06
[ "https://Stackoverflow.com/questions/3187899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/231567/" ]
I managed to influence the bean startup order by annotating my bean with `@Order`: See <http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/annotation/Order.html>
In can be meaningful to require ordering of beans, typically for technical beans (e.g. adding MBeans) to be loaded before business beans (just like it is proposed in <http://jira.springframework.org/browse/SPR-3948>) Using BeanPostProcessor is another way to provide some ordering in your beans. Check AbstractApplicati...
26,928,889
**How to check if iframe content is empty then then disable "enter key" and "space" else if Enable.** [DEMO HERE](http://jsfiddle.net/stanze/q1ed0ph0/) ``` var iframeContainerVal = $("#textEditor").contents().find("body").text(); var container = document.getElementById("textEditor").contentWindow; function checkPre...
2014/11/14
[ "https://Stackoverflow.com/questions/26928889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2741729/" ]
Datepicker's scope has a property 'activeDateId' that you can watch. It changes when you switch months. I think the best way is to create a 'decorator' on the datepicker directive so you can add functionality to it. You can access its scope if you override the directive's 'compile' function. You do this in a module.c...
Put a $watch on the model the date picker is bound to: ``` <datepicker ng-model="data.date" min-date="minDate" show-weeks="true" class="well well-sm"></datepicker> $scope.$watch('data.date', function(){ //date has changed }); ```
26,928,889
**How to check if iframe content is empty then then disable "enter key" and "space" else if Enable.** [DEMO HERE](http://jsfiddle.net/stanze/q1ed0ph0/) ``` var iframeContainerVal = $("#textEditor").contents().find("body").text(); var container = document.getElementById("textEditor").contentWindow; function checkPre...
2014/11/14
[ "https://Stackoverflow.com/questions/26928889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2741729/" ]
Datepicker's scope has a property 'activeDateId' that you can watch. It changes when you switch months. I think the best way is to create a 'decorator' on the datepicker directive so you can add functionality to it. You can access its scope if you override the directive's 'compile' function. You do this in a module.c...
I had the same issue when I was trying to set the ng-model to first day of January when they select a year. @Rob and @spongessuck answers really helped me. This is how I solved it. Whenever you select a year or month, the variable `activeDate` gets set. I am using `$setViewValue` to set the model to `activeDate` by wat...
26,928,889
**How to check if iframe content is empty then then disable "enter key" and "space" else if Enable.** [DEMO HERE](http://jsfiddle.net/stanze/q1ed0ph0/) ``` var iframeContainerVal = $("#textEditor").contents().find("body").text(); var container = document.getElementById("textEditor").contentWindow; function checkPre...
2014/11/14
[ "https://Stackoverflow.com/questions/26928889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2741729/" ]
It's unfortunate that the `datepicker` directive doesn't have a binding to track the month/year change. Here is what I came up with as a work around. ### In the html... ``` <datepicker month-changed="changeMonth($month, $year)" /> ``` ### In the controller... ``` $scope.changeMonth = function(month, year) { co...
Put a $watch on the model the date picker is bound to: ``` <datepicker ng-model="data.date" min-date="minDate" show-weeks="true" class="well well-sm"></datepicker> $scope.$watch('data.date', function(){ //date has changed }); ```
26,928,889
**How to check if iframe content is empty then then disable "enter key" and "space" else if Enable.** [DEMO HERE](http://jsfiddle.net/stanze/q1ed0ph0/) ``` var iframeContainerVal = $("#textEditor").contents().find("body").text(); var container = document.getElementById("textEditor").contentWindow; function checkPre...
2014/11/14
[ "https://Stackoverflow.com/questions/26928889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2741729/" ]
It's unfortunate that the `datepicker` directive doesn't have a binding to track the month/year change. Here is what I came up with as a work around. ### In the html... ``` <datepicker month-changed="changeMonth($month, $year)" /> ``` ### In the controller... ``` $scope.changeMonth = function(month, year) { co...
I had the same issue when I was trying to set the ng-model to first day of January when they select a year. @Rob and @spongessuck answers really helped me. This is how I solved it. Whenever you select a year or month, the variable `activeDate` gets set. I am using `$setViewValue` to set the model to `activeDate` by wat...
1,302,530
This may be more appropriate in UNIX & Linux, so please let me know. I'm wondering if there's a filesystem available in Linux that can withstand (or is designed to be able to better handle) hard disconnections of SSD/flash media? A good runner-up answer would be the suggestion of a filesystem mount parameter configurat...
2018/03/11
[ "https://superuser.com/questions/1302530", "https://superuser.com", "https://superuser.com/users/589147/" ]
This is a scary topic, with a few avenues to investigate... I'm going to cover the two big ones. Have a look at this talk from ELC 2015: *[Filesystem considerations for embedded devices](https://events.static.linuxfound.org/sites/events/files/slides/fs-for-embedded-full_0.pdf)*. Filesystem ---------- The filesystem ...
RFS - a Samsung file system "Robust File System" should be OK for this. In practice, you should be able to use any journalled filesystem or system that does copy-on-write (ext3, ext4 and even more-so btrfs). The risk you run - which will apply to any filesystem - is that the OS may buffer the information, or may not b...
37,397,379
[edit 1] Added figures to show the original data and the obtained data [edit 2] I found my mistakes, I used fftw\_measure instead of fftw\_estimate in the call of dfftw\_plan\_many\_dft [edit 3] corrected a typo in the code (replace u with u2d in dfftw\_execute\_dft\_r2c ) I'm trying perform the 2D fft of an array u...
2016/05/23
[ "https://Stackoverflow.com/questions/37397379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6372512/" ]
Once you enter multiple `char`s and press `ENTER`, all the `char`s are going to be stored in standard input. Running `scanf("%c",&c)` *once* will read one `char` and leave the rest of the inputs in the `stdin`. So, for the next time, when control reaches `scanf("%c",&c)` (due to the `while()` loop control), it will rea...
The buffer (stdin) is not empty. You are fetching only one character, but doing it in loop. If you want to fetch only one character drop the while.
37,397,379
[edit 1] Added figures to show the original data and the obtained data [edit 2] I found my mistakes, I used fftw\_measure instead of fftw\_estimate in the call of dfftw\_plan\_many\_dft [edit 3] corrected a typo in the code (replace u with u2d in dfftw\_execute\_dft\_r2c ) I'm trying perform the 2D fft of an array u...
2016/05/23
[ "https://Stackoverflow.com/questions/37397379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6372512/" ]
Once you enter multiple `char`s and press `ENTER`, all the `char`s are going to be stored in standard input. Running `scanf("%c",&c)` *once* will read one `char` and leave the rest of the inputs in the `stdin`. So, for the next time, when control reaches `scanf("%c",&c)` (due to the `while()` loop control), it will rea...
`scanf` function scans `stdin` buffer for the first occurance of specified template. In your case it's a single character. But the buffer is not cleared upon completion, so if you will call `scanf` once more - you will get the next character from the stream. This behavior can be avoided using special terminal configura...
37,397,379
[edit 1] Added figures to show the original data and the obtained data [edit 2] I found my mistakes, I used fftw\_measure instead of fftw\_estimate in the call of dfftw\_plan\_many\_dft [edit 3] corrected a typo in the code (replace u with u2d in dfftw\_execute\_dft\_r2c ) I'm trying perform the 2D fft of an array u...
2016/05/23
[ "https://Stackoverflow.com/questions/37397379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6372512/" ]
Once you enter multiple `char`s and press `ENTER`, all the `char`s are going to be stored in standard input. Running `scanf("%c",&c)` *once* will read one `char` and leave the rest of the inputs in the `stdin`. So, for the next time, when control reaches `scanf("%c",&c)` (due to the `while()` loop control), it will rea...
Repeated execution of the code ``` scanf("%c", &c); ``` will read *every* character that is input - including the `newline` that you type. You can change it to ignore any preceding whitespace with ``` scanf(" %c", &c); ``` Note the difference is a `space` before the format specification. Apart from that, none of...
11,381,905
I am trying to multiply two `float`s as follows: ``` float number1 = 321.12; float number2 = 345.34; float rexsult = number1 * number2; ``` The result I want to see is 110895.582, but when I run the code it just gives me 110896. Most of the time I'm having this issue. Any calculator gives me the exact result with al...
2012/07/08
[ "https://Stackoverflow.com/questions/11381905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/296651/" ]
There's a lot of rounding going on. ``` float a = 321.12; // this number will be rounded float b = 345.34; // this number will also be rounded float r = a * b; // and this number will be rounded too printf("%.15f\n", r); ``` I get 110895.578125000000000 after the three separate roundings. 1. If you want more than ...
Since you are using C you could easily set the precision by using "%.xf" where x is the wanted precision. For example: ``` float n1 = 321.12; float n2 = 345.34; float result = n1 * n2; printf("%.20f", result); ``` Output: ``` 110895.57812500000000000000 ``` However, note that `float` only gives six digits of pr...
11,381,905
I am trying to multiply two `float`s as follows: ``` float number1 = 321.12; float number2 = 345.34; float rexsult = number1 * number2; ``` The result I want to see is 110895.582, but when I run the code it just gives me 110896. Most of the time I'm having this issue. Any calculator gives me the exact result with al...
2012/07/08
[ "https://Stackoverflow.com/questions/11381905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/296651/" ]
You will never get the exact result that way. First of all, number1 ≠ 321.12 because that value cannot be represented exactly in a base-2 system. You'll need an infinite number of bits for it. The same holds for number2 ≠ 345.34. So, you begin with inexact values to begin with. Then the product will get rounded bec...
Since you are using C you could easily set the precision by using "%.xf" where x is the wanted precision. For example: ``` float n1 = 321.12; float n2 = 345.34; float result = n1 * n2; printf("%.20f", result); ``` Output: ``` 110895.57812500000000000000 ``` However, note that `float` only gives six digits of pr...
11,381,905
I am trying to multiply two `float`s as follows: ``` float number1 = 321.12; float number2 = 345.34; float rexsult = number1 * number2; ``` The result I want to see is 110895.582, but when I run the code it just gives me 110896. Most of the time I'm having this issue. Any calculator gives me the exact result with al...
2012/07/08
[ "https://Stackoverflow.com/questions/11381905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/296651/" ]
There's a lot of rounding going on. ``` float a = 321.12; // this number will be rounded float b = 345.34; // this number will also be rounded float r = a * b; // and this number will be rounded too printf("%.15f\n", r); ``` I get 110895.578125000000000 after the three separate roundings. 1. If you want more than ...
* floating point variables are only approximate representation, not precise one. Not every number can "fit" into float variable. For example, there is no way to put 1/10 (0.1) into binary variable, just like it's not possible to put 1/3 into decimal one (you can only approximate it with endless 0.33333) * when outputti...
11,381,905
I am trying to multiply two `float`s as follows: ``` float number1 = 321.12; float number2 = 345.34; float rexsult = number1 * number2; ``` The result I want to see is 110895.582, but when I run the code it just gives me 110896. Most of the time I'm having this issue. Any calculator gives me the exact result with al...
2012/07/08
[ "https://Stackoverflow.com/questions/11381905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/296651/" ]
There's a lot of rounding going on. ``` float a = 321.12; // this number will be rounded float b = 345.34; // this number will also be rounded float r = a * b; // and this number will be rounded too printf("%.15f\n", r); ``` I get 110895.578125000000000 after the three separate roundings. 1. If you want more than ...
You will never get the exact result that way. First of all, number1 ≠ 321.12 because that value cannot be represented exactly in a base-2 system. You'll need an infinite number of bits for it. The same holds for number2 ≠ 345.34. So, you begin with inexact values to begin with. Then the product will get rounded bec...
11,381,905
I am trying to multiply two `float`s as follows: ``` float number1 = 321.12; float number2 = 345.34; float rexsult = number1 * number2; ``` The result I want to see is 110895.582, but when I run the code it just gives me 110896. Most of the time I'm having this issue. Any calculator gives me the exact result with al...
2012/07/08
[ "https://Stackoverflow.com/questions/11381905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/296651/" ]
You will never get the exact result that way. First of all, number1 ≠ 321.12 because that value cannot be represented exactly in a base-2 system. You'll need an infinite number of bits for it. The same holds for number2 ≠ 345.34. So, you begin with inexact values to begin with. Then the product will get rounded bec...
* floating point variables are only approximate representation, not precise one. Not every number can "fit" into float variable. For example, there is no way to put 1/10 (0.1) into binary variable, just like it's not possible to put 1/3 into decimal one (you can only approximate it with endless 0.33333) * when outputti...
1,236,627
I have the following code which does not seem to work. I fail to see why this wont work. ``` <s:iterator value=%{questions} id="question"> <s:if test='%{incorrectQs.contains("#question.questionId")}'> Print something here </s:if> </s:iterator> ``` In the above code, basically I have a method called getQ...
2009/08/06
[ "https://Stackoverflow.com/questions/1236627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44286/" ]
As Christian's answer with `assign()` shows, there is a way to assign in the global environment. A simpler, shorter (but not better ... stick with assign) way is to use the `<<-` operator, ie ``` a <<- "new" ``` inside the function.
I found a solution for how to set a global variable in a [mailinglist posting](http://tolstoy.newcastle.edu.au/R/help/05/11/16539.html) via [assign](https://stat.ethz.ch/R-manual/R-devel/library/base/html/assign.html): ``` a <- "old" test <- function () { assign("a", "new", envir = .GlobalEnv) } test() a # display...
1,236,627
I have the following code which does not seem to work. I fail to see why this wont work. ``` <s:iterator value=%{questions} id="question"> <s:if test='%{incorrectQs.contains("#question.questionId")}'> Print something here </s:if> </s:iterator> ``` In the above code, basically I have a method called getQ...
2009/08/06
[ "https://Stackoverflow.com/questions/1236627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44286/" ]
I found a solution for how to set a global variable in a [mailinglist posting](http://tolstoy.newcastle.edu.au/R/help/05/11/16539.html) via [assign](https://stat.ethz.ch/R-manual/R-devel/library/base/html/assign.html): ``` a <- "old" test <- function () { assign("a", "new", envir = .GlobalEnv) } test() a # display...
What about `.GlobalEnv$a <- "new"` ? I saw this explicit way of creating a variable in a certain environment here: <http://adv-r.had.co.nz/Environments.html>. It seems shorter than using the `assign()` function.
1,236,627
I have the following code which does not seem to work. I fail to see why this wont work. ``` <s:iterator value=%{questions} id="question"> <s:if test='%{incorrectQs.contains("#question.questionId")}'> Print something here </s:if> </s:iterator> ``` In the above code, basically I have a method called getQ...
2009/08/06
[ "https://Stackoverflow.com/questions/1236627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44286/" ]
As Christian's answer with `assign()` shows, there is a way to assign in the global environment. A simpler, shorter (but not better ... stick with assign) way is to use the `<<-` operator, ie ``` a <<- "new" ``` inside the function.
What about `.GlobalEnv$a <- "new"` ? I saw this explicit way of creating a variable in a certain environment here: <http://adv-r.had.co.nz/Environments.html>. It seems shorter than using the `assign()` function.
16,073
I am trying to export data from a database to a csv file, I am using the code below to retrieve the data from the DB, but it only returns 100 rows, how can I fix that? ``` $criteria = craft()->elements->getCriteria(ElementType::Entry); $criteria->section = 'educators'; $query = craft()->elements->buildElementsQuery($c...
2016/07/27
[ "https://craftcms.stackexchange.com/questions/16073", "https://craftcms.stackexchange.com", "https://craftcms.stackexchange.com/users/5330/" ]
Craft imposes a default limit of 100 for element queries. To disable this you need to specify a limit of `null`. ``` $criteria->limit = null; ```
By default, Craft sets a limit of 100. Set it to null: `limit(null)`.
9,864,473
When I try to remove my PHP extensions from all my files using my .htaccess file on my Apache server, everything works great. The extensions are removed, and everything looks much better. However, I'm having one small issue: when I would normally go to a page such as `./nonexistent.php`, I would get a 404 error. But, ...
2012/03/25
[ "https://Stackoverflow.com/questions/9864473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/445788/" ]
When you are requesting a non-existent file using the above rewrite conditions, you are running into an infinite redirect. If you access `http://yoursite.com/i-dont-exist`, the first condition is evaluating true, `i-dont-exist` is a non existent file, so it will try to rewrite to `i-dont-exist.php` which also doesn't ...
<http://www.openia.com/blogs/errordocument-and-mod_rewrite-workaround>
266,852
Is there something I can use that renames PDF files according to their content? Basically an equivalent of <http://macscripter.net/viewtopic.php?id=27620> in Ubuntu.
2013/03/12
[ "https://askubuntu.com/questions/266852", "https://askubuntu.com", "https://askubuntu.com/users/90933/" ]
**If you are comfortable with python** you could use the script on <http://blog.matt-swain.com/post/25650072381/a-lightweight-xmp-parser-for-extracting-pdf-metadata-in>. I have just tested the scripts he provides (for a start, you can `pip install pdfminer`) and they work nicely. The result they give is something along...
There is another alternative. You could `sudo apt-get install pdftk`. With that library you can run a command like `pdftk myfile.pdf dump_data` which results in something in a set of `info` and `value`: ``` InfoKey: Creator InfoValue: Word InfoKey: Producer InfoValue: Mac OS X 10.3.8 Quartz PDFContext InfoKey: ModDate...
266,852
Is there something I can use that renames PDF files according to their content? Basically an equivalent of <http://macscripter.net/viewtopic.php?id=27620> in Ubuntu.
2013/03/12
[ "https://askubuntu.com/questions/266852", "https://askubuntu.com", "https://askubuntu.com/users/90933/" ]
**If you are comfortable with python** you could use the script on <http://blog.matt-swain.com/post/25650072381/a-lightweight-xmp-parser-for-extracting-pdf-metadata-in>. I have just tested the scripts he provides (for a start, you can `pip install pdfminer`) and they work nicely. The result they give is something along...
If you're looking for an out-of-the-box solution and your PDFs are academic in nature, you might try [Zotero](https://www.zotero.org/), the Firefox plugin. Unfortunately this takes several steps to do, each of which can be a bit slow if you are trying to work with a lot of PDFs at once: 1. Drag and drop your PDFs in...
266,852
Is there something I can use that renames PDF files according to their content? Basically an equivalent of <http://macscripter.net/viewtopic.php?id=27620> in Ubuntu.
2013/03/12
[ "https://askubuntu.com/questions/266852", "https://askubuntu.com", "https://askubuntu.com/users/90933/" ]
**If you are comfortable with python** you could use the script on <http://blog.matt-swain.com/post/25650072381/a-lightweight-xmp-parser-for-extracting-pdf-metadata-in>. I have just tested the scripts he provides (for a start, you can `pip install pdfminer`) and they work nicely. The result they give is something along...
If you are in search of a GUI solution [KRename](https://userbase.kde.org/KRename) is a very powerful renaming tool, able to handle your requirements. [![enter image description here](https://i.stack.imgur.com/BNY4C.png)](https://i.stack.imgur.com/BNY4C.png) to install: ``` sudo apt install krename ```
266,852
Is there something I can use that renames PDF files according to their content? Basically an equivalent of <http://macscripter.net/viewtopic.php?id=27620> in Ubuntu.
2013/03/12
[ "https://askubuntu.com/questions/266852", "https://askubuntu.com", "https://askubuntu.com/users/90933/" ]
This is very easy to achieve with [exiftool](http://www.sno.phy.queensu.ca/~phil/exiftool/). For instance, the following command would rename all files in the current directory to `<title>.extension`: ``` exiftool '-filename<$title.%e' . ``` You can install exiftool on Ubuntu with: ``` sudo apt-get install libimag...
There is another alternative. You could `sudo apt-get install pdftk`. With that library you can run a command like `pdftk myfile.pdf dump_data` which results in something in a set of `info` and `value`: ``` InfoKey: Creator InfoValue: Word InfoKey: Producer InfoValue: Mac OS X 10.3.8 Quartz PDFContext InfoKey: ModDate...
266,852
Is there something I can use that renames PDF files according to their content? Basically an equivalent of <http://macscripter.net/viewtopic.php?id=27620> in Ubuntu.
2013/03/12
[ "https://askubuntu.com/questions/266852", "https://askubuntu.com", "https://askubuntu.com/users/90933/" ]
There is another alternative. You could `sudo apt-get install pdftk`. With that library you can run a command like `pdftk myfile.pdf dump_data` which results in something in a set of `info` and `value`: ``` InfoKey: Creator InfoValue: Word InfoKey: Producer InfoValue: Mac OS X 10.3.8 Quartz PDFContext InfoKey: ModDate...
If you're looking for an out-of-the-box solution and your PDFs are academic in nature, you might try [Zotero](https://www.zotero.org/), the Firefox plugin. Unfortunately this takes several steps to do, each of which can be a bit slow if you are trying to work with a lot of PDFs at once: 1. Drag and drop your PDFs in...
266,852
Is there something I can use that renames PDF files according to their content? Basically an equivalent of <http://macscripter.net/viewtopic.php?id=27620> in Ubuntu.
2013/03/12
[ "https://askubuntu.com/questions/266852", "https://askubuntu.com", "https://askubuntu.com/users/90933/" ]
There is another alternative. You could `sudo apt-get install pdftk`. With that library you can run a command like `pdftk myfile.pdf dump_data` which results in something in a set of `info` and `value`: ``` InfoKey: Creator InfoValue: Word InfoKey: Producer InfoValue: Mac OS X 10.3.8 Quartz PDFContext InfoKey: ModDate...
If you are in search of a GUI solution [KRename](https://userbase.kde.org/KRename) is a very powerful renaming tool, able to handle your requirements. [![enter image description here](https://i.stack.imgur.com/BNY4C.png)](https://i.stack.imgur.com/BNY4C.png) to install: ``` sudo apt install krename ```
266,852
Is there something I can use that renames PDF files according to their content? Basically an equivalent of <http://macscripter.net/viewtopic.php?id=27620> in Ubuntu.
2013/03/12
[ "https://askubuntu.com/questions/266852", "https://askubuntu.com", "https://askubuntu.com/users/90933/" ]
This is very easy to achieve with [exiftool](http://www.sno.phy.queensu.ca/~phil/exiftool/). For instance, the following command would rename all files in the current directory to `<title>.extension`: ``` exiftool '-filename<$title.%e' . ``` You can install exiftool on Ubuntu with: ``` sudo apt-get install libimag...
If you're looking for an out-of-the-box solution and your PDFs are academic in nature, you might try [Zotero](https://www.zotero.org/), the Firefox plugin. Unfortunately this takes several steps to do, each of which can be a bit slow if you are trying to work with a lot of PDFs at once: 1. Drag and drop your PDFs in...
266,852
Is there something I can use that renames PDF files according to their content? Basically an equivalent of <http://macscripter.net/viewtopic.php?id=27620> in Ubuntu.
2013/03/12
[ "https://askubuntu.com/questions/266852", "https://askubuntu.com", "https://askubuntu.com/users/90933/" ]
This is very easy to achieve with [exiftool](http://www.sno.phy.queensu.ca/~phil/exiftool/). For instance, the following command would rename all files in the current directory to `<title>.extension`: ``` exiftool '-filename<$title.%e' . ``` You can install exiftool on Ubuntu with: ``` sudo apt-get install libimag...
If you are in search of a GUI solution [KRename](https://userbase.kde.org/KRename) is a very powerful renaming tool, able to handle your requirements. [![enter image description here](https://i.stack.imgur.com/BNY4C.png)](https://i.stack.imgur.com/BNY4C.png) to install: ``` sudo apt install krename ```
7,450,083
I'm trying to launch a project in netbeans but I keep getting the error "Could not connect to admin listener for GlassFish server 3.1 Verify that NetBeans can make outbound connections to localhost:4848" I've been tackling glassfish server problems since morning. Has anyone encountered this problem before?
2011/09/16
[ "https://Stackoverflow.com/questions/7450083", "https://Stackoverflow.com", "https://Stackoverflow.com/users/832411/" ]
I encounted the same problem. It was because the server takes over the proxy settings of the IDE by default. You can deselect it by going to GlassFish Server 3.x properties and then click on the java tab ==> deselect Use IDE's proxy settings. Afther that i could deploy my application.
This has happened to me too,and I figured out that the 'JavA(TM) Platform SE Auto updater ' service was not running.I checked the service after running msconfig->startup tab.An update automatically was installed and there after everything restarted working. Hope this might help. Cheers. Maiga
7,450,083
I'm trying to launch a project in netbeans but I keep getting the error "Could not connect to admin listener for GlassFish server 3.1 Verify that NetBeans can make outbound connections to localhost:4848" I've been tackling glassfish server problems since morning. Has anyone encountered this problem before?
2011/09/16
[ "https://Stackoverflow.com/questions/7450083", "https://Stackoverflow.com", "https://Stackoverflow.com/users/832411/" ]
Start server using: ``` <glassfilshInstallationRoot>\glassfish\bin\startserv.bat ``` For me it also works in NetBeans.
same thing happend with me.then i checked my anti-virus setting and turned anti-virus firwall disable for some time.and then run my project again and it worked for me. hope this may work for you as well.
7,450,083
I'm trying to launch a project in netbeans but I keep getting the error "Could not connect to admin listener for GlassFish server 3.1 Verify that NetBeans can make outbound connections to localhost:4848" I've been tackling glassfish server problems since morning. Has anyone encountered this problem before?
2011/09/16
[ "https://Stackoverflow.com/questions/7450083", "https://Stackoverflow.com", "https://Stackoverflow.com/users/832411/" ]
I encounted the same problem today, cause I'm using it for rails, and I always use Webric to run rails project. If you don't use glassfish, you can just delete it. click 'tools -> service', and delete glassfish, then it works fine.
same thing happend with me.then i checked my anti-virus setting and turned anti-virus firwall disable for some time.and then run my project again and it worked for me. hope this may work for you as well.
7,450,083
I'm trying to launch a project in netbeans but I keep getting the error "Could not connect to admin listener for GlassFish server 3.1 Verify that NetBeans can make outbound connections to localhost:4848" I've been tackling glassfish server problems since morning. Has anyone encountered this problem before?
2011/09/16
[ "https://Stackoverflow.com/questions/7450083", "https://Stackoverflow.com", "https://Stackoverflow.com/users/832411/" ]
The best thing that I suggest you can do is: 1. Download the separate source for Glassfish server application 2. Uninstall all the default files of Glassfish which were installed while installing Netbeans.(You need to close your Netbeans while uninstalling it. Plus delete any files in the folder glassfish-3.1.2.2 for ...
same thing happend with me.then i checked my anti-virus setting and turned anti-virus firwall disable for some time.and then run my project again and it worked for me. hope this may work for you as well.
7,450,083
I'm trying to launch a project in netbeans but I keep getting the error "Could not connect to admin listener for GlassFish server 3.1 Verify that NetBeans can make outbound connections to localhost:4848" I've been tackling glassfish server problems since morning. Has anyone encountered this problem before?
2011/09/16
[ "https://Stackoverflow.com/questions/7450083", "https://Stackoverflow.com", "https://Stackoverflow.com/users/832411/" ]
I encounted the same problem. It was because the server takes over the proxy settings of the IDE by default. You can deselect it by going to GlassFish Server 3.x properties and then click on the java tab ==> deselect Use IDE's proxy settings. Afther that i could deploy my application.
The best thing that I suggest you can do is: 1. Download the separate source for Glassfish server application 2. Uninstall all the default files of Glassfish which were installed while installing Netbeans.(You need to close your Netbeans while uninstalling it. Plus delete any files in the folder glassfish-3.1.2.2 for ...
7,450,083
I'm trying to launch a project in netbeans but I keep getting the error "Could not connect to admin listener for GlassFish server 3.1 Verify that NetBeans can make outbound connections to localhost:4848" I've been tackling glassfish server problems since morning. Has anyone encountered this problem before?
2011/09/16
[ "https://Stackoverflow.com/questions/7450083", "https://Stackoverflow.com", "https://Stackoverflow.com/users/832411/" ]
I encounted the same problem today, cause I'm using it for rails, and I always use Webric to run rails project. If you don't use glassfish, you can just delete it. click 'tools -> service', and delete glassfish, then it works fine.
admin-listener port defined in domain.xml for glassfish should be same that of which netbeans is trying to connect, e.g. 4848 (default) as below: ``` <network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener> </network-listeners> `...
7,450,083
I'm trying to launch a project in netbeans but I keep getting the error "Could not connect to admin listener for GlassFish server 3.1 Verify that NetBeans can make outbound connections to localhost:4848" I've been tackling glassfish server problems since morning. Has anyone encountered this problem before?
2011/09/16
[ "https://Stackoverflow.com/questions/7450083", "https://Stackoverflow.com", "https://Stackoverflow.com/users/832411/" ]
There are a few things to look at. 1) Make sure GF is running or if it's not that you can start it. On the Services tab, expand servers, right click on your gf server and select start. 2) Verify the port it's using by mousing over the server (see image). Make sure that port isn't blocked by a firewall. 3) Earlier you...
This has happened to me too,and I figured out that the 'JavA(TM) Platform SE Auto updater ' service was not running.I checked the service after running msconfig->startup tab.An update automatically was installed and there after everything restarted working. Hope this might help. Cheers. Maiga
7,450,083
I'm trying to launch a project in netbeans but I keep getting the error "Could not connect to admin listener for GlassFish server 3.1 Verify that NetBeans can make outbound connections to localhost:4848" I've been tackling glassfish server problems since morning. Has anyone encountered this problem before?
2011/09/16
[ "https://Stackoverflow.com/questions/7450083", "https://Stackoverflow.com", "https://Stackoverflow.com/users/832411/" ]
There are a few things to look at. 1) Make sure GF is running or if it's not that you can start it. On the Services tab, expand servers, right click on your gf server and select start. 2) Verify the port it's using by mousing over the server (see image). Make sure that port isn't blocked by a firewall. 3) Earlier you...
same thing happend with me.then i checked my anti-virus setting and turned anti-virus firwall disable for some time.and then run my project again and it worked for me. hope this may work for you as well.
7,450,083
I'm trying to launch a project in netbeans but I keep getting the error "Could not connect to admin listener for GlassFish server 3.1 Verify that NetBeans can make outbound connections to localhost:4848" I've been tackling glassfish server problems since morning. Has anyone encountered this problem before?
2011/09/16
[ "https://Stackoverflow.com/questions/7450083", "https://Stackoverflow.com", "https://Stackoverflow.com/users/832411/" ]
Start server using: ``` <glassfilshInstallationRoot>\glassfish\bin\startserv.bat ``` For me it also works in NetBeans.
admin-listener port defined in domain.xml for glassfish should be same that of which netbeans is trying to connect, e.g. 4848 (default) as below: ``` <network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener> </network-listeners> `...
7,450,083
I'm trying to launch a project in netbeans but I keep getting the error "Could not connect to admin listener for GlassFish server 3.1 Verify that NetBeans can make outbound connections to localhost:4848" I've been tackling glassfish server problems since morning. Has anyone encountered this problem before?
2011/09/16
[ "https://Stackoverflow.com/questions/7450083", "https://Stackoverflow.com", "https://Stackoverflow.com/users/832411/" ]
I encounted the same problem today, cause I'm using it for rails, and I always use Webric to run rails project. If you don't use glassfish, you can just delete it. click 'tools -> service', and delete glassfish, then it works fine.
This has happened to me too,and I figured out that the 'JavA(TM) Platform SE Auto updater ' service was not running.I checked the service after running msconfig->startup tab.An update automatically was installed and there after everything restarted working. Hope this might help. Cheers. Maiga
38,061,383
I am trying to develop a web application which basically gets some details in the form of a for and saves the details in the user's computer. I cant save the data in the server as it is confidential. So all the data should be saved in the local system and should be loaded from the local system. An interface has to be d...
2016/06/27
[ "https://Stackoverflow.com/questions/38061383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5505014/" ]
You can store all the data in the users browser using Cookies with a very long timeset, if it's just text. But the user can always delete the cookies or use an extension that prevents you from storing cookies. You didn't say what you are using for back-end but I will assume you are using .ASP as .NET is one of your h...
LocalStorage is good for store datas. There are many libs that use localstorage like [OhMyCache](https://github.com/ozee31/ohmycache) for store objects, arrays...
22,631,542
I would like to use multiple, different orbit sliders which are displayed in header. I tried to build if statement using is\_page(ID) but it seem not working, after uploading this in my header.php page went blank, only top navigatioan appeared. Can you help me out and improve this code? ``` <?php if (is_page(112...
2014/03/25
[ "https://Stackoverflow.com/questions/22631542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
It is perfectly valid to inject $scope to get access to things like $watch even when your using the "controller as" syntax. For example: JS ``` var MyController = function($scope) { $scope.$watch('ctrl.someVar' function() { ... }); this.someVar = 123; } MyController.$inject = ['$scope']; ``` H...
@rob answer is correct. There are perfectly valid reasons to still want `$scope` injected in your controllers, `$watch` `$on` `$emit` `$broadcast` to name a few. Sure you can get away with this requirement in some cases using directives or services, but it's not always worth the time or complexity. I've given the `con...
36,076,858
I have a silly question here. I am also new to these, please show some codes if possible. **Android Studio: How to append a custom text into ListView/ListAdapter?** * I would like to add the extra text before my raw Stock ID. > > Example: Product ID: 1, > Product ID: 2 > > > * raw Stock ID is obtained from a Da...
2016/03/18
[ "https://Stackoverflow.com/questions/36076858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4013628/" ]
you can use like below:- ``` driver.get("http://UserName:Password@Example.com"); ``` Give your username in place of username, same for password and change example.com with your website OR there is one more method but it is in java you can convert it into C# by taking it's reference. ``` WebDriverWait wait = new We...
Pass you username and password with application url like below while navigating application url: ``` http://username:passwork@applicationURL ```
36,076,858
I have a silly question here. I am also new to these, please show some codes if possible. **Android Studio: How to append a custom text into ListView/ListAdapter?** * I would like to add the extra text before my raw Stock ID. > > Example: Product ID: 1, > Product ID: 2 > > > * raw Stock ID is obtained from a Da...
2016/03/18
[ "https://Stackoverflow.com/questions/36076858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4013628/" ]
Paste this in your `.config file` add key=`URL` value="http://**username**:**password**@**pasteyoururl**" paste this in your **c# script** ``` string `variable` = ConfigurationManager.AppSettings["**URL**"]; driver.Navigate().GoToUrl(**variable**); ``` Try the above mentioned code, sure it will work. This code ...
Pass you username and password with application url like below while navigating application url: ``` http://username:passwork@applicationURL ```
36,076,858
I have a silly question here. I am also new to these, please show some codes if possible. **Android Studio: How to append a custom text into ListView/ListAdapter?** * I would like to add the extra text before my raw Stock ID. > > Example: Product ID: 1, > Product ID: 2 > > > * raw Stock ID is obtained from a Da...
2016/03/18
[ "https://Stackoverflow.com/questions/36076858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4013628/" ]
``` string siteUser = "testUser"; string sitePass = "testPass"; string siteUrl = "localhost:1980" string format = @"https://{0}:{1}@{2}/site"; string authURI = String.Format(format, siteUser, sitePass, siteUrl); driver.Navigate().GoToUrl(authURI); ``` This is what worked for us
Pass you username and password with application url like below while navigating application url: ``` http://username:passwork@applicationURL ```
5,424,107
Why is the UPDATE in "Example 2" not working? ``` # MySQL DDL to create database used by code # # CREATE DATABASE sampledb; # # USE sampledb; # # CREATE TABLE `dbtable` ( # `id` int(11) NOT NULL AUTO_INCREMENT, # `demo` longtext, # PRIMARY KEY (`id`) # ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ...
2011/03/24
[ "https://Stackoverflow.com/questions/5424107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/471255/" ]
Using the [dbf module](http://pypi.python.org/pypi/dbf/) referenced above what you want is: ``` myDB.use_deleted = False ``` and for individual records: ``` for record in myDB: if record.has_been_deleted: print "record %d is marked for deletion!" % record.record_number ``` To physically remove the rec...
Stop me if you've heard this one before: """I have a DBF reading module (pydbfrw) which I've been meaning to release "one of these days".""" It was easier to add the functionality that you want than to puzzle through the source code of the `dbf` module: ``` >>> import pydbfrw >>> d = pydbfrw.DBFreader('/devel/dbf/all...
61,710,401
I do an Oracle to SQL Server project,now I have a function that I can not rebuild,I don't know what is wrong, The function is used to fetch the Oracle sequenes,the result is wrong. Oracle function code ``` CREATE FUNCTION [test].[GETWORKORDERID] (numberPre varchar2) return varchar2 is PRAGMA AUTONOMOUS_TRANSAC...
2020/05/10
[ "https://Stackoverflow.com/questions/61710401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8624196/" ]
Well, as first you're returning `compChoose` when you updated `chooseComp`. Btw, js doesn't work in this way, when a value is returned from a method it will not change also if you change into the caller function. ``` function caller() { let returnedValue = called(); // here returnedValue is not updated when it...
I can't see where you define compChoose.
79,417
Below is an excerpt from Raymer (*Aircraft Design*) where he explains the dihedral effect. He states that a banked aircraft (due to say a roll disturbance) will have a sideslip which leads to a restoring moment back to equilibrium. What is the physical explanation for why there is a sideslip? [![enter image descriptio...
2020/07/08
[ "https://aviation.stackexchange.com/questions/79417", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/44580/" ]
It sounds very much what you're experiencing is a [Phugoid cycle](https://en.wikipedia.org/wiki/Phugoid) ![](https://upload.wikimedia.org/wikipedia/commons/6/61/Phugoid8.png) [Image License info](https://commons.wikimedia.org/wiki/File:Phugoid8.png) To put simply, your aircraft is not trimmed correctly. As it descend...
In my experience with model airplanes the bobbing and dipping motion occurs when the center of lift is forward of the center of mass and represents a series of mini-stalls and recoveries that persist and repeat. Since simple model planes generally do not have elevator trim, the solution is to move the wing attach poin...
79,417
Below is an excerpt from Raymer (*Aircraft Design*) where he explains the dihedral effect. He states that a banked aircraft (due to say a roll disturbance) will have a sideslip which leads to a restoring moment back to equilibrium. What is the physical explanation for why there is a sideslip? [![enter image descriptio...
2020/07/08
[ "https://aviation.stackexchange.com/questions/79417", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/44580/" ]
It sounds very much what you're experiencing is a [Phugoid cycle](https://en.wikipedia.org/wiki/Phugoid) ![](https://upload.wikimedia.org/wikipedia/commons/6/61/Phugoid8.png) [Image License info](https://commons.wikimedia.org/wiki/File:Phugoid8.png) To put simply, your aircraft is not trimmed correctly. As it descend...
> > If there ever was a pilot who forgot to throttle down on descent > > > Full scale pilots trim their elevator for speed, and use their throttle to climb or descend. "Bobbing or skipping" behavior in cruise is a sign of instability, not surprising for a tailless piece of foam. If this plane has a published CG l...
79,417
Below is an excerpt from Raymer (*Aircraft Design*) where he explains the dihedral effect. He states that a banked aircraft (due to say a roll disturbance) will have a sideslip which leads to a restoring moment back to equilibrium. What is the physical explanation for why there is a sideslip? [![enter image descriptio...
2020/07/08
[ "https://aviation.stackexchange.com/questions/79417", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/44580/" ]
> > If there ever was a pilot who forgot to throttle down on descent > > > Full scale pilots trim their elevator for speed, and use their throttle to climb or descend. "Bobbing or skipping" behavior in cruise is a sign of instability, not surprising for a tailless piece of foam. If this plane has a published CG l...
In my experience with model airplanes the bobbing and dipping motion occurs when the center of lift is forward of the center of mass and represents a series of mini-stalls and recoveries that persist and repeat. Since simple model planes generally do not have elevator trim, the solution is to move the wing attach poin...
176,140
I've often heard in engineering that, "there is no shape stronger than a triangle." I also recall that arches are also very strong shapes, which can be crudely described as a perpendicularly-symmetrical half-an-ellipse; Which can be simplified to half a circle. If there were no conventional complications with designin...
2015/04/14
[ "https://physics.stackexchange.com/questions/176140", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/77772/" ]
The short answer is, if you are making a bridge, triangles are, because the way they distribute weight when they are in a group makes them stronger. A single arch is stronger, but when you use lots of triangles when building a bridge it becomes stronger than using one arch. That is why we use triangles for most of our ...
Triangular support(or triangle here) is unparalleled in terms of strength they provide to support load because all the hold mass is properly distributed across the support. You may disagree when g=0 :)
176,140
I've often heard in engineering that, "there is no shape stronger than a triangle." I also recall that arches are also very strong shapes, which can be crudely described as a perpendicularly-symmetrical half-an-ellipse; Which can be simplified to half a circle. If there were no conventional complications with designin...
2015/04/14
[ "https://physics.stackexchange.com/questions/176140", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/77772/" ]
I'm glad that my head is spheroid instead of pyramidal: then the circle is favored. The eggs have an [extremely strong shape](http://www.stevespanglerscience.com/lab/experiments/amazing-egg): then the circle is favored. The [insects are extremely strong](http://insects%20are%20extremely%20strong) and they favor the...
Triangular support(or triangle here) is unparalleled in terms of strength they provide to support load because all the hold mass is properly distributed across the support. You may disagree when g=0 :)
176,140
I've often heard in engineering that, "there is no shape stronger than a triangle." I also recall that arches are also very strong shapes, which can be crudely described as a perpendicularly-symmetrical half-an-ellipse; Which can be simplified to half a circle. If there were no conventional complications with designin...
2015/04/14
[ "https://physics.stackexchange.com/questions/176140", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/77772/" ]
The short answer is, if you are making a bridge, triangles are, because the way they distribute weight when they are in a group makes them stronger. A single arch is stronger, but when you use lots of triangles when building a bridge it becomes stronger than using one arch. That is why we use triangles for most of our ...
I'm glad that my head is spheroid instead of pyramidal: then the circle is favored. The eggs have an [extremely strong shape](http://www.stevespanglerscience.com/lab/experiments/amazing-egg): then the circle is favored. The [insects are extremely strong](http://insects%20are%20extremely%20strong) and they favor the...
26,613,640
I am trying to imitate a timepicker with a dropdown like in the Google Calendar. Mine has the following structure: HTML: ``` <input type="text" class="timepicker-with-dropdown"> <div class="timepicker-select-box"> <div>00:00</div> <div>00:30</div> <div>01:00</div> ... <div>23:30</div> </div> ``` ...
2014/10/28
[ "https://Stackoverflow.com/questions/26613640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3563439/" ]
You should find the input element in current teration context. you can use: ``` $(".agrRow").each(function(){ // get price for this field lp=parseFloat($(this).find('[name=agrPrice]').val()); }); ``` To get them all in array: ``` $(".agrRow [name=agrPrice]").map(function(){ return parseFl...
You should use the `this` context to get the input inside the iterating div. ``` $(".agrRow").each(function(){ // get price for this field lp=parseFloat($(this).find("input[type='text'][name='agrPrice']").val() ); }); ```
54,649,457
I have a dataframe df: ``` codeID 0 4829 1 2348 2 401 3 281 4 Z3995 5 O888 6 v71.9 7 NaN 8 Z863 3 9 9 10 50 ``` I wanted to only extract the first 3 digits of the column codeID. If there is any alphabet in front, then I would like to ignore...
2019/02/12
[ "https://Stackoverflow.com/questions/54649457", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9316299/" ]
You can use [extract](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.str.extract.html) directly as it only extracts the first occurrence, just add [zfill](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.str.zfill.html) at the end to fill for the missing digits: ``` re...
I did it without a regex, bulkier but still not too bad: ``` df.loc[~df.codeID.isna(), 'codeID'] = df.codeID.dropna().apply(lambda x: x.split(' ')[0]) df.loc[~df.codeID.isna(), 'codeID'] = df.codeID.dropna().apply(lambda x: x.split('.')[0]) df.codeID = df.codeID.str.lstrip('acdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS...
54,649,457
I have a dataframe df: ``` codeID 0 4829 1 2348 2 401 3 281 4 Z3995 5 O888 6 v71.9 7 NaN 8 Z863 3 9 9 10 50 ``` I wanted to only extract the first 3 digits of the column codeID. If there is any alphabet in front, then I would like to ignore...
2019/02/12
[ "https://Stackoverflow.com/questions/54649457", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9316299/" ]
You can use [extract](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.str.extract.html) directly as it only extracts the first occurrence, just add [zfill](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.str.zfill.html) at the end to fill for the missing digits: ``` re...
Another way of doing this can using **lambda and regex**: ``` %%time df = pd.DataFrame({'CodeID': ['4829','2348','401','281','Z3995', 'O888','v71.9','NaN', 'Z863 3', '9','50']}) print(df['CodeID'].apply(lambda x: 'NaN' if x=='NaN' else re.findall('[0-9]{1,3}', x)[0]).str.zfill(3)) ``` Output: ``` 0 482 1 23...
54,649,457
I have a dataframe df: ``` codeID 0 4829 1 2348 2 401 3 281 4 Z3995 5 O888 6 v71.9 7 NaN 8 Z863 3 9 9 10 50 ``` I wanted to only extract the first 3 digits of the column codeID. If there is any alphabet in front, then I would like to ignore...
2019/02/12
[ "https://Stackoverflow.com/questions/54649457", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9316299/" ]
Another way of doing this can using **lambda and regex**: ``` %%time df = pd.DataFrame({'CodeID': ['4829','2348','401','281','Z3995', 'O888','v71.9','NaN', 'Z863 3', '9','50']}) print(df['CodeID'].apply(lambda x: 'NaN' if x=='NaN' else re.findall('[0-9]{1,3}', x)[0]).str.zfill(3)) ``` Output: ``` 0 482 1 23...
I did it without a regex, bulkier but still not too bad: ``` df.loc[~df.codeID.isna(), 'codeID'] = df.codeID.dropna().apply(lambda x: x.split(' ')[0]) df.loc[~df.codeID.isna(), 'codeID'] = df.codeID.dropna().apply(lambda x: x.split('.')[0]) df.codeID = df.codeID.str.lstrip('acdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS...
67,269,410
I currently have the following dataframe; | title | date | sentiment | stock\_ticker | | --- | --- | --- | --- | | good news from vw | 2021-04-01 | positive | vlkaf | | some post about vw | 2021-04-01 | positive | vlkaf | | another post on vw | 2021-04-01 | negative | vlkaf | | post about gme | 2020-05-01 | positive |...
2021/04/26
[ "https://Stackoverflow.com/questions/67269410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12492054/" ]
first `map` the column sentiment to replace positive by 1 and negative by -1, then `groupby` the two columns date and stock\_ticker, `sum` and finally `reset_index` to get the expected output. ``` res = ( df['sentiment'].map({'positive':1, 'negative':-1}) .groupby([df['date'], df['stock_ticker']]) ...
``` # look for when sentiment is positive and negative df["sentiment_score"] = ((df["sentiment"] == "positive").astype(int) - (df["sentiment"] == "negative").astype(int)) # True can be converted into 1 df.groupby(["date", "stock_sticker"]).sum() # sentiment_score # date stock_sticker ...
11,647
I have watched quite a lot of anime over the last several years. And I noticed that I haven't seen a single anime which lacked both an opening and an ending song. There are some anime that don't have ED songs or don't have OP songs. But are there any anime that have neither of these?
2014/07/04
[ "https://anime.stackexchange.com/questions/11647", "https://anime.stackexchange.com", "https://anime.stackexchange.com/users/1458/" ]
**Short Answer** Becoming rich isn't exactly subtle, and [Locard's exchange principle](https://en.wikipedia.org/wiki/Locard%27s_exchange_principle) suggests that there's always *some* way to get to the truth in matters like this. **Long answer** Let's be clear about something: This isn't Harry Potter, the state ...
In the 2003 anime, it seems impossible to transmutate something to gold (without the philosophers stone of course), because Ed coats gold on the coal instead of transmuting the coal directly. If the alchemist is good enough, it's impossible to find out whether the gold was transmuted from something else. If he tries t...
16,731
Knowing a given date (`11/28/1973`), and supposing I will die when I'm 99, what are the years when my birthday will be a thursday so that I will be able to party all week-end?
2013/12/29
[ "https://codegolf.stackexchange.com/questions/16731", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/2929/" ]
js ``` var y = 1973 + 99; while(y-- > 1973) 4!=new Date('11/23/'+y).getDay()||console.log(y); ```
Something like this: **c#** ``` var birthdate = new DateTime(1973,11,28); for (int i = 0; i <= 99; i++) { var date = birthdate.AddYears(i); if (date.DayOfWeek.Equals(DayOfWeek.Thursday)) { Console.WriteLine(date.Year); } }...
864,293
If $a<b$ what is the maximum possible value of a mod b+ b mod a. I tried several times, the answer always came out to be 2a-2. But then it is not a choice. Am I right?
2014/07/11
[ "https://math.stackexchange.com/questions/864293", "https://math.stackexchange.com", "https://math.stackexchange.com/users/132522/" ]
Since $b>a$, it follows that $a\mod b =a$. Further more $b \mod a$ can take the values $0,1,2...a-1$, and the largest of these values being $a-1$, so said maximum is $$2a-1$$
E.g. try $a = 3$, $b = 5$. $3 + 2 > 2\times 3 - 2$.
864,293
If $a<b$ what is the maximum possible value of a mod b+ b mod a. I tried several times, the answer always came out to be 2a-2. But then it is not a choice. Am I right?
2014/07/11
[ "https://math.stackexchange.com/questions/864293", "https://math.stackexchange.com", "https://math.stackexchange.com/users/132522/" ]
Since $b>a$, it follows that $a\mod b =a$. Further more $b \mod a$ can take the values $0,1,2...a-1$, and the largest of these values being $a-1$, so said maximum is $$2a-1$$
If $b\ge 3$ is fixed, then $a$ mod $b$ + $b$ mod $a=a+(b$ mod $a)$. Since $b>a$, $b$ mod $a\le b-a$. So $a$ mod $b$ + $b$ mod $a \le a+b-a = b$. This upper bound of $b$ can be achieved by taking $a=b-1$. I guess this leaves the funny case of $b=2$. Then $a$ must be 1 (I am assuming that $a$ and $b$ are restricted to po...
32,213,025
I have a `std::vector` filled before the parallel loop with `std::pair<Object, bool>`. The bools are all initialised to `true`. The loop is approximately as follows: ``` for (int x = 0; x < xMax; ++x) // can parallelising the loop in x cause a data race? for (int y = 0; y < yMax; ++y) for (auto& i : vector...
2015/08/25
[ "https://Stackoverflow.com/questions/32213025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3847013/" ]
Here's an example of a way this can fail, and real-world code has failed precisely this way. ``` for (auto& i : vector) if (i.first.ConstantFunctionDependingOnlyOnInput(x, y)) i.second = false; ``` The compiler might optimize this code as follows: ``` for (auto& i : vector); { bool j = ...
You're correct - this will behave exactly as you expect (no data race) on any real-world system. While *officially* undefined behavior according to the C++ standard, real-world systems don't work that way. [Here](https://stackoverflow.com/questions/27429310/success-of-write-with-simultaneous-read)'s an answer to a more...
18,727
I'm just starting to work with Store 2.x and wondering if it's possible for me to create an extension that updates the order status once the order is complete. I know I'm needing to use the 'store\_order\_complete\_end' hook, but not sure how I can update the status at this point. Can somebody point me in the right dir...
2014/01/24
[ "https://expressionengine.stackexchange.com/questions/18727", "https://expressionengine.stackexchange.com", "https://expressionengine.stackexchange.com/users/1634/" ]
Derek was very close. I actually wrote a [similar answer to this the other day](https://expressionengine.stackexchange.com/a/18648/150). You need to find the actual status before you update the order. Since you already have the $order object, all you need to do is this: ``` $status = Store\Model\Status::where('name',...
If you do a `print_r($order)` inside of your extension, you'll see what you have access to inside of the `$order` object/array. You can then loop through the order items it contains and check for your products, then update the `exp_store_orders` table with a new status for that order (I'm sure its `_order_id` is conta...
23,716,005
i read in a full file into a string. This is very quick. (For a example 180Mb file - 2s) Then i extract some values from the string using >> operator and create several arrays from it and insert the arrays into a struct and add each struct into a vector. I'm trying to find the bottleneck, because this is very slow (bu...
2014/05/17
[ "https://Stackoverflow.com/questions/23716005", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3613886/" ]
**Question** is the >> approach fast? **Answer** Fast is relative. What do you compare it with? **Question** Does the vector take ownership of the a or does it make a copy? **Answer** `std::vector::push_back()` makes a copy of the input object. **Question** Is a still on the stack? **Answer** Judging solely by th...
C I/O will often be faster than C++ I/O. Try parsing chunks of data with fscanf() (see: <http://www.cplusplus.com/reference/cstdio/fscanf/>) and you'll likely find the C approach runs a lot faster.
13,573,322
im have a view that need to include the count of members volunteering for an event. I'm getting an error 'not a single-group group functions'. Any idea how to resolve this? ``` CREATE VIEW atbyrd.events__view AS SELECT e.name, e."DATE", b."LIMIT",b.allocated_amount, COUNT(em.member_id), e.comments FROM events e INNER ...
2012/11/26
[ "https://Stackoverflow.com/questions/13573322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504963/" ]
Expanding on @Beau's answer, the following can be used to get any binary response content as a Buffer which you can examine further in `request.end()`: ``` function binaryParser(res, callback) { res.setEncoding('binary'); res.data = ''; res.on('data', function (chunk) { res.data += chunk; }); ...
I think you'll want to create your own parser for application/zip and use that to get at the actual response data; the JSON parser is [here](https://github.com/visionmedia/superagent/blob/master/lib/node/parsers/json.js), for example. Once you've got that you can use it by passing it to request.parse; so your test woul...
13,573,322
im have a view that need to include the count of members volunteering for an event. I'm getting an error 'not a single-group group functions'. Any idea how to resolve this? ``` CREATE VIEW atbyrd.events__view AS SELECT e.name, e."DATE", b."LIMIT",b.allocated_amount, COUNT(em.member_id), e.comments FROM events e INNER ...
2012/11/26
[ "https://Stackoverflow.com/questions/13573322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504963/" ]
I think you'll want to create your own parser for application/zip and use that to get at the actual response data; the JSON parser is [here](https://github.com/visionmedia/superagent/blob/master/lib/node/parsers/json.js), for example. Once you've got that you can use it by passing it to request.parse; so your test woul...
Existing answers didn't work for me. What I ended up doing was: ``` // parses response.body buffer into a data object const parsePDF = response => { return new Promise((resolve, reject) => { // code that parses response.body as buffer // and calls resolve(data); when done // or reject(err); on error })...
13,573,322
im have a view that need to include the count of members volunteering for an event. I'm getting an error 'not a single-group group functions'. Any idea how to resolve this? ``` CREATE VIEW atbyrd.events__view AS SELECT e.name, e."DATE", b."LIMIT",b.allocated_amount, COUNT(em.member_id), e.comments FROM events e INNER ...
2012/11/26
[ "https://Stackoverflow.com/questions/13573322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504963/" ]
I think you'll want to create your own parser for application/zip and use that to get at the actual response data; the JSON parser is [here](https://github.com/visionmedia/superagent/blob/master/lib/node/parsers/json.js), for example. Once you've got that you can use it by passing it to request.parse; so your test woul...
I just had the same case where I needed to write a test to check the contents of a zip file. This is how I did it. ```js it('test', async function () { let data = ''; const res = await request(app) .get('/api/some-zip') .parse((res, callback) => { res.setEnco...
13,573,322
im have a view that need to include the count of members volunteering for an event. I'm getting an error 'not a single-group group functions'. Any idea how to resolve this? ``` CREATE VIEW atbyrd.events__view AS SELECT e.name, e."DATE", b."LIMIT",b.allocated_amount, COUNT(em.member_id), e.comments FROM events e INNER ...
2012/11/26
[ "https://Stackoverflow.com/questions/13573322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504963/" ]
I think you'll want to create your own parser for application/zip and use that to get at the actual response data; the JSON parser is [here](https://github.com/visionmedia/superagent/blob/master/lib/node/parsers/json.js), for example. Once you've got that you can use it by passing it to request.parse; so your test woul...
As descirbed in [Testing binary response with supertest](https://stackoverflow.com/questions/59576617/testing-binary-response-with-supertest) setting `.responseType('blob')` on the request will cause `req.body` to be a Buffer. <https://visionmedia.github.io/superagent/#binary> ``` it('test', async () => { await req...
13,573,322
im have a view that need to include the count of members volunteering for an event. I'm getting an error 'not a single-group group functions'. Any idea how to resolve this? ``` CREATE VIEW atbyrd.events__view AS SELECT e.name, e."DATE", b."LIMIT",b.allocated_amount, COUNT(em.member_id), e.comments FROM events e INNER ...
2012/11/26
[ "https://Stackoverflow.com/questions/13573322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504963/" ]
Expanding on @Beau's answer, the following can be used to get any binary response content as a Buffer which you can examine further in `request.end()`: ``` function binaryParser(res, callback) { res.setEncoding('binary'); res.data = ''; res.on('data', function (chunk) { res.data += chunk; }); ...
Existing answers didn't work for me. What I ended up doing was: ``` // parses response.body buffer into a data object const parsePDF = response => { return new Promise((resolve, reject) => { // code that parses response.body as buffer // and calls resolve(data); when done // or reject(err); on error })...
13,573,322
im have a view that need to include the count of members volunteering for an event. I'm getting an error 'not a single-group group functions'. Any idea how to resolve this? ``` CREATE VIEW atbyrd.events__view AS SELECT e.name, e."DATE", b."LIMIT",b.allocated_amount, COUNT(em.member_id), e.comments FROM events e INNER ...
2012/11/26
[ "https://Stackoverflow.com/questions/13573322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504963/" ]
Expanding on @Beau's answer, the following can be used to get any binary response content as a Buffer which you can examine further in `request.end()`: ``` function binaryParser(res, callback) { res.setEncoding('binary'); res.data = ''; res.on('data', function (chunk) { res.data += chunk; }); ...
I just had the same case where I needed to write a test to check the contents of a zip file. This is how I did it. ```js it('test', async function () { let data = ''; const res = await request(app) .get('/api/some-zip') .parse((res, callback) => { res.setEnco...
13,573,322
im have a view that need to include the count of members volunteering for an event. I'm getting an error 'not a single-group group functions'. Any idea how to resolve this? ``` CREATE VIEW atbyrd.events__view AS SELECT e.name, e."DATE", b."LIMIT",b.allocated_amount, COUNT(em.member_id), e.comments FROM events e INNER ...
2012/11/26
[ "https://Stackoverflow.com/questions/13573322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504963/" ]
Expanding on @Beau's answer, the following can be used to get any binary response content as a Buffer which you can examine further in `request.end()`: ``` function binaryParser(res, callback) { res.setEncoding('binary'); res.data = ''; res.on('data', function (chunk) { res.data += chunk; }); ...
As descirbed in [Testing binary response with supertest](https://stackoverflow.com/questions/59576617/testing-binary-response-with-supertest) setting `.responseType('blob')` on the request will cause `req.body` to be a Buffer. <https://visionmedia.github.io/superagent/#binary> ``` it('test', async () => { await req...
13,573,322
im have a view that need to include the count of members volunteering for an event. I'm getting an error 'not a single-group group functions'. Any idea how to resolve this? ``` CREATE VIEW atbyrd.events__view AS SELECT e.name, e."DATE", b."LIMIT",b.allocated_amount, COUNT(em.member_id), e.comments FROM events e INNER ...
2012/11/26
[ "https://Stackoverflow.com/questions/13573322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504963/" ]
As descirbed in [Testing binary response with supertest](https://stackoverflow.com/questions/59576617/testing-binary-response-with-supertest) setting `.responseType('blob')` on the request will cause `req.body` to be a Buffer. <https://visionmedia.github.io/superagent/#binary> ``` it('test', async () => { await req...
Existing answers didn't work for me. What I ended up doing was: ``` // parses response.body buffer into a data object const parsePDF = response => { return new Promise((resolve, reject) => { // code that parses response.body as buffer // and calls resolve(data); when done // or reject(err); on error })...
13,573,322
im have a view that need to include the count of members volunteering for an event. I'm getting an error 'not a single-group group functions'. Any idea how to resolve this? ``` CREATE VIEW atbyrd.events__view AS SELECT e.name, e."DATE", b."LIMIT",b.allocated_amount, COUNT(em.member_id), e.comments FROM events e INNER ...
2012/11/26
[ "https://Stackoverflow.com/questions/13573322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/504963/" ]
As descirbed in [Testing binary response with supertest](https://stackoverflow.com/questions/59576617/testing-binary-response-with-supertest) setting `.responseType('blob')` on the request will cause `req.body` to be a Buffer. <https://visionmedia.github.io/superagent/#binary> ``` it('test', async () => { await req...
I just had the same case where I needed to write a test to check the contents of a zip file. This is how I did it. ```js it('test', async function () { let data = ''; const res = await request(app) .get('/api/some-zip') .parse((res, callback) => { res.setEnco...
39,505,306
``` $result = mysqli_query($con, "SELECT * FROM queue_stats WHERE qevent = 11 AND 'datetime' < NOW() LIMIT 20"); ``` I have a table column called 'datetime' with date format(YYYY-MM-DD H:M:S) And I want to get 20 query results with dates before now, i.e. the time the query was made. How can I make the **'datetime' < ...
2016/09/15
[ "https://Stackoverflow.com/questions/39505306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6797009/" ]
Single quotes (`'`) denote string literals. Thus you're comparing **the string** `'datetime'` to the result of `now()` implicitly converted to a string. You probably meant to use backticks to escape the column name: ``` SELECT * FROM queue_stats WHERE qevent = 11 AND `datetime` < NOW() -- Here --------^---...
change single quote to apostrophe ``` $result = mysqli_query($con, "SELECT * FROM queue_stats WHERE qevent = 11 AND `datetime` < NOW() LIMIT 20"); ```
58,081,880
I am able to append data to a file like this row (this I will get ) ``` fs.appendFile('./file.txt', JSON.stringify(row) + '\n', (err) => { if (err) throw err; }); ``` But how can I "append" the data while zipping it at the same time ? I am unsure if this is possible, If yes any pointers will be extremely...
2019/09/24
[ "https://Stackoverflow.com/questions/58081880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10838842/" ]
I don't know if it's possible to append to a `.zip` archive without rewriting it. If a `.gz` file is considered, you can use the built-in [`zlib`](https://nodejs.org/dist/latest-v10.x/docs/api/zlib.html#zlib_zlib_gzip_buffer_options_callback) module to append directly to the `.gz` file. ```js const zlib = require('zl...
I'm not sure this gonna work, but maybe helps you. You need `zlib` package on your project ``` npm install zlib ``` Code: ``` const fs = require('fs'); const zlib = require('zlib'); function WriteAndZip(filename) { return new Promise(async function (resolve, reject) { fs.appendFile(`./your_path/${fil...
447,429
[![Teac A-R630 Preamp pcb](https://i.stack.imgur.com/5U2uE.jpg)](https://i.stack.imgur.com/5U2uE.jpg) The amp exhibits intermittent crackling noise, which I think is parasitic oscillation as it stops immediately I touch the base of Q409 with a scope probe or an insulated screwdriver. The amp will function perfectly fo...
2019/07/09
[ "https://electronics.stackexchange.com/questions/447429", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/226121/" ]
First, your filter is loaded by both R3, which you appear to have taken into account, and by R1, which you appear to have neglected. R1 matters because the inverting node of the op-amp should be around 0V, at least if you're running at 10kHz or less for the 741. This means that R1 appears to the filter as if it were ...
The simulation is probably failing on finding the DC operating point, because *there is no DC operating point*. Either specify the initial conditions or turn off the DC operating point. I don't know if this is possible in falstad.
447,429
[![Teac A-R630 Preamp pcb](https://i.stack.imgur.com/5U2uE.jpg)](https://i.stack.imgur.com/5U2uE.jpg) The amp exhibits intermittent crackling noise, which I think is parasitic oscillation as it stops immediately I touch the base of Q409 with a scope probe or an insulated screwdriver. The amp will function perfectly fo...
2019/07/09
[ "https://electronics.stackexchange.com/questions/447429", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/226121/" ]
First, your filter is loaded by both R3, which you appear to have taken into account, and by R1, which you appear to have neglected. R1 matters because the inverting node of the op-amp should be around 0V, at least if you're running at 10kHz or less for the 741. This means that R1 appears to the filter as if it were ...
You can alter the ratio of C1/C2 to achieve moderate gain thru the PI resonator. The Q will be degraded by R1, because the opamp Vin(-) produces a Virtual Ground, which for low frequencies means the right side of R1 is "grounded".
48,758,830
We need to create multiple clips from video, to do so we are using ProcessBuilder to create a new processes, Please fine code below ``` Process clipProcess = new ProcessBuilder("bash","-c", "ffmpeg -i input.mp4 -ss 0:36:00.000 -codec copy -t 0:03:00.200 -threads 0 -y output.mp4").start(); clipProcess.waitF...
2018/02/13
[ "https://Stackoverflow.com/questions/48758830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1825578/" ]
I suggest you do something like the following - the same for pr.getErrorStream(). waitFor() is a nice feature but doesnt work - they admit so in the doc. Just read the streams to see when the process ends. ``` try { Runtime rt=Runtime.getRuntime(); Process pr=rt.exec(" ...... ""); final InputSt...
ffmpeg is buffering it's disk writes. When the process exits, it's output may not actually be on disk at that point. Adding `-flush_packets 1` to your command line should tell ffmpeg to flush after each packet ([source](https://video.stackexchange.com/a/22988)). Something like: ``` Process clipProcess = new ProcessBui...
3,279,721
When you're given a degree sequence, what is the method to draw a graph which has that degree sequence? Consider the degree sequence $(1, 2, 2, 3, 5, 5)$. Either draw a graph with this degree sequence of prove that no such graph exists. NB: I'm aware that no degree sequence can contain an odd number of odd numbers. ...
2019/07/01
[ "https://math.stackexchange.com/questions/3279721", "https://math.stackexchange.com", "https://math.stackexchange.com/users/580002/" ]
For the given sequence, if we are talking about simple graphs, no such graph exists. You can conclude that by pure logical arguments: * We have $6$ vertices. * Two of them have degree $5$. * Then each of them are adjacent to every other vertices. * Then we cannot have a vertex with degree $1$ since we already know th...
This is a well researched math problem (with answers!). The [Erdos-Gallai theorem](https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Gallai_theorem) gives and if and and only if condition on whether a degree sequence can be realized and the [Havel-Hakimi algorithm](https://en.wikipedia.org/wiki/Havel%E2%80%93Hakimi_algo...
3,279,721
When you're given a degree sequence, what is the method to draw a graph which has that degree sequence? Consider the degree sequence $(1, 2, 2, 3, 5, 5)$. Either draw a graph with this degree sequence of prove that no such graph exists. NB: I'm aware that no degree sequence can contain an odd number of odd numbers. ...
2019/07/01
[ "https://math.stackexchange.com/questions/3279721", "https://math.stackexchange.com", "https://math.stackexchange.com/users/580002/" ]
For the given sequence, if we are talking about simple graphs, no such graph exists. You can conclude that by pure logical arguments: * We have $6$ vertices. * Two of them have degree $5$. * Then each of them are adjacent to every other vertices. * Then we cannot have a vertex with degree $1$ since we already know th...
The answer by ArsenBerk is correct (assuming simple graphs), but since you are also asking how to *get* to that answer, here is how I found it: It's never a bad idea to just *try* things if you're stuck. So we try to draw the graph. Well, there are six vertices, so we start by drawing them. Cool. Next, two of them hav...
16,359,577
I have some html like this ``` <div class="gRow"> <div class="cell c9 right last">Text</div> <div class="cell c8 right gCol8">Long text wrapped over multiple lines</div> <div class="cell c7 right gCol7">Text</div> </div> ``` See this fiddle: <http://jsfiddle.net/LmZYE/> What I would like is to have the ...
2013/05/03
[ "https://Stackoverflow.com/questions/16359577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1480182/" ]
If you need to do this using divs rather than a table you can use the css for `display:table` to make your divs respond like a table would: **html** ``` <div class="table"> <div class="row"> <div class="cell c9 right last">Text</div> <div class="cell c8 right gCol8">Long text wrapped over multiple...
If I've understood the question right, [this](http://jsfiddle.net/LmZYE/3/) is what you're looking for. HTML ``` <div class="gRow"> <div class="cell c8 right gCol8">Long text wrapped over multiple lines</div> <div class="bottomRow"> <div class="cell c9 right last">Text</div> <div class="cell c...
4,005,149
I have a peculiar situation. I have tables that are constantly accessed by different parts of our code and thousands of clients and so we employed the use of transactions when doing simple updates and inserts on our tables. Problem is we keep getting deadlock errors. Anyone have any idea how I can alleviate this proble...
2010/10/23
[ "https://Stackoverflow.com/questions/4005149", "https://Stackoverflow.com", "https://Stackoverflow.com/users/123367/" ]
Deadlocks can arise for many reasons and combinations thereof: * Poor schema design * Incorrect indexes for your query workload * Poorly written TSQL * Aggressive transaction isolation levels and/or long running open transactions * Poor application access patterns * Low spec or incorrectly configured hardware All of ...
This problem isn't too peculiar -- it's typical when developers don't know much about how locking works, and just think of transactions as 'black boxes' and expect their solutions to scale. Mitch is right in the comments about paying someone who is an expert -- this is a problem that's too big for any solution on SO. ...
72,864,309
I want to store each of the fields in "text" as its own variable (for example, I want name = Biggie Wiggles, age = 49, etc) and also delete the hobbies section. In the actual data I am using, the "hobbies" field does not always occur, depending on whether it is filled out or not. What is the best way to accomplish this...
2022/07/05
[ "https://Stackoverflow.com/questions/72864309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15320269/" ]
The problem is that the server isn't giving you great data to work with. You'll have to parse the values from the "text" property into fields you create yourself on the object. Here's a super simple example of an implementation you can try. It iterates over your array with the `.map` method, parsing the values of the ...
``` let obj ={id: "123", text: "Field 1: xyz Field 2: abc Field 3: lol"}; let newObj = obj.text.replace("Field 2: abc", ''); obj[ 'text'] = newObj console.log(obj); ```
72,864,309
I want to store each of the fields in "text" as its own variable (for example, I want name = Biggie Wiggles, age = 49, etc) and also delete the hobbies section. In the actual data I am using, the "hobbies" field does not always occur, depending on whether it is filled out or not. What is the best way to accomplish this...
2022/07/05
[ "https://Stackoverflow.com/questions/72864309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15320269/" ]
Here is a dynamic way to do that. Whatever word is given with ":" key will be stored as a key of the object. ```js const str = "Name: Biggie Wiggles Age: 49 Hobbies: Playing golf, catching flies Birthday: 1/1/01" let myObj = {} let lastWord = "" str.split(" ").forEach(word => { if (word.includes(":")) { const fo...
``` let obj ={id: "123", text: "Field 1: xyz Field 2: abc Field 3: lol"}; let newObj = obj.text.replace("Field 2: abc", ''); obj[ 'text'] = newObj console.log(obj); ```
7,651,777
``` class Model_Category extends ORM { protected $_has_many = array( 'film' => array('through' => 'films_categories') ); } class Model_Film extends ORM { protected $_has_many = array( 'categories' => array( 'through' => 'films_categories' ), } films -id (pk...
2011/10/04
[ "https://Stackoverflow.com/questions/7651777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955399/" ]
i am a beginner. i am using Eclipse and got stuck at the Hello World code. Got same error description and also error stating **can't resolve 'system'**. After staying frustrated for few hours, as I checked JRE library path and stuff, I just Capitalized 'S' of '**string**' and '**system**'.. and bang.. problem solved. ...
Another way to solve this problem is in the following way. > > Right click on the project-->properties-->Java build path-->go to the > library option > > > and delete or remove the library that is in error, after this you select add library and download the library that you deleted and ready.
7,651,777
``` class Model_Category extends ORM { protected $_has_many = array( 'film' => array('through' => 'films_categories') ); } class Model_Film extends ORM { protected $_has_many = array( 'categories' => array( 'through' => 'films_categories' ), } films -id (pk...
2011/10/04
[ "https://Stackoverflow.com/questions/7651777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955399/" ]
My guess is you miss the JRE Runtime Library in your project. But this would cause all the java.\* classes to generate this message! Can you post your code so we can see what might be the problem? try doing : right-click on your project. ->properites ->java Build Path ->tab Librairies check if the JRE System Librar...
i am a beginner. i am using Eclipse and got stuck at the Hello World code. Got same error description and also error stating **can't resolve 'system'**. After staying frustrated for few hours, as I checked JRE library path and stuff, I just Capitalized 'S' of '**string**' and '**system**'.. and bang.. problem solved. ...
7,651,777
``` class Model_Category extends ORM { protected $_has_many = array( 'film' => array('through' => 'films_categories') ); } class Model_Film extends ORM { protected $_has_many = array( 'categories' => array( 'through' => 'films_categories' ), } films -id (pk...
2011/10/04
[ "https://Stackoverflow.com/questions/7651777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955399/" ]
I don't know if this helps anyone, but here I go. I had the same problem just now in Visual Studio Code (I am on Linux). On my **java.home**, I had the options in my directory of: * /usr/lib/jvm/*java-**8**-openjdk-amd64* * /usr/lib/jvm/*java-**1.8.0**-openjkd-amd64* I had the first one as default, but when I switche...
Another way to solve this problem is in the following way. > > Right click on the project-->properties-->Java build path-->go to the > library option > > > and delete or remove the library that is in error, after this you select add library and download the library that you deleted and ready.
7,651,777
``` class Model_Category extends ORM { protected $_has_many = array( 'film' => array('through' => 'films_categories') ); } class Model_Film extends ORM { protected $_has_many = array( 'categories' => array( 'through' => 'films_categories' ), } films -id (pk...
2011/10/04
[ "https://Stackoverflow.com/questions/7651777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955399/" ]
I don't know if this helps anyone, but here I go. I had the same problem just now in Visual Studio Code (I am on Linux). On my **java.home**, I had the options in my directory of: * /usr/lib/jvm/*java-**8**-openjdk-amd64* * /usr/lib/jvm/*java-**1.8.0**-openjkd-amd64* I had the first one as default, but when I switche...
``` error- string cannot be resolved to a type ``` Here in the declaring the method "string" in bold is lower case. Change string to upper case. Example: public static **string** howManyPass(double grd1, double grd2) { }
7,651,777
``` class Model_Category extends ORM { protected $_has_many = array( 'film' => array('through' => 'films_categories') ); } class Model_Film extends ORM { protected $_has_many = array( 'categories' => array( 'through' => 'films_categories' ), } films -id (pk...
2011/10/04
[ "https://Stackoverflow.com/questions/7651777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955399/" ]
You need to capitalize the "s" in the string.
``` error- string cannot be resolved to a type ``` Here in the declaring the method "string" in bold is lower case. Change string to upper case. Example: public static **string** howManyPass(double grd1, double grd2) { }
7,651,777
``` class Model_Category extends ORM { protected $_has_many = array( 'film' => array('through' => 'films_categories') ); } class Model_Film extends ORM { protected $_has_many = array( 'categories' => array( 'through' => 'films_categories' ), } films -id (pk...
2011/10/04
[ "https://Stackoverflow.com/questions/7651777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955399/" ]
My guess is you miss the JRE Runtime Library in your project. But this would cause all the java.\* classes to generate this message! Can you post your code so we can see what might be the problem? try doing : right-click on your project. ->properites ->java Build Path ->tab Librairies check if the JRE System Librar...
I don't know if this helps anyone, but here I go. I had the same problem just now in Visual Studio Code (I am on Linux). On my **java.home**, I had the options in my directory of: * /usr/lib/jvm/*java-**8**-openjdk-amd64* * /usr/lib/jvm/*java-**1.8.0**-openjkd-amd64* I had the first one as default, but when I switche...
7,651,777
``` class Model_Category extends ORM { protected $_has_many = array( 'film' => array('through' => 'films_categories') ); } class Model_Film extends ORM { protected $_has_many = array( 'categories' => array( 'through' => 'films_categories' ), } films -id (pk...
2011/10/04
[ "https://Stackoverflow.com/questions/7651777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955399/" ]
I don't know if this helps anyone, but here I go. I had the same problem just now in Visual Studio Code (I am on Linux). On my **java.home**, I had the options in my directory of: * /usr/lib/jvm/*java-**8**-openjdk-amd64* * /usr/lib/jvm/*java-**1.8.0**-openjkd-amd64* I had the first one as default, but when I switche...
You need to capitalize the "s" in the string.
7,651,777
``` class Model_Category extends ORM { protected $_has_many = array( 'film' => array('through' => 'films_categories') ); } class Model_Film extends ORM { protected $_has_many = array( 'categories' => array( 'through' => 'films_categories' ), } films -id (pk...
2011/10/04
[ "https://Stackoverflow.com/questions/7651777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955399/" ]
My guess is you miss the JRE Runtime Library in your project. But this would cause all the java.\* classes to generate this message! Can you post your code so we can see what might be the problem? try doing : right-click on your project. ->properites ->java Build Path ->tab Librairies check if the JRE System Librar...
``` error- string cannot be resolved to a type ``` Here in the declaring the method "string" in bold is lower case. Change string to upper case. Example: public static **string** howManyPass(double grd1, double grd2) { }
7,651,777
``` class Model_Category extends ORM { protected $_has_many = array( 'film' => array('through' => 'films_categories') ); } class Model_Film extends ORM { protected $_has_many = array( 'categories' => array( 'through' => 'films_categories' ), } films -id (pk...
2011/10/04
[ "https://Stackoverflow.com/questions/7651777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955399/" ]
My guess is you miss the JRE Runtime Library in your project. But this would cause all the java.\* classes to generate this message! Can you post your code so we can see what might be the problem? try doing : right-click on your project. ->properites ->java Build Path ->tab Librairies check if the JRE System Librar...
Another way to solve this problem is in the following way. > > Right click on the project-->properties-->Java build path-->go to the > library option > > > and delete or remove the library that is in error, after this you select add library and download the library that you deleted and ready.
7,651,777
``` class Model_Category extends ORM { protected $_has_many = array( 'film' => array('through' => 'films_categories') ); } class Model_Film extends ORM { protected $_has_many = array( 'categories' => array( 'through' => 'films_categories' ), } films -id (pk...
2011/10/04
[ "https://Stackoverflow.com/questions/7651777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/955399/" ]
i am a beginner. i am using Eclipse and got stuck at the Hello World code. Got same error description and also error stating **can't resolve 'system'**. After staying frustrated for few hours, as I checked JRE library path and stuff, I just Capitalized 'S' of '**string**' and '**system**'.. and bang.. problem solved. ...
You need to capitalize the "s" in the string.
11,305,394
I want to pass an array from command line to php as: ``` c:\<path>\php.exe somefile.php --filter array{['name']=>"lion",['category']=>array{['teeth']=>'long_teeth',['height']=>'short'}} ``` and now in code I want variable filter as an array as I passed through command line like: ``` $opt['filter'] = array { ...
2012/07/03
[ "https://Stackoverflow.com/questions/11305394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1497826/" ]
Command line arguments are strings and only strings. As you want to pass in a hierarchical element the only option is to parse the string. However JSON encoding is nice, easy and compact. Passing the following on the command line and then parsing with [json\_decode](http://php.net/json_decode) will give you the requi...
Command line arguments can only be strings, there's no way to pass any complex data structures like arrays directly on the command line. You can *serialize* an array into a string though and *unserialize* that argument in your program. So you can pass an array around as a string. The most obvious candidate is the JSON ...
24,296
I'm using the latest Truffle. Very nice, after having to roll my own dev environment in early 2016! But there is no obvious documentation as to what parts of the project need to be checked into Github. For example, I'm unsure if the `build` directory needs to be checked in. I think the answer is 'yes' because one woul...
2017/08/13
[ "https://ethereum.stackexchange.com/questions/24296", "https://ethereum.stackexchange.com", "https://ethereum.stackexchange.com/users/376/" ]
This is the one I'm using rite now. I believe it may be helpful. ``` >$ cat .gitignore contracts/.placeholder test/.placeholder build node_modules ```
I have never used truffle, but my view (and the general rule as I understand) when it comes to source control is that you commit any files and folders that you want to track that can not be recreated. You should **not** commit the build directory because the built files can be.. rebuilt. Storing that data would be an ...
24,296
I'm using the latest Truffle. Very nice, after having to roll my own dev environment in early 2016! But there is no obvious documentation as to what parts of the project need to be checked into Github. For example, I'm unsure if the `build` directory needs to be checked in. I think the answer is 'yes' because one woul...
2017/08/13
[ "https://ethereum.stackexchange.com/questions/24296", "https://ethereum.stackexchange.com", "https://ethereum.stackexchange.com/users/376/" ]
This is the one I'm using rite now. I believe it may be helpful. ``` >$ cat .gitignore contracts/.placeholder test/.placeholder build node_modules ```
The answer probably should be - you MUST check in your build directory once you've deployed, because it caches the addresses of your contracts, which is absolutely critical to the truffle deployment system! so: ``` >$ cat .gitignore contracts/.placeholder test/.placeholder node_modules ```