ProfileOptionBuilder
Option Builder for Profiling API.
For tutorial on the options, see https://github.com/tensorflow/tensorflow/tree/master/tensorflow/core/profiler/g3doc/options.html
# Users can use pre-built options: opts = ( tf.profiler.ProfileOptionBuilder.trainable_variables_parameter()) # Or, build your own options: opts = (tf.compat.v1.profiler.ProfileOptionBuilder() .with_max_depth(10) .with_min_micros(1000) .select(['accelerator_micros']) .with_stdout_output() .build() # Or customize the pre-built options: opts = (tf.compat.v1.profiler.ProfileOptionBuilder( tf.profiler.ProfileOptionBuilder.time_and_memory()) .with_displaying_options(show_name_regexes=['.*rnn.*']) .build()) # Finally, profiling with the options: _ = tf.compat.v1.profiler.profile(tf.compat.v1.get_default_graph(), run_meta=run_meta, .html='scope', options=opts)
__init__
__init__(options=None)
Constructor.
options
: Optional initial option dict to start with.account_displayed_op_only
account_displayed_op_only(is_true)
Whether only account the statistics of displayed profiler nodes.
is_true
: If true, only account statistics of nodes eventually
displayed by the outputs.
Otherwise, a node's statistics are accounted by its parents
as long as it's types match 'account_type_regexes', even if
it is hidden from the output, say, by hide_name_regexes.self
build
build()
Build a profiling option.
A dict of profiling options.
float_operation
@staticmethod float_operation()
Options used to profile float operations.
Please see https://github.com/tensorflow/tensorflow/tree/master/tensorflow/core/profiler/g3doc/profile_model_architecture.html on the caveats of calculating float operations.
A dict of profiling options.
order_by
order_by(attribute)
Order the displayed profiler nodes based on a attribute.
Supported attribute includes micros, bytes, occurrence, params, etc. https://github.com/tensorflow/tensorflow/tree/master/tensorflow/core/profiler/g3doc/options.html
attribute
: An attribute the profiler node has.self
select
select(attributes)
Select the attributes to display.
See https://github.com/tensorflow/tensorflow/tree/master/tensorflow/core/profiler/g3doc/options.html for supported attributes.
attributes
: A list of attribute the profiler node has.self
time_and_memory
@staticmethod time_and_memory( min_micros=1, min_bytes=1, min_accelerator_micros=0, min_cpu_micros=0, min_peak_bytes=0, min_residual_bytes=0, min_output_bytes=0 )
Show operation time and memory consumptions.
min_micros
: Only show profiler nodes with execution time
no less than this. It sums accelerator and cpu times.min_bytes
: Only show profiler nodes requested to allocate no less bytes
than this.min_accelerator_micros
: Only show profiler nodes spend no less than
this time on accelerator (e.g. GPU).min_cpu_micros
: Only show profiler nodes spend no less than
this time on cpu.min_peak_bytes
: Only show profiler nodes using no less than this bytes
at peak (high watermark). For profiler nodes consist of multiple
graph nodes, it sums the graph nodes' peak_bytes.min_residual_bytes
: Only show profiler nodes have no less than
this bytes not being de-allocated after Compute() ends. For
profiler nodes consist of multiple graph nodes, it sums the
graph nodes' residual_bytes.min_output_bytes
: Only show profiler nodes have no less than this bytes
output. The output are not necessarily allocated by this profiler
nodes.A dict of profiling options.
trainable_variables_parameter
@staticmethod trainable_variables_parameter()
Options used to profile trainable variable parameters.
Normally used together with 'scope' view.
A dict of profiling options.
with_accounted_types
with_accounted_types(account_type_regexes)
Selectively counting statistics based on node types.
Here, 'types' means the profiler nodes' properties. Profiler by default consider device name (e.g. /job:xx/.../device:GPU:0) and operation type (e.g. MatMul) as profiler nodes' properties. User can also associate customized 'types' to profiler nodes through OpLogProto proto.
For example, user can select profiler nodes placed on gpu:0 with:
account_type_regexes=['.*gpu:0.*']
If none of a node's properties match the specified regexes, the node is not displayed nor accounted.
account_type_regexes
: A list of regexes specifying the types.self.
with_empty_output
with_empty_output()
Do not generate side-effect outputs.
with_file_output
with_file_output(outfile)
Print the result to a file.
with_max_depth
with_max_depth(max_depth)
Set the maximum depth of display.
The depth depends on profiling view. For 'scope' view, it's the depth of name scope hierarchy (tree), for 'op' view, it's the number of operation types (list), etc.
max_depth
: Maximum depth of the data structure to display.self
with_min_execution_time
with_min_execution_time( min_micros=0, min_accelerator_micros=0, min_cpu_micros=0 )
Only show profiler nodes consuming no less than 'min_micros'.
min_micros
: Only show profiler nodes with execution time
no less than this.
Please see https://github.com/tensorflow/tensorflow/tree/master/tensorflow/core/profiler/g3doc/profile_model_architecture.html on the caveats of calculating float operations.
min_float_ops
: Only show profiler nodes with float operations
no less than this.self
with_min_memory
with_min_memory( min_bytes=0, min_peak_bytes=0, min_residual_bytes=0, min_output_bytes=0 )
Only show profiler nodes consuming no less than 'min_bytes'.
min_bytes
: Only show profiler nodes requested to allocate no less bytes
than this.min_peak_bytes
: Only show profiler nodes using no less than this bytes
at peak (high watermark). For profiler nodes consist of multiple
graph nodes, it sums the graph nodes' peak_bytes.min_residual_bytes
: Only show profiler nodes have no less than
this bytes not being de-allocated after Compute() ends. For
profiler nodes consist of multiple graph nodes, it sums the
graph nodes' residual_bytes.min_output_bytes
: Only show profiler nodes have no less than this bytes
output. The output are not necessarily allocated by this profiler
nodes.self
with_min_occurrence
with_min_occurrence(min_occurrence)
Only show profiler nodes including no less than 'min_occurrence' graph nodes.
A "node" means a profiler output node, which can be a python line (code view), an operation type (op view), or a graph node (graph/scope view). A python line includes all graph nodes created by that line, while an operation type includes all graph nodes of that type.
min_occurrence
: Only show nodes including no less than this.self
with_min_parameters
with_min_parameters(min_params)
Only show profiler nodes holding no less than 'min_params' parameters.
'Parameters' normally refers the weights of in TensorFlow variables. It reflects the 'capacity' of models.
min_params
: Only show profiler nodes holding number parameters
no less than this.self
with_node_names
with_node_names( start_name_regexes=None, show_name_regexes=None, hide_name_regexes=None, trim_name_regexes=None )
Regular expressions used to select profiler nodes to display.
After 'with_accounted_types' is evaluated, 'with_node_names' are evaluated as follows:
For a profile data structure, profiler first finds the profiler nodes matching 'start_name_regexes', and starts displaying profiler nodes from there. Then, if a node matches 'show_name_regexes' and doesn't match 'hide_name_regexes', it's displayed. If a node matches 'trim_name_regexes', profiler stops further searching that branch.
start_name_regexes
: list of node name regexes to start displaying.show_name_regexes
: list of node names regexes to display.hide_name_regexes
: list of node_names regexes that should be hidden.trim_name_regexes
: list of node name regexes from where to stop.self
with_pprof_output
with_pprof_output(pprof_file)
Generate a pprof profile gzip file.
pprof -png --nodecount=100 --sample_index=1
pprof_file
: filename for output, usually suffixed with .pb.gz.self.
with_stdout_output
with_stdout_output()
Print the result to stdout.
with_step
with_step(step)
Which profile step to use for profiling.
The 'step' here refers to the step defined by Profiler.add_step()
API.
step
: When multiple steps of profiles are available, select which step's
profile to use. If -1, use average of all available steps.self
with_timeline_output
with_timeline_output(timeline_file)
Generate a timeline json file.


This is the webbased tool to label images with bounding boxes. Bounding boxes will be computed automatically for the next few frames.
Box Detail
Box ID:
Box Label:
t:
l:
w:
h:
Select a file to load bounding boxes. (xml, json)
If you want to label a video you have to convert it into an image sequence first!
After you finished your work, you can save all bounding boxes into a .json file.
Change the number of frames which will be processed by the optical flow.


Constructor new ViewSpy(): ViewSpy Creates a new instance of ViewSpy. Methods attached bind created detached unbind


One of the keys to understanding setjmp() and longjmp() is to understand machine layout, as described in the assembler and malloc lectures of the past few weeks. The state of a program depends completely on the contents of its memory (i.e. the code, globals, heap, and stack), and the contents of its registers. The contents of the registers includes the stack pointer (sp), frame pointer (fp), and program counter (pc). What setjmp() does is save the contents of the registers so that longjmp() can restore them later. In this way, longjmp() ``returns'' to the state of the program when setjmp() was called.
Specifically:
#include <setjmp.h> int setjmp(jmp_buf env);This says to save the current state of the registers into env. If you look in /usr/include/setjmp.h, you'll see that jmp_buf is defined as:
#define _JBLEN 9 typedef struct { int _jb[_JBLEN + 1]; } jmp_buf[1];This is an irritating way of saying that jmp_buf is an array of _JBLEN+1 integers.
So, when you call setjmp(), you pass it the address of an array of integers, and it stores the value of the registers in that array. Setjmp() returns 0 when you call it in this way.
longjmp(jmp_buf env, int val);Longjmp() resets the registers to the values saved in env. This includes the sp, fp and pc. What this means is that longjmp() doesn't return. Instead, when you call it, you return as if you have just called the setjmp() call that saved env. This is because the pc is restored along with the other registers. Setjmp() returns the val argument of longjmp(), which is not allowed to be zero (read the man page). Thus, you know when setjmp() returns a non-zero value that longjmp() was called, and is returning to setjmp().
As an example, look at the following code (in sj1.c):
#include <stdio.h> #include <stdlib.h> #include <setjmp.h> main() { jmp_buf env; int i; i = setjmp(env); printf("i = %d\n", i); if (i != 0) exit(0); longjmp(env, 2); printf("Does this line get printed?\n"); } |
When we run this, we get:
UNIX> sj1 i = 0 i = 2 UNIX>So, first, we call setjmp(), and it returns 0. Then we call longjmp() with a value of 2, which causes the code to return from setjmp() with a value of 2. That value is printed out, and the code exits.
Setjmp() and longjmp() are usually used so that if an error is detected within a long string of procedure calls, the error may be dealt with efficiently by longjmp-ing out of the procedure that catches the error. This avoids having to return from each procedure can test return values. It is basically the C way of doing for example, "try/catch" clauses in C++.
For an example, look at sj2.c. It looks to be complicated, but really isn't. What happens is that there is a complicated series of procedure calls -- proc_1 through proc_4. If proc_4's argument is zero, then it flags the error by calling longjmp(). Otherwise, things proceed normally. As you can see, if you call sj2 with all positive arguments, then everything is ok. However, if you call it with all zeros, it will make the longjmp() call, and flag an error:
UNIX> sj2 1 2 3 4 proc_1(1, 2, 3, 4) = 4 UNIX> sj2 0 0 0 0 Error -- bad value of i (0), j (0), k (0), l (0) UNIX>
int a(char *s, jmp_buf env) { int i; i = setjmp(env); printf("Setjmp returned -- i = %d, 0x%x\n", i, s); printf("s = %s\n", s); return i; } int b(int i, jmp_buf env) { printf("In B: i=%d. Calling longjmp(env, i)\n", i); longjmp(env, i); } main(int argc, char **argv) { jmp_buf env; if (a("Jim", env) != 0) exit(0); b(3, env); } |
When we execute it, we get the following:
UNIX> sj3 Setjmp() returned -- i = 0 s = Jim In B: i=3. Calling longjmp(env, i) Setjmp() returned -- i = 3 Segmentation fault (core dumped) UNIX>So, exactly what is happening? When the main() routine is first called, the stack looks as follows:
Stack |----------------| | | | | | | | | | | | | <-------- sp | env[0] | | env[1] | | env[2] | pc = main | env[3] | | .... | | env[8] | | other stuff | <------- fp |--------------- |Now, main() calls a(). First it pushes the arguments on the stack in reverse order, and then jsr is called, which pushes the return pc on the stack, and the old fp. The fp and sp are changed to make an empty stack frame for a():
Stack |----------------| | | | | <--------- sp, fp /------------- | old fp in main | | | old pc in main | | "Jim" <--- | s = "Jim" | | /--- | pointer to env | | \--> | env[0] | | | env[1] | | | env[2] | pc = a | | env[3] | | | .... | | | env[8] | \------------> | other stuff | |--------------- |
The first thing that a() does is allocate room its local variable i:
Stack |----------------| | | <--------- sp | i | <--------- fp /------------- | old fp in main | | | old pc in main | | "Jim" <--- | s = "Jim" | | /--- | pointer to env | | \--> | env[0] | | | env[1] | | | env[2] | pc = a | | env[3] | | | .... | | | env[8] | \------------> | other stuff | |--------------- |Then it calls setjmp(). This saves the current state of the registers. In other words, it saves the current values of sp, fp, and pc. Now, a() prints "i = 0", and "s = Jim", and then returns to main(). Now the stack looks as before, except that env is initialized to the state of the machine when a() was called:
Stack |----------------| | | | | | | | | | | | | <----------- sp | env[0] | | env[1] | | env[2] | pc = main | env[3] | | .... | | env[8] | | other stuff | <------------ fp |--------------- |Now, main() calls b(), and the stack looks as follows:
Stack |----------------| | | | | <--------- sp, fp /------------- | old fp in main | | | old pc in main | | | i = 3 | | /--- | pointer to env | | \--> | env[0] | | | env[1] | | | env[2] | pc = b | | env[3] | | | .... | | | env[8] | \------------> | other stuff | |--------------- |Then longjmp() is called. The registers are restored to their values when a() called setjmp(), and the pc returns from setjmp() in a(). However, the values in the stack are the same as they were for b():
Stack |----------------| | | <--------- sp | i = 2 | <--------- fp /------------- | old fp in main | | | old pc in main | | | s?? = 3 | | /--- | pointer to env | | \--> | env[0] | | | env[1] | | | env[2] | pc = a | | env[3] | | | .... | | | env[8] | \------------> | other stuff | |--------------- |You should see the problem. The stack is in a bad state. In particular, a() expects there to be a (char *) where s is, and instead, there is the integer value 3. Thus, when it tries to print out s, it tries to find a string at memory location 3, and dumps core.
This is a very common bug with setjmp() and longjmp() -- to use them properly, you CANNOT RETURN FROM THE PROCEDURE THAT CALLS setjmp(). This is sometimes called "longjmp-ing up the stack." As you can see, this bug is subtle -- the stack frame for b() looks a lot like the stack frame for a(), and thus this bug might slip by unnoticed for a while.
Look at sh4.c
int i, j; long T0; jmp_buf Env; void alarm_handler(int dummy) { long t1; t1 = time(0) - T0; printf("%d second%s %s passed: j = %d. i = %d\n", t1, (t1 == 1) ? "" : "s", (t1 == 1) ? "has" : "have", j, i); if (t1 == 8) { printf("Giving up\n"); longjmp(Env, 1); } alarm(1); signal(SIGALRM, alarm_handler); } main() { signal(SIGALRM, alarm_handler); alarm(1); if (setjmp(Env) != 0) { printf("Gave up: j = %d, i = %d\n", j, i); exit(1); } T0 = time(0); for (j = 0; j < 10000; j++) { for (i = 0; i < 1000000; i++); } } |
This program longjmps out of alarm_handler after 8 seconds have passed, and then prints "Gave up". Be sure you can trace through this program:
UNIX> sh4 1 second has passed: j = 482. i = 549695 2 seconds have passed: j = 964. i = 948276 3 seconds have passed: j = 1447. i = 322623 4 seconds have passed: j = 1927. i = 801765 5 seconds have passed: j = 2410. i = 22333 6 seconds have passed: j = 2889. i = 39442 7 seconds have passed: j = 3372. i = 219445 8 seconds have passed: j = 3852. i = 857985 Giving up Gave up: j = 3852, i = 857985 UNIX>
One issue about calling longjmp() from a signal handler is that the operating system may not realize that you have left the signal handler. Specifically, when you are in an alarm handler, you cannot catch SIGALRM, ecause the operating system has disabled the signal. For example, two_alarm.c modifies sh4.c to put a while(1) loop in the alarm handler:
#include <stdio.h> #include <stdlib.h> #include <signal.h> #include <setjmp.h> int i, j; long T0; jmp_buf Env; void alarm_handler(int dummy) { long t1; alarm(1); signal(SIGALRM, alarm_handler); t1 = time(0) - T0; printf("%d second%s %s passed: j = %d. i = %d\n", t1, (t1 == 1) ? "" : "s", (t1 == 1) ? "has" : "have", j, i); while(1); } main() { signal(SIGALRM, alarm_handler); alarm(1); if (setjmp(Env) != 0) { printf("Gave up: j = %d, i = %d\n", j, i); exit(1); } T0 = time(0); for (j = 0; j < 10000; j++) { for (i = 0; i < 1000000; i++); } } |
When we run this, we only get one line of text because the operating system will not generate SIGALRM while it is in the alarm handler.
This has an interesting effect on longjmp. If we longjmp out of the alarm handler, as we did in sh4.c, does the operating system know to re-enable SIGALRM? Take a look at two_alarm_setjmp_1.c:
int i, j; long T0; jmp_buf Env; void alarm_handler(int dummy) { long t1; alarm(1); signal(SIGALRM, alarm_handler); t1 = time(0) - T0; printf("%d second%s %s passed: j = %d. i = %d\n", t1, (t1 == 1) ? "" : "s", (t1 == 1) ? "has" : "have", j, i); longjmp(Env, t1); } main() { signal(SIGALRM, alarm_handler); alarm(1); T0 = time(0); j = 0; i = 0; if (setjmp(Env) == 8) { printf("Gave up\n"); exit(0); }; for (; j < 10000; j++) { for (; i < 1000000; i++) { } i = 0; } printf("Done: Time = %d\n", time(0)-T0); } |
This is similar to two_alarm.c, except we longjmp out of the alarm handler, and then continue running the code. Its output depends on the implementation of the operating system. Here it is on mamba (a Linux box) in 2010:
UNIX> two_alarm_setjmp_1 1 second has passed: j = 476. i = 27986 Done: Time = 21 UNIX>As you can see, the operating system does not re-enable SIGALRM when we longjmp() out of the handler. Here it is on my Macintosh (again in 2010):
UNIX> two_alarm_setjmp_1 1 second has passed: j = 357. i = 652488 2 seconds have passed: j = 719. i = 160936 3 seconds have passed: j = 1079. i = 682336 4 seconds have passed: j = 1438. i = 479525 5 seconds have passed: j = 1797. i = 62895 6 seconds have passed: j = 2153. i = 660999 7 seconds have passed: j = 2508. i = 813449 8 seconds have passed: j = 2874. i = 267243 Gave up UNIX>Well, that's confusing. In its laconic way, the setjmp() man page helps to clear up the confusion:
NOTES POSIX does not specify whether setjmp() will save the signal context. (In System V it will not. In 4.3BSD it will, and there is a function _setjmp that will not.) If you want to save signal masks, use sigsetjmp().What this means is that the operating system maintains "signal context" for your process. These are the signals that are enabled or disabled. On some operating systems (like my Macintosh), this is saved in the setjmp() call, and on some (like mamba) it is not. For consistency, there are procedures sigsetjmp() and siglongjmp():
int sigsetjmp(sigjmp_buf env, int savesigs); void siglongjmp(sigjmp_buf env, int val); If you call sigsetjmp() with savesig equal to one, it will save the signal context and restore it on a longjmp call. That allows you to longjmp out of the alarm handler. two_alarm_setjmp_2.c does this and works properly on both machines:
On mamba: |
On my Macintosh: |
Here, mamba is faster than my Macintosh.
The code is written in a "re-entrant" way -- when it is interrupted by SIGALRM, the alarm handler siglongjmp's back into main, which prints out the current state of the generation, and then calls enumerate_primes1() again with current values.
#include <stdio.h> #include <stdlib.h> #include <signal.h> #include <setjmp.h> sigjmp_buf Env; void alarm_handler(int dummy) { alarm(1); signal(SIGALRM, alarm_handler); siglongjmp(Env, 1); } void enumerate_primes1(int *current_test, int *largest_prime) { int i; while(1) { for(i = 2; i*i <= *current_test && *current_test % i != 0; i++) ; if (*current_test % i != 0) *largest_prime = *current_test; *current_test = *current_test + 1; } } main() { int test, largest_prime; int time; test = 2; largest_prime = 2; time = 0; signal(SIGALRM, alarm_handler); alarm(1); time += sigsetjmp(Env, 1); printf("%4d Largest Prime: %10d\n", time, largest_prime); enumerate_primes1(&test, &largest_prime); } |
Once again, make sure you can trace through the code. Here it is running.
UNIX> prime_1 0 Largest Prime: 2 1 Largest Prime: 1052287 2 Largest Prime: 1729841 3 Largest Prime: 2310593 4 Largest Prime: 2836727 5 Largest Prime: 3326567 6 Largest Prime: 3787877 ...A second program generates primes a little more efficiently. It maintains a Dllist of all primes less than p, and then traverses that Dllist to see if p is divisible by any prime numbers that are less than or equal to sqrt(p). The code is in prime_2.c
sigjmp_buf Env; void alarm_handler(int dummy) { alarm(1); signal(SIGALRM, alarm_handler); siglongjmp(Env, 1); } int is_prime(int p, Dllist l) { Dllist tmp; int i; dll_traverse(tmp, l) { i = tmp->val.i; if (i*i > p) return 1; if (p % i == 0) return 0; } return 1; } void enumerate_primes2(int *current_test, int *largest_prime, Dllist l) { while(1) { if (is_prime(*current_test, l)) { dll_append(l, new_jval_i(*current_test)); *largest_prime = *current_test; } *current_test = *current_test + 1; } } main() { int test, largest_prime; int time; Dllist l; test = 2; largest_prime = 2; l = new_dllist(); time = 0; signal(SIGALRM, alarm_handler); alarm(1); time += sigsetjmp(Env, 1); printf("%4d Largest Prime: %10d\n", time, largest_prime); enumerate_primes2(&test, &largest_prime, l); } |
It generates more primes than the first program:
UNIX> prime_2 0 Largest Prime: 2 1 Largest Prime: 3262639 2 Largest Prime: 5595433 3 Largest Prime: 7650317 4 Largest Prime: 9531449 5 Largest Prime: 11299507 6 Largest Prime: 12981097 ....Finally, the program prime_12.c alternates between the two prime number generators, giving each one second of time and printing out how many primes each generates at two second intervals. Here's the main():
main() { int test1, largest_prime1; int test2, largest_prime2; int time; Dllist l; test1 = 2; largest_prime1 = 2; test2 = 2; largest_prime2 = 2; l = new_dllist(); time = 0; signal(SIGALRM, alarm_handler); alarm(1); time += sigsetjmp(Env, 1); if (time%2 == 0) { printf("%4d EP1: %10d EP2: %10d\n", time/2, largest_prime1, largest_prime2); enumerate_primes1(&test1, &largest_prime1); } else { enumerate_primes2(&test2, &largest_prime2, l); } } |
When we run it, we see the the second one whups up on the first one:
UNIX> prime_12 0 EP1: 2 EP2: 2 1 EP1: 1052561 EP2: 3265061 2 EP1: 1729757 EP2: 5602151 3 EP1: 2311819 EP2: 7663367 4 EP1: 2839519 EP2: 9369739 5 EP1: 3329453 EP2: 11159677 ...
UNIX> gcc -O -o sh4_opt sh4.c UNIX> sh4_opt UNIX>The compiler analyzed the main loop and decided that since it did nothing, it could be eliminated:
for (j = 0; j < 10000; j++) { for (i = 0; i < 1000000; i++); } |
While that's not a particularly bad thing, you need to be aware that when the compiler optimizes, it doesn't really care about your setjmp()/longjmp() call.s
Let's take a pathelogical example (one that drove me crazy during my 2010 lecture, as I had optimization on by default and was not using the makefile):
UNIX> make prime_12_opt gcc -I/home/plank/cs360/include -O -o prime_12_opt prime_12.c /home/plank/cs360/objs/libfdr.a UNIX> prime_12_opt 0 EP1: 2 EP2: 2It hangs? Let's explore: If we print out the value of time after the setjmp, we see something strange:
UNIX> prime_12_opt Time = 0 0 EP1: 2 EP2: 2 Time = 1 Time = 1 Time = 1 Time = 1 ...What???? There is an explanation. When it optimizes, the compiler is happy to store certain frequently-used variables in registers rather than on the stack. That's where it is storing time, which means that time is saved during setjmp(), when its value is zero, and restored to zero at every longjmp() call. Is there anything you can do about this? Well, perhaps you should heed the advice of the setjmp() man page:
setjmp() and sigsetjmp() make programs hard to understand and maintain. If possible an alternative should be used.
So why do I teach you setjmp()/longjmp()? First, just because you shouldn't use something doesn't mean that others won't. You should be prepared to understand setjmp()/longjmp() code. Second, it's a great way to understand the interaction of registers and program state. Third, it makes great dinner-time conversation. You can thank me later....


| Trees | Indices | Help |
|---|
|
|
object --+ | JSONToRelation
Given a source with JSON structures, derive a schema, and construct a relational table. Source can be a local file name, a URL, a StringIO pseudofile, or a Unix pipe.
JSON structures in the source must be one per line. That is, each line in the source must be a self contained JSON object. Pretty printed strings won't work.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| ColumnSpec |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| {String | None} |
|
||
| IOString |
|
||
| (ColumnSpec) |
|
||
| [String] |
|
||
| int |
|
||
|
|||
|
|||
| String |
|
||
|
|||
|
|||
|
Inherited from |
|
|||
|
Inherited from |
|
Create a JSON-to-Relation converter. The JSON source can be a file with JSON objects, a StringIO.StringIO string pseudo file, stdin, or a MongoDB The destination can be a file, where CSV is written in Excel-readable form, stdout, or a MySQL table specification, where the ouput rows will be inserted. SchemaHints optionally specify the SQL types of particular columns. By default the processJSONObs() method will be conservative, and specify numeric columns as DOUBLE. Even though all encountered values for one column could be examined, and a more appropriate type chosen, such as INT when only 4-byte integers are ever seen, future additions to the table might exceed the INT capacity for that column. Example If schemaHints is provided, it is a Dict mapping column names to ColDataType. The column names in schemaHints must match the corresponding (fully nested) key names in the JSON objects: schemaHints dict: {'msg.length' : ColDataType.INT, 'chunkSize' : ColDataType.INT} For unit testing isolated methods in this class, set jsonSource and destination to None. This constructor can be thought of as creating the main relational table that will hold all results from the JSON parsers in relational form. However, parsers may call startNewTable() to build any new tables they wish.
|
MUST be called when no more items are to be converted. Needed because for SQL statements, value insertions are held back to accumulate multiple insert value for use in a single insert statement. This speeds up load times into the databases later. If flush() is not called, output may be missing. |
Set the parser instance to use for upcoming calls to the convert() method.
|
Called by parsers when they need to start a new relational table beyond the one that is created for them. Ex: edxTrackLogJSONParser.py needs auxiliary tables for deeply embedded JSON structures with unpredictable numbers of elements (e.g. problem state). The schemaHintsNewTable is an optionally ordered dict. Parsers may add additional columns later via calls to ensureColExistence(). Note that for MySQL load files such subsequent addition generates ALTER table, which might be expensive. So, completeness of the schemaHintsNewTable dict is recommended for MySQL load file outputs.
|
Request a human-readable name of the JSON source, which might be a pipe, or a file, or something else. Each input source class knows to provide such a name. |
Given a schema hint dictionary, set the given table's schema to the given dictionary. Any schema fragments already defined for table tableName will be removed
|
Given a column name, and a table name, return the ColumnSpec for that column in that table. If tableName is None, the table is assumed to be the main (default) table.
|
Main user-facing API method. Read from the JSON source establish in the __init__() call. Create a MySQL schema as the JSON is read. Convert each JSON object into the requested output format (e.g. CSV), and deliver it to the destination (e.g. a file)
|
Pushes the given string straight to the output (pipe or file). No error checking is done. Used by underlying parsers for SQL other than INSERT statements, such as DROP, CREATE.
|
Called both from convert(), and from some parsers to add one row to one table. For CSV outputs the target table is implied: there is only one. But for parsers that generate INSERT statements, the targets might be different tables on each call.
|
When a row is finished, this method processes the row as per the user's disposition. The method writes the row to a CSV file, or pipe, or generates an SQL insert statement for later. The filledNewRow parameter looks different, depending on whether the underlying parser generates MySQL insert statement information, or CSV rows. The latter are just written to outFD. MySQL insert info looks like this: ('tableName', 'insertSig', [valsArray]). The insertSig is a string as needed for the INSERT statement's column names part. Ex.: 'col1,col2'.
|
Receives either a triple ('tableName', 'insertSig', [valsArray]), or the string 'FLUSH'. Generates either None, or a legal MySQL insert statement. The method is lazy. It collects values to be inserted into the same table, and the same columns within that table, and returns a non-Null string only when the incoming insertInfo is for a different table, or a different set of columns in the same table (as the previous calls). In that case the returned string is a legal MySQL INSERT statement, possibly multi-valued. If insertInfo is the string 'FLUSH', then an INSERT statement is returned for any held-back prior values.
|
Create a possibly multivalued INSERT statement from what is stored in self.currOutTable, self.currInsertSig, and self.currValsArray. Example return: INSERT INTO myTable (col2, col2) VALUES ('foo',10), ('bar',20);
|
Takes an array of arrays that hold the values to use in an INSERT statement. Ex: [['foo',10],['bar',20]]. Returns a StringIO string file containing a legal INSERT statement's VALUES part: ('foo',10),('bar',20)
|
Returns an ordered list of ColumnSpec instances. Each such instance holds column name and SQL type.
|
Returns a list of column header names collected so far.
|
Returns the position of the next new column that may need to be added when a previously unseen JSON label is encountered.
|
Computes number of ASCII bytes needed for the values in the given array. Used to estimate when held-back INSERT data needs to be flushed to server. Ex: ['foo', 10] returns 7.
|
Given a proposed MySQL identifier, such as a column name, return a possibly modified name that will be acceptable to a MySQL database. MySQL accepts alphanumeric, underscore, and dollar sign. Identifiers with other chars must be quoted. Quote characters embedded within the identifiers must be doubled to be escaped.
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Wed Oct 16 17:51:59 2013 | http://epydoc.sourceforge.net |


| Number of Classes | Line Coverage | Mutation Coverage |
|---|---|---|
| 4 | 89% | 97% |
| Name | Line Coverage | Mutation Coverage |
|---|---|---|
| ArrayStack.java | 100% |
100% |
| ArrayUtils.java | 89% |
94% |
| PlatformFeatureDetector.java | 100% |
100% |
| UriEncoder.java | 70% |
100% |


Shorten URL by context menu:
Current page
Hyperlink
Image source
Copy shortened URL:
Auto
-
Show notification when copying is completed.
Manual
-
Close pop-up panel after copying is completed.
Copy
Full URL
Without 'https://'


This bug has been PARTIALLY fixed in iOS 8.x! for iOS 8.x you only need a timeout value of 0. For older OSes, you will need larger timeout values.
This page demonstrates how effed up focus management is in iOS 7.x with Voiceover. The focus is supposed to end up on the "No Thanks" button. Instead, depending on the value of the timeout for the second setTimeout call, it will end up somewhere between the top of the document and the button intended. To get it to reliably not set focus anywhere near the intended button, simply call "focusButton(3)" immediately after "focusDialog(3)" or even instead of it. To get it to reliably set focus to the intended button, first focus something else i.e. call "focusDialog(3)" and then wait 1 second and then call "focusButton(3)".
The fact that it is not possible to tell when VoiceOver is running means that you have to mess up the user experience of all your other users too in order to get this sort of behavior to function correctly on iOS devices for VoiceOver users.


I was surrounded by fixers such as Amir and Asif, says Akhtar
by PTIHighlights
- "I was playing against 21 people -- 11 theirs and 10 ours," said Shoaib Akhtar, once again fuelling match-fixing allegations against his former Pakistan teammates
- Pakistan cricket had plunged into one of its many crisis in recent years when Amir, Asif and Butt were banned for spot-fixing in 2011
NEW DELHI: "I was playing against 21 people -- 11 theirs and 10 ours," said former speedster Shoaib Akhtar, once again fuelling match-fixing allegations against his former Pakistan teammates.
Pakistan cricket had plunged into one of its many crises in recent years when fast bowler Mohammad Amir, Mohammad Asif and Salman Butt were banned for spot-fixing in 2011.
"I was always of the belief that I can never cheat Pakistan, no match-fixing but I was surrounded by match-fixers. I was playing against 21 people (sic) -- 11 theirs and 10 ours. Who knows who was the match-fixer," Akhtar said during a talk show 'Rewind With Samina Peerzada'.
"There was so much match-fixing. Asif told me which all matches they had fixed and how they did it."
Akhtar said he was livid when he came to know that Amir and Asif had indulged in corruption during a Test against England.
"I tried to make Amir and Asif understand. What a waste of talent. When I heard about this, I was so upset that I punched the wall," said the 44-year-old retired pacer.
"Pakistan's two top bowlers, smart, intelligent and the two perfect fast bowlers were wasted. They sold themselves for a little money."
Of the suspended trio, only Amir managed to make a successful comeback to international cricket.
The pacer was instrumental in Pakistan winning the 2017 Champions Trophy, beating India in the final. He was also a part of the Pakistan team during the 50-over World Cup in England.


About Me
Hi, I'm George. I'm 16 and have been designing for about 5 years. I've always been motivated by the idea of applying my creativity and passion to help others and their business. I have area's of expertise in multiple fields in Design and Development. I have worked with a range of well-known companies with tasks as bing as full website design and development single handedly.
I strive for excellence and I do not handoff my work to my clients until we are both happy with it. I like to break the boundaries with anything I work on even if it is insignificant. So browse around my website and get in touch to make your dream into a reality!


Hello World
发表于Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in trobuleshooting or you can ask me on GitHub.


@(user: User)(implicit messages: Messages) @main("Successfully approved") { @Template.navbar(None)
You have approve @user.username to become an admin


ALICE A film review by Andrew Hicks Copyright 1996 Andrew Hicks / Fatboy Productions
**1/2
Woody Allen goes into a weird wonderland in this fantasy romance starring Mia Farrow, in her eleventh consecutive Allen film. Here, she plays a disenchanted housewife who has lived off her husband's money without ever having lived a life of her own. Thoughts of independence begin to pop into her head under hypnosis at the office of Dr. Wang, a radical Chinese (although you'd never know it from the name) healer who prescribes herbs and diagnoses through the pulse.
Wang gives her several batches of herbs that further along her contemplations of an affair with Joe Mantegna. The first make her lose all inhibitions and become overly flirtatious with Mantegna, going so far as to set up a rendezvous at the zoo (that rhymes) that she doesn't show up for when the drugs wear off and she becomes her mousy self again. The second make her invisible (Shortly after ALICE came out, invisibility drugs became available over the counter.), so she can listen in on Mantegna's comments about her. And the third bring on the apparition of a dead ex-boyfriend (Alec Baldwin), who advises her to pursue the affair.
The herbs aren't without their negative effects. Mia finds herself lying to her husband (William Hurt, who is more than a little hurt by the news of the affair) and discovers her friends' (including backstabbing TV executive Cybil Shepherd) true feelings about her. As with every Woody Allen movie, the ending brings on a lot of learning for its main character through painful events (very much like the far-superior THE PURPLE ROSE OF CAIRO). Along the way, ALICE suffers from an overdose of charm, melodrama and forced substance. It's more than a little ironic that a man who is normally so laughable for the right reasons once in awhile makes movies that are laughable for the wrong reasons.
--
Visit the Movie Critic at LARGE homepage at http://www.missouri.edu/~c667778/movies.html Serving America For Over 1/50th of a Century!
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Web development technologies have evolved at an incredible clip over the past few years.
Introducing RealWorld.
It's a great solution for learning how other frameworks work.
Web development technologies have evolved at an incredible clip over the past few years.
It's a great solution for learning how other frameworks work.


This table shows the names that are generated that might collide with names in instrumented source code. Do not use these names. If there are problems with the names choosen here, please emailme and I'll see what I can do to keep them from colliding. I've created these names to follow standard naming conventions for java source code so that if the code is run through a tool, like jtest, that checks these things the instrumented code doesn't generate unneeded errors. All generated variables and methods will be prepended with jps_. Some are listed in the following table. I've also been writing down skeletons of my instrumented code in MethodSkeletons. This should help explain what's going on.
| name | description |
|---|---|
| jps__<packageName>_<className>_check<methodName>PreConditions | Name of method used to check preconditions on a method |
| jps__<packageName>_<className>_check<methodName>PostConditions | Name of method used to check postconditions on a method |
| jps__<packageName>_<className>_checkInvariant | Name of method used to check invariants on a class |
| jps__retval<className> | Variable used to store the return value of a method so that it may be used when checking postconditions and still be returned from the method |
| JPS_<packageName>_<className>_AssertDummy<count> | Name of class generated to check preconditions on constructors. count is incremented for each constructor in a class |
| jps_dummy<count> | Name of extra parameters created to uniquify generated constructors. count is incremented for each parameter added to a particular constructor |
| JPS__<packageName>_<className>_AssertClass | Name of class generated to check conditions on interfaces |
This table shows the properties that are used by the instrumented code and their meanings. That is these properties are checked when the instrumented code is run, NOT when the code is instrumented by JonsAssert.
Note: These properties must be set on the commandline.
| property | description |
|---|---|
| ENFORCE_ASSERT_CONDITION | If "FALSE", then ignore inline assert checks. Default value is "TRUE". |
| ENFORCE_INVARIANT_CONDITION | If "FALSE", then ignore invariant checks. Default value is "TRUE". |
| ENFORCE_POST_CONDITION | If "FALSE", then ignore post condition checks. Default value is "TRUE". |
| ENFORCE_PRE_CONDITION | If "FALSE", then ignore pre condition checks. Default value is "TRUE". |
| ENFORCE_INHERITED_CONDITIONS | If "FALSE", then the instrumented code will not walk the inheritance heirarchy looking for pre/post/invariant conditions when checking the conditions for a class. Default value is "TRUE". This is useful for speeding up the instrumented code while sacrificing a completly accurate run. One way to use this is to set this to FALSE when doing every day development and leave it at TRUE when running in nightly test runs. |
| ASSERT_BEHAVIOR | If "CONTINUE", print out a stack trace and continue. If "EXCEPTION", throw an {@link net.mtu.eggplant.dbc.AssertionViolation} If "EXIT" or unset, print a stack trace and call System.exit(1). Default value is "EXIT" |


|
cds
2.3.1
|
Thread-specific data manager based on c++11 thread_local feature. More...
#include <cds/threading/details/cxx11_manager.h>
Static Public Member Functions | |
| static void | init () |
| Initialize manager (empty function) More... | |
| static void | fini () |
| Terminate manager (empty function) More... | |
| static bool | isThreadAttached () |
Checks whether current thread is attached to libcds feature or not. | |
| static void | attachThread () |
| This method must be called in beginning of thread execution. | |
| static void | detachThread () |
| This method must be called in end of thread execution. | |
| static ThreadData * | thread_data () |
| Returns ThreadData pointer for the current thread. | |
Thread-specific data manager based on c++11 thread_local feature.
|
inlinestatic |
Terminate manager (empty function)
This function is automatically called by cds::Terminate
|
inlinestatic |
Initialize manager (empty function)
This function is automatically called by cds::Initialize


Thank you so much for attending!
If you wanted to give a gift, you can use the registry below. It will ship gifts directly to us so we don't have to transport it from Maryland.


Description: Search for a specified value within an array and return its index (or -1 if not found).
value: Any The value to search for.
array: Array An array through which to search.
fromIndex: Number The index of the array at which to begin the search. The default is 0, which will search the whole array.
The $.inArray()
method is similar to JavaScript's native .indexOf()
method in that it returns -1 when it doesn't find a match. If the first element within the array matches value
, $.inArray()
returns 0.
Because JavaScript treats 0 as loosely equal to false (i.e. 0 == false, but 0 !== false), if we're checking for the presence of value
within array
, we need to check if it's not equal to (or greater than) -1.
<!DOCTYPE html>

"John" found at

4 found at

"Karl" not found, so

"Pete" is in the array, but not at or after index 2, so


www.shortlistchefs.com.au is a talent-sourcing platform which allows you to view profiles of experienced chefs and hire the best fit for your business. Our focus is on providing chefs looking for long term permanent career moves and often willing to relocate anywhere in Australia. We select only the best chefs to be included on the shortlist and we leverage from a huge database offered by our recruitment partners to give you the best selection. You will only ever see profiles of experienced chefs who can truly add value to any food operation. Shortlist Chefs makes it easy for anybody to hire the very best chefs and we specialise in providing staff for ‘hard to fill’ roles in regional and remote locations as well as in central locations.
Shortlist Chefs gives you access to a pool of highly qualified candidates who are actively looking for their next career move.
We are not a ‘one size fits all’ service. Our team appreciates that each requirement is different, and we offer tailor made pricing which is dependent on several different factors. We even offer payment plans in certain circumstances.
Signing up to view profiles is completely FREE once you have been approved. You do not pay anything unless you successfully hire a chef from Shortlist Chefs, and they join your business team.


Perception and control system of robotics, Machine learning and its application in healthcare
Zhuo ZHI holds an undergraduate degree in Automation from Shandong University, China, in 2019, a postgraduate degree in Instrument Science and Technology from Harbin Institute of Technology in 2021. Zhuo is currently pursuing his PhD with Dept. of Electronic and Electrical Engineering at University College London.


Tic Tac Toe
x
Ready when you are!
Choose your warrior!
Oops... The computer wins!
Bravo! Victory
Hmmm... It was a draw
Start
Reset
X
O
Player - 0
Computer - 0


A sign language interpreter is a person trained in translating between a spoken and signed language. This usually means someone who interprets what is being said and signs it for someone who can't hear, but understands the sign. In this project the user has to train gestures for initiating and terminating the conversation between the people who are not able to hear.
In this project a pop-up window will be opened to your interface in which the system requires your permission in order to grant access to your camera and microphone. After allowing, the user gets directed to the 2nd page in which the system asks the user to train their gestures by making symbols in-front of the camera and clicking on the Start Gesture till it reaches 30 times and then clicking on Stop Gesture. (NOTE: - the user has to cover the whole camera window in order to make the things clear for them) Then the user is directed to another page in which he/she has to add their gesture name and thus while applying these gestures a voice command will try to tell the admin/operator which gesture they are applying.
You Should Have an ample amount of knowledge about html,css3,javascript for the front-end development and pyton with flask for back-end development.
You should also have a basic knowledge about tensorflow and bootswrap framework


|
Bullet Collision Detection & Physics Library
|
Public Member Functions | |
| ThreadsafeCounter () | |
| unsigned int | getNext () |
Public Attributes | |
| unsigned int | mCounter |
| btSpinMutex | mMutex |
Definition at line 216 of file btThreads.cpp.
|
inline |
Definition at line 221 of file btThreads.cpp.
|
inline |
Definition at line 227 of file btThreads.cpp.
| unsigned int ThreadsafeCounter::mCounter |
Definition at line 218 of file btThreads.cpp.
| btSpinMutex ThreadsafeCounter::mMutex |
Definition at line 219 of file btThreads.cpp.


Manages the UI for the RaceSetupState
More...
Manages the UI for the RaceSetupState
◆ BackButtonPressed()
| void RaceSetupUI.BackButtonPressed |
( |
| ) |
|
|
inline |
◆ Construct()
◆ OnDisable()
| void RaceSetupUI.OnDisable |
( |
| ) |
|
|
inlineprivate |
◆ OnEnable()
| void RaceSetupUI.OnEnable |
( |
| ) |
|
|
inlineprivate |
◆ StartAbortButtonPressed()
| void RaceSetupUI.StartAbortButtonPressed |
( |
| ) |
|
|
inline |
◆ m_countdownText
| TextMeshProUGUI RaceSetupUI.m_countdownText |
◆ m_fader
◆ m_settings
◆ m_startButton
| Button RaceSetupUI.m_startButton |
◆ m_startButtonText
| TextMeshProUGUI RaceSetupUI.m_startButtonText |
◆ m_state
◆ m_subscription
| IDisposable RaceSetupUI.m_subscription |
|
private |
The documentation for this class was generated from the following file: