text:
This post is heavily inspired by Hints and Principles for Computer System Design by Butler Lampson and is derived from my notes when reading the paper. My goal of this article was to condense information in Butler’s paper into short actionable article that can be referenced when designing software. I strongly recommend reading the original paper.

Designing software is hard. It is not only a matter of writing code, but it is also a matter of managing complexity. Designing a system is very different from designing an algorithm. The requirements are complicated, unclear and always changing. The measure of success is not clear. There usually isn’t a “best” way to design a system.

So what does the title of the article mean?

• Techniques - by AID - Approximate, Incremental, Divide and Conquer.
• Process - with ART - Architecture, Automate, Review, Techinques, Test.

In this article we explore these ideas focusing mostly on goals. But before we get started we need to understand a bit about tradeoffs and oppositions.

Designing a system is a balance between the following (not exhaustive list):

• Complexity: The system should be simple enough to be understood by a wide variety of people.
• Flexibility: The system should be flexible enough to be extended to meet the needs of the future.
• Robustness: The system should be robust enough to handle the failure of its components.
• Portability: The system should be portable enough to be used in a variety of environments.
• Scalability: The system should be scalable enough to be used in a large number of concurrent users.
• Availability: The system should output result even after partial failure.
• Maintainability: The system should be easy to maintain.
• Reliability: The system should output correct result and doesn’t loose data in spite of partial failure.

Software design is an art of managing tradeoffs. In ideal world we could achieve all the above criteria. Unfortunately real systems are constrained by many factors which results in us making decisions on what is important. Some of these choices can even affect other choices indirectly. For example can we keep a system simple or should we make it more rich. Do we want to fetch all data from database (increase memory and I/O bandwidth) or paginate data (increased number of I/O calls). Some of these tradeoffs are talked later in the article. The goals described below will act as guide on making choices on tradeoffs.

Butler expresses this idea as form of oppositions. Oppositions are extremes between choices. These are not opposite but the endpoints of a range of possibilities. Imagine these oppositions as a continuous scale (like 1 to 10), and when designing make choice where your system will fall in this scale. Some of the examples of oppositions are simple <-> rich, general <-> specialized, perfect <-> adequate, time <-> space, etc. I will not discuss the oppositions in great length in this article so I recommend reading the paper to get better understanding of what oppositions are. But keep in mind the idea about oppositions being a scale of extreme possibilities.

# Goals

Goals are general properties that system should have, not the problems it tries to solve.

## Simple

Simple is arguably the most important goal but it gets forgotten all the time. Simplicity is the key to successful software design. Simple systems are easy to understand, easy to extend, and easy to maintain.

Tip: Figure out how to solve one really tricky sticky problem and then leave the rest of the system straightforward and boring. I call this the “rocket science” pattern. —Terry Crowley
• Design your system around a small number of key modules with simple specs and predictably good performance. This leaves rest of the code easy to change.
• Key modules will grow over time, get optimized and new features get added building a solid foundation.
• Make key module fast rather than general or powerful. This is a tradeoff between generalization and specialization. Slow and powerful module forces client to pay for power that it doesn’t want or need.
• Beware of universal goals such as “create powerful storage” or “create a fast server”. These do not provide enough value and add lot of generality and complexity.
• Brute Force: Computers have become faster - take advantage of it. Often times its not needed to implement a complex solution just to avoid (taboo)brute force solution. But there are many successful solutions that employ brute force. One common example is polling instead of notification, its simple and efficient if you can tolerate enough latency.
• Reduction: Solve a problem by reducing it to a problem that is easier to solve. This is fundamental to successful design. Although beware of reducing problem to an already solved problem which is not simpler but more complex. Using a fraction of power of a powerful module is often a good engineering. But it can be wasteful of resource, which is not always bad, but its easy to loose track of how much resource is being wasted.
• Code is read more number of times than it is written. Keep the code simple to read and understand.

## Timely

Timely system is the one that ships soon enough to meet your time-to-market need. You may have a great idea compared to current boring technology but if you take 3-5 years to ship it, the old one improves enough that its no longer worthwhile to switch. So being fast to market is very important goal. And this means making choices to give up features and dependability. This is a tradeoff.

• If you keep your solution simple, you increase your odds of meeting timely goal.
• If design is extensible, you can add features later. However adding dependability is harder.
• Most often it is ok for system to fail to deliver expected or timely result. User’s may notice that result they are seeing is incomplete or wrong, but this doesn’t matter as long as it doesn’t happen too often. Perhaps the biggest example of this is the web. It is successful because it doesn’t have to work always. The model is that user will try again or come back tomorrow.

## Efficient

Efficiency is about doing things fast and cheaply. It is tricky to write an efficient program, so don’t do it unless you really need the performance.

Tip: The rule for optimization is - first design, then code, then measure and finally (if ever) optimize. In other words, don't optimize until you know you need to.

Premature Optimization is a common trap many people fall into. Your goal should never be to create most optimized system (an universal goal). First make your code correct, understand the need, then optimize. It’s often good idea to keep unoptimized code around as oracle to test the optimized code against.

Important: The resources you are trying to use efficiently are computing, storage and communication. The dimensions are time and space. For time the parameters are bandwidth (or throughput) and latency (or response time). Latency is the time to do the work plus time spent waiting for the resource. For space the parameters are memory and bandwidth

To evaluate a design idea -

• Work out roughly how much latency, bandwidth and storage it consumes to deliver performance you need.
• Make an optimistic assumption if the resources can be afforded after potential optimization.

If not, the idea not good enough. But if it can then perform more detailed analysis of possible bottlenecks and find out how sensitive cost is to the parameters of the platform and workload. The cost here does not refer to monetary price, but to effort, complexity, resource utilization, etc invested in order to achieve the goal.

When performance of module is bad or unpredictable, you have incurred a performance debt. The debt can be

• Unknown: when it hasn’t been measured.
• Bad: when it is worse than what is needed.
• Fragile: its sufficient now but you don’t have any process to keep it that way.

### Concurrency

This is one way to reduce latency. The other is fast path. The requirement to create concurrent program is to divide the work in independent parts. Using concurrency we trade more resources (bandwidth) for less latency. There are two main problems with concurrency-

• It’s hard to reason and debug concurrent computation that make arbitrary code change.
• To run fast, data must be either immutable or local.

Sharding aka partitioning is one of the easiest way to achieve concurrency. Break the state into n pieces (shards) that change independently and process each shard in parallel. Often there is a combining function for results from several shard. Shards can either be flat by hashing the key or hierarchial if there is natural groupings or subsets of keys such as DNS names. Hierarchy is good for change notifications (notify all subset of keys) but not good for load balancing since there may be hot spots on the hierarchy.

In other words there are 2 ways to bring independent shards together:

• Combining Function that combines the independent outputs or synchronizes state.
• Naming the shards and indexing them or by naming as a hierarchy. If the shards already exist, put them into a single name space by making a new root with all of them as children. Example - mounting in file system, domain names, etc.

Streaming is another kind of concurrency. Divide the work for a single item in ‘k’ sequential steps, put one step on each processor and pass the items along the chain. This generalizes to dataflow where the work flows through a directed acyclic graph (DAG). The number of distinct processing steps defines the limit of concurrency.

Map-Reduce operations are great example that combine both sharding and streaming. The combining phase of map-reduce illustrates that concurrency requires communication which becomes the bottleneck.

There are five different types of concurrency:

• Very Easy: Pure sharding or streaming where actions are independent and states are not shared during concurrent operations.
• Easy: The complex action can be made atomic by grouping actions into sets that don’t commute (commute is described in ABC’s of Efficiency section below) and then have a lock to protect each set. The rules for this kind of concurrency -
• Before running an action, a thread must acquire the lock.
• Two locks on different threads conflict if their actions don’t commute (like reading and writing to same variable).
• In this case a thread needs to wait to acquire the lock if another thread holds a conflicting lock.
• Hard: Anything that isn’t serializable. These are difficult to implement without a formal proof.
• Eventual: All updates commute. The result is available eventually as long as all actions execute irrespective of order. The application should be designed to handle stale data until the final state is available. Read will see arbitrary subset of updates at any given point in time. A sync mechanism ensures that all further reads sees all updates that precedes start of sync. The two ways to achieve this -
• Make updates commute. To make two writes to the same variable commute, timestamp them and let last write win. When write arrives apply it only if it’s timestamp is later. Delete should leave a timestamped tombstone.
• Arrange the nodes in data structure (such as graph, ring) so the updates are broadcasted to all nodes.
• Nuisance: Actions can run concurrently but produce wrong results, but a higher level mechanism keeps this from happening.

### Fast path and bottlenecks

Fast path - do common case fast and leave the rare cases to be slow. It may be difficult to identify fast path if the code has lot of rare cases. When this happens, profile the code to identify fast paths and restructure the code to make it obvious and easy to maintain. The ties down well with identifying key modules. Segregate the fast path from rare cases and isolate it from rest of the code. This will make it easier to optimize, test and maintain. The fast path should be the normal case for the application. Handle the worst case separately because requirements for the two are different.

Bottlenecks are opposite of fast path. It is the part of the system that consumes most resources (time). The key for optimizing is to look for bottlenecks first. Most of the time optimizing anything else wastes time and adds complexity. Once bottlenecks are identified, design the code to use it as little as possible, measure and control how it’s used. Rest of the code becomes your fast path where most of the traffic flows through.

### Locality

Communication is expensive. So keep the data close to the computation. A cache lets you trade locality and bandwidth for latency. Less code working on less data closer in space and time.

• Keep the parts that run concurrently as independent as possible to minimize communication.
• Make the data smaller so there is less to communicate and easier to make it local. For example instead of working on full dataset, work on summary of the dataset. Or rearrange the dataset such that what is accessed a lot is small and compressed.

Another way is to process data in stream. Instead of pulling all the dataset at once, divide data into small parts and stream it to be processed. Identify data that is accessed frequently and cache it.

If moving data to computation has high cost, doing reverse can be a good idea. Database do the same by processing query or stored procedure closer to data. The opposition (and so a choice) always exist either to move data closer to computation or to move computation closer to data.

### ABC’s of Efficiency

• Algorithms: Its usually best to stick with simple algorithms: like hash table for looking up key, B-tree for finding all keys in range, etc. If the problem you have is hard, look for a widely-used library. Understand the asymptotic complexity of the algorithm. Remember - fancy algorithms are slow when N is small, and N is usually small - Rob Pike.
• Approximate: If finding a good enough approximation is fine, then use it. Often you can approximate the program’s behavior rather than its data. For example Eventual Consistency lets application work on stale data. A hint is information that bypasses an expensive computation if it’s correct, its cheap to check that its correct and there is a (expensive) backup path that will work if its wrong. An example is routing hints tells how to forward a packet. The backup is rerouting.
• Batch: When the overhead of processing a list of items is lower than sum of overhead of processing each item, batching items will make things faster. Batching trades off latency (for earlier elements in the batch) for increased bandwidth. Index is an example of batching where we pay big cost upfront so that queries later is faster. Another reason to batch could be to gather and defer the work until the machine is idle (buffering). Opposite of batching is fragmentation, breaking up big chunk of work into smaller pieces. This is good for load-balancing work and distributing work across multiple machines.
• Cache: Caching is to remember the result of function evaluation (f(x)), indexed by the function (f) and its arguments (x). Most references will hit in the cache if there is enough locality and it’s bigger than working set of frequently referenced location, otherwise cache will thrash. A cache hit is the fast path. Cache are of two types -
• Historical caching: Saving result that was obtained because the program needed it. It is good idea to cache frequently accesses result to increase locality.
• Predictive caching: Guessing what result will be needed in future and precomputing and saving the result. Materialized view in database is an example of this.
• Concurrency: We discussed concurrency above.
• Commute: Two actions a and b commute if a and b are independent and a and b are commutative. Meaning they can be executed in any order. Actions that commutes can be made to run concurrently. If the actions needs to be executed in a particular order, then they don’t commute.

Making system extensible to accommodate new workloads is a key goal of software engineering. Any system is bound to change and there can be various reasons for change -

• New business requirements: A successful business will change to adapt as per customer’s need and the system needs to be able to adapt.
• Change in usage pattern: It is very likely the behavior of end user will change over time.
• Changes in external dependencies: Any external dependencies such as services, frameworks, libraries, even host platform will change. New interfaces, versions, deprecations, change in performance is bound to happen.
• Changes in scale: From 100 users to 100 million or from storing text to storing videos. The change can be temporary in form of burst load then the system needs to be elastic not just scalable.

The key to adapting to functional changes are -

• Modularity: The only known way to build a large system is to reinforce abstraction with Divide and Conquer i.e. break the system down to independent abstractions called modules. The interface of module serves two purposes -
• It simplifies the client’s life by hiding the complexity of module.
• It decouples client from the module so both can evolve independently.
• Extension points: Extensibility is a special form of modularity. It is a way to add new functionality to the system. Follow Open-Close principle.
• Isolate moving (frequently changing) part of the system from rest of the system. This will decouple the volatile parts of application with rest of the system. An extra layer of abstraction or indirection over volatile parts is often a good idea. You trade a bit of performance and complexity for ease of maintenance and extensibility.

The key to adapting to scaling are -

• Modularity: Modularize algorithm so its easy to change to one that scales better.
• Automation: Automate everything, from infrastructure to deployment, from fault tolerance to operations.
• Concurrency by sharding. Different shards are independent if they don’t share state (exception if state is immutable) or resource. All communication is asynchronous.

## Dependable

A system’s dependability is measured in three dimensions -

• Reliable: Gives right answer in spite of partial failures and doesn’t lose data.
• Available: It delivers result even in case of partial failures.
• Secure: Its reliable and available in spite of malicious actors.

### Redundancy

The idea of redundancy is to have no single point of failure. Finding all single points of failure is hard. No single point of failure means a distributed system, which is inherently concurrent and can absorb partial failures (some part can fail but whole system keeps working). But redundancy is the key to manage reliability and availability. Redundancy can be either in time or space.

• Redundancy in time is retry or redo: doing same thing again. The challenge here is to detect need for retry, recover from partial state changes, make original input available again and avoid confusion if more than one try succeeds.
• Redundancy in space is replication: doing same thing in several places. The challenge is to give all places same input and making computation deterministic so all outputs agrees.

But redundancy in itself is not sufficient, we also need repair. This is crucial if the redundant copies fail and system is no longer fault tolerant. Repair is also important if the retry cost is significantly higher than single try, so as to avoid paying this extra cost over long period of time.

### Retry

• If the failure of a function is detectable, and after it fails there is good chance it will succeed the second time, then retry is the redundancy that will work.
• Retry is form of slow path. First try is the fast path of the system.
• If the retry that succeeds yields the same state as single try, then this is idempotence.
• To make arbitrary actions such as state increment (x = x + 1) idempotent, make it testable by assigning the action a unique ID, storing ID of completed action and discarding any redundant retries. Discarding duplicate message at receiver is also called at-most-once messaging.
• If message and IDs are persistent it’s called a message queue with exactly-once processing.

### Replication

Replication is another form of redundancy by making copies of data or the actions that lead to data transformation (state changes). Two extremes of replication are -

• Simplest: Create several copies of data. The challenge here is that updating all copies is not atomic operation, so in case of failure its tricky to maintain data consistency.
• Powerful: A log that records sequence of operations that produced the current state. This is similar to event sourcing. With some sort of checkpoint, the current state can be reconstructed by redoing the operations.

#### Replicated State Machine

Replicated State Machine (RSM) is a system that has multiple copies of the same state machine. RSM is the strongest variation of the powerful extreme of replication discussed above. The replicas of the host run same code, start at same initial state and if same sequence of deterministic commands are provided, they will reach same state. In case of mismatch the replicas can vote if there are at least three copies running. Things to keep in mind -

• Commands must be deterministic.
• Sequence of commands are important. Each replica should see the same sequence. A distributed system consensus algorithm such as Paxos or Raft can be used to achieve this.
• Reads must go through RSM as well. But since this is expensive. To avoid this cost, one replica can take a time-limited lock called lease on part of state that prevents anyone else to change the state. The drawback here is that the leaseholder can become a bottleneck.
• A common way to do replication using RSM is primary-secondary. One replica is primary, selected by RSM, and it leases the whole state so that it can do fast reads and batch writes. The secondaries replicates all the writes through RSM and maintain the latest state in case primary fails.
• A variation of the above is chain replication. Arrange set of replicas in a chain, read happens at tail and writes propagates down the chain starting at head, but acknowledged only by tail. This ensures that each replica has seen every write that it’s successor has seen.

## Yummy

A system is much easier to sell if it’s yummy, that is, if the customers are enthusiastic about it. If it’s a customer product, being yummy certainly helps. For enterprise product, power takes on precedence.

Two important things makes up a good user interface (UI) -

• The user model of the system: user should be able to think what system is doing makes sense.
• Completeness and coherence: user should clearly see how to get their whole job done not just part of it.

It is good idea to separate the internal state of the system from details of the UI. Model View Controller (MVC) is a good pattern for separating the two. Another popular one is MVVM (Model View ViewModel).

# Techniques

## Approximate

There are two types of softwares - precise and approximate, with contrasting goal. This is an opposition. Precise software has a specification and the software must satisfy the specs. Some softwares needs to be precise, such as controlling rocket, nuclear engine, airplane, IP protocol etc. Approximate software whereas have loose spec. As long as it is “good enough” the system works. For example, retail shopping, social media, etc. Approximate softwares are neither better or worse than precise, they are different, designed to meet different goals. There is no benefit of designing a social media platform with same precision as rocket engine control system. The user of social media don’t need this precision. However if system is wrongly classified as approximate, the customer won’t be satisfied by it.

## Divide and Conquer

This is the most important idea for designing software. When the system gets too complicated for one person’s head, divide and conquer is the only technique to maintain control. Break down the system into sub systems, break down the subsystems into modules. If the module is still too complex, break it down into sub modules where each sub module has clear defined responsibility, if it still doesn’t help break it down into further abstractions. The name of the game is to break down complexity till it no longer feels complex. A spec of the module is called its interface. A module’s boundary does not just decouple its code from the client, it can decouple the execution and resource consumption as well. Thinking of module as independent system makes it easy to reason about the cost of the system as whole.

A system usually has lots of modules. To make management of modules easier and to identify how a change in module will propagate across, group related modules in layers. A layer is single unit that a team can ship and client can understand. The layers are stacked on each other to form hierarchy. A lower layer is not allowed to call methods in a higher layer.

|---------------------|
|       Clients       |
|---------------------|
| Peers | YOU | Peers |
|---------------------|
|         Host        |
|---------------------|

Layers is good for decoupling, but it comes with cost for each level of abstraction. If the performance is key goal, then its prudent to measure it. There are two ways to reduce it: make it inter-layer communication cheaper or bypass some layers.

## Incremental

Take baby steps and useful steps. Incremental is another form of divide and conquer. Smaller steps is easier to understand, less disruptive and easier to get right. Focus on creating building blocks with good foundation.

# Process

Process is essential to deliver any sufficiently big product. A small system can be built by a single developer with entire architecture in his/her head. A bigger system however requires a team to work together to achieve the goals and the process lays down the framework on how to achieve teamwork. However no amount of process will help if the goals are badly conceived.

• Architecture: Design and document the the architecture of the system. Everyone in the team should have same understanding of the design and documentation helps in driving this. Any architecture decisions should be documented as Architecture Decision Records(ADR)
• Automation: Automate everything, from code analysis, to build, test, deploy.
• Review: Review both the design and the code. Often I see design decisions happen within subset of people (leads and architect) in isolation with the entire team. This leads to confusion, loss of information and lack of growth in the team. Even if design is done by single person, always review design decisions with entire team. The team must be invested as much as the person who created the design.
• Testing: Unit test, component test, integration test, stress test, chaos test, end to end test, BCDR test. Test the system. Test the code. Test the architecture. Test the automation.

# Conclusion

The idea of the article is to make it a reference point when designing softwares. The goals section discussed a lot of possibilities and what should be the focus of a system and is quite dense with information. Even then this is in no way exhaustive discussion on the subject and Butler has gone even more in depth discussing each of these aspects so I strongly recommend reading his paper. I hope you enjoyed reading this. If you have any questions, please feel free to comment below.


text:
The omnipresent Google informed me today about Euler’s birthday. I responded by trying to recall how the famous Euler equation is derived. Being always a lousy mathematician (me, not Euler), I had to peek into my college books. What I found must I write in hope that I will not forget anytime soon.

So… for real numbers, the exponential function can be represented by the following infinite series:

${e }^{a }=\sum _{k =0 }^{\infty }\frac{{a }^{k }}{k !}\;$

Therefore, it is not unreasonable to define the exponential function for complex numbers the equivalent way:

${e }^{z }=\sum _{k =0 }^{\infty }\frac{{z }^{k }}{k !}\;$

As many know it, in the real domain the most basic property of exponential functions is that ${e }^{a +b }={e }^{a }{e }^{b }$.  It is also possible to prove that for the above-defined complex version of the exponential function the equivalent claim is true: ${e }^{z _{1 }+z _{2 }}={e }^{z _{1 }}{e }^{z _{2 }}$. However, the proof that

${e }^{z _{1 }+z _{2 }}=\sum _{k =0 }^{\infty }\frac{{{\left( z _{1 }+z _{2 }\right) }}^{k }}{k !}\; ={\left[ \sum _{k =0 }^{\infty }\frac{{z _{1 }}^{k }}{k !}\; \right] }{\left[ \sum _{k =0 }^{\infty }\frac{{z _{2 }}^{k }}{k !}\; \right] }$

is just too intimidating to me. As always in similar situation, I am eager to assume that the claim ${e }^{z _{1 }+z _{2 }}={e }^{z _{1 }}{e }^{z _{2 }}$ is correct because that’s what people are telling me. You see, regarding mathematics I am mostly a believer.

Okay, by avoiding the proof elegantly, I am free to continue… A less general clam must therefore also be true:

${e }^{z }={e }^{x +i y }={e }^{x }{e }^{i y }$

Where x and y are real numbers. Therefore, one can write:

${e }^{x +i y }={e }^{x }{e }^{i y }=$

$={e }^{x }{\left( 1 +\frac{y }{1 !}i -\frac{{y }^{2 }}{2 !}-\frac{{y }^{3 }}{3 !}i +\frac{{y }^{4 }}{4 !}+\frac{{y }^{5 }}{5 !}i -\dots \right) }$

$={e }^{x }{\left[ {\left( 1 -\frac{{y }^{2 }}{2 !}+\frac{{y }^{4 }}{4 !}-\dots \right) }+i {\left( \frac{y }{1 !}-\frac{{y }^{3 }}{3 !}+\frac{{y }^{5 }}{5 !}-\dots \right) }\right] }$

Because Euler was never as blind as I am, regarding mathematics at least, he probably was quick to realize that the first sum of real numbers represents the cosine function and the second sum of real numbers represents the sine function. Therefore:

${e }^{z }={e }^{x +i y }={e }^{x }{\left[ \cos y + i \sin y\right] }$

Or, if we suppose a less general case of purely imaginary z:

${e }^{i \phi }=\cos \phi + i \sin \phi$

Or, in even less general case of $\phi =\pi$, we have:

${e }^{i \pi }=-1$

A personal note… I was a very relaxed student, never taking too much attention during lectures. This particular day on the college math class I was lost as usual. Our professor was doing some heavy math on the blackboard but my attention drifted away sometime at the very beginning. I was daydreaming about who knows what – possibly about college girls – and was only marginally aware of some math at the blackboard. Several seconds before the class end, our professor encircled this small equation. WTF!? Did he just throw a hammer into my forehead? Other people left the room, but I remained sitting there, looking at the blackboard, trying to figure out what went wrong. How in the world you can put the $e$ and the $\pi$ into the same, ultrasimple equation?

format: plain


text:
# Tagged with #emit_all_confident_sites 0 documentation articles | 0 announcements | 7 forum discussions

No articles to display.

No articles to display.

Created 2014-01-23 08:01:04 | Updated 2014-01-23 08:03:11 | Tags: unifiedgenotyper

Hi, everyone.

from.. GATK Document

-out_mode,--output_mode specifies which sites to emit; possible values are EMIT_VARIANTS_ONLY (the default), EMIT_ALL_CONFIDENT_SITES (include confident reference sites), or EMIT_ALL_SITES (any callable site regardless of confidence).

I really want to know the meaning of confident reference site.

When I calling with the GATK UnifiedGenotyper EMIT_ALL_CONFIDENT_SITES option in each sample BAM file, Can I distinguish the genotype in each sample? (No call, Ref homo, Alt homo, Hetero)

In other words, I know the some site is no call or ref homo for this purpose.

Created 2013-08-16 21:12:22 | Updated | Tags: haplotypecaller

If I run HaplotypeCaller with a VCF file as the intervals file, -stand_emit_conf 0, and -out_mode EMIT_ALL_SITES, should I get back an output VCF with all the sites from the input VCF, whether or not there was a variant call there? If not, is there a way to force output even if the calls are 0/0 or ./. for everyone in the cohort?

I have been trying to run HC with the above options, but I can't understand why some variants are included in my output file and others aren't. Some positions are output with no alternate allele and GTs of 0 for everyone. However, other positions that I know have coverage are not output at all.

Thanks,

Elise

Created 2013-02-04 16:59:48 | Updated 2013-02-06 21:31:28 | Tags: unifiedgenotyper

I am using Unified Genotyper to call variants from multiple samples. I have used the emit_all_confident_sites flag. The output vcf file occasionally has two entries for one position. It is always a monomorphic site and the depth between the two entries is quite different. Usually one entry has very high depth & when I return to the original bam file, the depth does not match. Any idea what I am missing here?

Created 2012-12-24 03:25:30 | Updated | Tags: unifiedgenotyper indels

When I use EMIT_ALL_CONFIDENT_SITES for SNPs, I get an expected very large list of genotypes regardless if the genotypes vary from the reference. When I use the same command line but I switch the model to Indels, I only get a VCF of variant sites. Is the EMIT_ALL_CONFIDENT_SITES option not compatible with Indel discovery?

I'm grateful for any clarification.

Created 2012-11-09 20:25:22 | Updated 2013-01-07 20:07:33 | Tags: unifiedgenotyper

Hi,

When I use UnifiedGenotyper with --genotype_likelihoods_model SNP --output_mode EMIT_ALL_CONFIDENT_SITES I get the reference SNP homozygote calls (or ./. if insufficient depth/quality etc). Great!

But when I use UnifiedGenotyper with --genotype_likelihoods_model INDEL --output_mode EMIT_ALL_CONFIDENT_SITES I only get non-reference calls, everything else (i.e. reference homozygotes, and anything uncallable) is ./.

I want to be able to select variants (SNPs and INDELs) on call rate across samples - as one would do for array genotype data. And avoid case-control bias due to differential missingness.

thanks,

david van heel

Created 2012-10-18 17:13:42 | Updated 2012-10-19 01:14:10 | Tags: unifiedgenotyper vqsr

Hello,

Does VQSR behave differently when the -out_mode flag in UnifiedGenotyper is set to EMIT_VARIANTS_ONLY as compared to EMIT_ALL_CONFIDENT_SITES. I think by using EMIT_ALL_CONFIDENT_SITES we might give VQSR more information to train the model, but I may be wrong. Can someone please help me with this ? Thanks.

cheers, Rahul

Created 2012-09-13 17:17:38 | Updated 2012-09-13 17:41:47 | Tags:

Hi,

I previously reported an issue in which I could not emit all sites or all confident sites when using a ploidy of 1. I downloaded the most recent version and it seems to be able to print the reference calls in these modes. The odd thing is that the quality for all those calls is the same and really low, which I know isn't a reflection of reality in all cases given the knowledge we have about the sequence data and its relationship to the reference. It is also consistent across many samples, whether I run multiple samples through a single GATK run or a single sample on its own. I pasted in an example from a recent run (multiple samples in same run). The problem is that all of these reference calls get a LowQual filter, which makes it difficult to differentiate from good LowQual calls. Any thoughts as to if this is to be expected and why that might be?

Reference   72  .   T   .   3   LowQual DP=281;MQ=50.69;MQ0=0;NDA=1 GT  .   .   .   .   .   .
Reference   187 .   T   .   3   LowQual DP=301;MQ=51.00;MQ0=0;NDA=1 GT  .   .   .   .   .   .
Reference   188 .   C   .   3   LowQual DP=296;MQ=50.84;MQ0=0;NDA=1 GT  .   .   .   .   .   .
Reference   206 .   A   .   3   LowQual DP=292;MQ=50.14;MQ0=0;NDA=1 GT  .   .   .   .   .   .
Reference   1844    .   T   .   3   LowQual DP=369;MQ=58.59;MQ0=0;NDA=1 GT  .   .   .   .   .   .
Reference   1854    .   C   .   3   LowQual DP=363;MQ=58.63;MQ0=0;NDA=1 GT  .   .   .   .   .   .
Reference   1972    .   A   .   3   LowQual DP=345;MQ=59.11;MQ0=0;NDA=1 GT  .   .   .   .   .   .
Reference   1993    .   T   .   3   LowQual DP=355;MQ=58.54;MQ0=0;NDA=1 GT  .   .   .   .   .   .
Reference   2096    .   C   .   3   LowQual DP=355;MQ=58.92;MQ0=0;NDA=1 GT  .   .   .   .   .   .
Reference   2376    .   T   C   1105.23 .   AC=1;AF=0.167;AN=6;BaseQRankSum=-10.910;DP=417;Dels=0.00;FS=27.994;HaplotypeScore=1.6883;MLEAC=1;MLEAF=0.167;MQ=58.90;MQ0=0;MQRankSum=0.195;NDA=1;QD=16.75;ReadPosRankSum=-5.021;SB=-4.370e+02;Samples=Ba-4599_4    GT:AD:DP:GQ:MLPSAC:MLPSAF:PL    0:43,0:43:99:0:0.00:0,1813  1:0,66:66:99:1:1.00:1143,0  0:38,0:38:99:0:0.00:0,1627  0:127,0:127:99:0:0.00:0,5248    0:42,0:42:99:0:0.00:0,1739  0:100,0:100:99:0:0.00:0,4166

Thanks, John


text:
# Consider the limit:$$\mathop {\lim }\limits_{x \to 1} (\frac{1}{1n x}-\frac{1}{x-1})$$ The limit (correct up to one decimal place) is ______.

This question was previously asked in
GATE CE 2021 Official Paper: Shift 1
View all GATE CE Papers >

## Answer (Detailed Solution Below) 0.5

Free
CT 1: Ratio and Proportion
5126
10 Questions 16 Marks 30 Mins

## Detailed Solution

Concept:

L’ Hospital’s Rule:

$$\mathop {\lim }\limits_{x \to a} \left\{ {\frac{{f\left( x \right)}}{{g\left( x \right)}}} \right\} = \mathop {\lim }\limits_{x \to a} \left\{ {\frac{{f'\left( x \right)}}{{g'\left( x \right)}}} \right\}$$

This rule is only applicable for $$\frac{0}{0}$$ and $$\frac{\infty }{\infty }$$ indeterminate forms.

Explanation:

$$\mathop {\lim }\limits_{x \to 1} (\frac{1}{1n x}-\frac{1}{x-1})$$

$$\mathop {\lim }\limits_{x \to 1} \left[ {\frac{{\left( {x - 1} \right) - \ln x}}{{\ln x\;\left( {x - 1} \right)}}} \right]$$ which is in the form of 0/0

So, applying L- Hospital rule twice,

$$\mathop {\lim }\limits_{x \to 1} \left[ {\frac{{1 - \frac{1}{x}}}{{\log x + \left( {x - 1} \right)\left( {\frac{1}{x}} \right)}}} \right]$$

then,

$$\mathop {\lim }\limits_{x \to 1} \frac{{\frac{1}{{{x^2}}}}}{{\frac{1}{{{x^2}}} + \frac{1}{x}}}$$

$$\frac{1}{{1 + 1}} = \frac{1}{2} = 0.5$$


text:
How do I show that $\overline{\mathbb{Q}} := \{\alpha \in \mathbb{C}\mid \alpha\text{ is algebraic over }\mathbb{Q} \}$ is algebraically closed?

How do I show that $\overline{\mathbb{Q}} := \{\alpha \in \mathbb{C}\mid \alpha\text{ is algebraic over }\mathbb{Q} \}$ is algebraically closed? I am thinking about solving this using that $\mathbb{C}$ is algebraically closed but I don't know hot to proceed from here.

Let $f=a_0+a_1x+\dots+a_nx^n$ be a polynomial with coefficients in $\bar{\mathbb{Q}}$; then $f$ has coefficients in $K=\mathbb{Q}[a_0,\dots,a_n]$, which is finite dimensional over $\mathbb{Q}$. A splitting field for $f$ over $K$ is finite dimensional over $K$, hence over $\mathbb{Q}$. So the roots of $f$ are in a finite dimensional extension of $\mathbb{Q}$, which means they're algebraic over $\mathbb{Q}$.

Notes

1. If $b$ is algebraic over $\mathbb{Q}$, then $\mathbb{Q}[b]=\mathbb{Q}(b)$ is finite dimensional over $\mathbb{Q}$

2. By induction, if $b_1,\dots,b_k$ are algebraic over $\mathbb{Q}$, then also $\mathbb{Q}[b_1,\dots,b_k]$ is finite dimensional over $\mathbb{Q}$.

3. The splitting field $K$ can be assumed to be a subfield of $\mathbb{C}$ because $\mathbb{C}$ is algebraically closed.

4. The splitting field of a polynomial in $K[x]$ is finite dimensional, because it is generated by the roots of $K$, which are algebraic over $K$ and the same argument as in 1 and 2 can be used.

• Note that for the definition of $\bar{\mathbb{Q}}$ given in the problem, you must also use the fact that $\mathbb{C}$ is algebraically closed in order to know that the roots you refer to exist in $\mathbb{C}$ at all. Oct 2, 2015 at 17:53
• What you used was: Take the ring $K = \mathbb{Q}[a_0,\ldots,a_n]$. This is the ring where $f$ has its coefficients. Even more, it is a finite-dimensional vector space over $\mathbb{Q}$. Then, a splitting field for $f$ \over $K$ has to be finite over $K$, why? Where did you use that the coefficients belongs to $\bar{\mathbb{Q}}$? Oct 2, 2015 at 18:26
• @LeonardoFranciscoCavenaghi I added some notes. Oct 2, 2015 at 18:33
• Very nice! I got it! Thanks a lot for the answer. Oct 2, 2015 at 18:37

It is a proposition more general: Let L be a extension of K.If L is algebraically closed then the set of elementes from L algebraic over K is also algebraically closed. In your case L is C and K is Q!


text:
# Difference between Vernier constant and least count

What is the difference between the Vernier constant and least count of a Vernier caliper?

• There is no difference. – Asad Saeeduddin Dec 8 '13 at 8:32
• Can you please explain the reason? – Shaona Bose Dec 8 '13 at 11:47

The quantity represents the difference between the size of the smallest division on the main scale and the size of one Vernier divisions.This quantity $(S-V)$ is called the Vernier Constant.


text:
Efl.Gfx.Mapping.mapping_smooth

Description

Smoothing state for map rendering.

This sets smoothing for map rendering. If the object is a type that has its own smoothing settings, then both the smooth settings for this object and the map must be turned off. By default smooth maps are enabled.

Since 1.22

Values

• smooth - `true` by default.

Signature

```@property mapping_smooth {
get {}
set {}
values {
smooth: bool;
}
}```

C signature

```Eina_Bool efl_gfx_mapping_smooth_get(const Eo *obj);
void efl_gfx_mapping_smooth_set(Eo *obj, Eina_Bool smooth);```


text:
Preprint A672/2010
Regularity results for semimonotone operators
Alfredo N. Iusem | Gárciga Otero, Rolando
Keywords: hypomonotonicity | surjectivity | prox-regularity | semimonotonicity
We introduce the concept of $\rho$-semimonotone point-to-set operators in Hilbert spaces. This notion is symmetrical with respect to the graph of $T$, as is the case for monotonicity, but not for other related notions, like e.g. hypomonotonicity, of which our new class is a relaxation. We give a necessary condition for $\rho$-semimonotonicity of $T$ in terms of Lispchitz continuity of $[T+\rho^{-1}I]^{-1}$ and a sufficient condition related to expansivity of $T$. We also establish surjectivity results for maximal $\rho$-semimonotone operators.


text:
# [Tex/LaTex] big angle brackets

anglebrackets

I know that \langle and \rangle creates left and right angle brackets. But they don't seem to adopt to the size of the expression inside. For example, if I have a big matrix, I would like to angle brackets to be big as well. How can I get this effect?

The mtpro2 package (MathTime Professional II) provides extra-large (up to 10 cm tall) fence symbols -- round parentheses, square brackets, curly braces, angle brackets, etc. -- via its \LEFTRIGHT command. Note that the full mtpro2 package isn't free of charge; however, its "lite" subset, which is all that's needed to produce extra-large fence symbols, is free of charge.

\documentclass{article}
\usepackage[lite]{mtpro2}
\begin{document}
$\LEFTRIGHT\langle\rangle{ \begin{array}{c} 1\\2\\3\\4\\5\\6\\7\\8\\9\\10 \end{array}}$
\end{document}

update 2020-10-01: The pctex.com site noted in my answer no longer seems provide a functioning link to the page from which the lite subset of the mtpro2 package used to be available for downloading. Many thanks to @mateuszb for bringing this issue to my attention.


text:
1887

# News Picks

Physics Today’s online staff summarize the most important and interesting news about science from the world's top media outlets.

There are 79 posts for the selected month (March 2015).

### Filter by date

March 31, 2015 1:48 PM

Ars Technica: An Arizona court has rejected a lawsuit by the Energy & Environment Legal Institute, which sought to gain access to faculty emails at Arizona state universities. After examining sample emails, the court determined that the state's university system had correctly responded to the institute's open-records request. The institute had requested emails from a variety of university faculty members, including two climate researchers: Jonathan Overpeck and Malcolm Hughes. The university system's Board of Regents rejected the request because the emails were private, contained student information, and discussed ongoing research. The institute also lost a similar case in Virginia, which included the emails of climate researcher Michael Mann. The case marks the second time a court has ruled that materials detailing ongoing research projects are not subject to open-records requests.

March 31, 2015 12:54 PM

### Mercury’s dark surface may be due to cometary dust

Los Angeles Times: Mercury and the Moon are often compared because they are about the same size and both lack atmospheres. But Mercury is covered in dark material that makes it only one-third as reflective as the Moon. Most airless planetary bodies as dark as Mercury have a high iron content, but Messenger measured the planet’s surface as being just 2% iron. Now, Megan Bruck Syal of Lawrence Livermore National Laboratory and her colleagues believe they’ve found the explanation. They realized that the planet’s dark appearance could be caused by the presence of carbon-rich cometary dust, and their calculations of potential dust impacts revealed that the dust would stay on Mercury’s surface. They also determined that, because the concentration of cometary dust in the solar system is much greater closer to the Sun, Mercury gets hit by 50 times as much dust as the Moon, which explains why Mercury is so much darker. Finally, they found that firing cometary dust-like material at material similar to that found on Mercury’s surface did produce a dark layer on the surface material.

March 31, 2015 12:20 PM

### Ants in space adapt to get around

BBC: Ants work collectively to explore their environment and look for food. But they have no central control directing their movements. To see how ants would function in microgravity, researchers sent eight colonies of 80 common pavement ants to the International Space Station. The ants were confined to small transparent plastic boxes in which a barrier could be removed to allow the ants to spread out and explore a larger area. The microgravity conditions appeared to interfere with the ants’ ability to cling to surfaces, which resulted in their exploring the area less thoroughly and using less direct paths. However, they still managed to show a remarkable ability to not only walk on surfaces but also regain their footing after being sent tumbling through the air, according to the researchers, whose paper appears in Frontiers in Ecology and Evolution. The group’s findings could have many applications, particularly in robotic search and rescue operations.
March 30, 2015 3:00 PM

### New UK policy regarding the media raises concerns for scientists

Science: A recent change to the UK civil service code has upset members of the country's scientific community, who say it could hinder their communications with the press. According to the new policy, all contact with the media must be approved in advance by the minister of the agency in question. Several of the country’s journalistic and public relations organizations have asked the government to reconsider the change. In an open letter, representatives of the Science Media Centre, the Association of British Science Writers, and Stempra, an organization of science communication professionals, say the new code “will have a negative impact on the public understanding of science and the quality of the public discourse on some of the most important and contentious issues of our times.” The prime minister's official spokesman has countered that the amendment “merely clarifies rules on official contact that were already in place.”
March 30, 2015 2:35 PM

### Atlantic Ocean circulation shows “exceptional” slowdown

Ars Technica: Ocean water varies in salinity and temperature due to many processes, including evaporation, precipitation, freshwater inflow from rivers, and sea-ice melting. Warmer, saltier water mixes with cooler, less salty water because of currents induced by waves, wind, and tides. One such major current, the Atlantic meridional overturning circulation (AMOC), appears to have slowed down markedly in the latter part of the 20th century, according to a recent study published in Nature Climate Change. Stefan Rahmstorf of the Potsdam Institute for Climate Impact Research and colleagues studied the instrumental temperature record from the past 100 years and temperature reconstructions for the past 1000 years. They say that over the 20th century, the AMOC showed a marked slowdown of about 14%, with a particularly low point lasting from the 1970s to the mid 1990s, perhaps because of the melting Greenland ice sheet. Because climate models have not indicated any weakening of the AMOC in the 20th century, it’s possible they are underestimating climate change developments, according to the researchers.
March 30, 2015 12:43 PM

### Alpha Centauri may have two Earth-like planets

New Scientist: In 2012 researchers announced that they may have found a planet orbiting Alpha Centauri B. The finding was based on slight wobbles observed in the star's motion and suggested the planet orbited the star every three days. A subsequent set of observations in 2013 and 2014 by Brice-Oliver Demory of the University of Cambridge and his colleagues, who used the Hubble Space Telescope to look for a dimming of the star's light, revealed a single transit of Alpha Centauri B. However, the duration of the transit was longer than had been predicted for the planet. Demory's team ruled out other phenomena to explain the transit, which suggests the existence of a second planet in orbit around Alpha Centauri B. Confirming the second planet won't be easy because it would require 20 consecutive days of observations with Hubble. Given the many demands for time on the telescope, approval for such a long observation is unlikely.

March 30, 2015 11:48 AM

BBC: Graphene, the single-atom-thick arrangement of carbon atoms with a wide range of curious properties, was first isolated at the University of Manchester in the UK in 2004. Now, researchers from the university have contributed to the design of the first commercial consumer product to use graphene: a light bulb with a graphene-coated filament. The increased conductivity of the graphene reduces the bulb's energy use by 10% and lengthens the bulb's lifetime. The bulbs are expected to be available for sale later this year for under £15 ($22), which is less expensive than current LED bulbs. March 27, 2015 1:53 PM ### Publisher creates software to detect bogus research papers Science: Springer, one of the world's largest publishers of scientific journals, and the Université Joseph Fourier in Grenoble, France, are set to release an open-source piece of software called SciDetect. The software aims to automatically detect papers that are superficially legitimate but are in fact deliberate hoaxes. The need for SciDetect arose, in part, because of another piece of software, SCIgen, that automatically generates such bogus papers. Devised in 2005 by three computer science students from MIT, SCIgen strings together jargon in grammatically correct yet meaningless sentences. The software also generates plots and references. The trio wrote the software to expose the lack of peer-review at certain conferences, but after its release, SCIgen-authored papers ended up in journals, embarrassing Springer and other publishers. March 27, 2015 12:09 PM ### China's reduction in coal power is having significant effect New York Times: Coal still supplies two-thirds of China's power generation, but with the nation's economy growing at the slowest rate in 25 years and a mandated shift to nuclear and renewable sources, coal imports and utilization have dropped significantly over the last year. In 2014 the use of fossil fuels to generate power was at a record low of 53.7%, down from 57.3% in 2013. That reduction led to a drop of 18 million tons or 1.3% in the amount of coal used and to a 11% reduction in coal imports by the world's largest coal consumer. The trend is expected to continue through 2015. As a result, the cost of coal from Australia, one of China's primary sources, fell 30% last year to under$60 per ton this month, the lowest since May 2007.

March 27, 2015 12:08 PM

### Dark matter even less affected by galactic collisions

BBC: Observations of 72 galactic collisions have revealed to a higher level of detail than ever before that dark matter is unaffected by any force other than gravity. Richard Massey of Durham University in the UK and his colleagues used Hubble Space Telescope and Chandra X-ray Observatory to observe the collisions in both visible and x-ray light. The x-ray images revealed the movement of the clouds of plasma that reside inside and around galaxies whereas the visible images showed the movements of the stars. The combined images allowed the researchers to measure the gravitational lensing effect of the dark matter. The observations revealed that the dark matter exhibited no sign of non-gravitational interactions with itself or other matter to a much higher level of precision than previous observations.

March 27, 2015 11:47 AM

### Restricting global warming to 2°C could still bring harm

New Scientist: At the climate talks that took place in Copenhagen in 2009, the world's leaders agreed to work toward limiting the globally average amount of warming to 2°C with respect to 1990. But in a new paper published in Climate Change Responses, geographer Petra Tschaker of the Pennsylvania State University advocates a target of 1.5°C. Tschaker contends that the lower target will significantly reduce the impact of climate change, especially on poor and vulnerable communities, such as the Sami people of northern Norway, Sweden, Finland, Russia's Kola Peninsula.
March 26, 2015 3:10 PM

### Saturnian day measured using gravitational field

Los Angeles Times: In the early 1980s the Voyager spacecraft measured the length of Saturn's day to be 10.6 hours based on the planet's magnetic field. But when Cassini reached the planet in 2004, it obtained a different result. Subsequent measurements revealed that the planet's magnetic field, unlike Earth's, is aligned with the axis of rotation; it cannot, therefore, be used for an accurate measurement. Other techniques that attempted to use the planet's wind patterns proved even less accurate. Ravit Helled of Tel Aviv University and his colleagues have now used Saturn's gravitational field to measure the length of the day, which they found to be 6 minutes shorter than the original Voyager measurement. The technique uses the periodic changes in pull that Cassini feels as Saturn rotates as well as measurements of the planet's oblateness. The researchers confirmed the accuracy of the technique by testing it against Jupiter, whose day has a well-known length.

March 26, 2015 2:51 PM

### Water squished between graphene sheets forms "square ice"

Nature: The oxygen atom in a water molecule is tightly bound to the two hydrogen atoms, but it also experiences a slight connection with the hydrogen in neighboring molecules. Because of this, as water freezes, the molecules arrange themselves into three dimensional tetrahedral shapes. Now, Andre Geim of the University of Manchester, UK and his colleagues have discovered that water pressed between sheets of graphene freezes into an ice in which the molecules form two-dimensional layers of square shapes. The structure could be the 18th different type of water ice discovered. Geim's team calculated that the pressure exerted on the water by the graphene sheets exceeds 10 000 atm or 1 gigapascal.

March 26, 2015 2:29 PM

### NASA's asteroid redirect mission is redirected

Science: NASA announced yesterday that it would change the scope of its robotic mission to redirect an asteroid. Rather than bag a small asteroid in its entirety, a spacecraft would land on the surface of a larger asteroid and snatch a boulder. The mission, which is penciled in for a 2020 launch and is expected to cost \$1.25 billion, has two main goals. The first is to test the feasibility of redirecting an Earth-threatening asteroid using the spacecraft's own gravity. The second goal is to test technologies for a manned mission to Mars by bringing the boulder closer to Earth and having astronauts visit it using NASA's new Orion spacecraft.
March 26, 2015 11:55 AM

### Episcopal bishop: Denying climate change is immoral

Guardian: In an interview with the UK's Guardian newspaper, the head of the US Episcopal Church, Presiding Bishop Katharine Jefferts Schori, asserted that denying climate change was immoral. She based her pronouncement on two lines of reasoning. First, to deny climate change is to fail to use God's gift of knowledge. Second, climate change is likely to most severely effect poor people who live in the developing world. In warning against climate change, Schori joins Pope Francis, who raised the issue last December at a meeting of the United Nations.
March 25, 2015 11:37 AM

### DOE adjusts its plans for nuclear waste storage

Nature: On 24 March Department of Energy (DOE) secretary Ernest Moniz announced that the agency was looking for a variety of temporary localized sites for nuclear waste storage. The agency will also continue its search for a permanent, geologically stable location for long-term storage of nuclear weapons waste. Moniz says that the key to the localized sites is that the agency will be seeking consent-based locations instead of attempting to force storage sites into areas where the local population does not want them. The DOE's new plan, with President Barack Obama's approval, also frees commercial and military waste to be stored in separate locations. Thanks to the policy change, waste repositories will no longer have to be equipped to store waste that has different requirements and risks. The DOE's 2016 budget proposal includes funding for an experimental borehole for long-term storage. The agency also plans to begin evaluating potential storage sites for commercial waste, but construction of such facilities would require approval from Congress.

March 25, 2015 11:32 AM

### Curiosity detects nitric oxide on Mars

BBC: NASA's Curiosity rover has detected nitric oxide (NO) in a sample that it extracted from a site in Gale Crater. The gas was released as the rover's mobile lab pulverized and heated the sample for chemical analysis. If, as the Curiosity team suspects, the nitrogen was originally in the form of nitrates before the sample was heated, the finding could have implications for the presence of life. Nitrogen is the fourth most common element in terrestrial life. Despite its high atmospheric abundance, most terrestrial species require nitrogen to be transformed first into nitrates, a task performed on Earth by soil microbes.
March 25, 2015 11:28 AM

### Secret Science Reform bill passes US House

New Scientist: Sponsored by Rep. David Schweikert (R-AK), the Secret Science Reform Act would, in the words of its summary, "prohibit the Administrator of the Environmental Protection Agency (EPA) from proposing, finalizing, or disseminating a covered action unless all scientific and technical information relied on to support such action is specifically identified and publicly available in a manner sufficient for independent analysis and substantial reproduction of research results." Last week, the House of Representatives passed the bill, whose supporters claim it would make the regulation of oil and gas extraction more open to the public. The bill's detractors, however, claim it would make protecting the environment more difficult.
March 25, 2015 11:11 AM

### Electrical short delays LHC restart

Science: The Large Hadron Collider (LHC) at CERN was planned to begin circulating beams of particles the entire way around the accelerator's 27-km circumference this week. However, an electrical short discovered over the weekend has delayed the full restart while the short is repaired. That task could take as little as a few days or as long as several weeks. Shorts are not uncommon as the LHC is slowly ramped up, but the time it takes to repair them can be significantly increased if supercooled electronics first have to be warmed up. The scientists working at the accelerator plan to use x-ray imaging to examine the area to determine if they can remove the metallic source of the short by melting it or blowing it away with helium.

March 24, 2015 2:25 PM

### Sound lab used to simulate and promote Heathrow expansion

Guardian: The prospect of a third runway at the UK’s busy Heathrow Airport has many local residents upset because of the potential for even more noise. To help mitigate people’s fears, Arup SoundLab in central London has simulated what the proposed expanded airport would sound like. In the lab, technicians can re-create different scenarios that include various combinations of aircraft, times of day, and distances from the airport. Because older, noisier planes are being phased out and newer, quieter planes are being introduced, the lab is also set up to compare current and future sound scenarios. Heathrow officials suggest that the new runway, which will require steeper landing approaches and keep planes flying higher for longer, may even provide some respite from the noise.
See more
/content/aip/magazine/physicstoday/news/news-picks
201503
This is a required field


text:
# Conference

148 is the total number of employees. The conference was attended by 22 employees. How much is it in percent?

Correct result:

p =  14.86 %

#### Solution:

$p = \dfrac{ 22 }{ 148 } \cdot 100 = 14.86 \%$

We would be pleased if you find an error in the word problem, spelling mistakes, or inaccuracies and send it to us. Thank you!

Tips to related online calculators

## Next similar math problems:

Gastro ticket are "free" and therefore they should be retained. This think many employees in Slovakia. Calculate how much money employee yearly earn if he get 201 gastro tickets of 2.8 € and you know that the company issuing gastro tickets get 4.9% fee of
Number 839 divide into the two addends that the first was 17 greater than 60% of the second. Determine these addends.
• Ski class
Class attend 30 boys and some number of girls. Ski training was attended by 28 boys and all the girls, which was 95% of all students. How many girls attend this class? How many percent is that?
• Company
After increasing the number of employees by 15% company has 253 employees. How many employees take?
• Discount sale
At Christmas Sale after a 20% discount cosmetic package was priced at a price of 5 euros and 60 cents; later it went to 3 euros and 80 cents. How much percentage is the total discount?
• Four pupils
Four pupils divided $1485 so that the second received 50% less than the first, the third 1/2 less than a fourth and fourth$ 154 less than the first. How much money had each of them?
• 3 years
The company has increased the number of employees. In year 2005 compared to 2004 13% more, in 2006 18% more against the previous year, in year 2007 20% more compared to 2006. How many % increase in the number of employees in 3 years?
• Six percents
6% of the base is 21. How much is 28% of this base?
• The recommended
The recommended price of the novel "Laughing Sun" is 285 SKK. The bookseller bought 60 pieces of the novel at the wholesale store and paid 82% of the recommended price (18% is his profit for selling books). For the recommended price, he sold 55 pieces of
• Farmer
The farmer farming 293 ha of arable land and the remaining 20% are meadows and pastures. How much land farmer owns?
• Final price
The book with the original price of CZK 850 was reduced by 20%. In a week, it was raised by 20% of the new price. Find the final price of the book. How much percents of the original price of the book is the final price?
• Vinegar 2
How many percentage of getvinegar solution, if we mix to 3.5 liters of 5.8% and 5 liters of 7.6% vinegar?
• Bonus
Gross wage was 1323 USD including 25% bonus. How many USD were bonuses?
• Washing machine
The price of washing machine was decreased by 21% and then by 55 € due small sales. After two price decreases cost € 343. How much was originally cost?
• Percentage reduction
Reducing the unknown number by 19% get number 700.7 Determine unknown number.
• Enterprise and wages
The enterprise operates a total 162 workers and their average salary is M dollars. If the company has hire an additional 18 employees whose average wage would be the S dollars, would reduce the overall average salary in the company of 3.6%. Calculate the
• Image reduction
To say that I am mathematically challenged is a gross understatement! I'm trying to help my friend determine how to calculate percentages of reduction or enlargement for a quilt pattern. She is creating a drawing of a cute picture which will become a piec


text: Stack Exchange Network . When you compare the structures, the mirror image of meso tartaric acid is the exact same compound. The two terms racemic mixture and meso compound are used in organic chemistry to describe different organic compounds.A racemic mixture is also known as a racemate.It is a mixture of equal amounts of left and right-handed enantiomers.Enantiomers are optical isomers that are non-superimposable mirror images of each other. Function of augmented-fifth in figured bass. 10%. If both of the enantiomers are present in equal amounts then the compound is optically inactive. Meso-tartaric acid is a 2,3-dihydroxybutanedioic acid that has meso configuration. It simply means that through symmetry, the chirality centers cancel themselves out. Contents. 1 Structures Expand this section. Optical inactivity of meso -tartaric acid We usually come across in many standard text books of organic chemistry that meso -tartaric acid is optically inactive simply because it has a plane of symmetry [11-13] (point group Cs) and an imaginary mirror plane is drawn across the molecule in a Fischer projection as shown in Fig… How do I find complex values that satisfy multiple inequalities? Main Difference – Racemic Mixture vs Meso Compound. Y. Ukaji, T. Soeta, in Comprehensive Chirality, 2012. That doesn't mean it doesn't contain carbons with four different substituents with in it. Tartaric acid has two forms because it is a chiral compound. Meso Tartaric Acid: Racemic Mixture: The angle of optical rotation of meso tartaric acid is 0°. Also show optically inactive meso form of tartaric acid. Tartaric acid – a meso compound. 1 See answer abdurrazzak1202 is waiting for your help. It can be resolved into optically active forms. tartaric acid, HO 2 CCHOHCHOHCO 2 H, white crystalline dicarboxylic acid. What is diastereotopic ? NCERT RD Sharma Cengage KC Sinha. toppr. Investigations of isomeric tartaric acid salts, carried out by Louis Pasteur in the mid 19th century, were instrumental in elucidating some of the subtleties of stereochemistry. D two asymmetric C-atoms. The Synthetic Form Of Tartaric Acid (the Product Produced In A Laboratory) Has An Optical Rotation Of 0°. The fact that they happen to "dock" together is immaterial. For that u need to check symmetry of elements. the effect of one-half of the molecule is neutralized by other. You must remember that the number of stereoisomers will be less than 2n when there is symmetry in the molecule. The no. Inactive? Post a Comment. This property is called internal compensation. Answered By . ChEBI. Optical Isomers of a substance that are mirror images of each other are called Enantiomers (or) Enantimorphs. the optically inactive (meso) 10 (= 11). Download PDF's. To learn more, see our tips on writing great answers. 3.6.1 Introduction. Since tartaric acid is obtained as a by-product in wine production, it has been known from olden times. Use MathJax to format equations. The molecule contains two chiral centers with the same substituents. n = no. Meso tartaric acid is optically inactive due to the presence of molecular symmetry. 2004-09-16. Racemic tartaric acid is optically inactive due to - Brainly.in It exists ln 3 forms one is meso form which optically inactive due to internal compensation. meso tartaric acid is achiral. Meso-Tartaric acid is optically inactive due to the presence of (a) Molecular symmetry (b) Molecular asymmetry (c) External compensation (d) Two asymmetric carbon atoms. Consider the R,R-acid. For example, tartaric acid can exist as any of three stereoisomers depicted below in a Fischer projection. Underwater prison for cyborg/enhanced prisoners? An early procedure assigned a D prefix to enantiomers chemically related to a right-handed reference compound and a L … Simple substances which show optical isomerism exist as two isomers known as enantiomers. Meso tartaric acid contains two chiral carbon atoms, yet it is optically inactive . Meso compounds are achiral (optically inactive) diastereomers of chiral stereoisomers. The dextro-and levo-forms are optically active; the meso-form is optically inactive, as is racemic acid, a mixture of equal parts of the dextro-and levo-forms. But how are these forms able to show optical activity when the σ-bonds can freely rotate, which can change the . Why does Mathematica try to take the first element of the empty list when plotting? It is a conjugate acid of a meso-tartrate(1-). Meso-tartaric acid is a 2,3-dihydroxybutanedioic acid that has meso configuration. Click here: Racemic modification and resolution. Where I think you have been confused by the textbook is that option number 4 doesn't actually describe different spatial arrangements of tartaric acid, rather it describes a mixture of options 2 and 3. Origin of “Good books are the warehouses of ideas”, attributed to H. G. Wells on commemorative £2 coin? Tartaric acid (2,3-dihydroxybutanedioic acid) is a naturally occurring dicarboxylic acid containing two stereocenters. A third tartaric acid isomer, originally called pyrotartaric acid and now known as meso-tartaric acid, is formed when (+)-tartaric acid is heated to 165 ºC , with about one-eighth its quantity of water, for about 2 hours. Formation of an osazone identical with that of a second monosaccharide establishes the identity of the unknown monosaccharide. Meso tartaric acid contains two chiral carbon atoms, yet it is optically inactive. …two optically active forms of tartaric acid (either the dextrorotatory or levorotatory form) and the optically inactive meso form of the same acid (mesotartaric acid). Explain why 3-bromo 2- butanol does not exist in meso … Create . It exists as a pair of enantiomers and an achiral meso compound. Which one of the following is optically active? I accidentally submitted my research article to the wrong platform -- how do I let my advisors know? Chemistry. Please enable Cookies and reload the page. Meso compounds are achiral (optically inactive) diastereomers of chiral stereoisomers. A meso compound is achiral. Meso-tartaric acid is not found in nature. Meso compound is optically inactive due to internal compensation. Meso tartaric acid contains a plane of symmetry. It is highly unlikely that meso -tartaric acid may exist in a structure having a plane of symmetry. Unlike enantiomers, diastereoisomers need not have closely similar physical and chemical properties; they may differ as greatly as do structural isomers. It is optically inactive due to internal compensation i.e. NCERT P Bahadur IIT-JEE Previous Year Narendra Awasthi MS Chauhan. We have referred to the mirror-image configurations of enantiomers as \"right-handed\" and \"left-handed\", but deciding which is which is not a trivial task. For example, tartaric acid can exist as any of three stereoisomers depicted below in a Fischer projection. Contents. Why meso tartaric acid is optically inactive? The dextro-and levo-forms are optically active; the meso-form is optically inactive, as is racemic acid, a mixture of equal parts of the dextro-and levo-forms. In chemistry, racemization is a conversion, by heat or by chemical reaction, of an optically active compound into an optically inactive form which half of the optically active substance becomes its mirror image (enantiomer) referred as racemic mixtures. Optically inactive compounds are any that cannot be superimposed on itself. Investigations of isomeric tartaric acid salts, carried out by Louis Pasteur in the mid 19th century, were instrumental in elucidating some of the subtleties of stereochemistry. Ask for details ; Follow Report by Akshayji7337 3 weeks ago Log in to add a comment I and II are enantiomers. Physics. (+)-Tartaric acid is widely distributed in nature, particularly in fruits as an acid, and in calcium or magnesium salts. A meso compound has at least two identical asymmetric centers with a plane of symmetry e.g. This is also known as internal compensation. Whereas the two chiral stereoisomers rotate plane polarized light in opposite directions, solutions of meso-tartaric acid do not rotate plane-polarized light. This enantiomer is known as the (+) form. As mentioned above, a meso compound is optically inactive, so their stereochemistry should cancel out. It can be separated into two forms. Centre of Molecular and Macromolecular Studies Polish Academy of Sciences Sienkiewicza 112, PL‐90‐363 Łódź (Poland) Fax: Int. One may ask then what causes meso -tartaric acid optically inactive. 2 Names and Identifiers Expand this section. Maths. What is enantiotopic ? Answer. Bond rotation doesn't change the fact that the molecule is still overall chiral and lacking in symmetry. MathJax reference. meso tartaric acid is achiral. (ii) Each of two carbon atoms of double bond must have different substituents, which may be same or different.Meso-tartaric acid optically inactive. Ex: d and L - Lactic acid Optical Isomers of a substance that are not mirror images of each other are called Diastereomers. Tartaric acid has two asymmetrical carbon atoms and three chiral isomers; the dextro-, levo-, (optically active) and meso- forms (optically inactive). Alignment tab character inside a starred command within align. But when the two hands are held together, the composite structure of the two hands together is symmetrical and is not asymmetric in … What isomerism is shown by butenedioic acid and why? Meso compound is optically inactive due to internal compensation. Practice summary: What is homotopic ? A common example of meso compound is 2,3-dihydroxybutanedioic acid that is also known as tartaric acid. One of the isomer is optically inactive though it has two chiral centres because of the presence of plane of symmetry.Also this isomer is optically inactive due to internal compensation.Such a compound is … element is present then compound is not optically active. It is a conjugate acid of a meso-tartrate(1-). An optically active enantiomer of tartaric acid or a salt thereof is racemized by mixing meso-tartaric acid or a salt thereof with a solution of an optically active enantiomer of tartaric acid or a salt thereof in a molar ratio of 0.2 - 0.5 and thereafter heating the mixture. 17. Next Previous. If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices. Healing an unconscious player and the hitpoints they regain. You could recognize this from the name. You could recognize this from the name. meso tartaric acid. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Q. Meso tartaric acid is optically inactive due to the presence of. Composition: A meso compound has identical mirror images. meso-tartaric acid. Asking for help, clarification, or responding to other answers. erythraric acid. Although enantiomers may be identified by their characteristic specific rotations, the assignment of a unique configuration to each has not yet been discussed. Replacing the core of a planet with a sun, could that be theoretically possible? (i) Molecules must contain a double bond. Thus the chirality of the two asymmetric carbon atoms cancels and this molecule is not optically active. How do we recognize the internal plane of symmetry in meso compounds? of d and l – forms a = 2 n . Optical Isomers of a substance that are mirror images of each other are called Enantiomers (or) Enantimorphs. Answer. It is melting point is 140°C. We have two mirror images in the molecule the numer of optically active centers with a chiral.... One a … this makes meso compounds are achiral ( optically inactive due the. Absence of optical rotation of 0° Please complete the security check to access the effect one-half. And answer site for scientists, academics, teachers, and meso-forms meso tartaric acid is optically inactive why could! Acid optically inactive advisors know the optically inactive ) diastereomers of chiral rotate! How to enable exception handling on the Arduino due cream of tartar forms a = 2 n ( )! And disadvantages of water bottles versus bladders 3- bromo 2- butanol and ( b ) tartaric acid ( product! Copy and paste this URL into your RSS reader check symmetry of elements its mirror isomers... Lets just say ( + ) alanine the assignment of a planet with sun... In it active characters work in \csname... \endcsname be resolved into ( + ) -tartaric acids Submitted by Administrator! A plane of symmetry be called both optically inactive meso form of tartaric acid: racemic of. Of a substance that are not mirror images acid that has meso configuration acid may exist in meso! Isomeric forms, it is optically inactive ) diastereomers of chiral stereoisomers the future is to use Privacy Pass from... Opposite directions, solutions meso tartaric acid is optically inactive why meso-tartaric acid optically inactive compound by the resolution process not optically.... Be called both optically inactive completing the CAPTCHA proves you are confused conformation! Of optical activity, optical activity when the σ-bonds can freely rotate which! Acid ) is very crucial in determining whether it is optically inactive compounds are achiral optically. Properties ; they may differ as … meso-tartaric acid optically inactive form of tartaric acid is the same..., S ) form powder and cream of tartar single compound which can the. Site design / logo © 2021 Stack meso tartaric acid is optically inactive why Inc ; user contributions licensed under cc by-sa a negative optical.... Post your answer ”, attributed to H. G. Wells on commemorative £2?. Use Privacy Pass assignment of a substance that are identical in all respects series that ended in the table... Two chiral carbon atoms, yet it is a question and answer site for scientists,,! Centers other than the one a … this makes meso compounds are achiral ( optically.... Will still be optically inactive ) diastereomers of chiral stereoisomers meso -tartaric acid optically inactive compound and its mirror of. And meso -tartaric acid then the compound is 2,3-dihydroxybutanedioic acid that has meso configuration meso. The web property contains a plane of symmetry e.g it simply means that through symmetry the... Chrome web Store three stereoisomers depicted below in a laboratory ) has an optical of! Of molecular and Macromolecular Studies Polish Academy of Sciences Sienkiewicza 112, PL‐90‐363 Łódź ( Poland ) Fax Int... Subscribe to this RSS feed, copy and paste this URL into your reader... To rotation aiims 1994 aldehydes … meso-tartaric acid is obtained as a by-product in wine production, it n't. Negative optical rotation of 0° specific rotations, the molecule is neutralized by other, like in cruising?... Verma Pradeep Errorless ) diastereomers of chiral stereoisomers ( or ) Enantimorphs Method... A Yugoslav setup evaluated at +2.6 according to Stockfish carbons with four different substituents with in it on! May ask then what causes meso -tartaric acid may exist in a structure having a centre of symmetry called! Dash when affected by Symbol 's Fear effect chiral compound, each has... Enantiomers ( or ) Enantimorphs activity is due to a mirror plane in the molecule [ segmented in... Like mirror images of each other are called diastereomers Soeta, in Comprehensive chirality, 2012 upvote ( )! Water & ice from fuel in aircraft, like in cruising yachts arranged, assignment. More than one chiral carbons explanation: meso-tartaric acid is optically inactive and meso -tartaric acids could that be possible! Due to internal compensation i.e isomerism exist as any of three stereoisomers depicted below meso tartaric acid is optically inactive why a having. To chemistry Stack Exchange is a mixture of 50-50 portion of d L. Freely rotate, which can change the configuration have chiral centers with a plane of in. Since tartaric acid, HO 2 CCHOHCHOHCO 2 H, white crystalline dicarboxylic acid molecule with a sun could! Can I define only one enantiomer rotates the meso tartaric acid is optically inactive why of symmetry makes compounds lose their optical activity due... Completing the CAPTCHA proves you are confused with conformation with configuration water bottles versus bladders we have two mirror.. “ Good books are the advantages and disadvantages of water bottles versus?... Remember that the molecule into two equal halves which look like mirror images each! You have two tetrahedral objects that are mirror images of each other are enantiomers. Is called the meso form and is a conjugate acid of a meso-tartrate 1-... Answer ”, attributed to H. G. Wells on commemorative £2 coin tetrahedral objects that are mirror of! 3,6-Dimethylpiperazine-2,5-Dione optically active stereoisomers of tartaric acid is optically active, teachers, and meso-forms tab inside... ( optically inactive although have more than one chiral carbons the Arduino due your RSS reader isomer has conformers... At +2.6 according to Stockfish empty list when plotting cream of tartar has two forms because is... The amino acid alanine is known as ( + ) - and ( S, S ), showing net! Identical mirror images of each other are called enantiomers ( or ).! To check symmetry of elements proves you are a human and gives you temporary to! Molecule and that mirror image of 2S,3R is the same … tartaric acid is obtained as a pair of and... Enantiomer is present lets just say ( + ) -tartaric acid is the inactive! Σ-Bonds can freely rotate, which is optically inactive due to the plane of symmetry plane symmetry! And why three distinct isomers, the mirror image of 2S,3R is the exact same.. Forms a = 2 n 112, PL‐90‐363 Łódź ( Poland ) Fax: Int conformers due to symmetry will... Mirror image are merely the same spite of having a centre of symmetry same.! An antioxidant in food, academics, teachers, and students in the molecule contains two centers... In tartaric acid is 0° example, one of the isomers of a second monosaccharide the! Distributed in nature, particularly in fruits as an antioxidant in food: 66.154.85.226 • Performance & security cloudflare... ( S, S ) is a mixture of 50-50 portion of d and mean... From fuel in aircraft, like in cruising yachts by their characteristic specific rotations, the aldaric will. Captcha proves you are a human and gives you temporary access to the fact that meso acid... Both of the unknown monosaccharide ages on a 1877 Marriage Certificate be so wrong rotations. In it & hyphen ; Kishner reduction, the aldaric acid will be an optically inactive on... Out in a Fischer projection from fuel in aircraft, like in cruising yachts that does n't mean does... Picture below ] and ( – ) -tartaric acids naturally occurring dicarboxylic acid are objects they! '' systems removing water & ice from fuel in aircraft, like in cruising?. Each other are called enantiomers ( or ) Enantimorphs how a plane symmetry. Optically inactive due to rotation one may ask then what causes meso -tartaric acids Submitted by: Administrator in as! As the ( R, R cancels S out in a Fischer projection snapshot 3: meso-tartaric do... < < Prev Next > > Tags: Engineering chemistry Engineering Chemistry-I Engineering.. The dextro-, levo-, and meso-forms the empty list when plotting may ask then what causes meso -tartaric.... The Chrome web Store osazone identical with that of a second monosaccharide establishes the identity of empty. Simply means that through symmetry, the mirror image: A. molecular symmetry two centers. It has been known from olden times site for scientists, academics,,... To the web property: d and L - Lactic acid optical isomers a. Stereoisomers will be an optically inactive ) diastereomers of chiral stereoisomers been known from times... Yet it is optically inactive due to the wrong platform -- how I... Is used as an acid, HO 2 CCHOHCHOHCO 2 H, white crystalline dicarboxylic acid containing stereocenters... They happen to  dock '' together is immaterial having a plane of symmetry e.g acid isomers... Show optically inactive due to internal compensation i.e cancel themselves out your IP: 66.154.85.226 • Performance & security cloudflare! Work in \csname... \endcsname RSS reader carbons with four different substituents in!, showing zero net rotation CCHOHCHOHCO 2 H, white crystalline dicarboxylic acid isomerism exist as isomers... Other than the one a … this makes meso compounds are achiral ( optically although. As do structural isomers - Method::getGenericReturnType no generic - visbility on £2... See answer abdurrazzak1202 is waiting for your help is shown by butenedioic acid and why by the resolution.! As a pair of enantiomers and an achiral meso compound with two stereocenters portion. Acid ) is a mixture of ( a ) 3- bromo 2- butanol and b... Your IP: 66.154.85.226 • Performance & security by cloudflare, Please complete the security check to access properties. Single compound which can not be resolved into ( + meso tartaric acid is optically inactive why - and ( )! ) alanine Fischer projection: A. molecular symmetry two mirror images has infinite due... A = 2 n also show optically inactive molecule with a chiral atoms!: A. molecular symmetry can not be separated into an optically active spite.


text:
# H5PEditor - Drag and Drop Element creation

Forums:

Hi there,

I try to create a Drag'n'Drop question with an advancedText-Element as draggable. In the advancedText-Element theres MathJax-Markup that has to be processed by MathJax instantly AFTER creation.

For that I am looking for a event/hook or even Line in the code that is ran when adding a new Draggable in the H5PEditor. Despite intensive search in the code-base I couldn't find any Line thats does the job I am looking for. But I found a Virtual File in Chrome (VMxxxx) that seems to be dynamically created with these line of code in it (excerpt):

H5P.AdvancedText = (function ($) { /** * A simple library for displaying text with advanced styling. * * @class H5P.AdvancedText * @param {Object} parameters * @param {Object} [parameters.text='New text'] * @param {number} id */ function AdvancedText(parameters, id) { var self = this; var html = (parameters.text === undefined ? 'New text' : parameters.text); /** * Wipe container and add text html. * * @alias H5P.AdvancedText#attach * @param {H5P.jQuery}$container
*/
self.attach = function ($container) {$container.addClass('h5p-advanced-text').html(html);
};
}

})(H5P.jQuery);

Can someone help me with ths Problem?

### Hi,If you want to add a

Hi,

If you want to add a script that runs immediately as content is initialized you could add it with the alter_scripts hook. Instructions for this can be found in the customization pages for your respective platform in the "customize and extend" documentation.

The lines you have found correspond to the Advanced Text library, and will not be found in the Drag 'n Drop library, but rather in the Advanced Text library: https://github.com/h5p/h5p-advanced-text/blob/master/text.js

### Just to prevent from

Just to prevent from misunderstanding. In the front-end everything is working fine already. I need to do MathJax precessing in the back-end. We already have a JavaScript file running in the back-end. The problem is, that I can't figure out what event is triggered by adding a new draggable in the editor.

### I see, this code is rather

I see, this code is rather old and not particularly friendly to work with and hook into, but the function for adding a new draggable is insertElement(). It generates the semantics of a draggable and inserts it into the DOM. There may be some callback or event passed from 'drag-n-bar' or 'drag-n-drop', which are the utility libraries responsible for handling the toolbar with dropzones and draggables, that you can listen for.However I'm not positive of this. Hopefully this can get you on the right track. Good luck :)

### Hi Thomas,thanks so far. I

Hi Thomas,
thanks so far. I found out, that the code is kind of sideloaded and located inside "files-managed"/h5p/libraries/H5PEditor.DragNDrop-1.1 this is from my understanding since the Dependency to that H5PEditor.DragNDrop-1.1 is defined inside the library.json of DragNDrop.

Now: Is there a way to use a different H5PEditor.DragNDrop-x.x library and have it locally hosted somehow? Then we could write our own stuff into the H5PEditor library and finally implement some event-triggers.

### Hi, that is correct, library

Hi, that is correct, library.json defines the dependencies of a library, and the editor of DragNDrop is a dependency to the DragNDrop library.

I'm not sure what you want to accomplish here, if you are developing a new feature you could use the "development mode" in Drupal, which would allow you to have a /h5p/development folder with your own version of H5PEditor.DragNDrop where you could make your changes. This would not require any changes to the DragNDrop library, and your changes will be immediately visible on your site during development. However making local changes would mean you won't get the benefit of official updates, since your local codebase has changed and will be overwritten by official releases. In these cases you are encouraged to make a pull request to the official repository, or create a alter_scripts hook instead of modifying the library directly.

My suggestion would be to fork H5PEditor.DragNDrop and create some event-triggers at generic appropriate places, make a pull request with this so it becomes included in the official library, then finally create your own specific hooks that listens for these triggered events and does the logic that is essential for you.


text:
# Communication pattern in Entity Component System

I'm putting together a ECS for my game with another two main components: an event bus for communication and a Lua interpreter to load scripts.

Now, the parent element is a framework/game object with references to all this three components. My question is, what is the best communication pattern: drill the interpreter and any other orchestration objects down to every system or centralize all those calls in a subscriptor for the eventbus, and make everything from there.

Example:

// Plan A

   public class CollisionEntitySystem extends EntityProcessingSystem {

LuaEngine mEngine;

EventBus mBus;

MoreThings mThings;

public CollisionEntitySystem(LuaEngine engine, EventBus bus, MoreThings things){
mEngine = engine;
mBus = bus;
mThings = things;
}

@Override
protected void process(Entity e) {
//Something wonderful happened here
}
};

// Plan B

   public class CollisionEntitySystem extends EntityProcessingSystem {

Bus mEventBus;

public CollisionEntitySystem(Bus bus){
mEventBus= bus;
}

@Override
protected void process(Entity e) {
//Something wonderful happened here
mEventBus.post(EventScriptCall.create("OnCollision", paremeters))
}
};

Given that the event bus post is synch the results are the same, so it all boils down to architectural differences: centralized logic and hundreds of event objects or disperse logic with less objects.

• There's no generally "best option", there's only the best option for you, and you're the only one that can know for sure what the option is. If you're having trouble deciding between two options, make a list of pros and cons for each and pick the one with the highest ratio of pros to cons. I think this question is primarily opinion based. If you have a more specific question, you should ask that instead. – MichaelHouse Sep 21 '14 at 14:21

There is no right answer to your question and a lot of it comes from personal taste and out of need.

Most engines often need the ability to deliver both asynchronous and synchronous events because certain situations are easier handled in one fashion than others. Secondly, in the case where you are using systems to update your entities in your example, you will need a means to dispatch events between systems specifying single entity for delivery, collection of entities, or all depending on the scenario.

Next, I generally prefer to keep scripting centralized in a script system. If other systems want to trigger some ScriptEvent, I prefer they raise an event and I have the script system capable of listening for that case and dispatching it to the appropriate script handler. This has the benefit that it allows other parts of the system to intercept and handle the same event and keeps the implementation of the script system abstracted so if I change internals or perhaps the language of choice, the engine is unaffected.

In the case of your collision example, when the system detects a collision has occured between two entities, simply send a CollisionEvent with source entity and the colliding entity as parameters. The scripting system sees this event and dispatches it to your script.

In my specific solution, my script system looks for a specific method definition called OnEvent and if found, it automatically hooks the script into the event system. It is worth noting that a single logic component is linked to an entity enabling scripting behavior. The script can require and include any composition of behavior needed.

This allows the script system to delegate default event dispatch into the scripts logic. Additionally, if the script wants to be notified of other events perhaps from other systems, I just call RegisterEvent(eventName) inside the script during it's loading and the script system links that script instance to that event name. When that event fires, the scripting system is responsible for taking the event parameters, packaging them into a lua method call and then calling OnEvent with the event name and the arguments.

In the corner cases perhaps where system A needs to call into the script system and invoke a particular behavior and you'd rather not involve the event system for it, you could always expose a method on the scripting system like RaiseEvent(EventObject) and allow the scripting system to again decompose the event into the scripting language's needs and dispatch the handler.

This is my own preference, but there is nothing that prevents scripting from being a fundamental part of the entire engine where each system can call into it. I've seen some component frameworks where any component can be ammended with a script to alter it's base behavior.

Either approach relies on a specific amount of abstraction to keep details from leaking into other parts of the engine so that refactoring and extending can be done easily without signfiicant time and costs.


text:
# Simplify 2016 and 2015 factorial!

Algebra Level 1

$\dfrac{2016^{2016}}{\underbrace{2016!\times2016!\times2016!\times\cdots\times2016!}_{2016 \text{ times}}}\times\underbrace{2015!\times2015!\times2015!\times\cdots\times2015!}_{2016 \text{ times}}$

Simplify the expression above.

Notation: $$!$$ denotes the factorial notation. For example, $$8! = 1\times2\times3\times\cdots\times8$$.

×


text:
Question

# Find the ratio of the total surface area and lateral surface area of the cube.

Total surface area of cube (TSA) = $6{a^2}$
Lateral surface area of cube (LSA) =$4{a^2}$
TSA: LSA =$6{a^2}$: $4{a^2}$=3:2 (Where${a^2}$ get cancels)


text:
driverswireless

Does anyone know how exactly to get the driver installed for this and give a step by step guide? Everything I've tried so far goes to a dead end.

• The device only works with ndiswrapper. With a temporary working interet connection by ethernet or any other means, open a terminal and do:

sudo apt-get install ndiswrapper-common ndiswrapper-utils-1.9

Find out if you need the 32- or 64-bit files:

arch

64-bit returns x86_64. If yours is a 64-bit system, you will need to make an edit to the driver file. Open "bcmwlhigh5.inf" in gedit or any text editor and add this line, around line 170:

[Linksys_AE2500.files.NTamd64]
AE2500xp64.sys,,,6

Proofread carefully, save and close the text editor. Now do:

cd ~/Desktop/xp
sudo ndiswrapper -i bcmwlhigh5.inf
sudo ndiswrapper -ma
sudo depmod -a

Reboot. If the wireless is not working, see if you can see any problems:

ndiswrapper -l

That's a lower-case L for 'list,' not the number 1. Also:

dmesg | grep ndis