Emoncms bug and dev list November 2012
In October good progress was made on refactoring emoncms code along more modular lines. Several new modules were also created to extend emoncms functionality such as the raspberry pi module for communicating directly with the RFM12PI board.
Following on from octobers bug and dev list there are still several bugs and dev items still to do and no doubt some more bugs with the new version, here they are so far:
Bug list
Close X in blue twitter bootstrap type message box does nothing - the action is not yet coded.
strtotime() error on raspberry PI (Does not show up as an error anymore?)
http://openenergymonitor.org/emon/node/893
Add new dashboard "+" button does not function reliably across browsers - I though this was fixed but then it did not work in chrome on a mac
http://openenergymonitor.org/emon/node/945
There is no implementation of kwhd histogram zoomer in the visual dashboard editor
http://openenergymonitor.org/emon/node/1104
Dev list
Text based status indicators
http://openenergymonitor.org/emon/node/296#comment-2486
View html source option in dashboard editor
Reinstating a feature that existed before
Import vs Export
https://github.com/openenergymonitor/emoncms3/issues/44
Better implementation of multigraph visualisation builder
Allowing for multiple multigraphs and a nicer drop down menu feed selector could make the whole interface very compact and clean.
Name, edit, delete input node
So that its possible to tell what the node is at a glance and easier to delete un-needed inputs.
Quick vis view link on feeds - so that its easier to check what a feed is doing without having to go to vis
Algorithm for removing unneccessary datapoints to save space. Only store datapoints when there is a change.
Forward data from raspberry pi emoncms to remote emoncms in bulk uploads.
If you can help with any of these that would be great.
If you're interested in becoming an emoncms developer, you might want to start by looking at the application architecture page, note that these pages need a bit of updating to reflect the new directory structure: http://openenergymonitor.org/emon/node/312 and also the pages here: http://openenergymonitor.org/emon/emoncms/development-challenges.
Re: Emoncms bug and dev list NOVEMBER 2012
Is it possible when adding the node tabs that the node numbering counter started from zero instead of one ? It looks like my nodes are all shifted by one - e.g. in this picture you can see the node10_4 being inactive (vRMS) which now looks like the value is in node10_3. Dont recall having node10_0 at all in the past and all the feeds seems to be incorrect on the dashboards.
(edit - also on multigraph dashboard I get an error message: Notice: Undefined variable: write_apikey in /var/www/emoncms/Modules/vis/vis_controller.php on line 133)
Re: Emoncms bug and dev list NOVEMBER 2012
O dear!! I missed that, that will have created a big block of messed up data, im sorry about that. I've changed it back numbering now starts from 1. Also fixed the notice. Thanks a lot for finding those
Re: Emoncms bug and dev list NOVEMBER 2012
Thanks, now the dials and graphs work again
How is it with text type ? Looks like that text fields are not updating ?
Re: Emoncms bug and dev list NOVEMBER 2012
Looks like there is a need to reselect all feedvalue (text) feednames again after the latest update. Emoncms.org had lost it to which feed each feedvalue (text field) is linked to.
Re: Emoncms bug and dev list NOVEMBER 2012
Fixed a bug in the average input processor - it was creating the wrong feed type without the data2 column. If you have created a feed with an average input processor in the last few days the way to get it working again is to delete the old average feed and create another with the latest updated emoncms.
Re: Emoncms bug and dev list NOVEMBER 2012
public dashboard
When clicking the view publich dashboard, i get nothing only the black header line.
ex: http://<IP_ADDRESS>/sol/lars.juelsminde&id=20 (dashboard 20)
But the dashboard is working.
Re: Emoncms bug and dev list NOVEMBER 2012
Development wish1:
A user specific option to set the CSS theme from the emoncms. (or at least a database option to set by user ID). Useful for integration of emoncms dashboards within websites (like my website, that has a "brown" color background...not white like the default EmonCMS3 skin). Also on github issue tracker: https://github.com/openenergymonitor/emoncms3/issues/96
Development wish 2:
Make use of the github TAG command to make releases and good revision numbers. see topic: http://openenergymonitor.org/emon/node/1321
Re: Emoncms bug and dev list NOVEMBER 2012
Fixed bug blank public dashboard bug, I missed updating the default.settings.php file to point to the new public dashboard location which is:
// Public profile functionality
$public_profile_enabled = TRUE;
$public_profile_controller = "dashboard";
$public_profile_action = "view";
rather than
// Public profile functionality
$public_profile_enabled = TRUE;
$public_profile_controller = "dashboard";
$public_profile_action = "run";
To get this feature working again, easiest way is to open your settings.php file if you have already created one and edit $public_profile_action to be equal to "view"
Re: Emoncms bug and dev list NOVEMBER 2012
Hi
Just after login evening 16/11/2012 using Chrome I saw the following:-
Notice: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) in /var/www/emoncms/core.php on line 45
Regards
Ian
Re: Emoncms bug and dev list NOVEMBER 2012
After running emoncms on a Raspberry Pi for almost two weeks I see that there are getting on for 200,000 rows in the feed_n tables. Clearly it's going to run out of storage at some point. I've had a look at the code and can't find anything to prevent this. Is this correct? It seems to me that the data needs coalescing so that the older it is the longer the time between samples.
Re: Emoncms bug and dev list NOVEMBER 2012
A few more development items for the list:
Better implementation of multigraph visualisation builder
Allowing for multiple multigraphs and a nicer drop down menu feed selector could make the whole interface very compact and clean.
Name, edit, delete input node
So that its possible to tell what the node is at a glance and easier to delete un-needed inputs.
Quick vis view link on feeds - so that its easier to check what a feed is doing without having to go to vis
Algorithm for removing unnecessary datapoints to save space. Only store datapoints when there is a change.
Forward data from raspberry pi emoncms to remote emoncms in bulk uploads.
Re: Emoncms bug and dev list NOVEMBER 2012
Hello Stephen, yes your quite right about running out of space. I think the solution is an algorithm that removed datapoints when there is no change in the value, so only storing datapoints where the feed is changing. That way we should be able to store all the important detail but with many less redundant datapoints. Will try and have a look at this soon.
Re: Emoncms bug and dev list NOVEMBER 2012
Hello Ian, yes also noticed that error, seems to appear every now and then but then go away just as fast, not sure what the fix is yet, will have to look into it
Re: Emoncms bug and dev list NOVEMBER 2012
Couple of other things to add:
Apikey reference in input api helper, feed api helper and user account.
and
Clearer feed authentication:
I'd like to add a new authentication level, public feeds:
Public feeds - no authentication required accessible to everyone - these would be for use in public dashboards which also require no authentication.
Non public read only feeds - accessible via read apikey (but not public unless you share your read apikey publicly) useful for sharing with someone privately, ie sending a link via email to a trusted person.
write only feeds - accessible via write apikey, strictly a private apikey (not to be shared as this would give others write access to your account)
Re: Emoncms bug and dev list NOVEMBER 2012
Update:
Re: Emoncms bug and dev list NOVEMBER 2012
New commit:
If on visiting the vis page and trying to select a feed you notice that your feed is missing, its likely that its type has not been set. New feeds should have their type automatically selected but old ones may not be specified.
On the feeds page the feed type is now described rather than a number, and a select box is shown when edit feed is selected. There is also a helper note on the vis page.
Which should make it easier to select the datatype in the event that a feeds type is not set.
Re: Emoncms bug and dev list NOVEMBER 2012
New commits:
- Raspberry PI module: Moved remote server authentication check to raspberrypi/set action rather than when main config page is loaded every time to speed up loading of the config page and reduce number of requests to remote. Run admin -> db update after downloading latest commit.
- Refactoring of Input, feed and deleted feed list code, made a start on creating a javascript dynamic list constructing library, that could be used by any lists in the application.
Re: Emoncms bug and dev list NOVEMBER 2012
Wish: RFM2Pi sends out the current time, see http://openenergymonitor.org/emon/node/1348
Bug: Forward data to remote emonCMS. I have a Ubuntu server (<IP_ADDRESS>) virtual machine running on my server, installed emonCMS to it without any problem. It will act as the remote server.
Configured my Raspberry Pi with RFM2Pi (<IP_ADDRESS>) to send data to a remote emonCMS.
Domain name: <IP_ADDRESS>/emoncms
Write apikey: 3fa0314f47eafbb78526...
I get "Authentication successful" in emonCMS on the Rasp. Pi. Sadly the input page of the Ubuntu server running emonCMS stays empty. I'm sure that my "remote emonCMS" works and the API is right. I verified this by using this URL: http://<IP_ADDRESS>/emoncms/input/post?json={power:200}&apikey=3fa0314f47eafbb78526...
Bug: I installed the "event" module to get e-mail notifications when some value is to low or high. My e-mail address is configured in the account section. Tested it by raising the temperature, sadly, no e-mail. In the event screen the trigger works, gets green and true. But on the other hand, how does the Rasp. Pi server know my outgoing e-mail server? Should I not define this somewhere? So that's not a real bug I guess, probably a user-error.
But then, after the trigger is gone, it says: Last true: 1970-1-1 01:00:00. Even though my system time is correct and my timezone (Europe/Brussels) is defined in the raspi-config and in the php.ini file.
Re: Emoncms bug and dev list NOVEMBER 2012
Hello Philippe.
Thanks for the wish, that would certainly be a good thing to have.
I will test the remote server forwarder to a local server here and see if I can debug, not sure why that is not working.
Event module is in a very early stage of development, the email sending part is not actually built yet, thought I would put the code up there anyway just incase anyone else wants to help develop that module.
Trystan
Re: Emoncms bug and dev list NOVEMBER 2012
New commits:
- list.js the script that creates the input/ feed and deleted feed list now uses a single javascript object to describe the list.
- public/private feed implementation. By making a feed public you can make it possible for others to access the feed without an apikey, see comment on the 21st above.
Run admin->db update required to update database schema with a new field for feeds public state.
Re: Emoncms bug and dev list NOVEMBER 2012
Visualisations in the dashboard are implemented with an Iframe. When viewing emoncms running on a private network from the internet using Network Address Translation, the IP address in the iframe src tag contains the local IP address. As this isn't accessible from the internet the visualisation cannot display.
See discussion at http://openenergymonitor.org/emon/node/1479
Re: Emoncms bug and dev list NOVEMBER 2012
Wishes:
The number of digits after the decimal point should be adjustable for the dials. At the moment the dial only displays one digit after the decimal point when under 10kWh, over 10kWh there is no digit after the decimal point.
Emoncms should be able to run in a subdirectory. When I tried to install it in a subdirectory it doesn't work. When it's in /var/www/emoncms/ everything is ok, but when I try to install in /var/www/xyz/emoncms/ I get no inputs from RaspberryPI: see details here. Maybe it's no problem of Emoncms but ruther of the RaspberryPI module of Emoncms.
Re: Emoncms bug and dev list NOVEMBER 2012
Hi, I'm getting same issue "Authentication successful" but sadly not posting to remote site ether. Any luck getting it working or is it a bug.
Thanks Peter
Re: Emoncms bug and dev list NOVEMBER 2012
If you open minicom is there an output there? try exiting minicom without a reset, that seems to fix the issue of no data coming through sometimes.
Re: Emoncms bug and dev list NOVEMBER 2012
Hi Trystan,
I may have not been clear above, my problem isn't receiving data, I can see data from emontx on minicom ok and it sent ok to emoncms on raspberry pi - this has been working for two weeks now.
Problem is sending data to a remote url, just can't seem to get this working. I'm getting Authentication successfully but nothing received by remote url emoncms. Is there a working example or guide to setting this up, can it be as simple as input domain and apikey in raspberry pi dashboard.
Thanking you in advance.
Cheers
Peter
P.S. http://cms.wedo.ie/emoncms/time/local.json?apikey=202e3b8a8dc2236d3af59d...
gives me response t22,12,59 (time I presume)
Re: Emoncms bug and dev list NOVEMBER 2012
Hi,
Download latest emoncms, raspberry pi and completed Update & Check ok. Remote still will Authenticate Successful ok but no inputs received at far end. Am I missing something basic do I need sync installed at remote end or this end.
Anyone recommend a protocol analyzer for raspberry pi so I can trace what's happening?
Also I note that my own input naming have changed to Node10_1 then Node10_307 then Node10_308, see attached. This is due in some way to latest version of Raspberry Pi.
Thanks
Peter
Re: Emoncms bug and dev list NOVEMBER 2012
Are you using your write apikey?
Re: Emoncms bug and dev list NOVEMBER 2012
Yes definitely.
I take from your comment that it should be as simply add remote domain and ApiKey (write). I have latest emoncms and raspberry pi (also events and energy - assume they shouldn't have any impact on this feature). Sync module is not loaded.
I was thinking it may be a port setting as I have static IP address and I'm using NAT to forward port 80 to internal <IP_ADDRESS> which is my raspberry pi.
Thanks Peter
Re: Emoncms bug and dev list NOVEMBER 2012
Hmm, not sure if it will change anything, but I just fixed a couple of things in the raspberrypi module that where causing incorrect node input names. Yes it should be as simple as the domain and apikey
domain without the http:// bit so just emoncms.org or your domain. Are the inputs coming through to the local pi inputs page ok?
Re: Emoncms bug and dev list NOVEMBER 2012
Yes, inputs are received by rfm12b module (I can see them with minicom) and are forwarded to emoncms ( I will update emoncms and check node id's issue is resolved when I get home).
I used correct domain and ApiKey.
I will also try http://cms.wedo.ie/emoncms/time/local.json?apikey=202e3b8a8dc2236d3af59d... from raspberry pi to see if it works ( as stated above I've checked this from my laptop browser and it returns the time). This may help identify if its a routing issue on my network or not.
Thanks Peter
Re: Emoncms bug and dev list NOVEMBER 2012
Hi,
Just updated emoncms & Raspberry Pi modules. the input data discussed above Node10_2, Node10_3, Node10_4 is now back working, however I still have the spurious inputs coming in e.g. Node10_308, Node10_309, Node10_310 & more - all updating.
On update remote emoncms issue I tried link below from raspberry pi and it returns time, I assume this means my network is ok. http://cms.wedo.ie/emoncms/time/local.json?apikey=202e3b8a8dc2236d3af59d... returns time ok (t18,47,24)
At a loss, is there some code I could use directly in raspberry pi module to send to remote emoncms to at least test this part.
Thanks in advance
Peter
Re: Emoncms bug and dev list NOVEMBER 2012
Peter,
you can add some code simply copy the two lines below
after the
at the top of the raspberrypi_view.php page. then click on raspberrypi in your menu. you should see the time appear underneath the orange or green bar.
Re: Emoncms bug and dev list NOVEMBER 2012
Hi, Yep that works it gives " t21,44,15" over Raspberry Pi in Dashboard as one would expect. I assume this proves domain and apikey are correct. Also that raspberrpi pi module is running.
Could I be missing something really obvious, do I have to set some values to get it to work e.g. true???
Thanks Peter
Re: Emoncms bug and dev list NOVEMBER 2012
Just tested it on my rasppi and with the latest version the syncing from my Rasppi to emoncms.org it just works.
It isn't immediate as the script would appear to batch data and bulk send.
Have you tried sending the data to emoncms.org? If might allow us to narrow down where if the problem is on the pi or remoteserver.
Re: Emoncms bug and dev list NOVEMBER 2012
Hi, Created emoncms account as suggested and tried forwarding with no luck see attached screen shots of Raspberry Pi dashboard and emoncms.org dashboard.
I'm still getting some very strange input data see attached screen shot of raspberry pi input data, its like the inputs are been repeated with a delay could it be looping back to raspberry pi somehow.
Cheers Peter
P.S. I could try a fresh install with another SD card tomorrow to see it that works although I would like to find the root cause. Thanks for your help.
Re: Emoncms bug and dev list NOVEMBER 2012
Hi Peter, wipe out your API key, otherwise someone with bad intentions could 'ruin' your emonCMS data.
Re: Emoncms bug and dev list NOVEMBER 2012
I will be doing a fresh install on raspberry pi tonight, Thanks anyway Peter
Re: Emoncms bug and dev list NOVEMBER 2012
Hi, Tried new install on spare SD card and using emoncms.org as remote url. emoncms is up and working on localhost receiving input data ok from emontx. I then set remote domain and apikey key which authenticates successful however there are no data inputs received at remote url. I've tried suggestion above to include line in raspberrypi_view.php "echo hompeage" to test and this works ok as I received the time back. It would be great to be able to trace TCP traffic to see what's happening. Also its the same directly plugged into router which has static IP address and also using 3G dongle directly into raspberry pi (think this proves local network). I'm going to try fresh install again tonight. Cheers Peter
P.S. issue with spurious values for nodeid resolved with fresh install.
Re: Emoncms bug and dev list NOVEMBER 2012
Hi, I stand corrected, just checked before I tried new fresh install and it's working towards remote url "emoncms.org", maybe I didn't give it long enough not sure, I'll do some testing. Thanks a mil Peter
Re: Emoncms bug and dev list NOVEMBER 2012
Hi,
Getting closer to the issue.
From above send data to remote url is now working for emoncms.org following a fresh install.
Changed the destination of remote url from emoncms.org in Dashboard to my new site and although it authenticates successful it doesn't post any data to my site.
Checked emoncms database values for remote domain using phpmyadmin on raspberry pi and it shows the new domain name and correct apikey. Strange thing is that my raspberry pi is still posting the input data of raspberry pi to emoncms.org.
Thanks
Peter
Re: Emoncms bug and dev list NOVEMBER 2012
Hi, Completed a fresh install on emoncms on Raspberry PI with new mysql database. Set up to my private remote url and started receiving after 15-20 mins, its working for 8 hours now. Strange thing is I changed remote url to my emoncms.org account 7 hours ago. It seems that once remote url is set first time it remembers this one only, looks like an update to new remote isn't working for me.
Thanks
Peter
Re: Emoncms bug and dev list NOVEMBER 2012
Hi, Further testing indicates that in my case there is a time delay of between 15 mins and one hour till new remote url becomes active. In that time it is still posting to original remote url.
Thanks
Peter


Fly a Icon A5 out of La Tuque airport, and supply chalets located on various lakes around La Tuque.
You will have to land on these small lakes, then return and land back at La Tuque.
Fly a Icon A5 out of La Tuque airport, and supply chalets located on various lakes around La Tuque.
You will have to land on these small lakes, then return and land back at La Tuque.


Toggle navigation
Menu
Welcome to Meetup Stream Engine
Know Events Around You
Unexpected Friendship Are The Best Ones!
Live Fun Events
Locate the Events


--- layout: page title: Pet Sitters permalink: /petsitters/ ---
A Home Away from Home for Your Greyhound, located in Leander.
Michele Truhlik, proprietor has been a GALT-Central Texas member for twenty years.
Specializing in overnight stays in your home.
Sara Young, proprietor
A Greyhound only B&B in Round Rock.
Follow our adventures on Facebook @GreytGreys
and Instagram @Greyt_Greys
Nicolette Anastasiou, proprietor


Please guess a number...
Please guess a number between #{game.smallRange} and #{game.maxRange}. Your remaining guesses : #{game.remainder}.
Your guessed number:


To see more information, click on the picture of the animal that you would like to learn more about.
Straw augers beef kettle our crickets. Petting zoo at carrots alligators quack. Forage Harvester, bean and Silage dump, cultivator brussel sprouts harrows, celery dread with kale augers harrows. Combine Harvester swather, baler as haybine parsley, melon in hay rake. Baa potato donkey mouse, at gate grain bins woof. Oranges cucumbers rhubarb gourds watermelon. House hen chinchilla.
Rose garden sage, in pitch fork sunflower cowpies mice. Hoot squeal moose quack, crows doggies frogs crickets chirp. Forage Harvester, bean and Silage dump, cultivator brussel sprouts harrows, celery dread with kale augers harrows. Kidney beans ostrich trucks. Mooo cat daisys, grunt in turkey coo, windmill at bull.  Cauliflower a seeds quail. Veterinarian at Seeder eggs with watermelon ostriches. Bulls a.
In barn livestock cat hogs chicks trucks. Oranges cucumbers rhubarb gourds watermelon. Onion organic oranges and purr ducks canning owls at a squeal. Shovels at rakes plows. House hen chinchillas in barn livestock cat hogs chicks trucks. Gate wind, moonshine horses meow irrigation . With feed troughs cheep, or cabbage with pumpkin trees chicken. Haybine carrots soybeans, owls duck raising or, cheep in plows. Cauliflower a seeds quail. Brussel sprouts cow.


{% extends 'base.html' %} {% block content %}
Hello {{ username }}
Browse by the following categories:


Anne Bozackaboutresearch projects contact |
Anne Bozack is a postdoctoral fellow in the Cardenas lab in the Division of Environmental Health Sciences in the University of California, Berkeley School of Public Health. Her research focuses on the impact of environmental exposures on the molecular level and effects of nutrition. Her current projects investigate the associations between chronic exposure to metals and DNA methylation. Anne holds a Ph.D. in Environmental Health Sciences and M.P.H. in Sociomedical Sciences from Columbia University, and B.A. degrees in Environmental Science and Architecture from the University of California, Berkeley. |
|
Github | Google Scholar | LinkedIn | PubMed | OSF |


Clinical depression goes by many names, such as “the blues,” biological depression, and major depression. But all of these names refer to the same thing: feeling sad and depressed for weeks or months on end — not just a passing blue mood of a day or two. This feeling is most often accompanied by a sense of hopelessness, a lack of energy (or feeling “weighed down”), and taking little or no pleasure in things that once gave a person joy in the past.
Depression symptoms take many forms, and no two people’s experiences are exactly alike. A person who’s suffering from this disorder may not seem sad to others. They may instead complain about how they just “can’t get moving,” or are feeling completely unmotivated to do just about anything. Even simple things — like getting dressed in the morning or eating at mealtime — become large obstacles in daily life. People around them, such as their friends and family, notice the change too. Often they want to help, but just don’t know how.
Clinical depression is different from normal sadness — like when you lose a loved one — as it usually completely consumes a person in their day-to-day living. It doesn’t stop after just a day or two — it will continue for weeks on end, interfering with the person’s work or school, their relationships with others, and their ability to just enjoy life and have fun. Some people feel as if a huge hole of emptiness has opened inside when experiencing the hopelessness associated with this condition. In any given year, 7 percent of Americans will be diagnosed with this condition; women are 2 to 3 times more likely to be diagnosed than men (American Psychiatric Association).
The symptoms of depression include the majority of the following signs, experienced more days than not over the course of two or more weeks: a persistent feeling of loneliness or sadness; lack of energy; feelings of hopelessness; difficulties with sleeping; difficulties with eating; difficulties with concentration or attention; total loss of interest in enjoyable activities or socializing; feelings of guilt and worthlessness; and/or thoughts of death or suicide. Most people who are feeling depressed don’t experience every symptom, and the presentation of symptoms varies in degree and intensity from person to person.


Online Fury as UK Trade Union Claims Anyone Can 'Self-Identify' as Black or LGBT
While some netizens criticised the union’s statement, others joked about how the principles espoused by the University and College Union might be utilised.
The British University and College Union has managed to stir up quite a ruckus online by announcing its stance on racial and gender identification.
According to Metro, the union, which represents some 120,000 academics, made the statement after weathering a backlash over “the labelling of transgender people.”
“UCU has a long history of enabling members to self-identify whether that is being black, disabled, LGBT+ or women”, the union said. “UCU also supports a social, rather than a medical, model of gender recognition that will help challenge repressive gender stereotypes in the workplace and in society.”
UCU’s stance elicited a wave of criticism, with Sussex University philosophy professor Kathleen Stock describing it as “nonsensical, anti-intellectual propaganda.”
Many social media users also did not seem particularly thrilled by the union’s statement, though some of them looked amused by it.
And a number of people joked about how the principles espoused by UCU might be utilized.


[gecode-users] Pruning filtered branchers.
Duane Leslie
parakleta at darkreality.org
Thu Nov 7 05:12:06 CET 2013
I'm not sure if this is a feature or a bug, but I have a problem where I am using the first brancher to implement iterative deepening with RBS.
I use a heuristic with the first brancher disable via the filter function to determine a 'reasonably good' solution to use for BAB pruning, and then once the bound has been determined I switch the brancher on to activate IDA.
I have found that if the filter function returns false the first time it is called it is never called again, so I have had to implement an initial harmless dummy action so that it looks like it has work to do. I am assuming this is an optimisation that is pruning away the brancher because it assumes it will never have work to do if it has none initially, but is this the desired behaviour and if so is there a better way to get around it than having a dummy action?
Regards,
Duane.
More information about the users
mailing list


The <tc:in/>
tag create a classic input field.
In most cases, a label should be placed in front of every input field. Use the attribute
label
.
The following input field should be selected after reloading the page. Use the focus
attribute.
An input field can be set as required with the required
attribute.
Such an input field must contain a value, otherwise a submit is not possible.
Leave the field blank and press 'submit' to see the error message.
A help text can be added with the help
attribute.
To create an input field for passwords, set the
password
attribute to 'true'. It will hide the text as shown in the following example.
A placeholder
attribute can be used for explaining a user the meaning of a field.
The text of the placeholder is only shown if the value is an empty string.
There are some markups available for input fields.
The autocomplete
attribute can be used for explaining a user the meaning of a field.
The output field in this example, displays the given value on the server.
With <f:ajax event="input" render="outputAjax" listener="\#{inController.update}"/>
,
the output field will be rerendered, after the value has been changed.
Additional, the listener
attribute is set. The given method is called after the input field
loose focus.


This tutorial presents two sample applications demonstrating the use of the Java GSS-API for secure exchanges of messages between communicating applications, in this case a client application and a server application.
Java GSS-API uses what is called a "security mechanism" to provide these services. The GSS-API implementation contains support for the Kerberos V5 mechanism in addition to any other vendor-specific choices. The Kerberos V5 mechanism is used for this tutorial.
In order to perform authentication between the client and server and to establish cryptographic keys for secure communication, a GSS-API mechanism needs access to certain credentials for the local entity on each side of the connection. In our case, the credential used on the client side consists of a Kerberos ticket, and on the server side, it consists of a long-term Kerberos secret key. Kerberos tickets can optionally include the host address and IPv4 and IPv6 host addresses are both supported. Java GSS-API requires that the mechanism obtain these credentials from the Subject associated with the thread's access control context.
To populate a Subject with such credentials, client and server applications typically will first perform JAAS authentication using a Kerberos module. The JAAS Authentication tutorial demonstrates how to do this. The JAAS Authorization tutorial then demonstrates how to associate the authenticated Subject with the thread's access control context. A utility has also been written as a convenience to automatically perform those operations on your behalf. The Use of JAAS Login Utility tutorial demonstrates how to use the Login utility.
For this tutorial, we will not have the client and server
perform JAAS authentication, nor will we have them use the Login
utility. Instead, we will rely on setting the system property
javax.security.auth.useSubjectCredsOnly
to
false
, which allows us to relax the restriction of
requiring a GSS mechanism to obtain necessary credentials from an
existing Subject, set up by JAAS. See
The useSubjectCredsOnly System Property.
Note: This is a simplified introductory tutorial. For example, we do not include any policy files or run the sample code using a security manager. In real life, code using Java GSS-API should be run with a security manager, so that security-sensitive operations would not be allowed unless the required permissions were explicitly granted.
There is another tutorial, Use of JAAS Login Utility and Java GSS-API for Secure Message Exchanges, that is just like the tutorial you are reading except that it utilizes the Login utility, policy files, and a more complex login configuration file (A login configuration file, required whenever JAAS authentication is done, specifies the desired authentication module).
As with all tutorials in this series, the underlying technology used to support authentication and secure communication for the applications in this tutorial is Kerberos V5. See Kerberos Requirements.
If you want to first see the tutorial code in action, you can skip directly to Running the SampleClient and SampleServer Programs and then go back to the other sections to learn more.
The applications for this tutorial are named SampleClient and SampleServer.
Here is a summary of execution of the SampleClient and SampleServer applications:
The actual code and further details are presented in the following sections.
The entire code for both the SampleClient and SampleServer programs resides in their
main
methods and can be broken down into the following
subparts:
Note: The Java GSS-API classes utilized by these programs
(GSSManager, GSSContext, GSSName, GSSCredential, MessageProp, and
Oid) are found in the org.ietf.jgss
package.
The first thing both our client and server main
methods do is read the command-line arguments.
SampleClient expects three arguments:
Here is the code for reading the command-line arguments:
if (args.length < 3) { System.out.println("Usage: java <options> Login SampleClient " + " <servicePrincipal> <hostName> <port>"); System.exit(-1); } String server = args[0]; String hostName = args[1]; int port = Integer.parseInt(args[2]);
SampleServer expects just one argument:
Here is the code for reading the command-line argument:
if (args.length != 1) { System.out.println( "Usage: java <options> Login SampleServer <localPort>"); System.exit(-1); } int localPort = Integer.parseInt(args[0]);
Java GSS-API provides methods for creating and interpreting tokens (opaque byte data). The tokens contain messages to be securely exchanged between two peers, but the method of actual token transfer is up to the peers. For our SampleClient and SampleServer applications, we establish a socket connection between the client and server and exchange data using the socket input and output streams.
SampleClient was passed as arguments the name of the host machine SampleServer is running on, as well as the port number on which SampleServer will be listening for connections, so SampleClient has all it needs to establish a socket connection with SampleServer. It uses the following code to set up the connection and initialize a DataInputStream and a DataOutputStream for future data exchanges:
Socket socket = new Socket(hostName, port); DataInputStream inStream = new DataInputStream(socket.getInputStream()); DataOutputStream outStream = new DataOutputStream(socket.getOutputStream()); System.out.println("Connected to server " + socket.getInetAddress());
The SampleServer application was passed as an argument the port number to be used for listening for connections from clients. It creates a ServerSocket for listening on that port:
ServerSocket ss = new ServerSocket(localPort);
The ServerSocket can then wait for and accept a connection from a client, and then initialize a DataInputStream and a DataOutputStream for future data exchanges with the client :
Socket socket = ss.accept(); DataInputStream inStream = new DataInputStream(socket.getInputStream()); DataOutputStream outStream = new DataOutputStream(socket.getOutputStream()); System.out.println("Got connection from client " + socket.getInetAddress());
The accept
method waits until a client (in our
case, SampleClient) requests a connection on the host and port of
the SampleServer, which SampleClient does via
Socket socket = new Socket(hostName, port);
When the connection is requested and established, the
accept
method returns a new Socket object bound to a
new port. The server can communicate with the client over this new
socket and continue to listen for other client connection requests
on the ServerSocket bound to the original port. Thus, a server
program typically has a loop which can handle multiple connection
requests.
The basic loop structure for our SampleServer is the following:
while (true) { Socket socket = ss.accept(); <Establish input and output streams for the connection>; <Establish a context with the client>; <Exchange messages with the client>; <Clean up>; }
Client connections are queued at the original port, so with this program structure used by SampleServer, the interaction with the first client making a connection has to complete before the next connection can be accepted. The server could actually service multiple clients simultaneously through the use of threads - one thread per client connection, as in
while (true) { <accept a connection>; <create a thread to handle the client>; }
Before two applications can use Java GSS-API to securely exchange messages between them, they must establish a joint security context using their credentials. (Note: In the case of SampleClient, the credentials were established when the Login utility authenticated the user on whose behalf the SampleClient was run, and similarly for SampleServer.) The security context encapsulates shared state information that might include, for example, cryptographic keys. One use of such keys might be to encrypt messages to be exchanged, if encryption is requested.
As part of the security context establishment, the context initiator (in our case, SampleClient) is authenticated to the acceptor (SampleServer), and may require that the acceptor also be authenticated back to the initiator, in which case we say that "mutual authentication" took place.
Both applications create and use a GSSContext object to establish and maintain the shared information that makes up the security context.
The instantiation of the context object is done differently by
the context initiator and the context acceptor. After the initiator
instantiates a GSSContext, it may choose to set various context
options that will determine the characteristics of the desired
security context, for example, specifying whether or not mutual
authentication should take place. After all the desired
characteristics have been set, the initiator calls the
initSecContext
method, which produces a token required
by the acceptor's acceptSecContext
method.
While Java GSS-API methods exist for preparing tokens to be
exchanged between applications, it is the responsibility of the
applications to actually transfer the tokens between them. So
after the initiator has received a token from its call to
initSecContext
, it sends that token to the acceptor.
The acceptor calls acceptSecContext
, passing it the
token. The acceptSecContext
method may in turn return
a token. If it does, the acceptor should send that token to the
initiator, which should then call initSecContext
again
and pass it this token. Each time initSecContext
or
acceptSecContext
returns a token, the application that
called the method should send the token to its peer and that peer
should pass the token to its appropriate method
(acceptSecContext
or initSecContext
).
This continues until the context is fully established (which is the
case when the context's isEstablished
method returns
true
).
The context establishment code for our sample applications is described in the following:
In our client/server scenario, SampleClient is the context initiator. Here are the basic steps it takes to establish a security context. It
initSecContext
,
sending any returned token to SampleServer, and receiving a token
(if any) from SampleServer.A GSSContext is created by instantiating a
GSSManager and then calling one of its
createContext
methods. The GSSManager class serves as
a factory for other important GSS API classes. It can create
instances of classes implementing the GSSContext, GSSCredential,
and GSSName interfaces.
SampleClient obtains an instance of the default GSSManager
subclass by calling the GSSManager static method
getInstance
:
GSSManager manager = GSSManager.getInstance();
The default GSSManager subclass is one whose
create*
methods (createContext
, etc.)
return classes whose implementations support Kerberos as the
underlying technology.
The GSSManager factory method for creating a context on the initiator's side has the following signature:
GSSContext createContext(GSSName peer, Oid mech, GSSCredential myCred, int lifetime);
The arguments are described below, followed by the complete call
to createContext
.
GSSName peer
ArgumentThe peer in our client/server paradigm is the server. For the
peer
argument, we need a GSSName for the
service principal representing the server. (See Kerberos User and Service Principal Names.) A
String for the service principal name is passed as the first
argument to SampleClient, which places the argument into its local
String variable named server
. The GSSManager
manager
is used to instantiate a GSSName by calling
one of its createName
methods. SampleClient calls the
createName
method with the following signature:
GSSName createName(String nameStr, Oid nameType);
SampleClient passes the server
String for the
nameStr
argument.
The second argument is an Oid. An Oid represents a
Universal Object Identifier. Oids are hierarchically
globally-interpretable identifiers used within the GSS-API
framework to identify mechanisms and name types. The structure and
encoding of Oids is defined in the ISOIEC-8824 and ISOIEC-8825
standards. The Oid passed to the createName
method is
specifically a name type Oid (not a mechanism Oid).
In GSS-API, string names are often mapped from a
mechanism-independent format into a mechanism-specific format.
Usually, an Oid specifies what name format the string is in so that
the mechanism knows how to do this mapping. Passing in a
null
Oid indicates that the name is already in a
native format that the mechanism uses. This is the case for the
server
String; it is in the appropriate format for a
Kerberos Version 5 name. Thus, SampleClient passes a
null
for the Oid. Here is the call:
GSSName serverName = manager.createName(server, null);
Oid mech
ArgumentThe second argument to the GSSManager createContext
method is an Oid representing the mechanism to be used for the
authentication between the client and the server during context
establishment and for subsequent secure communication between
them.
Our tutorial will use Kerberos V5 as the security mechanism. The Oid for the Kerberos V5 mechanism is defined in RFC 1964 as "1.2.840.1135<IP_ADDRESS>" so we create such an Oid:
Oid krb5Oid = new Oid("1.2.840.1135<IP_ADDRESS>");
SampleClient passes krb5Oid
as the second argument
to createContext
.
GSSCredential myCred
ArgumentThe third argument to the GSSManager createContext
method is a GSSCredential representing the caller's
credentials. If you pass null
for this argument, as
SampleClient does, the default credentials are used.
int lifetime
ArgumentThe final argument to the GSSManager createContext
method is an int
specifying the desired lifetime, in
seconds, for the context that is created. SampleClient passes
GSSContext.DEFAULT_LIFETIME
to request a default
lifetime.
Now that we have all the required arguments, here is the call SampleClient makes to create a GSSContext:
GSSContext context = manager.createContext(serverName, krb5Oid, null, GSSContext.DEFAULT_LIFETIME);
After instantiating a context, and prior to actually
establishing the context with the context acceptor, the context
initiator may choose to set various options that determine the
desired security context characteristics. Each such option is set
by calling a request
method on the instantiated
context. Most request
methods take a
boolean
argument for indicating whether or not the
feature is requested. It is not always possible for a request to be
satisfied, so whether or not it was can be determined after context
establishment by calling one of the get
methods.
SampleClient requests the following:
wrap
. Encryption is actually used only if
the MessageProp object passed to the wrap
method
requests privacy.wrap
and getMIC
methods. When integrity
is requested, a cryptographic tag known as a Message Integrity Code
(MIC) will be generated when calling those methods. When
getMIC
is called, the generated MIC appears in the
returned token. When wrap
is called, the MIC is
packaged together with the message (the original message or the
result of encrypting the message, depending on whether
confidentiality was applied) all as part of one token. You can
subsequently verify the MIC against the message to ensure that the
message has not been modified in transit.The SampleClient code for making these requests on the
GSSException context
is the following:
context.requestMutualAuth(true); // Mutual authentication context.requestConf(true); // Will use encryption later context.requestInteg(true); // Will use integrity later
Note: When using the default GSSManager implementation and the Kerberos mechanism, these requests will always be granted.
After SampleClient has instantiated a GSSContext and specified the desired context options, it can actually establish the security context with SampleServer. To do so, SampleClient has a loop. Each loop iteration
initSecContext
method. If this
is the first call, the method is passed a null
token.
Otherwise, it is passed the token most recently sent to
SampleClient by SampleServer (a token generated by a SampleServer
call to acceptSecContext
).initSecContext
(if
any) to SampleServer. The first call to initSecContext
always produces a token. The last call might not return a
token.The tokens returned by initSecContext
or received
from SampleServer are placed in a byte array. Tokens should be
treated by SampleClient and SampleServer as opaque data to be
passed between them and interpreted by Java GSS-API methods.
The initSecContext
arguments are a byte array
containing a token, the starting offset into that array of where
the token begins, and the token length. For the first call,
SampleClient passes a null token, since no token has yet been
received from SampleServer.
To exchange tokens with SampleServer, SampleClient uses the
DataInputStream inStream
and DataOutputStream
outStream
it previously set up using the input and
output streams for the socket connection made with SampleServer.
Note that whenever a token is written, the number of bytes in the
token is written first, followed by the token itself. The reasons
are discussed in the introduction to the The SampleClient and SampleServer Message
Exchanges section.
Here is the SampleClient context establishment loop, followed by code displaying information about who the client and server are and whether or not mutual authentication actually took place:
byte[] token = new byte[0]; while (!context.isEstablished()) { // token is ignored on the first call token = context.initSecContext(token, 0, token.length); // Send a token to the server if one was generated by // initSecContext if (token != null) { System.out.println("Will send token of size " + token.length + " from initSecContext."); outStream.writeInt(token.length); outStream.write(token); outStream.flush(); } // If the client is done with context establishment // then there will be no more tokens to read in this loop if (!context.isEstablished()) { token = new byte[inStream.readInt()]; System.out.println("Will read input token of size " + token.length + " for processing by initSecContext"); inStream.readFully(token); } } System.out.println("Context Established! "); System.out.println("Client is " + context.getSrcName()); System.out.println("Server is " + context.getTargName()); if (context.getMutualAuthState()) System.out.println("Mutual authentication took place!");
In our client/server scenario, SampleServer is the context acceptor. Here are the basic steps it takes to establish a security context. It
acceptSecContext
and passing it the token, and
sending any returned token to SampleClient.As described in SampleClient GSSContext
Instantiation, a GSSContext is created by instantiating a
GSSManager and then calling one of its createContext
methods.
Like SampleClient, SampleServer obtains an instance of the
default GSSManager subclass by calling the GSSManager static method
getInstance
:
GSSManager manager = GSSManager.getInstance();
The GSSManager factory method for creating a context on the acceptor's side has the following signature:
GSSContext createContext(GSSCredential myCred);
If you pass null
for the GSSCredential argument, as
SampleServer does, the default credentials are used. The context is
instantiated via the following:
GSSContext context = manager.createContext((GSSCredential)null);
After SampleServer has instantiated a GSSContext, it can establish the security context with SampleClient. To do so, SampleServer has a loop that continues until the context is established. Each loop iteration does the following:
initSecContext
call.acceptSecContext
method,
passing it the token just received.acceptSecContext
returns a token, then
SampleServer sends this token to SampleClient and then starts the
next loop iteration if the context is not yet established.The tokens returned by acceptSecContext
or received
from SampleClient are placed in a byte array.
The acceptSecContext
arguments are a byte array
containing a token, the starting offset into that array of where
the token begins, and the token length.
To exchange tokens with SampleClient, SampleServer uses the
DataInputStream inStream
and DataOutputStream
outStream
it previously set up using the input and
output streams for the socket connection made with
SampleClient.
Here is the SampleServer context establishment loop:
byte[] token = null; while (!context.isEstablished()) { token = new byte[inStream.readInt()]; System.out.println("Will read input token of size " + token.length + " for processing by acceptSecContext"); inStream.readFully(token); token = context.acceptSecContext(token, 0, token.length); // Send a token to the peer if one was generated by // acceptSecContext if (token != null) { System.out.println("Will send token of size " + token.length + " from acceptSecContext."); outStream.writeInt(token.length); outStream.write(token); outStream.flush(); } } System.out.print("Context Established! "); System.out.println("Client is " + context.getSrcName()); System.out.println("Server is " + context.getTargName()); if (context.getMutualAuthState()) System.out.println("Mutual authentication took place!");
Once a security context has been established between SampleClient and SampleServer, they can use the context to securely exchange messages.
Two types of methods exist for preparing messages for secure
exchange: wrap
and getMIC
. There are
actually two wrap
methods (and two getMIC
methods), where the differences between the two are the indication
of where the input message is (a byte array or an input stream) and
where the output should go (to a byte array return value or to an
output stream).
These methods for preparing messages for exchange, and the corresponding methods for interpretation by the peer of the resulting tokens, are described below.
The wrap
method is the primary method for message
exchanges.
The signature for the wrap
method called by
SampleClient is the following:
byte[] wrap (byte[] inBuf, int offset, interface len, MessageProp msgProp)
You pass wrap
a message (in inBuf
),
the offset into inBuf
where the message begins
(offset
), and the length of the message
(len
). You also pass a MessageProp, which is used to
indicate the desired QOP (Quality-of-Protection) and to specify
whether or not privacy (encryption) is desired. A QOP value selects
the cryptographic integrity and encryption (if requested)
algorithm(s) to be used. The algorithms corresponding to various
QOP values are specified by the provider of the underlying
mechanism. For example, the values for Kerberos V5 are defined in
RFC 1964 in
section 4.2. It is common to specify 0 as the QOP value to request
the default QOP.
The wrap
method returns a token containing the
message and a cryptographic Message Integrity Code (MIC) over it.
The message placed in the token will be encrypted if the
MessageProp indicates privacy is desired. You do not need to know
the format of the returned token; it should be treated as opaque
data. You send the returned token to your peer application, which
calls the unwrap
method to "unwrap" the token to get
the original message and to verify its integrity.
If you simply want to get a token containing a cryptographic
Message Integrity Code (MIC) for a supplied message, you call
getMIC
. A sample reason you might want to do this is
to confirm with your peer that you both have the same data, by just
transporting a MIC for that data without incurring the cost of
transporting the data itself to each other.
The signature for the getMIC
method called by
SampleServer is the following:
byte[] getMIC (byte[] inMsg, int offset, int len, MessageProp msgProp)
You pass getMIC
a message (in inMsg
),
the offset into inMsg
where the message begins
(offset
), and the length of the message
(len
). You also pass a MessageProp, which is
used to indicate the desired QOP (Quality-of-Protection). It is
common to specify 0 as the QOP value to request the default
QOP.
If you have a token created by getMIC
and the
message used to calculate the MIC (or a message purported to be the
message on which the MIC was calculated), you can call the
verifyMIC
method to verify the MIC for the message. If
the verification is successful (that is, if a GSSException is not
thrown), it proves that the message is exactly the same as it was
when the MIC was calculated. A peer receiving a message from an
application typically expects a MIC as well, so that they can
verify the MIC and be assured the message has not been modified or
corrupted in transit. Note: If you know ahead of time that you will
want the MIC as well as the message then it is more convenient to
use the wrap
and unwrap
methods. But
there could be situations where the message and the MIC are
received separately.
The signature for the verifyMIC
corresponding to
the getMIC
shown above is
void verifyMIC (byte[] inToken, int tokOffset, int tokLen, byte[] inMsg, int msgOffset, int msgLen, MessageProp msgProp);
This verifies the MIC contained in the inToken
(of
length tokLen
, starting at offset
tokOffset
) over the message contained in
inMsg
(of length msgLen
, starting at
offset msgOffset
). The MessageProp is used by the
underlying mechanism to return information to the caller, such as
the QOP indicating the strength of protection that was applied to
the message.
The message exchanges between SampleClient and SampleServer are summarized below, followed by the coding details.
These steps are the "standard" steps used for verifying a GSS-API client and server. A group at MIT has written a GSS-API client and a GSS-API server that have become fairly popular test programs for checking interoperability between different implementations of the GSS-API library. (These GSS-API sample applications can be downloaded as a part of the Kerberos distribution available from MIT at http://web.mit.edu/kerberos.) This client and server from MIT follow the protocol that once the context is established, the client sends a message across and it expects back the MIC on that message. If you implement a GSS-API library, it is common practice to test it by running either the client or server using your library implementation against a corresponding peer server or client that uses another GSS-API library implementation. If both library implementations conform to the standards, then the two peers will be able to communicate successfully.
One implication of testing your client or server against ones written in C (like the MIT ones) is the way tokens must be exchanged. C implementations of GSS-API do not include stream-based methods. In the absence of stream-based methods on your peer, when you write a token you must first write the number of bytes and then write the token. Similarly, when you are reading a token, you first read the number of bytes and then read the token. This is what SampleClient and SampleServer do.
Here is the summary of the SampleClient and SampleServer message exchanges:
wrap
to encrypt and calculate a
MIC for a message.wrap
to
SampleServer.unwrap
to obtain the original
message and verify its integrity.getMIC
to calculate a MIC on
the decrypted message.getMIC
(which contains the MIC) to SampleClient.verifyMIC
to verify that the
MIC sent by SampleServer is a valid MIC for the original
message.The SampleClient code for encrypting a message, calculating a MIC for it, and sending the result to SampleServer is the following:
byte[] messageBytes = "Hello There!\0".getBytes(); /* * The first MessageProp argument is 0 to request * the default Quality-of-Protection. * The second argument is true to request * privacy (encryption of the message). */ MessageProp prop = new MessageProp(0, true); /* * Encrypt the data and send it across. Integrity protection * is always applied, irrespective of encryption. */ token = context.wrap(messageBytes, 0, messageBytes.length, prop); System.out.println("Will send wrap token of size " + token.length); outStream.writeInt(token.length); outStream.write(token); outStream.flush();
The following SampleServer code reads the wrapped token sent by SampleClient and "unwraps" it to obtain the original message and have its integrity verified. The unwrapping in this case includes decryption since the message was encrypted.
Note: Here the integrity check is expected to succeed. But note
that in general if an integrity check fails it signifies that the
message was changed in transit. If the unwrap
method
encounters an integrity check failure, it throws a GSSException
with major error code GSSException.BAD_MIC.
/* * Create a MessageProp which unwrap will use to return * information such as the Quality-of-Protection that was * applied to the wrapped token, whether or not it was * encrypted, etc. Since the initial MessageProp values * are ignored, it doesn't matter what they are set to. */ MessageProp prop = new MessageProp(0, false); /* * Read the token. This uses the same token byte array * as that used during context establishment. */ token = new byte[inStream.readInt()]; System.out.println("Will read token of size " + token.length); inStream.readFully(token); byte[] bytes = context.unwrap(token, 0, token.length, prop); String str = new String(bytes); System.out.println("Received data \"" + str + "\" of length " + str.length()); System.out.println("Encryption applied: " + prop.getPrivacy());
Next, SampleServer generates a MIC for the decrypted message and sends it to SampleClient. This is not really necessary but simply illustrates generating a MIC on the decrypted message, which should be exactly the same as the original message SampleClient wrapped and sent to SampleServer. When SampleServer generates this and sends it to SampleClient, and SampleClient verifies it, this proves to SampleClient that the decrypted message SampleServer has is in fact exactly the same as the original message from SampleClient.
/* * First reset the QOP of the MessageProp to 0 * to ensure the default Quality-of-Protection * is applied. */ prop.setQOP(0); token = context.getMIC(bytes, 0, bytes.length, prop); System.out.println("Will send MIC token of size " + token.length); outStream.writeInt(token.length); outStream.write(token); outStream.flush();
The following SampleClient code reads the MIC calculated by SampleServer on the decrypted message and then verifies that the MIC is a MIC for the original message, proving that the decrypted message SampleServer has is the same as the original message:
token = new byte[inStream.readInt()]; System.out.println("Will read token of size " + token.length); inStream.readFully(token); /* * Recall messageBytes is the byte array containing * the original message and prop is the MessageProp * already instantiated by SampleClient. */ context.verifyMIC(token, 0, token.length, messageBytes, 0, messageBytes.length, prop); System.out.println("Verified received MIC for message.");
socket.close(); context.dispose();
Since the underlying authentication and secure communication technology used by this tutorial is Kerberos V5, we use Kerberos-style principal names wherever a user or service is called for.
For example, when you run SampleClient you are asked to provide your user name. Your Kerberos-style user name is simply the user name you were assigned for Kerberos authentication. It consists of a base user name (like "mjones") followed by an "@" and your realm (like "mjones@KRBNT-OPERATIONS.EXAMPLE.COM").
A server program like SampleServer is typically considered to offer a "service" and to be run on behalf of a particular "service principal." A service principal name for SampleServer is needed in several places:
Throughout this document, and in the accompanying login configuration file,
service_principal@your_realmis used as a placeholder to be replaced by the actual name to be used in your environment. Any Kerberos principal can actually be used for the service principal name. So for the purposes of trying out this tutorial, you could use your user name as both the client user name and the service principal name.
In a production environment, system administrators typically like servers to be run as specific principals only and may assign a particular name to be used. Often the Kerberos-style service principal name assigned is of the form
service_name/machine_name@realm;
For example, an nfs service run on a machine named "raven" in the realm named "KRBNT-OPERATIONS.EXAMPLE.COM" could have the service principal name
<EMAIL_ADDRESS>Such multi-component names are not required, however.
Single-component names, just like those of user principals, can be
used. For example, an installation might use the same ftp service
principal ftp@realm
for all ftp servers in that realm,
while another installation might have different ftp principals for
different ftp servers, such as ftp/host1@realm
and
ftp/host2@realm
on machines host1
and
host2
, respectively.
If the realm of a user or service principal name is the default realm (see Kerberos Requirements), you can leave off the realm when you are logging into Kerberos (that is, when you are prompted for your username). Thus, for example, if your user name is<EMAIL_ADDRESS>and you run SampleClient, when it requests your user name you could just specify "mjones", leaving off the realm. The name is interpreted in the context of being a Kerberos principal name and the default realm is appended, as needed.
You can also leave off the realm if a principal name will be
converted to a GSSName by a GSSManager createName
method. For example, when you run SampleClient, one of the
arguments is the server service principal name. You can specify the
name without including the realm, because SampleClient passes the
name to such a createName
method, which appends the
default realm as needed.
It is recommended that you always include realms when principal names are used in login configuration files and policy files, because the behavior of the parsers for such files may be implementation-dependent; they may or may not append the default realm before such names are utilized and subsequent actions may fail if there is no realm in the name.
For this tutorial, we are letting the underlying Kerberos mechanism obtain credentials of the users running SampleClient and SampleServer, rather than invoking JAAS methods directly (as in the JAAS Authentication and JAAS Authorization tutorials) or indirectly (for example, via the Login utility described in the Use of JAAS Login Utility tutorial and in the Use of JAAS Login Utility and Java GSS-API for Secure Message Exchanges tutorial).
The default Kerberos mechanism implementation supplied by Sun Microsystems actually prompts for a Kerberos name and password and authenticates the specified user (or service) to the Kerberos KDC. The mechanism relies on JAAS to perform this authentication.
JAAS supports a pluggable authentication framework, meaning that any type of authentication module can be plugged under a calling application. A login configuration specifies the login module to be used for a particular application. The default JAAS implementation from Sun Microsystems requires that the login configuration information be specified in a file. (Note: Some other vendors might not have file-based implementations.) See JAAS Login Configuration File for information as to what a login configuration file is, what it contains, and how to specify which login configuration file should be used.
For this tutorial, the Kerberos login module
com.sun.security.auth.module.Krb5LoginModule
is
specified in the configuration file. This login module prompts for
a Kerberos name and password and attempts to authenticate to the
Kerberos KDC.
Both SampleClient and SampleServer can use the same login configuration file, if that file contains two entries, one entry for the client side and one for the server side.
The bcsLogin.conf login configuration file used for this tutorial is the following:
com.sun.security.jgss.initiate { com.sun.security.auth.module.Krb5LoginModule required; }; com.sun.security.jgss.accept { com.sun.security.auth.module.Krb5LoginModule required storeKey=true };
Entries with these two names
(com.sun.security.jgss.initiate
and
com.sun.security.jgss.accept
) are used by Sun
implementations of GSS-API mechanisms when they need new
credentials. Since the mechanism used in this tutorial is the
Kerberos V5 mechanism, a Kerberos login module will need to be
invoked in order to obtain these credentials. Thus we list
Krb5LoginModule as a required module in these entries. The
com.sun.security.jgss.initiate
entry specifies the
configuration for the client side and the
com.sun.security.jgss.accept
entry for the server
side.
The Krb5LoginModule succeeds only if the attempt to log in to the Kerberos KDC as a specified entity is successful. When running SampleClient or SampleServer, the user will be prompted for a name and password.
The SampleServer entry storeKey=true
indicates that a secret key should be calculated from the password
provided during login and it should be stored in the private
credentials of the Subject created as a result of login. This key
is subsequently utilized during mutual authentication when
establishing a security context between SampleClient and
SampleServer.
For information about all the possible options that can be passed to Krb5LoginModule, see the Krb5LoginModule documentation.
For this tutorial, we set the system property
javax.security.auth.useSubjectCredsOnly
to
false
, which allows us to relax the usual restriction
of requiring a GSS mechanism to obtain necessary credentials from
an existing Subject, set up by JAAS.
When this restriction is relaxed, it allows the mechanism to obtain
credentials from some vendor-specific location. For example, some
vendors might choose to use the operating system's cache if one
exists, while others might choose to read from a protected file on
disk.
When this restriction is relaxed, Sun Microsystem's Kerberos
mechanism still looks for the credentials in the Subject associated
with the thread's access control context, but if it doesn't find
any there, it performs JAAS authentication using a Kerberos module
to obtain new ones. The Kerberos module prompts you for a Kerberos
principal name and password. Note that Kerberos mechanism
implementations from other vendors may behave differently when this
property is set to false
. Consult their documentation
to determine their implementation's behavior.
To execute the SampleClient and SampleServer programs, do the following:
To prepare SampleServer for execution, do the following:
SampleServer.java
:
javac SampleServer.java
To prepare SampleClient for execution, do the following:
SampleClient.java
:
javac SampleClient.java
It is important to execute SampleServer before SampleClient because SampleClient will try to make a socket connection to SampleServer and that will fail if SampleServer is not yet running and accepting socket connections.
To execute SampleServer, be sure to run it on the machine it is expected to be run on. This machine name (host name) is specified as an argument to SampleClient. The service principal name appears in several places, including the login configuration file and the policy files.
Go to the directory in which you have prepared SampleServer for execution. Execute SampleServer, specifying
-Djava.security.krb5.realm=<your_realm>
that your Kerberos realm is the one specified. For example, if your
realm is "KRBNT-OPERATIONS.EXAMPLE.COM" you'd put
-Djava.security.krb5.realm=KRBNT-OPERATIONS.EXAMPLE.COM
.-Djava.security.krb5.kdc=<your_kdc>
that
your Kerberos KDC is the one specified. For example, if your KDC is
"samplekdc.example.com" you'd put
-Djava.security.krb5.kdc=samplekdc.example.com
.-Djavax.security.auth.useSubjectCredsOnly=false
that the underlying mechanism can decide how to get credentials.
See The useSubjectCredsOnly System
Property.-Djava.security.auth.login.config=bcsLogin.conf
that the login configuration file to be used is
bcsLogin.conf
.The only argument required by SampleServer is one specifying the port number to be used for listening for client connections. Choose a high port number unlikely to be used for anything else. An example would be something like 4444.
Below is the full command to use for both Microsoft Windows and Solaris, Linux, and Mac OS X systems.
Important: In this command, you must replace
<port_number>
with an appropriate port number,
<your_realm>
with your Kerberos realm, and
<your_kdc>
with your Kerberos KDC.
Here is the command:
java -Djava.security.krb5.realm=<your_realm> -Djava.security.krb5.kdc=<your_kdc> -Djavax.security.auth.useSubjectCredsOnly=false -Djava.security.auth.login.config=bcsLogin.conf SampleServer <port_number>
The full command should appear on one line (or, on Solaris, Linux, or Mac OS X systems, on multiple lines where each line but the last is terminated with " \" indicating that there is more to come). Multiple lines are used here just for legibility. Since this command is very long, you may need to place it in a .bat file (for Windows) or a .sh file (for Solaris, Linux, or Mac OS X) and then run that file to execute the command.
The SampleServer
code will listen for socket
connections on the specified port. When prompted, type the Kerberos
name and password for the service principal. The underlying
Kerberos authentication mechanism specified in the login
configuration file will log the service principal into
Kerberos.
For login troubleshooting suggestions, see Troubleshooting.
To execute SampleClient, first go to the directory in which you have prepared SampleClient for execution. Execute SampleClient, specifying
-Djava.security.krb5.realm=<your_realm>
that your Kerberos realm is the one specified.-Djava.security.krb5.kdc=<your_kdc>
that
your Kerberos KDC is the one specified.-Djavax.security.auth.useSubjectCredsOnly=false
that the underlying mechanism can decide how to get
credentials.-Djava.security.auth.login.config=bcsLogin.conf
that the login configuration file to be used is
bcsLogin.conf
.The SampleClient arguments are (1) the Kerberos name of the service principal that represents SampleServer, (2) the name of the host (machine) on which SampleServer is running, and (3) the port number on which SampleServer is listening for client connections.
Below is the full command to use for both Windows and Solaris, Linux, and Mac OS X systems.
Important: In this command, you must replace
<service_principal>
, <host>
,
<port_number>
, <your_realm>
,
and <your_kdc>
with appropriate values (and
note that the port number must be the same as the port number
passed as an argument to SampleServer). These values need not be
placed in quotes.
Here is the command:
java -Djava.security.krb5.realm=<your_realm> -Djava.security.krb5.kdc=<your_kdc> -Djavax.security.auth.useSubjectCredsOnly=false -Djava.security.auth.login.config=bcsLogin.conf SampleClient <service_principal> <host> <port_number>
Type the full command on one line. Multiple lines are used here for legibility. As with the command for executing SampleServer, if the command is too long to type directly into your command window, place it in a .bat file (Windows) or a .sh file (Solaris, Linux, and Mac OS X) and then execute that file.
When prompted, type your Kerberos user name and password. The underlying Kerberos authentication mechanism specified in the login configuration file will log you into Kerberos. The SampleClient code requests a socket connection with SampleServer. Once SampleServer accepts the connection, SampleClient and SampleServer establish a shared context and then exchange messages as described in this tutorial.
For login troubleshooting suggestions, see Troubleshooting.


Framework for the Graphical User Interface of an Application. Provides classes for handling Panels, Frames(Windows), Actions, StatusMessages,...


[§15D-1] Short title. This chapter may be cited as the Uniform Military and Overseas Voters Act. [L 2012, c 226, pt of §1]


This registry exists to help people discover and share datasets that are available via AWS resources. See recent additions and learn more about sharing data on AWS.
Get started using data quickly by viewing all tutorials with associated SageMaker Studio Lab notebooks.
See all usage examples for datasets listed in this registry.
See datasets from Allen Institute for Artificial Intelligence (AI2), Digital Earth Africa, Data for Good at Meta, NASA Space Act Agreement, NIH STRIDES, NOAA Open Data Dissemination Program, Space Telescope Science Institute, and Amazon Sustainability Data Initiative.
If you want to add a dataset or example of how to use a dataset to this registry, please follow the instructions on the Registry of Open Data on AWS GitHub repository.
Unless specifically stated in the applicable dataset documentation, datasets available through the Registry of Open Data on AWS are not provided and maintained by AWS. Datasets are provided and maintained by a variety of third parties under a variety of licenses. Please check dataset licenses and related documentation to determine if a dataset may be used for your application.
If you have a project using a listed dataset, please tell us about it. We may work with you to feature your project in a blog post.
agriculturecogdisaster responseearth observationgeospatialnatural resourcesatellite imagerystacsustainability
This joint NASA/USGS program provides the longest continuous space-based record of Earth’s land in existence. Every day, Landsat satellites provide essential information to help land managers and policy makers make wise decisions about our resources and our environment. Data is provided for Landsats 1, 2, 3, 4, 5, 7, and 8.


Jetty Server
Introduction
The HttpServer class provides the core Jetty HTTP
server and HttpHandler extension architecture.
The
org.mortbay.jetty
and
org.mortbay.jetty.servlet
packages extend the basic HttpServer with standard compliant
servlets and webapplications. The
key classes in these packages are:
Using the ServletHandler
If you do not wish to use web applications but you want to deploy servlets, then you need to register at least one context and at least the ServletHandler with the server. You are able to statically configure individual servlets at a specific URL pattern, or use dynamic mapping to extract servlet names from the request URL.
The ServletHandler can be used with a HttpServer:
HttpServer server = new HttpServer();
server.addListener(":8080");
HttpContext context = server.getContext("/");
ServletHandler handler= new ServletHandler();
handler.addServlet("Dump","/dump/*",
"org.mortbay.servlet.Dump");
context.addHandler(handler);
Code Example: Using ServletHandler in HttpServer
|
Alternately, the org.mortbay.jetty.Server
can be used instead of a HttpServer, so that it's conveniance methods may be
used:
Server server = new Server();
server.addListener(":8080");
ServletHttpContext context = (ServletHttpContext)
server.getContext("/");
context.addServlet("Dump","/dump/*",
"org.mortbay.servlet.Dump");
Code Example: Using ServletHandler in Server
|
Using Static Servlet Mappings
The examples above used defined servlet mappings to map a request URL to a
servlet. Prefix (eg "/dump/*"), suffix (eg. "*.jsp"), exact (eg "/path") or default ("/")
mappings may be used and they are all within the scope of the context
path:
Server server = new Server();
server.addListener(":8080");
ServletHttpContext context = (ServletHttpContext)
server.getContext("/context");
context.addServlet("Dump","/dump/*",
"org.mortbay.servlet.Dump");
context.addServlet("Dump","/dump/session",
"org.mortbay.servlet.SessionDump");
context.addServlet("JSP","*.jsp",
"org.apache.jasper.servlet.JspServlet");
context.addServlet("Default","/",
"org.mortbay.jetty.servlet.Default");
Code Example: Static servlet mappings
|
Examples of URLs that will be mapped to these servlets are:
/context/dump | Dump Servlet by prefix |
/context/dump/info | Dump Servlet by prefix |
/context/dump/session | SessionDump Servlet by exact |
/context/welcome.jsp | JSP Servlet by suffix |
/context/dump/other.jsp | Dump Servlet by prefix |
/context/anythingelse | Default Servlet |
/anythingelse | Not this context |
Using Dynamic Servlets
Servlets can be discovered dynamically by using the
org.mortbay.jetty.servlet.Invoker
servlet. This servlet uses the request URI to determine a servlet class or the name of a
previously registered servlet:
Server server = new Server();
server.addListener(":8080");
ServletHttpContext context = (ServletHttpContext)
server.getContext("/context");
context.addServlet("Dump","/dump/*",
"org.mortbay.servlet.Dump");
context.addServlet("Invoker","/servlet/*",
"org.mortbay.jetty.servlet.Invoker");
Code Example: Dynamic servlet mappings
|
Examples of URLs that will be mapped to these servlets are:
/servlet/Dump | Dump Servlet by name |
/servlet/com.acme.MyServlet/info | Servlet by
dynamic class |
/servlet/com.mortbay.servlet.Dump | Dump Servlet
by class or ERROR |
By default, the Invoker will only load servlets from the context classloader,
so the last URL above will result in an error. The Invoker can be configured
to allow any servlet to be run, but this can be a secuirty issue.
Deploying Web Applications
The
Servlet Specification details a standard layout for web applications.
If your content is packaged according to these
specifications, then simply call the addWebApplication(...)methods
on the
org.mortbay.jetty.Server instance, specifying at minimum a context
path, the directory or war file of your application.
Jetty is then able to discover and configure all the required handlers
including security, static content and servlets.
The addWebApplication(...)methods transparently create and return an
instance of
WebApplicationContext which contains a
WebApplicationHandler.
The WebApplicationHandler extends ServletHandler and as well as servlets, it
provides standard security and filters. Normally it is configured by
the webdefault.xml file to contain
Invoker,
JSP and
Default servlets.
Filters,
Servlets and
other mechanisms are configured from the WEB-INF/web.xml file
within the web application.
This example configures a web application located in the directory
./webapps/myapp/ at the context path / for a virtual
host myhost:
server.addWebApplication("myhost","/","./webapps/myapp/");
Code Example: Configuring a web application
|
The arguments to the addWebApplication method are:
- An (optional) virtual host name for the context
- A context path
- The location of the web application, which may be a
directory structure or a war file, given as a URL, war filename
or a directory name.
The addWebApplication method is overloaded to accommodate
the parameters marked as (optional).
| Note: If you run Jetty within JBoss, then you should NOT use the addWebApplication API (or XML), as this bypasses the
JBoss classloaders. Use the JBoss deployment mechanisms instead and only use the Jetty
configuration for listeners and logs. |
Multiple Web Applications
To make things even easier, if you have multiple web apps to deploy, you can accomplish this with a single method call:
server.addWebApplications ("myhost","./webapps/");
Code Example: Configuring multiple web apps
|
Given the code above, Jetty would look in the directory "./webapps/" for all war files and subdirectories, and configure itself with each web application specified therein. For example, assuming the directory webapps contained the war files webapps/root.war, webapps/customer.war and webapps/admin.war, then Jetty would create the contexts "/", "/customer/*" and "/admin/*" mapped to the respective war files. NOTE the special mapping of war files (or directories) named root to the context "/".
In order to actually deploy the web application, it is also necessary
to configure a port listener. The full code example to deploy the web application
in the code snippet is:
Server server = new Server();
SocketListener listener = new SocketListener();
listener.setPort(8080);
server.addListener(listener );
server.addWebApplication("myhost","./webapps/myapp/");
server.start();
Code Example: Deploying a web application
|
Using XML
The same web application can be deployed instead via an XML configuration
file instead of calls to the API. The name of the file is passed to Jetty
as an argument on the command line (see the section on
Jetty demonstrations for instructions). The following excerpt deploys
the same web application as given in the code example above:
<Configure class="org.mortbay.jetty.Server">
<Call name="addListener">
<Arg>
<New class="org.mortbay.http.SocketListener">
<Set name="Port">
<SystemProperty name="jetty.port"
default="8080"/>
</Set>
</New>
</Arg>
</Call>
<Call name="addWebApplication">
<Arg>/</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/webapps/myapp
</Arg>
</Call>
</Configure>
XML Example: Deploying a web application
|
An explanation of the Jetty XML syntax can be found in the section on
Jetty XML Configuration.
Web Application Configuration
When a WebApplicationContext is started, up to three configuration files are applied
as follows:
- webdefault.xml This file must be in standard web.xml format and typically contains all the default settings for all webapplicatios. By default the org/mortbay/jetty/servlet/webdefault.xml file is used as a resource from the jetty jar and it configures the JspServlet and default session timeouts. The default xml file may be changed for a particular context by calling setDefaultsDescriptor(String)
- web.xml The standard web application configuration file and is found in
the WEB-INF directory of the webapplicaton.
- web-jetty.xml This file must be in org.mortbay.xml.XmlConfiguration format and if found in the WEB-INFdirectory of a web application, it is applied to the WebApplicationContext instance. It is typically used to change non standard configuration.
<Configure class="org.mortbay.jetty.servlet.WebApplicationContext">
<Set name="statsOn" type="boolean">false</Set>
</Configure>
XML Example: A web-jetty.xml file
|
Note: the name jetty-web.xml is also accepted for this file.
Web Application Security
Jetty makes the following interpretations for the configuration of security
constraints within a web.xml file:
- Methods PUT, DELETE and GET are disabled unless explicitly enabled.
- If multiple security-constraints are defined, the most specific applies to a
request.
- A security-constraint an empty auth-constraint forbids all access by any
user:
<security-constraint>
<web-resource-collection>
<web-resource-name>Forbidden</web-resource-name>
<url-pattern>/auth/noaccess/*</url-pattern>
</web-resource-collection>
<auth-constraint/>
</security-constraint>
- A security constraint with an auth constraint with a role of "*" gives access
to all authenticated users:
<security-constraint>
<web-resource-collection>
<web-resource-name>Any User</web-resource-name>
<url-pattern>/auth/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
</security-constraint>
- A security-constraint with no auth-constraint and no data contrain gives access
to any request:
<security-constraint>
<web-resource-collection>
<web-resource-name>Relax</web-resource-name>
<url-pattern>/auth/relax/*</url-pattern>
</web-resource-collection>
</security-constraint>
- On platforms without the / file separator or when the system parameter
org.mortbay.util.FileResource.checkAliases is true, then the FileResouce class
compares the absolutePath and canonicalPath and treats the resource as not found
if they do not match. THIS means that win32 platforms need to exactly match
the case of drive letters and filenames.
- Dynamic servlets by default, can only be loaded from the context classpath.
Use ServletHandler.setServeDynamicSystemServlets to control this behaivour.
Security Recommendation
It is strongly recommended that secure WebApplications take following
approach. All access should be denied by default with
<security-constraint>
<web-resource-collection>
<web-resource-name>Default</web-resource-name>
<url-pattern>/</url-pattern>
</web-resource-collection>
<auth-constraint/>
</security-constraint>
Specific access should then be granted with constraints like:
<security-constraint>
<web-resource-collection>
<url-pattern>/public/*</url-pattern>
<url-pattern>/images/*</url-pattern>
<http-method>GET</http-method>
<http-method>HEAD</http-method>
</web-resource-collection>
<web-resource-collection>
<url-pattern>/servlet/*</url-pattern>
<http-method>GET</http-method>
<http-method>HEAD</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
</security-constraint>
Session Security
Jetty uses the standard java.util.Random class to generate session IDs. This
may be insufficient for high security sites. The SessionManager instance can
be initialized with a more secure random number generator, such as java.security.SecureRandom
The Jetty configuration XML to do this to a webapplication is:
<Call name="addWebApplication">
<Arg>/myapp/*</Arg>
<Arg><SystemProperty name="jetty.home"
default="."/>/demo/webapps/myapp</Arg>
<Call name="getServletHandler">
<Set name="sessionManager">
<New class="org.mortbay.jetty.servlet.HashSessionManager">
<Arg><New class="java.security.SecureRandom"/></Arg>
</New>
</Set>
</Call>
</Call>
Note: initialising the SecureRandom object is a one-off time consuming
operation which may cause the initial request to take much longer.


A blog (a shortened version of “weblog”) is an online journal or informational website displaying information in reverse chronological order, with the latest posts appearing first, at the top. It is a platform where a writer or a group of writers share their views on an individual subject.
There are many reasons to start a blog for personal use and only a handful of strong ones for business blogging. Blogging for business, projects, or anything else that might bring you money has a very straightforward purpose – to rank your website higher in Google SERPs, increase your visibility.


Counting With Loops
Enter what you'd like to count to:
Enter what number you'd like to count by:
Enter


Use various regression models for the analysis of win loss endpoints adjusting for non-binary and multivariate covariates.
| Version: | 1.0.0 |
| Depends: | R (≥ 3.1.2) |
| Imports: | inline, stats, survival |
| Published: | 2017-04-18 |
| Author: | Xiaodong Luo [aut, cre], Sanofi [cph] |
| Maintainer: | Xiaodong Luo <Xiaodong.Luo at sanofi.com> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | yes |
| CRAN checks: | WLreg results |
| Reference manual: | WLreg.pdf |
| Package source: | WLreg_1.0.0.tar.gz |
| Windows binaries: | r-devel: WLreg_1.0.0.zip, r-release: WLreg_1.0.0.zip, r-oldrel: WLreg_1.0.0.zip |
| OS X binaries: | r-release: WLreg_1.0.0.tgz, r-oldrel: WLreg_1.0.0.tgz |
Please use the canonical form https://CRAN.R-project.org/package=WLreg to link to this page.


SEPTEMBER 2020 - OPEN SOURCE
Became a major contributor of GCI Frontend Development project and became the Member of the organisation.
I'm a second year B.Tech. student at Maharaja Agrasen Institute of Technology, pursuing my love for coding and tech-related activities. I'm already in love with Front End Web Development and at the same time, I'm exploring the dimensions
of Penetration Testing and Artificial Intelligence. I personally believe in sharing my knowledge with others to create a better world. Apart from this, I love literature and write blogs and poetries in my free time.
I’m always surprised about how great it feels when I solve a problem in my code. I guess it is solving puzzles, just not like the puzzles you would normally think of. Writing a script, or program, to perform some task presents
us will all sorts of puzzles. Some bigger picture ones, like figuring out how it fits in to the whole architecture. Some small puzzles, like figuring out bugs in the code.
When one of the puzzles is solved, I feel a little dopamine
rush. The ability to create something fruitful out of just a simple text editor and a compiler, and the ability to apply the concepts taught in book, increases my fascination for coding and development.
Became a major contributor of GCI Frontend Development project and became the Member of the organisation.
Selected as a Placement Coordinator of Maharaja Agrasen Institute of Technology among 100+ students
Started interning at Desi ChalChitra as a Frontend Designer and Developer (HTML/CSS/WordPress)
Joined RaCDA under Rotaract District 3012 as a Member and later promoted to Public Relations Avenue Representative
Joined the WomenTech Network as a Global Ambassador and has been nominated for "WomenTech ambassador of year 2020".
Started interning as WordPress Developer at BNK Alloys
Awarded as the "First Leader-board Topper" in Web Development Track at Girl Code It
Joined the open source organisation - GCI as Mentee and enrolled in the Basics of Web Development course (HTML/CSS/Javascript/ES6/ReactJs)
Started teaching English & French to school students
Awarded with a laptop for best academic performance
in college
Started contributing to open source on GitHub
Participated in the GitHub event on MLH's Local Hack Day and Joined Major League Hacking Club.
Started studying the basics of C++ and OOPS
Completed my class XII from CBSE board and secured 93%
Completed my class X from CBSE board and secured 10 CGPA


Your Locum history.
Start typing in the box and you will be shown results based on your query.
Here you will be shown a live preview of the filtered sessions you searched for.
{{ sessions.day_rate | currency:"$" }}
{{ sessions.percentage }}%
 Rated
You can't finish job before it ends


I developed this database for a small private school in Delaware. This school is very big on teaching the students personal responsibility, and one of the ways it does it is by getting them involved in resolving disputes among themselves in an internal judicial process.
The students aren't only involved in listening to testimony and interrogating witnesses, they're also in charge of making and keeping records, which is where my application comes in. It's designed to be run on a local server and accessed through a browser. It uses a mySQL database and PHP on the server side, with JavaScript and jQuery on the client. I also wrote a Python script to set up the proper database tables and users and to write a config file when setting up the server.
One of the interesting requirements of this project was that I not make it as efficient as possible, because it isn't only a record keeping app, but a learning tool as well. I had to consult with the client to make sure we didn't make things so convenient that the students wouldn't learn anything!
When looking at the live demo, feel free to sign in as "user" with password "user" or as "admin" with password "admin" and mess around with adding and modifying records. Besides the menu options in the top right, everything is accessed through contextual menus by clicking on column headings and individual cells. For instance, click on the "Case Number" to see a preview of information about that case. You'll also be given the option to update or modify the case, if you're signed in.


Do you like bacon? ({{likesbacon}})
Support for $destroy
events.
The following radio is {{radCreateDestroy}}
:
| Enabled | Disabled (ng-disable) | Disabled (disabled) | |
|---|---|---|---|
| Valid |
|
|
|
| Invalid |
|
|
|


|
Panda3D
|
An implementation of a very simple block allocator. More...
Public Member Functions | |
| __init__ (int max_size, Mutex lock) | |
| __init__ (SimpleAllocator from) | |
| Move constructor. More... | |
| SimpleAllocatorBlock | alloc (int size, int alignment) |
| Allocates a new block. More... | |
| int | getContiguous () |
| Returns an upper-bound estimate of the size of the largest contiguous block that may be allocated. More... | |
| SimpleAllocatorBlock | getFirstBlock () |
| Returns a pointer to the first allocated block, or NULL if there are no allocated blocks. More... | |
| int | getMaxSize () |
| Returns the available space for allocated objects. More... | |
| int | getTotalSize () |
| Returns the total size of allocated objects. More... | |
| bool | isEmpty () |
| Returns true if there are no blocks allocated on this page, or false if there is at least one. More... | |
| output (Ostream out) | |
| setMaxSize (int max_size) | |
| Changes the available space for allocated objects. More... | |
| write (Ostream out) | |
An implementation of a very simple block allocator.
This class can allocate ranges of nonnegative integers within a specified upper limit; it uses a simple first-fit algorithm to find the next available space.
| __init__ | ( | int | max_size, |
| Mutex | lock | ||
| ) |
| __init__ | ( | SimpleAllocator | from | ) |
Move constructor.
| SimpleAllocatorBlock alloc | ( | int | size, |
| int | alignment | ||
| ) |
Allocates a new block.
Returns NULL if a block of the requested size cannot be allocated.
To free the allocated block, call block->free(), or simply delete the block pointer.
| int getContiguous | ( | ) |
Returns an upper-bound estimate of the size of the largest contiguous block that may be allocated.
It is guaranteed that an attempt to allocate a block larger than this will fail, though it is not guaranteed that an attempt to allocate a block this size or smaller will succeed.
| SimpleAllocatorBlock getFirstBlock | ( | ) |
Returns a pointer to the first allocated block, or NULL if there are no allocated blocks.
| int getMaxSize | ( | ) |
Returns the available space for allocated objects.
| int getTotalSize | ( | ) |
Returns the total size of allocated objects.
| bool isEmpty | ( | ) |
Returns true if there are no blocks allocated on this page, or false if there is at least one.
| output | ( | Ostream | out | ) |
| setMaxSize | ( | int | max_size | ) |
Changes the available space for allocated objects.
This will not affect any already-allocated objects, but will have an effect on future calls to alloc().
| write | ( | Ostream | out | ) |


The SimpleVariance sample program shows C# 4.0 support for covariance and contravariance when using generic types in delegates and interfaces. In C# 3.0 generic types were invariant. As a result, this sample compiles fine in C# 4.0, while it does not compile in previous versions of C#.
There program first declares two simple classes and two delegates:
class Animal { } class Cat : Animal { } delegate T Func1<out T>(); delegate void Action1<in T>(T a);
It then implements the delegates and uses the classes:
Func1<Cat> cat = () => new Cat(); Action1<Animal> act1 = (ani) => { Console.WriteLine(ani); };
It then makes the assignments that requires covariant and contravariant support:
Func1<Animal> animal = cat; Action1<Cat> cat1 = act1;
It is this latter set of assignments that work in C# 4.0 but not in previous versions of C#. The first assignment illustrates coveriance, and the second contravariance.
The new contextual keywords out and in allow you to specify whether a generic type is going to be passed into a delegate or interface method, or returned from a delegate or interface method.


GTFO YOU'RE OUTTA MONEY
Apples
$0
avg price: $0
Apples
sell
Bananas
$0
avg price: $0
Banana
sell
Oranges
$0
avg price: $0
Orange
sell
Pears
$0
avg price: $0
Pears
sell
Total Money: $100