q2K BHP
Black History Portal
THE BHP WIRE —
HIDDEN TRUTHS
What's New!
THE JOURNEY THROUGH TIME

Explore Black History

Explore the people, places, events, achievements, struggles and stories that shaped our journey.

✊🏾

Civil Rights

Movements, leaders, victories and the continuing fight for equality.

⚙️

Black Inventors

Innovation, patents, science, technology and world-changing contributions.

🏆

Sports

Pioneers, champions, Negro Leagues, records, activism and excellence.

♟️

People

Meet the people whose lives, choices and achievements shaped the journey.

📍

Places

Black towns, communities, institutions and places where history happened.

📜

Events

Moments that changed communities, movements, institutions and the nation.

Enter a person, place, event, or topic.
MY'STORY

The MOVE Fire

This is a personal recollection on the Move fire on May 13, 1985 Philadelphia police fired thousands of rounds at the MOVE house, city officials approved dropping an explosive device on the roof, the resulting fire was allowed to burn, 11 people—including five children—died, and 61 homes were destroyed. Philadelphia City Council later called it a “brutal attack carried out by the City of Philadelphia on its own citizens” and acknowledged that no individual faced criminal consequences for the bombing. One timeline correction worth preserving for the BHP record: the major previous MOVE-police confrontation was August 8, 1978, about seven years before the bombing, not a year or two earlier. Officer James Ramp was killed, other police and firefighters were wounded, nine MOVE members were later convicted, and television cameras recorded police beating Delbert Africa during his arrest. The 1985 MOVE Commission later specifically criticized city planners for failing to adequately use lessons from that 1978 confrontation. And that actually strengthens the point you’re making: 1985 did not happen without precedent or institutional memory. There had already been a deadly confrontation with MOVE, years of conflict, negotiations and police involvement before Osage Avenue.

MORE →
BLACK FACTS
The Truths They Never Taught You...

The Violence That Helped Spark the NAACP

In August 1908, a white mob attacked Springfield, Illinois’s Black community, destroying homes and businesses and lynching two Black men. National outrage over the violence helped spur the movement that created the NAACP the following year.

MORE →
BHP gathered finds from its connected research sources. Showing the 4 strongest Black History matches.
← BACK TO RESULTS
Wikipedia

Instance variable

In class-based, object-oriented programming, an instance variable is a variable defined in a class (i.e., a member variable), for which each instantiated object of the class has a separate copy, or instance.[1][2] An instance variable has similarities with a class variable,[3] but is non-static. In C++ or Java language, an instance variable is a variable which is declared in a class but outside of constructors, methods, or blocks. Instance variables are created when an object is instantiated, and are accessible to all the constructors, methods, or blocks in the class. Access modifiers can be given to the instance variable.

An instance variable is not a class variable,[4] although there are similarities. Both are a type of class attribute (or class property, field, or data member). While an instance variable's value may differ between instances of a class, a class variable can only have one value at any one time, shared between all instances. The same dichotomy between instance and class members applies to methods ("member functions") as well.

Each instance variable lives in memory for the lifetime of the object it is owned by.[5]

Instance variables are properties of that object. All instances of a class have their own copies of instance variables, even if the value is the same from one object to another. One class instance can change values of its instance variables without affecting all other instances. A class may have both instance variables and class variables.

Instance variables can be used by all instance methods of an object, but may not be used by class methods. An instance variable may also be changed directly, provided access restrictions are set.[6]

Examples

[edit]

C++

[edit]
class Request {
private:
    static inline int count1 = 0;
    int number;
public:
    // constructor modifies the instance variable "this->number"
    Request():
        number{count1} {
        ++count1; // modifies the class variable "Request::count1"
    }

};

In this C++ example, the instance variable Request::number is a copy of the class variable Request::count1 where each instance constructed is assigned a sequential value of count1 before it is incremented. Since number is an instance variable, each Request object contains its own distinct value; in contrast, there is only one object Request::count1 available to all class instances with the same value.

Java

[edit]
class MyInteger {
    private int x = 0;

    public MyInteger() {}

    public MyInteger(int x) {
        this.x = x;
    }
    
    public void set(int x) {
        this.x = x;
    }

    public int get() {
        return this.x;
    }
}

public class Main {
    public static void main(String[] args) {
        MyInteger myInt1 = new MyInteger();
        MyInteger myInt2 = new MyInteger();
        
        // As set() is an instance method, it can also access the variable
        myInt2.set(-10);
        
        assert myInt1.get() == 10;
        assert myInt2.get() == -10;
    }
}

In this Java example, we can see how instance variables can be modified in one instance without affecting another.

Python

[edit]
class Dog:
    def __init__(self, breed: str) -> None:
        self.breed = breed # instance variable

# dog_1 is an object
# which is also an instance of the Dog class
dog_1: Dog = Dog("Border Collie")

In the above Python code, the instance variable is created when an argument is parsed into the instance, with the specification of the breed positional argument.

References

[edit]
  1. ^ "Instance Variables in C++ Programming". Dremendo. Retrieved 2024-03-08.
  2. ^ "Java Variables". GeeksforGeeks. 2017-02-06. Retrieved 2024-03-08.
  3. ^ "The Java Tutorial, Variables". docs.oracle.com. Oracle. Archived from the original on 23 October 2014. Retrieved 23 October 2014.
  4. ^ "Difference between Instance Variable and Class Variable". GeeksforGeeks. 2021-04-26. Retrieved 2024-03-08.
  5. ^ "The Java Tutorials, Understanding Class Members". docs.oracle.com. Oracle. Archived from the original on 11 October 2014. Retrieved 23 October 2014.
  6. ^ Matuszek, David. "Static". cis.upenn.edu. University of Pennsylvania. Archived from the original on 23 October 2014. Retrieved 23 October 2014.

Source: Wikipedia. Article content is retrieved live through the MediaWiki API.

No preview image
Wikipedia

Instance variable

In class-based, object-oriented programming, an instance variable is a variable defined in a class (i.e., a member variable), for which each instantiated object of the class has a separate copy, or instance. An instance variable has similarities with a class variable, but is non-static. In C++ or Java language, an instance variable is a variable which is declared in a class but outside of constructors, methods, or blocks. Instance variables are created when an object is instantiated, and are accessible to all the constructors, methods, or blocks in the class. Access modifiers can be given to the instance variable. An instance variable is not a class variable, although there are similarities. Both are a type of class attribute (or class property, field, or data member). While an instance variable's value may differ between instances of a class, a class variable can only have one value at any one time, shared between all instances. The same dichotomy between instance and class members applies to methods ("member functions") as well. Each instance variable lives in memory for the lifetime of the object it is owned by. Instance variables are properties of that object. All instances of a class have their own copies of instance variables, even if the value is the same from one object to another. One class instance can change values of its instance variables without affecting all other instances. A class may have both instance variables and class variables. Instance variables can be used by all instance methods of an object, but may not be used by class methods. An instance variable may also be changed directly, provided access restrictions are set.

MORE →
No preview image
Wikipedia

Strategy pattern

In computer programming, the strategy pattern (also known as the policy pattern) is a behavioral software design pattern that enables selecting an algorithm at runtime. Instead of implementing a single algorithm directly, code receives runtime instructions as to which in a family of algorithms to use. Strategy lets the algorithm vary independently from clients that use it. Strategy is one of the patterns included in the influential book Design Patterns by Gamma et al. that popularized the concept of using design patterns to describe how to design flexible and reusable object-oriented software. Deferring the decision about which algorithm to use until runtime allows the calling code to be more flexible and reusable. For instance, a class that performs validation on incoming data may use the strategy pattern to select a validation algorithm depending on the type of data, the source of the data, user choice, or other discriminating factors. These factors are not known until runtime and may require radically different validation to be performed. The validation algorithms (strategies), encapsulated separately from the validating object, may be used by other validating objects in different areas of the system (or even different systems) without code duplication. Typically, the strategy pattern stores a reference to code in a data structure and retrieves it. This can be achieved by mechanisms such as the native function pointer, the first-class function, classes or class instances in object-oriented programming languages, or accessing the language implementation's internal storage of code via reflection.

MORE →
No preview image
Wikipedia

Cerner CCL

Cerner CCL (Cerner Command Language) is the Cerner Corporation fourth-generation programming language, which is expressed in the Cerner Discern Explorer. CCL is patterned after the Structured Query Language (SQL). All Cerner Millennium health information technology software uses CCL/Discern Explorer to select from, insert into, update into and delete from a Cerner Millennium database and allows a programmer to fetch data from an Oracle database and display it as the user wants to see. With features like Record Structure and subroutines it allows a user to get data from a database and manipulate it by storing it in a temporary structure; execute a particular section of the code, if required using a subroutine. Complete for CCL (Cerner Command Language) is provided by Cerner Corporation. Discern Explorer provides several applications that can be used to create, execute, and analyze ad hoc queries, reports and programs. These applications provide flexibility in the skill set needed to build programs and design reports. Discern Explorer programs can be written using, VisualExplorer.exe (VE), DiscernVisualDeveloper.exe (DVDev), an operating system command-line editor, or any other text editor. ExplorerMenu.exe (EM) is used to execute Discern Explorer programs on demand. ExplorerAnalyzer.exe (EA) allows its users to analyze the system resources used by RDBMS queries. CCL Hello World examples: Example 1 call echo("Hello World!") go Example 2 drop program helloworld2 go create program helloworld2 call echo("Hello World!") end go Example 3 drop program helloworld3 go create program helloworld3 PAINT call TEXT(1,1, "Hello World!") end go Example 4 class example DROP PROGRAM JCMCLASS1A GO CREATE PROGRAM JCMCLASS1A CREATE CLASS c_pat ;The c_pat class is an example class type which encapsulates the demographic members as well as the ;methods needed to operate on this class. ;The class consists of optional sections with member and methods denoted with a namespace init ;class constructor call echo("init c_pat class section") DECLARE _::pvar1 = vc WITH CONSTANT("pvar1 test") ;class instance member (default if namespace omitted) DECLARE class::pvar2 = vc WITH NOCONSTANT("pvar2 test") ;class member shared across instances DECLARE _::pvar3 = vc WITH CONSTANT("pvar3 test") DECLARE private::pvar4 = i4 ;private class instance member DECLARE _::instance_name = vc RECORD _::rec1( 1 qual 2 birth_dt_tm = dq8 2 race = c2 2 religion = c2 2 year = i4 2 month = i4 2 day = i4 ) DECLARE _::set_month(year=i4,month=i4,day=i4) = null call echo(build("class::pvar2=",class::pvar2)) SUBROUTINE _::set_month(year,month,day) SET _::rec1->year = year SET _::rec1->month = month SET _::rec1->day = day END ;subroutine END ;class constructor FINAL ;class destructor call echo(build("final c_pat class instance section:",instance_name)) END ;class destructor WITH copy=1 END GO DROP PROGRAM JCMCLASS1 GO CREATE PROGRAM JCMCLASS1 execute jcmclass1a ;load class definition declare c1::i_patient1 = null with class(c_pat) ;declare first instance from class c_pat declare c1::i_patient2 = null with class(c_pat) ;declare second instance from class c_pat call echo(">>>class variable") set c1::i_patient1.instance_name = "c1::i_patient1" set c1::i_patient2.instance_name = "c1::i_patient2" call echo(">>>class record member") set c1::i_patient1.rec1->birth_dt_tm = cnvtdatetime("01-JAN-2012 08:30.00") set c1::i_patient2.rec1->birth_dt_tm = cnvtdatetime("01-FEB-2013 10:30.00") call echo(">>>class function") call c1::i_patient1.set_month(2012,10,16) call c1::i_patient2.set_month(2012,06,10) call echo(build("instance_name=",c1::i_patient1.instance_name)) call echo(build("instance_name=",c1::i_patient2.instance_name)) call echorecord(c1::i_patient1.rec1) call echorecord(c1::i_patient2.rec1) if ($1=1) call trace(38) endif ;display class info using class(,[,]) declare class_info=vc declare cid = i4 set cid = 1 while (cid > 0) set class_info = class(c1::i_patient1,cid,1) if (class_info=" ") set cid = 0 else call echo(class_info) set cid=cid+1 endif endwhile set cid = 1 while (cid > 0) set class_info = class(c1::i_patient1,cid,3) if (class_info=" ") set cid = 0 else call echo(class_info) set cid=cid+1 endif endwhile set curalias r1 c1::i_patient1.rec1->qual set r1->race="AB" select into nl from dummyt detail call echo(build("report=",c1::i_patient1.instance_name)) call echo(r1->race) with nocounter call echo(build(">>>>>>>>>>>c1::i_patient1=",c1::i_patient1)) free set c1::i_patient1 free set c1::i_patient2 if ($1=2) call trace(38) endif END GO

MORE →
No preview image
Wikipedia

Class (programming)

In programming, a class is a syntactic entity structure used to create objects. The capabilities of a class differ between programming languages, but generally the shared aspects consist of state (variables) and behavior (methods) that are each either associated with a particular object or with all objects of that class. Object state can differ between each instance of the class whereas the class state is shared by all of them. The object methods include access to the object state (via an implicit or explicit parameter that references the object) whereas class methods do not. If the language supports inheritance, a class can be defined based on another class with all of its state and behavior plus additional state and behavior that further specializes the class. The specialized class is a sub-class, and the class it is based on is its superclass. In purely object-oriented programming languages, such as Java and C#, all classes might be part of an inheritance tree such that the root class is Object, meaning all objects' instances are of Object or implicitly extend Object, which is called a top type.

MORE →
TOPIC OF THE DAY

Greenwood / Black Wall Street

Before the 1921 destruction of Tulsa’s Greenwood District, Black residents had created a remarkable center of business and community life. The district included stores, professional offices, entertainment venues and homes owned by Black citizens. Understanding Greenwood means learning what was built—not only what was burned.

MORE →
TRIVIA QUESTION OF THE DAY

Who became the first Black woman to travel into space?

Mae Jemison, aboard Space Shuttle Endeavour in 1992.