BATMAN RETURNS - a review by J. Marty
Every summer, Hollywood makes like the Millennium Falcon and goes into hyperdrive. Movies of the sci fi/fantasy/action genre come through the pike in droves. Inevitably (and unfortunately), one of these movies is almost certainly what I like to call an "Achilles" movie. Everyone with a high school diploma knows who Achilles was. In Homer's "Iliad," he was the Greek warrior who was indestructible except for his heel. Though formidable, he could be downed as soon as someone exploited his weak spot (the proverbial heel). Tim Burton's BATMAN RETURNS is a great movie that just happens to have multiple Achilles' heels. I saw this movie in the theater with my family on Friday, July 10, 1992. I was eleven years old, and the movie just blew me away. It was one of the most spectacular experiences I had ever had. I didn't know at the time that the movie version contrasted sharply with the DC Comics slant on Batman, and I didn't care. I thought the movie was so much fun that I was drawing cartoons of the movie's characters and quoting the lines months after the movie left theaters. Now, eight years later, my view of this masterpiece has changed. It is still extraordinary good. But, as befits an "Achilles" movie, it has many minor flaws that, taken collectively, tarnish the film's luster considerably. Let's break this movie down:
PLOT (spoiler-free): This movie takes place at Christmastime (which is bizarre, considering that it was released at the height of the summer solstice). Unlike in the Bruce Willis movie DIE HARD, however, Christmas actually plays an important role in RETURNS. Batman (Michael Keaton) is back, and this time he's gotta contend with three menacing foes: The Penguin (Danny DeVito), an aquatic bird-man who wants to be the mayor of Gotham City (that'll be the day); Catwoman (Michelle Pfeiffer), a whip-cracking vigilante who is Batman's first major female opponent; and Max Shreck (the excellent Christopher Walken), a smarmy industrialist whose 18-century hairdo makes him look just like the James Bond villain from A VIEW TO A KILL (whom Walken also played; keep branching out, Chris). Good ol' Max, currently enjoying his status as "Gotham's own Santa Claus," plots to use his influence to get The Penguin elected mayor. Once that is accomplished, Shreck will make the helpless populace of Gotham bow before him by...no, I can't spoil it for you. It's just too campy and hilarious! Let's just say it's something similar to what Montgomery Burns (Homer's boss on "The Simpsons" would do). Meanwhile, Catwoman has a vendetta against Shreck because he...nope, once again you'll just have to find out by watching the movie. So she sets out to ruin him, only to have Batman on her tail. So she pays a visit to The Penguin and his nefarious Red Triangle Circus Gang (yeah, I know, it sounds cheesy, but wait 'til you see these guys!) and now The Penguin has to juggle his two agendas: getting elected and getting Batman framed for murder (and then murdered himself). The entire plot is now in place, and the rest of the movie is filled with a tangled labyrinth of loyalties and betrayals that most people under the age of 12 won't be able to understand (though the subplots do keep the narrative interesting!). No doubt about it, the plot of RETURNS is intriguing. Unfortunately, it is burdened by too many anomalies and flaws in logic. (Now we'll get to a few of the "heels" I was talking about) How could anyone, after being a recluse for three decades, become a seasoned politician after "rescuing" a baby and hooking up with some rich twit? How come the villain's henchmen always know where he is going to be, even when he doesn't tell them? And why, at the movie's climax, does The Penguin nearly drown and then magically arise from the water a few minutes later? (He must've been holding his breath really long.) Another problem with the plot is that it's much too complex, what with the entire cast of characters fighting amongst themselves to see who can steal the movie. Batman and his alter ego Bruce Wayne almost become bit players in their own movie as a cat, a bird, and an old man with white hair all upstage him.  Unfortunately, Keaton just plays the character as a mindless, Rambo-style action Jackson who lashes out at the bad guys mercilessly. He even kills some of the members of the aforementioned circus gang along the way. This is a hero? Burton desperately tries to soften up the Caped Crusader toward the end, but it's a lukewarm effort. Batman ultimately seems to be only a little more moral than the villains - which brings us to...
CHARACTERS: Danny DeVito, why did you do it? Say it ain't so!  Burton and his team took the wonderful character of The Penguin and perverted him, changing him from a suave, handsome schemer into Jabba the Hutt in a tuxedo. DeVito appears in whiteface and black lipstick, with seal-like flippers for hands and a gut that is so large it's surprising he doesn't have a coronary. Plus, our dastardly villain has a penchant for drooling, eating raw fish, biting people in the face, and making off-color jokes. It's horrible! Burton apparently didn't take into account the simple fact that a good villain isn't just evil; he has to be appealing to the audience. Besides, I think it was a mistake to cast DeVito simply because of his short frame and girth. Many other great actors (Marlon Brando, for instance) could have played The Penguin with just the right mixture of savagery and gloomy introspection, nailing the frightening yet sympathetic performance DeVito was obviously aiming for. In all fairness, DeVito's Penguin is delightfully witty and over-the-top at moments - a pale shadow of Burgess Meredith's take on the character. I cannot say enough good things about Michelle's Catwoman performance, however. Easily the best player in the movie, she takes on a multifaceted character eagerly and ultimately succeeds. Anger, sadness, humor, sex appeal, raw physical power - you'll find all that and more in Pfeiffer's take on the movie's only major female character. Yet the characterization gets murky at times. You begin to wonder what actually drives Catwoman. Is she really out for revenge, or does she just enjoy being bad? And, like Batman, Catwoman is not a killer. (Watch the movie's end to see what I mean.) And did we really need to see her drinking milk straight from the carton or eating a live canary (a stunt obviously inspired by The Penguin's taste for raw fish)? Overall, though, she comes out on top and is the second-best Bat-villain of all (Jack Nicholson's Joker being number one, of course). Finally, we have the Shreckmeister. He's a great character, a stock villain for the audience to boo and hiss at. Unfortunately, he comes to dominate the movie a little too much. And that's not good, because for all his posturing he really isn't meaty enough to be the main bad guy. He's kind of pathetic, too. He gets kidnapped by The Penguin (twice!) and roughed up by both The Bat and The Cat. Interestingly, in the first draft of the movie's script he was supposed to be The Penguin's long-lost brother; that's a fascinating concept and it should have been played up in the shooting script. Not only would it have given Walken a "raison d'etre" for being in the film, but it would have also fleshed out Max Shreck and made him less of a stereotype. Still, Walken is tons of fun to watch. The rest of the cast is pretty much filler. Alfred Pennyworth (Michael Gough), Bruce Wayne's amiable butler and a welcome bringer of light to all the chaos in Gotham, sadly gets little screen time. Commissioner James Gordon (Pat Hingle) continues to be the bumbling old fossil he was in the 1989 film. Cristi Conaway plays a girl who dies because of Batman's incompetence, while Paul Reubens and Diane Salinger are The Penguin's heartless parents. I must admit I had a blast watching the antics of the Red Triangle Gang, though! Vincent Schiavelli, John Strong, Rick Zumwalt, Travis McKenna, and other talented performers (some of them real-life circus people) add a wickedly funny dimension to the movie with their freakish costumes and in-your-face attitudes. The scene where they surprise a crowd of Gothamites by boisterously leaping out of a giant Christmas present is simply priceless, and will have you laughing and quaking with fear at the same time.
OTHER STUFF: There were a lot of things in this movie I liked. The music was stirring and exhilirating thanks to the master composer Danny Elfman. The sets were impressive (wait 'til you see the smiling cat head!) and the special effects were much better than in the 1989 original. The costumes were likewise a joy to behold. Batman is a true dark angel in his black armor, and Catwoman's costume is simultaneously beautiful and dangerous. The Penguin sports his familiar top hat and monocle, though in many scenes he opts for a rather subdued look that didn't do anything for me. And, just as in the original, Burton fiddles around with the space-time continuum until Gotham City is a mélange of radically different eras, folkways, and sensibilities. In what other movie could you see people in 1940s fashions using computers and CD-ROMs?
FINAL THOUGHTS: I still enjoy BATMAN RETURNS as much as I did on that magical day in July. I've only seen it a few times since then, but a lot of the glamor and imagery remains ingrained in my consciousness. Sadly, though, I really can't give the same glowing evaluation of it now as I did when I was younger. It's a splendid work of art, but, like Achilles, a few heels keep it from being outstanding. Still, it is an exciting action/adventure movie in its own right and even tops its 1989 predecessor at some points. Can't wait to see it again!
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Segmented Data Containers: Distributed Stream Performance Boost
Welcome to the first of several blog posts that describe the segmentation of containers that Infinispan uses to store data. Some of you may have noticed in the previous 9.3.0.Final notes that we announced a new feature named “Segmented On-Heap Data Container”. We also mentioned that “It improves performance of stream operations”, but what does that really mean?
What is a segmented data container and why does it matter?
Imagine a cluster of 4 nodes in distributed mode (numOwners = 2) with entries for k0 - k13. It might look like this:
The data is distributed between the nodes with only two copies of each entry available. However, the data itself is stored internally in the same Map instance. As a result, when performing operations on all entries in the cache, Infinispan must iterate over the same data multiple times. This degrades performance.
As of Infinispan 9.3, a segmented data container is available to separate data by segments. Although only on-heap bounded and unbounded implementations are currently available.
With a segmented data container, that same data set might look like this:
Because Infinispan internally reasons on data in terms of segments, a segmented data container lets Infinispan process data only in specific segments. This allows for operations performed upon all entries to require iteration over the data only once.
Actual Performance Difference
So with the above example you might be thinking that the performance increase maximum is two times throughput, since numOwners is two. This is close, but not quite correct. While iterating on the data we also have to determine what segment an entry belongs to. With a segmented container we know this already, so there is no need to calculate that. This provides additional performance, as you will see.
The following graphs were generated using the benchmark at https://github.com/infinispan/infinispan-benchmarks/tree/master/iteration. The following command was run: java -jar target/benchmarks.jar -pvalueObjectSize=1000 -pentryAmount=50000 -pbatchSize=4096
The preceding graph is the result of the iteration methods. As you can notice the performance increase isn’t that much… why not?!?
Unfortunately, remote iteration requires a lot of network overhead, so we don’t get to see the full benefits of segmentation. But at least it is about 5-12% faster, not too shabby.
Now to show the real improvement, here is the chart showing the performance increase for the Cache#size operation:
If you notice there is huge increase in performance: almost a three fold increase over the non-segmented container, even though numOwners is only two. The old segment calculation adds a bit of overhead compared to just incrementing a number.
So keep in mind this change will show a larger gain in performance if the result returned is smaller, especially if it is a fixed size, such as a single int for Cache#size.
What about gets and puts?
Having the container segmented should also affect get and put performance as well, right? In testing the difference for get and puts are less than one percent, in favor of segmentation due to some optimizations we were able to add.
How do I enable this?
So the performance gains are noticeable, especially when the remote operation returns a small data set. But how can a user configure this? This is the nice part, due to no performance loss with other operations the container will always be segmented as long as the cache mode supports segmentation. That is if it is a Distributed, Replicated or Scattered cache.
A real-life example and closing
Since this feature has been around a while already, we actually have users gaining benefits from this feature. An example can be found at https://developer.jboss.org/message/983837#983837. In this case the user only upgraded to Infinispan 9.3 and received over a three-fold increase in performance when using distributed streams. It actually starts to bring distributed streams performance within range of indexed query for some use cases.
So, by upgrading your application to Infinispan 9.3 or newer, you will benefit from these improvements. There will be future posts regarding segmentation, including support for stores. Either way please feel free to download Infinispan, report bugs, chat with us, ask questions on the forum or on StackOverflow.


ABSORBINE JR.- menthol liquid
W. F. Young, Inc.
Disclaimer: Most OTC drugs are not reviewed and approved by FDA, however they may be marketed if they comply with applicable regulations and policies. FDA has not evaluated whether this product complies.
Active ingredient
Natural menthol 1.27%
Purpose
Topical analgesic
Uses
for temporary relief of minor aches and pains of muscles and joints associated with:
- arthritis
- simple backache
- sprains
- strains
- bruises
Warnings
For external use only
Flammable
- keep away from fire, sparks and heated surfaces
Do not use
- on wounds or damaged skin
When using this product
- do not bandage tightly
- avoid contact with eyes
Stop use and ask a doctor if
- condition worsens or symptoms persist for more than 7 days or clear up and occur again within a few days
Keep out of reach of children. If swallowed, get medical help or contact a Poison Control Center right away.
Directions
- adults and children 2 years of age and older: apply to the affected area no more than 3 to 4 times daily
- children under 2 years of age; consult a doctor
Inactive ingredients
absinthium oil, acetone, chloroxylenol, FD&C blue no. 1, FD&C yellow no. 6, iodine, plant extracts of calendula, echinacea, and wormwood; potassium iodide, thymol, and water
PRINCIPAL DISPLAY PANEL - 118 mL Bottle Carton
Absorbine jr.®
PAIN RELIEF LIQUID
FAST
and
STRONG
RAPID
RELIEF
for Sore Muscles
& Arthritis Pain
Fast Absorbing
Deep Penetrating
Relief
Non-Greasy
NO-MESS APPLICATOR
LIQUID
4 FL. OZ. (118 mL)
W. F. Young, Inc.


Notebooks
Story: Stars
Stars
Title
Stars
Collection
Summary
A story about stars and some of their doings. The star has small arms and no horns. It is a small thing. When the 'darkness sits' or night falls, the star runs off into the sky. The children pull the star from the earth and play with the star. The children take it up and then throw it away. In this way the children kill the star. When stars fall to earth they die.
Comments
1) p.9867v: !nanni heard this from his paternal grandfather (Karu) and observed it himself, 2) p.9868v: (12 September 1881) terms for thunder and lightning; the name for 'real water' which is what lies on the earth; water in the sky is not called 'water', but 'cloud' – when it rains this water is called 'water' but when it does not, the water in the sky is 'cloud', 3) Part of the story was told by Tamme, who heard it from his father (||namme), 4) p.9873v: (Tamme, 7 July 1881) referring to the picture of same date of the ≠keku fruit which is like fat and is 'worked' by girls who rub themselves with it (see Iziko_SAMLB_TaBook3_011), 5) This story is found in Book XI & XII-11
Contributors
Date
25 June 1881 (started)
Categories
Celestial bodies and aeroscopy
Keywords
stars (are small, dark-coloured things that live in the ground) , stars (their actions and doings) , stars (a description of) , stars (the appearance of) , stars (have small arms) , stars (have no horns) , stars (their death) , stars (their doings) , stars (a !kun belief about) , star (is a small thing) , star (goes into the ground) , star (makes a small earthen house) , star (at night it runs off into the sky) , star (at sunrise it runs back into its house) , star (respects or fears the Sun) , star (about the Sun's star) , star (children play with it) , star (children 'take it up') , star (children throw it away) , star (it falls to the earth) , star (it falls down, dying) , star (the children pull it out of the ground) , star (the colour of its body) , star (it is little and black or dark-coloured) , star (children kill the star) , Sun (and the movements of the stars) , Sun (the stars respect or fear it) , Sun (its star) , Sun (its star remains hanging in the sky) , death (stars) , death (of stars when they fall to earth) , death (children kill the star) , children (stars) , children (kill the star) , children (throw away the star) , children (pull the star out of the ground) , children (play with the star) , respect (of the star for the Sun) , house (of the star)
Story Pages
9868-9871, 9874-9875


"Global Warming"---a.k.a. the climate change---is the rise in the average temperature of the Earth's climate system and its related effects. The climate change (CC) had and will have serious effects such as the extinction of species, extensive melting of glacier ice in the Arctic and Antarctic, the sea level rise around the world. This project was about using machine learning (ML) algorithms to find various factors responsible for the increase in temperature in the last few centuries.
by Shivam Kumar, Abhishek Varghese, Gaurav Ganna
Read moreIndia is the second largest country having a population of about 1.32 billion. Agriculture is the main resource and a large segment of citizens are agriculture-dependent. The goal of precision agriculture is to define a decision support system for entire agriculture management with the goal of optimizing returns on inputs while preserving resources. Several related problems in India can be solved in the field of agriculture (production/cultivation), which could benefit the humankind. The project encompasses building a theoretical model using achine Learning (ML) techniques to find out prime factor affecting a crop’s yield, to achieve sustainable agriculture.
by Shivam Pandey, Shikha Verma, Pankaj Katkar
Read more


Week 8
Recursion
12/13/2015
This week I'm going to give a very short introduction to what, if I remember correctly from the only computer science class I ever took in college, is a pretty central idea in computer science. Recursion is a process in which something is nested between larger and smaller versions of itself, like Russian dolls. In computer science, it refers to solving a problem by solving smaller instances of that problem (which may themselves be solved by solving even smaller instances of themselves and so on). Recursion is what happens when you have a function or a method call itself, making a loop.
Recursion would have been helpful in solving the factorial problem we had in Week 4. The solution (in Ruby) that I used looked like this:
if number == 0
return 1
else
total = 1
until number == 1
total = total * number
number = (number-1)
end
return total
end
end
As you can see, I use a while loop to solve this problem. But recursion offers us a better way. If I allow factorial to call itself...
if number == 0
return 1
else
return number * factorial(number-1)
end
end
For example if the number we input is 5, the return would be 5 * 4 * 3 * 2 * 1 * 1 = 120. Every time the number was not 0, factorial calls itself and finds a smaller number and multiplies it by the number that it had. Over and over. It's a bit tricky to wrap your head around but basically that's how it works.
Recursive functions/methods usually have at least one case like, in the example above, if number == 0, a case in which the function will not recurse, or only up until which it will recurse. This is called the base case. Other case are called the recursive cases. Forgetting to put in a base case can result in a function or method that calls itself forever in an infinite loop, which is clearly something to avoid!


Move aside air travelers, there is a new consumer magazine on its way to the traveling public... introducing Bus Mall! Bus Mall will be making its way to millions of buses nation wide! But we need YOUR help to decide what type of products will be making its way into our first issue! Please help us by:


fun with group_by
Using Ruby's #group_by Method
Friday, April 10th, 2015
back to blog index
I really don't mind reading the Ruby documentation. Actually, I secretly kind of like it. Living in Oakland, I spend a decent amount of time on the train, and I sometimes browse through the method pages. But of course, there's many, many methods I don't know about.
One method was from the Enumerable class, #group_by. The name sort of suggests what it does, and the documentation is pretty straight-forward: "Groups the collection by the result of the block." Ok, great! How can it be used? "Returns a hash where the keys are the evaluated result from the block and the values are arrays of elements in the collection that correspond to the key." Ok!... and, that's why there's examples. Here's the one from the ruby-doc.org page:
(1..6).group_by { |i| i % 3 }
#=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]}
Let’s say I have a list of friends in an array (oh, I explored those last week!):
friends = ["Sam", "Kevin", "Brian", "Steve",
"Pete", "Todd", "Frank", "Elliot", "George"]
I could look at them and think, “Wow, pretty generic-looking names. And whoa, lots are five letters long." How many? I could use the #group_by method like so, and it would return:
friends.group_by { |friend| friend.length }
{3=>["Sam"], 5=>["Kevin", "Brian", "Steve", "Frank"],
4=>["Pete", "Todd"], 6=>["Elliot", "George"]}
Not bad! We could also do this with hashes! Now let’s assume my nine friends make up a baseball team, and I have a hash with their names and their batting averages. (If you aren’t a baseball fan, I’m sorry. Just think of the numbers like percentages, and the higher, the better.)
players = {
"Pete" => 0.320,
"Kevin" => 0.221,
"Brian" => 0.212,
"Steve" => 0.302,
"Dylan" => 0.198,
"Todd" => 0.244,
"Frank" => 0.311,
"Elliot" => 0.141,
"George" => 0.267
}
If I want to find which ones are batting over “.250” (baseball people leave off that zero…) I could use #group_by again, and get them sorted!
players.group_by { |name, avg| avg > 0.25 }
{true=>[["Pete", 0.32], ["Steve", 0.302], ["Frank", 0.311], ["George", 0.267]], false=>[["Kevin", 0.221], ["Brian", 0.212], ["Dylan", 0.198], ["Todd", 0.244], ["Elliot", 0.141]]}
Awesome! (Well, the method is. The baseball team could use a few new players). Like with most things in object-oriented programming, the true challenge is just thinking how to translate a real-world idea into code. The language structure allows us to interact with countless representations of objects. We could alphebetize, group by color, or sort by birthday. Whatever the goal, if we can figure out a block of code to make it happen, we’re in business. Play around a bit and see if you can think of some good ones, and let me know. Happy grouping!
back to blog index


A suite of multivariate methods and data visualization tools to implement profile analysis and cross-validation techniques described in Davison & Davenport (2002) <doi:10.1037/1082-989X.7.4.468>, Bulut (2013), and other published and unpublished resources. The package includes routines to perform criterion-related profile analysis, profile analysis via multidimensional scaling, moderated profile analysis, profile analysis by group, and a within-person factor model to derive score profiles.
| Version: | 0.3-5 |
| Depends: | ggplot2, RColorBrewer, reshape, lavaan, R (≥ 3.0.0) |
| Published: | 2018-04-19 |
| Author: | Okan Bulut, Christopher David Desjardins |
| Maintainer: | Christopher David Desjardins <cddesjardins at gmail.com> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| Materials: | README NEWS |
| In views: | Psychometrics |
| CRAN checks: | profileR results |
| Reference manual: | profileR.pdf |
| Package source: | profileR_0.3-5.tar.gz |
| Windows binaries: | r-devel: profileR_0.3-5.zip, r-release: profileR_0.3-5.zip, r-oldrel: profileR_0.3-5.zip |
| OS X binaries: | r-release: profileR_0.3-5.tgz, r-oldrel: profileR_0.3-5.tgz |
| Old sources: | profileR archive |
Please use the canonical form https://CRAN.R-project.org/package=profileR to link to this page.


Paste the URL to be shortened
URL Shortener is a free tool to shorten a URL or reduce a link
Use our URL Shortener to create a shortened link making it easy to remember
URL Shortener is a free tool to shorten a URL or reduce a link
Use our URL Shortener to create a shortened link making it easy to remember


I x h i b i t i o n
A Javascript Library providing an Image Gallery powered by CSS3 Animations
Download
GitHub
Home
About
Quick Guide
Docs
Defaults
Packages
Beta


Monday
Tuesday
Wednesday
Thursday
Fridayday
Saturaday
Sunday
8:00
math
math
math
math
math
math
math
9:00
"Computer Science"
"Computer Science"
"Computer Science"
"Computer Science"
"Computer Science"
"Computer Science"
"Computer Science"


The GROUP BY clause is used to group rows that have the same values.
The GROUP BY clause returns one row for each group. In other words, it reduces the number of rows in the result set.
Syntax:
SELECT col1,col2,col3,,,coln,aggregate
function
FROM table
WHERE condition
GROUP By col1,col2,col3,,,coln;
We can use group by clause without where clause.
WAQ to display distinct item type from item table without using the distinct keyword.
Solution: select
itemtype
from item
group by itemtype;
WAQ to display designation and the minimum salary in each designation. Give an alias name to the minimum salary as 'minimum salary'.
Solution: select designation,min(salary) as "minimum salary"
from empdetails
group by designation;
WAQ to display the total number of male customers and the total number of female customers from the customer table.
Solution: select gender,count(*)
from customer
group by
gender;
WAQ to display customer id and total bill amount paid by the customer from purchase bill table,Only if the customer id is 2002 or 2003. Finally, sort the result in such a way that the highest bill amount should be the first.
Solution: select custid,sum(billamount)
from purchasebill
where custid=2002 or custid=2003
group by custid
Order by sum(billamount)desc;


Wind advisory posted for Hawaiian Islands with gusts expected to hit 50 mph | Honolulu Star-Advertiser
Large portions of all Hawaiian islands are under a wind advisory today with gusts expected to reach 50 mph, the National Weather Service said.
The advisory is effective through 6 p.m. today and calls for east winds from 20 to 30 mph and stronger gusts, forecasters said.
“Winds this strong are capable of downing trees and causing power outages. Motorists, especially those in high profile vehicles, are urged to drive with extreme caution,” the advisory says.
The advisory includes: all of Niihau; Lihue, Princeville, Poipu, Waimea, Hanapepe, Kokee State Park on Kauai; Honolulu, Waikiki, Hawaii Kai, Kapolei, Nanakuli, Makaha, Haleiwa, Waialua, Kahuku, Punaluu, Laie, Kailua, Kaneohe, Waimanalo, Mililani, Wahiawa, Pearl City, and Makakilo on Oahu; Kalaupapa and Kaunakakai, Molokai; Manele and Lanai City on Lanai; Wailuku, Lahaina, Kaanapali, Kahului, Haiku, Makawao, Hana, Kihei, Makena, Pukalani and Kula, Maui; and South Point, Pahala, Hilo, Volcano, Honokaa, Kamuela and Waikoloa on Hawaii island.
Motorists, especially those in high-profile vehicles, are urged to drive with extreme caution.
The forecast calls for windy and showery weather through Saturday. Showers will be most prevalent over windward and mauka areas, but may also reach into leeward areas, the weather service said.


You can find it in your dashboard. Just go to the API Explorer page.
Once you get your User ID and you User Signature just type or paste them in the corresponding fields on the login screen.
ChartLoot is an unofficial client for Chartboost made by Arthur Guibert.
You can find the source code on Github.


Social Me / Robot M.
I started taking adderall a year after graduating high school. I found myself after high school, landing a job as a pot smoking janitor cleaning up after parole officers and lawyers. I noticed all of these people who were making 5 times more then I was, had one thing in common, bachelors degrees. So I knew I had to get back in school.
I joined a commmunity college and my room mate introduced me to a 20 mg pill of adderall. At first the experience was great and made test taking and writing 20 page papers a breeze. After I was paying my room mate 5 dollars a pill I found it much easier to obtain a prescription myself. I saw a doctor and succeeded in obtaining 60 mg a day.
Taking adderall gave me the ability to never go to class, cram for 3 days straight on adderall, and get an A on the test. I'm working on my second degree now. However before thinking that this is some sort of fairytale drug.
First issue is tolerance: before a 20 mg pill would have me goin all night writing a 20 page paper. Now to get that effect, it takes me at least 100 mg. Which is not a big deal for me.
The ugliest side of this drug is that, while I may become a super genius, it takes away the part of me that is social. Making me an empty robot of a man. (It takes away the ability to make jokes, talk to the pretty girl sitting next to me in class, the ability to make friends.) I often feel paranoid attending class, feel as though people are talking about me or not sitting next to me on purpose. And when a teacher calls on me, I will just say something rather agressive.
However when not on the drug for a week or so, and its out of my system, I talk to people around me, make friends, and joke about teachers with surrounding students. But, then when finals come around and I have to start taking the drug again, the same people in class who are expecting 'social me' get quiet paranoid 'robot me'.
In keeping this secret from my girlfriend, she wonders why I'm 2 completely different people week to week, she wants to break up with me when I'm 'robot me' cause thats who I am half the time.

I feel as though now I cannot pass a class without the use of the drug. And at the same time I cannot have valid relationships while on it.
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.


# Git Demystified ### Master Git by understanding its basics Péter Budai --- ## Agenda [History and properties](#/history) [Anatomy of a repo](#/anatomy) [Branching and merging](#/branches) [Collaboration](#/remotes) [Submodules](#/submodules) --- ## Git history Created by Linus Torvalds for the Linux kernel source Started in 2005, it took him 4 days to get it self-hosted and 2 more months to host Linux 3 years later, GitHub was launched Now, it serves 30M+ users, 100M+ repos and 3B+ lines of code --- ## Git properties * Distributed * The complete history is present locally * Designed for non-linear workflows * Easy branching & merging * Fast and scalable * Simple, generic-purpose data structure * More like a filesystem than a SCM --- ## Creating a repo New, empty repository git init demo-repo Obtain an existing repository git clone git@github.com:peterbudai/demo-repo.git The created repository is a complete, standalone entity. From now on, all operations are local. --- ## Anatomy of a repo ``` . |-- .git | |-- config | |-- ... | |-- objects | `-- refs |-- .gitignore |-- README.md `-- src `-- main.py ``` * Repository * Local configuration * Object database * Refs * Working directory --- ## Working with files ![Three states](https://book.git-scm.com/book/en/v2/images/areas.png) In the working directory, files can be either: * Tracked * Unchanged * Modified or deleted * Staged * Modified or deleted * Untracked * Ignored --- ## Commiting Recording the changes in the working directory as new version and stores it in the repository. One-step _(will not add untracked files!)_ git commit -a -m "Commit message" Using staging area git add [-A] git add ... git commit -m "Commit message" Commiting always takes a whole "snapshot" of the current file structure, not just records the changes. --- ## Repository Object database * content-addressable, append-only database * stores files, directories, commits, tags * each version is a different object, stored as a whole * they may contain pointers to others by their address References and tags * named pointers to commit objects * simple text files storing object addresses --- ## Object addresses SHA1 hash of the contents. For files $ echo -e "blob $(cat README.md | tr -d '\r' | wc -c)\x00$(cat README.md | tr -d '\r')" | sha1sum cffb72bf4f310e052924dca85235d03aebf479e6 *- $ openssl zlib -d -in .git/objects/cf/fb72bf4f310e052924dca85235d03aebf479e6 Even the slightest change will result in a different SHA1 hash, thus a different object. -- ## Object addresses SHA1 hash of the contents. For directories: $ git cat-file -p f56600 100644 blob 43ae0e2a6c6d8fca34872506ca0f2e64194fec7c .gitignore 100644 blob cffb72bf4f310e052924dca85235d03aebf479e6 README.md 040000 tree 7a02d51d8835b74b82d008e0273e6de31e819515 src Will change if an item is added, removed or its content or permissions change (recursively). -- ## Object addresses SHA1 hash of the contents. For commits: $ git cat-file -p 60eb0d tree f566009872bdd562f7c76e4220eeb1ae7b2406fd parent fdf4b4da0d4d388b0276f0fde71b29e6470ec36f author Péter Budai <...><PHONE_NUMBER> +0100 committer Péter Budai <...><PHONE_NUMBER> +0100 Added Hello World. If any content changes (even the commit message!), it will result in a different commit object. _One cannot change an already commited version!_ --- ## Working tree snapshots After the first commit ``` commit fdf4b4da0d4d388b0276f0fde71b29e6470ec36f (HEAD) Author: Péter Budai <...> Date: Tue Feb 5 15:23:58 2019 +0100 Added README. . |-- .gitignore `-- README.md ``` ```dot digraph { bgcolor=transparent; commit1 [shape=box; label="Commit\nfdf4b4"] root1 [shape=folder; label="/\n129c9f"] gitignore1 [shape=note; label=".gitignore (v1)\ne69de2"] readme [shape=note; label="README.md\ncffb72"] commit1 -> root1 root1 -> gitignore1 root1 -> readme } ``` -- ## Working tree snapshots After the second commit ``` commit 60eb0d3ad8babf1b082844472fa9c027fc0eb552 (HEAD -> master) Author: Péter Budai <...> Date: Tue Feb 5 16:35:00 2019 +0100 Added Hello World. . |-- .gitignore |-- README.md `-- src `-- main.py ``` ```dot digraph { bgcolor=transparent; commit1 [shape=box; label="Commit\nfdf4b4"] root1 [shape=folder; label="/\n129c9f"] gitignore1 [shape=note; label=".gitignore (v1)\ne69de2"] readme [shape=note; label="README.md\ncffb72"] commit1 -> root1 root1 -> gitignore1 root1 -> readme commit2 [shape=box; label="Commit\n60eb0d"] root2 [shape=folder; label="/\nf56600"] gitignore2 [shape=note; label=".gitignore (v2)\n43ae0e"] src [shape=folder; label="src\n7a02d5"] mainpy [shape=note; label="main.py\ne33bff"] commit1 -> commit2 [dir=back] commit2 -> root2 root2 -> gitignore2 root2 -> readme root2 -> src src -> mainpy {rank = same; commit1; commit2} } ``` --- ## Commit history All commits have one or more parents: they form a backward-linked list of the changes in the repository. ```bash $ git log --oneline d5e9466 d5e9466 Fixed typo. faab7c2 Factored out string constant. 74e95f3 Factored print function out 60eb0d3 Added Hello World. fdf4b4d Added README. $ git log --oneline 631a42b 631a42b Pretty-printing 74e95f3 Factored print function out 60eb0d3 Added Hello World. fdf4b4d Added README. ``` ```bash $ git config --global alias.graph \ log --oneline --decorate --graph $ git graph --all * d5e9466 Fixed typo. * faab7c2 Factored out string constant. | * 631a42b Pretty-printing |/ * 74e95f3 Factored print function out * 60eb0d3 Added Hello World. * fdf4b4d Added README. ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 [dir=back] {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2} } ``` It is easy to look up parents and previous states, but not vice-versa. --- ## Branches We can create meaningful labels pointing to a commit... git branch constant ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] master [shape=plain] constant [shape=plain] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 [dir=back] master -> master4 HEAD -> master4 constant -> branch2 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2} } ``` ...to make it easier to navigate between versions... $ git checkout constant Switched to branch 'constant' --- ## Working on a branch ...or to do changes that does not affect other branches. $ git checkout constant $ git commit -am "Fixed typo." ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [style=invis] master [shape=plain] constant [shape=plain; label="constant*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch0 -> branch1 -> branch2 [style=invis] master3 -> branch1 [dir=back] master -> master4 HEAD -> branch1 constant -> branch1 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"; style=bold] master [shape=plain] constant [shape=plain; label="constant*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 [dir=back] master -> master4 HEAD -> branch2 constant -> branch2 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2} } ``` The current branch (and HEAD) moves along with the new commits. All other refs stay put. --- ## HEAD HEAD is a special reference that always points to the currently checked out commit. ``` $ git checkout fdf4b4 You are in 'detached HEAD' state. ... HEAD is now at fdf4b4d Added README. ``` Even if no other branch points to that commit. ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] master [shape=plain] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master -> master4 HEAD -> master3 {rank = same; master1; master2; master3; master4} } ``` -- ## Detached HEAD Be cautious with detached HEAD. ``` $ git commit -m "..." $ git checkout master $ git gc ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] master [shape=plain] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master -> master4 HEAD -> master3 {rank = same; master1; master2; master3; master4} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"; style=bold] master [shape=plain] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 [dir=back] master -> master4 HEAD -> branch1 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"; style=dashed] master [shape=plain; label="master*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 [dir=back] master -> master4 HEAD -> master4 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] master [shape=plain; label="master*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master -> master4 HEAD -> master4 {rank = same; master1; master2; master3; master4} } ``` _GC removes all objects that no other object or ref points to!_ --- ## Tags Tags are just immutable, append-only branches, to label a specific point in the history. ``` git tag v1.0 ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] master [shape=plain; label="master*"] tag1 [shape=underline; label="v1.0"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master -> master4 HEAD -> master4 tag1 -> master3 {rank = same; master1; master2; master3; master4} } ``` -- ## Annotated tags They can carry some metadata (eg. description or a digital signature) ``` git tag -a v0.8 -m "Beta release" ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] master [shape=plain; label="master*"] tag1 [shape=underline; label="v0.8"] tag2 [shape=note; label="Tag\ne073b7"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master -> master4 HEAD -> master4 tag1 -> tag2 -> master3; {rank = same; master1; master2; master3; master4} } ``` --- ## Merging in general Diverging changes on different branches need to be unified eventually. The end result is always a commit that contains changes from both sides, but we have two options of how we achieve it: _merging_ or _rebasing_ Either way, Git usually does a quite good job on finding the middle ground, and we only need to resolve _merge conflicts_ when both sides changed the exact same lines. --- ## Merge operation git merge master Will create a new _merge commit_ on the current branch, with both parents ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] master [shape=plain] constant [shape=plain; label="constant*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch1 -> branch2 [dir=back] master -> master4 HEAD -> branch2 constant -> branch2 {rank = same; master1; master2; master3; master4} {rank = same; branch1; branch2} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] branch3 [shape=box; label="Commit\n8c31cb7"; style=bold] master [shape=plain] constant [shape=plain, label="constant*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 -> branch3 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 -> branch3 [dir=back] master -> master4 HEAD -> branch3 constant -> branch3 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2; branch3} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] branch3 [shape=box; label="Commit\n8c31cb7"] branch4 [shape=box; label="Commit\nb3199dd"; style=bold] master [shape=plain] constant [shape=plain, label="constant*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 -> branch3 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 -> branch3 -> branch4 [dir=back] master -> master4 HEAD -> branch4 constant -> branch4 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2; branch3; branch4} } ``` --- ## Rebase operation git rebase master Will _recreate_ all commits _one-by-one_ as they would be authored on top of the other branch. ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] master [shape=plain] constant [shape=plain; label="constant*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 [dir=back] master -> master4 HEAD -> branch2 constant -> branch2 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"; style=dashed] branch2 [shape=box; label="Commit\nd5e9466"] rebase1 [shape=box; label="Commit\n7bc489a"; style=bold] master [shape=plain] constant [shape=plain; label="constant*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 -> rebase1 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 [dir=back] rebase1 -> branch1 [dir=none; style=dashed] master -> master4 HEAD -> rebase1 constant -> branch2 {rank = same; master1; master2; master3; master4; rebase1} {rank = same; branch0; branch1; branch2} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"; style=dashed] branch2 [shape=box; label="Commit\nd5e9466"; style=dashed] rebase1 [shape=box; label="Commit\n7bc489a"; style=bold] rebase2 [shape=box; label="Commit\n32c2d79"; style=bold] master [shape=plain] constant [shape=plain; label="constant*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 -> rebase1 -> rebase2 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 [dir=back] rebase1 -> branch1 [dir=none; style=dashed] rebase2 -> branch2 [dir=none; style=dashed] master -> master4 HEAD -> rebase2 constant -> branch2 {rank = same; master1; master2; master3; master4; rebase1; rebase2} {rank = same; branch0; branch1; branch2} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"; style=dashed] branch2 [shape=box; label="Commit\nd5e9466"; style=dashed] rebase1 [shape=box; label="Commit\n7bc489a"; style=bold] rebase2 [shape=box; label="Commit\n32c2d79"; style=bold] master [shape=plain] constant [shape=plain; label="constant*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 -> rebase1 -> rebase2 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 [dir=back] master -> master4 HEAD -> rebase2 constant -> rebase2 {rank = same; master1; master2; master3; master4; rebase1; rebase2} {rank = same; branch0; branch1; branch2} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] rebase1 [shape=box; label="Commit\n7bc489a"; style=bold] rebase2 [shape=box; label="Commit\n32c2d79"; style=bold] master [shape=plain] constant [shape=plain; label="constant*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 -> rebase1 -> rebase2 [dir=back] master -> master4 HEAD -> rebase2 constant -> rebase2 {rank = same; master1; master2; master3; master4; rebase1; rebase2} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] rebase1 [shape=box; label="Commit\n7bc489a"] rebase2 [shape=box; label="Commit\n32c2d79"] rebase3 [shape=box; label="Commit\n1594b24"; style=bold] master [shape=plain] constant [shape=plain; label="constant*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 -> rebase1 -> rebase2 -> rebase3 [dir=back] master -> master4 HEAD -> rebase3 constant -> rebase3 {rank = same; master1; master2; master3; master4; rebase1; rebase2; rebase3} } ``` --- ## Merge vs rebase Rebase results in a cleaner history, for the price of rewriting it! Avoid rebase on already pushed commits, as it may result in diverging histories if the deleted commits were already fetched by others. ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] rebase1 [shape=box; label="Commit\n7bc489a"] rebase2 [shape=box; label="Commit\n32c2d79"] rebase3 [shape=box; label="Commit\n1594b24"; style=bold] master [shape=plain] constant [shape=plain; label="constant*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 -> rebase1 -> rebase2 -> rebase3 [dir=back] master -> master4 HEAD -> rebase3 constant -> rebase3 {rank = same; master1; master2; master3; master4; rebase1; rebase2; rebase3} } ``` Good for `pull`, but avoid pulling after a local merge. -- ## Merge vs rebase Merge always adds extra commit (except fast-forward), but it is non-destructive. The resulting graph shows the change history more realistically, but harder to follow. ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] branch3 [shape=box; label="Commit\n8c31cb7"] branch4 [shape=box; label="Commit\nb3199dd"; style=bold] master [shape=plain] constant [shape=plain, label="constant*"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 -> branch3 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 -> branch3 -> branch4 [dir=back] master -> master4 HEAD -> branch4 constant -> branch4 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2; branch3; branch4} } ``` Good for merging in large changesets of many commits. --- ## Remotes A _remote_ is a link to another copy of the repository * on another disk volume, * on a network share or a remote computer, * on a Git hosting service (like GitHub). Set a new remote named `backup` ``` git remote add backup file:///mnt/nas/demo-repo.git ``` Cloning automatically sets the source as `origin` ``` git clone git@github.com:peterbudai/demo-repo.git ``` --- ## Synchronizing between repos Synchronizing is simply done by exchanging the missing objects and updating references. * The connections between objects will automatically be restored after all objects arrived Receiving changes from a remote git fetch origin Sending changes to a remote (branch) git push backup master:master --- ## fetch Fetch does not change anything in the working copy, just updates the database. ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [style=invis] master [shape=plain] rmaster [shape=plain; label="origin/master"] constant [shape=plain; label="constant*"] rconstant [shape=plain; label="origin/constant"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch0 -> branch1 -> branch2 [style=invis] master3 -> branch1 [dir=back] master -> master4 rmaster -> master4 HEAD -> branch1 constant -> branch1 rconstant -> branch1 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] master [shape=plain] rmaster [shape=plain; label="origin/master"] constant [shape=plain; label="constant*"] rconstant [shape=plain; label="origin/constant"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 [dir=back] master -> master4 rmaster -> master4 HEAD -> branch1 constant -> branch1 rconstant -> branch2 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2} } ``` Remote references are kept separately in the local database. --- ## Tracking branches You can "connect" a local branch to a remote branch. Git will try to update the other end during pull and push. git branch -u origin/constant or git push -u origin master --- ## Pull git fetch && git rebase origin/master In a simple case it just updates the references ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [style=invis] master [shape=plain; label="master*"] rmaster [shape=plain; label="origin/master"] HEAD [shape=plain] master1 -> master2 -> master3 [dir=back] master -> master3 rmaster -> master3 HEAD -> master3 {rank = same; master1; master2; master3; master4} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] master [shape=plain; label="master*"] rmaster [shape=plain; label="origin/master"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master -> master3 rmaster -> master4 HEAD -> master3 {rank = same; master1; master2; master3; master4} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] master [shape=plain; label="master*"] rmaster [shape=plain; label="origin/master"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master -> master4 rmaster -> master4 HEAD -> master4 {rank = same; master1; master2; master3; master4} } ``` --- ## Pull git fetch && git rebase origin/master If there were local changes, the local and remote branch need to be merged ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [style=invis] branch2 [style=invis] master [shape=plain; label="master*"] rmaster [shape=plain; label="origin/master"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch0 -> branch1 -> branch2 [style=invis] master -> master4 rmaster -> master3 HEAD -> master4 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] master [shape=plain; label="master*"] rmaster [shape=plain; label="origin/master"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 [dir=back] master -> master4 rmaster -> branch2 HEAD -> master4 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"; style=dashed] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] master [shape=plain; label="master*"] rmaster [shape=plain; label="origin/master"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 [dir=back] master -> master4 rmaster -> branch2 HEAD -> master4 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n9eae16b"; style=bold] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] master [shape=plain; label="master*"] rmaster [shape=plain; label="origin/master"] HEAD [shape=plain] master1 -> master2 -> master3 -> branch1 -> branch2 -> master4 [dir=back] master3 -> branch0 -> branch1 [style=invis] master -> master4 rmaster -> branch2 HEAD -> master4 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n9eae16b"] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] master [shape=plain; label="master*"] rmaster [shape=plain; label="origin/master"] HEAD [shape=plain] master1 -> master2 -> master3 -> branch1 -> branch2 -> master4 [dir=back] master -> master4 rmaster -> branch2 HEAD -> master4 {rank = same; master1; master2; master3; master4; branch1; branch2} } ``` --- ## Push Unlike to fetch, it sends only the objects relevant to the tracking branch. git push In a simple case it just updates the references. ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] master [shape=plain; label="master*"] rmaster [shape=plain; label="origin/master"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master -> master4 rmaster -> master3 HEAD -> master4 {rank = same; master1; master2; master3; master4} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] master [shape=plain; label="master*"] rmaster [shape=plain; label="origin/master"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master -> master4 rmaster -> master4 HEAD -> master4 {rank = same; master1; master2; master3; master4} } ``` --- ## Push conflict If there were changes at both side, the push will be rejected $ git push ! [rejected] master -> master (non-fast forward) error: failed to push some refs to 'git@github.com:peterbudai/demo-repo.git You need to resolve the situation locally first and push again $ git pull $ git push --- ## Force push ``` git push -f ``` It should be avoided if possible, as it may result in diverging histories if the deleted commits were already fetched by others. ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] master [shape=plain; label="master*"] rmaster [shape=plain; label="origin/master"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 [dir=back] master -> branch2 rmaster -> master4 HEAD -> branch2 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] master4 [shape=box; label="Commit\n631a42b"; style=dashed] branch0 [style=invis] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] master [shape=plain; label="master*"] rmaster [shape=plain; label="origin/master"] HEAD [shape=plain] master1 -> master2 -> master3 -> master4 [dir=back] master3 -> branch0 -> branch1 [style=invis] master3 -> branch1 -> branch2 [dir=back] master -> branch2 rmaster -> branch2 HEAD -> branch2 {rank = same; master1; master2; master3; master4} {rank = same; branch0; branch1; branch2} } ``` ```dot digraph { bgcolor=transparent; master1 [shape=box; label="Commit\nfdf4b4d"] master2 [shape=box; label="Commit\n60eb0d3"] master3 [shape=box; label="Commit\n74e95f3"] branch1 [shape=box; label="Commit\nfaab7c2"] branch2 [shape=box; label="Commit\nd5e9466"] master [shape=plain; label="master*"] rmaster [shape=plain; label="origin/master"] HEAD [shape=plain] master1 -> master2 -> master3 -> branch1 -> branch2 [dir=back] master -> branch2 rmaster -> branch2 HEAD -> branch2 {rank = same; master1; master2; master3; branch1; branch2} } ``` --- ## Submodules For "mounting" the contents of another repository under a subfolder. ```dot digraph { subgraph cluster2 { label="Submodule"; labeljust=l sub1 [shape=box; label="Commit\ncf83e13"] sub2 [shape=box; label="Commit\n8fc1c14"] sub3 [shape=box; label="Commit\n50b5715"] sub1 -> sub2 -> sub3 [dir=back] {rank=same; sub1; sub2; sub3} } subgraph cluster1 { label="Main repo"; labeljust=l commit1 [shape=box; label="Commit\nfdf4b4"] root1 [shape=folder; label="/\n129c9f"] readme1 [shape=note; label="README.md (v1)\ncffb72"] lib1 [shape=cds; label="lib\n8fc1c14"] commit1 -> root1 root1 -> readme1 root1 -> lib1 lib1 -> sub2 } bgcolor=transparent; } ``` --- ## Updating a submodule It always points to a given commit of the other repo. ```dot digraph { bgcolor=transparent; subgraph cluster2 { label="Submodule"; labeljust=l sub1 [shape=box; label="Commit\ncf83e13"] sub2 [shape=box; label="Commit\n8fc1c14"] sub3 [shape=box; label="Commit\n50b5715"] sub1 -> sub2 -> sub3 [dir=back] {rank=same; sub1; sub2; sub3} } subgraph cluster1 { label="Main repo"; labeljust=l commit1 [shape=box; label="Commit\nfdf4b4"] root1 [shape=folder; label="/\n129c9f"] readme1 [shape=note; label="README.md (v1)\ncffb72"] lib1 [shape=cds; label="lib\n8fc1c14"] commit1 -> root1 root1 -> readme1 root1 -> lib1 lib1 -> sub2 } } ``` ```dot digraph { bgcolor=transparent; subgraph cluster2 { label="Submodule"; labeljust=l sub1 [shape=box; label="Commit\ncf83e13"] sub2 [shape=box; label="Commit\n8fc1c14"] sub3 [shape=box; label="Commit\n50b5715"] sub1 -> sub2 -> sub3 [dir=back] {rank=same; sub1; sub2; sub3} } subgraph cluster1 { label="Main repo"; labeljust=l commit1 [shape=box; label="Commit\nfdf4b4"] root1 [shape=folder; label="/\n129c9f"] readme1 [shape=note; label="README.md (v1)\ncffb72"] lib1 [shape=cds; label="lib\n8fc1c14"] commit1 -> root1 root1 -> readme1 root1 -> lib1 lib1 -> sub2 commit2 [shape=box; label="Commit\nfdf4b4"] root2 [shape=folder; label="/\n8c66b2"] readme2 [shape=note; label="README.md (v2)\n39aa14"] commit1 -> commit2 [dir=back] commit2 -> root2 root2 -> readme2 root2 -> lib1 {rank=same; commit1; commit2} } } ``` ```dot digraph { bgcolor=transparent; subgraph cluster2 { label="Submodule"; labeljust=l sub1 [shape=box; label="Commit\ncf83e13"] sub2 [shape=box; label="Commit\n8fc1c14"] sub3 [shape=box; label="Commit\n50b5715"] sub1 -> sub2 -> sub3 [dir=back] {rank=same; sub1; sub2; sub3} } subgraph cluster1 { label="Main repo"; labeljust=l commit1 [shape=box; label="Commit\nfdf4b4"] root1 [shape=folder; label="/\n129c9f"] readme1 [shape=note; label="README.md (v1)\ncffb72"] lib1 [shape=cds; label="lib\n8fc1c14"] commit1 -> root1 root1 -> readme1 root1 -> lib1 lib1 -> sub2 commit2 [shape=box; label="Commit\nfdf4b4"] root2 [shape=folder; label="/\n8c66b2"] readme2 [shape=note; label="README.md (v2)\n39aa14"] commit2 -> root2 root2 -> readme2 root2 -> lib1 commit3 [shape=box; label="Commit\n4050b5"] root3 [shape=folder; label="/\n495991"] lib2 [shape=cds; label="lib\n50b5715"] commit3 -> root3 root3 -> readme2 root3 -> lib2 lib2 -> sub3 commit1 -> commit2 -> commit3 [dir=back] {rank=same; commit1; commit2; commit3} } } ``` --- ## Further reading [Pro Git](https://git-scm.com/book/en/v2) book by Scott Chacon and Ben Straub (free) [Source code](https://github.com/peterbudai/git-demystified) of this presentation --- # Thank you


Board Game World
Your greatest adventure is about to begin!
Username has to be 8-?? characters long
Register


There are no limitations for field names in Zend\Search\Lucene.
Nevertheless it’s a good idea not to use ‘id‘ and ‘score‘ names to avoid ambiguity in QueryHit properties names.
The Zend\Search\Lucene\Search\QueryHit id and score properties always refer to internal Lucene document id and hit score. If the indexed document has the same stored fields, you have to use the getDocument() method to access them:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | $hits = $index->find($query);
foreach ($hits as $hit) {
// Get 'title' document field
$title = $hit->title;
// Get 'contents' document field
$contents = $hit->contents;
// Get internal Lucene document id
$id = $hit->id;
// Get query hit score
$score = $hit->score;
// Get 'id' document field
$docId = $hit->getDocument()->id;
// Get 'score' document field
$docId = $hit->getDocument()->score;
// Another way to get 'title' document field
$title = $hit->getDocument()->title;
}
|
Indexing performance is a compromise between used resources, indexing time and index quality.
Index quality is completely determined by number of index segments.
Each index segment is entirely independent portion of data. So indexes containing more segments need more memory and time for searching.
Index optimization is a process of merging several segments into a new one. A fully optimized index contains only one segment.
Full index optimization may be performed with the optimize() method:
1 2 3 | $index = Zend\Search\Lucene::open($indexPath);
$index->optimize();
|
Index optimization works with data streams and doesn’t take a lot of memory but does require processor resources and time.
Lucene index segments are not updatable by their nature (the update operation requires the segment file to be completely rewritten). So adding new document(s) to an index always generates a new segment. This, in turn, decreases index quality.
An index auto-optimization process is performed after each segment generation and consists of merging partial segments.
There are three options to control the behavior of auto-optimization (see Index optimization section):
- MaxBufferedDocs is the number of documents that can be buffered in memory before a new segment is generated and written to the hard drive.
- MaxMergeDocs is the maximum number of documents merged by auto-optimization process into a new segment.
- MergeFactor determines how often auto-optimization is performed.
Note
All these options are Zend\Search\Lucene object properties- not index properties. They affect only current Zend\Search\Lucene object behavior and may vary for different scripts.
MaxBufferedDocs doesn’t have any effect if you index only one document per script execution. On the other hand, it’s very important for batch indexing. Greater values increase indexing performance, but also require more memory.
There is simply no way to calculate the best value for the MaxBufferedDocs parameter because it depends on average document size, the analyzer in use and allowed memory.
A good way to find the right value is to perform several tests with the largest document you expect to be added to the index [1]. It’s a best practice not to use more than a half of the allowed memory.
MaxMergeDocs limits the segment size (in terms of documents). It therefore also limits auto-optimization time by guaranteeing that the addDocument() method is not executed more than a certain number of times. This is very important for interactive applications.
Lowering the MaxMergeDocs parameter also may improve batch indexing performance. Index auto-optimization is an iterative process and is performed from bottom up. Small segments are merged into larger segment, which are in turn merged into even larger segments and so on. Full index optimization is achieved when only one large segment file remains.
Small segments generally decrease index quality. Many small segments may also trigger the “Too many open files” error determined by OS limitations [2].
in general, background index optimization should be performed for interactive indexing mode and MaxMergeDocs shouldn’t be too low for batch indexing.
MergeFactor affects auto-optimization frequency. Lower values increase the quality of unoptimized indexes. Larger values increase indexing performance, but also increase the number of merged segments. This again may trigger the “Too many open files” error.
MergeFactor groups index segments by their size:
. Not greater than MaxBufferedDocs.
. Greater than MaxBufferedDocs, but not greater than MaxBufferedDocs* MergeFactor.
- . Greater than MaxBufferedDocs* MergeFactor, but not greater than MaxBufferedDocs*
- MergeFactor* MergeFactor.
. ...
Zend\Search\Lucene checks during each addDocument() call to see if merging any segments may move the newly created segment into the next group. If yes, then merging is performed.
So an index with N groups may contain MaxBufferedDocs + (N-1)* MergeFactor segments and contains at least MaxBufferedDocs* MergeFactor (N-1) documents.
This gives good approximation for the number of segments in the index:
NumberOfSegments <= MaxBufferedDocs + MergeFactorlog **MergeFactor* (NumberOfDocuments/MaxBufferedDocs)
MaxBufferedDocs is determined by allowed memory. This allows for the appropriate merge factor to get a reasonable number of segments.
Tuning the MergeFactor parameter is more effective for batch indexing performance than MaxMergeDocs. But it’s also more course-grained. So use the estimation above for tuning MergeFactor, then play with MaxMergeDocs to get best batch indexing performance.
The Zend\Search\Lucene instance performs some work at exit time if any documents were added to the index but not written to a new segment.
It also may trigger an auto-optimization process.
The index object is automatically closed when it, and all returned QueryHit objects, go out of scope.
If index object is stored in global variable than it’s closed only at the end of script execution [3].
PHP exception processing is also shut down at this moment.
It doesn’t prevent normal index shutdown process, but may prevent accurate error diagnostic if any error occurs during shutdown.
There are two ways with which you may avoid this problem.
The first is to force going out of scope:
1 2 3 4 5 | $index = Zend\Search\Lucene::open($indexPath);
...
unset($index);
|
And the second is to perform a commit operation before the end of script execution:
1 2 3 | $index = Zend\Search\Lucene::open($indexPath);
$index->commit();
|
This possibility is also described in the “Advanced. Using index as static property” section.
It’s a common practice to store some unique document id in the index. Examples include url, path, or database id.
Zend\Search\Lucene provides a termDocs() method for retrieving documents containing specified terms.
This is more efficient than using the find() method:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | // Retrieving documents with find() method using a query string
$query = $idFieldName . ':' . $docId;
$hits = $index->find($query);
foreach ($hits as $hit) {
$title = $hit->title;
$contents = $hit->contents;
...
}
...
// Retrieving documents with find() method using the query API
$term = new Zend\Search\Lucene\Index\Term($docId, $idFieldName);
$query = new Zend\Search\Lucene\Search\Query\Term($term);
$hits = $index->find($query);
foreach ($hits as $hit) {
$title = $hit->title;
$contents = $hit->contents;
...
}
...
// Retrieving documents with termDocs() method
$term = new Zend\Search\Lucene\Index\Term($docId, $idFieldName);
$docIds = $index->termDocs($term);
foreach ($docIds as $id) {
$doc = $index->getDocument($id);
$title = $doc->title;
$contents = $doc->contents;
...
}
|
Zend\Search\Lucene is a relatively memory-intensive module.
It uses memory to cache some information and optimize searching and indexing performance.
The memory required differs for different modes.
The terms dictionary index is loaded during the search. It’s actually each 128th [4] term of the full dictionary.
Thus memory usage is increased if you have a high number of unique terms. This may happen if you use untokenized phrases as a field values or index a large volume of non-text information.
An unoptimized index consists of several segments. It also increases memory usage. Segments are independent, so each segment contains its own terms dictionary and terms dictionary index. If an index consists of N segments it may increase memory usage by N times in worst case. Perform index optimization to merge all segments into one to avoid such memory consumption.
Indexing uses the same memory as searching plus memory for buffering documents. The amount of memory used may be managed with MaxBufferedDocs parameter.
Index optimization (full or partial) uses stream-style data processing and doesn’t require a lot of memory.
Zend\Search\Lucene works with UTF-8 strings internally. So all strings returned by Zend\Search\Lucene are UTF-8 encoded.
You shouldn’t be concerned with encoding if you work with pure ASCII data, but you should be careful if this is not the case.
Wrong encoding may cause error notices at the encoding conversion time or loss of data.
Zend\Search\Lucene offers a wide range of encoding possibilities for indexed documents and parsed queries.
Encoding may be explicitly specified as an optional parameter of field creation methods:
1 2 3 4 5 6 7 | $doc = new Zend\Search\Lucene\Document();
$doc->addField(Zend\Search\Lucene\Field::Text('title',
$title,
'iso-8859-1'));
$doc->addField(Zend\Search\Lucene\Field::UnStored('contents',
$contents,
'utf-8'));
|
This is the best way to avoid ambiguity in the encoding used.
If optional encoding parameter is omitted, then the current locale is used. The current locale may contain character encoding data in addition to the language specification:
1 2 3 4 5 6 7 8 | setlocale(LC_ALL, 'fr_FR');
...
setlocale(LC_ALL, 'de_DE.iso-8859-1');
...
setlocale(LC_ALL, 'ru_RU.UTF-8');
...
|
The same approach is used to set query string encoding.
If encoding is not specified, then the current locale is used to determine the encoding.
Encoding may be passed as an optional parameter, if the query is parsed explicitly before search:
1 2 3 4 | $query =
Zend\Search\Lucene\Search\QueryParser::parse($queryStr, 'iso-8859-5');
$hits = $index->find($query);
...
|
The default encoding may also be specified with setDefaultEncoding() method:
1 2 3 | Zend\Search\Lucene\Search\QueryParser::setDefaultEncoding('iso-8859-1');
$hits = $index->find($queryStr);
...
|
The empty string implies ‘current locale’.
If the correct encoding is specified it can be correctly processed by analyzer. The actual behavior depends on which analyzer is used. See the Character Set documentation section for details.
It should be clear that Zend\Search\Lucene as well as any other Lucene implementation does not comprise a “database”.
Indexes should not be used for data storage. They do not provide partial backup/restore functionality, journaling, logging, transactions and many other features associated with database management systems.
Nevertheless, Zend\Search\Lucene attempts to keep indexes in a consistent state at all times.
Index backup and restoration should be performed by copying the contents of the index folder.
If index corruption occurs for any reason, the corrupted index should be restored or completely rebuilt.
So it’s a good idea to backup large indexes and store changelogs to perform manual restoration and roll-forward operations if necessary. This practice dramatically reduces index restoration time.
| [1] | memory_get_usage() and memory_get_peak_usage() may be used to control memory usage. |
| [2] | Zend\Search\Lucene keeps each segment file opened to improve search performance. |
| [3] | This also may occur if the index or QueryHit instances are referred to in some cyclical data structures, because PHP garbage collects objects with cyclic references only at the end of script execution. |
| [4] | The Lucene file format allows you to configure this number, but Zend\Search\Lucene doesn’t expose this in its API. Nevertheless you still have the ability to configure this value if the index is prepared with another Lucene implementation. |
The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.


Exploration 5.1.7. (Strang Ex 5.1.23).
Suppose that \(A = \left( \begin{smallmatrix} 4 & 1 \\ 2 & 3 \end{smallmatrix} \right)\) and that \(\lambda\) is some number. Find \(A^2\text{,}\) \(A^{-1}\) and \(A-\lambda I\) and their determinants.
Which two numbers \(\lambda\) lead to \(\det(A-\lambda I) = 0\text{?}\)


Ticket ID: 409788
Name:
Parker Seidel
No Active Support
E-mail:
<EMAIL_ADDRESS>Response Time:
72hours, 60 hours left
Last Action:
Never been locked.
Link to public post
Status:
Not answered


{{ range $day := $.Site.Data.schedule }} {{- partial "date-long.html" (dict "time" .day "lang" $lang) }} {{ end }} Regular sessions take place on zoom webinar. Sessions marked with color take place in our virtual meet & greet room Date and time are shown in: Central European Time - Amsterdam {{ range $session := $day.sessions }} {{ $sessionPage := $.Site.GetPage (path.Join "/sessions" $session.session) }} {{ $time := split $session.time ":" }} {{ $hh := index $time 0 }} {{ $mm := index $time 1 }} {{ $hh }} {{ $mm }} {{ partial "schedule-session" $sessionPage }} {{ end }}


Android developer ❤| Ionic hybrid app dev 😎| Firebase ninja 🐱👤| One commit at a time ✌| Android Developer Intern @ Compwiz Creations
A simple ionic 4 animated shopping cart app.
Link to source code/github repo here 😉
Link to web app here 😉
A beautiful count down timer for your rest durations between sets in workouts or anything else that you need to take some time off to refresh.
Link to the web app here 😉
This application gives you a beautiful minimal music player ionic4 DEMO app.


Mac Terminal Simulation is a collection of text files styled to look exactly like a Mac Terminal. It has all of the Terminal theme profiles of Macintosh Big Sur.
Download here. Copy text


---
layout: post
title: Bypass Google Setup Wiz through ADB
subtitle: 利用ADB跳过谷歌开机设置
date: '2019-09-19T20:19:00.001+08:00'
author: DotIN13
tags:
- Android Dev
- ADB
- Google
- Setup Wiz
modified_time: '2019-12-19T20:16:15.922+08:00'
blogger_id: tag:blogger.com,1999:blog-7275524089009887162.post-3874329237625577588
blogger_orig_url: https://dotin13laf.blogspot.com/2019/09/bypass-google-setup-wiz-through-adb.html
---
In order to bypass Google Setup Wiz, the device need to be in TWRP or in system with ADB enabled (but why in heavens
would you want to skip setup if you can enable ADB in the settings :P).
Steps:
$ cd /path/to/your/adb.exe
$ adb devices
$ adb root
$ adb shell
$ cd /system_root/system
$ echo "ro.setupwizard.mode=DISABLED" >> /system/build.prop


The web is made up of HTML, urls, https, and web applications. The world wide web (www) is made up of HTML documents.
HTML stands for hypertext markup language and is the main protocol of the web.
Servers are computers that host the files that make up the web.
Internet is the world's largest computer network.
Browser is a program that runs on your computer to display files found on the web.
Here is the video that breaks it down: Components Of The Web
HTML is made up of: text content, markup, references to other documents, links to other pages.
This is a picture of what HTML looks like:
Here are some basic HTML words that will be helpful to know along the way.
Tags are the commands within angled brackets that tell the computer what to do. There are two types of tags, an open and closing tag.
Elements refer to anything within and open and closing tag.
Attribute is a property of an HTML element. Used in the placement of a url link for a video, for example.


Driver Name
Batmobile Usage
- App installed 6 Months Ago
- Tracking Enabled
- Last Login: 09:00 CST, Fri Jun 17
Assignments
Echo Assigned, Active
123443211
Change DriverNew York
TN, 60655
14:00 EST
Picked up Fri, May 20
Picked up Fri, May 20
Chicago
TX, 50968
16:00-18:00 EST
Today, Apr 20
Today, Apr 20
Next Assignment
123443211
Change DriverNew York
TN, 60655
14:00 EST
Picked up Fri, May 20
Picked up Fri, May 20
Chicago
TX, 50968
16:00-18:00 EST
Today, Apr 20
Today, Apr 20


ScottPlot 5.0 Developer Cookbook
⚠ Warning: This page describes an unreleased development version of ScottPlot
{{TITLE}}
{{CONTENT}}


The quickstarts demonstrate several ways how to create Portlets for GateIn Portal. They provide small, specific, working examples that can be used as a reference for your own project.
This release of Portal Quickstarts is compatible with GateIn Portal 3.6 running on JBoss AS.


I'm a postdoc under profs. Indiveri and Grewe at the ETH AI Center and Institute of Neuroinformatics of the University of Zürich and ETH.
I work on learning in spiking neural networks. I also teach Software Carpentry workshops and train new instructors.


The hotel can host a number of guests. We will put forward a booking system to ease the pain of finding somewhere to stay. All in good time!


a web developer
Tribute Page
Random Quote Machine
JavaScript Calculator
Map Data Across The Globe
Wikipedia Viewer
Tic Tac Toe Game
How do you take your coffee?