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
79,070
As days tick off of call options, time value decays. My question is does that happen automatically at 9:30AM at market open or does it get continuously deducted as the day ticks on?
2017/04/26
[ "https://money.stackexchange.com/questions/79070", "https://money.stackexchange.com", "https://money.stackexchange.com/users/41914/" ]
The time value decay is theoretically constant. In reality, it is driven by supply and demand, just like everything else in the market. For instance, if a big earnings announcement is coming out after the close for the day, you may see little or no time decay in the price of the options during the day before. Also, ...
The time value of the option (theta) decays constantly (by the millisecond) As it is one of the inputs to the option pricing model, it usually has a lower impact on the overall option price than other changes in the market. As the (US) markets price options in penny ($0.01) or nickel ($0.05) increments, you will only...
79,070
As days tick off of call options, time value decays. My question is does that happen automatically at 9:30AM at market open or does it get continuously deducted as the day ticks on?
2017/04/26
[ "https://money.stackexchange.com/questions/79070", "https://money.stackexchange.com", "https://money.stackexchange.com/users/41914/" ]
The time value decay is theoretically constant. In reality, it is driven by supply and demand, just like everything else in the market. For instance, if a big earnings announcement is coming out after the close for the day, you may see little or no time decay in the price of the options during the day before. Also, ...
This has been my observation in the markets pertaining to option decay. Bulk of the decay happens in the first 15 minutes of trade at market open. Rest of the decay usually happens in pulses whenever market breaks out of ranges intraday. So if its call option and market breaks a range to the downside, call option will ...
79,070
As days tick off of call options, time value decays. My question is does that happen automatically at 9:30AM at market open or does it get continuously deducted as the day ticks on?
2017/04/26
[ "https://money.stackexchange.com/questions/79070", "https://money.stackexchange.com", "https://money.stackexchange.com/users/41914/" ]
It has been my experience as an amateur trader, theory aside, that I generally see the time value come off at market open and not much during the trading day.
The time value of the option (theta) decays constantly (by the millisecond) As it is one of the inputs to the option pricing model, it usually has a lower impact on the overall option price than other changes in the market. As the (US) markets price options in penny ($0.01) or nickel ($0.05) increments, you will only...
79,070
As days tick off of call options, time value decays. My question is does that happen automatically at 9:30AM at market open or does it get continuously deducted as the day ticks on?
2017/04/26
[ "https://money.stackexchange.com/questions/79070", "https://money.stackexchange.com", "https://money.stackexchange.com/users/41914/" ]
It has been my experience as an amateur trader, theory aside, that I generally see the time value come off at market open and not much during the trading day.
This has been my observation in the markets pertaining to option decay. Bulk of the decay happens in the first 15 minutes of trade at market open. Rest of the decay usually happens in pulses whenever market breaks out of ranges intraday. So if its call option and market breaks a range to the downside, call option will ...
79,070
As days tick off of call options, time value decays. My question is does that happen automatically at 9:30AM at market open or does it get continuously deducted as the day ticks on?
2017/04/26
[ "https://money.stackexchange.com/questions/79070", "https://money.stackexchange.com", "https://money.stackexchange.com/users/41914/" ]
The time value of the option (theta) decays constantly (by the millisecond) As it is one of the inputs to the option pricing model, it usually has a lower impact on the overall option price than other changes in the market. As the (US) markets price options in penny ($0.01) or nickel ($0.05) increments, you will only...
This has been my observation in the markets pertaining to option decay. Bulk of the decay happens in the first 15 minutes of trade at market open. Rest of the decay usually happens in pulses whenever market breaks out of ranges intraday. So if its call option and market breaks a range to the downside, call option will ...
1,436,496
After upgrading to 22.10, my WiFi is not worling properly. I am using a MacBook Pro, with a Broadcom device.. LAN works fine, i can ping other devices on my home network, I can remote control the MacBook from a windows computer and I can ping 8.8.8.8, but can't access the internet and it seems like the network-manager ...
2022/10/21
[ "https://askubuntu.com/questions/1436496", "https://askubuntu.com", "https://askubuntu.com/users/1631565/" ]
I fixed it! /etc/resolv.conf was corrupt or something.. I did ``` sudo rm /etc/resolv.conf ``` then I created a new resolv.conf ``` sudo nano /etc/resolv.conf ``` and added the line ``` nameserver 8.8.8.8 ``` after that I reconnected to my WiFi and I am back in the game Thank you for taking the time to hep me...
A wrong driver is installed. Run ``` sudo apt purge bcmwl-kernel-source sudo apt install firmware-b43-installer sudo modprobe b43 ```
61,522,334
In this example below M = 10 and N = 2, and since M is considerably larger than 2\*\*N, the probability is that every possible combination of N booleans, (True, True), (True False), (False, True), (False, False) in this example, will be generated among the M outputs at least once, as has occurred below. ``` for _ in ...
2020/04/30
[ "https://Stackoverflow.com/questions/61522334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3265562/" ]
It would be nice to see were exactly you had problems in accessing/calling the pandas dataframe. Here is possible solution based on `rolling(win)` and `max()`: ``` import pandas as pd d = dict(row = [0,0,0,0,0,0,0,1,0,0,0,0,0,0]) df = pd.DataFrame(d) win = 6 df['winMax'] = df.rolling(win).max().shift(-win+1) print(...
Possible solution by pandasql. Is there a way to avoid using it? ``` from pandasql import sqldf df_final = sqldf("""SELECT id, date, target_row, MAX(target_row) OVER (PARTITION BY id ORDER BY date ROWS BETWEEN CURRENT ROW AND 6 FOLLOWING) FROM df """) ```
73,539,012
Ok in my code i was trying to get the camera to follow my player and i was following a tutorial i found on stack overflow. But when I did it the player "fell" and rotates on its y axis how did this happen and also I tried to spawn the ground class but i dont think i did. And looked on all the docs for ursina and lookin...
2022/08/30
[ "https://Stackoverflow.com/questions/73539012", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19353262/" ]
You can add this in another migration file. ```php use Illuminate\Support\Facades\DB; public function up() { // ini_set('memory_limit', '-1'); <-- you can add this in case the file is big DB::unprepared(file_get_contents('path/to/dump.sql')); } ```
You're not limited to migration or migration related procedures when writing a migration. So yes you can run insert queries etc. Safer would be to separate table creation migration and data insert migration. But you may also do it in same migration too. ``` Schema::create('your_tables', function (Blueprint $table) { ...
59,472,319
The question is probably rather unclear, but i did not how to formulate it, maybe that was the reason why i was not able to find solution to this puzzle i have. anyway, here is an example of what i want to accomplish: ``` <Calendar tileContent={({ activeStartDate, date, view }) => this.renderGames(date, ...
2019/12/24
[ "https://Stackoverflow.com/questions/59472319", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11740922/" ]
`-1100` means `NSURLErrorFileDoesNotExist`. Also there is a possibility, that the server does not return a file [to specific country](https://github.com/SDWebImage/SDWebImage/issues/986#issuecomment-93899157) or due to [specific symbols](https://github.com/SDWebImage/SDWebImage/issues/1126) in the `urlString`. In this ...
I have encountered the problem too, and my solution was done by ADDING `"SD_WEBP=1"` into your `SDWebImage` target -> `Build Settings` -> `Preprocessor Macros`. [![enter image description here](https://i.stack.imgur.com/6r1st.png)](https://i.stack.imgur.com/6r1st.png)
392,931
Similes and metaphors drawn analogies, compare things. Is there another rhetorical term for when someone wants to draw a ***disanalogy***? I can imagine a poet or at least rhetorician wanting to say e.g. that their lover's eyes are *not like* pearls, but far lovelier.
2017/06/07
[ "https://english.stackexchange.com/questions/392931", "https://english.stackexchange.com", "https://english.stackexchange.com/users/-1/" ]
Have you looked at *dissimile*? > > a [rhetorical] comparison of two dissimilar objects for the purpose of illustration > > > <https://www.collinsdictionary.com/us/dictionary/english/dissimile>
If the contrast is explicit then it's exactly that, a literary contrast. > > In literature, an author uses contrast when he or she describes the > difference(s) between two or more entities. For example, in the first > four lines of William Shakespeare's Sonnet 130, Shakespeare contrasts > a mistress to the sun, c...
237,300
I understand Cantor's diagonal argument, but it just doesn't seem to jive for some reason. Lets say I assign the following numbers ad infinitum... 1. $1\to 0.1$ 2. $2\to 0.2$ 3. $3\to 0.3$ ... 4. $10\to 0.10$ 5. $11\to 0.11$ and so on... How come there's supposedly at least one more real number than you can map to a...
2012/11/14
[ "https://math.stackexchange.com/questions/237300", "https://math.stackexchange.com", "https://math.stackexchange.com/users/39748/" ]
If we apply the Cantor diagonal argument to the list you have there, and assign the $n$th digit in our constructed number to be 0 if the $n$th digit of the $n$th number in the list is 1, and 1 if it isn't, we construct the real number $0.0111111\ldots$ (which happens to be equal to $\frac1{90}$) and in fact is not anyw...
Let's look at the interval $0 < x < 1.$ Let's assume all of its numbers are countable, i.e. they are listable. Let's say the list goes like: 1. 0.12345... 2. 0.32145... 3. 0.87654... 4. 0.28374... 5. 0.67676... 6. etc... From the list, I make a new number. Its first decimal place is the same as the first number's, it...
237,300
I understand Cantor's diagonal argument, but it just doesn't seem to jive for some reason. Lets say I assign the following numbers ad infinitum... 1. $1\to 0.1$ 2. $2\to 0.2$ 3. $3\to 0.3$ ... 4. $10\to 0.10$ 5. $11\to 0.11$ and so on... How come there's supposedly at least one more real number than you can map to a...
2012/11/14
[ "https://math.stackexchange.com/questions/237300", "https://math.stackexchange.com", "https://math.stackexchange.com/users/39748/" ]
If we apply the Cantor diagonal argument to the list you have there, and assign the $n$th digit in our constructed number to be 0 if the $n$th digit of the $n$th number in the list is 1, and 1 if it isn't, we construct the real number $0.0111111\ldots$ (which happens to be equal to $\frac1{90}$) and in fact is not anyw...
*How come there's supposedly at least one more real number than you can map to a member of $\mathbb N$?* Well, suppose there isn't - that Cantor's conclusion, his *theorem*, is wrong, because our enumeration covers all real numbers. Wonderful, but let us see what happens when we take our enumeration and apply Cantor's...
237,300
I understand Cantor's diagonal argument, but it just doesn't seem to jive for some reason. Lets say I assign the following numbers ad infinitum... 1. $1\to 0.1$ 2. $2\to 0.2$ 3. $3\to 0.3$ ... 4. $10\to 0.10$ 5. $11\to 0.11$ and so on... How come there's supposedly at least one more real number than you can map to a...
2012/11/14
[ "https://math.stackexchange.com/questions/237300", "https://math.stackexchange.com", "https://math.stackexchange.com/users/39748/" ]
If we apply the Cantor diagonal argument to the list you have there, and assign the $n$th digit in our constructed number to be 0 if the $n$th digit of the $n$th number in the list is 1, and 1 if it isn't, we construct the real number $0.0111111\ldots$ (which happens to be equal to $\frac1{90}$) and in fact is not anyw...
Cantor's diagonal is a trick to show that given **any** list of reals, a real can be found that is not in the list. First a few properties: * You know that two numbers differ if just one digit differs. * If a number shares the previous property with every number in a set, it is not part of the set. Cantor's diagona...
237,300
I understand Cantor's diagonal argument, but it just doesn't seem to jive for some reason. Lets say I assign the following numbers ad infinitum... 1. $1\to 0.1$ 2. $2\to 0.2$ 3. $3\to 0.3$ ... 4. $10\to 0.10$ 5. $11\to 0.11$ and so on... How come there's supposedly at least one more real number than you can map to a...
2012/11/14
[ "https://math.stackexchange.com/questions/237300", "https://math.stackexchange.com", "https://math.stackexchange.com/users/39748/" ]
Let's look at the interval $0 < x < 1.$ Let's assume all of its numbers are countable, i.e. they are listable. Let's say the list goes like: 1. 0.12345... 2. 0.32145... 3. 0.87654... 4. 0.28374... 5. 0.67676... 6. etc... From the list, I make a new number. Its first decimal place is the same as the first number's, it...
*How come there's supposedly at least one more real number than you can map to a member of $\mathbb N$?* Well, suppose there isn't - that Cantor's conclusion, his *theorem*, is wrong, because our enumeration covers all real numbers. Wonderful, but let us see what happens when we take our enumeration and apply Cantor's...
237,300
I understand Cantor's diagonal argument, but it just doesn't seem to jive for some reason. Lets say I assign the following numbers ad infinitum... 1. $1\to 0.1$ 2. $2\to 0.2$ 3. $3\to 0.3$ ... 4. $10\to 0.10$ 5. $11\to 0.11$ and so on... How come there's supposedly at least one more real number than you can map to a...
2012/11/14
[ "https://math.stackexchange.com/questions/237300", "https://math.stackexchange.com", "https://math.stackexchange.com/users/39748/" ]
Let's look at the interval $0 < x < 1.$ Let's assume all of its numbers are countable, i.e. they are listable. Let's say the list goes like: 1. 0.12345... 2. 0.32145... 3. 0.87654... 4. 0.28374... 5. 0.67676... 6. etc... From the list, I make a new number. Its first decimal place is the same as the first number's, it...
Cantor's diagonal is a trick to show that given **any** list of reals, a real can be found that is not in the list. First a few properties: * You know that two numbers differ if just one digit differs. * If a number shares the previous property with every number in a set, it is not part of the set. Cantor's diagona...
237,300
I understand Cantor's diagonal argument, but it just doesn't seem to jive for some reason. Lets say I assign the following numbers ad infinitum... 1. $1\to 0.1$ 2. $2\to 0.2$ 3. $3\to 0.3$ ... 4. $10\to 0.10$ 5. $11\to 0.11$ and so on... How come there's supposedly at least one more real number than you can map to a...
2012/11/14
[ "https://math.stackexchange.com/questions/237300", "https://math.stackexchange.com", "https://math.stackexchange.com/users/39748/" ]
*How come there's supposedly at least one more real number than you can map to a member of $\mathbb N$?* Well, suppose there isn't - that Cantor's conclusion, his *theorem*, is wrong, because our enumeration covers all real numbers. Wonderful, but let us see what happens when we take our enumeration and apply Cantor's...
Cantor's diagonal is a trick to show that given **any** list of reals, a real can be found that is not in the list. First a few properties: * You know that two numbers differ if just one digit differs. * If a number shares the previous property with every number in a set, it is not part of the set. Cantor's diagona...
30,455,386
Is it possible to pass defined in 'config' section of package.json variables to browserify? All is running from 'script' section such: ``` "config": { "API": "somePathToAPI", "port": 9999 }, "scripts": { "prewatch:js": "browserify app/js/app.js -o out/bundle.js -d", "watch:js": "watchify app/js/app.js ...
2015/05/26
[ "https://Stackoverflow.com/questions/30455386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/638886/" ]
All values in your `package.json` are exported to the environment. The variable names should be `$npm_package_config_API` and `$npm_package_config_port`. You can see all the exported variables by running `npm run env`. *(Depending on your version of `npm`, you may need to add the `env` script yourself: `"scripts": { "...
there is no way to access them in clientside js code, but on serverside code: ``` var port = process.env.npm_package_config_port; var api = process.env.npm_package_config_API; ``` EDIT: You could create a cookie with `port` and `API` server-side and send it to the client.
9,580,642
I have one huge project that I use only for source viewing. But the building of that project required to much time. However, I want to disable the automatically build only for this project. Is it possible? thx
2012/03/06
[ "https://Stackoverflow.com/questions/9580642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/597624/" ]
Not sure what you are trying to achieve here, but you can also disable individual builders for a project via Project Properties.
Create two working sets - one with and one without the big project. Then switch between the two working sets as you need and build as you need, and try to experiment with this feature. From the help docs: > > Working sets may also be a part of a manual build workflow. With > autobuild disabled the Project > Build W...
9,580,642
I have one huge project that I use only for source viewing. But the building of that project required to much time. However, I want to disable the automatically build only for this project. Is it possible? thx
2012/03/06
[ "https://Stackoverflow.com/questions/9580642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/597624/" ]
Not sure what you are trying to achieve here, but you can also disable individual builders for a project via Project Properties.
One simple solution is launch another instance of Eclipse in a separate workspace and operate this project only, with auto-build turned off. Unless your RAM is heavily loaded, a separate Eclipse instance is better choice for such need.
9,580,642
I have one huge project that I use only for source viewing. But the building of that project required to much time. However, I want to disable the automatically build only for this project. Is it possible? thx
2012/03/06
[ "https://Stackoverflow.com/questions/9580642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/597624/" ]
Not sure what you are trying to achieve here, but you can also disable individual builders for a project via Project Properties.
The best approach is to use the Inclusion and Exclusion Patterns option in the Java Build Path. For example if you want to exclude one project of being automatically build: 1- Go to its Properties->Java Build Path->Source. 2- Expand the folder in the "Source folders on the build path:" area 3- Select Ex...
48,876,073
``` $ mvn dependency:tree -Dincludes=com.fasterxml.jackson.core [INFO] Scanning for projects... Downloading from central: https://repo.maven.apache.org/maven2/org/jooq/jooq-codegen-maven/3.9.1/jooq-codegen-maven-3.9.1.pom ``` I am executing this command, but it takes forever and got stuck here. My network is all good...
2018/02/20
[ "https://Stackoverflow.com/questions/48876073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/697911/" ]
I've seen all kinds of problems with this. No idea what your specific issue is but here's a few possibilities * Your traffic is going through some kind of stateful package inspection/firewall/antivirus/IDS/bluecoat/etc and it's interfering and/or silently dropping the connection * There's some issues validating the ce...
To troubleshoot run mvn with --debug flat to see any issues to find if mvn is stuck on any command. Based on this, if you still need help, please update this question ``` mvn --debug ... ```
17,678,586
How to install sbcl in os linux for a freshman of lisp. I found just use the command sh install.sh the error info is: src/runtime/sbcl not found, aborting installation
2013/07/16
[ "https://Stackoverflow.com/questions/17678586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1323130/" ]
If you are using the Debian or Ubuntu distributions, you can install SBCL from their repositories: just type `sudo apt-get install sbcl`.
What flavor of linux? If you use a popular distribution, e.g., debian, ubuntu, fedora, &c, then sbcl comes prepackaged: `aptitude install sbcl` or `yum install sbcl`.
17,678,586
How to install sbcl in os linux for a freshman of lisp. I found just use the command sh install.sh the error info is: src/runtime/sbcl not found, aborting installation
2013/07/16
[ "https://Stackoverflow.com/questions/17678586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1323130/" ]
If you are using the Debian or Ubuntu distributions, you can install SBCL from their repositories: just type `sudo apt-get install sbcl`.
As it says on [SBCL's download page](http://www.sbcl.org/platform-table.html), if you have git access, you can run the command `git clone git://git.code.sf.net/p/sbcl/sbcl` to get the development version to compile from. To get the binary alone, you may use the following commands depending on your CPU architecture: x...
17,678,586
How to install sbcl in os linux for a freshman of lisp. I found just use the command sh install.sh the error info is: src/runtime/sbcl not found, aborting installation
2013/07/16
[ "https://Stackoverflow.com/questions/17678586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1323130/" ]
If you are using the Debian or Ubuntu distributions, you can install SBCL from their repositories: just type `sudo apt-get install sbcl`.
in file which include to archive with sources and named INSTALL we see next text: > > end of section 2.1 > > > ... > Now you should have the same src/runtime/sbcl and output/sbcl.core > files that come with the binary distribution, and you can install > them as described in the section 1. "BINARY DISTRIBUTION". ...
17,678,586
How to install sbcl in os linux for a freshman of lisp. I found just use the command sh install.sh the error info is: src/runtime/sbcl not found, aborting installation
2013/07/16
[ "https://Stackoverflow.com/questions/17678586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1323130/" ]
If you are using the Debian or Ubuntu distributions, you can install SBCL from their repositories: just type `sudo apt-get install sbcl`.
install the binary first <http://sourceforge.net/projects/sbcl/files/sbcl/1.2.7/sbcl-1.2.7> then install the latest version <http://sourceforge.net/projects/sbcl/files/sbcl/1.2.16/sbcl-1.2.16-source.tar.bz2/download?use_mirror=iweb&download=>
33,875,840
The first way looks like this: ``` int *p_number = &number; ``` And the second like: ``` int *p_number; p_number = &number; ``` I don't get why the first way look as it looks, because I get that `p_number` is the address of `int *p_number` and we are basically giving `p_number` the address of `number` with the `&...
2015/11/23
[ "https://Stackoverflow.com/questions/33875840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2608572/" ]
I believe what's confusing you is the syntax ``` int *p_number = &number; ``` well, you can rewrite it as ``` int* p_number = &number; ``` which is same as ``` int *p_number; p_number = &number; ``` The first one is actually a combined step of definition and initialization.
``` int *p_number = &number; ``` This consists of two parts: a declartion of `p_number`, followed by its initializer `= &number` (read as "is address of number"). ``` int *p_number; p_number = &number; ``` This does the same, but is conceptually a bit different. The first line is the declaration (same as in previo...
33,875,840
The first way looks like this: ``` int *p_number = &number; ``` And the second like: ``` int *p_number; p_number = &number; ``` I don't get why the first way look as it looks, because I get that `p_number` is the address of `int *p_number` and we are basically giving `p_number` the address of `number` with the `&...
2015/11/23
[ "https://Stackoverflow.com/questions/33875840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2608572/" ]
I believe what's confusing you is the syntax ``` int *p_number = &number; ``` well, you can rewrite it as ``` int* p_number = &number; ``` which is same as ``` int *p_number; p_number = &number; ``` The first one is actually a combined step of definition and initialization.
Only the first of these is initializing the pointer. The second creates an uninitialized pointer, and then assigns a value to it. The net effect of these is the same (you have a pointer variable that points at a particular thing), and the code generated by the compiler is likely identical. The thing that seems to be c...
33,875,840
The first way looks like this: ``` int *p_number = &number; ``` And the second like: ``` int *p_number; p_number = &number; ``` I don't get why the first way look as it looks, because I get that `p_number` is the address of `int *p_number` and we are basically giving `p_number` the address of `number` with the `&...
2015/11/23
[ "https://Stackoverflow.com/questions/33875840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2608572/" ]
Only the first of these is initializing the pointer. The second creates an uninitialized pointer, and then assigns a value to it. The net effect of these is the same (you have a pointer variable that points at a particular thing), and the code generated by the compiler is likely identical. The thing that seems to be c...
``` int *p_number = &number; ``` This consists of two parts: a declartion of `p_number`, followed by its initializer `= &number` (read as "is address of number"). ``` int *p_number; p_number = &number; ``` This does the same, but is conceptually a bit different. The first line is the declaration (same as in previo...
13,494,551
I'm generating tables of buttons with php ``` echo ' <td"> <form action="test.php" method="POST"> <input type="hidden" id="node" name="node" value="'.$fnode->{'name'}.'"> <input type="hidden" id="service" name="service" value="'.$flavor.'"> <input type="hidden" id="running" name="running" value="false"> <input type="s...
2012/11/21
[ "https://Stackoverflow.com/questions/13494551", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1745424/" ]
You can grab the parent form of the button clicked easily enough, but youll also probably want to have a unique ID on the form for other things. Also you need to either remove the ids on the inputs or make them unique. ``` echo ' <td"> <form action="test.php" method="POST" id="form_node_' . $fnode->{'name'} . '> <inpu...
The best way is to use unique IDs for form elements. Another way is to set classes to multiple elements with the same name. However, the following approach is much preferable: ``` $("form").on("submit", function() { $.ajax({ type: "POST", url: "test.php", data: $(this).serialize(), ...
13,494,551
I'm generating tables of buttons with php ``` echo ' <td"> <form action="test.php" method="POST"> <input type="hidden" id="node" name="node" value="'.$fnode->{'name'}.'"> <input type="hidden" id="service" name="service" value="'.$flavor.'"> <input type="hidden" id="running" name="running" value="false"> <input type="s...
2012/11/21
[ "https://Stackoverflow.com/questions/13494551", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1745424/" ]
You can grab the parent form of the button clicked easily enough, but youll also probably want to have a unique ID on the form for other things. Also you need to either remove the ids on the inputs or make them unique. ``` echo ' <td"> <form action="test.php" method="POST" id="form_node_' . $fnode->{'name'} . '> <inpu...
You can give each submit buttons an id: ``` <input id="button-1" type="submit" value="OFF" class="button"> ``` and then trigger the event on click of a specific button: ``` $("#button-1").click(function() { ... }); ```
70
Is it because it has super massive gravity and energy? Or is it some sort of an anti-light component in it because it used to be a star?
2013/09/25
[ "https://astronomy.stackexchange.com/questions/70", "https://astronomy.stackexchange.com", "https://astronomy.stackexchange.com/users/69/" ]
Gravity is a force, and it need not have a "speed"1. A gravitational body sets up a gravitational field around itself. Note that by the time the light wave approaches the body, *this field has already been set up*. The gravitational force does not need to "reach out" and "catch up to the light" — it's already there. ...
What happens is that the gravity produced by a black hole is simply so great that it warps the spacetime fabric in such a way that any light which crosses the [event horizon](http://en.wikipedia.org/wiki/Event_horizon) is funneled in by the fabric itself - it's a crazy notion, and one hard to get your head around. This...
70
Is it because it has super massive gravity and energy? Or is it some sort of an anti-light component in it because it used to be a star?
2013/09/25
[ "https://astronomy.stackexchange.com/questions/70", "https://astronomy.stackexchange.com", "https://astronomy.stackexchange.com/users/69/" ]
What happens is that the gravity produced by a black hole is simply so great that it warps the spacetime fabric in such a way that any light which crosses the [event horizon](http://en.wikipedia.org/wiki/Event_horizon) is funneled in by the fabric itself - it's a crazy notion, and one hard to get your head around. This...
Well, I have no astronomical background, so in layman's terms, > > If nothing travels at the speed of light, except light, how can a black hole also pull light into itself? > > > I believe OP is confused over how a gravity wave can capture light if both can travel at most at the speed C. It does not work quite...
70
Is it because it has super massive gravity and energy? Or is it some sort of an anti-light component in it because it used to be a star?
2013/09/25
[ "https://astronomy.stackexchange.com/questions/70", "https://astronomy.stackexchange.com", "https://astronomy.stackexchange.com/users/69/" ]
Gravity is a force, and it need not have a "speed"1. A gravitational body sets up a gravitational field around itself. Note that by the time the light wave approaches the body, *this field has already been set up*. The gravitational force does not need to "reach out" and "catch up to the light" — it's already there. ...
Well, I have no astronomical background, so in layman's terms, > > If nothing travels at the speed of light, except light, how can a black hole also pull light into itself? > > > I believe OP is confused over how a gravity wave can capture light if both can travel at most at the speed C. It does not work quite...
45,884,963
I have 575 bz2 files with average size 3G and need to convert them to .gz format to make them compatible with a downstream pipeline. ``` $ ll -h | head total 1.4T drwxrws---+ 1 dz33 dcistat 24K Aug 23 09:21 ./ drwxrws---+ 1 dz33 dcistat 446 Aug 22 11:57 ../ -rw-rw---- 1 dz33 dcistat 2.0G Aug 22 11:38 DRR091550_1.fa...
2017/08/25
[ "https://Stackoverflow.com/questions/45884963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3015453/" ]
Do them simply and fast in parallel with **GNU Parallel**: ``` parallel --dry-run 'bzcat {} | gzip -c > {.}.gz' ::: *bz2 ``` **Sample Output** ``` bzcat a.bz2 | gzip -c > a.gz bzcat b.bz2 | gzip -c > b.gz bzcat c.bz2 | gzip -c > c.gz ``` If you like how it looks, remove the `--dry-run`. Maybe add a progress meter...
In a terminal, change directory to the one containing the .bz files, then use the following command: ``` for f in *.bz; do bzcat "$f" | gzip -c >"${f%.*}.gz"; done ``` This will process each file, one at a time, and give the .gz file the name of the .bz file. Example: `DRR091550_1.fastq.bz2` will become `DRR091550_...
1,704,474
Determine all the holomorphic functions $f$ from the open unit disk $D=\{z:|z|<1\}$ to whole complex plane which satisfies $f''(\frac{1}{n})+f(\frac{1}{n})=0$ for all $n=2,3,4,\ldots$ At first when i saw the differential equation, all i thought is the sine and cosine function, but the trouble is i dont know how should...
2016/03/19
[ "https://math.stackexchange.com/questions/1704474", "https://math.stackexchange.com", "https://math.stackexchange.com/users/317077/" ]
Some people are mentioning the "identity theorem", which is reported in [this Wikipedia article](https://en.wikipedia.org/wiki/Identity_theorem) to say that if two holomorphic functions defined on some open subset $D$ of the plane agree with each other on some non-empty open subset of $D$, then the agree on $D$. But he...
Here's a hint: let $g = f'' + f$. What then do you know about $g$? (Think identity theorem.)
36,887,692
Here is my code. ``` UIApplicationShortcutItem *bookmarksShortcutItem = [[UIApplicationShortcutItem alloc] initWithType:@"bookmarks" localizedTitle:@"Bookmarks" localizedSubtitle:@"test" icon:[UIApplicationShortcutIcon iconWithType:UIApplicationShortcutIconTypeBookmark] userInfo:@{@"type":@"bookmarks"}]; ``` So ...
2016/04/27
[ "https://Stackoverflow.com/questions/36887692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4562216/" ]
This is how you do it: ``` UIApplicationShortcutIcon *shortcutIcon = [UIApplicationShortcutIcon iconWithTemplateImageName:@"IMAGE_NAME"]; UIMutableApplicationShortcutItem *option = [[UIMutableApplicationShortcutItem alloc] initWithType:@"uniqueIdentifier" ...
Under UIApplicationShortcutItems you can specify your shortcuts, but you should do this in your plist rather than in the code. There you can create a dictionairy for every ShortcutAction and with UIApplicationShortcutItemIconFile you can define your own Icon. This could be helpful for you: <http://www.the-nerd.be/201...
58,293,234
I have got a list with keywords. And I coded a method that if a string contains keyword from list, the method must remove keyword from string. Here is the method: ``` private string RemoveFromList(string sentence) { var lists = new List<string>{ "ask-", "que-", "(app)", "(exe)", "(foo)" }; var control = lists....
2019/10/08
[ "https://Stackoverflow.com/questions/58293234", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1827846/" ]
Using `string.Replace` is the simplest approach: ``` foreach (var word in lists) { sentence = sentence.Replace(word,"").Trim(); } ``` Although that will find the word in the middle of the string too. If you wanted to remove it only at the start you could use `IndexOf` check it's 0 and then take the string startin...
There are 2 options for you. 1. First of all the Remove usage is incorrect. You just want to remove the keyword. If u pass 1 argument to remove it will remove from that index till end. Pass the length of keyword as second arg to Remove. s.Remove(index, len); 2. If string contains it than replace the occurrence of key...
58,293,234
I have got a list with keywords. And I coded a method that if a string contains keyword from list, the method must remove keyword from string. Here is the method: ``` private string RemoveFromList(string sentence) { var lists = new List<string>{ "ask-", "que-", "(app)", "(exe)", "(foo)" }; var control = lists....
2019/10/08
[ "https://Stackoverflow.com/questions/58293234", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1827846/" ]
Using `string.Replace` is the simplest approach: ``` foreach (var word in lists) { sentence = sentence.Replace(word,"").Trim(); } ``` Although that will find the word in the middle of the string too. If you wanted to remove it only at the start you could use `IndexOf` check it's 0 and then take the string startin...
Another option is you could create an extension since you already know what items to remove. ``` using System.Text.RegularExpressions; public static string RemoveFromList(this string sentence) { new List<string>{ "ask-", "que-", "(app)", "(exe)", ...
58,293,234
I have got a list with keywords. And I coded a method that if a string contains keyword from list, the method must remove keyword from string. Here is the method: ``` private string RemoveFromList(string sentence) { var lists = new List<string>{ "ask-", "que-", "(app)", "(exe)", "(foo)" }; var control = lists....
2019/10/08
[ "https://Stackoverflow.com/questions/58293234", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1827846/" ]
There are 2 options for you. 1. First of all the Remove usage is incorrect. You just want to remove the keyword. If u pass 1 argument to remove it will remove from that index till end. Pass the length of keyword as second arg to Remove. s.Remove(index, len); 2. If string contains it than replace the occurrence of key...
Another option is you could create an extension since you already know what items to remove. ``` using System.Text.RegularExpressions; public static string RemoveFromList(this string sentence) { new List<string>{ "ask-", "que-", "(app)", "(exe)", ...
8,470,004
Is there a way to pause a for loop in java? So is there a way to only go forward one iteration when prompted? I read this <http://answers.yahoo.com/question/index?qid=20100212201605AAazS73> and the solution seems like it could have some problems mostly because I don't fully understand the order the for loop checks its ...
2011/12/12
[ "https://Stackoverflow.com/questions/8470004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1067141/" ]
It's not clear what sort of "prompt" you mean. You could certainly do something like: ``` for (int i = 0; i < 6; i++) { System.out.println("Press return to continue..."); System.in.readLine(); // Do the body of the loop } ``` That's appropriate for a console app, but obviously not for (say) a Swing app....
This would involve blocking the `Thread` that the for loop occupies. You can do this simply, but not very well, with this: ``` for(something) while(!FLAG) //Do procedure ``` Another way would be to have another `Thread` going on, and have the main thread wait for that other thread. Here's some more informati...
8,470,004
Is there a way to pause a for loop in java? So is there a way to only go forward one iteration when prompted? I read this <http://answers.yahoo.com/question/index?qid=20100212201605AAazS73> and the solution seems like it could have some problems mostly because I don't fully understand the order the for loop checks its ...
2011/12/12
[ "https://Stackoverflow.com/questions/8470004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1067141/" ]
It's not clear what sort of "prompt" you mean. You could certainly do something like: ``` for (int i = 0; i < 6; i++) { System.out.println("Press return to continue..."); System.in.readLine(); // Do the body of the loop } ``` That's appropriate for a console app, but obviously not for (say) a Swing app....
Your goal is somewhat unclear. I think you want your program to keep running until you get six of a certain input and if so, that approach will work, though of course you'll need to get input from the user to move the loop forward. If your concern is that the while loop would use a lot of system resources, that will n...
8,470,004
Is there a way to pause a for loop in java? So is there a way to only go forward one iteration when prompted? I read this <http://answers.yahoo.com/question/index?qid=20100212201605AAazS73> and the solution seems like it could have some problems mostly because I don't fully understand the order the for loop checks its ...
2011/12/12
[ "https://Stackoverflow.com/questions/8470004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1067141/" ]
It's not clear what sort of "prompt" you mean. You could certainly do something like: ``` for (int i = 0; i < 6; i++) { System.out.println("Press return to continue..."); System.in.readLine(); // Do the body of the loop } ``` That's appropriate for a console app, but obviously not for (say) a Swing app....
Well, you could use `Thread.Sleep();` to pause for a little bit between flag checks, but what you are really looking for is a function that blocks while waiting for input, `System.in.readline();` blocks if I recall correctly ;) Like so: ``` int i = 0 do { if(FLAG) { //Do stuff i++; //...
8,470,004
Is there a way to pause a for loop in java? So is there a way to only go forward one iteration when prompted? I read this <http://answers.yahoo.com/question/index?qid=20100212201605AAazS73> and the solution seems like it could have some problems mostly because I don't fully understand the order the for loop checks its ...
2011/12/12
[ "https://Stackoverflow.com/questions/8470004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1067141/" ]
When iterating through a for loop, for example, the one below, it does the following ``` for (int i = 0; i < 6; i++) { // Do stuff } ``` 1. It declares the variable `i` and assigns a value of `0`. 2. It checks the conditional `i < 6`. If true, then proceed to step 3. Otherwise go to step 6. 3. Goes through the b...
It's not clear what sort of "prompt" you mean. You could certainly do something like: ``` for (int i = 0; i < 6; i++) { System.out.println("Press return to continue..."); System.in.readLine(); // Do the body of the loop } ``` That's appropriate for a console app, but obviously not for (say) a Swing app....
8,470,004
Is there a way to pause a for loop in java? So is there a way to only go forward one iteration when prompted? I read this <http://answers.yahoo.com/question/index?qid=20100212201605AAazS73> and the solution seems like it could have some problems mostly because I don't fully understand the order the for loop checks its ...
2011/12/12
[ "https://Stackoverflow.com/questions/8470004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1067141/" ]
It's not clear what sort of "prompt" you mean. You could certainly do something like: ``` for (int i = 0; i < 6; i++) { System.out.println("Press return to continue..."); System.in.readLine(); // Do the body of the loop } ``` That's appropriate for a console app, but obviously not for (say) a Swing app....
Others have covered how to use `System.in.readLine()` to have the program explicitly require action from the user. If what you need is not to have the program wait for the user, but allow you - the programmer - to slow the program down, in order to be able to find and fix a bug, you might want to consider using a debu...
8,470,004
Is there a way to pause a for loop in java? So is there a way to only go forward one iteration when prompted? I read this <http://answers.yahoo.com/question/index?qid=20100212201605AAazS73> and the solution seems like it could have some problems mostly because I don't fully understand the order the for loop checks its ...
2011/12/12
[ "https://Stackoverflow.com/questions/8470004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1067141/" ]
When iterating through a for loop, for example, the one below, it does the following ``` for (int i = 0; i < 6; i++) { // Do stuff } ``` 1. It declares the variable `i` and assigns a value of `0`. 2. It checks the conditional `i < 6`. If true, then proceed to step 3. Otherwise go to step 6. 3. Goes through the b...
This would involve blocking the `Thread` that the for loop occupies. You can do this simply, but not very well, with this: ``` for(something) while(!FLAG) //Do procedure ``` Another way would be to have another `Thread` going on, and have the main thread wait for that other thread. Here's some more informati...
8,470,004
Is there a way to pause a for loop in java? So is there a way to only go forward one iteration when prompted? I read this <http://answers.yahoo.com/question/index?qid=20100212201605AAazS73> and the solution seems like it could have some problems mostly because I don't fully understand the order the for loop checks its ...
2011/12/12
[ "https://Stackoverflow.com/questions/8470004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1067141/" ]
When iterating through a for loop, for example, the one below, it does the following ``` for (int i = 0; i < 6; i++) { // Do stuff } ``` 1. It declares the variable `i` and assigns a value of `0`. 2. It checks the conditional `i < 6`. If true, then proceed to step 3. Otherwise go to step 6. 3. Goes through the b...
Your goal is somewhat unclear. I think you want your program to keep running until you get six of a certain input and if so, that approach will work, though of course you'll need to get input from the user to move the loop forward. If your concern is that the while loop would use a lot of system resources, that will n...
8,470,004
Is there a way to pause a for loop in java? So is there a way to only go forward one iteration when prompted? I read this <http://answers.yahoo.com/question/index?qid=20100212201605AAazS73> and the solution seems like it could have some problems mostly because I don't fully understand the order the for loop checks its ...
2011/12/12
[ "https://Stackoverflow.com/questions/8470004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1067141/" ]
When iterating through a for loop, for example, the one below, it does the following ``` for (int i = 0; i < 6; i++) { // Do stuff } ``` 1. It declares the variable `i` and assigns a value of `0`. 2. It checks the conditional `i < 6`. If true, then proceed to step 3. Otherwise go to step 6. 3. Goes through the b...
Well, you could use `Thread.Sleep();` to pause for a little bit between flag checks, but what you are really looking for is a function that blocks while waiting for input, `System.in.readline();` blocks if I recall correctly ;) Like so: ``` int i = 0 do { if(FLAG) { //Do stuff i++; //...
8,470,004
Is there a way to pause a for loop in java? So is there a way to only go forward one iteration when prompted? I read this <http://answers.yahoo.com/question/index?qid=20100212201605AAazS73> and the solution seems like it could have some problems mostly because I don't fully understand the order the for loop checks its ...
2011/12/12
[ "https://Stackoverflow.com/questions/8470004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1067141/" ]
When iterating through a for loop, for example, the one below, it does the following ``` for (int i = 0; i < 6; i++) { // Do stuff } ``` 1. It declares the variable `i` and assigns a value of `0`. 2. It checks the conditional `i < 6`. If true, then proceed to step 3. Otherwise go to step 6. 3. Goes through the b...
Others have covered how to use `System.in.readLine()` to have the program explicitly require action from the user. If what you need is not to have the program wait for the user, but allow you - the programmer - to slow the program down, in order to be able to find and fix a bug, you might want to consider using a debu...
44,975,964
I am creating a job which takes backup of a database and with the filename suffixing today's date. But I'm getting below error. ``` DECLARE @Query NVARCHAR(MAX) SET @Query = 'BACKUP DATABASE [DBName] TO DISK = ''D:\Backups\DBName_'+cast(convert(date,getdate())as varchar)+'.bak' EXEC sp_executeSql @Query ``` **Error...
2017/07/07
[ "https://Stackoverflow.com/questions/44975964", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7845323/" ]
You are missing the last closing quote. It should end in `.txt'''` ``` SET @Query = 'BACKUP DATABASE [MetaCost] TO DISK = ''D:\Backups\DBName.bak_'+cast(convert(date,getdate())as varchar)+'.txt''' ``` Also typically you use the `.bak` extension for a sql database backup.
Your statement will output *BACKUP DATABASE [DBName] TO DISK = 'D:\Backups\DBName.bak\_2017-07-07.txt* You need to add `'.txt'''`
73,704,719
When we use arrays and pointers this way: ``` int *g() { int arr[] = {1, 2, 3}; return arr; } int f() { int *value = g(); for (size_t i = 0; i < 3; i++) { std::cout << value[i] << " "; } std::cout << std::endl; } int main(int argc, const char **argv) { f(); return 0; } ``` It is deleted from t...
2022/09/13
[ "https://Stackoverflow.com/questions/73704719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19986332/" ]
All the elements in the vector essentially count as part of the vector. And notice you are returning the vector, not a pointer to the vector. But you are returning a pointer to (the start of) the array. When the function `g` returns, the vector `arr` is destroyed but that's okay because that's not the same one that is...
In the second method returning `vector<int>`. The `std::vector<int> arr` was copied to another a `temporary vector<int>`, then `std::vector<int> arr` was destroyed. Finally, the `vector<int> value` was assigned with `temporary vector<int>`, after assigning completed, `temporary vector<int>` was destroyed as well. That'...
73,704,719
When we use arrays and pointers this way: ``` int *g() { int arr[] = {1, 2, 3}; return arr; } int f() { int *value = g(); for (size_t i = 0; i < 3; i++) { std::cout << value[i] << " "; } std::cout << std::endl; } int main(int argc, const char **argv) { f(); return 0; } ``` It is deleted from t...
2022/09/13
[ "https://Stackoverflow.com/questions/73704719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19986332/" ]
All the elements in the vector essentially count as part of the vector. And notice you are returning the vector, not a pointer to the vector. But you are returning a pointer to (the start of) the array. When the function `g` returns, the vector `arr` is destroyed but that's okay because that's not the same one that is...
Your intuition was somewhat right it has something to do with the containment of the array inside a struct, what you misunderstand however is the difference between (**int[]**) and (**int**\*) and probably you don't understand well where memory resides as well. To clarify: In C++ C-style array types (**int[]**), (**c...
65,516,030
I can't make a CSS animation with my SVG sprite similar to Pinterest. The sprite is 90 frames, but I can't get it to work Pinterest Reactions Emojis ![Pinterest Reactions Emojis](https://i.stack.imgur.com/iG25Q.gif) [View Pinterest Sprite 90 frames in Svg](https://i.stack.imgur.com/ILB9G.png) My code: ```css .emoji...
2020/12/31
[ "https://Stackoverflow.com/questions/65516030", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14893320/" ]
Here you go ```css .emoji { width: 110px; display: inline-flex; background-image: url(https://s.pinimg.com/webapp/style/images/wow-0a7ea725.svg); background-size: auto 100%; animation: moveX 1s steps(90) infinite; } .emoji::before { content: ""; padding-top: 100%; /* keep the square ratio */ } @keyfram...
If you take Temani his great answer, add a modern W3C standard Web Component that uses *Template Literal* parsing to **create the SVG sprite *Client Side*** in a shadowDOM (*and do some better animation calculations in the* `<template>`) You save downloading a **65KB** SVG file, and get: ```html <svg-spriter w=100 h...
13,914
I want to download the following fastq files at the same time in Salmon: ``` - SRR10611214 - SRR10611215 - SRR10611215 - SRR10611216 - SRR10611217 ``` Is there a way to do this using a bash for loop or fastq-dump? or prefetch
2020/07/17
[ "https://bioinformatics.stackexchange.com/questions/13914", "https://bioinformatics.stackexchange.com", "https://bioinformatics.stackexchange.com/users/9217/" ]
A sample code is given in the salmon documentation as follows. [Source](https://combine-lab.github.io/salmon/getting_started/) ``` #!/bin/bash mkdir data cd data for i in `seq 25 40`; do mkdir DRR0161${i}; cd DRR0161${i}; wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/DRR016/DRR0161${i}/DRR0161${i}_1.fastq.gz; w...
You can use `parallel`. ``` parallel -j 3 fastq-dump {} ::: SRR10611214 SRR10611215 SRR10611215 SRR10611216 SRR10611217 ``` The option `-j` says how many jobs should maximal run parallel. So in this case maximal 3 identifier would be handled at the same time. How many jobs you can run parallel depends on your machi...
13,914
I want to download the following fastq files at the same time in Salmon: ``` - SRR10611214 - SRR10611215 - SRR10611215 - SRR10611216 - SRR10611217 ``` Is there a way to do this using a bash for loop or fastq-dump? or prefetch
2020/07/17
[ "https://bioinformatics.stackexchange.com/questions/13914", "https://bioinformatics.stackexchange.com", "https://bioinformatics.stackexchange.com/users/9217/" ]
A sample code is given in the salmon documentation as follows. [Source](https://combine-lab.github.io/salmon/getting_started/) ``` #!/bin/bash mkdir data cd data for i in `seq 25 40`; do mkdir DRR0161${i}; cd DRR0161${i}; wget ftp://ftp.sra.ebi.ac.uk/vol1/fastq/DRR016/DRR0161${i}/DRR0161${i}_1.fastq.gz; w...
Make a list.txt file containing a single column of SRA numbers to download. then: `for i in $(cat list.txt); do echo $i; date; fasterq-dump -S $i; done` It works well to use NCBI's web interface to find SRA samples of interest, download and open findings in Excel, then copy single column containing SRA numbers and p...
13,914
I want to download the following fastq files at the same time in Salmon: ``` - SRR10611214 - SRR10611215 - SRR10611215 - SRR10611216 - SRR10611217 ``` Is there a way to do this using a bash for loop or fastq-dump? or prefetch
2020/07/17
[ "https://bioinformatics.stackexchange.com/questions/13914", "https://bioinformatics.stackexchange.com", "https://bioinformatics.stackexchange.com/users/9217/" ]
Make a list.txt file containing a single column of SRA numbers to download. then: `for i in $(cat list.txt); do echo $i; date; fasterq-dump -S $i; done` It works well to use NCBI's web interface to find SRA samples of interest, download and open findings in Excel, then copy single column containing SRA numbers and p...
You can use `parallel`. ``` parallel -j 3 fastq-dump {} ::: SRR10611214 SRR10611215 SRR10611215 SRR10611216 SRR10611217 ``` The option `-j` says how many jobs should maximal run parallel. So in this case maximal 3 identifier would be handled at the same time. How many jobs you can run parallel depends on your machi...
339,552
TL;DR I'm pretty sure our small network has been infected by some sort of worm/virus. It seems to only be afflicting our Windows XP machines, however. Windows 7 machines and Linux (well, yea) computers seem to be unaffected. Anti-virus scans are showing nothing, but our domain server has logged thousands of failed log...
2011/12/09
[ "https://serverfault.com/questions/339552", "https://serverfault.com", "https://serverfault.com/users/71559/" ]
These are my general suggestions for this kind of process. I appreciate you'll have covered some of them already but its better to be told something twice than miss something important. These notes are orientated towards malware that's spreading on a LAN but could easily be scaled back to deal with more minor infection...
You've done all the things I would do (if I were still a Windows admin) -- The canonical steps are (or were, last time I was a Windows guy): 1. Isolate the affected machines. 2. Update anti-virus definitions Run AV/Malware/etc. scans on the whole network 3. Blow away the affected machines (completely wipe the sucke...
339,552
TL;DR I'm pretty sure our small network has been infected by some sort of worm/virus. It seems to only be afflicting our Windows XP machines, however. Windows 7 machines and Linux (well, yea) computers seem to be unaffected. Anti-virus scans are showing nothing, but our domain server has logged thousands of failed log...
2011/12/09
[ "https://serverfault.com/questions/339552", "https://serverfault.com", "https://serverfault.com/users/71559/" ]
You've done all the things I would do (if I were still a Windows admin) -- The canonical steps are (or were, last time I was a Windows guy): 1. Isolate the affected machines. 2. Update anti-virus definitions Run AV/Malware/etc. scans on the whole network 3. Blow away the affected machines (completely wipe the sucke...
The first lesson to take from this is that AV solutions aren't perfect. Not even close. If you are up to date with the AV software vendors, call them. All of them have support numbers for exactly this sort of thing. As a matter of fact they'll probably be very interested in what hit you. As others have said, take eac...
339,552
TL;DR I'm pretty sure our small network has been infected by some sort of worm/virus. It seems to only be afflicting our Windows XP machines, however. Windows 7 machines and Linux (well, yea) computers seem to be unaffected. Anti-virus scans are showing nothing, but our domain server has logged thousands of failed log...
2011/12/09
[ "https://serverfault.com/questions/339552", "https://serverfault.com", "https://serverfault.com/users/71559/" ]
You've done all the things I would do (if I were still a Windows admin) -- The canonical steps are (or were, last time I was a Windows guy): 1. Isolate the affected machines. 2. Update anti-virus definitions Run AV/Malware/etc. scans on the whole network 3. Blow away the affected machines (completely wipe the sucke...
It's most likely a rootkit if your A/V programs turn up nothing. Try running [TDSSkiller](http://support.kaspersky.com/faq/?qid=208280684) and see what you find. Also, this would be a perfect time to simply replace the archaic Windows XP computers with something less than over a decade old. Aside from software like ant...
339,552
TL;DR I'm pretty sure our small network has been infected by some sort of worm/virus. It seems to only be afflicting our Windows XP machines, however. Windows 7 machines and Linux (well, yea) computers seem to be unaffected. Anti-virus scans are showing nothing, but our domain server has logged thousands of failed log...
2011/12/09
[ "https://serverfault.com/questions/339552", "https://serverfault.com", "https://serverfault.com/users/71559/" ]
These are my general suggestions for this kind of process. I appreciate you'll have covered some of them already but its better to be told something twice than miss something important. These notes are orientated towards malware that's spreading on a LAN but could easily be scaled back to deal with more minor infection...
The first lesson to take from this is that AV solutions aren't perfect. Not even close. If you are up to date with the AV software vendors, call them. All of them have support numbers for exactly this sort of thing. As a matter of fact they'll probably be very interested in what hit you. As others have said, take eac...
339,552
TL;DR I'm pretty sure our small network has been infected by some sort of worm/virus. It seems to only be afflicting our Windows XP machines, however. Windows 7 machines and Linux (well, yea) computers seem to be unaffected. Anti-virus scans are showing nothing, but our domain server has logged thousands of failed log...
2011/12/09
[ "https://serverfault.com/questions/339552", "https://serverfault.com", "https://serverfault.com/users/71559/" ]
These are my general suggestions for this kind of process. I appreciate you'll have covered some of them already but its better to be told something twice than miss something important. These notes are orientated towards malware that's spreading on a LAN but could easily be scaled back to deal with more minor infection...
It's most likely a rootkit if your A/V programs turn up nothing. Try running [TDSSkiller](http://support.kaspersky.com/faq/?qid=208280684) and see what you find. Also, this would be a perfect time to simply replace the archaic Windows XP computers with something less than over a decade old. Aside from software like ant...
339,552
TL;DR I'm pretty sure our small network has been infected by some sort of worm/virus. It seems to only be afflicting our Windows XP machines, however. Windows 7 machines and Linux (well, yea) computers seem to be unaffected. Anti-virus scans are showing nothing, but our domain server has logged thousands of failed log...
2011/12/09
[ "https://serverfault.com/questions/339552", "https://serverfault.com", "https://serverfault.com/users/71559/" ]
The first lesson to take from this is that AV solutions aren't perfect. Not even close. If you are up to date with the AV software vendors, call them. All of them have support numbers for exactly this sort of thing. As a matter of fact they'll probably be very interested in what hit you. As others have said, take eac...
It's most likely a rootkit if your A/V programs turn up nothing. Try running [TDSSkiller](http://support.kaspersky.com/faq/?qid=208280684) and see what you find. Also, this would be a perfect time to simply replace the archaic Windows XP computers with something less than over a decade old. Aside from software like ant...
68,780,038
I currently have an API where it uploads a PDF to a lesson but I want to make the PDF upload nullable but it returns an error: > > Error: Call to a member function store() on null in file C:\xampp\htdocs\drv-api\app\Http\Controllers\Api\LessonCRUDController.php on line 66 > > > And this is my line 66: > > $uplo...
2021/08/14
[ "https://Stackoverflow.com/questions/68780038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16621915/" ]
You can check if the uploaded file is valid using `isValid()` method. ``` if($request->file->isValid()){ $uploaded_files = $request->file->store('public/uploads/'); } ```
I now fixed this and this is the code I added: ``` $file = $request->file('file'); $file = $request->file; if ($request->hasFile('file')) { $original_file_name = $request->file->getClientOriginalName(); // $uploaded_files = $request->file->store('public/uploads/'); $uploaded_files = $request->fi...
538,937
I'm trying to install vCenter 5.1 on a windows 2012 dedicated (with SQL express standalone) During the installation of the Single Sign On module i've a warning "the fully qualified domain name cannot be resolved with nslookup. if you continue the installation some features might not work correctly. for detailed requime...
2013/09/14
[ "https://serverfault.com/questions/538937", "https://serverfault.com", "https://serverfault.com/users/171115/" ]
*(you don't need to obfuscate your private IP addresses... it hurts question readability)* Please make sure you have the reverse zone configured properly and records populated for that IP/name. VMware SSO is odd in that it *can* query the forward and reverse on *every* interface on the server. Do you have multiple int...
If you added reverse dns record after first check, try to flush dns cache ``` ipconfig /flushdns ``` and try again
538,937
I'm trying to install vCenter 5.1 on a windows 2012 dedicated (with SQL express standalone) During the installation of the Single Sign On module i've a warning "the fully qualified domain name cannot be resolved with nslookup. if you continue the installation some features might not work correctly. for detailed requime...
2013/09/14
[ "https://serverfault.com/questions/538937", "https://serverfault.com", "https://serverfault.com/users/171115/" ]
I got the same error doing the same (fresh install of 5.1 on windows 2012). My DNS setup is also perfectly okay (incl. reverse lookup), so I just ignored the warning. Everything installed fine and is now working without any issues.
If you added reverse dns record after first check, try to flush dns cache ``` ipconfig /flushdns ``` and try again
3,480,462
I grew up with Portuguese as my first language, both my parents are immigrants without a high school diploma. My dad taught me multiplication over the course of a couple of days at 5 years old but didn't know any mathematics beyond that. He worked construction since the age of 15, my mom never held down a job, dropped ...
2019/12/18
[ "https://math.stackexchange.com/questions/3480462", "https://math.stackexchange.com", "https://math.stackexchange.com/users/387822/" ]
It is not hard to see that$$(\forall n\in\mathbb N):\left(1+\sqrt2\right)^n+\left(1-\sqrt2\right)^n\in\mathbb N.$$Besides, $\lim\_{n\to\infty}\left(1-\sqrt2\right)^n=0$ and $(\forall n\in\mathbb N):\sin(n\pi)=0$. Therefore,$$\lim\_{n\to\infty}\sin\left(\left(1+\sqrt2\right)^n\pi\right)=0.$$
Write $$\sin((1+\sqrt{2})^n\pi+(1-\sqrt{2})^n\pi-(1-\sqrt{2})^n\pi)$$ and use the addition formulas for the sin-function.
4,568,166
i tring to send print command through VB using mscomm control it working fine but it throw error: '4 line clode is below ``` MSComm1.CommPort = 1 MSComm1.Settings = "9600 ,N,8,1" MSComm1.PortOpen = False MSComm1.Output = "String to hardware" ``` Error: (8015) Could not set comm state, there may be one or more inval...
2010/12/31
[ "https://Stackoverflow.com/questions/4568166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/558966/" ]
Nothing is working because your port is closed. Line 3 should be as follows: `MSComm1.PortOpen = True` Setting the `PortOpen` proptery to `true` opens the port. Setting it to `false` closes it.
Do not set printer on port COM1. COM1 port will be occupied by Printer in COM1 port. When use Visual Basic MSCOMM component, you do not need any printer driver. If you do set Printer in COM1 port. You can use the following code. this code will not impacted by printer setting. Visual Basic: Open "COM1" For Output AS #1
4,568,166
i tring to send print command through VB using mscomm control it working fine but it throw error: '4 line clode is below ``` MSComm1.CommPort = 1 MSComm1.Settings = "9600 ,N,8,1" MSComm1.PortOpen = False MSComm1.Output = "String to hardware" ``` Error: (8015) Could not set comm state, there may be one or more inval...
2010/12/31
[ "https://Stackoverflow.com/questions/4568166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/558966/" ]
Nothing is working because your port is closed. Line 3 should be as follows: `MSComm1.PortOpen = True` Setting the `PortOpen` proptery to `true` opens the port. Setting it to `false` closes it.
uninstall driver for com1, then restart windows, and try. it will work
4,568,166
i tring to send print command through VB using mscomm control it working fine but it throw error: '4 line clode is below ``` MSComm1.CommPort = 1 MSComm1.Settings = "9600 ,N,8,1" MSComm1.PortOpen = False MSComm1.Output = "String to hardware" ``` Error: (8015) Could not set comm state, there may be one or more inval...
2010/12/31
[ "https://Stackoverflow.com/questions/4568166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/558966/" ]
The same 8015 error happened to me while trying to communicate with external hardware. I have only COM1 in the mainboard, and I had installed an EPSON TM-T88III in COM1, but was not using it. I changed the COM port in the printer to COM4 (although it does not exist physically) and voilà: My VB6 program opened COM1 wit...
Do not set printer on port COM1. COM1 port will be occupied by Printer in COM1 port. When use Visual Basic MSCOMM component, you do not need any printer driver. If you do set Printer in COM1 port. You can use the following code. this code will not impacted by printer setting. Visual Basic: Open "COM1" For Output AS #1
4,568,166
i tring to send print command through VB using mscomm control it working fine but it throw error: '4 line clode is below ``` MSComm1.CommPort = 1 MSComm1.Settings = "9600 ,N,8,1" MSComm1.PortOpen = False MSComm1.Output = "String to hardware" ``` Error: (8015) Could not set comm state, there may be one or more inval...
2010/12/31
[ "https://Stackoverflow.com/questions/4568166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/558966/" ]
The same 8015 error happened to me while trying to communicate with external hardware. I have only COM1 in the mainboard, and I had installed an EPSON TM-T88III in COM1, but was not using it. I changed the COM port in the printer to COM4 (although it does not exist physically) and voilà: My VB6 program opened COM1 wit...
uninstall driver for com1, then restart windows, and try. it will work
12,068,704
I am trying to display a simple jtable in frame but It is not displaying the columns of the table, I followed the example from the oracle tutorials but there is something I am not doing right. The program is compiling and running. Here is the code: ``` import javax.swing.JFrame; import javax.swing.JPanel; import javax...
2012/08/22
[ "https://Stackoverflow.com/questions/12068704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1506241/" ]
Table columns are only automatically displayed if the `JTable` is inside a `JScrollPane`. Instead of `this.add(table);`, try `this.add(new JScrollPane(table));` Actually, you seem to have some scrollpane-related code lying about already - just uncomment `JScrollPane scrollPane = new JScrollPane(table);` and change `th...
Having a `JScrollPane` always helps. You already have the following code: ``` JScrollPane scrollPane = new JScrollPane(table); scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); ``` All you need to do is a...
43,585,705
I want to replace every white pixel in an image by black, but keep everything else unchanged ``` Window { id: window; width: 800; height: 600; visible: true; Image { id: sourceImage anchors.centerIn: parent source: "qrc:/source.png" } Item { anchors.fill: s...
2017/04/24
[ "https://Stackoverflow.com/questions/43585705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1107595/" ]
I found a solution to my problem : ``` ShaderEffect { property variant src: sourceImage vertexShader: " uniform highp mat4 qt_Matrix; attribute highp vec4 qt_Vertex; attribute highp vec2 qt_MultiTexCoord0; ...
Maybe you should use a `image preprocessing algorithm` in `Python` or `C++` for example on your image ? And then just load it in your `QML` application. QML is aimed to be used for UI part, and you have to avoid as much as possible to do such things like image processing in `QML`.
43,943,736
I need to copy all databases from server1 to Server2, i saw with SSIS is possible transfer objects with "Transfer SQL Database Task", but it works just for one database. It's possible coppy all databasses from server1 to server2 using SSIS ? Best Regards:
2017/05/12
[ "https://Stackoverflow.com/questions/43943736", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6698229/" ]
The problem was that Gradle was not finding the Dagger generated files by `kapt`, so I solved the problem by adding `src/main/kapt` to my sourceSets configuration on my Core module (lib): **build.gradle (Core module)** ``` android { ... sourceSets { main.java.srcDirs += ['src/main/kotlin', 'src/main/k...
Java module should have ``` plugins { id("java-library") id("kotlin") id("kotlin-kapt") } java { sourceSets { main.java.srcDirs += ['build/generated/source/kapt/main'] } } ```
519,191
I managed to get working Apache and everything's fine. Got MySQL running, which is nice. But then it turned out that I had to use terminal for all the SQL commands I had to put inside. I'm not close to that good to manage database by commands. So I wanted to use phpmyadmin, which prompted thousands errors and I can't e...
2014/09/02
[ "https://askubuntu.com/questions/519191", "https://askubuntu.com", "https://askubuntu.com/users/322131/" ]
Universal database managers a) DBeaver ``` wget -c http://dbeaver.jkiss.org/files/dbeaver_3.4.5_i386.deb sudo dpkg -i dbeaver_3.4.5_i386.deb sudo apt-get install -f ``` b) Valentina Studio ``` wget -c https://www.valentina-db.com/en/studio/download/current/vstudio_x64_lin-deb?format=raw sudo dpkg -i vstudio_5_li...
You can try Mysql Workbench: ``` sudo apt-get install mysql-workbench ``` This lives in universe, so you have to enable universe repository for that to work. That said, if you are going to code anything (esp. SQL), you will need to get used to command line.
519,191
I managed to get working Apache and everything's fine. Got MySQL running, which is nice. But then it turned out that I had to use terminal for all the SQL commands I had to put inside. I'm not close to that good to manage database by commands. So I wanted to use phpmyadmin, which prompted thousands errors and I can't e...
2014/09/02
[ "https://askubuntu.com/questions/519191", "https://askubuntu.com", "https://askubuntu.com/users/322131/" ]
You can try Mysql Workbench: ``` sudo apt-get install mysql-workbench ``` This lives in universe, so you have to enable universe repository for that to work. That said, if you are going to code anything (esp. SQL), you will need to get used to command line.
There's also [SQuirreL SQL](http://squirrel-sql.sourceforge.net/#installation). It requires Java, so you might need to run first: ``` apt-get install openjdk-7-jre ```
519,191
I managed to get working Apache and everything's fine. Got MySQL running, which is nice. But then it turned out that I had to use terminal for all the SQL commands I had to put inside. I'm not close to that good to manage database by commands. So I wanted to use phpmyadmin, which prompted thousands errors and I can't e...
2014/09/02
[ "https://askubuntu.com/questions/519191", "https://askubuntu.com", "https://askubuntu.com/users/322131/" ]
It seems that the question is not about the category "GUI clients that make writing SQL statements easier", but "clients that *avoid* SQL or generate it for you". So, relevant products would have wizards, or query builders, or table builders, or QBE. `phpMyAdmin` has already been excluded, and `MySQL Workbench` has a...
You can try Mysql Workbench: ``` sudo apt-get install mysql-workbench ``` This lives in universe, so you have to enable universe repository for that to work. That said, if you are going to code anything (esp. SQL), you will need to get used to command line.
519,191
I managed to get working Apache and everything's fine. Got MySQL running, which is nice. But then it turned out that I had to use terminal for all the SQL commands I had to put inside. I'm not close to that good to manage database by commands. So I wanted to use phpmyadmin, which prompted thousands errors and I can't e...
2014/09/02
[ "https://askubuntu.com/questions/519191", "https://askubuntu.com", "https://askubuntu.com/users/322131/" ]
Universal database managers a) DBeaver ``` wget -c http://dbeaver.jkiss.org/files/dbeaver_3.4.5_i386.deb sudo dpkg -i dbeaver_3.4.5_i386.deb sudo apt-get install -f ``` b) Valentina Studio ``` wget -c https://www.valentina-db.com/en/studio/download/current/vstudio_x64_lin-deb?format=raw sudo dpkg -i vstudio_5_li...
There's also [SQuirreL SQL](http://squirrel-sql.sourceforge.net/#installation). It requires Java, so you might need to run first: ``` apt-get install openjdk-7-jre ```
519,191
I managed to get working Apache and everything's fine. Got MySQL running, which is nice. But then it turned out that I had to use terminal for all the SQL commands I had to put inside. I'm not close to that good to manage database by commands. So I wanted to use phpmyadmin, which prompted thousands errors and I can't e...
2014/09/02
[ "https://askubuntu.com/questions/519191", "https://askubuntu.com", "https://askubuntu.com/users/322131/" ]
It seems that the question is not about the category "GUI clients that make writing SQL statements easier", but "clients that *avoid* SQL or generate it for you". So, relevant products would have wizards, or query builders, or table builders, or QBE. `phpMyAdmin` has already been excluded, and `MySQL Workbench` has a...
There's also [SQuirreL SQL](http://squirrel-sql.sourceforge.net/#installation). It requires Java, so you might need to run first: ``` apt-get install openjdk-7-jre ```
28,055,522
so I've had a bit of a problem with trying to make a section's width to 0 and have everything inside the object do the same thing. Essentially hide the section and everything inside it. Thing is, the section will change to a width of 0px but the text inside still displays and also sort of pushes off to the side. Is the...
2015/01/20
[ "https://Stackoverflow.com/questions/28055522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4475798/" ]
If you're wanting to hide the content when the `'#about'` selector is clicked, why not just use `$('#introduction').toggle()`?
This a CSS issue. You need to add `overflow: hidden;` to whatever you want to be hidden with a change of width, in this case `#intro`.
28,055,522
so I've had a bit of a problem with trying to make a section's width to 0 and have everything inside the object do the same thing. Essentially hide the section and everything inside it. Thing is, the section will change to a width of 0px but the text inside still displays and also sort of pushes off to the side. Is the...
2015/01/20
[ "https://Stackoverflow.com/questions/28055522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4475798/" ]
Here is a different approach: ```js $(function(){ $('#about').on('click', homeAboutToggle); $('#home').on('click', homeAboutToggle); }); function homeAboutToggle(){ $('#introduction').toggleClass('active'); $('#about-me').toggleClass('active'); } ``` ```css * { margin: 0px 0px; padding: 0px 0px; ...
If you're wanting to hide the content when the `'#about'` selector is clicked, why not just use `$('#introduction').toggle()`?
28,055,522
so I've had a bit of a problem with trying to make a section's width to 0 and have everything inside the object do the same thing. Essentially hide the section and everything inside it. Thing is, the section will change to a width of 0px but the text inside still displays and also sort of pushes off to the side. Is the...
2015/01/20
[ "https://Stackoverflow.com/questions/28055522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4475798/" ]
If you're wanting to hide the content when the `'#about'` selector is clicked, why not just use `$('#introduction').toggle()`?
Here a working fiddle with the intended animation: [fiddle](http://jsfiddle.net/t6ck9ajb/3/) CSS: ``` #introduction { z-index: 1; visibility:"visible"; overflow:hidden; } ``` jQuery ``` $(document).ready(function () { $("#about").click(function () { if ($("#about-me").css("width") <= "0px")...
28,055,522
so I've had a bit of a problem with trying to make a section's width to 0 and have everything inside the object do the same thing. Essentially hide the section and everything inside it. Thing is, the section will change to a width of 0px but the text inside still displays and also sort of pushes off to the side. Is the...
2015/01/20
[ "https://Stackoverflow.com/questions/28055522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4475798/" ]
Here is a different approach: ```js $(function(){ $('#about').on('click', homeAboutToggle); $('#home').on('click', homeAboutToggle); }); function homeAboutToggle(){ $('#introduction').toggleClass('active'); $('#about-me').toggleClass('active'); } ``` ```css * { margin: 0px 0px; padding: 0px 0px; ...
This a CSS issue. You need to add `overflow: hidden;` to whatever you want to be hidden with a change of width, in this case `#intro`.
28,055,522
so I've had a bit of a problem with trying to make a section's width to 0 and have everything inside the object do the same thing. Essentially hide the section and everything inside it. Thing is, the section will change to a width of 0px but the text inside still displays and also sort of pushes off to the side. Is the...
2015/01/20
[ "https://Stackoverflow.com/questions/28055522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4475798/" ]
Here is a different approach: ```js $(function(){ $('#about').on('click', homeAboutToggle); $('#home').on('click', homeAboutToggle); }); function homeAboutToggle(){ $('#introduction').toggleClass('active'); $('#about-me').toggleClass('active'); } ``` ```css * { margin: 0px 0px; padding: 0px 0px; ...
Here a working fiddle with the intended animation: [fiddle](http://jsfiddle.net/t6ck9ajb/3/) CSS: ``` #introduction { z-index: 1; visibility:"visible"; overflow:hidden; } ``` jQuery ``` $(document).ready(function () { $("#about").click(function () { if ($("#about-me").css("width") <= "0px")...
56,296,546
I am updating a form to have two sets of radio buttons that turns on or off panels. The first says "Yes" to contact the customer or "No". If we are to contact, then present choice of which method is used, phone or email. (Previously there was just the question to contact or not.) While I can get the show function to ...
2019/05/24
[ "https://Stackoverflow.com/questions/56296546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/552782/" ]
Radio buttons normally come in groups and the `name` attribute is used to group them. There are two radio groups in your code, the Yes/No and Phone/Email. The Yes/No radio buttons have the same name `callTheCustomer` while the Phone/Email radio buttons have different names. Change the `name` attributes for the phone...
Couple things were in play here 1. I had to change the label-input tag order. ``` <div class="radio styled-radio" id="callTheCustomerDiv"> <input class="form-control" id="callTheCustomerRadio1" name="callTheCustomer" type="radio" value="Yes" ng-required="issueType=='IncidentDiv'" ng-model=...
56,296,546
I am updating a form to have two sets of radio buttons that turns on or off panels. The first says "Yes" to contact the customer or "No". If we are to contact, then present choice of which method is used, phone or email. (Previously there was just the question to contact or not.) While I can get the show function to ...
2019/05/24
[ "https://Stackoverflow.com/questions/56296546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/552782/" ]
Avoid using `$parent` --------------------- Using `$parent` is problematic. If the template nests more than one directive which instantiates a child scope, the two-way binding will have a data hiding problem. It is better to bind ng-models to a property of an object in the controller scope. If `$parent` binds the `ng...
Couple things were in play here 1. I had to change the label-input tag order. ``` <div class="radio styled-radio" id="callTheCustomerDiv"> <input class="form-control" id="callTheCustomerRadio1" name="callTheCustomer" type="radio" value="Yes" ng-required="issueType=='IncidentDiv'" ng-model=...
28,508,008
I know I need to use free() in here somewhere, but I'm unsure where. ``` struct info{ char string1[30]; float float1; int int1; char string2[30]; }; struct info* build(){ FILE *data; int i, lines; lines=0; data=fopen("hw3.data","r"); struct info info; struct info *infoArr...
2015/02/13
[ "https://Stackoverflow.com/questions/28508008", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3430647/" ]
Also, each of your arguments to `printf()` is working with a *different* structure, because you're calling `build()` repeatedly. You should call `build()` once before the loop, assign this to a variable, and then loop through the variable. ``` struct info* temp = build(); for (i = 0; i < 2; i++) { printf("%s %f %d...
You have to save the pointer returned by build(), and free it after the loop. It would be better style though to allocate the memory in function 1 before the loop, have build take a pointer and fill in it's data through that.
56,712,634
I have a source list of objects of 4 properties with some duplicate values, want to select distinct objects of 2 properties without using a foreach loop. Source list: ``` let Students= [ {Id: 1, Name: 'A', Class: 'I', Subject: 'Math'}, {Id: 2, Name: 'B', Class: 'II', Subject: 'Bengali'}, {Id: 1, Name: 'A', Class:...
2019/06/22
[ "https://Stackoverflow.com/questions/56712634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8794761/" ]
Simple Solution to return Distinct data for Object Array `this.studentOptions = this.students.filter((item, i, arr) => arr.findIndex((t) => t.Id=== item.Id) === i);`
You can try this like newbie way ``` let st=[]; Students.map((data)=>{ let isExist=!!st.find((data2)=>{ return data2.Id==data.Id}); if(!isExist) st.push(data); }); ```
56,712,634
I have a source list of objects of 4 properties with some duplicate values, want to select distinct objects of 2 properties without using a foreach loop. Source list: ``` let Students= [ {Id: 1, Name: 'A', Class: 'I', Subject: 'Math'}, {Id: 2, Name: 'B', Class: 'II', Subject: 'Bengali'}, {Id: 1, Name: 'A', Class:...
2019/06/22
[ "https://Stackoverflow.com/questions/56712634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8794761/" ]
Simple Solution to return Distinct data for Object Array `this.studentOptions = this.students.filter((item, i, arr) => arr.findIndex((t) => t.Id=== item.Id) === i);`
Array.from(new Set(yourArray.map((item: any) => item.id)))
56,712,634
I have a source list of objects of 4 properties with some duplicate values, want to select distinct objects of 2 properties without using a foreach loop. Source list: ``` let Students= [ {Id: 1, Name: 'A', Class: 'I', Subject: 'Math'}, {Id: 2, Name: 'B', Class: 'II', Subject: 'Bengali'}, {Id: 1, Name: 'A', Class:...
2019/06/22
[ "https://Stackoverflow.com/questions/56712634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8794761/" ]
This solution produces the result in the form you asked for. Objects need to be *stringified* before they get added to the `Set`, otherwise equal ones are not recognized (see <https://stackoverflow.com/a/29759699/2358409>). ``` const set = new Set(Students.map(s => JSON.stringify({ Id: s.Id, Name: s.Name }))); const i...
Using **rxjs**'s **map** and **distinct** operators we can achieve this. Please check the code below ```js var Students= [ {Id: 1, Name: 'A', Class: 'I', Subject: 'Math'}, {Id: 2, Name: 'B', Class: 'II', Subject: 'Bengali'}, {Id: 1, Name: 'A', Class: 'I', Subject: 'Science'}, {Id: 2, Name: 'B', Class: 'II'...
56,712,634
I have a source list of objects of 4 properties with some duplicate values, want to select distinct objects of 2 properties without using a foreach loop. Source list: ``` let Students= [ {Id: 1, Name: 'A', Class: 'I', Subject: 'Math'}, {Id: 2, Name: 'B', Class: 'II', Subject: 'Bengali'}, {Id: 1, Name: 'A', Class:...
2019/06/22
[ "https://Stackoverflow.com/questions/56712634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8794761/" ]
Since we're in the world of typescript, make use of the *types* provided by it. Create a class `Student`, this will be useful for easier management of your objects. ``` export class Student { Id: number; Name: string; Class?: string; Subject?: string; constructor(Id: number, Name: string) { this.Id = Id...
Using **rxjs**'s **map** and **distinct** operators we can achieve this. Please check the code below ```js var Students= [ {Id: 1, Name: 'A', Class: 'I', Subject: 'Math'}, {Id: 2, Name: 'B', Class: 'II', Subject: 'Bengali'}, {Id: 1, Name: 'A', Class: 'I', Subject: 'Science'}, {Id: 2, Name: 'B', Class: 'II'...
56,712,634
I have a source list of objects of 4 properties with some duplicate values, want to select distinct objects of 2 properties without using a foreach loop. Source list: ``` let Students= [ {Id: 1, Name: 'A', Class: 'I', Subject: 'Math'}, {Id: 2, Name: 'B', Class: 'II', Subject: 'Bengali'}, {Id: 1, Name: 'A', Class:...
2019/06/22
[ "https://Stackoverflow.com/questions/56712634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8794761/" ]
Simple Solution to return Distinct data for Object Array `this.studentOptions = this.students.filter((item, i, arr) => arr.findIndex((t) => t.Id=== item.Id) === i);`
Since we're in the world of typescript, make use of the *types* provided by it. Create a class `Student`, this will be useful for easier management of your objects. ``` export class Student { Id: number; Name: string; Class?: string; Subject?: string; constructor(Id: number, Name: string) { this.Id = Id...
56,712,634
I have a source list of objects of 4 properties with some duplicate values, want to select distinct objects of 2 properties without using a foreach loop. Source list: ``` let Students= [ {Id: 1, Name: 'A', Class: 'I', Subject: 'Math'}, {Id: 2, Name: 'B', Class: 'II', Subject: 'Bengali'}, {Id: 1, Name: 'A', Class:...
2019/06/22
[ "https://Stackoverflow.com/questions/56712634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8794761/" ]
This solution produces the result in the form you asked for. Objects need to be *stringified* before they get added to the `Set`, otherwise equal ones are not recognized (see <https://stackoverflow.com/a/29759699/2358409>). ``` const set = new Set(Students.map(s => JSON.stringify({ Id: s.Id, Name: s.Name }))); const i...
Array.from(new Set(yourArray.map((item: any) => item.id)))
56,712,634
I have a source list of objects of 4 properties with some duplicate values, want to select distinct objects of 2 properties without using a foreach loop. Source list: ``` let Students= [ {Id: 1, Name: 'A', Class: 'I', Subject: 'Math'}, {Id: 2, Name: 'B', Class: 'II', Subject: 'Bengali'}, {Id: 1, Name: 'A', Class:...
2019/06/22
[ "https://Stackoverflow.com/questions/56712634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8794761/" ]
Since we're in the world of typescript, make use of the *types* provided by it. Create a class `Student`, this will be useful for easier management of your objects. ``` export class Student { Id: number; Name: string; Class?: string; Subject?: string; constructor(Id: number, Name: string) { this.Id = Id...
You can try this like newbie way ``` let st=[]; Students.map((data)=>{ let isExist=!!st.find((data2)=>{ return data2.Id==data.Id}); if(!isExist) st.push(data); }); ```
56,712,634
I have a source list of objects of 4 properties with some duplicate values, want to select distinct objects of 2 properties without using a foreach loop. Source list: ``` let Students= [ {Id: 1, Name: 'A', Class: 'I', Subject: 'Math'}, {Id: 2, Name: 'B', Class: 'II', Subject: 'Bengali'}, {Id: 1, Name: 'A', Class:...
2019/06/22
[ "https://Stackoverflow.com/questions/56712634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8794761/" ]
Simple Solution to return Distinct data for Object Array `this.studentOptions = this.students.filter((item, i, arr) => arr.findIndex((t) => t.Id=== item.Id) === i);`
Using **rxjs**'s **map** and **distinct** operators we can achieve this. Please check the code below ```js var Students= [ {Id: 1, Name: 'A', Class: 'I', Subject: 'Math'}, {Id: 2, Name: 'B', Class: 'II', Subject: 'Bengali'}, {Id: 1, Name: 'A', Class: 'I', Subject: 'Science'}, {Id: 2, Name: 'B', Class: 'II'...
56,712,634
I have a source list of objects of 4 properties with some duplicate values, want to select distinct objects of 2 properties without using a foreach loop. Source list: ``` let Students= [ {Id: 1, Name: 'A', Class: 'I', Subject: 'Math'}, {Id: 2, Name: 'B', Class: 'II', Subject: 'Bengali'}, {Id: 1, Name: 'A', Class:...
2019/06/22
[ "https://Stackoverflow.com/questions/56712634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8794761/" ]
Since we're in the world of typescript, make use of the *types* provided by it. Create a class `Student`, this will be useful for easier management of your objects. ``` export class Student { Id: number; Name: string; Class?: string; Subject?: string; constructor(Id: number, Name: string) { this.Id = Id...
Array.from(new Set(yourArray.map((item: any) => item.id)))
56,712,634
I have a source list of objects of 4 properties with some duplicate values, want to select distinct objects of 2 properties without using a foreach loop. Source list: ``` let Students= [ {Id: 1, Name: 'A', Class: 'I', Subject: 'Math'}, {Id: 2, Name: 'B', Class: 'II', Subject: 'Bengali'}, {Id: 1, Name: 'A', Class:...
2019/06/22
[ "https://Stackoverflow.com/questions/56712634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8794761/" ]
Simple Solution to return Distinct data for Object Array `this.studentOptions = this.students.filter((item, i, arr) => arr.findIndex((t) => t.Id=== item.Id) === i);`
This solution produces the result in the form you asked for. Objects need to be *stringified* before they get added to the `Set`, otherwise equal ones are not recognized (see <https://stackoverflow.com/a/29759699/2358409>). ``` const set = new Set(Students.map(s => JSON.stringify({ Id: s.Id, Name: s.Name }))); const i...
27,389,955
I have an issue with a show of a parent div at onclick. As here: ``` $('#click').click(function() { $(this).parent().closest('div').slideToggle("fast"); }); http://jsfiddle.net/bk1hLoyb/ ``` I need to show the .show div at the li click, and i need to hide the first when i click another. Someone know's a metho...
2014/12/09
[ "https://Stackoverflow.com/questions/27389955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3442656/" ]
Id's should be unique on the page. ``` $('.click').click(function() { $('.show').hide(); $(this).find('.show').slideToggle("fast"); }); ``` <http://jsfiddle.net/bk1hLoyb/11/>
First Id's must be unique so change it for: ``` <li class="click"> <a href="#">Bye</a> <div class="show">Hey</div> </li> ``` and the code change it for: ``` $('.click').click(function() { $(this).find('div').slideToggle("fast"); }); ``` [LIVE DEMO](http://jsfiddle.net/j8jhag87/)
27,389,955
I have an issue with a show of a parent div at onclick. As here: ``` $('#click').click(function() { $(this).parent().closest('div').slideToggle("fast"); }); http://jsfiddle.net/bk1hLoyb/ ``` I need to show the .show div at the li click, and i need to hide the first when i click another. Someone know's a metho...
2014/12/09
[ "https://Stackoverflow.com/questions/27389955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3442656/" ]
Id's should be unique on the page. ``` $('.click').click(function() { $('.show').hide(); $(this).find('.show').slideToggle("fast"); }); ``` <http://jsfiddle.net/bk1hLoyb/11/>
Some suggestions: * remove all duplicate IDs * if you must use a selector on the `li` elements, use a class * `.show` is a child of the `li` that's clicked, so there's no need to use `.parent()` or `.closest()`. Code: ``` $('.click').click(function() { $('.show', this).slideToggle("fast"); }); ``` [**DEMO*...
27,389,955
I have an issue with a show of a parent div at onclick. As here: ``` $('#click').click(function() { $(this).parent().closest('div').slideToggle("fast"); }); http://jsfiddle.net/bk1hLoyb/ ``` I need to show the .show div at the li click, and i need to hide the first when i click another. Someone know's a metho...
2014/12/09
[ "https://Stackoverflow.com/questions/27389955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3442656/" ]
Id's should be unique on the page. ``` $('.click').click(function() { $('.show').hide(); $(this).find('.show').slideToggle("fast"); }); ``` <http://jsfiddle.net/bk1hLoyb/11/>
On your "li"s change the id to a class so you can reference multiple divs. Then on the script looks like this: ``` $('.click a').click(function() { var item = $(this); $(this).parent().siblings().find('.show').slideUp(400,function(){ item.parent().find('.show').slideDown(400); }); }); ``` See i...
22,113,558
I keep getting this error when I try to add an object to a retrieved `NSMutableArray`. ``` Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFArray insertObject:atIndex:]: mutating method sent to immutable object' ``` Retrieve: ``` NSUserDefaults *userDefaults = [NSUserDe...
2014/03/01
[ "https://Stackoverflow.com/questions/22113558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/826671/" ]
> > I'm confused as I thought this was designed to return an `NSMutableArray`, but it says not - `NSArray`. What's my issue? > > > The documentation of the `NSUserDefaults` talks specifically about this issue in the "special considerations" section of the `objectForKey:` method: > > **Special Considerations** > ...
User defaults returns immutable objects so you need to call `mutableCopy` on each before you can modify them. When you define a variable as `NSMutableArray *` it is your responsibility to ensure that the instance you store there is of the correct type. The compiler will only tell you that you're wrong if it can tell. ...
129,035
The implementation below works, but I'm wondering if there's a modern C++ alternative. For example: * Should I replace the raw `new` with a braced initializer? * Should I replace the `Node*` with a `shared_ptr`? Let me know if you see any other things I could improve. I know I could also use a class, but I'd like to...
2016/05/22
[ "https://codereview.stackexchange.com/questions/129035", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/104815/" ]
First, note that the only real difference between a `struct` and a `class` is the default accessibility: in a `class` everything is `private` by default, and in a `struct` everything is `public` by default. That's literally the *only* difference between the two. In any case, some of your code can be simplified somewha...
Design ------ I would note you have not made a linked list, but a chain of Node(s). This may seem to be the same thing but I would see this as different as a linked list would encapsulate and hide its internal structure with a class and provide methods to access the data. So you have: ``` void insert(Node*& head, in...