Hydration (web development)

Hydration (web development)

In web development, hydration or rehydration is a technique in which client-side JavaScript converts a web page that is static from the perspective of the web browser, delivered either through static rendering or server-side rendering, into a dynamic web page by attaching event handlers to the HTML elements in the DOM. Because the HTML is pre-rendered on a server, this allows for a fast "first contentful paint" (when useful data is first displayed to the user), but there is a period of time afterward where the page appears to be fully loaded and interactive, but is not until the client-side JavaScript is executed and event handlers have been attached. Frameworks that use hydration include Next.js and Nuxt. React v16.0 introduced a "hydrate" function, which hydrates an element, in its API. == Variations == === Streaming server-side rendering === Streaming server-side rendering allows one to send HTML in chunks that the browser can progressively render as it is received. This can provide a fast first paint and first contentful paint as HTML markup arrives to users faster. === Progressive rehydration === In progressive rehydration, individual pieces of a server-rendered application are “booted up” over time, rather than the current common approach of initializing the entire application at once. This can help reduce the amount of JavaScript required to make pages interactive, since client-side upgrading of low priority parts of the page can be deferred to prevent blocking the main thread. It can also help avoid one of the most common server-side rendering rehydration pitfalls, where a server-rendered DOM tree gets destroyed and then immediately rebuilt – most often because the initial synchronous client-side render required data that wasn't quite ready, perhaps awaiting Promise resolution. === Partial rehydration === Partial rehydration has proven difficult to implement. This approach is an extension of the idea of progressive rehydration, where the individual pieces (components/views/trees) to be progressively rehydrated are analyzed and those with little interactivity or no reactivity are identified. For each of these mostly-static parts, the corresponding JavaScript code is then transformed into inert references and decorative functionality, reducing their client-side footprint to near-zero. The partial hydration approach comes with its own issues and compromises. It poses some interesting challenges for caching, and client-side navigation means it cannot be assumed that server-rendered HTML for inert parts of the application will be available without a full page load. One framework that supports partial rehydration is Elder.js, which is based on Svelte. === Trisomorphic rendering === Trisomorphic rendering is a technique which uses streaming server-side rendering for initial/non-JavaScript navigations, and then uses service workers to take on rendering of HTML for navigations after it has been installed. This can keep cached components and templates up to date and enables SPA-style navigations for rendering new views in the same session. This approach works best when one can share the same templating and routing code between the server, client page, and service worker.

Data annotation

Data annotation is the process of labeling or tagging relevant metadata within a dataset to enable machines to interpret the data accurately. The dataset can take various forms, including images, audio files, video footage, or text. == Applications == Data is a fundamental component in the development of artificial intelligence (AI). Training AI models, particularly in computer vision and natural language processing, requires large volumes of annotated data. Proper annotation ensures that machine learning algorithms can recognize patterns and make accurate predictions. Common types of data annotation include classification, bounding boxes, semantic segmentation, and keypoint annotation. Data annotation is used in AI-driven fields, including healthcare, autonomous vehicles, retail, security, and entertainment. By accurately labeling data, machine learning models can perform complex tasks such as object detection, sentiment analysis, and speech recognition with greater precision. This growing demand has led to the emergence of specialized sectors and platforms dedicated to AI training and human-in-the-loop workflows, which often utilize Reinforcement Learning from Human Feedback (RLHF) to refine model behavior. == In computer vision == === Image classification === Image classification, also known as image categorization, involves assigning predefined labels to images. Machine learning algorithms trained on classified images can later recognize objects and differentiate between categories. For instance, an AI model trained to recognize furniture styles can distinguish between Georgian and Rococo armchairs. === Semantic segmentation === Semantic segmentation assigns each pixel in an image to a specific class, such as trees, vehicles, humans, or buildings. This type of annotation enables machine learning models to differentiate objects by grouping similar pixels, allowing for a detailed understanding of an image. === Bounding boxes === Bounding box annotation involves drawing rectangular boxes around objects in an image. This technique is commonly used in autonomous driving, security surveillance, and retail analytics to detect and classify objects such as pedestrians, vehicles, and products on store shelves. === 3D cuboids === 3D cuboid annotation enhances traditional bounding boxes by adding depth, enabling models to predict an object's spatial orientation, movement, and size. This method is particularly useful for autonomous vehicles and robotics, where understanding object dimensions and depth is critical. === Polygonal annotation === For objects with irregular shapes, such as curved or multi-sided items, polygonal annotation provides more precise labeling than bounding boxes. This technique is often used in applications that require detailed object recognition, such as medical imaging or aerial mapping. === Keypoint annotation === Keypoint annotation marks specific points on an object, such as facial landmarks or body joints, to enable tracking and motion analysis. This method is widely used in facial recognition, emotion detection, sports analytics, and augmented reality applications.

Fingerprint scanner

Fingerprint scanners are a type of biometric security device that identify an individual by identifying the structure of their fingerprints. They are used in police stations, security industries, smartphones, and other mobile devices. == Fingerprints == People have patterns of friction ridges on their fingers, these patterns are called the fingerprints. Fingerprints are uniquely detailed, durable over an individual's lifetime, and difficult to alter. Due to the unique combinations, fingerprints have become an ideal means of identification. == Types of fingerprint scanners == There are four types of fingerprint scanners: Optical scanners take a visual image of the fingerprint using a digital camera. Capacitive or CMOS scanners use capacitors and thus electric current to form an image of the fingerprint. This type of scanner tends to excel in terms of precision. Ultrasonic fingerprint scanners use high frequency sound waves to penetrate the epidermal (outer) layer of the skin. Thermal scanners sense the temperature differences on the contact surface, in between fingerprint ridges and valleys. All fingerprint scanners are susceptible to spoofing through fingerprints replicated using photographs and 3D printing. == Construction forms == Each type of fingerprint sensor can take two basic forms: the stagnant and the moving fingerprint scanner. Stagnant: The scanning module is mounted statically, and the user is required to swipe their fingers across it. This is cheaper but also less reliable than the moving form. Imaging can be less than ideal if the finger is not dragged over the scanning area at constant speed. Moving: The scanning module is mounted on a movable surface, while the user's finger can remain static. Because this layout allows the scanning module to pass the fingerprint at a constant speed, this method is generally more reliable. == Form factors == === Peripherals === Add-on fingerprint readers for PCs initially appeared in the late 1990's in the form of PCMCIA modules. Microsoft released a model in its IntelliMouse line with an integrated fingerprint reader in 2005. === Integrated readers === Laptops with built-in readers emerged around the same time as peripheral readers with devices such as NECs MC/R730F. IBM produced laptops with integrated readers starting in 2004. Apple introduced fingerprint scanners to their devices under the name Touch ID in 2013. These were initially released on the iPhone 5S, with the technology remaining exclusive to iPhones until the release of the 2016 MacBook Pro. On both laptops and smartphones, the fingerprint sensor usually uses a USB or I2C interface internally.

OpenWebRTC

OpenWebRTC (OWR) is a free software stack that implements the WebRTC standard, a set of protocols and application programming interfaces defined by the World Wide Web Consortium (W3C) and the Internet Engineering Task Force (IETF). It is an alternative to the reference implementation that is based on software from Global IP Solutions (GIPS). It is published under the terms of the Simplified (2-clause) BSD license and officially supports iOS, Linux, OS X, and Android operating systems. It is meant to also work outside web browsers, e.g. to power native mobile apps. It is mostly written in C and based largely on the multimedia framework GStreamer and a number of other, smaller external libraries. It officially supports both VP8 and H.264 as video formats. For H.264 it uses OpenH264 to which Cisco pays the patent licensing bills. Development of OpenWebRTC started at Ericsson Research under the lead of Stefan Ålund. They released it as free software in September 2014, together with the proof-of-concept web browser "Bowser" that is based on the stack. Among other things, this initial version didn't support data channels yet and was said to still be less mature than Google's reference implementation.

Digital anthropology

Digital anthropology is the anthropological study of the relationship between humans and digital-era technology. The field is new, and thus has a variety of names with a variety of emphases. These include techno-anthropology, digital ethnography, cyberanthropology, and virtual anthropology. == Definition and scope == Most anthropologists who use the phrase "digital anthropology" are specifically referring to online and Internet technology. The study of humans' relationship to a broader range of technology may fall under other subfields of anthropological study, such as cyborg anthropology. The Digital Anthropology Group (DANG) is classified as an interest group in the American Anthropological Association. DANG's mission includes promoting the use of digital technology as a tool of anthropological research, encouraging anthropologists to share research using digital platforms, and outlining ways for anthropologists to study digital communities. Cyberspace or the "virtual world" itself can serve as a "field" site for anthropologists, allowing the observation, analysis, and interpretation of the sociocultural phenomena springing up and taking place in any interactive space. National and transnational communities, enabled by digital technology, establish a set of social norms, practices, traditions, storied history and associated collective memory, migration periods, internal and external conflicts, potentially subconscious language features and memetic dialects comparable to those of traditional, geographically confined communities. This includes the various communities built around free and open-source software, online platforms such as Facebook, Twitter/X, Instagram, 4chan and Reddit and their respective sub-sites, and politically motivated groups like Anonymous, WikiLeaks, or the Occupy movement. A number of academic anthropologists have conducted traditional ethnographies of virtual worlds, such as Bonnie Nardi's study of World of Warcraft or Tom Boellstorff's study of Second Life. Academic Gabriella Coleman has done ethnographic work on the Debian software community and the Anonymous hacktivist network. Theorist Nancy Mauro-Flude conducts ethnographic field work on computing arts and computer subcultures such as systerserver.net a part of the communities of feminist web servers and the Feminist Internet network. Eitan Y. Wilf examines the intersection of artists' creativity and digital technology and artificial intelligence. Yongming Zhou studied how in China the internet is used to participate in politics. Eve M. Zucker and colleagues study the shift to digital memorialization of mass atrocities and the emergent role of artificial intelligence in these processes. Victoria Bernal conducted ethnographic research on the themes of nationalism and citizenship among Eritreans participating in online political engagement with their homeland. Anthropological research can help designers adapt and improve technology. Australian anthropologist Genevieve Bell did extensive user experience research at Intel that informed the company's approach to its technology, users, and market. == Methodology == === Digital fieldwork === Many digital anthropologists who study online communities use traditional methods of anthropological research. They participate in online communities in order to learn about their customs and worldviews, and back their observations with private interviews, historical research, and quantitative data. Their product is an ethnography, a qualitative description of their experience and analyses. Other anthropologists and social scientists have conducted research that emphasizes data gathered by websites and servers. However, academics often have trouble accessing user data on the same scale as social media corporations like Facebook and data mining companies like Acxiom. In terms of method, there is a disagreement in whether it is possible to conduct research exclusively online or if research will only be complete when the subjects are studied holistically, both online and offline. Tom Boellstorff, who conducted a three-year research as an avatar in the virtual world Second Life, defends the first approach, stating that it is not just possible, but necessary to engage with subjects “in their own terms”. Others, such as Daniel Miller, have argued that an ethnographic research should not exclude learning about the subject's life outside the internet. === Digital technology as a tool of anthropology === The American Anthropological Association offers an online guide for students using digital technology to store and share data. Data can be uploaded to digital databases to be stored, shared, and interpreted. Text and numerical analysis software can help produce metadata, while a codebook may help organize data. == Ethics == Online fieldwork offers new ethical challenges. According to the American Anthropological Association's ethics guidelines, anthropologists researching a community must make sure that all members of that community know they are being studied and have access to data the anthropologist produces. However, many online communities' interactions are publicly available for anyone to read, and may be preserved online for years. Digital anthropologists debate the extent to which lurking in online communities and sifting through public archives is ethical. The Association also asserts that anthropologists' ability to collect and store data at all is "a privilege", and researchers have an ethical duty to store digital data responsibly. This means protecting the identity of participants, sharing data with other anthropologists, and making backup copies of all data. == Prominent figures == Genevieve Bell is an Australian cultural anthropologist credited for pioneering the User Experience field. During her time working for Intel Corporation, Bell studied how various cultures from around the world interacted with and experienced technology. Researching and improving user experience allows companies and designers to gather data regarding how users utilize their digital products and what requires improvement or expansion. Tom Boellstorff is an anthropologist known for Coming of Age in Second Life: An Anthropologist Explores the Virtually Human where he conducted research on how engaging in virtual worlds affects the player’s sense of self. Gabriella Coleman is an American anthropologist concerned with the politics, ethics, and culture of hacking and online activism. Coleman’s most notable ethnography features the hacktivist collective Anonymous, where she argues that various genres of hacking exist according to the social conditions at play. Coleman is dedicated to making her ethnography accessible to a diverse audience, including academics and non-academics. Diana E. Forsythe was an American anthropologist of science and technology and the author of the essays featured in Studying Those Who Study Us: An Anthropologist in the World of Artificial Intelligence. She asked relevant questions such as how should humans interact with computers and how gender roles are maintained in technology-oriented occupations. Heather Horst is a sociocultural anthropologist interested in the relationship between digital social relations and material culture. Nancy Mauro-Flude is a design anthropologist whose work explores the tacit relations between embodied cognition, computational materiality, maker culture, self-hosted webserver cooperatives, creative practice, and artistic research in digital infrastructure and Internet publishing. Mizuko Ito is a Japanese cultural anthropologist specializing in technology use and the intersection between computers and the social sciences. Her primary interest is in how young people utilize media technology and how it can be used to engage students in education. Daniel Miller is an anthropologist with a concentration in digital anthropology. His research includes the smartphone and perpetual opportunism, the intent and consequences of posting on social media in various geographical locations, and how hospice patients use media to socialize in the last stage of their lives. Mike Wesch is a cultural anthropologist interested in how people share their lives, cultures, and beliefs through digital media.

Security of the Java software platform

The Java software platform provides a number of features designed for improving the security of Java applications. This includes enforcing runtime constraints through the use of the Java Virtual Machine (JVM), a security manager that sandboxes untrusted code from the rest of the operating system, and a suite of security APIs that Java developers can utilise. Despite this, criticism has been directed at the programming language, and Oracle, due to an increase in malicious programs that revealed security vulnerabilities in the JVM, which were subsequently not properly addressed by Oracle in a timely manner. == Security features == === The JVM === The binary form of programs running on the Java platform is not native machine code but an intermediate bytecode. The JVM performs verification on this bytecode before running it to prevent the program from performing unsafe operations such as branching to incorrect locations, which may contain data rather than instructions. It also allows the JVM to enforce runtime constraints such as array bounds checking. This means that Java programs are significantly less likely to suffer from memory safety flaws such as buffer overflow than programs written in languages such as C which do not provide such memory safety guarantees. The platform does not allow programs to perform certain potentially unsafe operations such as pointer arithmetic or unchecked type casts. It manages memory allocation and initialization and provides automatic garbage collection which in many cases (but not all) relieves the developer from manual memory management. This contributes to type safety and memory safety. === Security manager === The platform provides a security manager which allows users to run untrusted bytecode in a "sandboxed" environment designed to protect them from malicious or poorly written software by preventing the untrusted code from accessing certain platform features and APIs. For example, untrusted code might be prevented from reading or writing files on the local filesystem, running arbitrary commands with the current user's privileges, accessing communication networks, accessing the internal private state of objects using reflection, or causing the JVM to exit. The security manager also allows Java programs to be cryptographically signed; users can choose to allow code with a valid digital signature from a trusted entity to run with full privileges in circumstances where it would otherwise be untrusted. Users can also set fine-grained access control policies for programs from different sources. For example, a user may decide that only system classes should be fully trusted, that code from certain trusted entities may be allowed to read certain specific files, and that all other code should be fully sandboxed. === Security APIs === The Java Class Library provides a number of APIs related to security, such as standard cryptographic algorithms, authentication, and secure communication protocols. === The sun.misc.Unsafe class === sun.misc.Unsafe is an internal utility class in the Java programming language which is a collection of low-level unsafe operations. While it is not a part of the official Java Class Library, it is called internally by the Java libraries. It resides in an unofficial Java module named jdk.unsupported. Beginning in Java 11, it has been partially migrated to jdk.internal.misc.Unsafe (which resides in module java.base). Its primary feature is to allow direct memory management (similar to C memory management) and memory address manipulation, manipulating objects and fields, thread manipulation, and concurrency primitives. Its declaration is: public final class Unsafe;, and it is a singleton class with a private constructor. It contains the following methods, many of which are declared native (invoking Java Native Interface): static Unsafe getUnsafe(): retrieves the Unsafe instance. It uses sun.reflect.Reflection to do so. int getInt(Object o, long offset): fetches a value (a field or array element) in the object at the given offset. (There are corresponding getBoolean(), getByte(), getShort(), getChar(), getLong(), getFloat(), and getDouble() methods as well.) void putInt(Object o, long offset, int x): stores a value into an object at the given offset. (There are corresponding putBoolean(), putByte(), putShort(), putChar(), putLong(), putFloat(), and putDouble() methods as well.) Object getObject(Object o, long offset): fetches a reference value from an object at the given offset. void putObject(Object o, long offset, Object x): stores a reference value into an object at the given offset. int getInt(long address): fetches a value at the given address. (There are corresponding getBoolean(), getByte(), getShort(), getChar(), getLong(), getFloat(), and getDouble() methods as well.) void putInt(long address, int x): stores a value into the given address. (There are corresponding putBoolean(), putByte(), putShort(), putChar(), putLong(), putFloat(), and putDouble() methods as well.) long getAddress(long address): fetches a native pointer from a given address. void putAddress(long address, long x): stores a native pointer into a given address. long allocateMemory(long bytes): allocates a block of native memory of the given size (similar to malloc()). long reallocateMemory(long address, long bytes): resizes a block of native memory to the given size (similar to realloc()). void setMemory(Object o, long offset, long bytes, byte value), void setMemory(long address, long bytes, byte value): sets all bytes in a block of memory to a fixed value (similar to memset()). void copyMemory(Object srcBase, long srcOffset, Object destBase, long destOffset, long bytes), void copyMemory(long srcAddress, long destAddress, long bytes): sets all bytes in a given block of memory to a copy of another block (similar to memcpy()). void freeMemory(long address): deallocates a block of native memory obtained from allocateMemory() or reallocateMemory(), similar to free()). long staticFieldOffset(Field f): obtains the location of a given field in the storage allocation of its class. long objectFieldOffset(Field f): obtains the location of a given static field in conjunction with staticFieldBase(). Object staticFieldBase(Field f): obtains the location of a given static field in conjunction with staticFieldOffset(). void ensureClassInitialized(Class c): ensures the given class has been initialized. int arrayBaseOffset(Class arrayClass): obtains the offset of the first element in the storage allocation of a given array class. int arrayIndexScale(Class arrayClass): obtains the scale factor for addressing elements in the storage allocation of a given array class. static int addressSize(): obtains the size (in bytes) of a native pointer. int pageSize(): obtains the size (in bytes) of a native memory page. Class defineClass(String name, byte[] b, int off, int len, ClassLoader loader, ProtectionDomain protectionDomain): signals to the JVM to define a class without security checks. Class defineAnonymousClass(Class hostClass, byte[] data, Object[] cpPatches): signals to the JVM to define a class but do not make it known to the class loader or system directory. Object allocateInstance(Class cls) throws InstantiationException: allocates an instance of a class without running its constructor. void monitorEnter(Object o): locks an object. void monitorExit(Object o): unlocks an object. boolean tryMonitorEnter(Object o): tries to lock an object, returning whether the lock succeeded. void throwException(Throwable ee): throws an exception without telling the verifier. final boolean compareAndSwapInt(Object o, long offset, int expected, int x): updates a variable to x if it is holding expected, returning whether the operation succeeded. (There are corresponding compareAndSwapLong() and compareAndSwapObject() methods as well.) int getIntVolatile(Object o, long offset): volatile version of getInt(). (There are corresponding getBooleanVolatile(), getByteVolatile(), getShortVolatile(), getCharVolatile(), getLongVolatile(), getFloatVolatile(), getDoubleVolatile(), and getObjectVolatile() methods as well.) void putIntVolatile(Object o, long offset, int x): volatile version of putInt(). (There are corresponding putBooleanVolatile(), putByteVolatile(), putShortVolatile(), putCharVolatile(), putLongVolatile(), putFloatVolatile(), putDoubleVolatile(), and putObjectVolatile() methods as well.) void putOrderedInt(Object o, long offset, int x): version of putIntVolatile() not guaranteeing immediate visibility of storage to other threads. (There are corresponding putOrderedLong() and putOrderedObject() methods as well.) void unpark(Object thread): unblocks a thread. void park(boolean isAbsolute, long time): blocks the current thread. int getLoadAverage(double[] loadavg, int nelems): gets the load average in the system run queue assigned to available processors averaged over various periods of time. void invokeCleaner(ByteBuffe

Artificial Intelligence for Digital Response

Artificial Intelligence for Digital Response (AIDR) is a free and open source platform to filter and classify social media messages related to emergencies, disasters, and humanitarian crises. It has been developed by the Qatar Computing Research Institute and awarded the Grand Prize for the 2015 Open Source Software World Challenge. Muhammad Imran stated that he and his team "have developed novel computational techniques and technologies, which can help gain insightful and actionable information from online sources to enable rapid decision-making" - according to him the system "combines human intelligence with machine learning techniques, to solve many real-world challenges during mass emergencies and health issues". == How to use == It can be used by logging in with ones Twitter credentials and by collecting tweets by specifying keywords or hashtags, like #ChileEarthquake, and possibly a geographical region as well. == Use == It has been deployed in conjunction with UNICEF in Zambia to classify short messages related to AIDS/HIV received through the U-Report platform. AIDR was used for the first time during the 2010 Pakistan floods. The first real test of AIDR took place during the 2014 Iquique earthquake in Chile. == Related talks and events == Muhammad Imran delivered a keynote talk on the science behind the AIDR system at the International Conference on Information Systems for Crisis Response And Management (ISCRAM). Abdelkader Lattab and Ji Lucas also presented the system at the 2016 QCRI-IBM Data Science Connect event.