Birth of Mustafa Kemal Ataturk to Ali Riza and Zübeyde at Salonika.
German military mission established in Ottoman Empire.
Young Mustafa enters Military Secondary School at Salonika and is given the additional name of Kemal.
Mustafa Kemal enters Military Training School at Monastir.
Revolt by students of Military Medical School in Istanbul suppressed.
17 April. Ottoman-Greek war commences, following a Greek threat to annex Crete. Peace settlement by intervention of the European Powers.
State visit of Kaiser Wilhelm II to Ottoman Empire.
13 March. Mustafa Kemal enters War College in Istanbul.
Mustafa Kemal graduates as Lieutenant, General Staff College in Istanbul.
11 January. Mustafa Kemal graduates from the General Staff College with the rank of Staff Captain and is posted to the Fifth Army, based in Damascus
October. Mustafa Kemal helps to found Fatherland (Vatan) Society in Damascus.
20 June. Mustafa Kemal promoted Adjutant-Major.
September. Mustafa Kemal posted to Third Army at Salonika.
24 July. 'Young Turk' Revolution in Salonika. Committee of Union and Progress forces Abdulhamit to restore Constitution of 1876 and recall Parliament.
5 October. Bulgaria proclaims independence.
7 October. Austria-Hungary annexes Bosnia and Herzegovina.
12 October. Crete votes for Union with Greece.
Mustafa Kemal sent to Tripolitania on mission for Committee of Union and Progress.
13 April. Counter-revolution in Istanbul. Union and Progress striking force, with Mustafa Kemal as divisional chief of staff, marches on the city from Salonika.
27 April. Deposition and exile of Abdulhamit. Succession of Mehmet V as Sultan.
Mustafa Kemal attends Congress of Union and Progress Party in Salonika.
6 September. Mustafa Kemal appointed Commander of Third Army and later Commander of Thirty-eighth Infantry Regiment.
Mustafa Kemal serves as Chief of Staff in suppression of revolt in Albania.
Mustafa Kemal sent to Paris with military mission to attend French army manoeuvres.
13 September. Mustafa Kemal is posted to the General Staff in Istanbul.
5 October. Italian invasion of Tripoli.
Mustafa Kemal with Turkish Forces at Tobruk and Derna.
27 November. Mustafa Kemal promoted to Major.
8 October - 3 December. Beginning of First Balkan War. Montenegro, Serbia, Bulgaria and Greece at war with Ottoman Empire. Severe Turkish defeats. Salonika falls to the Greeks. Mustafa Kemal leaves Cyrenaica and returns to Istanbul. Coup d'etat against Government by Union and Progress officers.
25 November. Mustafa Kemal appointed Director of Operations for relief of Adrianople.
Fall of Adrianople.
30 May. Treaty of London between Ottomans and Balkan states.
30 June - 20 July. Second Balkan War. Bulgaria attacks Greece, Serbia and Rumania. Ottomans recovers Adrianople.
27 September. Treaty of Bucharest restores territory to Ottoman Empire.
27 October. Mustafa Kemal appointed Military Attaché in Sofia.
1 March. Mustafa Kemal promoted Lieutenant-Colonel.
28 June. Assassination of Archduke Franz Ferdinand at Sarajevo.
16 July. Mustafa Kemal sends despatch to War Minister from Sofia, urging a policy of Turkish neutrality in the event of war, with a view to possible later intervention against Bulgaria and the Central Powers.
28 July. Austria declares war on Serbia, with support of Germany.
2 August. Ottoman leadership signs secret alliance with Germany.
11 August. Ottomans purchase German warships Goeben and Breslau on arrival in the Bosporus.
28 October. Ottomans shells Russian Black Sea ports.
3 November. Russia declares war on Ottoman Empire.
5 November. Britain and France declare war on Ottoman Empire.
2 February. Mustafa Kemal appointed to reorganize and command Nineteenth Division in Thrace.
19 February. Unsuccessful Allied naval attack on Dardanelles.
25 February. Mustafa Kemal establishes Headquarters of Nineteenth Division at Maidos on Gallipoli Peninsula.
18 March. Allied navy fails to force the Turkish Straits. Mustafa Kemal demonstrates outstanding skills as a soldier and commander throughout the battle at Canakkale.
25 April. Allied military landings at Ariburnu (Anzac Cove). Advance checked by Mustafa Kemal with his outstanding leadership of the Nineteenth Division.
1 June. Mustafa Kemal promoted Colonel.
8 - 9 August. Mustafa Kemal appointed to command of Sixteenth Army Corps.
Checks second Allied advance on Gallipoli Peninsula.
9 January. Allied evacuation of Gallipoli Peninsula complete.
14 January. Mustafa Kemal posted to Adrianople in command of Sixteenth Army Corps. Transfer to Caucasus front.
1 April. Mustafa Kemal promoted General and Pasha.
27 June. Sherif of Mecca proclaims independence of Arabia.
6 - 7 August. Mustafa Kemal recaptures Bitlis and Muş from Russians.
5 March. Mustafa Kemal appointed second-in-command effective Commander of Second Army
11 March. British forces capture Baghdad.
5 July. Mustafa Kemal appointed Commander of Seventh Army in Syria.
20 September. Mustafa Kemal sends report to Government on the poor state of the army and the country, and relinquishes his command.
October. Mustafa Kemal returns to Istanbul.
11 December. British forces capture Jerusalem.
15 December - 5 January 1918. Mustafa Kemal visits Germany with Crown Prince Vahdettin.
3 July. Death of Sultan Mehmet V. Vahdettin succeeds him as Mehmet VI.
7 August. Mustafa Kemal reappointed Commander of Seventh Army in Palestine.
19 - 30 September. British forces, under General Allenby, drive Turkish forces out of Palestine and Syria. Mustafa Kemal defends frontier north of Aleppo.
30 October. Armistice signed between Ottomans and Britain at Mudros.
31 October. Mustafa Kemal takes over command of Army Group at Adana.
7 November. Dissolution of Army Group.
13 November. Mustafa Kemal returns to Istanbul.
Allied fleets enter Istanbul.
21 November. Dissolution of Parliament.
18 January. Opening of Peace Conference at Versailles.
30 April. Mustafa Kemal appointed Inspector-General of Ninth (later Third) Army in Anatolia.
15 May. Greek forces land in Izmir, with Allied approval.
19 May. Mustafa Kemal lands in Samsun.
21 June. Mustafa Kemal issues 'Declaration of Independence' at Amasya.
Summons Nationalist Congress to be held in Sivas.
23 June. Mustafa Kemal ordered by the Ottoman Government to return to Istanbul.
8 July. Mustafa Kemal resigns from the army and is dismissed by the Ottoman Government.
23 July - 7 August. Nationalist Congress meets in Erzurum under presidency of Mustafa Kemal. Declarations of National Pact are issued.
4 - 13 September. Nationalist Congress meets at Sivas under presidency of Mustafa Kemal. Confirmation of National Pact. Establishment of Representative Committee.
5 October. Resignation of Government.
7 November. New Parliament elected in Istanbul with Nationalist representation.
27 December. Mustafa Kemal establishes headquarters in Ankara, with Representative Committee.
28 January. National Pact adopted by Istanbul Parliament.
9 February. Evacuation of French garrison from Maraş and start of general withdrawal from Cilicia.
16 March. Military occupation of Istanbul by Allies.
11 April. Dissolution of Istanbul Parliament.
23 April. First Grand National Assembly meets in Ankara.
11 May. Mustafa Kemal condemned to death by Sultan's Government.
10 June. Treaty of Sevres presented by Allies to Sultan's Government.
22 June - 9 July. Greek army advances into Anatolia and captures Bursa.
10 August. Treaty of Sevres signed by Sultan's Government.
24 August. Draft treaty initialled in Moscow between Soviet Union and Nationalist Government.
28 September - 2 November. Nationalist forces invade regions with Armenian revolts and capture Kars.
2 December. Soviet Union establishes Armenian Republic at Erivan.
3 December. Treaty of Gümrü settles Turco-Armenian frontiers.
6 - 10 January. Greek advance checked at First Battle of Inonu.
20 January. Grand National Assembly at Ankara adopts Constitution Act, based on popular sovereignty.
23 February - 12 March. London Conference fails to reach agreement with Nationalists on modifications to Treaty of Sevres.
16 March. Treaty of Moscow between Nationalist Government and Soviet Union.
23 March - 1 April. Greeks resume offensive in Anatolia and are checked at Second Battle of Inonu.
10 July. Greeks resume offensive and capture Eskişehir.
5 August. Mustafa Kemal given full powers as Commander-in-Chief by Grand National Assembly.
23 August - 13 September. Battle of Sakarya. Turks check Greek advance before Ankara.
26 August. Greeks thrown back at battle of Sakarya.
19 September. Mustafa Kemal given title of “Gazi”and rank of Marshal by Grand National Assembly.
13 October. Treaty of Kars between Nationalist Government and Transcaucasian Soviet Republics.
20 October. Treaty of Ankara between Nationalist Government and France.
26 August - 9 September. Nationalist forces defeat Greeks in counter-offensive and capture Izmir, which is destroyed by fire. Turks launch final offensive against Greek forces in Anatolia; break through the following day; win decisive victory on 30 August.
23 September. Nationalist forces enter the Turkish Straits Neutral Zone.
3 - 11 October. Conference at Mudanya agrees on Armistice between Allies and Nationalist Government.
19 October. Resignation of Lloyd George and his Government.
1 November. Mustafa Kemal proclaims abolition of Sultanate.
17 November. Flight of Sultan Mehmet VI from Istanbul.
20 November. Opening of Peace Conference at Lausanne.
14 January. Death of Mustafa Kemal's mother, in Izmir.
29 January. Mustafa Kemal marries Latife in Izmir.
4 February. Breakdown of Lausanne Conference.
17 February. Mustafa Kemal opens Economic Congress in Izmir.
23 April. Resumption of Lausanne Conference.
24 July. Treaty of Lausanne signed in Switzerland by Turkey and the Entente powers that fought in World War I. After the conclusion of the Turkish War of Independence, this treaty recognized the Republic of Turkey as a sovereign nation.
9 August. Foundation of People's Party (Cumhuriyet Halk Partisi, CHP).
11 August. Second Grand National Assembly.
2 October. Turkish forces occupy Istanbul, following Allied evacuation.
9 October. Ankara becomes capital of Turkey.
29 October. Proclamation of the Turkish Republic, with Mustafa Kemal as President.
3 March. The Caliphate is abolished, the Ottoman dynasty is exiled, religious schools are closed down, and organized Islam becomes regulated by the state.
8 April. Abolition of religious courts.
17 November. Foundation of Progressive Party.
11 February - 12 April. Revolt in eastern region.
4 March. Law for Maintenance of Public Order gives Government exceptional powers.
3 June. Suppression of Progressive Party.
5 August. Mustafa Kemal divorces Latife.
30 August - 2 September. Mustafa Kemal tours Kastamonu province, announcing abolition of fez, suppression of religious brotherhoods, and closing of sacred tombs as places of worship.
17 February. Adoption of new Civil Law code.
5 June. Agreement on Mosul. Treaty of Ankara between Turkey, Britain and Irak.
15 June - 13 July. Attempted assassination of Mustafa Kemal in Izmir is uncovered.
Trial and execution of ringleaders.
1 - 26 August. Trial and execution of 'Young Turk' leaders and others in Ankara.
1 July. Mustafa Kemal revisits Istanbul.
15 - 20 October. Mustafa Kemal makes historic speech to Congress of People's Party (CHP).
1 November. Third Grand National Assembly. Mustafa Kemal re-elected President of the Republic.
3 November. Introduction of Latin alphabet.
1 January. National schools open to teach new alphabet.
4 March. Maintenance of Order Law repealed.
13 May. New commercial law adopted.
12 August. Foundation of Free Party.
17 November. Dissolution of Free Party.
23 December. Religious riot at Menemen. Trials and executions.
15 April. Foundation of Turkish Historical Society.
4 May. Fourth Grand National Assembly. Mustafa Kemal re-elected President of the Republic.
12 July. Foundation of Turkish Linguistic Society.
12 August. Turkey becomes member of League of Nations.
1 February. Disturbances in Bursa over decision to recite the call to prayer in Turkish.
31 May. Istanbul University is established.
29 October. Celebration of the 10th Anniversary of the Turkish Republic.
9 January. First Five-Year Plan for industrial development.
9 February. Balkan Pact concluded between Turkey, Greece, Rumania and Yugoslavia.
24 November. Mustafa Kemal adopts the surname "ATATÜRK" which is given to him by the Turkish Parliament.
8 December. Women made eligible to vote in Parliamentary elections and to become members of Parliament.
1 March. Fifth Grand National Assembly. Ataturk re-elected President of the Republic.
29 May. Dispute regarding future status of Hatay (Alexandretta) referred to the League of Nations.
20 July. Montreux Convention signed, regulating the Turkish Straits (Bosphorus and Dardanelles).
4 September. Visit of King Edward VIII to Ataturk in Istanbul.
27 January. Autonomy of Hatay agreed between Turkey, France and Syria.
9 July. Saadabad Pact signed, between Turkey, Irak, Iran and Afghanistan.
11 March. Illness of Ataturk is officially announced.
3 July. Franco-Turkish agreement to send French and Turkish troops into Hatay, to supervise elections.
2 September. Grand National Assembly votes nominal Republic of Hatay, with Turks in effective control.
18 September. Second Five Year Plan for industrial development.
10 November. The death of Mustafa Kemal “Ataturk,” the leader of the Turkish War of Independence and founder of modern-day Turkey.
11 November. Succession of Ismet Inonu as President of Turkey.


public abstract class AbstractPreferences extends Preferences
Preferences
class, greatly easing the task of implementing it.
This class is for Preferences implementers only.
Normal users of the Preferences facility should have no need to
consult this documentation. The Preferences
documentation
should suffice.
Implementors must override the nine abstract service-provider interface
(SPI) methods: getSpi(String)
, putSpi(String,String)
,
removeSpi(String)
, childSpi(String)
, removeNodeSpi()
, keysSpi()
, childrenNamesSpi()
, syncSpi()
and flushSpi()
. All of the concrete methods specify
precisely how they are implemented atop these SPI methods. The implementor
may, at his discretion, override one or more of the concrete methods if the
default implementation is unsatisfactory for any reason, such as
performance.
The SPI methods fall into three groups concerning exception
behavior. The getSpi method should never throw exceptions, but it
doesn't really matter, as any exception thrown by this method will be
intercepted by get(String,String)
, which will return the specified
default value to the caller. The removeNodeSpi, keysSpi,
childrenNamesSpi, syncSpi and flushSpi methods are specified
to throw BackingStoreException
, and the implementation is required
to throw this checked exception if it is unable to perform the operation.
The exception propagates outward, causing the corresponding API method
to fail.
The remaining SPI methods putSpi(String,String)
, removeSpi(String)
and childSpi(String)
have more complicated
exception behavior. They are not specified to throw
BackingStoreException, as they can generally obey their contracts
even if the backing store is unavailable. This is true because they return
no information and their effects are not required to become permanent until
a subsequent call to Preferences.flush()
or
Preferences.sync()
. Generally speaking, these SPI methods should not
throw exceptions. In some implementations, there may be circumstances
under which these calls cannot even enqueue the requested operation for
later processing. Even under these circumstances it is generally better to
simply ignore the invocation and return, rather than throwing an
exception. Under these circumstances, however, all subsequent invocations
of flush() and sync should return false, as
returning true would imply that all previous operations had
successfully been made permanent.
There is one circumstance under which putSpi, removeSpi and
childSpi should throw an exception: if the caller lacks
sufficient privileges on the underlying operating system to perform the
requested operation. This will, for instance, occur on most systems
if a non-privileged user attempts to modify system preferences.
(The required privileges will vary from implementation to
implementation. On some implementations, they are the right to modify the
contents of some directory in the file system; on others they are the right
to modify contents of some key in a registry.) Under any of these
circumstances, it would generally be undesirable to let the program
continue executing as if these operations would become permanent at a later
time. While implementations are not required to throw an exception under
these circumstances, they are encouraged to do so. A SecurityException
would be appropriate.
Most of the SPI methods require the implementation to read or write information at a preferences node. The implementor should beware of the fact that another VM may have concurrently deleted this node from the backing store. It is the implementation's responsibility to recreate the node if it has been deleted.
Implementation note: In Sun's default Preferences
implementations, the user's identity is inherited from the underlying
operating system and does not change for the lifetime of the virtual
machine. It is recognized that server-side Preferences
implementations may have the user identity change from request to request,
implicitly passed to Preferences methods via the use of a
static ThreadLocal
instance. Authors of such implementations are
strongly encouraged to determine the user at the time preferences
are accessed (for example by the get(String,String)
or put(String,String)
method) rather than permanently associating a user
with each Preferences instance. The latter behavior conflicts
with normal Preferences usage and would lead to great confusion.
Preferences
| Modifier and Type | Field and Description |
|---|---|
protected Object |
lock
An object whose monitor is used to lock this node.
|
protected boolean |
newNode
This field should be true if this node did not exist in the
backing store prior to the creation of this object.
|
MAX_KEY_LENGTH, MAX_NAME_LENGTH, MAX_VALUE_LENGTH
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPreferences(AbstractPreferences parent,
String name)
Creates a preference node with the specified parent and the specified
name relative to its parent.
|
| Modifier and Type | Method and Description |
|---|---|
String |
absolutePath()
Implements the absolutePath method as per the specification in
Preferences.absolutePath() . |
void |
addNodeChangeListener(NodeChangeListener ncl)
Registers the specified listener to receive node change events
for this node.
|
void |
addPreferenceChangeListener(PreferenceChangeListener pcl)
Registers the specified listener to receive preference change
events for this preference node.
|
protected AbstractPreferences[] |
cachedChildren()
Returns all known unremoved children of this node.
|
String[] |
childrenNames()
Implements the children method as per the specification in
Preferences.childrenNames() . |
protected abstract String[] |
childrenNamesSpi()
Returns the names of the children of this preference node.
|
protected abstract AbstractPreferences |
childSpi(String name)
Returns the named child of this preference node, creating it if it does
not already exist.
|
void |
clear()
Implements the clear method as per the specification in
Preferences.clear() . |
void |
exportNode(OutputStream os)
Implements the exportNode method as per the specification in
Preferences.exportNode(OutputStream) . |
void |
exportSubtree(OutputStream os)
Implements the exportSubtree method as per the specification in
Preferences.exportSubtree(OutputStream) . |
void |
flush()
Implements the flush method as per the specification in
Preferences.flush() . |
protected abstract void |
flushSpi()
This method is invoked with this node locked.
|
String |
get(String key,
String def)
Implements the get method as per the specification in
Preferences.get(String,String) . |
boolean |
getBoolean(String key,
boolean def)
Implements the getBoolean method as per the specification in
Preferences.getBoolean(String,boolean) . |
byte[] |
getByteArray(String key,
byte[] def)
Implements the getByteArray method as per the specification in
Preferences.getByteArray(String,byte[]) . |
protected AbstractPreferences |
getChild(String nodeName)
Returns the named child if it exists, or null if it does not.
|
double |
getDouble(String key,
double def)
Implements the getDouble method as per the specification in
Preferences.getDouble(String,double) . |
float |
getFloat(String key,
float def)
Implements the getFloat method as per the specification in
Preferences.getFloat(String,float) . |
int |
getInt(String key,
int def)
Implements the getInt method as per the specification in
Preferences.getInt(String,int) . |
long |
getLong(String key,
long def)
Implements the getLong method as per the specification in
Preferences.getLong(String,long) . |
protected abstract String |
getSpi(String key)
Return the value associated with the specified key at this preference
node, or null if there is no association for this key, or the
association cannot be determined at this time.
|
protected boolean |
isRemoved()
Returns true iff this node (or an ancestor) has been
removed with the
removeNode() method. |
boolean |
isUserNode()
Implements the isUserNode method as per the specification in
Preferences.isUserNode() . |
String[] |
keys()
Implements the keys method as per the specification in
Preferences.keys() . |
protected abstract String[] |
keysSpi()
Returns all of the keys that have an associated value in this
preference node.
|
String |
name()
Implements the name method as per the specification in
Preferences.name() . |
Preferences |
node(String path)
Implements the node method as per the specification in
Preferences.node(String) . |
boolean |
nodeExists(String path)
Implements the nodeExists method as per the specification in
Preferences.nodeExists(String) . |
Preferences |
parent()
Implements the parent method as per the specification in
Preferences.parent() . |
void |
put(String key,
String value)
Implements the put method as per the specification in
Preferences.put(String,String) . |
void |
putBoolean(String key,
boolean value)
Implements the putBoolean method as per the specification in
Preferences.putBoolean(String,boolean) . |
void |
putByteArray(String key,
byte[] value)
Implements the putByteArray method as per the specification in
Preferences.putByteArray(String,byte[]) . |
void |
putDouble(String key,
double value)
Implements the putDouble method as per the specification in
Preferences.putDouble(String,double) . |
void |
putFloat(String key,
float value)
Implements the putFloat method as per the specification in
Preferences.putFloat(String,float) . |
void |
putInt(String key,
int value)
Implements the putInt method as per the specification in
Preferences.putInt(String,int) . |
void |
putLong(String key,
long value)
Implements the putLong method as per the specification in
Preferences.putLong(String,long) . |
protected abstract void |
putSpi(String key,
String value)
Put the given key-value association into this preference node.
|
void |
remove(String key)
Implements the remove(String) method as per the specification
in
Preferences.remove(String) . |
void |
removeNode()
Implements the removeNode() method as per the specification in
Preferences.removeNode() . |
void |
removeNodeChangeListener(NodeChangeListener ncl)
Removes the specified NodeChangeListener, so it no longer
receives change events.
|
protected abstract void |
removeNodeSpi()
Removes this preference node, invalidating it and any preferences that
it contains.
|
void |
removePreferenceChangeListener(PreferenceChangeListener pcl)
Removes the specified preference change listener, so it no longer
receives preference change events.
|
protected abstract void |
removeSpi(String key)
Remove the association (if any) for the specified key at this
preference node.
|
void |
sync()
Implements the sync method as per the specification in
Preferences.sync() . |
protected abstract void |
syncSpi()
This method is invoked with this node locked.
|
String |
toString()
Returns the absolute path name of this preferences node.
|
importPreferences, systemNodeForPackage, systemRoot, userNodeForPackage, userRoot
protected boolean newNode
protected final Object lock
protected AbstractPreferences(AbstractPreferences parent, String name)
parent
- the parent of this preference node, or null if this
is the root.name
- the name of this preference node, relative to its parent,
or "" if this is the root.IllegalArgumentException
- if name contains a slash
('/'), or parent is null and
name isn't "".public void put(String key, String value)
Preferences.put(String,String)
.
This implementation checks that the key and value are legal,
obtains this preference node's lock, checks that the node
has not been removed, invokes putSpi(String,String)
, and if
there are any preference change listeners, enqueues a notification
event for processing by the event dispatch thread.
put
in class Preferences
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key.NullPointerException
- if key or value is null.IllegalArgumentException
- if key.length() exceeds
MAX_KEY_LENGTH or if value.length exceeds
MAX_VALUE_LENGTH.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.public String get(String key, String def)
Preferences.get(String,String)
.
This implementation first checks to see if key is
null throwing a NullPointerException if this is
the case. Then it obtains this preference node's lock,
checks that the node has not been removed, invokes getSpi(String)
, and returns the result, unless the getSpi
invocation returns null or throws an exception, in which case
this invocation returns def.
get
in class Preferences
key
- key whose associated value is to be returned.def
- the value to be returned in the event that this
preference node has no value associated with key.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.NullPointerException
- if key is null. (A
null default is permitted.)public void remove(String key)
Preferences.remove(String)
.
This implementation obtains this preference node's lock,
checks that the node has not been removed, invokes
removeSpi(String)
and if there are any preference
change listeners, enqueues a notification event for processing by the
event dispatch thread.
remove
in class Preferences
key
- key whose mapping is to be removed from the preference node.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.NullPointerException
- if key is null..public void clear() throws BackingStoreException
Preferences.clear()
.
This implementation obtains this preference node's lock,
invokes keys()
to obtain an array of keys, and
iterates over the array invoking remove(String)
on each key.
clear
in class Preferences
BackingStoreException
- if this operation cannot be completed
due to a failure in the backing store, or inability to
communicate with it.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.Preferences.removeNode()
public void putInt(String key, int value)
Preferences.putInt(String,int)
.
This implementation translates value to a string with
Integer.toString(int)
and invokes put(String,String)
on the result.
putInt
in class Preferences
key
- key with which the string form of value is to be associated.value
- value whose string form is to be associated with key.NullPointerException
- if key is null.IllegalArgumentException
- if key.length() exceeds
MAX_KEY_LENGTH.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.Preferences.getInt(String,int)
public int getInt(String key, int def)
Preferences.getInt(String,int)
.
This implementation invokes get(key,
null)
. If the return value is non-null, the implementation
attempts to translate it to an int with
Integer.parseInt(String)
. If the attempt succeeds, the return
value is returned by this method. Otherwise, def is returned.
getInt
in class Preferences
key
- key whose associated value is to be returned as an int.def
- the value to be returned in the event that this
preference node has no value associated with key
or the associated value cannot be interpreted as an int.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.NullPointerException
- if key is null.Preferences.putInt(String,int)
,
Preferences.get(String,String)
public void putLong(String key, long value)
Preferences.putLong(String,long)
.
This implementation translates value to a string with
Long.toString(long)
and invokes put(String,String)
on the result.
putLong
in class Preferences
key
- key with which the string form of value is to be associated.value
- value whose string form is to be associated with key.NullPointerException
- if key is null.IllegalArgumentException
- if key.length() exceeds
MAX_KEY_LENGTH.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.Preferences.getLong(String,long)
public long getLong(String key, long def)
Preferences.getLong(String,long)
.
This implementation invokes get(key,
null)
. If the return value is non-null, the implementation
attempts to translate it to a long with
Long.parseLong(String)
. If the attempt succeeds, the return
value is returned by this method. Otherwise, def is returned.
getLong
in class Preferences
key
- key whose associated value is to be returned as a long.def
- the value to be returned in the event that this
preference node has no value associated with key
or the associated value cannot be interpreted as a long.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.NullPointerException
- if key is null.Preferences.putLong(String,long)
,
Preferences.get(String,String)
public void putBoolean(String key, boolean value)
Preferences.putBoolean(String,boolean)
.
This implementation translates value to a string with
String.valueOf(boolean)
and invokes put(String,String)
on the result.
putBoolean
in class Preferences
key
- key with which the string form of value is to be associated.value
- value whose string form is to be associated with key.NullPointerException
- if key is null.IllegalArgumentException
- if key.length() exceeds
MAX_KEY_LENGTH.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.Preferences.getBoolean(String,boolean)
,
Preferences.get(String,String)
public boolean getBoolean(String key, boolean def)
Preferences.getBoolean(String,boolean)
.
This implementation invokes get(key,
null)
. If the return value is non-null, it is compared with
"true" using String.equalsIgnoreCase(String)
. If the
comparison returns true, this invocation returns
true. Otherwise, the original return value is compared with
"false", again using String.equalsIgnoreCase(String)
.
If the comparison returns true, this invocation returns
false. Otherwise, this invocation returns def.
getBoolean
in class Preferences
key
- key whose associated value is to be returned as a boolean.def
- the value to be returned in the event that this
preference node has no value associated with key
or the associated value cannot be interpreted as a boolean.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.NullPointerException
- if key is null.Preferences.get(String,String)
,
Preferences.putBoolean(String,boolean)
public void putFloat(String key, float value)
Preferences.putFloat(String,float)
.
This implementation translates value to a string with
Float.toString(float)
and invokes put(String,String)
on the result.
putFloat
in class Preferences
key
- key with which the string form of value is to be associated.value
- value whose string form is to be associated with key.NullPointerException
- if key is null.IllegalArgumentException
- if key.length() exceeds
MAX_KEY_LENGTH.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.Preferences.getFloat(String,float)
public float getFloat(String key, float def)
Preferences.getFloat(String,float)
.
This implementation invokes get(key,
null)
. If the return value is non-null, the implementation
attempts to translate it to an float with
Float.parseFloat(String)
. If the attempt succeeds, the return
value is returned by this method. Otherwise, def is returned.
getFloat
in class Preferences
key
- key whose associated value is to be returned as a float.def
- the value to be returned in the event that this
preference node has no value associated with key
or the associated value cannot be interpreted as a float.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.NullPointerException
- if key is null.Preferences.putFloat(String,float)
,
Preferences.get(String,String)
public void putDouble(String key, double value)
Preferences.putDouble(String,double)
.
This implementation translates value to a string with
Double.toString(double)
and invokes put(String,String)
on the result.
putDouble
in class Preferences
key
- key with which the string form of value is to be associated.value
- value whose string form is to be associated with key.NullPointerException
- if key is null.IllegalArgumentException
- if key.length() exceeds
MAX_KEY_LENGTH.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.Preferences.getDouble(String,double)
public double getDouble(String key, double def)
Preferences.getDouble(String,double)
.
This implementation invokes get(key,
null)
. If the return value is non-null, the implementation
attempts to translate it to an double with
Double.parseDouble(String)
. If the attempt succeeds, the return
value is returned by this method. Otherwise, def is returned.
getDouble
in class Preferences
key
- key whose associated value is to be returned as a double.def
- the value to be returned in the event that this
preference node has no value associated with key
or the associated value cannot be interpreted as a double.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.NullPointerException
- if key is null.Preferences.putDouble(String,double)
,
Preferences.get(String,String)
public void putByteArray(String key, byte[] value)
Preferences.putByteArray(String,byte[])
.putByteArray
in class Preferences
key
- key with which the string form of value is to be associated.value
- value whose string form is to be associated with key.NullPointerException
- if key or value is null.IllegalArgumentException
- if key.length() exceeds MAX_KEY_LENGTH
or if value.length exceeds MAX_VALUE_LENGTH*3/4.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.Preferences.getByteArray(String,byte[])
,
Preferences.get(String,String)
public byte[] getByteArray(String key, byte[] def)
Preferences.getByteArray(String,byte[])
.getByteArray
in class Preferences
key
- key whose associated value is to be returned as a byte array.def
- the value to be returned in the event that this
preference node has no value associated with key
or the associated value cannot be interpreted as a byte array.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.NullPointerException
- if key is null. (A
null value for def is permitted.)Preferences.get(String,String)
,
Preferences.putByteArray(String,byte[])
public String[] keys() throws BackingStoreException
Preferences.keys()
.
This implementation obtains this preference node's lock, checks that
the node has not been removed and invokes keysSpi()
.
keys
in class Preferences
BackingStoreException
- if this operation cannot be completed
due to a failure in the backing store, or inability to
communicate with it.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.public String[] childrenNames() throws BackingStoreException
Preferences.childrenNames()
.
This implementation obtains this preference node's lock, checks that
the node has not been removed, constructs a TreeSet initialized
to the names of children already cached (the children in this node's
"child-cache"), invokes childrenNamesSpi()
, and adds all of the
returned child-names into the set. The elements of the tree set are
dumped into a String array using the toArray method,
and this array is returned.
childrenNames
in class Preferences
BackingStoreException
- if this operation cannot be completed
due to a failure in the backing store, or inability to
communicate with it.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.cachedChildren()
protected final AbstractPreferences[] cachedChildren()
public Preferences parent()
Preferences.parent()
.
This implementation obtains this preference node's lock, checks that the node has not been removed and returns the parent value that was passed to this node's constructor.
parent
in class Preferences
IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.public Preferences node(String path)
Preferences.node(String)
.
This implementation obtains this preference node's lock and checks
that the node has not been removed. If path is "",
this node is returned; if path is "/", this node's
root is returned. If the first character in path is
not '/', the implementation breaks path into
tokens and recursively traverses the path from this node to the
named node, "consuming" a name and a slash from path at
each step of the traversal. At each step, the current node is locked
and the node's child-cache is checked for the named node. If it is
not found, the name is checked to make sure its length does not
exceed MAX_NAME_LENGTH. Then the childSpi(String)
method is invoked, and the result stored in this node's child-cache.
If the newly created Preferences object's newNode
field is true and there are any node change listeners,
a notification event is enqueued for processing by the event dispatch
thread.
When there are no more tokens, the last value found in the child-cache or returned by childSpi is returned by this method. If during the traversal, two "/" tokens occur consecutively, or the final token is "/" (rather than a name), an appropriate IllegalArgumentException is thrown.
If the first character of path is '/'
(indicating an absolute path name) this preference node's
lock is dropped prior to breaking path into tokens, and
this method recursively traverses the path starting from the root
(rather than starting from this node). The traversal is otherwise
identical to the one described for relative path names. Dropping
the lock on this node prior to commencing the traversal at the root
node is essential to avoid the possibility of deadlock, as per the
locking invariant
.
node
in class Preferences
path
- the path name of the preference node to return.IllegalArgumentException
- if the path name is invalid (i.e.,
it contains multiple consecutive slash characters, or ends
with a slash character and is more than one character long).IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.Preferences.flush()
public boolean nodeExists(String path) throws BackingStoreException
Preferences.nodeExists(String)
.
This implementation is very similar to node(String)
,
except that getChild(String)
is used instead of childSpi(String)
.
nodeExists
in class Preferences
path
- the path name of the node whose existence is to be checked.BackingStoreException
- if this operation cannot be completed
due to a failure in the backing store, or inability to
communicate with it.IllegalArgumentException
- if the path name is invalid (i.e.,
it contains multiple consecutive slash characters, or ends
with a slash character and is more than one character long).IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method and
pathname is not the empty string ("").public void removeNode() throws BackingStoreException
Preferences.removeNode()
.
This implementation checks to see that this node is the root; if so,
it throws an appropriate exception. Then, it locks this node's parent,
and calls a recursive helper method that traverses the subtree rooted at
this node. The recursive method locks the node on which it was called,
checks that it has not already been removed, and then ensures that all
of its children are cached: The childrenNamesSpi()
method is
invoked and each returned child name is checked for containment in the
child-cache. If a child is not already cached, the childSpi(String)
method is invoked to create a Preferences
instance for it, and this instance is put into the child-cache. Then
the helper method calls itself recursively on each node contained in its
child-cache. Next, it invokes removeNodeSpi()
, marks itself
as removed, and removes itself from its parent's child-cache. Finally,
if there are any node change listeners, it enqueues a notification
event for processing by the event dispatch thread.
Note that the helper method is always invoked with all ancestors up to the "closest non-removed ancestor" locked.
removeNode
in class Preferences
IllegalStateException
- if this node (or an ancestor) has already
been removed with the removeNode()
method.UnsupportedOperationException
- if this method is invoked on
the root node.BackingStoreException
- if this operation cannot be completed
due to a failure in the backing store, or inability to
communicate with it.Preferences.flush()
public String name()
Preferences.name()
.
This implementation merely returns the name that was passed to this node's constructor.
name
in class Preferences
public String absolutePath()
Preferences.absolutePath()
.
This implementation merely returns the absolute path name that was computed at the time that this node was constructed (based on the name that was passed to this node's constructor, and the names that were passed to this node's ancestors' constructors).
absolutePath
in class Preferences
public boolean isUserNode()
Preferences.isUserNode()
.
This implementation compares this node's root node (which is stored
in a private field) with the value returned by
Preferences.userRoot()
. If the two object references are
identical, this method returns true.
isUserNode
in class Preferences
public void addPreferenceChangeListener(PreferenceChangeListener pcl)
Preferences
Preferences.removeNode()
method, which generates a node change event.
Preference change events are generated by the clear
method.)
Events are only guaranteed for changes made within the same JVM as the registered listener, though some implementations may generate events for changes made outside this JVM. Events may be generated before the changes have been made persistent. Events are not generated when preferences are modified in descendants of this node; a caller desiring such events must register with each descendant.
addPreferenceChangeListener
in class Preferences
pcl
- The preference change listener to add.Preferences.removePreferenceChangeListener(PreferenceChangeListener)
,
Preferences.addNodeChangeListener(NodeChangeListener)
public void removePreferenceChangeListener(PreferenceChangeListener pcl)
Preferences
removePreferenceChangeListener
in class Preferences
pcl
- The preference change listener to remove.Preferences.addPreferenceChangeListener(PreferenceChangeListener)
public void addNodeChangeListener(NodeChangeListener ncl)
Preferences
Preferences.removeNode()
invocation results in multiple node change events, one for every
node in the subtree rooted at the removed node.)
Events are only guaranteed for changes made within the same JVM as the registered listener, though some implementations may generate events for changes made outside this JVM. Events may be generated before the changes have become permanent. Events are not generated when indirect descendants of this node are added or removed; a caller desiring such events must register with each descendant.
Few guarantees can be made regarding node creation. Because nodes are created implicitly upon access, it may not be feasible for an implementation to determine whether a child node existed in the backing store prior to access (for example, because the backing store is unreachable or cached information is out of date). Under these circumstances, implementations are neither required to generate node change events nor prohibited from doing so.
addNodeChangeListener
in class Preferences
ncl
- The NodeChangeListener to add.Preferences.removeNodeChangeListener(NodeChangeListener)
,
Preferences.addPreferenceChangeListener(PreferenceChangeListener)
public void removeNodeChangeListener(NodeChangeListener ncl)
Preferences
removeNodeChangeListener
in class Preferences
ncl
- The NodeChangeListener to remove.Preferences.addNodeChangeListener(NodeChangeListener)
protected abstract void putSpi(String key, String value)
This method is invoked with the lock on this node held.
key
- the keyvalue
- the valueprotected abstract String getSpi(String key)
Generally speaking, this method should not throw an exception under any circumstances. If, however, if it does throw an exception, the exception will be intercepted and treated as a null return value.
This method is invoked with the lock on this node held.
key
- the keyprotected abstract void removeSpi(String key)
This method is invoked with the lock on this node held.
key
- the keyprotected abstract void removeNodeSpi() throws BackingStoreException
Preferences.removeNode()
method
invokes this method repeatedly in a bottom-up fashion, removing each of
a node's descendants before removing the node itself).
This method is invoked with the lock held on this node and its
parent (and all ancestors that are being removed as a
result of a single invocation to Preferences.removeNode()
).
The removal of a node needn't become persistent until the flush method is invoked on this node (or an ancestor).
If this node throws a BackingStoreException, the exception
will propagate out beyond the enclosing removeNode()
invocation.
BackingStoreException
- if this operation cannot be completed
due to a failure in the backing store, or inability to
communicate with it.protected abstract String[] keysSpi() throws BackingStoreException
This method is invoked with the lock on this node held.
If this node throws a BackingStoreException, the exception
will propagate out beyond the enclosing keys()
invocation.
BackingStoreException
- if this operation cannot be completed
due to a failure in the backing store, or inability to
communicate with it.protected abstract String[] childrenNamesSpi() throws BackingStoreException
This method is invoked with the lock on this node held.
If this node throws a BackingStoreException, the exception
will propagate out beyond the enclosing childrenNames()
invocation.
BackingStoreException
- if this operation cannot be completed
due to a failure in the backing store, or inability to
communicate with it.protected AbstractPreferences getChild(String nodeName) throws BackingStoreException
Preferences.MAX_NAME_LENGTH
characters. Also, it is guaranteed
that this node has not been removed. (The implementor needn't check
for any of these things if he chooses to override this method.)
Finally, it is guaranteed that the named node has not been returned
by a previous invocation of this method or childSpi(java.lang.String)
after the
last time that it was removed. In other words, a cached value will
always be used in preference to invoking this method. (The implementor
needn't maintain his own cache of previously returned children if he
chooses to override this method.)
This implementation obtains this preference node's lock, invokes
childrenNames()
to get an array of the names of this node's
children, and iterates over the array comparing the name of each child
with the specified node name. If a child node has the correct name,
the childSpi(String)
method is invoked and the resulting
node is returned. If the iteration completes without finding the
specified name, null is returned.
nodeName
- name of the child to be searched for.BackingStoreException
- if this operation cannot be completed
due to a failure in the backing store, or inability to
communicate with it.protected abstract AbstractPreferences childSpi(String name)
Preferences.MAX_NAME_LENGTH
characters. Also, it is guaranteed that
this node has not been removed. (The implementor needn't check for any
of these things.)
Finally, it is guaranteed that the named node has not been returned
by a previous invocation of this method or getChild(String)
after the last time that it was removed. In other words, a cached
value will always be used in preference to invoking this method.
Subclasses need not maintain their own cache of previously returned
children.
The implementer must ensure that the returned node has not been removed. If a like-named child of this node was previously removed, the implementer must return a newly constructed AbstractPreferences node; once removed, an AbstractPreferences node cannot be "resuscitated."
If this method causes a node to be created, this node is not guaranteed to be persistent until the flush method is invoked on this node or one of its ancestors (or descendants).
This method is invoked with the lock on this node held.
name
- The name of the child node to return, relative to
this preference node.public String toString()
toString
in class Preferences
public void sync() throws BackingStoreException
Preferences.sync()
.
This implementation calls a recursive helper method that locks this node, invokes syncSpi() on it, unlocks this node, and recursively invokes this method on each "cached child." A cached child is a child of this node that has been created in this VM and not subsequently removed. In effect, this method does a depth first traversal of the "cached subtree" rooted at this node, calling syncSpi() on each node in the subTree while only that node is locked. Note that syncSpi() is invoked top-down.
sync
in class Preferences
BackingStoreException
- if this operation cannot be completed
due to a failure in the backing store, or inability to
communicate with it.IllegalStateException
- if this node (or an ancestor) has been
removed with the removeNode()
method.flush()
protected abstract void syncSpi() throws BackingStoreException
If this node throws a BackingStoreException, the exception
will propagate out beyond the enclosing sync()
invocation.
BackingStoreException
- if this operation cannot be completed
due to a failure in the backing store, or inability to
communicate with it.public void flush() throws BackingStoreException
Preferences.flush()
.
This implementation calls a recursive helper method that locks this node, invokes flushSpi() on it, unlocks this node, and recursively invokes this method on each "cached child." A cached child is a child of this node that has been created in this VM and not subsequently removed. In effect, this method does a depth first traversal of the "cached subtree" rooted at this node, calling flushSpi() on each node in the subTree while only that node is locked. Note that flushSpi() is invoked top-down.
If this method is invoked on a node that has been removed with
the removeNode()
method, flushSpi() is invoked on this node,
but not on others.
flush
in class Preferences
BackingStoreException
- if this operation cannot be completed
due to a failure in the backing store, or inability to
communicate with it.flush()
protected abstract void flushSpi() throws BackingStoreException
If this node throws a BackingStoreException, the exception
will propagate out beyond the enclosing flush()
invocation.
BackingStoreException
- if this operation cannot be completed
due to a failure in the backing store, or inability to
communicate with it.protected boolean isRemoved()
removeNode()
method. This method
locks this node prior to returning the contents of the private
field used to track this state.removeNode()
method.public void exportNode(OutputStream os) throws IOException, BackingStoreException
Preferences.exportNode(OutputStream)
.exportNode
in class Preferences
os
- the output stream on which to emit the XML document.IOException
- if writing to the specified output stream
results in an IOException.BackingStoreException
- if preference data cannot be read from
backing store.Preferences.importPreferences(InputStream)
public void exportSubtree(OutputStream os) throws IOException, BackingStoreException
Preferences.exportSubtree(OutputStream)
.exportSubtree
in class Preferences
os
- the output stream on which to emit the XML document.IOException
- if writing to the specified output stream
results in an IOException.BackingStoreException
- if preference data cannot be read from
backing store.Preferences.importPreferences(InputStream)
,
Preferences.exportNode(OutputStream)
Dracula Javadoc Sample, Made with Allan Im.


How to play: Swipe up, down, left and right to move the tiles. When two tiles with the same number touch, they merge into one!


Focus Now’s goal is to provide a place for users to easily manage their work
with a customizable
timer. The intention of this app is to help users maintain a balance between
their focus and break time
in order to avoid constant distractions while they study, code, etc.
How to use Focus Now timer?
Add task to be focused on.
Select task to work on in calendar.
Start timer (and focus on the task for the set time.)
Take a break (5 minutes recommended.)
Repeat (until all tasks are completed.)
Features
- Create task allows the user to set up the task they want to stay focused on
while the timers run.
- Calendar shows the user where their tasks are scheduled for the day.
- Activity History lets the user reflect on how long they successfully focused
on their tasks over the
week.


CONTACT ME
About Me
Background
Hobbies
My Resume
Portfolio
Designs
Projects
Contact me
Where you can find me:
Direct message me:
Name:
Email:
Message
Send
Clear
Connect with me:
Connect with me:


Please enter valid gmail.com or abv.bg email!
Please enter a password!
Don't have account yet? Register.


We have a quick update following the release of 0.14.1 last week. It turns out we broke a couple things in the development build of React when using Internet Explorer. Luckily it was only the development build, so your production applications were unaffected. This release is mostly to address those issues. There is one notable change if consuming React from npm. For the react-dom
package, we moved react
from a regular dependency to a peer dependency. This will impact very few people as these two are typically installed together at the top level, but it will fix some issues with dependencies of installed components also using react
as a peer dependency.
The release is now available for download:
We've also published version 0.14.2
of the react
, react-dom
, and addons
packages on npm and the react
package on bower.
integrity
attributechildren
prop being coerced to a string for custom elements, which was not the desired behavior.react
from dependencies
to peerDependencies
to match expectations and align with react-addons-*
packages


This installation guide assumes that the user has at least a basic understanding of Linux techniques and terminology. In this section we provide tips that the new user may find helpful. While the these tips are meant to clarify and assist users in installing and configuring the NVIDIA Linux Driver, it is by no means a tutorial on the use or administration of the Linux operating system. Unlike many desktop operating systems, it is relatively easy to cause irreparable damage to your Linux system. If you are unfamiliar with the use of Linux, we strongly recommend that you seek a tutorial through your distributor before proceeding.
While newer releases of Linux bring new desktop interfaces to
the user, much of the work in Linux takes place at the command
prompt. If you are familiar with the Windows operating system, the
Linux command prompt is analogous to the Windows command prompt,
although the syntax and use varies somewhat. All of the commands in
this section are performed at the command prompt. Some systems are
configured to boot into console mode, in which case the user is
presented with a prompt at login. Other systems are configured to
start the X window system, in which case the user must open a
terminal or console window in order to get a command prompt. This
can usually be done by searching the desktop menus for a terminal
or console program. While it is customizable, the basic prompt
usually consists of a short string of information, one of the
characters #
, $
, or %
, and a cursor
(possibly flashing) that indicates where the user's input will be
displayed.
Linux has a hierarchical directory structure. From anywhere in the directory structure, the ls command will list the contents of that directory. The file command will print the type of files in a directory. For example,
% file filename
will print the type of the file filename
. Changing directories is done with the
cd command.
% cd dirname
will change the current directory to dirname
. From anywhere in the directory
structure, the command pwd will print the name of the current
directory. There are two special directories, .
and ..
, which
refer to the current directory and the next directory up the
hierarchy, respectively. For any commands that require a file name
or directory name as an argument, you may specify the absolute or
the relative paths to those elements. An absolute path begins with
the "/" character, referring to the top or root of the directory
structure. A relative path begins with a directory in the current
working directory. The relative path may begin with .
or ..
. Elements
of a path are separated with the "/" character. As an example, if
the current directory is /home/jesse
and the user wants to change to the /usr/local
directory, he can use either of the
following commands to do so:
% cd /usr/local
or
% cd ../../usr/local
All files and directories have permissions and ownership
associated with them. This is useful for preventing
non-administrative users from accidentally (or maliciously)
corrupting the system. The permissions and ownership for a file or
directory can be determined by passing the -l
option to the ls command. For example:
% ls -l drwxr-xr-x 2 jesse users 4096 Feb 8 09:32 bin drwxrwxrwx 10 jesse users 4096 Feb 10 12:04 pub -rw-r--r-- 1 jesse users 45 Feb 4 03:55 testfile -rwx------ 1 jesse users 93 Feb 5 06:20 myprogram -rw-rw-rw- 1 jesse users 112 Feb 5 06:20 README %
The first character column in the first output field states the file type, where 'd' is a directory and '-' is a regular file. The next nine columns specify the permissions (see paragraph below) of the element. The second field indicates the number of files associated with the element, the third field indicates the owner, the fourth field indicates the group that the file is associated with, the fifth field indicates the size of the element in bytes, the sixth, seventh and eighth fields indicate the time at which the file was last modified and the ninth field is the name of the element.
As stated, the last nine columns in the first field indicate the
permissions of the element. These columns are grouped into threes,
the first grouping indicating the permissions for the owner of the
element (jesse
in this case), the
second grouping indicating the permissions for the group associated
with the element, and the third grouping indicating the permissions
associated with the rest of the world. The r
, w
, and
x
indicate read, write and execute
permissions, respectively, for each of these associations. For
example, user jesse
has read and
write permissions for testfile
, users
in the group users
have read
permission only, and the rest of the world also has read
permissions only. However, for the file myprogram
, user jesse
has read, write and execute permissions
(suggesting that myprogram
is a
program that can be executed), while the group users
and the rest of the world have no
permissions (suggesting that the owner doesn't want anyone else to
run his program). The permissions, ownership and group associated
with an element can be changed with the commands
chmod,
chown and
chgrp, respectively.
If a user with the appropriate permissions wanted to change the
user/group ownership of README
from
jesse/users to joe/admin, he would do the following:
# chown joe README # chgrp admin README
The syntax for chmod is slightly more complicated and has several variations. The most concise way of setting the permissions for a single element uses a triplet of numbers, one for each of user, group and world. The value for each number in the triplet corresponds to a combination of read, write and execute permissions. Execute only is represented as 1, write only is represented as 2, and read only is represented as 4. Combinations of these permissions are represented as sums of the individual permissions. Read and execute is represented as 5, where as read, write and execute is represented as 7. No permissions is represented as 0. Thus, to give the owner read, write and execute permissions, the group read and execute permissions and the world no permissions, a user would do as follows:
% chmod 750 myprogram
The shell provides an interface between the user and the
operating system. It is the job of the shell to interpret the input
that the user gives at the command prompt and call upon the system
to do something in response. There are several different shells
available, each with somewhat different syntax and capabilities.
The two most common flavors of shells used on Linux stem from the
Bourne shell (sh) and
the C-shell (csh)
Different users have preferences and biases towards one shell or
the other, and some certainly make it easier (or at least more
intuitive) to do some things than others. You can determine your
current shell by printing the value of the SHELL
environment variable from the command prompt
with
% echo $SHELL
You can start a new shell simply by entering the name of the shell from the command prompt:
% csh
or
% sh
and you can run a program from within a specific shell by preceding the name of the executable with the name of the shell in which it will be run:
% sh myprogram
The user's default shell at login is determined by whoever set up his account. While there are many syntactic differences between shells, perhaps the one that is encountered most frequently is the way in which environment variables are set.
Every session has associated with it environment variables,
which consist of name/value pairs and control the way in which the
shell and programs run from the shell behave. An example of an
environment variable is the PATH
variable, which tells the shell which directories to search when
trying to locate an executable file that the user has entered at
the command line. If you are certain that a command exists, but the
shell complains that it cannot be found when you try to execute it,
there is likely a problem with the PATH
variable. Environment variables are set differently depending on
the shell being used. For the Bourne shell (sh), it is done as:
% export MYVARIABLE="avalue"
for the C-shell, it is done as:
% setenv MYVARIABLE "avalue"
In both cases the quotation marks are only necessary if the value contains spaces. The echo command can be used to examine the value of an environment variable:
% echo $MYVARIABLE
Commands to set environment variables can also include
references to other environment variables (prepended with the "$"
character), including themselves. In order to add the path
/usr/local/bin
to the beginning of
the search path, and the current directory .
to the end of the search path, a user would
enter
% export PATH=/usr/local/bin:$PATH:.
in the Bourne shell, and
% setenv PATH /usr/local/bin:${PATH}:.
in C-shell. Note the curly braces are required to protect the variable name in C-shell.
There are several text editors available for the Linux operating
system. Some of these editors require the X window system, while
others are designed to operate in a console or terminal. It is
generally a good thing to be competent with a terminal-based text
editor, as there are times when the files necessary for X to run
are the ones that must be edited. Three popular editors are
vi,
pico and
emacs, each of which
can be started from the command line, optionally supplying the name
of a file to be edited. vi is arguably the most ubiquitous as
well as the least intuitive of the three. pico is relatively straightforward for a
new user, though not as often installed on systems. If you don't
have pico, you may
have a similar editor called nano. emacs is highly extensible and fairly
widely available, but can be somewhat unwieldy in a non-X
environment. The newer versions each come with online help, and
offline help can be found in the manual and info pages for each
(see the section on Linux Manual and Info pages). Many programs use
the EDITOR
environment variable to
determine which text editor to start when editing is required.
Upon installation, almost all distributions set up the default
administrative user with the username root
. There are many things on the system that
only root
(or a similarly
privileged user) can do, one of which is installing the NVIDIA
Linux Driver. We must emphasize that
assuming the identity of root
is
inherently risky and as root
it is
relatively easy to corrupt your system or otherwise render it
unusable. There are three ways to become root
. You may log in as root
as you would any other user, you may use
the switch user command (su) at the command prompt, or, on some
systems, use the sudo
utility, which allows users to run programs as root
while keeping a log of their actions. This
last method is useful in case a user inadvertently causes damage to
the system and cannot remember what he has done (or prefers not to
admit what he has done). It is generally a good practice to remain
root
only as long as is necessary
to accomplish the task requiring root
privileges (another useful feature of the
sudo utility).
Runlevels in Linux dictate which services are started and stopped automatically when the system boots or shuts down. The runlevels typically range from 0 to 6, with runlevel 5 typically starting the X window system as part of the services (runlevel 0 is actually a system halt, and 6 is a system reboot). It is good practice to install the NVIDIA Linux Driver while X is not running, and it is a good idea to prevent X from starting on reboot in case there are problems with the installation (otherwise you may find yourself with a broken system that automatically tries to start X, but then hangs during the startup, preventing you from doing the repairs necessary to fix X). Depending on your network setup, runlevels 1, 2 or 3 should be sufficient for installing the Driver. Level 3 typically includes networking services, so if utilities used by the system during installation depend on a remote filesystem, Levels 1 and 2 will be insufficient. If your system typically boots to a console with a command prompt, you should not need to change anything. If your system typically boots to the X window system with a graphical login and desktop, you must both exit X and change your default runlevel.
On most distributions, the default runlevel is stored in the
file /etc/inittab
, although you may
have to consult the guide for your own distribution. The line that
indicates the default runlevel appears as
id:n:initdefault:
or similar, where n
indicates the number of the runlevel. /etc/inittab
must be edited as root. Please read
the sections on editing files and root user if you are unfamiliar
with this concept. Also, it is recommended that you create a copy
of the file prior to editing it, particularly if you are new to
Linux text editors, in case you accidentally corrupt the file:
# cp /etc/inittab /etc/inittab.original
The line should be edited such that an appropriate runlevel is the default (1, 2, or 3 on most systems):
id:3:initdefault:
After saving the changes, exit X. After the Driver installation
is complete, you may revert the default runlevel to its original
state, either by editing the /etc/inittab
again or by moving your backup copy
back to its original name.
Different distributions provide different ways to exit X. On many systems, the init utility will change the current runlevel. This can be used to change to a runlevel in which X is not running.
# init 3
There are other methods by which to exit X. Please consult your distribution.
System manual or info pages are usually installed during
installation. These pages are typically up-to-date and generally
contain a comprehensive listing of the use of programs and
utilities on the system. Also, many programs include the
--help
option, which usually prints a
list of common options for that program. To view the manual page
for a command, enter
% man commandname
at the command prompt, where commandname
refers to the command in which you are
interested. Similarly, entering
% info commandname
will bring up the info page for the command. Depending on the
application, one or the other may be more up-to-date. The interface
for the info system is interactive and navigable. If you are unable
to locate the man page for the command you are interested in, you
may need to add additional elements to your MANPATH
environment variable. See the section on
environment variables.


@(user: User) @userauth.main{ @navbar(user)
About: Web Designer / UI.
Hobbies: Read, out with friends, listen to music, draw and learn new things.
Listed tools: placeholder placeholder placeholder placeholder


Bride shamed by friends for buying wedding dress from H&M to keep costs down
The woman revealed to Mumsnet users she turned to H&M which sells wedding frocks for between £56 and £200 to keep costs of her wedding down
by Brendan McFaddenA bride-to-be has told how she's gutted after being mocked by her pals for wanting to wear a ‘lovely’ H&M wedding dress on her big day.
The woman revealed to Mumsnet website users that she decided to buy the dress from H&M, which sells wedding frocks for between £56 and £200, to keep costs of her wedding down.
But users of the site were outraged to hear the woman's mates were bemused by her purchase of the off-shoulder, lace design, and asked 'if she was definitely going to go with it?'.
In her post titled 'To be surprised at reactions to wedding dress', the woman, who did not identify herself, wrote: "Getting married next year and I had been somewhat dreading going into a shop to try on dresses.
"All the ones round here are little boutiques where everything costs an arm and a leg and you have an assistant with you the whole time."
"The woman revealed she had come across a dream white frock, that was within her budget, by accident.
"Everyone agreed that the H&M dress was the one - it fitted really well and looked well made.
"Saw a photo of a lovely, fairly traditional dress from H&M of all places (they're great but never knew they did properly formal dresses).
"Had a look at the site and it turned out the dress was on sale because it was pretty much sold out except in my short a*** size."
The woman explained how she decided the dress was perfect for her after ordering it online and trying it on in front of her mum-in-law.
She said: "Everyone agreed that the H&M dress was the one - it fitted really well and looked well made."
The woman shared pictures of a model wearing the same dress in the post.
But said her dream dress was mocked by "good friends" after they heard where it was from.
"I was so pleased and felt like it was sorted after that," she said
"But as others started to ask if I'd got a dress and where it was from, the reaction has been one of bemusement, really.
"I thought people would just say something vaguely positive and leave it there, but a number of good friends have asked if I'm definitely going to go with it, I'm not going to go to a 'proper shop' etc."
The mum also asked Mumsnet users for advice on what she should do, writing: "Shall I take it that it's hideous then and my judgement is way off?!
"Or shall I maybe just stop telling people where it's from as that and the price seem to be promoting the reactions?"
But users reassured her and hit out at the comments of her mates.
One wrote: "Oh that dress is lovely. Ignore everyone's comments, you'll look fab."
Another said: "People are daft. It’s lovely. Congratulations and I hope you have a lovely time in it!"
A third added: "It’s absolutely gorgeous! And you will look utterly beautiful in it. Please don’t fret about where it came from! Wedding dress comments are usually borne of jealousy.
"Be proud in the fact that you will look stunning for a more modest amount that will leave you with more spending money for your honeymoon or much needed home essentials."


Welcome Admin !!
Toggle Menu
Home
Track FIR and Update
Inmate Tracking and Update
Criminals Update
Update Police Station Info.
Track Inmates in Prison
YOUR FIR TRACKING
Filed
Tracking
Completed
FIR Details
Send Message
Message
Send
Update Status
Filed
Tracking
Completed


Central America
Mar 2018 – Jun 2018
I recently traveled through Central America through the countries Costa Rica, Nicaragua, Guatemala and Mexico for 100 days.
Mar 2018 – Jun 2018
I recently traveled through Central America through the countries Costa Rica, Nicaragua, Guatemala and Mexico for 100 days.
Carribean coast
Capital city
The impressive fauna
First surf experience
Colonial architecture
Food markets everywhere
Two-days volcano hike
Local boy at the lake
Woman with flowers
The beautiful city
Rock climbing
The pinky flamingos
Do you want or have stories about these beautiful countries?
Please send me a mail oliviervduuren@gmail.com!


Your daily horoscope: November 20
by Sally BromptonIF TODAY IS YOUR BIRTHDAY
The more other people try to change your point of view for you this year the more you must stick with what you believe. They have no right to insist that you think like they do – and, having seen the results of their “thinking”, you certainly won’t want to!
ARIES (March 21 - April 20):
How good are you in a crisis?  If so you will do good. You may even do great. You will certainly boost your reputation with the people who matter.
TAURUS (April 21 - May 21):
You know now what it is you should be doing with your life, and all you have to do is apply yourself. That may be easier said than done but if you seek out people who share your aims and values you can do great things together.
GEMINI (May 22 - June 21):
Yes, there is meaning to your life. Yes, you are here for a reason. What that reason is will come into sharper focus now that Mercury, your ruler, is moving in your favour again. The way ahead is about to become clear, so get ready to move fast.
CANCER (June 22 - July 23):
The world may have changed radically of late, but some things are still the same and one thing in particular won’t ever be different. That one thing is what you need to focus on now, as it is the key to long-term success. You know what it is.
LEO (July 24 - Aug. 23):
If you don’t take care of a task or chore today then you could spend the next few days making up for the time you have wasted. If what you have to do is too much for you to get done on your own then just ask for assistance.
VIRGO (Aug. 24 - Sept. 23):
You may tread on one or two toes today but that’s fine. You have a great deal to do but only a limited time frame in which to get it done, so you must go at it in as direct a manner as possible, whatever the fallout might be.
LIBRA (Sept. 24 - Oct. 23):
Something, or someone, of considerable value will be coming your way very soon, so make sure you are ready to give it, or them, room in your life. Most of all though Libra you need to remember that people must always come before things.
SCORPIO (Oct. 24 - Nov. 22):
You are in a decisive frame of mind now that Mercury in your sign is working for you again, and woe betide anyone who tries to stand in your way. At last you seem to have woken up to the fact that you can, within obvious limits, do as you please.
SAGITTARIUS (Nov. 23 - Dec. 21):
Daydreams can be fun but if you want something to come of them then you have to find ways to bring them down to earth so you can work on them in a serious fashion. Is your current daydream open to development, or must it always be a fantasy?
CAPRICORN (Dec. 22 - Jan. 20):
You may think you know what your limits are but the planets suggest you can, if you choose, push yourself further than you have ever gone before. First though you need to decide if you really want to. Or would you prefer to follow a more comfortable course?
AQUARIUS (Jan. 21 - Feb. 19):
Forces over which you have no control have been pushing you in a direction you don’t want to go, but now that Mercury has finished its retrograde phase you can seize back control and set yourself a new course and a new destination. So get to it.
PISCES (Feb. 20 - Mar. 20):
You will discover something about a colleague today that you would never have believed had you not heard it from someone you trust. Don’t think badly of them because of it – it’s not as if you don’t have a few potentially embarrassing secrets of your own!
Discover more about yourself at sallybrompton.com


On average PyPy is 7.6 times faster than standard Python
"If you want your code to run faster, you should probably just use PyPy."Guido van Rossum (creator of Python)
Advantages and distinct features
- Speed:
thanks to its Just-in-Time compiler, Python programs often run faster on PyPy. (What is a JIT compiler?)
- Memory usage:
memory-hungry Python programs (several hundreds of MBs or more) might end up taking less space than they do in CPython.
- Compatibility:
PyPy is highly compatible with existing python code. It supports cffi and can run popular python libraries like twisted and django.
- Stackless: PyPy comes by default with support for stackless mode, providing micro-threads for massive concurrency.
- Python 2.7.13 and 3.5.3
- As well as other features.


Now that we know how to center the map to a selected position, we would like to change some default features or visualizations of the map. We can override the default behaviour of the map properties via the defaults attribute. The options are pretty self-explanatory:
We can override the properties we would like to change, for example, to obtain a map like the upper one you see on this page. Let's see the necessary code:
You can see a standalone example of this code here.


Bind Element Element
Getting Started | API | Elements | Actions | Validators | Handlers | About
Table of Contents
1 Bind Element - #bind {}
The bind element allows you to easily display lists of data on a Nitrogen page. When you declare the bind element, you define a set of 'data', a 'body' containing one or more elements, and a 'map' that tells the bind element how to map a data row into the body.
A map item is an atom of the form element_id@attribute. The element_id must correspond to the id of an element in the 'body', and the attribute must be an attribute found on that element. You can bind to any attribute within an element.
In addition, you can specify a 'transform' function to manipulate the data at bind time and add additional bindings dynamically.
The 'data' attribute and the 'map' attribute must follow the same basic structure. This can mean one of three things:
- Simple List
- If the data is a simple list, then each row must be of the same length, and the map must also be the same length as a data row.
- Value Pair
- If the data is in the form of a key/value pair, then each row must be a list of {key, value} tuples, and the map must also be a list of {key, value} tuples. The tuples can be in any order, and there can be extra tuples or missing tuples with no ill effects.
- Records
- If the data is in the form of a record, then each row must be the same type of record, and the map must be a record.
The bind element can be nested within itself.
1.1 Usage
Data = [ ["Joe", "Franklin"], ["Samir", "Jahal"], ["Laurie", "O'Conner"] ], Map = [firstName@text, lastName@text], #bind { data=Data, map=Map, body=[ #label { id=firstName }, #label { id=lastName } ]}
1.2 Attributes
- data - (list of erlang terms)
- Data in the form of a simple list, a key/value pair, records, or any combination of the three.
- map - (erlang terms)
- Specify how the data maps to the body of elements.
- transform - (Function(DataRow, Acc) -> {DataRow1, Acc1, ExtraBindings})
-
A transform function that is run on the data before binding. DataRow contains one row of data. Acc contains the accumulator set by the 'acc' attribute. The function can return a modified datarow, an updated accumulator, and a list of extra bindings to apply. The extra bindings must be of the form {elementid@attr, value}.
- acc - (Erlang term)
- The initial accumulator to pass in to the transform function.
- body - (Nitrogen elements)
- The block of Nitrogen elements to which data is bound.
- empty_body - (Nitrogen elements)
- A block of Nitrogen elements to render if the supplied data has no rows.
Date: 2011-02-01 08:02:43 EST
HTML generated by org-mode 7.01h in emacs 24


- Title: {{item.title}} - Authors: {{item.authors}} - Date Publish: {{item.publishedDate | date: 'dd/MM/yyyy'}}


Many of the Ruby classes you’re used to are also enumerables (like Array, Set, Range, and Hash), and custom classes can use the enumerable module as well. The enumerable module provides a collection of methods for all of these classes, but each class must define how it handles them individually. We can’t iterate over an array the same way we would iterate over a hash, even though the methods will have a lot in common.
To get around this the enumerable module requires a class to define its own each method, which passes items to the code block. Then it’s possible to get at all the functionality the enumerable module offers without defining the rest of the enumerable methods individually.
Inject and reduce and different names for the same method––I’ll stick to using “inject” for simplicity. They work by first defining an accumulator value and then iterating over each item in the class. For each iteration, the accumulator is altered (or not) by the code block included with the method call, and the result is passed along on the next iteration.
As an example, inject gives us a succinct way of summing items in an array:
a = [3, 5, 7, 9]
a.inject { |sum, n| sum + n }
#=> 24
Here, “sum” is the name of our accumulator value, and “n” stands in whichever element of the array is part of the current iteration. If you don’t explicitly initialize an accumulator its value is assumed to be the first element in the iteration. The accumulator gets initialized as a variable passed in the method call. So writing the expression like this
a.inject(0) { |sum, n| sum + n }
would give the same result.
In the first example, sum gets (implicitly) initialized as 3 and n gets set to 5 (the first element of the array). When the code block runs n is added to our accumulator, so that at the end of the first iteration sum = 8. By the end of second iteration n is 7 and sum = 15 . . . and so on until Array’s each method gets to the last element. The accumulator value is returned, so the entire inject call evaluates to 24.
Like you would expect, #cycle cycles. It passes each element of the enumerable to the code block, and keeps doing it as many times as you tell it to (in the method argument). If you don’t include an argument, it goes on forever. Cycle always returns nil.
a = ['x', 'y', 'z']
a.cycle(3) { |letter| print "#{letter.upcase}! " }
X! Y! Z! X! Y! Z! X! Y! Z! #=> nil
When you call grep on an enumerable, you pass a pattern as an argument. The method then returns an array of every element in the enumerable which matches the pattern (using the === operator). If you also supply a block, it will be executed on each element that matches the pattern and the block’s results will be returned in an array.
(1..10).grep 5..9
#=> [5, 6, 7, 8, 9]
(1..10).grep(5..9) { |n| n*5 }
#=> [25, 30, 35, 40, 45]
turtles = [‘leonardo', ‘michelangelo', ‘donatello', ‘raphael']
turtles.grep(/angel/) { |t| t.capitalize }
#=> ["Michelangelo"]
Notice that grep is functionally equivalent to:
enumerable.select { |element| pattern === element }
Takes an enumerable and returns a hash where keys are the results of calling the block and values are arrays of elements that produced each result.
parasites = [‘hookworm’, ’trinchinella’, ‘loa loa’, ‘crab louse’, ‘lamprey’, ‘vampire bat’]
parasites.group_by { |p| p.size }
#=> { 8=>["hookworm", "tapeworm", "oxpecker"], 12=>["trinchinella"], 7=>["loa loa", "lamprey"], 10=>["crab louse", "head louse"], 11=>["vampire bat"] }
parasites.group_by { |p| p.size == 12 }
#=> {false=>["hookworm", "loa loa", "crab louse", "lamprey", "vampire bat", "tapeworm", "head louse", "oxpecker"], true=>["trinchinella"]}
Like group_by, partition groups elements based on some test. But instead of returning a hash, partition returns two arrays organized by whether the code block returns true or false for the array (the true array is always returned first).
parasites = [‘hookworm’, ’trinchinella’, ‘loa loa’, ‘crab louse’, ‘lamprey’, ‘vampire bat’]
parasites.partition { |p| p.size == 12 }
#=> [["trinchinella"], ["hookworm", "loa loa", "crab louse", "lamprey", "vampire bat", "tapeworm", "head louse", "oxpecker"]]
Map (aka collect) gets called with a block, and returns a new array with the result of running that block on each element of the enumerable.
a = [49, 0, 33, 56, 19, 5]
a.map { |n| n % 4 }
#=> [1, 0, 1, 0, 3, 1]
a.map { |n| ‘phlebotomist’ }
#=> [‘phlebotomist’, ‘phlebotomist’, ‘phlebotomist’, ‘phlebotomist’, ‘phlebotomist’, ‘phlebotomist’]
These methods return the element in the enumerable that represent the minimum or maximum value as defined by the code block.
fruits = ['orange', 'apple', 'banana', 'blueberry', 'grape', 'mango']
fruits.min_by { |x| x.length }
#=> ‘apple’
fruits.max_by { |x| x.length }
#=> ‘blueberry’
Select picks out all the elements of the enumerable for which the code block evaluates to true.
a = [10, 15, 20, 25, 30, 35, 40]
a.select { |n| n > 25 }
#=> [30, 35, 40]
Reject does exactly the opposite and returns all the elements for which the code block evaluates to false.
a.reject { |n| n > 25 }
#=> [10, 15, 20, 25]
Sort returns an array with all the elements sorted according to their own <=> method (if you’re calling the method on a class you created, you can define the comparison method).
a = [00000, 15, 999, 3.00004563, 86]
a.sort
#=> [0, 3.00004563, 15, 86, 999]
Sort_by allows us to sort an enumerable using custom sort method. (We could also do this by passing a code block to sort, but sort_by takes care of some of the work by assuming you want to execute the same code on every element and compare them using the <=> operator.)
a..sort_by { |n| n.to_s.size }
#=> [0, 15, 86, 999, 3.00004563]


In this page, we will learn prebuilt datasets in R. data()
function will show the list of all datasets in your workspace. data() is a function within a "utils" package in "base" version of R installation so that you do not need to install any package to run this.
When you install R in your computer, the package "datasets" is installed. Datasets in the package "datasets" are provided openly and free. These datasets can be used when you want to verify your statistical methods. When you install some packages that include datasets, data() function will show the datasets in the packages.
help() function can be used to find out how the dataset is such as help(iris)
.
You can see the document of data()
function at the following link:
Copy and Run the sample code in your Rstudio to see how install.packages() function works.
DO NOT CLICK RUN
# DO NOT RUN THIS CODE IN THE ENVIRONMENT
# INSTEAD, COPY AND PASTE IN RSTUDIO TO PRACTICE THIS CODE
# install a package "dplyr"
install.packages("dplyr")
# install packages only when it is not installed
if(!require("ggplot2")) install.packages("ggplot2")


2 Timothy 2:26
And that they may recover themselves out of the snare of the devil, who are taken captive by him at his will.


import heapq class Solution: def maxAverageRatio(self, classes: List[List[int]], extraStudents: int) -> float: heap = [] for a, b in classes: heap.append((-(b-a)/b/(b+1), a, b)) heapq.heapify(heap) for i in range(extraStudents): _, a, b = heapq.heappop(heap) a += 1 b += 1 heapq.heappush(heap, (-(b-a)/b/(b+1), a, b)) res = 0 for _, a, b in heap: res += a/b return res / len(classes)


The giant panda also known as the panda bear or simply the panda, is a bear native to South Central China. It is characterised by its bold black-and-white coat and rotund body. The name "giant panda" is sometimes used to distinguish it from the red panda, a neighboring musteloid. Though it belongs to the order Carnivora, the giant panda is a folivore, with bamboo shoots and leaves making up more than 99% of its diet. Giant pandas in the wild will occasionally eat other grasses, wild tubers, or even meat in the form of birds, rodents, or carrion. In captivity, they may receive honey, eggs, fish, yams, shrub leaves, oranges, or bananas along with specially prepared food. The giant panda lives in a few mountain ranges in central China, mainly in Sichuan, but also in neighbouring Shaanxi and Gansu. As a result of farming, deforestation, and other development, the giant panda has been driven out of the lowland areas where it once lived, and it is a conservation-reliant vulnerable species. A 2007 report showed 239 pandas living in captivity inside China and another 27 outside the country. As of December 2014, 49 giant pandas lived in captivity outside China, living in 18 zoos in 13 different countries. Wild population estimates vary; one estimate shows that there are about 1,590 individuals living in the wild, while a 2006 study via DNA analysis estimated that this figure could be as high as 2,000 to 3,000. Some reports also show that the number of giant pandas in the wild is on the rise. In March 2015, conservation news site Mongabay stated that the wild giant panda population had increased by 268, or 16.8%, to 1,864. In 2016, the IUCN reclassified the species from "endangered" to "vulnerable", affirming decade-long efforts to save the panda. In July 2021, Chinese authorities also reclassified the giant panda as vulnerable rather than endangered.


Ciihuy QR and Bar Code Generator
Type some short text or a url then click "Generate" to get a QR and Bar Code.
GENERATE
Developed by
CiihuyCom


Mushrooms (P. cyanescens) & Cannabis
I had been looking to try mushrooms for a long time. Pretty much the entire year, as a matter of fact. So, when I found that it was harvest season and there was finally a supply around, I began the mad scramble to get ahold of some. I finally got some from the guy down the hall.
As the night that my two friends and myself had decided on for the trip approached, we began to get more and more excited. All of us had tried LSD before, and I, personally, was somewhat disappointed—I only had taken one paper tab, plus my general mindset around that time was a slightly depressed one. In any case, acid had not done for me what I had expected, and I was hoping that mushrooms would open that door for me.
We ate the mushrooms at around 7 in the evening. The plan was to wait until they started kicking in, then burn our joint down to kick the effects in just a little more. We ate the mushrooms (I didn’t mind the taste, but both my friends thought it was horrible), and then sat around for about 15 minutes, during which we all felt a little bit nauseous. This feeling passed when we washed the little bits of mushroom detritus out of our mouths. After about 20 minutes, we began to get a sort of anticipatory feeling, as if we could tell that something was coming. We decided to get something to drink while we could still pass as normal, so we decided to go down to the sub shop (in the same building) and get a juice.
We went outside so one of us could smoke a cigarette. I began to notice that one particular light, a blue light on top of a campus safety phone, had a sort of lazy, hazy aura around it. No other lights, just that one.
My friend finished his cigarette, and we made our way back to my room. On the way, I tried to read the little piece of text on the underside of the juice cap, and found that I couldn’t make myself care about Tom and Tom of Nantucket Nectars. Back in the room, we sat listening to Hendrix Live at Winterland, and all of a sudden, we got a tremendous explosion of energy. We began dancing around, almost (but not quite) violently, and collapsed with peals of uncontrollable laughter. We began to notice that the door to my room seemed to be breathing, in and out, in unison with our own breaths. The album ended, and after we put on Hendrix’s Electric Ladyland and grooved on that for a while, I turned to my friends and said, “How’s everyone feel about burning that joint about now?”
Carelessness. Utter carelessness—we toweled the door and opened the windows, but we didn’t turn on the fans or use any air freshener in the hallway. Just as I had settled into a chair and was watching the blacklit pictures on the wall dance in time with Voodoo Child, a sinister knock on the door broke into my flow, out of time with the music. When opened, it was revealed to me that several police officers were at the door. Not just Campus Safety, but town patrol officers.
Shaking myself back to reality as well as I could muster, I listened to the cops explain that someone had reported (from the smell) some illegal marijuana smoking, and that in such a close-knit community as a college dorm, there will be some people around who won’t agree, as we obviously did, with smoking marijuana.
At this point, we should’ve been stopped-heart, mouth-hanging scared to our souls, but, somehow, we managed to stay totally calm—there were no drugs left in the room, just a bunch of paraphernalia—papers, containers, stuff like such. The cops treated us with courtesy, even respect (one of them asked me about my guitar), and, though they searched the room, they didn’t rifle too carefully since we’d been cooperative. I even gave him my prized bong, with the slider that said “Jah” on it. The cops left without knowing that we had done anything more illegal than weed (a common offense up here), and we felt not only relief, but a feeling of cleanliness and purity.
We were reborn, cleansed by officers of peace of anything illegal to put us at unease of persecution, I laid down in the beanbag chair and, after looking at my pictures on the wall glowing and dancing in green on a black background to Electric Ladyland, I closed my eyes and let 1983 manipulate my head in a way that only it could. After the album and after a quick bathroom break, I headed back to my room.
 Nothing scary, I just felt like laying differently. Nearly unable and totally unwilling to open my eyes, the music painted its own pictures in my mind, which I just sat and watched. In addition to pictures, I began to notice that I was thinking faster than I ever had thought before in my entire life. I saw how my mind always figures things out that it finds interesting and then congratulates itself for it. At first I made fun of myself for it, but then I could see that with my intermittent crises of self-confidence, this was just how my mind had built up a good image of itself. I saw that this was just human, and I loved myself for it.
I saw that I smoked entirely too much weed and did everything that came along with it because I was in love with the image of being a “stoner” and I also saw that this wasn’t really the image I wanted to affiliate myself with anymore. Escapism only goes so far, eventually I have to start living.
I saw exactly why everyone else did what they did. I saw how little of a difference money made, or anything material made. I saw how much more powerful my mind was than my body could ever possibly be. As the album climaxed into the end of Eclipse, I became dimly aware that I was breathing heavily and my entire body was rapidly rolling back and forth on the ground. I saw the entire universe, comprised of how everything reacts with everything else, wrap itself into a ball and shrink away. I was shown everything, allowed to live five thousand years in the space of five hundred breaths. As the last notes faded away I realized that I was laughing and crying at the same time, lying on my left on a beanbag chair in my dorm room.
It faded slowly and gently, and the lucidity that it left me feeling was the cleanest feeling I had ever experienced. I felt more sober than I had ever been in my entire life. I felt I had stepped outside my own mind, flown around the world, stepped outside of space, and landed right back where I was, only that much wiser.
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.


| Introduction to Programming |
15-112 |
10 min. |
Join |
| Application Design and Development |
67-272 |
2 min. |
Join |
| Principles of Imperative Computation |
15-122 |
7 min. |
Join |
| Introduction to Computer Systems |
15-213 |
2 min. |
Join |
| More Great Theoretical Ideas in Computer Science |
15-252 |
12 min. |
Join |
| Introduction to Programming |
15-112 |
10 min. |
Join |
| Application Design and Development |
67-272 |
2 min. |
Join |
| Principles of Imperative Computation |
15-122 |
7 min. |
Join |
| Introduction to Computer Systems |
15-213 |
2 min. |
Join |
| Great Theoretical Ideas in Computer Science |
15-251 |
13 min. |
Join |


Tetris In JavaScript
New Game
High Score
HighScore
00000
Score
00000
Rows
0
Sorry, this example cannot be run because your browser does not support the <canvas> element
High Score
<
RESET
PAUSE
CONTINUE
QUIT
TRY AGAIN ?
BACK MENU
RESTART
Your score :


new TestResultListLogic()
This class is a "Logic" for the list page of test results.
Members
Methods
-
<static> _copyObjectByKey(from, to, keys)
-
Copy values which are specified by "keys" parameter from one object to other.
Parameters:
Name Type Description from
Object The object copy from. to
Object The object copy to. keys
Array -
<static> getTestExectionTimeList() → {JqXHRWrapper}
-
Gets a list of test exection time.
Returns:
- Type
- JqXHRWrapper
-
<static> getTestExectionTimeListWithParams(params) → {JqXHRWrapper}
-
Gets a list of test exection time which is narrowed down by parameters.
Parameters:
Name Type Description params
Object search parameters Returns:
- Type
- JqXHRWrapper
-
<static> getTestResultList(executionTime) → {JqXHRWrapper}
-
Gets a list of test result details.
Parameters:
Name Type Description executionTime
string The time the test was run. Returns:
- Type
- JqXHRWrapper