Upgraded from 2.3.1 to 2.3.3, now billing address drop down is gone from checkout page

Question: I am hoping to get some light here on the issue. After updating from 2.3.1 to 2.3.3 via composer, in the frontend, during checkout page, in the part where the user can change the billing address by unchecking "My Billing and shipping address are the same", the drop down menu with the billing address is no long appearing.
This behavior affect every payment method that requires a billing address. I have tried to turn off the one page checkout I was using and the behavior is the same. I have consulted with the one-page developer and they told me since the issue persisted with their module disable, the issue is most likely related to theme or static file generation but I do not see any related error log in the system.log or exception.log. The theme is the default luma theme, no changes.
However, in the checkout page, with Chrome web console, it does display some warning:

I have no clue where the error could be, I have tried to switch from Production mode to Developer mode, redeploy static content, flush cache, clean cache but all doesn't seem to work.
The commands I ran for the upgrade was:
<code>php bin/magento maintenance:enable
composer require magento/product-community-edition=2.3.3 --no-update
composer require --dev allure-framework/allure-phpunit:~1.2.0 friendsofphp/php-cs-fixer:~2.14.0 lusitanian/oauth:~0.8.10 magento/magento-coding-standard:~3.0.0 magento/magento2-functional-testing-framework:2.4.5 pdepend/pdepend:2.5.2 phpmd/phpmd:@stable phpunit/phpunit:~6.5.0 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:~3.4.0 --sort-packages --no-update
composer update
bin/magento cache:clean
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf generated/code/*
bin/magento setup:upgrade
</code>
Thanks for any help in advance.
Answer: As it turns out, the issue was caused by a third party module called "customer attribute system" by x-mage 2, an update from the developer has fixed the issue.


Impress presentation format problem

Question: I have install Ubuntu 15.10 and am using libreoffice impress office version 184.108.40.206 and using windows fonts in Ubuntu, still am facing a problem am created some PPT  also am saved this files .pptx, but when am open this files in windows 7 then some contains and table messed up am also try to update libreoffice but no any solution found, and attachment
Answer: The easiest way to solve this issue is to save the LibreOffice Impress file in its native ODP extension, on your Linux system. After you do that, access your Windows system, download and install the LibreOffice suite for Windows 7, then run it in order to open your ODP file on Windows 7.
An alternative to this - in case you don't need to edit the presentation file on Windows - is to use your Linux's LibreOffice Impress to export the presentation as a PDF file, so you can then open it and switch it to "presentation mode", which is nice if you want to use it e.g. on a business meeting.
Concerning tables, pictures, polygons and other objects present in LibreOffice files (drawings, texts, presentations et cetera), there are known long-term issues that occur while LibreOffice converts to the Microsoft Office format (DOC, DOCX, PPT, PPTX, XLS, XLSX et cetera) files that contain such objects. Thus, it's wise to avoid attempting such conversions. Not even iWork (Apple's office suite) succeeds 100% when it tries to open (or convert) Microsoft Office files.
PS: also notice that although PPTX is a "XML PPT" and thus it uses an open source format, traditionally Open Office and its forks (LibreOffice included) deal better with PPT files than with PPTX files. Thus, you should definitely give the PPT extension a try.
Answer: You can try exporting the presentation to a PDF, where you can simply click through each slide. File -> Export to PDF This is what I would do, and it really is the only solution that doesn't involve a ton of re-editing.
If you have time, you can also make sure that Powerpoint has the same fonts as Impress, that would solve some issues. Powerpoint and Impress are known to not work well together, even when trying to share versions. Powerpoint simply has more features and is more complex than Impress. In the future, use one or the other.
Another thing to mention. If you can use Libreoffice Impress on Windows (preferably the same version), you should. It will definitely work with the Impress presentation created in Ubuntu, just be sure to save it as the default ODP format, and open the file in Windows. This would preserve transitions and rendering ability on the Windows side of things - you could present directly from Impress on Windows (if needed).
Comment: Frist of all Thanks for your suggestion but when am insert some effects on PPT then export on PDF  how i can represent  effects in PDF.
Comment: When exporting to PDF, you can't replicate animations. You can only replicate animations if you present in the same program that you created them in. Rarely does powerpoint interact well with impress's animations.

Impress presentation format problem


Mesh formation in the wells of SDS PAGE. How to solve it?

Question: I casted 10% resolving gel and 4% stacking gel and every time a mesh like structure ( polymerisation) in the wells are formed.How to avoid this from happening and how do i get clear wells? If someone has any idea about it, it will be a great help. Thank you
Comment: Is the comb the right thickness for the spacer you're using?
Comment: Have you tried rinsing the wells with buffer? Do you have an image of this problem? How old are the chemicals you use - especially TEMED and APS?
Answer: This issue is driving me crazy too. Although I haven't identified the exact cause, here are the steps I've taken to minimize mesh formation:
(1) Prepare your gel on the same day you plan to perform SDS-PAGE. Do not store your gel in the fridge overnight.
(2) Allow the stacking gel to harden for a longer period (>40min). I suspect that the mesh forms when the stacking gel hasn't hardened sufficiently.
(3) Switch out the comb. It's possible that mesh formation is associated with a specific comb. Mark the comb number and monitor any mesh formation.
(4) Prepare more gel than you actually need. In my experience, some gels with mesh formation occurred while others did not. By making a few extra gels than needed, I was able to select the gels without mesh formation for my experiments.
All these steps are based on speculation; nothing has been proven yet. Good luck and please share your experiences if you get any improvements!


How did users find out about how to craft different objects in Minecraft?

Question: When the game was first launched how did the new users know how to craft different objects?
The game doesn't seem to have any guide about them.
Comment: Why does this have 5 downvotes? It's a great question.
Answer: This could be expanded to any game with a crafting system. It's a pretty common thing. Players just figure things out, either by trial and error, hacking into the source code, or intuition.
Crafting in minecraft is pretty simple as it's shape oriented... for example, a pickaxe is crafted by making a T shape in the grid... even without a dedicated guide/tutorial, new players are able quickly figure it out.
To go through the first hour or so of minecraft that I experienced(and probably many other people):
Player spawns in.. runs around, starts punching things. that's all they can do. Punching a tree got them wood... that sounds useful...  open up your inventory and notice a little crafting thing. put the wood into the slot and hey that got the player planks, so they get more wood and make more planks.
After the initial teaching of crafting the player tries again. "maybe I can make the planks into something too" so they put one into the crafting box... nothing.. one on top.. heyyy sticks! Now they've learned items are used to make more items.
fast forward some more and they haven't found a use for sticks yet... but they haven't tried everything with planks, throw more into the crafting box... and look at that.. a crafting table! with a big 3x3 crafting grid, the possibilities are endless!
The player then spends the next chunk of time trying various combinations of what they have with everything (sticks, wood, planks, probably a flower or 2, etc) and since wooden tools are made with just planks and sticks. they can quickly figure out how to make them with a short time of experimenting.
Comment: Since Minecraft is in Java, decompile the bytecode, search the crafting function, dump the list of recipe and understand how it work => instant "all crafting recipe" knowledge.
Answer: Way back in 2010, during the 'Indev' phase of Minecraft, Notch (Minecraft's creator) announced, on his blog, a patch that included crafting - and gave a few hints to prospective players about recipes:

Crafting on /indev/ now
It's not very intuitive yet, but it kinda actually works!
Here are some hints to get you started:
Right click with a stack of items to place only one in the inventory.
Place two wood tiles so that one is above the other, and you can build sticks.
Make a "T" shape out of two sticks and three wood blocks to make a wooden pickaxe.
You can make torches.
You can make emerald swords.

http://notch.tumblr.com/post/359717446/crafting-on-indev-now
On the same blog, Notch posted a video in which the new crafting was demonstrated.  (The video shows a demonstration of very early mining and crafting in the game.)
Essentially this was the sum of the advice given on crafting recipes when the feature was released; players were left to find out the rest for themselves. As part of this, the Minecraft Wiki was created and maintained in the early development phases, where this knowledge was - and still is - shared.
Answer: Basicly, crafting is as simple as building,crafting, and speaking. Players experience all of it once logged on to a survival/creative world they maybe saw MC videos or read the discription on the Minecraft home page. Crafting is as simple as all
Crafting:
<code>   Crafting: There are variant ways you can make blocks/Materials that are needed or recommended look under this to see 3 things to craft
</code>
Since there are 9 spaces on the grid in the crafting table you use those spaces for crafting!
Around the middle space use cobblestone for a furnace...
Place wood in all spaces to make wood...
Put  a gold block in the grid (Anywhere) to regain 9 gold ingots!
I hope this helps you
Comment: Hi Stefan, welcome to the site. This doesn't appear to answer the question of how the _original players_ of the game learned how to craft objects.


Wordpress installed in root folder, subdomain now not working, GoDaddy host

Question: please forgive me for being a complete beginner at this, I'd rather not have to try to deal with this myself but as GoDaddy support have not replied after 2 days I'm going to have to. I think my problem is the same as the one above, but I'm not 100% sure, so I'm reposting it, I'm not really confident enough to attempt to try the fixes I've seen here so I need someone to give me baby instructions?
Our original website (www.mwpics.com.au) was built in Dreamweaver etc, recently we created a new website in Wordpress, in a subdomain, then migrated it over to the root folder where it is now operating fine. I also moved the files for the old website into another directory which I called 'old', so they're all still there.
The problem is that I have a subdomain set up - which is still showing as set up in the control panel on godaddy the url is www.mwpics.com.au/clients  and it is at www.clients.mwpics.com.au. This directory contains loads of other directories, each of which is password protected by .htaccess files and which our clients access directly (not through the site) to download their finished work. The test one and the one for random clients is www.mwpics.com.au/clients/temp - username and password both temp (the usernames are all the same as the directory names).
Since the WP install to the root directory the /clients extension no longer works (it should bring up an information page which is an .html index page in the directory) and the /clients/name extensions no longer works - it goes back to the wp site with a 'not found' error message. Strangely it does bring up the box for the username and password, but when you enter it it just goes back to the 'not found' message.
Someone told me it was the .htaccess file - so as an experiment, I renamed the .htaccess file in the root directory and then copied the .htaccess file from the old root files into the root directory, eureka! It worked - and also the WP site opened to the home page... but bummer - the /pages in the WP site now no longer worked! But at least I know the source of the problem.
So I switched it back and this is the status quo - I have no idea how to fix this, and with everyone back at work tomorrow, clients are going to want to start downloading their stuff...
Can anyone help me? I'm starting to panic a bit
Answer: you only have to exclude the clients subfolder in your wordpress .htaccess - see .htaccess & Wordpress: Exclude folder from RewriteRule for a detailed description
this should work:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/clients.*
RewriteCond %{SERVER_NAME} !clients\.yourdomain\.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

short: it simply skips the wordpress rewrite rule if the reqest uri starts with /clients or the domain name is clients.yourdomain.com
be aware though, that as soon as you update your wordpress permalink settings, this rule will be overwritten by wordpress ...
Comment: Can I post the .htaccess file here for you to look at, I kind of understand that answer but want to be sure
Comment: # BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress
Comment: oops sorry the line breaks got lost, do you want me to repost it
Comment: added an example to my comment - hope this helps
Comment: so I replace clients\.yourdomain\.com in your example with clients\.mwpics\.com.au or just leave it as you wrote it? (sorry)
Answer: Try adding the following at the top of your root directory's .htaccess file, before the WP code block:
<IfModule mod_rewrite.c>
# fix rewrite for GoDaddy
Options -Multiviews

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} clients.mwpics.com.au$ [NC,OR] # ignore subdomain
RewriteCond %{REQUEST_FILENAME} -d [NC] # ignore directories
RewriteRule .* - [L]
</IfModule>

Comment: OK so I just copy this and paste it above the # BEGIN WordPress line?
Comment: I forgot the mod_rewrite condition, so updated code example so that all of it could be placed at the top before # BEGIN WordPress. This way if WP is updated, the WP-specific code can change and this will be unaffected.


How does the validation set get used in the training phase?

Question: I am confused about how the validation set is used during the training phase (neural network like CNN)?
In a platform like Matlab or python(Keras), I split my dataset into train set, validation set and test set.
I knew that validation set is used to tune hyperparameters(like the number of neurons and learning rate), suppose SDG optimizer is used, how the tuning hyperparameters happened based on validation set?
Does the validation set just give an indicator of how the neural network performs on unseen data(validation set) then based on that I manually set hyperparameters? or something automatically(the optimizer) tune hyperparameters?
Answer: The validation set is used just to give an indication about the network's performance. The hyperparameters are tuned based on the training data itself.
Based on the optimizer, the neural network calculates the loss for a training sample. Based on the computed loss, the weights of the network are updated. This is repeated for every sample in the training set.
The validation set just uses the latest weights of the network on unseen data to check the model's performance.
Comment: The trainset is used in weights updating (weights not considered hyperparameters), so validation set not consider as part of the training phase (tunning model),  just used just to give an indicator of the performance or used to stop early as soon as overfitting beginning to happen?
Comment: Yes, you are right. You can train your model without providing a validation set.
Answer: The three way - train, validation(dev), test split helps in unbiased evaluation of the model on unseen data , that is the test set. The train and validation sets are used for training weights and hyperparameter tuning respectively. In Keras if you have set the 'validation_split' parameter in 'model.fit' then you can look at the performance of your model on the validation set and tune the hyperparameters manually in order to get a good validation set performance.Once you are satisfied with the performance of your model on the validation set, you finally evaluate your model on the test set.
Hyperparameter tuning is done manually and not automatically by Keras.


What equivalent series resistance (ESR) capacitor should I replace bad one with?

Question: I've got a bad clock capacitor in my original xbox that I'm trying to replace. It's a 1F 2.5V cap however, I'm not sure what Equivalent Series Resistance (ESR) the new cap should be. I see they sell 1 Ohm, 90 mOhm, 70 mOhm, and 500 mOhm on digikey. Any suggestions? Also how do you feel about the brands Eaton, Taiyo Yuden, or ELNA? Thanks!
Comment: Won't matter for clock backup applications.
Comment: This site can't advise on brands, that becomes product endorsement. Capacitor ESR matters with pulsed applications that pull large sudden currents from it. But not with a continuous and tiny current draw like you've got.
Comment: ah so in my xbox, this capacitor is just used to hold power to the system settings so the ESR shouldn't matter? As for brand, I thought I heard some were at a higher risk for leaking than others. I'm not looking for someone to try and sell a product but rather state factual information about one. If brand A is more likely to leak than brand B, we should be able to call them out on it.
Comment: I've never had any problems with Taiyo Yuden or Elna products, and I don't remember using Eaton recently. Not affiliated with any of them. Digikey should list lifetime and temperature ratings, that should be a start when determining how long a cap will probably last.
Answer: A value of 1 Farad hints at a clock or memory backup capacitor. This will power a chip drawing current in the micro-amps range. Therefore, high ESR will not matter at all.
ESR matters for critical decoupling, regulator stability, and high currents, none of which are of concern in this application. Since you will likely pay more in postage than in the capacitor itself though, I suggest selecting a higher quality model though.
Your criteria should be:

Make sure the package fits into the PCB footprint
Don't forget about height! Component height can bite when closing the box after doing repairs.
Leakage current, which will discharge your cap. Get a cap specified for memory backup, so it keeps its charge for a long time.
Lifetime in hours at specified temperature (higher is always good if it's affordable)
Select a lower ESR model if it makes you feel warm and fuzzy, but really, it wont matter. 0.1 or 10 ohms ESR will not matter at all, if the chip it powers draws microamps, the ESR voltage drop will be negligible.
Comment: @John. ESR is irrelevant . Leakage current is spec you need to hold a charge for a long time. A battery is even better. Alkaline will last 10 years
Comment: great answer!! So when googling around, I see some people claiming the original xbox capacitor has an ESR of 500 mOhm. If I replace with an ESR 1 Ohm you think it would still be ok then? Also, I noticed some brands don't specify the lifetime at temp but rather number of discharge cycles. For instance, the Taiyo Yuden says it will last 100,000 cycles while the ELNA says 1000 hours at 70C. Is one better than the other in that regard?
Comment: John, there is a rule of thumb that says every few ºC you can reduce, you can multiply the lifetime by a factor to get a ballpark of the lifetime at "ambient" temp (I'm guessing your xbox spends the majority of the time at less than 70ºC). I'm not gonna quote the number since I have no way of backing that up. But this way you can estimate approx how long one will last vs the other. Honestly, I wouldn't worry though. Does 100000 cycles not feel enough? Just buy 2 then :P
Comment: Also, the ESR is quoted at a given frequency. At practically DC I bet the ESR of both caps will be identical. So 0.5Ohm won't make a difference for your application.


Logic level of CP2102

Question: I want to have an USB-UART interface for my Controller. I was thinking to use CP2102 and thus was reading the data sheet. But I cannot figure out the logic level of the UART part of CP2102. Can you someone please direct me to the proper section of the datasheet that says about this? BTW, the logic level of my Controller UART interface is 2.8V
Answer: On page 8 of the datasheet VOH is referenced to VDD. So the outputs can swing between 0 and VDD. VDD can be between 3.0 and 3.6V. See VIL and VIH for input levels.
Comment: Thank you for the information. As my Controller UART interface is 2.8V, therefore I need to use a level shifter or simple voltage divider, right? When I calculate resistance for voltage divider, shall I calculate the logic level of CP2102 as 3.3V?

Logic level of CP2102


How can I remove partitions? I already have 4

Question: Help I want to remove my partitions everything apart from my windows 7 how can I do this ?
http://fpaste.org/159716/07549141/
Answer: Both Windows and Ubuntu provide graphical interfaces to manage partitions.
Your question is unclear, so I will answer both potential questions:

If you wish to keep both your Ubuntu OS partition and your Windows partition, then from within Ubuntu you may run the "Disks" utility. Type "Disks" into the search field of the Ubuntu menu.
First select the disk, then select the partition you wish to delete and click the - symbol below it.

If you wish to delete the Ubuntu OS partition as well, leaving only the Windows partition, you may boot to Windows and access a similar tool by going control panel->(set view to large icons in the top right)->administrative tools->computer management->disk manager or run diskmgmt.msc.
From here you may select disks, and right click on partitions to delete them.

Be certain you wish to delete a partition, recovering them completely is usually impossible.
Answer: Gparted in Ubuntu is a good partition management tool.  I believe you can use it to delete partitions and then resize/enlarge other partitions.  Be very careful though and make sure you've backed up all of your data before you try any of this.
Answer: Your best option is GParted live. I imagine you will need to incorporate the free space into the other partitions after you've deleted them. GParted live can merge, delete, create, pretty much all the possible functionality. Better to use the live version than the desktop one. Make sure you get acquainted with it first before you use it, a couple of YouTube tutorials will do the trick and make sure you have another device with you while doing it to look anything up, the built-in browser functionality is extremely limited.


Why are "fields" are called that?

Question: Those textboxes, datepickers, textareas, etc... or DB fields.
Does anyone know the etymology of it? Why those are "fields"? Is it because a field is an open space area that has no trees growing on it thus representing a textbox with no data in it? I can get why a mouse controller is called this way - it looks like a mouse. But what about fields? In other languages a word with the same meaning is used, but I believe it's been borrowed from English.
Comment: There is a discussion about this at https://english.stackexchange.com/questions/147492/why-is-a-field-on-a-form-called-a-field

That said, I expect the main reason for the terminology in computing is that a field in a data structure was seen as analogous to the field on a paper form to be filled out.
Comment: Fields are where stuff goes.  Open fields of grass, corn fields, oil fields, force fields, data-entry fields, research fields, battle fields, etc..  If there's an area where something goes/is, it's a field of that something.
Comment: The folks at [SE.RetroComputing](https://retrocomputing.stackexchange.com/) may have some background on when **"_fields_"** was first used in the object-oriented sense of a field.
Comment: Thanks @Michael, wasn't able to find that link.
Answer: If you have a physical, paper form, the regions you have to fill in are called "fields".
It's possible this comes from heraldry.
Comment: The suggestion that this use of the word came from heraldry is amusing, but not likely (IMO).
Comment: The first applications for computing equipement which used _records_ were in business applications that mimicked ordinary business processes conducted on paper.  The forms were called "records" and the things you filled in (as you say) were called "fields". And we're talking about a time _before_ computers too: the equipment itself (typically based on punched cards) was called "unit _record_ equipment" because they dealt with  "records", one at a time ...
Comment: It's speculation, but there must have been a time before paper forms at which someone had to name the region to fill in on the paper form ...
Comment: It would have been papyrus.  Maybe they called it a fylde.

Why are "fields" are called that?


How to make an arduino pick an individual plant seed?

Question: I am trying to build a robot which would plant seeds instead of humans doing it (lettuce, radish and so on). The only problem i have so far is picking an individual seed.
How could i do it? I've seen some discs designed especially for such appliances, but those are really expensive and i think that there has to be an alternative.
Answer: The farmbot uses a small diameter tube and a vacuum pump to pick up a single seed.


How do I remap the caps lock key to the backspace key?

Question: I have grown very comfortable to my Colemak keyboard layout (my typing speed has doubled since I started using it). My only problem with it is that there is no caps lock key because under this layout because the caps lock key is a second backspace key. I really miss caps lock so I would like to change the backspace key on the top right corner of my keyboard  (not the one right next to the "a") into a caps lock key. Is there a way to do this using xmodmap or some other tool? I am using Xfce.
Comment: +1 for the general interest of the question, but I really can't imagine why someone can miss caps lock... ;-) It's the first thing I ditch on any keyboard (disable it and remap to Compose).
Comment: Don't add "Solved" at your title. ;)
Answer: I figured it out. This link was very helpful: https://butterflyofdream.wordpress.com/2012/09/10/how-to-assign-capslock-on-backspace-key-in-colemak/
Changing the backspace key to a caps lock key is as simple as typing this on the console:
xmodmap -e "keycode 22 = Caps_Lock"

Comment: This seems to work, but I think the most important command now would be how to reset this back to Backspace: `xmodmap -e "keycode 22 = BackSpace"`
Answer: The answer should be
xmodmap -e "keycode 66 = BackSpace"

And to revert the action
xmodmap -e "keycode 66 = Caps_Lock"

Answer: In Gnome, KDE, Mate etc keyboard advanced settings there should be an option for that. For example, in Plasma:
Answer: Edit /usr/share/X11/xkb/symbols/de (where /de is your language) and add this section in the first block, that you use in your language:
        # replace Caps with Backspace
        key <CAPS> { [ BackSpace            ] };

But I would recommend better to replace it with AltGr and them map AltGr+f to backspace:
        # replace Caps with AltGr
        key <CAPS> { [ ISO_Level3_Shift            ] };
        # Add Backspace to AltGr+f
        key <AC04> { [ f, F, BackSpace, BackSpace  ] };

So you can add more useful shortcuts like here: Configure Caps Lock as AltGr and Arrows like in vim


Partial insert of more than 10000 records

Question: What happens when we use Database.insert to insert more than 10000 records with allOrNone set to False? Are only the first 10000 ones inserted?
Comment: List can insert 50,000 records at a time?
Answer: Governor limits are checked before any rows are modified, so the allOrNone flag has no effect. Simply trying to modify a record past the 10,000th row will automatically result in a governor limit being thrown, and the entire transaction fails. If you think you might hit a governor limit, it's important that your code check using the Limits beforehand.
Comment: Thanks, I was just wondering about what would happen, as setting allOrNone to false should allow insertion of 10000 records because they are not causing the exception (LimitException is an exception after all), the 10001st and onwards will. But since governor limits are checked first, I guess this allOrNone flag doesn't even come into consideration.
Answer: The Answer of your questions are as follows : -

If you try to insert the records with in 10000 limit, then if one  record fails, the remainder of the DML operation can still succeed.
but if you try to insert the record above 10000, say 15000 then it will throw an error like "System.LimitException: publish:Too many DML rows: 10001".salesforce won't allow you to insert any record.
Comment: How to overcome this situation? which has 10000+ records?
Answer: As per the documentation:

The optional allOrNone parameter specifies whether the operation
  allows partial success. If you specify false for this parameter and a
  record fails, the remainder of the DML operation can still succeed.

So if you are inserting 10000 records and lets say 5000 failed, the other 5000 might still insert.
Comment: My question is, there can be upto 10000 rows in a DML operation. So what if I am trying to update 15000 in the same transaction?


Undocumented Migrants and Parameters

Question: I have a question about using census data to find population parameters. When you have undocumented migrants, there's an issue because your parameters can be inaccurate. An example is proportion of people whose first language is English. Is there a way to fix this problem? What would you call data from a census, apart from census data? The example of median income is not a "parameter" since you don't have all the information about the resident population. Also, I don't think it's a "statistic" because your sample size is more than 10% of the population, and your sampling frame doesn't include undocumented migrants.
Answer: I'm not sure what you mean by "because your parameters can be inaccurate."  If you are asking if census estimates are inaccurate because of the presence of illegal immigrants in the United States, the US census attempts to count everyone, regardless of immigration status (illegal or not).  Census data is just called "census data."  I'm not sure what you mean either by "The example of median income is not a "parameter" since you don't have all the information about the resident population."  By any chance are you doing a homework problem and trying to think out the answers to questions to which we aren't privy?
For more information about steps the US Census takes to account for criminal aliens see here:  http://www.civilrights.org/census/messaging/immigrants.html
Comment: Thanks for your response.The homework question is this:
The country of Fisherland uses census data to inform social program budgetary decisions. All residents are required to complete census forms. However, the country is also home to migrants who are not documented, and their information is not collected by the federal statistics bureau. What are several strategies the government can use to overcome this issue?
Comment: I think that a major goal of statistics applied to public policy is to estimate parameters. In theory, census data will give you population parameters, such as average income. So if you're estimating parameters based on data that doesn't include undocumented migrants, you have a poor sampling frame, and an inaccurate parameter estimate. Any statistics you try to get will also be off if you don't include undocumented migrants for the same sampling frame reason.
Comment: Please add the self-study tag since this is homework and review the CV posting guidelines regarding homework questions.

Undocumented Migrants and Parameters


What alternatives to batteries exist to store solar energy at home?

Question: What viable options (other than batteries) exist for a home owner to be able to store energy from solar panels for use at night or when the sun isn't shining?
I realise there will be losses in the conversion.
Comment: Do you want to store it to reuse it as electricity, or would storing heat be ok too?
Comment: If lithium batteries are a concern because of the potential for overheating and combustion, you might want to consider [vanadium redox flow batteries](https://en.wikipedia.org/wiki/Vanadium_redox_battery). They are larger than comparable lithium batteries & they do need maintenance, but they are safer & they last longer. They are mainly used for larger projects, such a large buildings or neighborhoods.
Answer: Thermal storage
Surprisingly to many, conversion of electrical energy from PV (photovoltaic) panels to heat energy and storage in hot water is a potentially excellent use of the energy - provided that you have a use for the hot water.
Water stores energy at the rate of about 1 Watt hour per litre degree or 1 kWh per 1000 litre degrees*. So eg a 100 litres tank (about 25 US gallons) heated by 10 degrees Celsius stores 1 kWh.  So if water is heated from 10 C ambient to 60 C, a difference of 50 C, a 100 litre tank will store 50 x 100 = 5000 litre-degrees or 5 kWh of energy. A battery of that capacity would cost several thousand dollars and have a cycle life of under 1000 cycles - or cost several times as much and have a longer cycle life because it is not deep cycle.

*The actual conversion rate is about 850 Wh per litre degree, so 1000 Wh (1 kWh) is too high, but this allows 85% efficiency after losses for insulation. The actual effective recovered heat energy will depend on insulation, storage time and storage and ambient temperatures.

While it is usual to use thermal panels to heat water, using PV electricity for heating has some advantages. The panels are lighter, there is no liquid associated with the panel. no header tank, no plumbing., no pumps and no problems associated with corrosion and fluids. A good quality well installed solar system has a lifetime in the 20 to 30 year range and this can be higher.
If direct heating is used with a low voltage resistive element a very simple MPPT controller can be used. There is no inverter to mains AC, and no "grid tie arrangements". Efficiency of storage as heat in the water is close  to 100% (with wiring loses being the main loss). The tank will lose heat due to insulation not being perfect, but with good tank siting the lost heat can be useful.  Any energy used to heat water replaces grid electricity which would have been paid for at full retail rates so you are "paying yourself" retail rates for energy generated as long as you can use the hot water. Stored energy can  be used for standard hot water uses and also for central hearing.
Analysis of the prose and cons shows that using water for thermal energy storage is often a highly efficient use of the energy.
You can get elements for water tanks which have multiple "spears" on the one element with some being low voltage and some being mains voltage rated. These allow a mix of low voltage and mains heating as desired.

Electrolysis:
A possible storage system is to electrolyse eg water to produce Hydrogen & Oxygen and store the gas. As Hydrogen can be burned in air it is possible to store only the Hydrogen. Electrolysis can achieve efficiencies in the 80%-90% range and burning of Hydrogen can be highly efficient.
Hydrogen has the disadvantage of having very high volume per mass at a given pressure. Hydrogen could be stored over water in a simple 40 gallon drum gasometer at low pressure but mass per volume would be low. Storage in steel tanks at modest pressures may be viable. Storage in hydrides achieves reasonable densities for Hydrogen but poor by any other measure.
As an indication of the volumes required for gaseous storage, Hydrogen occupies about 20 litres per gram at STP. You need about 25 grams to produce 1 kWh thermally by burning at 100% efficiency so would need 20l x 25g = 500 litres per kWh. So a near atmospheric pressure gasometer using steel 40 gallon (imperial) drums would need about 4 drums per kWh. Fun as a home project but unlikely to be commercially viable in most cases. Storage at modest pressure brings the volume down  - a single 40 gallon drum at 5 bar = 754 litres or about 1.5 kWh. Hydrogen will diffuse through steel and embrittle it as a bonus. At 5 bar it would probably not be a problem but joints are equally problematic. Surplus LPG or  CNG tanks (much higher pressure rating) would be safer but still only allow modest pressures and certifications for Hydrogen are probably not available.
Storage in a bladder at essentially zero differential pressure may be viable for use within short periods.
With due design you could electrolyse a suitable quantity of water inside a Hydrogen rated say 3000 psi gas bottle such that the end pressure reached 3000 psi. You can produce mixed gas H2-O2 and even burn it safely with due design!.
Without due design you can burn mixed H2-O2 but can expect a rocket or a bomb :-(.

Pumped storage - immense masses needed.
1 kg x 1 metre =~ 10 Joule.
1 kWh = 1000 Watt x 3600 s = 3,600,000 Joule
3.6 MJ/10 = 360,000 kg.m
For eg a 10m head that needs 36000 kg = 36 tons of water for 1 kWh at 100% efficient :-(.
Flywheels are doable but rapidly get large, massive and very very lethal.
Reconversion of thermal energy to mechanical and/or electrical:
Low temperature storage (as above) is viable for heating but not for reconversion to electrical energy.
Maximum conversion efficiency to mechanical is given by Carnot limit of Z (efficiency) max = (T_hot-T_cold)/T_hot.
Temperatures in absolute units.
30C is about 300K.
So a T_hot of 600K ~- 330C gives a Carnot efficiency of (600-300)/600 = 50% max.
Getting real world efficiencies of more than 50% of Carnot is doing well. Higher differentials help both Carnot efficiency and actual % of Carnot realisable.
At T_hot = 630 C Z_Carnot = 66%
At T_hot = 930C Zc = 75%
Building mechanical things to work reliably at 900C is 'a bit of an ask'.
600C is doable but falls in the "don't try this at home' category.
Alas
Comment: You're absolutely right when it comes to the use of said thermal energy. Highly underrated in home use. Yet it will not run your TV or refrigerator ;)
Comment: @Ghanima True as stated. Not necessarily so though. Many things will not do what they are not intended or designed to do. A key problem is that electrical to thermal conversion usually uses a reservoir temperature near ambient so max possible reconversion to electrical is limited Carnot limit of (Thot-Tcold)/Thot all in degrees K. **IF** you are willing to use a very high storage temperature then high efficincy reconversion to electricity is possible. eg at 330C with a 30C ambient Carnot Z != 50%. At 630C it's 66%. At 930C !!! it's 75%. Real world efficincies approaching 50% are known.
Comment: In Germany there is a hydrogen storage system on the market (+fuel cell) for seasonal home electricity storage.  Prices start at "only" €85,000 for a small system since VAT has been reduced to 0%.
Comment: You could add that 36 tons of water takes 36 m³, so a 3 m × 3  m × 4 m reservoir would do it.  But doesn't bring one very far sadly.
Answer: Ok, let's break this down. I will assume photovoltaic solar panels (as the question implies alternatives to batteries) and therefore skip all kinds of solar thermal collectors. Starting from electric energy coming from this PV panels we can convert to various forms of energy. For the purpose of storage this boils typically down to a few used forms only:

Mechanical, both kinetic and potential energies
Chemical, the bonding energy of molecules
Electromagnetic, the energy contained in electromagnetic fields
Thermal, the internal energy present in a system according to its temperature

The first and obvious choice for home owners are batteries that store chemical energy. They are common today, somewhat accepted and to be honest despite the high prices currently the only viable solution. Very benefitial to their use is the easy scalability (amount of stored energy) to the needs of the owner/user.
Potential energy could be used by lifting up things that if coming down again will release energy. While this principle is used at utility-scale with hydroelectric dams including pumped-storage hydroelectricity and is proposed for very small off-grid applications (mainly third world usage). Home-scale applications are actually rare.
Kinetic energy could be stored in so called flyweels, where rapidly rotating masses. Unfortunately last that I checked they seem to come in systems starting at 20k$. Some require supraconducting magnets to levitate the disc, operate within a vacumm and they all have rather low storage time (hours to days). As of today they are also not viable for home use.
Electromagnetic energy could be stored via the current in supraconducting coils (again not that home-use friendly) or via the electric field in capacitors. Those capacitors in the form of supercaps are investigated and could be one of the next big things in home use energy storage. Idealy the would also provide scalable systems like batteries.
Thermal energy storage including molten salts which can efficiently store and release very large quantities of heat energy. Unfortunately heat cannot be transferred back to electricity at high effiency. So this comes only into play if the energy will be needed to heat buildings or water for domestic use. Nice benefit is seasonal thermal energy storage to store the summer's solar energy for the use in winter time.
One last form that needs to combine mechanical and thermal energy: compressed air energy storage. Unfortunately (to my knowlegde) investigated only at utility-scale with only a few research facilities reported (in the US and in Germany).
This list is by no means comprehensive but reflects my understanding of the current situation.
Comment: Nice answer, but I think it would be better reformatted to focus separately (ie with 3 separate headings to keep it nice and clear) on options that 1. might be currently feasible for a home owner now, 2.  might be feasible in the future, and 3. that really only work on a larger scale.
Answer: "Solar panel" includes both thermal panels and photovoltaic panels. A common way to store and use heat is in a domestic hot water storage tank. This is generally cheaper and more efficient than PV panels and batteries, but of course it only makes sense if you need the hot water!
Anyone with a heated pool or laundromat should probably be doing this. You'll also need a backup source of heat for cloudy winter days.
Comment: From what I've heard, in 2023 it's no longer true that thermal collectors are cheaper than photovoltaic + a modern air-to-water heat pump.
Comment: Thanks, yes. 8 Years has made quite a difference in solar PV prices. At this point it's definitely not a sure thing for thermal solar, despite the efficiency differences.
Answer: I've been doing quite a bit of reading and other research in the area of using solar for hot water tanks. There are quite a few Youtube videos by people who have been using PV (Photo Voltaic solar panels or arrays) to either produce or supplement their hot water tanks with solar electricity.
I think this may currently be one of the more productive ways to use solar for both sustainability and economics. Much of this has been covered in some of the comments above, so I'll try not to repeat much of that. But here are some things that I have been researching and considering in this area that I hope might help anyone seek ways to use solar besides just to charge batteries or for a grid tied system:
If one wanted to heat their water off grid, temperature would be a very important consideration, because if the water is not heated to a high enough temperature there is a risk of biological organisms contaminating the water. This consideration would be especially important in an off grid situation.
Another idea for off-grid would be to use the hot water tank as a dump load for when your batteries are full. Again the water temperature would be the biggest concern, and I'm not sure exactly how high a tank would need to be heated and how often it would have to be heated to that temperature in order to prevent a dangerous level of biological contamination. If I were to guess I would say that it would have to be heated to at least 150 or 160 degrees F at least once per day in order to be safe. Biological contamination would be a concern even if you were only using the water for heating purposes. Perhaps this would be a good question for another post, and it's one I personally can't answer with any accuracy except to say that this would probably be one of the biggest concerns in using solar electric for heating hot water.
If one wanted to simply lower their electric bill without having to get into grid tie, Photo Voltaics for heating water may be one of the simplest and most cost effective ways to do that, but there is still a lot to consider in order for it to be effective.
One method would be to use a regular hot water tank off grid to preheat the water and then use small "point of use" water heaters (using the mains power) to bring the water to the desired temperatures when the solar isn't available or the water not quite hot enough for your needs. The temperature of the preheated water would still be an important factor here, as even if you killed any biological material with the point of use water heater, I'm sure it would still have a foul smell (at the very least) if the water sat too long in the preheating tank at too low a temperature.
Most household hot water tanks, at least where I live, have two heating elements, an upper and a lower. So, another idea might be to continue using mains power for the upper element and putting a DC element and DC regulator on the lower element power by solar PV. With careful calculation it's possible that no MPPT or PWM controller would even be required as long as the DC regulator and element you put in the tank can handle the array's maximum voltage and amperage (of course fuses would be a must in any case). And with a high temperature regulator on the upper element (the one powered by the mains) it's doubtful that one would have to worry about biological contamination of the tank. Of course this would only be a supplemental use of the stored heat from the solar panels, but such a small system would almost certainly pay for itself much sooner than a grid tied system as long as it was designed well. The whole system could probably be set up by an expert in less than a day and would probably lower the electric bill (in my case anyway) by $5 to $30 per month (or more) depending on usage and weather conditions. One problem I do see with this type of system is that with too many panels you would have to figure out a productive way of using the extra energy on really sunny days. On the other hand if you used 300 watts or less of solar, the panels would almost certainly be productive most of the time, but then I don't have enough information yet to determine whether or not such a small supplement would meet one's daily hot water needs.
This is something I'm considering trying myself and most of my research is done from a practical perspective, based on my own budget and the results I'm looking for. I realize that my comment here may raise more questions than give answers, but I'm certain that the questions I have raised (and couldn't answer) here are ones that must be considered by anyone looking to use a PV system to store hot water.
I've seen where quite a few people are using PV to heat water both off grid and as a grid supplement, and most of them say that it is (or at least can be with the right design) an economically practical and productive way to use solar electricity. But, all of these questions must be considered and calculated into the design of such a system in order to make such a project worthwhile from a practical perspective. Of course experimentation in this area has a value of it's own as long as one can afford it and can do it safely. There is a great need for such experimentation to help bring progress to alternative energy.
Comment: To save energy, you would want to use in air-to-water heat pump rather than direct heating.
Answer: Adding Power-to-(natural-)Gas, since no one mentioned it yet:
By now, it's also possible to transform the energy from solar panels not only to hydrogen, but further into  methane, 'the main component of natural gas'. Edit: This might not be possible to do for a single home yet, see below. Then you could either store the gas at home or feed it into the local gas grid.
The PSI considers an efficiency of 60% a realistic benchmark (same article), though that would mean, of course, they do not currently reach this number.
If you feed gas into the local gas grid, of course you don't store it for yourself, but how I see it is: If you get money for it, you can later use that money to take gas back out of the grid. Big upside: You would not have to worry about building a gas container at your home.

I recently read about a house in Switzerland that is using this technology here (article in German only). But their electricity-to-gas transformation still happens externally. It seems the 'key' part of the system is city-owned and uses CO2 coming from a sewage plant, and energy from a waste-burning facility, as well as from this house. So I'm not sure how easy it would be to build such a system at home.
I also heard about bigger projects in the US doing something similar, so I hope there's going to be more progress soon.
Comment: Is it possible to feed natural gas back into the grid?
Answer: I hate to sound glib, but have you considered abandoning solar panels in favor of biomass, storing solar energy in a natural form?  Trees are a fantastic way to store solar energy; so is some sort of oilseed like rape.  Of course, it takes long-term planning to get a sustainable cycle going, but you can figure out how much energy you use continuously (kWh/year), then plan on harvesting enough biomass in a given year and consuming it in some sort of generator (woodgas, in the case of trees; diesel in the case of oilseed), then plan on having the generator run more or less continuously (plan for maintenance), adjusting to consumption with a governor.
If you already have solar panels, which it seems you do, the cost of migration may be steep, but it's still probably the most sustainable solution for the long term.
Comment: Blast!  I guess I got caught up in reading the answers and forgot the OP.  Rather than delete this answer, I think I'll edit it to offer an alternative.
Comment: A major problem is that to convert this stored energy back to electricity, you need to burn stuff.  Burning anything causes air pollution.  Also, most people can't wait 40 years before they've stored enough energy to heat their home, and if we burn things now _before_ growing trees back we'll add CO₂ that will take 40 years to be absorbed again.  We can't afford to have all that excess CO₂ linger in the atmosphere for 40 years.  Biomass burning is therefore not a suitable form of domestic heating or electricity consumption.
Comment: Welcome to Sustainable Living! You are correct that trees store solar energy via photosynthesis, but the OP clearly mentions that he wants to store energy from solar panels in his question, so I'm afraid your answer doesn't really answer the question.
Comment: Energy from biomass, done right, has some real advantages, but for many it will also have a giant disadvantage: land area. Most households in the developed world currently consume so much energy that (considering the inefficiencies of a woodgas generator) the idea only bears consideration if you have substantial unused land for a woodlot. Whereas what I have is my roof. :)  It would be risky to take agricultural land out of production to go towards this solution at a utility scale. Whereas cows don't mind wind turbines!
Answer: Very good idea of storing heat energy in water. Since I expect my biggest use of solar energy to be in the form of heat this might be a good idea for me. One can increase the storage capacity of water by adding Glauber's salt. It absorbs a lot of heat going into solution and gives it off going out of solution.
I myself planted a small patch of sunflower plants. They will grow 6' or more and produce seeds containing oil. The plants themselves will provide more cellulose than grass would on a similar area also. I mow my acre of grass and am in the process of pressing the clippings into large pellets and storing them in small paper bags. When ready to burn in my stove for heat I'll pour kerosene on them. I did the same with store bought wood pellets. They are inexpensive and work very well. This is true use of solar energy from the Summer! I will need to store the ground sunflowers in metal containers to keep mice etc from eating them.
Comment: This is a little sideways from the point. Here OP asks about ways to store energy gathered during the day for the night. Besides, be careful with that kerosene!
Comment: @user4612 / user4616 / user4617 please do not create a new account for every single answer or comment.
Answer: Electricity grid-scale, the main options are:

Pumped hydropower (also applicable for seasonal cycling)
Compressed hydrogen stored underground (also applicable for seasonal cycling)
Batteries (but only for daily cycling, not for seasonal cycling)

If you have a district heating grid, you can also add a fourth option:

Thermal energy storage

The reason thermal storage isn't used to store electricity is very good: to have any reasonable efficiency, the temperature would be so hot heat would leak immediately away. But if what you want is heat not electricity, then it might make sense to create that heat at times energy is cheap, and then use it at time energy is expensive. Also in combination with steam power plants (where you anyway use heat to create electricity at a ridiculously low efficiency), it might make sense to use molten salt e.g. in a nuclear reactor that runs at 500 MW (reactor continuous power) but is able to provide 750 MW bursts from the molten salt storage pool to allow daily load-following: more power during daytime, less power during nighttime.
Also there's a fifth option that's mostly useful for grid stabilization:

Flywheels

...but that isn't mainly used to store electricity, rather to provide rotational inertia to the grid so that once consumption exceeds production, there will be a clear frequency decrease signal that signals to the grid operator that new production must be added in few seconds, or some load must be removed from the grid in few seconds.
The reason flywheels aren't used for energy storage for long periods is the high self discharge rate.
However, at home none of the alternatives for batteries makes sense. Maybe if you have a refrigerator or a freezer that has a huge compressor, you could put a lot of water inside as thermal mass and then run it only whenever electricity is cheap. I have tried that with my refrigerator-freezers, but it doesn't work in my case because the compressor is so feeble it has to run at least 15 hours per day or else the temperature becomes unacceptably high. Where I live, there's only 6-8 hours of cheap electricity per day, not enough.
Also if you have to use cooling or heating, and have a system that's generously sized, you could cool or heat only whenever electricity is cheap, and then rest of the hours the temperature is in free increase or decline. With thermal mass such as a water tank in a system where water circulates, this becomes easier.
But apart from these cases where you want heating or cooling and use electricity to do that only whenever electricity is cheap, the only option is batteries. For example, I use 7 kWh per day. My house is 5 meters high. I would need to raise 5 million liters of water to my roof to store one day of electricity usage -- not feasible. However, a typical electric car has 70 kWh of batteries, and even if you only use 80% of that capacity, I could run my house from an electric car battery for 8 days.
Also hydrogen can only realistically be stored compressed at huge pressures or else the energy density sucks. Above the ground, pressure vessels are so damn expensive it really doesn't make any sense. Below the ground at considerable depth, it makes more sense, because you can use the ground as a pressure vessel and only need thin steel liners to contain that pressure without leaking, like an inner tube of a bicycle that bursts in free air but if it's surrounded by the outer tire, it can contain the pressure without leaking too fast.
Comment: *none of the alternatives for batteries makes sense* — [home hydrogen storage exists](https://www.homepowersolutions.de/produkt/), but the price (~€100,000) seems to confirm that it does not make much sense
Answer: Seasonal electricity storage
A German company sells domestic hydrogen storage for seasonal storage of electricity at home.
The price is "only" in the range from 85.000 – 120.000€ since German VAT on domestic storage systems was reduced to 0% starting at 2023-01-01.  If you use 10 kWh per night during the winter months when rooftop photovoltaic is insufficient for charging batteries and thermal storage for overnight use, and you assume electricity remains cheap at €0.50/kWh, and you ignore the costs of charging and several other factors, you might save €1000/year and the unit would be economical in only 100 years!  Of course it would take much longer in reality due to operating costs and conversion losses.  The service subscription is only €500/year, so if you factor in other costs you can probably expect the unit to pay for itself in the order of 200–300 years.


Error summing 2 different rasters?

Question: I was trying to sum two different rasters and the final outcome is an error (image attached below)?
The main goal is to sum the values of each pixel in those rasters (both raster files have the same size and pixel size), for that i was using raster calculator, with a simple expression the "TIPO_SOLO@1" + "declives_map_reclass@1", but probably i doing some steps wrong.
Answer: Well, i was able to produce a raster that contains the sums of both rasters. it´s seems that by default the output raster was coming in Raster Matrix Format, but if i change it for GeoTiff, it´s produces the final result perfectly.

Error summing 2 different rasters?


How to access the Firefox history remotely

Question: I want to monitor the Firefox history of a PC from another remotely. Is there any add on or something else which exports and uploads / syncs Firefox history to an FTP server so that I can access it from somewhere else?
I am not looking for a key logger or similar solution. I just want the browsing history only.
Answer: You can use Firefox Sync and configure to sync History only but it can sync many other things like favorites or passwords for example. It is now included in Firefox and needs only configuration, no install: Firefox Sync
I don't know what you want to do but beware, this will syncronize what you choose to sync between the 2 (or more) browsers and they will be the same so you will have the same history (or whatever you choose to sync) on both machines. You will receive the history from the remote machine in your browser history and you will export yours to it too.


How to make combination of two field values unique?

Question: I make use of the front-end entry form for an event registration process. The event is the main entry, and every event registration an entry of a related registration section. The challenge is to see whether a user has already been registered for an event. Today, I do that with a database query before the entry form loads. But for some reason, this works not always (for example when users reload the page). How could I make the combination of two fields ("user id" and "registration status") unique? (Normally, I would do that on a database level with a unique index over the two fields.)
Comment: You could get entries for the specific section by their `authorId` and if they have one don't load the form else load the form and let them register.
Comment: That is exactly what I do today. But nevertheless, I get duplicated entries from time to time.
Comment: If there is only one entry from a user in a specific section you should only see one entry come back when you query based on the `authorId`, what does your template look like?
Comment: No, there is more than one entry from a user in a section.
Comment: I will now add a text field containing string composed of event_id and user_id and make this field value unique using the following plugin: https://github.com/joshangell/craft-unique-value
Answer: If I understood you correctly, you have two sections:

events
registrations

Is the user logged in? If yes, you can save the user id in your registration entry. In your events template you can check now, if a registration entry exists that is related to this event and the current user.
See example code (untested).
<code>{% if currentUser %}

   {% set query = "userIdField:"~ currentUser.id %}
   {% set results = craft.entries({
      relatedTo: entry.id,
      section:'registrations'
      search: query
   }) %}

{% endif %}

{% if results|length %}
    user is already registered
{% else %}
    show registration form
{% endif%}
</code>
If your user is not logged in, you could (temporarily) store the registration information in a cookie (check out this plugin: https://github.com/lewisjenkins/craft-lj-cookies) and do a similar check.
Comment: Yes, the user logged in and your proposal is more or less what I do already. The problem is that I still get duplicated entries from time to time.
Comment: Perhaps the user press the registration button twice, or he use the back button. In certain circumstances this could create a second entry. To avoid the "double click" you could disable the button with javascript. Have you activated the CSRF Protection -> https://craftcms.com/support/csrf-protection? Hope this helps.
Comment: No, CSRF protection has not been enabled yet. I will try that. Thank you very much.


When you publish a novel, are all the parts of the novel copyrighted as well or only the whole novel?

Question: When you publish a novel, are all the parts of the novel copyrighted as well or only the whole novel? I am asking the question, because the lightsaber were introduced by different other sci-fi novels, and the ideas should have been automatically copyrighted and yet no one chose to take Lucasfilm to court after the release of Star Wars, does that mean that you can only pursue a person or a company if the whole work was infringed upon and not only one part or some parts of it?
https://en.wikipedia.org/wiki/Lightsaber#Conceptual_origin
Answer: The idea of a lightsaber is not subject to copyright.  Copyright only covers the representation of it -- in novels, the specific descriptive text.  If a novel included a paragraph of description of a lightsaber, and someone in The Empire Strikes Back said the same stuff in a bizarre monologue, that would be copyright infringement.  The basic idea of it would perhaps be subject to patent law if there was a solid engineering description of its mechanism of operation, but then George Lucas could have just reinvented the lightsaber via a different (fictional) method of operation that derives nothing of substance from the patented version, and it would be clear of patent issues.  The term "lightsaber" is, apparently, subject to trademark but I'm pretty sure a single (useful-sized) word is not enough to qualify as copyrightable material.
In summation, copyright is about expressions of ideas, not the ideas themselves.
source: I deal with issues of copyright licensing a lot, and have worked in a variety of copyright-heavy fields a lot.  Long personal experience with matters of copyright has exposed me to a lot of its quirks.
Answer: Everything that is copyrightable is protected by copyright. The expression of an idea is protected by copyright. The author holds copyright to the "bulk" of the publication (the text), but the publisher holds copyright to the design (artistic layout of the text and cover art). If you literally publish your own book, then you are the entire copyright owner.
A lightsaber is not subject to copyright protection – that's metaphorical talk. The name "lightsaber" is subject to trademark protection (also, "Jedi"), because those are protected trademarks, and like
Lightsaber Academy you can be sued for promoting unauthorized classes, certificates about lightsabers. It's not that you can't use the words Jedi and lightsaber, it's that you can't "compete" with Lucasfilms using these same terms. The underlying idea of an energy weapon is old news and if ideas were subject to coyright protection, that copyright would have long since expired. Designs (cover art, props in films) are protected by copyright. A word is not subject to copyright protection. A phrase might be, but "X, I am your faaawther" is easily defensible as fair use.
You can't learn much about what is not protected by copyright by looking for cases where the copyright holder didn't file an infringement lawsuit. Sometimes it's just not worth the trouble, sometimes people don't know that they can sue.
Comment: With a phrase as short as "X, I am your father," it could be difficult to prove that it was copied from the work in question in the first place.  It might have come from a short story published in 1850: https://www.google.com/books/edition/The_International_Monthly_Magazine_of_Li/hng4AQAAMAAJ  Or, indeed, it might have been the product of genuine invention.  It's not a particularly unusual or creative phrase.
Comment: Plots and characters have been held to be subject to copyright protection (one cannot produce a motion picture with the same plot and characters as a novel without permission of the author thereof) even though such things would seem to tend far more toward "ideas" then "expressions".


ASP.NET Scope of user control for javascript functions

Question: So I have a user control that exists multiple times on a page. From the back end I can call userControl1.someFunction(); and specify which user control I want to call someFunction() for. But if I have a java-script function on the front-end of the user control I can't call it for individual user controls. All I have to do is call javaFunction(), but this doesn't specify which user control I want to call. So this is what I would like to be able to do, clientsideUserControl1.javaFunction(); Is this possible to do? What I have been doing is generating the function name dynamically IE: clientsideUserControl1_javaFunction(), but I feel like there has to be a better way to do this.
Answer: usually you can have one function and have it perform it's work on the whole page or you can change it to take a parameter ( a reference to the usercontrol you're interested in )
That way you don't need to have multiple copies of the same javascript function.
So instead of
function CLIENTID_javascriptFunction{
}

You'd have on function at the global level :
function javascriptFunction(id){

}

and call it with the id of the dom object you're interested in. (use ClientID to get the DOM id of the control)
Comment: yes u r right but sometimes I had to go the (CLIENTID_javascriptFunction) instead of passing a large number of parameters to a global declared function
Answer: Turns out that in this case it would be better to use a server control instead of a user control. Server controls seem to be a little more complicated to make but they do protect the scope of the javascript functions.
Here is a link that discusses the differences.
http://www.hotscripts.com/forums/asp-net/31174-difference-between-user-control-custom-server-controls.html
Comment: If you did want to use a user control, this seem like a good way to protect the scope -> http://programmerramblings.blogspot.com/2011/07/clientside-api-for-aspnet-user-controls.html
Answer: one possible solution is this:
function <%= ClientID %>javaFunction()
{
  //code here
}

you will have a function declaration for each user control with the client ID of the control plus function name
Comment: This is basically what I have been doing. I'm hoping that the guys at Microsoft made a way to allow you to reference the user controls individuality, rather than calling it like this.
Comment: It will work, but its really ugly solution. Much better way to resolve that problem is mentioned here: http://stackoverflow.com/questions/4416705/javascript-functions-inside-asp-net-user-control
Comment: @Jakub Szułakiewicz thanks for that. By the way if you really need a better solution, you should stop using web forms :) this answer is 4 years old


Design of Gating & Runner system in Gravity Die Casting

Question: How to design gating and runner system in permanent dies so that material flows smoothly throughout the design without spilling back from the gating channel.
What should be the shape of gating system and how the volume of gating system be related to the volume of the piece that is required to be casted through gravity die casting?
Answer: Provide air vents so that it reduces or prevents the "spitting back".
These air vents need to be placed so that any excess can be trimmed of the final part without affecting the final part.
Answer: Without pressure on the liquid metal ,it is not "die casting" ; it is permanent mold casting. The answers depend on the alloys used and the size if the parts. For smaller parts in zinc or lead , no problem ; the various turns in the runners and sprue  will prevent spit back; Provided there some mechanism to vent air and gas from the mold. For steels , copper and other alloys you will need risers to supply liquid metal to compensate for shrinkage as the parts freeze. Riser design is at least as important as gate design. The consideration of relative volumes is critical in riser design, not much in gate and runner design. For investment casting smaller parts ( such as 1 in. typical dimension) steels , the runners and sprue  provide the riser : ( Very similar to permanent mold casting).
Answer: Back spilling can be found from $T$ the total time to fill the mould
If you're using top gate
$$T=\dfrac{AH}{a\sqrt{2gh}}$$
where:

$AH=$ volume of mould cavity
$a=$ area of gate
$h=$ total height, which is the height of sprue and molten metal column above the sprue $(h_1)$

In top gate aspiration effect is to be considered. So to avoid aspiration effect, let $a_1=$ the area of molten metal basin above sprue. Then
$$\dfrac{a}{a_1}= \dfrac{h_1}{H}$$
It is the area ratio in sprue to avoid aspiration.
From eq, area change should be linear decreasing, but it should be taken curve to minimize friction and boundary layer separation.


How do digital pianos work?

Question: I know somehow it combines different harmonics to synthesize notes, but I don't exactly know how this is implemented.
Comment: You're asking us how to build a digital musical instrument. That's far too broad to be answered like that! You can rescue your question by explaining what you've researched so far, what you've implemented in software (this is all really easy to try out e.g. with Python), and what specific question you need help with.
Comment: Not even close to a half guess.
Comment: Some use samples of real pianos for every note, others use samples for other one octave and scale the pitch of those samples for other octaves, others use math try to simulate the physics of a real piano to synthesize and actual products are proprietary (i.e. secret). It sounds like you did zero research of your own before coming here. First few google result showed this: https://hal.inria.fr/hal-01894219/file/hal.pdf and https://pdfs.semanticscholar.org/1e60/f326d210c310dc5d6fe12d93fbba0795bbf6.pdf This is some advanced PhD stuff
Answer: Electronically speaking a digital piano does not necessarily work by combining different harmonics to synthesize a specific note. Most digital pianos work by playing pre-recorded samples that are generally stored as audio files on some internal memory. They keyboard loads the specific note's audio files (stored as digital data,) runs that through a DAC (digital to analog converter) which is then played out as an analog note.
Analog synthesizers are what I beleive you are asking about generally use VCO (voltage controlled oscilators) that often come in IC packages like down below:

With a setup using a VCO key presses generally translate into various voltages that the VCO circuit translates into a type of signal (sine, square, triangle).
Circuit Digest explain this in more detail at the link below.
https://circuitdigest.com/tutorial/voltage-controlled-oscillator-vco
The general system architecture of a synth would looks like this,

The keyboard generates voltages dependant on the note pressed.
VCO (voltage controlled oscillator) generate a note signal proportional to the keyboard voltage.
VCF (voltage controlled filter) would filter the VCO signal proportional to the filter controls voltage.
ADSR (attack, decay, sustain, release) this would affect the shape of the signal, how quick the note appears, how long it takes to roll off.
Noise, some synths will have the option to distort the signals with a noise generator.
If the synth is polyphonic it will combine the signal of the various oscillators before outputting.

Different types of synths use different methods and different types of oscillators, they could also include multiple VCO, filters, delay and any number of other audio effects to generate more interesting sounds.
@DKNguyen good point, some synths use a DSP (digital signal processor) to generate signals, these effectually use programs designed using mathematical formulas to calculate the desired signals. After the DSP stage these types of keyboards work in the same way as a standard 'sample' digital keyboard with a DAC and amplifier to a speaker.
This was quite a vague questions and this is a massive subject, I hope this give you a basic idea of the concept, please do a bit more googling if you want to find out more details.
Comment: The voltage from the key doesn't specify the waveshape (triangle, square, sine, etc.)  The voltage in that type of synthsizer specifies either the frequency of the note played or the volume.
Comment: Yeah, most synths with multiple wave shapes have a separate toggle switch or something to select the shape for each VCO. They keyboard generate the voltage for pitch & sometimes velocity (To represent how hard the key was pressed)

How do digital pianos work?


How to thank somebody for editing his answer or comment and adding value to it?

Question: This is not really about Blender, but this site (sorry that I couldn't find a tag for it, and because it is required, and I cant add a tag yet, had to use the nearest possible). The site asks to avoid comments like "thanks" and rightfully, to avoid cluttering text with extras that are not useful to the others. But my friend @Georgious included a file I requested by editing his old answer to my question. I am asked to avoid "thanks", but I don't feel good just leaving it like this! So there must be a way to say our thanks without cluttiring the text with too much comments uninteresting for other readers. How :) ?
Answer: I feel like I'm entitled to answer this question since it looks like I'm the person you're looking to thank :).
You don't need to explicitely thank back people that helped you. The only gratification system on this site is the upvote (or downvote) system. Additionally if you asked the question and the answer correctly solved it, you can mark it as answered.
Of course it's always nice to try and add some cordiality in places where it makes sense, I think we can all benefit from it in this day and age.
I can talk only for myself, of course, but I assume most people are like me and they participate on this site for a number of reasons :

To improve their blender skills
To improve their explanation and teaching skills
To get a dopamine rush when they get internet points for participating
To engage in a stoical yet really respectful and open-minded community
To give back what they learnt along the way

A thank you in the comments, while frowned upon since it's against the guidelines, won't get you insta-banned for life.
Personally, the simple knowledge that I helped at least one person along the wonderful journey that I am also a part of is well enough. But oh man do I crave the green popup dopamine rush..!
Comment: "*To get a dopamine rush when they get internet points for participating*" I loved that :D. Thanking in the comments is fine as far as I'm concerned, the rules advise against it, but but it can be removed in the long term and I supposed it is a harmless way to add a little social warmth to a site that is often accused of being cold and hostile.
Answer: You can tap on

under your question. After a while (i think 2 days or so) you can then give the bounty to his answer.
Answer: I suggest putting an icon next to answers and comments to enable "thanks" without cluttering useful text. next to the icon a number representing the number this icon was clicked.
I would like to didicate this suggestion to @Georgious & @moonboots :)
Comment: You can already do that using the up and down arrows beside the answer and the person asking the question can also accept the answer which puts a green tick icon beside the answer. Both of these also add reputation 'points' to the person answering the question.
Answer: Yes. We don't want to clutter up the site with things such as thanks, etc.. But I am Latin American, and it really, really burns me. I find myself to be unable to behave with such efficiency. It is just rude, in my view, to be so cold and insulting. Cheers.
Comment: By the way, I posted the above as a question or answer because I was not allowed to post a comment. Tks


How do I link a company's Google Plus site to the company's Google Analytics?

Question: Is there any way by which I might link a company's Google Plus site to its Analytics properties? The client wants to track traffic on the G+ site via Analytics.
Answer: You can take a look at http://online-behavior.com/analytics/googleplus which discussed specific techniques to be able to track Google+ event (such as +1 clicks) through your Google Analytics account.


How do I set up an Opera Web Kiosk?

Question: Is there a way to setup a web kiosk that uses the Opera browser, and is self resetting so that there isn't any chance that someone could hijack it?
Comment: Is there a Kiosk distro at all for any browser?
Answer: A great way to do this would be to create a user (that automatically logins in perhaps) that has only read access to what is necessary. Then make 'opera -kioskmode' a startup application. Then remove ANY application not vital to your needs. If you really need to harden it further you may not want to start with Ubuntu-Desktop maybe Ubuntu-Server or Ubuntu-Core.

How do I set up an Opera Web Kiosk?


How does watering your plants help protect against freezing?

Question: I've always heard that watering plants if the temperature goes a few degrees below freezing will help prevent them from freezing, but I've never quite understood the physics behind it. Can you guys help me to understand this a bit better? Thanks!
Comment: -1 Your questions seem to have very little to do with physics. "Are all physicists like Sheldon Cooper" "How does watering your plants ..." "How does a drip in a pipe ..." What's next? "What is the physics of furballs", "Why do gremlins turn mean when wet"? These last two are obviously facetious examples, but you get the drift.
Comment: This really belongs on popular natural science I think... shame the site doesn't exist yet, or I'd migrate it there.
Answer: While this may be true, a better option is actually to spray your plants with water. When water freezes, it releases heat (a little counterintuitive, I know, but that's why you have to put water in a cold place to freeze it - you have to take away heat). So, if your plants have a thin layer of water on them that freezes, it actually helps keep them warmer. Additionally, the layer of ice, being a good insulator, will then help keep the plant warmer through the cold spell.
Comment: As someone who often had to get up at three in the morning to spray water all over the apple trees as the temperature dropped, I can attest to the effectiveness of this technique.
Answer: If the temperature is not much below freezing, the rate of heat transfer from your plants (and particularly from the earth around their roots) is low, if there is a lot of water present, the high heat of fusion means that it will take a long time to actually freeze much of it. So maybe the plant makes it through the night without too much damage.
Note that if it doesn't warm up enough the next day the second night will kill them because it starts close to freezing.
Answer: It's actually got a lot more to do with chemistry than physics: it takes energy to break chemical bonds, and energy is released when said bonds are formed.  Essentially, the most important factor here is the intermolecular forces at work between water molecules: hydrogen bonding.  The hydrogen bonding that causes water to solidify releases energy into its surroundings as they are formed.  So, as water begins to freeze, hydrogen bonds are being formed which releases energy to the surrounding area and actually warms the environment.  So, spraying your plants with water before a cold night will prevent frosting, and the subsequent death of said plants, because the water will heat up your plants as the temperature drops.
Comment: Do you know whether/where this has actually been studied?  Not *whether* it works, but precisely *how* it works, and to what extent the different possible mechanisms actually contribute to preventing the plants from freezing?  I can imagine many reasons (more water quantity means more time to freeze; increased heat energy required to form bonds at the freezing point; preventing evaporation from the plant; sprayed water may be warmer than the air/plant; etc.) but quantifying them is another matter.


Testing on restricted users

Question: I am using visual Studio 2013 test agents and controllers to do testing on the end environment.
The end environment is composed of a single virtual machine running Windows 7 with a user that has very little privileges (most of them are blocked using group policy).
Is there a way to run a test agent on that user in order to have the closest testing environment as possible?
Comment: Are you looking to test an application on the Windows 7 machine, or are you looking to use this to generate your load?
Comment: Looking to test on a Windows 7 machine.
Answer: I'd recommend having a local admin account that you can do your installations with.  So long as the VM is up and running, if you install the Visual Studio Agents and register it with your controller, you should be fine.  I have used a very similar setup for a couple of my performance tests where it made more sense to use peoples machines in the office rather than servers for a more realistic result or when I need additional load generators but don't have enough servers.
Edit 12/24/14:  I've had to do this a couple of times lately.  I've found the best way was to bind the credentials for the users that I wanted to test with to the test.  This can be done by binding the credentials themselves, or, a less secure way, if you need more than 1 user per test, put credentials into an xml file or database, and bind that as the credentials.
Comment: I have a local admin account of course.
The question is how to make the test to run on the specific restricted user?

Testing on restricted users


What are the fields with 4 elements?

Question: What are the  fields with 4 elements?
Comment: There is a *unique* field of 4 elements, which is a field extension of $\mathbb{F}_2$. Do you know how to construct field extensions?
Comment: perhaps you should tell us what you *have* covered.
Comment: That course covers quotient rings, which means my answer should be accessible (perhaps with a bit more detail). Do you in fact know about quotient rings?
Comment: Sorry, I have yet to cover field extensions
Comment: @lhf I have done a first course in groups, a list of what I have covered is here under 'Synopsis' http://www.maths.ox.ac.uk/courses/course/12493/synopsis
Comment: Look at the end of [Wikipedia finite field](http://en.wikipedia.org/wiki/Finite_field)
Answer: Here is a nice general method to build examples of finite fields of any desired size (a power of a prime):
Given a prime $p$ (in your case, $p=2$), pick a monic polynomial $q(x)\in {\mathbb F}_p[x]$ of degree $n$ and irreducible (in this case, $n=2$ and $q(x)=x^2+x+1$. By a counting argument, one can show that there is always at least one such polynomial $q$).
We use $q$ to build a field of size $p^n$.
Let $A$ be the companion matrix of $q$. This means that if $q(x)=a_0+a_1x+\dots+a_{n-1}x^{n-1}+x^n$, then $$A=\left(\begin{array}{ccccc}0&0&\dots&0&-a_0\\ 1&0&\dots&0&-a_1\\ 0&1&\dots&0&-a_2\\ \vdots&\vdots&\vdots&\vdots&\vdots\\ 0&0&\dots&1&-a_{n-1}\end{array}\right).$$ In our case, $$A=\left(\begin{array}{cc}0&1\\ 1&1\end{array}\right).$$
Now let $F=\{ r(A)\mid r \in{\mathbb F}_p[x]\}$.
The point is that $q(A)=a_0I+a_1A+\dots+a_{n-1}A^{n-1}+A^n=0$ and in fact, if $t(x)\in{\mathbb F}_p[x]$ and $t(A)=0$, then $q$ is a factor of $t$. Using this, one easily checks that $F$ is closed under addition and multiplication and has size $p^n$. Also, $t(A)s(A)=s(A)t(A)$ for all polynomials $t,s$. Finally, if $t$ is not a multiple of $p$ (i.e., $t(A)\in F$ is non-zero), then $\{t(A)r(A)\mid r(A)\in F\}=F$, so there is an $r(A)\in F$ such that $t(A)r(A)=1$, i.e., all elements of $F$ have inverses in $F$. So $F$ is a field.
To see that the key point is true requires a little argument. Call ${\mathbf e}_1,\dots,{\mathbf e_n}$ the standard basis in the vector space ${\mathbb F}_p^n$. Then $A{\mathbf e}_i={\mathbf e}_{i+1}$ for $i<n$ and from this it follows easily that for no non-zero polynomial $t$ of degree less than $n$ we can have $t(A)=0$, and also that $q(A)=0$.
[In more detail: We have $A{\mathbf e}_1={\mathbf e}_2$, $A^2{\mathbf e_1}=A{\mathbf e}_2={\mathbf e}_3$, etc, so for any polynomial $t(x)=b_0+\dots+b_{n-1}x^{n-1}$ of degree at most $n-1$ we have $t(A){\mathbf e}_1=b_0{\mathbf e}_1+b_1{\mathbf e}_2+\dots+b_{n-1}{\mathbf e}_n$, which is non-zero unless $b_0=\dots=b_{n-1}=0$ to begin with. Also, $q(A){\mathbf e}_1=0$ since $A^n{\mathbf e}_1=A{\mathbf e}_n=-a_0{\mathbf e}_1-a_1{\mathbf e}_2-\dots-a_{n-1}{\mathbf e}_n$. Since each ${\mathbf e}_i$ is $A^k{\mathbf e}_1$ for some $k$, it follows that $q(A){\mathbf e}_i=0$ for all $i$ (since $q(A)A^k=A^kq(A)$). Since the ${\mathbf e}_i$ form a basis, $q(A){\mathbf v}=0$ for all ${\mathbf v}$, so $q(A)=0$.
Also, since $q(A)=0$, note that $A^n$ is equal to a polynomial of degree at most $n-1$ applied to $A$ (namely, $-a_0I-\dots-a_{n-1}A^{n-1}$). It follows that any polynomial of degree $n$ applied to $A$ equals a polynomial in $A$ of degree at most $n-1$. But then $A^{n+1}=A^nA$ equals a polynomial in $A$ of degree at most $n$, and therefore one of degree at most $n-1$, and the same holds for any polynomial of degree $n+1$. Then $A^{n+2}=A^{n+1}A$ equals a polynomial in $A$ of degree at most $n$, etc.]
In our case, the field of 4 elements we obtained is $$\left\{0=\left(\begin{array}{cc}0&0\\ 0&0\end{array}\right),I=\left(\begin{array}{cc}1&0\\ 0&1\end{array}\right),A=\left(\begin{array}{cc}0&1\\ 1&1\end{array}\right),A+I=A^2=\left(\begin{array}{cc}1&1\\ 1&0\end{array}\right)\right\}.$$
The nice thing about this example is that the product and addition are just familiar operations (product and addition of matrices). Of course, from the general theory of finite fields, any two examples of the same size are isomorphic. However, I think this is a very concrete example that is useful to keep in mind as one advances through the theory, to see how general results apply in this setting.
Answer: Let $K$ be your field.
The additive group of $K$ is an abelian group with four elements. The order of $1$ in this group divides $4$, so it is either $2$ or $4$. Were it $4$, we would have $1+1\neq0$ and $(1+1)\cdot(1+1)=0$, which is absurd in a field. It follows that $1+1=0$ in $K$. But then for all $x\in K$ we have $x+x=x\cdot(1+1)=0$, and we see that all elements have order $2$. In particular, $-1=1$.
Let $a$ be an element in $K$ which is neither $0$ nor $1$. Then $a+1$ is neither $a$ nor $1$ and if we had $a+1=0$, then $a=-1=1$ which again is a not true. We conclude that the four elements of $K$ are $0$, $1$, $a$ and $a+1$.
You should check that this knowledge complete determines the addition in $K$.
We have to determine the multiplication now. Since $0$ and $1$ are what they are, we need only see what $a\cdot a$, $a\cdot(a+1)$ and $(a+1)\cdot(a+1)$ are:

We can't have $a^2=a$, for then $a(a-1)=0$ and we are supposing that $a\not\in\{0,1\}$; similarly, $a^2\neq0$. If $a^2=1$, then $(a-1)^2=a^2-1=0$ , which is also impossible. We must have thus $a^2=1+a$.
Next, using this, $a\cdot(a+1)=a^2+a=1+a+a=1$.
Finally, using that $1+1=0$, $(a+1)\cdot(a+1)=a^2+1=a$.

Multiplication is completely determined.
Now we have to check that with this operations we do have a field... You should have no trouble with that :)
Comment: @MarianoSuárez-Alvarez Please tell me you didn't know that at the top of your head. That clarifies so much. Although I am really confused by the line `The additive group of K is an abelian group with four elements. The order of 1 in this group divides 4, so it is either 2 or 4`
Comment: @ladiesMan217: Let me answer your question 11 years late, for the benefit of future readers. Lagrange's theorem tells us that for a group $G$ and element $g\in G$, the order of $g$ divides $|G|$. Therefore, in our case, the order of $1$ must be $1$, $2$, or $4$. But the only element of order $1$ in a group is the identity element of group, here by denoted by $0$. Thus, if the order of $1$ is $1$, then $1=0$. This contradicts the field axioms, one of which explicitly states that $1\neq 0$. Thus, the only possibilities are that the order of $1$ is $2$ or $4$.
Answer: Hint: Two of the elements have to be $0$ and $1$, and call the others $a$ and $b$.  We know the mulitplicative group is cyclic of order $3$ (there is only one group to choose from), so $a*a=b, b*b=a, a*b=1$.  Now you just have to fill in the addition table:  how many choices are there for $1+a$?  Then see what satisfies distributivity and you are there.
Added:  it is probably easier to think about the choices for $1+1$
Answer: HINT $\ $ Such a field would be a quadratic extension of its prime field $\rm\:\mathbb F_2\:.\:$ So it suffices to consider $\rm\:\mathbb F_2[x]/(f(x))\:$ where $\rm\:f(x)\:$ is an irreducible quadratic polynomial over $\rm\:\mathbb F_2\:.\:$ Testing irreducibility is trivial via the Parity Root Test.
Comment: Checking whether a given polynomial has a root in $\mathbb F_2$ is done by plugging in the two candidates.  You don't need a fancy name like Parity Root Test.  So this is an imitation of the construction of the complex numbers from the reals.  The only hard part is choosing a quadratic with no solution (since the conventional choice $x^2+1$ has solutions).
Comment: Dubque sorry that covered in my course, but thank you for your time
Comment: @LHS Such an exercise can occur before or after you study quotient rings and or beginning field theory, i.e. before the study of finite fields. You may wish to revisit this answer after you've studied such. It's always a good idea to say something about your background when you post questions. This will help you to receive answers at the appropriate level.
Comment: @GEdgar The point of *naming* the **Parity Root Test** is that it works in *any* ring that admits parity - of which their are many, e.g. the Gaussian integers - see the linked post. Here it is trivial, but in other rings it may be quite nontrivial. This is but a simple manifestation of ideas that play fundamental roles in number theory. As such it deserves pedagogical emphasis.

What are the fields with 4 elements?


Feature Suggestion - "Did you forget?"

Question: I have a suggestion for a feature to help out those of us with bad memories.  Can a daemon be created to skim through the questions that have been asked, but the OP has apparently forgotten it, so no answer was accepted, and nothing was acknowledged by the OP?  Basically, if I post a question, log out (since i don't expect an answer in the next 5 minutes, like I would in a chatroom), and forget about that question, can an email be automatically sent to me 15, 20, or 30 days later asking "Hey, you have some answers here, did you forget about this?" (choose your phrasing).  Thanks
Comment: NO BECAUSE YOU SHOULD BE ON THE SITE EVERYDAY WHAT IS WRONG WITH YOU
Comment: Well, that would be obnoxious! What if I didn't forget, I just hadn't checked on the question?
Comment: Please don't log out immediately after asking a question. Stick around for a little while to answer questions in comments from those of us riding the FGITW wave.
Comment: AFAIK, this is already exists
Comment: I agree with @TheEstablishment, this would be terribly obnoxious. What if the answers posted just aren't relevant or do not actually answer the question? You'd have to have a way to opt specific questions out of the notifications... just sounds like a lot of work for very little benefit.
Comment: Besides, it's a solution in search of a problem. Do you *really* think there are that many people who ask questions that they completely forget about?
Comment: And to that end, if you're asking questions that aren't important enough for you to remember then why did you bother wasting the community's time?
Comment: If you have trouble remembering just subscribe to the feed like this one http://meta.stackoverflow.com/feeds/question/127614
Comment: He must have forgotten about this one...
Comment: Just don't forget. Write it down ,etc
Comment: Well, I can understand the desire not to receive spam, my thought was more of a voluntary opt-in if I go to say, bicycles se, put in a question, and then don't remember to go back.  I'm not on bicycles regularly (don't have my account active for that one), so it would be easy for me to forget.  Also, I was thinking of it as the system monitors and detects if the op returns to the question or not within the time period.  So this change would be SE wide, but those who use it would have to specifically opt in, it would be turned off by default, so we don't get daily emails we may not want.
Answer: No thank you.  I would not like spam from SE going "AAHH!  You haven't accepted an answer!!!1!!one" when none of the answers helped.
However, if you really want it, we have something similar:
Comment: Huh. I never noticed that before. Ever. No big loss, though. I don't need more spam in my inbox...

Feature Suggestion - "Did you forget?"