text:
Embedding Julia

As we have seen in Calling C and Fortran Code, Julia has a simple and efficient way to call functions written in C. But there are situations where the opposite is needed: calling Julia functions from C code. This can be used to integrate Julia code into a larger C/C++ project, without the need to rewrite everything in C/C++. Julia has a C API to make this possible. As almost all programming languages have some way to call C functions, the Julia C API can also be used to build further language bridges (e.g. calling Julia from Python or C#).

High-Level Embedding

Note: This section covers embedding Julia code in C on Unix-like operating systems. For doing this on Windows, please see the section following this, High-Level Embedding on Windows with Visual Studio.

We start with a simple C program that initializes Julia and calls some Julia code:

#include <julia.h>
JULIA_DEFINE_FAST_TLS // only define this once, in an executable (not in a shared library) if you want fast code.

int main(int argc, char *argv[])
{
/* required: setup the Julia context */
jl_init();

/* run Julia commands */
jl_eval_string("print(sqrt(2.0))");

/* strongly recommended: notify Julia that the
program is about to terminate. this allows
Julia time to cleanup pending write requests
and run all finalizers
*/
jl_atexit_hook(0);
return 0;
}

In order to build this program you must add the path to the Julia header to the include path and link against libjulia. For instance, when Julia is installed to $JULIA_DIR, one can compile the above test program test.c with gcc using: gcc -o test -fPIC -I$JULIA_DIR/include/julia -L$JULIA_DIR/lib -Wl,-rpath,$JULIA_DIR/lib test.c -ljulia

Alternatively, look at the embedding.c program in the Julia source tree in the test/embedding/ folder. The file cli/loader_exe.c program is another simple example of how to set jl_options options while linking against libjulia.

The first thing that must be done before calling any other Julia C function is to initialize Julia. This is done by calling jl_init, which tries to automatically determine Julia's install location. If you need to specify a custom location, or specify which system image to load, use jl_init_with_image instead.

The second statement in the test program evaluates a Julia statement using a call to jl_eval_string.

Before the program terminates, it is strongly recommended that jl_atexit_hook is called. The above example program calls this just before returning from main.

Note

Currently, dynamically linking with the libjulia shared library requires passing the RTLD_GLOBAL option. In Python, this looks like:

>>> julia=CDLL('./libjulia.dylib',RTLD_GLOBAL)
>>> julia.jl_init.argtypes = []
>>> julia.jl_init()
250593296
Note

If the julia program needs to access symbols from the main executable, it may be necessary to add the -Wl,--export-dynamic linker flag at compile time on Linux in addition to the ones generated by julia-config.jl described below. This is not necessary when compiling a shared library.

Using julia-config to automatically determine build parameters

The script julia-config.jl was created to aid in determining what build parameters are required by a program that uses embedded Julia. This script uses the build parameters and system configuration of the particular Julia distribution it is invoked by to export the necessary compiler flags for an embedding program to interact with that distribution. This script is located in the Julia shared data directory.

Example

#include <julia.h>

int main(int argc, char *argv[])
{
jl_init();
(void)jl_eval_string("println(sqrt(2.0))");
jl_atexit_hook(0);
return 0;
}

On the command line

A simple use of this script is from the command line. Assuming that julia-config.jl is located in /usr/local/julia/share/julia, it can be invoked on the command line directly and takes any combination of three flags:

/usr/local/julia/share/julia/julia-config.jl
Usage: julia-config [--cflags|--ldflags|--ldlibs]

If the above example source is saved in the file embed_example.c, then the following command will compile it into an executable program on Linux and Windows (MSYS2 environment). On macOS, substitute clang for gcc.:

/usr/local/julia/share/julia/julia-config.jl --cflags --ldflags --ldlibs | xargs gcc embed_example.c

Use in Makefiles

In general, embedding projects will be more complicated than the above example, and so the following allows general makefile support as well – assuming GNU make because of the use of the shell macro expansions. Furthermore, although julia-config.jl is usually in the /usr/local directory, if it isn't, then Julia itself can be used to find julia-config.jl, and the makefile can take advantage of this. The above example is extended to use a makefile:

JL_SHARE = $(shell julia -e 'print(joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia"))') CFLAGS +=$(shell $(JL_SHARE)/julia-config.jl --cflags) CXXFLAGS +=$(shell $(JL_SHARE)/julia-config.jl --cflags) LDFLAGS +=$(shell $(JL_SHARE)/julia-config.jl --ldflags) LDLIBS +=$(shell $(JL_SHARE)/julia-config.jl --ldlibs) all: embed_example Now the build command is simply make. High-Level Embedding on Windows with Visual Studio If the JULIA_DIR environment variable hasn't been setup, add it using the System panel before starting Visual Studio. The bin folder under JULIA_DIR should be on the system PATH. We start by opening Visual Studio and creating a new Console Application project. Open the 'stdafx.h' header file, and add the following lines at the end: #include <julia.h> Then, replace the main() function in the project with this code: int main(int argc, char *argv[]) { /* required: setup the Julia context */ jl_init(); /* run Julia commands */ jl_eval_string("print(sqrt(2.0))"); /* strongly recommended: notify Julia that the program is about to terminate. this allows Julia time to cleanup pending write requests and run all finalizers */ jl_atexit_hook(0); return 0; } The next step is to set up the project to find the Julia include files and the libraries. It's important to know whether the Julia installation is 32- or 64-bit. Remove any platform configuration that doesn't correspond to the Julia installation before proceeding. Using the project Properties dialog, go to C/C++ | General and add $(JULIA_DIR)\include\julia\ to the Additional Include Directories property. Then, go to the Linker | General section and add $(JULIA_DIR)\lib to the Additional Library Directories property. Finally, under Linker | Input, add libjulia.dll.a;libopenlibm.dll.a; to the list of libraries. At this point, the project should build and run. Converting Types Real applications will not only need to execute expressions, but also return their values to the host program. jl_eval_string returns a jl_value_t*, which is a pointer to a heap-allocated Julia object. Storing simple data types like Float64 in this way is called boxing, and extracting the stored primitive data is called unboxing. Our improved sample program that calculates the square root of 2 in Julia and reads back the result in C has a body that now contains this code: jl_value_t *ret = jl_eval_string("sqrt(2.0)"); if (jl_typeis(ret, jl_float64_type)) { double ret_unboxed = jl_unbox_float64(ret); printf("sqrt(2.0) in C: %e \n", ret_unboxed); } else { printf("ERROR: unexpected return type from sqrt(::Float64)\n"); } In order to check whether ret is of a specific Julia type, we can use the jl_isa, jl_typeis, or jl_is_... functions. By typing typeof(sqrt(2.0)) into the Julia shell we can see that the return type is Float64 (double in C). To convert the boxed Julia value into a C double the jl_unbox_float64 function is used in the above code snippet. Corresponding jl_box_... functions are used to convert the other way: jl_value_t *a = jl_box_float64(3.0); jl_value_t *b = jl_box_float32(3.0f); jl_value_t *c = jl_box_int32(3); As we will see next, boxing is required to call Julia functions with specific arguments. Calling Julia Functions While jl_eval_string allows C to obtain the result of a Julia expression, it does not allow passing arguments computed in C to Julia. For this you will need to invoke Julia functions directly, using jl_call: jl_function_t *func = jl_get_function(jl_base_module, "sqrt"); jl_value_t *argument = jl_box_float64(2.0); jl_value_t *ret = jl_call1(func, argument); In the first step, a handle to the Julia function sqrt is retrieved by calling jl_get_function. The first argument passed to jl_get_function is a pointer to the Base module in which sqrt is defined. Then, the double value is boxed using jl_box_float64. Finally, in the last step, the function is called using jl_call1. jl_call0, jl_call2, and jl_call3 functions also exist, to conveniently handle different numbers of arguments. To pass more arguments, use jl_call: jl_value_t *jl_call(jl_function_t *f, jl_value_t **args, int32_t nargs) Its second argument args is an array of jl_value_t* arguments and nargs is the number of arguments. There is also an alternative, possibly simpler, way of calling Julia functions and that is via @cfunction. Using @cfunction allows you to do the type conversions on the Julia side which typically is easier than doing it on the C side. The sqrt example above would with @cfunction be written as: double (*sqrt_jl)(double) = jl_unbox_voidpointer(jl_eval_string("@cfunction(sqrt, Float64, (Float64,))")); double ret = sqrt_jl(2.0); where we first define a C callable function in Julia, extract the function pointer from it and finally call it. Memory Management As we have seen, Julia objects are represented in C as pointers of type jl_value_t*. This raises the question of who is responsible for freeing these objects. Typically, Julia objects are freed by the garbage collector (GC), but the GC does not automatically know that we are holding a reference to a Julia value from C. This means the GC can free objects out from under you, rendering pointers invalid. The GC will only run when new Julia objects are being allocated. Calls like jl_box_float64 perform allocation, but allocation might also happen at any point in running Julia code. When writing code that embeds Julia, it is generally safe to use jl_value_t* values in between jl_... calls (as GC will only get triggered by those calls). But in order to make sure that values can survive jl_... calls, we have to tell Julia that we still hold a reference to Julia root values, a process called "GC rooting". Rooting a value will ensure that the garbage collector does not accidentally identify this value as unused and free the memory backing that value. This can be done using the JL_GC_PUSH macros: jl_value_t *ret = jl_eval_string("sqrt(2.0)"); JL_GC_PUSH1(&ret); // Do something with ret JL_GC_POP(); The JL_GC_POP call releases the references established by the previous JL_GC_PUSH. Note that JL_GC_PUSH stores references on the C stack, so it must be exactly paired with a JL_GC_POP before the scope is exited. That is, before the function returns, or control flow otherwise leaves the block in which the JL_GC_PUSH was invoked. Several Julia values can be pushed at once using the JL_GC_PUSH2 to JL_GC_PUSH6 macros: JL_GC_PUSH2(&ret1, &ret2); // ... JL_GC_PUSH6(&ret1, &ret2, &ret3, &ret4, &ret5, &ret6); To push an array of Julia values one can use the JL_GC_PUSHARGS macro, which can be used as follows: jl_value_t **args; JL_GC_PUSHARGS(args, 2); // args can now hold 2 jl_value_t* objects args[0] = some_value; args[1] = some_other_value; // Do something with args (e.g. call jl_... functions) JL_GC_POP(); Each scope must have only one call to JL_GC_PUSH*, and should be paired with only a single JL_GC_POP call. If all necessary variables you want to root cannot be pushed by a one single call to JL_GC_PUSH*, or if there are more than 6 variables to be pushed and using an array of arguments is not an option, then one can use inner blocks: jl_value_t *ret1 = jl_eval_string("sqrt(2.0)"); JL_GC_PUSH1(&ret1); jl_value_t *ret2 = 0; { jl_function_t *func = jl_get_function(jl_base_module, "exp"); ret2 = jl_call1(func, ret1); JL_GC_PUSH1(&ret2); // Do something with ret2. JL_GC_POP(); // This pops ret2. } JL_GC_POP(); // This pops ret1. Note that it is not necessary to have valid jl_value_t* values before calling JL_GC_PUSH*. It is fine to have a number of them initialized to NULL, pass those to JL_GC_PUSH* and then create the actual Julia values. For example: jl_value_t *ret1 = NULL, *ret2 = NULL; JL_GC_PUSH2(&ret1, &ret2); ret1 = jl_eval_string("sqrt(2.0)"); ret2 = jl_eval_string("sqrt(3.0)"); // Use ret1 and ret2 JL_GC_POP(); If it is required to hold the pointer to a variable between functions (or block scopes), then it is not possible to use JL_GC_PUSH*. In this case, it is necessary to create and keep a reference to the variable in the Julia global scope. One simple way to accomplish this is to use a global IdDict that will hold the references, avoiding deallocation by the GC. However, this method will only work properly with mutable types. // This functions shall be executed only once, during the initialization. jl_value_t* refs = jl_eval_string("refs = IdDict()"); jl_function_t* setindex = jl_get_function(jl_base_module, "setindex!"); ... // var is the variable we want to protect between function calls. jl_value_t* var = 0; ... // var is a Vector{Float64}, which is mutable. var = jl_eval_string("[sqrt(2.0); sqrt(4.0); sqrt(6.0)]"); // To protect var, add its reference to refs. jl_call3(setindex, refs, var, var); If the variable is immutable, then it needs to be wrapped in an equivalent mutable container or, preferably, in a RefValue{Any} before it is pushed to IdDict. In this approach, the container has to be created or filled in via C code using, for example, the function jl_new_struct. If the container is created by jl_call*, then you will need to reload the pointer to be used in C code. // This functions shall be executed only once, during the initialization. jl_value_t* refs = jl_eval_string("refs = IdDict()"); jl_function_t* setindex = jl_get_function(jl_base_module, "setindex!"); jl_datatype_t* reft = (jl_datatype_t*)jl_eval_string("Base.RefValue{Any}"); ... // var is the variable we want to protect between function calls. jl_value_t* var = 0; ... // var is a Float64, which is immutable. var = jl_eval_string("sqrt(2.0)"); // Protect var until we add its reference to refs. JL_GC_PUSH1(&var); // Wrap var in RefValue{Any} and push to refs to protect it. jl_value_t* rvar = jl_new_struct(reft, var); JL_GC_POP(); jl_call3(setindex, refs, rvar, rvar); The GC can be allowed to deallocate a variable by removing the reference to it from refs using the function delete!, provided that no other reference to the variable is kept anywhere: jl_function_t* delete = jl_get_function(jl_base_module, "delete!"); jl_call2(delete, refs, rvar); As an alternative for very simple cases, it is possible to just create a global container of type Vector{Any} and fetch the elements from that when necessary, or even to create one global variable per pointer using jl_binding_t *bp = jl_get_binding_wr(jl_main_module, jl_symbol("var"), 1); jl_checked_assignment(bp, val); Updating fields of GC-managed objects The garbage collector also operates under the assumption that it is aware of every older-generation object pointing to a younger-generation one. Any time a pointer is updated breaking that assumption, it must be signaled to the collector with the jl_gc_wb (write barrier) function like so: jl_value_t *parent = some_old_value, *child = some_young_value; ((some_specific_type*)parent)->field = child; jl_gc_wb(parent, child); It is in general impossible to predict which values will be old at runtime, so the write barrier must be inserted after all explicit stores. One notable exception is if the parent object has just been allocated and no garbage collection has run since then. Note that most jl_... functions can sometimes invoke garbage collection. The write barrier is also necessary for arrays of pointers when updating their data directly. For example: jl_array_t *some_array = ...; // e.g. a Vector{Any} void **data = (void**)jl_array_data(some_array); jl_value_t *some_value = ...; data[0] = some_value; jl_gc_wb(some_array, some_value); Controlling the Garbage Collector There are some functions to control the GC. In normal use cases, these should not be necessary. FunctionDescription jl_gc_collect()Force a GC run jl_gc_enable(0)Disable the GC, return previous state as int jl_gc_enable(1)Enable the GC, return previous state as int jl_gc_is_enabled()Return current state as int Working with Arrays Julia and C can share array data without copying. The next example will show how this works. Julia arrays are represented in C by the datatype jl_array_t*. Basically, jl_array_t is a struct that contains: • Information about the datatype • A pointer to the data block • Information about the sizes of the array To keep things simple, we start with a 1D array. Creating an array containing Float64 elements of length 10 can be done like this: jl_value_t* array_type = jl_apply_array_type((jl_value_t*)jl_float64_type, 1); jl_array_t* x = jl_alloc_array_1d(array_type, 10); Alternatively, if you have already allocated the array you can generate a thin wrapper around its data: double *existingArray = (double*)malloc(sizeof(double)*10); jl_array_t *x = jl_ptr_to_array_1d(array_type, existingArray, 10, 0); The last argument is a boolean indicating whether Julia should take ownership of the data. If this argument is non-zero, the GC will call free on the data pointer when the array is no longer referenced. In order to access the data of x, we can use jl_array_data: double *xData = (double*)jl_array_data(x); Now we can fill the array: for(size_t i=0; i<jl_array_len(x); i++) xData[i] = i; Now let us call a Julia function that performs an in-place operation on x: jl_function_t *func = jl_get_function(jl_base_module, "reverse!"); jl_call1(func, (jl_value_t*)x); By printing the array, one can verify that the elements of x are now reversed. Accessing Returned Arrays If a Julia function returns an array, the return value of jl_eval_string and jl_call can be cast to a jl_array_t*: jl_function_t *func = jl_get_function(jl_base_module, "reverse"); jl_array_t *y = (jl_array_t*)jl_call1(func, (jl_value_t*)x); Now the content of y can be accessed as before using jl_array_data. As always, be sure to keep a reference to the array while it is in use. Multidimensional Arrays Julia's multidimensional arrays are stored in memory in column-major order. Here is some code that creates a 2D array and accesses its properties: // Create 2D array of float64 type jl_value_t *array_type = jl_apply_array_type((jl_value_t*)jl_float64_type, 2); jl_array_t *x = jl_alloc_array_2d(array_type, 10, 5); // Get array pointer double *p = (double*)jl_array_data(x); // Get number of dimensions int ndims = jl_array_ndims(x); // Get the size of the i-th dim size_t size0 = jl_array_dim(x,0); size_t size1 = jl_array_dim(x,1); // Fill array with data for(size_t i=0; i<size1; i++) for(size_t j=0; j<size0; j++) p[j + size0*i] = i + j; Notice that while Julia arrays use 1-based indexing, the C API uses 0-based indexing (for example in calling jl_array_dim) in order to read as idiomatic C code. Exceptions Julia code can throw exceptions. For example, consider: jl_eval_string("this_function_does_not_exist()"); This call will appear to do nothing. However, it is possible to check whether an exception was thrown: if (jl_exception_occurred()) printf("%s \n", jl_typeof_str(jl_exception_occurred())); If you are using the Julia C API from a language that supports exceptions (e.g. Python, C#, C++), it makes sense to wrap each call into libjulia with a function that checks whether an exception was thrown, and then rethrows the exception in the host language. Throwing Julia Exceptions When writing Julia callable functions, it might be necessary to validate arguments and throw exceptions to indicate errors. A typical type check looks like: if (!jl_typeis(val, jl_float64_type)) { jl_type_error(function_name, (jl_value_t*)jl_float64_type, val); } General exceptions can be raised using the functions: void jl_error(const char *str); void jl_errorf(const char *fmt, ...); jl_error takes a C string, and jl_errorf is called like printf: jl_errorf("argument x = %d is too large", x); where in this example x is assumed to be an integer. Thread-safety In general, the Julia C API is not fully thread-safe. When embedding Julia in a multi-threaded application care needs to be taken not to violate the following restrictions: • jl_init() may only be called once in the application life-time. The same applies to jl_atexit_hook(), and it may only be called after jl_init(). • jl_...() API functions may only be called from the thread in which jl_init() was called, or from threads started by the Julia runtime. Calling Julia API functions from user-started threads is not supported, and may lead to undefined behaviour and crashes. The second condition above implies that you can not safely call jl_...() functions from threads that were not started by Julia (the thread calling jl_init() being the exception). For example, the following is not supported and will most likely segfault: void *func(void*) { // Wrong, jl_eval_string() called from thread that was not started by Julia jl_eval_string("println(Threads.threadid())"); return NULL; } int main() { pthread_t t; jl_init(); // Start a new thread pthread_create(&t, NULL, func, NULL); pthread_join(t, NULL); jl_atexit_hook(0); } Instead, performing all Julia calls from the same user-created thread will work: void *func(void*) { // Okay, all jl_...() calls from the same thread, // even though it is not the main application thread jl_init(); jl_eval_string("println(Threads.threadid())"); jl_atexit_hook(0); return NULL; } int main() { pthread_t t; // Create a new thread, which runs func() pthread_create(&t, NULL, func, NULL); pthread_join(t, NULL); } An example of calling the Julia C API from a thread started by Julia itself: #include <julia/julia.h> JULIA_DEFINE_FAST_TLS double c_func(int i) { printf("[C %08x] i = %d\n", pthread_self(), i); // Call the Julia sqrt() function to compute the square root of i, and return it jl_function_t *sqrt = jl_get_function(jl_base_module, "sqrt"); jl_value_t* arg = jl_box_int32(i); double ret = jl_unbox_float64(jl_call1(sqrt, arg)); return ret; } int main() { jl_init(); // Define a Julia function func() that calls our c_func() defined in C above jl_eval_string("func(i) = ccall(:c_func, Float64, (Int32,), i)"); // Call func() multiple times, using multiple threads to do so jl_eval_string("println(Threads.threadpoolsize())"); jl_eval_string("use(i) = println(\"[J$(Threads.threadid())] i = $(i) ->$(func(i))\")");

jl_atexit_hook(0);
}

If we run this code with 2 Julia threads we get the following output (note: the output will vary per run and system):

\$ JULIA_NUM_THREADS=2 ./thread_example
2
[C 3bfd9c00] i = 1
[C 23938640] i = 4
[J 1] i = 1 -> 1.0
[C 3bfd9c00] i = 2
[J 1] i = 2 -> 1.4142135623730951
[C 3bfd9c00] i = 3
[J 2] i = 4 -> 2.0
[C 23938640] i = 5
[J 1] i = 3 -> 1.7320508075688772
[J 2] i = 5 -> 2.23606797749979

As can be seen, Julia thread 1 corresponds to pthread ID 3bfd9c00, and Julia thread 2 corresponds to ID 23938640, showing that indeed multiple threads are used at the C level, and that we can safely call Julia C API routines from those threads.


text:
# 15.4 Carnot’s perfect heat engine: the second law of thermodynamics  (Page 4/7)

 Page 4 / 7

Can improved engineering and materials be employed in heat engines to reduce heat transfer into the environment? Can they eliminate heat transfer into the environment entirely?

Does the second law of thermodynamics alter the conservation of energy principle?

## Problem exercises

A certain gasoline engine has an efficiency of 30.0%. What would the hot reservoir temperature be for a Carnot engine having that efficiency, if it operates with a cold reservoir temperature of $2\text{00}\text{º}\text{C}$ ?

$\text{403}\text{º}\text{C}$

A gas-cooled nuclear reactor operates between hot and cold reservoir temperatures of $\text{700}\text{º}\text{C}$ and $\text{27}\text{.}0\text{º}\text{C}$ . (a) What is the maximum efficiency of a heat engine operating between these temperatures? (b) Find the ratio of this efficiency to the Carnot efficiency of a standard nuclear reactor (found in [link] ).

(a) What is the hot reservoir temperature of a Carnot engine that has an efficiency of 42.0% and a cold reservoir temperature of $\text{27}\text{.}0\text{º}\text{C}$ ? (b) What must the hot reservoir temperature be for a real heat engine that achieves 0.700 of the maximum efficiency, but still has an efficiency of 42.0% (and a cold reservoir at $\text{27}\text{.}0\text{º}\text{C}$ )? (c) Does your answer imply practical limits to the efficiency of car gasoline engines?

(a) $2\text{44}\text{º}\text{C}$

(b) $\text{477}\text{º}\text{C}$

(c)Yes, sinceautomobiles enginescannot gettoo hotwithout overheating,their efficiencyis limited.

Steam locomotives have an efficiency of 17.0% and operate with a hot steam temperature of $\text{425}\text{º}\text{C}$ . (a) What would the cold reservoir temperature be if this were a Carnot engine? (b) What would the maximum efficiency of this steam engine be if its cold reservoir temperature were $\text{150}\text{º}\text{C}$ ?

Practical steam engines utilize $\text{450}\text{º}\text{C}$ steam, which is later exhausted at $\text{270}\text{º}\text{C}$ . (a) What is the maximum efficiency that such a heat engine can have? (b) Since $\text{270}\text{º}\text{C}$ steam is still quite hot, a second steam engine is sometimes operated using the exhaust of the first. What is the maximum efficiency of the second engine if its exhaust has a temperature of $\text{150}\text{º}\text{C}$ ? (c) What is the overall efficiency of the two engines? (d) Show that this is the same efficiency as a single Carnot engine operating between $\text{450}\text{º}\text{C}$ and $\text{150}\text{º}\text{C}$ . Explicitly show how you follow the steps in the Problem-Solving Strategies for Thermodynamics .

(a) ${\mathit{\text{Eff}}}_{\text{1}}=1-\frac{{T}_{\text{c,1}}}{{T}_{\text{h,1}}}=1-\frac{\text{543 K}}{\text{723 K}}=0\text{.}\text{249}\phantom{\rule{0.25em}{0ex}}\text{or}\phantom{\rule{0.25em}{0ex}}\text{24}\text{.}9%\text{}$

(b) ${\mathit{\text{Eff}}}_{2}=1-\frac{\text{423 K}}{\text{543 K}}=0\text{.}\text{221}\phantom{\rule{0.25em}{0ex}}\text{or}\phantom{\rule{0.25em}{0ex}}\text{22}\text{.}1%\text{}$

(c) $\begin{array}{l}{\mathit{\text{Eff}}}_{1}=1-\frac{{T}_{\text{c,1}}}{{T}_{\text{h,1}}}⇒{T}_{\text{c,1}}={T}_{\text{h,1}}\left(1,-,{\mathit{\text{eff}}}_{1}\right)\end{array}$ $\begin{array}{l}\text{similarly,}\phantom{\rule{0.25em}{0ex}}{T}_{\text{c,2}}={T}_{\text{h,2}}\left(1-{\mathit{\text{Eff}}}_{2}\right)\end{array}$ $\begin{array}{l}\text{using}\phantom{\rule{0.25em}{0ex}}{T}_{\text{h,2}}={T}_{\text{c,1}}\phantom{\rule{0.25em}{0ex}}\text{in}\phantom{\rule{0.25em}{0ex}}\text{above}\phantom{\rule{0.25em}{0ex}}\text{equation}\phantom{\rule{0.25em}{0ex}}\text{gives}\end{array}$ $\begin{array}{l}{T}_{\text{c,2}}={T}_{\text{h,1}}\left(1-{\mathit{\text{Eff}}}_{1}\right)\left(1-{\mathit{\text{Eff}}}_{2}\right)\equiv {T}_{\text{h,1}}\left(1-{\mathrm{Eff}}_{\text{overall}}\right)\\ \therefore \left(1-{\mathrm{Eff}}_{\text{overall}}\right)=\left(1-{\mathit{\text{Eff}}}_{1}\right)\left(1-{\mathit{\text{Eff}}}_{2}\right)\\ {\mathrm{Eff}}_{\text{overall}}=1-\left(1-0\text{.}\text{249}\right)\left(1-0\text{.}\text{221}\right)=\text{41}\text{.}5%\text{}\end{array}$

(d) ${\text{Eff}}_{\text{overall}}=1-\frac{\text{423 K}}{\text{723 K}}=0\text{.}\text{415}\phantom{\rule{0.25em}{0ex}}\text{or}\phantom{\rule{0.25em}{0ex}}\text{41}\text{.}5%\text{}$

A coal-fired electrical power station has an efficiency of 38%. The temperature of the steam leaving the boiler is $\text{550}\text{º}\text{C}$ . What percentage of the maximum efficiency does this station obtain? (Assume the temperature of the environment is $\text{20}\text{º}\text{C}$ .)

Would you be willing to financially back an inventor who is marketing a device that she claims has 25 kJ of heat transfer at 600 K, has heat transfer to the environment at 300 K, and does 12 kJ of work? Explain your answer.

The heat transfer to the cold reservoir is ${Q}_{\text{c}}={Q}_{\text{h}}-W=\text{25}\phantom{\rule{0.25em}{0ex}}\text{kJ}-\text{12}\phantom{\rule{0.25em}{0ex}}\text{kJ}=\text{13}\phantom{\rule{0.25em}{0ex}}\text{kJ}$ , so the efficiency is $\mathit{Eff}=1-\frac{{Q}_{\text{c}}}{{Q}_{\text{h}}}=1-\frac{\text{13}\phantom{\rule{0.25em}{0ex}}\text{kJ}}{\text{25}\phantom{\rule{0.25em}{0ex}}\text{kJ}}=0\text{.}\text{48}$ . The Carnot efficiency is ${\mathit{\text{Eff}}}_{\text{C}}=1-\frac{{T}_{\text{c}}}{{T}_{\text{h}}}=1-\frac{\text{300}\phantom{\rule{0.25em}{0ex}}\text{K}}{\text{600}\phantom{\rule{0.25em}{0ex}}\text{K}}=0\text{.}\text{50}$ . The actual efficiency is 96% of the Carnot efficiency, which is much higher than the best-ever achieved of about 70%, so her scheme is likely to be fraudulent.

Unreasonable Results

(a) Suppose you want to design a steam engine that has heat transfer to the environment at $\text{270ºC}$ and has a Carnot efficiency of 0.800. What temperature of hot steam must you use? (b) What is unreasonable about the temperature? (c) Which premise is unreasonable?

Unreasonable Results

Calculate the cold reservoir temperature of a steam engine that uses hot steam at $\text{450}\text{º}\text{C}$ and has a Carnot efficiency of 0.700. (b) What is unreasonable about the temperature? (c) Which premise is unreasonable?

(a) $\text{–56.3ºC}$

(b) The temperature is too cold for the output of a steam engine (the local environment). It is below the freezing point of water.

(c) The assumed efficiency is too high.

how many subject is in physics
the write question should be " How many Topics are in O- Level Physics, or other branches of physics.
effiom
how many topic are in physics
Praise
yh I need someone to explain something im tryna solve . I'll send the question if u down for it
a ripple tank experiment a vibrating plane is used to generate wrinkles in the water .if the distance between two successive point is 3.5cm and the wave travel a distance of 31.5cm find the frequency of the vibration
Tamdy
the range of objects and phenomena studied in physics is
what is Linear motion
straight line motion is called linear motion
then what
Amera
linear motion is a motion in a line, be it in a straight line or in a non straight line. It is the rate of change of distance.
Saeedul
Hi
aliyu
Richard
Linear motion is a one-dimensional motion along a straight line, and can therefore be described mathematically using only one spatial dimension
Jason
is a one-dimensional motion along a straight line, and can therefore be described mathematically using only one spatial dimensions.
Praise
what is a classical electrodynamics?
Marga
what is dynamics
Marga
dynamic is the force that stimulates change or progress within the system or process
Oze
what is the formula to calculate wavelength of the incident light
if a spring is is stiffness of 950nm-1 what work will be done in extending the spring by 60mmp
State the forms of energy
machanical
Ridwan
Word : Mechanical wave Definition : The waves, which need a material medium for their propagation, e.g., Sound waves. \n\nOther Definition: The waves, which need a material medium for their propagation, are called mechanical waves. Mechanical waves are also called elastic waves. Sound waves, water waves are examples of mechanical waves.t Definition: wave consisting of periodic motion of matter; e.g. sound wave or water wave as opposed to electromagnetic wave.h
correct
Akinpelu
what is mechanical wave
a wave which require material medium for its propagation
syed
The S.I unit for power is what?
watt
Okoli
Am I correct
Okoli
it can be in kilowatt, megawatt and so
Femi
yes
Femi
correct
Jaheim
kW
Akinpelu
OK that's right
Samuel
SI.unit of power is.watt=j/c.but kw.and Mw are bigger.umots
syed
What is physics
study of matter and its nature
Akinpelu
The word physics comes from a Greek word Physicos which means Nature.The Knowledge of Nature. It is branch of science which deals with the matter and energy and interaction between them.
Uniform
why in circular motion, a tangential acceleration can change the magnitude of the velocity but not its direction
reasonable
Femi
because it is balanced by the inward acceleration otherwise known as centripetal acceleration
MUSTAPHA
What is a wave
Tramsmission of energy through a media
Mateo
is the disturbance that carry materials as propagation from one medium to another
Akinpelu
mistakes thanks
Akinpelu
find the triple product of (A*B).C given that A =i + 4j, B=2i - 3j and C = i + k
Difference between north seeking pole and south seeking pole

format: plain


text:
# lm317 current source sense resistor

Why is sense the resistor swapped with the load resistor here

and how does this circuit work? From my understanding of circuit output (node at LED anode) will be at constant 1.25V, and it will change with load I = 1.25/R(load). What am I missing?

-

The principle behind this circuit is that the LM317 will work to make the voltage on the ADJ pin always be Vref (1.25V) less than the voltage on OUT pin. Therefore it acts as a current limiter. The sense resistor is sized to choose what current it is limited to.

For the voltage on ADJ to be 1.25V less than OUT, the following must be true:
$$V_{out} - I*R = 1.25$$ where I is the current through the resistor and R is the 1.25 Ohm resistor. Rearranging and solving for Vout,
$$V_{out} = 1.25*(1+I).$$

Let's take the two extreme cases as examples and look at the current in the circuit.

Case 1
The circuit is open exactly as shown in the graphic. In this case, the only load on the circuit is the LED and accompanying resistor. Starting from the OUT pin and assuming the Vf of the LED is 1.2V:

$$V_{out}-1.25*I-1.2V-100*I=0$$ $$I = 0.5mA$$ $$V_{out} = 1.25*(1+0.5mA) = 1.250625V$$

Case 2
The output nodes are shorted together. In this case, we can ignore the LED and its resistor because its current will be negligible. The voltage across the resistor is regulated by the LM317 to be 1.25V less than the OUT pin. Since the output is shorted, it will try to pull as much current as it can. Using Ohm's Law:
$$1.25V = I * (1.25 Ohm)$$ $$I = 1.25V/(1.25 Ohm) = 1A$$ $$Vout = 1.25 * (1+1A) = 2.5V$$ In other words, the LM317 will regulate the voltage on the OUT pin to keep the current to exactly 1A if the circuit is trying to pull more than 1A.

-

The LM317 attempts to hold the voltage between the OUT and ADJ pins at 1.25V. With a resistance of 1.25ohm, this means that it will need to output 1A. A very tiny amount of this current will go back into the ADJ pin, and the rest will pass through the load regardless of the actual resistance of the load.

If the load's impedance decreases or increases then the LM317 will output a lower or higher voltage at OUT to compensate, such that the voltage between the OUT and ADJ pins is always at 1.25V.

-


text:
# Tropic of Cancer Henry Miller

## Introduction

Tropic of Cancer is a novel by Henry Miller that has been described as "notorious for its candid sexuality" and as responsible for the "free speech that we now take for granted in literature".[2]:22[3] It was first published in 1934 by the Obelisk Press in Paris, France, but this edition was banned in the United States.[4] Its publication in 1961 in the U.S. by Grove Press led to obscenity trials that tested American laws on pornography in the early 1960s. In 1964, the U.S. Supreme Court declared the book non-obscene. It is regarded as an important work of 20th-century literature.

Writing and publication

I am living at the Villa Borghese. There is not a crumb of dirt anywhere, nor a chair misplaced. We are all alone here and we are dead." -First passage excerpt

Miller wrote the book between 1930 and 1934 during his "nomadic life" in Paris.[5]:105–107 As Miller discloses in the text of the book, he first intended to title it "Crazy Cock".[6] Miller gave the following explanation of why the book's title was Tropic of Cancer: "It was because to me cancer symbolizes the disease of civilization, the endpoint of the wrong path, the necessity to change course radically, to start completely over from scratch.”[5]:38

Anaïs Nin helped to edit the book.[5]:109 In 1934, Jack Kahane's Obelisk Press published the book with financial backing from Nin, who had borrowed the money from Otto Rank.[5]:108[7]:116

Emerson quotation, preface, and introduction

In the 1961 edition, opposite the novel's title page is a quotation from Ralph Waldo Emerson:[8]

These novels will give way, by and by, to diaries or autobiographies—captivating books, if only a man knew how to choose among what he calls his experiences that which is really his experience, and how to record truth truly.[9]

The 1961 edition includes an introduction by Karl Shapiro written in 1960 and titled "The Greatest Living Author". The first three sentences are:

I call Henry Miller the greatest living author because I think he is. I do not call him a poet because he has never written a poem; he even dislikes poetry, I think. But everything he has written is a poem in the best as well as in the broadest sense of the word.[9]:v–xxx

Following the introduction is a preface written by Nin in 1934, which begins as follows:

Here is a book which, if such a thing were possible, might restore our appetite for the fundamental realities. The predominant note will seem one of bitterness, and bitterness there is, to the full. But there is also a wild extravagance, a mad gaiety, a verve, a gusto, at times almost a delirium.[9]:xxxi–xxxiii

Summary

Set in France (primarily Paris) during the late 1920s and early 1930s, Tropic of Cancer centers on Miller's life as a struggling writer. Late in the novel, Miller explains his artistic approach to writing the book itself, stating:

Up to the present, my idea of collaborating with myself has been to get off the gold standard of literature. My idea briefly has been to present a resurrection of the emotions, to depict the conduct of a human being in the stratosphere of ideas, that is, in the grip of delirium.[9]:243

Combining autobiography and fiction, some chapters follow a narrative of some kind and refer to Miller's actual friends, colleagues, and workplaces; others are written as stream-of-consciousness reflections that are occasionally epiphanic. The novel is written in the first person, as are many of Miller's other novels, and does not have a linear organization, but rather fluctuates frequently between the past and present.

Themes

The book largely functions as an immersive meditation on the human condition. As a struggling writer, Miller describes his experience living among a community of bohemians in Paris, where he intermittently suffers from hunger, homelessness, squalor, loneliness and despair over his recent separation from his wife. Describing his perception of Paris during this time, Miller wrote:

One can live in Paris—I discovered that!—on just grief and anguish. A bitter nourishment—perhaps the best there is for certain people. At any rate, I had not yet come to the end of my rope. I was only flirting with disaster. ... I understood then why it is that Paris attracts the tortured, the hallucinated, the great maniacs of love. I understood why it is that here, at the very hub of the wheel, one can embrace the most fantastic, the most impossible theories, without finding them in the least strange; it is here that one reads again the books of his youth and the enigmas take on new meanings, one for every white hair. One walks the streets knowing that he is mad, possessed, because it is only too obvious that these cold, indifferent faces are the visages of one's keepers. Here all boundaries fade away and the world reveals itself for the mad slaughterhouse that it is. The treadmill stretches away to infinitude, the hatches are closed down tight, logic runs rampant, with bloody cleaver flashing.[9]:180–182

There are many passages explicitly describing the narrator's sexual encounters. In 1978, literary scholar Donald Gutierrez argued that the sexual comedy in the book was "undeniably low... [but with] a stronger visceral appeal than high comedy".[10]:22 The characters are caricatures, and the male characters "stumbl[e] through the mazes of their conceptions of woman".[10]:24

Michael Hardin made the case for the theme of homophobia in the novel.[11] He proposed that the novel contained a "deeply repressed homoerotic desire that periodically surfaces".[11]

Music and dance are other recurrent themes in the book.[12] Music is used "as a sign of the flagging vitality Miller everywhere rejects".[12] References to dancing include a comparison of loving Mona to a "dance of death", and a call for the reader to join in "a last expiring dance" even though "we are doomed".[12]

Characters

Other than the first-person narrator "Henry Miller",[9]:108 the major characters include:

Boris
A friend who rents rooms at the Villa Borghese.[9]:22–23 The character was modeled after Michael Fraenkel, a writer who "had sheltered Miller during his hobo days" in 1930.[5]:103,176
Carl
A writer friend who complains about optimistic people, about Paris, and about writing.[9]:49–50 Miller helps Carl write love letters to "the rich cunt, Irene", and Carl relates his encounter with her to Miller.[9]:107–117 Carl lives in squalor and has sex with a minor. The inspiration for Carl was Miller's friend Alfred Perlès, a writer.[5]:10
Collins
A sailor who befriends Fillmore and Miller.[9]:194–208 As Collins had fallen in love with a boy in the past, his undressing a sick Miller to put him to bed has been interpreted as evidence of a homoerotic desire for Miller.[11]
Fillmore
A "young man in the diplomatic service" who becomes friends with Miller.[9]:193 He invites Miller to stay with him; later the Russian "princess" Macha with "the clap" joins them.[9]:219–238 Fillmore and Miller disrupt a mass while hung over.[9]:259–263 Toward the end of the book, Fillmore promises to marry a French woman named Ginette who is pregnant by him, but she is physically abusive and controlling, and Miller convinces Fillmore to leave Paris without her.[9]:292–315 Fillmore's real-life counterpart was Richard Galen Osborn, a lawyer.[5]:46
Mona
A character corresponding to Miller's estranged second wife June Miller.[5]:96–97 Miller remembers Mona, who is now in America, nostalgically.[9]:17–21, 54, 152, 177–181, 184–185, 250–251
Tania
A woman married to Sylvester.[9]:56–57 The character was modeled after Bertha Schrank, who was married to Joseph Schrank.[13] It may also be noted that during the writing of the novel, Miller also had a passionate affair with Anais Nin; by changing the "T" to an "S", one can make out Anais from Tania by rearranging the letters. It may also be noted that in one of Nin's many passionate letters to Miller, she quotes his swoon found below. Tania has an affair with Miller, who fantasizes about her:

O Tania, where now is that warm cunt of yours, those fat, heavy garters, those soft, bulging thighs? There is a bone in my prick six inches long. I will ream out every wrinkle in your cunt, Tania, big with seed. I will send you home to your Sylvester with an ache in your belly and your womb turned inside out. Your Sylvester! Yes, he knows how to build a fire, but I know how to inflame a cunt. I shoot hot bolts into you, Tania, I make your ovaries incandescent.[9]:5–6

Van Norden
A friend of Miller’s who is "probably the most sexually corrupt man" in the book, having a "total lack of empathy with women".[10]:25–27 Van Norden refers to women using terms such as "my Georgia cunt", "fucking cunt", "rich cunt", "married cunts", "Danish cunt", and "foolish cunts".[9]:100–107 Miller helps Van Norden move to a room in a hotel, where Van Norden brings women "day in and out".[9]:117–146 The character was based on Wambly Bald, a gossip columnist.[14]
Legal issues

### United States

Upon the book's publication in France in 1934, the United States Customs Service banned the book from being imported into the U.S.[15] Frances Steloff sold copies of the novel smuggled from Paris during the 1930s at her Gotham Book Mart, which led to lawsuits.[16] A copyright-infringing edition of the novel was published in New York City in 1940 by "Medusa" (Jacob Brussel); its last page claimed its place of publication to be Mexico.[17] Brussel was eventually sent to jail for three years for the edition.[18]

In 1950, Ernest Besig, the director of the American Civil Liberties Union in San Francisco, attempted to import Tropic of Cancer along with Miller's other novel, Tropic of Capricorn, to the United States. Customs detained the novels and Besig sued the government. Before the case went to trial, Besig requested a motion to admit 19 depositions from literary critics testifying to the "literary value of the novels and to Miller's stature as a serious writer".[19] The motion was denied by Judge Louis A. Goodman. The case went to trial with Goodman presiding. Goodman declared both novels obscene. Besig appealed the decision to the Ninth Circuit of Appeals, but the novels were once again declared "obscene" in a unanimous decision in Besig v. United States.

In 1961, when Grove Press legally published the book in the United States, over 60 obscenity lawsuits in over 21 states were brought against booksellers that sold it.[15][20] The opinions of courts varied; for example, in his dissent from the majority holding that the book was not obscene, Pennsylvania Supreme Court Justice Michael Musmanno wrote Cancer is "not a book. It is a cesspool, an open sewer, a pit of putrefaction, a slimy gathering of all that is rotten in the debris of human depravity."[21]

Publisher Barney Rosset hired lawyer Charles Rembar to help Rosset lead the "effort to assist every bookseller prosecuted, regardless of whether there was a legal obligation to do so".[22][23] Rembar successfully argued two appeals cases, in Massachusetts and New Jersey,[20][24] although the book continued to be judged obscene in New York and other states.[22]

In 1964, the U.S. Supreme Court, in Grove Press, Inc. v. Gerstein, cited Jacobellis v. Ohio (which was decided the same day) and overruled state court findings that Tropic of Cancer was obscene.[25][26]

### Other countries

The book was banned outside the U.S. as well:

• In Canada, it was on the list of books banned by customs as of 1938. [27] The Royal Canadian Mounted Police seized copies of the book from bookstores and public libraries in the early 1960s.[27] By 1964, attitudes toward the book had "liberalized".[27]
• Only smuggled copies of the book were available in the United Kingdom after its publication in 1934.[28] Scotland Yard contemplated banning its publication in Britain in the 1960s, but decided against the ban because literary figures such as T. S. Eliot were ready to defend the book publicly.[28]
• In Finland all printed copies of the Finnish versions of the book were confiscated by the state before the books were to be published in 1962. The book was not published there till 1970. The book was however available in Swedish and English.[29]
Critical reception

### Individual reviewers

In 1935, H. L. Mencken read the 1934 Paris edition, and sent an encouraging note to Miller: "I read Tropic of Cancer a month ago. It seems to me to be a really excellent piece of work, and I so reported to the person who sent it to me. Of this, more when we meet."[30]

In a 1940 essay "Inside the Whale", George Orwell wrote the following:

I earnestly counsel anyone who has not done so to read at least Tropic of Cancer. With a little ingenuity, or by paying a little over the published price, you can get hold of it, and even if parts of it disgust you, it will stick in your memory. ... Here in my opinion is the only imaginative prose-writer of the slightest value who has appeared among the English-speaking races for some years past. Even if that is objected to as an overstatement, it will probably be admitted that Miller is a writer out of the ordinary, worth more than a single glance....[31]

Samuel Beckett hailed it as "a momentous event in the history of modern writing".[32] Norman Mailer, in his 1976 book on Miller entitled Genius and Lust, called it "one of the ten or twenty great novels of our century, a revolution in consciousness equal to The Sun Also Rises".[33]

Edmund Wilson said of the novel:

The tone of the book is undoubtedly low; The Tropic of Cancer, in fact, from the point of view both of its happenings and of the language in which they are conveyed, is the lowest book of any real literary merit that I ever remember to have read... there is a strange amenity of temper and style which bathes the whole composition even when it is disgusting or tiresome.[34]

In Sexual Politics, a book originally published in 1970, Kate Millett wrote that Miller "is a compendium of American sexual neuroses", showing "anxiety and contempt" toward women in works such as Tropic of Cancer.[35]:295–296 In 1980, Anatole Broyard described Tropic of Cancer as "Mr. Miller's first and best novel", showing "a flair for finding symbolism in unobtrusive places" and having "beautiful sentence[s]".[36] Julian Symons wrote in 1993 that "the shock effect [of the novel] has gone", although "it remains an extraordinary document".[37] A 2009 essay on the book by Ewan Morrison described it as a "life-saver" when he was "wandering from drink to drink and bed to bed, dangerously close to total collapse".[38]

### Appearances in lists of best books

The book has been included in a number of lists of best books, such as the following:

• In July 1998, the Board of the Modern Library ranked Tropic of Cancer 50th on its list of the 100 best English-language novels of the 20th century.[39][40]
• In July 1998, students of the Radcliffe Publishing Course, at the request of the Modern Library editorial board, compiled their own list of the 100 best English-language novels of the 20th century, and the book was ranked 84th.[41]
• Between July 1998 and October 1998, an online reader poll by the Modern Library placed the novel 68th among the 100 best English-language novels of the 20th century.[40]
• In a survey of librarians published in November 1998, the book was ranked 132nd in a list of 150 fiction books from the 20th century.[42]
• Time magazine included the novel in its list of the 100 best English-language novels from 1923 to 2005.[43]
• The novel was listed in the 2006 book 1001 Books You Must Read Before You Die.[44]
• It was one of the "1000 Novels Everyone Must Read" in The Guardian in 2009.[45]
• It was included in the list "The 75 Books Every Man Should Read" (2011) in Esquire.[46]
Influences

### Influences on Miller

Critics and Miller himself have claimed that Miller was influenced by the following in writing the novel:

• Louis-Ferdinand Céline, especially Journey to the End of the Night (1932), his semi-autobiographical first novel featuring a "comic, antiheroic character".[5]:109–110[36][47] Nevertheless, Orwell wrote "Both books use unprintable words, both are in some sense autobiographical, but that is all."[31]
• Fyodor Dostoyevsky, especially his Notes from Underground (1864).[36]
• James Joyce.[36] Nevertheless, Orwell felt that the novel did not resemble Joyce's Ulysses.[31]
• François Rabelais.[36][48]
• Henry David Thoreau.[49][50]
• Walt Whitman, who wrote in a similar style about common people.[8][31][36][50] The poet is mentioned favorably in the novel several times, for example: "In Whitman the whole American scene comes to life, her past and her future, her birth and her death. Whatever there is of value in America Whitman has expressed, and there is nothing more to be said."[9]:239–240

### Novel's influence on other writers

Tropic of Cancer "has had a huge and indelible impact on both the American literary tradition and American society as a whole".[51] The novel influenced many writers, as exemplified by the following:

• Lawrence Durrell's 1938 novel The Black Book was described as "celebrat[ing] the Henry Miller of Tropic of Cancer as his [Durrell's] literary father".[52]
• It has been claimed that the novel impressed the Beat Generation writers in the 1960s such as Jack Kerouac and William S. Burroughs.[15][27][53]
• Erica Jong wrote "...when I was searching for the freedom to write [the 1973 novel] Fear of Flying, I picked up Tropic of Cancer and the sheer exuberance of the prose unlocked something in me."[7]:14 In turn, Miller praised Fear of Flying in 1974, comparing it to Tropic of Cancer.[54]

The novel was adapted for a film Tropic of Cancer (1970) directed by Joseph Strick and starring Rip Torn, James T. Callahan, and Ellen Burstyn.[2] Miller was a "technical consultant" during the production of the movie; although he had reservations about the adaptation of the book, he praised the final movie.[2]:147 The film was rated X in the United States, which was later changed to an NC-17 rating.[55]

References or allusions in other works
Literature
• In his 1948 autobiography, poet and writer Robert W. Service wrote a few comments about Tropic of Cancer, for example, "Of course the book shocked me but I could not deny a strange flicker of genius in its wildest fights.”[56]
• In chapter 2 of William Gaddis’s 1955 novel The Recognitions, set in Paris in the 1930s, an artist complains “I’ve got to show these pictures, I’ve got to sell some of them, but how can I have people coming up there with him there? He’s dying. I can’t put him out on the street, dying like that . . . even in Paris” (63-64), which echoes the scene in Tropic of Cancer where the artist Kruger tries to get the sick Miller out of his studio so that he can exhibit his pictures. “People can’t look at pictures and statues with enthusiasm when a man is dying before their eyes” (Grove ed., 195).[57]
• In his 1960 short story "Entropy", Thomas Pynchon begins with a quote from this novel.
• In the 1965 novel God Bless You, Mr. Rosewater by Kurt Vonnegut, Lila reads the book "as though... [it] were Heidi".[58]
• In the 1969 novel The Seven Minutes by Irving Wallace, the book and the trial are mentioned.
• In the 1994 play Pterodactyls by Nicky Silver, the novel is mentioned by the character Emma: "She reads poems by Emily Bronté and I read chapters from The Tropic of Cancer by Henry Miller."[59]
• In Carl Hiaasen's 1995 Stormy Weather a character quotes a line from the novel.
• In the 1998 nonfiction book Rocket Boys, Quentin shows Sonny a copy of Tropic of Cancer and asks him "You want to know about girls?"[60]
Music
• Satirical songwriter and mathematics instructor Tom Lehrer stated that he intended to write a million-selling math book which he would call Tropic of Calculus.
• The 1980s British band The Weather Prophets was named after a line in the opening paragraph of the novel: "Boris has just given me a summary of his views. He is a weather prophet."
• Frontman Henry Rollins of the hardcore punk band Black Flag was heavily affected by the book as well and frequently made references to it in his songs, often taking lyrics directly from Tropic of Cancer. He would also read passages of it to his audiences mid-show.
• In the song "Delirium of Disorder" by punk band Bad Religion, the opening verse quotes the novel, "Life is a sieve through which my anarchy strains resolving itself into words. Chaos is the score on which reality is written...".
• In the song "Protest Song 68" by Refused, the opening verse quotes the novel, "To sing you must first open your mouth. You must have a pair of lungs..."
• In the song "Ashes of American Flags" by Wilco, one phrase from the lyrics is taken from the novel: "A hole without a key."
• In 2012, the American grindcore band Pig Destroyer used a passage from the book on tape, read by Larry King, as the introduction to their song The Bug on their album entitled Book Burner.
Film and television
• In a 1962 episode of the TV series Perry Mason ("The Case of the Bogus Books"), a character tells another that "Tropic of Cancer is not a medical book. Far from it."
• In the 1963 film, Take Her, She's Mine, adapted from Phoebe and Henry Ephron's play of the same name, Jimmy Stewart, as Mr. Michaelson, reads the (soon to be banned by the mayor) book written by Henry Miller. Sandra Dee, Stewart's daughter in the film, has organized a sit-in style protest against banning the book.
• The novel is read and discussed in After Hours, a 1985 film by Martin Scorsese.
• In the 1991 version of Cape Fear, also directed by Scorsese, the characters of Max Cady and Danielle Bowden discuss the book briefly.
• In the 1991 Seinfeld episode "The Library", Jerry is accused of never returning a copy of the book to the public library after borrowing it many years before, during high school, in 1971. It is revealed that the book was stolen by the gym teacher while a gang of jocks were beating up on George. In the present day, the gym teacher still holds the library book, despite being homeless and insane.[4]
• In the 1991 movie Henry & June the first draft of the book is referenced and discussed by Henry and friends.
• In the 2000 romantic comedy film 100 Girls, the characters Dora and Matthew read an excerpt from Tropic of Cancer together: "Your Sylvester! ... After me you can take on stallions, bulls, rams, drakes, St. Bernards."[61]
• At the beginning of the 2000 movie Final Destination, Clear (Ali Larter) is reading Tropic of Cancer upon arrival at the airport.
• In the 2010 telenovela ¿Dónde Está Elisa? a copy of the book is found in Elisa's locker at school.
Typescript

The typescript of the book was auctioned for $165,000 in 1986.[62] Yale University now owns the typescript, which was displayed to the public in 2001.[63] See also • Censorship • Henry and June (1986 book) • Henry & June (1990 film) • Tropic of Capricorn References 1. ^ Motion, Andrew (September 18, 1994). "Book: The Man Who Succeeded Too Well at Sex". The Observer 2. ^ a b c Decker, James M. (Summer 2007). "Literary Text, Cinematic "Edition": Adaptation, Textual Authority, and the Filming of "Tropic of Cancer"". College Literature. 34 (3): 140–160. doi:10.1353/lit.2007.0029. 3. ^ Meisel, Perry (June 23, 1991). "Book Review: A Dirty Young Man And How He Grew". The New York Times. Retrieved October 25, 2011. 4. ^ a b Baron, Dennis (October 1, 2009). "Celebrate Banned Books Week: Read Now, Before It's Too Late". Web of Language. University of Illinois at Urbana-Champaign. Retrieved September 25, 2011. 5. ^ a b c d e f g h i Miller, Henry (1995). Henry Miller, the Paris Years. New York: Arcade. ISBN 1-55970-287-7. 6. ^ McCrum, Robert (29 April 2012). "Renegade: Henry Miller and the Making of Tropic of Cancer by Frederick Turner". The Guardian 7. ^ a b Jong, Erica (1994). The Devil at Large: Erica Jong on Henry Miller. New York: Grove Press. ISBN 0-8021-3391-6. 8. ^ a b Atkinson, Brooks (June 30, 1961). "Critic at Large: Henry Miller's Use of an Emerson Quotation in 'Tropic of Cancer' is Discussed". The New York Times. Section food fashions family furnishings, page 24. 9. ^ a b c d e f g h i j k l m n o p q r s t Miller, Henry (1961). Tropic of Cancer. New York: Grove Press. ISBN 0-8021-3178-6. 10. ^ a b c Gutierrez, Donald (Winter 1978). ""Hypocrite Lecteur": Tropic of Cancer as Sexual Comedy". Mosaic. 11 (2): 21–33. 11. ^ a b c Hardin, Michael (2002). "Fighting Desires: Henry Miller's Queer Tropic". Journal of Homosexuality. 42 (3): 129–150. doi:10.1300/J082v42n03_08. PMID 12066987. 12. ^ a b c Jackson, Paul R. (1979). "Caterwauling and Harmony: Music in Tropic of Cancer". Critique. 20 (3): 40–50. doi:10.1080/00111619.1979.10690198. 13. ^ O'Joyce, Guillermo (2011). "Miller Time: On Henry Miller". Miller, Bukowski and their enemies (2nd ed.). London: Pinter & Martin. ISBN 978-1-905177-27-1. 14. ^ Pizer, Donald (1996). American Expatriate Writing and the Paris Moment: Modernism and Place. Baton Rouge: Louisiana State University Press. p. 133. ISBN 0-8071-2026-X. 15. ^ a b c Anonymous (June 9, 1961). "Books: Greatest Living Patagonian". Time. Retrieved September 25, 2011. 16. ^ Mitgang, Herbert (April 16, 1989). "Frances Steloff is Dead at 101; Founded the Gotham Book Mart". The New York Times. Retrieved September 22, 2011. 17. ^ Miller, Henry (1940). Tropic of Cancer. New York: Medusa. OCLC 9798986. 18. ^ Brottman, Mikita (2004). Funny Peculiar: Gershon Legman and the Psychopathology of Humor. Hillsdale, NJ: Analytic Press. p. 6. ISBN 0-88163-404-2. 19. ^ "Tropic of Cancer (1934): History of the Ban". Banned Books 20. ^ a b Holland, Steve (October 28, 2000). "Charles Rembar: anti-censorship lawyer who won freedom for Lady Chatterley and Fanny Hill in America". The Guardian. London. Retrieved September 22, 2011. 21. ^ Commonwealth v. Robin, 218 A.2d 546, 561 (Pa. 1966). 22. ^ a b Woo, Elaine (October 28, 2000). "Charles Rembar; Lawyer Won Key Obscenity Cases". Los Angeles Times. Retrieved September 22, 2011. 23. ^ Jordan, Ken (Winter 1997). "Barney Rosset, The Art of Publishing No. 2". The Paris Review 24. ^ Attorney General Vs. The Book Named "Tropic Of Cancer", 345 Mass. 11 (Massachusetts Supreme Judicial Court July 17, 1962). 25. ^ Grove Press, Inc., v. Gerstein, 378 U.S. 577 (U.S. Supreme Court June 22, 1964). 26. ^ Hubbard, Melissa A. "Grove Press Publishes & Defends T.O.C." Southern Illinois University School of Law Library. Archived from the original on March 25, 2012. Retrieved September 22, 2011. 27. ^ a b c d Caldwell, Rebecca (February 14, 2004). "Once Scandalous, An Insult Fades". The Globe and Mail. Canada. Archived from the original on April 4, 2012. Retrieved October 24, 2011. 28. ^ a b Travis, Alan (May 4, 1998). "The Miller's Tale That Beat a Ban: Literary Experts Scared". The Guardian 29. ^ http://www2.kirjastot.fi/kysy/arkistohaku/kysymys/?ID=c56f8e10-74fb-4a3d-8a29-f6e47032a6d2 30. ^ Mencken, H. L. (1977). Bode, Carl, ed. New Mencken Letters. New York: Dial Press. pp. 372–373. ISBN 0-8037-1379-7. 31. ^ a b c d Orwell, George. "Inside the Whale (1940)". Collected Essays. University of Adelaide Library. Retrieved September 25, 2011. 32. ^ Cited in: Henry Miller, Tropic of Cancer, (Harper Perennial, UK, 2005) 33. ^ Mailer, Norman; Miller, Henry (1976). Genius and Lust: a Journey Through the Major Writings of Henry Miller. New York: Grove Press. p. 8. ISBN 0-8021-0127-5. 34. ^ Aschenbrenner, L. (30 November 1974). The Concepts of Criticism. Springer Netherlands. p. 485. Retrieved July 27, 2008 – via Google Books. 35. ^ Millett, Kate (2000). "Chapter 6: Henry Miller". Sexual Politics. Urbana: University of Illinois Press. pp. 294–313. ISBN 0-252-06889-0. 36. ^ a b c d e f Broyard, Anatole (June 9, 1980). "Miller: An Observer With Infallible Ear; An Appreciation". The New York Times 37. ^ Symons, Julian (March 7, 1993). "Quiet Days in Cliches - Biography". The Sunday Times. London. 38. ^ Morrison, Ewan (June 26, 2009). "Book Of A Lifetime: Tropic of Cancer, By Henry Miller". The Independent. London. Retrieved October 22, 2011. 39. ^ Lewis, Paul (July 20, 1998). "'Ulysses' on Top Among 100 Best Novels". The New York Times. Retrieved September 22, 2011. 40. ^ a b "100 Best Novels". Modern Library. July 20, 1998. 41. ^ "Radcliffe's Rival 100 Best Novels List". Modern Library. July 20, 1998. 42. ^ Anonymous (November 15, 1998). "Librarians Choose a Century of Good Books". Library Journal: 34–36. Retrieved September 25, 2011. 43. ^ Lacayo, Richard (October 16, 2005). "ALL TIME 100 Novels: Tropic of Cancer (1934), by Henry Miller". Time Magazine. Retrieved September 23, 2011. 44. ^ Boxall, Peter (2006). 1001 Books You Must Read Before You Die. London: Cassell. ISBN 978-1-84403-417-8. 45. ^ "1000 Novels Everyone Must Read: The Definitive List". The Guardian. London. January 23, 2009. Retrieved October 12, 2011. 46. ^ "The 75 Books Every Man Should Read". Esquire Magazine. May 26, 2011. Retrieved October 5, 2011. 47. ^ Collins, Tom (December 10, 2004). "'Haiku Paintings' Reveal Essence of Jorge Fick's Artistic, Intellectual Life". Albuquerque Journal. Retrieved October 12, 2011. 48. ^ Iyer, Pico (July 22, 1991). "Essay: An American Optimist". Time Magazine. Retrieved October 12, 2011. 49. ^ Featherstone, Joseph L. (September 27, 1961). "Critics Testify for 'Tropic of Cancer'". The Harvard Crimson. Retrieved October 12, 2011. 50. ^ a b Shifreen, Lawrence J (Winter 1979). "Henry Miller's 'Mezzotints': The Undiscovered Roots of 'Tropic of Cancer'". Studies in Short Fiction. 16 (1): 11–17. Miller's transcendental stance as a follower of Whitman and Thoreau becomes apparent in his essays 'Walt Whitman' and 'Henry David Thoreau' 51. ^ Orend, Karl (January 9, 2004). "Making a Place for Henry Miller in the American Classroom". Chronicle of Higher Education. 20 (18). Retrieved October 25, 2011. 52. ^ Ingersoll, Earl G, ed. (1998). Lawrence Durrell: Conversations. Madison, NJ: Fairleigh Dickinson University Press. p. 12. ISBN 0-8386-3723-X. 53. ^ Oriard, Michael (1991). Sporting with the Gods: the Rhetoric of Play and Game in American Culture. Cambridge: Cambridge University Press. p. 450. ISBN 0-521-39113-X. 54. ^ Kendrick, Walter (February 14, 1993). "Her Master's Voice". New York Times. Retrieved October 10, 2011. 55. ^ Fox, Margalit (June 7, 2010). "Joseph Strick, Who Filmed the Unfilmable, Dies at 86". The New York Times. Retrieved October 5, 2011. 56. ^ Service-Longepe, Charlotte (25 May 2015). "Henry Miller 1891–1980". Robert W. Service 57. ^ Steven Moore, A Reader’s Guide to William Gaddis’s ‘The Recognitions’ (Univ. of Nebraska Press, 1982), p. 95. 58. ^ Vonnegut, Kurt (1998). "Chapter 9". God Bless You, Mr. Rosewater: Or, Pearls Before Swine. New York: Dell Publications. pp. 156–159. ISBN 0-385-33347-1. 59. ^ Silver, Nicky (1994). Pterodactyls. New York: Dramatists Play Service. p. 66. ISBN 0-8222-1375-3. 60. ^ Hickam, Homer H., Jr (2000). Rocket Boys: a Memoir. New York: Delta. p. 64. ISBN 0-385-33321-8. 61. ^ 100 Girls Full Movie. 2000. Event occurs at 50:10. ISBN 1-58817-264-3. Retrieved October 25, 2011. 62. ^ "Typescript of 'Cancer' Auctioned for$165,000". New York Times. February 15, 1986. Retrieved October 3, 2011.
63. ^ "From Heinrich Schuetz to Henry Miller: Selections from the Frederick R. Koch Collection at the Beinecke Library 20 April, 2001 to 14 July, 2001". Yale University. Retrieved October 3, 2011.


text:
Plz see the attachement and answer the question?

Feb 8, 2018

$\angle Q S R = {78}^{\circ}$

Explanation:

As $Q R$ subtends the angles $\angle Q P R$ and $\angle Q S R$ on thesame side of chord $Q R$, thetwo are equal i.e.

$\angle Q S R = \angle Q P R$

As $Q S$ is bisector of $\angle P Q R$ and $\angle S Q R = {35}^{\circ}$

$\angle P Q R = 2 \times {35}^{\circ} = {70}^{\circ}$

Now in $\Delta P Q R$, we have $\angle P Q R = {70}^{\circ}$ and $\angle P R Q = {32}^{\circ}$

Hence $\angle Q P R = {180}^{\circ} - {70}^{\circ} - {32}^{\circ} = {78}^{\circ}$

and $\angle Q S R$ too is ${78}^{\circ}$.


text:
# Course Catalog

Category:
Sort by:

### Healing Meditation

Restore, promote and enhance your health. Experience the simplest and easy to follow approach of health, healing and well-being which gentle, non-invasive and no toxic side effects. This course starts you with the basics of meditation, followed by several guided meditations. Use them as often as you like.
Course duration: 1 year
Category: Meditation

### Letting Go Into Bliss: an exploration of “jhana”

Letting Go Into Bliss is an exploration of "jhana” -- a joyful state of focused attention that can arise in meditation. We'll be learning how to allow jhana to happen.

On this 80 day meditation event, you'll learn to:

• Notice and counteract the various ways your mind suppresses joy
• Calm the mind, using a variety of techniques
• Deeply relax the body, allowing physical pleasure to arise
• Tap into an innate sense of joy
• Develop the mind's ability to focus undistractedly

Course duration: Unlimited
Category: Meditation

### Powerful Potential Meditation

Tapping into your inner potential and power can become an incredible resource. When one does, the results can be amazing and the goals you can accomplish can be unlimited. This course starts you with the basics of meditation, followed by several guided meditations. Use them as often as you like.

Course duration: 1 year
Category: Meditation

### Serenity Meditation

Obtaining serenity reaps a wide variety of benefits. From physical health to mental and spiritual. So much can be gained by embracing a serenity meditation. This course starts you with the basics of meditation, followed by several guided meditations. Use them as often as you like.

Course duration: 1 year
Category: Meditation


text:
# Handedness of duplex DNA: role of the glycosydic torsion

Rao, Shashidhar N and Sasisekharan, V (1983) Handedness of duplex DNA: role of the glycosydic torsion. In: International Journal of Biological Macromolecules, 5 (2). pp. 83-88.

 PDF full.pdf Restricted to Registered users only Download (628kB) | Request a copy

## Abstract

Model building studies on helical structures of polynucleotides indicate the glycosydic torsion, x, and the sugar pucker to be the most important conformational parameters in determining the handedness of the models. Sugar puckers in two typical regions of the pseudorotational space namely, $C2^{\prime}$ endo and $C3^{\prime}$ endo and the glycosydic torsion in four ranges, namely, anti, high anti, syn and low anti lead to eight conformational combinations for the model bulding of base-paired double helical structures of polynucleotides. Interestingly, not all combinations of sugar pucker and glycosidic torsion lead to structures with Watson-Crick base-pairing. The stereochemical details of the double stranded Watson-Crick base-paired models and their consistency with X-ray diffraction data are discussed.

Item Type: Journal Article International Journal of Biological Macromolecules Elsevier Science Copyright of this article belongs to Elsevier Science DNA;duplex DNA;handedness;glycosydic torsion Division of Biological Sciences > Molecular Biophysics Unit 10 Apr 2008 19 Sep 2010 04:44 http://eprints.iisc.ac.in/id/eprint/13663


text:
# I What does Griffith mean by this hint? [Electrodynamics]

Tags:
1. Apr 26, 2017

### Mind----Blown

I was solving the problems given by Griffith in his book 'Introduction to Electrodynamics' and stumbled across this question.

"Because sigma (conductivity of the medium) is a function of position, the equation 7.5 does not hold" --i get this point; current density isn't constant and so its divergence will be non zero.
"The charge density is non zero in the resistive medium"-- I have no clue what this sentence means.. I can't even think why i don't find it right.. someone please explain it to me!!

Thanks a lot !

2. Apr 26, 2017

### vanhees71

Another hint: Use the constitutive equation
$$\vec{j}=\sigma \vec{E}$$
and the continuity equation for stationary currents
$$\vec{\nabla} \cdot \vec{j}=0,$$
which together immediately tell you, how to modify Eq. (7.5). Also it would be helpful to tell, what $s$ is. Is it the cylinder coordinate $r$ in standard notation? I guess so from the Figure, which indicates that $\vec{E}$ is radially out.

PS: Questions like this should be posted in the homework forum!


text:
# Gauss's law application

## Main Question or Discussion Point

why electric field intensity at a point of a non conducting sheet is independent of r???

#### Attachments

• 30 KB Views: 435

## Answers and Replies

Related Classical Physics News on Phys.org
Doc Al
Mentor
why electric field intensity at a point of a non conducting sheet is independent of r?
Do you understand the derivation from Gauss' law? (You can also just add up all the contributions to the electric field at a point. Same result.)

i m confused. can you please explain it???

Last edited by a moderator:
Doc Al
Mentor
Do you understand the derivation from Gauss' law? (You can also just add up all the contributions to the electric field at a point. Same result.)
Gauss's law is all about the electric flux, isn't it. So the line of force of a charge travel to infinity, so at a point on which we will calculate e.field intensity may lie at infinite distance, also in this derivation we do calculate the derivation by taking 0 rad angle between E and ds, i.e. all the lines of force that we take for calculation are may be perpendicular to that sheet so for those lines of forces the point on which we r going to calculate E doesn't depend on the distance of the point from the surface of the sheet. Am i right?? I don't think.....so, Please explain me clearly.

Doc Al
Mentor
So the line of force of a charge travel to infinity, so at a point on which we will calculate e.field intensity may lie at infinite distance,
Forget about finding the field "at infinity". The point of this model is that the dimensions of the plate are huge compared to the distance from the plate, so that we can treat the plate as effectively infinite (and thus ignore any effects from being near an edge).

also in this derivation we do calculate the derivation by taking 0 rad angle between E and ds, i.e. all the lines of force that we take for calculation are may be perpendicular to that sheet
The field at any point is perpendicular to the sheet. Thus the only parts of the Gaussian surface that will have a flux is the end pieces.

so for those lines of forces the point on which we r going to calculate E doesn't depend on the distance of the point from the surface of the sheet.
Since the amount of charge enclosed -- and thus the flux -- doesn't change with distance from the plate, we can conclude that the field does not depend on that distance.

Thanks i got it.....[emoji106][emoji106]


text:
Canadian Mathematical Society www.cms.math.ca
 location:  Publications → journals → CMB
Abstract view

# Sets of Uniqueness for Univalent Functions

We observe that any set of uniqueness for the Dirichlet space $\cD$ is a set of uniqueness for the class $S$ of normalized univalent holomorphic functions.


text:
# 13.1.1: Factorial Notations and Square Tables

## 2x2 Designs

We’ve just started talking about a 2x2 Factorial design, which means that we have two IVs (the number of numbers indicates how many IVs we have) and each IV has two levels (the numbers represent the number of level for each IV). We said this means the IVs are crossed. To illustrate this, take a look at the following tables. Table $$\PageIndex{1}$$ is a conceptual version.  Although not exactly accurate, many call these types of tables a Punnett Square because it shows the combination of different levels of two categories.

IV Levels IV2 Level 1 IV1 Level I IV1 Level 2 DV DV DV DV

Our study on distraction is a 2x2 design, so what would that look like in this type of table?

Example $$\PageIndex{1}$$

Create a "Punnett's Square" for the IVs and DV of the Distraction scenario.

Solution

IV Levels IV2 (Reward): Yes IV1 (Distraction):  Yes IV1 (Distraction):  No DV = Number of differences spotted DV = Number of differences spotted DV = Number of differences spotted DV = Number of differences spotts

You could have just as easily made IV1 the reward and IV2 the Distraction, and the table would still be correct.

Let’s talk about this crossing business. Here’s what it means for the design. For the first level of Distraction (Yes), we measure the number of differences spotted performance for the people who were rewarded, as well as for the people who were not rewarded. So, for the people who were distracted we also manipulated whether or not they earned a reward. In the second level of the Distraction IV (No), we also manipulate reward, with some people earning a reward and some people not. We collect how many differences were spotted in all conditions.

We could say the same thing, but talk from the point of view of the second IV. For example, for participants who were rewarded, some are distracted and some are not. Similarly, for participants who were not rewarded, we distract some of the participants and don't distract some of them.

Each of the four squares representing a DV, is called a condition. So, we have 2 IVs, each with 2 levels, for a total of 4 conditions. This is why we call it a 2x2 design. 2x2 = 4. The notation tells us how to calculate the total number of conditions.

## Factorial Notation

Anytime all of the levels of each IV in a design are fully crossed, so that they all occur for each level of every other IV, we can say the design is a fully factorial design.  We use a notation system to refer to these designs. The rules for notation are as follows. Each IV get’s it’s own number. The number of levels in the IV is the number we use for the IV. Let’s look at some examples:

2x2 = There are two IVS, the first IV has two levels, the second IV has 2 levels. There are a total of 4 conditions, 2x2 = 4.

2x3 = There are two IVs, the first IV has two levels, the second IV has three levels. There are a total of 6 conditions, 2x3 = 6

3x2 = There are two IVs, the first IV has three levels, the second IV has two levels. There are a total of 6 conditions, 3x2=6.

4x4 = There are two IVs, the first IV has 4 levels, the second IV has 4 levels. There are a total of 16 condition, 4x4=16

2x3x2 = There are a total of three IVs. The first IV has 2 levels. The second IV has 3 levels. The third IV has 2 levels. There are a total of 12 condition. 2x3x2 = 12.

Let’s practice a little with this notation.

Exercise $$\PageIndex{1}$$

What is the factorial design notation for a study with two IVs, one has 2 levels and the other has 3 levels?

2x3

There are two IVs, so there are two numbers. Each number represents the number of levels for each IV.

Exercise $$\PageIndex{2}$$

What is the factorial design notation with a study with the following IVs:

2 (task presentation: computer or paper) by

2 (task difficulty: easy or hard) by

2 (student:  high school or college)

2x2x2

There are three IVs, so there are three numbers.  Each IV only has two levels, so there are three two’s!  Notice that there are no threes.  The number of IVs is represented in the number of numbers.

Okay, let’s try something a little more challenging.

Let’s do a couple more to make sure that we have this notation business down.

Exercise $$\PageIndex{5}$$

For one of Dr. MO’s dissertation studies, participants read about a character, then rated that character on several personality traits (DV).  The race and gender of the character were varied systematically.  Here are the IVs:

• Race of participant: White or Black
• Gender of participant:            Woman or man
• Race of character:    White or Black or none/neutral (the character’s race was not mentioned)
• Gender of character:              Woman or man or none/neutral (the character’s gender was not mention)

What kind of factorial design was this study?       2x2?  2x3?  Something else (what?)?

This was a 2x2x3x3 study because:

• Race of participant:         White or Black = 2
• Gender of participant:    Woman or man = 2
• Race of character:            White or Black or none/neutral = 3
• Gender of character:      Woman or man or none/neutral -= 3

Dr. MO wanted 30 participants in each cell, so she had to have 1,080 participants!

Last one!  This one has a few more questions to better understand the scenario.

Exercise $$\PageIndex{6}$$

Dr. MO has more Star Wars collectibles than can fit in her office, and she’d like to sell some.  Her research question is whether she’d get a better price through CraigsList or eBay?  Also, should she take the picture or use a stock photo?

1. What is the DV? (It is not explicitly labeled.)
2. For each IV, what are the levels?
3. Is this a 2x2 factorial design?  If not, what kind of design is it?
4. List out each of the combinations of the levels of the IVs.
1. The DV is the price, or how much Dr. MO could earn for selling each collectible.
2. IV1’s levels are CraigsList or eBay, so the IV name could be something like “website” or “platform”.  IVs’ levels are personal photo or stock photo, so the IV name could be something like “Photo Type.”
3. This is a 2x2 factorial design:  2 (Platform:  CraigsList or eBay) by 2 (Photo Type:  Personal or Stock)
4. List out each of the combinations of the levels of the IVs:
• Posted on CraigsList with a personal photo.
• Posted on Craigslists with a stock photo.
• Posted on eBay with a personal photo.
• Posted on eBay with a stock photo.

Just for fun, let’s illustrate a 2x3 design using the same kinds of tables we looked at before for the 2x2 design.

IV Levels IV2 Level 1 IV1 Level I IV1 Level 2 DV DV DV DV DV DV

Our very first example of tiem spent studying is a 2x3 design, so what would that look like in this type of table?

Example $$\PageIndex{2}$$

Create a "Punnett's Square" for the IV of Mindset (Growth or Fixed) and the IV of Job (Full-Time, Part-Time, or None) for time spend studying.

Solution

IV Levels IV2 (Job): Full-Time IV1 (Mindset):  Growth IV1 (Mindset):  Fixed DV = Minutes spent studying DV = Minutes spent studying DV = Minutes spent studying DV = Minutes spent studying DV = Minutes spent studying DV = Minutes spent studying

You could have just as easily made IV1 the Job and IV2 the Mindset, and the table would still be correct.

All we did was add another row for the second IV. It’s a 2x3 design, so it should have 6 conditions. As you can see there are now 6 cells to measure the DV.

You might have noticed in the list of notation for different factorial designs that you can have three IVs (that's the 2x3x2 design).  In fact, you can have as many IVs with as many levels as you'd like, but the Central Limit Theorem shows (through complicated math that we aren't going to go into) that each condtion (or cell) should have at least 30-50 participants, that can get expensive quickly!  If a 2x2 has 4 conditions, and you want at least 30 participants in each condition, then you'd need 120 participants.  If you have a 2x3, then you'd need at least 180 participants (2 * 3 * 30 = 180).  So, for a 2x3x2, how many participants would you want?

\begin{aligned} \text{Participants} &=2 * 3 * 2 = 12 \\ \text{Participants}&=12 * 30 = 360 \end{aligned} \nonumber

Students always want to know how we would represent more than two IVs in a Punnett's Square, and the answer is that we don't.  We create two Punnett Squares.

Let's say that we were looking at time spend studying for those with different mindsets and who have different jobs for different kinds of schools (community colleges or universities).  That could look like:

IV Levels IV2 (Job): Full-Time IV1 (Mindset):  Growth IV1 (Mindset):  Fixed DV = Minutes spent studying MATH DV = Minutes spent studying MATH DV = Minutes spent studying DV = Minutes spent studying DV = Minutes spent studying DV = Minutes spent studying

AND:

IV Levels IV2 (Job): Full-Time IV1 (Mindset):  Growth IV1 (Mindset):  Fixed DV = Minutes spent studying MATH DV = Minutes spent studying MATH DV = Minutes spent studying DV = Minutes spent studying DV = Minutes spent studying DV = Minutes spent studying

You could have just as easily made IV1 the Job and IV2 the Mindset, or even made a table for only students with Growth Mindset (and had IV1 be the type of school) and another table for only students with Fixed Mindset and the table would still be correct.  It doesn't matter statistically which IV is placed where, it's more about interpreting and understanding what is besting tested.


text:
cocoon-users mailing list archives

Site index · List index
Message view
Top
From Lakshmi Anantharaman <Lakshmi.Ananthara...@camsystems.com>
Subject RE: Get Cocoon Working
Date Tue, 02 Oct 2001 22:44:01 GMT
Created the WAR file with the change mentioned in
web.xml(Cocoon2\webapp\WEB-INF) and I have it at
Tomcat\webapps\ . Not able to start Tomcat ? Am I missing anything

Apache Tomcat/4.0
SessionListener: contextDestroyed()
java.lang.IllegalArgumentException: Document base ..\webapps\cocoon does not
exi
st or is not a readable directory
at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.
java:182)
at
org.apache.catalina.core.StandardContext.setResources(StandardContext
.java:1084)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3

-----Original Message-----
From: Gianugo Rabellino [mailto:gianugo@rabellino.it]
Sent: Tuesday, October 02, 2001 12:42 PM
To: cocoon-users@xml.apache.org
Subject: Re: Get Cocoon Working

> THanks Ciao,  I suppose you are talking about Cocoon 2.o . I have got
cocoon
> two with Tomcat 4.0
> Do I need to build the apache Cocoon files or can i use the executable

The executable (the jar/war) is more than enough. There is a
misconfiguration somewhere (AFAIK not in the default distro, I have to
assume that it's something you did) that maps something to
org.apache.cocoon.Cocoon instead then to the proper entry point which is
org.apache.cocoon.servlet.CocoonServlet. Most probably it's a connector
(mod_jk?) directive or an error in Cocoon's web.xml. It might also be an
old version of Cocoon floating around, if I recall correctly the class
name for the servlet is the one used today by the main Cocoon class.

Ciao,

--
Gianugo Rabellino

---------------------------------------------------------------------
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>


text:
## Elementary Algebra

$74$
We start with the given expression: $7x+4y$ We plug in the given values for $x$ and $y$: $7(6)+4(8)$ The order of operations states that first we perform operations inside grouping symbols, such as parentheses, brackets, and fraction bars. Then, we simplify powers. Then, we multiply and divide from left to right. Then, we add and subtract from left to right We follow the order of operations to simplify: First, we multiply from left to right: $42+4(8)=42+32$ Then, we add: $74$


text:
# PHP Variable

A variable is a temporary memory location that holds its data temporarily. PHP is said to be a loosely typed language, as it automatically corrects the data type of the variable, according on its value.

Syntax:

$variable_name=value; Rules for using PHP Variables: • PHP Variables starts with a$ sign followed by the variable name.
• PHP Variable name starts with a letter or underscore only; numbers and special characters are restricted for this.
• PHP Variables name can contain alphanumeric characters and underscores only.
• PHP Variable names are case sensitive.
• Putting a quote around the text value of the variables is necessary for the PHP Variables.
• PHP Variables are created and declared once the value is assigned to them.

## PHP Variables Scope:

PHP Variable Scope is used to specify the portion of the script where the variable can be used. These are:

• Local: Local Variables can only be accessed within the function where it is declared.
• Global: Global Variables can only be declared and accessed outside a function.
• Static: The variables inside a function gets deleted, once the function execution ends. The Static Variables contains the last information even after the completion of the function.

Example 1: Declaring PHP Variable with a Local scope

   Value of v is: $v "; } example(); echo " Value of v is:$v

"; ?>

Example 2: Declaring PHP Variable with a Global scope

   Value of v is: $v "; } example(); echo " Value of v is:$v

"; ?>

Example 3: Declaring Static PHP Variables

   "; example(); echo "
"; example(); ?>


text:
# Shorter tours and longer detours: uniform covers and a bit beyond

2 G-SCOP_OC - Optimisation Combinatoire
G-SCOP - Laboratoire des sciences pour la conception, l'optimisation et la production
Abstract : Motivated by the well known four-thirds conjecture for the traveling salesman problem (TSP), we study the problem of {\em uniform covers}. A graph $G=(V,E)$ has an $\alpha$-uniform cover for TSP (2EC, respectively) if the everywhere $\alpha$ vector (i.e. $\{\alpha\}^{E}$) dominates a convex combination of incidence vectors of tours (2-edge-connected spanning multigraphs, respectively). The polyhedral analysis of Christofides' algorithm directly implies that a 3-edge-connected, cubic graph has a 1-uniform cover for TSP. Seb\H{o} asked if such graphs have $(1-\epsilon)$-uniform covers for TSP for some $\epsilon > 0$. Indeed, the four-thirds conjecture implies that such graphs have 8/9-uniform covers. We show that these graphs have 18/19-uniform covers for TSP. We also study uniform covers for 2EC and show that the everywhere 15/17 vector can be efficiently written as a convex combination of 2-edge-connected spanning multigraphs. For a weighted, 3-edge-connected, cubic graph, our results show that if the everywhere 2/3 vector is an optimal solution for the subtour linear programming relaxation, then a tour with weight at most 27/19 times that of an optimal tour can be found efficiently. Node-weighted, 3-edge-connected, cubic graphs fall into this category. In this special case, we can apply our tools to obtain an even better approximation guarantee. To extend our approach to input graphs that are 2-edge-connected, we present a procedure to decompose an optimal solution for the subtour relaxation for TSP into spanning, connected multigraphs that cover each 2-edge cut an even number of times. Using this decomposition, we obtain a 17/12-approximation algorithm for minimum weight 2-edge-connected spanning subgraphs on subcubic, node-weighted graphs.
Document type :
Journal articles

Cited literature [32 references]

https://hal.archives-ouvertes.fr/hal-02379741
Contributor : Alantha Newman <>
Submitted on : Monday, November 25, 2019 - 6:28:44 PM
Last modification on : Friday, July 16, 2021 - 11:22:54 AM
Long-term archiving on: : Wednesday, February 26, 2020 - 9:45:29 PM

### File

1707.05387.pdf
Files produced by the author(s)

### Citation

Arash Haddadan, Alantha Newman, R. Ravi. Shorter tours and longer detours: uniform covers and a bit beyond. Mathematical Programming, Springer Verlag, 2021, 185, pp.245-273. ⟨10.1007/s10107-019-01426-8⟩. ⟨hal-02379741⟩

Record views


text:
smoothie-web Problems Contests Ranking About

BSSPC '20 J1

James Soup the Chad plays League of Legends constantly. Through practice he can make many kills in one game, often consecutively. For each time period he makes kills, it either corresponds to a single kill , double kill, triple kill, quadruple kill , or when the entirety of the other team is executed, penta kill.

Unfortunately, the in game counter that tells James how many kills he is getting is broken, can you make a counter for him?

Input

The first line of input is a integer $n$, indicating how many games James played continuously, $n$ is less than or equal to $1000$

the next $n$ lines of input are lines of space separated x, with each x indicating a kill.

Output

output n lines, with each line indicating the kills he made in one game. If there is more than five, assume there is as many penta kills as possible.

Sample Input

3
x X x
x x X x X
x x X x X x X x x

Sample Output

triple kill
penta kill
penta kill quadruple kill


text:
# LaTeX/MathJax support would be nice?

Several StackExchange sites have support for mathematical formulae using MathJax (LaTeX syntax).

Many Code-Golf challenges are mathematical in nature. Equations come up very often in discussions.

Therefore, I think it would be very useful to enable support for this on here as well?

Test to see if it is enabled yet: $\LaTeX$

• MathJax is a big, heavy pile of javascript, and Jeff has claimed that it will only be used on sites where it goes to a core task. Not that I'd mind, as I'm active on Physics.SE so it's already in my cache. Apr 12 '11 at 1:13
• @dmckee: As far as I can tell, it is about 50 KB of JavaScript. That’s the equivalent of about 33 images, and as you alluded to it only needs to be downloaded once and cached. Can you describe in greater detail what the problem with that is? Apr 12 '11 at 12:05
• I seem to recall Jeff saying it was much heavier than that, but I can't find the conversation that I had with Jeff on the matter. I did find meta.stackexchange.com/q/30559/2509. Apr 12 '11 at 16:47
• I've found that Firefox 3.6 on Vista ties up the entire system for several seconds while fetching something from cdn.mathjax. I really have no idea why, but it goes deep because even the mouse pointer doesn't respond. No problems with Chrome on Linux at home. :shrug: Apr 16 '11 at 11:47
• While there is not MathJax support on this site, we can use FAQ to help people: How can I incorporate good-looking mathematical exposition into my question/answer? Mar 20 '14 at 10:54
• @Timwi But $a=b$ works. This is Latex/Mathjax. It is simply $a=b$. Here is a fraction:$\phi=1+\frac{1}{1+\frac{1}{1+}}\dots$. It is $\phi=1+\frac{1}{1+\frac{1}{1+}}\dots$ Jul 21 '20 at 7:40

Although I don't think MathJax is necessary for codegolf.SE (in contrast to math.SE), I think it would be neat to have it. So I've checked some questions / answers to see how MathJax would be used on this site:

• Easy indexing / exponentiation by $A_i$ instead of Ai (example)
• Symbols for number sets (\mathbb{N} and \mathbb{R})
• Nicer Big-O notation (\mathcal{O}(n^2) instead of O(n^2))
• \cdot instead of * (example)
• Nicer variables (It's easier to recognize $n$ as a variable than n)

A way around that can be used by single people who want to have this in their answer is including images like this answer does.

codegolf.SE could also generate images for formulas instead of loading MathJax. But this might cause other problems. Here is how it can be done (link).

• In the present absence of MathJax, a FAQ article on "How can I incorporate good-looking mathematical exposition into my question/answer?" would be a nice thing to have. You seem to have a good command of a variety of options...perhaps you would be willing to write it? I can also throw in a few tidbits (ASCIITeX, export options in MathType and Mathematica) Mar 17 '14 at 19:18
• I could try to write this. Where should I write a first draft? How long can this explanation be? Mar 17 '14 at 19:28
• Details on adding to the FAQ are here: meta.codegolf.stackexchange.com/questions/1280/… Mar 17 '14 at 19:45
• @JonathanVanMatre Thanks. I've created a fist draft here. If I find some free time, I'll search for command line tools that make this process easier. Mar 20 '14 at 10:53
• There is meta.codegolf.stackexchange.com/questions/1611/… but neither answer is very usable. Maybe we should set a code-challenge to convert a math.se question with LaTeX into one that works for code.se :)
– user9206
Jun 2 '14 at 16:51

While Latex is nice for viewing math, if the math is not essential to the site, it is a big problem. On Mathematics.se, it can take a while before the raw Latex is converted to what I see, especially on a slow computer. Oftentimes on a slow computer, the computer freezes.

As an alternative, I recommend copying the html symbols from this: http://en.wikipedia.org/wiki/Table_of_mathematical_symbols

This is what I have done in my posts when I want mathematical symbols; I even compiled a list of symbols into my profile for easy access.

• In my experience this is rather a matter of the browser than a matter of the computer. Old IE versions have problems with that. Chrome on the other hand displays it fine. Firefox seems to be much slower in executing JavaScript than Chrome, but by far better than old IE versions. Mar 17 '14 at 19:31
• @moose I have a windows 7 computer that will freeze, using the most up to date chrome. Mar 17 '14 at 19:49
• @Quincunx Well, there you go. You just need to fix your having a windows 7 computer. Apr 25 '14 at 21:53


text:
# Farey symbols in SAGE 5.0

The sporadic second Janko group $J_2$ is generated by an element of order two and one of order three and hence is a quotient of the modular group $PSL_2(\mathbb{Z}) = C_2 \ast C_3$. This Janko group has a 100-dimensional permutation representation and hence there is an index 100 subgroup $G$ of the modular group such that the fundamental domain $\mathbb{H}/G$… Read more →