|
TARget
1
(TARget) - This A RaytracinG projEcT
|
#include <tinyxml2.h>
Public Member Functions | |
| const XMLDocument * | GetDocument () const |
| Get the XMLDocument that owns this XMLNode. More... | |
| XMLDocument * | GetDocument () |
| Get the XMLDocument that owns this XMLNode. More... | |
| virtual XMLElement * | ToElement () |
| Safely cast to an Element, or null. More... | |
| virtual XMLText * | ToText () |
| Safely cast to Text, or null. More... | |
| virtual XMLComment * | ToComment () |
| Safely cast to a Comment, or null. More... | |
| virtual XMLDocument * | ToDocument () |
| Safely cast to a Document, or null. More... | |
| virtual XMLDeclaration * | ToDeclaration () |
| Safely cast to a Declaration, or null. More... | |
| virtual XMLUnknown * | ToUnknown () |
| Safely cast to an Unknown, or null. More... | |
| virtual const XMLElement * | ToElement () const |
| virtual const XMLText * | ToText () const |
| virtual const XMLComment * | ToComment () const |
| virtual const XMLDocument * | ToDocument () const |
| virtual const XMLDeclaration * | ToDeclaration () const |
| virtual const XMLUnknown * | ToUnknown () const |
| const char * | Value () const |
| void | SetValue (const char *val, bool staticMem=false) |
| int | GetLineNum () const |
| Gets the line number the node is in, if the document was parsed from a file. More... | |
| const XMLNode * | Parent () const |
| Get the parent of this node on the DOM. More... | |
| XMLNode * | Parent () |
| bool | NoChildren () const |
| Returns true if this node has no children. More... | |
| const XMLNode * | FirstChild () const |
| Get the first child node, or null if none exists. More... | |
| XMLNode * | FirstChild () |
| const XMLElement * | FirstChildElement (const char *name=0) const |
| XMLElement * | FirstChildElement (const char *name=0) |
| const XMLNode * | LastChild () const |
| Get the last child node, or null if none exists. More... | |
| XMLNode * | LastChild () |
| const XMLElement * | LastChildElement (const char *name=0) const |
| XMLElement * | LastChildElement (const char *name=0) |
| const XMLNode * | PreviousSibling () const |
| Get the previous (left) sibling node of this node. More... | |
| XMLNode * | PreviousSibling () |
| const XMLElement * | PreviousSiblingElement (const char *name=0) const |
| Get the previous (left) sibling element of this node, with an optionally supplied name. More... | |
| XMLElement * | PreviousSiblingElement (const char *name=0) |
| const XMLNode * | NextSibling () const |
| Get the next (right) sibling node of this node. More... | |
| XMLNode * | NextSibling () |
| const XMLElement * | NextSiblingElement (const char *name=0) const |
| Get the next (right) sibling element of this node, with an optionally supplied name. More... | |
| XMLElement * | NextSiblingElement (const char *name=0) |
| XMLNode * | InsertEndChild (XMLNode *addThis) |
| XMLNode * | LinkEndChild (XMLNode *addThis) |
| XMLNode * | InsertFirstChild (XMLNode *addThis) |
| XMLNode * | InsertAfterChild (XMLNode *afterThis, XMLNode *addThis) |
| void | DeleteChildren () |
| void | DeleteChild (XMLNode *node) |
| virtual XMLNode * | ShallowClone (XMLDocument *document) const =0 |
| XMLNode * | DeepClone (XMLDocument *target) const |
| virtual bool | ShallowEqual (const XMLNode *compare) const =0 |
| virtual bool | Accept (XMLVisitor *visitor) const =0 |
| void | SetUserData (void *userData) |
| void * | GetUserData () const |
Protected Member Functions | |
| XMLNode (XMLDocument *) | |
| virtual | ~XMLNode () |
| virtual char * | ParseDeep (char *p, StrPair *parentEndTag, int *curLineNumPtr) |
Protected Attributes | |
| XMLDocument * | _document |
| XMLNode * | _parent |
| StrPair | _value |
| int | _parseLineNum |
| XMLNode * | _firstChild |
| XMLNode * | _lastChild |
| XMLNode * | _prev |
| XMLNode * | _next |
| void * | _userData |
Friends | |
| class | XMLDocument |
| class | XMLElement |
XMLNode is a base class for every object that is in the XML Document Object Model (DOM), except XMLAttributes. Nodes have siblings, a parent, and children which can be navigated. A node is always in a XMLDocument. The type of a XMLNode can be queried, and it can be cast to its more defined type.
A XMLDocument allocates memory for all its Nodes. When the XMLDocument gets deleted, all its Nodes will also be deleted.
A Document can contain: Element (container or leaf) Comment (leaf) Unknown (leaf) Declaration( leaf ) An Element can contain: Element (container or leaf) Text (leaf) Attributes (not on tree) Comment (leaf) Unknown (leaf)
|
explicitprotected |
|
protectedvirtual |
|
pure virtual |
Accept a hierarchical visit of the nodes in the TinyXML-2 DOM. Every node in the XML tree will be conditionally visited and the host will be called back via the XMLVisitor interface.
This is essentially a SAX interface for TinyXML-2. (Note however it doesn't re-parse the XML for the callbacks, so the performance of TinyXML-2 is unchanged by using this interface versus any other.)
The interface has been based on ideas from:
Which are both good references for "visiting".
An example of using Accept():
XMLPrinter printer; tinyxmlDoc.Accept( &printer ); const char* xmlcstr = printer.CStr();
Implemented in tinyxml2::XMLDocument, tinyxml2::XMLElement, tinyxml2::XMLUnknown, tinyxml2::XMLDeclaration, tinyxml2::XMLComment, and tinyxml2::XMLText.
| XMLNode* tinyxml2::XMLNode::DeepClone | ( | XMLDocument * | target | ) | const |
Make a copy of this node and all its children.
If the 'target' is null, then the nodes will be allocated in the current document. If 'target' is specified, the memory will be allocated is the specified XMLDocument.
NOTE: This is probably not the correct tool to copy a document, since XMLDocuments can have multiple top level XMLNodes. You probably want to use XMLDocument::DeepCopy()
| void tinyxml2::XMLNode::DeleteChild | ( | XMLNode * | node | ) |
Delete a child of this node.
| void tinyxml2::XMLNode::DeleteChildren | ( | ) |
Delete all the children of this node.
|
inline |
Get the first child node, or null if none exists.
|
inline |
| const XMLElement* tinyxml2::XMLNode::FirstChildElement | ( | const char * | name = 0 | ) | const |
Get the first child element, or optionally the first child element with the specified name.
|
inline |
|
inline |
Get the XMLDocument that owns this XMLNode.
|
inline |
Get the XMLDocument that owns this XMLNode.
|
inline |
Gets the line number the node is in, if the document was parsed from a file.
|
inline |
Get user data set into the XMLNode. TinyXML-2 in no way processes or interprets user data. It is initially 0.
Add a node after the specified child node. If the child node is already part of the document, it is moved from its old location to the new location. Returns the addThis argument or 0 if the afterThis node is not a child of this node, or if the node does not belong to the same document.
Add a child node as the last (right) child. If the child node is already part of the document, it is moved from its old location to the new location. Returns the addThis argument or 0 if the node does not belong to the same document.
Add a child node as the first (left) child. If the child node is already part of the document, it is moved from its old location to the new location. Returns the addThis argument or 0 if the node does not belong to the same document.
|
inline |
Get the last child node, or null if none exists.
|
inline |
| const XMLElement* tinyxml2::XMLNode::LastChildElement | ( | const char * | name = 0 | ) | const |
Get the last child element or optionally the last child element with the specified name.
|
inline |
|
inline |
Get the next (right) sibling node of this node.
|
inline |
| const XMLElement* tinyxml2::XMLNode::NextSiblingElement | ( | const char * | name = 0 | ) | const |
Get the next (right) sibling element of this node, with an optionally supplied name.
|
inline |
|
inline |
Returns true if this node has no children.
|
inline |
Get the parent of this node on the DOM.
|
inline |
|
protectedvirtual |
Reimplemented in tinyxml2::XMLElement, tinyxml2::XMLUnknown, tinyxml2::XMLDeclaration, tinyxml2::XMLComment, and tinyxml2::XMLText.
|
inline |
Get the previous (left) sibling node of this node.
|
inline |
| const XMLElement* tinyxml2::XMLNode::PreviousSiblingElement | ( | const char * | name = 0 | ) | const |
Get the previous (left) sibling element of this node, with an optionally supplied name.
|
inline |
|
inline |
Set user data into the XMLNode. TinyXML-2 in no way processes or interprets user data. It is initially 0.
| void tinyxml2::XMLNode::SetValue | ( | const char * | val, |
| bool | staticMem = false |
||
| ) |
Set the Value of an XML node.
|
pure virtual |
Make a copy of this node, but not its children. You may pass in a Document pointer that will be the owner of the new Node. If the 'document' is null, then the node returned will be allocated from the current Document. (this->GetDocument())
Note: if called on a XMLDocument, this will return null.
Implemented in tinyxml2::XMLDocument, tinyxml2::XMLElement, tinyxml2::XMLUnknown, tinyxml2::XMLDeclaration, tinyxml2::XMLComment, and tinyxml2::XMLText.
|
pure virtual |
Test if 2 nodes are the same, but don't test children. The 2 nodes do not need to be in the same Document.
Note: if called on a XMLDocument, this will return false.
Implemented in tinyxml2::XMLDocument, tinyxml2::XMLElement, tinyxml2::XMLUnknown, tinyxml2::XMLDeclaration, tinyxml2::XMLComment, and tinyxml2::XMLText.
|
inlinevirtual |
Safely cast to a Comment, or null.
Reimplemented in tinyxml2::XMLComment.
|
inlinevirtual |
Reimplemented in tinyxml2::XMLComment.
|
inlinevirtual |
Safely cast to a Declaration, or null.
Reimplemented in tinyxml2::XMLDeclaration.
|
inlinevirtual |
Reimplemented in tinyxml2::XMLDeclaration.
|
inlinevirtual |
Safely cast to a Document, or null.
Reimplemented in tinyxml2::XMLDocument.
|
inlinevirtual |
Reimplemented in tinyxml2::XMLDocument.
|
inlinevirtual |
Safely cast to an Element, or null.
Reimplemented in tinyxml2::XMLElement.
|
inlinevirtual |
Reimplemented in tinyxml2::XMLElement.
|
inlinevirtual |
Safely cast to Text, or null.
Reimplemented in tinyxml2::XMLText.
|
inlinevirtual |
Reimplemented in tinyxml2::XMLText.
|
inlinevirtual |
Safely cast to an Unknown, or null.
Reimplemented in tinyxml2::XMLUnknown.
|
inlinevirtual |
Reimplemented in tinyxml2::XMLUnknown.
| const char* tinyxml2::XMLNode::Value | ( | ) | const |
The meaning of 'value' changes for the specific type.
Document: empty (NULL is returned, not an empty string) Element: name of the element Comment: the comment text Unknown: the tag contents Text: the text string
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |


Two girls hit by car in Glasgow's east end during rush-hour
The youngsters were knocked down on Crown Point Road at 8.50pm this morning.
by Kathleen SpeirsTwo girls have been rushed to hospital after being hit by a car in Glasgow.
The youngsters were knocked down on Crown Point road in the east end of the city at 8.50am this morning.
Police and ambulance crews attended and closed the road down amid rush-hour traffic.
Police officers say there appears to be no series injuries following the early morning crash.
A spokesperson from Police Scotland told the Record: "At 8.50am police were called to Crown Point Road after reports of a collision between a car and two girls.
"Ambulance also attended.
"Details of the condition of the boys are yet to be confirmed.
"At this stage, there appears to be no serious injuries."
A Scottish Ambulance Service spokesman told the Record: "We received a call at 8.43am today to attend an incident on Crown Point Road in Glasgow.
"We dispatched two ambulances and a paramedic response unit to the scene.
"We transported two child patients to Glasgow Children’s Hospital.”


I am a professional IT System Designer and Full Stack Developer creating modern and responsive designs for Web and Mobile. Let us work together. Thank you!
Let's BeginJoining Or Leading developed many J2EE systems, including API services. Smaller or bigger
Name Jawf C Lee
Birthday Nov 27, 1985
Address SIPSuzhou Industrial Park, Suzhou, Jiangsu Province ,China
Phone +86<PHONE_NUMBER>9
Email<EMAIL_ADDRESS>Website www.jawf.site
Github Jawf
Love programming, willing to take challenge tasks, play an important or leading role in the project.
My Major Experience:
1. 2012，Developed John Wiley Journals Distribution System in Singapore；
2. 2012 - 2013，Maintain Singapore Singtel IPTV System in Singapore；
3. 2013 - 2016，Developing and Support for internal Common J2EE Framework.
3. 2016 - till Now，Software Architecture in Yunxuetang with Microservice Architecture, Web+ Education Live Platform.
Follow me on
Social Facebook
Tweet me on
Social Twitter
Pin me on
Social Pinterest


WITNESS LIST Higher Education Committee April 13, 2000-10:00A Interim Charge #2 On: Adams, Jim (The Special Commission on 21st Century Colleges and Universities) Brown, Don (Texas Higher Education Coordinating Board) Krier, Joseph R. (Self and Texas Higher Education Coordinating Board/CEO Gtr. San Antonio Chamber of Commerce) Stevens, John H. (Texas Business and Education Coalition) Tackett, Pamela (State Board for Educator Certification)


{{ $seed := now.Unix }} {{ $post := index (shuffle (where .Site.RegularPages (.Get 0) (.Get 1) )) 0 }} {{ $words := split ($post.RawContent) " " }} {{ $start := mod (add (mul 13 $seed) 97) (len $words) }} {{ $bgimage := partial "bgimage.html" (dict "context" $post "style" "blur") }}
...{{ delimit (first (.Get 2) ( after $start ($words))) " " }}... {{ $post.Title }}


For quite some time now I have been using herbs and LSD to try and unlock those seemingly unreachable parts of my mind. Marijuana and LSD have always held immense meaning in my spiritual world but I was beginning to feel like I was at a stand still with the both of them and all of my philosophies. Feeling determined I decided to try Salvia with my boyfriend Skyler, the person that I have grown spiritually with, the person that I trust with my life. Let it be known that I am a vegan and have respect for all living creatures and find that all hold immense meaning in the fabrication of creation. I also wish to not eat any vegetable that kills the plant such as root vegetables. Therefore coming into this I had limitless respect for this plant.
I loathe and detest organized religion because I believe it to be a tool of control politically, but believe there to be energies working together to weave a pattern of life. I have always loved psychology and learning how the human mind works but before trying Salvia I believed that the effects would not be only physiological but something with more meaning than chemical reactions. I am also into government conspiracies and believe highly that there is an Illuminati trying to control such herbs as Salvia for the purpose of not letting humans know there is something more than what they want us to. In case you are not familiar with the Illuminati, they are believed to be a council that secretly controls the world. But I have taken it a step further and believe that they are succeeding in the take over because they have unbalanced the pattern of life. I think it important for my beliefs to be known so you can understand my experience with Salvia more.
I would suggest that anyone taking Salvia prepare themselves over the course of the day. I spent the day doing my normal activities but I made sure that I was always in a calm state physically and mentally. Yoga is wonderful for these sorts of preparations. I would also suggest drinking green tea to help relax. And when taking any substance I am not familiar with, I make sure I am in a safe place that I feel comfortable in.
(11:03 P.M.) Of course, I asked Skyler to try Salvia first because I am a very petite human being and I was afraid that the Salvia might have a much larger effect on me causing the trip to hit me faster, heighten the effects and capture me for longer. Green tea was consumed not too long before the Salvia journey, so the setting was quite relaxed. The room was clean and simple. The lights were not too bright and the underground trance music was playing at a moderate level of sound. I sat across from my twin bed, which is against my wall vertically.
He was sitting comfortably in the corner of the bed and the wall propped up by pillows. Afraid of the possibility of having the extract sucked through the glass pipe, Skyler wrapped the extract in a Salvia leaf and firmly pushed the herb into the bowl with his thumb. As he took a hit I reminded him to make sure the herb was burning red and to hold in the smoke in as long as possible so the smoke would be almost completely absorbed.
 A minute went by and certain that it was safe to take another hit, he did exactly that. Another minute went by and still nothing except for a feeling he described as of being stuck and held down by weight. This must be the Salvia gravity I have read about. Deciding again that it would be safe to take another hit he loaded the bowl one more time and took an extremely large hit and held it in for twice as long as the last time. When he finally exhaled, a large amount of smoke bellowed out and his gaze changed and I instantly knew he was no longer present.
I studied him for a moment and noticed that the lighter he had in his left hand and the pipe in his right were being twirled lazily by his fingers. He was staring at the ground so I decided to swiftly take the pipe and lighter out of his hands so he did not hurt himself or spill the herb everywhere. I quietly took a few steps back and then his eyes shot over to me and laid an enraged gaze upon me proceeded by the yelling of the word “what”. I was so baffled by this reaction that I could not speak so instead I dropped my mouth open and raised my eyebrow.
My heart was beating at a rapid rate because I thought that he might get up and kill me. He then began to hyperventilate and shouted in a panic, “What did you say?” I told him that I had not said anything and again he angrily asked, “What?” I was so incredibly frightened that I slowly walked over to the bedroom door that led to the hallway as his gaze continued to follow me. I unlocked the door then quickly maneuvered around it, closed the door behind me, then cracked it and watched the experience he was having.
He started looking around with a lost look in his eyes as his shoulders began to move in simultaneous circles. Eventually the rapid circles started to slow and he leaned forward then collapsed just inches before his head would touch the bed. Knowing that I should not interfere I just watched hoping that the plant teacher would not harm him. A minute later he abruptly shot up and looked at me then started laughing hysterically. Puzzled but feeling safer, I decided to step into the room and close the door behind me. The sound of laughter and knowing that he was happy made me laugh and sigh a few times in relief. I wish I could relay everything that he told me but I will not slaughter his experience with trying to piece something so significant together. Instead I will continue with my experience.
Ten minutes went by and all the while time was ticking I was listening to his experience and at the same time asking myself if I should even experiment with such an amazing plant. Skyler encouraged me to give the plant a chance. I realized that this plant had much to offer and the feeling I had let me know that I would be safe on the journey I was about to embark on. The trance was still playing and lights down low but this time I was laying down on my bed with the blankets up to my bust for comfort. The two first hits I took reminded me of the first two Skyler took. I waited a minute and before I took my third hit I soaked in the feeling of being stuck in the reality I was used to and the place the plant wanted to take me to.
The light in the room started to fade from my vision and darkness settled in. I began to see a current and felt myself moved by it. The current started to sweep through my body horizontally. The key points of the current were felt at my feet, my waist and directly through my mouth. Something told me that I needed one more push before I could leave my current reality.
Gravity felt much more intense so I asked Skyler to fill the bowl again. The third hit that I took was amazing and as I held the hit in it felt like I was breathing even though I was not. I finally exhaled, concerned that I had held my breath for far too long. The room became even darker and a grid started to unfold around my room. The grid did not seem normal because it was arched. The lines on the grid took turns being the color black and the color pink but the melding of the objects in my room made the color pink. Skyler become a pink line and faded away into the now swaying grid. I was in a state of such ease that I decided to close my eyes and be swept away from everything I knew.
The bed was no more and I was being cradled by something that I could not see. I began to worry because I felt as though I was melded into something and I soon realized that I was. I tried to move and twitch but I could not, then a voice in my head (not the voice I hear when I think to myself) told me to relax, let myself go and that it would take care of me. Believing the entity with every essence of me, I relaxed and allowed myself to meld even more with what I later realized was the inside of a clock. I was moving and I was a part of time. I could feel the machine and myself rotate and travel within the clock.
My scene transformed slowly and then instantly I began to shoot forward into black space that was revealed to me as time and as I looked around I could see blue lines form and dash past me. The time travel lasted what seemed like an eternity to me and as I was traveling I could feel and hear the entity. This entity was neither male nor female and the voice held no connection to either gender. The entity was watching me and observing but telling me to let it cradle me. I obeyed and let myself be propelled through time with this strange but gentle being.
The color green came into my sight and so did the color gray. I soon realized the green was a vine on the color gray, which was one stone in a wall of hundreds of stones. As I traveled up the vine I noticed that I was in a gap in time. Pink energy was radiating from all around me and crackling without any sound. I then felt that I should focus on the wall and as I did I flew up the vine and into a window in the stonewall. Everything went black and then I realized I was being sucked into the vine and I became the vine and traveled through the makeup of the vine. But instead of everything being scientific all of the veins and particles in the vine were portals to other dimensions. Everything began to sway back and forth again and then I was told it was the wind pushing me. Heh, me the vine!
I smiled and let myself soak in every second of swaying in the wind. The energy of the wind was incredibly positive, letting me know that the place I was now a part of experienced no suffering. Everything the wind had touched had also touched me and I felt the world I was in. I was told to come back soon and before I could question these words I found myself shooting back through time and my eyes abruptly shot open.  I was again stuck between my new reality and the one I had always known. All the while I heard the voice telling me to let myself go again. I decided to obey this entity that I knew I should trust. My vision came back and my room was normal. The feeling of being stuck faded over a course of ten minutes and as soon as I felt let go from the other world everything that had just happened hit me as hard as a brick at high impact.
I would advise all future users to use the plant with much respect. I am not sure if someone disrespectful of the plant would be treated as well as I was. I believe the plant is symbolic and tells us what we need to hear not only through words but also through visions. I have always had a sense of connections with all living beings but I never had the sense that I could become the being and travel through what it has to offer. My philosophies are now seeing new light and following new paths. I must thank this plant for the time it spent with me. I know that for years to come I will further my companionship with this plant for I know I have much more to learn and I am eager.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Top Ten Scores:
Score Name
1 1712 Doomguy: quit on level 8.
22439
22439
Waiting for next block before bailout
(Doomguy) found baton 2dfa2db6cb30d51f9c8e5460f05005f0204e9a9ebe449ac9fe82ccc47abe5f2a numkeys.4481 seed.992301165794668517 playerdata.916
replay finished but readchar called
gold.974 hp.37 strength.8 level.6 exp.312 dungeon.7 data[1228]
extracted $$$gold.974 hp.37 strength.8 level.6 exp.312 dl.7 n.1 size.1228
A little bit longer


(Deprecated API)
(Deprecated API)
(Deprecated API)
Includes enterprise licensing and support
This is the fifth article in our series on using PHP/MySQL with Google Geo APIs. If you're a PHP/MySQL developer, you may also be interested in our articles on loading markers from a database and creating KML from a database.
This tutorial is intended for developers who are familiar with PHP/MySQL, and want to learn how to use Google Maps with a MySQL database to create a store locator-type app. After completing this tutorial, you will have a database of locations and a webpage that lets a user enter their address and see markers on a map for the locations nearest to them, within a chosen distance restriction.
The tutorial is broken up into the following steps:
When you create the MySQL table, you want to pay particular
attention to the lat
and lng
attributes.
With the current zoom capabilities of Google Maps, you should only
need 6 digits of precision after the decimal. To keep the storage
space required for our table at a minimum, you can specify that the
lat
and lng
attributes are floats of size
(10,6). That will let the fields store 6 digits after the decimal,
plus up to 4 digits before the decimal, e.g. -123.456789 degrees.
Your table should also have an id
attribute to serve as
the primary key.
Note: This tutorial uses location data that already have latitude and longitude information needed to plot corresponding markers. If you're trying to use your own data that don't yet have that information, use a batch geocoding service to convert the addresses into latitudes/longitudes. You can check out our tutorial on using the Google Maps API geocoder, or check out this link for a good list of geocoders: http://groups.google.com/group/Google-Maps-API/web/resources-non-google-geocoders
If you prefer interacting with your database through the phpMyAdmin interface, here's a screenshot of the table creation.
If you don't have access to phpMyAdmin or prefer using SQL commands instead, here's the SQL statement that creates the table. phpsqlajax_createtable.sql:
CREATE TABLE `markers` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` VARCHAR( 60 ) NOT NULL , `address` VARCHAR( 80 ) NOT NULL , `lat` FLOAT( 10, 6 ) NOT NULL , `lng` FLOAT( 10, 6 ) NOT NULL ) ENGINE = MYISAM ;
After creating the table, it's time to populate it with data. The sample data we provide below is for about 180 pizzarias scattered across the United States. In phpMyAdmin, you can use the IMPORT tab to import various file formats, including CSV (comma-separated values). Microsoft Excel and Google Spreadsheets both export to CSV format, so you can easily transfer data from spreadsheets to MySQL tables through exporting/importing CSV files.
Here's a snippet of the sample data in CSV format. phpsqlsearch_data.csv:
Frankie Johnnie & Luigo Too,"939 W El Camino Real, Mountain View, CA",37.386339,-122.085823 Amici's East Coast Pizzeria,"790 Castro St, Mountain View, CA",37.38714,-122.083235 Kapp's Pizza Bar & Grill,"191 Castro St, Mountain View, CA",37.393885,-122.078916 Round Table Pizza: Mountain View,"570 N Shoreline Blvd, Mountain View, CA",37.402653,-122.079354 Tony & Alba's Pizza & Pasta,"619 Escuela Ave, Mountain View, CA",37.394011,-122.095528 Oregano's Wood-Fired Pizza,"4546 El Camino Real, Los Altos, CA",37.401724,-122.114646 ...
Here's a screenshot of the import options used to transform this CSV into table data:
If you'd rather not use the phpMyAdmin interface, here's a snippet of the SQL statements that accomplish the same results. phpsqlsearch_data.sql:
INSERT INTO `markers` (`name`, `address`, `lat`, `lng`) VALUES ('Frankie Johnnie & Luigo Too','939 W El Camino Real, Mountain View, CA','37.386339','-122.085823'); INSERT INTO `markers` (`name`, `address`, `lat`, `lng`) VALUES ('Amici\'s East Coast Pizzeria','790 Castro St, Mountain View, CA','37.38714','-122.083235'); INSERT INTO `markers` (`name`, `address`, `lat`, `lng`) VALUES ('Kapp\'s Pizza Bar & Grill','191 Castro St, Mountain View, CA','37.393885','-122.078916'); INSERT INTO `markers` (`name`, `address`, `lat`, `lng`) VALUES ('Round Table Pizza: Mountain View','570 N Shoreline Blvd, Mountain View, CA','37.402653','-122.079354'); INSERT INTO `markers` (`name`, `address`, `lat`, `lng`) VALUES ('Tony & Alba\'s Pizza & Pasta','619 Escuela Ave, Mountain View, CA','37.394011','-122.095528'); INSERT INTO `markers` (`name`, `address`, `lat`, `lng`) VALUES ('Oregano\'s Wood-Fired Pizza','4546 El Camino Real, Los Altos, CA','37.401724','-122.114646'); ...
To find locations in our markers
table that are within a certain radius distance of a given latitude/longitude, you can use a SELECT
statement based on the Haversine formula. The Haversine formula is used generally for computing great-circle distances between two pairs of coordinates on a sphere. An in-depth mathemetical explanation is given by Wikipedia and a good discussion of the formula as it relates to programming is on Movable Type's site.
Here's the SQL statement that will find the closest 20 locations that are within a radius of 25 miles to the 37, -122 coordinate. It calculates the distance based on the latitude/longitude of that row and the target latitude/longitude, and then asks for only rows where the distance value is less than 25, orders the whole query by distance, and limits it to 20 results. To search by kilometers instead of miles, replace 3959 with 6371.
SELECT id, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(-122) ) + sin( radians(37) ) * sin( radians( lat ) ) ) ) AS distance FROM markers HAVING distance < 25 ORDER BY distance LIMIT 0 , 20;
Now that you have the table and the SQL statement, you can put them together to output the search results into an XML format that our map can retrieve through asynchronous JavaScript calls. If the code provided here does not work with your PHP configuration, read through the Outputting XML with PHP section of our Using PHP/MySQL with Google Maps article. The only difference between the various PHP code samples shown there and the code needed for this article will be the SQL statement and the rows that are outputted in the XML.
First, you should put your database connection information in a separate file. This is generally a good idea whenever you're using PHP to access a database, as it keeps your confidential information in a file that you won't be tempted to share. In the Maps API forum, we've occasionally had people accidentally publish their database connection information when they were just trying to debug their XML-outputting code. The file should look like this, but with your own database information filled in. phpsqlsearch_dbinfo.php:
<? $username="username"; $password="password"; $database="username-databaseName"; ?>
First, check your configuration and see if you're using PHP5. If so, continue to the explanation and code below. If you aren't, then you can use echo
to output XML, as used in this sample code.
In PHP, first initialize a new XML document and create the "markers" parent node. Then connect to the database, execute the SELECT
by distance query discussed above on the markers table, and iterate through the results.For each row in the table (each location), create a new XML node with the row attributes as XML attributes, and append it to the parent node. Then dump the XML to the screen.
Note: Since this PHP sends user input in a MySQL statement, this code uses the mysql_real_escape_string
technique of avoiding SQL injection. A more elegant solution may be to use MySQL prepared statements, though implementation varies on the PHP version and DB wrapper used.
Note: If your database contains international characters or you otherwise need to force UTF-8 output, you can use utf8_encode
on the outputted data.
The PHP file that does all that is shown below (phpsqlsearch_genxml.php):
<?php require("phpsqlsearch_dbinfo.php"); // Get parameters from URL $center_lat = $_GET["lat"]; $center_lng = $_GET["lng"]; $radius = $_GET["radius"]; // Start XML file, create parent node $dom = new DOMDocument("1.0"); $node = $dom->createElement("markers"); $parnode = $dom->appendChild($node); // Opens a connection to a mySQL server $connection=mysql_connect (localhost, $username, $password); if (!$connection) { die("Not connected : " . mysql_error()); } // Set the active mySQL database $db_selected = mysql_select_db($database, $connection); if (!$db_selected) { die ("Can\'t use db : " . mysql_error()); } // Search the rows in the markers table $query = sprintf("SELECT address, name, lat, lng, ( 3959 * acos( cos( radians('%s') ) * cos( radians( lat ) ) * cos( radians( lng ) - radians('%s') ) + sin( radians('%s') ) * sin( radians( lat ) ) ) ) AS distance FROM markers HAVING distance < '%s' ORDER BY distance LIMIT 0 , 20", mysql_real_escape_string($center_lat), mysql_real_escape_string($center_lng), mysql_real_escape_string($center_lat), mysql_real_escape_string($radius)); $result = mysql_query($query); $result = mysql_query($query); if (!$result) { die("Invalid query: " . mysql_error()); } header("Content-type: text/xml"); // Iterate through the rows, adding XML nodes for each while ($row = @mysql_fetch_assoc($result)){ $node = $dom->createElement("marker"); $newnode = $parnode->appendChild($node); $newnode->setAttribute("name", $row['name']); $newnode->setAttribute("address", $row['address']); $newnode->setAttribute("lat", $row['lat']); $newnode->setAttribute("lng", $row['lng']); $newnode->setAttribute("distance", $row['distance']); } echo $dom->saveXML(); ?>
Call this PHP script from the browser to make sure it's producing
valid XML. If you suspect there's a problem with connecting to your
database, you may find it easier to debug if you remove the line in
the file that sets the header to the text/xml
content
type, as that usually causes your browser to try to parse XML and may
make it difficult to see your debugging messages.
If the script is working correctly and you append reasonable sample query parameters to the URL (e.g. ?lat=37&lng=-122&radius=25
), you should see XML output like this (phpsqlsearch_expectedoutput.xml):
<?xml version="1.0"?> <markers><marker name="Round Table Pizza: Mountain View" address="570 N Shoreline Blvd, Mountain View, CA" lat="37.402653" lng="-122.079353" distance="0.38091455044131"/> <marker name="Kapp's Pizza Bar & Grill" address="191 Castro St, Mountain View, CA" lat="37.393887" lng="-122.078918" distance="0.5596115438175"/> <marker name="Amici's East Coast Pizzeria" address="790 Castro St, Mountain View, CA" lat="37.387138" lng="-122.083237" distance="1.0796074495809"/> <marker name="Frankie Johnnie & Luigo Too" address="939 W El Camino Real, Mountain View, CA" lat="37.386337" lng="-122.085823" distance="1.2044231336188"/> <marker name="Tony & Alba's Pizza & Pasta" address="619 Escuela Ave, Mountain View, CA" lat="37.394012" lng="-122.095528" distance="1.3156538737837"/><marker name="Round Table Pizza: Sunnyvale-Mary-Central Expy" address="415 N Mary Ave, Sunnyvale, CA" lat="37.390038" lng="-122.042030" distance="1.84565061776"/> <marker name="Oregano's Wood-Fired Pizza" address="4546 El Camino Real, Los Altos, CA" lat="37.401726" lng="-122.114647" distance="2.2887425990519"/> ... </markers>
Once the XML is working in the browser, it's time to move on to actually creating the map with JavaScript. If you have never created a Google Map, please try some of the basic examples in the documentation to make sure you understand the basics of creating a Google Map.
Our PHP script takes latitude and longitude parameters in order to perform the search. Since most people who use your map will know their address but not their coordinates, you can use the GClientGeocoder
searchLocations function shown below which just passes in the address from the textbox to the asynchronous GClientGeocoder.getLatLng() function, gets a GLatLng
in response, and sends it off to the searchLocationsNear
function if the geocode was successful.
function searchLocations() { var address = document.getElementById('addressInput').value; geocoder.getLatLng(address, function(latlng) { if (!latlng) { alert(address + ' not found'); } else { searchLocationsNear(latlng); } }); }
The searchLocationsNear
function shown below will pass the latitude and longitude values to our PHP script, and use the asynchronous GDownloadURL
function to load the XML outputted into our page. GDownloadURL
is a wrapper for the XMLHttpRequest
that's used to request an XML file from the server where the HTML page resides. It takes the URL as the first parameter and passes the retrieved data to the callback function, if successful.
In the callback function, you need to find all the "marker"
elements in the XML, and iterate through them. For each marker element
you find, retrieve the name, address, distance, and lat/lng attributes
and pass them to createMarker
and createSidebarEntry
to create the marker and sidebar entry. You can also figure out the optimal viewport for the returned results by using GLatLngBounds.extend
, GLatLngBounds.getCenter
and GMap2.getBoundsZoomLevel
.
function searchLocationsNear(center) { var radius = document.getElementById('radiusSelect').value; var searchUrl = 'phpsqlsearch_genxml.php?lat=' + center.lat() + '&lng=' + center.lng() + '&radius=' + radius; GDownloadUrl(searchUrl, function(data) { var xml = GXml.parse(data); var markers = xml.documentElement.getElementsByTagName('marker'); map.clearOverlays(); var sidebar = document.getElementById('sidebar'); sidebar.innerHTML = ''; if (markers.length == 0) { sidebar.innerHTML = 'No results found.'; map.setCenter(new GLatLng(40, -100), 4); return; } var bounds = new GLatLngBounds(); for (var i = 0; i < markers.length; i++) { var name = markers[i].getAttribute('name'); var address = markers[i].getAttribute('address'); var distance = parseFloat(markers[i].getAttribute('distance')); var point = new GLatLng(parseFloat(markers[i].getAttribute('lat')), parseFloat(markers[i].getAttribute('lng'))); var marker = createMarker(point, name, address); map.addOverlay(marker); var sidebarEntry = createSidebarEntry(marker, name, address, distance); sidebar.appendChild(sidebarEntry); bounds.extend(point); } map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds)); }); }
In the createMarker
function shown below, you just create a marker at the given GLatLng
, and add an event listener to the marker so that when clicked, an info window is displayed showing the name and address.
function createMarker(point, name, address) { var marker = new GMarker(point); var html = '' + name + '
' + address; GEvent.addListener(marker, 'click', function() { marker.openInfoWindowHtml(html); }); return marker; }
In the createSidebarEntry
function shown below, you create a div with the name, address, and distance information, and then add event listeners to the div so that it changes background color on mouseover (a nice UI touch), and opens the info window over the marker on click by triggering the marker's click event.
function createSidebarEntry(marker, name, address, distance) { var div = document.createElement('div'); var html = '' + name + ' (' + distance.toFixed(1) + ')
' + address; div.innerHTML = html; div.style.cursor = 'pointer'; div.style.marginBottom = '5px'; GEvent.addDomListener(div, 'click', function() { GEvent.trigger(marker, 'click'); }); GEvent.addDomListener(div, 'mouseover', function() { div.style.backgroundColor = '#eee'; }); GEvent.addDomListener(div, 'mouseout', function() { div.style.backgroundColor = '#fff'; }); return div; }
Here's a screenshot and code for the webpage that ties everything together (phpsqlsearch_map.html). When the page loads, the load
function is called. This
function sets up the map and initializes the geocoder.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">   <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Google Maps AJAX + MySQL/PHP Example</title>     Address: <input type="text" id="addressInput"/> Radius: <select id="radiusSelect"> <option value="25" selected>25</option> <option value="100">100</option> <option value="200">200</option> </select> <input type="button" onclick="searchLocations()" value="Search Locations"/>

Now that you have a store locator for your website, consider extending it with more features. Some ideas:
maxContent
option), and you can also add quick links for the user to zoom in to that location or get driving directions to/from that location.


Custom formats can be used with the jQuery UI DatePicker through the dateFormat
option which can be specified for date
field types. The formatting options are defined by jQuery UI's formatDate
method.
This example shows two different date fields which are displayed using different formats - the first is in the US m/d/y format while the second is a more verbose format.
| First name | Last name | Updated date | Registered date |
|---|
The Javascript shown below is used to initialise the table shown in this example:
var editor; // use a global for the submit and return data rendering in the examples
$(document).ready(function() {
editor = new $.fn.dataTable.Editor( {
ajax: '../php/dates.php?format=custom',
table: '#example',
fields: [ {
label: 'First name:',
name: 'first_name'
}, {
label: 'Last name:',
name: 'last_name'
}, {
label: 'Updated date:',
name: 'updated_date',
type: 'date',
def: function () { return new Date(); },
dateFormat: 'm/d/yy'
}, {
label: 'Registered date:',
name: 'registered_date',
type: 'date',
def: function () { return new Date(); },
dateFormat: 'DD d MM yy'
}
]
} );
$('#example').DataTable( {
dom: 'Bfrtip',
ajax: '../php/dates.php?format=custom',
columns: [
{ data: 'first_name' },
{ data: 'last_name' },
{ data: 'updated_date' },
{ data: 'registered_date' }
],
select: true,
buttons: [
{ extend: 'create', editor: editor },
{ extend: 'edit', editor: editor },
{ extend: 'remove', editor: editor }
]
} );
} );
In addition to the above code, the following Javascript library files are loaded for use in this example:
The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:
This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The additional CSS used is shown below:
The following CSS library files are loaded for use in this example to provide the styling of the table:
This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is loaded.
The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side processing scripts can be written in any language, using the protocol described in the DataTables documentation.


Popular stores: Kohls, Famous Footwear, Starbucks, eBay, Amazon
By pressing Subscribe you are agreeing to get our weekly newsletter. You can opt out anytime.


I have decided to create my comic strip based on stills from the hugely successful 1977 film Star Wars Episode IV: A New Hope. Written and Directed by George Lucas it is the first film released in the saga and the fourth chronologically.
Star Wars is one of the highest grossing film franchises of all time. It is set in a distant galaxy in the distant past and tells the story of the epic battle between the Jedi and the Sith. It is referenced in many films and television programmes and has spawned many spoof versions such as Spaceballs and Family Guy: Blue Harvest. Lucasfilm also produced its own animated television series and animated feature film as well as a collection of video games. There are also a large amount of books published about the Star Wars universe. There are six films currently in the franchise with a seventh set for production by Disney.
I have chosen to do my comic on the scene from Episode IV: A New Hope where Darth Vader battles Obi Wan Kenobi and ultimately defeats him. This is an important point in the films plot as Kenobi’s last line to Darth Vader before being reduced to a pile of robes is “If you strike me down then I will become more powerful than you can possibly imagine.” Luke Skywalker witnesses the death of his mentor only to realise the importance of Obi Wans sacrifice later in the film.
The comic will be accompanied by a website that describes its creative design and hosts the comic in a complimentary environment.


This application will allow you to quickly upload files to Rackspace Cloud Files and share those files with others.


Page Bottom
This is a site that will be primarily focussing on Tech Ideas I have and who I am.
I think a good goal to have for this is just a chill place to post ideas. If people want to do them or add on to them I think thats cool.
Page Top


{% extends "template.html" %}
{% block body %}
This app is meant to control actuators or code running on your raspberry PI.
With this app you can also visualise measurements made by your raspberry PI, or by any other source and record them.
to make it all work, follow these instructions:
import socketio import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) sio = socketio.Client() # put here your code execution methods # make sure you make the name of your method equal to the name of your controller in de app # the method below is an example where a led blinks two times when executed def blink(value): if value == "HIGH": print("LED on") GPIO.output(17,GPIO.HIGH) time.sleep(1) print("LED off") GPIO.output(17,GPIO.LOW) time.sleep(1) print("LED on") GPIO.output(17,GPIO.HIGH) time.sleep(1) print("LED off") GPIO.output(17,GPIO.LOW) time.sleep(1) # def yourcontrollername(value): # connection and disconnection @sio.event def connect(): print('connection established') sio.emit('test',{'hoi': 'hoi'}) print('my sid is', sio.sid) @sio.event def disconnect(): print('disconnected from server') quit() @sio.event def connect_error(): print("The connection failed!") # code to give a boolean output or duty cycle to the pin # nothing needs to be changed here @sio.on("announceswitch") def switch(data): # if toggle switch if data['type'] == "toggle": GPIO.setmode(GPIO.BCM) dictoutput={'LOW': GPIO.LOW, 'HIGH': GPIO.HIGH} GPIO.setup(dictpins[data['pin']],GPIO.OUT) GPIO.output(dictpins[data['pin']],dictoutput[data['value']]) # if slider if data['type'] == "slider": GPIO.setmode(GPIO.BCM) GPIO.setup(int([data['pin']), GPIO.OUT) pwm = GPIO.PWM(int(data['pin']),50) pwm.start(0) pwm.ChangeDutyCycle(int(data['value'])) time.sleep(0.2) pwm.stop() GPIO.cleanup() # if execute code if data['type'] == "execute": GPIO.setmode(GPIO.BCM) GPIO.setup(int([data['pin'], GPIO.OUT) globals()[data['name']](data['value']) sio.connect('http://<IP_ADDRESS>:5000/') # fill in here the webadress of the app to create a socket connection try: sio.sleep(1) except KeyboardInterrupt: quit()
# handling measurements def measure(): while True: now = datetime.datetime.now() hour = '{:02d}'.format(now.hour) minute = '{:02d}'.format(now.minute) second = '{:02d}'.format(now.second) x = '{}-{}-{}'.format(hour, minute, second) # get here your Y value from GPIO sensor data or something else... y = randint(0, 10) # fill in here your measurementname, it should be the same as the name of the measurementname in the App measurementname = "" # fill in here your timestep between two measurements. timestep = 1 sio.emit("updatedata", {'measurementname': measurementname,'time': x, 'value': y}) time.sleep(timestep) # change this to change the time interval between two data points measure()


|
helix_c99
<IP_ADDRESS>
Public API of Helix using C99 standard
|
Functions | |
| invokeStatus_t | blakfx_helix_accountCreate (const char *userName) |
| Creates a new account with a given username. All previously generated keys for the account in local key storage will be deleted. More... | |
| invokeStatus_t | blakfx_helix_accountDelete (const char *userName) |
| Deletes a local account with a given username. More... | |
| invokeStatus_t | blakfx_helix_accountLogin (const char *userName) |
| Login to an existing account with a given username. More... | |
| invokeStatus_t | blakfx_helix_apiCreateUID (uint8_t *inputBuffer16Bytes, size_t inputBufferSize) |
| void | blakfx_helix_apiShutdown (void) |
| Shut down/cleanup of Helix API module Helix module does a great deal of background work: key-generation, communication with key-server, in addition to asynchronous encryption and decryption processes. It is imperative to allow Helix module to step through orderly shutdown process in order to prevent unlikely but possible local-data corruption. More... | |
| invokeStatus_t | blakfx_helix_apiStartup (const char *serverIP, uint16_t port, int64_t flags) |
| Starts the Helix API module Helix module is composed of various components that will be loaded/activated on demand by the caller. This allows clients of Helix to minimize the start-time, optimize resource utilization, and segment Helix usage by various differentiating factors. More... | |
| invokeStatus_t | blakfx_helix_apiStartup_Advanced (const char *serverIP, uint16_t port, const char *customDUID, int64_t flags, void *reserved) |
| Starts the Helix API module, with more options available. More... | |
| promiseStatusAndFlags_t | blakfx_helix_cPromiseManager_getStatus (PROMISE_ID promise_ID) |
| Get the status of a specific promise. More... | |
| invokeStatus_t | blakfx_helix_decryptGetOutputData (DECRYPT_ID decrypt_id, uint8_t **data, size_t *length) |
| Get the result of a given decryption task. More... | |
| DECRYPT_ID | blakfx_helix_decryptStart (uint8_t *cipherData, size_t cipherMessageSize, const char *password, option_t anInvocationOptions) |
| Start decrypting some encrypted blob. More... | |
| invokeStatus_t | blakfx_helix_encryptConclude (ENCRYPT_ID encrypt_id) |
| Conclude/wrap up a given encryption task. More... | |
| invokeStatus_t | blakfx_helix_encryptGetOutputData (ENCRYPT_ID encrypt_id, uint8_t **serializedOut, size_t *length, option_t anInvocationOptions) |
| Get the result of a given encryption task. More... | |
| invokeStatus_t | blakfx_helix_encryptOutputExists (ENCRYPT_ID encrypt_id) |
| Check whether encrypt output exists. More... | |
| uint8_t * | blakfx_helix_encryptPayloadGetSerialized (ENCRYPT_ID encrypt_id, size_t *length) |
| Get the serialized payload of a given encryption task. More... | |
| invokeStatus_t | blakfx_helix_encryptPayloadSerializedRelease (ENCRYPT_ID encrypt_id, uint8_t *serialized) |
| Release the serialized payload of a given encryption task. More... | |
| ENCRYPT_ID | blakfx_helix_encryptStart (USER_ID user_id, const void *data, size_t dataSize, const char *password, const char *fileName, option_t anInvocationOptions) |
| Start encrypting some content intended for a given target user. More... | |
| void * | blakfx_helix_getUserData (PROMISE_ID promise_ID, uint64_t user_data_id, size_t *length) |
| Get the data for a given user. More... | |
| invokeStatus_t | blakfx_helix_serverConnect (void) |
| Connect to previously specified (see blakfx_helix_apiStartup ) Helix key-server. Helix module publishes and exchanges public cryptographic keys with its key-server, in order to facilitate cryptographically secure End-to-End communication. More... | |
| invokeStatus_t | blakfx_helix_serverDisconnect (void) |
| Sever active connection to Helix key-server Helix operates numerous background tasks allowing clients to complete complex cryptographic operations seamlessly. To prevent unlikely but possible corruption, it is crucial for Helix users to allow Helix module to complete orderly disconnect from its key-server. More... | |
| invokeStatus_t | blakfx_helix_serverIsConnected (void) |
| Checks whether connection to previously defined key-server is alive (in valid state and responsive). This method is added for posterity, however avoid overusing it or placing it in your execution critical path - it's execution is network-bound. Under normal circumstances, it safe to assume the connection is active, and check for error conditions of Helix API calls in the critical-path. This method is appropriate for use as connectivity test after long period is inactivity. In all other situations - use of this API is superfluous and suboptimal. More... | |
| PROMISE_ID | blakfx_helix_simpleSearchForRecipientByEmail (const char *lookup, int64_t waitInMillis) |
| Search for an account with a given email on the current Helix Key Server. More... | |
| PROMISE_ID | blakfx_helix_simpleSearchForRecipientByName (const char *lookup, int64_t waitInMillis) |
| Search for an account with a given username on the current Helix Key Server. More... | |
| USER_ID | blakfx_helix_userFindByEmail (const char *emailAddress, invokeStatus_t *result, blakfx_helix_event_handler_t crypto_notification_function) |
| Search for an user with a given email on the current Helix Key Server. More... | |
| PROMISE_ID | blakfx_helix_userFindByEmailAsPromise (const char *emailAddress, invokeStatus_t *result, blakfx_helix_event_handler_t promise_notification_function) |
| Search for an account with a given email on the current Helix Key Server. More... | |
| USER_ID | blakfx_helix_userFindByName (const char *userName, invokeStatus_t *result, blakfx_helix_event_handler_t crypto_notification_function) |
| Search for an user with a given username on the current Helix Key Server. More... | |
| PROMISE_ID | blakfx_helix_userFindByNameAsPromise (const char *userName, invokeStatus_t *result, blakfx_helix_event_handler_t promise_notification_function) |
| Search for an account with a given username on the current Helix Key Server. More... | |
| invokeStatus_t | blakfx_helix_userRelease (USER_ID user_id) |
| Release an user. More... | |
| invokeStatus_t | blakfx_helix_userValidate (USER_ID user_id) |
| Ensure that an user is valid. More... | |
| invokeStatus_t | blakfx_helix_waitEvent (PROMISE_ID crypto_ID, int64_t time_in_ms) |
| Waits for an event for a specific time. More... | |
| promiseStatusAndFlags_t | blakfx_helix_waitEventStatus (PROMISE_ID crypto_ID) |
| Retrieve status of the promise (referencing a promise to complete some operation) by its unique id. More... | |
| invokeStatus_t blakfx_helix_accountCreate | ( | const char * | userName | ) |
Creates a new account with a given username. All previously generated keys for the account in local key storage will be deleted.
| [in] | userName | the username for the account |
| invokeStatus_t blakfx_helix_accountDelete | ( | const char * | userName | ) |
Deletes a local account with a given username.
| [in] | userName | the username for the account |
| invokeStatus_t blakfx_helix_accountLogin | ( | const char * | userName | ) |
Login to an existing account with a given username.
| [in] | userName | the username for the account |
| invokeStatus_t blakfx_helix_apiCreateUID | ( | uint8_t * | inputBuffer16Bytes, |
| size_t | inputBufferSize | ||
| ) |
| void blakfx_helix_apiShutdown | ( | void | ) |
Shut down/cleanup of Helix API module Helix module does a great deal of background work: key-generation, communication with key-server, in addition to asynchronous encryption and decryption processes. It is imperative to allow Helix module to step through orderly shutdown process in order to prevent unlikely but possible local-data corruption.
| invokeStatus_t blakfx_helix_apiStartup | ( | const char * | serverIP, |
| uint16_t | port, | ||
| int64_t | flags | ||
| ) |
Starts the Helix API module Helix module is composed of various components that will be loaded/activated on demand by the caller. This allows clients of Helix to minimize the start-time, optimize resource utilization, and segment Helix usage by various differentiating factors.
| [in] | serverIP | the IP/hostname of the Helix Key Server to connect to |
| [in] | port | the port of the Helix Key Server to connect to |
| [in] | flags | additional flags |
| invokeStatus_t blakfx_helix_apiStartup_Advanced | ( | const char * | serverIP, |
| uint16_t | port, | ||
| const char * | customDUID, | ||
| int64_t | flags, | ||
| void * | reserved | ||
| ) |
Starts the Helix API module, with more options available.
| [in] | serverIP | the IP/hostname of the Helix Key Server to connect to |
| [in] | port | the port of the Helix Key Server to connect to |
| [in] | customDUID | a fake custom device UID |
| [in] | flags | additional flags |
| [in] | reserved | unused |
| promiseStatusAndFlags_t blakfx_helix_cPromiseManager_getStatus | ( | PROMISE_ID | promise_ID | ) |
Get the status of a specific promise.
| [in] | promise_ID | the ID of the promise to get the status of |
| invokeStatus_t blakfx_helix_decryptGetOutputData | ( | DECRYPT_ID | decrypt_id, |
| uint8_t ** | data, | ||
| size_t * | length | ||
| ) |
Get the result of a given decryption task.
| [in] | decrypt_id | the ID of the decryption to get the result of |
| [out] | data | buffer to place the result of the decryption |
| [out] | length | the length of the decrypted data |
| DECRYPT_ID blakfx_helix_decryptStart | ( | uint8_t * | cipherData, |
| size_t | cipherMessageSize, | ||
| const char * | password, | ||
| option_t | anInvocationOptions | ||
| ) |
Start decrypting some encrypted blob.
| [in] | cipherData | the encrypted blob |
| [in] | cipherMessageSize | the size of the encrypted blob |
| [in] | password | optional password to decrypt with |
| [in] | anInvocationOptions | additional options to specify |
| invokeStatus_t blakfx_helix_encryptConclude | ( | ENCRYPT_ID | encrypt_id | ) |
Conclude/wrap up a given encryption task.
| [in] | encrypt_id | the ID of the encryption to conclude |
| invokeStatus_t blakfx_helix_encryptGetOutputData | ( | ENCRYPT_ID | encrypt_id, |
| uint8_t ** | serializedOut, | ||
| size_t * | length, | ||
| option_t | anInvocationOptions | ||
| ) |
Get the result of a given encryption task.
| [in] | encrypt_id | the ID of the encryption to get the result of |
| [out] | serializedOut | buffer to place the result of the encryption |
| [out] | length | the length of the encrypted data |
| [in] | anInvocationOptions | additional options to specify |
| invokeStatus_t blakfx_helix_encryptOutputExists | ( | ENCRYPT_ID | encrypt_id | ) |
Check whether encrypt output exists.
| [in] | encrypt_id | the ID of the encryption to check |
| uint8_t* blakfx_helix_encryptPayloadGetSerialized | ( | ENCRYPT_ID | encrypt_id, |
| size_t * | length | ||
| ) |
Get the serialized payload of a given encryption task.
| [in] | encrypt_id | the ID of the encryption to get the result of |
| [out] | length | the length of the encrypted data |
| invokeStatus_t blakfx_helix_encryptPayloadSerializedRelease | ( | ENCRYPT_ID | encrypt_id, |
| uint8_t * | serialized | ||
| ) |
Release the serialized payload of a given encryption task.
| [in] | encrypt_id | the ID of the encryption to release the serialized payload of |
| [in] | serialized | the serialized payload data |
| ENCRYPT_ID blakfx_helix_encryptStart | ( | USER_ID | user_id, |
| const void * | data, | ||
| size_t | dataSize, | ||
| const char * | password, | ||
| const char * | fileName, | ||
| option_t | anInvocationOptions | ||
| ) |
Start encrypting some content intended for a given target user.
| [in] | user_id | the ID of the target user |
| [in] | data | the content to encrypt |
| [in] | dataSize | the size of the content to encrypt |
| [in] | password | optional password to encrypt with |
| [in] | fileName | optional name/path for file with content to encrypt |
| [in] | anInvocationOptions | additional options |
| void* blakfx_helix_getUserData | ( | PROMISE_ID | promise_ID, |
| uint64_t | user_data_id, | ||
| size_t * | length | ||
| ) |
Get the data for a given user.
| [in] | promiseID | the promiseID to find the data for |
| [in] | user_data_id | the user's data ID |
| [out] | length | the length of the user's data |
| invokeStatus_t blakfx_helix_serverConnect | ( | void | ) |
Connect to previously specified (see blakfx_helix_apiStartup ) Helix key-server. Helix module publishes and exchanges public cryptographic keys with its key-server, in order to facilitate cryptographically secure End-to-End communication.
| invokeStatus_t blakfx_helix_serverDisconnect | ( | void | ) |
Sever active connection to Helix key-server Helix operates numerous background tasks allowing clients to complete complex cryptographic operations seamlessly. To prevent unlikely but possible corruption, it is crucial for Helix users to allow Helix module to complete orderly disconnect from its key-server.
| invokeStatus_t blakfx_helix_serverIsConnected | ( | void | ) |
Checks whether connection to previously defined key-server is alive (in valid state and responsive). This method is added for posterity, however avoid overusing it or placing it in your execution critical path - it's execution is network-bound. Under normal circumstances, it safe to assume the connection is active, and check for error conditions of Helix API calls in the critical-path. This method is appropriate for use as connectivity test after long period is inactivity. In all other situations - use of this API is superfluous and suboptimal.
| PROMISE_ID blakfx_helix_simpleSearchForRecipientByEmail | ( | const char * | lookup, |
| int64_t | waitInMillis | ||
| ) |
Search for an account with a given email on the current Helix Key Server.
| [in] | lookup | the email address of the target |
| [in] | waitInMillis | the time in ms to attempt the search in |
| PROMISE_ID blakfx_helix_simpleSearchForRecipientByName | ( | const char * | lookup, |
| int64_t | waitInMillis | ||
| ) |
Search for an account with a given username on the current Helix Key Server.
| [in] | lookup | the username for the target account |
| [in] | waitInMillis | the time in ms to attempt the search in |
| USER_ID blakfx_helix_userFindByEmail | ( | const char * | emailAddress, |
| invokeStatus_t * | result, | ||
| blakfx_helix_event_handler_t | crypto_notification_function | ||
| ) |
Search for an user with a given email on the current Helix Key Server.
!
| [in] | emailAddress | the email address of the target |
| [out] | result | the result of the search operation |
| [in] | blakfx_helix_event_handler_t | register custom function to be executed as registered event handler with promise status notification |
| PROMISE_ID blakfx_helix_userFindByEmailAsPromise | ( | const char * | emailAddress, |
| invokeStatus_t * | result, | ||
| blakfx_helix_event_handler_t | promise_notification_function | ||
| ) |
Search for an account with a given email on the current Helix Key Server.
!
| [in] | emailAddress | the email address of the target |
| [out] | result | the result of the search operation |
| [in] | blakfx_helix_event_handler_t | register custom function to be executed as registered event handler with promise status notification |
| USER_ID blakfx_helix_userFindByName | ( | const char * | userName, |
| invokeStatus_t * | result, | ||
| blakfx_helix_event_handler_t | crypto_notification_function | ||
| ) |
Search for an user with a given username on the current Helix Key Server.
!
| [in] | userName | the name of the target |
| [out] | result | the result of the search operation |
| [in] | blakfx_helix_event_handler_t | register custom function to be executed as registered event handler with promise status notification |
| PROMISE_ID blakfx_helix_userFindByNameAsPromise | ( | const char * | userName, |
| invokeStatus_t * | result, | ||
| blakfx_helix_event_handler_t | promise_notification_function | ||
| ) |
Search for an account with a given username on the current Helix Key Server.
!
| [in] | userName | the username for the target account |
| [out] | result | the result of the search operation |
| [in] | blakfx_helix_event_handler_t | register custom function to be executed as registered event handler with promise status notification |
| invokeStatus_t blakfx_helix_userRelease | ( | USER_ID | user_id | ) |
Release an user.
| [in] | user_id | the ID of the user to release |
| invokeStatus_t blakfx_helix_userValidate | ( | USER_ID | user_id | ) |
Ensure that an user is valid.
| [in] | user_id | the ID of the user to validate |
| invokeStatus_t blakfx_helix_waitEvent | ( | PROMISE_ID | crypto_ID, |
| int64_t | time_in_ms | ||
| ) |
Waits for an event for a specific time.
| [in] | crypto_ID | the ID of the event to wait for |
| [in] | time_in_ms | the time in ms to wait for |
| promiseStatusAndFlags_t blakfx_helix_waitEventStatus | ( | PROMISE_ID | aPromise_id | ) |
Retrieve status of the promise (referencing a promise to complete some operation) by its unique id.
| [in] | aPromise_id | the unique id of the promise whose status to retrieve |


database = log of insert/update operations, split into segments
each segment is supported by an in-memory hash table (key -> offset in segment file)
one active segment - writes go here, older segments used just for reads
segments are compacted and merged in background
Pros & Cons
appending and merging are sequential = fast IO
straightforward concurrency and crash recovery
no fragmentation thanks to merging
number of keys limited by memory. On disk hash maps are hard
inefficient range queries
Sorted String Table (SSTable)
Entries in segments are sorted by key!
active segment = in memory balanced binary search tree (i.e. Red-Black tree)
passive segments written to disk by in-order traversal when size treshold is reached
merging and compaction = merge from mergesort
search = check memtable (tree in memory), if not found, check segments from newest to oldest
Sparse index
No need to keep an index of all the keys in memory!
keep one key fow every few KB of segment file
search = find lower and upper bounds in the index, scan segment in between
Note: keys and values are usually variable length, so binary search over segment file can't be used
Practical considerations
group records between keys in index into blocks and compress to save IO and disk space
keep log of writes to active segment on disk for crash recovery
Potential optimization: Bloom filters
Non existent key lookups need to go through all segments - possibly slow.
Bloom filters can give us an immediate answer whether key exists in set with a chosen false positive rate (i.e. 1%)
bloom filter = array of integers of size m and k distinct hash functions to [0, m)
add = hash with all functions, giving k array positions, increment value in each
query = hash with all functions, giving k array positions, check value if any contains 0.
yes = key certainly not present in set. no = key may or may not be in set
In the real world
Engines and databases using SSTables
Storage engines: LevelDB, RocksDB
Databases: Cassandra, HBase, Google BigTable
Lucene, indexing engine for Elasticsearch uses similar method for its term dictionary
Comparison with Hash-Based indexes
Range queries are efficient thanks to ordering of keys


Unlike other jQuery projects, such as jQuery and jQuery UI, jQuery Mobile automatically applies many markup enhancements as soon as it loads (long before the document.ready
event fires). These enhancements are applied based on jQuery Mobile's default settings, which are designed to work with common scenarios. If changes to the settings are needed, they are easy to configure.
When jQuery Mobile starts, it triggers a mobileinit
event on the document
object. To override default settings, bind to mobileinit
.
$( document ).on( "mobileinit", function() {
//apply overrides here
});
Because the mobileinit
event is triggered immediately, you'll need to bind your event handler before jQuery Mobile is loaded. Link to your JavaScript files in the following order:
<script src="jquery.js"></script>
<script src="custom-scripting.js"></script>
<script src="jquery-mobile.js"></script>
You can override default settings by extending the $.mobile
object using jQuery's $.extend
method.
$( document ).on( "mobileinit", function() {
$.extend( $.mobile , {
foo: bar
});
});
Alternatively, you can set them using object property notation.
$( document ).on( "mobileinit", function() {
$.mobile.foo = bar;
});
The following defaults are configurable via the $.mobile
object:
activeBtnClass
string, default: "ui-btn-active"activePageClass
string, default: "ui-page-active"ajaxEnabled
boolean, default: trueallowCrossDomainPages
boolean, default: false$.mobile.loadPage()
. This will only allow cross-domain requests if $.mobile.allowCrossDomainPages
is set to true. Because the jQuery Mobile framework tracks what page is being viewed within the browser's location hash, it is possible for a cross-site scripting (XSS) attack to occur if the XSS code in question can manipulate the hash and set it to a cross-domain URL of its choice. This is the main reason that the default setting for $.mobile.allowCrossDomainPages is set to false. In PhoneGap apps that must "phone home" by loading assets off a remote server, both the $.support.cors
AND $.mobile.allowCrossDomainPages
must be set to true.autoInitializePage
boolean, default: true$.mobile.initializePage
. If false, the page will not initialize and will be visually hidden until $.mobile.initializePage
is manually called.$.mobile.hoverDelay
instead.
defaultDialogTransition
string, default: 'pop'When using pages styled as dialogs (data-role="page" data-dialog="true"
), if you wish for them to have a different transition than regular pages, you must specify the transition on the link that opens them by adding the attribute data-transition="pop"
to the link. "pop" is just an example. You may specify any transition you wish, such as "slide", "flip", or "none".
Similarly, when calling the pagecontainer's change()
method, you must also specify the transition explicitly, if you wish it to be different from the $.mobile.defaultPageTransition
:
$( ":mobile-pagecontainer" )
.pagecontainer( "change", "dialog.html", { transition: "pop" } );
defaultPageTransition
string, default: 'fade'degradeInputs
objectfalse
, meaning to leave inputs of the given type untouched, or a string giving an alternative input type into which elements of the given input type should be converted. By default, only input
elements of type "range"
and of type "search"
are degraded:
"color"
, default: false
input
elements of type "color"
."date"
, default: false
input
elements of type "date"
."datetime"
, default: false
input
elements of type "datetime"
."datetime-local"
, default: false
input
elements of type "datetime-local"
."email"
, default: false
input
elements of type "email"
."month"
, default: false
input
elements of type "month"
."number"
, default: false
input
elements of type "number"
."range"
, default: "number"
input
elements of type "range"
."search"
, default: "text"
input
elements of type "search"
."tel"
, default: false
input
elements of type "tel"
."time"
, default: false
input
elements of type "time"
."url"
, default: false
input
elements of type "url"
."week"
, default: false
input
elements of type "week"
.dynamicBaseEnabled
boolean, default: truefalse
the base tag value in browsers that support a dynamic base tag and URL prefixes in browsers that don't won't be updated to reflect where the page was loaded from. This means that resource references that are relative to the page on which they are defined may break. This option is available for web frameworks that operate under a universal base tag value where all links and assets are relative to a single base.focusClass
string, default: "ui-focus"getMaxScrollForTransition
functiongradeA
function that returns a boolean, default: a function returning the value of $.support.mediaqueryhashListeningEnabled
boolean, default: trueignoreContentEnabled
boolean, default: falsedata-enhance=false
parent node. If one is found the markup will be ignored. This setting and the accompanying data attribute provide a mechanism through which users can prevent enhancement over large sections of markup.keepNative
Selector, default: ":jqmData(role='none'), :jqmData(role='nojs')"linkBindingEnabled
boolean, default: truemaxTransitionWidth
integer, boolean, default: falsefalse
. If a number value is set, transition "none" will be used if the window is wider than the specified value.minScrollBack
integer, default: 0ns
string, default: ""data-mynamespace-foo="..."
.
If you use data- namespacing, you will need to update/override one selector in the theme CSS. The following data selectors should incorporate the namespace you're using:
.ui-mobile [data-mynamespace-role=page], .ui-mobile [data-mynamespace-role=dialog], .ui-page { ...
pageLoadErrorMessage
string, default: "Error Loading Page"pageLoadErrorMessageTheme
string, default: "e"window.history.back
with PhoneGap's navigation helper where it is available. This addresses navigation issues on page refresh in Android PhoneGap applications using jQuery Mobile.pushStateEnabled
boolean, default: truehistory.replaceState
in supported browsers, to convert the hash-based Ajax URL into the full document path. Note that we recommend disabling this feature if Ajax is disabled or if external links are used extensively.subPageUrlKey
string, default: "ui-page"transitionFallbacks.[transition]
string, default: "fade"


[root]/doc/source/en/TortoiseSVN/tsvn_dug
Fix a typo and update .pot file
0 lines of code changed in 2 files:


Analytics
Total Revenue
$3249
Total Users
249
New Users
2
Server Uptime
152 days
To Do List
7 tasks
Issues
3
Graph
Graph
Graph
Graph
| Name | Side | Role |
|---|---|---|
| Obi Wan Kenobi | Light | Jedi |
| Greedo | South | Scumbag |
| Darth Vader | Dark | Sith |
$3249
249
2
152 days
7 tasks
3
| Name | Side | Role |
|---|---|---|
| Obi Wan Kenobi | Light | Jedi |
| Greedo | South | Scumbag |
| Darth Vader | Dark | Sith |


Build Process¶
Files: tasks.py - doc_builder/
Every documentation build has limited resources. Our current build limits are:
- 15 minutes
- 1GB of memory
We can increase build limits on a per-project basis, if you provide a good reason your documentation needs more resources.
How we build documentation¶
When we import your documentation, we look at two things first: your Repository URL and the Documentation Type. We will clone your repository, and then build your documentation using the Documentation Type specified.
Sphinx¶
When you choose Sphinx as your Documentation Type,
we will first look for a conf.py
file in your repository.
If we don’t find one,
we will generate one for you.
We will look inside a doc
or docs
directory first,
and then look within your entire project.
Then Sphinx will build any files with an .rst
extension.
If you have a README.rst
,
it will be transformed into an index.rst
automatically.
Mkdocs¶
When you choose Mkdocs as your Documentation Type,
we will first look for a mkdocs.yml
file in your repository.
If we don’t find one,
we will generate one for you.
We will look inside a doc
or docs
directory first,
and then default to the top-level of your documentation.
Then Mkdocs will build any files with an .md
extension.
If you have a README.md
,
it will be transformed into an index.md
automatically.
As MkDocs doesn’t support automatic PDF generation,
Read the Docs cannot create a PDF version of your documentation with the Mkdocs option.
Understanding what’s going on¶
Understanding how Read the Docs builds your project will help you with debugging the problems you have with the site. It should also allow you to take advantage of certain things that happen during the build process.
The first step of the process is that we check out your code from the repository you have given us. If the code is already checked out, we update the copy to the branch that you have specified in your projects configuration.
Then we build the proper backend code for the type of documentation you’ve selected.
If you have the Install Project option enabled, we will run setup.py install
on your package, installing it into a virtual environment. You can also define additional packages to install with the Requirements File option.
When we build your documentation, we run sphinx-build -b html . _build/html, where html would be replaced with the correct backend. We also create man pages and pdf’s automatically based on your project.
Then these files are copied across to our application servers from the build server. Once on the application servers, they are served from nginx.
An example in code:
update_imported_docs(version)
if exists('setup.py'):
run('python setup.py install')
if project.requirements_file:
run('pip install -r %s' % project.requirements_file)
build_docs(version=version)
copy_files(artifact_dir)
Builder Responsibility¶
Builders have a very specific job.
They take the updated source code and generate the correct artifacts.
The code lives in self.version.project.checkout_path(self.version.slug)
.
The artifacts should end up in self.version.project.artifact_path(version=self.version.slug, type=self.type)
Where type
is the name of your builder.
All files that end up in the artifact directory should be in their final form.
Packages installed in the build environment¶
The build server does have a select number of C libraries installed, because they are used across a wide array of python projects. We can’t install every C library out there, but we try and support the major ones. We currently have the following libraries installed:
- doxygen
- LaTeX (texlive-full)
- libevent (libevent-dev)
- dvipng
- graphviz
- libxslt1.1
- libxml2-dev
Writing your own builder¶
Note
Builds happen on a server using only the RTD Public API. There is no reason that you couldn’t build your own independent builder that wrote into the RTD namespace. The only thing that is currently unsupported there is a saner way than uploading the processed files as a zip.
The documentation build system in RTD is made pluggable, so that you can build out your own backend. If you have a documentation format that isn’t currently supported, you can add support by contributing a backend.
The readthedocs.doc_builder API explains the higher level parts of the API that you need to implement. A basic run goes something like this:
backend = get_backend(project.documentation_type)
if force:
backend.force(version)
backend.clean(version)
backend.build(version)
if success:
backend.move(version)
Deleting a stale or broken build environment¶
If you’re having trouble getting your version to build, try wiping out the existing build/environment files. On your version list page /projects/[project]/versions
there is a “Wipe” button that will remove all of the files associated with your documentation build, but not the documentation itself.


Try out our Premium Member services: Virtual Legal Assistant, Query Alert Service and an ad-free experience. Free for one month and pay only if you like it.
CRA-S-725-SBA of 2000 -1- IN THE HIGH COURT OF PUNJAB & HARYANA AT CHANDIGARH CRA-S-725-SBA of 2000 Date of decision: 02.07.2013 Punjab State Board for the Prevention and control of Pollution, Nabha Road, Patiala ........ Appellant Versus M/s Mahalaxmi Industries and another ........ Respondents CORAM: HON'BLE MR. JUSTICE R.P. NAGRATH 1. Whether Reporters of the local papers may be allowed to see the judgment? 2. To be referred to the Reporters or not? 3. Whether the judgment should be reported in the digest? PRESENT: Mr. D.S. Patwalia, Advocate with Mr. Lalit Rishi, Advocate for the appellant. Mr. O.P. Goyal, Senior Advocate with Ms. Sheena Khanna, Advocate for the respondents. R.P. NAGRATH, J.
The appellant-Board filed criminal complaint dated 1.10.1991 against the respondent(s) for offences under Section 21/22 read with Sections 37, 39 and 40 of the Air (Prevention and Control of Pollution) Act, 1981 (for short 'the Act'), through its Assistant Environmental Engineer (AEE), who is competent to institute the complaint vide notification issued by the State Board dated 19.11.1985 CRA-S-725-SBA of 2000 -2- (Mark A).
2. It is stated that the accused-industry is a company as defined under Section 40 of the Act which is one of the offences mentioned in the complaint but that is on a wrong notion as Section 40 of the Act only applies to the offences against the company. It is admitted by the Board that the accused/respondent No. 1-M/s Mahalaxmi Industries is a proprietorship concern and accused/respondent No. 2 is the sole proprietor and thus would not fall within the definition of term company as given in explanation to Section 40 of the Act. The explanation to Section 40 of the Act says that for the purposes of this section (a) "company" means any body corporate, and includes a firm or other association of individuals; and (b) "director", in relation to a firm, means a partner in the firm. That is otherwise is not a very relevant factor for disposal of the instant appeal because accused/respondent No. 2 being the proprietor of accused/respondent No. 1 admittedly, the appellant-Board shall not have to satisfy the ingredients of Section 40 of the Act, for making those persons as accused, who are responsible to the company for the conduct of business of the company as well as the company on the basis of vicarious liability.
3. The basic allegation against the respondent-accused is that the industry was emitting polluted air in contravention to the provisions of the Act and did not obtain the consent as required by Section 21 of the Act and these violations attract the offence punishable under Section 39 of the Act.
4. The respondent-accused was running business of rolling of CRA-S-725-SBA of 2000 -3- steel round bars with production of 12 T/day and installed re-rollers and a coalfed heating furnace for this purpose, for which herollable steel material is used as raw material, thereby emitting black smoke and SPM discharged through a stack thus causing air pollution. This industry is running since the year 1981.
5. It was further stated that the respondent-industry was discharging the emissions from its premises into the atmosphere, without obtaining previous consent of the Board and without installing any air pollution control equipment. On 13.6.1990, the premises of respondent- accused was visited by PW-1 Sh. N.S. Manshahia, Assistant Environmental Engineer (AEE) who prepared spot inspection report/field data sheet Ex. P-2 finding that the industry is using 2T/day coal as fuel in reverberatory furnace of capacity 1.5 T/hour and, thus, black smoke and SPM discharged through a stack of 60 ft. height causing air pollution in the atmosphere. The industry had not made any effort to install air pollution control devices.
6. The premises of respondent-accused was also visited on 23.3.1991 by Sh. R.K. Goyal, JEE, the authorized officer and it was again found that no such air pollution control device was installed. The Board passed a resolution for prosecuting the respondent-accused in its 76th meeting held on 8.7.1991 and made a complaint before the Magistrate.
7. The respondent-accused was summoned by finding prima facie case and after recording pre-charge evidence, charge was framed against respondent under the aforesaid sections. The respondent-accused did not further cross-examine PW-1 after the charge. The respondent No. CRA-S-725-SBA of 2000 -4- 2 denied all the incriminating circumstances appearing in evidence of the complainant during this examination under Section 313 of Code of Criminal Procedure and himself appeared as DW-1 in defence.
8. After hearing learned counsel for the parties, the learned trial Court acquitted the respondent-accused of the charges framed against him vide judgment dated 7.3.2000, which has been assailed by appellant- Board in this appeal. Leave to appeal was granted by this Court.
9. Learned counsel for the appellant-Board at the outset contended that he has the instructions from the Board, not to pursue this appeal because the industry presently running in the said premises has been granted 'No Objection Certificate' (NOC) and necessary consent under the Act since long. This argument cannot prevail because the appeal has to be heard on merits after leave to appeal was granted by this Court.
10. I have heard learned counsel for the parties. The record of lower Court, has also been perused.
11. It is admitted that the respondent-industry was in existence since September, 1981. This fact is also recorded in the spot inspection report Ex. P-2 dated 13.6.1990. Section 21 of the Act prohibits any person to establish or operate any industrial plant in an air pollution control area without previous consent of the Board. Proviso to this section says that a person operating any industrial plant in any air pollution control area immediately before the commencement of Section 9 of the Air (Prevention and Control of Pollution) Amendment Act, 1987 for which no consent was necessary prior to such commencement, may CRA-S-725-SBA of 2000 -5- continue to do so for a period of three months from such commencement or, if he has made an application for such consent within the said period of three months, till the disposal of such application.
12. Section 9 of the Amendment Act of 1987 came into force w.e.f. Ist of April, 1988, vide notification dated 28.3.1988. It is admitted that the respondent-accused had applied for grant of necessary consent under the Act. This is apparent from communication dated 18.12.1990, Ex. P-3, addressed by appellant-Board to the respondent-accused that the industry had not installed any air pollution control equipment, so the consent to the industry under the Act was refused. There is no evidence to prove that this industry continued working after refusal of the consent. In paragraph No. 6 of the complaint it is stated that the premises of this industry was also visited on 23.3.1991, by Sh. R.K. Goyal, JEE, the authorized officer and it was found that no such air pollution control device had been installed. No such report of spot inspection dated 23.3.1991 was proved nor Sh. R.K. Goyal, was examined by the appellant to prove this fact. The appellant-Board examined PW-1 Sh. N.S. Manshaia, AEE only who made spot visit on 13.6.1990.
13. It was vehemently contended for the respondent that spot visit report Ex. P-2 does not show that the industry was infact working nor PW-1 has stated to this effect. The report Ex. P-2 suggests that height of the stack was 60 meters from the ground level but what was the extent of emission of smoke in the area has not been described. There is also no evidence of collection of samples for test by the laboratory etc.
14. Respondent-accused on the other appeared as his own CRA-S-725-SBA of 2000 -6- witness as DW-1 and stated that this industry was leased out to M/s Lok Tilak Steel Industries vide lease deed Mark-DA, for three years i.e. from 5.7.1990 to 4.7.1993. It is submitted by learned appellant's counsel that this is only a copy of lease deed but original has not been produced. PW-1 through whom the complaint was instituted does not deny this fact. He rather stated in the cross-examination that he does not know if the factory was leased out vide lease deed Mark-DA. The contents of the lease deed would show that M/s Lok Tilak Steel Industries, was a partnership concern comprising of Mr. Baldev Raj Chopra and Narinder Paul Chopra as partners and the lease deed is dated 11.7.1990 to be effective from 5.7.1990.
15. PW-1 admitted in cross-examination that M/s Lok Tilak Steel Industries was issued 'No Objection Certificate' Ex. D-4 in the capacity of lessee of respondent-accused No.1. This certificate Ex. D-1 is dated 20.12.1991 and issued for pollution angle. The subsequent correspondence proved by respondent No.2 as DW-1 between the Board and M/s Lok Tilak Steel Industries would support the defence version. Ex. D-2 is a letter dated 8.5.1992, addressed by the Board to M/s Lok Tilak Steel Industries, that the said industry had to make fresh application for consent for the expanded capacity of the Industry. The other correspondence for the years 1992/1993 entered with M/s Lok Tilak Steel Industries is Ex. D-3 and D-4.
16. The next question is whether there was violation of Section 22 of the Act which says that no person operating any industrial plant, shall discharge or cause or permit to be discharged the emission of any air CRA-S-725-SBA of 2000 -7- pollutant in excess of the standards laid down by the State Board under clause (g) of sub-section (1) of Section 17 of the Act. Clause (g) of sub- section (1) of Section 17 of the Act reads as under:-
"Section 17 (1) (1) Subject to the provisions of this Act, and without prejudice to the performance of its functions, if any, under the Water (Prevention and Control of Pollution) Act, 1974, the functions of a State Board shall be -
(a) to (f) XXX XXX XXX
(g) to lay down, in consultation with the Central Board and having regard to the standards for the quality of air laid down by the Central Board, standards for emission of air pollutants into the atmosphere from industrial plants and automobiles or for the discharge of any air pollution into the atmosphere from any other source whatsoever not being a ship or an aircraft:
Provided that different standards for emission may be laid down under this clause for different industrial plants having regard to the quantity and composition of emission of air pollutants into the atmosphere from such industrial plants."
No such standards which may have been laid down are proved on record. It is, therefore, found that the appellant-Board did not lead appropriate CRA-S-725-SBA of 2000 -8- evidence to prove charges against the respondent-accused.
17. The lower Court was, however, impressed by the fact that the respondent-accused was holding valid consent for the period of one year from 6.7.1990 to 5.7.1991 on the basis of letter Ex. P-4 issued by the appellant-Board. That is an incorrect finding as Ex. P-4 is a consent under Water (Prevention and Control of Pollution) Act, 1974 and not under the Act of 1981. The consent was obviously in reference to an application made by respondent-accused at earlier point of time. The columns of date of application are, however, missing in Ex. P-4.
18. From the above discussion, I am of the view that appellant- Board was unable to prove the charges against respondent accused by leading cogent evidence. The acquittal rendered by the lower Court thus cannot be interferred, though for different reasons. The instant appeal is thus dismissed. The bail bonds furnished by respondent No. 2-accused shall stand discharged.
July 02, 2013 ( R.P. NAGRATH ) rishu JUDGE


You were looking for a practical introduction to meta-learning and to the MAML type of loss in particular? You also wanted to see how to train try a simple network with JAX? Eric Jang does both in this introductory blog post. JAX is introduced with toy examples and then used to implement MAML with just a few functions. The functional approach to training a neural net is not necessarily straightforward for those who are used to Tensorflow or Pytorch, so expect to read this blog at least a couple times!
This is a nice blog post where the author introduces the unweighted cosine and weighted cosine methods (presented in this paper rejected from ICLR 2019). The two methods can be used when a network is optimised for both a primary task and an auxiliary task. The idea is to transform the gradient obtained from the auxiliary task in such a way that it doesn't hamper optimisation on the primary task. In the blog post, the author offers a geometrical interpretation of how this can be achieved. He also proposes a variation of the unweighted/weighted cosine methods and benchmark them on both a toy task and a real task (attractiveness classification on the CelebA dataset).
[...] Our goal is to understand whether a related phenomenon occurs when data does not undergo a clear distributional shift. We define a `forgetting event' to have occurred when an individual training example transitions from being classified correctly to incorrectly over the course of learning. Across several benchmark data sets, we find that: (i) certain examples are forgotten with high frequency, and some not at all; (ii) a data set's (un)forgettable examples generalize across neural architectures; and (iii) based on forgetting dynamics, a significant fraction of examples can be omitted from the training data set while still maintaining state-of-the-art generalization performance.
Although variational autoencoders (VAEs) represent a widely influential deep generative model, many aspects of the underlying energy function remain poorly understood. In particular, it is commonly believed that Gaussian encoder/decoder assumptions reduce the effectiveness of VAEs in generating realistic samples. In this regard, we rigorously analyze the VAE objective, differentiating situations where this belief is and is not actually true. We then leverage the corresponding insights to develop a simple VAE enhancement that requires no additional hyperparameters or sensitive tuning. Quantitatively, this proposal produces crisp samples and stable FID scores that are actually competitive with a variety of GAN models, all while retaining desirable attributes of the original VAE architecture. [...]
We present a novel clustering objective that learns a neural network classifier from scratch, given only unlabelled data samples. The model discovers clusters that accurately match semantic classes, achieving state-of-the-art results in eight unsupervised clustering benchmarks spanning image classification and segmentation. [...] The trained network directly outputs semantic labels, rather than high dimensional representations that need external processing to be usable for semantic clustering. The objective is simply to maximise mutual information between the class assignments of each pair. [...]
Where does the Xavier and Kaiming initializations come from? Why is there a magic number 2? A square root? This blog post is all about this question. I found the author particularly mindful of the inexperienced readers as he takes the time to explain each term and each result. Another solid although similar post on the subject is given by DeepGrid here.
[...] we show that first order methods such as gradient descent are provably robust to noise/corruption on a constant fraction of the labels despite over-parametrization under a rich dataset model. In particular: i) First, we show that in the first few iterations where the updates are still in the vicinity of the initialization these algorithms only fit to the correct labels essentially ignoring the noisy labels. ii) Secondly, we prove that to start to overfit to the noisy labels these algorithms must stray rather far from from the initial model which can only occur after many more iterations. [...]
The experienced practitioner often already knows all the tricks presented in this post but it's always good to see them laid out like so. In particular, the author advocates for a systematic approach: start simple first (simple architecture, overfit on a single sample), confirm the loss (theoretically and numerically on simple cases), check outputs and connections (can the gradient flow from output to input?) and diagnose hyperparameters.
[...]. Distributed deep learning using the large mini-batch is a key technology to address the demand and is a great challenge as it is difficult to achieve high scalability on large clusters without compromising accuracy. In this paper, we introduce optimization methods which we applied to this challenge. We achieved the training time of 74.7 seconds using 2,048 GPUs on ABCI cluster applying these methods. The training throughput is over 1.73 million images/sec and the top-1 validation accuracy is 75.08%.


Wolves fans react online to Nuno Arsenal links after Emery exit
With the news that Unai Emery has been sacked as Arsenal's head coach, social media has been awash with speculation about who will replace him at The Emirates.
Wolves manager Nuno has emerged as one of the bookies favourites for the job, alongside former Juventus boss Massimiliano Allegri and Manchester City assistant Mikel Arteta.
But Wolves fans have been quick to express their contempt online.
Others have questioned why he would even consider leaving the Black Country for a club that is seemingly in decline.
Arsenal currently sit eighth in the Premier League without a win in seven games, while Wolves are fifth having just secured their advancement to the knockout stages of the Europa League.
While some have joked about the timing of the sacking with Black Friday looming.
When asked about the speculation earlier in the week, Nuno said, "you know me well enough and you know I'm not going to answer that."
Express and Star reporters Luke Hatfield and Joe Edwards discussed the news following Wolves' 3-3 draw with Braga on Thursday night.


Notebooks
Story: The story of the Hyena (the Anteater's laws)
The story of the Hyena (the Anteater's laws)
Title
The story of the Hyena (the Anteater's laws)
Collection
Summary
This account [of The Anteater, Springbok and Lynx] is again followed by the Anteater’s laws concerning the habits of various animals, such as the jackal, the 'Löffelhund' (Proteles), etc., who were, once upon a time, men (L II.-2. 323-356). The Hyena marries a female Hyena and has Hyena children. They live in a burrow. He hunts for food for them and brings them quagga, gemsbok, ostrich, ostrich eggs, springbok, and flesh of a man.
Comments
1) See also The Anteater, Springbok and Lynx (//kabbo's version 1) and The Anteater, Springbok and Lynx (//kabbo's version 2), 2) This story is found in Book II-2
Contributors
Date
27 July 1871 (started)
Categories
History (Early Race), Plants and animals
Keywords
Anteater's laws (and story of Hyena) , animals (when they were people) , animals (habits of) , animals (marry own kind) , animals (and Anteater's laws) , animals (and story of Hyena) , laws (the Anteater's) , laws (and story of Hyena) , Hyena (its story) , Hyena (and Anteater's laws) , Hyena (habits of) , Hyena (marry own kind) , marriage (of animals) , marriage (and Anteater's laws) , marriage (and story of Hyena)
Story Pages
346-350


Adventure Works Product Catalog Search Tool
Enter words to search for in the catalog, seperated by spaces.
Search
Query Results
Selected Item Detail:
Product ID
:
Name
:
Product Number
:
List Price
: $