The Rockstar Games That Still Need PC Ports
by Zack ZwiezenRed Dead Redemption 2 was finally released for PC earlier this month, nearly a year after it was first released for PS4 and Xbox One. It has had a rough launch, but a few patches and fan mods will turn it into the best way to play RDR2. But while most of Rockstar’s recent games have found their way to PC, eventually, there are still a few games that are missing PC ports.
Red Dead Redemption
Released For Xbox 360, PS3 | 2010
The big one. Of all the games that Rockstar has never released on PC, this is easily the most bizarre and frustrating. I can only imagine what a proper PC port of RDR would look like. Then I imagine the mods and I weep that we still don’t have this game on PC. Maybe one day fans will take RDR2 and mod in the RDR1 campaign. But they shouldn’t have to do that. Come on Rockstar, fix this wrong and bring John Marston to PC.
Red Dead Revolver
Released For PS2 and Xbox | 2004
The original Red Dead also deserves to make the leap to PC too. Sure, it was ported to PS4, but I want a full-on PC port. I feel like a lot of folks haven’t played Revolver. Which is a shame. It might not be as big or epic as RDR1 or 2, but it has its own charm and also was the origin of stuff like Dead Eye.
Midnight Club 3
Released For PS2, Xbox, PSP | 2006
The Midnight Club series has always seemed like the red-headed stepchild of Rockstar franchises. Even after multiple releases on various platforms, it never seems to be a series Rockstar is heavily invested in. The first game only came to PS2. The second game, however, came to Xbox and PC too. But then Midnight Club 3 and its follow up, Midnight Club LA, skipped PC again. Over a decade later it seems Midnight Club 3 and LA are both stranded on old consoles. And the series doesn’t seem to be coming back anytime soon.
The Warriors
Released For PS2, Xbox | 2005
It might seem wild, but The Warriors is one of Rockstar’s best PS2-era games. Its fighting system is still fun to go back to all these years later and the attention to detail Rockstar included made it clear they REALLY loved the original film. The Warriors is also a strange game. It’s a licensed game based on a cult classic film from the 70s. And The Warriors is also not on PC. It has been ported, like Red Dead Revolver, to PS4. So there is an easy way to play it in 2019. But a PC port would be wonderful and would help expose this game to a bunch of people who might have skipped in a decade and a half ago.
Grand Theft Auto: Chinatown Wars
Released For PSP, Nintendo DS, Phones | 2009 (ios 2010, Android 2014)
I love Chinatown Wars and I hate that over 10 years after it first came out, there isn’t a great and easy way to play this game on my computer. I’ve tried Android emulators using the copy I bought back in 2014. They just don’t cut it. I know folks have emulated the PSP version on PC, but that never looks good enough. I want a true PC port of Chinatown Wars. The game is great, a return to the classic GTA top-down style, but using new tech and gameplay innovations. And the drug dealing system is almost its own separate and equally fun game.
Grand Theft Auto: Liberty City Stories & Vice City Stories
Released For PSP, PS2, Mobile Phones | LCS- 2005, Phones 2016 | VCS 2006
It is strange that these two GTA games never made the leap to PC. All other 3D era games, like San Andreas, made the leap to PC. And even the newer GTA games, eventually, got PC ports. But these two games, both side stories that reuse assets and maps from Vice City and GTA III, seem to have been forgotten. In the case of Vice City Stories, it seems like Rockstar has truly forgotten about it. While Liberty Cities Stories eventually was ported to phones in 2016, VCS has yet to even make it to mobile phones. So it seems unlikely either will show up on PC anytime soon.
Thrasher: Skate And Destroy
Released For PS1 | 1999
This is a pipe dream, but I think it would be cool to get this game officially released for anything beyond its original PlayStation 1 release. It was a different take on the skateboarding game, which had been popularised by the Tony Hawk Pro Skater series. It was grittier. Harder. Bloodier. It wasn’t as popular or fun as THPS, but it would be nice to see it return on GOG.com or Steam. Until then you can always emulate Thrasher.
There are probably a bunch of different reasons for these games never getting ported to PC. Lack of fan interest, too expensive, too much work, etc. But maybe, just maybe, some of these games will get the PC ports they deserve. Freeing games like Chinatown Wars and Red Dead Redemption 1 from old consoles is a great way to better preserve them and to allow fans to even improve them, making them better to go back to all these years later.


10
1 After Abimelech, Tola the son of Puah (the son of Dodo), a man from Issachar who lived in Shamir, in the hill country of Ephraim, arose to deliver Israel.
2 He judged Israel twenty-three years. He died and was buried in Shamir.
3 He was followed by Jair the Gileadite. He judged Israel twenty-two years.
4 He had thirty sons who rode on thirty donkeys, and they had thirty cities, which are called Havvoth Jair to this day, which are in the land of Gilead.
5 Jair died and was buried in Kamon.
6 The people of Israel added to the evil they had done in the sight of Yahweh and worshiped the Baals, the Ashtoreths, the gods of Aram, the gods of Sidon, the gods of Moab, the gods of the people of Ammon, and the gods of the Philistines. They abandoned Yahweh and no longer worshiped him.
7 Yahweh burned with anger toward Israel, and he gave them to the Philistines and to the Ammonites, to conquer them.
8 They crushed and oppressed the people of Israel that year, and for eighteen years they oppressed all the people of Israel who were beyond the Jordan in the land of the Amorites, which is in Gilead.
9 And the Ammonites crossed over the Jordan to fight against Judah, against Benjamin, and against the house of Ephraim, so that Israel was greatly distressed.
10 Then the people of Israel called out to Yahweh, saying, "We have sinned against you, because we abandoned our God and worshiped the Baals."
11 Yahweh said to the people of Israel, "Did I not deliver you from the Egyptians, the Amorites, the Ammonites, the Philistines,
12 and also from the Sidonians? The Amalekites and the Maonites oppressed you; you called out to me, and I delivered you from their power.
13 Yet you abandoned me again and worshiped other gods. Therefore, I will not keep adding to the times I deliver you.
14 Go and call out to the gods that you have worshiped. Let them rescue you when you have trouble."
15 The people of Israel said to Yahweh, "We have sinned. Do to us whatever seems good to you. Only please, rescue us this day."
16 They turned away from the foreign gods they owned, and they worshiped Yahweh. And he became impatient over the misery of Israel.
17 Then Ammonites gathered together and set up camp in Gilead. The Israelites came together and set up their camp at Mizpah.
18 The leaders of the people of Gilead said one to another, "Who is the man who will begin to fight the Ammonites? He will become the leader over all those who are living in Gilead."


Nissan Micra N-Sport review – Supermini's fun on the run
The latest, sportier Nissan Micra N-Sport is much more enjoyable to drive and has just won the Small Car category at the 2019 Scottish Car of the Year Awards. Here, we tell you all about this supermini's spec, performance and price.
by Mike TorpeyNISSAN cruised into this year determined to make its Micra supermini more appealing than ever to prospective buyers.
A trio of new engines were at the forefront of the initiative, along with a special N-Sport specification designed to maximise the car’s fun-to-drive personality.
Pair the most spirited of the new powerplants, a turbocharged three-cylinder petrol unit producing 117PS, with the new trim grade and you have a car the Japanese manufacturer is rightly excited about.
And that’s been recognised by the Association of Scottish Motoring Writers, who have awarded the Micra the Small Car gong at the Scottish Car of the Year (SCOTY) ceremony.
We may not be talking “serious” performance here – acceleration is to 0-62mph in a blink under 10 seconds – but it has pretty good “warm hatch” characteristics for a car of this size.
There’s also a half-decent 180Nm of torque, plus an additional 20Nm on the overboost. More important than bare figures is the car’s dynamic performance – and that’s down to a number of physical changes.
Versions featuring this engine have a lower ride height plus revised suspension tuning and sharper steering, the combination helping the Micra become more agile.
Buyers also get a new chrome exhaust along with 17in alloys – part of a package that makes this a really stylish small car, and one with much more interior space, especially in the rear, than the superminis of old.

That is in addition to a rear view camera, parking sensors, automatic headlights, daytime LED running lights and a smart carbon-style finish on the door caps and wheels.
Concealed rear door handles add to a smooth, clean profile and what is a reasonably sized boot expands to top 1000 litres when the 60-40 split/fold rear seats are down.
It is definitely worth paying the extra £250 it costs to specify the test model’s Solid White paint job, which works really well with the black alloys and black strips that run the length of the car.
N-Sport also brings in the latest NissanConnect display with a seven-inch touchscreen, DAB digital radio, Bluetooth, Apple CarPlay, Android Auto and smartphone integration.
Safety features include lane drift warning, hill start assist, emergency braking with pedestrian recognition and a speed limiter.
Not only is this a head-turning car – light years ahead of its predecessors – but it feels rewarding to drive, is nimble, has positive feedback from the steering and has a slick six-speed manual gearbox.
Factfile:
- Model: Nissan Micra N-Sport
- Engine: 1.0-litre petrol
- Power: 117PS
- Top speed: 121mph
- 0-62mph: 9.9 seconds
- Average mpg: 47.9
- CO2 emissions: 114g/km
- Warranty: Three years/60,000 miles
- Price: £19,010


{{ define "main" }}
Get started with this {{.Title}}, customize it, and post it to the jobs boards you want. Hiring for more jobs? Try out enlist.


Michael Miller
About
Experience
Education
Skills
Interests
Trivia
LinkedIn
Experiments
Michael Miller
Davenport Iowa area
Experience
Sr Software Developer
Modern Woodmen of America
August 2022 - Present
Software Engineer III
BITCO Insurance Companies
November 2020 - July 2022
Developer II
HNI Corporation
January 2019 - November 2020
Software Engineer III
BITCO Insurance Companies
March 2015 - December 2018
Education
Western Illinois Unviersity
Bachelor of Science
Computer Science
Cum Laude
Fall 2007 Departmental Scholar
August 2004 - December 2007
Skills
Programming Languages & Tools
Interests
Data Science
Mathematics
Machine Learning
Pandas
NumPy
Trivia
LinkedIn
Experiments
JavaScript
Mathematics
Physics
Physics
×


3.2.5. Request Unit Test (Batch Process)¶
<IP_ADDRESS>. Summary¶
Request unit tests (batch process) simulate and test the behavior of the batch when it is actually launched from the command line.
<IP_ADDRESS>.1. Overall picture¶
<IP_ADDRESS>. Main Classes, resources¶
| Name | Role | Creation unit |
|---|---|---|
| Request unitTest class | Implement the test logic. | Create one per class (Action) to be tested. |
| Excel file （Test data） | Describe test data, such as preparation data to be stored in the table, expected results and input files. | Create one per test class |
| StandaloneTestSupportTemplate | Provides a test execution environment for batch, messaging, and other processes that run outside the container. | - |
| BatchRequestTestSupport | Provides test preparation function and various asserts required for batch request unit test. | - |
| TestShot | A class that stores information for one test case defined in a datasheet. | - |
| MainForRequestTesting | Main class for testing. Absorb the differences during test execution. | - |
| DbAccessTestSupport | Provides the necessary functions for testing using the database, such as DB preparation data input. | - |
| FileSupport | Provides the necessary functions for testing using the file, such as preparation of input file. | - |
<IP_ADDRESS>. Structure¶
<IP_ADDRESS>.1. StandaloneTestSupportTemplate¶
Provides a test execution environment for batch, messaging, and other processes that run outside the container. Reads test data and executes all test shots (TestShot ).
<IP_ADDRESS>.2. TestShot¶
Executes by holding information of 1 TestShot. The TestShot consists of the following elements:
- Preparation of input data
- Launch the main class
- Confirm the output results
Provides common preparation process and result checking functions for testing processes that operate outside of containers, such as batch and messaging processes.
Preparation process Confirmation of results Database setup Check for database updates Check log output results Confirm the status code
Since the input data preparation and result confirmation logic is different for each batch and various messaging processes, it can be customized according to the architecture.
<IP_ADDRESS>.3. BatchRequestTestSupport¶
Superclass for batch process tests. The application programmer creates a test class by inheriting this class.
This class adds the following functions to the preparation process and result confirmation provided by TestShot .
Preparation process Confirmation of results Prepare input file Check the contents of the output file
By using this class, the test source and test data of the request unit test can be standardized, and description of test source can be significantly reduced.
For the specific usage method, refer to How to Execute a Request Unit Test (Batch).
<IP_ADDRESS>.4. MainForRequestTesting¶
Main class for request unit test. The primary differences from the main class for production are as follows.
- Initialize the system repository from the component configuration file of the test.
- Disable the resident function.
<IP_ADDRESS>.5. FileSupport¶
A class that provides operations related to files. Primarily, the following functions are provided.
- Creates an input file from the test data.
- Compares the expected value of the test data with the actual output file and its contents.
File operations are provided as an independent class because they are necessary for other than batch processing (for example, file download).
<IP_ADDRESS>. Test data¶
The test data specific to the batch process is described.
<IP_ADDRESS>.1. Fixed-length file¶
For the basic description, see How to Execute a Request Unit Test (Batch).
<IP_ADDRESS>.1.1. Padding¶
If the byte length of the data is shorter than the specified field length, padding is added to the data according to the data type of the field. The algorithm used for padding is the same algorithm used for the main body of the Nablarch Application Framework.
<IP_ADDRESS>.1.2. How to write binary data¶
To represent binary data, write the test data in hexadecimal format.
For example, when written as 0x4AD
, it is interpreted as a byte array of 2-bytes expressed as 0000 0100 1010 1101
(0x04AD
).
Tip
If the test data is not pre-fixed with 0x, the data is considered a string, and the string is encoded with the character code of the directive and converted to a byte array.
For example, if 4AD
is written in the field of the binary type test data of a file with Windows-31J character code,
it is converted to a byte array of 3-bytes expressed as 0011 0100 0100 0001 0100 0100
(0x344144
).
<IP_ADDRESS>.2. Variable length file¶
For the basic description, see How to Execute a Request Unit Test (Batch).
<IP_ADDRESS>. Various configuration values¶
<IP_ADDRESS>.1. Handler configuration of resident batch test¶
When performing a resident batch test, the handler configuration for production has to be changed for the test. If the test is performed without making this change, the test will not be implemented successfully because the process of the resident batch application that is being tested will not finish.
[Handlers that need to be modified]
| Handler to be modified | Modified handler | Reason for revision |
|---|---|---|
| RequestThreadLoopHandler | OneShotLoopHandler | If the test is executed with RequestThreadLoopHandler, the control will not return to the test code without completing the batch execution. By replacing the handler with OneShotLoopHandler, the batch execution will be completed and control returns to the test code after all the request data setup before the test execution is processed. |
The configuration example of the component configuration file is shown below.
Production configuration
<!-- Request thread loop --> <component name="requestThreadLoopHandler" class="nablarch.fw.handler.RequestThreadLoopHandler"> <!-- Configuration of property is omitted --> </component>
Test configuration
Configure a component with the same name as the production configuration and overwrite it to use a handler for testing.
<!-- Configuration to replace the request thread loop handler with a handler for testing --> <component name="requestThreadLoopHandler" class="nablarch.test.OneShotLoopHandler" />
<IP_ADDRESS>.2. Default value of directive¶
If the file directives are unified to some extent in the system, it is redundant to describe the same directive in each test data.
In such a case, by describing the default directive in the component configuration file, the directive description can be omitted for each test data.
Use map format for the component configuration file. The naming rules are as follows.
| Target file type name | attribute |
|---|---|
| Shared | defaultDirectives |
| Fixed-length file | fixedLengthDirectives |
| Variable length file | variableLengthDirectives |
The configuration example is shown below.
<!-- Directive (common) -->
<map name="defaultDirectives">
<entry key="text-encoding" value="Windows-31J" />
</map>
<!-- Directive (fixed-length) -->
<map name="variableLengthDirectives">
<entry key="record-separator" value="NONE"/>
</map>
<!-- Directive (variable length) -->
<map name="variableLengthDirectives">
<entry key="quoting-delimiter" value="" />
<entry key="record-separator" value="CRLF"/>
</map>


The wonderful chocolate
This week, we talk about the delicious chocolate
Chocolate
Chocolate is a magic stuff made of roasted ground cocoa seeds. One of the most popular dessert ingredients. Needs no introduction, of course, chocolate can be used in a solid, liquid (choco syrup) and in many other forms.
- The word chocolate comes from the Nahuatl word chocolātl. Nahuatl was spoken in the valley of Mexico during the Spanish conquest of Aztec in the 16th century.
- Chocolate has been very popular in desserts and other forms of food and African countries are leading producers of cocoa even though it originated in the Americas.
- Western Africa produces about two-thirds of the world’s cocoa and Ivory coast produces about half of it.
- Types of chocolate:
- Dark chocolate: Dark chocolate is a mixture of cocoa, fat and sugar. More the amount of cocoa, more bitter the chocolate.
- Unsweetened chocolate: This is unsweetened chocolate liquor called bitter or baking chocolate. It’s pure ground cocoa.
- Milk chocolate: Milk chocolate either contains milk powder of condensed milk with a minimum of 20-25% of cocoa depending on the country.
- White chocolate: White chocolate contains cocoa butter, milk and sugar and no cocoa solids, that differentiates it from milk chocolates.
History
- In the early history of chocolate (around 4000 years), chocolate was mostly used as a bitter beverage.
- Evidence has been found that chocolate was cultivated in present-day Mexico around 1900 B.C.
- Also believed to be fermented and consumed an alcoholic beverage around 1400 B.C.
- Christopher Columbus came across cocoa beans during his fourth mission to Americas when his crew seized a native canoe filled with cocoa.
- Spanish explorer Hernán Cortés came across chocolate in its true form in the court of Montezuma, who was the ruler of Tenochtitlan, capital of Aztec. The cocoa beverage was served in the gold cups and supposedly gave them power over women. The drink was said to be frothy with a very unpleasant taste but was highly esteemed by the natives.
- Chocolate made its way into Europe following the Spanish conquest of Aztec. It was used initially as medicine to treat abdominal pain and later sugar or honey was added to make it into a sweetened beverage and was served in the court. In the next century, chocolate became a favourite in Europe.
- Chocolate cultivation saw a rise and resulted in an increase in the slave trade. The Chocolaterie Lombart, was the first chocolate company established in 1760 in France.
- Industrial revolution accelerated the production of Cocoa.
- Coenraad van Houten, a Dutch chemist, added alkaline salts to chocolate which helped in reducing its bitterness. In 1828, he devieda method to remove much of the cacao butter from chocolate liquor which made production cheaper and gave more consistency to chocolate.
- This cocoa called Dutch cocoa also helped in creating chocolate in solid form in 1847 when Joseph Fry added melted cacao butter back to chocolate to make it mouldable.
- In mid 1875, Daniel Peter, a Swiss chocolatier, invented milk chocolate by adding powdered chocolate back to the liquor. Powdered milk used in this process was invented by Henri Nestlé, founder of Nestlé. They later created the Nestlé company.
- The conching machine, a surface scraping mixer and agitator was invented in the year 1879 by Rudolf Lindt, a Swiss chocolate manufacturer, which further improved the quality of the chocolate by giving is a smooth melt-in-mouth consistency.
- In England, Cadbury had started manufacturing boxed chocolates in 1868.
- During the World Columbian Exposition at Chicago held in 1893, Milton S. Hershey, American chocolatier and philanthropist purchased the chocolate processing equipment and started Hershey’s.
Preparation
- Chocolate is made from cocoa beans. There are about 40 cocoa beans in a cocoa fruit. These beans are dried and fermented. The tree is called Cacao.
- Three main varieties are Criollo, Forastero and Trinitario.
- Criollo is the rarest of the three and is native to Central America, Carribean and Northern part of South America. They are difficult to grow and provide very low yield.
- Forastero is the most commonly grown version and commonly found in Amazon basin and Africa. They have a more chocolaty flavour which lasts for a shorter amount of time.
- Trinitario is a hybrid of Criollo and Forastero which originated in Trinidad.
- Process: Cacao pods are removed from the tree and the beans with pulp are removed and placed in bins to enable fermentation. The fermentation takes up to a week and results in the chocolate flavour. Pods are harvested when they are ripe or the cocoa content would be less. Dried beans are transferred to a facility where the shell is removed to extract the nib. The nib is then ground and liquefied to chocolate in purest form as chocolate liquor. Cocoa solids and cocoa butter can be extracted from this liquor.
- Conching: Conching is processed by which the texture of the chocolate is smoothened. Chonche is a container which contains metal beads that act as grinders. The frictional heat keeps the chocolate in liquid form. High quality chocolate is conched for 72 hours and lesser grade chocolates are conched for 5-6 hours. The conched chocolate is then stored in containers at 40-50 degree Celsius.
- Tempering: Tempering is a process to prevent uncontrolled crystallisation of cocoa butter in chocolate which results in crystals of varying sizes. Cocoa butter gave the chocolate its rigidity when solid at room temperature and when heated, the crystalline structure of cocoa butter breaks down and chocolate becomes liquid.
- Storage: Chocolate is very susceptible to temperature and humidity changes.


This should be BIG and GREEN!
This Should only be BIG!
This should only be GREEN!
This should be Normal!


TubeX Documentation
General Information
This documentation covers the TubeX software functions, and tries to be as thorough as possible. If there is something you cannot
find in this manual, please check the knowledge base first. If you still cannot find
an answer to your question, please use the support forum for assistance. If you do
find any errors or inconsistencies in the documentation, please let me know so they can be corrected.
If you have just had TubeX installed for the first time, please see the First Steps section of this manual first. It will help get you started using TubeX and will guide you through the first things you need to do.
If you have just had TubeX installed for the first time, please see the First Steps section of this manual first. It will help get you started using TubeX and will guide you through the first things you need to do.
Table of Contents


Rocky Mtn Recreation provides a state-of-the-art recreation experience for residents with dozens of amenities for children, adults, seniors, and families. Spend a day at the indoor aquatic center, with a pool, slides, saunas, and a hot tub.  This world class facility includes 2 pools (one indoor, one outdoor), 3 basketball courts, an indoor running track, aerobic and weight equipment, fitness studios, child watch, concession stands, 5 racquetball courts, outdoor tennis courts, an outdoor playground and more. There is something for everyone to enjoy here at Rocky Mtn Recreation.
Daily admission and membership options are available.
5AM-8AM,12PM-2PM, 6PM-Close(10PM)
8AM-12PM, 2PM
-Available by reservation during operating hours, when in season-
Available during operating hours. One court always open for reservations.


[[journey.title]]
This journey does not have any entries yet.
[[safeEntryTitle(entry)]]
edit
·
history
by [[entry.commit.author_name]]
new entry
edit meta data
git
view merge requests


jQuery contains powerful methods for changing and manipulating HTML elements and attributes.
One very important part of jQuery is the possibility to manipulate the DOM.
jQuery comes with a bunch of DOM related methods that make it easy to access and manipulate elements and attributes.
DOM = Document Object Model
The DOM defines a standard for accessing HTML and XML documents:
"The W3C Document Object Model (DOM) is a platform and language-neutral
interface that allows programs and scripts to dynamically access and update the
content, structure, and style of a document."
Three simple, but useful, jQuery methods for DOM manipulation are:
text()
- Sets or returns the text content of selected elementshtml()
- Sets or returns the content of selected elements (including HTML markup)val()
- Sets or returns the value of form fieldsThe following example demonstrates how to get content with the jQuery text()
and html()
methods:
Example
$("#btn1").click(function(){
alert("Text: " + $("#test").text());
});
$("#btn2").click(function(){
alert("HTML: " + $("#test").html());
});
The following example demonstrates how to get the value of an input field with the jQuery val()
method:
Example
$("#btn1").click(function(){
alert("Value: " + $("#test").val());
});
The jQuery attr()
method is used to get attribute values.
The following example demonstrates how to get the value of the href attribute in a link:
Example
$("button").click(function(){
alert($("#w3s").attr("href"));
});
The next chapter explains how to set (change) content and attribute values.


CSPICE_DRDGEO computes the Jacobian of the transformation from
geodetic to rectangular coordinates.
Given:
lon geodetic longitude of point (radians).
[1,n] = size(lon); double = class(lon)
lat geodetic latitude of point (radians).
[1,n] = size(lat); double = class(lat)
alt Altitude of point above the reference spheroid. Units of `alt'
must match those of `re'.
[1,n] = size(alt); double = class(alt)
re equatorial radius of a reference spheroid. This spheroid is a
volume of revolution: its horizontal cross sections are circular.
The shape of the spheroid is defined by an equatorial radius `re'
and a polar radius `rp'. Units of 're' must match those of 'alt'.
[1,1] = size(re); double = class(re)
f the flattening coefficient
[1,1] = size(f); double = class(f)
f = (re-rp) / re
where rp is the polar radius of the spheroid. (More importantly
rp = re*(1-f).) The units of `rp' match those of `re'.
the call:
jacobi = cspice_drdgeo( lon, lat, alt, re, f)
returns:
jacobi the matrix of partial derivatives of the conversion between
geodetic and rectangular coordinates. It has the form
If [1,1] = size(lon) then [3,3] = size(jacobi)
If [1,n] = size(lon) then [3,3,n] = size(jacobi)
double = class(jacobi)
- -
| dx/dlon dx/dlat dx/dalt |
| |
| dy/dlon dy/dlat dy/dalt |
| |
| dz/dlon dz/dlat dz/dalt |
- -
evaluated at the input values of lon, lat and alt.
The formulae for computing x, y, and z from
geodetic coordinates are given below.
x = [alt + re/g(lat,f)]*cos(lon)*cos(lat)
y = [alt + re/g(lat,f)]*sin(lon)*cos(lat)
2
z = [alt + re*(1-f) /g(lat,f)]* sin(lat)
where
re is the polar radius of the reference spheroid.
f is the flattening factor (the polar radius is
obtained by multiplying the equatorial radius by 1-f).
g( lat, f ) is given by
2 2 2
sqrt ( cos (lat) + (1-f) * sin (lat) )
None.
It is often convenient to describe the motion of an object in
the geodetic coordinate system. However, when performing
vector computations its hard to beat rectangular coordinates.
To transform states given with respect to geodetic coordinates
to states with respect to rectangular coordinates, one makes use
of the Jacobian of the transformation between the two systems.
Given a state in geodetic coordinates
( lon, lat, alt, dlon, dlat, dalt )
the velocity in rectangular coordinates is given by the matrix
equation:
t | t
(dx, dy, dz) = jacobi| * (dlon, dlat, dalt)
|(lon,lat,alt)
This routine computes the matrix
|
jacobi|
|(lon,lat,alt)
For important details concerning this module's function, please refer to
the CSPICE routine drdgeo_c.
MICE.REQ
-Mice Version 1.0.0, 12-MAR-2012, EDW (JPL), SCK (JPL)
Jacobian of rectangular w.r.t. geodetic coordinates
|


WITNESS LIST Insurance Committee March 24, 2003-10:00A HB 257 Against: Schneider, Rob (Consumers Union) On: Cernosek, Larry (Self and Texas Towing and Storage Assoc.) HB 784 For: Rich, Sid (Texas Association of Residential Care Communities) On: Hamilton, Marilyn (Texas Department of Insurance) HB 814 For: Cernosek, Larry (Self) Against: Schneider, Rob (Consumers Union) On: Dike, Jerry (Texas Department of Transportation) Elder, Frank (TxDPS) Hamilton, Marilyn (Texas Department of Insurance) Registering, but not testifying: For: Bozick, Brian (Self) Lerma, Vanessa J. (Self) Marshall, AnMarie (Self) Potts, Maria E. (Self and Safeway Insurance Co.) Ramirez, Rafael S. (Self) Ramirez, Rosalinda J. (Self) Warner, Michael (Automobile Insurance Agents of Texas) HB 928 For: Hooser, Greg (Texas Association of Insurance Officials) Shawn, Jim (North America Life Ins. Co., Memorial Service Life Ins. Co.) HB 1163 For: Hanna, Mark J (Texas Podiatric Medical Assn.) Against: Rummel, Leah (Texas Association of Health Plan) HB 1706 For: Royer, Mark (Farmers Insurance Group of Companies) On: Hamilton, Marilyn (Texas Department of Insurance) HB 1809 For: Cernosek, Larry (Self) Royer, Mark (Farmers Insurance Group of Companies) Against: Schneider, Rob (Consumers Union) On: Dike, Jerry (Texas Department of Transportation) Hamilton, Marilyn (Texas Department of Insurance) HB 1865 For: Allen, Ted W. (Self and Ted W. Allen & Associates) Caporina, Pat (Oaks of Flagridge Apts) Chudes, Bill (Self and Texas Apartment Association) Crouch, Greg (Crouch Insurance Consulting, CIC Property Owners and Managers) Mintz, David (Texas Apartment Association) Ross, C Terry (Self and Centennial Square Apartments) On: Hamilton, Marilyn (Texas Department of Insurance) HB 1958 For: Shawn, Jim (FAIR Plan Assoc.) Against: Geiger, Richard (AFACT) On: Edwards, Kimberly (Texas Public Finance Authority) Hamilton, Marilyn (Texas Department of Insurance)


This is the symbol table. Supported symbols are listed here (alphabetically).
Symbols can also be trained here. Just click the symbol. You can see the number of trained samples in the symbol list, too, so you know which symbols need training. Or just train symbols you sometimes need but tend to forget.
If there are symbols missing be sure to drop me a line (danishkirel@gmail.com).


Accessib.lol
Launch League of Legends and the In-Game window will pop-up automatically!
Hello!
Create an account on Accessib.lol!
When you launch a game you will be able to see everyone's prefered Pronouns!
Create an account on Accessib.lol!
When you launch a game you will be able to see everyone's prefered Pronouns!


{% extends "layouts/layout.html" %} {% block title %}{{ _('Summary of title') }} {{ title.number }}{% endblock %} {% block header_primary %} {% with title='Search again', url=url_for('find_titles') %} {% include 'includes/back_link.html' %} {% endwith %} {% endblock %} {% block header_secondary %} {% include 'includes/language_switcher.html' %} {% endblock %} {% block ga_pageview %} ga('set', 'page', '{{request.path}}?{{ request.query_string.decode('utf-8') }}') ga('send', 'pageview', { 'anonymizeIp': true, 'title': 'Summary of title {{ encrypted_title_number }}' }) {% endblock %} {% block body %}
Purchased on {{receipt.date}}
{{ _('This information can change if we receive an application. This service is unable to tell you whether or not there is an application pending with HM Land Registry.') }}
This property hasn’t been registered yet. You can’t find out who owns it from this service.
Someone other than the owner (known as the ‘cautioner’) has registered a right or interest in the property. They will be told if anyone tries to register it, and can object to the registration going ahead until their claim has been looked at. You can get their name and address from this service.
Registration has only been compulsory since the 1990s. Property that hasn’t changed hands since then may not be registered.
{{ _('The map relies on JavaScript being enabled in your browser.') }}
{{ _('This map shows the property\'s rough extent and location, not legal boundaries.') }}
{{ _('This title was last changed on') }}
If you want to keep this information or need a VAT receipt
{{ _('You\'ll only be able to view this information once') }}
{{ _('If you want to keep a copy you can print it out') }}
Please give us your feedback (takes 30 seconds).
This is a new service and your feedback will help us improve it.
VAT registration number:
{{ receipt.reg_number }}
{{ _('If you have any problems with your purchase, you can contact HM Land Registry using the general enquiry contact form or call 0300 006 0411.') }}


The objective of this lab is to practice using
javascript selectors to identify a specific element or a list of elements.
Write a script to make the following changes to this page. Don't change the HTML!
- Count the number of <p> elements and display the number in the paragraph with id="p_count"
- Increase the font size of all bold <b> elements with class="large". Don't change any bold elements without this class.
- Use selectors to specifically identify all italic text within unordered lists. Change this italic text to the color of your choice.
- Copy the text from all span elements with class="copyme". Sort it in reverse order, and concatenate all the strings together.
- Add a paragraph containing this information to the div tag with id="copyhere"
- Add a mouseover and mouseout listener to the last list element on this page. (It's not this one).
Mousing over this element will cause the font color to change. Mouse out will cause it to change back to the original color.


This is a good place to start when you hit something odd: FAQ List.
Seneca tutorials offer a deep dive into a particular concept or feature. We also have a number of sample projects, small and large that demonstrate how to use Seneca in a number of different ways and with different complimentary technologies.
For convenience, we have a number of sample apps in a single repository. This repository covers single concepts as well as popular plugins. See the repo at Seneca examples.
NodeZoo is a search engine for Node.js modules. The complete system is an example of a real- world service built using Node.js microservices. Each microservice is published in its own GitHub repository. The code base is intended to be used as a larger-scale example and as a starting point for your own projects. See the system at NodeZoo.
Here are some talks about Seneca and Microservices:
These books help you understand how to design, build and deploy microservice systems. Some of them cover Seneca directly, and others provide more general guidance. The ideas in the books listed here can be applied using Seneca without restriction. They all contain useful insights, and more importantly, real-world lessons.
The Tao of Microservices teaches you the path to understanding how to apply microservices architecture with your own real-world projects. This high-level book offers you a conceptual view of microservice architectures, along with core concepts and their application. You’ll also find a detailed case study for the nodezoo.com system, including all source code and documentation. By the end of the book, you’ll have explored in depth the key ideas of the microservice architecture and will be able to design, analyze and implement systems based on this architecture.
Distributed systems have become more fine-grained in the past 10 years, shifting from code- heavy monolithic applications to smaller, self-contained microservices. But developing these systems brings its own set of headaches. With lots of examples and practical advice, this book takes a holistic view of the topics that system architects and administrators must consider when building, managing, and evolving microservice architectures.
We’ve spent over a decade now becoming more and more agile and adaptable in our ways of working. Unfortunately our software is now struggling to keep up with the pace of innovation that is increasingly being demanded by modern businesses. It’s time to sort that out. It’s time for Antifragile Software with Microservices.
A Microservice-based architecture divides software systems into many small services which can be deployed independently. Every team works on its own Microservices and is thus decoupled from other teams. This allows to easily scale agile processes. The modularization into Microservices protects the system against architecture decay. Consequently, systems based on Microservices stay maintainable in the long term. In addition, legacy systems can be migrated to Microservices without having to change the legacy code. Moreover, Continuous Delivery is easier to implement in Microservice-based systems.
Microservices: Flexible Software Architectures
Microservices in .NET shows you how to build and deploy secure and operations-friendly microservices using Nancy. The book takes you through an introduction to the microservices architectural style. Next, you’ll learn important practical aspects of developing microservices from simple core concepts to more sophisticated. Throughout the book, you’ll see many code examples implementing it with lightweight .NET technologies - most prominently Nancy. By the end, you’ll be able to quickly and easily build reliable and operations-friendly microservices using Nancy, OWIN and other open technologies.
GO is a great language for building microservices. However there are a lot of challenges to navigate. How do you do caching, manage databases. Monitor and analyze performance. Integrate with Docker. Do continuous deployments. Run on private or public clouds.
SOA Patterns provides architectural guidance through patterns and anti-patterns. It shows you how to build real SOA services that feature flexibility, availability, and scalability. Through an extensive set of patterns, this book identifies the major SOA pressure points and provides reusable techniques to address them. Each pattern pairs the classic problem/solution format with a unique technology map, showing where specific solutions fit into the general pattern.
Issues? From spelling errors to broken tutorials and everything in between, report them here.


Text from Ciphers
Messages
Seperated by comma in hex
Dont enter new line or spaces between strings, just add a comma in between
Get half solved message
Solve
Simple Texts
Text to Cipher
Messages
Seperated by comma as string
Dont enter new line or spaces between strings, just add a comma in between
Key
As string, atleast as long as messages
Random Key
Encrypt
Cipher Texts
in hex


Funny comparison. so would the proper antivirus not slow down the internet as much or do you…
Funny comparison. so would the proper antivirus not slow down the internet as much or do you…
Funny comparison. so would the proper antivirus not slow down the internet as much or do you…
Funny comparison. so would the proper antivirus not slow down the internet as much or do you…
Funny comparison. so would the proper antivirus not slow down the internet as much or do you…
Funny comparison. so would the proper antivirus not slow down the internet as much or do you…
Funny comparison. so would the proper antivirus not slow down the internet as much or do you…
Funny comparison. so would the proper antivirus not slow down the internet as much or do you…
Hi guys Ive got the O2 package and have really slow internet. A speed check online said i can get 3mbps but it seems more like 0.5 these days, just freezing and taking ages to open pages and open audio files for example. I have decided to switch to the UPC package which offers 10mbps but do you think i will get it?
Hi guys Ive got the O2 package and have really slow internet. A speed check online said i can get 3mbps but it seems more like 0.5 these days, just freezing and taking ages to open pages and open audio files for example. I have decided to switch to the UPC package which offers 10mbps but do you think i will get it?
Hi guys Ive got the O2 package and have really slow internet. A speed check online said i can get 3mbps but it seems more like 0.5 these days, just freezing and taking ages to open pages and open audio files for example. I have decided to switch to the UPC package which offers 10mbps but do you think i will get it?
Hi guys Ive got the O2 package and have really slow internet. A speed check online said i can get 3mbps but it seems more like 0.5 these days, just freezing and taking ages to open pages and open audio files for example. I have decided to switch to the UPC package which offers 10mbps but do you think i will get it?
Hi guys Ive got the O2 package and have really slow internet. A speed check online said i can get 3mbps but it seems more like 0.5 these days, just freezing and taking ages to open pages and open audio files for example. I have decided to switch to the UPC package which offers 10mbps but do you think i will get it?


HOME
CLEARANCE DATA
OPERATIONS
ESPIONAGE
RESEARCH
MYTHOS
INTERNAL
ORGANIZATION STRUCTURE
Gonna put a table here mimicking my spreadsheet.


HTML5 Project Update: Changing To A Responsive Web Design Using CSS3 Media Queries
byIn 2005, Jesse James Garrett wrote an excellent article describing and coining the term “Ajax.” He demonstrated Ajax as a method of using multiple web programming languages to neatly load content onto a web page without actually refreshing the page.
It’s tough to accurately describe this functionality to people not familiar with web development, and it’s even tougher for those people to actually visualize this functionality in action (although this page will help you). But trust me, Garrett’s article changed the game for web programmers. Ajax stretched the imagination of designers and developers, showing them the seemingly infinite list of possibilities of what they could do when creating web applications.
Google has given us the most widely-used Ajax applications: Gmail, Maps and their Suggest functionality, just to name a few. And many others besides Google have given us great Ajax applications as well but the point is, Garrett’s article got the creative juices flowing for lots of designers and developers. By showing them what was possible, he made them rethink their entire creative process.
What Jesse James Garrett was to Ajax, Ethan Marcotte may end up being to responsive web design. The title of his widely-cited A List Apart article, responsive web design is a big buzz phrase among the early adopter segment of the design/development body politic. And although there are concerns about its implementation, many of them valid, responsive web design is an unquestionably forward-thinking concept.
Inspired by modern architectural theory, responsive web design uses CSS3 to detect the width of a device…a web browser, a tablet, a smartphone…whatever. Combine this detection process with traditional CSS techniques for positioning page elements, and you’re able to create one website that neatly displays on all devices.
I’d like to present this as an opportunity to our team at work, but I need to develop and test out code on my own first. So I may adjust the portfolio for my HTML5 Project to accommodate a responsive web design. Doing this requires my understanding of the process...here’s what I’ve learned so far.
Setting Up CSS For Responsive Web Design
Media queries, a part of the new CSS3 specification, are the linchpin of responsive web design. They’re set up when you link stylesheets to your web page and look somewhat like this:
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" media="screen and (min-width: 600px)" href="large.css" />
<link rel="stylesheet" media="screen and (max-width: 320px)" href="smartPhone.css" />
<link rel="stylesheet" media="screen and (max-width: 600px)" href="tablet.css" />
With this code in mind, let’s look at the following scenario:
- you want a wide desktop web browser to load the “large.css” file, which displays a certain text block on your site with a left-aligned, 14 point font
- you want a skinny iPhone web browser to load the “smartPhone.css” file, which displays the same text block on your site with a right-aligned, 6 point font
- you want a semi-wide iPad web browser to load the “tablet.css” file, which displays the same text block on your site with a center-aligned, 10 point font
- no problem for either bullet point…the previously-mentioned coding method will detect the device’s width, then apply the device’s proper CSS file
Browser Detection
Before we discuss how all this works, let’s look at responsive web design in action. Since not every browser supports this functionality, I need to check out your browser first...
It looks like you’re not using Internet Explorer 8 or lower so you should be able to view this demo with no issues. But if you’re using a really old version of either Firefox, Safari, Opera Mobile or Opera Mini, you may need to update it.
Sample Site
There are quite a few sites supporting a responsive web design, but I really like what web developer Chris Pederick has done with his site. So let’s open that site up in a separate browser.
Now spend a few seconds clicking-and-dragging the bottom right corner of your browser to resize it. Notice how the page elements reformat themselves so that they neatly display on the page…regardless of its height and width.
 Notice how the elements neatly adjust to fit on the page. You’ve just previewed how this site would look on an iPhone or Android.
Welcome to responsive web design!!!
How Responsive Web Design Works
As I see it, responsive web design must utilize the following:
Media Queries
Repeating myself here…a part of the new CSS3 specification that handles both the device detection process and the proper CSS file-loading based on that detection.
Fluid Grids
Referring to another Marcotte article over on ALA, fluid grids teach you how to apply 8th grade algebra to create CSS that neatly readjusts page elements, making things more responsive.
Fluid Images
Marcotte whipped up some spiffy JavaScript code to properly resize images on responsive design sites. Read about it on his Unstoppable Robot Ninja site.
The Viewport Meta Tag
Needed when creating a site for any iOS device, i.e., the iPad and the Phone. It looks like this...
<meta name = "viewport" content = "width = EnterYourOwnWidth">
It’s good to know how the Viewport meta tag works so read up on it over at the Apple Developer site.
- Added Bonus:
Marcotte’s Responsive Images JavaScript Library
Another way to make images more responsive. It’s part of a project that Marcotte did for Filament Group and performs the same functionality as the code over at Unstoppable Robot Ninja, but does so with an external JavaScript library. Check it out over at GitHub.
This method doesn’t work on all browsers as of this article and also requires tweaking the .htaccess file, something I’ve never felt comfortable doing. But the demo shows that it works well in the browsers that it does support.
Responsive Design Issues
But as I said earlier, there are issues, the main one being site optimization.
Let’s look at my previous code, without the viewport meta tag:
The code above will detect a device’s width, then apply the proper CSS file. But while it will apply only one CSS file, it loads all three at once.  So your computer is loading resources it doesn’t need and won’t use, making things a little sluggish.
Also, while either of the fluid image above techniques seem to work well, there’s a chance that you’ll want to load individual images for each stylesheet. Again, depending on which stylesheet is applied, you’re loading things that you don’t need.
This loading of extra, unused resources may not be a big deal if you’re browsing a responsive-designed site on a ethernet cable-connected computer; however, a wireless device (especially one on a public network) will probably have issues.
A simple Google search brings up quite a few articles against issues with responsive web design, the biggest one coming from web developer Jason Grigsby. My suggestion is to read the negative articles on the subject as well as the positive ones, the Grigsby one at least.
Despite the articles showcasing the problems, there are quite a few articles providing workarounds to the problems. For starters, Amsterdam-based developer Peter-Paul Koch (aka PPK) counters Grigsby’s article quite nicely with this article at his Quirksmode blog. And let’s remember that Marcotte supplied both the fluid image code snippet and responsive image JavaScript library mentioned above: when these are applied properly, there’s no need to use multiple images per device. Plus, Kayla Knight’s responsive web design guideline article over at Smashing Magazine provides some techniques for dealing with the multiple CSS file calls.
Conclusion
So, yes, the responsive web design concept is new. REALLY new. I do see its promise but am not ready to recommend as “development best practice” at work until I get my hands dirty with it on my own first.
So, again, I’m now researching the possibility redoing my HTML5 Project wireframes to fit a responsive design so I can fully understand this concept. This will take time but I’m will to work as long as possible to get this done.
Resources
There are tons of responsive design resources…here’s a complete list of ones that have helped me. Some of these resources have already been mentioned:
- Ethan Marcotte’s original “Responsive Web Design” article at A List Apart
- Marcotte’s “Fluid Grid” article, also over at A List Apart
- Marcotte’s great fluid image JavaScript code over at his Unstoppable Robot Ninja site
- Marcotte’s responsive image JavaScript library over at GitHub
- “Responsive Web Design” episode at “The Big Web Show,” featuring Ethan Marcotte
- Stephen Hay’s “Real-world Responsive Design” lecture at the 2010 Fronteers conference
- PPK’s “Combining media queries and JavaScript” over at his blog
- Viewport meta tag documentation for iOS on the Safari Web Content Guide
- Jason Grigsby’s “CSS Media Query for Mobile is Fool’s Gold” article over at his blog – an argument against responsive web design
- CSS3 First Look course over at lynda.com, which includes a GREAT chapter on media queries
- Kayla Knight’s “Responsive Web Design: What It Is and How To Use It” article over at Smashing Magazine
- Rachel Andrew’s “How To Use CSS3 Media Queries To Create a Mobile Version of Your Website” article, also over at Smashing Magazine
- The LESS framework-a pre-built template for creating responsive web design sites
- mediaqueri.es – a GREAT gallery of responsive web design sites
Extra: As of this article, Ethan Marcotte is set to release a book entitled (surprise!) “Responsive Web Design” via A Book Apart in a few monthsextension of his two ALA articles along with new content. To be alerted when it’s released, either sign up for their newsletter at the previously-mentioned link or follow A Book Apart on Twitter.
Feel free to share any responsive web design resources that you like…and your comments!!!! Responsive web design is new so the more info that goes around, the better for all of us.


--- layout: paper title: Publications --- Declarative Probabilistic Programming for Undirected Models: Open Up to Scale Up, , Statistical Relational AI workshop at AAAI (starAI) 2010 [pdf]
@inproceedings{riedel10declarative, year={2010}, author={Sebastian Riedel}, bdsk-url-1={http://maroo.cs.umass.edu/pub/web/getpdf.php?id=942}, booktitle={Statistical Relational AI workshop at AAAI (starAI)}, title={Declarative Probabilistic Programming for Undirected Models: Open Up to Scale Up}, }


WITNESS LIST Jurisprudence Committee February 19, 2001 - 1:30P SB 120 FOR: DeCorte, Joe A. Police Officer (Dallas Police Department - Chief T. Bolton), Dallas, TX Gaylor, Tom Narcotics Detective (Plano Police Association), Dallas, TX Jones, James D. Detective - San Antonio Police Dept. (San Antonio Police Officers' Association), San Antonio, TX McDougal, Michael A. District Attorney (Montgomery County D.A.'s Office), Conroe, TX AGAINST: Hampton, Keith S. Law (Texas Criminal Defense Lawyers Association), Austin, TX Henson, Scott Technical writing/research (ACLU, Sunshine Project), Austin, TX Registering, but not testifying: For: Heaton, Chris Executive Director (Texas Municipal Police Association), Austin, TX Ward, Jeff (Texas Association of School District Police), San Antonio, TX Zacharias, Larry Deputy Chief of Police - Richardson (Texas Police Chiefs' Association), Richardson, TX Against: Schneider, Michael (Texas Association of Broadcasters), Austin, TX SB 148 Registering, but not testifying: For: Gaylor, Tom Detective Plano Police Dept. (Plano Police Association), Plano, TX Lawrence, Kevin F. Deputy Executive Director (Texas Municipal Police Association), Austin, TX Lewis, Bill Publisher, The Keller Citizen (Mothers Against Drunk Driving), Keller, TX Posey, John (Mothers Against Drunk Driving), Austin, TX Ward, Jeff (Texas Association of School District Police), San Antonio, TX Whalen, Ken Director of Legislative Affairs (TX Daily Newspaper Association), Austin, TX SB 164 FOR: Lee, Donald Executive Director (Texas Conference of Urban Counties), Austin, TX Ott, Judge Patricia Justice of the Peace, Leg. Co-Chair (Justices of the Peace and Constables Assoc. Inc.), Austin, TX Registering, but not testifying: For: Allison, Jim General Counsel (County Judges and Commissioners Assn. of Texas), Austin, TX Williams, John H. Retired Justice of the Peace (Justice of the Peace and Constables Association of Texas), Robstown, TX SB 250 ON: Ott, Judge Patricia Justice of the Peace and Leg. Co-Chair (Justices of the Peace and Constables Assoc. Inc.), Austin, TX Registering, but not testifying: For: Allison, Jim General Counsel (County Judges and Commissioners Association of Texas), Austin, TX SB 370 FOR: Brackman, Mike K. Chief Deputy (Burleson County Sheriff's Office), Caldwell, TX Lee, Donald Executive Director (Texas Conference of Urban Counties), Austin, TX Registering, but not testifying: For: Allison, Jim General Counsel (County Judges and Commissioners Association of Texas), Austin, TX On: Malinak, Frank Texas Ranger (Law Enforcement), Bryan, TX SB 678 FOR: Griffin, Jean Teen Court Coordinator (Irving Teen Court), Irving, TX Harbour, Clint Attorney (YMCA of Austin/Teen Court), Austin, TX Harrington, Olivia Teen Court Coordinator (City of Duncanville), Duncanville, TX O'Neal, Michael L. Municipal Judge (Texas Municipal Court Association), Dallas, TX Stevenson, Deydra Court Administrator - Program Manager (Abilene Teen Court), Abilene, TX ON: Turner, Ryan Kellus Attorney (Texas Municipal Courts Education Center), Austin, TX


Natty Daddy
Malt liquors and/or beers that qualify by ABV as such, like Natty Daddy, will not as a general rule receive a review from Passable Beer Reviews. Exceptions to this rule will be beers with some type of personal connection. Unfortunately, I previously wrote about this monstrosity for a now-defunct site.
This current venture began as a class project, and a classmate's Natty Daddy mention sealed my fate. Review Natty Daddy I must.
Natty Daddy first entered my life via my wife's Instagram feed. I once wondered what this said about my wife and, by association, me. But when the time came for her to provide "A Woman's Perspective" she refused to drink the Daddy.
As far as I know, Natty Daddy only comes in 25 oz. cans. Why? Because all signs point to us living in the world of "Idiocracy" and 25 ounces of a beer called Natty Daddy pairs perfectly with an Extra Big-Ass Taco from Carl's Jr.
That extra ounce is a real killer too. Like all of the world's worst beers Natty Daddy is best enjoyed as close to freezing as possible. If it were possible, I would actually recommend drinking this "beer" as fast as possible. The taste is so foul, though, that it cannot be consumed before warming. And in a feature that makes no sense, I would swear that Natty Daddy seemed THICKER than regular beer.
By the time I got down to the last ounce I was questioning literally every decision I had ever made. What misstep along my path had landed me in this hell? After choking down the last drops I drank a session IPA just to help erase the taste from my mouth. If only the memory was also so easily erased.
I will only describe the next morning as much worse than most mornings after a three-beer night and for that I cannot entirely blame the robust ABV. I suspect there are many Unnatural elements — industrial runoff? ancient occult ceremonies? — to the "Natural" Daddy brewing process. Where have you gone, Upton Sinclair? Our nation turns its lonely eyes to you.
Despite damaging my body in possibly irreversible ways the entire Natty Daddy experience did provide one lone bright spot. The website has a way to locate stores and bars where Natty Daddy can be found. My zip code revealed only two options for the Night Out(bar) option. One of these establishments is on our way to the beach.
She's a keeper, my wife. The same cannot be said of Natty Daddy, which should come with a Surgeon General's warning.


Projects
Predicting Longevity Among Male Fruitflies
Teammates:
Anyssa Buchanan, Adis Husejinovic
Details:
We received our data from the Journal of Statistics Education. Our data concerns the reproduction costs of male fruit flies in terms of reduced longevity. There are 2 types of male fruit flies within this data set. One type has 1 or 8 newly inseminated female partners, while the other type has 0 partners. The longevity of male fruit flies was compared between these two types.
Previous studies have indicated reduced longevity among sexually active female fruit flies. Essentially, the aim of this study is to conclude whether or not male fruit flies also have reduced longevity due to increased sexual activity.
Looking at this data set, we have decided to use longevity as our output based on the other attributes. We used data mining, specifically numeric estimation, to determine a model that our data can be tested on. In order to prep our data, we used Python and SQLite. Lastly, we used SQLite to aid in our data visualization process.
Details:
I learned HTML, CSS, and MySQL in the span of two weeks to create a web application that allows users to create a profile and share what destinations they would like to travel. Establishing a database connection in Python, site viewers are able to see most popular destinations by criteria including age and gender.
Relational Databases
Below is the first of many more to come!
Details:
All in good fiction: Due to the heavy amount of crime plaguing many nations, good-doers such as policemen, firemen, and federal bureau agents have not found it feasible to keep track of every mis-happening. Furthermore, superhuman abilities have begun to emerge. By the year 2024, at least 15% of all humans will have a power. Some use these as gifts; others as curses—and it is those who use their powers for unpleasantness that have caused a 79% increase in crime rates all over the world.
In an effort to cleanse each community from terror, HELP WANTED offers itself as a service to organizations affiliated with the government, police force, and any other registered institution that seeks extra assistance in solving a crime. Queries can be made to search for specific superheroes, archenemies, powers, and crimes. A listing of all information regarding all humans on the planet is also available.
Future Plans
Last semester (Fall 2015), I enrolled in a class on probability in computing. In this class, I revisited the matplot library and was introduced to pandas (via Python). I found it really helpful to visualize distributions (binomial, multinomial, geometric, etc.) in graphs, but am hoping to extend these tools further to more interesting datasets. If you have any ideas or would like to work with me, please do not hesistate to get in touch!


Application class that subclasses Entity to represent some automatable desktop application
| Signature | Application.behaviors |
|---|---|
| Type | Variable |
| Description | Application behaviors defined to invoke event handlers with |
| Signature | Application.createMenuItemEvent(menuItem[, shouldFocusAfter, shouldFocusBefore]) |
|---|---|
| Type | Method |
| Description | Convenience method to create an event handler that selects a menu item, with optionally specified behavior on how the menu item selection occurs Parameters:
Returns:
|
| Signature | Application.createMenuItemSelectionEvent(menuItem[, shouldFocusAfter, shouldFocusBefore]) |
|---|---|
| Type | Method |
| Description | Convenience method to create an event handler that presents a selection modal containing menu items that are nested/expandable underneath at the provided Parameters:
Returns:
|
| Signature | Application:focus(app[, choice]) |
|---|---|
| Type | Method |
| Description | Activates an application or focuses a specific application window or tab Parameters:
Returns:
|
| Signature | Application:getApplication() -> hs.application object or nil |
|---|---|
| Type | Method |
| Description | Gets the Parameters:
Returns:
|
| Signature | Application.getMenuItemList(app, menuItemPath) -> table or nil |
|---|---|
| Type | Method |
| Description | Gets a list of menu items from a hierarchical menu item path Parameters:
Returns:
|
| Signature | Application:getSelectionItems() |
|---|---|
| Type | Method |
| Description | Returns choice objects containing application window information. Parameters:
Returns:
|
| Signature | Application:initialize(name, shortcuts, autoExitMode) |
|---|---|
| Type | Method |
| Description | Initializes a new application instance with its name and shortcuts. By default, common shortcuts are automatically registered, and the initialized entity defaults, such as the cheatsheet. Parameters:
Each
Returns:
|
| Signature | Application:toggleFullScreen(app) |
|---|---|
| Type | Method |
| Description | Toggles the full screen state of the focused application window Parameters:
Returns:
|


Some random text
Location
Select a Distance
Within 1 Mile
Within 5 Miles
Within 10 Miles
Within 15 Miles
Within 25 Miles
Within 50 Miles
Within 100 Miles
Name
Search for a Healthcare Professional by Name
And/Or
Refine your results by Specialty


rest-hapi
A RESTful API generator built around the hapi framework and mongoose ODM.
rest-hapi is a framework intended to abstract the work involved in setting up API routes/validation/handlers/etc. for the purpose of rapid app development. At the same time it provides a powerful combination of relational structure with NoSQL flexibility. You define your models and the rest is done for you. Have your own API server up and running in minutes!
Features
- Automatic generation of CRUD endpoints with middleware support
- Automatic generation of association endpoints
- joi validation
- User password encryption support
- Optional token authentication for all generated endpoints
- Swagger docs for all generated endpoints via hapi-swagger
- Query parameter support for sorting, filtering, pagination, and embedding of associated models
Live demo
View the swagger docs for the live demo:
http://ec2-35-162-67-113.us-west-2.compute.amazonaws.com:8124/
Readme contents
- Requirements
- Installation
- Running the app
- Configuration
- Testing
- Swagger documentation
- Creating endpoints
- Associations
- Route customization
- Querying
- Validation
- Middleware
- Additional endpoints
- Token authentication
- License
- Questions
- Future work
- Contributing
Requirements
You need Node.js installed and you'll need MongoDB installed and running. You will also need the gulp node package installed.
Installation
$ git clone https://github.com/JKHeadley/rest-hapi.git
$ cd rest-hapi
$ npm install
First time setup/Demo
WARNING: This will clear all data in the following MongoDB collections (in the db defined in config.local.js
) if they exist: users
, roles
.
If you would like to seed your database with some demo models/data, run:
$ gulp seed
NOTE: The password for all seed users is 1234
.
You can use these models as templates for your models or delete them later if you wish.
Running the app
$ gulp serve:local
or just
$ gulp
Then point your browser to http://localhost:8124/ to view the swagger docs.
gulp-nodemon watches for changes in server code and restarts the app automatically.
Configuration
Edit the config file relevant to your environment (local, development, production). The default config
file is /api/config.local.js
. Here you can set the server port, mongodb URI, and authentication.
Testing
To run tests:
$ gulp test
Swagger documentation
Swagger documentation is automatically generated for all endpoints and can be viewed by pointing a browser at the server URL. By default this will be http://localhost:8124/. The swagger docs provide quick access to testing your endpoints along with model schema descriptions and query options.
Creating endpoints
Restful endpoints are automatically generated based off of any mongoose models that you add to the
/api/models
folder with the file structure of {model name}.model.js
. These models must adhere to the following format:
module.exports = function (mongoose) {
var Schema = new mongoose.Schema({
/*fill in schema fields*/
});
Schema.statics = {
collectionName: /*your model name*/,
routeOptions: {}
};
return Schema;
};
As a concrete example, here is a user
model:
/api/models/user.model.js
:
module.exports = function (mongoose) {
var modelName = "user";
var Types = mongoose.Schema.Types;
var Schema = new mongoose.Schema({
email: {
type: Types.String,
required: true,
unique: true
},
password: {
type: Types.String,
required: true,
exclude: true,
allowOnUpdate: false
}
});
Schema.statics = {
collectionName: modelName
routeOptions: {}
};
return Schema;
};
This will generate the following CRUD endpoints:
GET /user Get a list of users
POST /user Create a new user
GET /user/{_id} Get a specific user
PUT /user/{_id} Update a user
DELETE /user/{_id} Delete a user
Associations
The rest-hapi framework supports model associations that mimic associations in
a relational database. This includes one-one, one-many, many-one, and many-many
relationships. Associations are created by adding the relevant schema fields
and populating the associations
object within routeOptions
. Associations
exists as references to a document's _id
field, and can be populated to return
the associated object. See Querying for more details on how to populate
associations.
ONE_ONE
Below is an example of a one-one relationship between a user
model and a
dog
model. Notice the dog
and owner
fields in the schemas. A schema
field is required for associations of type ONE_ONE
or MANY_ONE
. This
field must match the association name, include a type of ObjectId
, and
include a ref
property with the associated model name.
Each association must be added to an associations
object within the
routeOptions
object. The type
and model
fields are
required for all associations.
/api/models/user.model.js
:
module.exports = function (mongoose) {
var modelName = "user";
var Types = mongoose.Schema.Types;
var Schema = new mongoose.Schema({
email: {
type: Types.String,
required: true,
unique: true
},
password: {
type: Types.String,
required: true,
exclude: true,
allowOnUpdate: false
},
dog: {
type: Types.ObjectId,
ref: "dog"
}
});
Schema.statics = {
collectionName:modelName,
routeOptions: {
associations: {
dog: {
type: "ONE_ONE",
model: "dog"
}
}
}
};
return Schema;
};
/api/models/dog.model.js
:
module.exports = function (mongoose) {
var modelName = "dog";
var Types = mongoose.Schema.Types;
var Schema = new mongoose.Schema({
name: {
type: Types.String,
required: true
},
breed: {
type: Types.String
},
owner: {
type: Types.ObjectId,
ref: "user"
}
});
Schema.statics = {
collectionName:modelName,
routeOptions: {
associations: {
owner: {
type: "ONE_ONE",
model: "user"
}
}
}
};
return Schema;
};
ONE_MANY/MANY_ONE
Below is an example of a one-many/many-one relationship between the user
and role
models. Notice the title
field in the schema. A schema
field is required for associations of type ONE_ONE
or MANY_ONE
. This
field must match the association name, include a type of ObjectId
, and
include a ref
property with the associated model name.
/api/models/user.model.js
:
module.exports = function (mongoose) {
var modelName = "user";
var Types = mongoose.Schema.Types;
var Schema = new mongoose.Schema({
email: {
type: Types.String,
required: true,
unique: true
},
password: {
type: Types.String,
required: true,
exclude: true,
allowOnUpdate: false
},
title: {
type: Types.ObjectId,
ref: "role"
}
});
Schema.statics = {
collectionName:modelName,
routeOptions: {
associations: {
title: {
type: "MANY_ONE",
model: "role"
}
}
}
};
return Schema;
};
/api/models/role.model.js
:
module.exports = function (mongoose) {
var modelName = "role";
var Types = mongoose.Schema.Types;
var Schema = new mongoose.Schema({
name: {
type: Types.String,
required: true,
enum: ["Account", "Admin", "SuperAdmin"]
},
description: {
type: Types.String
}
});
Schema.statics = {
collectionName:modelName,
routeOptions: {
associations: {
users: {
type: "ONE_MANY",
foreignField: "title",
model: "user"
}
}
}
};
return Schema;
};
In this example, a user can belong to one role and a role can be
assigned to many users. The type
and model
fields are
required for all associations, and the foreignField
field is
required for ONE_MANY
type associations.
Along with the normal CRUD endpoints, the following association
endpoints will be generated for the role
model:
GET /role/{ownerId}/user Gets all of the users for a role
POST /role/{ownerId}/user Sets multiple users for a role
PUT /role/{ownerId}/user/{childId} Add a single user object to a role's list of users
DELETE /role/{ownerId}/user/{childId} Remove a single user object from a role's list of users
MANY_MANY
Below is an example of a many-many relationship between the user
and
group
models. In this relationship a single user
instance can belong
to multiple group
instances and vice versa.
/api/models/user.model.js
:
module.exports = function (mongoose) {
var modelName = "user";
var Types = mongoose.Schema.Types;
var Schema = new mongoose.Schema({
email: {
type: Types.String,
required: true,
unique: true
},
password: {
type: Types.String,
required: true,
exclude: true,
allowOnUpdate: false
}
});
Schema.statics = {
collectionName:modelName,
routeOptions: {
associations: {
groups: {
type: "MANY_MANY",
model: "group"
}
}
}
};
return Schema;
};
/api/models/group.model.js
:
module.exports = function (mongoose) {
var modelName = "group";
var Types = mongoose.Schema.Types;
var Schema = new mongoose.Schema({
name: {
type: Types.String,
required: true,
},
description: {
type: Types.String
}
});
Schema.statics = {
collectionName:modelName,
routeOptions: {
associations: {
users: {
type: "MANY_MANY",
model: "user"
}
}
}
};
return Schema;
};
Along with the normal CRUD endpoints, the following association
endpoints will be generated for the user
model:
GET /user/{ownerId}/group Gets all of the groups for a user
POST /user/{ownerId}/group Sets multiple groups for a user
PUT /user/{ownerId}/group/{childId} Add a single group object to a user's list of groups
DELETE /user/{ownerId}/group/{childId} Remove a single group object from a user's list of groups
and for the group
model:
GET /group/{ownerId}/user Gets all of the users for a group
POST /group/{ownerId}/user Sets multiple users for a group
PUT /group/{ownerId}/user/{childId} Add a single user object to a group's list of users
DELETE /group/{ownerId}/user/{childId} Remove a single user object from a group's list of users
MANY_MANY linking models
Many-many relationships can include extra fields that contain data specific
to each association instance. This is accomplished through linking models which
behave similar to pivot tables in a relational database. Linking model files are
stored in the /api/models/linking-models
directory and follow the same
{name}.model.js
format as normal models. Below is an example of a many-many
relationship between the user
model and itself through the friends
association.
The extra field friendsSince
could contain a date representing how long the two
associated users have known each other. This example also displays how models can contain a
reference to themselves.
/api/models/user.model.js
:
module.exports = function (mongoose) {
var modelName = "user";
var Types = mongoose.Schema.Types;
var Schema = new mongoose.Schema({
email: {
type: Types.String,
required: true,
unique: true
},
password: {
type: Types.String,
required: true,
exclude: true,
allowOnUpdate: false
}
});
Schema.statics = {
collectionName:modelName,
routeOptions: {
associations: {
friends: {
type: "MANY_MANY",
model: "user",
alias: "friend",
linkingModel: "user_user"
}
}
}
};
return Schema;
};
/api/models/linking-models/user_user.model.js
:
var mongoose = require("mongoose");
module.exports = function () {
var Types = mongoose.Schema.Types;
var Model = {
Schema: {
friendsSince: {
type: Types.Date
}
},
modelName: "user_user"
};
return Model;
};
Route customization
By default route paths are constructed using model names, however aliases can be provided to customize the route paths.
routeOptions.alias
can be set to alter the base path name, and an alias
property for an association can be set
to alter the association path name. For example:
module.exports = function (mongoose) {
var modelName = "user";
var Types = mongoose.Schema.Types;
var Schema = new mongoose.Schema({
email: {
type: Types.String,
required: true,
unique: true
},
password: {
type: Types.String,
required: true,
exclude: true,
allowOnUpdate: false
}
});
Schema.statics = {
collectionName: modelName
routeOptions: {
alias: "person"
associations: {
groups: {
type: "MANY_MANY",
model: "group",
alias: "team"
}
}
}
};
return Schema;
};
will result in the following endpoints:
GET /person
POST /person
DELETE /person/{_id}
PUT /person/{_id}
GET /person/{_id}
POST /person/{ownerId}/team
GET /person/{ownerId}/team
PUT /person/{ownerId}/team/{childId}
DELETE /person/{ownerId}/team/{childId}
Querying
Query parameters can be added to GET requests to filter responses. These parameters are structured and function similar to mongoose queries. Below is a list of currently supported parameters:
-
$skip
- The number of records to skip in the database. This is typically used in pagination.
-
$limit
- The maximum number of records to return. This is typically used in pagination.
-
$select
- A list of basic fields to be included in each resource.
-
$sort
- A set of fields to sort by. Including field name indicates it should be sorted ascending, while prepending '-' indicates descending. The default sort direction is 'ascending' (lowest value to highest value). Listing multiple fields prioritizes the sort starting with the first field listed.
-
$embed
- A set of associations to populate.
-
$where
- An optional field for raw mongoose queries.
-
(field "where" queries)
- Ex:
<EMAIL_ADDRESS>- Ex:
Query parameters can either be passed in as a single string, or an array of strings.
Populate nested associations
Associations can be populated through the $embed
parameter. To populate nested associations,
simply chain a parameter with .
. For example, consider the MANY_MANY group-user association
from the example above. If we populate the users of a group with /group?$embed=users
we might get a
response like so:
{
"_id": "58155f1a071468d3bda0fc6e",
"name": "A-team",
"users": [
{
"user": {
"_id": "580fc1a0e2d3308609470bc6",
"email"<EMAIL_ADDRESS>"title": "580fc1e2e2d3308609470bc8"
},
"_id": "58155f6a071468d3bda0fc6f"
},
{
"user": {
"_id": "5813ad3d0d4e5c822d2f05bd",
"email"<EMAIL_ADDRESS>"title": "580fc1eee2d3308609470bc9"
},
"_id": "58155f6a071468d3bda0fc71"
}
]
}
However we can further populate each user's title
field with a nested $embed
parameter: /group?$embed=users.title
which could result in the following response:
{
"_id": "58155f1a071468d3bda0fc6e",
"name": "A-team",
"users": [
{
"user": {
"_id": "580fc1a0e2d3308609470bc6",
"email"<EMAIL_ADDRESS>"title": {
"_id": "580fc1e2e2d3308609470bc8",
"name": "Admin"
}
},
"_id": "58155f6a071468d3bda0fc6f"
},
{
"user": {
"_id": "5813ad3d0d4e5c822d2f05bd",
"email"<EMAIL_ADDRESS>"title": {
"_id": "580fc1eee2d3308609470bc9",
"name": "SuperAdmin"
}
},
"_id": "58155f6a071468d3bda0fc71"
}
]
}
Validation
Validation in the rest-hapi framework is implemented with joi.
This includes validation of headers, query parameters, payloads, and responses. joi validation models
are based primarily off of each model's field properties. Below is a list of mongoose schema types
and their joi equivalent within rest-hapi:
| Schema Type | joi Validation |
|---|---|
| ObjectId | Joi.objectId() (via joi-objectid) |
| Boolean | Joi.bool() |
| Number | Joi.number() |
| Date | Joi.date() |
| String | Joi.string() |
| types | Joi.any() |
Fields of type String
that include an enum
property result in the following joi validation:
| Field Property | joi Validation |
|---|---|
| enum: [items] | Joi.any().only([items]) |
rest-hapi generates joi validation models for create, read, and update events as well as association events with linking models. By default these validation models include all the fields of the mongoose models and list them as optional. However additional field properties can be included to customize the validation models. Below is a list of currently supported field properties and their effect on the validation models.
| Field Property | Validation Model |
|---|---|
| required: true | field required on create |
| requireOnRead: true | field required on read/response |
| requireOnUpdate: true | field required on update |
| allowOnRead: false | field excluded from read model |
| allowOnUpdate: false | field excluded from update model |
| allowOnUpdate: false | field excluded from create model |
| queryable: false | field cannot be included as a query parameter |
| exclude: true | field cannot be included in a response or as part of a query |
| allowNull: true | field accepts null as a valid value |
Middleware
Models can support middleware functions for CRUD operations. These
exist under the routeOptions
object. Middleware functions must return
a promise. The following middleware functions
are available:
- list:
- post(request, result, Log)
- find:
- post(request, result, Log)
- create:
- pre(request, Log)
- post(request, result, Log)
- update:
- pre(request, Log)
- post(request, result, Log)
- delete:
- pre(request, Log)
- post(request, result, Log)
For example, a create: pre
function can be defined to encrypt a users password
using the built-in password-helper
utility. Notice the use of the Q
library
to return a promise.
var Q = require('q');
module.exports = function (mongoose) {
var modelName = "user";
var Types = mongoose.Schema.Types;
var Schema = new mongoose.Schema({
email: {
type: Types.String,
required: true,
unique: true
},
password: {
type: Types.String,
required: true,
exclude: true,
allowOnUpdate: false
}
});
Schema.statics= {
collectionName: modelName
routeOptions: {
create: {
pre: function (request, Log) {
var deferred = Q.defer();
var passwordUtility = require('../../api/utilities/password-helper');
var hashedPassword = passwordUtility.hash_password(request.payload.password);
request.payload.password = hashedPassword;
deferred.resolve(request);
return deferred.promise;
}
}
}
};
return Schema;
};
Additional endpoints
If endpoints beyond the generated CRUD endpoints are needed, they can easily be added
to a model as an item in the routeOptions.extraEndpoints
array. The endpoint
logic should be contained within a function using the footprint: function (server, model, options, Log)
. For example, if we wanted to add a Password Update
endpoint to the user
model, it could
look like this:
var Joi = require('joi');
Joi.objectId = require('joi-objectid')(Joi);
var Boom = require('boom');
module.exports = function (mongoose) {
var modelName = "user";
var Types = mongoose.Schema.Types;
var Schema = new mongoose.Schema({
email: {
type: Types.String,
required: true,
unique: true
},
password: {
type: Types.String,
required: true,
exclude: true,
allowOnUpdate: false
}
});
Schema.statics = {
collectionName:modelName,
routeOptions: {
extraEndpoints: [
//Password Update Endpoint
function (server, model, options, Log) {
Log = Log.bind("Password Update");
var collectionName = model.collectionDisplayName || model.modelName;
Log.note("Generating Password Update endpoint for " + collectionName);
var handler = function (request, reply) {
var passwordUtility = require('../../api/utilities/password-helper');
var hashedPassword = passwordUtility.hash_password(request.payload.password);
return model.findByIdAndUpdate(request.params._id, {password: hashedPassword}).then(function (result) {
if (result) {
return reply("Password updated.").code(200);
}
else {
return reply(Boom.notFound("No resource was found with that id."));
}
})
.catch(function (error) {
Log.error("error: ", error);
return reply(Boom.badImplementation("An error occurred updating the resource.", error));
});
}
server.route({
method: 'PUT',
path: '/user/{_id}/password',
config: {
handler: handler,
auth: null,
description: 'Update a user\'s password.',
tags: ['api', 'User', 'Password'],
validate: {
params: {
_id: Joi.objectId().required()
},
payload: {
password: Joi.string().required()
.description('The user\'s new password')
}
},
plugins: {
'hapi-swagger': {
responseMessages: [
{code: 200, message: 'Success'},
{code: 400, message: 'Bad Request'},
{code: 404, message: 'Not Found'},
{code: 500, message: 'Internal Server Error'}
]
}
}
}
});
}
]
}
};
return Schema;
};
Token authentication
The rest-hapi framework supports built in token authentication for all generated endpoints given the following requirements are fulfilled:
- A
user
model exists with at least the following properties:
var Q = require('q');
module.exports = function (mongoose) {
var modelName = "user";
var Types = mongoose.Schema.Types;
var Schema = new mongoose.Schema({
email: {
type: Types.String,
required: true,
unique: true
},
password: {
type: Types.String,
required: true,
exclude: true,
allowOnUpdate: false
},
token: {
type: Types.String,
allowNull: true,
exclude: true,
allowOnUpdate: false,
allowOnCreate: false
},
tokenCreatedAt: {
type: Types.String,
allowNull: true,
exclude: true,
allowOnUpdate: false,
allowOnCreate: false
}
});
Schema.statics = {
collectionName:modelName,
routeOptions: {
create: {
pre: function (request, Log) {
var deferred = Q.defer();
var passwordUtility = require('../../api/utilities/password-helper');
var hashedPassword = passwordUtility.hash_password(request.payload.password);
request.payload.password = hashedPassword;
deferred.resolve(request);
return deferred.promise;
}
}
}
};
return Schema;
};
NOTE: Token authentication requires that passwords are encrypted using the password helper as above.
- The
auth
property in the config file is set to"token"
.
Given these conditions, a new endpoint will be generated:
POST /token Create a token for a user.
This endpoint takes a user email and password as a payload and returns an authentication token. When token authentication is enabled, all generated enpoints require an Authentication header:
Authorization: Bearer USER_TOKEN
License
MIT
Questions?
If you have any questions/issues/feature requests, please feel free to open an issue.
Future work
This project is still in its infancy, and there are many features I would still like to add. Below is a list of some possible future updates:
- support mongoose
$text
search query parameter - sorting through populate fields (Ex: sort users through role.name)
- have built in
created_at
andupdated_at
fields for each model - support marking fields as
duplicate
i.e. any associated models referencing that model will duplicate those fields along with the reference Id. This could allow for a shallow embed that will return a list of reference ids with their "duplicate" values, and a full embed that will return the fully embedded references - support automatic logging of all operations via a
eventLogs
collection - support "soft" delete of mongo documents, i.e. documents are marked as "deleted" but remain in the db.
- (LONG TERM) support mysql as well as mongodb
Contributing
Please reference the contributing doc: https://github.com/JKHeadley/rest-hapi/blob/master/CONTRIBUTING.md