About jsotp
jsotp is a JavaScript implementation of a one-time password
generator/calculator for the OTP and S/Key systems. It supports MD4, MD5, and
SHA-1 hashing methods, by way of code written by Paul Johnston. It
also supports RIPEMD-160, through some code
that I wrote. This calculator was inspired by Harry Mantakos's Java applet
OTP calculator (available at his
site). If there's already a Java applet version, then why a JavaScript
version? Because in regard to web browsers, JavaScript is still by far the
most universally available programming language (I was actually very
surprised that I couldn't find an existing JavaScript-based
calculator).
Also, I've added some enhancements that make jsotp basically the
only thing you need for generating OTP and S/Key passwords: it runs in most
semi-modern web browsers, can generate passwords for all of the hash methods
commonly supported, and can generate single passwords, as well as lists of
passwords suitable for printing. Another benefit is that if you're using
jsotp remotely, it's relatively easy for you to verify that the copy
you're using doesn't do anything funny, since you can easily view the source
from within your browser.
If you're so inclined, jsotp can also be used as a divination tool.
Just type in your question as the seed, enter your current favorite
not-too-big number, and flail on the keyboard for a bit. Finally, pick your
lucky hashing method to see what fate has in store for you today. It usually
doesn't make much sense, but then again, what in life does?
Feel free to examine the source and host a copy of your own for better
security. If you intend for other people also to use your copy, however,
please at least retain a link back to the jsotp site.
Questions, comments, bug reports, etc? Email me.
What are OTP and S/Key, and why use them?
OTP and S/Key are one-time password systems. Unsurprisingly, OTP also stands
for "one-time password". In these systems, you generate a sequence of hashes
by repeatedly applying a secure one-way hash on a random seed value prepended
to your secret passphrase. Then you can use the hashes as one-time passwords,
in backwards order; since the hashes are one-way, knowing a hash later in the
sequence will not help you compute an earlier hash in a reasonable amount of
time. Note that since the hashes are just random-looking 64-bit numbers, they
are usually converted to a six-word format to make it easier for the user to
keep track of what he's typing. Also, while OTP generators are required to
show the words in all uppercase, the server should not care what case they
are in, so feel free to type an OTP in all lowercase.
OTP is basically a somewhat updated (and mostly compatible) version of the
S/Key system created at Bellcore (which also owns the trademark on the name
S/Key). OTP is described in RFC
2289, and S/Key is described in RFC 1760. You can also find
some additional documents related to OTP authentication here. OTP and
S/Key have generally not been all that useful since the advent of SSH, but I
think they remain useful in two situations:
- You want to log into a remote system from a computer that has neither a
native SSH client nor a browser that supports running a Java applet SSH
client (either because Java isn't installed, or the version is too old), or
the connection is slow and you just don't feel like downloading a large
applet. In this case, as long as you do have a telnet client (which comes
with most operating systems), an OTP system can be a good alternative.
- You want to log into a remote system from another computer, but you
suspect (or are just paranoid) that this computer may log keystrokes or
something. Having an SSH client available obviously doesn't help with this
problem, but having a precomputed list of one-time passwords does (though
having such a list ready when you need it does require a little advance
planning). You can use jsotp to generate however many passwords you
think you might need (make sure you do it from a trusted computer!), then
print them out and keep them safely with you.
OTP's can be used fruitfully with other network services (such as email, FTP,
etc.), assuming the particular daemon you're using can be configured to
accept OTP's. For example, if the SSH daemon on the remote end is configured
to accept OTP's, then you can use an OTP in conjunction with SSH to gain
end-to-end encryption. However, if you think keystrokes are being logged,
then it's not such a stretch to think that the local SSH client may be
capturing incoming data too, so it's still risky to type or display anything
sensitive. Also, there are more nefarious, active attacks that OTP's would
not provide any protection against; for example, the local SSH client could
conceivably be trojaned to allow an attacker to send commands of his choice
to the system you've logged into.
The source
jsotp is normally stripped of comments and whatnot to make it a tiny
bit faster to download. There are also versions that include only one
particular hashing method (MD4, MD5, SHA-1, RIPEMD-160)
that provide a more noticeable decrease in page size (these contain all code
inline, so you can just save the page without copying any other source
files). And while it's not all that interesting, you can find the version
with comments retained as
otp.js in this
directory.
License
jsotp is available under a BSD-style license. The HTML scaffolding on this site also falls
under the same license. As mentioned previously, feel free to mirror whatever
pages you need on your own webspace for better security (and again, note that
the single-hash versions contain all code inline, so you can just save the
page directly).
Jeremy Lin, Dec. 2003, Mar. 2004.


A textlayout is lower-level text rendering object used by higher-level entities such as TextField.
More...
|
| t_jtextlayout * | jtextlayout_create () |
| | Create a new textlayout object. More...
|
| |
| t_jtextlayout * | jtextlayout_withbgcolor (t_jgraphics *g, t_jrgba *bgcolor) |
| | Create a new textlayout object. More...
|
| |
| void | jtextlayout_destroy (t_jtextlayout *textlayout) |
| | Release/free a textlayout object. More...
|
| |
| void | jtextlayout_set (t_jtextlayout *textlayout, const char *utf8, t_jfont *jfont, double x, double y, double width, double height, t_jgraphics_text_justification justification, t_jgraphics_textlayout_flags flags) |
| | Set the text and attributes of a textlayout object. More...
|
| |
| void | jtextlayout_settext (t_jtextlayout *textlayout, const char *utf8, t_jfont *jfont) |
| | Set the text of a textlayout object. More...
|
| |
| void | jtextlayout_settextcolor (t_jtextlayout *textlayout, t_jrgba *textcolor) |
| | Set the color to render text in a textlayout object. More...
|
| |
| void | jtextlayout_measuretext (t_jtextlayout *textlayout, long startindex, long numchars, long includewhitespace, double *width, double *height, long *numlines) |
| | Return a measurement of how much space will be required to draw the text of a textlayout. More...
|
| |
| void | jtextlayout_draw (t_jtextlayout *tl, t_jgraphics *g) |
| | Draw a textlayout in a given graphics context. More...
|
| |
| long | jtextlayout_getnumchars (t_jtextlayout *tl) |
| | Retrieve a count of the number of characters in a textlayout object. More...
|
| |
| t_max_err | jtextlayout_getcharbox (t_jtextlayout *tl, long index, t_rect *rect) |
| | Retrieve the t_rect containing a character at a given index. More...
|
| |
| t_max_err | jtextlayout_getchar (t_jtextlayout *tl, long index, long *pch) |
| | Retrieve the unicode character at a given index. More...
|
| |
| t_jpath * | jtextlayout_createpath (t_jtextlayout *tl) |
| | Create a t_jpath object representing the text layout. More...
|
| |
A textlayout is lower-level text rendering object used by higher-level entities such as TextField.
◆ t_jgraphics_textlayout_flags
Flags for setting text layout options.
| Enumerator |
|---|
| JGRAPHICS_TEXTLAYOUT_NOWRAP | disable word wrapping
|
| JGRAPHICS_TEXTLAYOUT_USEELLIPSIS | show ... if a line doesn't fit (implies NOWRAP too)
|
◆ jtextlayout_create()
Create a new textlayout object.
- Returns
- The new textlayout object.
◆ jtextlayout_createpath()
Create a t_jpath object representing the text layout.
- Parameters
-
| tl | The textlayout object to retrieve a path for. |
- Returns
- A t_jpath. When finished with the path free it with jgraphics_path_destroy.
◆ jtextlayout_destroy()
Release/free a textlayout object.
- Parameters
-
| textlayout | The textlayout object to release. |
◆ jtextlayout_draw()
Draw a textlayout in a given graphics context.
- Parameters
-
| tl | The textlayout object to query. |
| g | The graphics context in which to draw the text. |
◆ jtextlayout_getchar()
Retrieve the unicode character at a given index.
- Parameters
-
| tl | The textlayout object to query. |
| index | The index from which to fetch the unicode character. |
| pch | The address of a variable to hold the unicode character value upon return. |
- Returns
- A Max error code.
◆ jtextlayout_getcharbox()
Retrieve the t_rect containing a character at a given index.
- Parameters
-
| tl | The textlayout object to query. |
| index | The index from which to fetch the unicode character. |
| rect | The address of a valid t_rect which will be filled in upon return. |
- Returns
- A Max error code.
◆ jtextlayout_getnumchars()
Retrieve a count of the number of characters in a textlayout object.
- Parameters
-
| tl | The textlayout object to query. |
- Returns
- The number of characters.
◆ jtextlayout_measuretext()
| void jtextlayout_measuretext |
( |
t_jtextlayout * |
textlayout, |
|
|
long |
startindex, |
|
|
long |
numchars, |
|
|
long |
includewhitespace, |
|
|
double * |
width, |
|
|
double * |
height, |
|
|
long * |
numlines |
|
) |
| |
Return a measurement of how much space will be required to draw the text of a textlayout.
- Parameters
-
| textlayout | The textlayout object to query. |
| startindex | You can measure a subset of the characters. This defines the character from which to start. |
| numchars | Pass -1 for all characters from startindex to end |
| includewhitespace | Define whether to measure with or without whitespace truncated from edges. |
| width | Returns the width of text not including any margins. |
| height | Returns the height of text not including any margins. |
| numlines | Returns the number of lines of text. |
◆ jtextlayout_set()
Set the text and attributes of a textlayout object.
- Parameters
-
| textlayout | The textlayout object. |
| utf8 | The text to render. |
| jfont | The font with which to render the text. |
| x | The text is placed within rect specified by x, y, width, height. |
| y | The text is placed within rect specified by x, y, width, height. |
| width | The text is placed within rect specified by x, y, width, height. |
| height | The text is placed within rect specified by x, y, width, height. |
| justification | How to justify the text within the rect. |
| flags | Additional flags to control behaviour. |
◆ jtextlayout_settext()
Set the text of a textlayout object.
- Parameters
-
| textlayout | The textlayout object. |
| utf8 | The text to render. |
| jfont | The font with which to render the text. |
◆ jtextlayout_settextcolor()
Set the color to render text in a textlayout object.
- Parameters
-
| textlayout | The textlayout object for which to set the color. |
| textcolor | The color for the text. |
◆ jtextlayout_withbgcolor()
Create a new textlayout object.
This gives a hint to the textlayout as to what the text bgcolor will be. It won't actually paint the bg for you. But, it does let it do a better job.
- Parameters
-
| g | The graphics context for the textlayout. |
| bgcolor | The background color for the textlayout. |
- Returns
- The new textlayout object.


| Our department has agreed to certain
documentation conventions that should be used in our program code. "Super"
Bob has been assigned to write the documentation tools, and he's currently
working on a "boxed text" feature. The way it's supposed to work is this:
given several lines of text data, center the text and enclose it within
a box made of asterisks. *NOTE* Insert spaces and empty lines such that
no characters from the text data are touching any asterisks. |


Write your First mesibo Enabled Application - Python
Estimated reading time: 4 minutes- Preparation
- Anatomy
- Android
- iOS
- Javascript
- C++
- Python
- File Transfer
- UI Modules
- Voice and Video Calls
In this part, we will create a simple real-time app using Python.
Supported Platforms
- CentOS / RedHat 7.x or above
- Debian / Ubuntu
- Mac OS
- Raspberry Pi
Prerequisites
You MUST go through the following prerequisites before you read further.
- Installed the Mesibo Real-Time Python Library. If not, refer installation instructions here
-
Read the Preparation Guide
-
Read the Anatomy of a Mesibo Application about using the Mesibo API and listener class
- Basic knowledge of writing and running Python code
First Python App
Now let’s quickly start coding:
From mesibo
python package import the function class Mesibo
and the callback class MesiboNotify
from mesibo import Mesibo
from mesibo import MesiboNotify
Now, initialize mesibo like shown below
#Initialisation code
#Get auth token and app id from console
AUTH_TOKEN = "baad7b35749832539002bbff9936130a42aaadd7b2cb0a3e664eabc"
APP_ID = "mypythonapp"
#Create a Mesibo Instance
pymesibo = Mesibo()
#Set Listener
pymesibo.set_listener(MesiboListener)
#Set your AUTH_TOKEN obtained from the Mesibo Console
pymesibo.set_accesstoken(AUTH_TOKEN)
#Set APP_ID which you used to create AUTH_TOKEN
pymesibo.set_appname(APP_ID)
#Set the name of the database
pymesibo.set_database("mesibo.db")
#Start mesibo
pymesibo.start()
As explained in Anatomy of Mesibo Application, Mesibo invokes a class of Listeners for various events.
Derive from the MesiboNotify
class to implement listeners as shown below.
class MesiboListener(MesiboNotify):
def __init__(self):
pass
def on_connectionstatus(self, status):
print("===>on_connectionstatus: " + str(status))
return 1
def on_message(self, message_params,data):
#invoked on receiving a new message or reading database messages
print("===>on_message: from " + str(message_params['peer']))
print(data)
return 1
def on_messagestatus(self, message_params):
#Invoked when the status of outgoing or sent message is changed
print("===>on_messagestatus: from " + str(message_params['peer'])+
" status "+ str(message_params['status']))
return 1
That’s it - you are now ready to receive your first real-time message.
Testing your Python application
- Run your Python script
python myfirstapp.py
-
on_connectionstatus
should cycle through various status information. Finally, you should receive status=1 which indicates that your app is successfully connected to the mesibo real-time server and ready to send and receive real-time messages. -
Since we do not have any other users right now, we will use mesibo console to send a test message. In a later section, we will learn how to send messages from the code itself.
-
Go to Console ->Application->Users. You should see the user you have created.
-
Go to user details by clicking the
Edit
button. Scroll down, you will see a section toMessage User
Enter 1000 (or anything) inFrom
field, checkCreate This User
checkbox, type message and click onSend
.
- You will instantly receive this message in your console/terminal in
on_message
listener.
Sending Messages
In the previous section, we have used mesibo console to send a message. Now we will quickly learn how to send messages from the code itself. To send messages, we will use send_message
real-time API for which we will need destination user, message-id and the message itself.
Invoke the following function anywhere from your code to send a text message.
def send_text_message(to,message):
#api is the Mesibo Python API instance.
#Make sure the instance is initialised before you call API functions
p = {}
p['peer'] = to
data = message
api.send_message(p,api.random(),data)
That’s it! Try it out by creating two users and send messages to each other by using the above function.
mesibo, android, ios, cpp, python


---
layout: post
title: On The Road
date: 2010-10-01 00:00:00
categories: business interfaces-&-interaction personal
---
I've a little pile of speaking engagements over the coming months. Fill your face with me at these events:
- At the Brighton iPhone Creators get-together at the mighty Skiff on 19th October, I'm going to be talking about "Apps and live data", presenting some of the lessons we learned working on Roulette Cricket;
- I'm doing a delightful double act with Mr Ribot at DroidCon in London on 29th October, talking about our experiences growing software companies over the last 10 years;
- OpenMIC comes to Brighton on 4th November, and I'm going to do something unspecified for Chris & co. here;
- On 10th and 11th November I'll be at the FT Innovate 2010 conference in London, as part of a panel session "Mobile Innovation: Getting Smarter"


OpenJPA is bundled with OpenEJB as the default persistence provider.
An example of working persistence.xml
for OpenJPA:
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
<persistence-unit name="movie-unit">
<jta-data-source>movieDatabase</jta-data-source>
<non-jta-data-source>movieDatabaseUnmanaged</non-jta-data-source>
<class>org.superbiz.injection.jpa.Movie</class>
<properties>
<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
</properties>
</persistence-unit>
</persistence>
Where the datasources above are configured in your openejb.xml as follows:
<Resource id="movieDatabase" type="DataSource">
JdbcDriver = org.hsqldb.jdbcDriver
JdbcUrl = jdbc:hsqldb:mem:moviedb
</Resource>
<Resource id="movieDatabaseUnmanaged" type="DataSource">
JdbcDriver = org.hsqldb.jdbcDriver
JdbcUrl = jdbc:hsqldb:mem:moviedb
JtaManaged = false
</Resource>
Or in properties as follows:
p.put("movieDatabase", "new://Resource?type=DataSource");
p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
p.put("movieDatabaseUnmanaged", "new://Resource?type=DataSource");
p.put("movieDatabaseUnmanaged.JdbcDriver", "org.hsqldb.jdbcDriver");
p.put("movieDatabaseUnmanaged.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
p.put("movieDatabaseUnmanaged.JtaManaged", "false");
Or as derby will report it "Table 'abc.xyz' doesn't exist"
Someone has to create the database structure for your persistent objects. If you add the openjpa.jdbc.SynchronizeMappings property as shown below OpenJPA will auto-create all your tables, all your primary keys and all foreign keys exactly to match your objects.
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
<persistence-unit name="movie-unit">
<!-- your other stuff -->
<properties>
<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
</properties>
</persistence-unit>
</persistence>
Pending
Using a EXTENDED persistence context ...
@PersistenceContext(unitName = "movie-unit", type = PersistenceContextType.EXTENDED)
EntityManager entityManager;
on a persistence unit setup as RESOURCE_LOCAL ...
<persistence-unit name="movie-unit" transaction-type="RESOURCE_LOCAL">
...
</persistence-unit>
inside of a transaction.
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public void addMovie(Movie movie) throws Exception {
entityManager.persist(movie);
}
Note the default transaction attribute for any ejb method is REQUIRED unless explicitly set otherwise in the bean class or method in question.
You can either:
TransactionAttributeType.NOT_REQUIRED
or TransactionAttributeType.NEVER
which will guarantee it will not be invoked in a JTA transaction.transaction-type="TRANSACTION"
making it capable of participating in a JTA transaction.


vaccination vaccine disease FMD []. individual game {border-style East vaccines (−, px;} #ffffff;} vaccinate livestock control decision Africa efficacy infection information costs Vaccinate Vaccination cost health influenza px; risk theory {font-family Africa, [], font-size free households theoretical uncertainty uptake South Table animal double; endemic household losses low protection public Vaccine [,]. border-color border-width foot-and-mouth given high improved model multiple payoff prevent quality serotypes solid; spread traditional use virus {font-style {font-weight −). Africa. Disease access address behavior bold circulating commercial conditions context courier; decisions diseases em; enhancing framework games help human immunity improve including individuals likelihood lost matching mouth offers populations potency production protective pt;} reduce setting sub-types sufficiently understanding vaccinates, vaccinating vaccination,


---
layout: post
title: Merry Christmas! 2005
categories: []
tags: []
status: publish
type: post
published: true
meta:
_original_post_id: ''
_original_import_author: John Duprey
author:
---
Inspite of my miserable cold today
was filled with friends, family, good food, and LOVE. Abby did most of the work because I was quite incapacitated with this cold. (I appear to have some sort of double-whammy sinus and digestive illness going on..it hurts.) As per tradition, Abby's parents came over for presents and dinner.
Emma was a joy to watch her discover how her new toys worked. She said a quite a few new words (sorta) like doggy. Between last night's party and today, she now has plenty of new toys - too many probably. Her favorite so far appears to be a block sorter. If you are one of the many who gave Emma a present, thank you! She also receive many cute new outfits. Watch for pictures of her modelling them.
I was apparently a very good boy this year. I received many nice presents myself - including a green iPod Mini and a very nice leather jacket. (Finally, I own an iPod! Hurray! I may blog about why I asked for a mini another day.) Abby's father gave me a nice hydraulic jack. Maybe I'll stop pestering him for his when I need to change my tires. :) Abby received some kitchen things she asked for along with some PS1 video games and a DVD.
We ended the day with bread pudding and a movie - all except Abby who slept soundly by the tree on the dog's new oversized bed.  We were happy and together. I give thanks to God for my family and our little miracle - Emma.
Merry Christmas!
View this post on my blog


Today, I’ll reflect the logic behind vaaac; a single header file library which uses OpenCV to compute the angles at which a user’s arm is inclined, and to trigger an event right after a very specific motion has been performed by the user’s hand.
I first wrote the library, and then I wrote cv:go; an application which overwrites memory values for the player’s view angles in the videogame CS:GO with the values provided by vaaac for the user’s arm inclination. It also allows the user to shoot whenever the motion is performed by their hand, as I demonstrate in the following video:
The problem would be something along these lines:
‘Make a computer understand the real world, given a two-dimensional pixel matrix.’
That problem does certainly look very intimidating. Perhaps because we, as humamns, have more data about our surroundings, such as depth, or perhaps because we don’t fully understand how we, as humans, understand the world around us in the first place.
Making the problem a bit more specific will make it easier to approach:
‘Make a computer identify a person, compute at what angle their arms are inclined, and check if the user has performed a trigger motion with their hands, by quickly moving their index finger up and back down.’
If you lack basic image processing knowledge, looking at this problem may seem intimidating. But it becomes easier as you learn about the existence of some methods commonly used in this field.
The following is how I personally approached the problem, but keep in mind there’s virtually an infinite number of ways of approaching this very same problem.
Finding the user’s skin tone is crucial to carrying out the next steps of the process. That’s because we’ll want to differentiate between the user and everything else in the image.
One smart solution to finding the user’s skin tone can be to use a Haar Cascade in order to find the face of the user, take a sample of the forehead, and apply a threshold. The reson I didn’t end up using this option for vaaac is because Haar cascade files tend to be pretty big, and I wanted to write a library as lightweight as possible.
What I did instead is quite simple and intuitive, although it requires a bit of work from the user. I asked the user to fill a portion of the screen with a sample of their arm’s skin, and to press any button whenever the requirement was met. The program then takes a copy of the pixel matrix within the screen portion area bounds and computes the average color. As seen in the following gif:
This is the function used in vaaac to obtain the user’s skin tone:
void calibrateSkinTone() {
if (ok & 1) {
int xCoord = res / 2 - SAMPLE_AREA_WIDTH / 2;
int yCoord = res / 2 - SAMPLE_AREA_HEIGHT / 2;
int rectSizeX = std::min(SAMPLE_AREA_WIDTH, halfRes);
int rectSizeY = std::min(SAMPLE_AREA_HEIGHT, halfRes);
cv::Rect area(xCoord, yCoord, rectSizeX, rectSizeY);
for (;;) {
videoCapture >> frame;
frame = frame(frameBounds);
if (RENDER_SAMPLE_TEXT) {
cv::putText(
frame,
"fill the area with your skin.",
cv::Point(10, area.y - 60),
cv::FONT_HERSHEY_DUPLEX,
1.0,
cv::Scalar(255, 255, 255),
1);
cv::putText(
frame,
"then press any key.",
cv::Point(10, area.y - 20),
cv::FONT_HERSHEY_DUPLEX,
1.0,
cv::Scalar(255, 255, 255),
1);
}
/*
* check if user is done before
* drawing rectangle because,
* otherwise, the rectangle gets
* computed as the skin tone mean
*/
int key = cv::waitKey(1);
if (key != -1) {
break;
}
// now draw rectangle and draw
if (RENDER_TO_WINDOW) {
cv::rectangle(frame, area, cv::Scalar(255, 255, 255), 2);
cv::imshow("calibrateSkinTone", frame);
}
}
if (RENDER_TO_WINDOW) {
cv::destroyWindow("calibrateSkinTone");
}
cv::Mat hsv;
cv::cvtColor(frame, hsv, cv::COLOR_BGR2HSV);
cv::Mat sample(hsv, area);
cv::Scalar mean = cv::mean(sample);
hLow = mean[0] - MASK_LOW_TOLERANCE;
hHigh = mean[0] + MASK_HIGH_TOLERANCE;
sLow = mean[1] - MASK_LOW_TOLERANCE;
sHigh = mean[1] + MASK_HIGH_TOLERANCE;
vLow = 0;
vHigh = 255;
ok = 2;
}
}
After finding the user’s color skin, the next step is to binarize the image. That means making every pixel of the image either black (if it’s not the user’s skin) or white (if it’s the user’s skin).
First of all we’ll convert the RGB image to HSV, that way we can ignore shadows.
Then we’ll check for every pixel in the image whether that pixel is equal to the average color of the user’s skin or not. However, this won’t work because of how lighting affects the color of the user’s skin. Instead, we have to check for every pixel in the image whether that pixel can be found within a range of values. This can be easily done with the OpenCV function cv::inRange(cv::Mat, cv::Scalar(skinTone - lowThreshold), cv::Scalar(skintTone + highThreshold), cv::Mat)
.
Breadth first search (bfs from now on) is a basic graph traversing algorithm (take a look here in case you don’t know much about it).
A matrix such as the recently computed binary image can be easily interpreted as a graph. Now we can make an assumption, or rather a requirement: the elbow of the user must be fixed nearby the center of the image. This is completely natural, as the user would adopt this position anyways to get more screen space to aim.
By creating this restriction, we can have a small area in the center of the image that serves as the trigger to identify the bounds of the user’s arm.
This means that we can check every pixel of that small area for every frame, and apply bfs only if skin has been found.
By applying bfs we can get the bounds of the area occupied by the arm, as well as the furthest point from the center of the screen, in other words, the position of the tip of the index finger of the user’s arm.
It’s worth noting that applying bfs for every single pixel would be extremely inefficient, so I added a variable n that represents the square root of the area in pixels of each new subdivision of the image.
That just means that I don’t apply bfs to every individual pixel, rather I compute the average value for every subdivision of the screen with area \(2^n\).
The bfs algorithm works the following way:
This is a simplification, but the actual implementation in vaaac is not that different.
for (; !q.empty(); ) {
std::pair<int, int> xy = q.front();
int x = xy.first, y = xy.second;
q.pop();
if (x < 0 || y < 0 || x + BFS_SAMPLE_SIZE > res || y + BFS_SAMPLE_SIZE > res || visited[x][y]) continue;
visited[x][y] = true;
if (cv::mean(mask(cv::Rect(x, y, BFS_SAMPLE_SIZE, BFS_SAMPLE_SIZE)))[0] == 0) continue;
/*
* update aiming point coordinates.
* works because the bfs algorithm always
* visits the farthermost element in the
* last place
*/
xAim = x;
yAim = y;
// update found object area bounds
xMin = std::min(xMin, x);
yMin = std::min(yMin, y);
xMax = std::max(xMax, x);
yMax = std::max(yMax, y);
// add neighbors to queue
for (auto& offset : bfsOffsets) {
q.push(std::make_pair<int, int>(x + offset.first, y + offset.second));
}
}
All that’s left to do is compute the aiming angles in degrees relative to the image bounds, and smooth them by an arbitrary factor.
// make angles
yAngle = -(double)(halfRes - yAim) / halfRes * 90.0;
xAngle = -(double)(halfRes - xAim) / halfRes * 90.0;
yAngleSmooth += (yAngle - yAngleSmooth) / (double)(AIM_SMOOTHNESS);
xAngleSmooth += (xAngle - xAngleSmooth) / (double)(AIM_SMOOTHNESS);
I wanted to have some way for the user to communicate an action to the library, because just computing the arm inclination angles is probably not enough for most usage cases.
The motion of moving your index finger up and back down would be pretty convenient, since the main idea I had in mind for this library was to integrate it with an fps videogame, so that’s what I did.
This problem is fairly easy, but it needed some more work than I initially expected.
The data structure I used to solve it is a double ended queue, std::deque<T>
in c++ stl. This is because we’ll want to remove elements from the back and add to the front, but still be able to access the elements in between.
Anyways, it boils down to the following:
increment
is true. If that’s the case, check if the y-coordinate of the index finger is greater than that of the last deque element. Otherwise, check if the distance between the last enqueued y-coordinate and the first enqueued y-coordinate is greater or equal than a certain threshold (this is to avoid noise from being detected as an event). If that’s the case, set increment
to false. Otherwise, clear the deque.increment
is set false, check if the y-coordinate of the index finger is smaller than that of the last deque element. Otherwise, check if the distance between the last enqueued y-coordinate and the first enqueued y-coordinate is greater or equal than a certain threshold (this is to avoid noise from being detected as an event). If that’s the case, set the boolean triggered
to true meaning that, in this frame, an event was triggered by the user. Then clear the deque and set increment
to true.The following is the code used in vaaac to implement the previous concept. Remember that you can take a full look to the source code at https://github.com/soybin/vaaac
if (!yxDeltaSize) {
yxDelta.push_back({ yAim, xAim });
yxDeltaSize = 1;
} else if (increment) {
if (yAim <= yxDelta[yxDeltaSize - 1].first) {
++yxDeltaSize;
yxDelta.push_back({ yAim, xAim });
} else {
int yDelta = yxDelta[0].first - yxDelta[yxDeltaSize - 1].first;
if (yDelta >= TRIGGER_MINIMUM_DISTANCE_PIXELS && yDelta <= TRIGGER_MAXIMUM_DISTANCE_PIXELS) {
increment = false;
} else {
yxDeltaSize = 0;
yxDelta.clear();
}
}
} else {
if (yAim >= yxDelta[yxDeltaSize - 1].first) {
yxDelta.push_back({ yAim, xAim });
++yxDeltaSize;
} else {
std::pair<int, int> left = yxDelta[0];
std::pair<int, int> right = yxDelta[yxDeltaSize - 1];
bool ok = true;
ok &= std::abs(left.first - right.first) <= TRIGGER_ALLOWED_Y_DEVIATION_PIXELS;
ok &= std::abs(left.second - right.second) <= TRIGGER_ALLOWED_X_DEVIATION_PIXELS;
if (ok) {
triggered = true;
yAim = left.first;
xAim = left.second;
}
increment = true;
yxDelta.clear();
}
}
This was a very fun project to work on. I had never done anything related to image processing, but the learning curve was mostly linear thanks to OpenCV’s design and comprehensive documentation.
Computer vision has an exciting long way to go. The possibilities are very exciting and, in the literal sense of the word, endless.


WITNESS LIST Finance Committee February 9, 2005 - 8:00A SB 1 Article II - Department of Assistive and Rehabilitative Service FOR: Camacho, Jose Executive Director (Community Health Center), Austin, TX Madrid, Chilo Treatment, Prevention Provider: Substance Abuse (Association of Substance Abuse Programs), El Paso, TX Schwartz, Jonas Policy Anaylist (Advocacy, Incorporated), Austin, TX SB 1 Article II - Department of Family and Protective Services FOR: Holman, Nancy Executive Director (Texas Alliance of Child and Family Services), Austin, TX Tod, Theresa Social Work Administration (Texas Network of Youth Services), Austin, TX SB 1 Article II - Department of State Health Services FOR: Gonzales, Gilbert The Center for Health Care Services (The Center for Health Care Services), San Antonio, TX Griffin, Gary Law Enforcement, Constable (Self), Round Rock, TX Lovelace, Joe Executive Director (National Alliance for the Mentally Ill), Austin, TX Parker, PhD, Carolyn Executive Director (Texas AIDS Network), Austin, TX Shannon, Jacqueline Advocacy - Volunteer (NAMI Texas), San Angelo, TX SB 1 ARticle II ON: Bustamante, Melitta LBB Staff (LBB), Austin, TX Furgeson, Kelly LBB Staff (LBB), Austin, TX Heilgenstein, Anne Government (HHSC), Round Rock, TX Jarrell, Jeremiah LBB Staff (LBB), Austin, TX Leo, Mike LBB Staff (LBB), Austin, TX Millard, Nancy LBB Staff (LBB), Austin, TX Wofford, Bethany LBB Staff (LBB), Austin, TX Wolford, Laura LBB Staff (LBB), Austin, TX SB 1 Article II - Department of Assistive and Rehabilitative Service ON: Murphy, Terry Commissioner DARS (Department of Assistive and Rehabilitative Service), Austin, TX Tapia, Ivonne Counselor (Aliviane, Inc.), El Paso, TX Werlein, Linda Hill Country Community (Self), Kerrville, TX SB 1 Article II - Department of Family and Protective Services ON: Barker, Connie Director of Government Affairs (De Pelchin Children's Center), Woodlands, TX Brown, Cindy Chief Financial Officer (Department of Family and Protective Services), Austin, TX Cockerell, Carey Commissioner (Department of Family and Protective Services), Austin, TX Cook, Janie Executive Director BCFS (Services to at risk youth programs), San Antonio, TX Horton, Colleen Public Policy Director (Texas Center for Disability Studies, University of Texas), Austin, TX Marshall, Susan Director of Public Policy and Community Outreach (Texans Care for Children), Austin, TX McClure, Madeline Director of Advocacy Organization (Texas Protects, Texas Association for the Protection of Children), Dallas, TX Reed, Jeff Director of STAR Deep East Texas Council of Government (Self), Nacogdoches, TX Senske, Kurt Chief Executive Officer - Social Sercices (Social Services), Austin, TX Spiser, Diana Assistant Commissioner for Child Care (Department of Family and Protective Services), Austin, TX Stallings, Kellie Social Work Business: Connections Individual and Family Ser (Services to at risk youth program), New Braunfels, TX SB 1 Article II - Department of State Health Services ON: Bays, Richard Assistant Comm for Regulatory Services (Department of State Health Services), Austin, TX Brady, Denise Public Policy Analyst (Mental Health Association in Texas), Austin, TX Delgado, Evelyn Assistant Commissioner (Department of State Health Services), New Braunfels, TX Kuny, Edwin Pastor (San Marcos Crisis Respite Center), San Marcos, TX Mixson, Paula Consultant/Trainer (Texas Senior Advocacy Coalition), Austin, TX Pharr, Machelle Chief Financial Officer (Department of State Health Services), Austin, TX Priest, Paul (Department of State Health Services), Austin, TX Rachofsky, Marcia Policy Analyst (Federation of Families for Children's Mental Health Texas Federation of Families for Children's Mental), Austin, TX Romberg, Peggy CEO/Executive Director (Women's Health and Family Planning Association of Texas), Austin, TX Sanchez, Eduardo Commissioner (Department of State Health Services), Austin, TX Stabend, Debra (Department of State Health Services), Spicewood, TX Vesowate, Joe Assistant Commissioner (Department of State Health Services), Austin, TX Wanser, Dave Deputy Commissioner (Department of State Health Services), Austin, TX SB 1 Article II - Department of Assistive and Rehabilitative Service Registering, but not testifying: for: Humphrey, Cynthia Association Manager (Association of Substance Abuse Programs), Kerrville, TX SB 1 Article II - Department of Family and Protective Services for: Rachofsky, Marcia Policy Analyst (Texas Federation of Families for Children's Mental Health), Austin, TX SB 1 Article II - Department of State Health Services for: Arnold, Jim Lobbyist (American Cancer Society), Austin, TX SB 1 Article II on: Newton, John LBB Staff (LBB), Austin, TX SB 1 Article II - Department of Assistive and Rehabilitative Service on: Borel, Dennis (Coalition of Texans with Disabilities), Austin, TX Lello, Angela Policy Advocate (ARCIL, Inc.), Austin, TX McCarthy, Amber (National Multiple Scierosis Society), Austin, TX Sprinkle, G.K. Public Policy Consultant (Texas Ambulance Association), Austin, TX Wheeler, Bill CFO (Department of Assistive and Rehabilitative Service), Austin, TX SB 1 Article II - Department of Family and Protective Services on: Hate, Jill Services to at risk youth provider (High Sky Children's Ranch - Midland, Texas), Midland, TX Knabe, Adolph Services to at risk youth provider (High Sky Children's Ranch - Midland, Texas), Midland, TX


Reports possible escapes of this
during object construction. Escapes occur when this
is used as a method argument or the object of an assignment in a constructor or
initializer. Such escapes may result in subtle bugs, as the object is now
available in a context in which it is not guaranteed to be initialized.
Powered by InspectionGadgets


You can add browser-based analysis to a JS9 Web page by writing a JS9 Plugin module, consisting of a constructor function that gets called for each div of the plugin class, and one or more event callbacks to process the desired events. The this context of the constructor is seeded with a few properties, the most important of which is the div property specifying the DOM element of the containing div. Add your GUI (in the form of HTML elements) to this div and use events to control the action. A plugin is registered using the JS9.RegisterPlugin() public routine.
If the Web page does not contain a div for this plugin class and if the registration routine is passed a viewMenu property specifying a menu name, the plugin will be added to the View menu. In the examples below, the The first two examples define their own static divs for pluginTest. The last instance of JS9 uses the View menu to bring up pluginTest in a light window.
See plugins/plugintest.js for the example plugin code.
|
An example of a Plugin div element already defined to hold the
Plugin message divs, which will be created by the Plugin constructor.
Load an image, then move the mouse, or create and manipulate a
region, or press a key to see callbacks fire in the blue display region:
|
|
|
An example of a Plugin div element already defined to hold the
Plugin message divs, which will be created by the Plugin constructor.
Load an image, then move the mouse, or create and manipulate a
region, or press a key to see callbacks fire in the blue display region:
|
|
| In this example, no Plugin div element has been defined on the page. It therefore will be offered in the View menu as a light window. Load an image and choose View->pluginTest, then move the mouse, or create and manipulate a region, or press a key to see callbacks fire in the light window. |


MaterialFields
A Material Guidelines UI driven text entry and value selection framework for better UI and modular validation layers.
| Main Features | |
|---|---|
| 💛 | Material UITextFields and UITextViews |
| 💜 | Material UIPickerViews and UIDatePickers |
| 💪 | Field wrapper class allowing for simple, modular validation |
| ❌ | Error functionality to let your users know something was wrong with the input |
| 🔥 | Internal UI state management |
| 👍 | Modular and customizable |
| 😍 | Fully Swift |
| ✅ | Easy to implement |
Adding MaterialFields To Your Project
Open your podfile and add MaterialFields under your target
target 'Your Project' do
use_frameworks!
pod 'MaterialFields'
end
Save then in your project directory run
pod install
License
MaterialFields is open under the MIT license.


{{SUBJECT Your OAsheet job has started}}
Hi, {{useremail}}!
Your OAsheet job "{{jobname}}" has started. We'll email you a link to the results once they're 100% complete.
You can also check the progress of your job, and download the results that have completed already, here
Best,
Joe


Vendor Name:
TIPPET-RICHARDSON LTD.
Reference Number:
4000393
Contract Date:
2013-09-09
Description of Work:
0210 Transportation of Things not Elsewhere Specified
Contract Period:
2013-09-09 to 2015-31-05
Delivery Date:
2015-31-05
Original Contract Value:
$56,500.01
Current Contract Value:
$101,700.01
Comments:
This contract was competitively sourced using a Public Works and Government Services Canada procurement tool. This contract is a multi-year contract and includes one or more amendments.
Former Public Servant in Receipt of a Pension under the Public Service Superannuation Act:
No


[gecode-users] Memory consumption - element constraint
benoit
benoitlaurent at neuf.fr
Mon Nov 2 22:25:31 CET 2009
Christian Schulte a écrit :
> Oh, there is another quirk too watch out and that is on my todo list:
> Suppose you post many, many element constraints each of which uses exactly
> the same integer array. Then for each element constraint posted a new array
> is created (not for each copied, but for each posted).
This is exactly my case.
> What is in principle
> possible is to first create something that is called a SharedArray (which is
> not yet exposed on the modeling layer but is used inside the implementation
> of element) and post the element constraint with this shared array instead.
> Then the array will exist only once in memory.
>
> However, this you can only see if you post several thousands of element
> constraints.
>
I post two element constraints for each node of the graph (total : 620).
To be precise, I do not observe an overflow but only a high memory
usage. I was a bit worried because I wished to add similar constraints.
> Anyway, shared arrays will be exposed on the modeling layer in 3.2.1 which
> will be available shortly.
>
For the moment, I can circumvent the problem. I will wait for the new
release.
Regards,
Benoît
More information about the gecode-users
mailing list


{% extends "layout.html" %} {% block content %}
Team Members:
About CPI
The consumer price index (CPI) is a statistical estimate of the change in prices of goods and services bought for consumption. Current CPI=Current item price×Base year price×Current CPIBase year CPI The common complaint with the CPI is that it is based on average consumption for what average people buy.For example, let’s take a fake woman named Emma. Emma is 26, lives in New York, and has a bachelors degree. What does this Chart mean? It looks like Emma has been impacted by inflation more than the national average. However, when compared to other people in her age group, education level, income level, and region of residence, her spending has been impacted less by inflation that the average person in those groups. This line graph on the right tells us how inflation is having diffenfor different groups. Here we can see how Emma spends her money where compared to other groups. When compared to the national average, Emma spends more on transportation, recreation and other services. She clearly spends less than the national average housing, education, and medical care. Food and Beverage looks to be the same, perhaps a little less, and appeal looks to be the same, maybe a little more. Putting these two graphs together, the line graph that compares inflation for the different groups, and how the different groups spend their money, we can quickly create some ideas about why Emma’s inflation is higher than the national average yet lower than the other the average for demographic groups . For example, Emma’s medical expenses are a higher percentage of her total spending when compared to the national average, yet lower than the other groups. Perhaps this rate of inflation on this cost is greater than the others.


Enter Your Name To Start Bidding!
15
Bidding will start in :
00:00
(Initial Bid Amt :
99
)
Current Bidding Price : Rs.99 /-
2018 Pivot Mach 5.5 Carbon Team XTR 1X
Product
Pivot Mach 5.5 Carbon Team XTR 1X
Model Year
2018
Riding Type
Trail
Rider
Unisex
To Bid on the current item, please hit the numbers from num pad.
99
0
100
1
200
2
300
3
400
4
500
5


Preparation time
over 2 hours
Cooking time
1 to 2 hours
Serves
Serves 4
James Martin's luxurious slow-cooked curry will show you a whole new side to mutton, an economical and oft-overlooked ingredient.
For the mutton curry marinade, place the mutton into a large bowl, add all the mutton curry marinade ingredients and mix well.
Place in the fridge to marinate for at least 3 hours, or preferably overnight.
For the mutton curry sauce, when the mutton has marinated, heat a large wok over a high heat, add the cumin, coriander, fenugreek, cinnamon and cloves and stir-fry for 10-20 seconds, or until fragrant and just toasted.
Tip the toasted spices into a pestle and mortar and grind to a fine powder. Set aside.
Add half of the ghee to the wok. When it has melted, add the marinated mutton, in batches, and fry for 1-2 minutes on all sides, or until slightly charred on all sides. Remove from the wok and set aside. Repeat the process with the remaining mutton.
Add the remaining ghee to the wok, then add the ginger and garlic and fry for 30 seconds.
Add the ground spices and tomato purée and cook for a further 1-2 minutes.
Reduce the heat slightly, add the double cream and bring the mixture to a simmer, stirring well.
Reduce the heat to very low, return the mutton to the pan and cook the curry gently for 1½ hours, or until the meat is tender.
Just before serving, add the ground almonds. Stir well and cook for a further minute. Season, to taste, with salt and freshly ground pepper.
For the puri, place the flour into a bowl with a pinch of salt. Make a well in the centre.
Gradually add the water, drawing more flour into the well as you go, until the mixture comes together as a firm dough. (You may not need to add all of the water.)
Turn out the dough onto a lightly floured work surface. Knead for 1-2 minutes, then wrap in cling film and chill in the fridge for 30 minutes.
When the dough has chilled, divide it into 4-8 golf-ball sized portions. Roll each out into 2mm thick flat discs.
Heat the vegetable oil in a wok until a breadcrumb sizzles and turns golden-brown when dropped into it. Alternatively, heat the oil in a deep-fat fryer to 190C/375F.
Carefully lower the puri into the hot oil one at a time. Fry for 30-45 seconds on each side, or until light golden-brown and puffed up. Remove from the pan using a slotted spoon and set aside to drain on kitchen paper.
To serve, ladle the butter mutton curry onto serving plates. Sprinkle over some of the green chillies, fenugreek leaves and coriander leaves. Pile 1-2 puri alongside each serving.


Toggle navigation
Logo goes here
Start
Blog
Login
Start
User Database
User Profile
User Data
Username
Log-In Email Adress
Password
Generate a new password
Send password
User Role
Presenter
Admin
Title
Given Name
Family Name
Title
Internal Remarks
Save User Data


New codelab: Realtime communication with WebRTC
View the console to see logging. The MediaStream
object localStream
, and the RTCPeerConnection
objects pc1
and pc2
are in global scope, so you can inspect them in the console as well.
For more information about RTCPeerConnection, see Getting Started With WebRTC.
View source on GitHub


Freelance Web Developer
2012 - Present
I've been working as a web developer for about 3 years now. I have had the privilege of working directly
with clients such as Spring Folly and
Hidden Creek Ranch, and have also done contract work for
web design firms like Innovative Designs. I've
developed proficiency in many programming languages and frameworks, most notably those listed above.
I love learning new things, and this job has given me the opportunity to do just that.
IT Student Intern @ Manitoulin Transport
October 2013 - June 2015
For just under 2 years I was a part of the IT team at Manitoulin Transport. My main responsibilities
included troubleshooting tech issues in a windows environment, applying updates and patches,
and repairing computer hardware. I also assisted in the company migration to the Google Apps platform.


Before I die: a day with the terminally ill – video
by Leah Green, Shay Notelovitz, Simon Roberts, Ben Kape, Paul Boyd
What does it feel like to know you’re dying? In episode two of Death Land, Leah Green meets people who are facing up to the end of their lives. She follows palliative care doctor Sunita Puri as she helps her patients come to terms with their own mortality
Dr Sunita Puri’s book, That Good Night: Life and Medicine in the Eleventh Hour, is available to buy here


What is neuroplasticity? In a basic definition it is described as a malleable brain. So what does that even mean?  Take for example when we learnt how to ride our bike over time with repetition we had started to learn how to ride without falling off, or how we study for a test over the week by rereading and quizzing ourselves on the questions for it to sink into our brains. This is the basic way Neuroplasticity works, it creates brain neuron pathways from our repetitive learning for us to understand/ have the ability to do. Hence why the term “practice makes perfect” holds up to be true.
The problem was that they were at the end of the code, this is a problem because the program reads from top to bottom so making it do a certain action when it couldn’t find the people up to that point spits back an error, where it couldn’t recognise the students name. Granted this was after many hours of coding running through this week's sprint my brain had been fried and turned to mush by this point, and had pretty bad tunnel vision.
Though the benefits of neuroplasticity where we can rewire our brain, it also works the opposite for bad habits and negative thinking. The more we repeat bad habits or the more negative thinking we do trains our brains to follow that path instead. Though neuroplasticity is neither good nor bad, it depends on the individual on how they want to train their brain, and which pathways they want to strengthen.
A growth mindset is someone who believes that their skill and understanding are not fixed. They have the ability to understand that even though they aren't great at something right now with enough practice, dedication and time they put into something they will become better, because of our brain neuroplasticity.
For a bit of contrast someone with a fixed mindset is the opposite. They are one to believe that you are born to be good at things. Take for example someone who isn’t good at math would say i’m not a math person so I will never be good at it and give up. That is someone with a fixed mindset, someone with a growth mindset would think that though they aren't good now with enough time, practice, and patience they’ll start to become amazing at maths, which they will.
Now understanding what neuroplasticity is, what a growth mindset is and how both play a role in learning. It’s time to set things in place such as habits, learning schedule and a more positive mindset towards each set of skills that you want to dive deeper into.


Daniel Craig could direct the next James Bond movie and 'go out in style'
Actor Daniel Craig has been tipped to direct the next James Bond film.
The 51-year-old is believed to be playing the iconic spy for the final time in the upcoming ‘No Time to Die’, but producer Barbara Broccoli is keen to have Craig in the director’s chair on the next movie in the franchise.
Craig, who will be donning Bond’s tuxedo for the fifth time in the next Bond blockbuster, has seen his creative influence increase as his time in the role has grown.
It is also believed that he was instrumental in getting Fleabag creator Phoebe Waller-Bridge to co-write the script for the 25th 007 film.
A source told the Mail on Sunday newspaper: ‘Daniel has been the driving force behind ‘Bond 25’. He is determined to go out in style.
‘He hired Phoebe and he’s been closely involved in every aspect of this film, from the script and development of the characters.
Advertisement Advertisement
‘Barbara has been vocal in her support of him and would love him to return to direct the next one.
‘Daniel is so in tune with the character and has been saying Bond has to grow and change to fit the times.’
Craig previously promised he has pulled ‘out all the stops’ to make No Time To Die his best 007 movie ever.
He said: ‘I’d like to give you a breakdown of my week, but people would just think I was complaining.
‘But every day has an intensity to it. We’re trying to make the best f***ing Bond movie we can. Pulling out all the stops.
‘If we aim for the stars, we might hit the treetops.’
Daniel admits he feels ‘privileged’ to have got Phoebe, 34, onboard for the project.
He said: ‘I had my eye on her ever since the first Fleabag.
‘Then I saw Killing Eve and what she did with that and just wanted her voice.
‘It is so unique – we are very privileged to have her on board.’
Got a showbiz story?
If you've got a story, video or pictures get in touch with the Metro.co.uk Entertainment team by emailing us<EMAIL_ADDRESS>calling 020 3615 2145 or by visiting our Submit Stuff page - we'd love to hear from you.


Database Query
Represented by a DbQuery<T> object, database query encapsulates a DbQueryStatement object which can be translated to native SQL by database session provider.
Simple Query
You can make simple query by invoking the following methods of DbSet<T> class, which is the base class for both DbTable<T> and DbQuery<T>:
- Where: Filtering, to extract only those records that fulfill a specified condition.
- OrderBy: Sorting the result-set in ascending or descending order, optionally you can specify
offset
andfetch
parameters to limit the number of rows to be returned by the query. - Union/UnionAll: Combining two DbSet<T>.
The following code:
using (var db = new Db(...))
{
var query = db.SalesOrderHeader
.Where(x => x.SalesOrderID == _Int32.Const(71774) | x.SalesOrderID == _Int32.Const(71776))
.OrderBy(x => x.SalesOrderID);
}
will be translated to the following TSQL which can be examined by query.ToString()
:
SELECT
[SalesOrderHeader].[SalesOrderID] AS [SalesOrderID],
[SalesOrderHeader].[RevisionNumber] AS [RevisionNumber],
[SalesOrderHeader].[OrderDate] AS [OrderDate],
[SalesOrderHeader].[DueDate] AS [DueDate],
[SalesOrderHeader].[ShipDate] AS [ShipDate],
[SalesOrderHeader].[Status] AS [Status],
[SalesOrderHeader].[OnlineOrderFlag] AS [OnlineOrderFlag],
[SalesOrderHeader].[SalesOrderNumber] AS [SalesOrderNumber],
[SalesOrderHeader].[PurchaseOrderNumber] AS [PurchaseOrderNumber],
[SalesOrderHeader].[AccountNumber] AS [AccountNumber],
[SalesOrderHeader].[CustomerID] AS [CustomerID],
[SalesOrderHeader].[ShipToAddressID] AS [ShipToAddressID],
[SalesOrderHeader].[BillToAddressID] AS [BillToAddressID],
[SalesOrderHeader].[ShipMethod] AS [ShipMethod],
[SalesOrderHeader].[CreditCardApprovalCode] AS [CreditCardApprovalCode],
[SalesOrderHeader].[SubTotal] AS [SubTotal],
[SalesOrderHeader].[TaxAmt] AS [TaxAmt],
[SalesOrderHeader].[Freight] AS [Freight],
[SalesOrderHeader].[TotalDue] AS [TotalDue],
[SalesOrderHeader].[Comment] AS [Comment],
[SalesOrderHeader].[RowGuid] AS [RowGuid],
[SalesOrderHeader].[ModifiedDate] AS [ModifiedDate]
FROM [SalesLT].[SalesOrderHeader] [SalesOrderHeader]
WHERE (([SalesOrderHeader].[SalesOrderID] = 71774) OR ([SalesOrderHeader].[SalesOrderID] = 71776))
ORDER BY [SalesOrderHeader].[SalesOrderID];
Query Builder
You can build any query via query builder, by calling CreateQuery/CreateAggregateQuery of your Db
class. You need to provide a delegate to call these methods, which takes a DbQueryBuilder/DbAggregateQueryBuilder parameter you can use to build the query. The following code is the equivalent to the preceding example:
using (var db = new Db(...))
{
var query = db.CreateQuery((DbQueryBuilder builder) =>
builder.From(db.SalesOrderHeader, out var x)
.AutoSelect()
.Where(x => x.SalesOrderID == _Int32.Const(71774) | x.SalesOrderID == _Int32.Const(71776))
.OrderBy(x => x.SalesOrderID));
}
To use DbQueryBuilder/DbAggregateQueryBuilder:
- Call
From
for the firstDbSet<T>
; - Call
InnerJoin
/LeftJoin
/RightJoin
/CrossJoin
to join otherDbSet<T>
; - Call
AutoSelect
/Select
to select columns.AutoSelect
is based on the Id and then OriginalId property value of Column class; - Optionally call
Where
/OrderBy
, orGroupBy
/Having
if it's an aggregate query.
Query builder mimics standard SQL SELECT statement closely. It's straightforward if you're familiar with writing SQL. You can find more examples in Db.Api.cs
(or Db.Api.vb
) of the AdventureWorksLT
sample.


Hello, I'm Ed
a web developer
These are some of my projects:
Tribute Page
Survey Form
Product Landing Page
Technical Documentation Page
Random Quote Machine
Weather in your location
Let's work together
What's your favorite scary movie?
a web developer
Tribute Page
Survey Form
Product Landing Page
Technical Documentation Page
Random Quote Machine
Weather in your location
What's your favorite scary movie?


--- layout: docs_faq title: CLI FAQ header_title: CLI FAQ header_sub_title: Some common pitfalls related to Cordova, Node, NPM, and Android news: Check out our Guide, which covers all the basics of setting up. search_sections: true ---
When working with Cordova and Ionic, Node is going to be your best friend. Specifically working with Node and the Command Line. Yet getting things set up often seems to be a challenge, especially when it comes to setting up things cross platform (Mac, Windows, Linux).
Below are a few issues that are not necessarily an Ionic Framework issue, but common pitfalls seen related to Cordova, Node, NPM,Android:
Setting up the Android SDK is a complicated process for Windows and Linux.
Recently, Ubuntu has gotten an awesome tool called Ubuntu Developer Tools Center and with it you can install the Android SDK and Android Studio. I’m not going to go over the details, but you can check out this blog post and see the steps.
The setup process for Android on Windows has been covered in depth on Ionic Learn Site. The only thing I can add is to include installing git during your setup.
Macs tend to have the least problems when setting up an Android environment. There a few ways to handle it and this is just one of them. The end goal is to have the SDK installed, install Java, install Ant.
Install Java - This can be by going to this page. Install Ant - The quickest way to install Apache Ant is with Homebrew.
{% highlight bash %} $ brew install ant {% endhighlight %}Install the SDK - This can be done a few different ways. The one I like to use is by installing Android Studio. This will let you install an editor that comes bundled with the Android SDK. So now our SDK is in our Applications Folder.
Edit .bash_profile - So if you’ve followed the steps above, you’ll need to edit your .bash_profile to include the following. If you didn’t install Android Studio, then no problem. You’ll just need to change the path to the SDK. You want to include the SDK tools and SDK Platform-tools.
{% highlight bash %} vim ~/.bash_profile {% endhighlight %}Add this:
{% highlight bash %} export PATH=${PATH}:/Applications/Android\ Studio.app/sdk/platform-tools:/Applications/Android\ Studio.app/sdk/tools export JAVA_HOME=$(/usr/libexec/java_home) export PATH=${JAVA_HOME}/bin:$PATH export PATH=/usr/local/bin:$PATH {% endhighlight %}With that, enter source ~/.bash_profile
to update everything.
This helpful tip cannot be stressed enough! Even when working natively, the android emulator is a pain. It’s slow to boot, becomes unresponsive and locks up easily. Thankfully Genymotion is a great replacement. It uses a virtual machine to emulate android devices and does it perfectly. Once thing to remember, if you want to deploy to a genymotion device, your computer will treat it as an actual connect machine. So instead of running
{% highlight bash %} $ ionic emulate android {% endhighlight %}Use run
instead.
If you’re a node developer, you’re probably using the latest and greatest release of node on your system. While this is great for testing apps with node, Cordova and Ionic need to have some stability. When doing anything with the command line and ionic, always use a stable release of Ionic.
Starting an iOS emulator from the command line is a really powerful feature. It gets rid of the need to open up Xcode and keeps a nice terminal-only workflow. But when you try to use ionic emulate ios
it throws an awful error.
Well this is because you need to install a utility package called ios-sim. This package allows you to access the iOS simulator from the command line. This can be installed with a simple npm install
.
With this installed, you’ll be able to emulate to the iso-simulator.
When you update an iOS project to a new version of Cordova, sometimes you will get an error saying it was unable to locate a plugin. You open up Xcode, try to run and build from there and get this error in your console
{% highlight bash %} 2014-11-12 14:36:18.284 Tell The DJ[14955:c07] ERROR: Plugin 'Device' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml. 2013-08-23 14:36:18.284 Tell The DJ[14955:c07] -[CDVCommandQueue executePending] [Line 116] FAILED pluginJSON = [ "Device1096677259", "Device", "getDeviceInfo", [ ] ] {% endhighlight %}This can happen for a number of reasons, but the most common is manually adding files to the native project. The linking process during a build cycle gets broken and none of the native files are moved over. To fix this, delete the ios.json
file in the plugins folder. This will make Cordova have to recopy all the plugin files.
In more extreme cases, sometimes a complete removal of the project is needed.
This one is pretty extreme and cause a lot of frustration. You try to use any of the Cordova/Ionic commands and get this error.
{% highlight bash %} Current Working Directory is not Cordova-based project {% endhighlight %}At this point you’re unable to do anything further with your project. So why does this happen? Various reason, but mostly something gets corrupted with your environment configuration. You can see a thread where this happened for one particular user.
For his case, the solution was to run
{% highlight bash %} $ cordova create . {% endhighlight %}Basically a hidden folder that should be there wasn’t. Running that command above fixes that issue.
When Cordova pushes a new version, it’s always best to update. So you run this command to update the Cordova binaries.
{% highlight bash %}$ sudo npm update -g cordova {% endhighlight %}Great, but when you try to do anything in a project, you’ll get an error. Well this is because there are actually different versions of Cordova for each platform. So from inside your project you need to run Cordova’s update command.
{% highlight bash %} $ cordova update platform ios $ cordova update platform android {% endhighlight %}Now all your platform specific versions of Cordova are updated.
So you found this awesome plugin on github that you want to use for your app. So lets try to install it.
{% highlight bash %} ionic plugin add http://github.com/user/awesome-plugin {% endhighlight %}But then another error comes up. Whats going on? So something that Cordova doesn’t mention is that you need to have git setup for installing plugins from Github. Something like this can easily be overlooked, but thankfully it’s as easy to fix. Just visit the git website, install and set up git, and you’re good to go.
If your project was created with an older version of the Ionic CLI, you may have come across this. You start to build as
{% highlight bash %} addCliHookDirectory fs.chmodSync: Error: ENOENT, no such file or directory 'hooks/after_prepare/010_add_platform_class.js' {% endhighlight %}Thankfully this has been fixed in the latest version of the Ionic CLI. If the hook isn't found when you try to build either iOS or Android, the Ionic CLI will add it back.


I have a firm knowledge of HTML, CSS and JavaScript language and possess a good knowledge of computer software packages (frameworks and tools) that are used in today’s technology.
On a personal level, I am highly-motivated, result oriented, self-driven, hard-working, fast learner and constantly seeking to improve my skills and am fully aware of the latest Front-end Development Tools.
My current technical skills show in skills section
Develop user interfaces for websites and Web applications.
Drafting of the documentation for developed applications.
Verify the performance of websites in the browsers.
Technologies used: HTML5, CSS3, JavaScript
The application allows you to manage information related to accommodation.
It has a major logic algorithm driven by complexity.
Technologies used :- java, J2EE, javascrpit, HTML, CSS, Bootstrap, PHP7, MySQL, Tomcat
A game that reads the opinions of users through a questionnaire and evaluate based on the answers and provide the score.
Depending on your score the application predicts the color, it evaluates your level of intelligence.
We also offer the possibility to the user to learn.
Technologies used :- Data Mining, Machine learning, Java,html, css, Angular JS, SQL, SQLite, PHP,Java, Android SDK,Sqlite and XML.
Apart from being a web developer, I enjoy most of my time watching movies. Whenever I want to relax or take a break, I watch movie, it takes the stress out of me. I follow a number of sci-fi and fantasy genre movies and television shows, I am an aspiring chef, and I spend a large amount of my free time exploring the latest technology advancements in the front-end web development world.
My volunteer experience has taught me to see the bright spots and hidden opportunities in difficult situations. My experience with community service has also helped me to learn to work as a team.
Travelling makes me independent and build my confidence.Travelling helps me connect with new people, which helps to improve my interpersonal skills.For a year full of work, projects, traffic, tensions travel is like a fresh dose of much needed oxygen..!


Home
Problems
Status
Ranklist
Contests
Feedback
Register
Login
Register
User Name:
Nick Name:
Password:
Confirm:
QQ Number:
School:
Verify Code:
try a new code


Source code for kicost.distributors.distributor
# -*- coding: utf-8 -*-
# MIT license
#
# Copyright (C) 2018 by XESS Corporation / Max Maisel / Hildo Guillardi Júnior
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# Author information.
__author__ = 'Max Maisel'
__webpage__ = 'https://github.com/mmmaisel/'
# Libraries.
import sys, time, os, re
import logging
#from . import fake_browser
#import http.client # For web scraping exceptions.
#from ..global_vars import PartHtmlError
# Kept this for future use.
from ..edas.tools import order_refs # To better print the warnings about the parts.
from .global_vars import *
from currency_converter import CurrencyConverter
__all__ = ['distributor_class']
[docs]class distributor_class(object):
start_time = time.time()
def __init__(self, name, logger):
self.name = name
self.logger = logger
# Don't create fake_browser for "local" distributor.
#if self.domain != None:
# self.browser = fake_browser.fake_browser \
# (self.domain, self.logger, self.scrape_retries, throttle_delay)
# Kept this for future use.
[docs] def get_dist_parts_info(self, parts, distributors, currency=DEFAULT_CURRENCY):
''' Get the parts info using the modules API/Scrape/Local.'''
for d in distributors_modules:
globals()[d].query_part_info(parts, distributors, currency)
#dist_local_template.query_part_info(parts, distributors, currency)
#api_partinfo_kitspace.query_part_info(parts, distributors, currency)
# Abstract methods, implemented in distributor specific modules.
[docs] @staticmethod
def init_dist_dict():
''' Initialize and update the dictionary of the registered distributors classes.'''
raise NotImplementedError()
[docs] @staticmethod
def query_part_info():
''' Get the parts info of one distributor class.'''
raise NotImplementedError()


The Strategy is the base unit of OmniAuth’s ability to wrangle multiple providers. Each strategy provided by OmniAuth includes this mixin to gain the default functionality necessary to be compatible with the OmniAuth library.
# File lib/omniauth/strategy.rb, line 11 def self.included(base) OmniAuth.strategies << base base.extend ClassMethods base.class_eval do option :setup, false option :skip_info, false end end
Initializes the strategy by passing in the Rack endpoint, the unique URL segment name for this strategy, and any additional arguments. An `options` hash is automatically created from the last argument if it is a hash.
@param app [Rack application] The application on which this middleware is applied.
@overload new(app, options = {})
If nothing but a hash is supplied, initialized with the supplied options overriding the strategy's default options via a deep merge.
@overload new(app, *args, options = {})
If the strategy has supplied custom arguments that it accepts, they may will be passed through and set to the appropriate values.
@yield [Options] Yields options to block for further configuration.
# File lib/omniauth/strategy.rb, line 130 def initialize(app, *args, &block) @app = app @env = nil @options = self.class.default_options.dup options.deep_merge!(args.pop) if args.last.is_a?(Hash) options.name ||= self.class.to_s.split('::').last.downcase self.class.args.each do |arg| options[arg] = args.shift end # Make sure that all of the args have been dealt with, otherwise error out. raise ArgumentError, "Received wrong number of arguments. #{args.inspect}" unless args.empty? yield options if block_given? end
# File lib/omniauth/strategy.rb, line 333 def auth_hash hash = AuthHash.new(:provider => name, :uid => uid) hash.info = info unless skip_info? hash.credentials = credentials if credentials hash.extra = extra if extra hash end
Duplicates this instance and runs call! on it. @param [Hash] The Rack environment.
# File lib/omniauth/strategy.rb, line 163 def call(env) dup.call!(env) end
The logic for dispatching any additional actions that need to be taken. For instance, calling the request phase if the request path is recognized.
@param env [Hash] The Rack environment.
# File lib/omniauth/strategy.rb, line 172 def call!(env) raise OmniAuth::NoSessionError.new("You must provide a session to use OmniAuth.") unless env['rack.session'] @env = env @env['omniauth.strategy'] = self if on_auth_path? return mock_call!(env) if OmniAuth.config.test_mode return options_call if on_auth_path? && options_request? return request_call if on_request_path? && OmniAuth.config.allowed_request_methods.include?(request.request_method.downcase.to_sym) return callback_call if on_callback_path? return other_phase if respond_to?(:other_phase) @app.call(env) end
# File lib/omniauth/strategy.rb, line 400 def call_app!(env = @env) @app.call(env) end
Performs the steps necessary to run the callback phase of a strategy.
# File lib/omniauth/strategy.rb, line 219 def callback_call setup_phase log :info, "Callback phase initiated." @env['omniauth.origin'] = session.delete('omniauth.origin') @env['omniauth.origin'] = nil if env['omniauth.origin'] == '' @env['omniauth.params'] = session.delete('omniauth.params') || {} callback_phase end
# File lib/omniauth/strategy.rb, line 384 def callback_path options[:callback_path].is_a?(String) ? options[:callback_path] : (custom_path(:request_path) || "#{path_prefix}/#{name}/callback") end
# File lib/omniauth/strategy.rb, line 361 def callback_phase self.env['omniauth.auth'] = auth_hash call_app! end
# File lib/omniauth/strategy.rb, line 419 def callback_url full_host + script_name + callback_path + query_string end
# File lib/omniauth/strategy.rb, line 325 def credentials merge_stack(self.class.credentials_stack(self)) end
# File lib/omniauth/strategy.rb, line 392 def current_path request.path_info.downcase.sub(/\/$/,'') end
# File lib/omniauth/strategy.rb, line 370 def custom_path(kind) if options[kind].respond_to?(:call) result = options[kind].call(env) return nil unless result.is_a?(String) result else options[kind] end end
# File lib/omniauth/strategy.rb, line 329 def extra merge_stack(self.class.extra_stack(self)) end
# File lib/omniauth/strategy.rb, line 454 def fail!(message_key, exception = nil) self.env['omniauth.error'] = exception self.env['omniauth.error.type'] = message_key.to_sym self.env['omniauth.error.strategy'] = self if exception log :error, "Authentication failure! #{message_key}: #{exception.class.to_s}, #{exception.message}" else log :error, "Authentication failure! #{message_key} encountered." end OmniAuth.config.on_failure.call(self.env) end
# File lib/omniauth/strategy.rb, line 404 def full_host case OmniAuth.config.full_host when String OmniAuth.config.full_host when Proc OmniAuth.config.full_host.call(env) else uri = URI.parse(request.url.gsub(/\?.*$/,'')) uri.path = '' #sometimes the url is actually showing http inside rails because the other layers (like nginx) have handled the ssl termination. uri.scheme = 'https' if ssl? uri.to_s end end
# File lib/omniauth/strategy.rb, line 321 def info merge_stack(self.class.info_stack(self)) end
# File lib/omniauth/strategy.rb, line 148 def inspect "#<#{self.class.to_s}>" end
Direct access to the OmniAuth logger, automatically prefixed with this strategy’s name.
@example
log :warn, "This is a warning."
# File lib/omniauth/strategy.rb, line 157 def log(level, message) OmniAuth.logger.send(level, "(#{name}) #{message}") end
This is called in lieu of the normal request process in the event that OmniAuth has been configured to be in test mode.
# File lib/omniauth/strategy.rb, line 262 def mock_call!(env) return mock_request_call if on_request_path? return mock_callback_call if on_callback_path? call_app! end
# File lib/omniauth/strategy.rb, line 281 def mock_callback_call setup_phase mocked_auth = OmniAuth.mock_auth_for(name.to_s) if mocked_auth.is_a?(Symbol) fail!(mocked_auth) else @env['omniauth.auth'] = mocked_auth @env['omniauth.params'] = session.delete('omniauth.params') || {} @env['omniauth.origin'] = session.delete('omniauth.origin') @env['omniauth.origin'] = nil if env['omniauth.origin'] == '' call_app! end end
# File lib/omniauth/strategy.rb, line 268 def mock_request_call setup_phase session['omniauth.params'] = request.params if request.params['origin'] @env['rack.session']['omniauth.origin'] = request.params['origin'] elsif env['HTTP_REFERER'] && !env['HTTP_REFERER'].match(/#{request_path}$/) @env['rack.session']['omniauth.origin'] = env['HTTP_REFERER'] end redirect(script_name + callback_path + query_string) end
# File lib/omniauth/strategy.rb, line 435 def name options.name end
Returns true if the environment recognizes either the request or callback path.
# File lib/omniauth/strategy.rb, line 231 def on_auth_path? on_request_path? || on_callback_path? end
# File lib/omniauth/strategy.rb, line 243 def on_callback_path? if options.callback_path.respond_to?(:call) options.callback_path.call(env) else on_path?(callback_path) end end
# File lib/omniauth/strategy.rb, line 251 def on_path?(path) current_path.casecmp(path) == 0 end
# File lib/omniauth/strategy.rb, line 235 def on_request_path? if options.request_path.respond_to?(:call) options.request_path.call(env) else on_path?(request_path) end end
Responds to an OPTIONS request.
# File lib/omniauth/strategy.rb, line 188 def options_call verbs = OmniAuth.config.allowed_request_methods.map(&:to_s).map(&:upcase).join(', ') return [ 200, { 'Allow' => verbs }, [] ] end
# File lib/omniauth/strategy.rb, line 255 def options_request? request.request_method == 'OPTIONS' end
# File lib/omniauth/strategy.rb, line 366 def path_prefix options[:path_prefix] || OmniAuth.config.path_prefix end
# File lib/omniauth/strategy.rb, line 396 def query_string request.query_string.empty? ? "" : "?#{request.query_string}" end
# File lib/omniauth/strategy.rb, line 439 def redirect(uri) r = Rack::Response.new if options[:iframe] r.write("<script type='text/javascript' charset='utf-8'>top.location.href = '#{uri}';</script>") else r.write("Redirecting to #{uri}...") r.redirect(uri) end r.finish end
# File lib/omniauth/strategy.rb, line 431 def request @request ||= Rack::Request.new(@env) end
Performs the steps necessary to run the request phase of a strategy.
# File lib/omniauth/strategy.rb, line 194 def request_call setup_phase log :info, "Request phase initiated." #store query params from the request url, extracted in the callback_phase session['omniauth.params'] = request.params if options.form.respond_to?(:call) log :info, "Rendering form from supplied Rack endpoint." options.form.call(env) elsif options.form log :info, "Rendering form from underlying application." call_app! else if request.params['origin'] env['rack.session']['omniauth.origin'] = request.params['origin'] elsif env['HTTP_REFERER'] && !env['HTTP_REFERER'].match(/#{request_path}$/) env['rack.session']['omniauth.origin'] = env['HTTP_REFERER'] end request_phase end end
# File lib/omniauth/strategy.rb, line 380 def request_path options[:request_path].is_a?(String) ? options[:request_path] : "#{path_prefix}/#{name}" end
@abstract This method is called when the user is on the request path. You should perform any information gathering you need to be able to authenticate the user in this phase.
# File lib/omniauth/strategy.rb, line 313 def request_phase raise NotImplementedError end
# File lib/omniauth/strategy.rb, line 423 def script_name @env['SCRIPT_NAME'] || '' end
# File lib/omniauth/strategy.rb, line 427 def session @env['rack.session'] end
# File lib/omniauth/strategy.rb, line 388 def setup_path options[:setup_path] || "#{path_prefix}/#{name}/setup" end
The setup phase looks for the `:setup` option to exist and, if it is, will call either the Rack endpoint supplied to the `:setup` option or it will call out to the setup path of the underlying application. This will default to `/auth/:provider/setup`.
# File lib/omniauth/strategy.rb, line 299 def setup_phase if options[:setup].respond_to?(:call) log :info, "Setup endpoint detected, running now." options[:setup].call(env) elsif options.setup? log :info, "Calling through to underlying application for setup." setup_env = env.merge('PATH_INFO' => setup_path, 'REQUEST_METHOD' => 'GET') call_app!(setup_env) end end
Determines whether or not user info should be retrieved. This allows some strategies to save a call to an external API service for existing users. You can use it either by setting the `:skip_info` to true or by setting `:skip_info` to a Proc that takes a uid and evaluates to true when you would like to skip info.
@example
use MyStrategy, :skip_info => lambda{|uid| User.find_by_uid(uid)}
# File lib/omniauth/strategy.rb, line 350 def skip_info? if options.skip_info? if options.skip_info.respond_to?(:call) return options.skip_info.call(uid) else return true end end false end
# File lib/omniauth/strategy.rb, line 317 def uid self.class.uid_stack(self).last end
# File lib/omniauth/strategy.rb, line 452 def user_info; {} end
# File lib/omniauth/strategy.rb, line 472 def merge_stack(stack) stack.inject({}){|c,h| c.merge!(h); c} end
# File lib/omniauth/strategy.rb, line 475 def ssl? request.env['HTTPS'] == 'on' || request.env['HTTP_X_FORWARDED_SSL'] == 'on' || request.env['HTTP_X_FORWARDED_SCHEME'] == 'https' || (request.env['HTTP_X_FORWARDED_PROTO'] && request.env['HTTP_X_FORWARDED_PROTO'].split(',')[0] == 'https') || request.env['rack.url_scheme'] == 'https' end


Displaying node 'Company Ktwoktqtxv'
Displaying node 'Company Djpahhofjp'
Displaying node 'Company Djpahhofjp', hiding first 3 nodes from root
Displaying node 'Company Ktwoktqtxv', showing only two node
Alternate separator
Displaying node 'Company Ktwoktqtxv' with no-wrap


django-frontier package¶
The django front-end scaffold tool you requested.¶
Tired of always having to setup your front end apps (react, vue, bootstrap tailwindcss) for your django projects, not any more. Every django developer knows how annoying it is to setup a front end for your django apps with the latest and greatest frontend frameworks, with django-frontier you get to set up your frontend scaffold with a single command. A breeze :).
Before you install¶
Before you install django-frontier, please make sure you have python installed and you have a working django project either with with your local python installation or a virtual environment. We recommend the latter
Installation guide¶
1. Open your terminal and install the django-frontier package using pip
$ pip install django-frontier
2. After the installation, add the ‘frontier’ app to the INSTALLED_APPS of your django project settings
INSTALLED_APPS = [
...
'frontier',
...
]
3. Now you can use the frontier command by navigating to the root of your project directory, where ‘manage.py’ file is and run the frontier with either preset (react, tailwind, or react-tailwind)
for example, a react scaffold looks like this:
$ python manage.py frontier react
or
$ ./manage.py frontier react
This generates a resources directory with your react application scaffold. Your directory structure looks like this:
your_project/
resources/
js/
App.js
index.js
components/
Example.js
manage.py
package.json
.babelrc
..
4. You can then compile your assets by running
$ npm run watch
This spits out the complied assets in a static/dist directory at the root of your project
static/
dist/
index.js
index.map.js
You can modify the output of the compiled assets in your ‘package.json’ file.
NOTE: django-frontier uses parcel js to compile and bundle all of it assets. You can read more about parcel js on thier website
5. After compilation, setup your STATIC_URL and STATICFILES_DIRS in your django project settings.
STATIC_URL = '/static/'
STATICFILES_DIRS = BASE_DIR / 'static' #new in django 3.0 which uses pathlib module
6. Setup your template
<!DOCTYPE html>
{% load static %}

...

<link rel="stylesheet" href="{% static 'dist/app.css' %}" />
...

7. For production, run the build command to minify the js and css for a smaller bundle and replace dist/ with build/ in your templates
$ npm run build
MORE: Run the frontier command with -h flag for help and more options
$ python manage.py frontier -h
or
$ ./manage.py frontier -h
Enjoy :)


New Image
Original background image.
Make images more usable without complex image editing.
Lighten images to make them fit into your theme.
Match your brand colours - use the SCSS mixin to overlay any colour.
Just include one CSS file:
instructions here.


Learn how to create end-to-end tests for your applications
The end-to-end tests can increase a reliability and quality of your software. You can learn how to use Selenium WebDriver. This tool is easy to use and it can help you in every day work.
You can start whenever you want. You will learn all topics necessary to work with end-to-end tests freely. You will learn how to: configure tests, select elements, perform actions, build and use PageObjects pattern, test mobile pages and test SPA applications (like Angular, React)
Begin your testing adventure with the author of "The power of end to end testing" book.
Sign up for the free email course and get a Selenium cheatsheet for the good start.
Web developer working on front-end and back-end side. Associated with .NET environment for a long time. Lazy enough to automate the development process on each phase.
Life enthusiast. Passionate of quality, good food, trekking and Frisbee Ultimate.


Current Produce Prices in Phoenix Metro
Download our
Android App
,
Volunteer!
, or
give us feedback
.
Clear
no matches
Subscribe to our mailing list


Gone in Sixty Seconds (2000) Rating: 3.5 stars out of 5.0 stars
Cast: Nicolas Cage, Giovanni Ribisi, Angelina Jolie, Robert Duvall, T.J. Cross, William Lee Scott, Scott Caan, James Duval, Will Patton, Delroy Lindo, Timothy Olyphant, Chi McBride, Christopher Eccleston, Vinnie Jones, Grace Zabriskie, Arye Gross Written by: Scott Rosenberg Directed by: Dominic Sena Running Time: 117 minutes Screening Theater: Starnet Pablo 9 Theaters - Jacksonville Beach, FL
Director Dominic Sena (who made the highly underrated Kalifornia) and producer Jerry Bruckheimer (The Rock, Armageddon) bring us a slick and entertaining remake of the 1974 film of the same name that absolutely no one has ever seen.
 Memphis is ordered to steal 50 cars in four days time or his brother will meet an unfortunate demise, all while having to elude the detectives hot on his trail and a rival car thief who feels the job should have been given to him and his gang. Memphis sets out to put his old crew back together, but discovers that most of them have retired as well.
Gone in Sixty Seconds does things right from the opening credits.  Filmmakers can sometimes make or break a film just from its opening title sequence, and this one easily gets you in the mindset for an entertaining ride. And what follows doesn't disappoint...
Cage turns in one of his good performances here (he can easily go either way... good or bad... I don't know how he does that), and his mannerisms and dialogue delivery carry the film along nicely. Of the supporting cast members, Angelina Jolie as Memphis' former love is in the film just to provide eye candy (she's definitely the hottest looking grease monkey I've ever seen) and Robert Duvall as Memphis' former mentor is just around to lend the film some class. Also, I'm a big fan of Will Patton (Armageddon, The Postman) and would love to see him get a huge role someday. None of these three performers are given much to do unfortunately.
Some underrated performers however are given meaty supporting roles. Delroy Lindo (Get Shorty) shines as the exasperated detective in pursuit of Memphis, as does Timothy Olyphant (Go) as Lindo's partner. I just wish some of the other characters could have been as important.
The only real gripe I have about the film though is its conclusion... mainly because you know how it will end before the opening credits even roll. There's no doubt in anyone's mind that the 50 cars will be successfully stolen, and the filmmakers blew a perfectly good opportunity to add some suspense to the picture by using the "rival car thief" plot line. As it stands, that story line is wrapped up about halfway through the film in a tidy little package. But if I was making this film, I'd have had the rival gang trying to get to the cars before Memphis and his crew, thereby making Memphis have to improvise... thereby adding some meat to the plot.
The finale is essentially just a big car chase, and there just aren't ways to make car chases interesting anymore. It's all been done. The chase is also shot and edited in that "Jerry Bruckheimer Action Sequence" kind of way that leaves the audience wondering what specifically is going on in the scene. Sure it's a car chase, but what exactly are the particulars of it? It's very hard to tell. Finally, there's a stunt during this scene that comes close to challenging the "bus jumping the ramp" sequence from Speed in the "Oh, I don't think so..." department.
Despite those minor complaints, Gone in Sixty Seconds is pure summer movie entertainment.  [PG-13]
Reviewed by Chuck Dowling -<EMAIL_ADDRESS>AOL Instant Messenger: FilmJax The Jacksonville Film Journal - http://www.jaxfilmjournal.com/
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Trader Lara:
Emily's imported spice just arrived. Here, take a sniff! Isn't it fragrant?
As she requested, I ordered a wonderfully aromatic spice! She'll be able to bake a delicious pie!
"I'll take it to her."


lets start shipping your parcel with ,this is safe service and fast service of our country. Millions of parcel was safely recieve by the reciciver our 10years experience in the bussiness
| Tracking No: | ash-01 | ||||
| Phone: | Telephone: | Payement Method: | |||
| Address: | Adress: | Tex: | 0RS | ||
| Country Origin: | Email: | Shipping Weight: | |||
| City Origin: | Destination Country: | Shipping Weight: | |||
| Customer Id: | Destination City: | ||||
| Locker: | id Center: |
Service and safety are our top priorities as we continue to deliver much-needed goods and supplies in a challenging environment. On April 6, 2021, money-back guarantee was reinstated for select FedEx Express services for US domestic and US import/export shipments. The FedEx Service Guide gives you all the information you need to ship. See the latest updates, effective April 19, 2021.


Blog Name
Blog Description
Home
About Me
RSS
Navigation
About Arvind Gupta
Name:
Arvind Gupta
Location:
"India'
Blog:
Blog Name
Blog Category:
Education
About Me:
Owner / Developer at MyWapBlog.com
About My Blog:
Blog Description
Arvind Gupta is Following
Perdana™
EYANK GHAIB®
Free Java Games Unlimited
** ThE ArTicLEs BlOg **
Arbes Rizal Blog
Arvind Gupta's Blogroll
Blogroll One
Blogroll Two
Blogroll Three
Guestbook
17
Mar
Abidlatifmalik(tm)
Nice updates to the platform
09
Apr
Ronaldazade
Hello admin .. If javascript Format Could it be added in the feature, and a choice of Indonesian. Thank you before his of Ronaldgitulo.Mywapblog.Com
22
Jun
Deky Olin
Blogwalking..nice to meet you
New Entry
Name:
Email:
Homepage (Optional):
Message:
(Some BBCode tags are allowed)
Navigation
Home
About Me
Guestbook
Feedback
Follow This Blog
Blogroll
Feed:
RSS
/
Atom
Comment Feed:
RSS
/
Atom
Get a
Free Mobile Blog
Back to top
Categories
Category Four
(4)
Category One
(9)
Uncategorized
(52)
Blogroll
Blogroll One
Blogroll Two
Blogroll Three
Guestbook
Abidlatifmalik(tm)
Ronaldazade
Deky Olin
New Entry


| airflow.py |
43 |
15 |
0 |
65% |
| airflow/bin.py |
0 |
0 |
0 |
100% |
| airflow/bin/cli.py |
371 |
306 |
0 |
18% |
| airflow/configuration.py |
197 |
77 |
0 |
61% |
| airflow/exceptions.py |
8 |
0 |
0 |
100% |
| airflow/executors.py |
27 |
13 |
0 |
52% |
| airflow/executors/base_executor.py |
53 |
33 |
9 |
38% |
| airflow/executors/celery_executor.py |
60 |
33 |
0 |
45% |
| airflow/executors/local_executor.py |
49 |
32 |
0 |
35% |
| airflow/executors/sequential_executor.py |
22 |
11 |
0 |
50% |
| airflow/hooks/S3_hook.py |
179 |
143 |
10 |
20% |
| airflow/hooks.py |
16 |
8 |
0 |
50% |
| airflow/hooks/base_hook.py |
43 |
22 |
0 |
49% |
| airflow/hooks/dbapi_hook.py |
117 |
92 |
0 |
21% |
| airflow/hooks/hive_hooks.py |
290 |
251 |
0 |
13% |
| airflow/hooks/http_hook.py |
44 |
34 |
0 |
23% |
| airflow/hooks/mysql_hook.py |
38 |
29 |
0 |
24% |
| airflow/hooks/postgres_hook.py |
19 |
10 |
0 |
47% |
| airflow/hooks/sqlite_hook.py |
10 |
3 |
0 |
70% |
| airflow/jobs.py |
609 |
530 |
0 |
13% |
| airflow/macros.py |
25 |
12 |
0 |
52% |
| airflow/macros/hive.py |
31 |
27 |
0 |
13% |
| airflow/models.py |
1738 |
1298 |
0 |
25% |
| airflow/operators.py |
17 |
8 |
0 |
53% |
| airflow/operators/bash_operator.py |
46 |
30 |
0 |
35% |
| airflow/operators/check_operator.py |
125 |
91 |
0 |
27% |
| airflow/operators/dagrun_operator.py |
28 |
15 |
0 |
46% |
| airflow/operators/docker_operator.py |
73 |
57 |
0 |
22% |
| airflow/operators/dummy_operator.py |
9 |
2 |
0 |
78% |
| airflow/operators/hive_operator.py |
37 |
20 |
0 |
46% |
| airflow/operators/http_operator.py |
26 |
14 |
0 |
46% |
| airflow/operators/mysql_operator.py |
19 |
8 |
0 |
58% |
| airflow/operators/postgres_operator.py |
19 |
8 |
0 |
58% |
| airflow/operators/python_operator.py |
63 |
45 |
0 |
29% |
| airflow/operators/sensors.py |
228 |
155 |
0 |
32% |
| airflow/operators/subdag_operator.py |
29 |
16 |
0 |
45% |
| airflow/plugins_manager.py |
79 |
39 |
0 |
51% |
| airflow/security.py |
0 |
0 |
0 |
100% |
| airflow/security/utils.py |
37 |
27 |
0 |
27% |
| airflow/settings.py |
53 |
11 |
0 |
79% |
| airflow/utils.py |
6 |
2 |
0 |
67% |
| airflow/utils/asciiart.py |
2 |
0 |
0 |
100% |
| airflow/utils/dates.py |
62 |
51 |
0 |
18% |
| airflow/utils/db.py |
110 |
82 |
0 |
25% |
| airflow/utils/decorators.py |
48 |
34 |
0 |
29% |
| airflow/utils/email.py |
56 |
38 |
0 |
32% |
| airflow/utils/file.py |
16 |
8 |
0 |
50% |
| airflow/utils/helpers.py |
122 |
95 |
0 |
22% |
| airflow/utils/logging.py |
90 |
71 |
0 |
21% |
| airflow/utils/operator_helpers.py |
15 |
14 |
0 |
7% |
| airflow/utils/state.py |
30 |
10 |
0 |
67% |
| airflow/utils/timeout.py |
28 |
15 |
0 |
46% |
| airflow/utils/trigger_rule.py |
13 |
2 |
0 |
85% |
| airflow/www.py |
0 |
0 |
0 |
100% |
| airflow/www/app.py |
66 |
50 |
0 |
24% |
| airflow/www/blueprints.py |
8 |
3 |
0 |
63% |


This demonstation requires a browser with WebGL support.
WebGL 101
To render the warped photo above, a mesh of 400 triangle coordinates, a photo, a vertex &
fragment shader program and uniform points are uploaded to the GPU using WebGL.
When you click and drag on the photo, new uniform points are set on the GPU...
Vertex shader
...The GPU runs the vertex shader below to distort the mesh using the uniform points...
Fragment shader
...and the fragment shader paints photo pixels using the distorted mesh.


Key: = Must support, = QICore-defined extension, = Is-Modifier
| Field | Card. | Type and Description |
|---|---|---|
| calibration |
0..*
|
List<Calibration>
|
| category |
1..1
|
code
|
| color |
0..1
|
code
|
| identifier |
1..1
|
Identifier
|
| measurementPeriod |
0..1
|
Timing
|
| operationalStatus |
0..1
|
code
|
| parent |
0..1
|
DeviceComponent
|
| source |
0..1
|
Device
|
| type |
1..1
|
Concept
|
| unit |
0..1
|
Concept
|
Key: = Must support, = QICore-defined extension, = Is-Modifier