qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
61,593
I recently cut down and chipped a row of lilly pills and now have 4 cubic meters of wood chip. Intention is to let it decompose over a couple of years and use it to compost my garden. I originally mixed in some chicken manure to give it a head start but really not enough, and the process is slow. Is there anything I ca...
2021/12/18
[ "https://gardening.stackexchange.com/questions/61593", "https://gardening.stackexchange.com", "https://gardening.stackexchange.com/users/38440/" ]
Mix it with any nitrogen source. Bird manure is awesome but grass or kitchen scraps will also work. E.g. see the tables [here - at the bottom](https://www.compostmagazine.com/compost-carbon-nitrogen-ratio/) or [here](https://www.planetnatural.com/composting-101/making/c-n-ratio/). Not only will the chips decompose fast...
A little fertilizer will aid decomposition. In particular phosphorus. I use a water soluble starter; 9-45-15. I drill holes in large stumps and pour in some diluted fertilizer. I do it to all large stumps so I can't give an objective answer to how much it aids decomposition. For a pile of chips, standard composting tec...
61,593
I recently cut down and chipped a row of lilly pills and now have 4 cubic meters of wood chip. Intention is to let it decompose over a couple of years and use it to compost my garden. I originally mixed in some chicken manure to give it a head start but really not enough, and the process is slow. Is there anything I ca...
2021/12/18
[ "https://gardening.stackexchange.com/questions/61593", "https://gardening.stackexchange.com", "https://gardening.stackexchange.com/users/38440/" ]
Mix it with any nitrogen source. Bird manure is awesome but grass or kitchen scraps will also work. E.g. see the tables [here - at the bottom](https://www.compostmagazine.com/compost-carbon-nitrogen-ratio/) or [here](https://www.planetnatural.com/composting-101/making/c-n-ratio/). Not only will the chips decompose fast...
Whatever you do, don't mix it with your soil, or it'll leech the nitrogen out of the soil and cause issues. Put it on top of the soil; it'll decompose just fine on the top, without harming your soil. Wood chip mulch is a valuable thing to have *on top* of your soil; plants love it. I wouldn't be worried about speeding...
2,999,016
in C++, using printf I want to print a sequence of number, so I get, from a "for" loop; ``` 1 2 ... 9 10 11 ``` and I create files from those numbers. But when I list them using "ls" I get ``` 10 11 1 2 .. ``` so instead of trying to solve the problem using bash, I wonder how could I print; ``` 0001 0002 ... 000...
2010/06/08
[ "https://Stackoverflow.com/questions/2999016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171546/" ]
Simple case: ``` for(int i = 0; i != 13; ++i) printf("%*d", 2, i) ``` Why "%\*d" ? Because you don't want to hardcode the number of leading digits; it depends on the largest number in the list. With IOStreams, you have the same flexibility with `setw(int)`
[This article explain what you're trying to do](http://www.deitel.com/articles/cplusplus_tutorials/20060218/cplusplus_streamformatstates_streammanipulators_Page4.html) It is called "padding with leading zeroes"
2,999,016
in C++, using printf I want to print a sequence of number, so I get, from a "for" loop; ``` 1 2 ... 9 10 11 ``` and I create files from those numbers. But when I list them using "ls" I get ``` 10 11 1 2 .. ``` so instead of trying to solve the problem using bash, I wonder how could I print; ``` 0001 0002 ... 000...
2010/06/08
[ "https://Stackoverflow.com/questions/2999016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171546/" ]
``` i = 45; printf("%04i", i); ``` => ``` 0045 ``` Basically, 0 tells printf to fill with '0', 4 is the digit count and 'i' is the placeholder for the integer (you can also use 'd'). See [Wikipedia](http://en.wikipedia.org/wiki/Printf#vprintf.2C_vfprintf.2C_vsprintf.2C_vsnprintf.2C_and_vasprintf) about the format...
``` printf("%4.4d\n", num); ```
2,999,016
in C++, using printf I want to print a sequence of number, so I get, from a "for" loop; ``` 1 2 ... 9 10 11 ``` and I create files from those numbers. But when I list them using "ls" I get ``` 10 11 1 2 .. ``` so instead of trying to solve the problem using bash, I wonder how could I print; ``` 0001 0002 ... 000...
2010/06/08
[ "https://Stackoverflow.com/questions/2999016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171546/" ]
``` i = 45; printf("%04i", i); ``` => ``` 0045 ``` Basically, 0 tells printf to fill with '0', 4 is the digit count and 'i' is the placeholder for the integer (you can also use 'd'). See [Wikipedia](http://en.wikipedia.org/wiki/Printf#vprintf.2C_vfprintf.2C_vsprintf.2C_vsnprintf.2C_and_vasprintf) about the format...
If you are using C++, then why are you using `printf()`? Use `cout` to do your job. ``` #include <iostream> #include <iomanip> using namespace std; int main(int argc, char *argv[]) { for(int i=0; i < 15; i++) { cout << setfill('0') << setw(4) << i << endl; } return 0; } ``` And this...
2,999,016
in C++, using printf I want to print a sequence of number, so I get, from a "for" loop; ``` 1 2 ... 9 10 11 ``` and I create files from those numbers. But when I list them using "ls" I get ``` 10 11 1 2 .. ``` so instead of trying to solve the problem using bash, I wonder how could I print; ``` 0001 0002 ... 000...
2010/06/08
[ "https://Stackoverflow.com/questions/2999016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171546/" ]
If you are using C++, then why are you using `printf()`? Use `cout` to do your job. ``` #include <iostream> #include <iomanip> using namespace std; int main(int argc, char *argv[]) { for(int i=0; i < 15; i++) { cout << setfill('0') << setw(4) << i << endl; } return 0; } ``` And this...
Simple case: ``` for(int i = 0; i != 13; ++i) printf("%*d", 2, i) ``` Why "%\*d" ? Because you don't want to hardcode the number of leading digits; it depends on the largest number in the list. With IOStreams, you have the same flexibility with `setw(int)`
2,999,016
in C++, using printf I want to print a sequence of number, so I get, from a "for" loop; ``` 1 2 ... 9 10 11 ``` and I create files from those numbers. But when I list them using "ls" I get ``` 10 11 1 2 .. ``` so instead of trying to solve the problem using bash, I wonder how could I print; ``` 0001 0002 ... 000...
2010/06/08
[ "https://Stackoverflow.com/questions/2999016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171546/" ]
``` printf("%04d", n); ```
You use %04d as your format string for the integer.
2,999,016
in C++, using printf I want to print a sequence of number, so I get, from a "for" loop; ``` 1 2 ... 9 10 11 ``` and I create files from those numbers. But when I list them using "ls" I get ``` 10 11 1 2 .. ``` so instead of trying to solve the problem using bash, I wonder how could I print; ``` 0001 0002 ... 000...
2010/06/08
[ "https://Stackoverflow.com/questions/2999016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171546/" ]
``` printf("%4.4d\n", num); ```
[This article explain what you're trying to do](http://www.deitel.com/articles/cplusplus_tutorials/20060218/cplusplus_streamformatstates_streammanipulators_Page4.html) It is called "padding with leading zeroes"
2,999,016
in C++, using printf I want to print a sequence of number, so I get, from a "for" loop; ``` 1 2 ... 9 10 11 ``` and I create files from those numbers. But when I list them using "ls" I get ``` 10 11 1 2 .. ``` so instead of trying to solve the problem using bash, I wonder how could I print; ``` 0001 0002 ... 000...
2010/06/08
[ "https://Stackoverflow.com/questions/2999016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171546/" ]
If you are using C++, then why are you using `printf()`? Use `cout` to do your job. ``` #include <iostream> #include <iomanip> using namespace std; int main(int argc, char *argv[]) { for(int i=0; i < 15; i++) { cout << setfill('0') << setw(4) << i << endl; } return 0; } ``` And this...
``` printf("%4.4d\n", num); ```
2,999,016
in C++, using printf I want to print a sequence of number, so I get, from a "for" loop; ``` 1 2 ... 9 10 11 ``` and I create files from those numbers. But when I list them using "ls" I get ``` 10 11 1 2 .. ``` so instead of trying to solve the problem using bash, I wonder how could I print; ``` 0001 0002 ... 000...
2010/06/08
[ "https://Stackoverflow.com/questions/2999016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171546/" ]
``` printf("%4.4d\n", num); ```
You use %04d as your format string for the integer.
2,999,016
in C++, using printf I want to print a sequence of number, so I get, from a "for" loop; ``` 1 2 ... 9 10 11 ``` and I create files from those numbers. But when I list them using "ls" I get ``` 10 11 1 2 .. ``` so instead of trying to solve the problem using bash, I wonder how could I print; ``` 0001 0002 ... 000...
2010/06/08
[ "https://Stackoverflow.com/questions/2999016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171546/" ]
``` i = 45; printf("%04i", i); ``` => ``` 0045 ``` Basically, 0 tells printf to fill with '0', 4 is the digit count and 'i' is the placeholder for the integer (you can also use 'd'). See [Wikipedia](http://en.wikipedia.org/wiki/Printf#vprintf.2C_vfprintf.2C_vsprintf.2C_vsnprintf.2C_and_vasprintf) about the format...
`printf("%04d\n", Num);` should work. Take a look at [the printf man page](http://www.manpagez.com/man/3/printf/).
2,999,016
in C++, using printf I want to print a sequence of number, so I get, from a "for" loop; ``` 1 2 ... 9 10 11 ``` and I create files from those numbers. But when I list them using "ls" I get ``` 10 11 1 2 .. ``` so instead of trying to solve the problem using bash, I wonder how could I print; ``` 0001 0002 ... 000...
2010/06/08
[ "https://Stackoverflow.com/questions/2999016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/171546/" ]
`printf("%04d\n", Num);` should work. Take a look at [the printf man page](http://www.manpagez.com/man/3/printf/).
You use %04d as your format string for the integer.
25,679,615
I have a little python (2.7) script reading in information from an excel file on a network drive. Works fine, but it was a little annoying during development, that after each script run the excel file was closed. This would be the intended behaviour, if the excel file was already closed when starting the script, but I ...
2014/09/05
[ "https://Stackoverflow.com/questions/25679615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3218018/" ]
You have a fundamental mistake in your code. First you set an AppSetting: ``` <configuration> <appSettings> <add key="StorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=account- name;AccountKey=account-key" /> </appSettings> </configuration> ``` Then you try t...
This is more bad documentation from Azure, the article does indeed tell you to create an AppSetting and then the code tells you to retrieve a ConnectionString. The alternative fix is to store the details as a ConnectionString and leave the code as is: ``` <add name="StorageConnectionString" connectionString="DefaultE...
15,721,438
I'm trying to put two tables side by side: ``` <table class="inline"> </table> <table class="inline"> </table> ``` But none of the values I assign to inline's display property from inline-table to inline to inline-block work so I'm stumped and would appreciate any advice. I only found one other relevant question: [H...
2013/03/30
[ "https://Stackoverflow.com/questions/15721438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2022646/" ]
By default, tables are block level elements and you need to change the display property to get two or more tables per line, for example: ``` <table class="inline"> <tr><td>First table row 1</td></tr> <tr><td>First table row 2</td></tr> </table> <table class="inline"> <tr><td>Second table row 1</td></tr> ...
It should not be: ``` <table class="inline"> </table> <table class="inline"> </table> ``` It should be: ``` <table style="display:inline"> </table> <table style="display:inline"> </table> ```
42,094,383
I have two questions concerning the [VpnService.Builder](https://developer.android.com/reference/android/net/VpnService.Builder.html) class. Suppose I know an App communicate with its server `www.somedomain.com`, I know the server's IP address is `210.32.204.165`. 1. About the [addAddress(String address, int prefixLe...
2017/02/07
[ "https://Stackoverflow.com/questions/42094383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/959734/" ]
1. It mean the traffic goes to that address (server IP address of an App) will go through VPN 2. [link](https://developer.android.com/reference/android/net/VpnService.Builder.html#addAllowedApplication(java.lang.String)): if this method is never called then all applications are allowed by default. If some applications ...
I haven't test the feature but, [NetGuard](https://play.google.com/store/apps/details?id=eu.faircode.netguard&hl=en) application has port forwarding feature. This application act as firewall for route the other application traffic through VPN. Its a open source project. you can find it on github.
4,369,481
I'm using Devise and have models set up like this: ``` User has_one :profile Profile belongs_to :user has_one :address Address belongs_to :profile ``` For testing, I caused errors on the form (it's a nested form, using all 3 models). This is the resulting errors hash (`@user.errors hash`): ``` { :e...
2010/12/06
[ "https://Stackoverflow.com/questions/4369481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/382818/" ]
You do not have a base condition in the fact function. You need to check: ``` if(i == 1){ return 1; }else{ return i * fact(i - 1); } ```
You misprinted in if statement, it should be ``` if(x > 1) { tot=x*fact(x-1); } ``` EDIT: Also `tot` must be non-static.
4,369,481
I'm using Devise and have models set up like this: ``` User has_one :profile Profile belongs_to :user has_one :address Address belongs_to :profile ``` For testing, I caused errors on the form (it's a nested form, using all 3 models). This is the resulting errors hash (`@user.errors hash`): ``` { :e...
2010/12/06
[ "https://Stackoverflow.com/questions/4369481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/382818/" ]
``` if(x<1) ``` Are you sure you didn't mean `x > 1`? Also, I would get rid of `static` in your declaration of `tot`. This treats `tot` similarly to a global variable. You don't need that. Since `tot` is always assigned before read it looks like it's not harmful here, but generally speaking it seems like a red flag.
You misprinted in if statement, it should be ``` if(x > 1) { tot=x*fact(x-1); } ``` EDIT: Also `tot` must be non-static.
4,369,481
I'm using Devise and have models set up like this: ``` User has_one :profile Profile belongs_to :user has_one :address Address belongs_to :profile ``` For testing, I caused errors on the form (it's a nested form, using all 3 models). This is the resulting errors hash (`@user.errors hash`): ``` { :e...
2010/12/06
[ "https://Stackoverflow.com/questions/4369481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/382818/" ]
You do not have a base condition in the fact function. You need to check: ``` if(i == 1){ return 1; }else{ return i * fact(i - 1); } ```
You don't want the `static` in your `tot` declaration.
4,369,481
I'm using Devise and have models set up like this: ``` User has_one :profile Profile belongs_to :user has_one :address Address belongs_to :profile ``` For testing, I caused errors on the form (it's a nested form, using all 3 models). This is the resulting errors hash (`@user.errors hash`): ``` { :e...
2010/12/06
[ "https://Stackoverflow.com/questions/4369481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/382818/" ]
You do not have a base condition in the fact function. You need to check: ``` if(i == 1){ return 1; }else{ return i * fact(i - 1); } ```
``` if(x<1) ``` Are you sure you didn't mean `x > 1`? Also, I would get rid of `static` in your declaration of `tot`. This treats `tot` similarly to a global variable. You don't need that. Since `tot` is always assigned before read it looks like it's not harmful here, but generally speaking it seems like a red flag.
4,369,481
I'm using Devise and have models set up like this: ``` User has_one :profile Profile belongs_to :user has_one :address Address belongs_to :profile ``` For testing, I caused errors on the form (it's a nested form, using all 3 models). This is the resulting errors hash (`@user.errors hash`): ``` { :e...
2010/12/06
[ "https://Stackoverflow.com/questions/4369481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/382818/" ]
``` if(x<1) ``` Are you sure you didn't mean `x > 1`? Also, I would get rid of `static` in your declaration of `tot`. This treats `tot` similarly to a global variable. You don't need that. Since `tot` is always assigned before read it looks like it's not harmful here, but generally speaking it seems like a red flag.
You don't want the `static` in your `tot` declaration.
24,210,911
I've searched and tried multiple fixes (most of which I found on stack overflow, and some from other sites like CSS Tricks and matthewjamestaylor.com), but nothing has worked for me. (Fixed position works, but is not an option.) I need the footer to stay at the bottom, but right now it's in the middle. At this stage I...
2014/06/13
[ "https://Stackoverflow.com/questions/24210911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3414066/" ]
Using a lot of absolute positions for layouting is generally a bad idea. You lose the chance of letting the browser do the heavy lifting concerning element heights in relation to their content. To get your #footer to stay at the bottom, there are a few things we need to do: * `body` shouldn't have `height: 100%;`. Ot...
Position:fixed is the right solution for this (I am assuming you mean for an always-visible footer). Is there any reason why you can't use that? If you really can't, then I'm pretty sure javascript would be required.
24,210,911
I've searched and tried multiple fixes (most of which I found on stack overflow, and some from other sites like CSS Tricks and matthewjamestaylor.com), but nothing has worked for me. (Fixed position works, but is not an option.) I need the footer to stay at the bottom, but right now it's in the middle. At this stage I...
2014/06/13
[ "https://Stackoverflow.com/questions/24210911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3414066/" ]
Using a lot of absolute positions for layouting is generally a bad idea. You lose the chance of letting the browser do the heavy lifting concerning element heights in relation to their content. To get your #footer to stay at the bottom, there are a few things we need to do: * `body` shouldn't have `height: 100%;`. Ot...
There has been one hell of a site I always use for sticking the footer to the bottom. It gives you all the duct-tape you need too! <http://cssstickyfooter.com/> Their site has the relevant information about this. I'm not attaching the code, as this question has been asked way too many times on SO, and I think there i...
61,962,117
got an issue with my app crashing, it's saying "You need to use a Theme.AppCompat theme (or descendant) with this activity." Heres the manifest: ``` android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:...
2020/05/22
[ "https://Stackoverflow.com/questions/61962117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11642410/" ]
Change ``` android:theme="@style/AppCompat" ``` to ``` android:theme="@style/AppTheme" ```
I will slightly expand the answer Francesc. Here the theme of the application is installed, you install do not understand what. ``` android:theme="@style/AppCompat" ``` The error indicates that your topic should be inherited from Theme.AppCompat but not called so. ``` <style name="AppTheme" parent="Theme.AppCompat...
38,091,578
I need one help. I am passing `this` key word inside the onclick function. if user need to call the same function without using the onclick event how it will be called using javascript.I am explaining the scenario below. ``` <input name="optional_0_0_ans" id="optional_0_0_ans" class="form-control firstsec" placeholder...
2016/06/29
[ "https://Stackoverflow.com/questions/38091578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
> > Here suppose user wants to call the `createNew` function some where else and wants to pass the same `this` key word then how it will be done. > > > That's not possible since `this` only exists *inside* the event handler. The "same `this`" doesn't exist outside of the handler. I guess what you mean is that t...
You can do it using below code: ``` $(".btn-success").on("click", function(){ someFunction(this, param1, param2,...) }) ``` Where ".btn-success" is a class assigned to button on which click you want to call a JavaScript function. You can also use id in selector.
38,091,578
I need one help. I am passing `this` key word inside the onclick function. if user need to call the same function without using the onclick event how it will be called using javascript.I am explaining the scenario below. ``` <input name="optional_0_0_ans" id="optional_0_0_ans" class="form-control firstsec" placeholder...
2016/06/29
[ "https://Stackoverflow.com/questions/38091578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
> > Here suppose user wants to call the `createNew` function some where else and wants to pass the same `this` key word then how it will be done. > > > That's not possible since `this` only exists *inside* the event handler. The "same `this`" doesn't exist outside of the handler. I guess what you mean is that t...
Yes you can ,add id to your element will be more easy to handle ... *I added id to your button element to illustrate* ``` <button type="button" class="btn btn-sm btn-success" id="btn" style="line-height:12px;" onclick="createNew(this,0,0,1);"><i class="fa fa-plus" aria-hidden="true"></i></button> <script> function...
38,091,578
I need one help. I am passing `this` key word inside the onclick function. if user need to call the same function without using the onclick event how it will be called using javascript.I am explaining the scenario below. ``` <input name="optional_0_0_ans" id="optional_0_0_ans" class="form-control firstsec" placeholder...
2016/06/29
[ "https://Stackoverflow.com/questions/38091578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Inside the onclick attribute `this` refers to the current DOM Element. So if you want to achieve the same behavior, you can simply get and parse the DOM Element yourself: ``` var button = document.querySelector('#optional_0_0_ans button'); createNew(button, 0, 0, 3); ```
You can do it using below code: ``` $(".btn-success").on("click", function(){ someFunction(this, param1, param2,...) }) ``` Where ".btn-success" is a class assigned to button on which click you want to call a JavaScript function. You can also use id in selector.
38,091,578
I need one help. I am passing `this` key word inside the onclick function. if user need to call the same function without using the onclick event how it will be called using javascript.I am explaining the scenario below. ``` <input name="optional_0_0_ans" id="optional_0_0_ans" class="form-control firstsec" placeholder...
2016/06/29
[ "https://Stackoverflow.com/questions/38091578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Inside the onclick attribute `this` refers to the current DOM Element. So if you want to achieve the same behavior, you can simply get and parse the DOM Element yourself: ``` var button = document.querySelector('#optional_0_0_ans button'); createNew(button, 0, 0, 3); ```
Yes you can ,add id to your element will be more easy to handle ... *I added id to your button element to illustrate* ``` <button type="button" class="btn btn-sm btn-success" id="btn" style="line-height:12px;" onclick="createNew(this,0,0,1);"><i class="fa fa-plus" aria-hidden="true"></i></button> <script> function...
4,573,047
``` public void aMethod(){ new Thread(new Runnable() { public void run() { int decide = JOptionPane.showConfirmDialog(null, confirmName?, JOptionPane.YES_NO_OPTION); } }).start(); System.out.println("Number of decison ...
2011/01/01
[ "https://Stackoverflow.com/questions/4573047", "https://Stackoverflow.com", "https://Stackoverflow.com/users/552279/" ]
The callback is invoked **asynchronously**. There's "nobody home" listening for exceptions when the callback is called. The browser invokes the callback in response to the asynchronous event of the HTTP request completing. Your `try ... catch` block is a static construct, and as such it won't play any role in the handl...
You haven't described what the `A` function does, but I'm guessing it initiates an AJAX call -- this call runs asynchronously while the `Manager` function returns immediately. The callback is executed by the browser in a separate (global) context which has no relation to the `Manager` function, hence any exception you ...
2,138,081
I want to know more about primality test , this is one of my question to determine if an integer odd number could be prime with below property in the question. > > > > > > **Question:** > > Could be an odd integer number with repeat digits a prime ? > > > > > > > > > **Note:** for example a number as this :$4...
2017/02/10
[ "https://math.stackexchange.com/questions/2138081", "https://math.stackexchange.com", "https://math.stackexchange.com/users/156150/" ]
$$1717171717171717171717171717171$$ is an example with $31$ digits
Have you heard about [repunits](https://en.wikipedia.org/wiki/Repunit)?
6,189,398
The simple study is: **Ant life simulation** I'm creating an OO structure that see a Class for the Anthill, a Class for the Ant and a Class for the whole simulator. Now I'm brainstorming on "how to" make Ants 'live'... I know that there are projects like this just started but I'm brainstorming, I'm **not** looking f...
2011/05/31
[ "https://Stackoverflow.com/questions/6189398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/637508/" ]
I wrote an ant simulation (for finding a good TSP-solution) and a wouldnt recommend a Thread-Solution. I use a loop to calculate for each ant the next step, so my ants do not really behave concurrently (but synchronize after each step). I don't see any reason to model those ants with Threads. Its no advantage in term...
I agree with @delan - it seems like overkill to allocate a whole thread per Ant, especially if you are looking to scale this to a whole anthill with thousands of the critters running around. Instead you might consider using a thread to update many ants in a single "cycle". Depending on how you write it - you need to c...
6,189,398
The simple study is: **Ant life simulation** I'm creating an OO structure that see a Class for the Anthill, a Class for the Ant and a Class for the whole simulator. Now I'm brainstorming on "how to" make Ants 'live'... I know that there are projects like this just started but I'm brainstorming, I'm **not** looking f...
2011/05/31
[ "https://Stackoverflow.com/questions/6189398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/637508/" ]
I would recommend to have a look at [stackless](http://www.stackless.com). Stackless introduces tasklets which are akind of microthreads which allows to get the benefits of thread-based programming without the performance and complexity problems associated with conventional threads A possible problem with stackless is...
I agree with @delan - it seems like overkill to allocate a whole thread per Ant, especially if you are looking to scale this to a whole anthill with thousands of the critters running around. Instead you might consider using a thread to update many ants in a single "cycle". Depending on how you write it - you need to c...
6,189,398
The simple study is: **Ant life simulation** I'm creating an OO structure that see a Class for the Anthill, a Class for the Ant and a Class for the whole simulator. Now I'm brainstorming on "how to" make Ants 'live'... I know that there are projects like this just started but I'm brainstorming, I'm **not** looking f...
2011/05/31
[ "https://Stackoverflow.com/questions/6189398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/637508/" ]
If you don't mind GPL, I suggest you use the [Khronos](http://packages.python.org/Khronos/des/des-index.html) simulation framework, which allows you to define each ant as a generator so you don't need to create threads. The Khronos engine takes care of the scheduling. I'm actually developing a competing project called...
I agree with @delan - it seems like overkill to allocate a whole thread per Ant, especially if you are looking to scale this to a whole anthill with thousands of the critters running around. Instead you might consider using a thread to update many ants in a single "cycle". Depending on how you write it - you need to c...
6,189,398
The simple study is: **Ant life simulation** I'm creating an OO structure that see a Class for the Anthill, a Class for the Ant and a Class for the whole simulator. Now I'm brainstorming on "how to" make Ants 'live'... I know that there are projects like this just started but I'm brainstorming, I'm **not** looking f...
2011/05/31
[ "https://Stackoverflow.com/questions/6189398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/637508/" ]
I wrote an ant simulation (for finding a good TSP-solution) and a wouldnt recommend a Thread-Solution. I use a loop to calculate for each ant the next step, so my ants do not really behave concurrently (but synchronize after each step). I don't see any reason to model those ants with Threads. Its no advantage in term...
I think the thread solution is the best. Even if ants are individuals, they share the environment, exactly what is permitted when using thread. Process solution corresponds to the reality, it would be arduous to implements communication system with the environment. Another solution would be to define that ants act onl...
6,189,398
The simple study is: **Ant life simulation** I'm creating an OO structure that see a Class for the Anthill, a Class for the Ant and a Class for the whole simulator. Now I'm brainstorming on "how to" make Ants 'live'... I know that there are projects like this just started but I'm brainstorming, I'm **not** looking f...
2011/05/31
[ "https://Stackoverflow.com/questions/6189398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/637508/" ]
I would recommend to have a look at [stackless](http://www.stackless.com). Stackless introduces tasklets which are akind of microthreads which allows to get the benefits of thread-based programming without the performance and complexity problems associated with conventional threads A possible problem with stackless is...
I think the thread solution is the best. Even if ants are individuals, they share the environment, exactly what is permitted when using thread. Process solution corresponds to the reality, it would be arduous to implements communication system with the environment. Another solution would be to define that ants act onl...
6,189,398
The simple study is: **Ant life simulation** I'm creating an OO structure that see a Class for the Anthill, a Class for the Ant and a Class for the whole simulator. Now I'm brainstorming on "how to" make Ants 'live'... I know that there are projects like this just started but I'm brainstorming, I'm **not** looking f...
2011/05/31
[ "https://Stackoverflow.com/questions/6189398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/637508/" ]
If you don't mind GPL, I suggest you use the [Khronos](http://packages.python.org/Khronos/des/des-index.html) simulation framework, which allows you to define each ant as a generator so you don't need to create threads. The Khronos engine takes care of the scheduling. I'm actually developing a competing project called...
I think the thread solution is the best. Even if ants are individuals, they share the environment, exactly what is permitted when using thread. Process solution corresponds to the reality, it would be arduous to implements communication system with the environment. Another solution would be to define that ants act onl...
43,879,831
I found a jquery code to calculate the age based on the entered birth date. ``` <tr> <td>Date of Birth:</td> <td><input type="text" name="txtdob" class="manual" /> (yyyy-mm-dd)</td> <td>Age:</td> <td><input type="text" id="age" /></td> </tr> <script src="http://code.jquery.com/jquery.js"></script> <script src='js/mo...
2017/05/09
[ "https://Stackoverflow.com/questions/43879831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7988399/" ]
This ll helps you: ```js function setAge(d) { var age = Math.floor(moment().diff(d, 'years', true)); $('#age').val(age); if(age<18) $('#age').addClass("age-error"); else $('#age').removeClass("age-error"); } $(function () { $('.manua...
Just use and **[`if/then`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else)** statement? ```js function setAge(d) { var age = moment().diff(d, 'years', true); var $age = $("#age"); $age.val(Math.floor(age)); // Test the value if($age.val() < 18){ // Style it ...
43,879,831
I found a jquery code to calculate the age based on the entered birth date. ``` <tr> <td>Date of Birth:</td> <td><input type="text" name="txtdob" class="manual" /> (yyyy-mm-dd)</td> <td>Age:</td> <td><input type="text" id="age" /></td> </tr> <script src="http://code.jquery.com/jquery.js"></script> <script src='js/mo...
2017/05/09
[ "https://Stackoverflow.com/questions/43879831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7988399/" ]
This will work to you. ```js function setAge() { // Test the value if($("#age").val() < 18){ // Style it appropriately $("#age").css("color", "red"); } else { $("#age").css("color", "green"); } } ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.mi...
Just use and **[`if/then`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else)** statement? ```js function setAge(d) { var age = moment().diff(d, 'years', true); var $age = $("#age"); $age.val(Math.floor(age)); // Test the value if($age.val() < 18){ // Style it ...
43,879,831
I found a jquery code to calculate the age based on the entered birth date. ``` <tr> <td>Date of Birth:</td> <td><input type="text" name="txtdob" class="manual" /> (yyyy-mm-dd)</td> <td>Age:</td> <td><input type="text" id="age" /></td> </tr> <script src="http://code.jquery.com/jquery.js"></script> <script src='js/mo...
2017/05/09
[ "https://Stackoverflow.com/questions/43879831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7988399/" ]
```js function setAge(d) { $('#age').css('color', 'black'); var age = moment().diff(d, 'years', true); $('#age').val(Math.floor(age)); if ($('#age').val() < 18) { $('#age').css('color', 'red'); } } $(document).ready(function() { $("#dob").datepicker({ dateFormat: 'yy-mm-dd', changeMo...
Just use and **[`if/then`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else)** statement? ```js function setAge(d) { var age = moment().diff(d, 'years', true); var $age = $("#age"); $age.val(Math.floor(age)); // Test the value if($age.val() < 18){ // Style it ...
43,879,831
I found a jquery code to calculate the age based on the entered birth date. ``` <tr> <td>Date of Birth:</td> <td><input type="text" name="txtdob" class="manual" /> (yyyy-mm-dd)</td> <td>Age:</td> <td><input type="text" id="age" /></td> </tr> <script src="http://code.jquery.com/jquery.js"></script> <script src='js/mo...
2017/05/09
[ "https://Stackoverflow.com/questions/43879831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7988399/" ]
This ll helps you: ```js function setAge(d) { var age = Math.floor(moment().diff(d, 'years', true)); $('#age').val(age); if(age<18) $('#age').addClass("age-error"); else $('#age').removeClass("age-error"); } $(function () { $('.manua...
This will work to you. ```js function setAge() { // Test the value if($("#age").val() < 18){ // Style it appropriately $("#age").css("color", "red"); } else { $("#age").css("color", "green"); } } ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.mi...
43,879,831
I found a jquery code to calculate the age based on the entered birth date. ``` <tr> <td>Date of Birth:</td> <td><input type="text" name="txtdob" class="manual" /> (yyyy-mm-dd)</td> <td>Age:</td> <td><input type="text" id="age" /></td> </tr> <script src="http://code.jquery.com/jquery.js"></script> <script src='js/mo...
2017/05/09
[ "https://Stackoverflow.com/questions/43879831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7988399/" ]
This ll helps you: ```js function setAge(d) { var age = Math.floor(moment().diff(d, 'years', true)); $('#age').val(age); if(age<18) $('#age').addClass("age-error"); else $('#age').removeClass("age-error"); } $(function () { $('.manua...
```js function setAge(d) { $('#age').css('color', 'black'); var age = moment().diff(d, 'years', true); $('#age').val(Math.floor(age)); if ($('#age').val() < 18) { $('#age').css('color', 'red'); } } $(document).ready(function() { $("#dob").datepicker({ dateFormat: 'yy-mm-dd', changeMo...
30,865,704
Please refer - <https://jsfiddle.net/jy5p509c/> ``` var a = "who all are coming to the party and merry around in somewhere"; res = ""; resarr = []; for(i=0 ;i<a.length; i++) { if(a[i] == " ") { res+= resarr.reverse().join("")+" "; resarr = []; } else { resarr.push(a[i]); } } console.log(res); ``` T...
2015/06/16
[ "https://Stackoverflow.com/questions/30865704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4701759/" ]
It problem is your `if(a[i] == " ")` condition is not satisfied for the last word ```js var a = "who all are coming to the party and merry around in somewhere"; res = ""; resarr = []; for (i = 0; i < a.length; i++) { if (a[i] == " " || i == a.length - 1) { res += resarr.reverse().join("") + " "; resa...
I don't know wich one is the best answer I'll live you mine and let you decide, here it is : ``` console.log( 'who all are coming to the party and merry around in somewhere'.split('').reverse().join('').split(" ").reverse().join(" ")); ```
30,865,704
Please refer - <https://jsfiddle.net/jy5p509c/> ``` var a = "who all are coming to the party and merry around in somewhere"; res = ""; resarr = []; for(i=0 ;i<a.length; i++) { if(a[i] == " ") { res+= resarr.reverse().join("")+" "; resarr = []; } else { resarr.push(a[i]); } } console.log(res); ``` T...
2015/06/16
[ "https://Stackoverflow.com/questions/30865704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4701759/" ]
It problem is your `if(a[i] == " ")` condition is not satisfied for the last word ```js var a = "who all are coming to the party and merry around in somewhere"; res = ""; resarr = []; for (i = 0; i < a.length; i++) { if (a[i] == " " || i == a.length - 1) { res += resarr.reverse().join("") + " "; resa...
Add the following line before console log, you will get as expected ``` res+= resarr.reverse().join("")+" "; ```
30,865,704
Please refer - <https://jsfiddle.net/jy5p509c/> ``` var a = "who all are coming to the party and merry around in somewhere"; res = ""; resarr = []; for(i=0 ;i<a.length; i++) { if(a[i] == " ") { res+= resarr.reverse().join("")+" "; resarr = []; } else { resarr.push(a[i]); } } console.log(res); ``` T...
2015/06/16
[ "https://Stackoverflow.com/questions/30865704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4701759/" ]
It problem is your `if(a[i] == " ")` condition is not satisfied for the last word ```js var a = "who all are coming to the party and merry around in somewhere"; res = ""; resarr = []; for (i = 0; i < a.length; i++) { if (a[i] == " " || i == a.length - 1) { res += resarr.reverse().join("") + " "; resa...
Try this: ``` var a = "who all are coming to the party and merry around in somewhere"; //split the string in to an array of words var sp = a.split(" "); for (i = 0; i < sp.length; i++) { //split the individual word into an array of char, reverse then join sp[i] = sp[i].split("").reverse().join(""); } //fin...
30,865,704
Please refer - <https://jsfiddle.net/jy5p509c/> ``` var a = "who all are coming to the party and merry around in somewhere"; res = ""; resarr = []; for(i=0 ;i<a.length; i++) { if(a[i] == " ") { res+= resarr.reverse().join("")+" "; resarr = []; } else { resarr.push(a[i]); } } console.log(res); ``` T...
2015/06/16
[ "https://Stackoverflow.com/questions/30865704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4701759/" ]
I don't know wich one is the best answer I'll live you mine and let you decide, here it is : ``` console.log( 'who all are coming to the party and merry around in somewhere'.split('').reverse().join('').split(" ").reverse().join(" ")); ```
Add the following line before console log, you will get as expected ``` res+= resarr.reverse().join("")+" "; ```
30,865,704
Please refer - <https://jsfiddle.net/jy5p509c/> ``` var a = "who all are coming to the party and merry around in somewhere"; res = ""; resarr = []; for(i=0 ;i<a.length; i++) { if(a[i] == " ") { res+= resarr.reverse().join("")+" "; resarr = []; } else { resarr.push(a[i]); } } console.log(res); ``` T...
2015/06/16
[ "https://Stackoverflow.com/questions/30865704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4701759/" ]
I don't know wich one is the best answer I'll live you mine and let you decide, here it is : ``` console.log( 'who all are coming to the party and merry around in somewhere'.split('').reverse().join('').split(" ").reverse().join(" ")); ```
Try this: ``` var a = "who all are coming to the party and merry around in somewhere"; //split the string in to an array of words var sp = a.split(" "); for (i = 0; i < sp.length; i++) { //split the individual word into an array of char, reverse then join sp[i] = sp[i].split("").reverse().join(""); } //fin...
119,508
Someone knows how to get qty for each simple product of configurable product via javascript in product page? It seems that `spConfig` retrieved with ``` #product_addtocart_form": { "configurable": { "spConfig": <?php /* @escapeNotVerified */ echo $block->getJsonConfig() ?> } } ``` hasn't data about ...
2016/06/06
[ "https://magento.stackexchange.com/questions/119508", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/23344/" ]
Thx to @Amit Bera for hints, here my answer. Override `\Magento\ConfigurableProduct\Model\ConfigurableAttributeData` and extends `getAttributeOptionsData()` adding `qty` field: ``` /** * @var \\Magento\CatalogInventory\Api\StockStateInterface */ protected $_stockState; /** * */ public function __construct( \...
In this case,you need to rewrite class *`Magento\ConfigurableProduct\Helper\Data;`* then at ***getOptions(***) function at ``` $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $StockState = $objectManager->get('\Magento\CatalogInventory\Api\StockStateInterface'); $options['qty'][$productId...
44,771,777
I feel stupid because I´m stuck with a basic. I have three set of classes that contains paragraphs and I want to change the background color of each one depending on day (with New Dat.getDay(). I dont know how to mix for loop and if statements for each set of classes correctly. I guess it´s something simple but I mis...
2017/06/27
[ "https://Stackoverflow.com/questions/44771777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7885945/" ]
You need to group conditions. Read more about [Operator precedence](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Operator_Precedence) ``` for (var i = 0;( (i < weekda.length) && (i < sat.length) && (i < dom.length)); i++){ // your code } ```
Part of the problem may be you have `background-color:#0091ea;color:white;` for all three options. Therefore you may not be seeing any change. Personally I would break this up a little to make it more flexible and a little easier to read (and maintain). For example: ``` function changecolor() { var d = new Date()...
21,902,673
I am sorry if this sounds likes a basic question but I am relatively new to java. I have a JComboBox which I populate from a database and then use it in a JTable. I do that using the following code: ``` itemEditortxt = new JComboBox(buildComboBoxmodel("SELECT item_name FROM items ORDER BY item_name")); AutoCompleteDec...
2014/02/20
[ "https://Stackoverflow.com/questions/21902673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3245747/" ]
Try conditional statements for IE <http://msdn.microsoft.com/en-us/library/ms537512%28VS.85%29.aspx> Using pure HTML ``` <!--[if !IE8]--> <div>Hi!</div> <!--[endif]--> ``` If you want to hide it using css then you can create IE specific css ``` <div class="hideIE"> Hi!</div> <!--[if IE 8]> <style> .hide...
``` <!--[if IE 8]> <style type="text/css"> .yourdiv {display:none;} </style> <![endif]--> ```
21,902,673
I am sorry if this sounds likes a basic question but I am relatively new to java. I have a JComboBox which I populate from a database and then use it in a JTable. I do that using the following code: ``` itemEditortxt = new JComboBox(buildComboBoxmodel("SELECT item_name FROM items ORDER BY item_name")); AutoCompleteDec...
2014/02/20
[ "https://Stackoverflow.com/questions/21902673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3245747/" ]
You can use conditional statements for this, in your case something like this.. ``` <![if !(IE 8)]> <div> Hi!</div> <![endif]> ``` that should do it.
Use the below Code ``` <!--[if IE 8 ]> <div> Hi! </div> <![endif]--> ```
21,902,673
I am sorry if this sounds likes a basic question but I am relatively new to java. I have a JComboBox which I populate from a database and then use it in a JTable. I do that using the following code: ``` itemEditortxt = new JComboBox(buildComboBoxmodel("SELECT item_name FROM items ORDER BY item_name")); AutoCompleteDec...
2014/02/20
[ "https://Stackoverflow.com/questions/21902673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3245747/" ]
Use the below Code ``` <!--[if IE 8 ]> <div> Hi! </div> <![endif]--> ```
You can try this. Hide div using style ``` <!--[if IE 8]> <style> div { display:none;} </style> <![endif]--> ``` OR, If you want to check for < IE 8 ``` <!--[if lt IE 8]> <style> div { display:none;} </style> <![endif]--> ```
21,902,673
I am sorry if this sounds likes a basic question but I am relatively new to java. I have a JComboBox which I populate from a database and then use it in a JTable. I do that using the following code: ``` itemEditortxt = new JComboBox(buildComboBoxmodel("SELECT item_name FROM items ORDER BY item_name")); AutoCompleteDec...
2014/02/20
[ "https://Stackoverflow.com/questions/21902673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3245747/" ]
First google answer: [IE only stylesheet](http://css-tricks.com/how-to-create-an-ie-only-stylesheet/)
``` <!--[if IE 8]> <style type="text/css"> .yourdiv {display:none;} </style> <![endif]--> ```
21,902,673
I am sorry if this sounds likes a basic question but I am relatively new to java. I have a JComboBox which I populate from a database and then use it in a JTable. I do that using the following code: ``` itemEditortxt = new JComboBox(buildComboBoxmodel("SELECT item_name FROM items ORDER BY item_name")); AutoCompleteDec...
2014/02/20
[ "https://Stackoverflow.com/questions/21902673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3245747/" ]
Try conditional statements for IE <http://msdn.microsoft.com/en-us/library/ms537512%28VS.85%29.aspx> Using pure HTML ``` <!--[if !IE8]--> <div>Hi!</div> <!--[endif]--> ``` If you want to hide it using css then you can create IE specific css ``` <div class="hideIE"> Hi!</div> <!--[if IE 8]> <style> .hide...
You can try this. Hide div using style ``` <!--[if IE 8]> <style> div { display:none;} </style> <![endif]--> ``` OR, If you want to check for < IE 8 ``` <!--[if lt IE 8]> <style> div { display:none;} </style> <![endif]--> ```
21,902,673
I am sorry if this sounds likes a basic question but I am relatively new to java. I have a JComboBox which I populate from a database and then use it in a JTable. I do that using the following code: ``` itemEditortxt = new JComboBox(buildComboBoxmodel("SELECT item_name FROM items ORDER BY item_name")); AutoCompleteDec...
2014/02/20
[ "https://Stackoverflow.com/questions/21902673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3245747/" ]
First google answer: [IE only stylesheet](http://css-tricks.com/how-to-create-an-ie-only-stylesheet/)
You can try this. Hide div using style ``` <!--[if IE 8]> <style> div { display:none;} </style> <![endif]--> ``` OR, If you want to check for < IE 8 ``` <!--[if lt IE 8]> <style> div { display:none;} </style> <![endif]--> ```
21,902,673
I am sorry if this sounds likes a basic question but I am relatively new to java. I have a JComboBox which I populate from a database and then use it in a JTable. I do that using the following code: ``` itemEditortxt = new JComboBox(buildComboBoxmodel("SELECT item_name FROM items ORDER BY item_name")); AutoCompleteDec...
2014/02/20
[ "https://Stackoverflow.com/questions/21902673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3245747/" ]
First google answer: [IE only stylesheet](http://css-tricks.com/how-to-create-an-ie-only-stylesheet/)
You can use HTML 5 boiler plate: ``` <!--[if IE 8]> <html class="ie8"> <![endif]--> ``` then you can use: ``` if( $("html").hasClass("ie8") ) { $('div.ie8').hide(); }; ``` to hide any div with class `ie8` if current browser is `IE8`
21,902,673
I am sorry if this sounds likes a basic question but I am relatively new to java. I have a JComboBox which I populate from a database and then use it in a JTable. I do that using the following code: ``` itemEditortxt = new JComboBox(buildComboBoxmodel("SELECT item_name FROM items ORDER BY item_name")); AutoCompleteDec...
2014/02/20
[ "https://Stackoverflow.com/questions/21902673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3245747/" ]
You can use conditional statements for this, in your case something like this.. ``` <![if !(IE 8)]> <div> Hi!</div> <![endif]> ``` that should do it.
``` <!--[if IE 8]> <style type="text/css"> .yourdiv {display:none;} </style> <![endif]--> ```
21,902,673
I am sorry if this sounds likes a basic question but I am relatively new to java. I have a JComboBox which I populate from a database and then use it in a JTable. I do that using the following code: ``` itemEditortxt = new JComboBox(buildComboBoxmodel("SELECT item_name FROM items ORDER BY item_name")); AutoCompleteDec...
2014/02/20
[ "https://Stackoverflow.com/questions/21902673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3245747/" ]
You can use conditional statements for this, in your case something like this.. ``` <![if !(IE 8)]> <div> Hi!</div> <![endif]> ``` that should do it.
You can use HTML 5 boiler plate: ``` <!--[if IE 8]> <html class="ie8"> <![endif]--> ``` then you can use: ``` if( $("html").hasClass("ie8") ) { $('div.ie8').hide(); }; ``` to hide any div with class `ie8` if current browser is `IE8`
21,902,673
I am sorry if this sounds likes a basic question but I am relatively new to java. I have a JComboBox which I populate from a database and then use it in a JTable. I do that using the following code: ``` itemEditortxt = new JComboBox(buildComboBoxmodel("SELECT item_name FROM items ORDER BY item_name")); AutoCompleteDec...
2014/02/20
[ "https://Stackoverflow.com/questions/21902673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3245747/" ]
Use the below Code ``` <!--[if IE 8 ]> <div> Hi! </div> <![endif]--> ```
``` <!--[if IE 8]> <style type="text/css"> .yourdiv {display:none;} </style> <![endif]--> ```
405,929
Given an arbitrary set $X$, let $\beta X$ be the set of all ultrafilters over $X$. Consider endowing $\beta X$ with a topology consisting of the following open sets: $$ \{\mathcal{U} \in \beta X : A \in \mathcal{U}\} $$ where $A$ ranges over subsets of $X$. Now let $\kappa < |X|$ be an infinite cardinal, and assume the...
2021/10/11
[ "https://mathoverflow.net/questions/405929", "https://mathoverflow.net", "https://mathoverflow.net/users/146831/" ]
If $\kappa=\aleph\_0$ then yes: every ultrafilter is $\aleph\_0$-complete. If $\kappa>\aleph\_0$ then no, if $\lambda X$ is nonempty. Split $X$ into countably many sets $\{X\_n:n\in\mathbb{N}\}$, of the same cardinality as $X$ itself. Take a $\kappa$-complete $u\_n$ on $X\_n$ for each $n$. For every free ultrafilter $...
I claim that one can put a new topology on $\beta X$ for discrete space $X$ so that $\lambda X$ is in-fact closed in $\beta X$. If $\kappa$ is a regular cardinal, then a $P\_{\kappa}$-space is a completely regular space such that if $U\_{i}$ is open for $i\in I$ and $|I|<\kappa$, then $\bigcap\_{i\in I}U\_{i}$ is also...
1,990,603
I came across this simplification in an iTunes U calculus course. $$\frac{\frac{1}{x\_{0}+\delta x}-\frac{1}{x\_{0}}}{\delta x} = \frac{1}{\delta x} \left(\frac{x\_{0}-(x\_{0}+\delta x)}{(x\_0+\delta x)x\_{0}}\right)$$ I didn't understand how this was done. I can see the denominator being taken out for $\frac{1}{\del...
2016/10/29
[ "https://math.stackexchange.com/questions/1990603", "https://math.stackexchange.com", "https://math.stackexchange.com/users/381467/" ]
It is $$\frac 1a-\frac 1b=\frac{b-a}{ab}.$$ So, if $a=x\_0+\delta x$ and $b=x\_0$ you have $$\frac 1{x\_0+\delta x}-\frac 1{x\_0}=\frac{x\_0-(x\_0+\delta x)}{x\_0(x\_0+\delta x)}.$$
Basically it is taking the same denominator: $$\frac1a-\frac1b=\frac{b}{ab}-\frac{a}{ab}=\frac{a-b}{ab}.$$ In the special case $a=x\_0$, $b=x\_0+\delta x$
62,084,684
I need your help to rename a remote branch. I created a PR but now I need to rename the remote branch name. I don't want to follow the process where I have to rename the local branch then push and delete the old branch because it will clear the PR. Is there a way to just rename the remote branch and PR should ...
2020/05/29
[ "https://Stackoverflow.com/questions/62084684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6656693/" ]
Renaming a remote branch in Git is really just creating a new branch with same commits and new name and deleting old branch. Depending on where you have pull request open (you don't mention whether is it Github, Gitlab, Phabricator or something else) you might have some options given to you by tool operating on reposit...
> > I don't want to follow the process where I have to rename the local branch then push and delete the old branch. > > > I don't think there's any other way. You could try to change the branch in the PR screen, but I suppose you would've tried it already. Pull or merge requests are not part of `git` itself, but ...
12,121,217
I was doing a program to compare the average and maximum accesses required for linear probing, quadratic probing and separate chaining in hash table. I had done the element insertion part for 3 cases. While finding the element from hash table, I need to have a limit for ending the searching. In the case of separate c...
2012/08/25
[ "https://Stackoverflow.com/questions/12121217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1611359/" ]
For such problems analyse the growth of `i` in two pieces: First Interval : `i` goes from `0` to `size-1` In this case, I haven't got the solution for now. Hopefully will update. Second Interval : `i` goes from `size` to `infinity` In this case `i` can be expressed as `i = size + k`, then ``` newKey = (key + i*i) ...
See [this link](http://research.cs.vt.edu/AVresearch/hashing/quadratic.php). If your table size is power of 2 and you are using a reprobe function f(i)=i\*(i+1)/2, you are guaranteed to traverse the entire table. If your table size is a prime number, you are guaranteed to traverse at least half of the table. In general...
12,121,217
I was doing a program to compare the average and maximum accesses required for linear probing, quadratic probing and separate chaining in hash table. I had done the element insertion part for 3 cases. While finding the element from hash table, I need to have a limit for ending the searching. In the case of separate c...
2012/08/25
[ "https://Stackoverflow.com/questions/12121217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1611359/" ]
For such problems analyse the growth of `i` in two pieces: First Interval : `i` goes from `0` to `size-1` In this case, I haven't got the solution for now. Hopefully will update. Second Interval : `i` goes from `size` to `infinity` In this case `i` can be expressed as `i = size + k`, then ``` newKey = (key + i*i) ...
After doing some simulations in Excel, it appears that iterating up to i = size / 2 would be all that needs to be tested. This is when using the standard method of adding sequential perfect squares to the single-hashed position. The answer that you can quit if a position is revisited would not allow testing of all pos...
8,984,957
I would like to group my LINQ query by `ItemNumber` and return the whole table with the total for `Quantity`. ``` Example: ItemNumber - ItemName - Quantity 100 Item1 1 150 Item2 2 100 Item1 2 200 Item3 1 150 Item2 2 Should be: ItemNumber - Ite...
2012/01/24
[ "https://Stackoverflow.com/questions/8984957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1063684/" ]
``` public IQueryable<IGrouping<Int32?, WebsiteOrderStatus>> lol(string accountNumber) { db.WebsiteOrderStatus .Where(x => x.AccountNumber == accountNumber && x.LastUpdatedStatus != 1) .GroupBy(g => g.ItemNumber) .Select(g => new { ItemNumber = g.Ke...
I think the `Select` should be: ``` .Select(g => new { ItemNumber = g.Key, Column1 = (Int32?)g.Sum(p => p.Quantity) }); ``` Note the change in the first line of the anonymous type. The key of the grouping is already the item number.
8,984,957
I would like to group my LINQ query by `ItemNumber` and return the whole table with the total for `Quantity`. ``` Example: ItemNumber - ItemName - Quantity 100 Item1 1 150 Item2 2 100 Item1 2 200 Item3 1 150 Item2 2 Should be: ItemNumber - Ite...
2012/01/24
[ "https://Stackoverflow.com/questions/8984957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1063684/" ]
``` public IQueryable<IGrouping<Int32?, WebsiteOrderStatus>> lol(string accountNumber) { db.WebsiteOrderStatus .Where(x => x.AccountNumber == accountNumber && x.LastUpdatedStatus != 1) .GroupBy(g => g.ItemNumber) .Select(g => new { ItemNumber = g.Ke...
The only problems I see with your query are 1. Missing `return` statement as per comments 2. The select statement should be: - ``` .Select(g => new { ItemNumber = g.Key, Total = g.Sum(p => p.Quantity) }); ``` --- EDIT: If you want to get, lets say ItemNumber and ItemName , in the resulting objec...
8,984,957
I would like to group my LINQ query by `ItemNumber` and return the whole table with the total for `Quantity`. ``` Example: ItemNumber - ItemName - Quantity 100 Item1 1 150 Item2 2 100 Item1 2 200 Item3 1 150 Item2 2 Should be: ItemNumber - Ite...
2012/01/24
[ "https://Stackoverflow.com/questions/8984957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1063684/" ]
``` public IQueryable<IGrouping<Int32?, WebsiteOrderStatus>> lol(string accountNumber) { db.WebsiteOrderStatus .Where(x => x.AccountNumber == accountNumber && x.LastUpdatedStatus != 1) .GroupBy(g => g.ItemNumber) .Select(g => new { ItemNumber = g.Ke...
``` public IQueryable<OrderStatus > lol(string accountNumber) { return db.WebsiteOrderStatus .Where(x => x.AccountNumber == accountNumber && x.LastUpdatedStatus != 1) .GroupBy(g => g.ItemNumber) .Select(g => new OrderStatus //This is your custom class, for binding only ...
8,984,957
I would like to group my LINQ query by `ItemNumber` and return the whole table with the total for `Quantity`. ``` Example: ItemNumber - ItemName - Quantity 100 Item1 1 150 Item2 2 100 Item1 2 200 Item3 1 150 Item2 2 Should be: ItemNumber - Ite...
2012/01/24
[ "https://Stackoverflow.com/questions/8984957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1063684/" ]
``` public IQueryable<IGrouping<Int32?, WebsiteOrderStatus>> lol(string accountNumber) { db.WebsiteOrderStatus .Where(x => x.AccountNumber == accountNumber && x.LastUpdatedStatus != 1) .GroupBy(g => g.ItemNumber) .Select(g => new { ItemNumber = g.Ke...
You cannot use anonymous type for return value type. So you will never compile the code. Also your linq expression has IQueryable< [anonymous type] > result type. I believe that you can do something like this: ```cs public IQueryable<OrderStatus> lol(string accountNumber) { db.WebsiteOrderStatus .Wher...
8,984,957
I would like to group my LINQ query by `ItemNumber` and return the whole table with the total for `Quantity`. ``` Example: ItemNumber - ItemName - Quantity 100 Item1 1 150 Item2 2 100 Item1 2 200 Item3 1 150 Item2 2 Should be: ItemNumber - Ite...
2012/01/24
[ "https://Stackoverflow.com/questions/8984957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1063684/" ]
I think the `Select` should be: ``` .Select(g => new { ItemNumber = g.Key, Column1 = (Int32?)g.Sum(p => p.Quantity) }); ``` Note the change in the first line of the anonymous type. The key of the grouping is already the item number.
You cannot use anonymous type for return value type. So you will never compile the code. Also your linq expression has IQueryable< [anonymous type] > result type. I believe that you can do something like this: ```cs public IQueryable<OrderStatus> lol(string accountNumber) { db.WebsiteOrderStatus .Wher...
8,984,957
I would like to group my LINQ query by `ItemNumber` and return the whole table with the total for `Quantity`. ``` Example: ItemNumber - ItemName - Quantity 100 Item1 1 150 Item2 2 100 Item1 2 200 Item3 1 150 Item2 2 Should be: ItemNumber - Ite...
2012/01/24
[ "https://Stackoverflow.com/questions/8984957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1063684/" ]
The only problems I see with your query are 1. Missing `return` statement as per comments 2. The select statement should be: - ``` .Select(g => new { ItemNumber = g.Key, Total = g.Sum(p => p.Quantity) }); ``` --- EDIT: If you want to get, lets say ItemNumber and ItemName , in the resulting objec...
You cannot use anonymous type for return value type. So you will never compile the code. Also your linq expression has IQueryable< [anonymous type] > result type. I believe that you can do something like this: ```cs public IQueryable<OrderStatus> lol(string accountNumber) { db.WebsiteOrderStatus .Wher...
8,984,957
I would like to group my LINQ query by `ItemNumber` and return the whole table with the total for `Quantity`. ``` Example: ItemNumber - ItemName - Quantity 100 Item1 1 150 Item2 2 100 Item1 2 200 Item3 1 150 Item2 2 Should be: ItemNumber - Ite...
2012/01/24
[ "https://Stackoverflow.com/questions/8984957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1063684/" ]
``` public IQueryable<OrderStatus > lol(string accountNumber) { return db.WebsiteOrderStatus .Where(x => x.AccountNumber == accountNumber && x.LastUpdatedStatus != 1) .GroupBy(g => g.ItemNumber) .Select(g => new OrderStatus //This is your custom class, for binding only ...
You cannot use anonymous type for return value type. So you will never compile the code. Also your linq expression has IQueryable< [anonymous type] > result type. I believe that you can do something like this: ```cs public IQueryable<OrderStatus> lol(string accountNumber) { db.WebsiteOrderStatus .Wher...
62,174,181
I manage to ingest data successfully using below code ----------------------------------------------------- var kcsbDM = new KustoConnectionStringBuilder("<https://test123.southeastasia.kusto.windows.net>", "testdb").WithAadApplicationTokenAuthentication(acquireTokenTask.AccessToken); using (var ingestClient = KustoI...
2020/06/03
[ "https://Stackoverflow.com/questions/62174181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13559831/" ]
Try running .show ingestion failures on "<https://test123.southeastasia.kusto.windows.net>" endpoint, see if there are ingestion error. Also, you set Queue reporting method, you can get the detailed result by reading from the queue. ``` ingestProps.ReportLevel = IngestionReportLevel.FailuresOnly; ingestProps.ReportMet...
enable streamingestion policy is actually only needed if * stream ingestion is turned on in the cluster (azure portal) * the code is using `CreateManagedStreamingIngestClient` the ManagedStreamingIngestClient will first try stream ingesting the data, if it fails a few times, then it will use the QueuedClient if the ...
62,174,181
I manage to ingest data successfully using below code ----------------------------------------------------- var kcsbDM = new KustoConnectionStringBuilder("<https://test123.southeastasia.kusto.windows.net>", "testdb").WithAadApplicationTokenAuthentication(acquireTokenTask.AccessToken); using (var ingestClient = KustoI...
2020/06/03
[ "https://Stackoverflow.com/questions/62174181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13559831/" ]
Could you please change the line to: var ingestionResult = await ingestClient.IngestFromStreamAsync(memStream, ingestProps); Also please note that queued ingestion has a batching stage of up to 5 minutes before the data is actually ingested: <https://learn.microsoft.com/en-us/azure/data-explorer/kusto/management/batch...
enable streamingestion policy is actually only needed if * stream ingestion is turned on in the cluster (azure portal) * the code is using `CreateManagedStreamingIngestClient` the ManagedStreamingIngestClient will first try stream ingesting the data, if it fails a few times, then it will use the QueuedClient if the ...
62,174,181
I manage to ingest data successfully using below code ----------------------------------------------------- var kcsbDM = new KustoConnectionStringBuilder("<https://test123.southeastasia.kusto.windows.net>", "testdb").WithAadApplicationTokenAuthentication(acquireTokenTask.AccessToken); using (var ingestClient = KustoI...
2020/06/03
[ "https://Stackoverflow.com/questions/62174181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13559831/" ]
I find the reason finally, need to enable stream ingestion in the table: ``` .alter table TraceLog policy streamingingestion enable ``` See [the Azure documentation](https://learn.microsoft.com/en-us/azure/data-explorer/ingest-data-streaming) for details.
enable streamingestion policy is actually only needed if * stream ingestion is turned on in the cluster (azure portal) * the code is using `CreateManagedStreamingIngestClient` the ManagedStreamingIngestClient will first try stream ingesting the data, if it fails a few times, then it will use the QueuedClient if the ...
966,585
Hi after upgrading to Ubuntu 17.10, vmware is now not starting. I get the message: ``` /usr/lib/vmware/bin/vmware-modconfig: Relink `/lib/x86_64-linux-gnu/libbsd.so.0' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime' ``` I am aware that there are patches available and I am attempting to ap...
2017/10/20
[ "https://askubuntu.com/questions/966585", "https://askubuntu.com", "https://askubuntu.com/users/727651/" ]
I've managed to get VMWare Workstation 12.5.7 working on Kubuntu 17.10. In `/usr/lib/vmware/modules/source`: 1. Extract `vmmon.tar` and `vmnet.tar` ``` sudo tar -xf vmmon.tar sudo tar -xf vmnet.tar ``` This will create `vmmon-only` and `vmnet-only` directories. 2. Fetch the patched `hostif.c` ``` sudo wget -O vmm...
In addition to the answer by *Stephen Wassell*, if you are still running the VM Workstation 12.5.x version you will need to re-compile your `.ko` for every kernel patch.. which is alot.. You may see this error: (**Invalid module format**) ``` # insmod /lib/modules/4.13.0-31-generic/misc/vmnet.ko insmod: ERROR: coul...
966,585
Hi after upgrading to Ubuntu 17.10, vmware is now not starting. I get the message: ``` /usr/lib/vmware/bin/vmware-modconfig: Relink `/lib/x86_64-linux-gnu/libbsd.so.0' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime' ``` I am aware that there are patches available and I am attempting to ap...
2017/10/20
[ "https://askubuntu.com/questions/966585", "https://askubuntu.com", "https://askubuntu.com/users/727651/" ]
I've managed to get VMWare Workstation 12.5.7 working on Kubuntu 17.10. In `/usr/lib/vmware/modules/source`: 1. Extract `vmmon.tar` and `vmnet.tar` ``` sudo tar -xf vmmon.tar sudo tar -xf vmnet.tar ``` This will create `vmmon-only` and `vmnet-only` directories. 2. Fetch the patched `hostif.c` ``` sudo wget -O vmm...
The bugfix described by: Stephen leads for many to an other bug: "Failed to get gcc information." The **simplest solution** is to **[download vmware player workstation 14.1](https://my.vmware.com/de/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/14_0%7CPLAYER-1411%7Cproduct_downloads)**. Install...
966,585
Hi after upgrading to Ubuntu 17.10, vmware is now not starting. I get the message: ``` /usr/lib/vmware/bin/vmware-modconfig: Relink `/lib/x86_64-linux-gnu/libbsd.so.0' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime' ``` I am aware that there are patches available and I am attempting to ap...
2017/10/20
[ "https://askubuntu.com/questions/966585", "https://askubuntu.com", "https://askubuntu.com/users/727651/" ]
I've managed to get VMWare Workstation 12.5.7 working on Kubuntu 17.10. In `/usr/lib/vmware/modules/source`: 1. Extract `vmmon.tar` and `vmnet.tar` ``` sudo tar -xf vmmon.tar sudo tar -xf vmnet.tar ``` This will create `vmmon-only` and `vmnet-only` directories. 2. Fetch the patched `hostif.c` ``` sudo wget -O vmm...
I have tried approx all other solutions but nothing worked. But these steps worked for me on Ubuntu 18.04, VMware 12.5.9 ``` git clone https://github.com/mkubecek/vmware-host-modules.git cd vmware-host-modules git checkout workstation-12.5.9 (change it to your version. it's important) make && sudo make install cd /usr...
966,585
Hi after upgrading to Ubuntu 17.10, vmware is now not starting. I get the message: ``` /usr/lib/vmware/bin/vmware-modconfig: Relink `/lib/x86_64-linux-gnu/libbsd.so.0' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime' ``` I am aware that there are patches available and I am attempting to ap...
2017/10/20
[ "https://askubuntu.com/questions/966585", "https://askubuntu.com", "https://askubuntu.com/users/727651/" ]
I have tried approx all other solutions but nothing worked. But these steps worked for me on Ubuntu 18.04, VMware 12.5.9 ``` git clone https://github.com/mkubecek/vmware-host-modules.git cd vmware-host-modules git checkout workstation-12.5.9 (change it to your version. it's important) make && sudo make install cd /usr...
In addition to the answer by *Stephen Wassell*, if you are still running the VM Workstation 12.5.x version you will need to re-compile your `.ko` for every kernel patch.. which is alot.. You may see this error: (**Invalid module format**) ``` # insmod /lib/modules/4.13.0-31-generic/misc/vmnet.ko insmod: ERROR: coul...
966,585
Hi after upgrading to Ubuntu 17.10, vmware is now not starting. I get the message: ``` /usr/lib/vmware/bin/vmware-modconfig: Relink `/lib/x86_64-linux-gnu/libbsd.so.0' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime' ``` I am aware that there are patches available and I am attempting to ap...
2017/10/20
[ "https://askubuntu.com/questions/966585", "https://askubuntu.com", "https://askubuntu.com/users/727651/" ]
I have tried approx all other solutions but nothing worked. But these steps worked for me on Ubuntu 18.04, VMware 12.5.9 ``` git clone https://github.com/mkubecek/vmware-host-modules.git cd vmware-host-modules git checkout workstation-12.5.9 (change it to your version. it's important) make && sudo make install cd /usr...
The bugfix described by: Stephen leads for many to an other bug: "Failed to get gcc information." The **simplest solution** is to **[download vmware player workstation 14.1](https://my.vmware.com/de/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/14_0%7CPLAYER-1411%7Cproduct_downloads)**. Install...
72,426,211
I am using Vue 3 + Vite plugin for Quasar + Pinia for Store management. I followed all official documentation (Quasar, Pinia). But I am getting this error. ``` [Vue warn]: injection "Symbol(pinia)" not found. ... runtime-core.esm-bundler.js:38 [Vue warn]: Unhandled error during execution of setup function...
2022/05/29
[ "https://Stackoverflow.com/questions/72426211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11140420/" ]
The problem was related to WebStorm. It automatically creates this import: ``` import {createPinia} from "pinia/dist/pinia"; ``` instead of this ``` import {createPinia} from 'pinia' ```
For me it was : `import { isTemplateNode } from '@vue/compiler-core'` Cut and reload the server works fine
267,823
In my Linear Algebra and Geometry textbook, it defines the image of a linear transformation $T$ as: $$\operatorname{Im}\, (T) := \{\; w \in W : \; w=Tv \;\;\text{ for some } v \in V \} $$ As far as I can see, this is just the same as: $$\operatorname{Im} \, (T) := \{ \;Tv \in W : \;v \in V\}$$ Is there any differen...
2012/12/30
[ "https://math.stackexchange.com/questions/267823", "https://math.stackexchange.com", "https://math.stackexchange.com/users/34122/" ]
> > Each statement defines the image of the linear tranformation, they just give different ways of describing the SAME EXACT set: **the image of $T$.** > > > Each definition uses [***Set-Builder Notation***](http://en.wikipedia.org/wiki/Set-builder_notation): notation which allows us to describe any given set of ...
Both definitions are the same as you point out, they just give slightly different ways of thinking about the image. The first definition views the image as "Things in $W$ reached by the function". The second takes a more constructive approach, it is saying that we can build the image by taking each element of $V$ and...
267,823
In my Linear Algebra and Geometry textbook, it defines the image of a linear transformation $T$ as: $$\operatorname{Im}\, (T) := \{\; w \in W : \; w=Tv \;\;\text{ for some } v \in V \} $$ As far as I can see, this is just the same as: $$\operatorname{Im} \, (T) := \{ \;Tv \in W : \;v \in V\}$$ Is there any differen...
2012/12/30
[ "https://math.stackexchange.com/questions/267823", "https://math.stackexchange.com", "https://math.stackexchange.com/users/34122/" ]
Both definitions are the same as you point out, they just give slightly different ways of thinking about the image. The first definition views the image as "Things in $W$ reached by the function". The second takes a more constructive approach, it is saying that we can build the image by taking each element of $V$ and...
In certain set-theoretic senses, the first one $$ \{\; w \in W : \; w=Tv \;\;\text{ for some } v \in V \} $$ is exactly what you get by the Axiom of Separation, while the second one $$ \{ \;Tv \in W : \;v \in V\} $$ is taken as a short-hand way of writing it. So perhaps the author thought the first one would be less co...
267,823
In my Linear Algebra and Geometry textbook, it defines the image of a linear transformation $T$ as: $$\operatorname{Im}\, (T) := \{\; w \in W : \; w=Tv \;\;\text{ for some } v \in V \} $$ As far as I can see, this is just the same as: $$\operatorname{Im} \, (T) := \{ \;Tv \in W : \;v \in V\}$$ Is there any differen...
2012/12/30
[ "https://math.stackexchange.com/questions/267823", "https://math.stackexchange.com", "https://math.stackexchange.com/users/34122/" ]
> > Each statement defines the image of the linear tranformation, they just give different ways of describing the SAME EXACT set: **the image of $T$.** > > > Each definition uses [***Set-Builder Notation***](http://en.wikipedia.org/wiki/Set-builder_notation): notation which allows us to describe any given set of ...
In certain set-theoretic senses, the first one $$ \{\; w \in W : \; w=Tv \;\;\text{ for some } v \in V \} $$ is exactly what you get by the Axiom of Separation, while the second one $$ \{ \;Tv \in W : \;v \in V\} $$ is taken as a short-hand way of writing it. So perhaps the author thought the first one would be less co...
23,240,761
How can I adjust the `UITableView` height dynamically? Let's say I have 3 rows and each row has a height of 65. When a new row is added to the `UITableView` i want it to adjust it's height dynamically to fit the new row. And vice versa when a row is deleted to shrink.
2014/04/23
[ "https://Stackoverflow.com/questions/23240761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1129959/" ]
Edit : Misread The thing depends on the (height of table cell row \* number of rows in table) as the tableview.frame.size.height. Well I would suggest something like this.. ``` -(void)correctHeight { //Note : if all cells are having common value CGFloat heightOfCell=[table rowHeight]; CGFloat expectedH...
The tableview height can be set by, ``` [tableView setFrame:CGRectMake(0,0,width,height)]; ``` But for example if u set the height as 150 and you 5 rows of height 60px using tableView:heightForRowAtIndexPath: then the tableView will become scrollable as UITableView is a sub class of UIScrollView.
23,240,761
How can I adjust the `UITableView` height dynamically? Let's say I have 3 rows and each row has a height of 65. When a new row is added to the `UITableView` i want it to adjust it's height dynamically to fit the new row. And vice versa when a row is deleted to shrink.
2014/04/23
[ "https://Stackoverflow.com/questions/23240761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1129959/" ]
Edit : Misread The thing depends on the (height of table cell row \* number of rows in table) as the tableview.frame.size.height. Well I would suggest something like this.. ``` -(void)correctHeight { //Note : if all cells are having common value CGFloat heightOfCell=[table rowHeight]; CGFloat expectedH...
As said in comment, Weird structure, but if you insist, that's okay. I suggest to use a simple `UITableView` only. Assume you have `IBOutlet` to `UITableView` and `UIScrollView`... Before adding codes in `viewWillAppear`, add: ``` float cellHeight = 65.0f; int numberOfCells = 3; ``` In `- (void)viewWillAppear:anim...
23,240,761
How can I adjust the `UITableView` height dynamically? Let's say I have 3 rows and each row has a height of 65. When a new row is added to the `UITableView` i want it to adjust it's height dynamically to fit the new row. And vice versa when a row is deleted to shrink.
2014/04/23
[ "https://Stackoverflow.com/questions/23240761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1129959/" ]
The tableview height can be set by, ``` [tableView setFrame:CGRectMake(0,0,width,height)]; ``` But for example if u set the height as 150 and you 5 rows of height 60px using tableView:heightForRowAtIndexPath: then the tableView will become scrollable as UITableView is a sub class of UIScrollView.
As said in comment, Weird structure, but if you insist, that's okay. I suggest to use a simple `UITableView` only. Assume you have `IBOutlet` to `UITableView` and `UIScrollView`... Before adding codes in `viewWillAppear`, add: ``` float cellHeight = 65.0f; int numberOfCells = 3; ``` In `- (void)viewWillAppear:anim...
69,028,131
Am trying to create a directory with subfolders in my application. The new request will create folders only if the parent folder is already there but not creating if root folder is not there. ``` import { mkdir } from 'fs'; mkdir(join(__dirname, '../folder_to_create_directory/', req.body.path), (err) => { i...
2021/09/02
[ "https://Stackoverflow.com/questions/69028131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3686329/" ]
you are missing an option "{recursive: true}". Try this example: ``` const { mkdir } = require("fs"); const {join} = require('path') const path = join(__dirname, "../folder_to_create_directory", 'test/folder/subfolder') mkdir(path, { recursive: true }, (err) => { if (err) { return "error"; } return "succes...
You can use `fs` library to work with a file system. For nested dirs: ``` var fs = require('fs'); var dir = join(__dirname, '../folder_to_create_directory/', req.body.path); if (!fs.existsSync(dir)){ fs.mkdirSync(dir, { recursive: true }); } ``` Or, for individual dirs: ``` var fs = require('fs'); var dir = j...
1,080,479
$$\lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{x^2-2x})$$ plugging in infinity gives infinity - infinity, what kind of manipulation can I do to solve this?
2014/12/25
[ "https://math.stackexchange.com/questions/1080479", "https://math.stackexchange.com", "https://math.stackexchange.com/users/187264/" ]
There's a subtle point when you algebraically manipulate the expression (this can be seen in several of the given answers): since you can assume that $x<0$ (actually $x<-6$ in order that the expression is meaningful), you have to remember that $$ \sqrt{x^2}=|x|=-x $$ So \begin{align} \lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{...
Note that $$ \sqrt{x^2+6x}-\sqrt{x^2-2x} = \frac{8x}{\sqrt{x^2+6x}+\sqrt{x^2-2x}}, $$so our answer is the limit of the above as $ x \to -\infty $. But note that $ \sqrt {x^2 + 6x} + \sqrt {x^2 - 2x} \sim \mathcal{O}(2x) $, so the answer is $\frac{8}{2}=\boxed{4}$.
1,080,479
$$\lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{x^2-2x})$$ plugging in infinity gives infinity - infinity, what kind of manipulation can I do to solve this?
2014/12/25
[ "https://math.stackexchange.com/questions/1080479", "https://math.stackexchange.com", "https://math.stackexchange.com/users/187264/" ]
Exploit the identity: $$\sqrt{x^2+6x}-\sqrt{x^2-2x} = \frac{8x}{\sqrt{x^2+6x}+\sqrt{x^2-2x}} = \frac{8x}{2|x|+O(1)}.$$
To conclude this The answer is actually -4 , because you can do this step ![and the answer is clearly 4.](https://i.stack.imgur.com/ruKcR.png)
1,080,479
$$\lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{x^2-2x})$$ plugging in infinity gives infinity - infinity, what kind of manipulation can I do to solve this?
2014/12/25
[ "https://math.stackexchange.com/questions/1080479", "https://math.stackexchange.com", "https://math.stackexchange.com/users/187264/" ]
$$\sqrt{x^2+6x}=\sqrt{x^2+6x+9-9}=\sqrt{(x+3)^2-9}\approx |x|+3,\text{ as }x\to-\infty$$ $$\sqrt{x^2-2x}=\sqrt{x^2-2x+1-1}=\sqrt{(x-1)^2-1}\approx |x|-1,\text{ as }x\to-\infty$$
To conclude this The answer is actually -4 , because you can do this step ![and the answer is clearly 4.](https://i.stack.imgur.com/ruKcR.png)
1,080,479
$$\lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{x^2-2x})$$ plugging in infinity gives infinity - infinity, what kind of manipulation can I do to solve this?
2014/12/25
[ "https://math.stackexchange.com/questions/1080479", "https://math.stackexchange.com", "https://math.stackexchange.com/users/187264/" ]
Note that $$ \sqrt{x^2+6x}-\sqrt{x^2-2x} = \frac{8x}{\sqrt{x^2+6x}+\sqrt{x^2-2x}}, $$so our answer is the limit of the above as $ x \to -\infty $. But note that $ \sqrt {x^2 + 6x} + \sqrt {x^2 - 2x} \sim \mathcal{O}(2x) $, so the answer is $\frac{8}{2}=\boxed{4}$.
To conclude this The answer is actually -4 , because you can do this step ![and the answer is clearly 4.](https://i.stack.imgur.com/ruKcR.png)
1,080,479
$$\lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{x^2-2x})$$ plugging in infinity gives infinity - infinity, what kind of manipulation can I do to solve this?
2014/12/25
[ "https://math.stackexchange.com/questions/1080479", "https://math.stackexchange.com", "https://math.stackexchange.com/users/187264/" ]
There's a subtle point when you algebraically manipulate the expression (this can be seen in several of the given answers): since you can assume that $x<0$ (actually $x<-6$ in order that the expression is meaningful), you have to remember that $$ \sqrt{x^2}=|x|=-x $$ So \begin{align} \lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{...
Exploit the identity: $$\sqrt{x^2+6x}-\sqrt{x^2-2x} = \frac{8x}{\sqrt{x^2+6x}+\sqrt{x^2-2x}} = \frac{8x}{2|x|+O(1)}.$$
1,080,479
$$\lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{x^2-2x})$$ plugging in infinity gives infinity - infinity, what kind of manipulation can I do to solve this?
2014/12/25
[ "https://math.stackexchange.com/questions/1080479", "https://math.stackexchange.com", "https://math.stackexchange.com/users/187264/" ]
There's a subtle point when you algebraically manipulate the expression (this can be seen in several of the given answers): since you can assume that $x<0$ (actually $x<-6$ in order that the expression is meaningful), you have to remember that $$ \sqrt{x^2}=|x|=-x $$ So \begin{align} \lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{...
$$\sqrt{x^2+6x}=\sqrt{x^2+6x+9-9}=\sqrt{(x+3)^2-9}\approx |x|+3,\text{ as }x\to-\infty$$ $$\sqrt{x^2-2x}=\sqrt{x^2-2x+1-1}=\sqrt{(x-1)^2-1}\approx |x|-1,\text{ as }x\to-\infty$$
1,080,479
$$\lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{x^2-2x})$$ plugging in infinity gives infinity - infinity, what kind of manipulation can I do to solve this?
2014/12/25
[ "https://math.stackexchange.com/questions/1080479", "https://math.stackexchange.com", "https://math.stackexchange.com/users/187264/" ]
There's a subtle point when you algebraically manipulate the expression (this can be seen in several of the given answers): since you can assume that $x<0$ (actually $x<-6$ in order that the expression is meaningful), you have to remember that $$ \sqrt{x^2}=|x|=-x $$ So \begin{align} \lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{...
Set $-\dfrac1x=h$ to $$x^2+6x=\frac{1-6h}{h^2}\implies\sqrt{x^2+6x}=\frac{\sqrt{1-6h}}{\sqrt{h^2}}$$ and as $x\to-\infty,h\to0^+$ and $h>0,\sqrt{h^2}=+h$ So we have $$\lim\_{x\to-\infty}(\sqrt{x^2+6x}-\sqrt{x^2-2x})=\lim\_{h\to0^+}\frac{\sqrt{1-6h}-\sqrt{1+2h}}h$$ $$=\lim\_{h\to0^+}\frac{1-6h-(1+2h)}{h(\sqrt{1-6h}...
1,080,479
$$\lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{x^2-2x})$$ plugging in infinity gives infinity - infinity, what kind of manipulation can I do to solve this?
2014/12/25
[ "https://math.stackexchange.com/questions/1080479", "https://math.stackexchange.com", "https://math.stackexchange.com/users/187264/" ]
$$\sqrt{x^2+6x}=\sqrt{x^2+6x+9-9}=\sqrt{(x+3)^2-9}\approx |x|+3,\text{ as }x\to-\infty$$ $$\sqrt{x^2-2x}=\sqrt{x^2-2x+1-1}=\sqrt{(x-1)^2-1}\approx |x|-1,\text{ as }x\to-\infty$$
Note that $$ \sqrt{x^2+6x}-\sqrt{x^2-2x} = \frac{8x}{\sqrt{x^2+6x}+\sqrt{x^2-2x}}, $$so our answer is the limit of the above as $ x \to -\infty $. But note that $ \sqrt {x^2 + 6x} + \sqrt {x^2 - 2x} \sim \mathcal{O}(2x) $, so the answer is $\frac{8}{2}=\boxed{4}$.
1,080,479
$$\lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{x^2-2x})$$ plugging in infinity gives infinity - infinity, what kind of manipulation can I do to solve this?
2014/12/25
[ "https://math.stackexchange.com/questions/1080479", "https://math.stackexchange.com", "https://math.stackexchange.com/users/187264/" ]
Set $-\dfrac1x=h$ to $$x^2+6x=\frac{1-6h}{h^2}\implies\sqrt{x^2+6x}=\frac{\sqrt{1-6h}}{\sqrt{h^2}}$$ and as $x\to-\infty,h\to0^+$ and $h>0,\sqrt{h^2}=+h$ So we have $$\lim\_{x\to-\infty}(\sqrt{x^2+6x}-\sqrt{x^2-2x})=\lim\_{h\to0^+}\frac{\sqrt{1-6h}-\sqrt{1+2h}}h$$ $$=\lim\_{h\to0^+}\frac{1-6h-(1+2h)}{h(\sqrt{1-6h}...
To conclude this The answer is actually -4 , because you can do this step ![and the answer is clearly 4.](https://i.stack.imgur.com/ruKcR.png)
1,080,479
$$\lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{x^2-2x})$$ plugging in infinity gives infinity - infinity, what kind of manipulation can I do to solve this?
2014/12/25
[ "https://math.stackexchange.com/questions/1080479", "https://math.stackexchange.com", "https://math.stackexchange.com/users/187264/" ]
There's a subtle point when you algebraically manipulate the expression (this can be seen in several of the given answers): since you can assume that $x<0$ (actually $x<-6$ in order that the expression is meaningful), you have to remember that $$ \sqrt{x^2}=|x|=-x $$ So \begin{align} \lim\_{x\to-∞}(\sqrt{x^2+6x}-\sqrt{...
To conclude this The answer is actually -4 , because you can do this step ![and the answer is clearly 4.](https://i.stack.imgur.com/ruKcR.png)
24,078,625
alright so i've got two tables here, `gforum_Post` and `gforum_PostView` i'm trying to get information from the table `gforum_Post` where it has the same post\_id. ``` "SELECT post_subject, post_username FROM `gforum_Post` WHERE post_id = 341" ``` i've got it to display what i want but it's hard coded, the data in...
2014/06/06
[ "https://Stackoverflow.com/questions/24078625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3387520/" ]
> > I've recently been updating an ASP.NET 2.0 project that includes a legacy ASMX web service to ASP.NET 4.5. > > > The first thing to do is ensure that [`httpRuntime@targetFramework` is set to `4.5` in your `web.config`](http://blogs.msdn.com/b/webdev/archive/2012/11/19/all-about-httpruntime-targetframework.aspx...
Upon further investigation, I discovered that sub-tasks created by the initial task could be awaited without any problems, but the parent task (i.e. the method call in the ASMX that returned a Task<T>) was never detected as completing. The investigation led me to theorise that there was some sort of incompatibility b...
24,078,625
alright so i've got two tables here, `gforum_Post` and `gforum_PostView` i'm trying to get information from the table `gforum_Post` where it has the same post\_id. ``` "SELECT post_subject, post_username FROM `gforum_Post` WHERE post_id = 341" ``` i've got it to display what i want but it's hard coded, the data in...
2014/06/06
[ "https://Stackoverflow.com/questions/24078625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3387520/" ]
Upon further investigation, I discovered that sub-tasks created by the initial task could be awaited without any problems, but the parent task (i.e. the method call in the ASMX that returned a Task<T>) was never detected as completing. The investigation led me to theorise that there was some sort of incompatibility b...
This may be an old topic but it contains the best answer I have been able to find to help maintain legacy code using ASMX and WebMethod to call newer async functions synchronously. I am new to contributing to stackoverflow so I don't have the reputation to post a comment to Graham Watts solution. I shouldn't really be...
24,078,625
alright so i've got two tables here, `gforum_Post` and `gforum_PostView` i'm trying to get information from the table `gforum_Post` where it has the same post\_id. ``` "SELECT post_subject, post_username FROM `gforum_Post` WHERE post_id = 341" ``` i've got it to display what i want but it's hard coded, the data in...
2014/06/06
[ "https://Stackoverflow.com/questions/24078625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3387520/" ]
> > I've recently been updating an ASP.NET 2.0 project that includes a legacy ASMX web service to ASP.NET 4.5. > > > The first thing to do is ensure that [`httpRuntime@targetFramework` is set to `4.5` in your `web.config`](http://blogs.msdn.com/b/webdev/archive/2012/11/19/all-about-httpruntime-targetframework.aspx...
This may be an old topic but it contains the best answer I have been able to find to help maintain legacy code using ASMX and WebMethod to call newer async functions synchronously. I am new to contributing to stackoverflow so I don't have the reputation to post a comment to Graham Watts solution. I shouldn't really be...
136,250
When I do export of products to csv all 'additional\_attributes' are in one column. This is not comfortable to read for client or content manager via MsExcel for example. Need that all the custom attributes were in separate columns. Any ideas how to implement this feature or how to make this manually? Maybe somewher...
2016/09/14
[ "https://magento.stackexchange.com/questions/136250", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/38087/" ]
This may not have been around when you asked this question almost 3 years ago, but, yes, there is a free extension that claims to do what you need: [BSS Custom Product Attribute Export](https://bsscommerce.com/magento-2-custom-product-attribute-export-extension.html). It states that you can select which attributes to ...
Magento 2 admin includes enhanced export functionality. You can export products to CSV with any related attributes you have. You can also filter products by some attributes before export. If you are looking for more flexible export tools or need to export them selectively, you can look for some at [www.magentocommerce....
445,175
*Одесса, где все до последней травинки малой настояно юмором, самоиронией. Где шутят все и над всеми. Где Черное море смягчает нравы, **оттого** народ получается добродушный и незлобивый. Где ты, старая добрая Одесса?..* [И. Невинная. Швондер на все времена.](https://www.mke.ee/mnenie/pamyati-romana-kartseva-malenki...
2018/11/08
[ "https://rus.stackexchange.com/questions/445175", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/185295/" ]
Мне кажется, что ни выбери — всё хорошо будет. Здесь "ни" усилительная частица (нет отрицания). Предложение "что ни выбери — всё хорошо будет" — сложноподчиненное, "ни" относится к союзному слову "что". Сочетания *как ни, сколько ни, что ни, когда ни* и др. входят в состав уступительного придаточного. Например: Когд...
**Мне кажется, что ни выбери — всё хорошо будет.** Речь идет о выборе, а не о его отрицании, здесь НИ - услилительная частица.