qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
8,327,054
In my application,I use many setTimeout function,so I am afraid if it will cause peformance problem: ``` setTimeout(function(){ // do something },0); ``` And I found people use this manner: ``` var t=setTimeout(function(){ // do something clearTimeout(t); }); ``` I wonder if it is necessary?
2011/11/30
[ "https://Stackoverflow.com/questions/8327054", "https://Stackoverflow.com", "https://Stackoverflow.com/users/306719/" ]
It'll be perfectly safe with a smart constructor and stored dimensions. Of course there are no natural implementations for the operations `signum` and `fromIntegral` (or maybe a diagonal matrix would be fine for the latter). ```hs module Matrix (Matrix(),matrix,matrixTranspose) where import Data.List (transpose) dat...
Alright, there's a lot of confusion about what's happening here floating around, and it's not being helped by the fact that the Haskell term "class" does *not* line up with the OO term "class" in any meaningful way. So let's try to make a careful answer. This answer starts with Haskell's module system. In Haskell, whe...
35,673,543
I am working on selenium project with jenkins + Maven + selenium + TestNG I am following few questions. 1. Can I execute selenium testcases in Jenkins by launch browsers (Currently it gets executed without browser :( . ), If yes then how can I achive this. 2. Ideally what maven goal is set for build execution. 3. By ...
2016/02/27
[ "https://Stackoverflow.com/questions/35673543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5193953/" ]
1. Yes. On linux you need to [setup headless selenium with xvfb](https://gist.github.com/alonisser/11192482) or use [Jenkins xvfb plug-in](https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin). On Windows it can be left "interactive". 2. This is a matter of personal preference, there's no right or wrong way as long ...
Regarding your first question: two other options could be to use [PhantomJS](http://phantomjs.org/), a headless browser, or to use a cloud service that provides browsers through a remote webdriver interface such at [BrowserStack](https://www.browserstack.com) or [SauceLabs](https://saucelabs.com). The advantage of usin...
44,765,889
I'm practicing a little with Ruby and I want to handle the age's input, for example if someone types "eleven" instead of 11, I want to show a message that, the person know he/she can't use a String. Here's my code ``` saludo = "Hola ¿Como te llamas?" puts saludo STDOUT.flush #STDOUT es una constante global que alma...
2017/06/26
[ "https://Stackoverflow.com/questions/44765889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7093453/" ]
If you want to check the datatype of the input, you can use something like this: ``` input = gets.chomp input.class == Fixnum ``` Since, every input in ruby is taken as a string, you can convert the input to integer using `to_i` like: ``` input = gets.to_i ``` Check if the input value is 0 which is the default va...
### A more Ruby way Use a [**case-expression**](http://ruby-doc.org/core-2.4.1/doc/syntax/control_expressions_rdoc.html#label-case+Expression) which allows you to compare your input with string-ranges thus negating the need to use `String#to_i`: ``` #age.rb loop do puts 'Enter age' case gets.chomp when /\D/ ...
44,765,889
I'm practicing a little with Ruby and I want to handle the age's input, for example if someone types "eleven" instead of 11, I want to show a message that, the person know he/she can't use a String. Here's my code ``` saludo = "Hola ¿Como te llamas?" puts saludo STDOUT.flush #STDOUT es una constante global que alma...
2017/06/26
[ "https://Stackoverflow.com/questions/44765889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7093453/" ]
If you're using `gets` and you expect to receive a number, parsing this to integer, then you can "skip" the `chomp`, this way using `gets.to_i`, you can convert the input from the user in an integer, and you can see that everything that's not a number is converted to `0`, so you can check if `edad` after the operation ...
When you do `Integer(gets.chomp)` if `gets.chomp` is not an strictly integer string (i.e. 1, 2, -12, etc), it will raise an error So you can do this: ``` input_string = gets.chomp edad = nil begin edad = Integer(input_string) rescue puts "#{input_string} is not an integer" end # edad will still be nil if there w...
44,765,889
I'm practicing a little with Ruby and I want to handle the age's input, for example if someone types "eleven" instead of 11, I want to show a message that, the person know he/she can't use a String. Here's my code ``` saludo = "Hola ¿Como te llamas?" puts saludo STDOUT.flush #STDOUT es una constante global que alma...
2017/06/26
[ "https://Stackoverflow.com/questions/44765889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7093453/" ]
If you're using `gets` and you expect to receive a number, parsing this to integer, then you can "skip" the `chomp`, this way using `gets.to_i`, you can convert the input from the user in an integer, and you can see that everything that's not a number is converted to `0`, so you can check if `edad` after the operation ...
input = gets.chomp ``` if input != "0" && input.to_i == 0 puts "Invalid age format. Integer expected" else age = input.to_i end ```
44,765,889
I'm practicing a little with Ruby and I want to handle the age's input, for example if someone types "eleven" instead of 11, I want to show a message that, the person know he/she can't use a String. Here's my code ``` saludo = "Hola ¿Como te llamas?" puts saludo STDOUT.flush #STDOUT es una constante global que alma...
2017/06/26
[ "https://Stackoverflow.com/questions/44765889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7093453/" ]
If you want to check the datatype of the input, you can use something like this: ``` input = gets.chomp input.class == Fixnum ``` Since, every input in ruby is taken as a string, you can convert the input to integer using `to_i` like: ``` input = gets.to_i ``` Check if the input value is 0 which is the default va...
When you do `Integer(gets.chomp)` if `gets.chomp` is not an strictly integer string (i.e. 1, 2, -12, etc), it will raise an error So you can do this: ``` input_string = gets.chomp edad = nil begin edad = Integer(input_string) rescue puts "#{input_string} is not an integer" end # edad will still be nil if there w...
44,765,889
I'm practicing a little with Ruby and I want to handle the age's input, for example if someone types "eleven" instead of 11, I want to show a message that, the person know he/she can't use a String. Here's my code ``` saludo = "Hola ¿Como te llamas?" puts saludo STDOUT.flush #STDOUT es una constante global que alma...
2017/06/26
[ "https://Stackoverflow.com/questions/44765889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7093453/" ]
I've always just done it this way. Adding a method to the `String` class to do the check with makes things a lot easier. ``` class String def is_i? !!Integer(self) rescue ArgumentError, TypeError false end end puts "1".is_i? puts "asda".is_i? ``` Some people may not like it, because it uses except...
When you do `Integer(gets.chomp)` if `gets.chomp` is not an strictly integer string (i.e. 1, 2, -12, etc), it will raise an error So you can do this: ``` input_string = gets.chomp edad = nil begin edad = Integer(input_string) rescue puts "#{input_string} is not an integer" end # edad will still be nil if there w...
44,765,889
I'm practicing a little with Ruby and I want to handle the age's input, for example if someone types "eleven" instead of 11, I want to show a message that, the person know he/she can't use a String. Here's my code ``` saludo = "Hola ¿Como te llamas?" puts saludo STDOUT.flush #STDOUT es una constante global que alma...
2017/06/26
[ "https://Stackoverflow.com/questions/44765889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7093453/" ]
If you want to check the datatype of the input, you can use something like this: ``` input = gets.chomp input.class == Fixnum ``` Since, every input in ruby is taken as a string, you can convert the input to integer using `to_i` like: ``` input = gets.to_i ``` Check if the input value is 0 which is the default va...
input = gets.chomp ``` if input != "0" && input.to_i == 0 puts "Invalid age format. Integer expected" else age = input.to_i end ```
44,765,889
I'm practicing a little with Ruby and I want to handle the age's input, for example if someone types "eleven" instead of 11, I want to show a message that, the person know he/she can't use a String. Here's my code ``` saludo = "Hola ¿Como te llamas?" puts saludo STDOUT.flush #STDOUT es una constante global que alma...
2017/06/26
[ "https://Stackoverflow.com/questions/44765889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7093453/" ]
I've always just done it this way. Adding a method to the `String` class to do the check with makes things a lot easier. ``` class String def is_i? !!Integer(self) rescue ArgumentError, TypeError false end end puts "1".is_i? puts "asda".is_i? ``` Some people may not like it, because it uses except...
If you want to check the datatype of the input, you can use something like this: ``` input = gets.chomp input.class == Fixnum ``` Since, every input in ruby is taken as a string, you can convert the input to integer using `to_i` like: ``` input = gets.to_i ``` Check if the input value is 0 which is the default va...
44,765,889
I'm practicing a little with Ruby and I want to handle the age's input, for example if someone types "eleven" instead of 11, I want to show a message that, the person know he/she can't use a String. Here's my code ``` saludo = "Hola ¿Como te llamas?" puts saludo STDOUT.flush #STDOUT es una constante global que alma...
2017/06/26
[ "https://Stackoverflow.com/questions/44765889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7093453/" ]
If you're using `gets` and you expect to receive a number, parsing this to integer, then you can "skip" the `chomp`, this way using `gets.to_i`, you can convert the input from the user in an integer, and you can see that everything that's not a number is converted to `0`, so you can check if `edad` after the operation ...
### A more Ruby way Use a [**case-expression**](http://ruby-doc.org/core-2.4.1/doc/syntax/control_expressions_rdoc.html#label-case+Expression) which allows you to compare your input with string-ranges thus negating the need to use `String#to_i`: ``` #age.rb loop do puts 'Enter age' case gets.chomp when /\D/ ...
44,765,889
I'm practicing a little with Ruby and I want to handle the age's input, for example if someone types "eleven" instead of 11, I want to show a message that, the person know he/she can't use a String. Here's my code ``` saludo = "Hola ¿Como te llamas?" puts saludo STDOUT.flush #STDOUT es una constante global que alma...
2017/06/26
[ "https://Stackoverflow.com/questions/44765889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7093453/" ]
I've always just done it this way. Adding a method to the `String` class to do the check with makes things a lot easier. ``` class String def is_i? !!Integer(self) rescue ArgumentError, TypeError false end end puts "1".is_i? puts "asda".is_i? ``` Some people may not like it, because it uses except...
If you're using `gets` and you expect to receive a number, parsing this to integer, then you can "skip" the `chomp`, this way using `gets.to_i`, you can convert the input from the user in an integer, and you can see that everything that's not a number is converted to `0`, so you can check if `edad` after the operation ...
44,765,889
I'm practicing a little with Ruby and I want to handle the age's input, for example if someone types "eleven" instead of 11, I want to show a message that, the person know he/she can't use a String. Here's my code ``` saludo = "Hola ¿Como te llamas?" puts saludo STDOUT.flush #STDOUT es una constante global que alma...
2017/06/26
[ "https://Stackoverflow.com/questions/44765889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7093453/" ]
I've always just done it this way. Adding a method to the `String` class to do the check with makes things a lot easier. ``` class String def is_i? !!Integer(self) rescue ArgumentError, TypeError false end end puts "1".is_i? puts "asda".is_i? ``` Some people may not like it, because it uses except...
input = gets.chomp ``` if input != "0" && input.to_i == 0 puts "Invalid age format. Integer expected" else age = input.to_i end ```
19,310,154
Note: I'm using mojarra 2.1.20 and rich faces 4.2.2. I've analyzed a heapdump and I've noticed that EL expressions reside in LRUMap in the session. Does anyone know why and what to do to avoid it? The problem I have is related to a composite component containing following line: ``` <rich:select ... valueChangeList...
2013/10/11
[ "https://Stackoverflow.com/questions/19310154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/706650/" ]
The `ContextualCompositeMethodExpression` is referencing the whole composite component as instance variable as consequence of a fix to [issue 1462](https://java.net/jira/browse/JAVASERVERFACES-1462). An user has reported about exactly this memory leak problem as [issue 1940](https://java.net/jira/browse/JAVASERVERFACES...
We had a similar Issue with an Composite-Element with an `actionListener`. The Composite-Element collected a `List` of `DataObjects`, although they should be garbageCollected. We found out, `list.clear()` before reloading the List helps to prevent from this memory leak.
19,310,154
Note: I'm using mojarra 2.1.20 and rich faces 4.2.2. I've analyzed a heapdump and I've noticed that EL expressions reside in LRUMap in the session. Does anyone know why and what to do to avoid it? The problem I have is related to a composite component containing following line: ``` <rich:select ... valueChangeList...
2013/10/11
[ "https://Stackoverflow.com/questions/19310154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/706650/" ]
The `ContextualCompositeMethodExpression` is referencing the whole composite component as instance variable as consequence of a fix to [issue 1462](https://java.net/jira/browse/JAVASERVERFACES-1462). An user has reported about exactly this memory leak problem as [issue 1940](https://java.net/jira/browse/JAVASERVERFACES...
This is probably fixed by <https://java.net/jira/browse/JAVASERVERFACES-3544> on Mojarra.
19,310,154
Note: I'm using mojarra 2.1.20 and rich faces 4.2.2. I've analyzed a heapdump and I've noticed that EL expressions reside in LRUMap in the session. Does anyone know why and what to do to avoid it? The problem I have is related to a composite component containing following line: ``` <rich:select ... valueChangeList...
2013/10/11
[ "https://Stackoverflow.com/questions/19310154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/706650/" ]
We had a similar Issue with an Composite-Element with an `actionListener`. The Composite-Element collected a `List` of `DataObjects`, although they should be garbageCollected. We found out, `list.clear()` before reloading the List helps to prevent from this memory leak.
This is probably fixed by <https://java.net/jira/browse/JAVASERVERFACES-3544> on Mojarra.
13,848,361
I'm following through an example which deals with the following json object passed from a php page:- ``` {"book":[{"title":"Harry Potter","author":"J K. Rowling","year":"2005","price":"29.99"},{"title":"Learning XML","author":"Erik T. Ray","year":"2003","price":"39.95"}]} ``` I know that you can iterate through and...
2012/12/12
[ "https://Stackoverflow.com/questions/13848361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1197319/" ]
Yes you can do it in a nested loop like this ``` var content = ''; $.each(data.book, function(index, book) { content += '<tr>'; $.each(book,function(k,v){ content += '<td>' + v + '</td>'; }); content += '</tr>'; }); $(content).appendTo("#content2"); ``` <http://jsfiddle.net/tjjQh/> Oh.. t...
You may want to check out [jQuery Templating](http://net.tutsplus.com/tutorials/javascript-ajax/quick-tip-an-introduction-to-jquery-templating/). ``` var data = [ { name : "John", age : 25 }, { name : "Jane", age : 49 }, { name : "Jim", age : 31 }, { name : "Julie", age : 39...
611,472
*Edit as of 1/24/2015*: It is not possible to use other trusted certificate authorities now. Question and answer is not obsolete: WinQual still rejects the signature: ![enter image description here](https://i.stack.imgur.com/vkivZ.png) when we've already established that it is a valid digital signature: ![enter ima...
2009/03/04
[ "https://Stackoverflow.com/questions/611472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
I just signed up to WinQual, and I've been contemplating this question; I think I now have the answer. In short: **They aren't using VeriSign as a certificate at all: They are just outsourcing the task of verifying your identity.** Microsoft doesn't want you to have access to the WinQual site without first verifying ...
We had this same problem. They would not accept a Comodo code signing cert. In all likelihood it's to increase their group revenue (VeriSign/VeriTest which are owned by MS). I don't believe that they haven't had *tons* of requests to use non-VeriSign certs. However what choice do you have....?
611,472
*Edit as of 1/24/2015*: It is not possible to use other trusted certificate authorities now. Question and answer is not obsolete: WinQual still rejects the signature: ![enter image description here](https://i.stack.imgur.com/vkivZ.png) when we've already established that it is a valid digital signature: ![enter ima...
2009/03/04
[ "https://Stackoverflow.com/questions/611472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
Having done Code Signing and recently Winqual sign-up, here are some clarifications: 1. For Winqual sign-up (registration), your signature itself is not checked against the Winqual database. Winqual only checks the certificate from VeriSign that proves that VeriSign checked your identity. Then they get your company na...
We had this same problem. They would not accept a Comodo code signing cert. In all likelihood it's to increase their group revenue (VeriSign/VeriTest which are owned by MS). I don't believe that they haven't had *tons* of requests to use non-VeriSign certs. However what choice do you have....?
611,472
*Edit as of 1/24/2015*: It is not possible to use other trusted certificate authorities now. Question and answer is not obsolete: WinQual still rejects the signature: ![enter image description here](https://i.stack.imgur.com/vkivZ.png) when we've already established that it is a valid digital signature: ![enter ima...
2009/03/04
[ "https://Stackoverflow.com/questions/611472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
Having done Code Signing and recently Winqual sign-up, here are some clarifications: 1. For Winqual sign-up (registration), your signature itself is not checked against the Winqual database. Winqual only checks the certificate from VeriSign that proves that VeriSign checked your identity. Then they get your company na...
The problem actually goes deeper. For preserving a special status a recertification of one of our products had to happen. Of course that can only be done through VeriTest. To save money and be able to respond to problems before they notice them, we decided to choose the self-test option that allows us to test our soft...
611,472
*Edit as of 1/24/2015*: It is not possible to use other trusted certificate authorities now. Question and answer is not obsolete: WinQual still rejects the signature: ![enter image description here](https://i.stack.imgur.com/vkivZ.png) when we've already established that it is a valid digital signature: ![enter ima...
2009/03/04
[ "https://Stackoverflow.com/questions/611472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
Same story here, I'm certifying application for Win7 Logo in order to get the points for MS Partnership program. I bought the Comodo code signing certificate. The application passed the test and now I'm trying to setup a Winqual account and after initially getting pissed off about having to buy another signing certific...
Ha! I have run into exactly the same scheme with our Comodo certificate. This is typical bully behaviour, their answers are complete nonsense. If anything, I distrust Verisign more than Comodo and Thawte etc. Let's not forget what they [tried a while ago](http://jeremy.zawodny.com/blog/archives/000970.html).
611,472
*Edit as of 1/24/2015*: It is not possible to use other trusted certificate authorities now. Question and answer is not obsolete: WinQual still rejects the signature: ![enter image description here](https://i.stack.imgur.com/vkivZ.png) when we've already established that it is a valid digital signature: ![enter ima...
2009/03/04
[ "https://Stackoverflow.com/questions/611472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
Same story here, I'm certifying application for Win7 Logo in order to get the points for MS Partnership program. I bought the Comodo code signing certificate. The application passed the test and now I'm trying to setup a Winqual account and after initially getting pissed off about having to buy another signing certific...
Here is a place to support a change: <https://connect.microsoft.com/site831/feedback/details/531903/allow-other-certificates-in-winqual-not-only-verisign>
611,472
*Edit as of 1/24/2015*: It is not possible to use other trusted certificate authorities now. Question and answer is not obsolete: WinQual still rejects the signature: ![enter image description here](https://i.stack.imgur.com/vkivZ.png) when we've already established that it is a valid digital signature: ![enter ima...
2009/03/04
[ "https://Stackoverflow.com/questions/611472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
Well, I just posted another request basically telling them we will not participate unless they accept Comodo Code Signing cert. Microsoft contacted us to tell us we have reports on Windows 7 they want us to look at, but we can't sign in because we don't use Verisign. Ok, YOU contacted me... How much more authenticated...
Here is a place to support a change: <https://connect.microsoft.com/site831/feedback/details/531903/allow-other-certificates-in-winqual-not-only-verisign>
611,472
*Edit as of 1/24/2015*: It is not possible to use other trusted certificate authorities now. Question and answer is not obsolete: WinQual still rejects the signature: ![enter image description here](https://i.stack.imgur.com/vkivZ.png) when we've already established that it is a valid digital signature: ![enter ima...
2009/03/04
[ "https://Stackoverflow.com/questions/611472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
I just signed up to WinQual, and I've been contemplating this question; I think I now have the answer. In short: **They aren't using VeriSign as a certificate at all: They are just outsourcing the task of verifying your identity.** Microsoft doesn't want you to have access to the WinQual site without first verifying ...
Having done Code Signing and recently Winqual sign-up, here are some clarifications: 1. For Winqual sign-up (registration), your signature itself is not checked against the Winqual database. Winqual only checks the certificate from VeriSign that proves that VeriSign checked your identity. Then they get your company na...
611,472
*Edit as of 1/24/2015*: It is not possible to use other trusted certificate authorities now. Question and answer is not obsolete: WinQual still rejects the signature: ![enter image description here](https://i.stack.imgur.com/vkivZ.png) when we've already established that it is a valid digital signature: ![enter ima...
2009/03/04
[ "https://Stackoverflow.com/questions/611472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
Same story here, I'm certifying application for Win7 Logo in order to get the points for MS Partnership program. I bought the Comodo code signing certificate. The application passed the test and now I'm trying to setup a Winqual account and after initially getting pissed off about having to buy another signing certific...
The problem actually goes deeper. For preserving a special status a recertification of one of our products had to happen. Of course that can only be done through VeriTest. To save money and be able to respond to problems before they notice them, we decided to choose the self-test option that allows us to test our soft...
611,472
*Edit as of 1/24/2015*: It is not possible to use other trusted certificate authorities now. Question and answer is not obsolete: WinQual still rejects the signature: ![enter image description here](https://i.stack.imgur.com/vkivZ.png) when we've already established that it is a valid digital signature: ![enter ima...
2009/03/04
[ "https://Stackoverflow.com/questions/611472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
I just signed up to WinQual, and I've been contemplating this question; I think I now have the answer. In short: **They aren't using VeriSign as a certificate at all: They are just outsourcing the task of verifying your identity.** Microsoft doesn't want you to have access to the WinQual site without first verifying ...
Same story here, I'm certifying application for Win7 Logo in order to get the points for MS Partnership program. I bought the Comodo code signing certificate. The application passed the test and now I'm trying to setup a Winqual account and after initially getting pissed off about having to buy another signing certific...
611,472
*Edit as of 1/24/2015*: It is not possible to use other trusted certificate authorities now. Question and answer is not obsolete: WinQual still rejects the signature: ![enter image description here](https://i.stack.imgur.com/vkivZ.png) when we've already established that it is a valid digital signature: ![enter ima...
2009/03/04
[ "https://Stackoverflow.com/questions/611472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
I just signed up to WinQual, and I've been contemplating this question; I think I now have the answer. In short: **They aren't using VeriSign as a certificate at all: They are just outsourcing the task of verifying your identity.** Microsoft doesn't want you to have access to the WinQual site without first verifying ...
Ha! I have run into exactly the same scheme with our Comodo certificate. This is typical bully behaviour, their answers are complete nonsense. If anything, I distrust Verisign more than Comodo and Thawte etc. Let's not forget what they [tried a while ago](http://jeremy.zawodny.com/blog/archives/000970.html).
57,336,833
I want to convert the below XML to CSV. Though it has header line information in the XML file. ``` <?xml version="1.0" encoding="UTF-8"?> <myfile> <updatetime>2019-07-30 08:30:30</updatetime> <process code="PRS1234" name="PROCESS1234" /> <equipment code="EQP1234" name="EQUIPMENT1234" /> <product type="equipme...
2019/08/03
[ "https://Stackoverflow.com/questions/57336833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8733503/" ]
I would solve this using `SelectSingleNode()` and XPath. ``` $data = New-Object xml; $data.load(".\myfile.xml") $record = [pscustomobject]@{ "updatetime" = $data.SelectSingleNode("/*/updatetime")."#text" "code(process)" = $data.SelectSingleNode("/*/process").code "name(process)" ...
OP's XML doesn't appear to be valid. Assuming the XML is meant to be... ```xml <?xml version="1.0" encoding="UTF-8"?> <myfile> <updatetime>2019-07-30 08:30:30</updatetime> <process code="PRS1234" name="PROCESS1234" /> <equipment code="EQP1234" name="EQUIPMENT1234" /> <product type="equipment" planned="...
57,336,833
I want to convert the below XML to CSV. Though it has header line information in the XML file. ``` <?xml version="1.0" encoding="UTF-8"?> <myfile> <updatetime>2019-07-30 08:30:30</updatetime> <process code="PRS1234" name="PROCESS1234" /> <equipment code="EQP1234" name="EQUIPMENT1234" /> <product type="equipme...
2019/08/03
[ "https://Stackoverflow.com/questions/57336833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8733503/" ]
I would solve this using `SelectSingleNode()` and XPath. ``` $data = New-Object xml; $data.load(".\myfile.xml") $record = [pscustomobject]@{ "updatetime" = $data.SelectSingleNode("/*/updatetime")."#text" "code(process)" = $data.SelectSingleNode("/*/process").code "name(process)" ...
This is what I get finally ``` $data = New-Object xml; $data.load("Q:\XML\Myfile.xml") $record = [pscustomobject]@{ "updatetime" = $data.SelectSingleNode("/*/updatetime")."#text" "code(process)" = $data.SelectSingleNode("/*/process").code "name(process)" = $data.SelectSingleNode("/*/proce...
60,387,831
Let's say I have a two tables in my Oracle database... One table stores when a new collection is added ``` +---------------+----------------------+ | collection_id | created_ts | +---------------+----------------------+ | 001 | 02-JAN-2019 19:40:47 | | 002 | 04-JAN-2019 00:05:05 | +-----...
2020/02/25
[ "https://Stackoverflow.com/questions/60387831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3401688/" ]
You can take advantage of the `PIVOT` for achieving the desired result. ``` SELECT * FROM ( SELECT T1.COLLECTION_ID, TRUNC(T2.ACTION_TS) - TRUNC(T1.CREATED_TS) AS DIFF FROM TABLE1 T1 JOIN TABLE2 T2 ON T1.COLLECTION_ID = T2.COLLECTION_ID ) PIVOT ( COUNT ( 1 ) FOR DIFF IN ( 0 AS ACTIONS_DA...
I would just use conditional aggregation: ``` SELECT T1.COLLECTION_ID, (CASE WHEN TRUNC(T2.ACTION_TS) = TRUNC(T1.CREATED_TS) THEN 1 ELSE 0 END) as actions_day_of, (CASE WHEN TRUNC(T2.ACTION_TS) = TRUNC(T1.CREATED_TS) + INTERVAL '1' DAY THEN 1 ELSE 0 END) as act...
40,440
I made caramel on my induction cooktop. The temperature was correct, but the caramel texture is grainy, like all of the sugar didn't dissolve properly. Do I need a different thermometer? I used a Wilton clip-on stainless steel mercury thermometer. Or does the cooking time need to be adjusted? The recipe I am using is:...
2013/12/20
[ "https://cooking.stackexchange.com/questions/40440", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/22043/" ]
I noticed that you're stirring constantly. Generally with candy you want to stir as little as possible, since it causes sugar crystals to form in the syrup. In addition to making the candy grainier, they reduce the overall lifespan- even after the candy has cooled the (larger) crystals will continue to grow, causing th...
Your thermometer should be fine, the graininess probably has more to do with technique than temperature. There's quite a bit of controversy as to when and how to stir and what to do about sugar crystals that form along the sides of the pan. Just to be sure about your thermometer, test it with boiling water. If you're ...
40,440
I made caramel on my induction cooktop. The temperature was correct, but the caramel texture is grainy, like all of the sugar didn't dissolve properly. Do I need a different thermometer? I used a Wilton clip-on stainless steel mercury thermometer. Or does the cooking time need to be adjusted? The recipe I am using is:...
2013/12/20
[ "https://cooking.stackexchange.com/questions/40440", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/22043/" ]
Your thermometer should be fine, the graininess probably has more to do with technique than temperature. There's quite a bit of controversy as to when and how to stir and what to do about sugar crystals that form along the sides of the pan. Just to be sure about your thermometer, test it with boiling water. If you're ...
I own a bakery and made Caramel weekly. I finally purchased an induction burner for the back of the bakery so as to not have to carry boiling sugar down a long corridor. First my staff and then myself experienced repeated failures, i.e. graininess every time we used the induction burner. We finally went back to the gas...
40,440
I made caramel on my induction cooktop. The temperature was correct, but the caramel texture is grainy, like all of the sugar didn't dissolve properly. Do I need a different thermometer? I used a Wilton clip-on stainless steel mercury thermometer. Or does the cooking time need to be adjusted? The recipe I am using is:...
2013/12/20
[ "https://cooking.stackexchange.com/questions/40440", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/22043/" ]
Your thermometer should be fine, the graininess probably has more to do with technique than temperature. There's quite a bit of controversy as to when and how to stir and what to do about sugar crystals that form along the sides of the pan. Just to be sure about your thermometer, test it with boiling water. If you're ...
I solved the problem of grainy caramel made with condensed milk by: taking the grainy caramel off the cooktop and decanting the entire batch into my high power blender (2200w) for 3 minutes on the highest setting. Not only did the graininess disappear completely but the heat generated by my amazing blender continued to...
40,440
I made caramel on my induction cooktop. The temperature was correct, but the caramel texture is grainy, like all of the sugar didn't dissolve properly. Do I need a different thermometer? I used a Wilton clip-on stainless steel mercury thermometer. Or does the cooking time need to be adjusted? The recipe I am using is:...
2013/12/20
[ "https://cooking.stackexchange.com/questions/40440", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/22043/" ]
I noticed that you're stirring constantly. Generally with candy you want to stir as little as possible, since it causes sugar crystals to form in the syrup. In addition to making the candy grainier, they reduce the overall lifespan- even after the candy has cooled the (larger) crystals will continue to grow, causing th...
I own a bakery and made Caramel weekly. I finally purchased an induction burner for the back of the bakery so as to not have to carry boiling sugar down a long corridor. First my staff and then myself experienced repeated failures, i.e. graininess every time we used the induction burner. We finally went back to the gas...
40,440
I made caramel on my induction cooktop. The temperature was correct, but the caramel texture is grainy, like all of the sugar didn't dissolve properly. Do I need a different thermometer? I used a Wilton clip-on stainless steel mercury thermometer. Or does the cooking time need to be adjusted? The recipe I am using is:...
2013/12/20
[ "https://cooking.stackexchange.com/questions/40440", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/22043/" ]
I noticed that you're stirring constantly. Generally with candy you want to stir as little as possible, since it causes sugar crystals to form in the syrup. In addition to making the candy grainier, they reduce the overall lifespan- even after the candy has cooled the (larger) crystals will continue to grow, causing th...
I solved the problem of grainy caramel made with condensed milk by: taking the grainy caramel off the cooktop and decanting the entire batch into my high power blender (2200w) for 3 minutes on the highest setting. Not only did the graininess disappear completely but the heat generated by my amazing blender continued to...
40,440
I made caramel on my induction cooktop. The temperature was correct, but the caramel texture is grainy, like all of the sugar didn't dissolve properly. Do I need a different thermometer? I used a Wilton clip-on stainless steel mercury thermometer. Or does the cooking time need to be adjusted? The recipe I am using is:...
2013/12/20
[ "https://cooking.stackexchange.com/questions/40440", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/22043/" ]
I solved the problem of grainy caramel made with condensed milk by: taking the grainy caramel off the cooktop and decanting the entire batch into my high power blender (2200w) for 3 minutes on the highest setting. Not only did the graininess disappear completely but the heat generated by my amazing blender continued to...
I own a bakery and made Caramel weekly. I finally purchased an induction burner for the back of the bakery so as to not have to carry boiling sugar down a long corridor. First my staff and then myself experienced repeated failures, i.e. graininess every time we used the induction burner. We finally went back to the gas...
114,545
I have developed [this android application](https://market.android.com/details?id=net.mindfsck.PosAff) and I am looking to port it to iOS. My questions are: 1) I am planning to finance the iOS development with the money earn't from the android sales which is about $200 at the moment. Would it be reasonable to get th...
2011/10/15
[ "https://softwareengineering.stackexchange.com/questions/114545", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/38721/" ]
$200 would pay for maybe half a day's work from a decent iOS developer. I'd recommend investing in a Mac (you can do development without an iPhone, at least to begin with) and learn how to do the port yourself. The employment opportunities for someone who can do both platforms are enormous. (also, iPhone owners tend t...
I think you're going to have to do it yourself. Keep in mind, that to release an iPhone app you need to be in the iPhone developer program, which I believe is $99/yr. So you really have $101 to work with. And you'll probably want an actual iPhone (or iPod Touch) to test the program(s). My business advice would be to ...
114,545
I have developed [this android application](https://market.android.com/details?id=net.mindfsck.PosAff) and I am looking to port it to iOS. My questions are: 1) I am planning to finance the iOS development with the money earn't from the android sales which is about $200 at the moment. Would it be reasonable to get th...
2011/10/15
[ "https://softwareengineering.stackexchange.com/questions/114545", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/38721/" ]
**1. Can you get someone to write the iOS version of your app for $200-ish?** No. Or, if you can, good luck with that. We don't know anything about how complex your app is, but most any app that people will be willing to pay even $0.99 for will require more than 20 hours of work (usually a lot more). That means that yo...
Reports are that many cross-platform developers make between 2X to 10X more money in the iOS App store than for their paid Android apps, so you might want to consider investing more. Total iOS app development costs have been reported in the range of $25k to $250k for quality apps from experienced developers, so $200 ma...
114,545
I have developed [this android application](https://market.android.com/details?id=net.mindfsck.PosAff) and I am looking to port it to iOS. My questions are: 1) I am planning to finance the iOS development with the money earn't from the android sales which is about $200 at the moment. Would it be reasonable to get th...
2011/10/15
[ "https://softwareengineering.stackexchange.com/questions/114545", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/38721/" ]
I think you're going to have to do it yourself. Keep in mind, that to release an iPhone app you need to be in the iPhone developer program, which I believe is $99/yr. So you really have $101 to work with. And you'll probably want an actual iPhone (or iPod Touch) to test the program(s). My business advice would be to ...
Reports are that many cross-platform developers make between 2X to 10X more money in the iOS App store than for their paid Android apps, so you might want to consider investing more. Total iOS app development costs have been reported in the range of $25k to $250k for quality apps from experienced developers, so $200 ma...
114,545
I have developed [this android application](https://market.android.com/details?id=net.mindfsck.PosAff) and I am looking to port it to iOS. My questions are: 1) I am planning to finance the iOS development with the money earn't from the android sales which is about $200 at the moment. Would it be reasonable to get th...
2011/10/15
[ "https://softwareengineering.stackexchange.com/questions/114545", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/38721/" ]
$200 would pay for maybe half a day's work from a decent iOS developer. I'd recommend investing in a Mac (you can do development without an iPhone, at least to begin with) and learn how to do the port yourself. The employment opportunities for someone who can do both platforms are enormous. (also, iPhone owners tend t...
well why you thinking about other people to port your application ? It has many disadvantages 1) You giving away your android code. 2) What if you update your app , you cant sure weather the first person who worked for it will available again , you will end up searching for another guy, who has to understand previou...
114,545
I have developed [this android application](https://market.android.com/details?id=net.mindfsck.PosAff) and I am looking to port it to iOS. My questions are: 1) I am planning to finance the iOS development with the money earn't from the android sales which is about $200 at the moment. Would it be reasonable to get th...
2011/10/15
[ "https://softwareengineering.stackexchange.com/questions/114545", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/38721/" ]
well why you thinking about other people to port your application ? It has many disadvantages 1) You giving away your android code. 2) What if you update your app , you cant sure weather the first person who worked for it will available again , you will end up searching for another guy, who has to understand previou...
You should look into PhoneGap and see if it will help you with porting it to iOS. You don't need a Mac to do the port because PhoneGap basically turns your app into an HTML5 app that can run on practically any device.
114,545
I have developed [this android application](https://market.android.com/details?id=net.mindfsck.PosAff) and I am looking to port it to iOS. My questions are: 1) I am planning to finance the iOS development with the money earn't from the android sales which is about $200 at the moment. Would it be reasonable to get th...
2011/10/15
[ "https://softwareengineering.stackexchange.com/questions/114545", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/38721/" ]
well why you thinking about other people to port your application ? It has many disadvantages 1) You giving away your android code. 2) What if you update your app , you cant sure weather the first person who worked for it will available again , you will end up searching for another guy, who has to understand previou...
Reports are that many cross-platform developers make between 2X to 10X more money in the iOS App store than for their paid Android apps, so you might want to consider investing more. Total iOS app development costs have been reported in the range of $25k to $250k for quality apps from experienced developers, so $200 ma...
114,545
I have developed [this android application](https://market.android.com/details?id=net.mindfsck.PosAff) and I am looking to port it to iOS. My questions are: 1) I am planning to finance the iOS development with the money earn't from the android sales which is about $200 at the moment. Would it be reasonable to get th...
2011/10/15
[ "https://softwareengineering.stackexchange.com/questions/114545", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/38721/" ]
**1. Can you get someone to write the iOS version of your app for $200-ish?** No. Or, if you can, good luck with that. We don't know anything about how complex your app is, but most any app that people will be willing to pay even $0.99 for will require more than 20 hours of work (usually a lot more). That means that yo...
well why you thinking about other people to port your application ? It has many disadvantages 1) You giving away your android code. 2) What if you update your app , you cant sure weather the first person who worked for it will available again , you will end up searching for another guy, who has to understand previou...
114,545
I have developed [this android application](https://market.android.com/details?id=net.mindfsck.PosAff) and I am looking to port it to iOS. My questions are: 1) I am planning to finance the iOS development with the money earn't from the android sales which is about $200 at the moment. Would it be reasonable to get th...
2011/10/15
[ "https://softwareengineering.stackexchange.com/questions/114545", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/38721/" ]
$200 would pay for maybe half a day's work from a decent iOS developer. I'd recommend investing in a Mac (you can do development without an iPhone, at least to begin with) and learn how to do the port yourself. The employment opportunities for someone who can do both platforms are enormous. (also, iPhone owners tend t...
Reports are that many cross-platform developers make between 2X to 10X more money in the iOS App store than for their paid Android apps, so you might want to consider investing more. Total iOS app development costs have been reported in the range of $25k to $250k for quality apps from experienced developers, so $200 ma...
114,545
I have developed [this android application](https://market.android.com/details?id=net.mindfsck.PosAff) and I am looking to port it to iOS. My questions are: 1) I am planning to finance the iOS development with the money earn't from the android sales which is about $200 at the moment. Would it be reasonable to get th...
2011/10/15
[ "https://softwareengineering.stackexchange.com/questions/114545", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/38721/" ]
**1. Can you get someone to write the iOS version of your app for $200-ish?** No. Or, if you can, good luck with that. We don't know anything about how complex your app is, but most any app that people will be willing to pay even $0.99 for will require more than 20 hours of work (usually a lot more). That means that yo...
I think you're going to have to do it yourself. Keep in mind, that to release an iPhone app you need to be in the iPhone developer program, which I believe is $99/yr. So you really have $101 to work with. And you'll probably want an actual iPhone (or iPod Touch) to test the program(s). My business advice would be to ...
114,545
I have developed [this android application](https://market.android.com/details?id=net.mindfsck.PosAff) and I am looking to port it to iOS. My questions are: 1) I am planning to finance the iOS development with the money earn't from the android sales which is about $200 at the moment. Would it be reasonable to get th...
2011/10/15
[ "https://softwareengineering.stackexchange.com/questions/114545", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/38721/" ]
$200 would pay for maybe half a day's work from a decent iOS developer. I'd recommend investing in a Mac (you can do development without an iPhone, at least to begin with) and learn how to do the port yourself. The employment opportunities for someone who can do both platforms are enormous. (also, iPhone owners tend t...
**1. Can you get someone to write the iOS version of your app for $200-ish?** No. Or, if you can, good luck with that. We don't know anything about how complex your app is, but most any app that people will be willing to pay even $0.99 for will require more than 20 hours of work (usually a lot more). That means that yo...
13,916,410
Im sorry about the title but I'm not sure hw else to describe the issue. I have a SingletonBean with a class that extends TimerTask. The point is that when the application is launched it starts running some a set of scheduled background tasks on a loop. Everything works fine at first glance, the Timer() executes the ru...
2012/12/17
[ "https://Stackoverflow.com/questions/13916410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1349281/" ]
This means logging library cannot acquire a logger. Check logger configs.
It looks like there are either conflicting logging framework implementation classes or a missing commons-logging.properties file. Although you can mix calls to the log4j, log4j 2, slf4j, commons-logging, etc. API's, the classes that you include in the dependencies have to be compatible. There is a set of classes that u...
32,938,487
My data are in lists. ``` data = [['Biz_Innovations', '#socialmedia'], ['ChantalGrange', '#aws'], ['beyonddevops', '#aws'], ['beyonddevops', '#socialmedia'], ['IBMNetezza', '#ibm'], ['IBMNetezza', '#analytics'], ['SandraFeinsmith', '#ibm'], ['SandraFeinsmith', '#analytics'], ['fleejack', '#healhcare'], ['bigd...
2015/10/04
[ "https://Stackoverflow.com/questions/32938487", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2088027/" ]
``` >>> import collections, operator >>> words = collections.Counter(map(operator.itemgetter(1), data)) >>> populars = [p for p in data if words[p[1]] >= 3] ```
``` In [16]: from collections import Counter In [17]: keepers = [a[0] for a in Counter(d[1] for d in data).items() if a[1]>=3] In [18]: [d for d in data if d[1] in keepers] Out[18]: [['Biz_Innovations', '#socialmedia'], ['ChantalGrange', '#aws'], ['beyonddevops', '#aws'], ['beyonddevops', '#socialmedia'], ['bigd...
32,938,487
My data are in lists. ``` data = [['Biz_Innovations', '#socialmedia'], ['ChantalGrange', '#aws'], ['beyonddevops', '#aws'], ['beyonddevops', '#socialmedia'], ['IBMNetezza', '#ibm'], ['IBMNetezza', '#analytics'], ['SandraFeinsmith', '#ibm'], ['SandraFeinsmith', '#analytics'], ['fleejack', '#healhcare'], ['bigd...
2015/10/04
[ "https://Stackoverflow.com/questions/32938487", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2088027/" ]
``` >>> import collections, operator >>> words = collections.Counter(map(operator.itemgetter(1), data)) >>> populars = [p for p in data if words[p[1]] >= 3] ```
You could use `collections.Counter` for this: ``` import collections counts = collections.Counter(tag for (_, tag) in data) data = [[val, tag] for (val, tag) in data if counts[tag] >= 3] ```
183,419
I always see voltmeters connected in parallel with a component, but what happens if you connect it in series? I think it's due to the high resistance of a voltmeter but I don't *really* see why this would be a problem: It just means that the current going through the circuit is shifted down a level, but all things rema...
2015/05/11
[ "https://physics.stackexchange.com/questions/183419", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/63672/" ]
> > I think it's due to the high resistance of a voltmeter but I don't really see why this would be a problem: It just means that the current going through the circuit is shifted down a level, but all things remain the same right? > > > Ideally, a voltmeter should have such a high resistance that it's equivalent t...
@Jdeep - the voltmeter should read close to the output potential of the cell/battery, assuming the other components in the circuit have a total resistance that is significantly smaller than that of the voltmeter (which is the case a lot of the time, given the large typical resistance of a voltmeter).
183,419
I always see voltmeters connected in parallel with a component, but what happens if you connect it in series? I think it's due to the high resistance of a voltmeter but I don't *really* see why this would be a problem: It just means that the current going through the circuit is shifted down a level, but all things rema...
2015/05/11
[ "https://physics.stackexchange.com/questions/183419", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/63672/" ]
> > ... but what happens if you connect it in series? > > > Consider a circuit which has a 3-V (ideal) battery connected in series with a 100-$\Omega$ and a 200-$\Omega$ resistor (series resistors). The voltage across the 100-$\Omega$ resistor will be 1 V, and across the 200-$\Omega$, 2 V. Next, connect a 1 M$\Om...
@Jdeep - the voltmeter should read close to the output potential of the cell/battery, assuming the other components in the circuit have a total resistance that is significantly smaller than that of the voltmeter (which is the case a lot of the time, given the large typical resistance of a voltmeter).
41,718,101
I have two arrays one can have example 1 element inside and other array can have 2 elements. So main problem is i got "Undefined offset" error i think its because my arrays elements are different amount file\_data loop goes two times and other with only single element goes together and whats why i got this error. How c...
2017/01/18
[ "https://Stackoverflow.com/questions/41718101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4019534/" ]
You get an **undefined offset** error due to this ``` $image['caption'] = $caption[$i++]; ``` To avoid the error: ``` if(!empty($caption[$i])){ $image['caption'] = $caption[$i]; } else { $image['caption'] = ""; } $i++; ```
May-be that more correct ? ``` foreach ($file_data as $file) { $image[] =['hotel_id' => $last_id, 'image' => $file, 'caption' => $caption]; } var_dump($image); ``` or replace line: ``` $image['caption'] = isset($caption[$i++])?$caption[$i++]:""; ```
41,718,101
I have two arrays one can have example 1 element inside and other array can have 2 elements. So main problem is i got "Undefined offset" error i think its because my arrays elements are different amount file\_data loop goes two times and other with only single element goes together and whats why i got this error. How c...
2017/01/18
[ "https://Stackoverflow.com/questions/41718101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4019534/" ]
You get an **undefined offset** error due to this ``` $image['caption'] = $caption[$i++]; ``` To avoid the error: ``` if(!empty($caption[$i])){ $image['caption'] = $caption[$i]; } else { $image['caption'] = ""; } $i++; ```
``` $i = 0; foreach ($file_data as $file) { $image['hotel_id'] = $last_id; $image['image'] = $file; if($caption[$i++]!='') $image['caption'] = $caption[$i++]; else $image['caption'] = ''; var_dump($image); } ```
54,208,344
I'm trying to use (a slightly-modified version of) Paul Smith's [Advanced VPATH Method for Multi-Architecture Builds](http://make.mad-scientist.net/papers/multi-architecture-builds/#advanced) to build our app in different subdirectories, with different compiler flags for each one, based on environment variables passed ...
2019/01/15
[ "https://Stackoverflow.com/questions/54208344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5689220/" ]
The easiest way would be to run the commands under the TSO terminal control program as a batch job. This could look something like this (JOB-card omitted): ``` //*---------------------------------------------- //DISDB EXEC PGM=IKJEFT01,DYNAMNBR=20 //*------------------...
You can write the rexx script to build connection to Db2 subsystem and then execute the same command..Let me find the sample and send to you.. this is the command you can use to connect to DB2 from REXX ADDRESS DSNREXX 'CONNECT' 'DB01'
54,208,344
I'm trying to use (a slightly-modified version of) Paul Smith's [Advanced VPATH Method for Multi-Architecture Builds](http://make.mad-scientist.net/papers/multi-architecture-builds/#advanced) to build our app in different subdirectories, with different compiler flags for each one, based on environment variables passed ...
2019/01/15
[ "https://Stackoverflow.com/questions/54208344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5689220/" ]
You say you *manually* issue the commands in the *DB2 commands* screen. In z/OS there is a similar, I think, menu in TSO. Issue the `DB2I` command in TSO and you should be presented a menu which has option 7 *DB2 Commands*. This is the manual way. If you want to run a series of commands in batch, i.e. scripted, submit...
You can write the rexx script to build connection to Db2 subsystem and then execute the same command..Let me find the sample and send to you.. this is the command you can use to connect to DB2 from REXX ADDRESS DSNREXX 'CONNECT' 'DB01'
54,208,344
I'm trying to use (a slightly-modified version of) Paul Smith's [Advanced VPATH Method for Multi-Architecture Builds](http://make.mad-scientist.net/papers/multi-architecture-builds/#advanced) to build our app in different subdirectories, with different compiler flags for each one, based on environment variables passed ...
2019/01/15
[ "https://Stackoverflow.com/questions/54208344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5689220/" ]
A very basic REXX solution: ``` /* REXX*/ DB2NAME = 'DSN' /* <== change db2name here */ "DELSTACK" QUEUE "-DISPLAY DB(DN*) SPACENAM(*) USE LOCKS LIMIT(*)" QUEUE "-DISPLAY D...
You can write the rexx script to build connection to Db2 subsystem and then execute the same command..Let me find the sample and send to you.. this is the command you can use to connect to DB2 from REXX ADDRESS DSNREXX 'CONNECT' 'DB01'
54,208,344
I'm trying to use (a slightly-modified version of) Paul Smith's [Advanced VPATH Method for Multi-Architecture Builds](http://make.mad-scientist.net/papers/multi-architecture-builds/#advanced) to build our app in different subdirectories, with different compiler flags for each one, based on environment variables passed ...
2019/01/15
[ "https://Stackoverflow.com/questions/54208344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5689220/" ]
The easiest way would be to run the commands under the TSO terminal control program as a batch job. This could look something like this (JOB-card omitted): ``` //*---------------------------------------------- //DISDB EXEC PGM=IKJEFT01,DYNAMNBR=20 //*------------------...
You say you *manually* issue the commands in the *DB2 commands* screen. In z/OS there is a similar, I think, menu in TSO. Issue the `DB2I` command in TSO and you should be presented a menu which has option 7 *DB2 Commands*. This is the manual way. If you want to run a series of commands in batch, i.e. scripted, submit...
54,208,344
I'm trying to use (a slightly-modified version of) Paul Smith's [Advanced VPATH Method for Multi-Architecture Builds](http://make.mad-scientist.net/papers/multi-architecture-builds/#advanced) to build our app in different subdirectories, with different compiler flags for each one, based on environment variables passed ...
2019/01/15
[ "https://Stackoverflow.com/questions/54208344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5689220/" ]
The easiest way would be to run the commands under the TSO terminal control program as a batch job. This could look something like this (JOB-card omitted): ``` //*---------------------------------------------- //DISDB EXEC PGM=IKJEFT01,DYNAMNBR=20 //*------------------...
A very basic REXX solution: ``` /* REXX*/ DB2NAME = 'DSN' /* <== change db2name here */ "DELSTACK" QUEUE "-DISPLAY DB(DN*) SPACENAM(*) USE LOCKS LIMIT(*)" QUEUE "-DISPLAY D...
54,208,344
I'm trying to use (a slightly-modified version of) Paul Smith's [Advanced VPATH Method for Multi-Architecture Builds](http://make.mad-scientist.net/papers/multi-architecture-builds/#advanced) to build our app in different subdirectories, with different compiler flags for each one, based on environment variables passed ...
2019/01/15
[ "https://Stackoverflow.com/questions/54208344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5689220/" ]
The easiest way would be to run the commands under the TSO terminal control program as a batch job. This could look something like this (JOB-card omitted): ``` //*---------------------------------------------- //DISDB EXEC PGM=IKJEFT01,DYNAMNBR=20 //*------------------...
In case there are users out there that prefer unix shell, you can ssh into unix system services and use the command line processor, and db2 supplied stored procedures. .profile snippet to set environment variables: ``` # DB2 CLP export JAVA_HOME=/usr/lpp/java/java180/J8.0_64 export CLASSPATH=$CLASSPATH:/usr/lpp/db2/d...
54,208,344
I'm trying to use (a slightly-modified version of) Paul Smith's [Advanced VPATH Method for Multi-Architecture Builds](http://make.mad-scientist.net/papers/multi-architecture-builds/#advanced) to build our app in different subdirectories, with different compiler flags for each one, based on environment variables passed ...
2019/01/15
[ "https://Stackoverflow.com/questions/54208344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5689220/" ]
You say you *manually* issue the commands in the *DB2 commands* screen. In z/OS there is a similar, I think, menu in TSO. Issue the `DB2I` command in TSO and you should be presented a menu which has option 7 *DB2 Commands*. This is the manual way. If you want to run a series of commands in batch, i.e. scripted, submit...
A very basic REXX solution: ``` /* REXX*/ DB2NAME = 'DSN' /* <== change db2name here */ "DELSTACK" QUEUE "-DISPLAY DB(DN*) SPACENAM(*) USE LOCKS LIMIT(*)" QUEUE "-DISPLAY D...
54,208,344
I'm trying to use (a slightly-modified version of) Paul Smith's [Advanced VPATH Method for Multi-Architecture Builds](http://make.mad-scientist.net/papers/multi-architecture-builds/#advanced) to build our app in different subdirectories, with different compiler flags for each one, based on environment variables passed ...
2019/01/15
[ "https://Stackoverflow.com/questions/54208344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5689220/" ]
You say you *manually* issue the commands in the *DB2 commands* screen. In z/OS there is a similar, I think, menu in TSO. Issue the `DB2I` command in TSO and you should be presented a menu which has option 7 *DB2 Commands*. This is the manual way. If you want to run a series of commands in batch, i.e. scripted, submit...
In case there are users out there that prefer unix shell, you can ssh into unix system services and use the command line processor, and db2 supplied stored procedures. .profile snippet to set environment variables: ``` # DB2 CLP export JAVA_HOME=/usr/lpp/java/java180/J8.0_64 export CLASSPATH=$CLASSPATH:/usr/lpp/db2/d...
54,208,344
I'm trying to use (a slightly-modified version of) Paul Smith's [Advanced VPATH Method for Multi-Architecture Builds](http://make.mad-scientist.net/papers/multi-architecture-builds/#advanced) to build our app in different subdirectories, with different compiler flags for each one, based on environment variables passed ...
2019/01/15
[ "https://Stackoverflow.com/questions/54208344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5689220/" ]
A very basic REXX solution: ``` /* REXX*/ DB2NAME = 'DSN' /* <== change db2name here */ "DELSTACK" QUEUE "-DISPLAY DB(DN*) SPACENAM(*) USE LOCKS LIMIT(*)" QUEUE "-DISPLAY D...
In case there are users out there that prefer unix shell, you can ssh into unix system services and use the command line processor, and db2 supplied stored procedures. .profile snippet to set environment variables: ``` # DB2 CLP export JAVA_HOME=/usr/lpp/java/java180/J8.0_64 export CLASSPATH=$CLASSPATH:/usr/lpp/db2/d...
2,281,223
I need to write a program which will browse through strings of various lengths and select only those which are written using symbols from set defined by me (particularly Japanese letters). Strings will contain words written in different languages (German, French, Arabic, Russian, English etc). Obviously there is huge n...
2010/02/17
[ "https://Stackoverflow.com/questions/2281223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/180309/" ]
Obviously you would be better off with Delphi 2010, since the VCL in delphi 7 is not aware of Unicode strings. You can use WideString types, and WideChar types in Delphi 7, and you can install a component set like the TNT Unicode Components to help you create a user interface that can display your results. For a very...
I also recommend to switch to Delphi 2010 (why bother with 2009 anymore?)! If in the unlikely case that you are stuck with Delphi 7 the [Unicode Library](http://www.soft-gems.net/index.php/libs/unicode-library) from Mike Lischke may be somewhat helpful.
2,281,223
I need to write a program which will browse through strings of various lengths and select only those which are written using symbols from set defined by me (particularly Japanese letters). Strings will contain words written in different languages (German, French, Arabic, Russian, English etc). Obviously there is huge n...
2010/02/17
[ "https://Stackoverflow.com/questions/2281223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/180309/" ]
Obviously you would be better off with Delphi 2010, since the VCL in delphi 7 is not aware of Unicode strings. You can use WideString types, and WideChar types in Delphi 7, and you can install a component set like the TNT Unicode Components to help you create a user interface that can display your results. For a very...
For the simple processing of strings in the manner you describe, do not be put off by suggestions that you should upgrade to the latest compiler and Unicode enabled framework. The Unicode support itself is of course provided by the underlying Windows API which is of course (directly) accessible from "non-Unicode" versi...
68,185,277
I am trying to scrape all thee events from <https://www.onthisday.com/events/february/5> I am getting all the events from first page.How can I get other events from the second page and merge into one list? Right now I tried to catch the next page link and parse it but it didn't work still getting the results from firs...
2021/06/29
[ "https://Stackoverflow.com/questions/68185277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16246298/" ]
use when ``` $orders = Orders::when(($request->sales_channel=="Non-Amazon"),function ($query)use($request){ $query->where('sales_channel', $request->sales_channel); })->when(($request->sales_channel!="Non-Amazon"),function ($query)use($request){ $query->where('total',...
You can try something like this: ``` $request = $request->data; $orders = Orders::query(); if ($request['sales_channel']) { $orders = $orders->whereIn('sales_channel', $request['sales_channel']); }else{ //the initial query $orders = $orders->where('sales_channel', '=', 'Non-Amazon')->orWhere(function ($q...
29,920,461
I try to put this HTML into my page content using dashboard: ``` <div> <p class="text-center"> <a class="btn btn-large btn-light" title="Kontakt" href="/?page_id=20">Kontakt <i class="fa fa-phone"></i></a> <a class="btn btn-large btn-light" title="Standorte &amp; Informationen" href="/?page_id=...
2015/04/28
[ "https://Stackoverflow.com/questions/29920461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4159100/" ]
You can use `csv` module for reading the file, to get ride of splitting the lines then use `np.array` to convert the float values to an numpy array object : ``` import csv import numpy as np dictionary = {} with open('bigfile.csv', 'rb') as csvfile: spamreader = csv.reader(csvfile, delimiter='\t',) for row i...
One way to use `Pandas`. Assuming you do `df = pd.read_csv(file)` and the `df` is like ``` In [220]: df Out[220]: k a1 a2 a3 0 abc -0.12300 0.652400 0.3250 1 foo -0.98080 0.874000 -0.2341 2 bar 0.23123 -0.123124 -0.1232 ``` *I've added dummy column names, you have flexibility to change ...
29,920,461
I try to put this HTML into my page content using dashboard: ``` <div> <p class="text-center"> <a class="btn btn-large btn-light" title="Kontakt" href="/?page_id=20">Kontakt <i class="fa fa-phone"></i></a> <a class="btn btn-large btn-light" title="Standorte &amp; Informationen" href="/?page_id=...
2015/04/28
[ "https://Stackoverflow.com/questions/29920461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4159100/" ]
You can use pandas to load the df, then construct a new df as desired and then call `to_dict`: ``` In [99]: t="""abc -0.123 0.6524 0.325 foo -0.9808 0.874 -0.2341 bar 0.23123 -0.123124 -0.1232""" df = pd.read_csv(io.StringIO(t), sep='\s+', header=None) df = pd.DataFrame(columns = df[0], data = df.ix[:,1:].valu...
You can use `csv` module for reading the file, to get ride of splitting the lines then use `np.array` to convert the float values to an numpy array object : ``` import csv import numpy as np dictionary = {} with open('bigfile.csv', 'rb') as csvfile: spamreader = csv.reader(csvfile, delimiter='\t',) for row i...
29,920,461
I try to put this HTML into my page content using dashboard: ``` <div> <p class="text-center"> <a class="btn btn-large btn-light" title="Kontakt" href="/?page_id=20">Kontakt <i class="fa fa-phone"></i></a> <a class="btn btn-large btn-light" title="Standorte &amp; Informationen" href="/?page_id=...
2015/04/28
[ "https://Stackoverflow.com/questions/29920461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4159100/" ]
You can use `csv` module for reading the file, to get ride of splitting the lines then use `np.array` to convert the float values to an numpy array object : ``` import csv import numpy as np dictionary = {} with open('bigfile.csv', 'rb') as csvfile: spamreader = csv.reader(csvfile, delimiter='\t',) for row i...
Sorry this is not really an answer but too long for a comment. You say you have 1 billion lines with 200 columns of float. It means a minimal memory of > > 109 \* 200 \* 8 = 1.6 1012 bytes > > > It gives more than 1.5 G not counting the overhead for the dict. Of course, you can try to use `numpy` arrays instea...
29,920,461
I try to put this HTML into my page content using dashboard: ``` <div> <p class="text-center"> <a class="btn btn-large btn-light" title="Kontakt" href="/?page_id=20">Kontakt <i class="fa fa-phone"></i></a> <a class="btn btn-large btn-light" title="Standorte &amp; Informationen" href="/?page_id=...
2015/04/28
[ "https://Stackoverflow.com/questions/29920461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4159100/" ]
You can use pandas to load the df, then construct a new df as desired and then call `to_dict`: ``` In [99]: t="""abc -0.123 0.6524 0.325 foo -0.9808 0.874 -0.2341 bar 0.23123 -0.123124 -0.1232""" df = pd.read_csv(io.StringIO(t), sep='\s+', header=None) df = pd.DataFrame(columns = df[0], data = df.ix[:,1:].valu...
One way to use `Pandas`. Assuming you do `df = pd.read_csv(file)` and the `df` is like ``` In [220]: df Out[220]: k a1 a2 a3 0 abc -0.12300 0.652400 0.3250 1 foo -0.98080 0.874000 -0.2341 2 bar 0.23123 -0.123124 -0.1232 ``` *I've added dummy column names, you have flexibility to change ...
29,920,461
I try to put this HTML into my page content using dashboard: ``` <div> <p class="text-center"> <a class="btn btn-large btn-light" title="Kontakt" href="/?page_id=20">Kontakt <i class="fa fa-phone"></i></a> <a class="btn btn-large btn-light" title="Standorte &amp; Informationen" href="/?page_id=...
2015/04/28
[ "https://Stackoverflow.com/questions/29920461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4159100/" ]
You could make use of the [`numpy.genfromtxt()`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.genfromtxt.html#numpy-genfromtxt) function, if you specify the number of columns: ``` import numpy as np a = np.genfromtxt('bigfile.csv',dtype=str,usecols=(0)) b = np.genfromtxt('bigfile.csv',dtype=float,delimi...
One way to use `Pandas`. Assuming you do `df = pd.read_csv(file)` and the `df` is like ``` In [220]: df Out[220]: k a1 a2 a3 0 abc -0.12300 0.652400 0.3250 1 foo -0.98080 0.874000 -0.2341 2 bar 0.23123 -0.123124 -0.1232 ``` *I've added dummy column names, you have flexibility to change ...
29,920,461
I try to put this HTML into my page content using dashboard: ``` <div> <p class="text-center"> <a class="btn btn-large btn-light" title="Kontakt" href="/?page_id=20">Kontakt <i class="fa fa-phone"></i></a> <a class="btn btn-large btn-light" title="Standorte &amp; Informationen" href="/?page_id=...
2015/04/28
[ "https://Stackoverflow.com/questions/29920461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4159100/" ]
You can use pandas to load the df, then construct a new df as desired and then call `to_dict`: ``` In [99]: t="""abc -0.123 0.6524 0.325 foo -0.9808 0.874 -0.2341 bar 0.23123 -0.123124 -0.1232""" df = pd.read_csv(io.StringIO(t), sep='\s+', header=None) df = pd.DataFrame(columns = df[0], data = df.ix[:,1:].valu...
You could make use of the [`numpy.genfromtxt()`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.genfromtxt.html#numpy-genfromtxt) function, if you specify the number of columns: ``` import numpy as np a = np.genfromtxt('bigfile.csv',dtype=str,usecols=(0)) b = np.genfromtxt('bigfile.csv',dtype=float,delimi...
29,920,461
I try to put this HTML into my page content using dashboard: ``` <div> <p class="text-center"> <a class="btn btn-large btn-light" title="Kontakt" href="/?page_id=20">Kontakt <i class="fa fa-phone"></i></a> <a class="btn btn-large btn-light" title="Standorte &amp; Informationen" href="/?page_id=...
2015/04/28
[ "https://Stackoverflow.com/questions/29920461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4159100/" ]
You can use pandas to load the df, then construct a new df as desired and then call `to_dict`: ``` In [99]: t="""abc -0.123 0.6524 0.325 foo -0.9808 0.874 -0.2341 bar 0.23123 -0.123124 -0.1232""" df = pd.read_csv(io.StringIO(t), sep='\s+', header=None) df = pd.DataFrame(columns = df[0], data = df.ix[:,1:].valu...
Sorry this is not really an answer but too long for a comment. You say you have 1 billion lines with 200 columns of float. It means a minimal memory of > > 109 \* 200 \* 8 = 1.6 1012 bytes > > > It gives more than 1.5 G not counting the overhead for the dict. Of course, you can try to use `numpy` arrays instea...
29,920,461
I try to put this HTML into my page content using dashboard: ``` <div> <p class="text-center"> <a class="btn btn-large btn-light" title="Kontakt" href="/?page_id=20">Kontakt <i class="fa fa-phone"></i></a> <a class="btn btn-large btn-light" title="Standorte &amp; Informationen" href="/?page_id=...
2015/04/28
[ "https://Stackoverflow.com/questions/29920461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4159100/" ]
You could make use of the [`numpy.genfromtxt()`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.genfromtxt.html#numpy-genfromtxt) function, if you specify the number of columns: ``` import numpy as np a = np.genfromtxt('bigfile.csv',dtype=str,usecols=(0)) b = np.genfromtxt('bigfile.csv',dtype=float,delimi...
Sorry this is not really an answer but too long for a comment. You say you have 1 billion lines with 200 columns of float. It means a minimal memory of > > 109 \* 200 \* 8 = 1.6 1012 bytes > > > It gives more than 1.5 G not counting the overhead for the dict. Of course, you can try to use `numpy` arrays instea...
22,103,354
Since `bind` is not a cross browser (*old ones*) function , there is a polyfill for it : ( *from John Resig's book*) ``` /*1*/ Function.prototype.bind = function () /*2*/ { /*3*/ var fn = this, /*4*/ args = Array.prototype.slice.call(arguments), /*5*/ object = args.shi...
2014/02/28
[ "https://Stackoverflow.com/questions/22103354", "https://Stackoverflow.com", "https://Stackoverflow.com/users/859154/" ]
There are two places you can pass in arguments to the bound function: 1) When you call bind (the first `arguments`). These are always applied to the bound function when it is called. 2) When you call the bound function (the second `arguments`). These are the "more1, more2" that you mention. These change depending on ...
`.bind` also serves as [**partial application**](http://en.wikipedia.org/wiki/Partial_application) solution. Event handlers might be the best example: ``` var handler = function(data, event) { }; element.addEventListener('click', handler.bind(null, someData)); ``` If the arguments from the actual function call woul...
56,814,603
With this given code below, I would like to remove any 'li' element whose child `ol` element does contain any `li` element, yet with no avail. ```js $(document).ready(function() { $('#myUL li').each(function() { var lenLi = $(this).find('ol').children('li').length; if (lenLi == 0) { $(this).remove(...
2019/06/29
[ "https://Stackoverflow.com/questions/56814603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1349726/" ]
Your code is iterating through all `li` contained within`#myUL`. Use a first-level child selector `>`: ```js $(document).ready(function() { $('#myUL > li').each(function() { var lenLi = $(this).find('ol').children('li').length; if (lenLi == 0) { $(this).remove(); } }) }) ``` ```html <scri...
``` if ($('#el').is(':empty')){ // custom code } ``` More info [here](https://api.jquery.com/is/)
56,814,603
With this given code below, I would like to remove any 'li' element whose child `ol` element does contain any `li` element, yet with no avail. ```js $(document).ready(function() { $('#myUL li').each(function() { var lenLi = $(this).find('ol').children('li').length; if (lenLi == 0) { $(this).remove(...
2019/06/29
[ "https://Stackoverflow.com/questions/56814603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1349726/" ]
Your selector `#myUL li` is also selecting the `li`s in Hello 3 because they are `li` descendants of `#myUL` and since they have no `ol` with `li` in them they get removed. You can use the child selector `>` to only select the children of `#myUL`. ```js $(document).ready(function() { $('#myUL > li').each(function(...
``` if ($('#el').is(':empty')){ // custom code } ``` More info [here](https://api.jquery.com/is/)
56,814,603
With this given code below, I would like to remove any 'li' element whose child `ol` element does contain any `li` element, yet with no avail. ```js $(document).ready(function() { $('#myUL li').each(function() { var lenLi = $(this).find('ol').children('li').length; if (lenLi == 0) { $(this).remove(...
2019/06/29
[ "https://Stackoverflow.com/questions/56814603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1349726/" ]
Your selector `#myUL li` is also selecting the `li`s in Hello 3 because they are `li` descendants of `#myUL` and since they have no `ol` with `li` in them they get removed. You can use the child selector `>` to only select the children of `#myUL`. ```js $(document).ready(function() { $('#myUL > li').each(function(...
Your code is iterating through all `li` contained within`#myUL`. Use a first-level child selector `>`: ```js $(document).ready(function() { $('#myUL > li').each(function() { var lenLi = $(this).find('ol').children('li').length; if (lenLi == 0) { $(this).remove(); } }) }) ``` ```html <scri...
56,814,603
With this given code below, I would like to remove any 'li' element whose child `ol` element does contain any `li` element, yet with no avail. ```js $(document).ready(function() { $('#myUL li').each(function() { var lenLi = $(this).find('ol').children('li').length; if (lenLi == 0) { $(this).remove(...
2019/06/29
[ "https://Stackoverflow.com/questions/56814603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1349726/" ]
Your code is iterating through all `li` contained within`#myUL`. Use a first-level child selector `>`: ```js $(document).ready(function() { $('#myUL > li').each(function() { var lenLi = $(this).find('ol').children('li').length; if (lenLi == 0) { $(this).remove(); } }) }) ``` ```html <scri...
You can use query selector `#myUL li ol` for find ol and check li inside it. ``` $(document).ready(function() { $('#myUL li ol').each(function() { var lenLi = $(this).find('li').length; console.log(lenLi); if (lenLi == 0) { $(this).remove(); } }) }) ``` ```js $(document).ready(function() { ...
56,814,603
With this given code below, I would like to remove any 'li' element whose child `ol` element does contain any `li` element, yet with no avail. ```js $(document).ready(function() { $('#myUL li').each(function() { var lenLi = $(this).find('ol').children('li').length; if (lenLi == 0) { $(this).remove(...
2019/06/29
[ "https://Stackoverflow.com/questions/56814603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1349726/" ]
Your selector `#myUL li` is also selecting the `li`s in Hello 3 because they are `li` descendants of `#myUL` and since they have no `ol` with `li` in them they get removed. You can use the child selector `>` to only select the children of `#myUL`. ```js $(document).ready(function() { $('#myUL > li').each(function(...
You can use query selector `#myUL li ol` for find ol and check li inside it. ``` $(document).ready(function() { $('#myUL li ol').each(function() { var lenLi = $(this).find('li').length; console.log(lenLi); if (lenLi == 0) { $(this).remove(); } }) }) ``` ```js $(document).ready(function() { ...
190,003
I have an Amazon EC2 deployment of mongodb (3.4). Things are going well, but the DB size is growing quickly. I am about to shard a large collection in order to begin horizontal scaling (total space needed is 2TB). So either (ignoring config servers, etc): **1. Each shard is a replica set with 3 data nodes** total co...
2017/11/03
[ "https://dba.stackexchange.com/questions/190003", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/136272/" ]
Option 2 has no problems in theory; however the more limited redundancy *may* be a problem. 1. About the arbiters: Yes, you can run multiple arbiters on a single lightweight machine. An arbiter is a very lightweight process, doing little but voting, so you can [run multiple arbiters on a single box](https://stackover...
With option 1, why you want to have four nodes in replica set? Three is enough. With four nodes, you should have arbiter as fifth, because vote count must be odd. With those three nodes, every node should be in the different data center, so you have DR and HA. Minimum to have DR and HA, two data nodes and one arbiter,...
94,713
I am looking to sharpen a knife, and i seem to be out of oil... Is there a quick hack or home substitute i could use for this? I have 3-in-1 oil (white bottle) but aside from that (in terms of tool oil) all i have is the standard home/cooking stuff, Vegetable, Mineral, Olive, etc.
2016/07/20
[ "https://diy.stackexchange.com/questions/94713", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/46948/" ]
I regularly use 3-in-1 on my oilstones, to no ill effect. A commercial honing oil is thinner, but as long as it can float the metal particles, you're good. You can clean some out with a spray of WD-40, if it's starting to fill up. (The knife aficionados are going to hate this answer. It's got 3-in-1 and WD-40 in the s...
Most commercial honing oils are heavy "naphthenic" oils and "light" mineral oil. Which basically means a thinned (mixture of) oil(s). The weight of mineral oil is a matter of carbon chain length. The longer the chain, the heavier and thicker (more viscous) the oil is. Now, mineral oil comes from petroleum. Honing oil ...
159,975
Barad-dûr was a stupendously tall tower in Mordor and home to the Dark Lord Sauron. Apart from the big man himself, who actually lived there, though? It's hard to imagine such a huge building lying largely empty. Were there orcs who were assigned to stay there? I'd include people who worked in Barad-dûr or those who s...
2017/05/21
[ "https://scifi.stackexchange.com/questions/159975", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/64888/" ]
**Orcs** From *The Two Towers*, Book III, Chapter 9, "Flotsam and Jetsam": > > 'All this about the Orcs of Barad-dûr, Lugbúrz as they call it, makes me uneasy,' said Aragorn. > > > The books are full of other references, particularly to the name Lugbúrz, and it's clear that in addition to Orcs the high command o...
As a small addition to Victim of Circumstance's answer, from [thelandofshadow.com](http://www.thelandofshadow.com/barad-dur-history/): > > The tower was full of treasure, weapons, armor, materials, great stores, **barracks for the footsoldiers** of the tower (on the lower levels), and rooms for **high-ranking captain...
34,176,980
Will the `UIApplicationDelegate` call `performFetchWithCompletionHandler` if device is not connected to the internet ? The documentation isn't clear in this case.
2015/12/09
[ "https://Stackoverflow.com/questions/34176980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1804311/" ]
After some tests I can claim that `performFetchWithCompletionHandler` delegate method is not called if device is not connected to the internet. Tested on iOS8 and iOS9.
`-application:performFetchWithCompletionHandler:` isn't called when a download has completed. It's called by the system to give your app a chance to download data. You do normal error handling as you see fit. ``` -(void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFe...
28,271
Suppose we have a smooth dynamical system on $R^n$ (defined by a system of ODEs). Assuming that the system has a finite set of fixed points, I am interested in knowing (or obtaining references about) what is the behaviour of its fixed point structure under perturbations of the ODEs. More specifically, i would like to k...
2010/06/15
[ "https://mathoverflow.net/questions/28271", "https://mathoverflow.net", "https://mathoverflow.net/users/6091/" ]
A good reference for this sort of thing is Guckenheimer and Holmes, *Nonlinear Oscillations, Dynamical Systems, and Bifurcations of Vector Fields*, Springer-Verlag, 1983, if you're not already familiar with it (and even if you are, for that matter). Chapter 3 in particular is relevant to your question.
System of ODEs is a vector field. If there's finite number of fixed points and periodic orbits and the system is Morse-Smale then it is structurally stabel under $C^1$ small perturbations. In particular, all fixed points survive. More details are here <http://www.scholarpedia.org/article/Morse-Smale_systems> The mani...
28,271
Suppose we have a smooth dynamical system on $R^n$ (defined by a system of ODEs). Assuming that the system has a finite set of fixed points, I am interested in knowing (or obtaining references about) what is the behaviour of its fixed point structure under perturbations of the ODEs. More specifically, i would like to k...
2010/06/15
[ "https://mathoverflow.net/questions/28271", "https://mathoverflow.net", "https://mathoverflow.net/users/6091/" ]
System of ODEs is a vector field. If there's finite number of fixed points and periodic orbits and the system is Morse-Smale then it is structurally stabel under $C^1$ small perturbations. In particular, all fixed points survive. More details are here <http://www.scholarpedia.org/article/Morse-Smale_systems> The mani...
If you are just interested in the number of the fixed points of the flow, you can just put your question in terms of zeros of the vector field; in this case the right tool is the topological degree, which is stable under small perturbations of the field in the uniform norm; and in absolute value is (generically) a lowe...
28,271
Suppose we have a smooth dynamical system on $R^n$ (defined by a system of ODEs). Assuming that the system has a finite set of fixed points, I am interested in knowing (or obtaining references about) what is the behaviour of its fixed point structure under perturbations of the ODEs. More specifically, i would like to k...
2010/06/15
[ "https://mathoverflow.net/questions/28271", "https://mathoverflow.net", "https://mathoverflow.net/users/6091/" ]
System of ODEs is a vector field. If there's finite number of fixed points and periodic orbits and the system is Morse-Smale then it is structurally stabel under $C^1$ small perturbations. In particular, all fixed points survive. More details are here <http://www.scholarpedia.org/article/Morse-Smale_systems> The mani...
In order to develop your intuition, you might want to start with a flow having no fixed points -- so a constant nonzero vector field, say in the plane. Perturb it by a nice vector field, eg. polynomial (or polynomial times a positive function decaying to zero at infinity) until you get zeros for your vector field. Now...
28,271
Suppose we have a smooth dynamical system on $R^n$ (defined by a system of ODEs). Assuming that the system has a finite set of fixed points, I am interested in knowing (or obtaining references about) what is the behaviour of its fixed point structure under perturbations of the ODEs. More specifically, i would like to k...
2010/06/15
[ "https://mathoverflow.net/questions/28271", "https://mathoverflow.net", "https://mathoverflow.net/users/6091/" ]
A good reference for this sort of thing is Guckenheimer and Holmes, *Nonlinear Oscillations, Dynamical Systems, and Bifurcations of Vector Fields*, Springer-Verlag, 1983, if you're not already familiar with it (and even if you are, for that matter). Chapter 3 in particular is relevant to your question.
A little bit more general than the previous answer: Given a singularity of a vector field such that the derivative is invertible, the singularity persists under perturbations. This is because the zero of the vector field in this case is transversal (so, it persist by C1 perturbations). Otherwise, depending on the loc...
28,271
Suppose we have a smooth dynamical system on $R^n$ (defined by a system of ODEs). Assuming that the system has a finite set of fixed points, I am interested in knowing (or obtaining references about) what is the behaviour of its fixed point structure under perturbations of the ODEs. More specifically, i would like to k...
2010/06/15
[ "https://mathoverflow.net/questions/28271", "https://mathoverflow.net", "https://mathoverflow.net/users/6091/" ]
A little bit more general than the previous answer: Given a singularity of a vector field such that the derivative is invertible, the singularity persists under perturbations. This is because the zero of the vector field in this case is transversal (so, it persist by C1 perturbations). Otherwise, depending on the loc...
If you are just interested in the number of the fixed points of the flow, you can just put your question in terms of zeros of the vector field; in this case the right tool is the topological degree, which is stable under small perturbations of the field in the uniform norm; and in absolute value is (generically) a lowe...
28,271
Suppose we have a smooth dynamical system on $R^n$ (defined by a system of ODEs). Assuming that the system has a finite set of fixed points, I am interested in knowing (or obtaining references about) what is the behaviour of its fixed point structure under perturbations of the ODEs. More specifically, i would like to k...
2010/06/15
[ "https://mathoverflow.net/questions/28271", "https://mathoverflow.net", "https://mathoverflow.net/users/6091/" ]
A little bit more general than the previous answer: Given a singularity of a vector field such that the derivative is invertible, the singularity persists under perturbations. This is because the zero of the vector field in this case is transversal (so, it persist by C1 perturbations). Otherwise, depending on the loc...
In order to develop your intuition, you might want to start with a flow having no fixed points -- so a constant nonzero vector field, say in the plane. Perturb it by a nice vector field, eg. polynomial (or polynomial times a positive function decaying to zero at infinity) until you get zeros for your vector field. Now...
28,271
Suppose we have a smooth dynamical system on $R^n$ (defined by a system of ODEs). Assuming that the system has a finite set of fixed points, I am interested in knowing (or obtaining references about) what is the behaviour of its fixed point structure under perturbations of the ODEs. More specifically, i would like to k...
2010/06/15
[ "https://mathoverflow.net/questions/28271", "https://mathoverflow.net", "https://mathoverflow.net/users/6091/" ]
A good reference for this sort of thing is Guckenheimer and Holmes, *Nonlinear Oscillations, Dynamical Systems, and Bifurcations of Vector Fields*, Springer-Verlag, 1983, if you're not already familiar with it (and even if you are, for that matter). Chapter 3 in particular is relevant to your question.
If you are just interested in the number of the fixed points of the flow, you can just put your question in terms of zeros of the vector field; in this case the right tool is the topological degree, which is stable under small perturbations of the field in the uniform norm; and in absolute value is (generically) a lowe...
28,271
Suppose we have a smooth dynamical system on $R^n$ (defined by a system of ODEs). Assuming that the system has a finite set of fixed points, I am interested in knowing (or obtaining references about) what is the behaviour of its fixed point structure under perturbations of the ODEs. More specifically, i would like to k...
2010/06/15
[ "https://mathoverflow.net/questions/28271", "https://mathoverflow.net", "https://mathoverflow.net/users/6091/" ]
A good reference for this sort of thing is Guckenheimer and Holmes, *Nonlinear Oscillations, Dynamical Systems, and Bifurcations of Vector Fields*, Springer-Verlag, 1983, if you're not already familiar with it (and even if you are, for that matter). Chapter 3 in particular is relevant to your question.
In order to develop your intuition, you might want to start with a flow having no fixed points -- so a constant nonzero vector field, say in the plane. Perturb it by a nice vector field, eg. polynomial (or polynomial times a positive function decaying to zero at infinity) until you get zeros for your vector field. Now...
28,271
Suppose we have a smooth dynamical system on $R^n$ (defined by a system of ODEs). Assuming that the system has a finite set of fixed points, I am interested in knowing (or obtaining references about) what is the behaviour of its fixed point structure under perturbations of the ODEs. More specifically, i would like to k...
2010/06/15
[ "https://mathoverflow.net/questions/28271", "https://mathoverflow.net", "https://mathoverflow.net/users/6091/" ]
If you are just interested in the number of the fixed points of the flow, you can just put your question in terms of zeros of the vector field; in this case the right tool is the topological degree, which is stable under small perturbations of the field in the uniform norm; and in absolute value is (generically) a lowe...
In order to develop your intuition, you might want to start with a flow having no fixed points -- so a constant nonzero vector field, say in the plane. Perturb it by a nice vector field, eg. polynomial (or polynomial times a positive function decaying to zero at infinity) until you get zeros for your vector field. Now...
7,165,208
Facebook allows you to create test user accounts that can only be used for testing purpose. Does Twitter provide similar functionality ? I don't want to get my application blacklisted for creating fake user accounts; do I have to use my real user account for testing my application ? What strategies are your using for...
2011/08/23
[ "https://Stackoverflow.com/questions/7165208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/193116/" ]
As far as I know, there is nothing in Twitter's rules against creating account (unlike Facebook, where with the exception of test accounts, you're not allowed to create multiple accounts for testing purposes). So, you can just register the account like you normally would. You might want to take a look at [this post](h...
Twitter has one of the easiest registration processes I have seen. You can quite easily create several test accounts; this is the only method I have used. Here is a [blog post](http://www.ragorder.com/twitter-test-account-testing-the-twitter-api-with-a-temporary-account/) about it.
7,165,208
Facebook allows you to create test user accounts that can only be used for testing purpose. Does Twitter provide similar functionality ? I don't want to get my application blacklisted for creating fake user accounts; do I have to use my real user account for testing my application ? What strategies are your using for...
2011/08/23
[ "https://Stackoverflow.com/questions/7165208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/193116/" ]
*I'm currently creating a Twitter application and here are some of the strategies I'm using.* * I create my accounts in combination with Gmail addresses. If I create a gmail account as user `bob@gmail.com` , I secure the Twitter name `@bob` on Twitter. That way it's kind of hard to forget where to email a lost passwor...
Twitter has one of the easiest registration processes I have seen. You can quite easily create several test accounts; this is the only method I have used. Here is a [blog post](http://www.ragorder.com/twitter-test-account-testing-the-twitter-api-with-a-temporary-account/) about it.
7,165,208
Facebook allows you to create test user accounts that can only be used for testing purpose. Does Twitter provide similar functionality ? I don't want to get my application blacklisted for creating fake user accounts; do I have to use my real user account for testing my application ? What strategies are your using for...
2011/08/23
[ "https://Stackoverflow.com/questions/7165208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/193116/" ]
As far as I know, there is nothing in Twitter's rules against creating account (unlike Facebook, where with the exception of test accounts, you're not allowed to create multiple accounts for testing purposes). So, you can just register the account like you normally would. You might want to take a look at [this post](h...
*I'm currently creating a Twitter application and here are some of the strategies I'm using.* * I create my accounts in combination with Gmail addresses. If I create a gmail account as user `bob@gmail.com` , I secure the Twitter name `@bob` on Twitter. That way it's kind of hard to forget where to email a lost passwor...
287,229
I dual booted ubuntu 12.04 LTS with Windows 8, but I wanted to get rid of ubuntu. So I got EasyBCD (on windows 8) and removed Ubuntu following a tutorial on youtube, then I got rid of the Ubuntu partitions. After restarting my Sony Vaio, it went to grub rescue and I'm not sure what to do. Help please! Much appreciated!...
2013/04/28
[ "https://askubuntu.com/questions/287229", "https://askubuntu.com", "https://askubuntu.com/users/153228/" ]
You need to use a windows installation cd and restore the bootloader on the MBR through the recovery environment or using the startup repair option under advanced settings. Here is a guide <http://www.redmondpie.com/how-to-fix-windows-8-mbr-master-boot-record/> Related support article: (unfortunately I could only fin...
Install again Ubuntu "alongside" of Windows 8, now entering Windows 8. Install this software on Windows (is free): <http://download.cnet.com/MiniTool-Partition-Wizard-Home-Edition/3000-2094_4-10962200.html?part=dl-6285158&subj=dl&tag=button> Run the software, right click in your disk and after in "Rebuild MBR", after...
287,229
I dual booted ubuntu 12.04 LTS with Windows 8, but I wanted to get rid of ubuntu. So I got EasyBCD (on windows 8) and removed Ubuntu following a tutorial on youtube, then I got rid of the Ubuntu partitions. After restarting my Sony Vaio, it went to grub rescue and I'm not sure what to do. Help please! Much appreciated!...
2013/04/28
[ "https://askubuntu.com/questions/287229", "https://askubuntu.com", "https://askubuntu.com/users/153228/" ]
You need to use a windows installation cd and restore the bootloader on the MBR through the recovery environment or using the startup repair option under advanced settings. Here is a guide <http://www.redmondpie.com/how-to-fix-windows-8-mbr-master-boot-record/> Related support article: (unfortunately I could only fin...
Here is what you need to do: 1. Burn an Ubuntu ISO image onto a USB drive or a DVD to make a live USB/DVD. 2. Boot into live mode ("Try Ubuntu" option). 3. After it boots up, press `Ctrl`+`Alt`+`T` to bring up the Terminal. 4. Put these codes ONE AFTER ANOTHER. ``` sudo add-apt-repository ppa:yannubuntu/boot-repair s...
287,229
I dual booted ubuntu 12.04 LTS with Windows 8, but I wanted to get rid of ubuntu. So I got EasyBCD (on windows 8) and removed Ubuntu following a tutorial on youtube, then I got rid of the Ubuntu partitions. After restarting my Sony Vaio, it went to grub rescue and I'm not sure what to do. Help please! Much appreciated!...
2013/04/28
[ "https://askubuntu.com/questions/287229", "https://askubuntu.com", "https://askubuntu.com/users/153228/" ]
Here is what you need to do: 1. Burn an Ubuntu ISO image onto a USB drive or a DVD to make a live USB/DVD. 2. Boot into live mode ("Try Ubuntu" option). 3. After it boots up, press `Ctrl`+`Alt`+`T` to bring up the Terminal. 4. Put these codes ONE AFTER ANOTHER. ``` sudo add-apt-repository ppa:yannubuntu/boot-repair s...
Install again Ubuntu "alongside" of Windows 8, now entering Windows 8. Install this software on Windows (is free): <http://download.cnet.com/MiniTool-Partition-Wizard-Home-Edition/3000-2094_4-10962200.html?part=dl-6285158&subj=dl&tag=button> Run the software, right click in your disk and after in "Rebuild MBR", after...
4,953,309
I have a table in which I need to store some serialized json strings (mysql 5). I'm not sure what data type to use for the column which will do the storing. The strings will always be less than 100k. There are a few different text types to choose from when looking at the docs, is there one that is most appropriate fo...
2011/02/10
[ "https://Stackoverflow.com/questions/4953309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/291701/" ]
The second `->` isn't needed, actually. Here's the deal: All Perl array values and hash values must be scalars. That means either a string, number, or array/hash reference (and not a plain old array or hash). So the first `->` operator dereferences the array and gets at the x'th row. In there is-- not an array, but a...
When you ``` push @array, [@row]; ``` you are pushing a *reference* to an array. This is necessary because of Perl's rule that arrays are flattened. So $array->[x] is a reference to the row array, not the row array itself. However, between subscripts, the arrow is optional. So `$array->[x]->[y]` is exactly the same ...
41,176,115
Imagine you need to count number of `iterable` elements that satisfy some `criteria` - is there is a more good looking way to do this? It's python3 of course. But 2 is fine too. I can't find anything suitable in `collections` or `itertools` python modules or in built-ins.
2016/12/16
[ "https://Stackoverflow.com/questions/41176115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1531116/" ]
Try the `quantify` recipe from `itertools` [recipes](https://docs.python.org/3/library/itertools.html#itertools-recipes): ``` def quantify(iterable, pred=bool): "Count how many times the predicate is true" return sum(map(pred, iterable)) ``` [`more_itertools`](https://github.com/erikrose/more-itertools) alre...
> > List comprehensions provide a concise way to create lists. Common > applications are to make new lists where each element is the result of > some operations applied to each member of another sequence or > iterable, or to create a subsequence of those elements that satisfy a > certain condition. > > > ``` >...
41,176,115
Imagine you need to count number of `iterable` elements that satisfy some `criteria` - is there is a more good looking way to do this? It's python3 of course. But 2 is fine too. I can't find anything suitable in `collections` or `itertools` python modules or in built-ins.
2016/12/16
[ "https://Stackoverflow.com/questions/41176115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1531116/" ]
``` sum(1 for i in A if condition(i)) ```
> > List comprehensions provide a concise way to create lists. Common > applications are to make new lists where each element is the result of > some operations applied to each member of another sequence or > iterable, or to create a subsequence of those elements that satisfy a > certain condition. > > > ``` >...