This guide covers ways in which you can become a part of the ongoing development of Ruby on Rails.
After reading this guide, you will know:
Ruby on Rails is not “someone else’s framework.” Over the years, hundreds of people have contributed to Ruby on Rails ranging from a single character to massive architectural changes or significant documentation — all with the goal of making Ruby on Rails better for everyone. Even if you don’t feel up to writing code or documentation yet, there are a variety of other ways that you can contribute, from reporting issues to testing patches.
Ruby on Rails uses GitHub Issue Tracking to track issues (primarily bugs and contributions of new code). If you’ve found a bug in Ruby on Rails, this is the place to start. You’ll need to create a (free) GitHub account in order to submit an issue, to comment on them or to create pull requests.
NOTE: Bugs in the most recent released version of Ruby on Rails are likely to get the most attention. Also, the Rails core team is always interested in feedback from those who can take the time to test edge Rails (the code for the version of Rails that is currently under development). Later in this guide you’ll find out how to get edge Rails for testing.
If you’ve found a problem in Ruby on Rails which is not a security risk, do a search in GitHub under Issues in case it was already reported. If you find no issue addressing it you can add a new one. (See the next section for reporting security issues.)
At the minimum, your issue report needs a title and descriptive text. But that’s only a minimum. You should include as much relevant information as possible. You need at least to post the code sample that has the issue. Even better is to include a unit test that shows how the expected behavior is not occurring. Your goal should be to make it easy for yourself — and others — to replicate the bug and figure out a fix.
 Unless you have a “Code Red, Mission Critical, the World is Coming to an End” kind of bug, you’re creating this issue report in the hope that others with the same problem will be able to collaborate with you on solving it. Do not expect that the issue report will automatically see any activity or that others will jump to fix it. Creating an issue like this is mostly to help yourself start on the path of fixing the problem and for others to confirm it with an “I’m having this problem too” comment.
If you are filing a bug report for Active Record, please use this template for gems if the bug is found in a published gem, and this template for master if the bug happens in the master branch.
WARNING: Please do not report security vulnerabilities with public GitHub issue reports. The Rails security policy page details the procedure to follow for security issues.
Please don’t put “feature request” items into GitHub Issues. If there’s a new feature that you want to see added to Ruby on Rails, you’ll need to write the code yourself - or convince someone else to partner with you to write the code. Later in this guide you’ll find detailed instructions for proposing a patch to Ruby on Rails. If you enter a wishlist item in GitHub Issues with no code, you can expect it to be marked “invalid” as soon as it’s reviewed.
If you’d like feedback on an idea for a feature before doing the work for make a patch, please send an email to the rails-core mailing list. You might get no response, which means that everyone is indifferent. You might find someone who’s also interested in building that feature. You might get a “This won’t be accepted.” But it’s the proper place to discuss new ideas. GitHub Issues are not a particularly good venue for the sometimes long and involved discussions new features require.
To move on from submitting bugs to helping resolve existing issues or contributing your own code to Ruby on Rails, you must be able to run its test suite. In this section of the guide you’ll learn how to set up the tests on your own computer.
The easiest and recommended way to get a development environment ready to hack is to use the Rails development box.
In case you can’t use the Rails development box, see section above, check this other guide.
The --dev
flag of rails new
generates an application that uses your local
branch:
$ cd rails $ bundle exec rails new ~/my-test-app --dev
The application generated in ~/my-test-app
runs against your local branch
and in particular sees any modifications upon server reboot.
This is how you run the Active Record test suite only for SQLite3:
$ cd activerecord $ bundle exec rake test_sqlite3
You can now run the tests as you did for sqlite3
. The tasks are respectively
test_mysql test_mysql2 test_postgresql
Finally,
$ bundle exec rake test
will now run the four of them in turn.
You can also run any single test separately:
$ ARCONN=sqlite3 ruby -Itest test/cases/associations/has_many_associations_test.rb
You can invoke test_jdbcmysql
, test_jdbcsqlite3
or test_jdbcpostgresql
also. See the file activerecord/RUNNING_UNIT_TESTS.rdoc
for information on running more targeted database tests, or the file ci/travis.rb
for the test suite run by the continuous integration server.
The test suite runs with warnings enabled. Ideally, Ruby on Rails should issue no warnings, but there may be a few, as well as some from third-party libraries. Please ignore (or fix!) them, if any, and submit patches that do not issue new warnings.
As of this writing (December, 2010) they are especially noisy with Ruby 1.9. If you are sure about what you are doing and would like to have a more clear output, there’s a way to override the flag:
$ RUBYOPT=-W0 bundle exec rake test
If you want to add a fix to older versions of Ruby on Rails, you’ll need to set up and switch to your own local tracking branch. Here is an example to switch to the 3-0-stable branch:
$ git branch --track 3-0-stable origin/3-0-stable $ git checkout 3-0-stable
TIP: You may want to put your Git branch name in your shell prompt to make it easier to remember which version of the code you’re working with.
As a next step beyond reporting issues, you can help the core team resolve existing issues. If you check the Everyone’s Issues list in GitHub Issues, you’ll find lots of issues already requiring attention. What can you do for these? Quite a bit, actually:
For starters, it helps just to verify bug reports. Can you reproduce the reported issue on your own computer? If so, you can add a comment to the issue saying that you’re seeing the same thing.
If something is very vague, can you help squash it down into something specific? Maybe you can provide additional information to help reproduce a bug, or help by eliminating needless steps that aren’t required to demonstrate the problem.
If you find a bug report without a test, it’s very useful to contribute a failing test. This is also a great way to get started exploring the source code: looking at the existing test files will teach you how to write more tests. New tests are best contributed in the form of a patch, as explained later on in the “Contributing to the Rails Code” section.
Anything you can do to make bug reports more succinct or easier to reproduce is a help to folks trying to write code to fix those bugs - whether you end up writing the code yourself or not.
You can also help out by examining pull requests that have been submitted to Ruby on Rails via GitHub. To apply someone’s changes you need first to create a dedicated branch:
$ git checkout -b testing_branch
Then you can use their remote branch to update your codebase. For example, let’s say the GitHub user JohnSmith has forked and pushed to a topic branch “orange” located at https://github.com/JohnSmith/rails.
$ git remote add JohnSmith git://github.com/JohnSmith/rails.git $ git pull JohnSmith orange
After applying their branch, test it out! Here are some things to think about:
Once you’re happy that the pull request contains a good change, comment on the GitHub issue indicating your approval. Your comment should indicate that you like the change and what you like about it. Something like:
I like the way you've restructured that code in generate_finder_sql — much nicer. The tests look good too.
If your comment simply says “+1”, then odds are that other reviewers aren’t going to take it too seriously. Show that you took the time to review the pull request.
Ruby on Rails has two main sets of documentation: the guides help you in learning about Ruby on Rails, and the API is a reference.
You can help improve the Rails guides by making them more coherent, consistent or readable, adding missing information, correcting factual errors, fixing typos, or bringing it up to date with the latest edge Rails. To get involved in the translation of Rails guides, please see Translating Rails Guides.
If you’re confident about your changes, you can push them directly yourself via docrails. Docrails is a branch with an open commit policy and public write access. Commits to docrails are still reviewed, but this happens after they are pushed. Docrails is merged with master regularly, so you are effectively editing the Ruby on Rails documentation.
If you are unsure of the documentation changes, you can create an issue in the Rails issues tracker on GitHub.
When working with documentation, please take into account the API Documentation Guidelines and the Ruby on Rails Guides Guidelines.
NOTE: As explained earlier, ordinary code patches should have proper documentation coverage. Docrails is only used for isolated documentation improvements.
NOTE: To help our CI servers you can add [ci skip] to your documentation commit message to skip build on that commit. Please remember to use it for commits containing only documentation changes.
WARNING: Docrails has a very strict policy: no code can be touched whatsoever, no matter how trivial or small the change. Only RDoc and guides can be edited via docrails. Also, CHANGELOGs should never be edited in docrails.
The first thing you need to do to be able to contribute code is to clone the repository:
$ git clone git://github.com/rails/rails.git
and create a dedicated branch:
$ cd rails $ git checkout -b my_new_branch
It doesn’t matter much what name you use, because this branch will only exist on your local computer and your personal repository on GitHub. It won’t be part of the Rails Git repository.
Now get busy and add or edit code. You’re on your branch now, so you can write whatever you want (you can check to make sure you’re on the right branch with git branch -a
). But if you’re planning to submit your change back for inclusion in Rails, keep a few things in mind:
It is not customary in Rails to run the full test suite before pushing
changes. The railties test suite in particular takes a long time, and even
more if the source code is mounted in /vagrant
as happens in the recommended
workflow with the rails-dev-box.
As a compromise, test what your code obviously affects, and if the change is not in railties run the whole test suite of the affected component. If all is green that’s enough to propose your contribution. We have Travis CI as a safety net for catching unexpected breakages elsewhere.
TIP: Changes that are cosmetic in nature and do not add anything substantial to the stability, functionality, or testability of Rails will generally not be accepted.
Rails follows a simple set of coding style conventions:
{ a: :b }
over { :a => :b }
.&&
/||
over and
/or
.MyClass.my_method(my_arg)
not my_method( my_arg )
or my_method my_arg
.a = b
and not a=b
.method { do_stuff }
instead of method{do_stuff}
for single-line blocks.The above are guidelines — please use your best judgment in using them.
The CHANGELOG is an important part of every release. It keeps the list of changes for every Rails version.
You should add an entry to the CHANGELOG of the framework that you modified if you’re adding or removing a feature, committing a bug fix or adding deprecation notices. Refactorings and documentation changes generally should not go to the CHANGELOG.
A CHANGELOG entry should summarize what was changed and should end with author’s name. You can use multiple lines if you need more space and you can attach code examples indented with 4 spaces. If a change is related to a specific issue, you should attach issue’s number. Here is an example CHANGELOG entry:
* Summary of a change that briefly describes what was changed. You can use multiple
lines and wrap them at around 80 characters. Code examples are ok, too, if needed:
class Foo
def bar
puts 'baz'
end
end
You can continue after the code example and you can attach issue number. GH#1234
*Your Name*
Your name can be added directly after the last word if you don’t provide any code examples or don’t need multiple paragraphs. Otherwise, it’s best to make as a new paragraph.
You should not be the only person who looks at the code before you submit it. You know at least one other Rails developer, right? Show them what you’re doing and ask for feedback. Doing this in private before you push a patch out publicly is the “smoke test” for a patch: if you can’t convince one other developer of the beauty of your code, you’re unlikely to convince the core team either.
When you’re happy with the code on your computer, you need to commit the changes to Git:
$ git commit -a
At this point, your editor should be fired up and you can write a message for this commit. Well formatted and descriptive commit messages are extremely helpful for the others, especially when figuring out why given change was made, so please take the time to write it.
Good commit message should be formatted according to the following example:
Short summary (ideally 50 characters or less)
More detailed description, if necessary. It should be wrapped to 72
characters. Try to be as descriptive as you can, even if you think that
the commit content is obvious, it may not be obvious to others. You
should add such description also if it's already present in bug tracker,
it should not be necessary to visit a webpage to check the history.
Description can have multiple paragraphs and you can use code examples
inside, just indent it with 4 spaces:
class PostsController
def index
respond_with Post.limit(10)
end
end
You can also add bullet points:
- you can use dashes or asterisks
- also, try to indent next line of a point for readability, if it's too
long to fit in 72 characters
TIP. Please squash your commits into a single commit when appropriate. This simplifies future cherry picks, and also keeps the git log clean.
It’s pretty likely that other changes to master have happened while you were working.  Tests still pass? Change still seems reasonable to you? Then move on.
Navigate to the Rails GitHub repository and press “Fork” in the upper right hand corner.
Add the new remote to your local repository on your local machine:
$ git remote add mine git@github.com:<your user name>/rails.git
Push to your remote:
$ git push mine my_new_branch
You might have cloned your forked repository into your machine and might want to add the original Rails repository as a remote instead, if that’s the case here’s what you have to do.
In the directory you cloned your fork:
$ git remote add rails git://github.com/rails/rails.git
Download new commits and branches from the official repository:
$ git fetch rails
Merge the new content:
$ git checkout master $ git rebase rails/master
Update your fork:
$ git push origin master
If you want to update another branch:
$ git checkout branch_name $ git rebase rails/branch_name $ git push origin branch_name
Navigate to the Rails repository you just pushed to (e.g. https://github.com/your-user-name/rails) and press “Pull Request” in the upper right hand corner.
Write your branch name in the branch field (this is filled with “master” by default) and press “Update Commit Range”.
Ensure the changesets you introduced are included in the “Commits” tab. Ensure that the “Files Changed” incorporate all of your changes.
Fill in some details about your potential patch including a meaningful title. When finished, press “Send pull request”. The Rails core team will be notified about your submission.
Now you need to get other people to look at your patch, just as you’ve looked at other people’s patches. You can use the rubyonrails-core mailing list or the #rails-contrib channel on IRC freenode for this. You might also try just talking to Rails developers that you know.
It’s entirely possible that the feedback you get will suggest changes. Don’t get discouraged: the whole point of contributing to an active open source project is to tap into community knowledge. If people are encouraging you to tweak your code, then it’s worth making the tweaks and resubmitting. If the feedback is that your code doesn’t belong in the core, you might still think about releasing it as a gem.
One of the things that we may ask you to do is “squash your commits,” which will combine all of your commits into a single commit.  This makes it easier to backport changes to stable branches, squashing makes it easier to revert bad commits, and the git history can be a bit easier to follow. Rails is a large project, and a bunch of extraneous commits can add a lot of noise.
In order to do this, you’ll need to have a git remote that points at the main Rails repository. This is useful anyway, but just in case you don’t have it set up, make sure that you do this first:
$ git remote add upstream https://github.com/rails/rails.git
You can call this remote whatever you’d like, but if you don’t use upstream
,
then change the name to your own in the instructions below.
Given that your remote branch is called my_pull_request
, then you can do the
following:
$ git fetch upstream $ git checkout my_pull_request $ git rebase upstream/master $ git rebase -i < Choose 'squash' for all of your commits except the first one. > < Edit the commit message to make sense, and describe all your changes. > $ git push origin my_pull_request -f
You should be able to refresh the pull request on GitHub and see that it has been updated.
Changes that are merged into master are intended for the next major release of Rails. Sometimes, it might be beneficial for your changes to propagate back to the maintenance releases for older stable branches. Generally, security fixes and bug fixes are good candidates for a backport, while new features and patches that introduce a change in behavior will not be accepted. When in doubt, it is best to consult a Rails team member before backporting your changes to avoid wasted effort.
For simple fixes, the easiest way to backport your changes is to extract a diff from your changes in master and apply them to the target branch.
First make sure your changes are the only difference between your current branch and master:
$ git log master..HEAD
Then extract the diff:
$ git format-patch master --stdout > ~/my_changes.patch
Switch over to the target branch and apply your changes:
$ git checkout -b my_backport_branch 3-2-stable $ git apply ~/my_changes.patch
This works well for simple changes. However, if your changes are complicated or if the code in master has deviated significantly from your target branch, it might require more work on your part. The difficulty of a backport varies greatly from case to case, and sometimes it is simply not worth the effort.
Once you have resolved all conflicts and made sure all the tests are passing, push your changes and open a separate pull request for your backport. It is also worth noting that older branches might have a different set of build targets than master. When possible, it is best to first test your backport locally against the Ruby versions listed in .travis.yml
before submitting your pull request.
And then… think about your next contribution!
All contributions, either via master or docrails, get credit in Rails Contributors.


Hello folks,
My first foray into the forum, I've been reading judiciously for some time now and have literally just received my EmonTX v2 kit (thanks chaps) so let the soldering commence ;)
The solar panels are also going up as I speak! The plan is to make use of the immersion diversion - not sure if to go with the router or PLL as reading others' code isn't my strong point! Also, Arduino is a new environment to me although I did do some stuff on Atmel MCUs back in the dim and distant past! The other plan is to remote switch a pond pump as well as longer term adding a battery bank...
Looking forward to tinkering again and you all seem like friendly folk which no doubt will be of great use along the way :)
Umski
Re: Hello! New toys...
"The plan is to make use of the immersion diversion - not sure if to go with the router or PLL"
The main difference is the PLL sketch can monitor and send the data by radio at the same time, Robin's sketch does not (it is purely and energy diverter/router). Both can run on the same hardware with minor tweaks (if you have the RFM12B) so you can start with one and finish with the other.
Re: Hello! New toys...
Ah! Thanks for highlighting that Robert - in my excitement I hadn't spotted that - I was intending to use the GLCD at some point just to reassure me that things are running as they should once 'live' so I guess the PLL version will be my starting point. I'm not quite sure what you mean by 'start with one and finish with the other' however? I do have the RFM12B - I went with the 433MHz version - there seem to be mixed opinions on which frequency, but working with mobile phones as my day job, we tend to see better indoor RF performance on the lower bands so I figured that was a useful baseline!
I managed to get most of the passive components on to the EmonTX board yesterday - I'd forgotten how satisfying soldering up a PCB is :)
Re: Hello! New toys...
To test your new hardware, you may find some of the basic tools on my Summary Page to be of use. RawSamplesTool will allow you to see the waveforms from your sensors to check that all is well. The simplest PV Router sketch is my Mk2_mini_3 one. If you're interested in understanding what's going on, that's probably the best one to start with. My Mk2i_rev5 version supports multiple loads and has an RF capability for controlling a remote load. As posted, no transmission of data is supported, but this could be easily added.
Martin's PLL-based sketch, which does support data transmission, runs on the same hardware so you can switch between them at any time.
At risk of repetition, an 18R burden resistor is not likely to be suitable for a PV Router application - unless you have a 20kW system!
Re: Hello! New toys...
"I'm not quite sure what you mean by 'start with one and finish with the other' however?" Not well phrased, I agree. As Robin says, you can easily switch between the two so if you find the one you start with doesn't suit your needs, you can switch to the other with minimal or no changes to the hardware (given you have the RF module).
Re: Hello! New toys...
Thanks Robin for your pointers, I finished soldering all the remaining major bits on earlier so just playing with the compiler and the serial output - seemed to be working ok with a few basic sketches so I'll have a look at your tools as a next step. I'm waiting for the clamps to arrive before I can do anything serious...However the mk2i_rev5 with remote load switch sounds like a useful one too - thanks :)
Thanks also Robert for clarifying - makes sense!
No doubt I'll have more questions following some tinkering over the weekend...panels didn't get finished this week, hopefully Monday...
Re: Hello! New toys...
Hello again,
It's been a while since I started this I realise! The panels went up with a few glitches along the way but have had all that sorted now and a very productive Jan/Feb - too much exported energy though!
After a lot of other diversions, to excuse the pun, I finally got an output board for the triac made up, thanks to Robin for offering a pre-made one, in the end my hand drawn, hand etched board worked without any glitches albeit changing the resistor on the LV side to 10R to get the opto-isolator to work correctly (I have an LED in series)
I went for Martin's PLL software as this is what I had started to play with and had calibrated. I *think* it is working ok the immersion neon is happily blinking away as is my output board. The serial output I had for a brief period was as follows:
509 514 513 240.11 38.49 2829.45 2772.60 50.07 300.00 2851.38 PLL is locked
509 513 513 240.15 36.47 2833.23 2773.41 50.07 300.00 2669.03 PLL is locked
510 513 513 239.64 17.25 2838.69 2761.77 50.06 300.00 2583.13 PLL is locked
509 513 513 239.72 67.86 2837.35 2763.45 50.06 300.00 2245.21 PLL is locked
509 513 513 239.57 79.08 2840.34 2760.19 50.06 300.00 1849.82 PLL is locked
510 513 513 239.92 91.89 2842.73 2768.08 50.06 300.00 1390.35 PLL is locked
510 513 513 239.90 83.90 2843.22 2767.67 50.06 300.00 972.54 PLL is locked
509 513 512 240.42 -289.89 2840.20 2390.55 50.06 300.00 2422.01 PLL is locked
510 514 513 237.90 36.89 2832.91 2721.70 50.06 300.00 2237.53 PLL is locked
510 513 513 238.73 43.81 2830.95 2740.79 50.06 300.00 2019.37 PLL is locked
509 514 512 239.02 35.80 2836.53 2747.41 50.07 300.00 1840.38 PLL is locked
510 513 513 238.86 62.48 2833.96 2743.67 50.08 300.00 1527.96 PLL is locked
510 513 513 238.79 113.65 2832.41 2742.04 50.07 300.00 961.99 PLL is locked
509 513 513 238.77 -308.02 2829.78 2357.94 50.07 300.00 2502.09 PLL is locked
510 513 513 238.67 156.37 2825.58 2739.31 50.07 300.00 1720.26 PLL is locked
510 513 513 238.41 115.25 2834.01 2733.39 50.07 300.00 1146.34 PLL is locked
509 513 512 238.74 -270.20 2840.02 2357.20 50.06 300.00 2497.32 PLL is locked
510 513 513 238.57 97.01 2838.94 2737.05 50.05 300.00 2012.29 PLL is locked
510 513 513 238.70 174.95 2840.63 2739.99 50.05 300.00 1141.05 PLL is locked
Sorry that might be a bit tricky to read, but I am cautious that the 5th value for Power1 goes negative periodically - this is export so should this happen when the system is working? I see how the energy rises to 2700J and then reduces to 900J as the energy is fed to the immersion, but as I understand it very little should be exported when balanced, no?
Second question is about the meter - we have a mechanical type with 200rev/kWh and it seemed to blip forwards and backwards - no change in the reading of course but do I have scope for changing the energy levels as they are as default for now?
Lastly, have I made any glaring errors in the calibration - I read that the ILEAD values should be about 158uS rather than the default - I can't find how to go about measuring this without a scope...
#define VCAL 231.6 //calibrated 02/03/14 calculated value is 230:9 for transformer x 11:1 for resistor divider = 281
//#define I1CAL 112.6 // calculated value is 100A:0.05A for transformer / 18 Ohms for resistor = 111.1
#define I1CAL 108.5 //calibrated 02/03/14
//#define I2CAL 94.8 // this is for CT2, the solar PV current transformer
#define I2CAL 108.2 //calibrated 02/03/14
#define I1LEAD 158 // number of microseconds the CT1 input leads the voltage input by
#define I2LEAD 158 // number of microseconds the CT2 input leads the voltage input by
#define POWERCORRECTION 0 // this value, in watts, may be used to compensate for the leakage from
// voltage to current inputs, it only affects data sent to emonGLCD
#define LOAD_POWER 2890 //calibrated 05/03/14 //power in watts (at 240V) of triac load for diverted power calculation
Thanks again, I hope to pick up one of Robin's kits when he's in full production and likely swap the code as suggested. In the meantime I'm sure the novelty of checking the triac/immersion/meter and running between them will wear off ;) Very satisfying to have this going at last :)
Next step is to get the triac board boxed up - at the moment it is dangling in prototype form. Then to get the GLCD out again which I think I've killed :(
Re: Hello! New toys...
I'm pleased to hear that another PV Diversion system is in operation. Martin's code and mine act in a very similar way for the output stage, it's only the measurement side which is different. If Martin's PLL code is working fine for you, and your immersion is flashing away as expected, that's great. No need to change anything.
The main thing to check re. your meter is that there is no net movement. After each complete forward & backward cycle, the disc should end up in the same place. Make sure that it's not hitting its backstop after each reverse movement. I've posted various videos showing this effect. Send me a PM if you need a pointer to any of these (or if you need a smart heatsink :)
With my Mk2 Router code, that much Serial Output would undoubtedly affect the operation. It may be worth commenting out those print statements to see if it makes any noticeable difference.
Re: Hello! New toys...
If your Ferraris meter is jogging backwards and forwards and not hitting the ratchet that prevents it going backwards (if yours has one - some don't) and not clocking up energy, then it's all working properly. You can open up the decision values if you wish, but it's important not to allow the energy 'bucket' to underflow or overflow.
I can't think of a good reason why you should export energy unless the dump load isn't available for some reason, it may be something critical like a loose wire or a dirty contact on your immersion thermostat, so I suggest checking obvious things like that first. However, if there's no apparent cause and it's a relatively isolated and rare event I wouldn't worry too much, since tracking it down could be hard. Narrowing the decision values on the energy 'bucket' should stop it - but it will increase the flicker rate.
I haven't looked at a way of measuring ILEAD, so I can't help you there. If you have a large, suitably rated capacitor, you could try using that as the ONLY load and adjust ILEAD by trial and error to get zero real power. This works because a pure capacitor does not absorb power - the difficulty is getting a representative current with a realistic value of capacitor.. You may need to have many primary turns through your c.t. to do any good.
Re: Hello! New toys...
Thanks chaps, that's reassuring :)
The meter (ABB branded) does have a backstop but I don't know if there is more than 1 per turn, I'll take a look at your videos Robin and then see what the tolerance between backwards and forwards is. If it's one entire turn then that allows a bit of scope for value adjustment. Each turn equates to 5Wh or 18000Ws...
I don't think there's any connection issues - the immersion was drawing a full 2890W without the triac involved. The negative value seems to happen each time the energy level drops to 900J which turns the triac off, so as it then takes a brief time to get back up to 2700J this is where it would 'appear' to export. Whether this is actually the case, I'm not sure so maybe changing the hysteresis on the on/off values might change this (not seen any flicker so far so seems ok also as lights aren't usually on during the day probably not such a big issue) I'm curious as to how this affects the output on a GLCD (which I can't test right now). I think the question is whether anyone else that's running this code ever sees apparent 'export' in the 5 sec intervals with transmissions?
I'm slightly more confused with trying to measure ILEAD with a capacitive load (I feel more and more dumbed down in the 'real' world after spending 4 years doing a degree in E&E engineering and not putting it into practice for nearly 10!), I'm curious as to how the original figures might have been derived and what other figures others may be using...
As Robin has suggested before 'playing' has helped a great deal in learning the principles, so thumbs up :) Next step is to understand whether the GLCD board (sans display) is receiving the RFM12b transmissions from the EmonTX...
Re: Hello! New toys...
On the disc-meter that I've tested, the backstop cuts in after approx half a revolution in the reverse direction. This behaviour is provided by a little nylon top hat which acts like a pawl or ratchet; one way it gets gently pushed aside as it moves past a protruding obstacle, the other way it catches and any further motion is prevented.
The emonGLCD will display whatever data is sent to it. Because the original emonTx sketches only measure power infrequently (and assume that nothing changes during the periods inbetween), they won't work reliably if a 'burst mode' PV Router is present. A sketch that measures continuously will give much better results. If you are displaying results that are created by Martin's PLL Router, I would expect the data to be perfect because that sketch records the energy flow during every mains cycle, as do my own Mk2 PV Router sketches.
If you have a spare processing platform handy, you could run my 'continuous' code as posted for the emonTx V3. This measures real power continuously on four channels and transmits these values by RF every couple of seconds.
Re: Hello! New toys...
That was how I understood it - the RF output on the PLL code is just sent to the GLCD i.e. the data shown from the serial output is effectively what is transmitted to the GLCD and hence displayed. So grabbing a line from above:
509 513 512 240.42 -289.89 2840.20 2390.55 50.06 300.00 2422.01 PLL is locked
realpower1 is -289.89 i.e. the nett house
realpower2 is 2840.20 i.e. the PV output
divertedpower is 2390.55 i.e. the calculated power going to the immersion
Which is exactly what would be displayed on the GLCD. However 5 sec later the following would:
36.89 = import?
2832.91
2721.70
And this is where I was under the impression that when balanced, the first value should hover around zero rather than bouncing up and down quite so much? Or is it because it is a visual 'snapshot' of the power rather than seeing what is happening in between? Just want to make sure this is the expected behaviour!
P.S. Saw the videos of the disc-meter - mine is buzzing back and forth for a couple of seconds rather than vibrating in one position - I figure this is due to the low/high energy thresholds?
Re: Hello! New toys...
Re: Hello! New toys...
If my video shows the disc meter to be "vibrating in one position", that suggests my Router is in its "normal" mode. If I were to repeat the test with the Router in AF mode, the disc would repeatedly wind its way forwards and backwards within its permitted zone. When using a digital meter, the penalty-free zone that's allowed is generally either 3600 J (1 Wh), or 1250 J. In your case, you can probably extend your Router's limits because your non-reversing disc meter won't hit the brakes until around 2.5 Wh's worth of reverse flow has occurred.
Depending on the cycle rate of your Router, it's quite possible that occasional periods of nett import will be correctly reported. Over a sufficiently long timescale, all imports and exports should balance out (as demonstrated by your disc meter), but that will only occur if energy flow is being measured continuously.
I'm sure I've posted footage of a disc meter while running a Router in AF mode. Yes, here's an exciting one for you to watch. It even talks about phaseCal. Better stock up on the popcorn first!
(is there a category for the most boring video on the Web?)
[Edit] Sorry, that one isn't in AF mode ... nor can I find any others. To perform that 'live' test, I connected Noah's disc-meter into our domestic supply on the 'safe' side of our 2-pole isolator box. After some weeks of that temporary arrangement, I reconnected the wiring as it should be, and don't wish to disturb it again now. At that time, autumn 2012, flicker had not been raised as an important issue, so my Mk2 Router did not have an AF mode.
Re: Hello! New toys...
Thanks Martin :D More reassurance that all is well (and yes no units recorded - will check again today when I get home) - I'll also check the buffer set to zero scenario too! So in AF mode, it is expected that there might be some +/- shown as and when I get a GLCD working...
And thanks also for the link to the phasecal - this is one page I've not come across on my judicious searches! I will try that too :)
Robin - I did watch all 16.24m of that video earlier - I've seen more boring stuff, trust me ;) In this context it makes perfect sense! As you say I probably have a bit of scope with the disc meter - more experimentation ahead!
Re: Hello! New toys...
Robin - I did watch all 16.24m of that video earlier - I've seen more boring stuff, trust me ;) In this context it makes perfect sense!
Umesh - you've made my day!
Re: Hello! New toys...
Glad to hear it Robin ;)
So I did some more tinkering and have observed as follows:
Using Martin's Phasecal sketch, I ran this with CT1 and CT2 on the immersion wire alone. With this I got values of 7uS and 3uS respectively. This surprised me but at the same time the original values were 5uS in the calibration data...
I then clipped both CTs to the PV (~400W) and got ~155uS for both...
I understand the implications of the current affecting the phase so variance between very low power levels and high ones...but are the values taken on the immersion the representative ones I should use for ILEAD1/2 or should I stick to 155uS as for the actual source/load inputs that are being measured?
Second change was the energy levels - changing to 1800J works as expected with very low import/export (below) with the meter buzzing in the same place :) No issues with flickering it seems but then we don't have any incandescent bulbs...
509 513 512 240.09 3.74 533.49 844.51 49.96 300.00 1783.88 PLL is locked
510 514 513 240.41 0.39 535.30 733.72 49.95 300.00 1781.92 PLL is locked
510 513 513 240.69 -0.14 534.79 735.44 49.94 300.00 1782.63 PLL is locked
509 513 513 240.78 -1.74 535.95 771.04 49.95 300.00 1791.29 PLL is locked
509 513 513 241.13 2.02 538.03 793.51 49.95 300.00 1781.21 PLL is locked
510 513 513 240.56 2.86 537.90 781.23 49.94 300.00 1766.97 PLL is locked
I then tried to up the buffer to 7200J with 900J and 6300J thresholds - the meter did the same as before with back and forth movement, but longer of course...
So is there any benefit to the increased buffer size if I'm not using AF mode - or at all for that matter, other than to ensure no nett energy is imported?
Last of all - I'd set the immersion thermostat to max (65deg I think) and although all but one or two taps are mixers I nearly scalded myself having 'calibrated' my brain to the 'normal' temperature for the basin tap when heated by gas! So plenty energy being shunted it seems :D
Re: Hello! New toys...
The way to look at choosing the value for phasecal is to consider the current. The PV current is roughly steady, varying with the amount of power generated. The grid current, when the diverter is in balance, is pulses of up to 12 A imported balanced by a different and lower exported current. At other times, the grid current is your normal household load, with or without the dump load.
I'd suggest you probably want the phase calibration for the PV feed to be somewhere between 7 and 155 (as 7 represents about 12 A and 155 represents less than 2 - take your pick for where you want the best accuracy!) and the grid connection should probably be set much nearer the 7 end, since the current there is around 12 A when the diverter is working. Assuming you're using the YHDC ct's, if you take a look at the report you'll see exactly how the phase error varies with current and you can make an informed choice.
In case you're wondering, the answer to the variation is a pair of (much) more expensive ct's.
Also bear in mind that the phase error is least important with resistive loads, and only becomes critical when you have a very poor power factor, i.e. a mainly reactive load, which tends to be very small appliances and those on standby.
If you and your neighbours don't experience any flicker, then there's no real advantage of one method over the other. But if your meter gets replaced, be prepared to make a change if you chose the anti-flicker mode with a wide band and you find the new meter has a small energy packet size.
Re: Hello! New toys...
Hello again!
Thanks for the feedback Robert - it makes sense. I experimented with different values for ILEAD and it seems to make little (at least visual) difference to the balance (I have the YHDC 100A CTs) as Robin has also found I believe. Instinctively, I am inclined to have more accuracy at the low end of the power scale but this changes as a result of the load, at least on the house measurement...as a result I have left them at 155uS for the timebeing with the AF off (there aren't any near neighbours!)
Another question is regarding the 'power3' value or 'divertedpower' as it is calculated - I frequently see this as being more than the output of the PV - logic dictates that this can't be the case as power1 is close to 0, but over a sample period of 1 min, it never went below the PV power output. I'm a little confused as I see where this is done in Martin's code, but also see the Brian D on Martin's original thread, averaged to value to the GLCD? Would measuring the immersion power with a third CT be any more accurate? Thoughts - does anyone else see this?
510 513 512 240.76 34.52 1210.15 1365.13 50.02 300.00 1774.97 PLL is locked
510 513 513 240.85 -15.25 1216.72 1105.96 50.02 300.00 1790.22 PLL is locked
510 513 513 240.64 -28.97 1220.80 1278.43 50.02 300.00 1819.19 PLL is locked
510 513 513 240.68 52.52 1224.20 1364.24 50.03 300.00 1767.73 PLL is locked
510 513 513 240.70 -31.62 1228.23 1395.25 50.02 300.00 1799.35 PLL is locked
510 513 513 240.77 -14.89 1234.17 1483.99 50.02 300.00 1813.94 PLL is locked
510 513 513 240.78 12.46 1238.82 1602.80 50.03 300.00 1801.72 PLL is locked
510 513 513 240.86 14.70 1243.23 1366.21 50.03 300.00 1787.32 PLL is locked
510 513 513 240.79 20.76 1253.12 1306.15 50.02 300.00 1766.98 PLL is locked
510 513 513 240.84 -17.09 1264.37 1544.24 50.03 300.00 1783.72 PLL is locked
510 513 513 240.82 -24.78 1271.31 1543.98 50.03 300.00 1808.01 PLL is locked
510 513 513 240.83 12.11 1269.01 1425.37 50.03 300.00 1796.14 PLL is locked
P.S. I have been able to get the GLCD board to receive transmissions so can at least remotely pick up the values over serial for now :)
Re: Hello! New toys...
Martin calculates the diverted energy as the product of the number of cycles and the rating of the heater, scaled for the actual voltage. My first thought is the actual rating of your immersion heater is not what it says on the tin! Martin didn't use a thermostat as he was measuring temperature and using that to override the energy diversion (but that code isn't in his sketch as published), hence he didn't count cycles when the thermostat was open, which you can do (but apparently didn't for the period above). "Diverted energy" is wrong, if you have an active thermostat it should really be "Energy available for diversion".
Re: Hello! New toys...
This sketch works well with a 3rd ct for diverted energy. here is a copy of Martin's original sketch with the 3rd channel added which I have been happily using a version of for several months now.
The differences for the 3rd ct are all marked as when I did it I wanted to track the changes I made in case of any issues, which there wasn't.
Regards Paul
Re: Hello! New toys...
Thanks Robert, I measured the full immersion power when I calibrated at the start (i.e. just on) and that's where the figure came from. As I understand Martin's code, it is calculating Power to the immersion, rather than Energy as per the following two lines
divertedPower=((float)divertedCycleCount*LOAD_POWER)/cycleCount;
divertedPower=divertedPower*(Vrms/240)*(Vrms/240); // correct power for actual voltage
The thermostat was closed as the figure for power1 is marginally positive/negative and the energy levels are hovering around the 1800J mark as expected (no AF on). This is why I'm a bit confused as to why the calculation doesn't seem to match what one would expect...
Silly question maybe - first line is percentage of cycles on i.e. proportion of full power, second line corrects for actual voltage (Vrms/240) but why is this multiplied twice? (Peak voltage?)
Thanks also Paul, this is what I would have done eventually! - very good of you to comment the additional lines - saves having to find every place where repeating code is required! How have you found the measured value to the calculated value - I see you are still keeping both values?
Re: Hello! New toys...
Power is proportional to voltage squared hence the need to multiply twice.
Did you take the voltage into account when you measured the initial power?
Re: Hello! New toys...
Thanks Martin, of course P=V^2/R *doh!*
When you say take the voltage into account, have I missed something obvious there? I simply clipped CT1 onto the immersion feed whilst on and took the reading from the serial reading...it was close enough to 3kW hence using the figure of 2890W
Do the readings for P3 look odd to you?
Re: Hello! New toys...
Update!
I think I've gotten to the bottom of this. I have been away for most of the week so happily assuming the system was ticking along with plenty of hot water. Of course something had gone awry and when I returned things seemed normal until I realised the water wasn't quite as hot as it had been...
The output from the Emon seemed to be flashing away, as was the immersion neon, but when I checked the serial readings the energy level was stuck on 3600. That pointed to the immersion stat, which at a glance seemed 'ok' but the thermostat wouldn't kick in and when it did still nothing was happening. That pointed the finger at the overheat cut-out which had tripped :o On resetting this there was still something odd going on so I had to take the cover off to see what had happened. One of the two contacts that are separated by the overheat hadn't closed again after the reset so I reseated it. Problem solved? Not quite!
Now the neon was coming on intermittently even though the output was fully 'on'.  That pointed to the output board - I thought the triac might be fried but then why was it random? I ended up taking the board off and hooking it up to my 60W test lamp testing it with Martin's manual power level feature (very handy!). Lo and behold, it was the input driver that was only firing the opto-coupler intermittently - seems the combination of the LED and resistor (only 10R) was robbing the LED in the MOC3041. In my haste I hadn't considered the implications of this but having looked at the datasheet in a bit more detail, the series LED works just as well as a current limiting resistor in this case, so I removed the 10R and it seemed to be happy again.
Reassembled and yippee all is well (apart from no hot water this morning due to the boiler not kicking in - seems the indirect overheat stat had also tripped so must keep an eye on whether this happens again). It seems that the 'divertedpower', P3 values were showing as greater than the PV output due to the trigger not turning the triac on as expected so the energy wasn't diverted so in turn the totted up value of cycles equated to a higher value than one would expect - all seems fine now! At least that's how I understand it...
Thanks again for the input folks and hopefully this might be of help to someone in the future!
Re: Hello! New toys...
The choice of opto-trigger and series resistor is critical. Martin chose to use a high-sensitivity trigger (which needs less current) and used the logical high output as "ON" and connected the trigger between the output and ground, taking advantage of the pulse jack to make the connection. Robin used the standard trigger and as the output swing of the 328 goes closer to the GND than to the Vcc, he had to use logical low = "ON" and connect the trigger between Vcc and the output. It was impossible to choose a series resistor for Robin's trigger using the active high configuration that met all the worst-case combinations of component tolerances, and that is why he had to use the active low configuration and why he cannot use a series LED. (I know because I did the sums for him. I have not done the sums for Martin's configuration.)
Also, bear in mind that Martin's "Diverted Power" is not the power actually diverted, only the power available for diversion. Martin used a temperature sensor on the tank to override diversion when the tank was hot, therefore it worked for him. It will not work for you if a thermostat overrides the energy diverter. But from your tale of woe, it sounds as if you too need to incorporate a temperature sensor that overrides the diversion.
Re: Hello! New toys...
Yes, I hadn't noticed the subtle difference that Martin chose the MOC3063 rather than the 3041 (which bizarrely I happened to already have my box of bits!). It seems to be behaving now anyway....I had intended to get one of Robin's output boards but had already started designing and then etching my own - I may still end up doing this with a more 'permanent' set-up. I guess you don't learn unless you play!
Unfortunately, having a temperature sensor on the tank wouldn't be practical so I'm relying on the mechanical stat. I expect having never been used since the previous owners installed the tank, it is a bit ropey so I will be keeping a close eye on this. It seemed to be clicking on and off yesterday. Looking at the data sent from the Emon and the fact that as soon as the stat opens the 'diverted power' hits the limit, I think I have established all the scenarios where this has occurred:
1. The diverted power is way more than the PV output (this is the easy one to figure out)
2. The PV is more than the full diverted power, BUT importantly the export is way more than if the immersion was actually running (this is trickier to define)
Using some combined logic (it's easy to see this mentally but harder to state it logically!) I am using the GLCD board to light up the LEDs when I believe the thermostat has opened and the 'diverted power' is on full (and/or lots of export!). If this proves to be successful then eventually I can separate out the 'real' diverted power to calculate energy diverted. Then when I get round to sorting out the LCD I can make it clear when energy is being absorbed or when the tank is hot and the stat opens. In principle I could do the same on the EmonTX but I'll need to take a closer look at Martin's code to ensure there are no side effects and how to go about 're-triggering' the diversion when the stat closes again...for the timebeing it seems we have too much hot water anyway!
Re: Hello! New toys...
At first glance, you might be able to assume that if the available energy reaches the upper limit, then the tank thermostat has opened, but this is only always true if the PV capacity is less than the immersion load. If greater (i.e. you have a 3 kW load and 3.6 kW of PV), then it's possible to hit the upper limit and still be diverting energy. Other than with a ct on the immersion feed, I don't think it is possible to know with absolute certainty when diversion is actually taking place. Hitting the upper limit certainly means export is taking place, but you knew that anyway.
Re: Hello! New toys...
I ran through scenario 2 (we have 4kWp) and I believe the following covers it:
if (emontx.power2 > 2890 && emontx.power1 < emontx.power1+emontx.power2-emontx.power3)
This checks if the PV output is more than the max immersion load (not ideal I know as this can be lower) AND whether the amount of export defies this being the case i.e. if the export value more negative than the export+PV (i.e. the house) less the immersion then the totals won't add up...
P1 = -3000, P2 = 3500, P3 = 2890 is an example where the stat has opened
P1 = -1000, P2 = 3500, P3 = 2890 is an example where the stat is closed
Basically if the immersion is fully on, then there is no way that the P1 value can be that negative. At least that's how I've seen it behave - of course there may be an alternative scenario or one where the figures are very close together and nearly balance...time will tell ;)
Re: Hello! New toys...
Ok I correct myself ;)
With the scenario 2 acting itself out today (i.e. PV > Full Immersion load), my LED came on regardless of diversion on/off :(
My flawed logic was in the emontx.power1 < emontx.power1+emontx.power2-emontx.power3 part which will always be the case when exporting - duh!
So actually what is needed is to make use of what the house is actually consuming and remove the immersion factor - if this is positive then the immersion is still on, if the stat has tripped and lots is being exported then the value is negative as such:
if (emontx.power2 > 2890 && emontx.power1+emontx.power2-emontx.power3 < 0)
Some real examples:
Immersion on:
P1 = -163, P2 = 3205, P3 = 2932: P1+P2-P3 = 110
Immersion off:
P1 = -3100, P2 = 3217, P3 = 3131: P1+P2-P3 = -3014
Seems to make sense now!
Edit: In fact the same logic covers both scenarios regardless of whether the PV is greater than the max load i.e. if the house consumption isn't positive then the diversion has stopped :)
if(emontx.power2 >= 0 && emontx.power1+emontx.power2-emontx.power3 < 0) then the diversion has stopped and there is export going on


What you should eat and drink to get over the flu, according to doctors
by Kathy Jean Schultz- Water is the best thing you can take to help you get over the flu.
- Yogurt is abundant in vitamins that can help decrease intestinal malfunction, which might help flu sufferers who are experiencing nausea or vomiting.
- When you’re sick with a fever, eating food is not as important as staying hydrated.
- This article was reviewed by Tania Elliott, MD, who specializes in infectious diseases related to allergies and immunology for internal medicine at NYU Langone Health.
- Visit Insider’s homepage for more stories.
When you’re sick with the flu, it’s no fun trying to figure out what to eat and drink. That’s why we’ve put together a list of doctor-recommended foods and fluids to help.
What to drink when you have the flu
Water is the best thing you can consume to help you get over the flu.
“During an infection, the body’s basal metabolic rate increases, which can lead to increased loss of fluids, and you need to increase hydration with water to mitigate these losses,” Ian Nelligan, MD, of Stanford Health Care, tells Insider.
Nelligan says to avoid drinks like soda, sports drinks, and juice because of their high sugar content. Large amounts of sugar can cause diarrhea, which will only dehydrate you more.
“A little bit of sugar is OK when you are feeling unwell, but high sugar content in beverages like soda, juice, or Gatorade can cause diarrhea, so we do not recommend them in people who are experiencing symptoms of diarrhea or upset stomach from influenza,” Jessica Cheng, MD, of the University of California Davis Health, adds.
As for alternative low-sugar beverages like coffee and tea, opt for caffeine-free. Caffeine can cause headaches and jitteriness, which can make you feel worse, especially if you are combining it with over-the-counter cold and flu medications.
And alcohol? That’s off-limits as well.
“Alcohol is dehydrating and should be avoided,” Nelligan says.
What to eat when you have the flu
The flu comes with a slew of nasty symptoms, including runny nose, vomiting, and diarrhea. These symptoms not only dehydrate you but deplete you of important nutrients and calories, key to fueling your body with the energy it needs to fight the infection.
That’s why, in addition to water, you should eat food to replenish what you’ve lost. Charles Peters, MD, of the Mayo Clinic Health System, recommends these foods:
- broth
- chicken soup
- yogurt
- fruits high in vitamin C
- leafy greens
- broccoli
- oatmeal
- pepper
- horseradish
Broth and chicken soup contain significant amounts of sodium, which is a type of electrolyte that can help your body stay hydrated by making you retain water. Beware, though if you have a medical condition that requires you to be on a low-sodium diet.
Yogurt is abundant in protein, calcium, zinc, B vitamins, probiotics, and Vitamin D, which can help decrease intestinal malfunction. This might help flu sufferers who are experiencing nausea or vomiting.
Leafy greens, broccoli, and fruits – like oranges, strawberries, pineapples, kiwis, and mangoes – are a rich source of vitamin C, which studies have shown can reduce the duration of your illness.
The fiber in oatmeal can alleviate stomach and intestinal problems.
Preliminary studies suggest that some other promising remedies include garlic and ginseng, but more scientific evidence is needed for definitive proof that these remedies work for most people.
Fluids versus food: Hydration is more important
When you’re sick with the flu, you might not feel like doing anything, including eating or drinking. So when push comes to shove, which is more important?
“Food is not as important as hydration during the acutely ill period,” Cheng says. “When you are sick with fever, your body is using more energy, so it is important to stay well hydrated and keep your electrolytes replenished. “Maintaining adequate hydration is your number one priority.”
“You may not feel hungry when you are sick with influenza, and that’s OK,” Cheng says.
Related stories about the flu:
- How to prevent the flu, according to doctors
- Yes, the flu is contagious. Here’s when you’re most likely to spread the virus
- You can’t get the flu from the flu shot, but there are side effects
- How long the flu should last and when you should see a doctor
- The flu vaccine is not 100% effective but you should still get it every year


WaDE [WaDE2.0_schema_star.xml]
specific granular variables
| PK | Name | Data Type | NULL | Auto | Default | Comment | FK |
|
| VariableSpecificID | BigInt |
| An internal unique identifier integer for variables | |||
| VariableSpecificUUID | NVarChar(250) | Unique universal identifier for the variable across all the member states, can be alphanumeric | |||||
| VariableSpecificCV | NVarChar(250) | This is a subcategorization of the aggregated variable. This allows the user to specify not only the general category of water data, but also a more specific categorization. For example, for a subcategorization of water supply, the variable would be [AggregatedWaterSupply, Reservoir]. For a subcategorization of water withdrawal, the variable would be [AggregatedWithdrawal, Irrigation]. Other examples: [AggregatedConsumptiveUse, Irrigation], [AggregatedReturnFlow, Discharge], etc. |
|
||||
| VariableCV | NVarChar(250) | This is a high-level variable used for site-specific water data. The general categories available are for water withdrawal, consumptive use, and return flow: [SiteSpecificWithdrawal], [SiteSpecificConsumptiveUse], [SiteSpecificReturnFlow] |
|
||||
| AggregationStatisticCV | NVarChar(50) | The calculated statistic associated with the site-specific variable amount. Full list is here: http://vocabulary.odm2.org/aggregationstatistic/ |
|
||||
| AggregationInterval | Numeric(10, 1) | The interval associated with the aggregation unit. For example, if the data are provided in 15 minute intervals, the interval would be 4 and the aggregation unit would be hourly. | |||||
| AggregationIntervalUnitCV | NVarChar(50) | The aggregation unit (e.g., day ,month, year). |
|
||||
| ReportYearStartMonth | NVarChar(10) | The month of the beginning of the data provider's annual reporting period in MM-DD | |||||
| ReportYearTypeCV | NVarChar(10) | The annual reporting period for this datatype. Could be a "water year," "irrigation year," a calendar year, or other variant. |
|
||||
| AmountUnitCV | NVarChar(250) | Unit of the site-specific ariable amount |
|
||||
| MaximumAmountUnitCV | NVarChar(250) |
| Amount of the allocation maximum or cap |
|
(none)
| Name | Parent Table | Child Table | Parent Columns | Child Columns |
| fk_Variables_dim_AggregationStatistic | CVs.AggregationStatistic | Core.Variables_dim | Name | AggregationStatisticCV |
| fk_Variables_dim_ReportYearType | CVs.ReportYearType | Core.Variables_dim | Name | ReportYearTypeCV |
| fk_Variables_dim_Units | CVs.Units | Core.Variables_dim | Name | AmountUnitCV |
| fk_Variables_dim_Units_interval | CVs.Units | Core.Variables_dim | Name | AggregationIntervalUnitCV |
| fk_Variables_dim_Units_max | CVs.Units | Core.Variables_dim | Name | MaximumAmountUnitCV |
| fk_Variables_dim_Variable | CVs.Variable | Core.Variables_dim | Name | VariableCV |
| fk_Variables_dim_VariableSpecific | CVs.VariableSpecific | Core.Variables_dim | Name | VariableSpecificCV |
(none)
| Diagram Name |
| 1_WaterAllocations |
| 2_SiteSpecificAmounts |
| 3_AggregatedAmounts |


<mat-google-maps-autocomplete>
is an Angular UI component built on the top of the material input component that deals with the google maps
autocomplete API
<mat-google-maps-autocomplete
[appearance]="outline"
country="us"
type="address"
(onAddressSelected)="onAddressSelected($event)"
(onLocationSelected)="onLocationSelected($event)"></mat-google-maps-autocomplete>
This component can be used as standalone element
Each password strength component should be given a meaningful label via aria-label
or aria-labelledby
.


The initial value of `Symbol.asyncIterator` is the well known symbol @@asyncIterator ().
This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.


#include <SearchInterface.h>
Inheritance diagram for WFAPI::SearchInterface:
| WFAPI::SearchInterface::SearchInterface | ( | ) |
Constructor.
| virtual WFAPI::SearchInterface::~SearchInterface | ( | ) | [virtual] |
Destructor.
| void WFAPI::SearchInterface::addSearchListener | ( | SearchListener * | listener | ) |
To add a listener for searches.
| listener | The SearchListener to add. It may not be deleted until it is removed by calling removeSearchListener. |
| AsynchronousStatus WFAPI::SearchInterface::extendedSearch | ( | const WFString & | areaID, | |
| const WFString & | areaName, | |||
| wf_uint32 | heading | |||
| ) |
Use this function when a search result list of a category contains area matches.
| areaID | The id of the area to use for search. | |
| heading | The heading to search in. | |
| areaName | The name of the area to search in. |
| CategoryTreeInterfaceImpl* WFAPI::SearchInterface::getCategoryTreeImpl | ( | ) |
Internal function.
| SearchInterfaceImpl* WFAPI::SearchInterface::getImpl | ( | ) |
Internal function.
| OneSearchInterfaceImpl* WFAPI::SearchInterface::getOneSearchImpl | ( | ) |
Internal function.
| SynchronousStatus WFAPI::SearchInterface::getRootCategories | ( | CategoryTreeArray & | rootCategoryList | ) |
Get the root categories in the current category tree.
| rootCategoryList | The root categories in the category tree will be added to this list. |
| SynchronousStatus WFAPI::SearchInterface::getSearchCategories | ( | SearchCategoryArray & | searchCategoryArray | ) |
Get the list of search categories available for searching. The categories received by this function are the local categories that are stored in the parameter file.
| searchCategoryArray | The available search categories will be added to this list. |
| AsynchronousStatus WFAPI::SearchInterface::getSearchCategoriesByPosition | ( | const WGS84Coordinate & | position | ) |
Queries the Nav2API for an updated list of categories which are valid for the supplied position. Once Nav2 has obtained such a list, the SearchListener will be notified via searchCategoriesUpdated. After that the user can get the list by calling getSearchCategories.
| position | The position that the categories are valid for. |
| SynchronousStatus WFAPI::SearchInterface::getSearchDesc | ( | SearchDescArray & | searchDescList | ) |
Get the list of search categories (search headings e.g Places, Addresses etc) that where returned by the server for the search request that was made. The list will only contain the headings and information about the headings, to be exact: name, heading number, country id and image name.
| searchDescList | All SearchDesc found will be added to this list. |
| SynchronousStatus WFAPI::SearchInterface::getSearchHistory | ( | SearchHistoryArray & | searchHistoryList | ) |
Get the latest searches. Max number is 10 then the oldest search history item is replaced with the new search.
| searchHistoryList | List that will contain the latest searches when done. |
| SynchronousStatus WFAPI::SearchInterface::getSubCategoriesOf | ( | wf_int32 | categoryId, | |
| CategoryTreeArray & | subCategoryList | |||
| ) |
Get the list of subcategories for the selected category. The list of subcategories can be empty which means that the selected category did not have any subcategories (a leaf node).
| categoryId | The category id of the category you whish to retrieve the subcategories for. | |
| subCategoryList | The sub categories for the specified category will be added to this list. |
| SynchronousStatus WFAPI::SearchInterface::getTopRegions | ( | TopRegionArray & | topRegionList | ) |
Get the latest Top Regions.
| topRegionList | The current top regions will be added to this list. |
| AsynchronousStatus WFAPI::SearchInterface::oneSearch | ( | const OneSearchQuery & | searchQuery | ) |
Performs a OneSearch request to the server. The OneSearch request means that all search results will return in one list, not based on headings as the old search,
OneSearchQuery class for more information of which combinations a search query can have.
| searchQuery | The query contains the information that should be used when sending the search query to the server. For how to use this please see the OneSearchQuery documentation. |
| void WFAPI::SearchInterface::removeSearchListener | ( | SearchListener * | listener | ) |
| AsynchronousStatus WFAPI::SearchInterface::requestCategoryTree | ( | const WGS84Coordinate & | coord | ) |
This asynchronous function requests an update to the category tree using a coord. Once we get a reply from server for this request SearchListener::categoryTreeReceived will get called.
| coord | For what region to request a category tree. |
| AsynchronousStatus WFAPI::SearchInterface::requestNextSearchResults | ( | wf_uint32 | index, | |
| wf_uint32 | maxHits, | |||
| wf_uint32 | heading | |||
| ) |
Request more search results from a heading with index as start index.
| index | Start index of the first search result to get. | |
| maxHits | Max number of hits to receive. The server might respond with fewer results but never with more. | |
| heading | The heading id of the heading to request more hits from. |
| AsynchronousStatus WFAPI::SearchInterface::search | ( | const SearchQuery & | searchQuery | ) |
This asynchronous function initiates a search using the parameter.
| searchQuery | What to search for is in this. |
| AsynchronousStatus WFAPI::SearchInterface::searchDetails | ( | const SearchIDArray & | searchIDArray | ) |
This asynchronous function initiates retrieving details for the identifiers in the parameter.
| searchIDArray | . |


HTML & CSS Quiz
1
2
3
4
5
6
7
8
9
10
Question 1 Text
Option 1
Option 2
Option 3
Option 4
Next Question
Congrats. Your passed.
Your Score is 0.
Retake Test


Luke has an extensive background in hospitality and entertainment. After almost a decade in this industry, he has made the switch to Information Technology and Web Develpoment. Luke is currently attending UCI's Web Develpoment and computer coding Bootcamp and Google's IT support specialist program. Luke will be getting the COMPTIA A+ certifiaction in the near future.
What Luke OffersCan adapt to any project in a timely manner.
Will take initiative and ownership.
Works well in a team to achieve any goals that are set.
Forbes trained communication and customer service skills.


Video | Daniel Kaluuya Interview: Actor Talks Black Panther 2, The Oscars And Queen & Slim
Video | Daniel Kaluuya Interview: Actor Talks Black Panther 2, The Oscars And Queen & Slim
Listen to Daniel Kaluuya weigh in on the Marvel/Scorsese drama and more this clip from our ReelBlend podcast.


News (2011 | 2010 | 2009 | 2008 | 2007 | 2006 | 2005)
20 Oct 2012 - This will be my last post to this blog. Posts have gotten less and less frequent to the point where it is embarassing to even call it a blog. I will still be active online. You can always see what I've been up to (in picture form) at my flickr site. You can also find me on twitter or google+. I am a regular contributer at BioStar and my paper reviewing activities are documented on Publons. But, the best way to reach me is by email. I always keep that current on my contact page.
previous news (2011 | 2010 | 2009 | 2008 | 2007 | 2006 | 2005)


#include <qcustomplot.h>
|
| virtual QByteArray | generateLabelParameterHash () const |
| |
| virtual void | placeTickLabel (QCPPainter *painter, double position, int distanceToAxis, const QString &text, QSize *tickLabelsSize) |
| |
| virtual void | drawTickLabel (QCPPainter *painter, double x, double y, const TickLabelData &labelData) const |
| |
| virtual TickLabelData | getTickLabelData (const QFont &font, const QString &text) const |
| |
| virtual QPointF | getTickLabelDrawOffset (const TickLabelData &labelData) const |
| |
| virtual void | getMaxTickLabelSize (const QFont &font, const QString &text, QSize *tickLabelsSize) const |
| |
Definition at line 1321 of file qcustomplot.h.
| struct QCPAxisPainterPrivate::CachedLabel |
Definition at line 1362 of file qcustomplot.h.
| Class Members |
|
QPointF |
offset |
|
|
QPixmap |
pixmap |
|
| struct QCPAxisPainterPrivate::TickLabelData |
Definition at line 1367 of file qcustomplot.h.
| Class Members |
|
QRect |
baseBounds |
|
|
QFont |
baseFont |
|
|
QString |
basePart |
|
|
QRect |
expBounds |
|
|
QFont |
expFont |
|
|
QString |
expPart |
|
|
QRect |
rotatedTotalBounds |
|
|
QRect |
totalBounds |
|
| QCPAxisPainterPrivate::QCPAxisPainterPrivate |
( |
QCustomPlot * |
parentPlot | ) |
|
|
explicit |
| QCPAxisPainterPrivate::~QCPAxisPainterPrivate |
( |
| ) |
|
|
virtual |
| QRect QCPAxisPainterPrivate::axisSelectionBox |
( |
| ) |
const |
|
inline |
| void QCPAxisPainterPrivate::clearCache |
( |
| ) |
|
| void QCPAxisPainterPrivate::draw |
( |
QCPPainter * |
painter | ) |
|
|
virtual |
| QByteArray QCPAxisPainterPrivate::generateLabelParameterHash |
( |
| ) |
const |
|
protectedvirtual |
| void QCPAxisPainterPrivate::getMaxTickLabelSize |
( |
const QFont & |
font, |
|
|
const QString & |
text, |
|
|
QSize * |
tickLabelsSize |
|
) |
| const |
|
protectedvirtual |
| QPointF QCPAxisPainterPrivate::getTickLabelDrawOffset |
( |
const TickLabelData & |
labelData | ) |
const |
|
protectedvirtual |
| QRect QCPAxisPainterPrivate::labelSelectionBox |
( |
| ) |
const |
|
inline |
| void QCPAxisPainterPrivate::placeTickLabel |
( |
QCPPainter * |
painter, |
|
|
double |
position, |
|
|
int |
distanceToAxis, |
|
|
const QString & |
text, |
|
|
QSize * |
tickLabelsSize |
|
) |
| |
|
protectedvirtual |
| int QCPAxisPainterPrivate::size |
( |
| ) |
const |
|
virtual |
| QRect QCPAxisPainterPrivate::tickLabelsSelectionBox |
( |
| ) |
const |
|
inline |
| bool QCPAxisPainterPrivate::abbreviateDecimalPowers |
| QRect QCPAxisPainterPrivate::axisRect |
| QPen QCPAxisPainterPrivate::basePen |
| QString QCPAxisPainterPrivate::label |
| QColor QCPAxisPainterPrivate::labelColor |
| QFont QCPAxisPainterPrivate::labelFont |
| int QCPAxisPainterPrivate::labelPadding |
| QRect QCPAxisPainterPrivate::mAxisSelectionBox |
|
protected |
| QCache<QString, CachedLabel> QCPAxisPainterPrivate::mLabelCache |
|
protected |
| QByteArray QCPAxisPainterPrivate::mLabelParameterHash |
|
protected |
| QRect QCPAxisPainterPrivate::mLabelSelectionBox |
|
protected |
| QRect QCPAxisPainterPrivate::mTickLabelsSelectionBox |
|
protected |
| bool QCPAxisPainterPrivate::numberMultiplyCross |
| double QCPAxisPainterPrivate::offset |
| bool QCPAxisPainterPrivate::reversedEndings |
| bool QCPAxisPainterPrivate::substituteExponent |
| int QCPAxisPainterPrivate::subTickLengthIn |
| int QCPAxisPainterPrivate::subTickLengthOut |
| QPen QCPAxisPainterPrivate::subTickPen |
| QVector<double> QCPAxisPainterPrivate::subTickPositions |
| QColor QCPAxisPainterPrivate::tickLabelColor |
| QFont QCPAxisPainterPrivate::tickLabelFont |
| int QCPAxisPainterPrivate::tickLabelPadding |
| double QCPAxisPainterPrivate::tickLabelRotation |
| QVector<QString> QCPAxisPainterPrivate::tickLabels |
| int QCPAxisPainterPrivate::tickLengthIn |
| int QCPAxisPainterPrivate::tickLengthOut |
| QPen QCPAxisPainterPrivate::tickPen |
| QVector<double> QCPAxisPainterPrivate::tickPositions |
| QRect QCPAxisPainterPrivate::viewportRect |
The documentation for this class was generated from the following files:


The Beginning
8/3/15
Today we learned about version control and its benefits. What version control does is that it is a tool used to manage your files. It creates a backup file of your codes, a save point, so in the event you lost your codes or wanted to review the history if some of the codes, you are able to do so because of version control.
Another thing I learned today was about Git and Github.Git is a system that helps the developer save the contents of their files and keep a history log of the changes made to a file. Git works hand in hand with Github. Github is where the remote master file is located. When this master file is updated on Github, the developer is also able to receive a copy of the file.Github is a remote server and a interface for managing your Git projects. Github is great for storing your code because it allows the developer to collaborate with others more easily. Github is also like a management tool for coding files. It can show past work and display changes that have been made to files.


THE SICILIAN A film review by Bert S. F. Lo Copyright 1987 Bert S. F. Lo
The King of Bad-Movie Reviews returns with his fourth entry (following A PRAYER FOR THE DYING, SLAM DANCE and PRINCE OF DARKNESS).
I should have known to avoid THE SICILIAN since it was made by Michael Cimino of HEAVEN'S GATE and YEAR OF THE DRAGON fame. The story is about Salvatore Giuliano, an Italian bandit in the 1930s (?) who worked against the Church, the Mafia, and the ruling class to bring about land reform. The only familiar face I can name is Christopher Lambert of SUBWAY, HIGHLANDER, and GREYSTOKE: THE LEGEND OF TARZAN, LORD OF THE APES fame.
The two biggest problems with the movie are the disjointed story telling and the wooden acting of Christopher Lambert in the lead role. The events portrayed are very small (and uninteresting) and, even together, hardly serve to explain the motivations of the various characters. And Mr Lambert's line reading is so machine-like that the "hero" never comes across as a person. When Giuliano is killed off (no spoiler, the movie opens and closes with this scene), the only emotional reaction from the audience was the ecstatic realization that it was okay to go take a pee.
On top of this, the music is unbelievably overwrought and the beautiful landscaping is completely wasted.
Rating [ A - F ] : D
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Keystroke Count keeps all your keystroke data locally stored and NO data including your keystrokes is ever collected.
What is Keystroke Count?
Keystroke Count is an open-source, cross-platform, desktop app that you can use to get data for your keystrokes!
This is Keystroke Count
Keystroke Count preview video 👆
Keystroke Count Home Page 👆


About Me
An inclusive service experience for all your data operations need
I am an independent data scientist who is thrilled about exploring the new possibilities of data. Through my knowledge and experience, I have so far assisted various businesses in originating the best results from their data projects. Being a team player, I lead my projects' teams and collaborate with the internal staff to achieve the required outcomes. My list of areas of competence includes the following:
Data ANALYTICS
With the incorporation of machine learning, statistical visualization and econometrics, I offer structured data analytics services with complete customization per organizational needs.
DATA DRIVEN SOLUTIONS - ML/AI
With 7+ years of experience building data-driven solutions through Machine Learning and Artificial Intelligence, I have helped businesses design a user-centric service and product experience.
Web Development
I offer customized web development with complete HTML support targeting easy navigation and appealing UI/UX designs for your customers.
APP DEVELOPER
Take your business within everyone's reach through my tailor-made app development support for desktop, android and IOS.
My complete Tale!
The expertise I have gained today has been built throughout my journey. I have learned something from everywhere I have been while contributing something to them. .
Finished projects
Experience
Awards
Coffee Cups
Blog
Our Blog
Dive deeper into the world of data science and stay updated about what's happening in the global tech industry with our blogs!
26/11/23 MACHINE LEARNING
In-depth understanding of Neural Networks and its working
Neural networks can achieve arguably every task that the human brain can perform. This post is focused on understanding what are neural networks .....Read More
26/11/23 MACHINE LEARNING
Naïve Bayes Algorithm Detailed Explanation
The naïve Bayes algorithm is a popular machine learning algorithm used for text-based tasks. Naïve Bayes is a probabilistic classifier that returns the probability .....Read More
26/11/23 MACHINE LEARNING
Simple Linear Regression detailed Explanation
Linear regression is one of the simple and popular used machine learning algorithms which focus on finding the best straight-line fit between the dependent .....Read More
26/11/23 MACHINE LEARNING
Using an expected value for the designed Machine Learning solutions
Expected value can help you effectively sell your designed machine learning solutions to businesses. It summarizes the results from the developed machine learning .....Read More
26/11/23 MACHINE LEARNING
Explained interpretation of ROC Curve with an help of example
Explained how to interpret the results from the ROC curve with a real example which you can realte with. And how ROC curve helps in determining the AUC ROC .....Read More
MACHINE LEARNING 26/11/23
Angular CLI Cheat Sheet
T he Angular team has brought in a really handy tool to bootstrap the Angular application and also to add a new feature to the app. The tool is known as angular-cli. .....Read More
Experience
Get to know my professional journey better!
I started as a software intern at Tridz, then headed towards being a software engineer for MAQ Software [1.6 years], followed by ACS Solutions [5.7 years]. I finally decided to become an independent data scientist.
INNOVA SOLUTIONS
Lead Data Scientist ML/AI CoE
Working as a lead data scientist and helping scrum teams in developing project vision for projects in the domain of Face Recognition, AR/VR, Aspect Based Sentiment Analysis, Digital Avatars, Optimization Algorithms, and Image Generation.
IIIT-B AND LIVERPOOL JOHN MORES UNIVERSITY
Masters in Machine Learning and Artificial Intelligence
Got exposure to work on real time projects in area of Compyter Vision, Reinforcement Learning, Probabalistic Graphical Modelling, etc.
INNOVA SOLUTIONS
Data Scientist
In supply chain industry worked with business to introduce data driven culture in the company. Developed use cases such as price prediction, demand forecast, order quality tool, etc. to answer burning issues in business.
SRM UNIVERSITY
Complete the project "domik"
I have worked as a committee member and helped in organizing and to manage various events that were part of the Aarush - A National Level Techno Fest.
INNOVA SOLUTIONS
Software Engineer - Data Science
Upskilled my career path and made a transition from the Full Stack JavaScript Developer to Data Scientist. Worked with various Blog from Aerospace, Cyber Defence and Healthcare industry.
My skills and competitive
advantages in the
industry!
I believe in complete holistic development. Therefore, I have upskilled myself with
complete web and app development skills and built expertise in data science. As a
result, my portfolio includes a diverse approach towards development, design and
analysis which helps me bring inclusive service experience to the table for my clients.
Download Cv
Interest Skills
I have always been passionate about data and how it's changing how companies manage their core operations.Machine Learning
NLP
Computer Vision
Neural Networks
Developer Skills
I have worked on diverse developing languages and tools to garner my development portfolio.Language Skills
Communication is the key to every relationship, whether professional or personal.English
Hindi
How i Work
My Working Projects
My portfolio covers everything from exploring the data supply chain field to developing healthcare and cyber defence solutions. Let's look at my work portfolio to understand my expertise better.
-
Digiatal Supply Chain
01.I have helped organizations build a strong digital supply chain to understand their customers better and create a user-centric experience. This includes demand forecast, customer preference, sales, scheduling, logistics, etc., by analyzing the available information.
-
Aerospace Industry
02.Here, I helped organizations to build a strong security layer without compromising their core operations and eliminating the threat of fraudulent access or breach.
-
Heathcare Analytics
03.Helped in building a smooth operational system for EDI files parsing and sorting the patient information efficiently, along with building advanced tools for representing aggregated results for the database
-
Cyber Investigating and Defence
04.Developed an encrypted system for avoiding breaches and maintaining complete security, which helped avoid fraudulent cases.


West Lothian taekwon-do stars strike gold at the World Championships
Three members of Howden School of Taekwon-do in Livingston scooped top spot on the international stage.
by Callum Carson, https://www.dailyrecord.co.uk/authors/callum-carson/Three members of Howden School of Taekwon-do proved they could mix it with the best by scooping gold medals on the international stage.
Morgan McQuade, Blair Nelson and Callum Schooler, all from Livingston, were in fine form at the ITF Taekwon-do World Championships at Ravenscraig.
The event boasted more than 20 competing nations and over 600 competitors, with the Livi trio all taking home gold medals.
Morgan clinched two golds and a silver, which also saw her pick up the overall top competitor award for the 15-17 age category.
She progressed through several rounds to win her hard-earned silver medal in patterns before comprehensively winning the gold in sparring with a fine victory in the final.
Morgan scooped a second gold as she won the special technique discipline kicking a high target.
Blair matched his team-mate with a pair of gold medals while also adding a bronze to his tally, which saw him crowned overall top competitor in the 10-13 age category.
He clinched gold in the sparring division before sealing another gold for the special technique discipline hitting a high target.
He showed tremendous focus in the patterns to pick up a bronze medal to complete his remarkable tally.
Callum made sure it was a trio of golden success as he grabbed top spot in his sparring division.
David Lupton, 6th degree black belt instructor at Howden, said: “Our young champions have been training now for over seven years and have been supported by each other and their families.
“They have all shown great dedication and always give 100 per cent effort in training.
“Senior coach Andrew McQuade and I are immensely proud of the students and can see a bright future for them.
“Hopefully they will represent Scotland in major championships in the future.”
He added: “The club won five gold medals, one silver medal and one bronze medal in the first World Championships for the young students. It was a fantastic achievement.”


changeRxns Modifies the equations of reactions model a model structure rxns cell array with reaction ids equations cell array with equations eqnType double describing how the equation string should be interpreted 1 - The metabolites are matched to model.mets. New metabolites (if allowed) are added to "compartment" 2 - The metabolites are matched to model.metNames and all metabolites are assigned to "compartment". Any new metabolites that are added will be assigned IDs "m1", "m2"... If IDs on the same form are already used in the model then the numbering will start from the highest used integer+1 3 - The metabolites are written as "metNames[compNames]". Only compartments in model.compNames are allowed. Any new metabolites that are added will be assigned IDs "m1", "m2"... If IDs on the same form are already used in the model then the numbering will start from the highest used integer+1 compartment a string with the compartment the metabolites should be placed in when using eqnType=2. Must match model.compNames (opt when eqnType=1 or eqnType=3) allowNewMets true if the function is allowed to add new metabolites. It is highly recommended to first add any new metabolites with addMets rather than automatically through this function. addMets supports more annotation of metabolites, allows for the use of exchange metabolites, and using it reduces the risk of parsing errors (opt, default false) model an updated model structure NOTE: This function should be used with some care, since it doesn't care about bounds on the reactions. Changing a irreversible reaction to a reversible one (or the other way around) will only change the model.rev field and not the model.lb/model.ub fields. The reaction will therefore still be having the same reversibility because of the bounds. Use setParams to change the bounds. NOTE: When adding metabolites to a compartment where it previously doesn't exist, the function will copy any available information from the metabolite in another compartment. Usage: model=changeRxns(model,rxns,equations,eqnType,compartment,allowNewMets) Simonas Marcisauskas, 2016-11-01 - added support for rxnNotes, rxnReferences and confidenceScores
0001 function model=changeRxns(model,rxns,equations,eqnType,compartment,allowNewMets) 0002 % changeRxns 0003 % Modifies the equations of reactions 0004 % 0005 % model a model structure 0006 % rxns cell array with reaction ids 0007 % equations cell array with equations 0008 % eqnType double describing how the equation string should be 0009 % interpreted 0010 % 1 - The metabolites are matched to model.mets. New 0011 % metabolites (if allowed) are added to 0012 % "compartment" 0013 % 2 - The metabolites are matched to model.metNames and 0014 % all metabolites are assigned to "compartment". Any 0015 % new metabolites that are added will be assigned 0016 % IDs "m1", "m2"... If IDs on the same form are 0017 % already used in the model then the numbering will 0018 % start from the highest used integer+1 0019 % 3 - The metabolites are written as 0020 % "metNames[compNames]". Only compartments in 0021 % model.compNames are allowed. Any 0022 % new metabolites that are added will be assigned 0023 % IDs "m1", "m2"... If IDs on the same form are 0024 % already used in the model then the numbering will 0025 % start from the highest used integer+1 0026 % compartment a string with the compartment the metabolites should 0027 % be placed in when using eqnType=2. Must match 0028 % model.compNames (opt when eqnType=1 or eqnType=3) 0029 % allowNewMets true if the function is allowed to add new 0030 % metabolites. It is highly recommended to first add 0031 % any new metabolites with addMets rather than 0032 % automatically through this function. addMets supports 0033 % more annotation of metabolites, allows for the use of 0034 % exchange metabolites, and using it reduces the risk 0035 % of parsing errors (opt, default false) 0036 % 0037 % model an updated model structure 0038 % 0039 % NOTE: This function should be used with some care, since it doesn't 0040 % care about bounds on the reactions. Changing a irreversible reaction to 0041 % a reversible one (or the other way around) will only change the 0042 % model.rev field and not the model.lb/model.ub fields. The reaction will 0043 % therefore still be having the same reversibility because of the 0044 % bounds. Use setParams to change the bounds. 0045 % 0046 % NOTE: When adding metabolites to a compartment where it previously 0047 % doesn't exist, the function will copy any available information from 0048 % the metabolite in another compartment. 0049 % 0050 % Usage: model=changeRxns(model,rxns,equations,eqnType,compartment,allowNewMets) 0051 % 0052 % Simonas Marcisauskas, 2016-11-01 - added support for rxnNotes, 0053 % rxnReferences and confidenceScores 0054 % 0055 0056 if nargin<5 0057 compartment=[]; 0058 end 0059 if nargin<6 0060 allowNewMets=false; 0061 end 0062 0063 if ischar(rxns) 0064 rxns={rxns}; 0065 end 0066 if ischar(equations) 0067 equations={equations}; 0068 end 0069 0070 %Find the indexes of the reactions and throw an error if they aren't all 0071 %found 0072 [I J]=ismember(rxns,model.rxns); 0073 if ~all(I) 0074 EM='All reaction ids must exist in the model'; 0075 distEM(EM); 0076 end 0077 0078 %The reactions are changed in the following manner. First create a 0079 %rxns-structure by copying info from the model. Then remove the old 0080 %reactions. Then add the updated ones using addRxns. Lastly, the model is 0081 %reordered to match the original order. This is done like this to make use 0082 %of the advanced parsing of equations that addRxns use. 0083 rxnsToChange.rxns=rxns; 0084 rxnsToChange.equations=equations; 0085 if isfield(model,'rxnNames') 0086 rxnsToChange.rxnNames=model.rxnNames(J); 0087 end 0088 if isfield(model,'lb') 0089 rxnsToChange.lb=model.lb(J); 0090 end 0091 if isfield(model,'ub') 0092 rxnsToChange.ub=model.ub(J); 0093 end 0094 if isfield(model,'c') 0095 rxnsToChange.c=model.c(J); 0096 end 0097 if isfield(model,'eccodes') 0098 rxnsToChange.eccodes=model.eccodes(J); 0099 end 0100 if isfield(model,'subSystems') 0101 rxnsToChange.subSystems=model.subSystems(J); 0102 end 0103 if isfield(model,'rxnComps') 0104 rxnsToChange.rxnComps=model.rxnComps(J); 0105 end 0106 if isfield(model,'grRules') 0107 rxnsToChange.grRules=model.grRules(J); 0108 end 0109 if isfield(model,'rxnFrom') 0110 rxnsToChange.rxnFrom=model.rxnFrom(J); 0111 end 0112 if isfield(model,'rxnScores') 0113 rxnsToChange.rxnScores=model.rxnScores(J); 0114 end 0115 if isfield(model,'rxnMiriams') 0116 rxnsToChange.rxnMiriams=model.rxnMiriams(J); 0117 end 0118 if isfield(model,'rxnNotes') 0119 rxnsToChange.rxnNotes=model.rxnNotes(J); 0120 end 0121 if isfield(model,'rxnReferences') 0122 rxnsToChange.rxnReferences=model.rxnReferences(J); 0123 end 0124 if isfield(model,'confidenceScores') 0125 rxnsToChange.confidenceScores=model.confidenceScores(J); 0126 end 0127 0128 %Calculate the new order of reactions 0129 order=ones(numel(model.rxns),1); 0130 order(J)=0; 0131 order=cumsum(order); 0132 order(J)=order(end)+1:order(end)+numel(rxns); 0133 0134 %Remove the original reactions 0135 model=removeReactions(model,rxns); 0136 0137 model=addRxns(model,rxnsToChange,eqnType,compartment,allowNewMets); 0138 model=permuteModel(model,order,'rxns'); 0139 end


TALK RADIO A Review by Bernard Aboba Copyright (C) 1989, Bernard Aboba. All rights reserved.
TALK RADIO, which stars Eric Bogosian, is loosely constructed around the story of Denver talk show host Alan Berg, who was murdered by members of a Neo-Nazi group.
Like many radio talk shows themselves, the characters are a study in extremes. Bogosian's character, Barry Champlain is an abusive personality, on the air and in his personal life, and his show attracts a mixture of alienated, confused, and at times even criminal characters calling in. Champlain treats the large portion of them with a healthy dose of sarcastic abuse.
The basic premise is that the show is phenomenally popular, so much so that an offer is made to take the show national, while still having it broadcast from its Dallas/Ft. Worth location. The action takes place largely during several days prior to the national syndication in which the show is being evaluated.
The best way to describe the film is unrelenting. Bogosian only turns down the searing anger of the character during periods of remorse, but otherwise it is full speed ahead -- with only occasional treatment of callers and the situations they present with more than sarcasm or disdain.
In effect there's no way to win with Barry Champlain, as both his ex-wife Ellen and his new lover discover. However, neither Ellen, nor Champlain's new lover, are played with sufficient depth to give them much cinematic weight. This places the spotlight firmly on Bogosian, which gives the film its black and white cast. For example, while one might give Ellen the benefit of the doubt in marrying Champlain in the first place, for her to entertain thoughts of going back to him, and risk her new marriage for those, we need something more than the ditsy performance given us. Like the character Barry Champlain, this movie would have been somewhat better if the star had been willing to step back and let someone else on the stage for a while. Playing supporting actress to Bogosian in this role is a little like playing Bambi against Godzilla in "Bambi meets Godzilla," an underground cartoon with a thoroughly predictable ending. Unfortunately, TALK RADIO is somewhat too predictable as well.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Shop
Sell
Our story
Contact
Out of ideas?
We got you
Browse our wardrobe
Coming soon
Spring 2021
Join the waitlist


This demo uses features which are not supported in older browsers. If you are seeing this message after the page has loaded, your browser is not supported. Please try viewing in IE Edge 12+ or the latest version of Firefox, Chrome, or Opera.
Capped Line Demo