Difference between local and global indexes in DynamoDB

Question: I'm curious about these two secondary indexes and differences between them. It is hard to imagine how this looks like. And I think, this will help more people than just me.
Comment: Not so easy to find from the FAQ now. Maybe it's reorganized
Comment: Official AWS doc with comparision table: https://docs.aws.amazon.com/en_pv/amazondynamodb/latest/developerguide/SecondaryIndexes.html
https://docs.aws.amazon.com/en_pv/amazondynamodb/latest/developerguide/bp-indexes-general.html
Comment: Answered in the [DynamoDB FAQ](https://aws.amazon.com/dynamodb/faqs/). Search for _"How do global secondary indexes differ from local secondary indexes?"_
Comment: Not answered in the DynamoDB FAQ unfortunately.
Answer: Local Secondary Indexes still rely on the original Hash Key.
When you supply a table with hash+range, think about the LSI as hash+range1, hash+range2.. hash+range6.
You get 5 more range attributes to query on.
Also, there is only one provisioned throughput.
Global Secondary Indexes defines a new paradigm - different hash/range keys per index.
This breaks the original usage of one hash key per table.
This is also why when defining GSI you are required to add a provisioned throughput per index and pay for it.
More detailed information about the differences can be found in the GSI announcement
Comment: May wan to add 1) secondary indexes, whether LSI or GSI, having nothing to do with uniqueness
Comment: You are permitted to have up to 5 Local Secondary Indices, that's why Chen Harel says _"You get 5 more range attributes to query on"_.
Answer: Here is the formal definition from the documentation:

Global secondary index — an index with a hash and range key that can
  be different from those on the table. A global secondary index is
  considered "global" because queries on the index can span all of the
  data in a table, across all partitions.
Local secondary index — an index that has the same hash key as the
  table, but a different range key. A local secondary index is "local"
  in the sense that every partition of a local secondary index is scoped
  to a table partition that has the same hash key.

However, the differences go way beyond the possibilities in terms of key definitions. Find below some important factors that will directly impact the cost and effort for maintaining the indexes:

Throughput :

Local Secondary Indexes consume throughput from the table. When you query records via the local index, the operation consumes read capacity units from the table. When you perform a write operation (create, update, delete) in a table that has a local index, there will be two write operations, one for the table another for the index. Both operations will consume write capacity units from the table.
Global Secondary Indexes have their own provisioned throughput, when you query the index the operation will consume read capacity from the index, when you perform a write operation (create, update, delete) in a table that has a global index, there will be two write operations, one for the table another for the index*.
*When defining the provisioned throughput for the Global Secondary Index, make sure you pay special attention to the following requirements:

In order for a table write to succeed, the provisioned throughput
  settings for the table and all of its global secondary indexes must
  have enough write capacity to accommodate the write; otherwise, the
  write to the table will be throttled.

Management :

Local Secondary Indexes can only be created when you are creating the table, there is no way to add Local Secondary Index to an existing table, also once you create the index you cannot delete it.
Global Secondary Indexes can be created when you create the table and added to an existing table, deleting an existing Global Secondary Index is also allowed.

Read Consistency:

Local Secondary Indexes support eventual or strong consistency, whereas, Global Secondary Index only supports eventual consistency.

Projection:

Local Secondary Indexes allow retrieving attributes that are not projected to the index (although with additional cost: performance and consumed capacity units). With Global Secondary Index you can only retrieve the attributes projected to the index.
Special Consideration about the Uniqueness of the Keys Defined to Secondary Indexes:
In a Local Secondary Index, the range key value DOES NOT need to be unique for a given hash key value, same thing applies to Global Secondary Indexes, the key values (Hash and Range) DO NOT need to be unique.
Source: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SecondaryIndexes.html
Comment: @bsd It would make sense to add a note about one major limitation that the use of LSI's imposes: "For tables with local secondary indexes, there is a 10 GB size limit per partition key value. A table with local secondary indexes can store any number of items, as long as the total size for any one partition key value does not exceed 10 GB." (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LSI.html#LSI.Creating)
Comment: "_Global Secondary Indexes have their own provisioned throughput, when you query the index the operation will consume read capacity from the table_" - Wrong. Queries or scans on a global secondary index consume capacity units from the index, not from the base table.
Comment: This must be the selected answer to the question. Great explanation!
Answer: These are the possible searches by index:

By Hash
By Hash + Range
By Hash + Local Index
By Global index
By Global index + Range Index

Hash and Range indexes of a table:
These are the usual indexes of previous versions of the Amazon AWS SDK.
Global and Local indexes:
These are 'additional' indexes created on a table, in addition to existing hash and range indexes of the table.
Global index is similar to a hash. Range index behave similarly to the range index used with the hash of the table.
In you entity model in your code, the getter must be annotated in this way:

For global indexes:
@DynamoDBIndexHashKey(globalSecondaryIndexName = INDEX_GLOBAL_RANGE_US_TS)
@DynamoDBAttribute(attributeName = PROPERTY_USER)
public String getUser() {
    return user;
}

For range index associated to the global index:
@DynamoDBIndexRangeKey(globalSecondaryIndexName = INDEX_GLOBAL_RANGE_US_TS)
@DynamoDBAttribute(attributeName = PROPERTY_TIMESTAMP)
public String getTimestamp() {
    return timestamp;
}

Besides, if you read a table by a Global index, it must be an Eventual read (not Consistent read):
queryExpression.setConsistentRead(false);

Answer: One way to put it is this:
LSI - allows you to perform a query on a single Hash-Key while using multiple different attributes to "filter" or restrict the query.
GSI - allows you to perform queries on multiple Hash-Keys in a table, but costs extra in throughput, as a result.
A more extensive breakdown of the table types and how they work, below:
Hash Only
As you probably already know; a Hash-Key by itself must be unique as writing to a Hash-Key that already exists will overwrite the existing data.
Hash+Range
A Hash-Key + Range-Key allows you to have multiple Hash Keys that are the same, as long as they have a different range key.  In this case, if you write to a Hash-Key that already exists, but use a Range-Key that is not already used by that Hash-Key, it makes a new item, whereas if an item with the same Hash+Range combination already exists, it overwrites the matching item.
Another way to think of this is like a file with a format.  You can have a file with the same name (hash) as another, in the same folder (table), as long as their format (range) is different.  Likewise, you can have multiple files of the same format as long as their name is different.
LSI
An LSI is basically the same as a Hash-Key + Range-Key, and follows the same rules as it, when creating items, except that you must also provide values for the LSIs, as well; they cannot be left empty/null.
To say an LSI is "Range-Key 2" is not entirely correct as you cannot have (using my file and format analogy from earlier) a file named: file.format.lsi and file.format.lsi2.  You can, however, have file.format.lsi and file.format2.lsi or file.format.lsi and file2.format.lsi.
Basically, an LSI is just a "Filter-key", not an actual Range-Key; your base Hash and Range value combination must still be unique while the LSI values do not have to be unique, at all.  An easier way to look at it may be to think of the LSI as data within the files.  You could write code that finds all the files with the name "PROJECT101", regardless of their fileFormat, then reads the data inside to determine what should be included in the query and what is omitted.  This is basically how LSI works (just without the extra overhead of opening the file to read its contents).
GSI
For GSI, you're essentially creating another table for each GSI, but without the hassle of maintaining multiple separate tables that mirror data between them; this is why they cost more throughput.
So for a GSI, you could specify fileName as your base Hash-Key, and fileFormat as your base Range-Key.  You can then specify a GSI that has a Hash-Key of fileName2 and a Range-Key of fileFormat2.  You can then query on either fileName or fileName2 if you like, unlike LSI where you can only query on fileName.
The main advantages are that you only have to maintain one table, instead of 2, and anytime you write to either the primary Hash/Range or the GSI Hash/Range(s), the other(s) will automatically be updated as well, so you can't "forget" to update the other table(s) like you can with a multi-table setup.  Also, there's no chance of a lost connection after updating one and before updating the other, like there is with the multi-table setup.
Additionally, a GSI can "overlap" the base Hash/Range combination.  So if you wanted to make a table with fileName and fileFormat as your base Hash/Range and filePriority and fileName as your GSI, you can.
Lastly, a GSI Hash+Range combination does not have to be unique, while the base Hash+Range combination does have to be unique.  This is something that is not possible with a dual/multi table setup, but is with GSI.  As a result, you MUST provide values for both the base AND GSI Hash+Range, when updating; none of these values can be empty/null.
Comment: So LSI is like a 'tag' for a file (item)?
Answer: Another way to explain: LSI helps you do additional queries on items with same Hash Key. GSI helps you do the similar queries on items "across the table". So very useful.
If you have a user profile table:
unique-id, name, email. Here if you need to make the table queryable on name, email - then the only way is to make them GSI (LSI wont help)
Comment: Can you elaborate why you can only do that with GSI ?
Comment: @yoavbarnea To use table's index you need `unique-id` which takes you to the specific user. However if you want to query the `name` of `email` of all the users you need to create GSI on these attributes.
Answer: GSIs can't be used for consistent reads.
LSIs can be used for consistent reads but they will limit the main partition size to 10GB. Also LSIs can only be created on table creation.
Comment: As confirmed by AWS itself: https://www.youtube.com/watch?v=BkEu7zBWge8
Answer: This documentaion gives pretty good explanation :
https://aws.amazon.com/blogs/aws/now-available-global-secondary-indexes-for-amazon-dynamodb/
I could not comment on this Question ,but which is better in terms of write and read performance :
(Local Index with Table read and write throughput of 100) or (Global index with read /write throughput of 50 along with table's read/write throughput of 50 ? )
I do not need separate partition key for my use case , so local index should be sufficient for the required functionality.


Why don't you want to put mint in a compost pile?

Question: A video by UC Berkeley on YouTube said that you don't want to put mint in compost. Why not? He also said no Bermuda grass, but I know why this is the case, essentially due to one of their other videos.
Answer: Mint can be propagated using stem cuttings so you'll probably end up having the mint invade your compost pile. And you may not be able to easily eradicate it after that.
Comment: ... then from the compost pile to anywhere else you try to use the compost.
Comment: Which is why there are two rules on Mint, 1) DO NOT PUT ANY MINT IN A PILE AFTER IT REACHES SEED STAGE, and 2) TURN YOUR PILE AND MAKE SURE EVERYTHING IS THOROUGHLY COMPOSTED UNTO DEATH. If only I could eradicate it from where it was originally planted, the garden where I use the compost doesn't have an issue.


F5, Apache and IIS - Error during SSL Handshake with remote server returned

Question: Need to see if anyone can shed some light into an intermittent issue that I get within this setup.
First the setup is as follows:
End User -> VIP of F5(No SSL and round robin) -> 2 pair of Apache servers(SSL for virtual host) -> F5(SSL and Least connection) -> 4 IIS servers(SSL) -> App server.
IIS 7.5
·         IIS idle time-out set to 0 (meaning is it disabled)
·         Keep-alive: 2mins
Apache 2.4 with OpenSSL 1.0
timeout 10 mins
<code>SSLEngine On
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
</code>
F5
F5 runs firmware 12
Timeout is 5 minutes.
Application is .Net
Error
We have intermittent issues where in the proxy error logs the following show up. Client do time to time complain. Wireshark was no use as it is hard to find the exact time and the data put out there makes it hard to capture for more than 30 minutes.
Noted that Apache, F5 and IIS host many other sites and they have no issues. This only has it. also same user IP can work but sometimes it gets the error.
[error] [client xxxxxx] proxy: Error during SSL Handshake with remote server returned by /css/font-awesome.min.css
[error] proxy: pass request body failed to F5 backend VIP from end user ()
[error] (502)Unknown error: proxy: pass request body failed to F5 VIP
Possible cause:
I thought issue was the extended master key for TLS 1.2 but it was not that. I have newer browsers coming in with no issue but sometimes same user can work fine and suddenly they get this error and after they are again ok.
To add more to this, internal users whom bypass apache servers can in fact use the site without issue.
What is strange is that SSL handshake is having issue.
Between proxy and VIP of backend F5 TLS 1.2 is used.
I have disabled old ciphers and SSLv2 and 3 on Proxy as well.
SSL Labs shows site as A+.
Any suggestion is welcomed.
Comment: maybe you should try to disable reuse where Apache connection passes through an F5 and see if the problem persists or there is some sort of timeout.
Answer: Configure OneConnect. Doing this will keep connections open and eliminate a lot of SSL negotiation.


What's the oldest advaita ashram or mathas?

Question: The title is the question. But I know Shankara mathas are the oldest, I'm not considering them for this question.
Answer: The term Advaita refers to its idea that the true self, Atman, is the same as the highest metaphysical Reality (Brahman).
Earliest reference to Advaita can be traced to Rig Veda Hymn  X.72 and in Satapada Brahmana 6:1:1:5.
While in Rig Veda it was mentioned as Aditi and Daksha and in Satapada Brahmana it is was mentioned as Prajapati and AGNI.

Coming to the question part, we have to remember that Sri Gaudapada, Sri Sankara's grand Guru, and Adi Sankara was known proponents of Advaita in the recent past.
Sri Gaudapada Mutt, also known as Kavaḷē maṭha (कवळे मठ), located in Kavale, Ponda, Goa, is the oldest matha of the Smarthan Saraswat Brahmins.
However, there is a controversy as to the birth-dates of Sri Sankara.  The earliest period attributed was around 500 BCE.
All the Mutts established by Sri Sankara during his life time.  If we go by this theory, then the Mutts Sri Sankara should be the oldest Advaita Mutts.


Why a demanding proccess doesn't use another core?

Question: I've got an older Core i5 laptop and I play Dota 2 game sometimes. It's pretty demanding for my processor. But when I quit the game and look in system resources graph (in Taks Manager) and see constant 50% processor usage.
Why this demanding process doesn't run on another core with no usage?
Thank you.
Comment: The software has to be programmed to used multiple threads.  It has only been in the last decade that processors had the ability to process multiple instructions at once ( threads ).
Answer: Even though multi-core processors have existed for awhile now, a lot of applications aren't written to take advantage of SMP (Symmetric Multiprocessing). This is likely due to the complexity introduced when trying to take advantage of SMP, both in design and debugging. Wikipedia explains:

... a multi-core architecture is of little benefit for the application [when a] single thread [does] all the heavy lifting, [or when it is unable] to balance the work evenly across multiple cores.
Programming truly multithreaded code often requires complex coordination of threads and can easily introduce subtle and difficult-to-find bugs due to the interweaving of processing on data shared between threads (thread-safety). Consequently, such code is much more difficult to debug than single-threaded code when it breaks.

Dota 2, like a lot of games, appears to be one of those applications that doesn't take advantage of SMP.
Answer: Are you seeing 50% processor usage on a single core?  On Windows, you can set something called the affinity which, if set, tells Windows to keep a process on one or specific cores.  Perhaps one or more of your processes running have this set.


Majorana mass term

Question: I see somewhere that we can add a Majorana mass term, $m\psi^Ti\sigma^2\psi+h.c.$, to a Weyl fermion Lagrangian, where $\psi$ is a two-component spinor. However, it seems that this term simply vanishes due to the anti-symmetry of $i\sigma^2$. Did I miss anything here?
Answer: I found the answer in one of the problems in Peskin.
Because in the corresponding quantum theory, this spinor field will be anti-commuting variables, therefore it makes sense to start with classical anti-commuting Grassmann numbers for the classical field. In this sense, the mass term will not vanish.

Majorana mass term


How do I add authentication for the new Timeline feature for Facebook?

Question: I already have a "Connect with Facebook" button. Can I add the Timeline authentication as an extended permission? Also, can I already publish using the Timeline, or do I have to wait until Timeline is available for everyone?
Answer: You can publish to the timeline now even though not everyone has it. See https://developers.facebook.com/docs/reference/plugins/add-to-timeline/


Get Changed Rows of GridView ASP.Net

Question: How Can I find all the rows that has been changed in gridview. I can not use Ajax in any form
Comment: what do you mean changed? Is this Gridview populated with a datasource?
Answer: First get the contents of your grid before it was changed (such as caching the results of the original gridview datasource binding). Then go through the dataset/datatable/however you want to store it, and compare the contents with the current rows of the gridview.
Answer: There's no real efficient way to do this, no method like GridView.GetAllChangedRows().  So, what you might do instead is keep a behind the scenes List that you add to each time a row is modified (use the RowUpdated method), then clear this list when needed.
Answer: It depends upon how many columns you want to edit in a row.
If you have only one editable column in a row then you can associate a javascript method with that control which you want to modify and in that method you can get a rowid which you can save in another hidden field and in server side you can get all rows whose ids are stored in hidden field.
If you have whole row editable in that case the best approach I think you should save the original data source somewhere and also set a javascript method with rowclick event to get rowid which user selects. Then when user clicks on submit button get all rows whose row ids are stored in hidden field then compare those with same rowid in datasource. This is the best approach from my point of you.
Let me give you an example, suppose there are 1000 rows in a grid and user clicks on only 180 rows. In that case we will compare only 180 rows and wont compare rest of the rows.
Please let me know if somebody has better idea then this.

Get Changed Rows of GridView ASP.Net


Acetone - Can it already be anhydrous when purchased?

Question: If I have 99.9% Reagent ACS, Lab grade Acetone, is it safe to say that it's free of moisture/Anhydrous?
Comment: An important thing to keep in mind is that "dry" isn't necessarily a single thing. Your downstream application determines how much residual water is acceptable. Some applications require much "dryer" solvents than others. Your acetone may be fine for some applications but not others. - Most solvents pick up water from the air, though, in amounts depending heavily on storage conditions. That's why most people re-dry solvents according to their needs, unless they purchase special solvent grades which are certified low moisture and are packaged and stored to limit reintroduction.
Comment: No, that will have some water. I'd guess that you can buy "dry" acetone but it would be expense. Once you open the container and expose it to air then some air will fill the bottle which has at least a small amount of moisture in it and that moisture will migrate into the acetone. You can lower the water content of 99.9% reagent grade acetone by adding  molecular sieves to the bottle. That will help keep the acetone "relatively" dry.
Answer: As correctly pointed out by @MaxW, the technical acetone still contains water.  In addition, it is better to quantify "dryness", so by passing a mark you may draw the line of "dry enough" for the application you aim for; especially as Karl Fischer analysis may provide you a reproducible figure of merit about the water content.
Now, if you need dry acetone, stirr the acetone with potassium carbonate or calcium chloride and subsequently distill it off into a dry container.  In the instance of acetone, however, I refrain from molecular sieves because they catalyze aldol reactions.
Comment: @MaxW In the welcoming exchange with each other, we learn by the other; in benefit for both sides.
Comment: Thanks for pointing the problem with molecular sieves and acetone! I've been out of the lab too long. Forgot about that.
Answer: The acetone you have ($99.9~\%$) may be pretty pure but is certainly not dry (anhydrous). The dry solvents we have in the lab are typically marked as $< 50~\mathrm{ppm}\ \ce{H2O}$, which in percent would be $< 0.00005~\%$. In your acetone, however, there are $0.1~\%$ impurities, likely a large amount of which would be water.
If you buy dry acetone (and note that it is much more expensive than the already expensive $99.9~\%$ stuff), remember that it will come in an argon or nitrogen atmosphere and beneath a septum to prevent moisture coming in. Try and keep a positive pressure of whichever inert gas you have in that bottle so it will actually stay dry. Otherwise you will waste a lot of money.


Cannot transfer rented movie from iPod to computer?

Question: I rented a movie on my iPod touch 5th gen and want to sync it to my computer so I can watch it there. It won't transfer however. What do I do? Do I have to rent it again on my computer?
Answer: Per Apple, if you rent a movie on an iOS device or AppleTV, you cannot move it to another device or computer.
(The reverse, however, is possible - you can rent on a computer then transfer to an iOS device.)


Error deploying Solidity contract: Expected 0 constructor arguments, got 6 in hardhat

Question: I am trying to deploy a Solidity contract using a deployment script in Hardhat. However, I encountered an error during the deployment process.I'm using Hardhat as my development environment, and I have already compiled the contract successfully. However, it seems that there is an issue with the bytecode or data being provided during deployment. The error message I received is as follows:
Error: expected 0 constructor arguments, got 6
Deploy Script
const { network, ethers } = require("hardhat");
const {
  developmentChains,
  networkConfig,
  VERIFICATION_BLOCK_CONFIRMATIONS
} = require("../helper-hardhat-config.js");
const { verify } = require("../utils/verify");

console.log("I've reached here");

// Rest of the script...

const entranceFee = networkConfig[chainId]["entranceFee"];
const gasLane = networkConfig[chainId]["gasLane"];
const callBackGasLimit = networkConfig[chainId]["callBackGasLimit"];
const interval = networkConfig[chainId]["interval"];

const args = [entranceFee, vrfCoordinatorV2Address, gasLane, subscriptionId, callBackGasLimit, interval];

//**Error starts here**!!

const lottery = await deploy("Lottery", {
  from: deployer,
  args: args,
  log: true,
  waitConfirmations: network.config.blockConfirmations || 1,
});

// Rest of the script...
Solidity Code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AutomationCompatibleInterface.sol";

      abstract contract Lottery is VRFConsumerBaseV2, AutomationCompatibleInterface {
    // types/ enums
    enum LotteryState {
        open,
        calculating
    }

    // state variables
    uint256 private immutable i_entranceFee;
    address payable[] private s_players;
    VRFCoordinatorV2Interface private immutable i_vrfCoordinator;
    bytes32 private immutable i_gasLane;
    uint64 private immutable i_subscriptionId;
    uint16 private constant REQUEST_CONFIRMATIONS = 3;
    uint32 private immutable i_callBackGasLimit;
    uint32 private constant NUM_WORDS = 1;

    // lottery variables
    address private s_recentWinnerAddress;
    LotteryState private s_LotteryState;
    uint256 private s_LastTimeStamp;
    uint256 private immutable i_Interval;

    // events
    event LotteryEnter(address indexed player);
    event RequestedLotteryWinner(uint256 indexed requestId);
    event WinnerPicked(address indexed winner);

constructor(
    uint256 entranceFee,
    address vrfCoordinatorV2,
    bytes32 gasLane,
    uint64 subscriptionId,
    uint32 callBackGasLimit,
    uint256 interval
)
    VRFConsumerBaseV2(vrfCoordinatorV2)
{
    // (Constructor implementation...)
}
//Rest of the code

I suspect that the issue might be related to the bytecode not being provided correctly during deployment. I have verified that the contract is compiled successfully and the bytecode is available in the artifacts/ directory.
Could someone please assist me in resolving this error? What could be causing the error during deployment?
Answer: Because of the abstract contract you defined in Lottery, remove abstract.(abstract contracts cannot be deployed directly.)
Comment: Thanks, @Ethan but I already tried that, **it throws an error and refuses to compile** and if I try making the constructor public, it logs that I am not implementing from the base contract.


Should aerobraking vessels using SAS aim towards orbital retrograde? Or Surface retrograde?

Question: There's no "air" SAS mode to position your craft relative to surrounding wind speed. So what should the SAS mode be for aerobraking maneuvers? Orbital, or surface?
Or, is there a more precise way to orient a vessel relative to wind speed?
Answer: There is no wind in Kerbal Space Program (without mods, that is), so the atmosphere around any planet (or moon) is always rotating at the same rate as the surface.
Therefore, yes, if you wish to maintain a specific attitude (e.g. prograde or retrograde) with respect to the air surrounding you, you should indeed set your SAS to surface mode.
Comment: I've been doing it wrong for all this time...
Answer: To get the most out of aerobraking you want to orient your craft in the direction that gives you the most drag without your ship blowing up (or losing any components you want to keep). That means the ideal orientation depends on the craft and the speed and angle of entry into the atmosphere. If you can survive any orientation then you want to orient your craft so it presents the most drag, that usually that means the with the largest possible area facing retrograde with the navball in surface mode. In most designs this means you'd want to tell SAS to face radial in/out or normal/anti-normal while manually rotating the craft to present the largest area in your direction of travel.
Alternatively if you're trying to minimize the amount effect of the atmosphere, either because you're going too fast to survive any other way, or your trying to escape the atmosphere then you usually want your smallest surface area facing prograde. That would mean using surface mode and telling SAS to face prograde.
Note that because of atmospheric effects you may not have much of a choice. The force of the atmosphere may turn your vessel into a particular direction unless you have sufficient attitude control to counteract it.  Also note that forward facing parts shield the parts behind from the heat effects of aerobraking so the choice of facing may depend on what parts of your ship are the most heat tolerant. The design of your ship plays a significant role.
Answer: Update: I've confirmed the accepted answer.
The difference between surface and orbit prograde vectors are most notably different for polar or retrograde trajectories.
In my experiment, I aerocaptured a large ship in Eve's atmosphere at a slight inclination. The ship used a 10m heat shield on top, and 8 landing struts on bottom, making the total bottom diameter of the ship just under 10m.
When SAS mode is set to orbit/prograde, the landing struts explode on atmospheric entry. However it the areocapture worked with surface/prograde mode without incident.


Not able to get all values from a table with selenium chrome webdriver using python

Question: I want to know the way to collect all the information from a table from a web page.
At the moment I am able to get only the records which are visible in UI. (18 rows). However there are 96 rows in the table and i need to either scroll in the table frame or need some script to get all the data from the table.
please help. here's my UI page https://wbes.wrldc.in/ReportNetSchedule/GetNetScheduleIndex
Comment: Also you have option to download csv and excel for that page , just download and parse it
Answer: The endpoint https://wbes.wrldc.in/ReportNetSchedule/GetNetScheduleSummary returns a HTML with JS code that contains the data you are looking for.
You can either parse this HTML or separate the data from the HTML itself, creating a new endpoint for it (you should, because this is ugly JS). Then you can fetch the data with a simple cURL call.
Comment: I am able to get the data. however not completely as the table is a web element and i am getting the data only which is shown in UI. I want to scroll or get the complete data from the table.


How long should it take to Flash a image?

Question: How long should it take to Flash a image?it took 50 minutes to do it on the PI Imager,then when it had finished it falled.I tried it on Echer it took over 3 hours ?the same thing happend. But i got it on a USB FLASH DRIVE it took no time at all.Of course you can,t use a USB  drive or SSD until you update the firmware.I am doing it on echer it has been going for 35 minutes and only done 32%? i  on a 2017 5k Mac.I can,t see it working this time either.Why can,t the PI be able to be used with a SSD drive out of the box?
Comment: Have you tried with a different SD card or SD card adapter?
Comment: Even on a 2012 Mac mini it has never taken me more than 10 minutes to flash and verify any Pi image.  I use decent cards of 16Gb - normally SanDisk or Samsung A1 class.  Gut feel is you have a dying or fake SD card.
Comment: You are probberly right there  fake cards that is i did get them off ebay.they are Sandisk.It has been going for 25 minures now and only 26%/It did a USB in less than ten minutes.They are both new. There 32gb.Is that what they do if they are fake cards takes ages to do stuff?Usb adapter and the one for the SD slot.
Answer: It should take less than 10 minutes to flash an image to a new SD Card. (Tools that verify the image after writing take a little longer.) Even my large backup images take just over 10 minutes.
If it takes longer than this the SD Card is worn out (or faulty).
Comment: Thanks for that Milliways.Have a nice day.
Answer: Never longer than 15 minutes. 50 minutes it's obvious that something went wrong. Probably your sd card is dying. Even if you flash an image onto that card the raspberry will be painfully slow.
Comment: Thanks for that Morgan.There was two fake cards from Ebay i have had them for some time so can,t get a refund.I flashed it on a card i used with the PI 3.Like you say took about ten minutes.Hope you are having a doos day.


How can I move page turning to left side of a list

Question: I have a basic list in hosted (Office 365) Sharepoint 2010. I am wondering if it's possible to move the page advance to the left side of the bottom portion of said list. A picture for greater clarity:
Answer: You'd need to create a style to override the inline align:center of the id bottomPagingCellWPQ2. This could then be put into a CSS sheet and added as an additional include in your master page, attached directly in Site Settings -> Master Page, or added directly onto the view pages with a content editor web part.
Comment: This is essentially out of the box Sharepoint hosted solution. Can you provide any instructions on how to modify view page to accommodate this modification?
Answer: Im on my phone at the moment so cant give you a specific answer but you can use css to move the element for the paging.
use any of the following to get the id or style class:
chrome's inspect element (right click the element)
IEs developer tools (f12)
Firefox use firebug
when you find the element id or class use something like:
yourelementid or .yourelementclass
float:left;
you can put the css wrapped in a style block in a content editor webpart on the page.  Although if the style is striped out you can link to a text file with the css on it from the content editor webpart.
hope this helps.
Ginge.


How do I disable touch screen on Ubuntu 17.10 permanently?

Question: My screen is cracked a little. It used to work all good in previous versions by xinput disable command but it did not work in this one.
How do I disable touch screen on Ubuntu 17.10 permanently?
Answer: You can add the below to one of your startup scripts
xinput disable `xinput --list | grep -i "touch " | sed 's/id=//g' | cut -f2`

The opposite will re-enable it
xinput enable `xinput --list | grep -i "touch " | sed 's/id=//g' | cut -f2`

Note that there is a space after "touch". This is to prevent the command from picking up the touchpad on your laptop!
Comment: You can add an alias with `alias disable-touchscreen="xinput disable \\`xinput --list | grep -i 'touch ' | sed 's/id=//g' | cut -f2\\`"
`
Answer: The answer below works, but had some additional problems, such as disabling the touchpad.  An alternate and IMO better solution can be found at https://askubuntu.com/a/986453/283721

I have had to turn off my touchscreen as well, for another reason.
If you are using xorg, you can do this on a temporary basis using xinput
first, identify the touchscreen using xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech M315/M235                        id=9    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=13   [slave  pointer  (2)]
⎜   ↳ ELAN Touchscreen                          id=14   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Dell WMI hotkeys                          id=11   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
    ↳ Laptop_Integrated_Webcam_HD: In           id=10   [slave  keyboard (3)]

In my case the touchscreen would appear as "ELAN Touchscreen" in the first section of the output.  I could then use `xinput disable "ELAN Touchscreen" which would disable the touchscreen until either the next reboot, or putting the computer to sleep and awakening it.
A more permanent solution for me, has been to blacklist the module "hid_multitouch"
I have created a file named /etc/modprobe.d/hid_multitouch.conf  it's contents are as follows:
# Use the following syntax
# blacklist driver-name
blacklist hid-multitouch

The touchscreen driver for your system may not be the same as for mine - you can test this using sudo modprobe -r hid_multitouch which will for a short period disable your touchscreen - I found that it reloaded within 5 or 6 seconds.
I was able to determine that hid_mutlitouch was the driver used for me system by examining dmesg | grep "device name" -A3 -B3 which, amongst other things, produced the output
[21896.624869] input: ELAN Touchscreen as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:04F3:0034.000A/input/input18
[21896.625587] hid-multitouch 0003:04F3:0034.000A: input,hiddev1,hidraw2: USB HID v1.10 Device [ELAN Touchscreen] on usb-0000:00:1a.0-1.2/input0

Comment: Thanks. Unfortunately disabling this kernel module disabled my touchpad as well as the touchscreen, so I'm going to need another solution
Comment: @PerJohansson I had forgotten this answer was here, and had developed a better solution which is at [https://askubuntu.com/a/986453/283721](https://askubuntu.com/a/986453/283721) - please give that a shot!
Answer: My BIOS settings offer an option to disable the touchscreen. Perhaps yours do as well.


what does the : operator do in assembly?

Question: what does the : operator do in assembly?
seen in code like: DS:DX
i haven't found any documentation for this operator.
(im using NASM)
Answer: That's actually just a register separator, not an operator. It means use the DX register as an offset from the DS segment register base.
What it actually gives you as an address depends on what mode you're running in (real or protected).
For example in real mode, the segment register is multiplied by sixteen and added to the offset register to give you a 20-bit physical address. If DS is 0x1234 and DX is 0x5678:
  12340
+ 05678
  -----
  179B8

In protected mode, DS is acutally a segment selector which is used to lookup a base address for the memory in a table, then add that to the offset register to give a value.
That value is invariably a virtual address which is mapped to a physical address by the memory management unit (MMU), after ensuring that the relevant virtual memory is paged in from external storage.
Answer: The : operator differentiates a segment register/selector from a general-purpose register, and signifies which segment to access the register value in.  So for instance,
DS:DX

means in 16-bit real mode to access the 16-bit value in the DX register offset from the DS segment value, which increments in 16-byte values (i.e., the difference between segment values 0x0000 and 0x0001 represent a 16-byte offset).  So for instance, if the value in DS was 0xA000, and the value in DX was 0xFF, then you would be addressing the value at 0xA00FF.
In a 32-bit protected mode, the segment selector represents a 16-bit descriptor value where bits 3-15 are used as a look-up offset in the CPU's global descriptor table or local descriptor table which contains information on the 32-bit segment addresses range, as well as the ring-level access permissions for that segment (i.e., kernel-level, user-level, etc.).  Bits 0-1 represent the request privledge level, which prevents a user-level process from loading a higher-permission segement value.  Bit 2 is a flag, which when cleared means to look up the segment in the GDT, or if set means to offset into the LDT.  For instance, a DS value of 0x0010 would mean to look up the third slot in the GDT with a request privledge level of 0 (i.e., you would need to be in kernel level mode to set this value). The value in DX would then be offset from the start of the address range set for that specific segment in the GDT.


Bring Layer panel from header back to the context menu area or lock it opened?

Question: In Blender 2.9 the grease pencil layer panel appears on the header and it shows up only when you click on it and disappear when you move the cursor elsewhere. While in the tutorials from Blender 2.8 it is located between the outliner and the context menu and it is always displayed. Which is very comfortable. So I wonder, can I bring it back to the side? Or at least lock the panel so it stays visible while I'm working?
Answer: On the side bar (properties), there is a green icon above the material icon, inside that you will find the layers.


My postfix server is getting DOSed, what can I do?

Question: Port 25 is open and I'm getting thousands of emails. How can I make it stop?
Comment: Is the RCPT TO to a valid address?  If not, your postfix server should close the SMTP connection immediately after the RCPT TO to the invalid address, instead of accepting the message.
Comment: Use Some sort of Spam Filter or completely close the port if you don't need it
Answer: As you don't give much about your environment we must assume you want to mitigate the DDOS through Postfix itself. In that case there are some settings you can try.

Limit the number of inbound and outbound delivery rates with default_process_limit
Control how many messages get are delivered simultaneously to a local recipient with local_destination_concurrency_limit
Limit the number of recipients the SMTP daemon will take per delivery with smtpd_recipient_limit
You should also test if you have inadvertently set up an open relay.
I would also do a tcpdump against port 25 for inbound traffic to see if you can mitigate any issues by tightening your firewall as the previous poster stated.
It's been a while since I set up a Postfix server but these were some go to settings to prevent abuse.
Answer: If you can, try to :

Rate limit your router to prevent your server from being
overwhelmed
Add filters to tell your router to drop packets from the obvious
sources of the attack
Timeout half-open connections more aggressively
Drop spoofed or malformed packets
Set lower SYN, ICMP, and UDP flood drop thresholds


HVAC Issue With Compressor

Question: Every time the compressor tries to come on it pops the breaker. A friend who has worked in AC says its because the compressor is going bad. Is this true?
Answer: He could very well be right. When bearings inside the compressor start to bind up due to age, they increase the running amps. Once that amperage exceeds the breaker size for a period on time, the breaker will trip. Eventually, your run amps will equal your locked rotor amps which can be three times the normal running amps.
Things to check first would be all the connections to make sure none of the wires burned and are shorting out. Also check the contactor for failed parts that might be shorting out. Check your disconnect switch for any burn marks.

HVAC Issue With Compressor


How to get rid of the parts that stick out when the end of a line intersects another line in Inkscape?

Question:
Here's an image that describes what I mean. The cap of the line segment sticks out when the line segment ends right next to a different line, and I was wondering if there's a good way to make it flush using Inkscape.
Answer: Please correct me if I'm wrong, but it looks like you're using the 'Triangle in/out' shape setting from the toolbar of the drawing tools.
Inkscape automatically adds the 'Power Stroke' path-effect to your path to achieve this style. That means that, while in node-editing mode, you can simply move the pink diamond-shaped handle that controls the thickness of the 'Power Stroke' effect a little backwards so it tapers off at the end.

If you don't like that line-cap style, then you can open the 'Path → Path Effect...' panel and set the 'End cap' (or 'Start cap') to 'Round' for example.

By the way, you can Ctrl-click, then drag these nodes to add more of them and fine-tune the thickness of the stroke along the path. Clicking them while holding Shift opens a little dialog where you can set the position and thickness precisely and a Alt + Ctrl-click deletes them again.

Admittedly this is only to make it less visually obvious. To truly get what you want, you'll probably have to use 'Path → Object to Path' (or 'Stroke to Path') and manually edit the nodes at the ends. Or cut those parts off with some helper objects and using 'Path → Difference'.


Igmp snooping based multicast forwarding

Question: In Igmp snooping switch receives an Igmp leave report? Is it possible to change the timeout value in Igmp snooping switch?
Comment: Hi, this question is pretty unclear because it's missing context.  Is this a theoretical question or are you trying to solve a problem?  If you're solving a problem, then please tell us what problem you're solving.  If this is a theoretical question then please add more details about why you're asking it.
Comment: I need snooping switch timers function?
Comment: I still don't understand what you need... please review [this link about IGMP timers](http://blog.ine.com/2008/10/31/a-quick-overview-of-basic-igmp-timers/) and let us know if you still have questions...
Comment: Mike, he is talking about setting timers in the switch and not on individual hosts that send IGMP reports. I am going to edit the questions a little bit.
Comment: Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
Answer: We should be able to configure member leave time in the switch.
For Cisco boxes, we can configured this timer globally or on a vlan-basis: http://www.cisco.com/en/US/docs/switches/lan/catalyst4500/12.2/50sg/configuration/guide/multi.html#wp1126514 .
<code>##To configure globally
ip igmp snooping last-member-query-interval time

##To configure on a per-vlan basis:
ip igmp snooping vlan vlan_ID last-member-query-interval time
</code>
Juniper boxes also support this feature: http://www.juniper.net/techpubs/en_US/junos/topics/task/configuration/igmp-snooping-ex-series-cli.html
I would recommend doing some more Google.
Comment: Please quote the relevant parts of those referenced documents. So when those URls break, your answer would still make sense.
Comment: Fair point. I have added the relevant config.


How to get a score over 9,000,000 on the ruins course?

Question: Is there a secret score multiplier in Pokemon snap? I have a score in the 5 millions like the rest of the top players other than this one person.
With 15 Pokemon in ruins, it would take a score of over 8000 on all 72 pictures. Is this a cheat/ exploit?
Answer: According to this discussion thread (which was started around the same time your question), there is no feasible way to achieve that high of a score legitimately in the game. The only way to obtain that high of a score is to use a hacked console, or modded version of the game


Why does my house seem to warm faster in summer than it cools in winter?

Question: In summers when we switch off the air conditioner, the room seems to instantly get hot again.
But in winter, when we switch off the heater the room seems to remain hot for some time. Why this difference?
Comment: Without a *lot* more information about the situation, this is a guessing game, not a well-defined physics question.
Comment: Related search: http://physics.stackexchange.com/search?q=is%3Aq+temperature+ac
Comment: This hasn't been my experience. In fact yesterday I came home from work and turned off my air-conditioner and hours later my girlfriend came over and said it was too cold! It depends on many factors: air flow, sun light intensity, location and area of windows, temperature difference inside versus outside...
Comment: Voting to re-open for no reason other than that I was about to ask exactly the same question myself. In my experience, rooms feel hot only a few minutes after turning off the air con in summer, while they may still feel warm hours after turning off the heating in winter. This might be to do with humidity, or it might be to do with the $T^4$ law (though it happens at night just as much as during the day). It's clearly a physics question, and the answer is not obvious.
Comment: (Relevant information, at least in my case: I live in Japan, where summers are very humid, winters are very dry, and insulation often leaves a lot to be desired.)
Answer: I think part of the perceptual difference has to do with humidity.  The human body doesn't really feel the temperature we read off of our thermometers.  The thermodynamics of the human body are complicated, but people have designed various scales that are supposed to measure "apparent temperature".  One of these is the Canadian humidex, which is a complicated formula in general, but when linearized they say:

The humidity adjustment effectively amounts to one Fahrenheit degree for every millibar by which the partial pressure of water in the atmosphere exceeds 10 millibars.

Instead of working with partial pressure, let's consider relative humidity, which is just defined as the fraction of partial pressure with respect to saturation pressure:
$$ r \equiv \frac{P}{P_s} $$
so we could say (with $A$ for apparent temperature):
$$ dA \sim dT + \frac{ P_s }{ 1 \text{ mbar} } dr  $$
So, let's try to consider how we expect the temperature or humidity to invade after we turn off the heater/cooler.  Well, we know that the process for both should look like Newton's law of cooling as they are both invasion processes, so we should have something like
$$ dT = \frac{ \Delta T }{ \tau_Q} dt \qquad dr = \frac{ \Delta r }{ \tau_v } dt $$
where here, $t_Q$ is some characteristic time for heat invasion in a home, and $\tau_v$ is a characteristic time for water vapor invasion.
using these in our approximation for how the apparent temperature depends on temperature an humidity, we get an equation for the rate change for the apparent temperature and compare this to a combined effective rate
$$ \frac{dA}{dt} = \frac{\Delta T}{\tau_Q} \left( 1 + \left(\frac{P_s}{1 \text{ mbar}}\right) \frac{\Delta r}{\Delta T} \frac{\tau_Q}{\tau_v} \right) \equiv \frac{\Delta T}{\tau} $$
we see
$$ 1 + \left(\frac{P_s}{1 \text{ mbar}}\right) \frac{\Delta r}{\Delta T} \frac{\tau_Q}{\tau_v} = \frac{\tau_Q}{\tau} $$
Now, to estimate.  The difference is going to come from the fact that in the summer, especially in humid climes (which I am assuming you are from, given your observation), in the summer, their might be a 20 degree difference in temperature from inside to out, but inside is usually at about 30% humidity while outside is usually near 100%, so we'll take $\Delta r = 0.7$. I'm imagining Florida, so we'll take $\Delta T \sim 20\, {}^{\circ}F$. The vapor pressure of air at 21 celsius (70 F) is $P_s \sim 26 \text{ mbar}$.  It remains to estimate the ratio of the time constant for vapor invasion versus heat.  In this blog post, the author does a fairly detailed calculation of the heat flow in a model house, considering conduction, convection and radiation through walls, floor, ceiling, windows, doors, etc, as well as the heat flow do to air invasion, and discovers that they are roughly equal in contribution.  Now, as for humidity invasion, we expect it is negligible through the walls and floor and the like, but should be present in any air invasion.  This suggests that $\tau_Q / \tau_v \sim \frac 12 $ which gives us for an effective time constant for the apparent temperature in the summer, considering the contribution of humidity we get
$$\tau \sim \frac{ \tau_Q }{ 1.5 } $$
Now, in winter, there is usually a very small difference in humidity from inside to outside, but still a $\sim 20\, {}^{\circ}F$ change (in Florida) so we expect $\tau \sim \tau_Q$, which suggests that your house should feel like its getting hotter some 50% faster in summer than it feels like its getting colder in winter, due to the effect humidity has on apparent temperature.
Answer: A window air conditioner is a small piece of equipment with relatively small heat capacity. But with heaters it depends, if it is electric it barely has much capacity and the room will feel quickly very cold once it is turned off. If your heater is steam radiator or forced water then it will take a long time for those to cool down. If the room has central forced air to heat or cool then probably it does not matter either way.
Answer: When your house heats up, it is receiving the contribution from the hot air outside, plus the sun's radiated heat. When cooling in the Winter, the factors are the cooler air and the radiation loss, which is not comparable to the sun's.
Answer: This question can be answered with a nice visual comparison.
Let's take a pan of water, and put it on the stove at full power. You periodically throw in an ice cube to keep it at room temperature. Obviously, the moment you stop doing this, your pan is going to heat up very quickly. Now, take that same pan and put it in a slightly colder place. Intuitively, you can see that it won't cool down as quickly as it heated up with a big stove.
The same goes for your house in summer. The sun is a massive radiator; your house is hit with about 1kW per square meter on a sunny day. It's only because a large portion is reflected that your airco unit is even slightly capable of cooling your house. Check your airco; let's say it has a cooling power of approx 3kW: it needs to take away 3kW of energy continuously, or else your room will heat up as if there were a heater of 3kW.
Now, how cold does it have to be outside to to need a 3kW heater? Typical R-values are around 6 °K m²/W, which need you need 6 degrees Kelvin (or Celcius) difference between the inside and the outside to lose one watt of power on a square meter of wall. Let's say it's -20°C outside (that's -4 Fahrenheit), and 20°C inside; i.e., 40°C difference. You'll need a whopping 450m² of wall area to need a 3kW heater. Admittedly, this neglects quite some things left and right, but it gets the point across.
TL;DR: your house is not a glowing hot fireball like the Sun, and will not lose heat quite as fast to its surroundings, as it gains heat by solar radiation.


Simulation of multi-particle systems, randomness and chaos

Question: The answer https://physics.stackexchange.com/a/10441/50677 for #2 (chaotic randomness) claims that the absolute knowledge (whatever that would be) of starting conditions were sufficient for a perfect prediction of outcome. I think this is wrong. After all the interactions between particles happens in quantum dimensions and therefore is fundamentally random in the sense that one cannot predict e.g. the amount and direction of impulse that is exchanged in a "collision" interaction between two molecules - we can only trace probability clouds which even after a short time and few particles lead to what we perceive as chaotic behaviour: it is as good as not knowing exactly the starting conditions. This randomness affects systems like a gas atmosphere (thus making weather forecast impossible even if we knew each and every particles initial parameters) as well as the orbits of planets, therefore I think the answer in this point is wrong. Or am I?
Answer: The person who asked the question purposefully separated quantum randomness, in the third point, from the second point you mention. They wanted to know about a classic chaotic system (which is, in fact, deterministic).
The flux of a turbulent fluid is chaotic, but not unpredictable in principle, as is (according to most QM interpretations) the outcome of a quantum measurement. This might not be true for a real fluid, which is, as you say, made of atoms, which are subjected to quantum laws. However, the classical theory of fluids, at the scale of the fluid (ignoring atoms), is deterministic and chaotic, and does not need quantum mechanics to function.
In other words, sure, everything is made of quantum fields, so everything is quantum. But this is not a useful picture of reality at other scales, such as that of a human body. Here, we are talking about the usual theory of probability of coin flips, the usual theory of turbulent fluids, and only at the end we work with quantum mechanics.
The answer is not wrong, in the same sense as it is not wrong to use Newton's law of gravitation, even if it is actually invalid in the conditions where a more powerful theory, general relativity, is needed.
Comment: I got that distinction and I know of the unpredictability of also classical systems (which I think Poincaré first explained coherently) but I think the poster made this point not clear enough, when he is talking about Saturn and an initial imprecision of 10cm/5cm. He should have put that in the sterile context of a thought experiment. Real Saturn even with perfectly known start will deviate simply because quantum effects will make him e.g. radiate and lose matter unpredictably. Maybe it won't have as fast an impact like 5cm position deviation, but in the end it will.
Comment: It will, but we're not talking about "real Saturn". We're talking about the classic law of gravitation.
Comment: I threw this question in because someplace else a person claimed that, given perfect knowledge of the starting conditions and unlimited _classical_ computing power, we could predict "the weather" without error. Even if we assume zero differences in extraterrestrial influences (same rays, same energies) the simulation would inevitably diverge due to randomness of e.g. hull electrons interacting in molecule "collisions": impulse / direction changes are only predictable as probability densities, no? In a chaotic system this leads to fundamentally unpredictable divergence.
Answer: You are missing the point. Yes the real world obeys the laws of quantum mechanics and the interplay between this and classically chaotic systems is an interesting subject in its own right, however one of the key insights with chaos theory is that even in a completely classical world where the laws of physics were completely deterministic there would still be systems that were, for all practical purposes, unpredictable. When the answer talks about having absolute knowledge in this completely classical context. Yes this model is wrong, however, to use the common cliche,

all models are wrong, some models are useful.

It is also worth noting that in almost all cases where we encounter chaotic behaviour the uncertainty in our measurements is far greater than any quantum corrections.
So in short, you are, in a sense, technically correct but by being so you are missing the interesting physics in the answer.
Comment: He is saying: " In the real world, nobody bothers, since constructing this model is very difficult." This is denying the influence of quantum randomness on macroscopic processes - and I was just asking for the correctness of this viewpoint which, deducing from your answer, is void. It is interesting that my harmless question invoked some rather opinionated responses.
Answer: It is impossible for us to decide whether reality is deterministic or stochastic.
Stochasticity may happen on such small scales that we need to precisely know the state of the entire universe to distinguish it from chaos.
Deterministicity may be so complex that we need to precisely measure the entire universe to make a prediction.
Quantum mechanics is a model of reality which is stochastic as this is the best way to explain observations.
However, whether there is an underlying deterministic process (hidden variables) that governs this apparent stochasticity is something we can never know.
At best we can make statements of the limits of this determinism and argue with Occam's razor.
Just consider that we can simulate quantum randomness on a deterministic computer.
So, to come back to your question, if the universe happens to be deterministic and we could somehow completely isolate and measure a part of it, we could precisely predict the future.
Our insights from quantum mechanics and in particular regarding local hidden-variable theories put strong restrictions on what we can actually measure, how much we would have to measure, and whether such a thing as perfect isolation even makes sense, but nothing more.


Aligning tangents in connecting NURBS-curves

Question: I want to smoothly connect two NURBS-curves. To that purpose, how can I align their common vertex tangents? Right now, they're at an angle (see picture). I could do it manually (on sight), put that would never be (mathematically) perfect. ...
Comment: Thx, but what if one of the objects is not a NURBS-curve, but just an edge.  How can I make the edge coincide with the tangent of the curve's endpoint? Extruding is not possible here
Comment: You don't mention anywhere in your Question that you want tangents between curves an regular Meshes. It's a valid question, but you should be explicit about you want.
Answer: you can snap disjoint curves together, and thereby manually make a perfect tangent, then translate that segment away and snap it to the end of one of the Curves. It's easy but isn't exactly obvious..
Answer: You probably joined two nurbs curves, but you still have two independent series of control points (they are drawn in two different colors), each from the original curve joined.
One way is:

Connect the two near endpoints where the curves should join "perfectly" with a segment (select endpoints and press F, this creates a segment between them
now the new segment is selected, subdivide it once, pressing W (specials) and then choose subdivide
now select only the joined endpoints (not the new one created by subdivision) and delete them with X then choose "vertices"
Comment: Thx guys, but what if I want to smoothly join an edge (two vertices) to a NURBS-curve. So this time I want to align the curve's endpoint tangent with the edge, BUT THEY'RE NOT EVEN joinable (or editable at the same time), because the first is a mesh and the second a curve ...
Answer: Incidently found an alternative solution on my own. In "Transform Orientations" set the custom axis to the last two control points of the first NURBS, and then use that axis system in the second NURBS to align its control points with those of the first.
Comment: do you mean that you are using a Mesh based object to get your Transform Orientations, and using that in the NURBS curve objects? because NURBS Curve Objects don't expose any orientation information from edge points and segments, only the Curve's matrix.. I don't understand your answer.


prevent Ubuntu from getting slow without reboot

Question: I am implementing some numerical simulations so after some hours or a day, the ubuntu system gets slower so I need to reboot.
Is there any way to keep the system fast without reboot?
It's sometimes annoying to re-open many terminals and the programs as well as to set the directory again after reboot.
Comment: Welcome to Ask Ubuntu.  I'm guessing, but I'd guess a program is misbehaving or poorly written (making malloc() [*memory allocate requests*] without subsequently free() [*returning memory*] for use by others or later, causing slowdown), and if you logout & login it may achieve the same result. You didn't give your release or DEsktop, but some will restore open-programs (or you can save a config or selection of configs & have it/one restore [xfce]; though it can't control what the program does after opening it [ie. no `cd` unless you script it])
Answer: Yes, that would be annoying to re-open many terminals. I suggest you install the CPU Frequency Scaling Indicator
(An indicator for monitoring and switching CPU frequency scaling) using the command:
<code>sudo apt-get install indicator-cpufreq
</code>
Once installed (and after you reboot), the app icon should appear in the status bar. You may also make sure that the app is in the list of the startup applications (usually by default). Then you would be able to switch to the

performance mode

to prevent your system from going into the so called power-save mode and to stay on the performance mode.


The continuous aspect with repeated actions

Question: We can use the continuous aspect of tenses to show that some action was repeated many times it may have irritated us like " she was always taking my things" therefore, could we say using present perfect continuous " she has been calling you 5 times"?
Comment: Note, this shows "repeated many times" in a vague way. Naming a specific number of times makes it unnecessary.
Comment: In fact, maybe this is the key to your other questions that combine continuous tenses with specific events, like "I was working there for two hours when I saw her." These continuous tenses work well for vague statements, and adding the specific "two hours" does the opposite. As these many questions and their comments show, it's possible to find a use for them, but it might be more common to leave the specifics out of the continuous use, or to choose a different tense to use with specifics.
Comment: Note, this shows "repeated many times" in a vague way. Naming a specific number of times makes it unnecessary. – meaning it's a mistake or not?
Comment: Yes, anouk is correct, this would be non-idiomatic and unlikely. ("Mistake" is not necessarily the right word for these situations; no rules have been broken; it's not like saying "She has been calling you times 5," which breaks standard sentence order and allows potential misunderstanding.) I could imagine saying "My hand is tired; *I've been folding* 1,000 origami cranes." That's almost but not quite the same thing, but it's ok.
Comment: No, but  you can do this: She was always calling me at the office.
Answer: No, it is either: " she's been calling me" or " she has called five times". Use present perfect simple to express how much/how many.
Comment: Could I say " She has been calling me all the time?
Comment: Yes, that's possible.


What does this Dota 2 error mean?

Question:
I opened and ran Dota 2 earlier today with no issues. Now I'm getting this error.
Answer: It means that the virtual method
 InstallSchemaClassBinding of one of the schema bindings from libschemasystem.dylib has a registration error because of a local class not locally-scoped.
Although you didn't ask for a fix, I would suggest a clean reinstall.
To fix this manually, you'd need to bypass the anti-data tampering code, which I would not recommend if you do not have RE experience.

What does this Dota 2 error mean?


Implementation of a ASP.NET based portal-like application

Question: There is the requirement, to write a portal like ASP.NET based web application.
There should be a lightweigted central application, which implements the primary navigation and the authentication. The design is achieved by masterpages.
Then there are several more or less independent applications(old and new ones!!), which should easily and independent be integrated into this central application (which should be the entry point of these applications).
Which ways, architectures, patterns, techniques and possibilities  can help and support to achieve these aims? For example makes it sense to run the (sub)applications in an iframe?
Are there (lightweighted and easy to learn) portal frameworks, which can be used (not big things like "DOTNETNUKE")?
Many thanks in advance for you hints, tips and help!
Comment: Problem is, those requirements will make the framework as big as DNN.
Comment: People think that DNN is big because it has the word "Nuke" in its name.
Answer: DON'T REINVENT THE WHEEL! The thing about DotNetNuke is that it can be as big or as small as you make it. If you use it properly, you will find that you can limit it to what you need. Don't put yourself through the same pain that others have already put themselves through. Unless of course you are only interested in learning from your pain.
I'm not saying that DNN is the right one for you. It may not be, but do spend the time to investigate a number of open source portals before you decide to write your own one. The features that you describe will take 1000s of hours to develop and test if you write them all from scratch.
@Michael Shimmins makes some good suggests about what to use to implement a portal app with some of the newer technology and best practice patterns. I would say, yes these are very good recommendations, but I would encourage you to either find someone who has already done it this way or start a new open source project on codeplex and get other to help you.
Answer: Daniel Dyson makes a fine point, but if you really want to implement it your self (there may be a reason), I would consider the following components:

MVC 2.0
Inversion of Control/Dependency Injection (StructureMap for instance)
Managed Extensibility Framework
NHibernate (either directly or through a library such as Sh#rp or Spring.NET
A service bus (NServiceBus for instance).

This combination gives you flexible user interface through MVC, which can be easily be added to via plugins (exposed and consumed via MEF), a standard data access library (NHibernate) which can be easily configured by the individual plugins to connect to specific databases, an ability to publish events and 'pick them up' by components composed at runtime (NServiceBus).
Using IoC and DI you can pass around interfaces which are resolved at runtime based on your required configuration.  MEF gives you the flexibility of defining 'what' each plugin can do, and then leave it up to the plugins to do so, whilst your central application controls cross cutting concerns such as authentication, logging etc.


LINQ to SQL - Select where starts with any of list

Question: Working on a Linq-to-SQL project and observing some odd behavior with the generated SQL. Basically I have an array of strings, and I need to select all rows where a column starts with one of those strings.
using (SqlConnection sqlConn = new SqlConnection(connString))
{
    using (IdsSqlDataContext context = new IdsSqlDataContext(sqlConn))
    {
        //generated results should start with one of these.
        //in real code base they are obviously not hardcoded and list is variable length
        string[] args = new string[] { "abc", "def", "hig" };

        IQueryable<string> queryable = null;

        //loop through the array, the first time through create an iqueryable<>, and subsequent passes union results onto original
        foreach (string arg in args)
        {
            if (queryable == null)
            {
                queryable = context.IdsForms.Where(f => f.MatterNumber.StartsWith(arg)).Select(f => f.MatterNumber);
            }
            else
            {
                queryable = queryable.Union(context.IdsForms.Where(f => f.MatterNumber.StartsWith(arg)).Select(f => f.MatterNumber));
            }
        }

        //actually execute the query.
        var result = queryable.ToArray();
    }
}

I would expect the sql generated to be functionally equivalent to the following.
select MatterNumber
from IdsForm
where MatterNumber like 'abc%' or MatterNumber like 'def%' or MatterNumber like 'hig%'

But the actual SQL generated is below, notice 'hig%' is the argument for all three like clauses.
exec sp_executesql N'SELECT [t4].[MatterNumber]
FROM (
    SELECT [t2].[MatterNumber]
    FROM (
        SELECT [t0].[MatterNumber]
        FROM [dbo].[IdsForm] AS [t0]
        WHERE [t0].[MatterNumber] LIKE @p0
        UNION
        SELECT [t1].[MatterNumber]
        FROM [dbo].[IdsForm] AS [t1]
        WHERE [t1].[MatterNumber] LIKE @p1
        ) AS [t2]
    UNION
    SELECT [t3].[MatterNumber]
    FROM [dbo].[IdsForm] AS [t3]
    WHERE [t3].[MatterNumber] LIKE @p2
    ) AS [t4]',N'@p0 varchar(4),@p1 varchar(4),@p2 varchar(4)',@p0='hig%',@p1='hig%',@p2='hig%'

Answer: Looks like you're closing over the loop variable. This is a common gotcha in C#. What happens is that the value of arg is evaluated when the query is run, not when it is created.
Create a temp variable to hold the value:
foreach (string arg in args)
{
    var temp = arg;
    if (queryable == null)
    {
        queryable = context.IdsForms.Where(f => f.MatterNumber.StartsWith(temp)).Select(f => f.MatterNumber);
    }
    else
    {
        queryable = queryable.Union(context.IdsForms.Where(f => f.MatterNumber.StartsWith(temp)).Select(f => f.MatterNumber));
    }
}

You can read this Eric Lippert post about closing over a loop variable. As Eric notes at the top of the article, and as @Magus points out in a comment, this has changed in C# 5 so that the foreach variable is a new copy on each iteration. Creating a temp variable, like above, is forward compatible though.
Comment: Note that this behavior has changed in subsequent versions of the language. Doing it this way is forward compatible, however.
Comment: Instead of checking if the variable `queryable` is null for the first iteration and duplicate the `Where` clause, I suggest you to set a default value to the variable: `queryable = Enumerable.Empty().AsQueryable();`. Then, you can remove the condition.
Answer: The union is correct, due to you using union in your linq to sql query. The reason they are all hig% is because the lambda f => f.MatterNumber.StartsWith(arg) creates a closure around the loop parameter. To fix, declare a local variable in the loop
    foreach (string arg in args)
    {
        var _arg = arg;
        if (queryable == null)
        {
            queryable = context.IdsForms.Where(f => f.MatterNumber.StartsWith(_arg)).Select(f => f.MatterNumber);
        }
        else
        {
            queryable = queryable.Union(context.IdsForms.Where(f => f.MatterNumber.StartsWith(_arg)).Select(f => f.MatterNumber));
        }
    }

But I agree the union seems unnecessary. If the array of strings to check against is not going to change, then you can just use a standard where clause. Otherwise you could take a look at predicate builder! Check here
Answer: How about this ?
queryable = context..IdsForms.Where(f =>
            {
               foreach (var arg in args)
               {
                   if (f.MatterNumber.StartsWith(arg))
                      return true;
               }
               return false;
            }).Select(f => f.MatterNumber);


Are there descriptions, explanations, examples of the different XCM origin types/XcmV0OriginKind?

Question: When I select the Transact instruction, I can select an OriginKind (Native, SovereignAccount, Superuser, Xcm) but it isn't clear to me how these different origins are interpreted.
I thought I saw information about this somewhere, but can't find it.
Are there examples of the implications of using different origins or use cases that highlight when to use which origin?
Comment: Is this helpful? https://substrate.stackexchange.com/a/5074/1959
Answer: There are descriptions of the origins in the codebase.
https://github.com/paritytech/polkadot/blob/master/xcm/src/v0/mod.rs#L60
/// Basically just the XCM (more general) version of `ParachainDispatchOrigin`.
#[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, Debug, TypeInfo)]
pub enum OriginKind {
    /// Origin should just be the native dispatch origin representation for the sender in the
    /// local runtime framework. For Cumulus/Frame chains this is the `Parachain` or `Relay` origin
    /// if coming from a chain, though there may be others if the `MultiLocation` XCM origin has a
    /// primary/native dispatch origin form.
    Native,

    /// Origin should just be the standard account-based origin with the sovereign account of
    /// the sender. For Cumulus/Frame chains, this is the `Signed` origin.
    SovereignAccount,

    /// Origin should be the super-user. For Cumulus/Frame chains, this is the `Root` origin.
    /// This will not usually be an available option.
    Superuser,

    /// Origin should be interpreted as an XCM native origin and the `MultiLocation` should be
    /// encoded directly in the dispatch origin unchanged. For Cumulus/Frame chains, this will be
    /// the `pallet_xcm::Origin::Xcm` type.
    Xcm,
}

The implications of using different origins depends on the code you are calling, and if you are able to generate that origin at all.
For example, it would not be normal for a regular user to be able to generate the Superuser origin, but it may be possible for the chain logic itself to do that. Having access to the Superuser origin will allow you to use configurations like ParentAsSuperuser which specifically check for these things:
pub struct ParentAsSuperuser<RuntimeOrigin>(PhantomData<RuntimeOrigin>);
impl<RuntimeOrigin: OriginTrait> ConvertOrigin<RuntimeOrigin> for ParentAsSuperuser<RuntimeOrigin> {
    fn convert_origin(
        origin: impl Into<MultiLocation>,
        kind: OriginKind,
    ) -> Result<RuntimeOrigin, MultiLocation> {
        let origin = origin.into();
        log::trace!(target: "xcm::origin_conversion", "ParentAsSuperuser origin: {:?}, kind: {:?}", origin, kind);
        if kind == OriginKind::Superuser && origin.contains_parents_only(1) {
            Ok(RuntimeOrigin::root())
        } else {
            Err(origin)
        }
    }
}


Is it possible to start a TCP socket connection without a handshake?

Question: I am making a SSL server, and I don't use python's library as I want to make some unorthodox changes to the process. Because of that, I cannot simply start a TCP connection since I need to transfer the encryption details with the handshake, which I can't do over sockets. So I am using scapy to make the handshake itself, but after that I would like to continue working with a TCP socket without going through the process of the handshake again. Is that possible?
Answer: If I understand your question correctly, you exchanged a few segments using scapy and now want to manufacture a normal full-blown socket out of them.
This is not easily possible: for all practical purposes your TCP is oblivious to whatever you sent in your packets and it doesn't keep any state for this TCP connection: all the state is in your application.
That said, there is a thing called TCP_REPAIR in Linux that lets you put a socket in a given state.

When this option is used, a socket is switched into a special mode, in
  which any action performed on it does not result in anything defined
  by an appropriate protocol actions, but rather directly puts the
  socket into a state, in which the socket is expected to be at the end
  of the successfully finished operation.

If you set sequence numbers correctly, the socket should "just work".,

One also needs to restore the TCP sequence numbers. To do so, the
  TCP_REPAIR_QUEUE and TCP_QUEUE_SEQ options were introduced.

Of course all this is specific to a modern Linux; other operating systems may or may not have similar mechanisms.
Comment: Thank you. I do not run Linux, is there a possibility to cast a socket from UDP to TCP after I perform the handshake? Also, I heard about "Raw Sockets". Is it possible to use that all the way instead? I haven't read about raw sockets yet, but if you happened to know this is possible with that method than I will study about them.
Comment: @jep_macca "is there a possibility to cast a socket from UDP to TCP" absolutely not. Raw sockets won't help you here: by definition raw sockets have no transport-level semantics.
Comment: Well thank you very much for all the help. I will look for a TCP_REPAIR for Windows, hopefully there is such thing. Making a TCP connection would be pretty tiresome with UDP connection and timeouts.


Rule of the octave for melody

Question: In thorough bass (where the bass line is written first) there are simple "rules" for ascending and descending scales with different inversions and other rules in "partimenti". They are all based on the view from the bassline. I am looking for something similar from the point of view of the melody (to use when harmonizing melody).
Comment: @RockinCowboy, he's talking about partimenti - late Baroque exercises for voice leading and harmonisation, usually over a bass. The Rule of the Octave is one of rules (a principal one) for harmonisation. See http://faculty-web.at.northwestern.edu/music/gjerdingen/partimenti/aboutParti/index.htm.
Comment: There are no rules for melody as it relates to octaves other than if you write a "song" intended to be sung (definition of a song) then your melody must take the singers range into account.  Therefore there is a limit to how many octaves a melody can span and still be possible to sing.  If it's not a song, but just an instrumental piece, there need be no restrictions on how many octaves the melody should span.  But I am a little unclear exactly what you are asking.  If you could edit the question with more detail on what you want to know and how you will apply that knowledge, that would help.
Comment: @Patrx2  Ahhhh - I got it.  If you have time, you would be qualified to provide a useful and informative answer.  It's beyond my expertise so I'm not going to attempt.
Answer: I believe that I understand what you have been looking for, as I also have been looking for it.  If I understand you correctly, what you are looking for is a kind of auto-harmonisation procedure for a melody.  After all, this is essentially what the Rule of the Octave does for the bass: for each note that could occur in the bass line, there is a prescribed chord that, when used together, almost always creates a highly typical chord progression.
Unfortunately, there is no such rule for melody from a comparable time period (18th century, give or take a bit) or in a comparable style, probably because melodies tend to be less formulaic than bass lines.  Even for the Rule of the Octave, there are plenty of poor possibilities that could occur between one bass note and the next, which are not a problem because bass lines tend to be more formulaic than melodies, and those combinations are not typically found in the bass lines that you would expect to use the Rule of the Octave with (a good example would be skipping from scale degree 7^ to scale degree 4^, which would mean skipping from viio6 or V6/5 to ii6 or ii6/5, which is poor harmony, but the bass line would not likely put you in this situation - the Rule of the Octave works best with stepwise bass lines).
There are, however, sets of rules for harmonising melodies like this from earlier time periods, which you might want to experiment with.  Depending on the language of the country that the variant comes from, it might be called "faburdern", "fauxbourdon", or "falsobordone".  Of these, falsobordone is the closest to modern harmonies, and might be satisfactory to your ear; however, like the Rule of the Octave, it is a product of its time (16th century) and will produce the most satisfactory results with melodies comparable to those for which it was intended (originally chant-like melodies, though I have heard it used to good effect on other kinds of melodies from slightly later).  You can see a good example of this here:

You should be aware, though, that the sound you will get is likely to sound very Renaissance-ish.  This is, though, the only system that I know of that is a melodic analog to the Rule of the Octave.
Hope that helps!
Answer: This is a great question! I'm not sure I can help exactly, because I'm not certain what you're looking for exists, but hopefully I can at least give some good information in this area.
Regole are model structures of basic musical elements like cadences and sequence.
Solfeggi are "style exercises" for a voice and basso continuo.
Involature are keyboard pieces that provide sample textures and figurations.
The knowledge gained from these three 'traditions' are the building blocks to creating partimenti. You're right that partimenti are typically basses, but Sanguinetti's 2012 book The Art of Partimento suggests that they weren't always basses (though not everyone agrees with this). Perhaps you can check that out for a start?
Check out also the Spring 2007 issue (51/1) of Journal of Music Theory, which is devoted to partimenti.
Comment: See: https://music.stackexchange.com/questions/87729/is-there-another-name-for-involature
Answer: Not strictly figured bass or partimenti, but you could take a look at the rules for harmonising Bach chorales, where you are given a chorale melody and fill out the parts for SATB choir, starting with the Bass line.

Identify the degree of the scale of each note in the melody
Identify cadences (there are cadence 'templates' based on melodic
patterns are the ends of phrases e.g. 2-2-1 can be harmonised by
ii7b-V-I amongst others)
Identify chords which fit the melody using Roman numerals
Use common chord progressions where possible
Fill in other parts, adding passing notes, suspensions, other
decorations
Proof-reading, check for parallel fifths/octaves etc.

I use the chorale example because there are many online resources (Tom Pankhurst's Chorale Guide being one) as this has been part of the UK A-level Music exam (and undoubtedly in other countries and exams) syllabus for a long time!  However you might also consider the rules set out in Eric Taylor's excellent The AB Guide to Music Theory Part II, which deals with counterpoint (and possibly chorales, but I don't have the book to hand to check).
Finally, it seems that there are exercises in harmonising melodies by James Lyon from 1912.  He also wrote an accompanying book, The Elements of Harmony, in which he suggests the steps for harmonising a melody which are similar to those above but include the following tips:
(i.) Find the cadences.
(ii.) Sketch a simple hymn-tune-like bass, treating as many notes as possible in the given theme) as unessential notes
(iii.) Use as few chords as is convenient in each bar.
(iv.) Sketch in the parts to be added. (Elaborate later.)
(v.) Contrast the rhythms of the added parts
(vi.) Make the harmonies complete even in three parts
(vii.) In writing for strings, carefully " bow " each part,
(viii.) Make each part interesting in itself.
So slightly different to Bach's chorales where you change chord every note.
Answer: Whether the top line of notes are given or the bass, the concepts of harmonisation stays the same. The melody line tends to be given more when advance harmony questions are asked, as it test the candidate's knowledge on how to approach inversions.
Whether you write the bass line or the top line your outside voices have to be written in the style of a melody. What does this mean? Your outside voice has to have a pleasant line. It is also good to aim for a compass of around an octave and at the very least one of a sixth.
Remember your harmony exercises can have all the correct notes but if there is no real melody in the outside voice you write then it still will not get good marks.
The line of the outside has to have some sort of form. Does it go up and down like a pyramid, do you have waves? The line you write has to take what the given line does into consideration.
If the given line jumps a lot then it is good to have steps between notes or even stay still when you have consecutive chords that have notes in common.
CHORD PROGRESSIONS ARE IMPORTANT.
You basic 1-3-4 progression is vital. That is to say choose chords that are either 4 steps forward from the previous one, one step forward from the previous one or three steps back from the previous one.
Cadential 6/4 progression are also something you are expected to know. That is to say a chord in second inversion before the tonic or dominant chords that are used as a decoration in a cadence.
Passing 6/4 chord progressions are also a must know. That is i(6)-vii(6/4)-I(6) and I(6)-V(6/4)-I(6) and the proper way they resolve. If you see notes that fit the bill of these chord progression you have to use them.
There is also the descending leading tone chord progression that most methods could also ask.
USE THE CONSERVATIVE APPROACH TO NON CHORDAL NOTES!
Use them sparingly and in a way that enhances the melody of your outer line. You can also use them to add seventh of chords which will lead to better marks as the fact is sevenths sound good.

Rule of the octave for melody


Is a modern radio wave broadcasting station a very fast spark gap transmitter?

Question: In a spark gap transmitter, is that a "real" radio wave that is produced?  I know you can hear it on an AM radio, if you are close to the gap, but is it a radio wave the same as from a radio station?  Except from a radio station or modern transmitter the "gap transmitter" would be very, very fast?
Answer:
In a spark gap transmitter, is that a "real" radio wave that is
  produced?

It's the antenna that converts the spark induced carrier wave (controlled by an LC tuned circuit) voltage to a radio wave. It does so by matching the impedance of the cyclic voltage and current oscillations (low impedance or low V to I ratio) to 377 ohms where 377 ohms is the impedance of free space or a vacuum.
All radio antennas do this and, without a proper antenna, you will create a "radio" signal that doesn't travel effectively through the medium of space or air because it won't have E and H fields in the correct proportion for an optimized transmission.

is it a radio wave the same as from a radio station?

It will be a radio wave but it will be an on-off carrier where the on and the off are determined by a morse key that is used to "code" language into dots and dashes: -

After the spark gap circuit and with the invention of valves/tubes, proper modulation (as opposed to on/off keying) could be implemented and radio receivers became much more sensitive. That marks the big difference in tech that emerged and basically the same principles exist today.
Answer: The transmissions from a spark gap transmitters were "real" radio waves, but very noisy, and a single transmitter would cover a wide range of frequencies.
Modern transmitters generate the signal electronically.  The signal from a modern transmitter occupies a very narrow range of frequencies, so many transmitters can operate without interference.
Comment: Wow, @johnny... you are about 110 years behind
Comment: I was born in 1802.  Only now have I began to understand things.
Comment: When you say electronically, they still use electricity like the spark gap, though, so what does you mean by electronically?  Do you mean the frequency is controlled by specialized electronics unlike power, two electrodes, and a switch?
Comment: Ah... give it another 200-300 years then and you'll be a pro :) But seriously, read [this](https://en.wikipedia.org/wiki/Radio#Antenna)
Comment: By electronically, I mean using tubes, transistors, or integrated circuits.
Answer: Radio waves are electromagnetic waves and are the same now as in the spark-gap transmission era.
The spark gap was a means of generating fast rise time current pulses that would cause EM radiation.  Before electronic oscillators were available the highest frequencies of alternating current (AC) that were available were supplied by alternators that were rotated rapidly with many poles.  These were large and cumbersome and had lots of practical limits to their maximum frequency.  The tuned circuit spark gap and the rotating spark gap were a period solution to a problem that had no other solution.
Tuned circuits were added later to control the transmit and receive frequency selectivity to achieve better range and bandwidth utilisation.
If you were to make a rotating spark gap (that makes an arc very rapidly) and couple it across a high-Q tank circuit (using superconducting inductors say) you could generate presentable on-off (CW) EM carrier waves that look just like those generated with modern electronic oscillators and amplifiers.  They would however be very limited in modulation and tuning capabilities and very large and cumbersome to fabricate.  Might still be an interesting experiment.


Is Taekwondo a free moving fighting style?

Question: I've been looking to get into Taekwondo but I was wondering if it is mostly a free moving style (like boxing) or a disciplined style (strict movement with mostly certain positions allowed). I want to get into a mostly free moving style. Can anyone answer my question?
Comment: All martial arts are "free moving" in a fight. The only possible exceptions I can think of (And this is based on perception, not actual experience) is kendo sparring. Can you clarify what you mean?
Comment: Please explain further what you mean by "free moving style" and "disciplined style".
Comment: @HuwEvans - That entirely depends on the scoring rules and the federation. And WTF has recently changed the rules (again) to reintroduce punching as a legit technique.
Comment: Yeah like strict movement with mostly certain positions allowed.
Comment: I don't think any style only allows certain positions.  Note however that Taekwondo is a points based competition sport.  You don't score many point for front jabs and so on that you might find effective in boxing. High points are scored for big impressive kicks.
Answer: Just a quick note on the terminology.
"Free fighting" is generally the term used to describe when people are fighting together on their feet, free to move around. There's no holding going on at all. No throwing. No grappling. It's mostly about striking. This is also called the "free movement" phase of fighting (other phases include the "clinch" and the "ground", with transitions occurring between each phase).
"Free style" is generally the term used to describe when people are able to use whatever techniques they want to achieve some goal (usually to score a point in competition). There's no adherence to a particular style's set of techniques.
For example, in Judo, there are only a limited number of ways you can hold someone down on the ground, and there are a limited number of throws you can do to get someone on the ground (some throws are actually banned in some Judo competitions). The techniques you use in Judo must conform to the standards of that technique. Sloppy technique generally doesn't score, or scores less than "perfect" techniques. So Judo is not a free style grappling art.
What you're referring to is "free style" when you say "free movement". Taekwondo is a "free fighting" style, but it's a matter of philosophy when trying to determine if it's actually free style.
In TKD, there is a great deal of flexibility allowed when performing kicks and punches in sparring. Your kick could look nothing like an orthodox technique. That's fine, it still scores points. So in that sense, TKD sparring is free style.
But where the philosophical dilemma comes in is how one reconciles this with the fact that TKD rules are very limiting. They greatly limit what techniques you can perform at all.
Take for example a technique from Capoeira where you do a kind of cartwheel-like movement, placing your hands on the ground while kicking to your opponent's face or torso. While a kick to the face is allowed in Taekwondo, placing your hands on the ground is not allowed.
Elbow and knee strikes to the face and body are also forbidden in TKD sparring. In some TKD competitions, spinning back-fists are also forbidden.
So I'll just say that Taekwondo competition can be seen as having elements of both free style and non-free style. It depends on your own way of looking at it.
And notice I'm careful to say this only refers to "competition rules", not to the martial art itself. In the broader version of Taekwondo, there are self-defense aspects which do not have these limitations. That's where you're going to see elbow and knee strikes taught. But it still doesn't generally teach grappling, or strikes to the back, etc. This is also highly dependent on your school and your instructors.
In general, sparring becomes "free style" when the rules are reduced so much that essentially the only thing remaining is the goal (which is usually to score a point). The way you achieve that goal doesn't matter. All techniques would be allowed - with some reasonable exceptions for safety reasons (eye gouging, fish-hooking, kicks to the testicles, ear claps, throat strikes, etc.).
By that definition, something like Boxing is not free style. That's because spinning back-fists are not allowed, for example. If the only thing that's important is that the strike hits the face or the body, then surely this technique should be allowed. But it isn't allowed in most Boxing competitions. In fact, non-spinning back-fists as well as palm strikes aren't allowed in Boxing, either.
Boxing would be "free style" if it merely allowed any kind of strike with the hand or the fist to occur. It still wouldn't have to allow for kicking or grappling in order for it to be categorized as free style.
So, getting back to Taekwondo...
Is Taekwondo a free style system? I don't think so, not by my definition. But does it have free style elements to its sparring? Yes. So that is why this really requires you to think about what you want from Taekwondo and whether or not it's giving you that.
Hope that helps.
Comment: I am half tempted to ask "what is a free style?" as a question so you can copy and past this there where it might get seen more.
Answer: It may depend on what type of Taekwondo you study, and which part of the class you're asking about. In my experience, from having done a bit of ITF, a bit of WTF, and a bit of Songham-style, the drills during class tend to be what you're discussing with the "disciplined style", going into specific stances and doing specific techniques, as are the "forms" (I'm told tul is the proper Korean word). Sparring tends to be free moving, with some rules to constrain the fight, but without specified movements. In between, some schools do "one step" drills, which involve an attacker at speed, doing a specified set of movements, with a specified defense.
Comment: 'tul' is the Korean word for pattern/form.
Comment: @MikeP: Thank you. For some reason, the term never came up in the four years I took it. :)
Answer: Considering that you're talking about the WTF Olympic sparring combat sport, I would say that it is mostly a free style.
Of course the movements you will use are actually constrained by the sparring rules, but that's also true for boxing, that you mention as an example of a free style.
As a caricature, you could say that TKD sparring is like boxing, but using mostly your feet instead of your fists.

In TKD you can hit only on the coloured areas of the body vest and on the helmet, and these areas are very similar to the ones allowed in boxing.
in TKD you can only hit with your feet and fists; similar to boxing but adding kicks.
No grabbing is allowed in either.
No ground fighting is allowed in either.