Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}
Faster Streaming With AirConcurrentMap
DZone's Guide to
Faster Streaming With AirConcurrentMap
When it comes down to things, performance depends dramatically on Map size. See why this is by looking at performance test code and results graphs.
· Performance Zone
Free Resource
One of the main advantages of the Java 8 streams feature is its ability to take advantage of parallelism for many common operations, keeping multiple cores busy simultaneously and increasing performance. Streaming out the contents from a Map in parallel can be very fast. However, performance depends dramatically on Map size, and we will show this with actual performance test code and results graphs.
We will talk here about:
 - The performance improvements you can actually expect for some common Map stream operations using parallelism, in particular, a simple value summer.
 - The Java Microbenchmarking Harness, which can provide precise, fair, repeatable performance tests, which we present with example code. Extensive JMH tests for Maps are on GitHub at boilerbay/airconcurrentmap.
 - AirConcurrentMap, a java.util.concurrent.ConcurrentNavigableMap with its own parallelism technique that is faster than any JDK Map. For medium to large Maps, AirConcurrentMap is also faster than any JDK Map for Iteration and forEach(), faster than ConcurrentSkipListMap for get(), put(), remove(), higher(), lower(), ceiling(), and floor, and the most memory-efficient.
One would expect the parallel streams mode always to be faster, but sometimes serial mode wins, and sometimes non-streams techniques like forEach() win. There are different setup times for different techniques, and for large Maps, performance generally decreases, probably due to caching effects. The JDK Maps are also very "peaky."
Actual testing is required in order to gauge the effects, which we will do here, but only for streams. We will test a streams-based value summer as well as a new parallelism technique for AirConcurrentMap, which was written by the author.
Basic Stream-Based Summing
Here is a simple streams-based summer for the values of a Map. There is a convenient stream sum() method:
Map<Object, Long> map = new HashMap<Object, Long>();
// fill in...
long result = map.values().stream().sum();
Now to make it parallel, all that is necessary is to chain in a .parallel() invocation:
long result = map.values().stream().parallel().sum();
This sum() is actually just a handy way to do a reduce() on the stream, so it is the equivalent of:
long result = map.values().stream().parallel().reduce(0L, (x, y) -> x + y);
To get best possible performance, we want to convert the stream to a native LongStream :
long result = map.values().stream().parallel()
 .mapToLong(v -> ((Long)v).longValue())
 .sum();
The forEach() Approach
Let's step back for a moment to compare the streams-based approach to the alternatives as background. These techniques can be faster for small Maps.
This will help introduce the optional AirConcurrentMap approach we look at later.
The Map.forEach(BiConsumer) mechanism generally beats Iterators by about 0% to 20%. Iterators are slower probably for several reasons, although JVM runtime code optimization is so effective that these are only general hints:
 - The state of an Iterator is kept in its instance variables, while the loop inside forEach() uses local variables.
 - Iterators require two method invocations per loop, although hasNext() may be very simple.
 - Iterator methods must check for NoSuchElementException in case next() is invoked without conditioning it on hasNext(). A Map may be iterated without using hasNext() at all!
 - An Iterator over the entrySet() must sometimes construct and return a Map.Entry.
 - It may be necessary to check for ConcurrentModificationException using a modification counter or other means for non-concurrent Maps.
A forEach() Example
For speed with small Maps, a summer using forEach(BiConsumer) can be implemented as follows. The BiConsumer lambda requires that local variables such as the running sum in the enclosing scope be effectively final, and we have to resort to some kind of long holder. This way, the long holder reference is final, but its contents are not, and we get the effect of a closure. Alternatively, a primitive long non-final instance variable in an enclosing class scope can be used directly. An AtomicLong is a convenient mutable Long. It does not actually need to be atomic because Map.forEach() is single-threaded.
final AtomicLong sum = new AtomicLong();
map.forEach((x, y) -> sum.set(sum.get() + y));
return sum.get();
The above is not very tidy compared to streaming, and it becomes unwieldy as the computation becomes more elaborate, but it has very little startup cost and it does not necessarily require more lines of code. Also, the AtomicLong.set() and get() and the implied boxing and longValue() invocations may be inefficient, putting an additional load on the Just-In-Time compiler. (Note that AtomicLong.addAndGet() does an internal lock-free atomic loop buried inside native code, which is slower.) We can help out the JIT by putting the sum in a primitive instance variable: this can actually help sometimes, although whether to try to do this kind of optimization is very controversial! We really do get about 0% to 10% improvement, but it is unpredictable. (You have to look at the native compiled code to convince yourself this is true, but it is very hard to figure out.) So, we might do this (an anonymous inner class won't work):
class SummingConsumer implements BiConsumer<Object, Long> {
 long sum = 0;
 public void accept(Object k, Long v) {
 sum += v;
 }
}
SummingConsumer summingConsumer = new SummingConsumer();
map.forEach(summingConsumer);
return summingConsumer.sum;
An alternative AirConcurrentMap technique is almost identical but faster, partially because instead of implementing the BiConsumer interface, one extends a new MapVisitor class, avoiding the extra overhead of interface method invocation. Such interface overhead is often — but not always — optimized away by the JIT, depending, for example, on the dynamic set of currently loaded, compiled, and actively executable classes and interfaces. There is no polymorphism here to complicate the optimization. A 0% to 20% improvement is actually seen but is unpredictable.
// com.infinitydb.map.MapVisitor is specific to AirConcurrentMap
class SummingMapVisitor extends MapVisitor<Object, Long> {
 long sum = 0;
 public void visit(Object k, Long v) {
 sum += v;
 }
}
// 0 to 20% faster than the BiConsumer interface
SummingMapVisitor summingMapVisitor = new SummingMapVisitor();
airConcurrentMap.visit(summingMapVisitor);
return summingMapVisitor.sum;
The Fork/Join Pool and Spliterators
Now let's drop into a brief discussion of the streams parallelism implementation — this is just background.
The streams parallelism is implemented internally using a ForkJoinPool, which is a kind of AbstractExecutorService. The pool is a set of Threads managed by the JVM that are scheduled dynamically, each with an input that is a queue of ForkJoinTask elements. The management of the queues is complex, involving 'work stealing' and other optimizations that would be inordinately delicate for clients to handle themselves.
The queue elements for streams are subclasses of Spliterator implemented by the Map, which move through the Map splitting themselves recursively at times. Each Spliterator instance executes its own code serially, but different instances execute in parallel. If a Map implementation does not provide a Spliterator, one is provided by default that uses arrays, normally with lower performance and more temporary memory usage.
It can be difficult for a Spliterator to decide when to split in such a way that all of the Threads finish at once, hence there can be a "tail" at the end of the stream operation while fewer and fewer cores are used. This is reduced using "work stealing." A Spliterator may also have trouble in judging when to split, especially if the tree is imbalanced, and it is necessary for it not to split too often, creating too much garbage and needlessl


1
$\begingroup$
I have a model like this with multiple outputs and i want to change it's output names
class MyModel(Model):
 def __init__(self):
 super(MyModel, self).__init__()
 self.layer_one = Dense(1, name='output_name_one')
 self.layer_two = Dense(1, name='output_name_two')
 def call(self, inputs):
 output_name_one = self.layer_one(inputs)
 output_name_two = self.layer_two(inputs)
 return output_name_one, output_name_two
keras automatically set output names to output_1, output_2, ... how can i change the output names to my desired names?
$\endgroup$
3
 - $\begingroup$ Are you using tensorflow.keras and the associated imports of Model and Dense, or a different source? For imports coming from tensorflow.keras with tensorflow 2 I am unable to reproduce your issue; for me, upon being built, the model in your example yields a model summary with the output names as desired. Similarly, using the functional and sequential apis in a similar way works fine for me. If you'd like, I'm happy to write an answer describing how to verify this. If you are using the same imports as me, in what verifiable sense is your code not changing the output names? $\endgroup$ May 18 '20 at 21:43
 - $\begingroup$ I am using tensorflow.keras with tensorflow 2.2 but my output names are output_1, output_2, ... i checked it in kaggle notebook and even in my local computer and i have this issue in both cases. @It'sRecreational $\endgroup$
 – amin msh
 May 18 '20 at 23:44
 - $\begingroup$ Huh, that is odd. In what sense are your output names output_1 and output_2? When you instantiate model = MyModel() and call model.summary()? Or in another context? If you can provide more details about your setup and what precise code is yielding output that is unintended, I can try to be of more help. $\endgroup$ May 19 '20 at 1:25
1
$\begingroup$
I also have this issue, but didn't have the answer with a customized Model. There is a workaround as follows:
 model = Model(inputs=inputs,
 outputs={'ctr_output': ctr_pred, 'ctcvr_pred': ctcvr_pred, 'cvr_output': cvr_pred})
$\endgroup$
0
$\begingroup$
maybe this is better in your case:
class MyModel(Model):
 def __init__(self):
 super(MyModel, self).__init__()
 self.layer_one = Dense(1, name='output_name_one')
 self.layer_two = Dense(1, name='output_name_two')
 def call(self, inputs):
 output_name_one = self.layer_one(inputs)
 output_name_two = self.layer_two(inputs)
 return {'custom_name_one': output_name_one,'custom_name_two': output_name_two}
$\endgroup$
Your Answer
By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy
Not the answer you're looking for? Browse other questions tagged or ask your own question.


Thermal design power
From Wikipedia, the free encyclopedia
 (Redirected from Thermal Design Power)
Jump to: navigation, search
This article is about the thermal design envelope of microprocessors. For the general concept, see power rating.
The thermal design power (TDP), sometimes called thermal design point, is the maximum amount of heat generated by the CPU that the cooling system in a computer is required to dissipate in typical operation. Rather than specifying CPU's real power dissipation, TDP serves as the nominal value for designing CPU cooling systems.[1]
The TDP is typically not the largest amount of heat the CPU could ever generate (peak power), such as by running a power virus, but rather the maximum amount of heat that it would generate when running "real applications." This ensures the computer will be able to handle essentially all applications without exceeding its thermal envelope, or requiring a cooling system for the maximum theoretical power (which would cost more but in favor of extra headroom for processing power).[2]
Some sources state that the peak power for a microprocessor is usually 1.5 times the TDP rating.[3] However, the TDP is a conventional figure while its measurement methodology has been the subject of controversy. In particular, until around 2006 AMD used to report the maximum power draw of its processors as TDP, but Intel changed this practice with the introduction of its Conroe family of processors.[4]
A similar but more recent controversy has involved the power TDP measurements of some Ivy Bridge Y-series processors, with which Intel has introduced a new metric called scenario design power (SDP).[5][6]
In some cases the TDP has been underestimated, leading to real applications (typically strenuous, such as video encoding or games) causing the CPU to exceed its specified TDP, thus overloading the computer's cooling system. In this case, CPUs either cause a system failure (a "therm-trip") or throttle their speed down.[7] Most modern processors will cause a therm-trip only upon a catastrophic cooling failure, such as a stuck fan or a loose heatsink.
For example, a laptop's CPU cooling system may be designed for a 20 W TDP, which means that it can dissipate up to 20 watts of heat without exceeding the maximum junction temperature for the laptop's CPU. A cooling system can do this using an active cooling method (e.g. forced convection) such as a fan, or any of the three passive cooling methods: convection, thermal radiation or conduction. Typically, a combination of these methods is used.
Since safety margins and the definition of what constitutes a real application vary among manufacturers, TDP values between different manufacturers cannot be accurately compared. For example, while a processor with a TDP of 100 W will almost certainly use more power at full load than a processor with a 10 W TDP from the same manufacturer, it may or may not use more power than a processor from a different manufacturer that has a 90 W TDP. Additionally, TDPs are often specified for families of processors, with the low-end models usually using significantly less power than those at the high end of the family.
The dynamic power consumed by a switching circuit is approximately proportional to the square of the voltage:[8]
P = C V^2 f
where C is capacitance, f is frequency, and V is voltage.
Variable TDP[edit]
TDP specifications for some processors may allow them to work under multiple different power levels, depending on the usage scenario, available cooling capacities and desired power consumption. Technologies that provide such variable TDPs include Intel's configurable TDP (cTDP) and scenario design power (SDP), and AMD's TDP power cap.
Configurable TDP[edit]
Configurable TDP (cTDP), also known as programmable TDP or TDP power cap, is an operating mode of later generations of Intel mobile processors (as of January 2014) and AMD processors (as of June 2012) that allows adjustments in their TDP values. By modifying the processor behavior and its performance levels, power consumption of a processor can be changed altering its TDP at the same time. That way, a processor can operate at higher or lower performance levels, depending on the available cooling capacities and desired power consumption.[9]:69–72[10][11]
Intel processors that support cTDP provide three operating modes:[9]:71–72
 - Nominal TDP – this is the processor's rated frequency and TDP.
 - cTDP down – when a cooler or quieter mode of operation is desired, this mode specifies a lower TDP and lower guaranteed frequency versus the nominal mode.
 - cTDP up – when extra cooling is available, this mode specifies a higher TDP and higher guaranteed frequency versus the nominal mode.
For example, some of the mobile Haswell processors support cTDP up, cTDP down, or both modes.[12] As another example, some of the AMD Opteron processors and Kaveri APUs can be configured for lower TDP values.[10][11][13] IBM's POWER8 processor implements a similar power capping functionality through its embedded on-chip controller (OCC).[14]
Scenario design power[edit]
Scenario design power (SDP) is an operating mode of certain later generations of Intel's mobile processors (as of January 2014), allowing them to work at much lower power levels when compared to similar mobile processors not featuring the SDP. In other words, SDP is an additional lower power level a processor is certified to work at, providing an additional reference design point for power-constrained platforms. Such processors can still exceed their SDP specifications and operate at higher power levels under certain workloads and with appropriate cooling capacities provided; for example, SDP-enabled processors can reach their TDP power levels.[5][15][16]:71
For example, Y-series (extreme-low power) mobile Haswell processors support SDP.[17]
See also[edit]
 1. ^ Mike Chin (2004-06-15). "Athlon 64 for Quiet Power". p. 3. Retrieved 2013-12-21. Thermal Design Power (TDP) should be used for processor thermal solution design targets. The TDP is not the maximum power that the processor can dissipate.
 2. ^ "The technical details behind Intel's 7 Watt Ivy Bridge CPUs". 2013-01-14. Retrieved 2013-01-14. In Intel's case, a specified chip's TDP has less to do with the amount of power a chip needs to use (or can use) and more to do with the amount of power the computer's fan and heatsink need to be able to dissipate while the chip is under sustained load. Actual power usage can be higher or (much) lower than TDP, but the figure is intended to give guidance to engineers designing cooling solutions for their products.
 3. ^ John L. Hennessy; David A. Patterson (2012). Computer Architecture: A Quantitative Approach (5th ed.). Elsevier. p. 22. ISBN 978-0-12-383872-8.
 4. ^ Ou, George (2006-07-17). "Who to believe on power consumption? AMD or Intel?". ZDNet. Retrieved 2014-02-11.
 5. ^ a b Anand Lal Shimpi (2013-01-14). "Intel Brings Core Down to 7W, Introduces a New Power Rating to Get There: Y-Series SKUs Demystified". Retrieved 2014-02-11.
 6. ^ Crothers, Brooke (2013-01-09). "Intel responds to cooked power efficiency claims". Retrieved 2014-02-11.
 7. ^ Stanislav Garmatyuk (2004-03-26). "Testing Thermal Throttling in Pentium 4 CPUs with Northwood and Prescott cores". Retrieved 2013-12-21.
 8. ^ "Enhanced Intel SpeedStep Technology for the Intel Pentium M Processor (White Paper)" (PDF). Intel Corporation. March 2004. Retrieved 2013-12-21.
 9. ^ a b "4th Generation Intel Core processor based on Mobile M-Processor and H-Processor Lines Datasheet, Volume 1 of 2" (PDF). Intel. December 2013. Retrieved 2013-12-22. Configurable TDP (cTDP) and Low-Power Mode (LPM) form a design vector where the processor behavior and package TDP are dynamically adjusted to a desired system performance and power envelope. [...] With cTDP, the processor is now capable of altering the maximum sustained power with an alternate guaranteed frequency. Configurable TDP allows operation in situations where extra cooling is available or situations where a cooler and quieter mode of operation is desired.
 10. ^ a b Michael Larabel (2014-01-22). "Testing Out The Configurable TDP On AMD's Kaveri". Phoronix. Retrieved 2014-08-31.
 11. ^ a b "AMD Opteron 4200 Series Processor Quick Reference Guide" (PDF). Advanced Micro Devices. June 2012. Retrieved 2014-08-31.
 12. ^ "Sony Vaio Duo 13 Review". 2013-07-22. Retrieved 2014-02


text:
Value with Line – Hatching & Cross-Hatching Lesson Plan
By Michelle C. East 2016 (All Rights reserved)
Lesson Plan & Worksheet: Practical, hands on Hatching and Cross-Hatching lesson for 4th grade through Adult. (3 Page PDF)
Includes lesson objectives, delivery, project suggestions, and worksheet.
- Lesson covers:
- Purposes for lines
- Types of Lines (Line Family)-
- Value: Shadows and Highlights
- Creating Values through Lines: Hatching and Cross-hatching
- Practice hatching & cross-hatching the forms (following contour of forms)
Additional Activity: Students draw geometric forms from direct observation, then apply value with hatching and cross-hatching lines.
Project Suggestions: Chex Mix Cross-Hatching Drawing and Still Life
© Michelle C. East Create Art with ME 2016 – Reproducible for CLASSROOM use only.

source: openbmb/Ultra-FineWeb


text:
SLOS754C June 2012 – August 2016 DRV2603
Information in the following applications sections is not part of the TI component specification, and TI does not warrant its accuracy or completeness. TI's customers are responsible for determining suitability of components for their purposes. Customers should validate and test their design implementation to confirm system functionality.
The DRV2603 is designed to drive ERM and LRA actuators used for haptic feedback. ERM and LRA actuators can be used for numerous haptic feedback applications including vibration alerts, advanced vibration communication, button replacement, and tactile feedback for touch surface or screens.
The DRV2603 output is controlled using PWM input. The duty-cycle of the PWM determines the amplitude of the output waveform. By varying the duty cycle, advanced haptic patterns and sequences can be created such as click, bumps, pulses, ramps and many more.
If a PWM port is not available, the DRV2603 PWM pin can be controlled with a GPIO; however, the DRV2603 will only function as an ON-OFF driver. In the case of an ERM, when the GPIO is ON the output is 100% and when the GPIO is OFF the output is -100% (opposite direction). In the case of an LRA, when the GPIO is ON the output is 100% and when the GPIO is OFF the driver automatically brakes and will automatically bring the actuator to rest.
The DRV2603 supports both ERM and LRA actuators. The operating mode can be selected by pulling the LRA/ERM pin either HIGH or LOW. Figure 13 shows the LRA configuration and Figure 14 shows the ERM configuration.
This design assumes the values listed in Table 1.
|DESIGN PARAMETER||EXAMPLE VALUE|
|Actuator Type||ERM / LRA|
|Input Power Source||Battery|
The actuator decision is based on many factors including cost, form factor, vibration strength, power consumption requirements, haptic sharpness, reliability, and audible noise performance. The actuator selection is one of the most important design considerations of a haptic system and therefore the actuator should be the first component to consider when designing the system.
The following can be used to select the minimum required supply voltage.
A minimum supply current is also required based on the load. To ensure enough current can be sourced divide the supply voltage above by the load resistance in the actuator datasheet. Compare this number with the current capability of the battery or voltage supply.
The DRV2603 supports supply voltages from 2.5 to 5.2V. The DRV2603 can be directly connected to many battery types including common batteries like Lithium-Ion and Lithium-Polymer. The supply rejection feature of the DRV2603 eliminates the need for a voltage regulator between the battery and VDD.
Sending a haptic effect with the DRV2603 is straightforward. The procedure is the same for both ERM and LRA drive. The ERM/LRA pin should be tied high or low as shown in the system diagrams. Optimum performance is achieved by using the following steps.

source: m-a-p/FineFineWeb


text:
Reader question: "I have read that you need to leave your ball python alone when it's going through a shed. How soon after a shed can I handle my ball python?"
You can handle it immediately after a shed. You don't have to worry much about it, after the snake has shed. The hands-off period occurs before the ball python sheds — not after.
When the snake first starts to go "blue," it will start hiding more than usual. Its eyes will get cloudy, and the skin tone will become darker. This is a normal part of the shedding process. This is when you should avoid handling the ball python. The snake's eyes will have an opaque layer over them, so it won't be able to see very well. Handling at this time can cause the animal stress. How would you like to be picked up by something you couldn't see?
Ball pythons feel vulnerable when they're going through a shed cycle. That's why you should avoid handling them, until after they shed.
When your snake goes into the "blue" phase leading up to a shed, you might want to increase the relative humidity inside the enclosure. Snakes use moisture to separate the old skin layer from the underlying layer. That's why it's so important to keep your ball python well hydrated — it helps them shed properly, all in one piece.
You can handle the ball python anytime after a shed. Just leave it alone when it's going into the shed. If you have additional questions about ball python care, you can download our e-book on the subject. You can also post a question to our Q&A forum.


text:
In modular construction, sections of a building, called modules are constructed in an element-controlled facility offsite, then transported to the construction site where they are assembled and integrated into the rest of the building. They are engineered and fabricated to meet the same building codes as traditionally on-site built structures. Modular construction components are inspected multiple times throughout the construction process as well as onsite during the time of assembly to ensure structural integrity. Modules can be completely customized to ensure desired floor-plans and finishes are met. Builders can also use a method known as panelized construction, to prefabricate specific components of the building such as wood panels, wood framing, and panelized steel walls to be later-integrated onsite.
Why Modular and Panelized Construction?


text:
Wii lär oss dansa?: Om dansspel, rörelsekvaliteter och lärande i idrott och hälsa
2014 (Swedish)Licentiate thesis, monograph (Other academic)
Few studies have focused on how learning takes place in physical education and health (PEH) practices, and even more so in relation to artifact use. Dance is a core content in the Swedish curriculum, but according to previous research it nevertheless rarely occurs in practice due to many teachers' lack of knowledge. Movement qualities are something that students are supposed to develop in the subject, where dance can be used as a form of activity.
The aim of the licentiate thesis is to examine students' use and development of different movement qualities in a learning process where dance exergames are used as teaching aids in the PEH practice in upper secondary school. The research questions in the study are: (1) what kind of movement qualities do students use when they interact with each other and with dance exergames, and (2) how does the learning of movement qualities occur when dance exergames are used as teaching aids?
A series of seven PEH-lessons were designed. Four of the lesson had a spe-cific purpose, such as working with rhythm and coordination where the exergames Nintendo Wii Just Dance 3 and 4 were used as teaching aids. In two other lessons the students worked in groups to create their own dances, and as a final goal, at lesson seven, the groups presented their dances. All the lessons were video recorded. A framework inspired by Laban's movement analysis was used to analyze the students' movement qualities, based on four aspects: body, space, effort and relationship. To be able to analyze the students, the dance exergames and the context as a whole, the study involved a socio-cultural ap-proach to learning. Learning situations in the ongoing practice were also ana-lyzed, where learning was investigated as something that occurs through inter-actions between students and between students and artifacts.
The results show a way to describe students' movement qualities, which con-tribute to PEH-teachers language of knowledge in movement. The results also demonstrate that learning occurred through imitation, repetition, communica-tion, negotiation, practice, modeling, instruction and using metaphors. A con-clusion is that students' use and development of movement qualities do not depend on the use of the dance exergames per se, instead it depends on how the dance exergames are used in PEH practice.
Place, publisher, year, edition, pages
Stockholm: Gymnastikoch idrottshögskolan, GIH, 2014., 177 p.
exergames, movement qualities, learning processes, dance, physical education, Laban, movement framework, socio-cultural perspective, artifact
Research subject Social Sciences/Humanities
IdentifiersURN: urn:nbn:se:gih:diva-3345OAI: oai:DiVA.org:gih-3345DiVA: diva2:729165
2014-06-11, Sal 1506, GIH, Lidingövägen 1, Stockholm, 13:00 (Swedish)
Winther, Helle, lektor
Larsson, Håkan, professorQuennerstedt, Mikael, professor


Carbon and Climate Change in Florida
Climate change is already having an impact on Florida. On Monday the EPA announced new rules that aim to reduce carbon emissions. The goal is to reduce emissions 30% by 2030 compared to 2005 emissions.
U.S. Representative Ted Deutch from Florida's 21st district says we can't afford to ignore the problems caused by climate change. The nonprofit Environment Florida conducted this interview with Representative Deutch.


text:
in situ Electrochemical STXM
WHAT: An apparatus to allow scanning transmission X-ray microscopy of the electrodes, electrodeposits, and electrolyte of an active electrochemical cell has been developed and its performance demonstrated. Tracking of potential induced chemical changes at a single point can be performed at 1 msec periodicity. Mapping changes as a function of applied potential along a line or over an area can also be performed. The figure shows the apparatus and sample results for spectral changes in the C 1s region associated with electrochromism of polyaniline. For more details please see the publication.
OTHER INFORMATION: : Guay et al. Analytical Chemistry 77 (2005) 3479-3487
WANT FURTHER INFORMATION ? CONTACT Adam Hitchcock
© 2016 A.P. Hitchcock / McMaster University
- All Rights Reserved


Enquire Today
 - Home
 - Resources
 - How much does it cost to claim against an estate?
How much does it cost to claim against an estate?
In Queensland, there was a perception for a long time that the estate covered the costs for both the successful and unsuccessful parties when claiming against the estate. This is not necessarily the case.
In most instances, the estate covers the costs of the successful party, and in some cases, the unsuccessful party has to pay the legal costs to the estate, but this isn't always the case. In Queensland, the issue of costs is at the discretion of the court. The Court will often discourage a claim if it feels the estate is too small and encourages it to be settled out of court. This prevents the estate from being eroded by legal fees, which can happen if the matter needs to be settled in the court system.
Recent cases in Queensland have seen The Court take the conduct of the claimant into consideration when awarding costs rather than just whether they were successful or not.
It is important to follow the correct process when claiming against an estate. If you have further questions on how to make a claim against an estate click here.
We provide a detailed analysis of your claim before commencing proceedings, so you are fully aware of your legal position and potential costs involved. If you would like more information on this important subject, please contact us.


As pH lowers over time, the culture can defend itself from invading organisms that compete for food above and below the ideal growing range. You can still use the starter in a recipe when it has doubled in volume (minimum waiting time) but you should let the starter peak and look for other indicators of maximum population before giving it a maintenance feed. This is how to keep the starter healthy and working well for you.
I should also add that different flours behave & rise differently. Wheat is the standard, but rye and spelt starters are also being used more often. A rye starter can be a great starter but it is good to keep in mind that it will only rise within a certain time frame (and hydration) before the matrix falls flat even when the yeast number are low. Even more so with spelt. They can give you a false sense of when the food is used up. Rye prefers warmer temps for elasticity, it contains enzymes that break down the gas trapping abilities releasing gas sooner than wheat. Rye can also get stiff and not stretch forming a skin when wheat would keep rising like in a refrigerator. It doesn't mean the starters can't preform in freshly mixed dough.
Important to know the smell of your starter and to watch the times and temperatures. Look at the rye starter structure when stirring. A good sigh is when it can trap gas while being slowly stirred yet be full of gas, like a foam and have the strong yeast, fruit aromas to go with it. If the starter seems slow to rise, let it stand longer before feeding it making sure you get good yeast aromas before inoculating or adding more flour. Build the yeast population in the starter before using in a recipe. Go by your nose and taste and not just rises. Yeast taste should not be an aftertaste that sneaks up on you after tasting the starter, good to have it but it should be there from the first taste. If not, wait out several yeast population production cycles (one cycle I believe is between 45 min to 120 min) to build yeast numbers before feeding again.
leftypg's picture
Hi Mini.
Thank you for your prompt reply. If you don't mind, I would like to dig a little deeper into the'strength' of the starter.
If we were to consider a typical 12 hour period at room temperature, with the starter in question---Maybe you can give me a peek through your microscope? After feeding, it took three and a half hours to reach 2.5X and more or less stayed that way until I Stirred it Down. After the first SD, it took only one hour to reach 2X and in one more hour it rose to 3.5X (total of 2 hours to reach 3.5X). It pretty much did the same thing after 2 additional Stir Downs--I re fed it after 12 hours. What I would like to know is at what point did it reach the 'Peak' and is it 'then' or some time after that the best time to start baking?
Thank you for your patience,
leftypg's picture
Sorry for the double post-I hit the wrong button!
I also noticed that you added material to you last post---Most informative! Does the last paragraph pertain to wheat as well as Rye?
dabrownman's picture
believe that there are chemical reactions going on in a large, room temperature starter that requires large feedings and much waste along the wayand they might be right - there are several things I have learned as a non professional baker over the years.
First, most professional bakers don't bake much SD bread to begin with and, if they do, they don't necessarily need huge amounts of starter or levain. Many fine SD bakeries don't have any Starter nor do levain buildning. They just use a'mother' or 'old dough' from the previous days bake instead. Like a homembaker they don't want any waste - if they aren't baking the Tartine or Forkish way. Heck, they don't even throw away old bread they can't sell. They just use it as altus in some future bake. They bake every day on a schedule and they make sure to use all of their SD builds trying not waste anything that would lower their already meager profits. It's just part of being a good professional baker.
Second, being a home baker making 1 or 2 loaves of bread a week, after decades of either keeping a large starter, over 300 g, on the counter wet, feeding it often and wasting a lot, or keeping it in the fridge and feeding it less often and wasting half as much or keeping 80 g of firm starter, never feeding and wasting anything - the only difference I have noticed is that the firm starter, kept in the fridge no muss, fuss or waste, produces bread that is much more sour than a wet starter kept on the counter and fed often and wasting a lot of flour. This difference is easily detectable by anyone with just one bite.
I'm not good enough as a home baker, to be able to taste or see anything these small chemical reactions that large, wet starters supposedly produce that professionals can somehow detect and feel worthwhile to make happen. But most are using old dough and not throwing anything away. They still really have a fairly fresh levain, even if called old, at slightly less than 24 hours old. I try to get a few days of age on my levains if i can.
If I want a bread that doesn't taste sour I won't use a SD starter at all, I will use YW or a pinch of commercial yeast to make an overnight poolish or biga.
For me as a home baker, the choice is a no brainer. 80 g stiff starter in the fridge that takes no maintenance, has no waste and makes more sour bread is the only way to go.
I too follow a rough doubling rule of thumb when building a levain. A (3) stage build of 4 hours each build always seems to work work well but it is not not any better than a (1) 12 hour or (2) 6 hour stage build from my experience if you stir them down every 4 hours. If I am making one 800g to 1000 g loaf, I would take 10 g of 60% hydration starter (that has 6 g of flour in it) and feed it 10 g of flour and water each for the fist build making 30 g total, For the 2nd build I would double the flour and water and feed it 20 g each of flour and water making a total 70 g. The 3rd stage would be 40 g each for a total of 150 g of full strength levain at near 100% hydration - about 15-18% of the total dough weight.
A single 12 hour build of 70g each of flour and water added to 10 g of 60% hydration starter works just as well. A 24 hour, 1g starter to 75 g each flour and water also works if you have the time.
If you retard the levain build after feeding the 3 stage for 2 days and then let it finish doubling on the counter it will make for a more sour bread as well. Labs like cold more than yeast and reproduce at 3 times the rate of yeast if held 36 F. By retarding levains, starters in the fridge you inoculate your dough with much more labs than yeast. By retarding the inoculated dough in the fridge you produce more labs than yeast. These methods all make your bread more sour.
If you do a final proof at between 85 F and 88 F, the labs also reproduce at 3 times the rate of yeast at those temperatures so your bread will be more sour than proofing a room temperature where labs and yeast reproduce at nearly the same rates. Long, low temperature before final proof at the starter, levain and dough fermenting stages and high temperature final proof should give you the most sour in your breads with any given starter. It's just science at work, no faith or beliefs required.
Happy Baking


text:
Focusing geometry-induced size tailoring of silver nanoparticles obtained by laser ablation in water
AuthorsStašić, Jelena M.
Mihailescu, Ion N.
MetadataShow full item record
Silver nanoparticles were obtained by picosecond laser ablation in water at 1064 nm, using focusing geometry to design the particles size. The position of the target surface with respect to the focal point strongly influences the NPs size: above and in the focus it is up to 20 nm and below focus LT = 150 nm. Generated particles have a spherical shape. The solutions were further employed on human cells and the tests showed a deteriorating effect on DNA.


F Ikebana Today 38 ~ Shoso Shimbo
Tuesday, 4 August 2015
Ikebana Today 38
To answer the question, "Is Ikebana art?", we need to look into the history
of Ikebana as well as that of art in the 20th century. When and how did they
interact in that century? While it is relatively easy to overview the
history of Ikebana, the history of art seems to be so chaotic.
I found contemporary art and its history are very hard to comprehend. In
particular the Japanese literature on the topic is difficult to
comprehend. Why do they have to be like that? Maybe because they are talking about something they don't really understand?
Fortunately, a number of great introductory books on contemporary art have
been recently published. I guess that many people must have felt the same
way about the literature on the contemporary art. One of the books I liked
was "Why Is That Art?" by Terry Barrett, Oxford U.P. (2012). From the
reading of the book, I will summarise the history of art briefly in the next
This small work is a good example of assembling different plant materials in
harmony. The process of making it was a true meditation. I'm going to use
this image for my free calendars for next year. Please download them for
free from my website. You can also read my articles published in Living Now
for free online. Lastly, please check the results of the Ikebana Gallery Award 2015 in my site.


text:
Rural Children More Likely Living in Cohabiting Households
By Beth Potier, Media Relations
July 8, 2009
As cohabiting – opposite-sex unmarried partners living together in households – increases nationwide, new data show that the growing rate of children in cohabiting households is most pronounced in rural areas. A new brief from the Carsey Institute at UNH analyzes recent U.S. Census Bureau data to explore trends and patterns among children in cohabiting households in rural America.
The brief finds that the share of rural children living in cohabiting households has nearly doubled since 2000, from four to seven percent. During the same period, the share of urban children living in cohabiting households rose only slightly, from three to four percent. This pattern runs counter to the normal flow of social trends, which start in urban areas then spread to rural areas.
"We think that growing economic stress in rural America is in part driving this rapid increase of cohabiting in rural households," says report author William O'Hare, a Carsey Institute policy fellow and senior fellow at the Annie E. Casey Foundation. "The jump in the share of rural children living in cohabiting households has occurred since 2000, when economic conditions in rural America began to deteriorate."
O'Hare and his co-authors - Wendy Manning, Meredith Porter and Heidi Lyons -- state that for single rural women with children, joining a household with a man may be an economic survival strategy. While cohabiting families have poverty rates double those of married-couple households, they are less than half those for single-mother households.
Among the additional findings of the policy brief:
- The number of children living with cohabiting parents has increased more rapidly than any other family form during the past decade.
- The poverty rate for rural children in cohabiting households is 21 percent, compared to only 15 percent in cohabiting urban households.
- Relative to their urban counterparts, rural adults in cohabiting households with children have lower levels of education, employment and income.
- Rural cohabiting-parent families are more vulnerable economically than their urban counterparts, with 60 percent of rural children in cohabiting households in low-income households (below 200 percent of the poverty line) versus 47 percent of urban children.
The brief notes several policy implications of these findings. Cohabiting parents may be good targets for marriage education – an initiative of the federal government – as they are "closer" to marriage than unmarried parents who live apart. Further, cohabiting women in rural areas are more likely to marry their cohabiting partners than their urban counterparts.
Needs-based public assistance programs treat cohabiting couples unevenly between states, which could have a greater impact on rural families, since nearly half of cohabiting rural households with children receive some type of means-tested public assistance, in contrast to about one-third of urban cohabiting households. This lack of consistency in eligibility could result in some families losing out on necessary services.
And finally, because the official measure of poverty does not include the income of a cohabiting partner as part of the family income, poverty numbers are likely overestimated. As the number of cohabiters has grown significantly since the mid-1960s, when the government implemented its poverty measure, so has the potential impact of mismeasurement. Again, because cohabiting-parent families are a larger share of families in rural America, such mismeasurement would have a larger impact on poverty figures for rural children.
To download a copy of the report, go to _URL_

source: HuggingFaceFW/fineweb-edu


text:
Delve into the thrilling world of forensic science with our 'Bones' puzzle, available exclusively on English Quiz! Challenge your knowledge of this popular crime drama series by matching characters and identifying key elements from the show. Join the brilliant forensic anthropologist Dr. Temperance Brennan and FBI Special Agent Seeley Booth as you piece together the mysteries of human remains. Whether you're a die-hard fan or a puzzle enthusiast, this activity is sure to captivate. Hone your memory and detective skills while immersing yourself in the world of 'Bones.' Dive into the investigation now and prove your expertise in forensic crime-solving!
Bones Word Search Puzzle Online Free [With Answer Key]


parallel.
But why can we do this? The answer is associativity. The reason why this functions is because the max operation has the nice property of
 max(max(a,b),c) = max(a,max(b,c))
which by definition is the mathematical property of associativity. It's the independency of order of operation that give us the guarantee we need to abstract away and parallelize immediately.
There is yet a catch, however. Associativity help us abstracting the funcitonal power by avoiding dealing with order of operations but we still need to track the number of operations in transit. Sounds strange? Lets imagine that we have the max operation running into 3 different threads and we want to avoid deal directly with the low level operation of distributing accuratelly all the elements to compute.
Imagine that I have A=[a,b,c,d] and max_1, max_2, max_3 the max function running on three threads. We could compute the final result as
 res = max(max(max_1(A1),max_2(A2)),max_3(A3)) where A1=[a,b], A2=[c,d], A3=[]
notice that max_3(A3) doesn't make much sense because as it is would force us to break this function composition. But notice that under these semantics max([]) is equivalent to compute max(0,0) assuming a,b all positive. So the result is the same as
The same goes if A3=[f]. This would be equivalent of computing max(f) = max(f,0)
So what are we talking about here? The presence of identity over the operation give us a way to abstract the number of function composition. So we add a new layer of abstraction over the tooling of functional programming.
Ok. But in the beginning you talk about monoids. What does all this mumbo jumbo have to do with them.
Well by definition a monoid is just that, a set with an operation that have associativity property and identity element.
Deep, Dark web
An ocean of data
Yes. You can see the internet as an ocean. When you think of the ocean it comes to your mind, most certainly, two very different pictures of it. One above, another bellow the ocean surface. Much like the case of an Iceberg, you
_URL_ 31 Mar 2018 12:40:08 GMTDeep, Dark web
An ocean of data
Yes. You can see the internet as an ocean. When you think of the ocean it comes to your mind, most certainly, two very different pictures of it. One above, another bellow the ocean surface. Much like the case of an Iceberg, you know that much more has to be seen bellow the surface than that above. Well, the same happens with internet data. On the internet the ocean surface is the data that is indexable by the search engines. Some also call it the visible web. This is because people mainly use search engines to search for new data. If some data is availabe on the internet but is not indexable by a search engine we say that this belongs to the deep web.
Yeah sure, but what about the dark web?
Dark web is not indexable by search engines so it is certainly a part of the deep web. The term is not particularly clear but we can say that these are contents that are available on the internet in the form of an overlay network. Virtual Private Networks (VPNs) are a particular case of a overlay network which, also, is not indexable by search engines. Most certainly it should be considered part of the dark web, but it isn't. The same happens for contents presented in mail servers, private cloud providers and so on. So the definition it seems to be a little bit wrong. From what we see in popular culture. The best definition found was
This seems more accurate. With this definition it is easy to see why mail server contents, vpn networks and data based in private cloud service providers don't belong to the dark web.
Tor and the Onion Services
One particular case of service that definetly belongs to the dark net is all the content served in The Onion Router. The Onion Router is a routing system of the best onions on the planet? Well, not exactly. But yes it is a routing system. The Onion Router has its name derived from the way it routes the traffic, onion routing
Onion Routing
The above picture is a good visual explanation for what is happening when your surf the web through the TOR system. Your traffic is encripted and sent into a total of three hoops from a pool of available peers.
Tor Hoops
The traffic is encrypted beetween all the nodes to provide secrecy. By avoiding direct connections between nodes and services it adds another feature some degree of anonimity. Note, however, that the traffic between the last tor node and the end service may be not encrypted and so can leak confidential and compromisable information. The nodes in the tor network that forwards the messages are called relays and the last, the one that does the last jump, is called exit relay. In the picture above the node that communicate directly to Bob is the exit relay.
Tor and VPN
Virtual Private Networks are a particular case of overlay network that sits on top of an underlying network, usually internet. Since tor is a web based application used to route http/https services it is possible that other applications running in your pc leak important information that enable eavesdropping through data correlation. To add a higher level of anonymity it is usual to see a combination of tor and vpn services.
Onion Services
Initially Tor was developed to achieve privacy and anonymity on web browsing with the use of an onion routing system. This had been of great help for many human beings that were behind the censorship of many, not so open, countries. However the onion routing only solves one side of the censorship. While many people found a way to connect to censored data they were not able to publish their own information. Imagine Bob in North Corea. With onion routing Bob was able to read the Le Monde in France. Bob was not able, however, to build his own version of Le North Corea web site. Why? Services on the web follow the traditional domain approach. For this he would need to register a domain and host his own website with the newspaper data. To block the access and identify the person responsible for the site is a trivial job. By following this road Bob would end, quickly, in one small cell in a cold place in North Corea.
It was needed a reverse onion routing system
To achive bi directional anti censorship mechanism the tor project devise a scheme called onion services. The idea is an extension to the onion routing already implmented, a rendevouz point and a service discovery mechanism.
Onion Service
The service discovery, responsible to resolve an identifier into a host, is implemented as a distributed hash table a descentralized data structure. With a descentralized approach tor difficults the mission of censorship agents.
But wait! If the service discovery resolves to Bob he is in a nasty situation.
Thats true. Hence a rendevouz endpoint. Rendevouz endpoints are nodes that will bridge the contents provided by Bob. While these onion hidden services are not bulletproof they offer a pretty good way of censorship circunvention.
All very interesting. But what has all this has to do with dark net or deep web?
Fair enough. First note that onion services run on the onion routing framework. Since TOR is an overlay network in the internet the content available as a onion service is not indexable by web search engines since these target primary content available in the primary network, the internet.
But there is more. By looking to the main goal of tor arquitecture we also must conclude that onion services belong to the dark net since tor adds a fair amount of secrecy and anonymity.
Yes this is all very interesting but what are we really talking about here? Where can I find and use these dark sites?
Since they run on the tor overlay network you will not find them with your tradicional browser and google queries. First you must download tor browser. This is a mozilla firefox based browser that was addapted to route your traffic through the onion.
But yeah. What now? Now you must search for.onion endpoints. These are not readily available from traditional search engines. However after some digging you'll find specialized onion search engines like the TORCH or Ahmia.
Underworld Services
After spending some hours these are some of the hidden services found
These are some of many, many more hidden services available. Unfortunately these are bad examples that give bad reputation to the network. The problem with this type of services is that they give bad reputation to a good tool. In the future if the gross majority of tor traffic is used for criminal activities those who need this tool the most will mostly suffer from increase censorship from states.
The idea with this post was to serve as an introduction to a not so mainstream set of tools the cons and pros and ultimately the future of private privacy as we know it.
And so..
In the previous post we had quick overview over the history of web development, how and why virtualization happens to be a huge success and all of this without a single line of code.
Impressive, the power of the mumbo jumbo we can deliver...
In this post we
_URL_


text:
More than 150 students at U-E's George F Johnson Elementary School took part in a Festival of Learning.
The kids picked something that they are interested in and then researched it. Projects included the history of Lego's, how maple syrup is made and paper airplanes. The goal of the festival, which is sponsored by the school's PTA, is to encourage kids to learn outside of the classroom.
5th grader Haley Bowman explains her project. "I did the Tunkhannock Viaduct. It's a bridge. Viaduct stands for a bridge that has arches."
Haley chose the viaduct because her grandparents lived close to it. She says it took three years to build with 500 men working on it.


Internet Radio
Last Updated: December 9, 2016
Definition - What does Internet Radio mean?
Internet radio is an audio service that uses the Internet as a distribution medium of broadcasting instead of the traditional radio waves. The proper term used for internet radio is webcasting, as it is not actually broadcast through wireless signals. It is a form of streaming media where content is usually provided live instead of being prerecorded like some podcasts.
Techopedia explains Internet Radio
Internet radio refers to audio services that are transmitted via the Internet. Most are associated with a traditional radio station that simply streams its content over the internet in simulcast with traditional radio signals.
Other internet radio stations are independent. The beauty of internet radio is that it has a global reach. Anyone, anywhere with a PC, mobile device and web browser can to connect to an internet radio station.
Internet radio may also refer to standalone devices that connect to the internet via Wi-Fi or a local area network (LAN) in order to stream Internet radio audio services. These devices are usually shaped like traditional FM radios for nostalgia, while some manufacturers use a modern design approach.
Share this:


text:
What is FIELD Kits?
FIELD Kits are Friendly, Interactive, Engaging, Learning, Discovery kits that connect students to nature while providing a lesson plan, tactile components, indoor and outdoor activities, all requiring little to no volunteer support, and easing preparation work for teachers. For more information, please visit fieldkits.ca.
FIELD Kits aspire to connect children to nature and develop an understanding of its importance with the hope of inspiring environmental conservation and recognition to preserve our environment.
FIELD Kit Workshop
You will not need any special materials. However, your participation will be most appreciated.
Kenzie Field is the Founder and Operator of FIELD Kits. She is very passionate about the environment and enlightening our youth on environmental issues, concepts, and critical thinking skills.
Her passion for the environment extends back to her early childhood. She remembers always being outside, wind in her hair and wonder in her eyes. Still, to this day, she holds a special place dear to her heart, Deception Pass in Washington, United States. Here is where she camped every year with her family. The campsite was within 3,854 acres of thick forest, surrounded by 77,000 feet of coastal shoreline, and three lakes. How can you not fall in love with nature?
She remembers venturing onto coastal rocks, with her brother and friends, to find the tide at the perfect moment hitting the coastal rocks and creating a blowhole effect. The wave would be forced through the hole, spraying us as we screamed with excitement. It was her time spent discovering the little aspects of nature; while picking up stones, watching how the small crabs would move and scuttle to find shelter, or how slugs don't like salt (not a proud moment but she learned a valuable lesson). However, nothing beats the memory of her climbing this beautiful 840-year-old Douglas fir tree, with her best friend. Each step or pull up of its branches, she became overwhelmed with falling but filled with excitement to gain more elevation to see the stretch of ocean. Her heart grew whole when surrounded by nature.
When she decided to go back to school, she searched for the perfect university. It didn't take much convincing when she stumbled upon Royal Roads University, a campus built around Hatley Castle, Hatley Park National Historic Site, and the Pacific ocean. As well, the chance to attain a Bachelor of Science in Environmental Science. During this year, she's given the great honour of meeting an inspiration of hers, Jane Goodall. Meeting her was motivational, but that got her thinking. How could she be?
She spent the next seven years working as an environmental educator, learning and educating young minds. She taught pre-school to grade 9's in science topics such as adaptations, wetlands, and ecosystems. She was also a part of developing and implementing curriculum-based programs. While working as an environmental educator, during summer camps, she read her favourite book, "The Lorax," by Doctor Seuss. Without fail, she begins to choke up while reading, "UNLESS someone like you cares a whole awful lot, nothing is going to get better. It's not." It was at this moment that she realized how many children are not exposed to nature and then, unfortunately, don't particularly care about it.
Now, she feels it is time to branch out and create a legacy of her own, focusing on connecting more minds to nature, but, more importantly, having children connect and care about the natural world around them.
Kenzie's objective is to provide FIELD Kits as an alternate resource for teachers to lighten their extensive curriculum content and reduce their stress for volunteer help. As well, engage students with hands-on or bio-fact pieces that they can connect with personally and, therefore, understand further when exposed to these concepts, animals, and or plants outside their school environment.
Kenzie is very passionate about children having the opportunity to connect with nature, and this is her reason WHY she has created FIELD Kits. She believes if children are exposed to the incredible natural world, as she was, children's hearts will be more inclined to share their experiences and passion with other children. More importantly, they are willing to help protect it.


text:
Difference between Simple and Complex View in SQL
A View in SQL as a logical subset of data from one or more tables. Views are used to restrict data access. A View contains no data of its own but it is like a window through which data from tables can be viewed or changed. The table on which a View is based is called BASE Tables.
There are 2 types of Views in SQL: Simple View and Complex View. Simple views can only contain a single base table. Complex views can be constructed on more than one base table. In particular, complex views can contain: join conditions, a group by clause, order by clause.
Working of views:
When call view in SQL query it refers to database and finds definition of views which is already stored in database.
Then the DBMS convert this call of view into equal request on the base tables of the view and carries out the operations written in view definition and returns result set to query from which view is called.
The key differences between Simple and Complex types of Views are as follows:
Contains only one single base table or is created from only one table. |
Contains more than one base table or is created from more than one table.|
We cannot use group functions like MAX(), COUNT(), etc. |
We can use group functions.|
Does not contain groups of data. |
It can contain groups of data.|
DML operations could be performed through a simple view. |
DML operations could not always be performed through a complex view.|
INSERT, DELETE and UPDATE are directly possible on a simple view. |
We cannot apply INSERT, DELETE and UPDATE on complex view directly.|
Simple view does not contain group by, distinct, pseudocolumn like rownum, columns defined by expressions. |
It can contain group by, distinct, pseudocolumn like rownum, columns defined by expressions.|
Does not include NOT NULL columns from base tables. |
NOT NULL columns that are not selected by simple view can be included in complex view.|
In simple view, no need to apply major associations because of only one table.|
In complex view, because of multiple tables involved general associations required to be applied such as join condition, group by or a order by clause.|
CREATE VIEW Employee AS
SELECT Empid, Empname
WHERE Empid = '030314';
CREATE VIEW EmployeeByDepartment AS
SELECT e.emp_id, d.dept_id, e.emp_name FROM Employee e, Department d WHERE e.dept_id=d.dept_id;
Share your thoughts in the comments
Please Login to comment...


text:
IAS 2 — Inventories
IAS 2 Inventories contains the requirements on how to account for most types of inventory. The standard requires inventories to be measured at the lower of cost and net realisable value (NRV) and outlines acceptable methods of determining cost, including specific identification (in some cases), first-in first-out (FIFO) and weighted average cost.
A revised version of IAS 2 was issued in December 2003 and applies to annual periods beginning on or after 1 January 2005.
History of IAS 2
|September 1974||Exposure Draft E2 Valuation and Presentation of Inventories in the Context of the Historical Cost System|
|October 1975||IAS 2, Valuation and Presentation of Inventories in the Context of the Historical Cost System|
|August 1991||Exposure Draft E38 Inventories|
|December 1993||IAS 2 (1993) Inventories (revised as part of the 'Comparability of Financial Statements' project)|
|1 January 1995||Effective date of IAS 2 (1993)|
|18 December 2003||Revised version of IAS 2 issued by the IASB|
|1 January 2005||Effective date of IAS 2 (Revised 2003)|
- IFRIC 20 Stripping Costs in the Production Phase of a Surface Mine
- SIC-1 Consistency - Different Cost Formulas for Inventories. SIC-1 was superseded by and incorporated into IAS 2 (Revised 2003).
Summary of IAS 2
Objective of IAS 2
The objective of IAS 2 is to prescribe the accounting treatment for inventories. It provides guidance for determining the cost of inventories and for subsequently recognising an expense, including any write-down to net realisable value. It also provides guidance on the cost formulas that are used to assign costs to inventories.
Inventories include assets held for sale in the ordinary course of business (finished goods), assets in the production process for sale in the ordinary course of business (work in process), and materials and supplies that are consumed in production (raw materials). [IAS 2.6]
However, IAS 2 excludes certain inventories from its scope: [IAS 2.2]
- work in process arising under construction contracts (see IAS 11 Construction Contracts)
- financial instruments (see IAS 39 Financial Instruments: Recognition and Measurement)
- biological assets related to agricultural activity and agricultural produce at the point of harvest (see IAS 41 Agriculture).
Also, while the following are within the scope of the standard, IAS 2 does not apply to the measurement of inventories held by: [IAS 2.3]
- producers of agricultural and forest products, agricultural produce after harvest, and minerals and mineral products, to the extent that they are measured at net realisable value (above or below cost) in accordance with well-established practices in those industries. When such inventories are measured at net realisable value, changes in that value are recognised in profit or loss in the period of the change.
- commodity brokers and dealers who measure their inventories at fair value less costs to sell. When such inventories are measured at fair value less costs to sell, changes in fair value less costs to sell are recognised in profit or loss in the period of the change.
Fundamental principle of IAS 2
Inventories are required to be stated at the lower of cost and net realisable value (NRV). [IAS 2.9]
Measurement of inventories
Cost should include all: [IAS 2.10]
- costs of purchase (including taxes, transport, and handling) net of trade discounts received
- costs of conversion (including fixed and variable manufacturing overheads) and
- other costs incurred in bringing the inventories to their present location and condition
IAS 23 Borrowing Costs identifies some limited circumstances where borrowing costs (interest) can be included in cost of inventories that meet the definition of a qualifying asset. [IAS 2.17 and IAS 23.4]
Inventory cost should not include: [IAS 2.16 and 2.18]
- abnormal waste
- storage costs
- administrative overheads unrelated to production
- selling costs
- foreign exchange differences arising directly on the recent acquisition of inventories invoiced in a foreign currency
- interest cost when inventories are purchased with deferred settlement terms.
The standard cost and retail methods may be used for the measurement of cost, provided that the results approximate actual cost. [IAS 2.21-22]
For inventory items that are not interchangeable, specific costs are attributed to the specific individual items of inventory. [IAS 2.23]
For items that are interchangeable, IAS 2 allows the FIFO or weighted average cost formulas. [IAS 2.25] The LIFO formula, which had been allowed prior to the 2003 revision of IAS 2, is no longer allowed.
The same cost formula should be used for all inventories with similar characteristics as to their nature and use to the entity. For groups of inventories that have different characteristics, different cost formulas may be justified. [IAS 2.25]
Write-down to net realisable value
NRV is the estimated selling price in the ordinary course of business, less the estimated cost of completion and the estimated costs necessary to make the sale. [IAS 2.6] Any write-down to NRV should be recognised as an expense in the period in which the write-down occurs. Any reversal should be recognised in the income statement in the period in which the reversal occurs. [IAS 2.34]
IAS 18 Revenue addresses revenue recognition for the sale of goods. When inventories are sold and revenue is recognised, the carrying amount of those inventories is recognised as an expense (often called cost-of-goods-sold). Any write-down to NRV and any inventory losses are also recognised as an expense when they occur. [IAS 2.34]
Required disclosures: [IAS 2.36]
- accounting policy for inventories
- carrying amount, generally classified as merchandise, supplies, materials, work in progress, and finished goods. The classifications depend on what is appropriate for the entity
- carrying amount of any inventories carried at fair value less costs to sell
- amount of any write-down of inventories recognised as an expense in the period
- amount of any reversal of a writedown to NRV and the circumstances that led to such reversal
- carrying amount of inventories pledged as security for liabilities
- cost of inventories recognised as expense (cost of goods sold). IAS 2 acknowledges that some enterprises classify income statement expenses by nature (materials, labour, and so on) rather than by function (cost of goods sold, selling expense, and so on). Accordingly, as an alternative to disclosing cost of goods sold expense, IAS 2 allows an entity to disclose operating costs recognised during the period by nature of the cost (raw materials and consumables, labour costs, other operating costs) and the amount of the net change in inventories for the period). [IAS 2.39] This is consistent with IAS 1 Presentation of Financial Statements, which allows presentation of expenses by function or nature.


DASHBOARD Act Requires Companies Disclose How They are Using Personal Data and for How Much – The DASHBOARD Act Explained
dashboard act explained
The newly introduced DASHBOARD (Designing Accounting Safeguards to Help Broaden Oversight And Regulations on Data) Act, introduced by Senators Mark Warner (Democrat from Virginia) and Josh Hawley (Republican from Missouri), requires companies to tell users not only exactly what they are doing with their personal date, but also to tell them how much their personal data is worth to the company.
This explains, at least in part, why the DASHBOARD Act invokes the Securities and Exchange Commission (SEC).
This also explains why the opening lines of the bill direct the SEC to "promulgate regulations relating to the disclosure of certain commercial data, and for other purposes", and why in the pubic announcement on Senator Warner's website, it says that the DASHBOARD Act will "require data harvesting companies such as social media platforms to tell consumers and financial regulators exactly what data they are collecting from consumers, and how it is being leveraged by the platform for profit." {Emphasis ours.}
So what exactly does this mean, and to whom will the DASHBOARD Act, if passed, apply?
What the DASHBOARD Act Means
Basically, if the Designing Accounting Safeguards to Help Broaden Oversight And Regulations on Data Act passes, companies who would be subject to the act will be required to announce "in a clear and conspicuous manner" the types of data they collect from users, and the way that they use that data, and provide a way for individual users to delete individual pieces of data, or their entire record.
And, oh yes, companies will be required to provide users with an assessment of the economic value that the company places on the user's data, and to provide it to them regularly (at least every 90 days).
It is this last provision that is most interesting. Companies have been on notice for some time that they should be, and are going to need to be, transparent about what data they are collecting, and even how they use it. However, having to disclose what the value of that personal data is, to the person whose data it is, is a game changer. And while may be in a company's interest to minimize to the individual the amount of economic value that a user's data provides to the company, it may not be in a company's best interest to minimize it in their SEC filing (clever, that).
To What Companies the DASHBOARD Act Will Apply
The DASHBOARD Act will apply to what the bill calls "commercial data operators", and defines commercial data operators as a company that provides an online consumer service, or who is a data broker, and who "generates a material amount of revenue from the use, collection, processing, sale, or sharing of the user data", and that "has more than 100,000,000 unique monthly visitors or users in the United States for a majority of months during the previous 1-year period."
Now, this last line, which is quoted from the bill itself, is open to interpretation, to say the least. (This is a good example of why proper punctuation is so important.) Leaving aside that there is no definition of "material" (as in "a material amount of revenue"), just what exactly is meant by "has more than 100,000,000 unique monthly visitors or users in the United States" is anyone's best guess (and if the bill passes without revision, it will be up to the courts to guess).
Does it mean that the users must all be in the United States, or does it mean that the monthly users and visitors must be using a service that is in the United States?
And does it mean that those users must each have been in the United States for the majority of months during the previous one year period, or does it mean that the service must have been in the United States for the majority of those months?
Remember that while it may seem as if it should be obvious what this language means, lawsuits have been won, and lost, and laws struck down, for less than this.
And I predict that if the DASHBOARD Act passes it will certainly end up in court.
In the one-pager explanation put out by Senator Warner and Senator Hawley, which you can read here, they explain:
The DASHBOARD Act User data is quickly becoming the single most important economic input in the digital economy. This is particularly the case with social media platforms, where user data allows for more targeted and relevant ads and customized services. But increasingly, as predictive analytics and machine learning permeates evergreater parts of our digital economy, user data serves as the key enabler for an enormous range of products and services. However, there is currently little transparency into the data collected by platforms – what, exactly, a provider has collected; how it was collected; and what the commercial value is. This serves as a major obstacle for agencies like the Federal Trade Commission (FTC) seeking to address competitive and consumer harms.
Customers have consistently been told that these services are 'free.' Yet the current lack of transparency impedes consumers' ability to fully understand the terms of the exchange and decide for themselves whether they are getting a fair deal from the platform companies that monetize their data. And as dominant social media platforms continue to amend this bargain — free services in exchange for access to user data — in their own favor, this problem is only getting worse for American consumers. The Designing Accounting Safeguards to Help Broader Oversight and Regulations on Data (DASHBOARD) Act would begin to level the playing field for consumers — requiring companies to regularly disclose to consumers the ways in which their data are being used, the third parties it is being shared with, and most importantly, what their data is worth to the platform. This will serve three important goals. First, consumers will be able to determine the true value of the data they are providing to platforms. Second, making the value more transparent could increase competition by attracting competitors to the market. Finally, disclosing the economic value of consumer data will also assist antitrust enforcers in identifying unfair transactions and anticompetitive transactions and practices. This bill also provides long overdue transparency for shareholders — shining a light on how technology firms collect, retain, monetize and protect some of their most valuable, if intangible, assets. The bill would:
 - Require commercial data operators (defined as services with over 100 million monthly users) to disclose types of data collected as well as regularly provide their users with an assessment of the value of that data.
 - Require commercial data operators to file an annual report on the aggregate value of user data they've collected, as well as contracts with third parties involving data collection.
 - Require commercial data operators to allow users to delete all, or individual fields, of data collected – and disclose to users all the ways in which their data is being used.
 - Empower the SEC to develop methodologies for calculating data value, while encouraging the agency to facilitate flexibility to enable businesses to adopt methodologies that reflect the different uses, sectors, and business models.
You can read the read the full text of the DASHBOARD Act here.


Funding and Support
Alberta Metallic Silhouette Association
The Alberta Metallic Silhouette Association was founded in September of 1977, to assist rifle clubs in Alberta to set-up silhouette ranges, unify rules used to coordinate matches in and outside of the province and assist silhouette shooters however possible.
What is Metallic Silhouette Shooting all about?
Metallic Silhouette began in Mexico as a rifle shooting game where live animals were used as targets atop a high ridgeline to offer an outline or "silhouette." In the early '70's the American Shooters discovered metallic silhouette and brought it north of the border. Initially individuals fired only with high-powered rifles and were hampered by the need for rifle ranges which had the required 500-meter distance. Popularity increased dramatically in the 1970's when the National Rifle Association incorporated it into their competition schedule and created smallbore and air rifle classes that allowed the course of fire to be shot on smaller ranges.
Watch a video about our sport and organization below!
Alberta Metallic Silhouette Association AMSA Logo
Silhouette Rifle Association of Canada


Undergraduate Thesis Projects Show Just How Versatile the Study of Statistics Can Be
Each fall, the Consortium for the Advancement of Undergraduate Statistics Education (CAUSE) and the American Statistical Association host the Undergraduate Class Project Competition. Teams from across the globe submit projects completed in an introductory or intermediate statistics class, which are then judged on their accuracy, clarity and significance.
In 2020, Duke students, mentored by professors Maria Tackett and Yue Jiang, swept the top three places of the introductory category, along with both honorable mentions. But even more impressive than the wins were the breadth of projects included. They covered the impact of COVID-19 on domestic violence and EMS calls, racial disparities in traffic stops, resiliency in children who suffer maltreatment and the correlation of between education rates and life expectancy.
The wide array of topics—and the fact that undergraduate students are doing real-world research in all of them—are indicative of the Department of Statistical Science as a whole.
"Statisticians are like scientific detectives," said Jerry Reiter, who chairs the department. "There's some truth in data, and we use mathematics, computation, understanding of science and communication skills to find that truth. Our students and faculty work on projects with pretty much every department on campus."
To see how true that is, you only have to review the thesis projects seniors wrote this year and the careers they are leading to.
Who's listening to the CDC?
Anna Darwish headshot
Anna Darwish
Anna Darwish started with a simple question during a class project, driven by the fact that both of her parents are doctors on the frontlines of COVID: who is following social distancing protocols? Using survey data from Duke's Social Science Research Institute, Darwish extended that project into an honors thesis, examining how adherence rates differed among various demographic groups and how political affiliation impacted rates within each demographic.
"The immediate implication is that you could estimate, within a given population, how well people will be socially distancing," Darwish says. "It might help with predicting the number of cases. And if political affiliation was significant, it means there might be a necessity to create a stronger protocol for the way people speak about COVID."
In fact—despite complications with a high number of incomplete surveys—that's just what Darwish found: Republicans were slightly less likely to socially distance. But that wasn't the only factor. Another was the relationship between age and race. "Some older groups were more likely to socially distance than their younger counterparts, but it depended on the race/ethnic identity," Darwish explains.
Now that she has graduated, Darwish will use her statistical skills, alongside the knowledge she gained from a second major in Computer Science, as a software engineer at Microsoft. But writing a thesis sparked a passion for research, so Darwish is also making plans to return for a Ph.D. in statistics en route to becoming a professor.
Survival in medicine and education
Darwish is far from alone in pairing statistics with computer science: it's a common combination for students who like math and want to focus on data-centric applications. Malavi Ravindran is another. She came to Duke intending on a math major, but while taking Introduction to Data Science and Statistical Thinking alongside a multivariable calculus class, she had a realization.
"I noticed the math clicking for others in a way it wasn't for me," Ravindran says. "I thought, maybe I do want to continue with math, but pure math isn't the way for me to go about it. And concurrently, I was doing this very applied stats class where we were actually coding in R [a statistics software] and making visualizations and working with real data."
When COVID-19 cancelled her planned summer internship, Ravindran found one with online education company Coursera through Project Phoenix. But it was only a few hours a day, so she also applied to help with statistics research projects on Muser. She eventually found one, and that project grew into her own thesis.
It involves a branch of statistics called "survival analysis," which predicts the amount of time that will elapse before some outcome occurs, like death from a disease or mechanical failure in a machine. Though Ravindran analyzed ovarian cancer data in the project, her focus was less about health outcomes and more about statistical methodology.
She was looking for a way to analyze datasets with a large number of variables—like sex, age, genetic background and more in medical patients—in order to pinpoint the impact of each variable, so she examined a method called "latent-factor modeling." "It's a way to reduce them down to a smaller set," Ravindran says. "Once you have this smaller number of latent factors, then it's easier to understand interaction effects between them."
As it turns out, that method may come in handy: Ravindran will join Coursera's data science team, helping get more people to sign up for classes and stay in them to the end. It's survival analysis all over again, just in a different field.
The data of the beautiful game
Ethan Shen headshot
Ethan Shen
The same class that inspired Ravindran also inspired Ethan Shen. He had planned on an economics major, but after taking Introduction to Data Science, he realized statistics offered the balance of theory and application he was looking for.
"There are a lot times where we'll learn to prove things and derive things," Shen says, "but also how you can apply this theory to any field or real-world example. That's why I was drawn to it."
While studying abroad in Greece after his first year at Duke, Shen found an unexpected topic to use as an example: soccer. Inspired by the excitement around World Cup games and the Champions League final, he developed a new passion for the sport, which eventually became his honors thesis.
Shen examined the pace of play in the top five European soccer leagues, analyzing which teams play fastest and when. But doing so requires defining what "pace" means and what counts as a possession for each team.
"The classic way is passes between teammates," Shen says. "But if you look at it that way, passes between two defenders would be weighted equally with a pass between a midfielder or a winger. And that first pass means nothing because you're in your own half and you're not really creating a chance [to score] or anything."
Instead, Shen measured pace of play by taking into account the velocity of each pass. He found that teams play fastest in their attacking area, and that those findings are consistent across the five leagues. Perhaps unexpectedly, he also found that the worse teams are, the faster they play. But that's the result of his definition of pace.
"For [better] teams to maintain possession for a longer period of time, it makes sense for them to play shorter passes," Shen says. "Those passes are more likely to be completed than a long cross. But if a team takes shorter passes, then their pace would be slower."
After Duke, Shen will join the financial markets advisory team at the financial planning and asset management company BlackRock. But his dream is to eventually work as an analyst for a professional soccer team, which will likely require a graduate degree in statistics.
What makes a home?
Steven Herrera Tenorio headshot
Steven Herrera Tenorio
Another student going on to graduate school studied the role statistics can play in social justice.
Steven Herrera Tenorio is an immigrant from Guatemala who grew up in the small town of Sanford, North Carolina. Drawn to math early—"I was an [English as a Second Language] student, so I never considered myself someone who was a good writer or reader," he says—he chose to major in statistics because of its interdisciplinary nature.
Originally on a path to the tech industry, Herrera Tenorio interned at the Twitter headquarters in San Francisco after his sophomore year. But it was not the experience he expected. "I was not used to living in a big city like that," he says. "What particularly stood out to me was gentrification, segregation and homelessness. I grew up low income and not understanding, but I made more money in that summer than my parents did the entire year."
Rethinking his career plans in light of his encounter with rampant inequality, Herrera Tenorio discovered an interest in sociological research. Inspired by his conversations with Latina mothers navigating the Bay Area's tech hubs, he began looking into theories of assimilation and neighborhood segregation. That research morphed into Herrera Tenorio's thesis, which was written outside of the Department of Statistical Science but with their support.
A color coded map of the US South showing Latin American immigrant populations
A map from Herrera Tenorio's thesis shows where Latin American immigrants settled.
Called "The Nuevo South: A Latent Class Analysis of Neighborhood Integration Among Latin American Immigrants in the U.S. South, 2012–2018," it statistically investigates three different theories of how Latin American immigrants choose their neighborhoods. "I'm not predicting which neighborhood they'll move into," Herrera Tenorio says, "I'm measuring which qualities of this neighborhood enticed them to move there in the first place, and if that is motivated by race and socioeconomic factors specifically."
To do that, Herrera Tenorio used a method called "latent class analysis" in order to measure which neighborhoods are desirable or not. That measure allows him to account for whether immigrants are choosing to live in certain places or forced to live there by racism, poverty or other forms of discrimination. "That's when it gets really, really difficult to measure these outcomes," he says.
It's just those kinds of big, tricky questions that Herrera Tenorio will take on after Duke as he begins a joint Ph.D. in sociology and demography at the University of California, Berkeley. But he's clear that his statistics background will be crucial to his soci


Skip to main content
main-content
01.12.2018 | Research article | Ausgabe 1/2018 Open Access
BMC Gastroenterology 1/2018
Relationship of sarcopenia with steatohepatitis and advanced liver fibrosis in non-alcoholic fatty liver disease: a meta-analysis
Zeitschrift:
BMC Gastroenterology > Ausgabe 1/2018
Autoren:
Rui Yu, Qiangwei Shi, Lei Liu, Lidong Chen
Wichtige Hinweise
Electronic supplementary material
The online version of this article (_URL_ contains supplementary material, which is available to authorized users.
Abstract
Background
Several studies have emerged indicating that sarcopenia is associated with nonalcoholic fatty liver disease, we aimed to systematically review and quantify the association between sacropenia and the histological severity of nonalcoholic fatty liver disease.
Methods
Pubmed, the Cochrane Library and EMBASE were searched (until August 2017) for studies examining the relationship of sarcopenia with steatohepatitis and advanced liver fibrosis in nonalcoholic fatty liver disease. Pooled odds ratios were estimated by fixed effects models.
Results
Three articles met our inclusion criteria, with a total of 3226 individuals. Two of the studies examined the association between sacropenia and steatohepatitis, a significant association was documented between sarcopenia and steatohepatitis (OR = 2.35, 95%CI 1.45, 3.81). All of the three studies assessed the association between sacropenia and advanced liver fibrosis, a significant association between sarcopenia and advanced liver fibrosis (OR = 2.41, 95%CI 1.94, 2.98). No significant heterogeneity was detected among studies in all comparisons. These results remained essentially unchanged after excluding any of the studies in the sensitivity analysis.
Conclusions
Sarcopenia in patients with nonalcoholic fatty liver disease is associated with a higher likelihood of having steatohepatitis or advanced liver fibrosis. Demonstration of the role of sarcopenia in nonalcoholic fatty liver disease development in future studies could have important therapeutic implications.
Zusatzmaterial
Literatur
Über diesen Artikel
Weitere Artikel der Ausgabe 1/2018
BMC Gastroenterology 1/2018 Zur Ausgabe


Making a multilingual site with Next.js - Part 3
- 7 min
If you ended up here for this third part and did not see the first nor the second, I highly suggest you take a look at those first. In the previous section, we dealt with the creation and listing of content for the languages and ended the project there.
However, some commented that it would be interesting to add translated slugs, for example: in English the "about" page open at and its corresponding version open at In this article, I show you how we can create such functionality. Let's start!
But first...
In the previous articles, the function for changing languages was implemented. But when the page was refreshed, it returned to the default language, which caused a certain annoyance. This behavior is not the best, so it is important to solve this issue. Fortunately, it is not difficult at all to implement, with just a few lines of code.
Local Storage
Local Storage is a way that JavaScript provides us to save information in the user's browser, so that it will be available on a next visit. Many use it to make simple authentication or to save options, such as light and dark modes, for example.
The logic used here does not differ from that of a theme change, the change is that language will be saved instead. Small modifications to only two files are needed. The files are: the Header component and theLanguageProvider language context. If you fell from another dimension and did not see the two previous articles and nothing makes sense to you until now, I warned you at the beginning of the article! Go there and check the previous articles, and then come back here!
Here is the code for the Header component:
import { useContext } from "react"
import { useRouter } from "next/router"
import Navigation from "../Navigation"
import Logo from "../Logo"
import { LanguageContext, locales } from "../../intl/LanguageProvider"
interface Props {
 className?: string
 children?: React.ReactNode
const Header: React.FC = ({ className, children }) => {
 const headerClass = className || "header"
 const [locale, setLocale] = useContext(LanguageContext)
 const router = useRouter()
 function handleLocaleChange(language: string) {
 if (!window) {
 const regex = new RegExp('^/(${locales.join("|")})')
 localStorage.setItem("lang", language) // This line saves the language option!
 router.push(router.pathname, router.asPath.replace(regex, '/${language}'))
 return (

 handleLocaleChange("en")}>EN
 handleLocaleChange("pt")}>PT
export default Header
In Header, the method localStorage.setItem ('lang', language) was used to save the language choice by clicking on the corresponding button. What this method does is basically add a 'lang' key with the acronym of the chosen language. You can check this in the Application area of your browser's inspector, in the Local Storage section.
The LanguageProvider is as follows:
import { createContext, useEffect, useState } from "react"
export const defaultLocale = "pt"
export const locales = ["pt", "en"]
export const LanguageContext = createContext([])
export const LanguageProvider: React.FC = ({ children }) => {
 const [locale, setLocale] = useState("pt")
 useEffect(() => {
 if (!window) {
 // Captures the language information saved by the Header component
 const language = localStorage.getItem("lang") || locale
 }, [locale])
 return (

Here the localStorage.getItem ('lang') method captures the saved information from the language choice, and applies it if it exists. Now when updating the page, the language you selected stays there.
Finally... Let's create the translated slugs...
Nothing prevents you from creating files in the /pages folder, with the desired title, such as /kontakt.tsx for a contact page in German. It will work perfectly, but let's be honest: it is not the best way to do the job. We should be able to provide a way for pages to be created dynamically, with a standard template, changing the content and slug according to the language.
If you think about it, a similar thing is done with our posts area in this project. To achieve this, just modify the library we created for the posts (/lib/posts.ts) to include our new translated pages. But avoid duplicate code, instead of creating a /lib/pages.ts file with practically the same content as /lib/posts, I decided to unify everything in a single library that I called lib/files.ts.
The content of this file is as follows:
import fs from "fs"
import path from "path"
import matter, { GrayMatterFile } from "gray-matter"
import remark from "remark"
import html from "remark-html"
const postsDirectory = path.resolve(process.cwd(), "content", "posts")
const pagesDirectory = path.resolve(process.cwd(), "content", "pages")
// Collects all file names in the folders specified with the sctructure ['en/']
export function getAllFileNames(directoryPath: string, filesList = []) {
 const files = fs.readdirSync(directoryPath)
 files.forEach((file) => {
 if (fs.statSync('${directoryPath}/${file}').isDirectory()) {
 filesList = getAllFileNames('${directoryPath}/${file}', filesList)
 } else {
 filesList.push(path.join(path.basename(directoryPath), "/", file))
 const filteredList = filesList.filter((file) => file.includes(".md"))
 return filteredList
// Sorts posts by date
export function getSortedPostData() {
 const fileNames = getAllFileNames(postsDirectory)
 const allPostsData = => {
 const id = fileName.split("/")[1].replace(/\.md$/, "")
 const fullPath = path.join(postsDirectory, fileName)
 const fileContents = fs.readFileSync(fullPath, "utf-8")
 const frontMatter: GrayMatterFile = matter(fileContents)
 return {
 ...( as {
 lang: string
 date: string
 category: string
 return allPostsData.sort((a, b) => {
 if ( < {
 return 1
 } else {
 return -1
// IDs for posts or pages
export function getAllIds(type = "post") {
 const dir = type === "page"? pagesDirectory : postsDirectory
 const fileNames = getAllFileNames(dir)
 return => ({
 params: {
 id: fileName.split("/")[1].replace(/\.md$/, ""),
 lang: fileName.split("/")[0],
// Collects data from the markdown file and makes it available
export async function getContentData(id: string, type = "post") {
 const fullPath = path.join(dir, '${id}.md')
 const frontMatter = matter(fileContents)
 const processedContent = await remark().use(html).process(frontMatter.content)
 const contentHtml = processedContent.toString()
 return {
 ...( as { date: string; title: string }),
I created a type argument in some of the functions that will be used by both posts and pages. This because this argument identifies the directory in which the files will be read. By default, I left it configured to always search for posts. Since the file name has changed and so have the functions, it is necessary to update the imports in the files that use the new library.
Template for the dynamic page
Here is another page with a special name, to create a dynamic route. In this the parameter will be the 'id' of the file, which is captured by the function getAllIds() of the file lib/files. The file will be called [lang]/[id].tsx. Below is the complete code of the file.
import { GetStaticProps, GetStaticPaths, NextPage } from "next"
import { getAllIds, getContentData } from "../../lib/files"
import Layout from "../../components/Layout"
interface PageProps {
 locale: string
 pageData: {
 lang: string
 title: string
 slug: string
 date: string
 category?: string
 contentHtml: string
const SitePage: NextPage = ({ pageData }) => {
 const { title, contentHtml } = pageData
 return (

 dangerouslySetInnerHTML={{ __html: contentHtml }}
export const getStaticProps: GetStaticProps = async ({ params }) => {
 // Here is the argument to informa "page" as type,
 // so Next.js can search for page files, ignoring posts.
 const pageData = await getContentData('/${params.lang}/${}', "page")
 return {
 props: {
 locale: params?.lang || "pt",
export const getStaticPaths: GetStaticPaths = async () => {
 const paths = getAllIds("page")
 return {
 fallback: false,
export default SitePage
With this file, it is already possible to support pages created through Markdown. The markdown files use the following structure:
lang: pt
title: "Sobre"
Site made to showcase the creation of a bilingual website using Next.js. The tutorial is in an article on my blog. Feel free to view the source code, fork it, or even use it in your projects.
To better organize the files, I created a directory called /