be sure to resize the browser and see how certain elements change shapes. All of the sizes presented can be used for other properties such as paddings, margins etc... But be careful or you will end up with some unexpected results.
%
% units take a percentage value off their parent element
Inch
inches are fixed units. 1inch = 2.54cm
cm
cm are also fixed units, 1cm = 10mm
mm
you guessed it, milimeters are fixed as well.
em
em units are really interesting. They are related to the font size of the parent element. My Box div has a font size property of 30px, so 1em = 30px.
rem
rem units are similar to em units, except they are relative to the document root font size.
Now this is really cool!
vw and vh units are viewport based and will actually scale when you rezise the window. See it for yourself :)!
vw
1vw = 1% width of the viewport. This will actually scale when we resize the window. Cool, huh?
vh
1vh = The same as vw, but it takes 1% of the height of the viewport.
If you liked it, please hit the like button so more people will get to see this. Thanks!


About
This is the About section
Contact
This is the contact section
Want To Help?
Email us<EMAIL_ADDRESS>More Resources
© 2015 Research & Business Development Center


HTML Forms
Gender
Male
Female
Tell us about your experance
I have HTML Expairance
I have CSS Expairance


Provide a comprehensive and standalone way to perform Static Code Analysis on Apex classes of a salesforce org.
Org Selection: View registered orgs and API Version for which SCA is to be performed.
Apex Class Selection:List of Apex classes.
PMD Rule Selection:Dynamically fetched list of Apex Rules along with Priority and Deprecation Status.
SCA Report:Displays the Report highlighting key parameters like frequency, type and distribution and details of violations.


print 'Hello, World!'
fib = fn:
() -> fib(1,1)
(a,b) -> a ++ fib(b,a+b)
[Num] quickSort = fn:
[] -> []
[Num] x:xs ->
quickSort xs[fn: $ < x] ++ x ++ xs[fn: $ >= x]
factorial = fn:
0 -> 1
Int x | x > 0 -> x * factorial (x - 1)


Dreaming of a tight Christmas: UK retailers prepare for slump
New surveys show British consumers are keeping a lid on spending ahead of Brexit and December 12 election.
British consumers are keeping a tight rein on their spending ahead of December's election, despite being tempted by retailers offering heavy discounts last month, surveys showed on Tuesday.
The British Retail Consortium (BRC) said overall retail spending rose 0.6 percent year-on-year in October, marking the strongest growth since April when spending was boosted by the timing of Easter.
More:
Still, the BRC said the longer-term outlook remained bleak, with the 12-month rolling average of sales growth falling to a new low of 0.1 percent.
"With Brexit still unresolved and a December election creating new uncertainties, retailers will be looking nervously at the months ahead," BRC chief executive Helen Dickinson said.
Consumers have propped up Britain's economy since the 2016 Brexit referendum, helping to offset reduced company investment.
But economists say recent signs of a weakening in spending by households raise the risk of a recession as the country prepares to leave the European Union.
Struggling baby products retailer Mothercare said on Monday it intended to appoint administrators for its British division - giving it temporary protection from creditors - as it battled competition from supermarkets and online retailers.
The BRC showed that in like-for-like terms, which strips out changes in retail space, sales were up 0.1 percent compared with October 2018.
A separate survey from payment card company Barclaycard showed consumer spending rose 1.5 percent in October in annual terms, slowing from growth of 1.6 percent in September.
"Ongoing economic uncertainty combined with a bleak start to autumn led many Brits to stay in rather than spend out last month, choosing takeaways and evenings at home over socialising at bars or restaurants," Esme Harwood, a director at Barclaycard, said.
Just 17 percent of consumers surveyed by Barclaycard said they had stocked up ahead of the October 31 Brexit deadline, with tinned food and toilet paper the top purchases of the minority who were concerned about possible disruption from a no-deal Brexit.


Service Details:
With the high demand of Civil work, Commercial as well as residential spaces in Delhi, SKG came in existence in 2002, with the aim to provide a better place & lifestyle to their customers. Within few years, SKG has delivered many timely projects and emerged as a largest developers in Delhi, Gurgaon Noida & NCR region. SKG known for the integrated and realistic property like Residential, Commercials, industrial development, Modern Township, Offices as well as hospitality services. Today SKG has involve in six key values in business - Construction Industry Hospitality, Finance, Property, Interior Due to SKG transparent dealing and time commitment, SKG are enable to spread extreme faith among their customers, something which is evident with our repeat customers. We need together the best of amenities, the best of planning, the best effort to deliver the Light hight & Air. So come and visit us today or call us at +91<PHONE_NUMBER> or mail us at<EMAIL_ADDRESS>To furnish the requirements of clients, we are engaged in offering Civil Contractors. To offer the best quality work, we are rendered civil contractors service with the following quality principles. Apart from this, we are offering this civil contractors service range at the budget.
We are a unique name in the industry to provide our precious clients the best quality Civil Construction Contractors. The provided services are carried out by our skilled professionals in the best possible manner. While performing these services, our experts ensure that the .
We provide exclusive range of all reputed builders in Delhi and NCR ranging from ordinary Apartment, Luxury Apartment, Penthouses, Villas which can match with your choice and financial budget. We also assist you in finding the most appropriate land that caters to your .
A commercial building is a building that is used for commercial use.[1] Types can include office buildings, warehouses, or retail (i.e. Convenience stores, 'big box' stores, shopping malls, etc.). In urban locations, a commercial building often combines functions, such as an office on levels .
Vaastu & reikia consultant has been building quality homes since 1990. Renowned for quality construction and attention to detail, customers can rest assured that their new home will be built to the uncompromising standards hammer has built their reputation upon.
Material procurement: supplier end Service location: local 250 km Service mode: offline we are offering kitchen construction services. Our experts finish these services by employing the advanced
CONSTRUCTION FLAT available for sale and all kind of real estate construction service available.
We are presenting the best quality array of School Building Construction Services to our prestigious clients. Our team members remain in close contact with patrons to understand their requirements and render these construction services accordingl
Backed by a team of professionals, we are offering a broad assortment of Bungalow Construction Service for our esteemed customers. Offered array of construction services is rendered as per quality norms defined by the same industry. In addition to this.
We build nursing home, hospitals, clinics, diagnostic centers, medical colleges, wellness centers and other healthcare facilities. We understand the demands of today’s healthcare industry and we understand our customer vision with an intention to offer shape to it. We will provide unique approach and find innovative ways to


Concurrency allows multiple functions to run independent of one another.
Functions that are meant to run concurrently must be annotated with the coroutine
modifier.
coroutine void foo(int arg1, const char *arg2);
To launch a coroutine, use the go
keyword:
go(foo(34, "ABC"));
Launching concurrent functions — or coroutines
, in libdill terminology — using the go
construct and switching between them is extremely fast. It requires only a few machine instructions. This makes coroutines a suitable basic flow control mechanism, not unlike the if
or while
keywords, which have comparable performance.
Coroutines have one big limitation, though: All coroutines run on a single CPU core. If you want to take advantage of multiple cores, you have to launch multiple threads or processes, presumably as many of them as there are CPU cores on your machine.
Coroutines are scheduled cooperatively. What that means is that a coroutine has to explicitly yield control of the CPU to allow a different coroutine to run. In a typical scenario, this is done transparently to the user: When a coroutine invokes a function that would block (such as msleep
orchrecv
), the CPU is automatically yielded. However, if a coroutine runs without calling any blocking functions, it may hold the CPU forever. For these cases, the yield
function can be used to manually relinquish the CPU to other coroutines manually.
Structured concurrency means that lifetimes of concurrent functions are cleanly nested. If coroutine foo
launches coroutine bar
, then bar
must finish before foo
finishes.
This is not structured concurrency:
This is structured concurrency:
The goal of structured concurrency is to guarantee encapsulation. If the main
function calls foo
, which in turn launches bar
in a concurrent fashion, main
will be guaranteed that once foo
has finished, there will be no leftover functions still running in the background.
What you end up with is a tree of coroutines rooted in the main
function. This tree spreads out towards the smallest worker functions, and you may think of this as a generalization of the call stack — a call tree, if you will. In it, you can walk from any particular function towards the root until you reach the main
function:
As with all idiomatic C, you have to do it by hand.
The good news is that it's easy.
The go
construct returns a handle. The handle can be closed, and thereby kill the associated concurrent function.
int h = go(foo());
do_work();
hclose(h);
What happens to a function that gets killed? It may have some resources allocated, and we want it to finish cleanly, without leaking those resources.
The mechanism is simple. In a function being killed by hclose
, all blocking calls will start failing with the ECANCELED
error. On one hand, this forces the function to finish quickly (there's not much you can do without blocking functions); on the other hand, it provides an opportunity for cleanup.
coroutine void foo(void) {
void *resource = malloc(1000);
while(1) {
int rc = msleep(now() + 100);
if(rc == -1 && errno == ECANCELED) {
free(resource);
return;
}
}
}
Sometimes, instead of launching a coroutine, you may want to create an object that runs coroutines in the background.
For example, an object called tcp_connection
may run two coroutines, one for asynchronously reading data from and one for asynchronously writing data to the network.
Still, it would be nice if the object was a node in the calltree, just like a coroutine is.
In other words, you may want a guarantee that once the object is deallocated there will be no leftover coroutines running:
And there's no trick there. Just do it in the most straightforward way. Launch the coroutines in the function that opens the object and close them in the function the closes the object. When the main function closes the connection object, both the sender and receiver coroutine will be stopped automatically.
struct tcp_connection {
int sender;
int receiver;
}
void tcp_connection_open(struct tcp_connection *self) {
self->sender = go(tcp_sender(self));
self->receiver = go(tcp_receiver(self));
}
void tcp_connection_close(struct tcp_connection *self) {
hclose(self->sender);
hclose(self->receiver);
}
WARNING: To keep examples in this section succint error handling was omitted.
One coroutine launches another coroutine. At some point it decides to shut the child down irrespective of whether it have finished in the meantime or not.
coroutine void worker(void) {
int rc = msleep(now() + 2000);
if(rc < 0 && errno == ECANCELED) return; /* 4. */
/* 2. */
}
int main(void) {
int cr = go(worker()); /* 1. */
msleep(now() + (random() % 1000));
hclose(cr); /* 3. */
return 0;
}
There are two possible scenarios. First, if the call to random
returns a small number the child may finish before the parent calls hclose
:
The worker coroutine finishes at the point 2. The stack of the coroutine is deallocated at that point. However, handle owned by the parent still points to a small "bundle" object. That object is deallocated later on at point 3.
Second, if the call to random
return a big number the child won't finish before the parent and it will be forcefully terminated:
From point 3. on, all the blocking calls in the child coroutine start to return ECANCELED
error. The call to hclose()
won't finish until the worker coroutine exits. That should happen pretty fast given that it can't do any blocking calls anyway.
Note how in both scenarios the child gets an option to release any resources it may own (at points 2. and 4., respectively).
This is basically the same scenario as above except that mutliple child coroutines are launched instead of a single one.
coroutine void worker(void) {
int rc = msleep(now() + (random() % 1000));
if(rc < 0 && errno == ECANCELED) {
return; /* 4. */
}
/* 2. */
}
int main(void) {
int b = bundle();
int i;
for(i = 0; i != 3; i++)
bundle_go(b, worker()); /* 1. */
msleep(now() + 500);
hclose(b); /* 3. */
return 0;
}
Each child either finishes before the main coroutine or it is canceled by the main coroutine, just as above.
The only difference is that all the child coroutines are referred to using a single handle. Therefore there are no dangling leftover handles as individual children finish.
In this use case, child coroutine does a computation. At some point, parent coroutine needs the result of the computation. It waits until the child coroutine is finished and retrieves the result.
coroutine void worker(int ch) {
msleep(now() + (random() % 2000));
/* 2. */
int val = 42;
chsend(ch, &val, sizeof(val), -1); /* 3. */
/* 3. */
}
int main(void) {
int ch[2];
chmake(ch);
int cr = go(worker(ch[1])); /* 1. */
msleep(now() + 1000);
/* 4. */
int val;
chrecv(ch[0], &val, sizeof(val), -1);
/* 5. */
hclose(cr); /* 6. */
return 0;
}
Once again, there are two possible scenarios. First, the child may have finished quickly:
The child is done with the computation at point 2. It tries to send the result into the channel. However, nobody is yet reading from the channel and so the call is blocked until the parent coroutine reads from the channel at point 4.
Alternatively, the child coroutine may still be running when the parent needs the result:
Parent tries to read the result from the channel at point 4. and gets stuck. When the child finishes the computation at point 2. the parent gets unstuck and proceeds to closing the child at point 6.
Same as above but the parent limit the time it is waiting for the result from the child. If result is not received when the deadline hits it will cancel the child.
The code is exactly the same as in the previous scenario, except that chrecv
now has a deadline:
coroutine void worker(int ch) {
int rc = msleep(now() + (random() % 2000));
if(rc < 0 && errno == ECANCELED) return; /* 7. */
/* 2. */
int val = 42;
chsend(ch, &val, sizeof(val), -1);
/* 3. */
}
int main(void) {
int ch[2];
chmake(ch);
int cr = go(worker(ch[1])); /* 1. */
msleep(now() + 1000);
/* 4. */
int val;
int rc = chrecv(ch[0], &val, sizeof(val), now() + 500);
if(rc < 0 && errno == ETIMEDOUT) {
printf("Timed out\n"); /* 5a. */
} else {
printf("Success\n"); /* 5. */
}
hclose(cr); /* 6. */
return 0;
}
There are three possible scenarios in this use cases. The first two are identical to those in the previous use case.
The third one occurs when the child coroutine is not finished by the end of the grace period:
Parent start waiting for the child at point 4. chrecv
times out at point 5a. The child coroutine is closed forcefully just after that, at point 6.
This is a common scenario in network servers. Imagine that the main coroutine is accepting connections and launching one child coroutine per connection. When shutting down the server you want it to stop accepting new connections, but at the same time you want to give all the connections currently in-flight some time to finish whatever it is they are doing. However, you don't want to wait for too long. If some connections don't finish within reasonable time you want to cancel them.
coroutine void worker(void) {
int rc = msleep(now() + (random() % 1000));
if(rc < 0 && errno == ECANCELED) {
return; /* 6 . */
}
/* 2. */
}
int main(void) {
int b = bundle();
int i;
for(i = 0; i != 3; i++)
bundle_go(b, worker()); /* 1. */
/* 3. */
bundle_wait(b, now() + 500);
/* 4. */
hclose(b); /* 5. */
return 0;
}
There are two scenarios worth considering. First, all the children can end before the deadline expires. In that case bundle_wait()
exits immediately after the last child is finished (point 4.):
In the second scenario, there are still some children running when deadline is reached. bundle_wait()
exits with ETIMEDOUT
at point 4. The remaining coroutines are canceled at point 5.
Consider the previous use case except that the child coroutines are doing work in an infinite loop. Giving them grace period to finish doesn't make sense. They are not going to finish on their own, ever.
What we would like to do instead is to broadcast a "shutdown" signal to all of them. Once they receive the signal they would finish whatever it is they are doing and exit the infinite loop. The parent will give them grace period to do so. After grace period is over it will forefully cancel all children that are still running.
Generally speaking, libdill channels are not capable of broadcasting messages. However, they can broadcast a simple signal. If chdone()
is called on one end of a channel, any subsequent attempt to read a message from the other end is going to fail with EPIPE
error. If there are multiple coroutines receiving from the channel, they are all going to get EPIPE
error. This is, for all practical purposes, equivalent to broadcasting a signal.
coroutine void worker(int ch) {
while(1) {
int rc = msleep(now() + (random() % 1000));
if(rc < 0 && errno == ECANCELED) {
return; /* 6. */
}
rc = chrecv(ch, NULL, 0, 0);
if(rc == -1 && errno == EPIPE) {
return; /* 3. */
}
}
}
int main(void) {
int ch[2];
chmake(ch);
int b = bundle();
int i;
for(i = 0; i != 3; i++)
bundle_go(b, worker(ch[0])); /* 1. */
msleep(now() + 5000);
chdone(ch[1]); /* 2. */
rc = bundle_wait(b, now() + 500);
if(rc < 0 && errno == ETIMEDOUT) {
/* 4. */
}
hclose(b); /* 5. */
hclose(ch[1]);
hclose(ch[0]);
return 0;
}
At point 2. the main coroutine broadcasts the "shutdown" signal to worker coroutines. Then it starts waiting for coroutines to finish. The first and the third worker coroutine manage to finish in time. The second worker coroutine, on the other hand, carries on until the deadline in the main coroutine expires (point 4). The main coroutine then cancels it forcefully (point 5).


| Remote Sensing Hands-On Lesson, using CASSINI (C) |
Table of ContentsRemote Sensing Hands-On Lesson, using CASSINI (C) Overview Note About HTML Links References Tutorials Required Readings The Permuted Index API Documentation Kernels Used CSPICE Modules Used Time Conversion (convtm) Task Statement Learning Goals Approach Solution Solution Meta-Kernel Solution Source Code Solution Sample Output Extra Credit Task statements and questions Solutions and answers Obtaining Target States and Positions (getsta) Task Statement Learning Goals Approach Solution Solution Meta-Kernel Solution Source Code Solution Sample Output Extra Credit Task statements and questions Solutions and answers Spacecraft Orientation and Reference Frames (xform) Task Statement Learning Goals Approach Solution Solution Meta-Kernel Solution Source Code Solution Sample Output Extra Credit Task statements and questions Solutions and answers Computing Sub-s/c and Sub-solar Points on an Ellipsoid and a DSK (subpts) Task Statement Learning Goals Approach Solution Solution Meta-Kernel Solution Source Code Solution Sample Output Extra Credit Task statements and questions Solutions and answers Intersecting Vectors with an Ellipsoid and a DSK (fovint) Task Statement Learning Goals Approach Solution Solution Meta-Kernel Solution Source Code Solution Sample Output Extra Credit Remote Sensing Hands-On Lesson, using CASSINI (C)
Overview
Note About HTML Links
In order for the links to be resolved, if not done already by installing the lessons package under the Toolkit's ``doc/html'' directory, create a subdirectory called ``lessons'' under the ``doc/html'' directory of the ``cspice/'' tree and copy this document to that subdirectory before loading it into a Web browser. References
Of these documents, the ``Tutorials'' contains the highest level descriptions with the least number of details while the ``Required Reading'' documents contain much more detailed specifications. The most complete specifications are provided in the ``API Documentation''. In some cases the lesson explanations also refer to the information provided in the meta-data area of the kernels used in the lesson examples. It is especially true in case of the FK and IK files, which often contain comprehensive descriptions of the frames, instrument FOVs, etc. Since both the FK and IK are text kernels, the information provided in them can be viewed using any text editor, while the meta information provided in binary kernels---SPKs and CKs---can be viewed using ``commnt'' or ``spacit'' utility programs located in ``cspice/exe'' of Toolkit installation tree. Tutorials
Name Lesson steps/functions it describes ---------------- ----------------------------------------------- Time Time Conversion SCLK and LSK Time Conversion SPK Obtaining Ephemeris Data Frames Reference Frames Using Frames Reference Frames PCK Planetary Constants Data CK Spacecraft Orientation Data DSK Detailed Target Shape (Topography) DataThese tutorials are available from the NAIF ftp server at JPL:
http://naif.jpl.nasa.gov/naif/tutorials.html Required Readings
Name Lesson steps/functions that it describes --------------- ----------------------------------------- ck.req Obtaining spacecraft orientation data dsk.req Obtaining detailed body shape data frames.req Using reference frames naif_ids.req Determining body ID codes pck.req Obtaining planetary constants data sclk.req SCLK time conversion spk.req Obtaining ephemeris Data time.req Time conversion The Permuted Index
This text document provides a simple mechanism by which users can discover which CSPICE functions perform functions of interest, as well as the names of the source files that contain these functions. API Documentation
For example the path of the source code of the str2et_c routine is
cspice/src/cspice/str2et_c.c Kernels Used
# FILE NAME TYPE DESCRIPTION -- ------------------------- ---- ----------------------------------- 1 naif0008.tls LSK Generic LSK 2 cas00084.tsc SCLK Cassini SCLK 3 981005_PLTEPH-DE405S.bsp SPK Solar System Ephemeris 4 020514_SE_SAT105.bsp SPK Saturnian Satellite Ephemeris 5 030201AP_SK_SM546_T45.bsp SPK Cassini Spacecraft SPK 6 cas_v37.tf FK Cassini FK 7 04135_04171pc_psiv2.bc CK Cassini Spacecraft CK 8 cpck05Mar2004.tpc PCK Cassini Project PCK 9 phoebe_64q.bds DSK Phoebe DSK 10 cas_iss_v09.ti IK ISS Instrument KernelThese SPICE kernels are included in the lesson package available from the NAIF server at JPL:
ftp://naif.jpl.nasa.gov/pub/naif/toolkit_docs/Lessons/In addition to these kernels, the extra credit exercises require the following kernels:
# FILE NAME TYPE DESCRIPTION -- ---------- ---- -------------------------------------------------- 11 jup310.bsp SPK Generic Jovian Satellite EphemerisThese SPICE kernels are available from the NAIF server at JPL:
https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/satellites/ CSPICE Modules Used
CHAPTER EXERCISE FUNCTIONS NON-VOID KERNELS ------- --------- --------- --------- ---------- 1 convtm furnsh_c 1,2 prompt_c str2et_c etcal_c timout_c sce2s_c extra (*) unload_c unitim_c 1,2 sct2e_c et2utc_c scs2e_c 2 getsta furnsh_c vnorm_c 1,3-5 prompt_c str2et_c spkezr_c spkpos_c convrt_c extra (*) kclear_c 1,3-5,11 unload_c 3 xform furnsh_c vsep_c 1-8 prompt_c str2et_c spkezr_c sxform_c mxvg_c spkpos_c pxform_c mxv_c convrt_c extra (*) kclear_c 1-8 unload_c 4 subpts furnsh_c vnorm_c 1,3-5,8,9 prompt_c str2et_c subpnt_c subslr_c extra (*) kclear_c dpr_c 1,3-5,8 reclat_c bodvrd_c recpgr_c 5 fovint furnsh_c dpr_c 1-10 prompt_c str2et_c bodn2c_c getfov_c sincpt_c reclat_c illumf_c et2lst_c (*) Additional APIs and kernels used in Extra Credit tasks.Refer to the headers of the various functions listed above, as detailed interface specifications are provided with the source code. Time Conversion (convtm)Task Statement
Learning Goals
Approach
When completing the ``calendar format'' step above, consider using one of two possible methods: etcal_c or timout_c. SolutionSolution Meta-Kernel
KPL/MK This is the meta-kernel used in the solution of the ``Time Conversion'' task in the Remote Sensing Hands On Lesson. The names and contents of the kernels referenced by this meta-kernel are as follows: File name Contents -------------------------- ----------------------------- naif0008.tls Generic LSK cas00084.tsc Cassini SCLK \begindata KERNELS_TO_LOAD = ( 'kernels/lsk/naif0008.tls', 'kernels/sclk/cas00084.tsc' ) \begintext Solution Source Code
#include <stdio.h> /* Standard CSPICE User Include File */ #include "SpiceUsr.h" /* Local Parameters */ #define METAKR "convtm.tm" #define SCLKID -82 #define STRLEN 50 int main (void) { /* Local Variables */ SpiceChar calet [STRLEN]; SpiceChar sclkst [STRLEN]; SpiceChar utctim [STRLEN]; SpiceDouble et; /* Load the kernels this program requires. Both the spacecraft clock kernel and a leapseconds kernel should be listed in the meta-kernel. */ furnsh_c ( METAKR ); /* Prompt the user for the input time string. */ prompt_c ( "Input UTC Time: ", STRLEN, utctim ); printf ( "Converting UTC Time: %s\n", utctim ); /* Convert utctim to ET. */ str2et_c ( utctim, &et ); printf ( " ET Seconds Past J2000: %16.3f\n", et ); /* Now convert ET to a calendar time string. This can be accomplished in two ways. */ etcal_c ( et, STRLEN, calet ); printf ( " Calendar ET (etcal_c): %s\n", calet ); /* Or use timout_c for finer control over the output format. The picture below was built by examining the header of timout_c. */ timout_c ( et, "YYYY-MON-DDTHR:MN:SC ::TDB", STRLEN, calet ); printf ( " Calendar ET (timout_c): %s\n", calet ); /* Convert ET to spacecraft clock time. */ sce2s_c ( SCLKID, et, STRLEN, sclkst ); printf ( " Spacecraft Clock Time: %s\n", sclkst ); return(0); } Solution Sample Output
Input UTC Time: 2004 jun 11 19:32:00 Converting UTC Time: 2004 jun 11 19:32:00 ET Seconds Past J2000: 140254384.185 Calendar ET (etcal_c): 2004 JUN 11 19:33:04.184 Calendar ET (timout_c): 2004-JUN-11T19:33:04 Spacecraft Clock Time: 1/1465674964.105 Extra Credit
These ``extra credit'' tasks are provided as task statements, and unlike the regular tasks, no approach or solution source code is provided. In the next section, you will find the numeric solutions (when applicable) and answers to the questions asked in these tasks. Task statements and questions
Solutions and answers
Julian Date TDB: 2453168.3146318
===================================================================== =========== Toolkit version: N0066 SPICE(NOLEAPSECONDS) -- The variable that points to the leapseconds (DELTET/DELTA_AT) could n ot be located in the kernel pool. It is likely that the leapseconds kernel has not been loaded via the routine FURNSH. A traceback follows. The name of the highest level module is first. str2et_c --> STR2ET --> TTRANS Oh, by the way: The SPICELIB error handling actions are USER-TAILORA BLE. You can choose whether the Toolkit aborts or continues when errors occur, which error messages to output, and where to send the output. Please read the ERROR "Required Reading" file, or see the routines ERRACT, ERRDEV, and ERRP RT. ===================================================================== ===========
===================================================================== =========== Toolkit version: N0066 SPICE(KERNELVARNOTFOUND) -- The Variable Was not Found in the Kernel Pool. SCLK_DATA_TYPE_82 not found. Did you load the SCLK kernel? A traceback follows. The name of the highest level module is first. sce2s_c --> SCE2S --> SCE2T --> SCTYPE --> SCLI01 Oh, by the way: The SPICELIB error handling actions are USER-TAILORA BLE. You can choose whether the Toolkit aborts or continues when errors occur, which error messages to output, and where to send the output. Please read the ERROR "Required Reading" file, or see the routines ERRACT, ERRDEV, and ERRP RT. ===================================================================== ===========
Earliest UTC convertible to SCLK: 1980-01-01T00:00:00.000
Spacecraft Clock Time: 1/1465674964.105 UTC time from spacecraft clock: 2004-06-11T19:31:59.999 Obtaining Target States and Positions (getsta)Task Statement
Learning Goals
Approach
When deciding which SPK files to load, the Toolkit utility ``brief'' may be of some use. ``brief'' is located in the ``cspice/exe'' directory for C toolkits. Consult its user's guide available in ``cspice/doc/brief.ug'' for details. SolutionSolution Meta-Kernel
KPL/MK This is the meta-kernel used in the solution of the ``Obtaining Target States and Positions'' task in the Remote Sensing Hands On Lesson. The names and contents of the kernels referenced by this meta-kernel are as follows: File name Contents -------------------------- ----------------------------- naif0008.tls Generic LSK 981005_PLTEPH-DE405S.bsp Solar System Ephemeris 020514_SE_SAT105.bsp Saturnian Satellite Ephemeris 030201AP_SK_SM546_T45.bsp Cassini Spacecraft SPK \begindata KERNELS_TO_LOAD = ( 'kernels/lsk/naif0008.tls', 'kernels/spk/981005_PLTEPH-DE405S.bsp', 'kernels/spk/020514_SE_SAT105.bsp', 'kernels/spk/030201AP_SK_SM546_T45.bsp' ) \begintext Solution Source Code
#include <stdio.h> /* Standard CSPICE User Include File */ #include "SpiceUsr.h" /* Local Parameters */ #define METAKR "getsta.tm" #define STRLEN 50 int main (void) { /* Local Variables */ SpiceChar utctim [STRLEN]; SpiceDouble dist; SpiceDouble et; SpiceDouble ltime; SpiceDouble pos [3]; SpiceDouble state [6]; /* Load the kernels that this program requires. We will need a leapseconds kernel to convert input UTC time strings into ET. We also will need the necessary SPK files with coverage for the bodies in which we are interested. */ furnsh_c ( METAKR ); /* Prompt the user for the input time string. */ prompt_c ( "Input UTC Time: ", STRLEN, utctim ); printf ( "Converting UTC Time: %s\n", utctim ); /* Convert utctim to ET. */ str2et_c ( utctim, &et ); printf ( " ET seconds past J2000: %16.3f\n", et ); /* Compute the apparent state of Phoebe as seen from CASSINI in the J2000 frame. All of the ephemeris readers return states in units of kilometers and kilometers per second. */ spkezr_c ( "PHOEBE", et, "J2000", "LT+S", "CASSINI", state, <ime ); printf ( " Apparent state of Phoebe as seen " "from CASSINI in the J2000\n" ); printf ( " frame (km, km/s):\n" ); printf ( " X = %16.3f\n", state[0] ); printf ( " Y = %16.3f\n", state[1] ); printf ( " Z = %16.3f\n", state[2] ); printf ( " VX = %16.3f\n", state[3] ); printf ( " VY = %16.3f\n", state[4] ); printf ( " VZ = %16.3f\n", state[5] ); /* Compute the apparent position of Earth as seen from CASSINI in the J2000 frame. Note: We could have continued using spkezr_c and simply ignored the velocity components. */ spkpos_c ( "EARTH", et, "J2000", "LT+S", "CASSINI", pos, <ime ); printf ( " Apparent position of Earth as " "seen from CASSINI in the J2000\n" ); printf ( " frame (km): \n" ); printf ( " X = %16.3f\n", pos[0] ); printf ( " Y = %16.3f\n", pos[1] ); printf ( " Z = %16.3f\n", pos[2] ); /* We need only display LTIME, as it is precisely the light time in which we are interested. */ printf ( " One way light time between CASSINI and " "the apparent position\n" ); printf ( " of Earth (seconds): %16.3f\n", ltime ); /* Compute the apparent position of the Sun as seen from Phoebe in the J2000 frame. */ spkpos_c ( "SUN", et, "J2000", "LT+S", "PHOEBE", pos, <ime ); printf ( " Apparent position of Sun as seen " "from Phoebe in the\n" ); printf ( " J2000 frame (km): \n" ); printf ( " X = %16.3f\n", pos[0] ); printf ( " Y = %16.3f\n", pos[1] ); printf ( " Z = %16.3f\n", pos[2] ); /* Now we need to compute the actual distance between the Sun and Phoebe. The above SPKPOS call gives us the apparent distance, so we need to adjust our aberration correction appropriately. */ spkpos_c ( "SUN", et, "J2000", "NONE", "PHOEBE", pos, <ime ); /* Compute the distance between the body centers in kilometers. */ dist = vnorm_c ( pos ); /* Convert this value to AU using convrt_c. */ convrt_c ( dist, "KM", "AU", &dist ); printf ( " Actual distance between Sun and " "Phoebe body centers:\n" ); printf ( " (AU): %16.3f\n", dist ); return(0); } Solution Sample Output
Input UTC Time: 2004 jun 11 19:32:00 Converting UTC Time: 2004 jun 11 19:32:00 ET seconds past J2000: 140254384.185 Apparent state of Phoebe as seen from CASSINI in the J2000 frame (km, km/s): X = -119.921 Y = 2194.139 Z = -57.639 VX = -5.980 VY = -2.119 VZ = -0.295 Apparent position of Earth as seen from CASSINI in the J2000 frame (km): X = 353019393.123 Y = -1328180352.140 Z = -568134171.697 One way light time between CASSINI and the apparent position of Earth (seconds): 4960.427 Apparent position of Sun as seen from Phoebe in the J2000 frame (km): X = 376551465.272 Y = -1190495630.303 Z = -508438699.110 Actual distance between Sun and Phoebe body centers: (AU): 9.012 Extra Credit
These ``extra credit'' tasks are provided as task statements, and unlike the regular tasks, no approach or solution source code is provided. In the next section, you will find the numeric solutions (when applicable) and answers to the questions asked in these tasks. Task statements and questions
Solutions and answers
===================================================================== =========== Toolkit version: N0066 SPICE(SPKINSUFFDATA) -- Insufficient ephemeris data has been loaded to compute the state of - 82 (CASSINI) relative to 0 (SOLAR SYSTEM BARYCENTER) at the ephemeris ep och 2004 JUN 11 19:33:04.184. A traceback follows. The name of the highest level module is first. spkezr_c --> SPKEZR --> SPKEZ --> SPKACS --> SPKGEO Oh, by the way: The SPICELIB error handling actions are USER-TAILORA BLE. You can choose whether the Toolkit aborts or continues when errors occur, which error messages to output, and where to send the output. Please read the ERROR "Required Reading" file, or see the routines ERRACT, ERRDEV, and ERRP RT. ===================================================================== ===========
BRIEF -- Version 4.0.0, September 8, 2010 -- Toolkit Version N0066 Summary for: kernels/spk/981005_PLTEPH-DE405S.bsp Bodies: MERCURY BARYCENTER (1) w.r.t. SOLAR SYSTEM BARYCENTER (0) VENUS BARYCENTER (2) w.r.t. SOLAR SYSTEM BARYCENTER (0) EARTH BARYCENTER (3) w.r.t. SOLAR SYSTEM BARYCENTER (0) MARS BARYCENTER (4) w.r.t. SOLAR SYSTEM BARYCENTER (0) JUPITER BARYCENTER (5) w.r.t. SOLAR SYSTEM BARYCENTER (0) SATURN BARYCENTER (6) w.r.t. SOLAR SYSTEM BARYCENTER (0) URANUS BARYCENTER (7) w.r.t. SOLAR SYSTEM BARYCENTER (0) NEPTUNE BARYCENTER (8) w.r.t. SOLAR SYSTEM BARYCENTER (0) PLUTO BARYCENTER (9) w.r.t. SOLAR SYSTEM BARYCENTER (0) SUN (10) w.r.t. SOLAR SYSTEM BARYCENTER (0) MERCURY (199) w.r.t. MERCURY BARYCENTER (1) VENUS (299) w.r.t. VENUS BARYCENTER (2) MOON (301) w.r.t. EARTH BARYCENTER (3) EARTH (399) w.r.t. EARTH BARYCENTER (3) MARS (499) w.r.t. MARS BARYCENTER (4) Start of Interval (UTC) End of Interval (UTC) ----------------------------- ------------------------- ---- 2004-JUN-11 05:00:00.000 2004-JUN-12 12:00:00.000 Summary for: kernels/spk/020514_SE_SAT105.bsp Bodies: MIMAS (601) w.r.t. SATURN BARYCENTER (6) ENCELADUS (602) w.r.t. SATURN BARYCENTER (6) TETHYS (603) w.r.t. SATURN BARYCENTER (6) DIONE (604) w.r.t. SATURN BARYCENTER (6) RHEA (605) w.r.t. SATURN BARYCENTER (6) TITAN (606) w.r.t. SATURN BARYCENTER (6) HYPERION (607) w.r.t. SATURN BARYCENTER (6) IAPETUS (608) w.r.t. SATURN BARYCENTER (6) PHOEBE (609) w.r.t. SATURN BARYCENTER (6) SATURN (699) w.r.t. SATURN BARYCENTER (6) Start of Interval (UTC) End of Interval (UTC) ----------------------------- ------------------------- ---- 2004-JUN-11 05:00:00.000 2004-JUN-12 12:00:00.000 Summary for: kernels/spk/030201AP_SK_SM546_T45.bsp Body: CASSINI (-82) w.r.t. SATURN BARYCENTER (6) Start of Interval (UTC) End of Interval (UTC) ----------------------------- --------------------------- -- 2004-JUN-11 05:00:00.000 2004-JUN-12 12:00:00.000
Additional kernels required for this task: File name Contents ----------------------- ---------------------------------- jup310.bsp Generic Jovian Satellite Ephemeris available in the NAIF server at: https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/satellites/
Actual position of Jupiter as seen from Saturn in the J2000 frame (km): X = -436016583.291 Y = -1094176737.323 Z = -446585337.431
Actual (geometric) position of Sun as seen from Saturn in the J2000 frame (km): X = 367770592.367 Y = -1197330367.359 Z = -510369088.677 Light-time corrected position of Sun as seen from Saturn in the J2000 frame (km): X = 367770572.921 Y = -1197330417.733 Z = -510369109.509 Apparent position of Sun as seen from Saturn in the J2000 frame (km): X = 367726456.168 Y = -1197342627.879 Z = -510372252.747 Spacecraft Orientation and Reference Frames (xform)Task Statement
Learning Goals
Approach
You may find it useful to consult the permuted index, the headers of various source modules, and the following toolkit documentation:
SolutionSolution Meta-Kernel
KPL/MK This is the meta-kernel used in the solution of the ``Spacecraft Orientation and Reference Frames'' task in the Remote Sensing Hands On Lesson. The names and contents of the kernels referenced by this meta-kernel are as follows: File name Contents -------------------------- ----------------------------- naif0008.tls Generic LSK cas00084.tsc Cassini SCLK 981005_PLTEPH-DE405S.bsp Solar System Ephemeris 020514_SE_SAT105.bsp Saturnian Satellite Ephemeris 030201AP_SK_SM546_T45.bsp Cassini Spacecraft SPK cas_v37.tf Cassini FK 04135_04171pc_psiv2.bc Cassini Spacecraft CK cpck05Mar2004.tpc Cassini Project PCK \begindata KERNELS_TO_LOAD = ( 'kernels/lsk/naif0008.tls', 'kernels/sclk/cas00084.tsc', 'kernels/spk/981005_PLTEPH-DE405S.bsp', 'kernels/spk/020514_SE_SAT105.bsp', 'kernels/spk/030201AP_SK_SM546_T45.bsp', 'kernels/fk/cas_v37.tf', 'kernels/ck/04135_04171pc_psiv2.bc', 'kernels/pck/cpck05Mar2004.tpc' ) \begintext Solution Source Code
#include <stdio.h> /* Standard CSPICE User Include File */ #include "SpiceUsr.h" /* Local Parameters */ #define METAKR "xform.tm" #define STRLEN 50 int main (void) { /* Local Variables */ SpiceChar utctim [STRLEN]; SpiceDouble et; SpiceDouble ltime; SpiceDouble state [6]; SpiceDouble bfixst [6]; SpiceDouble pos [3]; SpiceDouble sform [6][6]; SpiceDouble pform [3][3]; SpiceDouble bsight [3]; SpiceDouble sep; /* Load the kernels that this program requires. We will need: A leapseconds kernel A spacecraft clock kernel for CASSINI The necessary ephemerides A planetary constants file (PCK) A spacecraft orientation kernel for CASSINI (CK) A frame kernel (TF) */ furnsh_c ( METAKR ); /* Prompt the user for the input time string. */ prompt_c ( "Input UTC Time: ", STRLEN, utctim ); printf ( "Converting UTC Time: %s\n", utctim ); /* Convert utctim to ET. */ str2et_c ( utctim, &et ); printf ( " ET seconds past J2000: %16.3f\n", et ); /* Compute the apparent state of Phoebe as seen from CASSINI in the J2000 reference frame. */ spkezr_c ( "PHOEBE", et, "J2000", "LT+S", "CASSINI", state, <ime ); /* Now obtain the transformation from the inertial J2000 frame to the non-inertial body-fixed IAU_PHOEBE frame. Since we want the apparent position, we need to subtract ltime from et. */ sxform_c ( "J2000", "IAU_PHOEBE", et-ltime, sform ); /* Now rotate the apparent J2000 state into IAU_PHOEBE with the following matrix multiplication: */ mxvg_c ( sform, state, 6, 6, bfixst ); /* Display the results. */ printf ( " Apparent state of Phoebe as seen " "from CASSINI in the IAU_PHOEBE\n" ); printf ( " body-fixed frame (km, km/s):\n"); printf ( " X = %19.6f\n", bfixst[0] ); printf ( " Y = %19.6f\n", bfixst[1] ); printf ( " Z = %19.6f\n", bfixst[2] ); printf ( " VX = %19.6f\n", bfixst[3] ); printf ( " VY = %19.6f\n", bfixst[4] ); printf ( " VZ = %19.6f\n", bfixst[5] ); /* It is worth pointing out, all of the above could have been done with a single use of spkezr_c: */ spkezr_c ( "PHOEBE", et, "IAU_PHOEBE", "LT+S", "CASSINI", state, <ime ); /* Display the results. */ printf ( " Apparent state of Phoebe as seen " "from CASSINI in the IAU_PHOEBE\n" ); printf ( " body-fixed frame (km, km/s) " "obtained using spkezr_c directly:\n" ); printf ( " X = %19.6f\n", state[0] ); printf ( " Y = %19.6f\n", state[1] ); printf ( " Z = %19.6f\n", state[2] ); printf ( " VX = %19.6f\n", state[3] ); printf ( " VY = %19.6f\n", state[4] ); printf ( " VZ = %19.6f\n", state[5] ); /* Note that the velocity found by using spkezr_c to compute the state in the IAU_PHOEBE frame differs at the few mm/second level from that found previously by calling spkezr_c and then sxform_c. Computing velocity via a single call to spkezr_c as we've done immediately above is slightly more accurate because it accounts for the effect of the rate of change of light time on the apparent angular velocity of the target's body-fixed reference frame. Now we are to compute the angular separation between the apparent position of the Earth as seen from the orbiter and the nominal boresight of the high gain antenna. First, compute the apparent position of the Earth as seen from CASSINI in the J2000 frame. */ spkpos_c ( "EARTH", et, "J2000", "LT+S", "CASSINI", pos, <ime ); /* Now compute the location of the antenna boresight at this same epoch. From reading the frame kernel we know that the antenna boresight is nominally the +Z axis of the CASSINI_HGA frame defined there. */ bsight[0] = 0.0; bsight[1] = 0.0; bsight[2] = 1.0; /* Now compute the rotation matrix from CASSINI_HGA into J2000. */ pxform_c ( "CASSINI_HGA", "J2000", et, pform ); /* And multiply the result to obtain the nominal antenna boresight in the J2000 reference frame. */ mxv_c ( pform, bsight, bsight ); /* Lastly compute the angular separation. */ convrt_c ( vsep_c(bsight, pos), "RADIANS", "DEGREES", &sep ); printf ( " Angular separation between the " "apparent position of\n" ); printf ( " Earth and the CASSINI high " "gain antenna boresight (degrees):\n"); printf ( " %16.3f\n", sep ); /* Or alternatively we can work in the antenna frame directly. */ spkpos_c ( "EARTH", et, "CASSINI_HGA", "LT+S", "CASSINI", pos, <ime ); /* The antenna boresight is the Z-axis in the CASSINI_HGA frame. */ bsight[0] = 0.0; bsight[1] = 0.0; bsight[2] = 1.0; /* Lastly compute the angular separation. */ convrt_c ( vsep_c(bsight, pos), "RADIANS", "DEGREES", &sep ); printf ( " Angular separation between the " "apparent position of\n" ); printf ( " Earth and the CASSINI high " "gain antenna boresight computed\n" ); printf ( " using vectors in the CASSINI_HGA " "frame (degrees):\n" ); printf ( " %16.3f\n", sep ); return(0); } Solution Sample Output
Input UTC Time: 2004 jun 11 19:32:00 Converting UTC Time: 2004 jun 11 19:32:00 ET seconds past J2000: 140254384.185 Apparent state of Phoebe as seen from CASSINI in the IAU_PHOEBE body-fixed frame (km, km/s): X = -1982.639762 Y = -934.530471 Z = -166.562595 VX = 3.970833 VY = -3.812498 VZ = -2.371663 Apparent state of Phoebe as seen from CASSINI in the IAU_PHOEBE body-fixed frame (km, km/s) obtained using spkezr_c directly: X = -1982.639762 Y = -934.530471 Z = -166.562595 VX = 3.970832 VY = -3.812496 VZ = -2.371663 Angular separation between the apparent position of Earth and the CASSINI high gain antenna boresight (degrees): 71.924 Angular separation between the apparent position of Earth and the CASSINI high gain antenna boresight computed using vectors in the CASSINI_HGA frame (degrees): 71.924 Extra Credit
These ``extra credit'' tasks are provided as task statements, and unlike the regular tasks, no approach or solution source code is provided. In the next section, you will find the numeric solutions (when applicable) and answers to the questions asked in these tasks. Task statements and questions
Solutions and answers
===================================================================== =========== Toolkit version: N0066 SPICE(NOFRAMECONNECT) -- At epoch 1.4025036418463E+08 TDB (2004 JUN 11 18:26:04.184 TDB), ther e is insufficient information available to transform from reference frame -82101 (CASSINI_HGA) to reference frame 1 (J2000). Frame CASSINI_HGA could b e transformed to frame -82000 (CASSINI_SC_COORD). The latter is a CK fr ame; a CK file containing data for instrument or structure -82000 at the epoch shown above, as well as a corresponding SCLK kernel, must be loaded in orde r to use this frame. Failure to find required CK data could be due to one or m ore CK files not having been loaded, or to the epoch shown above lying withi n a coverage gap or beyond the coverage bounds of the loaded CK files. It is also possible that no loaded CK file has required angular velocity data fo r the input epoch, even if a loaded CK does have attitude data for that epo ch. You can use CKBRIEF with the -dump option to display coverage intervals o f a CK file. A traceback follows. The name of the highest level module is first. pxform_c --> PXFORM --> REFCHG Oh, by the way: The SPICELIB error handling actions are USER-TAILORA BLE. You can choose whether the Toolkit aborts or continues when errors occur, which error messages to output, and where to send the output. Please read the ERROR "Required Reading" file, or see the routines ERRACT, ERRDEV, and ERRP RT. ===================================================================== ===========
CKBRIEF -- Version 6.1.0, June 27, 2014 -- Toolkit Version N0066 Summary for: kernels/ck/04135_04171pc_psiv2.bc Segment No.: 1 Object: -82000 Interval Begin UTC Interval End UTC AV ------------------------ ------------------------ --- 2004-JUN-11 05:00:00.000 2004-JUN-11 09:25:02.019 Y 2004-JUN-11 09:26:14.019 2004-JUN-11 18:24:37.152 Y 2004-JUN-11 18:26:13.152 2004-JUN-12 05:53:26.012 Y 2004-JUN-12 05:54:56.012 2004-JUN-12 10:32:08.016 Y 2004-JUN-12 10:33:26.016 2004-JUN-12 11:59:59.998 Y
CKBRIEF -- Version 6.1.0, June 27, 2014 -- Toolkit Version N0066 Summary for: kernels/ck/04135_04171pc_psiv2.bc Object: -82000 Interval Begin UTC Interval End UTC AV ------------------------ ------------------------ --- 2004-JUN-11 05:00:00.000 2004-JUN-12 11:59:59.998 Y
Angular separation between the apparent position of the Sun and the nominal boresight of the CASSINI high gain antenna (degrees): 73.130 HGA illumination: CASSINI high gain antenna IS illuminated.
Computing Sub-s/c and Sub-solar Points on an Ellipsoid and a DSK (subpts)Task Statement
near point/ellipsoiddefinition, and once using a DSK shape model and the
nadir/dsk/unprioritizeddefinition. The program displays the results. Use the program to compute these quantities at "2004 jun 11 19:32:00" UTC. Learning Goals
Approach
One point worth considering: how would the results change if the sub-solar and sub-observer points were computed using the
intercept/ellipsoidand
intercept/dsk/unprioritizeddefinitions? Which definition is appropriate? SolutionSolution Meta-Kernel
KPL/MK This is the meta-kernel used in the solution of the ``Computing Sub-spacecraft and Sub-solar Points'' task in the Remote Sensing Hands On Lesson. The names and contents of the kernels referenced by this meta-kernel are as follows: File name Contents -------------------------- ----------------------------- naif0008.tls Generic LSK 981005_PLTEPH-DE405S.bsp Solar System Ephemeris 020514_SE_SAT105.bsp Saturnian Satellite Ephemeris 030201AP_SK_SM546_T45.bsp Cassini Spacecraft SPK cpck05Mar2004.tpc Cassini Project PCK phoebe_64q.bds Phoebe DSK \begindata KERNELS_TO_LOAD = ( 'kernels/lsk/naif0008.tls', 'kernels/spk/981005_PLTEPH-DE405S.bsp', 'kernels/spk/020514_SE_SAT105.bsp', 'kernels/spk/030201AP_SK_SM546_T45.bsp', 'kernels/pck/cpck05Mar2004.tpc' 'kernels/dsk/phoebe_64q.bds' ) \begintext Solution Source Code
#include <stdio.h> /* Standard CSPICE User Include File */ #include "SpiceUsr.h" /* Local Parameters */ #define METAKR "subpts.tm" #define STRLEN 50 int main (void) { /* Local Variables */ SpiceChar * method; SpiceChar utctim [STRLEN]; SpiceDouble et; SpiceDouble spoint [3]; SpiceDouble srfvec [3]; SpiceDouble trgepc; SpiceInt i; /* Load the kernels that this program requires. We will need: A leapseconds kernel The necessary ephemerides A planetary constants file (PCK) A DSK file containing Phoebe shape data */ furnsh_c ( METAKR ); /* Prompt the user for the input time string. */ prompt_c ( "Input UTC Time: ", STRLEN, utctim ); printf ( " Converting UTC Time: %s\n", utctim ); /* Convert utctim to ET. */ str2et_c ( utctim, &et ); printf ( " ET seconds past J2000: %16.3f\n", et ); for ( i = 0; i < 2; i++ ) { if ( i == 0 ) { /* Use the "near point" sub-point definition and an ellipsoidal model. */ method = "NEAR POINT/Ellipsoid"; } else { /* Use the "nadir" sub-point definition and a DSK model. */ method = "NADIR/DSK/Unprioritized"; } printf ( "\n Sub-point/target shape model: %s\n\n", method ); /* Compute the apparent sub-observer point of CASSINI on Phoebe. */ subpnt_c ( method, "PHOEBE", et, "IAU_PHOEBE", "LT+S", "CASSINI", spoint, &trgepc, srfvec ); printf ( " Apparent sub-observer point of CASSINI " "on Phoebe in the\n" ); printf ( " IAU_PHOEBE frame (km):\n" ); printf ( " X = %16.3f\n", spoint[0] ); printf ( " Y = %16.3f\n", spoint[1] ); printf ( " Z = %16.3f\n", spoint[2] ); printf ( " ALT = %16.3f\n", vnorm_c(srfvec) ); /* Compute the apparent sub-solar point on Phoebe as seen from CASSINI. */ subslr_c ( method, "PHOEBE", et, "IAU_PHOEBE", "LT+S", "CASSINI", spoint, &trgepc, srfvec ); printf ( " Apparent sub-solar point on Phoebe " "as seen from CASSINI in\n" ); printf ( " the IAU_PHOEBE frame (km):\n" ); printf ( " X = %16.3f\n", spoint[0] ); printf ( " Y = %16.3f\n", spoint[1] ); printf ( " Z = %16.3f\n", spoint[2] ); } printf ( "\n" ); return(0); } Solution Sample Output
Input UTC Time: 2004 jun 11 19:32:00 Converting UTC Time: 2004 jun 11 19:32:00 ET seconds past J2000: 140254384.185 Sub-point/target shape model: NEAR POINT/Ellipsoid Apparent sub-observer point of CASSINI on Phoebe in the IAU_PHOEBE frame (km): X = 104.498 Y = 45.269 Z = 7.383 ALT = 2084.116 Apparent sub-solar point on Phoebe as seen from CASSINI in the IAU_PHOEBE frame (km): X = 78.681 Y = 76.879 Z = -21.885 Sub-point/target shape model: NADIR/DSK/Unprioritized Apparent sub-observer point of CASSINI on Phoebe in the IAU_PHOEBE frame (km): X = 95.373 Y = 40.948 Z = 6.610 ALT = 2094.242 Apparent sub-solar point on Phoebe as seen from CASSINI in the IAU_PHOEBE frame (km): X = 79.111 Y = 77.338 Z = -22.028 Extra Credit
These ``extra credit'' tasks are provided as task statements, and unlike the regular tasks, no approach or solution source code is provided. In the next section, you will find the numeric solutions (when applicable) and answers to the questions asked in these tasks. Task statements and questions
Solutions and answers
Apparent sub-solar point on Phoebe as seen from CASSINI in the IAU_PHOEBE frame using the 'Near Point: ellipsoid' method (km): X = 78.681 Y = 76.879 Z = -21.885 Apparent sub-solar point on Phoebe as seen from CASSINI in the IAU_PHOEBE frame using the 'Intercept: ellipsoid' method (km): X = 74.542 Y = 79.607 Z = -24.871
Geometric sub-spacecraft point of CASSINI on Phoebe in the IAU_PHOEBE frame using the 'Near Point: ellipsoid' method (km): X = 104.497 Y = 45.270 Z = 7.384
Planetocentric coordinates of the CASSINI sub-spacecraft point on Phoebe (degrees, km): LAT = 3.710 LON = 23.423 R = 114.121 Planetographic coordinates of the CASSINI sub-spacecraft point on Phoebe (degrees, km): LAT = 4.454 LON = 336.577 ALT = -0.831
Intersecting Vectors with an Ellipsoid and a DSK (fovint)Task Statement
At each point of intersection compute the following:
Additionally compute the local solar time at the intercept of the camera boresight with the surface of Phoebe, using both ellipsoidal and DSK shape models. Use this program to compute values at the epoch:
Learning Goals
Approach
SolutionSolution Meta-Kernel
KPL/MK This is the meta-kernel used in the solution of the ``Intersecting Vectors with a Triaxial Ellipsoid'' task in the Remote Sensing Hands On Lesson. The names and contents of the kernels referenced by this meta-kernel are as follows: File name Contents -------------------------- ----------------------------- naif0008.tls Generic LSK cas00084.tsc Cassini SCLK 981005_PLTEPH-DE405S.bsp Solar System Ephemeris 020514_SE_SAT105.bsp Saturnian Satellite Ephemeris 030201AP_SK_SM546_T45.bsp Cassini Spacecraft SPK cas_v37.tf Cassini FK 04135_04171pc_psiv2.bc Cassini Spacecraft CK cpck05Mar2004.tpc Cassini Project PCK cas_iss_v09.ti ISS Instrument Kernel phoebe_64q.bds Phoebe DSK \begindata KERNELS_TO_LOAD = ( 'kernels/lsk/naif0008.tls', 'kernels/sclk/cas00084.tsc', 'kernels/spk/981005_PLTEPH-DE405S.bsp', 'kernels/spk/020514_SE_SAT105.bsp', 'kernels/spk/030201AP_SK_SM546_T45.bsp', 'kernels/fk/cas_v37.tf', 'kernels/ck/04135_04171pc_psiv2.bc', 'kernels/pck/cpck05Mar2004.tpc', 'kernels/ik/cas_iss_v09.ti' 'kernels/dsk/phoebe_64q.bds' ) \begintext Solution Source Code
#include <stdio.h> /* Standard CSPICE User Include File */ #include "SpiceUsr.h" #include <stdlib.h> /* Local Parameters */ #define METAKR "fovint.tm" #define STRLEN 50 /* BCVLEN is the maximum number of boundary corner vectors we can retrieve. We've extended this array by 1 element to make room for the boresight vector. */ #define BCVLEN 5 int main (void) { /* Local Variables */ SpiceBoolean lit; SpiceBoolean visibl; SpiceChar ampm [STRLEN]; SpiceChar *boolst [2] = { "false", "true" }; SpiceChar insfrm [STRLEN]; SpiceChar *method [2]; SpiceChar shape [STRLEN]; SpiceChar time [STRLEN]; SpiceChar utctim [STRLEN]; SpiceChar *vecnam[] = { "Boundary Corner 1", "Boundary Corner 2", "Boundary Corner 3", "Boundary Corner 4", "Cassini NAC Boresight" }; SpiceDouble bounds [BCVLEN][3]; SpiceDouble bsight [3]; SpiceDouble emissn; SpiceDouble et; SpiceDouble lat; SpiceDouble lon; SpiceDouble phase; SpiceDouble point [3]; SpiceDouble radius; SpiceDouble solar; SpiceDouble srfvec [3]; SpiceDouble trgepc; SpiceInt hr; SpiceInt i; SpiceInt j; SpiceInt mn; SpiceInt n; SpiceInt nacid; SpiceInt phoeid; SpiceInt sc; SpiceBoolean found; /* Load the kernels that this program requires. We will need: A leapseconds kernel. A SCLK kernel for CASSINI. Any necessary ephemerides. The CASSINI frame kernel. A CASSINI C-kernel. A PCK file with Phoebe constants. The CASSINI ISS I-kernel. A DSK file containing Phoebe shape data. */ furnsh_c ( METAKR ); /* Prompt the user for the input time string. */ prompt_c ( "Input UTC Time: ", STRLEN, utctim ); printf ( "Converting UTC Time: %s\n", utctim ); /* Convert utctim to ET. */ str2et_c ( utctim, &et ); printf ( " ET seconds past J2000: %16.3f\n\n", et ); /* Now we need to obtain the FOV configuration of the ISS NAC camera. To do this we will need the ID code for CASSINI_ISS_NAC. */ bodn2c_c ( "CASSINI_ISS_NAC", &nacid, &found ); /* Stop the program if the code was not found. */ if ( !found ) { printf ( "Unable to locate the ID code for " "CASSINI_ISS_NAC\n" ); exit ( EXIT_FAILURE ); } /* Now retrieve the field of view parameters. */ getfov_c ( nacid, BCVLEN, STRLEN, STRLEN, shape, insfrm, bsight, &n, bounds ); /* Rather than treat BSIGHT as a separate vector, copy it into the last slot of BOUNDS. */ for ( i=0; i<3; i++ ) { bounds[4][i] = bsight[i]; } /* Set values of "method" string that specify use of ellipsoidal and DSK (topographic) shape models. In this case, we can use the same methods for calls to both sincpt_c and ilumin_c. Note that some SPICE routines require different "method" inputs from those shown here. See the API documentation of each routine for details. */ method[0] = "Ellipsoid"; method[1] = "DSK/Unprioritized"; /* Get Phoebe ID. We'll use this ID code later, when we compute local solar time. */ bodn2c_c ( "PHOEBE", &phoeid, &found ); /* The ID code for PHOEBE is built-in to the library. However, it is good programming practice to get in the habit of checking your found-flags. */ if ( !found ) { printf ( "Unable to locate the body ID code " "for Phoebe.\n" ); exit ( EXIT_FAILURE ); } /* Now perform the same set of calculations for each vector listed in the BOUNDS array. Use both ellipsoidal and detailed (DSK) shape models. */ for ( i=0; i<5; i++ ) { printf ( "Vector: %s\n", vecnam[i] ); for ( j = 0; j < 2; j++ ) { printf ( "\n Target shape model: %s\n\n", method[j] ); /* Call sincpt_c to determine coordinates of the intersection of this vector with the surface of Phoebe. */ sincpt_c ( method[j], "PHOEBE", et, "IAU_PHOEBE", "LT+S", "CASSINI", insfrm, bounds[i], point, &trgepc, srfvec, &found ); /* Check the found flag. Display a message if the point of intersection was not found, otherwise continue with the calculations. */ if ( !found ) { printf ( "No intersection point found at " "this epoch for this vector.\n" ); } else { /* Now, we have discovered a point of intersection. Start by displaying the position vector in the IAU_PHOEBE frame of the intersection. */ printf ( " Position vector of surface intercept " "in the IAU_PHOEBE frame (km):\n" ); printf ( " X = %16.3f\n", point[0] ); printf ( " Y = %16.3f\n", point[1] ); printf ( " Z = %16.3f\n", point[2] ); /* Display the planetocentric latitude and longitude of the intercept. */ reclat_c ( point, &radius, &lon, &lat ); printf ( " Planetocentric coordinates of " "the intercept (degrees):\n" ); printf ( " LAT = %16.3f\n", lat * dpr_c() ); printf ( " LON = %16.3f\n", lon * dpr_c() ); /* Compute the illumination angles at this point. */ illumf_c( method[j], "PHOEBE", "SUN", et, "IAU_PHOEBE", "LT+S", "CASSINI", point, &trgepc, srfvec, &phase, &solar, &emissn, &visibl, &lit ); printf ( " Phase angle (degrees): " "%16.3f\n", phase * dpr_c() ); printf ( " Solar incidence angle (degrees): " "%16.3f\n", solar * dpr_c() ); printf ( " Emission angle (degrees): " "%16.3f\n", emissn * dpr_c() ); printf ( " Observer visible: %s\n", boolst[visibl] ); printf ( " Sun visible: %s\n", boolst[lit] ); if ( i == 4 ) { /* Compute local solar time corresponding to the TDB light time corrected epoch at the boresignt intercept. */ et2lst_c ( trgepc, phoeid, lon, "PLANETOCENTRIC", STRLEN, STRLEN, &hr, &mn, &sc, time, ampm ); printf ( "\n Local Solar Time at boresight " "intercept (24 Hour Clock):\n" ); printf ( " %s\n", time ); } /* End of LST computation block. */ } /* End of shape model loop. */ } /* End of vector loop. */ printf ( "\n" ); } return(0); } Solution Sample Output
Input UTC Time: 2004 jun 11 19:32:00 Converting UTC Time: 2004 jun 11 19:32:00 ET seconds past J2000: 140254384.185 Vector: Boundary Corner 1 Target shape model: Ellipsoid Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 91.026 Y = 67.190 Z = 2.030 Planetocentric coordinates of the intercept (degrees): LAT = 1.028 LON = 36.432 Phase angle (degrees): 28.110 Solar incidence angle (degrees): 16.121 Emission angle (degrees): 14.627 Observer visible: true Sun visible: true Target shape model: DSK/Unprioritized Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 78.770 Y = 61.570 Z = 0.964 Planetocentric coordinates of the intercept (degrees): LAT = 0.552 LON = 38.013 Phase angle (degrees): 28.110 Solar incidence angle (degrees): 31.132 Emission angle (degrees): 16.539 Observer visible: true Sun visible: true Vector: Boundary Corner 2 Target shape model: Ellipsoid Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 89.991 Y = 66.726 Z = 14.733 Planetocentric coordinates of the intercept (degrees): LAT = 7.492 LON = 36.556 Phase angle (degrees): 27.894 Solar incidence angle (degrees): 22.894 Emission angle (degrees): 14.988 Observer visible: true Sun visible: true Target shape model: DSK/Unprioritized Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 76.586 Y = 60.579 Z = 13.657 Planetocentric coordinates of the intercept (degrees): LAT = 7.962 LON = 38.344 Phase angle (degrees): 27.894 Solar incidence angle (degrees): 32.013 Emission angle (degrees): 11.845 Observer visible: true Sun visible: true Vector: Boundary Corner 3 Target shape model: Ellipsoid Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 80.963 Y = 76.643 Z = 14.427 Planetocentric coordinates of the intercept (degrees): LAT = 7.373 LON = 43.430 Phase angle (degrees): 28.171 Solar incidence angle (degrees): 21.315 Emission angle (degrees): 21.977 Observer visible: true Sun visible: true Target shape model: DSK/Unprioritized Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 68.677 Y = 71.100 Z = 13.444 Planetocentric coordinates of the intercept (degrees): LAT = 7.745 LON = 45.993 Phase angle (degrees): 28.171 Solar incidence angle (degrees): 36.039 Emission angle (degrees): 14.474 Observer visible: true Sun visible: true Vector: Boundary Corner 4 Target shape model: Ellipsoid Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 81.997 Y = 77.106 Z = 1.698 Planetocentric coordinates of the intercept (degrees): LAT = 0.865 LON = 43.239 Phase angle (degrees): 28.385 Solar incidence angle (degrees): 13.882 Emission angle (degrees): 21.763 Observer visible: true Sun visible: true Target shape model: DSK/Unprioritized Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 73.186 Y = 73.131 Z = 0.934 Planetocentric coordinates of the intercept (degrees): LAT = 0.517 LON = 44.978 Phase angle (degrees): 28.385 Solar incidence angle (degrees): 41.268 Emission angle (degrees): 17.493 Observer visible: true Sun visible: true Vector: Cassini NAC Boresight Target shape model: Ellipsoid Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 86.390 Y = 72.089 Z = 8.255 Planetocentric coordinates of the intercept (degrees): LAT = 4.196 LON = 39.844 Phase angle (degrees): 28.139 Solar incidence angle (degrees): 18.247 Emission angle (degrees): 17.858 Observer visible: true Sun visible: true Local Solar Time at boresight intercept (24 Hour Clock): 11:31:50 Target shape model: DSK/Unprioritized Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 74.326 Y = 66.602 Z = 7.247 Planetocentric coordinates of the intercept (degrees): LAT = 4.153 LON = 41.863 Phase angle (degrees): 28.139 Solar incidence angle (degrees): 33.200 Emission angle (degrees): 9.230 Observer visible: true Sun visible: true Local Solar Time at boresight intercept (24 Hour Clock): 11:39:55 Extra Credit
|


PREM JOSHI
About Us
Why Donate?
Home
Every small donation will make BIG difference!
Thanks for the donation!


Speaker App
Azure Serverless App by Ankit
Find tech speakers for your events
Add speaker
Name
Title
Location
Skills
ImageCaption
Actions
{{ speaker.name }}
{{ speaker.title }}
{{ speaker.location }}
{{ speaker.skills}}
{{ speaker.headshotCaption}}
Edit
Delete
Visit my github link
Add new speaker
Name
Title
Location
Skills
Link to Headshot
Create
Cancel
{{ speaker.name }}
Title:
{{ speaker.title }}
Location:
{{ speaker.location }}
Skills:
{{ speaker.skills }}
AnalysedCaption:
{{ speaker.headshotCaption }}
Back to speaker list
Edit speaker
Name
Title
Location
Skills
Link to Headshot
Save
Cancel
Delete speaker: {{ speaker.name }}
The action cannot be undone.
Delete
Cancel


MKFeedItem Class Reference
| Inherits from | NSObject |
| Conforms to | NSCoding |
| Declared in | MKFeedItem.h |
Overview
Overview
MKFeedItem class holds data from an RSS or ATOM feed. Each instance holds the the data of one feed item. This is default class for accessing data from a MKFeedParser instace. It can also be used independently.
Key Value Coding
MKFeedItem instance are Key Value Coded for the itemTitle, itemContent, and itemAuthor properties to support seaches with NSPredicate instances.
Required Frameworks
- Foundation
Required Classes
Tasks
Creating Instances
-
- initWithType:
Creates and instace of MKFeedItem with the given source type.
Adding Content
-
- addValue:forElement:
Adds a value for a feed element.
Accessing Content
-
contentType
The type of feed that is being used. This will return one of three possibilities:-
MKFeedSourceTypeRSS
: a RSS feed -
MKFeedSourceTypeAtom
: an Atom feed -
MKFeedSourceTypeUnknown
: an unknown feed type
-
-
itemTitle
The tilte of the feed item. This property is KVC compatible. -
itemContent
The content of the feed item. This property is KVC compatible. -
itemLinkURL
The URL link of the feed item. -
itemOriginalLinkURL
The original URL link of the feed item. -
itemAuthor
The author of the feed item. This property is KVC compatible. -
itemGUID
The GUID of the feed item. -
itemPubDate
The published date of the feed item.
Instance Methods
addValue:forElement:
Adds a value for a feed element.
- (void)addValue:(id)value forElement:(NSString *)element
Parameters
- value
- the value of the element. This will typically be a NSString.
- element
- the name of the feed element.
Declared In
MKFeedItem.h
initWithType:
Creates and instace of MKFeedItem with the given source type.
- (id)initWithType:(MKFeedSourceType)type
Parameters
- MKFeedSourceType
- the type of feed, options are:
-
MKFeedSourceTypeRSS
: a RSS feed -
MKFeedSourceTypeAtom
: an Atom feed -
MKFeedSourceTypeUnknown
: an unknown feed type
-
Declared In
MKFeedItem.h
Properties
contentType
The type of feed that is being used. This will return one of three possibilities:
-
MKFeedSourceTypeRSS
: a RSS feed -
MKFeedSourceTypeAtom
: an Atom feed -
MKFeedSourceTypeUnknown
: an unknown feed type
@property (nonatomic, readonly) MKFeedSourceType contentType
Declared In
MKFeedItem.h
itemAuthor
The author of the feed item. This property is KVC compatible.
@property (nonatomic, readonly) NSString *itemAuthor
Declared In
MKFeedItem.h
itemContent
The content of the feed item. This property is KVC compatible.
@property (nonatomic, readonly) NSString *itemContent
Declared In
MKFeedItem.h
itemGUID
The GUID of the feed item.
@property (nonatomic, readonly) NSString *itemGUID
Declared In
MKFeedItem.h
itemLinkURL
The URL link of the feed item.
@property (nonatomic, readonly) NSString *itemLinkURL
Declared In
MKFeedItem.h
itemOriginalLinkURL
The original URL link of the feed item.
@property (nonatomic, readonly) NSString *itemOriginalLinkURL
Declared In
MKFeedItem.h


Interface LongRunningRecognizeResponseOrBuilder
{% verbatim %}
public interface LongRunningRecognizeResponseOrBuilder extends MessageOrBuilder
Implements
com.google.protobuf.MessageOrBuilder
{% endverbatim %}
Methods
getResults(int index)
public abstract SpeechRecognitionResult getResults(int index)
Sequential list of transcription results corresponding to
sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
Parameter
| Type |
Name |
Description |
| int |
index |
|
Returns
getResultsCount()
public abstract int getResultsCount()
Sequential list of transcription results corresponding to
sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
Returns
getResultsList()
public abstract List<SpeechRecognitionResult> getResultsList()
Sequential list of transcription results corresponding to
sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
Returns
getResultsOrBuilder(int index)
public abstract SpeechRecognitionResultOrBuilder getResultsOrBuilder(int index)
Sequential list of transcription results corresponding to
sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
Parameter
| Type |
Name |
Description |
| int |
index |
|
Returns
getResultsOrBuilderList()
public abstract List<? extends SpeechRecognitionResultOrBuilder> getResultsOrBuilderList()
Sequential list of transcription results corresponding to
sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
Returns
| Type |
Description |
| java.util.List<? extends com.google.cloud.speech.v1.SpeechRecognitionResultOrBuilder> |
|
Implements
com.google.protobuf.MessageOrBuilder


In the life of a designer or font maker, the need arises to see how a font looks on a certain image, with a certain color and size, or simply, have a reliable preview of the final result. To do this, graphical tools are required.
Preview of a font
To work with font previews, there are system previewers at the level of any operating system. This is a great starter tool to see what a font will look like on our project. The problem is that you can’t do many customizations with these tools.
Graphics tool
To change phrase, color, size and background you need advanced image tools, such as Photoshop, GIMP, etc.
But even here, we can see font previews only from the font selection menu.
To customize the sentence, for example, we have to insert the text in our project and scroll through the fonts to be tested one by one. Let’s say that we would like to test only the system fonts (at least a hundred), it takes a long time; and this, just for one project.
Command tool
A quicker way is to use command line tools. These can be faster if used wisely.
The most popular being written in bash, is font preview
which comes as a font selector. As you select a font, the tool presents a quick preview of what the font will look like.
This is very useful, but to customize color and size, you have to configure it by exporting variables, see doc. It’s fine for a single preview, but for many, it gets cumbersome.
Web tool
There may also be web alternatives, but even these are limited to the fonts set in the application. Here are a few:
Python fontpreview
To get dynamic previews based on different fonts, you need a tool that does not interact with the user. The python library fontpreview
, helps us to automate and speed up this process. Let’s see how.
Develop a simple previewer
First, let’s read the documentation and install the package. We understand from it that there are various objects that could do for us.
The FontPreview
object is just right for us. Let’s see how to create a preview of a font in just three lines of code.
from fontpreview import FontPreview
fp = FontPreview('/tmp/noto.ttf') # path of font file
fp.save('/tmp/fp.png') # default directory is working directory
In this way, however, we have obtained a preview without customizations, which means that we have equaled the other tools mentioned above.
But this object allows a series of customizations that are right for us. Now let’s modify our script, so that the background color is blue while the font color is yellow and the sentence as we want it. Also, we can set a default folder /home/font_previews
, so that every font we put in it will create a preview.
from fontpreview import FontPreview
import os
FONT_PATH = '/home/font_previews'
for file in os.listdir(FONT_PATH):
font_file = os.path.join(FONT_PATH, file)
fp = FontPreview(font_file,
font_size=50,
font_text='My personal preview',
bg_color='blue',
fg_color='yellow')
fp.save(f'/tmp/{file}.png')
Now, we can run 100 font previews in less than two seconds.
Let’s save this file as blue-yellow-font-previewer.py
and try it on the command line.
$ python3 blue-yellow-font-previewer.py
More complex preview
This library not only has objects for previewing fonts, but also special objects for advanced image composition based on fonts.
Let’s imagine that some designers give us indications of color, size, background images and other information about the final project. With this library we can really range in any type of layout.
A complex and fascinating example is reproducing the preview of the Fira Code font that can be seen on the official GitHub page Fira Code preview.
Let’s see how to code this preview with the fontpreview
module.
from fontpreview import FontBanner, FontWall
fira_code = '/tmp/firacode.ttf'
# RGB group = ('background', 'FIRA COD color', 'Ligature color', 'E color background')
colors_group = [
('black', (0, 143, 0), (0, 236, 236), (255, 0, 255)),
('black', (166, 47, 123), (81, 208, 93), (11, 179, 248)),
((13, 21, 43), (112, 204, 84), (226, 110, 34), (223, 245, 90)),
((43, 6, 42), (136, 126, 135), (4, 150, 153), (147, 103, 145)),
((39, 57, 85), (255, 241, 208), (208, 84, 0), (209, 215, 227)),
((31, 63, 89), (248, 248, 242), (230, 219, 117), (166, 226, 51)),
((1, 47, 80), (224, 202, 52), (73, 217, 38), (255, 125, 158)),
((0, 0, 170), (75, 224, 245), (255, 255, 85), (0, 170, 170)),
('white', 'black', 'black', 'black'),
((247, 247, 247), (167, 29, 93), (121, 93, 163), (0, 134, 179)),
((239, 240, 243), (15, 131, 207), (208, 84, 0), (105, 40, 122)),
((239, 231, 212), (218, 116, 53), (0, 142, 212), (186, 136, 0)),
((39, 40, 34), (132, 214, 45), (249, 39, 114), (174, 129, 255)),
((43, 48, 59), (180, 142, 173), (143, 161, 179), (152, 190, 140)),
((32, 32, 32), (171, 130, 84), (160, 171, 127), (216, 127, 98)),
((0, 43, 54), (0, 160, 153), (126, 143, 3), (218, 66, 130))
]
banners = []
# Create banners
for colors in colors_group:
# Create a FontBanner objects
fb = FontBanner(fira_code, (413, 240))
liga = FontBanner(fira_code, (413, 240))
E = FontBanner(fira_code, (40, 70))
# Set background colors
fb.bg_color = liga.bg_color = colors[0]
E.bg_color = colors[3]
# Set foreground colors
fb.fg_color = colors[1]
liga.fg_color = colors[2]
E.fg_color = colors[0]
# Set text
fb.font_text = 'FIRA COD'
liga.font_text = "!=->>++:="
E.font_text = 'E'
# Set text position
E.set_text_position('ltop')
fb.set_text_position((25, 60))
liga.set_text_position('top')
# Adding image on fb
fb.add_image(liga, (0, 122))
fb.add_image(E, (339, 60))
# Add to list of banners
banners.append(fb)
# Create a wall
fw = FontWall(banners, max_tile=4)
fw.save('/tmp/fira_code.png')
And this is result.
Command line preview
This package also comes with a simple command line tool that is used to make simple previews. Of course, if placed in the right context, such as a bash loop, it is possible to run several previews with a single script.
#!/bin/bash
for filename in $(/home/font_previews/*); do
fp -t "My personal preview" -b "blue" -f "yellow" -z 50 -s "/tmp/${filename}.png" /home/font_previews/$filename
done
This simple script performs the same result as the python script in the “Develop a simple previewer” section.
Conclusion
There are many differences between designers and DevOps. Designers use tools that require a lot of human intervention, DevOps try to use the keyboard and mouse as little as possible. Both have creativity. Using these tools, such as fontpreview, bridges this gap that exists between the world of DevOps and designers and make everyone a little freer by saving time.


This component has no HTML children.
In case the controller isn't set up then the component will be rendered in this fashion :
But in case a controller with the onFilesSelect function exists and the psk-files-chooser sends an event, then the component will be rendered like this:


Stores an OID request. More...
#include <Packet.h>
Data Fields | |
| LIST_ENTRY | ListElement |
| Used to handle lists of requests. | |
| NDIS_EVENT | InternalRequestCompletedEvent |
| NDIS_REQUEST | Request |
| The structure with the actual request, that will be passed to NdisRequest(). | |
| NDIS_STATUS | RequestStatus |
Stores an OID request.
This structure is used by the driver to perform OID query or set operations on the underlying NIC driver. The OID operations be performed usually only by network drivers, but NPF exports this mechanism to user-level applications through an IOCTL interface. The driver uses this structure to wrap a NDIS_REQUEST structure. This allows to handle correctly the callback structure of NdisRequest(), handling multiple requests and maintaining information about the IRPs to complete.
Definition at line 163 of file Packet.h.
| NDIS_EVENT InternalRequestCompletedEvent |
| LIST_ENTRY ListElement |
| NDIS_REQUEST Request |
| NDIS_STATUS RequestStatus |
documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 CACE Technologies. All rights reserved.


Approximately 30 years after the destruction of the second Death Star, Luke Skywalker, the last Jedi, has disappeared. The First Order has risen from the fallen Galactic Empire and seeks to eliminate Luke and the Republic. The Resistance, backed by the Republic and led by Luke's twin sister, General Leia Organa, opposes them while searching for Luke to enlist his aid. Resistance pilot Poe Dameron meets village elder Lor San Tekka on the planet Jakku to obtain a map to Luke's location. Stormtroopers under the command of Kylo Ren destroy the village and capture Poe. Poe's droid BB-8 escapes with the map, and encounters a scavenger, Rey, at a junkyard settlement. Ren tortures Poe and learns of BB-8. Stormtrooper FN-2187, unable to kill for the First Order, frees Poe and they escape in a stolen TIE fighter; Poe dubs FN-2187 "Finn". They crash on Jakku, and Finn appears to be the only survivor. He encounters Rey and BB-8, but the First Order tracks them and launches an airstrike. Finn, Rey and BB-8 flee the planet in a stolen, rundown ship, the Millennium Falcon. The Falcon breaks down, and is captured by a much larger ship, piloted by Han Solo and Chewbacca, who reclaim their former vessel. Gangs seeking to settle debts with Solo board the ship and attack, but the five escape in the Falcon. The gangs inform the First Order of Han's involvement. At the First Order's Starkiller Base, a planet converted to a superweapon capable of destroying star systems, Supreme Leader Snoke orders General Hux to use the weapon for the first time. Snoke also questions Ren about the involvement of his father, Han Solo; Ren protests that Han means nothing to him. The Falcon crew view BB-8's map and determine it is incomplete. Han explains that Luke tried to rebuild the Jedi Order but went into exile after an apprentice turned to the dark side and destroyed all that Luke had built. They travel to the planet Takodana and meet with cantina owner Maz Kanata, who can help BB-8 reach the Resistance, but Finn wants to flee on his own. Rey is drawn to a vault and finds the lightsaber that belonged to Luke and his father Anakin Skywalker before him. She experiences disturbing visions and flees into the woods. Maz gives Finn the lightsaber for safekeeping. Starkiller Base destroys the Republic capital and fleet. The First Order attacks Takodana in search of BB-8. Han, Chewbacca, and Finn are saved by Resistance X-wing fighters led by Poe, but Rey is captured by Ren and taken to Starkiller Base. Ren interrogates Rey about the map, but she resists his mind-reading. Discovering she, too, can use the Force, she escapes her cell with a Jedi mind trick. Leia arrives at Takodana with C-3PO and reunites with Han and Chewbacca. At the Resistance base on D'Qar, BB-8 finds R2-D2, who has been inactive since Luke's disappearance.  Leia urges Han to return their son alive. Using the Falcon, Han, Chewbacca, and Finn infiltrate the base. They lower its shield, find Rey, set explosives, and encounter Ren. Han confronts Ren, calling him by his birth name, Ben, and implores him to abandon the dark side. Though conflicted, Ren kills Han. Enraged, Chewbacca shoots Ren in the side and sets off the explosives, allowing the Resistance X-wing fighters to attack and start a chain reaction that destroys Starkiller Base. The injured Ren pursues Finn and Rey to the surface. Finn battles Ren with the lightsaber, but is overpowered and badly wounded. Rey takes the lightsaber and fights Ren, overpowering him with the Force before they are separated by a fissure. Snoke orders Hux to evacuate and bring Ren to him, while Rey and Chewbacca escape with Finn in the Falcon. On D'Qar, the Resistance celebrates while Leia, Chewbacca, and Rey mourn Han's death. R2-D2 awakens and reveals the rest of the map, which Rey follows with R2-D2 and Chewbacca to an island on a distant planet. She finds Luke and presents him with his lightsaber.


Lara Croft is back for another adventure
Shadow of the Tomb Raider: Definitive Edition Released for Linux
by By Joey SneddonShadow of the Tomb Raider: Definitive Edition is now available on Linux and macOS.
The third entry in the rebooted Tomb Raider ‘origins’ series, Shadow pits Lara Croft against the “impenetrable jungles of Central America”, sees her explore underwater environments, and take on a rogue paramilitary organisation known as Trinity.
The Linux and macOS ports of the game, which received fairly decent reviews on its console debut, is handled by Feral Interactive.
But rather than just port the base game and leave it at that, they’ve brought over all Shadow’s extras, upgrades and downloadable content too:
- The Forge
- The Pillar
- The Nightmare
- The Price of Survival
- The Serpent’s Heart
- The Grand Caiman
- The Path Home
The inclusion of all that makes this definitive edition of Shadow of the Tomb Raider exactly that: definitive!
System requirements for Shadow of the Tomb Raider: Definitive Edition on Linux aren’t as restrictive as I’d have assumed either, and asks for:
- A Vulkan-supported AMD GPU w/ Mesa 19.0+ or
- A Vulkan-supported NVIDIA GPU w/ driver 418.56+
- 3.40GHz CPU
- 8GB RAM (16GB recommended)
The game itself is available to purchase via Steam or direct from the Feral Store (purchases can be redeemed on Steam).
A Linux or macOS copy of Shadow of the Tomb Raider Definitive Edition costs £44.99/$59.99 (at RRP; future sales and offers may take it lower).


{% extends "bootstrap/base.html" %} {% import "bootstrap/wtf.html" as wtf %} {% import "bootstrap/fixes.html" as fixes %} {% import "bootstrap/utils.html" as util %} {% block styles %} {{ super() }} {% endblock %} {% block title %}Upload{% endblock %} {% block content %}
This web application is for uploading precompiled BEL scripts to the cache. It accepts files in the
gpickle format, created by running python3 -m pybel convert -p my_document.bel --pickle
my_document.gpickle
in your favorite command line or programmatically in Python with
pybel.to_pickle.


BlackApp
When you work with us, you are part of a team of commited collaborators. All aspects of our softwaredevelopment process are intergrated , interactive and agile.
Our approach unifies design, development and product managent to create exceptional products.
We start each project by understanding your business goals, the users needs and the product requirements.
Then we help translate them into active and elegant solutions.
DESIGN
All engineers are fluent in the latest enterprise, mobile and web development technologies. They collaborate with your team to write, and improve code on a daily basis, using proven practices such as test-driven development and pair programming.
DEVELOPMENT
PRODUCT MANAGEMENT


I am currently a senior at Lewis and Clark College, pursuing a major in mathematics and computer science, and a minor in economics. I intend to be a Software Engineer, as I am passionate about solving problems by creating meaningful applications. I am actively looking for positions as a software engineer!
My interests are in artificial intelligence and cloud computing, but I have dabbled with many technologies. I have worked on AI projects such as image recognition, recommendation systems, stock price predictions, AI within games, and so on. I have worked on cloud computing projects such as creating my personal VPC, a text-to-speech program, LAMP servers, and website hosting. Currently, I am working on an OCR application hosted on AWS. I am curious by nature and love to be a part of something bigger, pushing the boundaries of technology.


|
Spring Security Framework | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
| Interface Summary | |
|---|---|
| AccessControlEntry | Represents an individual permission assignment within an Acl . |
| Acl | Represents an access control list (ACL) for a domain object. |
| AclService | Provides retrieval of Acl instances. |
| AuditableAccessControlEntry | Represents an ACE that provides auditing information. |
| AuditableAcl | A mutable ACL that provides audit capabilities. |
| MutableAcl | A mutable Acl. |
| MutableAclService | Provides support for creating and storing Acl instances. |
| OwnershipAcl | A mutable ACL that provides ownership capabilities. |
| Permission | Represents a permission granted to a Sid for a given domain object. |
| Class Summary | |
|---|---|
| AclFormattingUtils | Utility methods for displaying ACL information. |
| Exception Summary | |
|---|---|
| AlreadyExistsException | Thrown if an Acl entry already exists for the object. |
| ChildrenExistException | Thrown if an Acl cannot be deleted because children Acl s exist. |
| IdentityUnavailableException | Thrown if an ACL identity could not be extracted from an object. |
| NotFoundException | Thrown if an ACL-related object cannot be found. |
| UnloadedSidException | Thrown if an Acl cannot perform an operation because it only loaded a subset of Sid s and
the caller has requested details for an unloaded Sid . |
Interfaces and shared classes to manage access control lists (ACLs) for domain object instances.
|
Spring Security Framework | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |


The Linux container engine
You are using an outdated browser. Please upgrade your browser to improve your experience.


Writing a bash script
Most repositories benefit from a set of “quality of life” scripts.
Bash is by far the lowest common denominator.
It is easy to extend holonix with custom bash scripts.
NixOS provides a function writeShellScriptBin
that takes a name, any bash string, creates a binary and puts it on the PATH
.
The name is literally what will be executed on the command line by users so must be globally unique.
This is the example bash script to nixify:
set -euo pipefail
# create a zip of our awesome assets
zip -r my-assets.zip ./assets
Nix helps us achieve a few things:
- ensuring the
zip
command exists when the script runs - version controlling the
zip
command with our code - use a version of
zip
compatible with holonix and HoloPortOS - centralizing config such as our assets path
- manage permissions and the
PATH
- bundles everything in a format that can be re-used as a
buildInput
to other nix derivations downstream
Quick and dirty
The absolute minimum is to add the writeShellScriptBin
directly to the buildInputs
in ./default.nix
.
All this syntax is explained below.
{
# ...
buildInputs = [ ]
++ holonix.shell.buildInputs
++ config.buildInputs
++ [
# zip assets script
(holonix.pkgs.writeShellScriptBin "assets-zip" ''
set -euo pipefail
zip -r assets.zip ./public/assets
'')
# the zip command pinned in holonix
holonix.pkgs.zip
];
}
This allows us to run the assets-zip
command inside the nix shell.
It also gives us all the benefits of version control.
If we have a lot of scripts this will get unwieldy to keep in a single file.
NixOS boilerplate
One way to extend holonix without everything in a giant list of scripts is to split each implementation into three parts:
- the script derivation in a dedicated
./foo/default.nix
file - any top level configuration added to
./config.nix
- calling
./foo/default.nix
from./default.nix
and adding the returnedbuildInputs
.
assets/default.nix
{ pkgs, config }:
let
zip-script = pkgs.writeShellScriptBin "assets-zip" ''
set -euo pipefail
zip -r ${config.assets.zip-name} ${config.assets.path}
'';
in
{
buildInputs = [
zip-script
pkgs.zip
];
}
pkgs
is passed in from./default.nix
as an argument in{ pkgs }:
- the
let
andin
block binds some values for the following scope assets-path
andzip-name
set some values we might want to change over timezip-script
usespkgs.writeShellScriptBin
to create a binary calledassets-zip
from our bash script- the bash script uses the
''
notation for a string literal block - the bash script uses
${...}
notation to interpolate nix values set earlier in thelet
block into the bash script string zip-script
is added tobuildInputs
pkgs.zip
is added tobuildInputs
so that NixOS includes thezip
command in the shell
./config.nix
{
# configuration for our assets management scripts
assets = {
path = "./public/assets";
zip-name = "assets.zip";
};
# ...
}
- all additional config is added as key value pairs to the existing boilerplate
- in this case the config is nested as
assets.path
andassets.zip-name
- this config is only read at “compile time” when the nix shell is built
./default.nix
{
# ...
buildInputs = [ ]
++ holonix.shell.buildInputs
++ config.buildInputs
# scripts for working with assets
++ (holonix.pkgs.callPackage ./assets {
pkgs = holonix.pkgs;
# config is imported at the top of this file
config = config;
}).buildInputs
}
default.nix
callsassets/default.nix
as a functiondefault.nix
passes theholonix.pkgs
toassets/default.nix
as thepkgs
argumentdefault.nix
passes the imported config toassets/default.nix
as theconfig
argumentdefault.nix
appends the returned.buildInputs
property to its internalbuildInputs
Strings
NixOS “compiles” bash scripts when the nix-shell is created.
Bash may do additional variable substitutions at runtime.
The NixOS values are immutable and hashed as part of the derivation.
Bash values are dependant on the state of the environment.
Both options are useful in different situations.
For example, it is great to be able to keep release versions tracked in git as nix config. Bash variables may help to integrate with remote systems at runtime such as pulling data with curl
.
Bash has many syntaxes for slightly different things.
One of the syntaxes for string interpolation looks like this:
#!/usr/bin/env bash
export $my_var=foo
echo "my_var is: ${my_var}"
This can’t always be avoided.
For example string substitution requires it:
#!/usr/bin/env bash
firstString="I love Suzi and Marry"
secondString="Sara"
echo "${firstString/Suzi/$secondString}"
# prints 'I love Sara and Marry'
In this case nix would treat the ${...}
as a nix expression if included in a nix string and error when building the derivation.
The solution is to escape the substitution in nix with ''${..}
syntax.
This will compile and bash will handle the string substitution correctly:
''
#!/usr/bin/env bash
firstString="I love Suzi and Marry"
secondString="Sara"
echo "''${firstString/Suzi/$secondString}"
# prints 'I love Sara and Marry'
''