text:
Miriam B. Murphy
History Blazer, January 1996
Beginning about 1880 the economy of Cache Valley began to evolve from its pioneer subsistence roots to a commercial economy with highly specialized private enterprises. A leading figure in this transition was Hyrum businessman Soren Hanson. Born in Hyrum on May 2, 1863, he had become the largest egg dealer in the Intermountain West by the turn of the century. In 1897, for example, he sold 120,000 dozen eggs. Cache Valley and southern Idaho consumed a quarter of this output, and the rest was taken by wagon to Corinne or Ogden for shipment throughout Utah and the surrounding states. That same year he also shipped a large amount of grain and 100 rail cars of cattle to markets outside of Utah.
Hanson was also active in local politics, serving as postmaster of Hyrum in the 1890s, as a city councilman from 1898 to 1902, and as mayor during 1906-8. The imposing 2 1/2-story Queen Anne home he built at 166 West Main in Hyrum during 1905-7 reflected not only his business and political success but also the economic power of the lowly egg.
According to his son's account, Hanson began his egg business in the late 1880s. By 1895 it had grown to the point that Hanson needed a modern storage plant to replace the crude cellar he had been using. While traveling in the East he visited several egg storage facilities and upon his return hired Hyrum Hokenson to build a two-story, 50 x 120 foot egg house. Here incoming eggs were processed, including candling to determine which eggs were suitable for storage. The two cold storage rooms could hold about 4,000 cases of eggs. Each room contained two huge ice tanks, 5 feet in diameter and 32 feet high. In the winter Hanson harvested ice from a large pond a mile north of his establishment and stored the sawed cakes of ice in an ice house next to the egg building. An unpleasant chore remembered by Hanson's son was leading a horse to operate the ice-house elevator past the "rotten egg hole" which often "stunk to high heaven" when the children forgot to cover the discarded eggs with a thick layer of dirt.
When Hanson began his business local farmers were still bartering with retail merchants, and eggs were often the medium of exchange. Farmers brought their eggs to merchants all over Cache Valley, and Hanson took them off of the merchants' hands. He paid cash--sometimes as little as 8 cents a dozen--and then resold them for many times that amount. The Hanson boys often took a team and wagon to towns like Paradise, Millville, and Wellsville to collect the eggs that storekeepers there had accumulated. In the early days Hanson hauled the eggs by wagon to the mining camps of Montana. Later the eggs were shipped by rail to places like Butte, Rock Springs, and Winnemucca. Hanson got the names of businesses in these towns from Dunn & Bradstreet's credit listings and then sent postcards to them with his current egg quotations.
Hanson's egg empire extended beyond the Cache Valley. He also bought and stored them in the Midwest. One year, his son recalled, Hanson stored several carloads of eggs at the Beatrice Creamery Company plant in Nebraska. Within three weeks he had resold them at a profit of some $20,000. With that bankroll he fulfilled a promise to his wife to build her a lovely home. The "house that eggs built" cost an estimated $30,000--a small fortune at that time and an appropriate reward for years of log-cabin living.
A late example of the Victorian Queen Anne style in Utah, the asymmetrical brick home has a stone foundation and wood trim. Gable bays project from a central mass, and a circular tower on the southeast corner--which culminates in a 20-foot peak--has three wrap-around windows. Twelve columns support a wrap-around front porch. One of the home's three chimneys is unusually ornate with a carving of a half-nude female figure. Leaded glass, carved oak, beveled mirrors, a 7-foot-wide hallway, and a delicate wrought-iron balustrade are some of the home's outstanding features. It is listed in the National Register of Historic Places.
Sources: "Egg Business" in Earle W. Allen, Bessie Brown, and Lila Eliason, Home in the Hills of Bridger Land: The History of Hyrum from 1860 to 1969 (Hyrum: City of Hyrum, 1969); National Register Nomination Form for the Soren Hanson House, Hyrum, by John McCormick and Diana Johnson in Preservation Office, Utah Division of State History, Salt Lake City.


Pular para o conteúdo principal
Versão: Next
.pnpmfile.cjs
pnpm lets you hook directly into the installation process via special functions (hooks). Hooks can be declared in a file called .pnpmfile.cjs.
By default, .pnpmfile.cjs should be located in the same directory as the lockfile. For instance, in a workspace with a shared lockfile, .pnpmfile.cjs should be in the root of the monorepo.
Hooks
TL;DR
Hook FunctionProcessUses
hooks.readPackage(pkg, context): pkgCalled after pnpm parses the dependency's package manifestAllows you to mutate a dependency's package.json
hooks.afterAllResolved(lockfile, context): lockfileCalled after the dependencies have been resolved.Allows you to mutate the lockfile.
hooks.readPackage(pkg, context): pkg | Promise<pkg>
Allows you to mutate a dependency's package.json after parsing and prior to resolution. These mutations are not saved to the filesystem, however, they will affect what gets resolved in the lockfile and therefore what gets installed.
Note that you will need to delete the pnpm-lock.yaml if you have already resolved the dependency you want to modify.
tip
If you need changes to package.json saved to the filesystem, you need to use the pnpm patch command and patch the package.json file. This might be useful if you want to remove the bin field of a dependency for instance.
Arguments
 - pkg - The manifest of the package. Either the response from the registry or the package.json content.
 - context - Context object for the step. Method #log(msg) allows you to use a debug log for the step.
Usage
Example .pnpmfile.cjs (changes the dependencies of a dependency):
function readPackage(pkg, context) {
// Override the manifest of foo@1.x after downloading it from the registry
if (pkg.name === 'foo' && pkg.version.startsWith('1.')) {
// Replace bar@x.x.x with bar@2.0.0
pkg.dependencies = {
...pkg.dependencies,
bar: '^2.0.0'
}
context.log('bar@1 => bar@2 in dependencies of foo')
}
// This will change any packages using baz@x.x.x to use baz@1.2.3
if (pkg.dependencies.baz) {
pkg.dependencies.baz = '1.2.3';
}
return pkg
}
module.exports = {
hooks: {
readPackage
}
}
Known limitations
Removing the scripts field from a dependency's manifest via readPackage will not prevent pnpm from building the dependency. When building a dependency, pnpm reads the package.json of the package from the package's archive, which is not affected by the hook. In order to ignore a package's build, use the pnpm.neverBuiltDependencies field.
hooks.afterAllResolved(lockfile, context): lockfile | Promise<lockfile>
Allows you to mutate the lockfile output before it is serialized.
Arguments
 - lockfile - The lockfile resolutions object that is serialized to pnpm-lock.yaml.
 - context - Context object for the step. Method #log(msg) allows you to use a debug log for the step.
Usage example
.pnpmfile.cjs
function afterAllResolved(lockfile, context) {
// ...
return lockfile
}
module.exports = {
hooks: {
afterAllResolved
}
}
Known Limitations
There are none - anything that can be done with the lockfile can be modified via this function, and you can even extend the lockfile's functionality.
ignore-pnpmfile
 - Padrão: low
 - Tipo: Boolean
.pnpmfile.cjs will be ignored. Useful together with --ignore-scripts when you want to make sure that no script gets executed during install.
pnpmfile
 - Default: .pnpmfile.cjs
 - Tipo: caminho
 - Example: .pnpm/.pnpmfile.cjs
The location of the local pnpmfile.
global-pnpmfile
 - Padrão: null
 - Tipo: caminho
 - Example: ~/.pnpm/global_pnpmfile.cjs
The location of a global pnpmfile. A global pnpmfile is used by all projects during installation.
note
It is recommended to use local pnpmfiles. Only use a global pnpmfile if you use pnpm on projects that don't use pnpm as the primary package manager.


text:
Latter Day Saints -- Utah -- Springville
Found in 9 Collections and/or Records:
Contains correspondence to and from the Boyer family. The correspondence includes letter from the Boyer children, other Boyer relatives, family friends, and organizations. The letters are written on the subject of family events and news, as well as other subjects. Dated 1925 to 1997.
Handwritten diary kept by Simon Eugene Dalton with entries on his life while living as a farmer and member of the Church of Jesus Christ of Latter-day Saints in Springville, Utah. Dated _PHONE_.
Contains the business and personal papers of the Boyer family. These include talks, notes from the various organizations that Edward and Vesta belonged to, and meeting minutes. There are also papers pertaining to the Utah Farm Bureau including newsletters and brochures. All of these are related to agricultural work or community involvement. Dated _PHONE_.
Edward Herbert and Vesta Josephine Frost Boyer correspondence to extended family and friends, _PHONE_
Contains letters to the Boyer family from their extended family and friends, including Dorothea Parent and her family, Leota Lewis, Geneva Gilbert, Peter Frost, Mary Boyer, John and Virginia Hume, and many other individuals. These documents convey information about the family and also deal with some issues of business. Dated _PHONE_.
Contains only correspondence of the immediate Boyer family. This includes letters from the children of Vesta and Edward Boyer and their children's families. There are also letters from Edward and Vesta to each other. These letters include missionary letters, letters from service in the army, letters documenting their children's experience in college, and mostly documenting family life. Dated _PHONE_.
Contains photographs, newspaper clippings, postcards, and a scrapbook. These materials document family members and their travels, as well as achievements. Some of them relate to the work and community of Edward and Vesta Boyer. Dated 1967.
Contains the diaries of Vesta Josephine Frost Boyer. These diaries document her daily activities, including her social engagements, family birthdays and events, and her other appointments. Dated 1925 to 1984.

source: m-a-p/FineFineWeb


text:
Reflexomat pressurisation stations regulate the pressure on the gas side of the vessel by means of compressor:
- When the set pressure is exceeded, the overflow valve opens and releases air from the expansion vessel. Due to the drop in pressure on the air side, water flows into the expansion vessel and pressure falls in the system.
- If pressure falls below the set pressure, the compressor switches on and pumps air into the air side of the expansion vessel, forcing water into the system: the water level falls in the vessel and pressure rises in the system.
Additional units for water make-up and degassing can be added to the Reflexomat. The possibility of the intelligent integration of a water make-up system is incorporated into the Reflex Control.

source: openbmb/Ultra-FineWeb


text:
Instead of turning Motion Detection on/off on your Camera devices one by one, you can now integrate Google Assistant with your Android Viewer devices to streamline your Alfred experience. Please note that this feature is currently only available in English.
- What are some requirements to use this integration?
- How do I set up Google Assistant on Alfred?
- How do I use Google Assistant with Alfred?
What are some requirements to use this integration?
- Your Viewer is an Android phone/tablet
- Your device language is English
How do I set up Google Assistant on Alfred?
- Go to the More tab
- Tap Settings > Google Assistant
- Tap the authorization code to copy it
- Launch Google Assistant
- Say "Talk to Alfred Camera"
- Tap on "Yes":
- Click on "START":
- Paste the authorization code (step 4) from the Alfred app:
- Tap on AUTHORIZE
Once you've completed the steps above, you should be able to use Google Assistant with AlfredCamera.
How do I use Google Assistant with Alfred?
You can use Google Assistant to turn on/off Motion Detection for all Camera devices at once.
You can either:
- Say "Talk to Alfred Camera," and
- Choose which action you'd like Google to do on Alfred:
- "Turn on Motion Detection"
- "Disable Motion Detection"
- "Arm Motion Detection"
- Tell Google Assistant what to do in a single sentence by saying:
- "Ask Alfred Camera to disarm Motion Detection", or
- "Ask Alfred Camera to enable Motion Detection."


text:
Ralph Nack, the First Deputy Reporter General of the International Association for the Protection of Intellectual Property (AIPPI), successfully concluded his highly anticipated visit to the Community Plant Variety Office (CPVO) today. This landmark event fostered collaboration, exchange of ideas, and explored opportunities in the field of plant variety protection.
During his visit, Mr. Nack engaged in a series of meetings and discussions with key representatives of CPVO, including its President and senior officials. The agenda included an exploration of shared challenges, strategies to enhance plant variety protection mechanisms, and potential avenues for cooperation.
This first meeting between the two organizations proved to be useful not only in exploring possible modes of collaboration but also in assessing the broader situation of PVR (Plant Variety Rights). Leveraging the CPVO's deep industry knowledge, the most pressing and sensitive issues were addressed to enlighten the representative of AIPPI.
Another significant moment was reached through the organization of a virtual meeting with leading breeders' organizations. Their privileged perspective on current issues formed the foundation upon which potential collaborative activities can build.
As a tangible outcome, the head of the Legal Unit will participate in the upcoming 2023 AIPPI World Congress in Turkey to further strengthen the ties between the two entities.


Skip To Main Content
useLogin
useLogin is a React hook that facilitates login to your headless WordPress site without having to leave your Faust app.
API
The useLogin exports, defined as a TypeScript type:
type UseLogin = {
 loading: boolean;
 login: (
 usernameEmail: string,
 password: string,
 redirectUrl?: string,
 ) => void;
 data:
 | {
 generateAuthorizationCode: {
 code?: string;
 error?: string;
 };
 }
 | undefined;
 error: ApolloError | undefined;
};Code language: JavaScript (javascript)
Loading: A boolean flag that indicates whether the request for login is still in flight.
Login: The login request callback. It's function that you need to call with the following parameters: usernameEmail is the user email. password is the user password and redirectUrl is the redirect path when the login request is successful.
Data: the login response data. It's an object with the following attributes: generateAuthorizationCode is an object that contains either the code or an error message of the login attempt. You need to check these fields to see if the login request was valid or not (see Usage example for more context).
Error: if the login request has failed, it will return an instance of ApolloError.
Usage
Below is a full example of login to your WordPress site without leaving your Faust app. Upon a successful login, you will be redirected to /dashboard:
import { useLogin } from '@faustwp/core';
import { useState } from 'react';
export default function Login() {
 const [usernameEmail, setUsernameEmail] = useState('');
 const [password, setPassword] = useState('');
 const { login, loading, data, error } = useLogin();
 return (
 <form
 onSubmit={(e) => {
 e.preventDefault();
 login(usernameEmail, password, '/dashboard');
 }}>
 <fieldset>
 Username or Email
 <input
 id="usernameEmail"
 type="text"
 disabled={loading === true}
 value={usernameEmail}
 onChange={(e) => setUsernameEmail(e.target.value)}
 />
 </fieldset>
 <fieldset>
 Password
 <input
 id="password"
 type="password"
 disabled={loading === true}
 value={password}
 onChange={(e) => setPassword(e.target.value)}
 />
 </fieldset>
 {data?.generateAuthorizationCode.error && (

 )}
 <fieldset>
 <button type="submit">Login</button>
 </fieldset>
 </form>
 );
}
Code language: JavaScript (javascript)
It create some state values to keep track of the user email and password fields. It then uses the useLogin hook and extracts the return values. Based on the return values, it will either disable some fields when loading=true or return an error message when data.generateAuthorizationCode.error is not empty.


text:
Effect of replica placement on the reliability of large scale data storage systems
Replication is a widely used method to protect largescale data storage systems from data loss when storage nodes fail. It is well known that the placement of replicas of the different data blocks across the nodes affects the time to rebuild. Several systems described in the literature are designed based on the premise that minimizing the rebuild times maximizes the system reliability. Our results however indicate that the reliability is essentially unaffected by the replica placement scheme. We show that, for a replication factor of two, all possible placement schemes have mean times to data loss (MTTDLs) within a factor of two for practical values of the failure rate, storage capacity, and rebuild bandwidth of a storage node. The theoretical results are confirmed by means of event-driven simulation. For higher replication factors, an analytical derivation of MTTDL becomes intractable for a general placement scheme. We therefore use one of the alternate measures of reliability that have been proposed in the literature, namely, the probability of data loss during rebuild in the critical mode of the system. Whereas for a replication factor of two this measure can be directly translated into MTTDL, it is only speculative of the MTTDL behavior for higher replication factors. This measure of reliability is shown to lie within a factor of two for all possible placement schemes and any replication factor. We also show that for any replication factor, the clustered placement scheme has the lowest probability of data loss during rebuild in critical mode among all possible placement schemes, whereas the declustered placement scheme has the highest probability. Simulation results reveal however that these properties do not hold for the corresponding MTTDLs for a replication factor greater than two. This indicates that some alternate measures of reliability may not be appropriate for comparing the MTTDL of different placement schemes.
Record created on 2012-01-26, modified on 2016-08-09


HSBC Swaps Paper Records for Blockchain to Track $20 Billion Worth of Assets
According to Reuters reports, HSBC aims to move $20 Billion worth of assets from paper to a Blockchain Custody platform by March 2020. The platform may eventually move up to $50 billion in value of assets. The new platform is known as Digital Vault. Previously, HSBC had processed a Yuan-based Letter of Credit using the Voltron platform, a R3's Corda blockchain platform solution. Voltron is the open industry platform to create, exchange, approve, and issue Letters of Credit on Corda. Letters of Credit are said to be involved in between 11 to 15% of all global export transactions, racking up over $1 trillion each year.
A Letters of Credit (LC), also known as a draft, a documentary credit, or bankers' commercial credit, is a letter from a bank guaranteeing that a buyer's payment to a seller will be received with a specified sum in a specified currency and provided the seller meets precisely-defined terms within a fixed time frame.
When the buyer is unable to make the payment, the bank will cover the full or remaining amount of the purchase. An LC is one of the most common payment methods available in international trade, as in such contexts where banking channels are used for payment between parties who may not trust each other. An issuing bank sends an issued LC to a confirming bank that will undertake to pay the exporter according to the terms of the LC. The following diagram shows a simplified example of an LC process, although a real transaction could be much more complicated:
The LC process is inefficient and typically time-consuming, as it depends on complex financial and administrative operations involving multiple actors. Blockchain technology can help to simplify the process by sharing financial data and documentation through a secure network that requires no third-party verification. Based on the report, the global finance company BBVA was able to reduce the time required to send, verify, and authorize an international trade transaction. The process, that usually takes from around 7 to 10 days, can be reduced to just 2.5 hours by using the blockchain.


text:
In this paper, high voltage (HV) tolerant levelshifters with combinational functionality are proposed based on Differential Cascode Voltage Switch Logic (DCVSL). These levelshifters are tolerant to supply voltages higher than the process limit for individual CMOS transistors. The proposed HV DCVSL level shifters are particularly useful when it is mandatory to ensure a specific behavior during out of the normal mode periods (power up; power down; reset; etc.). These high voltage tolerant logic circuits were us…
scite is a Brooklyn-based startup that helps researchers better discover and evaluate scientific articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by researchers from dozens of countries and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.


text:
The question simply doesn't make sense. Any periodic function has both period and frequency- given one, you can calculate the other.
Neither "represents" an orbit.
If you do have something, such as a planet, orbiting, then you must have both a period (the number of days, seconds, etc. required to complete one full orbit) and a frequency (the number of orbits per day, second, etc.) and one is just the reciprocal of the other. If you are thinking of one as "representing" the orbit, the other could as well.
To answer the question you DIDN'T ask but probably intended, it is more common to give the period of an orbit of a planet about the sun rather than the frequency just because it is a simpler number in the most common units.
1/T = Frequency
1/f = Period.
where T = period.
Knowing either one will get you the answer for the other.


4.22. Array Select
4.22.1. Unique
import numpy as np
a = np.array([[1, 2, 3, 1],
 [1, 4, 5, 6]])
np.unique(a)
# array([1, 2, 3, 4, 5, 6])
np.unique(a, axis=0)
# array([[1, 2, 3, 1],
# [1, 4, 5, 6]])
np.unique(a, axis=1)
# array([[1, 1, 2, 3],
# [1, 6, 4, 5]])
4.22.2. Diagonal
import numpy as np
a = np.array([[1, 2],
 [3, 4]])
a.diagonal()
# array([1, 4])
import numpy as np
a = np.array([[1, 2, 3],
 [4, 5, 6]])
a.diagonal()
# array([1, 5])
import numpy as np
a = np.array([[1, 2, 3],
 [4, 5, 6],
 [7, 8, 9]])
a.diagonal()
# array([1, 5, 9])
4.22.3. Nonzero
 - Each element of the tuple contains one of the indices for each nonzero value.
 - Therefore, the length of each tuple element is the number of nonzeros in the array.
 - The first element of the tuple is the first index for each of the nonzero values: ([0, 0, 1, 1]).
 - The second element of the tuple is the second index for each of the nonzero values: ([0, 2, 0, 2]).
 - Pairs are zipped (first and second tuple):
 - 0, 0
 - 0, 2
 - 1, 0
 - 1, 2
import numpy as np
a = np.array([[1, 0, 2],
 [3, 0, 4]])
a.nonzero()
# (array([0, 0, 1, 1]),
# array([0, 2, 0, 2]))
a[a.nonzero()]
# array([1, 2, 3, 4])
4.22.4. Where
4.22.4.1. Single argument
 - where(boolarray)
 - indexes of elements
import numpy as np
a = np.array([1, 2, 3])
np.where(a != 2)
# (array([0, 2]),)
np.where(a > 1)
# (array([1, 2]),)
np.where(a % 2 != 0)
# (array([0, 2]),)
import numpy as np
a = np.array([[1, 2, 3],
 [4, 5, 6]])
np.where(a != 3)
# (array([0, 0, 1, 1, 1]),
# array([0, 1, 0, 1, 2]))
np.where(a % 2 != 0)
# (array([0, 0, 1]),
# array([0, 2, 1]))
4.22.4.2. Multiple argument
 - where(boolarray, truearray, falsearray):
import numpy as np
a = np.array([[1, 2, 3],
 [4, 5, 6]])
np.where(a % 2, 'odd', 'even')
# array([['odd', 'even', 'odd'],
# ['even', 'odd', 'even']], dtype='<U4')
import numpy as np
a = np.array([[1, 2, 3],
 [4, 5, 6]])
np.where(a > 4, 99, 77)
# array([[77, 77, 77],
# [77, 99, 99]])
import numpy as np
a = np.array([[1., 2., 3.],
 [4., 5., 6.]])
np.where(a != 3, a, np.nan) # if ''a != 3'' return element, otherwise ''np.nan''
# array([[ 1., 2., nan],
# [ 4., 5., 6.]])
import numpy as np
a = np.array([[1, 2, 3],
 [4, 5, 6]])
b = np.logical_and(a > 0, a % 3 == 0)
# array([[False, False, True],
# [False, False, True]])
a[b]
# array([3, 6])
4.22.5. Advanced indexing
 - two types of indexes: int, bool
 - Also known as Fancy indexing
import numpy as np
a = np.array([[1, 2, 3],
 [4, 5, 6]])
a > 2
# array([[False, False, True],
# [ True, True, True]])
a[a > 2]
# array([3, 4, 5, 6])
import numpy as np
a = np.array([[1, 2, 3],
 [4, 5, 6]])
a[a % 2 == 0]
# array([2, 4, 6])
even = (a % 2 == 0)
a[even]
# array([2, 4, 6])
import numpy as np
a = np.array([[1, 2, 3],
 [4, 5, 6]])
a[ (a>2) & (a<=5) & (a%2==1) ]
# array([3, 5])
query1 = (a > 2)
query2 = (a <= 5)
query3 = (a % 2 == 1)
a[query1 & query2 & query3]
# array([3, 5])
large = (a > 2)
small = (a <= 5)
odd = (a % 2 == 1)
a[large & small & odd]
# array([3, 5])
import numpy as np
a = np.array([1, 2, 3])
at_index = np.array([0, 1, 0])
a[at_index]
# array([1, 2, 1])
at_index = np.array([0, 2])
a[at_index]
# array([1, 3])
import numpy as np
a = np.array([[1, 2, 3],
 [4, 5, 6],
 [7, 8, 9]])
a[[0,2]]
# array([[1, 2, 3],
# [7, 8, 9]])
a[[0,2], [1,2]]
# array([2, 9])
a[:2, [1,2]]
# array([[2, 3],
# [5, 6]])
Listing 4.84. rows,cols creates coordinate system for selecting values (like zip()). For example: (0,0); (0,1); (1,0); (1,1); (0,1), as in this example.
import numpy as np
a = np.array([[1, 4], [9, 16]], float)
rows = np.array([0, 0, 1, 1, 0], int)
cols = np.array([0, 1, 0, 1, 1], int)
a[rows]
# array([[ 1., 4.],
# [ 1., 4.],
# [ 9., 16.],
# [ 9., 16.],
# [ 1., 4.]])
a[rows,cols]
# array([ 1., 4., 9., 16., 4.])
import numpy as np
date = np.array([
 '1970-01-01',
 '1970-01-02',
 '1970-01-03'])
a = np.array([[1, 2, 3],
 [4, 5, 6],
 [7, 8, 9]])
# Intuitive understanding:
# '1970-01-01' -> [1, 2, 3]
# '1970-01-02' -> [4, 5, 6]
# '1970-01-03' -> [7, 8, 9]
date == '1970-01-02'
# array([False, True, False])
a[date == '1970-01-02


text:
TLDR: Your bicycle rims are primarily responsible for triggering loop sensors. Learn where you should place your bike. If the loop sensor still doesn't work you should contact your city.
Today I learned how inductive loop sensors at traffic lights work.
The motivation was a traffic light on my route to work that never detects me. Until now I have been carefully positioning my bike into the middle of the loop. I had been assuming that it was based upon the movement of a small piece of steel somewhere on my aluminum bike inducing current in the loop. This concept fits with the fact that cars (large with lots of steel) reliably trigger loop sensors while bikes (small and usually not much steel) often do not. The solution then would be to stick a magnet on your bike. Problem solved right?
This is not how inductive loop sensors work, thanks to this fantastic writeup. They are resonant systems. The loop forms an inductor in an LC circuit that is driven on resonance (at 20-30 kHz usually). Any change in the inductance shifts the resonant frequency. What's great about this is that your car/bike is part of an oscillator. A car triggers the loop by being large and conductive, not large and magnetic. Your vehicle behaves like a shortened turn in the roadway inductor, increasing the resonant frequency of the oscillator.
Similarly, a bicycle triggers the loop sensor by decreasing the inductance seen by the circuit. The best way to do this is by bringing a large ring of metal to the region with the largest magnetic field. Your tire rims, unless you spent a small fortune on carbon fiber ones, provide the loops. But where should you position your bike? It depends on the way the loop is configured. If it's a simple square then you should position it directly over one of the long edges, not in the middle of the loop. If you can see two side-by-side squares in the pavement then you should position yourself over the center line where there are two wires carrying current in the same direction. If there are diagonal cuts in the pavement, just make sure that one of your wheels is over one of the diagonal lines. If the first link is too daunting, read this link (or either of these) for short and sweet diagrams.
It is impressive how many people think that run of the mill permanent magnets can trigger inductive loop sensors (myself included this morning). Loop sensors are normally designed to detect an increase in resonant frequency (i.e. inductance decrease). However, some fraction of loop sensors are configured to also respond to an increase in inductance and you can buy magnets on the internet that purportedly trigger loop sensors. So could you just strap a chunk of iron onto your bike frame? Probably not. If you look at the patent application filed by the Green Light Trigger company you'll see that the magnet needs to be ceramic, i.e. high electrical resistivity. As the excitation frequency increases the apparent inductance of a magnet decreases due to eddy currents which short it out. By increasing the resistivity of the magnet you increase the corner frequency up to which it looks like an inductor to the circuit. Some people on the internet claim that magnets don't work because only inductance decreases are registered. Others, who are trying to sell you stuff, claim that inductance increases are also detected and their magnets work. Either way, someone on the internet is wrong.
The frequency change required to trigger the loop sensor depends on a threshold that is programmed into the system. There is a tradeoff in setting the threshold - too low and cars in adjacent lanes might trigger a left turn light. Too high and bicycles and motorcycles will not be detected. This means that if the loop sensor is relatively small (< 10 feet long) then it's just a matter of adjusting the sensitivity. If you have positioned your bike properly and it still doesn't trigger then you should let your city know so that they can reprogram it. I haven't had a chance to ride through my problem intersection yet, but hopefully the power of physics will help me next time and if not, the magic of complaint forms on the internet will.


text:
Military engineer Henry Martyn Robert authored the best known and most widely used book on parliamentary law - Robert's Rules of Order.
Robert served as an engineer in the army from 1867 to 1871. He worked on the defense of Washington, Philadelphia, and the New England Coast during the Civil War and was president of the Board of Engineers from 1895 to 1901. After having difficulty leading a meeting at church one day he declared that he would learn about parliamentary procedure before going back. That resulted in the Pocket Manual of Rules of Order for Deliberative Assemblies loosely based on the procedures used in the US House of Representatives.
Read Robert's Rules of Order.

source: HuggingFaceFW/fineweb-edu


An insightful critique of "Red Letter Christianity"
Karen Swallow Prior has an insightful article about "red-letter Christianity"—a movement that gives hermeneutical priority to Jesus' words (the so-called "red letters") over the rest of the words of scripture. Her bottom line says it all:
All of the words of Jesus come through the narrators of the Bible. If the black letters of the narrators are reliable, so too are the red letters of Christ. If the narrators are unreliable, however, then the words of Christ they convey are untrustworthy as well. The only way to the red letters is through the black letters.
It's a really helpful article dealing with the question from a literary perspective. Read the rest here.
 - Don Johnson
 The idea that the so-called Red Letters of what Jesus said and what he did not say (really what is not recorded) somehow form a canon within the canon is false from the premise. One reason is one cannot really tell in all cases where what Jesus says ends, there were no quote marks so it is a matter of interpretation in some cases where a quote ends. So the "Jesus canon" Is not even well defined.
 The other point about what (supposedly) Jesus did NOT say (really what is not included in what he said) is that Jesus was Jewish and furthermore was declared to be without sin. This means quite a few things about what is not recorded him as saying, because it implies he believed the Tanakh and correctly interpreted it and lived it. This means he did not need to say a lot of things, it was just implied. It also means that some text in the NT about Jesus cannot contradict the Tanakh is another point, but I will just mention that here.
Comment here. Please use FIRST and LAST name.


Lay vs. Lie (vs. Laid)
lay lieQ: In the battle of lay vs. lie, when do you use each and can you provide examples? —Annemarie V.
Don't forget about "lain," my friend! All these verbs have two things in common: They begin with the letter "L" and confuse the bejeezus out of many people. But here's a simple breakdown that will hopefully help you decipher when to use each one and when to use their past-tense equivalents (I've also included a handy chart at the end to help, but we'll get to that later).
The difference between Lay vs. Lie vs. Laid (Plus a handy chart). [Click here to Tweet and share this grammar tip with others!]
Lay and lie are both present-tense verbs, but they don't mean quite the same thing. Lay means to put or set something down, so if the subject is acting on an object, it's "lay." For example, I lay down the book. You, the subject, set down the book, the object.
Lie, on the other hand, is defined as, "to be, to stay or to assume rest in a horizontal position," so the subject is the one doing the lying—I lie down to sleep or When I pick up a copy of my favorite magazine, Writer's Digest, I lie down to take in all its great information—and not acting on an object. In both these cases, you, the subject, are setting yourself down. Are you with me so far?
I Lie Down vs. Now I Lay Me Down (to Sleep)
To clarify things further, I'll answer this question that you're probably wondering: How can you be lying down in your examples while the classic nighttime prayer for kids clearly begins "Now I lay me down to sleep"? You must be out of your mind! It's true, I'm totally out of my mind, but both the examples I used and the kids' prayer are correct—and here's why.
In I lie down to sleep, there is no object to the sentence, just subject (I). In Now I lay me down to sleep, there is a subject (I) and an object (me). Even though the subject and object are one and the same, the object is still present in the sentence, so you must use lay.
[How Long Should Novel Chapters Be? Click here to find out.]
Laid vs. Lay vs. Lain
In the past tense, "lay" becomes "laid" (Last week I laid down the law and told her it was inappropriate for her to pick her nose) and "lie" becomes "lay" (Yesterday she lay down for a nap that afternoon and picked her nose anyway). Yes, "lay" is also the past tense of "lie." And the confusion doesn't end there.
To throw you for another loop, "laid" is also the past participle form of "lay." So, when helping verbs are involved, "lay" becomes "laid" and "lie" becomes "lain." Grandma had laid the chicken in the oven earlier this morning. The chicken had lain there all day until it was cooked all the way through and ready for us to eat.
Remember: Lay and laid both mean to set something down, while lie, lay and lain all mean the subject is setting itself down.
And now, I lay this question to rest. (Enjoy this totally awesome chart below to help you keep track of when to use lay, lie, laid, lain and more.)
Lay vs. Lie Chart
Infinitive Definition Present Past Past Participle Present Participle
to lay to put or place lay(s) laid laid laying
something down
Come Join Me (& Other Writer's Digest Staffers)!
As the online editor of Writer's Digest (and a published author) I speak at writing events all the time to help others get published. Here's a list of upcoming events where either I or another Writer's Digest staffer will offer instruction to help you achieve your writing goals. Come join me!
Want other Grammar Rules? Check out:X3961_GrammarDesk.jpg
Sneaked vs. Snuck
Who vs. Whom
Which vs. That
Since vs. Because
Ensure vs. Insure
Home in vs. Hone in
Leaped vs. Leapt
Follow Brian on Twitter: _USER_
Sign up for Brian's free Writer's Digest eNewsletter: WD Newsletter
You might also like:
25 thoughts on "Lay vs. Lie (vs. Laid)
 1. AnnewithanE
 Really, this is so much more complicated than it needs to be. Lie, lay, lain refers to humans. Think about the fact that humans lie (that is, deceive each other), and you'll remember this. I am going to lie down; I want to lie in the sun; etc. If you can remember the present tense, you can work with the other two tenses.
 Lay, laid, lain refers to un-human objects. I lay the book on the table; I laid it there yesterday; I had lain it there before, but my sister took it.
 Just remember whether you're a person or not. Then you'll be fine.
 2. tommywrites
 I'm very glad to see this, because so many people (including news anchors and Ph.Ds) are blowing it these days. Actually, there are three verbs to deal with.
 to lie on a bed: I lie there now; I lay there yesterday; I have lain there often; I was lying there
 to lie by not telling the truth: I lie now; I lied yesterday; I have lied often; I was lying yesterday
 to lay something down: Now I lay the gun down; yesterday I laid the gun down; I have laid it down often; I was laying it down
 What brought me to your website is that Outlook corrected me when I wrote that I was lying (not telling the truth) and said I should be saying that I was laying, not even giving me "lying" as a choice.
 1. Marcia Krueger
 This won't help with every form in the lie/lay challenge, but a good mnemonic is: I CAN DO IT BY MYSELF. "Lie, sit, and rise, (which have an I in them) can do it by themselves. That is, they do not need an object to follow. In contrast, "Lay, set, and raise" (yes, I know raise has an I, but only after the A) must have help. That is, an object, such as in Lay the BOOK down, Set the TABLE, Raise the WINDOW.
 3. annaschauer
 When I was an English teacher and every Wednesday featured "the Blunder of the Week," this was probably the first thing I dealt with.
 P.S.Not to be obsessive, but isn't the correct grammar "Now I lay myself down to sleep"? 😉
 1. DianePM
 As a retired high school English teacher and university professor, I also found the use of lie/lay and reflexive pronouns as problematic for everyone at all levels. Good question on using "myself" following verb "lay". Since the action verb "lay" requires a direct object, the pronoun "me" is used because it is the objective case. "Myself" is the reflexive case. This is what makes the study of grammatical usage fun; the solution to one problem leads to another.
 1. analbumcover
 I think annaschauer is correct on this one. "Myself" is indeed a reflexive pronoun, and a reflexive pronoun is always the object of a sentence. When it is not used as an appositive, it is used when the doer of the action and the receiver of the action are the same person. E.g., I see myself in the mirror, or, I hit myself. It is not correct to say "I hit me". It is also incorrect to say "I lay me" since you are laying yourself. If it were physically possible to do (maybe if I am a paraplegic lowering myself into bed with ropes pulleys), it would be correct to say, "now I lay myself", because I'm doing it to myself.
 The only way "now I lay me" would be grammatically correct is if the poet is referring to "I" to poetically mean the poet's spirit, God (as in I AM), or the entity that exists separately from the poet's physical body is acting to put the poet to sleep. I.e. now my spirit lays me down to sleep. It is likely a simple matter of the poet preferring the way it sounds in the poem and taking artistic liberty with grammar.
 4. atwhatcost
 It took me three hours of reading tons and tons of articles on this problem to finally get it through. Despite that, I still have to read again when I land on it again when I'm writing. Worse yet, I have a major problem with the whole concept for my novel, because what people consider objects to be placed on a surface (stuffed animals) are the characters in the story. I do understand, when they recline, they lie. When they are placed on a table, they lay. That's not the problem.
 Have you ever had your favorite stuffed animal lie down on its own?


text:
School and Living Costs
Academic Related Expenses:
- $125 Application fee (English for Academic Purposes and/or post-secondary programs)
Tuition and Fees
For Postsecondary program fees:
For information pertaining to Fees and High Demand Programs:
For more information on how to pay your fees please visit:
The College reserves the right to change, amend or alter fees as necessary without notice or prejudice.
- $1,000 - $1,500 per year (2 semesters)
- Supplies: certain programs require extra supplies such as uniforms, equipment, tools, and software, etc.
Room and Board Related Expenses:
- On-campus residence: $5,000 per year (8 months) including cable TV and high-speed internet access. Meals are not included
- Off-campus housing: $400 - $800/month
Local bus pass:
- $60 per month
General Cost Information:
Most students budget approximately $20,000 to $24,000 annually to study and live in Windsor, Canada.
Protected Persons (Convention Refugees)
A person and his/her dependents*, who has been determined to be a protected person, including a Convention refugee or a person in need of protection, within the meaning of subsection 95(2) of the Immigration and Refugee Protection Act by the Immigration and Refugee Board (IRB) or the Minister of Citizenship and Immigration Canada will be classified as a Domestic student, including assessed domestic student tuition fees.
Notice of Decision issued by Immigration and Refugee Board.
Note: Refugee Status claimants will be considered an international student and pay international tuition rates. Should the claimant receive a Notice of Decision while studying at St. Clair College from the IRB, that current semester and/or future semesters will be assessed at a domestic student tuition rate.
*Dependents are defined as:
- A spouse.
- A common-law partner.
- A dependent child or the dependent child of a spouse or common-law partner.
- A dependent child of the dependent child referred to above.
A dependent child is a child who is a biological child who has not been adopted by a person other than the spouse or common-law partner, or an adopted child; and who is in one of the following situations of dependency:
- Under age 22 and not a spouse or common-law partner;
- Enrolled continuously at a college, university or other educational institution and dependent substantially on the financial support of the parent since before age 22 or since becoming a spouse. or common-law partner if that occurred before age 22; or
- A person with a disability who has been financially supported substantially by his or her parents, and who is unable to be self-supporting because of the disability.
- Dependents: Marriage Certificate, or for common-law: an affidavit signed by both spouses, confirming that they are living together in a conjugal relationship for not less than three years, or that they are living together in a conjugal relationship and are raising any children of whom they both are the natural or adoptive parent.
- Dependent Child: proof of financial dependency.


text:
Elizabeth Hou recognized for her research on detecting anomalies in traffic networks
PhD candidate Elizabeth Hou was awarded an honorable mention for her presentation at the Michigan Student Symposium for Interdisciplinary Statistical Sciences on her research that could help monitor nuclear nonproliferation.
Doctoral student Elizabeth Hou won an honorable mention for her presentation at the Michigan Student Symposium for Interdisciplinary Statistical Sciences (MSSISS). The MSSISS is organized by students in the Biostatistics, Electrical Engineering & Computer Science, Industrial & Operations Engineering, and Statistics & Survey Methodology departments with the purpose of encouraging communication across related fields of statistical sciences and promoting interdisciplinary research among graduate students and faculty.
Hou presented her paper, "Anomaly Detection in Partially Observed Traffic Networks." The research concerns networks where messages are sent from node to node. It can be difficult to monitor these networks for security purposes (ensuring nothing is passing through the network that shouldn't be there), because observers often/usually don't have access to the messages themselves. To solve this problem, Hou suggests a system where you monitor the nodes rather than the messages.
"By watching the nodes, you can count how many messages are leaving and how many messages are entering," Hou says. "And if you assume that your network has a certain type of structure, then you have a baseline to compare against. That way, it's a lot easier to reconstruct your entire network and be able to detect if there's any anomalous activity."
While there are many applications of Hou's research, her project was funded by the Department of Energywith the purpose of monitoring nuclear nonproliferation.
"In a nuclear field cycle, which is just a set of buildings, we attempt to track the patterns of shipping from building to building," Hou says. "By using our anomaly detection methods, we can detect whether there's proliferation or nonproliferation of nuclear materials."
We can detect whether there's proliferation or nonproliferation of nuclear materials.Elizabeth Hou, PhD candidate


text:
Introducing 'Balance Complex Pills,' a meticulously crafted supplement specifically designed to cater to women's intimate wellness needs. Formulated with a proprietary blend of natural ingredients, these pills offer a potential solution to address various concerns related to feminine health, providing a comprehensive approach to holistic well-being.
V3ginal Health Support: Balance Complex Pills aim to maintain a healthy v3ginal flora, potentially reducing the risk of imbalances that could lead to discomfort or infections. The natural ingredients in these pills are believed to support the delicate balance of microorganisms in the v3ginal area.
Yeast Balance: With regular use, the supplement may contribute to sustaining a healthy yeast balance within the body, potentially mitigating the occurrence of yeast-related issues that can impact v3ginal health.
Digestive Harmony: Beyond intimate health, these pills might assist in promoting digestive health by supporting a balanced gut microbiome. A healthy digestive system indirectly influences v3ginal health, creating a harmonious internal environment.
Immune System Support: Certain components within Balance Complex Pills are thought to aid in bolstering the immune system. Strengthening the body's defense mechanisms can potentially reduce vulnerability to infections.
How to Use
Incorporating Balance Complex Pills into your daily routine is simple. Follow the recommended dosage guidelines indicated on the product label or as advised by a healthcare professional. Taking the pills with a meal or following the prescribed schedule helps optimize absorption and minimizes the likelihood of any stomach discomfort. Consistency in consumption is key to potentially experiencing the full range of benefits these supplements offer.
By opting for Balance Complex Pills, women may proactively support their intimate health and overall well-being. These supplements offer a natural and convenient means to empower women to take charge of their health journey. With an emphasis on holistic wellness, these pills aim to provide comprehensive support for a harmonious and balanced body, allowing women to embrace life with confidence and comfort.
In conclusion, 'Balance Complex Pills' represent a potentially valuable addition to a woman's wellness regimen, offering a multifaceted approach to address intimate health concerns. With their natural composition and potential benefits, these supplements aim to assist women in achieving and maintaining a balanced and thriving body, promoting vitality and confidence in their daily lives.
For more Information Balance Complex Pills
For more click medicenpk
Balance Complex Pills medicenpk.com 0313-_PHONE_


text:
Interdisciplinary Research on Environment and Society
The Oslo School of Environmental Humanities (OSEH) is an initiative to strengthen research and teaching that engages with the current climatic and environmental crisis from interdisciplinary perspectives. Our aim is to create a platform that facilitates conversation across disciplines and beyond academia, in order to respond creatively to the enormous environmental and social challenges of our time.
Research and teaching at OSEH cover a wide span of disciplines in the humanities and social sciences. We believe that the current environmental crisis calls for deep cultural and social transformations. We need to better understand the values, ideas, ethics, and ways of life that have led to the present condition. These are domains where humanists and social scientists have much expertise.
OSEH supports scholars in the humanities by providing funding for interdisciplinary research groups that foster new research projects.
We currently accept two kinds of applications:
- Long-term OSEH collaboratories
- Community-building initiatives
Project Announcement: Living with Vultures in the Sixth Extinction (LiVE)
LiVE is a research project providing a historically informed comparative ethnography of contemporary vulture conservation in changing European landscapes. The project has been granted funding from the Marie Skłodowska-Curie actions Individual Fellowships.
New Podcast on Environmental and Climate History
Archeologists and historians share research and insight on Norwegian environmental and climate history in a new podcast with seven episodes produced by Norgeshistorie.no.
Introducing OSEH Professor II: Felix Riede
Oslo School of Environmental Humanities is happy to introduce Felix Riede as a Professor II! He is Professor (with special responsibilities) and Director of Research at the Department of Archaeology and Heritage Studies at Aarhus University. From late 2019 to 2022 he will engage in projects with particular focus on the development of the so-called 'palaeoenvironmental humanities'.
The Oslo School of Environmental Humanities (OSEH) aims to establish interdisciplinary courses in environmental humanities at both the master's and bachelor's level.
Are you interested in exploring the environmental humanities in a more casual setting?
The OSEH Environmental Humanities reading group invites students, staff and members of the public to join monthly group discussions on a diversity of subjects.
Director: Ursula Münster, Associate Professor at the Department of Culture Studies and Oriental Languages.
Oslo School of Environmental Humanities in social media:
The Faculty of Humanities promotes five research and education initiatives between 2019 and 2023. The goal is to contribute to solutions for the societal challenges of our day.


DKMGR(3X) DKMGR(3X)
 NAME
 dkmgr, dkmgrack, dkmgrnak, dkfilename - establish datakit
 server
 SYNOPSIS
 #include <dkmgr.h>
 struct mgrmsg *
 dkmgr(srvname, traffic)
 char *srvname;
 char *
 dkfilename(chan)
 dkmgrack(chan)
 dkmgrnak(chan, error)
 DESCRIPTION
 These routines are loaded by option -ldk of ld(1).
 Dkmgr sets up the calling process as a datakit server, and
 waits for service requests. It returns a pointer to an
 incoming service request in the form:
 struct mgrmsg {
 short m_chan;
 short m_tstamp;
 short m_traffic;
 char *m_dial;
 char *m_service;
 char *m_source;
 char *m_uid;
 char *m_param1;
 char *m_param2;
 };
 Field m_chan gives the channel number of the incoming
 request. The circuit is already established, and this chan-
 nel need only be opened. The appropriate special file name
 is returned as a static string by dkfilename. Field m_uid is
 generated by the caller (see tdkdial(3)), if the request
 originated in a standard UNIX system, and is the userid of
 the requester. It can be trusted if, and only if, you trust
 the administrators and super-users on the calling system.
 Field m_param1 and m_param2 are the first and subsequent
 strings after the destination name in the dialstring. They
 can be used to pass short pieces of information from the
 requester to the server about how to handle the call.
 DKMGR(3X) DKMGR(3X)
 Traffic tells the network what types of requests this server
 is capable of handling. Value 0 indicates terminal-like
 traffic only, value 2 allows either terminal or high-speed
 host-host traffic. The field m_traffic of the incoming call
 message tells the traffic requested by the caller.
 The string m_dial gives the dialing string used by the call-
 ing process, and m_source is the name of the port in the
 network where the call originated.
 The server program is expected to call either dkmgrack or
 dkmgrnak to complete the call setup. The first acknowledges
 and accepts the call, the second rejects the call with a
 specific error code giving the reason.
 FILES
 /dev/dk directory containing files naming each channel.
 SEE ALSO
 tdkdial(3)
 DIAGNOSTICS
 In case of a major setup error, a message is printed on the
 standard error file and the process exits. For minor
 errors, a message is printed and the process tries again
 after a wait interval.
 BUGS
 It always waits for connection requests; there should be a
 version that accepts them asynchronously.


text:
Vatalia Anikina, Valery Golender, Svetlana Kozhakhina, Leonid Vainer, and Bernara Zagatsky
This paper presents REASON, an NLP system designed for knowledge-based information search in large digital libraries and the WWW. Unlike conventional information retrieval methods, our approach is based on using the content of natural language texts. We have elaborated a searching strategy consisting of three steps: (1) analysis natural language documents and queries resulting in adequate understanding of their content; (2) loading the extracted information into the knowledge base and in this way forming its semantic representation; (3) query matching proper consisting in matching the content of the query against the content of the input documents with the aim of finding relevant documents. The advanced searching capabilities of REASON are provided by its main constituents: the Language Model, the Knowledge Base, the Dictionary and the Software specially developed for content understanding and content-based information search. We characterize the particularities of the System and describe the basic components of the formal linguistic model, the architecture of the knowledge base, the set-up of the Dictionary, and the main modules of the System - the module of analysis and the logical inference module. REASON is an important contribution to the development of efficient tools for information search.


Debug Pods and ReplicationControllers
This page shows how to debug Pods and ReplicationControllers.
Before you begin
You need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. It is recommended to run this tutorial on a cluster with at least two nodes that are not acting as control plane hosts. If you do not already have a cluster, you can create one by using minikube or you can use one of these Kubernetes playgrounds:
To check the version, enter kubectl version.
 - You should be familiar with the basics of Pods and with Pods' lifecycles.
Debugging Pods
The first step in debugging a pod is taking a look at it. Check the current state of the pod and recent events with the following command:
kubectl describe pods ${POD_NAME}
Look at the state of the containers in the pod. Are they all Running? Have there been recent restarts?
Continue debugging depending on the state of the pods.
My pod stays pending
If a pod is stuck in Pending it means that it can not be scheduled onto a node. Generally this is because there are insufficient resources of one type or another that prevent scheduling. Look at the output of the kubectl describe ... command above. There should be messages from the scheduler about why it can not schedule your pod. Reasons include:
Insufficient resources
You may have exhausted the supply of CPU or Memory in your cluster. In this case you can try several things:
 - Add more nodes to the cluster.
 - Terminate unneeded pods to make room for pending pods.
 - Check that the pod is not larger than your nodes. For example, if all nodes have a capacity of cpu:1, then a pod with a request of cpu: 1.1 will never be scheduled.
 You can check node capacities with the kubectl get nodes -o <format> command. Here are some example command lines that extract the necessary information:
 kubectl get nodes -o yaml | egrep '\sname:|cpu:|memory:'
 kubectl get nodes -o json | jq '.items[] | {name: .metadata.name, cap: .status.capacity}'

 The resource quota feature can be configured to limit the total amount of resources that can be consumed. If used in conjunction with namespaces, it can prevent one team from hogging all the resources.
Using hostPort
When you bind a pod to a hostPort there are a limited number of places that the pod can be scheduled. In most cases, hostPort is unnecessary; try using a service object to expose your pod. If you do require hostPort then you can only schedule as many pods as there are nodes in your container cluster.
My pod stays waiting
If a pod is stuck in the Waiting state, then it has been scheduled to a worker node, but it can't run on that machine. Again, the information from kubectl describe ... should be informative. The most common cause of Waiting pods is a failure to pull the image. There are three things to check:
 - Make sure that you have the name of the image correct.
 - Have you pushed the image to the repository?
 - Run a manual docker pull <image> on your machine to see if the image can be pulled.
My pod is crashing or otherwise unhealthy
Once your pod has been scheduled, the methods described in Debug Running Pods are available for debugging.
Debugging ReplicationControllers
ReplicationControllers are fairly straightforward. They can either create pods or they can't. If they can't create pods, then please refer to the instructions above to debug your pods.
You can also use kubectl describe rc ${CONTROLLER_NAME} to inspect events related to the replication controller.
Last modified February 11, 2021 at 3:51 PM PST : clean up use of word: just (3ff5ec1ef)


Improve the performance of Apache Iceberg's metadata file operations using Amazon FSx for Lustre on Amazon EMR
Spread the love
Apache Iceberg is an open table format for large datasets in Amazon Simple Storage Service (Amazon S3), and provides fast query performance over large tables, atomic commits, concurrent writes, and SQL-compatible table evolution. With Amazon EMR 6.5+, you can use Apache Spark on EMR clusters with the Iceberg table format.
Iceberg helps data engineers manage complex challenges such as continuously evolving datasets while maintaining query performance. Iceberg allows you to do the following:
 - Maintain transactional consistency on tables between multiple applications where files can be added, removed, or modified atomically with full read isolation and multiple concurrent writes
 - Implement full schema evolution to track changes to a table over time
 - Issue time travel queries to query historical data and verify changes between updates
 - Organize tables into flexible partition layouts with partition evolution, enabling updates to partition schemes as queries and data volume changes without relying on physical directories
 - Roll back tables to prior versions to quickly correct issues and return tables to a known good state
 - Perform advanced planning and filtering in high-performance queries on large datasets
In this post, we show you how to improve the performance of Iceberg's metadata file operations using Amazon FSx for Lustre and Amazon EMR.
Performance of metadata file operations in Iceberg
The catalog, metadata layer, and data layer of Iceberg are outlined in the following diagram.
Iceberg maintains metadata across multiple small files (metadata file, manifest list, and manifest files) to effectively prune data, filter data, read the correct snapshot, merge delta files, and more. Although Iceberg has implemented fast scan planning to make sure that metadata file operations don't take a large amount of time, the time taken is slightly high for object storage like Amazon S3 because it has a higher read/write latency.
In use cases like a high-throughput streaming application writing data into an S3 data lake in near-real time, snapshots are produced in microbatches at a very fast rate, resulting in a high number of snapshot files and causing degradation in performance of metadata file operations.
As shown in the following architecture diagram, the EMR cluster consumes from Kafka and writes to an Iceberg table, which uses Amazon S3 as storage and AWS Glue as the catalog.
In this post, we dive deep into how to improve query performance by caching metadata files in a low-latency file system like FSx for Lustre.
Overview of solution
FSx for Lustre makes it easy and cost-effective to launch and run the high-performance Lustre file system. You use it for workloads where speed matters, such as high throughput streaming writes, machine learning, high performance computing (HPC), video processing, and financial modelling. You can also link the FSx for Lustre file system to an S3 bucket, if required. FSx for Lustre offers multiple deployment options, including the following:
 - Scratch file systems, which are designed for temporary storage and short-term processing of data. Data isn't replicated and doesn't persist if a file server fails. Use scratch file systems when you need cost-optimized storage for short-term, processing-heavy workloads.
 - Persistent file systems, which are designed for long-term storage and workloads. The file servers are highly available, and data is automatically replicated within the same Availability Zone in which the file system is located. The data volumes attached to the file servers are replicated independently from the file servers to which they are attached.
The use case with Iceberg's metadata files is related to caching, and the workloads are short-running (a few hours), so the scratch file system can be considered as a viable deployment option. A Scratch-2 file system with 200 MB/s/TiB of throughput is sufficient for our needs because Iceberg's metadata files are small in size and we don't expect a very high number of parallel connections.
You can use FSx for Lustre as a cache for the metadata files (on top of an S3 location) to offer better performance in terms of metadata file operations. To read/write files, Iceberg provides a capability to load a custom FileIO dynamically during runtime. You can pass the FSxForLustreS3FileIO reference using a Spark configuration, which takes care of reading/writing to appropriate file systems (FSx for Lustre for reads and Amazon S3 for writes). By enabling the catalog properties lustre.mount.path, lustre.file.system.path, and data.repository.path, Iceberg resolves the S3 path to FSx for Lustre path at runtime.
As shown in the following architecture diagram, the EMR cluster consumes from Kafka and writes to an Iceberg table that uses Amazon S3 as storage and AWS Glue as the catalog. Metadata reads are redirected to FSx for Lustre, which updates asynchronously.
Pricing and performance
We took a sample dataset across 100, 1,000, and 10,000 snapshots, and could observe up to 8.78 times speedup in metadata file operations and up to 1.26 times speedup in query time. Note that the benefit was observed for tables with a higher number of snapshots. The environment components used in this benchmark are listed in the following table.
Iceberg Version Spark Version Cluster Version Master Workers
0.14.1-amzn-0 3.3.0-amzn-1 Amazon EMR 6.9.0 m5.8xlarge 15 x m5.8xlarge
The following graph compares the speedup for each amount of snapshots.
You can calculate the price using the AWS Pricing Calculator. The estimated monthly cost of an FSx for Lustre file system (scratch deployment type) in the US East (N. Virginia) Region with 1.2 TB storage capacity and 200 MBps/TiB per unit storage throughput is $336.38.
The overall benefit is significant considering the low cost incurred. The performance gain in terms of metadata file operations can help you achieve low-latency read for high-throughput streaming workloads.
Prerequisites
For this walkthrough, you need the following prerequisites:
Create an FSx for Lustre file system
In this section, we walk through the steps to create your FSx for Lustre file system via the FSx for Lustre console. To use the AWS Command Line Interface (AWS CLI), refer to create-file-system.
 1. On the Amazon FSx console, create a new file system.
 2. For File system options, select Amazon FSx for Lustre.
 3. Choose Next.
 4. For File system name¸ enter an optional name.
 5. For Deployment and storage type, select Scratch, SSD, because it's designed for short-term storage and workloads.
 6. For Throughput per unit of storage, select 200 MB/s/TiB.You can choose the storage capacity according to your use case. A Scratch-2 file system with 200 MB/s/TiB of throughput is sufficient for our needs because Iceberg's metadata files are small in size and we don't expect a very high number of parallel connections.
 7. Enter an appropriate VPC, security group, and subnet.Make sure that the security group has the appropriate inbound and outbound rules enabled to access the FSx for Lustre file system from Amazon EMR.
 8. In the Data Repository Import/Export section, select Import data from and export data to S3.
 9. Select Update my file and directory listing as objects are added to, changed in, or deleted from my S3 bucket to keep the file system listing updated.
 10. For Import bucket, enter the S3 bucket to store the Iceberg metadata.
 11. Choose Next and verify the summary of the file system, then choose Create File System.
When the file system is created, you can view the DNS name and mount name.
Create an EMR cluster with FSx for Lustre mounted
This section shows how to create an Iceberg table using Spark, though we can use other engines as well. To create your EMR cluster with FSx for Lustre mounted, complete the following steps:
 1. On the Amazon EMR console, create an EMR cluster (6.9.0 or above) with Iceberg installed. For instructions, refer to Use a cluster with Iceberg installed.
To use the AWS CLI, refer to create-cluster.
 1. Keep the network (VPC) and EC2 subnet the same as the ones you used when creating the FSx for Lustre file system.
 2. Create a bootstrap script and upload it to an S3 bucket that is accessible to EMR.Refer to the following bootstrap script to mount FSx for Lustre in an EMR cluster (the file system gets mounted in the /mnt/fsx path of the cluster). The file system DNS name and the mount name can be found in the file system summary details.
 sudo amazon-linux-extras install -y lustre2.10
 sudo mkdir -p /mnt/fsx
 sudo mount -t lustre -o noati


Making a Laser Beam Security Alarm Circuit
We have often seen laser alarm system as an integral part of security solution especially for a location which deserves hi-level security.
Right from a museum preserving priceless historical possession; to a safety bank vault; and even in thriller flicks where the protagonist is seen on and often tied in the ray of red light beams, while trying to reach a safe vault; one is well acquainted with the usage of laser light beams. In fact it is also considered as a security device even in household today to ward off burglary or theft.
A laser beam is not a simple beam, but has the efficacy to respond when faced a distraction. This means that if the light ray gets interrupted with any objects, the photodiode receives resistance which in turn activates an alarm. The laser alarm system is an economical option when it comes to consumption of power, as the receiver needs power supply less than 10 mA on average. Setting up a laser alarm system is relatively easier as the laser and the receiver can be setup in one box, on a single power input.
Below is a circuit design diagram which illustrates the flow of a laser alarm system.
Referring to circuit diagram it is seen that a TL072 op-amp (IC1.A) is configured as a voltage comparator, placed in between the adjustable voltage driver P1/R4 and the light-dependent voltage which consists of photodiode D1 and R3 – a fixed resistor. As the laser beam receives a distraction from a foreign agent, the voltage on comparator pin drops to 2 below that at pin 3, thereby enabling the agent swing to positive voltage supply and enable an alarm situation.
As the laser alarm can detect any foreign agents, so is the alarm can be set in a more sophisticated fashion, where it can bypass accidental interrupts from agents, like an insect. This is accomplished as the Resistor R2 provides a level of hysteresis, thereby prevent oscillation when two comparator input voltage rests in almost equal state. In order to set a faster response method, it can be achieved by reducing the value to 1 µF.
A laser beam system is easier to setup, either as a single or a separate entity. If a single box is maintained to setup the alarm, then it is to be made sure that the photodiode can't have direct contact with the laser beam. Assembling the components and the circuit in a breadboard, it should be mounted in a black box having a hole. A black drinking straw should pass through the hole to enable light flow from the direction of the laser beam to enter. Setting up the system properly makes the laser beam act even with direct sunlight, as it cannot affect the operation of the photodiode.
Article Written and Submitted by Mr. Dhrubajyoti Biswas
1 comment:
Readers are requested not to include external links while commenting. For consulting a diagram, upload it on Google Drive and provide the link here.
Readers are advised to proceed with the construction of the presented circuits only after understanding the concepts from the core. Not adhering to this can lead to failures and frustrations.
Copyright © Swagatam Innovations. All rights reserved
Popular Posts


text:
Munich Aerospace is a consortium partner in the DG DEFIS project Space Technology And Research Support*EU of the European Commission. In cooperation with six European consortium partners, we are supporting the European Commission in developing a platform for EU-funded space research and innovation.
DG DEFIS is supported by STARS*EU in the following topic areas:
- Education and skills for space in the EU: Understanding the educational needs demanded by the research community and industry is key to ensure that adequate educational standards and a skilled workforce are in place to compete in the future global space ecosystem.
- Creation and distribution of scientific knowledge: Basic science and research work is essential to enable more advanced technology development.
- Analysis of EU-funded space projects: Identify best practices for the upcoming programme cycles.
- Support the consultation platform: Support the inclusive and structured process established by the European Commission to develop a Strategic Research and Innovation Agenda (SRIA).
- Communication support: making EU-funded space research more visible and support DG DEFIS and HaDEA in their communication activities.
More information at: _URL_


World Braille Day: January 4
Every year, the World Braille Day is celebrated on January 4 by United Nations and several other international organizations. The day is celebrated to create awareness of the importance of Braille as a means of communication in the realization of human rights for the blind.
Why is World Braille Day celebrated on January 4?
It is celebrated on January 4 because the day marks the birthday of Louis Braille, the creator of this writing system. He was born in France in 1809.
When was the first World Braille Day celebrated?
What is Braille?
Braille is the representation of alphabetic and numerical symbols using six dots. The dots represent the letters and numbers and mathematical, musical and scientific symbols as well.
Who invented Braille?
Braille was invented by Louis Braille in the 19th century in France.
Braille Language in India
India adopted the uniform Braille codes for different languages in 1951. India established the first ever Braille plant called Central Braille Plant in Dehradun. In 1954, Central Braille press was established to manufacture Braille appliances. The press produces simple equipment such as Braille slate, stylus and arithmetic Braille slate.
What are the steps taken by GoI to support the people with disabilities?
The GoI enacted the Persons with Disabilities Act, 1995. The act provides special category called 'low vision' along with blind. Also, the act meets the stipulations of the United Nations Convention on Rights of Persons with Disabilities.
India accepted several United Nations resolutions on disabled people. This includes Observance of International Year of Disabled Persons in 1981, observance of UN Decade for the disabled 1983-92. India also observed Asia-Pacific Decade for the Disabled declared by ESCAP. ESCAP is Economic and Social Commission for Asia and the Pacific. It is a regional think-tank that provides analytical opinions on social, economic and environmental dynamics in the region.
Latest E-Books


Exploration Geophysics
Ground Magnetic Surveys – Seeing Beneath The Rocks
Although ground magnetic surveys measure rock magnetism, they can help find minerals that aren't magnetic, including gold. In fact, the areas that aren't magnetic can be as significant as those that are. This is why ground magnetic surveys are important for far more than finding iron ore.
Why Is A Ground Magnetic Survey Useful?
Ground magnetic surveys map the magnetism of underlying rocks. The most common magnetic minerals found are pyrrhotite, (iron sulphide), and magnetite. Magnetite when found with sufficient purity and quantity may become an iron ore deposit.
Pyrrhotite is important because of the minerals it's often associated with including pyrite, another iron sulphide mineral, which may contain gold. Other valuable minerals often associated with pyrrhotite include; chalcopyrite (copper sulphide), sphalerite (zinc sulphide), and pentlandite (nickel sulphide).
Pyrrhotite is key to the ability of ground magnetics to reveal hidden zones of potentially valuable non-magnetic minerals.
Ground magnetic surveys are also used to understand the general structure of underlying rock , identifying faults and folds otherwise hidden beneath cover rocks and for identifying demagnetised zones associated with hydrothermal activity.
The heat of, hydrothermal activity demagnetises rocks. These demagnetised zones may be identified using ground magnetics on a local scale, or by aeromagnetics at a regional level. This technique can identify epithermal gold deposits. In the goldfields around Charters Towers, Queensland, Australia, aerial and ground magnetic surveys helped identify demagnetised associated with swarms of hydrothermal quartz veins, under younger sedimentary cover.
Conducting A Ground Magnetic Survey
A survey is usually done by two operators. While walking across the landscape an operator can encounter numerous obstacles, but the idea is to walk as straight as possible. In heavily vegetated areas, walking can be quite slow and concentration has to remain high to avoid hazards such as snakes, rabbit holes or even obscured mine shafts. On good ground, operators can walk up to 15 km a day, so a high level of fitness is required. If you are not fit at the start of the survey, you will be by the end!
Each operator walks across the survey area with a magnetometer and GPS in a backpack. Changes in the earth's magnetic field are recorded along the length of each line. GPS coordinates for the readings are also recorded. A plot of these coordinates reveals that the actual paths walked are normally not perfectly straight but wriggle across the landscape. Luckily, these minor deviations do not significantly affect the result.
Ground magnetic survey
Planned ground magnetics with a line spacing of 25m (red). Walked lines by Operator 1 (white) and Operator 2 (black) are shown. Base image: Google Earth.
Along with the magnetic field changes, the elevation of the land surface is also recorded by the GPS. This data will later be used by software to generate 3D model of the topography of the survey area.
The spacing between successive survey lines can vary between 100m to 20m depending on the resolution required. The narrower the line spacing, the higher is the resolution of the resultant magnetic image. The highest resolution images can reveal subtle structures including subtle features in faults and shears, which may point to high grade ore shoots.
A base station is needed for every survey. The station records daily variations in the earth's magnetic field caused by electric currents in the upper atmosphere, by solar activity. These daily fluctuations are later corrected for, otherwise incorrect magnetic images can result.
Interpreting A Ground Magnetic Survey
Back in the office, a geophysicist processes the data removing artefacts produced from surface items such as steel drums and wire fences. Filters and corrections are used to enhance the data to reveal subtle features and structures within the underlying rock.
Reduced-to-pole (RTP) is a very important correction made to the data, particularly for locations far from the earth's magnetic poles. The RTP filter corrects for the artificial effect of being of the distance to the earth's magnetic poles, allowing for accurate drill-hole location and targeting.
Geophysical interpretation is as much an art as a science. An experienced scientist will use a variety of filters that highlight different aspects of the magnetic gradients in the data, and reveal subtle changes which may point to concealed structures and associated mineral occurrences.
Other high level filters used by geophysicists include tilt derivative and horizontal derivative, each providing a slightly different way of viewing the data.
A correction may be applied to standardise the data to a specific height above the ground. Upward continuing helps to remove or minimise erratic surface magnetism, while enhancing longer wavelengths associated with deep objects and features..
The geologist in close consultation with the geophysicist interprets the magnetic images. The use of specialised GIS mapping software allows for other data such as stream sediment, soil and rock chip geochemistry to be combined with the magnetic images. Any coincident anomalies become potential drill targets.
Tags
David Tilley
Dr. David Tilley has a wealth of experience in the minerals industry, federal government and academia. Early in his career from 1991 to 1998 he was a PhD scholar, research associate and associate lecturer at the Australian National University, in Canberra. During this time, he lectured geology, mineralogy and field mapping techniques and studied the weathering of minerals and the formation of bauxite. From 1999 to 2005, he was a resources and energy policy writer within the Australian Government. Since 2006, he has worked as an exploration geologist for a number of exploration and mining companies in Australia and New Zealand.
Related Articles
Check Also
Close
Close


What Does The Clock Is Ticking Mean?
The Clock in Ticking Meaning
Definition: There's not much time left; hurry up.
This expression is an indirect way to urge someone to go faster. It reminds the person that there isn't an infinite amount of time for something to happen.
Origin of the Clock is Ticking
It is unclear exactly when this idiom originated, but it started to increase in popularity around the second half of the 1900s.
It most likely relates to the idea that a ticking clock reminds someone of the passage of time. It keeps them aware of managing their time efficiently.
Examples of the Clock is Ticking
body clock is tickingIn the dialogue below, two men use the idiom while on a fishing trip.
Robert: We've been here for a day and a half, and we still haven't caught anything!
Marty: I know. You have to be patient. Sometimes the fish are biting, and sometimes they aren't. If we stay here long enough, I'm sure we'll catch something.
Robert: I agree, but the clock is ticking! We have to go back home in a few hours. If we don't catch something soon, we won't have time to catch anything before we leave.
Marty: Well, there's really nothing else we can do other than wait.
The second dialogue shows two students talking about the cookies they are baking.
Josh: What time does the party start?
Jeff: As I told you before, it starts at 7. I should remind you that it is already 6:30, so we don't have much time left.
Josh: I know. I'm sorry I started baking the cookies for the party so late. I'm going as fast as I can.
Jeff: I understand, but try to go a little bit faster. The clock is ticking, you know!
Josh: I know! I'll speed up the process as much as possible.
More Examples
This excerpt is from a movie review. It says that the heroes need to hurry to beat the evil villain.
 - The clock is ticking, too, because the nefarious Rita Repulsa (Elizabeth Banks) has emerged from an ancient ocean slumber to terrorize the town, find an all-powerful crystal and steal enough gold to reform the enormous monster Goldar. –USA Today
This excerpt is about a government agency that needs to hurry.
 - There's no immediate rush for answers since Congress two years ago extended ISS operations until 2024. But the clock is ticking: the NASA Transition Authorization Act of 2017 President Trump signed Tuesday requires the agency begin charting the space station's future beyond 2024. –USA Today
The phrase the clock is ticking is an expression that encourages someone to rush.


text:
Original Articles: 2011 Vol: 3 Issue: 6
An efficient edible anti-bacterial aqueous solution to purify food juices
This study was conducted to formulate an economically viable aqueous antibacterial formulation using edible essential oils to purify bacterially contaminated fresh juices sold at roadside outlets in tropical countries, which maintain very low/nil hygiene conditions. Such a formulation was felt necessary to prevent epidemic outbreaks of infective diseases which occur due to consumption of fresh juices (like sugarcane juice) sold at such outlets. As part of the study, the level of bacterial contamination in sugarcane juice sample collected from a roadside outlet in Belgaum, Karnataka was accessed and predicted to have 4000micro-organisms/100ml of juice. Gram positive bacteria Bacillus subtilis & Staphylococcus aureus and Gram negative bacteria E. Coli & Klebsiella contaminants were present in the samples. To reduce this high degree of contamination, four essential oils i.e. Clove, Cinnamon, Thyme and Lemon grass were tested individually and in combination for their antibacterial activity against the isolated contaminants. The best effective formulation was then retested and found to effectively purify the juice sample (1ml/1000ml) within fifteen minutes of its addition.This formulation of essential oils can be added to fresh juices sold at roadside outlets to reduce their degree of bacterial contamination and hence help in preventing outbreaks of infective diseases as well as improve the general health conditions of people.


On This Page
SAML Apps and SHA256 Certificates
Certificates with a SHA256 signature are supported for SAML 2.0 applications with Okta. You can create new integrations that use SHA256 certificates and update existing integrations from SHA1 certificates to SHA256 certificates. Existing integrations are not changed automatically. The SHA256 certificates and the SHA1 certificates are self-signed.
Why Should I Do This?
To take advantage of the additional security features of SHA256 certificates.
New SAML 2.0 App Integrations
New SAML 2.0 app integrations automatically use SHA256 certificates. As instructed, upload the SHA256 certificate to the ISV.
Existing SAML 2.0 App Integrations
To update existing app integrations, there are four steps to follow.
 1. List your apps and get the app id, name, and label for each app to update.
 For each app to update, perform the following steps.
 2. Generate a new application key credential.
 3. Update the key credential for the app to specify the new signing key id.
 4. Upload the new certificate to the ISV. (This step cannot be automated.)
Important: After you complete the first three steps, your users cannot access the application until Step 4 is completed.
Determine the Signature Algorithm of a Certificate
You can find the signature algorithm of a certificate either by using the command line or by uploading your certificate to a free, online certificate decoder service.
If you have OpenSSL installed, from the command line run:
openssl x509 -text -noout -in
 is the certificate filename relative to the current directory. The certificate must be in PEM format. Use a plain text editor like Notepad or Textedit to save the certificate text from the x5c element returned from an API call, and add the Begin Certificate and End Certificate lines with the hyphens to the top and bottom of the file, as shown below. Trailing white spaces, such as a space or carriage return, at the end of the file make the certificate invalid. (The certificate shown below has been altered and is not valid.)
Use a free CSR and Certificate Decoder service and enter the contents of your certificate. These tools are readily found through a web search. Be sure to note the certificate format that the decoder service requires.
The Signature Algorithm is either sha256WithRSAEncryption or sha1WithRSAEncryption.
Obtaining the Certificate for an App from a URL
You can obtain the current certificate for an app from the following URL:
https://-admin.okta.com/admin/org/security//cert
 is your organization's Okta subdomain.
 is the application ID you used in Step 1.
Note: Certificates downloaded with this method contain the Begin Certificate and End Certificate lines.


text:
Authors: Karin Axelsson, Ulf Melin
Addresses: Department of Management and Engineering, Linkoping University, SE-581 83 Linkoping, Sweden. ' Department of Management and Engineering, Linkoping University, SE-581 83 Linkoping, Sweden
Abstract: Fragmentation and isolated development are main problems that hinder successful e-government. This paper has an inter-organisational perspective on challenges in one-stop government. We present a conceptual framework that characterises an inter-organisational relationship and its dimensions. The conceptual framework is used for analysing data from an inter-organisational one-stop government project. When applying the framework we focus on some interesting issues and explain some of the challenges that our interviewees identified. By addressing these inter-organisational aspects we reached further understanding of the problems associated with this case, which can provide added value to discussions of e-government challenges, barriers and problems in general.
Keywords: e-government; inter-organisational relationships; one-stop government; industrial-business networks; electronic government.
International Journal of Electronic Governance, 2008 Vol.1 No.3, pp.296 - 314
Published online: 27 Sep 2008 *Full-text access for editors Access for subscribers Purchase this article Comment on this article


error.
Linkage Errors
Linkage Types
Certain functions require a specific linkage type, such as __stdcall. Other functions require correct parameter matching. Perhaps the most common errors are in using incorrect linkage types. When a function specifies a __stdcall linkage you must specify the __stdcall for the function you declare. If it does not specify __stdcall, you must not use the __stdcall linkage. Note that you rarely if ever see a "bare" __stdcall linkage declared as such. Instead, there are many linkage type macros, such as WINAPI, CALLBACK, IMAGEAPI, and even the hoary old (and distinctly obsolete) PASCAL which are macros which are all defined as __stdcall. For example, the top-level thread function for an AfxBeginThread function is defined as a function whose prototype uses the AFX_THREADPROC linkage type.
which you might guess as being a CDECL (that is, non-__stdcall) linkage. If you declared your thread function as
and started the thread as
AfxBeginThread((AFX_THREAD_PROC)MyThreadFunc, this);
then the explicit cast (often added to make a compiler warning go away!) would fool the compiler into generating code. This often results in the query "My thread function crashes the app when the thread completes, but only in release mode". Exactly why it doesn't do this in debug mode escapes me, but most of the time when we look at the problem it was a bad linkage type on the thread function. So when you see a crash like this, make sure that you have all the right linkages in place. Beware of using casts of function types; instead. write the function as
AfxBeginThread(MyThreadFunc, (LPVOID)this);
which will allow the compiler to check the linkage types and parameter counts.
Parameter counts
Using casts will also result in problems with parameter counts. Most of these should be fatal in debug mode, but for some reason some of them don't show up until the release build. In particular, any function with a __stdcall linkage in any of its guises must have the correct number of arguments. Usually this shows up instantly at compile time unless you have used a function-prototype cast (like the (AFX_THREADPROC) cast in the previous section) to override the compiler's judgment. This almost always results in a fatal error when the function returns.
The most common place this shows up is when user-defined messages are used. You have a message which doesn't use the WPARAM and LPARAM values, so you write
to simply send the message. You then write a handler that looks like
afx_msg void OnMyMessage(); // incorrect!
and the program crashes in release mode. Again, I've not investigated why this doesn't cause a problem in debug mode, but we've seen it happen all the time when the release build is created. The correct signature for a user-defined message is always, without exception,
afx_msg LRESULT OnMyMessage(WPARAM, LPARAM);
You must return a value, and you must have the parameters as specified (and you must use the types WPARAM and LPARAM if you want compatibility into the 64-bit world; the number of people who "knew" that WPARAM meant WORD and simply wrote (WORD, LONG) in their Win16 code paid the penalty when they went to Win32 where it is actually (UNSIGNED LONG, LONG), and it will be different again in Win64, so why do it wrong by trying to be cute?)
Note that if you don't use the parameter values, you don't provide a name for the parameters. So your handler for OnMyMessage is coded as
 { something here...
 return 0; // logically void, 0, always
Compiler "Bugs"
An optimizing compiler makes several assumptions about the reality it is dealing with. The problem is that the compiler's view of reality is based entirely on a set of assumptions which a C programmer can all too readily violate. The result of these misrepresentations of reality are that you can fool the compiler into generating "bad code". It isn't, really; it is perfectly valid code providing the assumptions the compiler made were correct. If you have lied to your compiler, either implicitly or explicitly, all bets are off.
Aliasing bugs
An alias to a location is an address to that location. Generally, a compiler assumes that unless otherwise instructed, aliasing exists (it is typical of C programs). You can get tighter code if you tell the compiler that it can assume no aliasing, and therefore, values that it has computed will remain constant across function calls. Consider the following example:
int n;
int array[100];
int main(int argc, char * argv)
 n = somefunction();
 array[0] = n;
 for(int i = 1; i < 100; i++)
 array[i] = f(i) + array[0];
This looks pretty easy; it computes a function of i, f(i), which at the moment we won't bother to define, and adds the array entry value to it. So a clever compiler says, "Look, array[0] isn't modified at all in the loop body, so we can change the code to store the value in a register and rearrange the code:
 register int compiler_generated_temp_001 =somefunction();
 n = compiler_generated_temp_001;
 array[0] = compiler_generated_temp_001;
 array[i] = f(i) + compiler_generated_temp_001;
This optimization, which is a combination of loop invariant optimization and value propagation, works only if the assumption that array[0]is not modified by f(i). But if we later define
int f(int i)
 return i;
Note that we have now violated the assumption that array[0] is constant; there is an alias to the value. Now this alias is fairly easy to see, but when you have complex structures with complex pointers you can get exactly the same thing, but it is not detectable at compile time, or by static analysis of the program.
Note that the VC++ compiler, by default, assumes that aliasing exists. You have to take explicit action to override this assumption. It is a Bad Idea to do this except in very limited contexts; see the discussion of optimization pragmas.
const and volatile
These are attributes you can add to declarations. For variable declarations, the const declaration says "this never changes" and the volatile declaration says "this changes in ways you can't possibly guess". While these have very little impact when you compile in debug mode, they have a profound effect when you compile for release, and if you have failed to use them, or used them incorrectly, You Are Doomed.
The const attribute on a variable or function states that the value is constant. This allows the optimizing compiler to make certain assumptions about the value, and allows such optimizations as value propagation and constant propagation to be used. For example
int array[100];
void something(const int i)
 ... = array[i]; // usage 1
 // other parts of the function
 ... = array[i]; // usage 2
The const declaration allows the compiler to assume that the value i is the same at points usage 1 and usage 2. Furthermore, since array is statically allocated, the address of array[i] need only be computed once; and the code can be generated as if it had been written:
int array[100];
void something(const int i)
 int * compiler_generated_temp_001 = &array[i];
 ... = *compiler_generated_temp_001; // usage 1
 // other parts of the function
 ... = *compiler_generated_temp_001; // usage 2
In fact, if we had the declaration
const int array[100] = {.../* bunch of values */ }
the code could be generated as if it were
void something(const int i)
 int compiler_generated_temp_001 = array[i];
 ... = compiler_generated_temp_001; // usage 1
 // other parts of the function
 ... = compiler_generated_temp_001; // usage 2
Thus const not only gives you compile-time checking, but can allow the compiler to generate smaller, faster code. Note that you can force violations of const by explicit casts and various devious programming techniques.
The volatile declaration is similar, and says the direct opposite: that no assumption of the constancy of a value can be made. For example, the loop
// at the module level or somewhere else global to the function
int n;
 // inside some function while(n > 0) {
will be readily transformed by an optimizing compiler as
if(n > 0)
and this is a perfectly valid translation. Because there is nothing in the loop that can change the value of n, there is no reason to ever test it again! This optimization is an example of a loop invariant computation, and an optimizing compiler will "pull this out" of the loop.
But what if the rest of the program looked like this:
while(n > 0)
and the thread used the variable registered by the registerMyThreadFlag call to set the value of the variable whose address was passed in? It would fail utterly; the loop would never exit!
Thus, the way this would have to be declared is by adding the volatile attribute to the declaration of n:
volatile int n;
This informs the compiler that it does not have the freedom to make the assumption about constancy of the value. The compiler will generate code to test the value n on every iteration through the loop, because you've explicitly told it that it is not safe to assume the value n is loop-invariant.
Many programmers put ASSERT macros liberally throughout their code. This is usually a good idea