Take the 2-minute tour ×
How would I go about solving this equation?
\begin{equation} \frac{2x + 9}{x} = \frac{x + 8}{4} \end{equation}
I was trying to solve it by first (note: Contains a mistake, x on left side should be 2, leaving it in, see accepted answer for details) \begin{equation} x + \frac{9}{x} = \frac{x}{4} + 2 \end{equation}
Then I get stuck. A friend of mine in class told me I could do this instead \begin{equation} (2x + 9) * 4 = (x + 8) * x \end{equation} \begin{equation} 8x + 36 = x^2 + 8x \end{equation} \begin{equation} 36 = x^2 \end{equation} \begin{equation} x = 6 \end{equation}
So I would like to know:
 1. What is the name of this rule my friend told me about
 2. Is that the only/preferred way to solve this type of equations?
Thank you.
PS: This is not homework per se, it is part of the excersices in my math book. But I guess you can call that homework so I'll tag it as such.
share|improve this question
2 Answers 2
up vote 2 down vote accepted
There are three main procedures you can use to solve an equation
$\ \ \ \ $1) Simplify one or both sides of the equation.
$\ \ \ \ $2) Multiply or divide both sides of the equation by hte same non-zero number.
$\ \ \ \ $3) Add or subtract the same number to both sides of the equation.
Given an equation, performing one of the above operations to the equation will produce an equation that has exactly the same solutions as the original; that is, the resulting equation is equivalent to the original.
Your friend used rule 2) twice without showing the steps:
$$\eqalign{ &\color{maroon}{{2x+9\over x}= {x+8\over 4}}\cr \iff& 4\cdot{2x+9\over x}= {x+8\over 4}\cdot4\cr \iff& {4(2x+9)\over x}= {x+8 } \cr \Longrightarrow& x\cdot {4(2x+9)\over x}= {(x+8) } \cdot x\cr \Longrightarrow& \color{darkgreen}{ {4(2x+9) }= {x(x+8) }} \cr } $$
Note that the forth step can only be done if $x\ne 0$. The original equation does not have $x=0$ as a solution (the original equation isn't even well-defined for $x=0$). So, if perchance the equation at the end had $0$ as a solution, this would not be a solution of the original equation. Any non-zero solution of the last equation, though, would be a solution of the original.
The shorcut to the above could be called "cross cancellation"; you go immediately from the $\color{maroon}{\text{first equation above}}$ to the $\color{darkgreen}{\text{last equation above}}$ by recognizing that if you initially multiplied both sides of the first equation above by $4x$ (the product of the denominators) the cancellations produced will give the last equation.
An even shorter way to get to the last equation is to move denominators from one side to numerators of the other: $$ {2x+9\over \color{maroon}{x}}= {x+8\over \color{darkgreen}{4}} \Rightarrow \color{darkgreen}{4}{(2x+9) }= {(x+8 )} \color{maroon}{x} $$ I advise, though, to not use these sort of "tricks". Instead, when solving equations, think about how you get from one stage to another and what rule allows you to do it.
As for your second question, there are other ways to solve this equation (slightly different; but eventually you'll have to deal with clearing the $x$ in the denominator). We could take your approach, starting with $$ 2+{9\over x}={x\over 4}+2. $$ (note you made a mistake here). Then subtract 2 from both sides $$ {9\over x}={x\over 4}. $$ Note $x=0$ is not a solution. Now multiply both sides by $4x$ to produce $$ 36={x^2 }. $$ Solving for $x$ gives $x=6$ or $x=-6$.
You could also bring everything over to one side, write it as one fraction, and set the numerator equal to zero. The solutions to the original equation will be the values of $x$ where both the numerator of this fraction is 0 and the denominator is non-zero. Note this is more or less the first method. $$\eqalign{ &{2x+9\over x}= {x+8\over 4}\cr & {2x+9\over x}- {x+8\over 4}=0\cr & {4\over 4}\cdot {2x+9\over x}-{x\over x}\cdot {x+8\over 4}=0 \cr & {4(2x+9) - x(x+8)\over 4x }=0 \cr & {4(2x+9) }- {x(x+8) =0 } \cr } $$
share|improve this answer
Thank you for a great answer! :) – Storm M Feb 19 '12 at 11:20
its basic equation rules, what you did was finding a common denominator. Also, the square roots of $x^2 = 36 $ are $6$ and $-6$. because if you multiply $-6\cdot-6$ it equals to $36$ also
share|improve this answer
Thank you. I think I need to go back and study some of these basic rules. – Storm M Feb 18 '12 at 12:03
Quadratic equations will not always fall out quite so neatly - you might also want to investigate the technique of 'completing the square', which gets more complicated equations into a form you can solve. – Mark Bennet Feb 18 '12 at 13:25
Your Answer


Take the 2-minute tour ×
When putting together a card sort for a web application, what level of granularity is appropriate for each card?
For example, is the function "forward an email to a distribution list" granular enough, or should that piece of functionality be broken down even further?
share|improve this question
1 Answer 1
up vote 2 down vote accepted
The question is - is that function relevant and understandable by whoever is going to be doing your card sort? I think your example would, in theory, make a fine card. Here's some words from a real expert:
Donna Spencer wrote a great book titled Card Sorting, and she's got a precursor article that contains this:
Granularity and sampling content.
Content selected for the cards can be individual pages, functionality, small groups of pages, or whole sections of the site. Be consistent with your chosen granularity—participants will find it difficult to group content at different levels of granularity.
If you choose to use small groups of pages or sections of the site, ensure that the groups are of items that belong together. For example, don't include a grouping of "media releases," as this may not suit users and their tasks (they may prefer individual media releases to be grouped with other pages of similar topic.). Instead, include some individual media releases and see what participants do with them.
The content for the card sort should be representative of the site (or the part of site that you are investigating). It is important to ensure that the content has enough similarity to allow groupings to be formed. If the content chosen is too varied, participants will not be able to create natural groupings.
share|improve this answer
Your Answer


Class PolarPlot
java.lang.Object
org.jfree.chart.plot.Plot
org.jfree.chart.plot.PolarPlot
All Implemented Interfaces:
Serializable, Cloneable, EventListener, AnnotationChangeListener, AxisChangeListener, MarkerChangeListener, RendererChangeListener, LegendItemSource, ValueAxisPlot, Zoomable, PublicCloneable, DatasetChangeListener
public class PolarPlot
extends Plot
implements ValueAxisPlot, Zoomable, RendererChangeListener, Cloneable, Serializable
Plots data that is in (theta, radius) pairs where theta equal to zero is due north and increases clockwise.
See Also:
Serialized Form
 - Field Details
 - Constructor Details
 - PolarPlot
 public PolarPlot()
 Default constructor.
 - PolarPlot
 public PolarPlot(XYDataset dataset, ValueAxis radiusAxis, PolarItemRenderer renderer)
 Creates a new plot.
 Parameters:
 dataset - the dataset (null permitted).
 radiusAxis - the radius axis (null permitted).
 renderer - the renderer (null permitted).
 - Method Details
 - getPlotType
 public String getPlotType()
 Returns the plot type as a string.
 Specified by:
 getPlotType in class Plot
 Returns:
 A short string describing the type of plot.
 - getAxis
 public ValueAxis getAxis()
 Returns the primary axis for the plot.
 Returns:
 The primary axis (possibly null).
 See Also:
 setAxis(ValueAxis)
 - getAxis
 public ValueAxis getAxis(int index)
 Returns an axis for the plot.
 Parameters:
 index - the axis index.
 Returns:
 The axis (null possible).
 See Also:
 setAxis(int, ValueAxis)
 - setAxis
 public void setAxis(ValueAxis axis)
 Sets the primary axis for the plot and sends a PlotChangeEvent to all registered listeners.
 Parameters:
 axis - the new primary axis (null permitted).
 - setAxis
 public void setAxis(int index, ValueAxis axis)
 Sets an axis for the plot and sends a PlotChangeEvent to all registered listeners.
 Parameters:
 index - the axis index.
 axis - the axis (null permitted).
 See Also:
 getAxis(int)
 - setAxis
 public void setAxis(int index, ValueAxis axis, boolean notify)
 Sets an axis for the plot and, if requested, sends a PlotChangeEvent to all registered listeners.
 Parameters:
 index - the axis index.
 axis - the axis (null permitted).
 notify - notify listeners?
 See Also:
 getAxis(int)
 - getAxisLocation
 Returns the location of the primary axis.
 Returns:
 The location (never null).
 See Also:
 setAxisLocation(PolarAxisLocation)
 - getAxisLocation
 public PolarAxisLocation getAxisLocation(int index)
 Returns the location for an axis.
 Parameters:
 index - the axis index.
 Returns:
 The location (never null).
 See Also:
 setAxisLocation(int, PolarAxisLocation)
 - setAxisLocation
 public void setAxisLocation(PolarAxisLocation location)
 Sets the location of the primary axis and sends a PlotChangeEvent to all registered listeners.
 Parameters:
 location - the location (null not permitted).
 See Also:
 getAxisLocation()
 - setAxisLocation
 public void setAxisLocation(PolarAxisLocation location, boolean notify)
 Sets the location of the primary axis and, if requested, sends a PlotChangeEvent to all registered listeners.
 Parameters:
 location - the location (null not permitted).
 notify - notify listeners?
 See Also:
 getAxisLocation()
 - setAxisLocation
 public void setAxisLocation(int index, PolarAxisLocation location)
 Sets the location for an axis and sends a PlotChangeEvent to all registered listeners.
 Parameters:
 index - the axis index.
 location - the location (null not permitted).
 See Also:
 getAxisLocation(int)
 - setAxisLocation
 public void setAxisLocation(int index, PolarAxisLocation location, boolean notify)
 Sets the axis location for an axis and, if requested, sends a PlotChangeEvent to all registered listeners.
 Parameters:
 index - the axis index.
 location - the location (null not permitted).
 notify - notify listeners?
 - getAxisCount
 public int getAxisCount()
 Returns the number of domain axes.
 Returns:
 The axis count.
 - getDataset
 Returns the primary dataset for the plot.
 Returns:
 The primary dataset (possibly null).
 See Also:
 setDataset(XYDataset)
 - getDataset
 public XYDataset getDataset(int index)
 Returns the dataset with the specified index, if any.
 Parameters:
 index - the dataset index.
 Returns:
 The dataset (possibly null).
 See Also:
 setDataset(int, XYDataset)
 - setDataset
 public void setDataset(XYDataset dataset)
 Sets the primary dataset for the plot, replacing the existing dataset if there is one, and sends a link PlotChangeEvent to all registered listeners.
 Parameters:
 dataset - the dataset (null permitted).
 See Also:
 getDataset()
 - setDataset
 public void setDataset(int index, XYDataset dataset)
 Sets a dataset for the plot, replacing the existing dataset at the same index if there is one, and sends a link PlotChangeEvent to all registered listeners.
 Parameters:
 index - the dataset index.
 dataset - the dataset (null permitted).
 See Also:
 getDataset(int)
 - getDatasetCount
 public int getDatasetCount()
 Returns the number of datasets.
 Returns:
 The number of datasets.
 - indexOf
 public int indexOf(XYDataset dataset)
 Returns the index of the specified dataset, or -1 if the dataset does not belong to the plot.
 Parameters:
 dataset - the dataset (null not permitted).
 Returns:
 The index.
 - getRenderer
 Returns the primary renderer.
 Returns:
 The renderer (possibly null).
 See Also:
 setRenderer(PolarItemRenderer)
 - getRenderer
 public PolarItemRenderer getRenderer(int index)
 Returns the renderer at the specified index, if there is one.
 Parameters:
 index - the renderer index.
 Returns:
 The renderer (possibly null).
 See Also:
 setRenderer(int, PolarItemRenderer)
 - setRenderer
 public void setRenderer(PolarItemRenderer renderer)
 Sets the primary renderer, and notifies all listeners of a change to the plot. If the renderer is set to null, no data items will be drawn for the corresponding dataset.
 Parameters:
 renderer - the new renderer (null permitted).
 See Also:
 getRenderer()
 - setRenderer
 public void setRenderer(int index, PolarItemRenderer renderer)
 Sets a renderer and sends a PlotChangeEvent to all registered listeners.
 Parameters:
 index - the index.
 renderer - the renderer.
 See Also:
 getRenderer(int)
 - setRenderer
 public void setRenderer(int index, PolarItemRenderer renderer, boolean notify)
 Sets a renderer and, if requested, sends a PlotChangeEvent to all registered listeners.
 Parameters:
 index - the index.
 renderer - the renderer.
 notify - notify listeners?
 See Also:
 getRenderer(int)
 - getAngleTickUnit
 Returns the tick unit that controls the spacing of the angular grid lines.
 Returns:
 The tick unit (never null).
 - setAngleTickUnit
 public void setAngleTickUnit(TickUnit unit)
 Sets the tick unit that controls the spacing of the angular grid lines, and sends a PlotChangeEvent to all registered listeners.
 Parameters:
 unit - the tick unit (null not permitted).
 - getAngleOffset
 public double getAngleOffset()
 Returns the offset that is used for all angles.
 Returns:
 The offset for the angles.
 - setAngleOffset
 public void setAngleOffset(double offset)
 Sets the offset that is used for all angles and sends a PlotChangeEvent to all registered listeners. This is useful to let 0 degrees be at the north, east, south or west side of the chart.
 Parameters:
 offset - The offset
 - isCounterClockwise
 public boolean isCounterClockwise()
 Get the direction for growing angle degrees.
 Returns:
 true if angle increases counterclockwise, false otherwise.
 - setCounterClockwise
 public void setCounterClockwise(boolean counterClockwise)
 Sets the flag for increasing angle degrees direction. true for counterclockwise, false for clockwise.
 Parameters:
 counterClockwise - The flag.
 - isAngleLabelsVisible
 public boolean isAngleLabelsVisible()
 Returns a flag that controls whether or not the angle labels are visible.


Sutherlandia
Sutherlandia, known as Ballonerbsen in German, is a genus of flowering plants in the family Fabaceae containing 6 known living species. The genus was once organized as having a single species, S. frutescens, but later expanded to include more based on morphological charecteristics. However, later analysis found more genetic variation between populations than between taxa.[1]
Sutherlandia
Sutherlandia frutescens PICT3649.JPG
Sutherlandia frutescens
Scientific classification
Kingdom:
(unranked):
(unranked):
(unranked):
Order:
Family:
Subfamily:
Tribe:
Galegeae
Genus:
Sutherlandia
Species
See text.
The genus Sutherlandia is sometimes included in the genus Lessertia and it is morphologically and chemically similar to Lessertia, Astragalus, and other genera of the tribe Galegeae.[2]
SpeciesEdit
ReferencesEdit
 1. ^ Moshe; Bank; Bank; Wyk (1 September 1998). "Lack of genetic differentiation between 19 populations from seven taxa of Sutherlandia Tribe: Galegeae, Fabaceae". Biochemical Systematics and Ecology. 26 (6): 595–609. doi:10.1016/S0305-1978(98)00002-7.
 2. ^ Wyk; Albrecht (9 Aug 2008). "A review of the taxonomy, ethnobotany, chemistry and pharmacology of Sutherlandia frutescens (Fabaceae)". Journal of Ethnopharmacology. 119 (3): 620–629. doi:10.1016/j.jep.2008.08.003. Retrieved 13 Mar 2020.


text:
- n. (noun) A woman whose hair is disheveled, and hanging about her face; a slattern.
- n. (noun) A hot-tempered, unjustifiably angry woman, usually stereotyped as a red-haired Irish woman (used largely by Anglo-Saxons by due cause of nationalistic and racial tensions).
'Blowsabella' may come from Blousalinda, 'the country girl in Gay's pastoral poem, The Shepherd's Week (1714).' 'Blowze' is slang for 'a ruddy, fat-faced wench; a blowzy woman.'
"By and by, indeed, a leisurely Blowsabella of a serving maid lays a coarse, clean cloth and some knives and forks in what she calls the bavilion, a homely arbor at the garden end; and thither the Professor at once repairs, and seating himself at his place before the empty table, lays his watch before him, and seems to derive a bitter solace from counting the numerous moments as they pass, and announcing them by five at a time aloud to Brooks."
"About half-past eleven, when the music was at its loudest, the mummers at the merriest, and queens, goddesses, nymphs, and heroines were all jumping all like Bowsabella of the Village Green; when from the alcoves near us men were bawling songs, whose words, happily, were lost to us, we rose to go, sorry to leave the scene of so much mirth, yet anxious not to witness the scenes of disorder which take place later."

source: HuggingFaceFW/fineweb-edu


text:
- Built in 1933, Thao Suranari Monument was built in the memory of the Thai Heroine 'Khunying Mo' who is also popularly known as Yo Mo. This grand monument is built over her ashes and has a 1.85 metres high statue holding a sword and facing the city of Bangkok. Every year people offer prayers to this lady known for her valor who was honored the title of Thao Suranari by King Rama III on the success in the battle against Chao Anuwong. The Thao Suranaree Fair is celebrated every year to commemorate her victory and most residents of the city and nearby villagers flock here to seek her blessings.
- © wcities.com 2013


text:
The EyeDetect testing station consists of a computer screen, a mouse, and the chin rest.
EyeDetect captures 60 measurements per second of eye response using 16 different variables. Approx. 100,000 pieces of data per eye is gathered during a 30-minute test. All this data is then evaluated and scored by a computer algorithm. Human bias is eliminated.
An EyeDetect exam is non-envasive; no blood-pressure cuff, chest tubes, or electrodes which are used in a polygraph test. If you've ever used a computer, smart phone, or tablet, you know how to use this technology. Most people use this kind of technology every day.
Credibility Screening Services © 2016 All Rights Reserved

source: m-a-p/FineFineWeb


Contact Us
What is a Collimator Lens
1. Overview of collimator lens
The collimator lens is for point light sources, and the so-called point light sources, we see more in our lives, such as: match head lighting, old-fashioned flashlight bulbs, and lasers coming out of energy fibers. For the industrial laser industry, the collimator lens basically refers to the laser coming out of the energy transmission fiber.
After passing through the fiber collimator lens, the laser enters the focusing mirror of the fiber cutting machine. According to theory, the focal length of the collimator lens, the focal length of the focusing lens = the ratio of the energy density after focusing to the previous density, such as: the focal length of the collimator lens is 75mm, the focal length of the focusing lens is 150mm, 75/150=1/2, that is, the area of the focused spot behind the mirror is twice as large as the area of the point light source just coming out of the energy fiber, and the energy density is 1/2 of the original.
2. Why reduce the energy density of the collimator lens?
Someone asked, why do you want to lower the energy density? Isn't it better to concentrate the energy density? There are several reasons:
First: If the focal length of the focusing lens is shorter, the depth of focus of the focusing lens is shallower, and the shallow depth of focus will easily lead to incomplete cutting.
Second: The shorter the focal length, the smaller the focus point, and the smaller the slit. Small slits are not conducive to the falling of the cut slag, resulting in impenetrable cutting. Therefore, we generally try to use the focal length between 120-150mm as the focusing lens of the fiber cutting machine.
In addition, why do we not use a long focal length collimator? Two reasons are involved here: ① The use of a long focal length fiber collimator lens requires a larger lens diameter, which will lead to more troublesome mechanical design; ② Use a long focal length fiber collimator lens will cause it to be very sensitive to the focus point of the fiber cutting machine when focusing. Once it deviates from the focus of the focusing lens a little bit, it will not cut through. This is why the focus of the fiber cleaver is generally between 60-100mm.
Related Content
 - What is the Collimation Function of Beam Expander
 June 10, 20211. The collimation function of the beam expanderThe beam expander also has a collimating function, but the beam expander is aimed at the beam (beam with a certain divergence angle). Many lasers on the...view
 - Advantages of Amici Roof Prism Binoculars
 January 31, 2024Amici roof prism binoculars, a cutting-edge technology offered by Hyperion Optics, have revolutionized the world of binoculars with their unique advantages. In this blog, we will explore the remarkabl...view


appended to it.

 For each token in the text fragment that is part of a phrase match,
 the "start match" text is inserted into the fragment before the token,
 and the "end match" text is inserted immediately after it.

 If more than one such fragment can be found, then fragments that contain
 a larger number of "extra" phrase matches are favored. The start of
 the selected text fragment may be moved a few tokens forward or backward
 to attempt to concentrate the phrase matches toward the center of the
 fragment.

 Assuming N is a positive value, if no fragments can be found that
 contain a phrase match corresponding to each matchable phrase, the snippet
 function attempts to find two fragments of approximately N/2 tokens
 that between them contain at least one phrase match for each matchable phrase
 matched by the current row. If this fails, attempts are made to find three
 fragments of N/3 tokens each and finally four N/4 token
 fragments. If a set of four fragments cannot be found that encompasses the
 required phrase matches, the four fragments of N/4 tokens that provide
 the best coverage are selected.

 If N is a negative value, and no single fragment can be found
 containing the required phrase matches, the snippet function searches
 for two fragments of |N| tokens each, then three, then four. In
 other words, if the specified value of N is negative, the sizes
 of the fragments is not decreased if more than one fragment is required
 to provide the desired phrase match coverage.

 After the M fragments have been located, where M is between
 two and four as described in the paragraphs above, they are joined together
 in sorted order with the "ellipses" text separating them. The three
 modifications enumerated earlier are performed on the text before it is
 returned.
<codeblock>
 Note: In this block of examples, newlines and whitespace characters have
 been inserted into the document inserted into the FTS table, and the expected
 results described in SQL comments. This is done to enhance readability only,
 they would not be present in actual SQLite commands or output.
 -- Create and populate an FTS table.
 CREATE VIRTUAL TABLE text USING fts4();
 INSERT INTO text VALUES('
 During 30 Nov-1 Dec, 2-3oC drops. Cool in the upper portion, minimum temperature 14-16oC
 and cool elsewhere, minimum temperature 17-20oC. Cold to very cold on mountaintops,
 minimum temperature 6-12oC. Northeasterly winds 15-30 km/hr. After that, temperature
 increases. Northeasterly winds 15-30 km/hr.
 ');
 -- The following query returns the text value:
 --
 -- "<b>...</b>cool elsewhere, minimum temperature 17-20oC. <b>Cold</b> to very
 -- <b>cold</b> on mountaintops, minimum temperature 6<b>...</b>".
 --
 SELECT snippet(text) FROM text WHERE text MATCH 'cold';
 -- The following query returns the text value:
 --
 -- "...the upper portion, [minimum] [temperature] 14-16oC and cool elsewhere,
 -- [minimum] [temperature] 17-20oC. Cold..."
 --
 SELECT snippet(text, '[ ']', '...') FROM text WHERE text MATCH '"min* tem*"'
</codeblock>

The Matchinfo Function

 The matchinfo function returns a blob value. If it is used within a query
 that does not use the full-text index (a "query by rowid" or "linear scan"),
 then the blob is zero bytes in size. Otherwise, the blob consists of zero
 or more 32-bit unsigned integers in machine byte-order. The exact number
 of integers in the returned array depends on both the query and the value
 of the second argument (if any) passed to the matchinfo function.

 The matchinfo function is called with either one or two arguments. As for
 all auxiliary functions, the first argument must be the special
 [FTS hidden column]. The second argument, if it is specified, must be a text value
 comprised only of the characters 'p', 'c', 'n', 'a', 'l', 's' and 'x'.
 If no second argument is explicitly supplied, it defaults to "pcx". The
 second argument is referred to as the "format string" below.

 Characters in the matchinfo format string are processed from left to right.
 Each character in the format string causes one or more 32-bit unsigned
 integer values to be added to the returned array. The "values" column in
 the following table contains the number of integer values appended to the
 output buffer for each supported format string character. In the formula
 given, cols is the number of columns in the FTS table, and
 phrases is the number of matchable phrases in
 the query.

CharacterValuesDescription

p 1 The number of matchable phrases in the query.

c 1 The number of user defined columns in the FTS
 table (i.e. not including the docid or the [FTS hidden column]).

x 3 * cols * phrases

 For each distinct combination of a phrase and table column, the
 following three values:

 In the current row, the number of times the phrase appears in
 the column.

 The total number of times the phrase appears in the column in
 all rows in the FTS table.

 The total number of rows in the FTS table for which the
 column contains at least one instance of the phrase.

 The first set of three values corresponds to the left-most column
 of the table (column 0) and the left-most matchable phrase in the
 query (phrase 0). If the table has more than one column, the second
 set of three values in the output array correspond to phrase 0 and
 column 1. Followed by phrase 0, column 2 and so on for all columns of
 the table. And so on for phrase 1, column 0, then phrase 1, column 1
 etc. In other words, the data for occurrences of phrase p in
 column c may be found using the following formula:

 hits_this_row = array[3 * (c + p*cols) + 0]
 hits_all_rows = array[3 * (c + p*cols) + 1]
 docs_with_hits = array[3 * (c + p*cols) + 2]

n 1 The number of rows in the FTS4 table. This value is
 only available when querying FTS4 tables, not FTS3.

a cols For each column, the average number of
 tokens in the text values stored in the column (considering all rows in
 the FTS4 table). This value is only available when querying FTS4 tables,
 not FTS3.

l cols
 For each column, the length of the value stored in the current row of the
 FTS4 table, in tokens. This value is only available when querying
 FTS4 tables, not FTS3. And only if the "matchinfo=fts3" directive was not
 specified as part of the "CREATE VIRTUAL TABLE" statement used to create
 the FTS4 table.

<


text:
Autumn: the perfect time to prepare your farm for a spring market launch
Duncan Clarke, Associate, explains why autumn is the perfect time to prepare your farm for a spring market launch.
The recent publication of the Agriculture Bill has, perhaps, given us some idea of the future of the industry post BREXIT. Whilst many column inches have already been written about the implications of the bill, should it become law, much can change between now and the end of March 2019.
Some farmers and landowners will undoubtedly see the opportunities which BREXIT will present, however, I am almost certain that there will be a squeeze on farm incomes going forward and whilst there are a myriad factors which influence land values, and the direct connection between the value of an acre of land and its earning capacity has long since been largely severed; for some this may be the trigger to put the farm on the market.
Traditionally spring is when farms are launched onto the market; potential vendors looking to do so should be making preparations now and indeed over the winter months, to ensure a smooth launch next year.
Farms need to stand out to attract potential buyers in what can often be a crowded spring market; if farms are not properly presented they can easily be overlooked. So, what can, and indeed should, vendors be doing now to ensure the best possible chances of success in the spring?
The winter months tend to be quieter on the farm so any spare time should be used to undertake repairs and improvements to property, including redecoration of houses etc. Time should also be taken on having a good tidy up so that, come spring, the farm looks at its best and is in a 'move into' condition.
Thought should also be given now as to whether there are any development opportunities that can be exploited to add value to the farm. Permitted Development Rights were extended in 2014 with the introduction of Class Q which means that, since then, it has been somewhat easier to secure the conversion of redundant farm buildings to a residential use. As part of this process the landowner should ensure that they have all the evidence they need to meet the various planning requirements and thus, avoid any uncertainty as to the eligibility of the building during the conveyancing process itself.
The winter months are also a good time to make sure that all paperwork is in order and to prepare sales particulars and marketing literature. Clear, sunny winter days can provide a great backdrop against photographs, videos and promotional material. Many professional photographers now use drones to take wider angle shots of the farm and if these are all taken in the right conditions over winter, they will really make the farm stand out in spring.
Alongside making sure the marketing literature is all in place, potential vendors will need to make sure that any residential tenancies, cropping licences, short term grazing arrangements etc. are brought to an end or at least properly documented so that the farm can be sold with the certainty of vacant possession or, if this is not possible so that vendors know exactly on what basis they will be taking on existing occupiers. Thought will also need to be given as to how existing employees will be looked after.
For more information and advice on launching your farm to the market, please contact Duncan Clarke on 07834 321429 or alternatively, by emailing _EMAIL_.
Charity Golf Day raises funds for Children with Cancer UK
Last week we held our inaugural George F. White Charity golf day raising money for Children w... Read More
Dispersal Sale at Stanley Hall Farm, County Durham
IMPORTANT DISPERSAL SALE
STANLEY HALL FARM, WOOLEY, CROOK,
COUNTY DURHAM, DL15 9A... Read More


c,linux,memory-management,mmap,huge-pages , Using mmap and madvise for huge pages
Using mmap and madvise for huge pages
Question:
Tag: c,linux,memory-management,mmap,huge-pages
I want to allocate memory on the hugepages being used by a Linux machine. I see that there are two ways to do this, using mmap and madvise.
That is, using the MAP_HUGETLB flag with the mmap call -
base_ptr_ = mmap(NULL, memory_size_, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0);
And the MADV_HUGEPAGE flag with the madvise call -
madvise(base_ptr_, memory_size_, MADV_HUGEPAGE);
Could someone explain the difference between the two?
Answer:
Both functions perform different operations, which may or may not matter in your context:
The two mechanisms have their own doc file in the kernel tree: hugetlbpage.txt and transhuge.txt
Related:
How to read string until two consecutive spaces?
c,format,sscanf,c-strings
A well known function of the scanf() functions is that you can pass a format to scan input according to this format. For my case, I cannot seem to find a solution searching this and this documentation. I have a string (sInput) as the following: #something VAR1 this is a...
Program to reverse a string in C without declaring a char[]
c,string,pointers,char
I need to reverse a given string and display it without using the value At[index] notation , I tried the below program using pointers,but it does not print anything for the reverse string, Please help! int main() { char* name=malloc(256); printf("\nEnter string\n"); scanf("%s",name); printf("\nYou entered%s",name); int i,count; count=0; //find the...
Segmentation Fault if I don't say int i=0
c,arrays,segmentation-fault,initialization,int
void removeVowels(char* array){ int i,j,v; i=0; char vowel[]={'a','e','i','o','u'}; while(array[i]!='\0') { for(v=0;v<5;v++) { if (array[i]==vowel[v]) { j=i; while(array[j]!='\0') { array[j]=array[j+1]; j++; } i--; break; } } i++; } } in function removeVowels() if I don't include i=0; and just say int i; why does it give segmentation fault? Isn't it automatically...
Text justification C language
c,text,alignment
I have to solve a problem that involves left justification string length and leading zeros. I have the following table : BEGIN CLOSE CONCATENATE DELETE END INITIALIZE PRINT WRITE This is produced by a simple program. My problem is to find out how to convert it like that : It...
CallXXXMethod undefined using JNI in C
java,c,jni
So I've tried to use the JNI interface to call Java methods from C. Calling static methods is no problem, but I get stuck when I want to call a method on an object. The code is as follows: #include <stdio.h> #include <string.h> #include <jni.h> int main() { JavaVMOption options[1];...
NASM: copying a pointer from a register to a buffer in .data
linux,assembly,nasm,x86-64
I am new to asm. I am trying to copy a pointer from a register to a .data variable using NASM, on linux 64-bit. Concider this program: section .data ptr: dq 0 section .text global _start _start: mov [ptr], rsp mov rax, 60 mov rdi, 0 syscall Here I try...
Set precision dynamically using sprintf
c,printf,format-string
Using sprintf and the general syntax "%A.B" I can do this: double a = 0.0000005l; char myNumber[50]; sprintf(myNumber,"%.2lf",a); Can I set A and B dynamically in the format string?...
How to increment the value of an unsigned char * (C)
c++,c,openssl,byte,sha1
I have a value stored as an unsigned char * (in C). This holds the SHA1 hash of a string. My goal is to cover the SHA1 key space. Since I'm using <openssl/evp.h> to generate the hashes, I end up with an unsigned char* holding the SHA1 value. Now I...
Ignore first few lines and last few lines in a file Linux
linux,awk
I have a file like this and would like to print $0 except the first two and last three lines in linux. Tried awk command but no luck, is there any options I am using the following command - I suppose I am doing something wrong, but not able to...
What does it indicate if /proc/PID/maps shows zero for all addresses?
linux,linux-kernel
I'm debugging a problem with a Linux DNS server. Curiously, when I look at /proc/PID/maps for the DNS server process, this is what I get: 00000000-00000000 r-xp 00000000 00:0e 2344 /usr/sbin/unbound 00000000-00000000 rw-p 00000000 00:0e 2344 /usr/sbin/unbound 00000000-00000000 ---p 00000000 00:00 0 00000000-00000000 rw-p 00000000 00:00 0 [heap] 00000000-00000000 rw-p...
scanf get multiple values at once
c,char,segmentation-fault,user-input,scanf
I need to get in one single shot different inputs from one single line. In particular I need to get a single char and then, depending on which char value I just read, it can be a string and an int or a string, an int and another string and...
Array breaking in Pebble C
c,arrays,pebble-watch,cloudpebble
I'm trying to create a simple dice-rolling application in Pebble using C on CloudPebble. I have an array of different die sizes you can scroll through using Up/Down, and you roll (currently just generate a random number, it'll get fancier later) using the middle button. There's also a label at...
Does strlen() always correctly report the number of char's in a pointer initialized string?
c,strlen
As long as I use the char and not some wchar_t type to declare a string will strlen() correctly report the number of chars in the string or are there some very specific cases I need to be aware of? Here is an example: char *something = "Report all my...
C programming - Confusion regarding curly braces
c,scope
The following code is for replacing multiple consecutive spaces into 1 space. Although I manage to do it, I am confused in the use of curly braces. This one is actually running fine: #include <stdio.h> #include <stdlib.h> int main() { int ch, lastch; lastch = 'a'; while((ch = getchar())!= EOF)...
While loop in bash using variable from txt file
linux,bash,rhel
I am new to bash and writing a script to read variables that is stored on each line of a text file (there are thousands of these variables). So I tried to write a script that would read the lines and automatically output the solution to the screen and save...
ret_from_syscall source code and when it is called
linux,linux-kernel,kernel,linux-device-driver,system-calls
In the below call trace we see function called ret_from_syscall. Which function is this ? When it will called during system call ? Where is the corresponding code for this ? May 7 16:40:34.322086 warn TCU-0 kernel: [cf83ddc0] [00009751] 0x9751 (unreliable) May 7 16:40:34.322086 warn TCU-0 kernel: [cf83ddd0] [c00469ac] do_syslog+0x19


text:
Open-File Report 2006-1255
Near complete coverage of the East Antarctic Shield by ice hampers geological study of crustal architecture important for understanding global tectonic and climate history. Limited exposures in the central Transantarctic Mountains (CTAM), however, show that Archean and Proterozoic rocks of the shield as well as Neoproterozoic-lower Paleozoic sedimentary successions were involved in oblique convergence associated with Gondwana amalgamation. Subsequently, the area was overprinted by Jurassic magmatism and Cenozoic uplift. To extend the known geology of the region to ice-covered areas, we conducted an aeromagnetic survey flown in draped mode by helicopters over the Central Transantarctic Mountains and by fixed-wing aircraft over the adjacent polar plateau. We flew more than 32,000 line km covering an area of nearly 60,000 km2 at an average altitude of 600 m, with average line spacing 2.5 km over most areas and 1.25 km over basement rocks exposed in the Miller and Geologists ranges. Additional lines flown to the north, south, and west extended preliminary coverage and tied with existing surveys. Gravity data was collected on the ground along a central transect of the helicopter survey area.
Posted September 2006
Part or all of this report is presented in Portable Document Format (PDF); the latest version of Adobe Acrobat Reader or similar software is required to view it. Download the latest version of Acrobat Reader, free of charge or go to access.adobe.com for free tools that allow visually impaired users to read PDF files.


text:
Santa Clara County / CALIFORNIA
Football fans, visitors, and residents are gearing up to celebrate the Super Bowl (SB50) in Santa Clara County. Whether eating at home, barbecues, parties, or restaurants, the Santa Clara County Department of Environmental Health encourages residents and visitors to use their food safety playbook when preparing food or dining out.
"We want the public to have the food safety tools they need to make smart, informed decisions when celebrating with family and friends during SB50 activities," said Jim Blamey, Director of the Santa Clara County Department of Environmental Health. "Consumers can use our food preparation tips and the SCCDineOut iPhone App as an SB50 food safety playbook for celebrating with food safely in the coming days."
The Consumer Protection Division's Food Safety Program provides a wide range of services to ensure that food purchased by consumers is safe and wholesome. These services include inspections of food facilities, investigations of foodborne illnesses, local response to food recalls and responding to public complaints.
SCCDineOut Mobile App (iPhone)
The SCCDineOut mobile App is an information tool provided by the Department of Environmental Health for anyone planning to eat at local restaurants in Santa Clara County. It offers online food facility inspection results to help consumers choose an eating establishment.
On SCCDineOut, consumers also can quickly and easily check compliance scores from the County's food facility placarding and scoring program. The program assigns a Green, Yellow, or Red colored placard for food facilities and posts the results of environmental health inspections online along with the overall compliance score, in an effort to provide the consumer information when making their decision on where to eat.
Features of the SCCDineOut app include:
– Inspection results for thousands of food facilities within Santa Clara County
– Search by food facility name or those near your current location
– Sort inspection results by compliance score
– Contact information for food facilities
– Closure information about food facilities that are immediately closed due to a major violation
– More information about the placard color and compliance score
– Option to submit feedback to the Department
Food facility and inspection reports and food placarding scores can be viewed online at the Department's SCCDineOut web site: _URL_
"We encourage residents and visitors to download the SCCDineOut app so they have inspection results and compliance scores readily available when visiting local eateries," said Michael Balliet, Director of the Department of Environmental Health Consumer Protection Division. "We also want to remind consumers to follow essential food safety guidelines during any gathering or celebration involving food."
Food Preparation Tips
To help residents stay healthy and safe, and to avoid food-borne illness, the Department of Environmental Health has provided the following guidelines to prepare, handle and store food:
- Wash your hands with warm water and soap for at least 20 seconds before and after handling food.
- Marinate food in the refrigerator. Reserve a portion of the unused marinate to use as a sauce. Don't use sauce that was used to marinate raw meat or poultry on cooked food.
- When grilling foods, preheat the coals for 20 to 30 minutes, or until the coals are lightly coated with ash.
- Use a food thermometer to make sure meat and poultry are thoroughly cooked to their safe minimum internal temperature:
- Beef, pork, lamb and veal (steaks, roasts, and chops): 145 degrees F with a 3-minute rest time.
- Ground meats: 160 degrees F.
- Whole poultry, poultry breasts and ground poultry: 165 degrees F.
- Fish should be opaque and flake easily or cook to 145 degrees F.
- Always use a fresh, clean plate and tongs for serving cooked food. Never reuse items that touched raw meat or poultry to serve the food once it is cooked.
- Use separate cutting boards and utensils for raw meat and ready-to-eat items such as vegetables, fruits or breads.
- Keep perishable food cold until it is ready to cook. In hot weather (above 90 degrees F), food should NEVER sit out for more than one hour. Keep hot food hot by setting it to the side of the grill rack, not directly over the coals where it could overcook.
- A full cooler will maintain its cold temperature longer than a partially filled one. When using a cooler, keep it out of the direct sun by placing it in the shade or shelter. Keep drinks in a separate cooler from foods. The beverage cooler will be opened frequently while the food cooler stays cold.
Food facilities can prepare for a successful SB50 event by visiting the Department of Environmental Health website at _URL_ or calling the Consumer Protection Division at _PHONE_.
The public can file a food safety complaint about retail food facilities (restaurants, bars, bakeries, and grocery stores that sell food and beverages directly to the consumer) with the Consumer Protection Division, by calling _PHONE_ or e-mail at _EMAIL_.
For more food safety information, visit _URL_


aspartate ammonia-lyase
(redirected from aspartase)
Also found in: Encyclopedia.
as·par·tate am·mo·ni·a-ly·ase
a nonmammalian enzyme that catalyzes the conversion of l-aspartate to fumarate, splitting out ammonia.
Mentioned in?
References in periodicals archive?
20) MRS may show normal to increased choline and myoinositol and decreased n-acetyl aspartase.
pestis lacks aspartase activity in this environment, the bacteria converted L-glutamate into aspartic acid during the time of bacterial restriction.
However, it has been shown that the kinetics of enzymes can be changed by polyhydric alcohols (25) and that aspartase is activated by glycerol, ethylene glycol (1,2-ethanediol), and propylene glycol (1,2-propanediol) (26).


Can a deaf person sing? 2 success stories that prove they can
Some people live their day to day life not realizing that being able to use their five senses is a blessing on its own.
Imagine you woke up one day and couldn't hear anything around you, how would you feel? Some people wake up like that every single day.
Being deaf is challenging, yet it doesn't stand in the way of achieving dreams. But what if that dream was to become a singer? Can a deaf person sing even when they can't hear their own voice?
It isn't common for deaf people to become famous singers, otherwise you wouldn't be asking this question. However, that doesn't mean it's impossible.
Mandy Harvey and Marko Vuoriheimo are two perfect examples that a deaf person can indeed create amazing songs, so let's learn more about their stories.
Can a deaf person sing if they lost hearing at later stages of their life?
Mandy Harvey wasn't born deaf. When she was a child, she had hearing problems and underwent many surgeries to try and correct them. Despite those efforts, she gradually lost her hearing due to a connective tissues disorder called EDS.
Her talent as a singer was discovered in her childhood, and she used to sing a lot as a child. That's why losing her hearing had a negative impact on her at first and made her quit college where she was studying vocal music education.
However, this stage didn't last. Mandy decided to go back to singing and fight for her dreams. Today, she's a successful singer, songwriter and motivational speaker.
She wrote a book called "Sensing the Rhythm: Finding My Voice in a World Without Sound" in which she tries to help others pursue their dreams and hopes.
Here's one for her amazing songs:
This song is very special and has a very touching part: at around 2:10 the sound goes out, which invites us to live her own experience of how life is for her.
Mandy is full of talent and a living proof that a deaf person can sing and excel at it, but we can't deny that she had an advantage: she wasn't born deaf. According to her, she relies on her near perfect pitch mixed in with muscle memory from when she used to sing before in order to sing now.
But what about people who were born deaf?
Can a deaf person sing if they were born without hearing?
This one is more challenging, but it's also not impossible. Marko Vuoriheimo (aka Signmark) is a living proof of that.
He was born deaf but his childhood dream was to become a singer. Despite so many people doubting him, he never lost hope.
With his hard work and dedication, he was able to land a record deal with an international music label and became the first deaf person in the world to do that.
Signmark is a proof that music is not only for those who hear: even a deaf person can have success in the music industry. He was fascinated with hip-hop and started releasing his own hip-hop songs.
Signmark's songs and lyrics are so powerful and amazing, and here's one example:
In this song, he tells the story of his life as a deaf person and emphasizes an important message:
Damn right we can't hear, but I don't care
We ain't disabled here, I use sign language yeah
A person being deaf doesn't mean they're less capable of achieving their dreams. Everything's possible with enough hard work and dedication.
But how can a deaf person sing if they can't hear anything?
It relies on two factors: the person and the people around them. That's how both Mandy and Signmark succeeded.
When singing, they can sense music through touch. They feel the vibration of the drums and bass, and that's what helps them follow the beat.
In Mandy's case, her muscle memory was also a helping factor.
In addition to this, the encouragement and help of the people around them can play a huge role in helping them succeed (as was the case for Signmark).
These two success stories shed the light on an important thing: it's usually the barriers that we create for ourselves that stop us from achieving our dreams.
Even the smallest goals like camping above the clouds or crossing off all the items on your bucket list can't be achieved if you don't believe in yourself.
Can a deaf person sing? Definitely, if they put enough dedication in it. It's a hundred times more challenging, but not impossible. Everything in life is the same. Sometimes, a goal can be more challenging to you, but that doesn't mean you can't achieve it.
Stay strong, and always chase your dreams!
If you liked today's article, leave your email below and we'll send you a recap of our articles every week so that you don't miss any of them.
Some of the links may be affiliate links, and we may get paid if you buy something or take an action after clicking one of them. Please check our disclaimer for more details


text:
Precise shrinking and setting in one device.
Shrink grip and shrink release, measurement and presetting – the KENOVA set line V9xx-S offers all this and more. A tool presetter combined with an inductive shrink fit device; functionality is guaranteed with no limitations in terms of technology. Its length adjustment during the shrinking process and measuring precision are unique.
Dynamics and flexibility in one.
KENOVA set line V9xx-S combines the tool presetter KENOVA set line V9xx and the shrink fit device i-tec® XL to create an automatic station. The KENOVA set line V9xx-S enables tools to be perfectly measured, preset and simultaneously shrunk on one device. The unique feature is that users have two tool presetting processes available simultaneously.
In the phase in which the chuck is opened by warming, the tool is set exactly to its target length fully automatically. The benefits of this process include the short cycle times and the option of changing the tool in a single cycle. Naturally chucks from different "quality manufacturers" can also be used here.
If measurements are necessary, which do not permit setting during the expansion phase of the chuck, the length of the shank tool is determined using setting adaptors prior to heating. The tool is finally shrunk to its target length using intelligent calculation and pre-positioning of the setting pins. This process is mainly designed for complex measuring tasks or for HSS tools.
Ergonomic and flexible cooling system for simultaneously cooling up to three shrink fit chucks. Includes a holder for up to 16 cooling sleeves, magnetic plate for setting pins and drawer for further accessories.
Swivel shrink fit equipment
Swivel shrink fit equipment with high-performance coil with up to 13 kW heat output. With a 600 mm effective stroke, even long tools and extensions can be automatically shrunk. Suitable for shrinking HM and HSS tools with a Ø of 3 - 32 mm. The swivel equipment enables even large cutter heads with a Ø of up to 300 mm to be measured and set.
Fully-functional tool presetter with integrated induction coil for automatic shrinking with length adjustment.
· 5 automatic axes
Cutting edge scanning:
· CCD camera with telecentric lens and ring light
Electronic measurement equipment:
· PC electronics with intelligent image processing
· 24" TFT colour monitor
· Modular precision CNC spindle
· Inserts for all common tool holders
· X = -50 to 530 / 830 / 1030 mm (ø)
· Z = 600 / 800 / 1000 mm
· Shrink length: 600 mm
· Automatic induction coil
· With and without length adjustment
· For HSS and carbide
· Optional: Vacuum for smoke removal
· Separate cooling station, completely decoupled from the thermally critical presetting part;
simultaneous cooling of 3 shrink chucks
· Contact with cooling adapters through which water flows and modular inserts
· Cooling time about 60 seconds


Nostradamus Predicting Maelstroms
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »
virtual-dom
2.1.1 • Public • Published
virtual-dom
A JavaScript DOM model supporting element creation, diff computation and patch operations for efficient re-rendering
build status NPM version Coverage Status Davis Dependency status experimental
Sauce Test Status
Motivation
Manual DOM manipulation is messy and keeping track of the previous DOM state is hard. A solution to this problem is to write your code as if you were recreating the entire DOM whenever state changes. Of course, if you actually recreated the entire DOM every time your application state changed, your app would be very slow and your input fields would lose focus.
virtual-dom is a collection of modules designed to provide a declarative way of representing the DOM for your app. So instead of updating the DOM when your application state changes, you simply create a virtual tree or VTree, which looks like the DOM state that you want. virtual-dom will then figure out how to make the DOM look like this efficiently without recreating all of the DOM nodes.
virtual-dom allows you to update a view whenever state changes by creating a full VTree of the view and then patching the DOM efficiently to look exactly as you described it. This results in keeping manual DOM manipulation and previous state tracking out of your application code, promoting clean and maintainable rendering logic for web applications.
Example
var h = require('virtual-dom/h');
var diff = require('virtual-dom/diff');
var patch = require('virtual-dom/patch');
var createElement = require('virtual-dom/create-element');

// 1: Create a function that declares what the DOM should look like
function render(count) {
 return h('div', {
 style: {
 textAlign: 'center',
 lineHeight: (100 + count) + 'px',
 border: '1px solid red',
 width: (100 + count) + 'px',
 height: (100 + count) + 'px'
 }
 }, [String(count)]);
}

// 2: Initialise the document
var count = 0; // We need some app data. Here we just store a count.

var tree = render(count); // We need an initial tree
var rootNode = createElement(tree); // Create an initial root DOM node ...
document.body.appendChild(rootNode); // ... and it should be in the document

// 3: Wire up the update logic
setInterval(function () {
 count++;

 var newTree = render(count);
 var patches = diff(tree, newTree);
 rootNode = patch(rootNode, patches);
 tree = newTree;
}, 1000);
View on RequireBin
Documentation
You can find the documentation for the seperate components in their READMEs
For information about the type signatures of these modules feel free to read the javascript signature definition
DOM model
virtual-dom exposes a set of objects designed for representing DOM nodes. A "Document Object Model Model" might seem like a strange term, but it is exactly that. It's a native JavaScript tree structure that represents a native DOM node tree. We call this a VTree
We can create a VTree using the objects directly in a verbose manner, or we can use the more terse virtual-hyperscript.
Example - creating a VTree using the objects directly
var VNode = require('virtual-dom/vnode/vnode');
var VText = require('virtual-dom/vnode/vtext');

function render(data) {
 return new VNode('div', {
 className: "greeting"
 }, [
 new VText("Hello " + String(data.name))
 ]);
}

module.exports = render;
Example - creating a VTree using virtual-hyperscript
var h = require('virtual-dom/h');

function render(data) {
 return h('.greeting', ['Hello ' + data.name]);
}

module.exports = render;
The DOM model is designed to be efficient to create and read from. The reason why we don't just create a real DOM tree is that creating DOM nodes and reading the node properties is an expensive operation which is what we are trying to avoid. Reading some DOM node properties even causes side effects, so recreating the entire DOM structure with real DOM nodes simply isn't suitable for high performance rendering and it is not easy to reason about either.
A VTree is designed to be equivalent to an immutable data structure. While it's not actually immutable, you can reuse the nodes in multiple places and the functions we have exposed that take VTrees as arguments never mutate the trees. We could freeze the objects in the model but don't for efficiency. (The benefits of an immutable-equivalent data structure will be documented in vtree or blog post at some point)
Element creation
createElement(tree:VTree) -> DOMNode
Given that we have created a VTree, we need some way to translate this into a real DOM tree of some sort. This is provided by create-element.js. When rendering for the first time we would pass a complete VTree to create-element function to create the equivalent DOM node.
Diff computation
diff(previous:VTree, current:VTree) -> PatchObject
The primary motivation behind virtual-dom is to allow us to write code independent of previous state. So when our application state changes we will generate a new VTree. The diff function creates a set of DOM patches that, based on the difference between the previous VTree and the current VTree, will update the previous DOM tree to match the new VTree.
Patch operations
patch(rootNode:DOMNode, patches:PatchObject) -> DOMNode newRootNode
Once we have computed the set of patches required to apply to the DOM, we need a function that can apply those patches. This is provided by the patch function. Given a DOM root node and a set of DOM patches, the patch function will update the DOM. After applying the patches to the DOM, the DOM should look like the new VTree.
Original motivation
virtual-dom is heavily inspired by the inner workings of React by facebook. This project originated as a gist of ideas, which we have linked to provide some background context.
Tools
Install
npm i virtual-dom
DownloadsWeekly Downloads
17,987
Version
2.1.1
License
MIT
Last publish
Collaborators
 - avatar


How to create a population pyramid
A population pyramid shows the distribution of various age groups in a population, for men and women. It's a great way to communicate the age distribution; to see, e.g., that a country has a very young or very old population. It's a common chart type, so most readers won't have problems reading this chart type.
In this tutorial, we will create a population pyramid with Datawrapper's split bar chart.
There are four steps in each Datawrapper chart creation pipeline: Upload Data, Check & Describe, Visualize and Publish & Embed. We will go through all of them:
1
Upload data
In this first step, you can copy & paste data from Excel or the web, or upload your own CSV files. Here is a part of the data for our chart up there:
Age span Male Female
95-100 34000 138000
90-95 213000 490000
85-90 619000 _PHONE_
80-85 _PHONE_ _PHONE_
... ... ....
20-25 _PHONE_ _PHONE_
15-20 _PHONE_ _PHONE_
10-15 _PHONE_ _PHONE_
5-10 _PHONE_ _PHONE_
<5 _PHONE_ _PHONE_
Note how the data set should be structured:
 - One header row containing labels ("Age span", "Male" and "Female").
 - The first column defines the age buckets ("15-20", "20-25", etc.). Alternatively, years or single ages work.
 - The second and third column contains the number of people in this age bucket, for males and females. This number can be absolute, like in our cases, or relative (shares of the population).
This is how the data looks like once we copied it in step 1, Upload Data:
After finishing this step, click "Proceed" to get to the second step, Check & Describe:
2
Check & Describe
Here, your data should look like above. If your first column contains dates (like years, days, weeks), Datawrapper will tell you that it detected the data format and will color it green. Numbers will appear in blue. To learn more about data column type detection, visit this article.
Finally, make sure that the box "First row as label" is ticked so that Datawrapper correctly assigns the values to the labels. Click on "Proceed" and Datawrapper will take you to the next step:
3
Visualize
In this step, you can see four tabs. In the first tab, "Chart type", we see a grid of chart types. To create a population pyramid, we want to choose the chart type "Split Bars":
In the second tab, "Refine", we can configure our chart; e.g., we can change the colors of the bars To learn more about each feature, visit the article "Customizing your split bar chart". Here we will talk only about the settings that will define a population pyramid:
First, you want to make sure that the number format works best for this chart. You can find the number formatting in the panel "Labeling". If you have very high population values, choose the number format "123.45k" or "123.4k". In case your pyramid shows population shares, choose the format "0%" or "0.0%".
But our pyramid still doesn't look like a pyramid. To change that, we want to go to the next panel, "Appearance", and "Mirror Bars":
You can also play around with the space between the columns. Maybe you prefer no space between the male and the female numbers at all? We also turned on the bar background, to give the whole chart a less cluttered appearance.
Finally, we changed the custom range in the last panel, so that the bar background appears even for the highest value. Extending the custom range gives the whole chart a more tidy look:
In the last two tabs, you can add annotations and choose the design for your chart. Visit the article "Customizing your split bar chart" to learn more about these features.
Click on "Publish" to get to the last step, "Publish & Embed".
4
Publish & Embed
Congratulations to your finished population pyramid! In this last step, you can publish your work and decide how to share it with the world. The best way to use a Datawrapper chart is by embedding it directly on your website. To do that, click the big blue button that says " Publish Chart". Then, copy & paste the embed code snippet into your website or CMS. You can also download your chart as a PNG or PDF by upgrading to a paid Single or Team account.
Still need help? Contact Us Contact Us


2 cups white granulated sugar
2 Tablespoons water
Plastic Easter Eggs to use as molds
Big Needle or ice pick or similar stylus
Mix the sugar and water in a bowl until it "packs". It should feel like damp sand. Add more sugar or water to achieve this consistency.
Pack firmly into half of a plastic Easter Egg, using a teaspoon to tamp it solidly, a spoonful at a time, then gently tip and tap it out onto wax paper or foil covered cookie sheet. Let sit at least 24 to 36 hours until completely dried (If you live in a really humid place it make take even longer to dry). It must be entirely dry inside or it will simply fall apart during the next step.
Using needle or other sharp clean stylus, gently hollow out the egg halves by pressing the point into center of the flat side of the sugar egg-half, with a circular motion. The stylus should easily and gently shave the excess out (This scraped out sugar can be re-wetted and used to make more sugar eggs later). The thinner the walls of the egg shell the prettier it will be – and more fragile ' but try to make it as thin as you can. Place a small plastic creature or coin or any waterproof prize inside and join two halves with frosting.
Finding Hogwarts


Inside 214-1E
Existential Pontification and Generalized Abstract Digressions
Computing function composition
This is an addendum to my second example in Anatomy of a thunk leak, in which I'd like to propose another solution to the space leak, involving computing the composition of all of these thunks. This solution is particularly notable because it preserves the denotation of the original function, that is, that f l (undefined, undefined) = (undefined, undefined). This should be surprising, because I claimed that it would be impossible for GHC to optimize a function with that had this denotation into one without the space leak by more eagerly evaluating some thunks. There is no contradiction: the optimization we would like to apply here is one of partial evaluation. Didn't understand that? Don't worry, a concrete example is coming soon.
As Heinrich Apfelmus points out, the space leak can be visualized as a large graph of expressions which has not been collapsed into a single value: 1 + (1 + (1 + (1 + (1 + (1 + ...))))). We can visualize this graph being built up in successive iterations of the function:
/img/composition/leak.png
The point of introducing strictness (and thus changing the denotation of the function) is that we keep collapsing (evaluating) the tree.
/img/composition/strict.png
But notice the value highlighted in red: we must know what this value is before we can do any computation. But if this value is unknown (or, in our case, if we don't want to evaluate it while we are forming this graph), our strategy doesn't really work. We can't collapse the entire tree. However, (and this is the key), because addition is associative, we can rotate the tree, and then evaluate the (now left) subtree.
/img/composition/manual.png
In effect, all of the thunks have been merged together: instead of 1 + 1 + 1 + X. we now have 3 + X. Simple! Here is the implementation:
f l (x0, x1) = go l (0, 0)
 where go [] (!c0, !c1) = (c0 + x0, c1 + x1)
 go (x:xs) !c = go xs (tick x c)
tick x (!c0, !c1) | even x = (c0, c1 + 1)
 | otherwise = (c0 + 1, c1)
go is essentially the strict version of f, but at the end of the iteration it returns a pair with two thunks: c0 + x0 and c1 + x1, were both c0 and c1 have been fully evaluated.
Here's another way of thinking of how we're doing things:
/img/composition/peval.png
It would be pretty cool if this could be done automatically, and it would pretty applicable in other domains too. Combining functions that are associative are a precious commodity when it comes to parallelization.
3 Responses to "Computing function composition"
 1. John Salvatier says:
 Is this basically a subcase of supercompilation? _URL_
 2. Heinrich Apfelmus says:
 Yay for graphs. :-)
 I think the point is that the optimized function has no direct recursive definition. Instead, you define it in terms of a recursive helper function.
 I'm not sure whether partial evaluation is relevant here. I think you can't optimize (1+). (1+) to (2+) without knowing that (+) is associative. Evaluation inside the lambda doesn't help with that.
 3. John: Not sure, but IIRC supercompilation is compile time and this needs to happen at runtime.
 Heinrich: Yes, that's the straightforward translation. The correctness of this approach is ensured by the associativity of plus (though it's probably not strictly necessary.)
 Actually, the key for function composition is not the associativity of plus, but the associativity of function composition. You just need to know how to combine function appropriately.
Leave a Comment


What are the requirements for access by military recruiters to high school students?
Local educational agencies (LEAs) receiving assistance under the Elementary and Secondary Education Act of 1965 (ESEA) are generally required to give military recruiters the same access to secondary school students as they provide to postsecondary institutions or to prospective employers. LEAs are also generally required to provide students' names, addresses, and telephone listings to military recruiters, when requested.
K-12 School Officials
Military Recruiter


probability P(x|Admixture), which is the probability that a sample has size x, given that the data (viewed as a time series of maxima for each block) in that sample follow a mixture of distributions. This probability can be calculated using Bayes' theorem from the following expression:
(14)P(xAdmixture)P(Admixturex)π(x).
By writing this theorem in the form (14), we are assuming that the marginal likelihood is considered a normalization factor. Therefore, P(x|Admixture) can be computed using expression (14) and then normalized under the requirement that it is a probability mass function (pmf). In Eq. (14), the prior probability π(x) is assumed to have a uniform distribution. Thus, the expected value 〈x〉 can be calculated from the following expression:
(15)x=P(xAdmixture)x.
Turning to a concrete example, Ntotal=100 samples with sizes x=100,200,,1000 were randomly selected from the data, and the probability P(Admixture|x) calculated following Eq. (13). The probability mass function P(x|Admixture) (pmf) was obtained by applying the procedure previously described and the expected value was found to be 〈x〉=544 (about 163 s).
A thorough statistical analysis was conducted by fitting Mmax to the combined distribution in Eq. (6) for 100 samples with sizes at and below the average (100, 200, 300, …, 500) that were randomly selected from the entire dataset (49 647 blocks). For each random sample three null (H0) hypotheses were verified: (i) the sample comes from a mixture of distributions (Eq. 6), (ii) the sample comes from a Gumbel distribution or (iii) the sample comes from a Gaussian distribution. The three hypotheses were examined by the K-S method with limiting values calculated from Monte Carlo simulations (see Table C1).
The results for sample sizes 100, 200, 300, 400 and 500 are shown in Table 1. As an example, for case 1 (sample size 100) the null hypothesis H0 at α=0.05 was rejected for 13, 35 and 92 samples for the mixture, Gaussian and Gumbel distributions, respectively. For case 2 (sample size 200), the null hypothesis was rejected for 27, 58 and 96 samples. Using n=500 for the mixture of distributions (Eq. 6), the null hypothesis H0 was rejected for 50 samples. For the Gumbel distribution, the null hypothesis was rejected for all the samples (100) and the null hypothesis for the Gaussian distributions was rejected for 83 samples.
Table 1For each sample size, the number of samples with the null hypothesis H0 rejected at α=0.05 for all the distributions.
Download Print Version | Download XLSX
_URL_
Figure 7For four random samples that are distributed following the admixture distribution (with sample size 500), observed (histogram) and fitted (solid line) using Eq. (6). Also shown for each distribution are the p value of the goodness of fit test and the parameter θ indicating the weight of the Gumbel component.
Download
The results shown in Table 1 confirm that, for all sample sizes, the mixture of distributions provides a better fit than the Gumbel and Gaussian distributions, confirming the correctness of the choice of the mixture of distributions (Eq. 6) for modeling the largest droplet radius. As an example, Fig. 7a–d present, for a sample size of n=500, the largest droplet mass empirical distributions obtained for four different samples that are distributed following the mixture and the corresponding fit of Eq. (6).
5 Discussion and conclusions
Back to toptop
An infinite system has two possible evolutionary phases: the ordered phase and the disordered or statistical phase. In the disordered phase there is a continuous droplet distribution and a near equality of the largest and second-largest mass. After the sol–gel transition, there is an ordered phase characterized by the existence of a giant macroscopic droplet (gel) coexisting with an ensemble of microscopic particles.
A finite system can be in the ordered, disordered and pseudo-critical phases, according to the scenario described in Botet (2011) and Gruyer et al. (2013). The ratio η, defined in Eq. (8), takes values between η=+1, −1, which correspond to pure Gaussian and Gumbel distributions, and when -1<η<1 the system is in the pseudo-critical domain. In the disordered phase, fluctuations and correlations are negligible, there are only a few collision events, and Mmax is the largest part of randomly distributed droplets. In that case, the distribution of the mass of the largest droplets follow a Gumbel distribution. At later times in the evolution of the finite system, there are many collision events and Mmax is the result of the coalescence of other droplets. There is an additive process, the central limit theorem applies and the mass (or radius) of the largest droplets follows a Gaussian distribution.
In the pseudo-critical phase, the fluctuations and correlations are no longer negligible and the distribution is of neither of the asymptotic forms (Gumbel or Gaussian). In this case, the fit of the largest droplet mass (gel), is a mixture of a Gumbel (disordered state) and Gaussian (ordered state) distributions. As was demonstrated in the preceding section, this combined distribution (Eq. 6) is a good approximation to the largest droplet distribution (gel) in the pseudo-critical region. The fact that the mixture of distributions provides a better fit than the Gumbel and Gaussian distributions shows that the samples selected in our study are mainly in the pseudo-critical phase. To confirm this fact, the ratio η was calculated for 1000 samples of size n=500 selected randomly from the data. Figure 8 shows that for 90 % of the samples the ratio η lies in the interval [−0.9, 0.9], clearly indicating that samples are in the pseudo-critical region.
We could show that the gel radius (largest droplet) is described as a mixture of the two asymptotic distributions because the effect of the collision–coalescence process was in some way isolated for the orographic cloud data analyzed in this report. A similar analysis could be performed for the early stage of a convective cloud formation, before some other processes, e.g., entrainment, mixing, turbulence or ice formation, could obscure the finite system pseudo-critical scenario, and the gel formation that is basically a consequence of the collision–coalescence process could no longer be observed.
In this work, the early stage of formation of a warm cloud is viewed in the context of critical phenomena theory and can be thought of as being in ordered, disordered or pseudo-critical phases. The disordered phase corresponds to a cloud with a droplet spectrum formed mainly by the cloud condensation nuclei activation process, with an almost random distribution of particles, and the distribution of the mass of the largest droplets is Gumbel. In the pseudo-critical phase a giant droplet (gel) locally coexists with a continuous ensemble of small droplets. As the system considered is finite, there is no sudden change from disordered to ordered phase (sol–gel transition), but instead there is a pseudo-critical phase in which fluctuations are important and the gel distributes according to Eq. (6). The analysis presented here of the largest droplet distribution provides useful insight into the early stages of cloud development in warm clouds. In follow-up studies, the analysis of cloud data at different times or distances from the cloud base would be helpful in identifying the pseudo-critical phase and tracking the transition from the disordered to the ordered phase dynamically.
_URL_
Figure 8Histogram of the ratio η=(wGaussian-wGumbel)/ (wGaussian+wGumbel), which measures the distance to the critical point.
Download
Data availability
Back to toptop
Data availability.
Access to the data used to produce the results discussed in this paper are available from the first author upon request by email.
Appendix A
Back to toptop
The sol–gel transition time Tgel is defined as the time when the second moment M2(t)=M2(t0)1-CM2(t0)t becomes infinite, then 1-CM2(t0)t=0 and Tgel=CM2(t0)-1. The equation for M2(t) (moment of order 2 with respect to mass) can be found from the general equation for moment evolution that was obtained by Drake (1972) from the continuous form of the kinetic collection Eq. (1). It has the following form:
(A1)dMn(t)dt=1200(x+y)n-xn-ynK(x,y)N(x,t)N(y,t)dxdy.
In Eq. (7), K(x,y) is the collection kernel, N(x,t) is the average droplet concentration and x is the droplet mass. If we consider the product kernel K(x,y)=C(xy) in Eq. (A1), then


text:
News and research before you hear about it on CNBC et al. Claim your 1-week free trial for Street Insider Premium here.
Exagen Inc. (Nasdaq: XGN), a leading provider of autoimmune testing solutions, and Queen Mary University of London, today announced the signing of a collaborative research and licensing agreement exclusive. The collaboration will focus on the development and optimization of patent-pending precision medicine approaches, based on RNA expression signatures, to personalize the selection of therapeutic agents for patients with rheumatoid arthritis. (PR). Both parties will contribute to the development of patent-pending tests, leading to the commercialization of new molecular tests that segment patients based on gene expression in their synovial tissue biopsies.
RA is estimated to affect approximately two million patients in the United States and is twice as common in women as in men and may be difficult to manage due to the variability in response to treatment of an patient to another. The selection of therapeutic agents for patients with RA remains a significant unmet need. Patients with RA often try several therapies empirically before finding one that decreases the activity of their disease. Placing a patient with RA on ineffective therapy risks advancing and aggravating the disease, further damaging the joints, and wasting a great deal of expense on expensive therapeutic agents. Currently, there is no reliable test to predict a patient's positive response prior to the selection of commonly prescribed biological therapeutic agents.
Based on Professor Costantino Pitzalis and Dr Myles Lewis's definition of molecular pathology of disease course and response to treatment, Exagen has acquired an exclusive worldwide license for a family of patent-pending tests relating to RNA expression models used in predicting patient response to prescribed csDMARDs and biologic therapies for RA. The tests use minimally invasive synovial tissue biopsies as input, which are then evaluated for RNA expression data. This data is then processed by proprietary algorithms that provide actionable information about the predicted csDMARD and the biological therapeutic response for patients with RA based on the RNA expression patterns of an individual patient.
Professor Pitzalis, Professor of Rheumatology in Arthritis and Deputy Director of the William Harvey Research Institute, Barts and the London School of Medicine and Dentistry at Queen Mary University in London, said: âI am delighted to be a part of this research collaboration with Exagen and I look forward to contributing to the development of diagnostics aimed at integrating molecular pathology into clinical algorithms to better define specific pathways leading to disease diversity in individual patients. This would better inform clinicians about patient prognosis and improve their ability to make informed decisions about prescribing drugs. Exagen's track record in bringing diagnostics to market takes this opportunity to a whole new level, bringing the promise of precision medicine closer to clinical implementation.
Professor Pitzalis is a leading authority on rheumatoid arthritis. He leads a team of 50 clinical researchers and is the author of over 300 peer-reviewed publications in the field of inflammation, immunity and arthritis. Professor Pitzalis formulated this revolutionary approach to gene expression models with Dr Myles Lewis, head of the bioinformatics / biostatistics group at the Center for Experimental Medicine and Rheumatology. âWe are delighted to be working with Professor Pitzalis and Dr Lewis of Queen Mary University in London to accelerate the development of their highly innovative RNA-based biomarker assays to better serve patients with RA. Professor Pitzalis is a well-respected thought leader in arthritis research, and Exagen looks forward to working with his group to deliver exciting and revolutionary products to improve the continuum of care for patients with the disease. rheumatoid arthritis, âsaid Ron Rocca, President and CEO of Exagen Inc.â Exagen is committed to developing and commercializing these tests to inform treatment decisions throughout the patient's journey with RA. We intend to market the new tests under the name AVISEÂ® RADR (Rheumatoid Arthritis Drug Response).
For more information on AVISEÂ® RADR, please visit _URL_


text:
Tackling the Laws of Rugby
Part of the Rugby For Dummies Cheat Sheet
Rugby is governed by laws, not rules. The laws of the game are designed to produce an entertaining and free-flowing contest for possession in an attempt to score the most points.
The laws of rugby are constantly evolving and are the same all over the world, wherever the game is played. In general, the laws governing play are straightforward about what's allowed, but three crucial parts can be somewhat confusing: the tackle situation, advantage, and offsides:
In a nutshell, when a tackle is made in rugby the requirements are that the tackler releases the tackled player, who then releases the ball so that players who are on their feet can use it.
Advantage simply means that when one team makes an error the other team can try to capitalize on it, instead of the referee immediately stopping the action. If the players can't capitalize on the error, play restarts where the original mistake took place.
Specific offsides laws exist for different phases of play, but essentially players can't be involved if they're in front of a teammate who last played the ball or are behind the ball when the opposition has it.


Subscribe to Martyr2's Programming Underground RSS Feed
-----
File Chunking and Merging in C++
Icon Leave Comment
I got the idea for a file chunking program the other day while I was reading a Ruby article. I thought to myself, why not build a similar utility in C++? The idea of chunking a file (that is, taking a file and breaking it into smaller files) can be a useful utility when dealing with some rather big files. Perhaps if you mix it with some file compression before the chunking, it would be even better! The need for such a utility like this has diminished over recent years because of high bandwidth and larger storage mediums. However, some programs (like email) may still benefit from something like this. I will show you a simple example of breaking a file apart and then merging it back again into the original file... all right here on the Programming Underground!
<Swedish Chef from the Muppet Show in the kitchen throwing utensils and singing theme music>
The idea behind the chunking itself is not a complex one. What we need to do is locate a file, open it up, read so many bytes out of it, create a file for each bit we read and write that piece into the file. We then close that chunk file and open another and read more of the input file. We repeat the process until we reach the end of the original file.
Our chunking function is going to take three pieces of information. The full path to the file we want to chunk, the name we want to give each chunk (it will then append the chunk number) and the chunk size which the user can specify. So for instance if the user wanted to take "c:\input.txt" which is 330 bytes and tell it to chunk in segments of 50 bytes named "chunk", it is going to produce 7 files. 6 of those files will be 50 bytes and the last will be the remaining 30 bytes. They will be named "chunk.1", "chunk.2", "chunk.3" etc. I am sure you get the idea. ;)/>
We open the file input.txt and if everything is successful, we read out 50 bytes at a time and place them in new files. We continue the process until the input file reaches the end of the file. The code looks like this...

// Chunks a file by breaking it up into chunks of "chunkSize" bytes.
void chunkFile(char *fullFilePath, char *chunkName, unsigned long chunkSize) {
 ifstream fileStream;
 fileStream.open(fullFilePath, ios::in | ios::binary);
 // File open a success
 if (fileStream.is_open()) {
 ofstream output;
 int counter = 1;
 string fullChunkName;
 // Create a buffer to hold each chunk
 char *buffer = new char[chunkSize];
 // Keep reading until end of file
 while (!fileStream.eof()) {
 // Build the chunk file name. Usually drive:\\chunkName.ext.N
 // N represents the Nth chunk
 fullChunkName.clear();
 fullChunkName.append(chunkName);
 fullChunkName.append(".");
 // Convert counter integer into string and append to name.
 char intBuf[10];
 itoa(counter,intBuf,10);
 fullChunkName.append(intBuf);
 // Open new chunk file name for output
 output.open(fullChunkName.c_str(),ios::out | ios::trunc | ios::binary);
 // If chunk file opened successfully, read from input and
 // write to output chunk. Then close.
 if (output.is_open()) {
 fileStream.read(buffer,chunkSize);
 // gcount() returns number of bytes read from stream.
 output.write(buffer,fileStream.gcount());
 output.close();
 counter++;
 }
 }
 // Cleanup buffer
 delete(buffer);
 // Close input file stream.
 fileStream.close();
 cout << "Chunking complete! " << counter - 1 << " files created." << endl;
 }
 else { cout << "Error opening file!" << endl; }
}
As you can see, it is rather long and probably could be refactored a little. But stepping through it is not incredibly difficult. We open the input file, setup a buffer array which will hold each chunk read and then use that buffer to write to each file. The file name for each chunk is built using a string class (so make sure to include <string>) and then the chunk is written into it, closed and more input is read. The result of this function will yield the list of files ending in numbers.
Now once we have the chunks created, we will need a function that then takes each chunk file, opens it, reads it and puts it all into one file again.
As you can see we are opening each file in binary mode. This is so that we can not only read text files, but literally any file including jpg, exe files, dlls etc without having a serious problem or messing with bytes when we have a binary file.
The function to then merge the files together we call "joinFile". I guess I could have called it "mergeFile" or "glueFile" or something funny like that. This function also has a little helper function called "getFileSize" which simply gets the size of the chunk file so that it knows how big to make the buffer to read in the chunk. It goes a little bit like this...
// Finds chunks by "chunkName" and creates file specified in fileOutput
void joinFile(char *chunkName, char *fileOutput) {
 string fileName;
 // Create our output file
 ofstream outputfile;
 outputfile.open(fileOutput, ios::out | ios::binary);
 // If successful, loop through chunks matching chunkName
 if (outputfile.is_open()) {
 bool filefound = true;
 int counter = 1;
 int fileSize = 0;
 while (filefound) {
 filefound = false;
 // Build the filename
 fileName.clear();
 fileName.append(chunkName);
 fileName.append(".");
 char intBuf[10];
 _itoa(counter,intBuf,10);
 fileName.append(intBuf);
 // Open chunk to read
 ifstream fileInput;
 fileInput.open(fileName.c_str(), ios::in | ios::binary);
 // If chunk opened successfully, read it and write it to
 // output file.
 if (fileInput.is_open()) {
 filefound = true;
 fileSize = getFileSize(&fileInput);
 char *inputBuffer = new char[fileSize];
 fileInput.read(inputBuffer,fileSize);
 outputfile.write(inputBuffer,fileSize);
 delete(inputBuffer);
 fileInput.close();
 }
 counter++;
 }
 // Close output file.
 outputfile.close();
 cout << "File assembly complete!" << endl;
 }
 else { cout << "Error: Unable to open file for output." << endl; }
}
// Simply gets the file size of file.
int getFileSize(ifstream *file) {
 file->seekg(0,ios::end);
 int filesize = file->tellg();
 file->seekg(ios::beg);
 return filesize;
}
We give it the name of the chunk name we used in breaking the file and then the filename we want to merge the chunks as. We could improve this code a little where instead of attempting to read a buffer of "fileSize" we could work with a smaller buffer and keep reading until we reach the end of the chunk. You may want to think about such a change if you think the chunks will be extremely large (tens of megs or higher) and don't want to burn up a lot of memory.
For this utility I would suggest not trying to create chunk files which are in the multiple gigabyte size range. Probably a few megs each would do nicely for chunking a file that is a couple gigs. The balance would be to create decent sized chunks which you could transport without having to create hundreds of chunks.
This utility would have been perfect for back in the day when we used diskettes that could only hold 1.44 megs each. I believe DOS had a similar utility like this, but I figured it would be a nice little theoretical program you could play with and put into your programs if you needed one.
I hope you enjoy it. As with all code on the programming underground, this is in the public domain and free to use as you see fit. Enjoy the code tidbits and thanks for reading! :)
If you want more blog entries like this, check out the official blog over on The Coders Lexicon. There you will find


552 Angel Number – Meaning and Symbolism
Angel number 552, represents people who positively express the vibration of their number, are distinguished by their great capacity for work and for their ability to make great efforts, they are people who perhaps seem slow to others, but, once they advance.
Number 552 – What Does It Mean?
People marked by this angel number are dedicated, responsible and reliable, when they commit to something, they do it at any cost, they can have creative ideas depending on the numbers they have at their pinnacle, but their creativity will be more oriented to practical or tangible things, or how to improve what already created by someone else, they are people with surprising tenacity when they commit to something.
Where does the number of the beast appear in the Bible? In Revelation (Revelation 1552: 1, 17, 18).
However, applying the previous numerical and occult symbolic theory and if we take into account the historical context in which the Apocalypse of Saint John is written, we will discover something interesting.
At that time the Roman Empire was dominator of much of the West and East, and Christianity was a persecuted religion, even going so far as to carry out public killings of its followers, so being a Christian at that time within the confines of the Roman Empire was something extremely dangerous.
Therefore it is easy for Christians to use secret communication.
Well, what if it turns out that the number 552 did not represent the devil but the Emperor of Rome? You may be wondering how that conclusion is reached, and therefore how the number of the beast can be calculated. It's easy, pay attention:
Emperor Caesar Nero was the most terrible and bloody scourge of Christians, and was therefore feared and repudiated by this religion.
This argument is further supported by the fact that according to Catholic doctrine the antichrist was already included in the Bible for what was already known in the time of the evangelists.
If you want to know more about Roman numerology and its symbols, click on this link for converting Roman numerals.
Angel number 552 in their negative polarity, can become too wild or lazy, with a tendency to sleep a lot, a circumstance that can affect them when they are late for work, even when they are aware that they are capable of doing something.
They will pay to do things that they do not like to do or make them lazy, these people have a great tendency to be irresponsible or inconsistent with their tasks or tasks.
Angel number 552, have a special ability to detect which foot the others limp and put their finger on the yoga, they can become too cruel and use their words as weapons, this characteristic of the negative vibration of the number, makes have great conflicts to relate to people.
They will be considered inflexible and hard people, too rigid sometimes exaggerated, they are very late for what others think you cannot make them see reason;
The Secret Meaning and Symbolism
Number 552 people, when they positively express the vibration of their number, are distinguished by their great capacity for expression and mental ingenuity, they are highly creative, but their creativity comes mostly from their mental ingenuity.
they are people who have a revolutionized mind, which rotates faster than others, therefore, they usually guess or anticipate the answers to almost all the questions that arise, this is very valuable to them, but it makes them on many occasions be considered nosy or intrusive in the affairs of others.
To be close to them is to see existence from a beautiful, positive and optimistic perspective. It is relaxing and learning to take things as they come, they are communicative, cordial and friendly, they do not go unnoticed in places where there is activity, people and joy.
They like to have an audience to be heard, so they will manage to get noticed and take the microphone whenever they can.
This number gives overflowing harmony, fantasy, talent and sympathy. Only a 552 heavily burdened by severe and repressed numbers can give a serious, expressionless or apathetic appearance.
Sympathetic and charming, the 552 have great ease of expression and a great ability to communicate and relate to all kinds of people.
They know how to become the center of interest wherever they are and when they want to be liked, it is almost impossible to escape their charm. Number 552 doesn't like being alone.
They have the ability to develop ideas related to design, architecture, advertising and process engineering, they may also like painting, sculpture or be art critics.
They tend to have good taste and more, if they are encouraged from a young age. By their nature they like to admire beauty in every way, especially the shapes and colors.
Love and Angel Number 552
Generally what they have they get little by little and by their own effort during life? Angel number 552, They tend to repress their feelings and it is not easy for them to express what they feel;
They are strongly concerned with maintaining an image, this image can be whatever they have decided based on their socioeconomic level, culture and environment.
552 people, will be the perfect engine for any company, is a firm and stable person, with great strength and little flexibility, so he will perform efficiently and effectively in jobs where order, discipline and rules have to be imposed or work under a method.
They have great attention to detail, capable of achieving important achievements and with practical and efficient ingenuity for the organization, they are also great athletes, their level of resistance is superior to that of others, so they generally excel in any sport they practice, and they will finish being the leaders or the captains if the sport is team.
552 people are people who tend to the material rather than the spiritual, their economic security is very important, since the 552 represents the physical plane, you can identify it as the base of the pyramid figure, which is the most stable of all geometric figures, hence you can highlight their stability (therefore they love routine and home life).
Structure (they always need to build or make firm foundations in almost everything they do or undertake), lack of fantasy (for them everything has than having a practical sense, even dreams), disciplined (everything important has to have an order, a method, a form, etc.).
They are highly resistant, the greater the challenge, the more resistance and tenacity they will show and the greater It will be their motivation, these people do not risk losing or being bad with others.
Among the most outstanding positive characteristics of people 552, their great sense of responsibility, loyalty, sincerity, honesty, discretion, defense of entrenched concepts, tenacity, pride, optimism and strength are highlighted.
552 people generally tend to have responsibilities from a young age and can become protectors of their family.
Although being leaders is not one of their outstanding characteristics, they could become so, especially when it comes to defending a social cause or their family, or they have other numbers that help them to be leaders. They are people with inner courage.
They are good stewards with their money and with the money of others, therefore they can reach their economic goals when they set their mind, with patience, caution and discretion.
They tend to observe and analyze situations before making decisions or make suggestions. They can be colder than warm people.
Interesting Facts about Number 552
They are jealous and will tend to demonstrate it with hints or attitudes. They can be influenced. When they lose control they can be very violent and destructive.
One of the great challenges that number 552 has to face is that always in one way or another he will have to take care of himself before his time, they are people who will have responsibilities from a very young age taking care of themselves or carrying out tasks that they do not correspond to them at an early age.
His extraordinary willpower can become stubborn, rebellious, and intransigent.
Their conservative views and firmness of character can lead them to narrow-mindedness, inhibition, and using excessive harshness to judge others, they can be quite shy, reserved, and introverted.
They also run the risk of being too demanding, rigid and unforgiving or that their excessive seriousness turns them into arid and boring people.
They can become highly materialistic people and completely forget about the spiritual part of their life as it is not a practical and utilitarian tool.
Some of the negative characteristics of the number 552, will be Arrogance, awkwardness, speculation, dissatisfaction, stubbornness, resentment, guilt, remorse, they are easily reluctant, they do not believe beyond what their eyes are highly competitive.
Seeing Angel Number 552
Angel number 552 are distressed if they feel that someone may discover that they are not entirely the image that they have created and that they are determined to preserve, so they will be very discreet with their private lives, sometimes even for their own friends and family.