Author Archives: A Jani

Eight Constitution Medicine

infinityEight Constitution Medicine (ECM) is a comprehensive system of healing that has been proven effective for over 2500 years.  It is one of the fastest growing health care modalities today.

Why does one get tired after eating a meal? Why is one allergic to a particular food or medication and others are not?  Why does one get angry easily but another is calm from the moment they were born? The answer to these and similar questions is that each person’s make-up (also known as constitution), is different.

Everyone is born with a different constitution based on their genetics and physiology being either like their mother or father, as far as the relative strength and weaknesses of their organs.  People with the same disease or condition react differently to a food or a medication.  This is because of their constitution.

In ECM, a specialized pulse taking technique is used to diagnose your constitution (your make up) to identify what your strengths and weaknesses are (which appear inherently in the organ system, shape, character, personality, etc.).

There are 8 known constitutions: Hepatonia, CholecystoniaPancreotoniaGastrotonia, PulmotoniaColonotoniaRenotonia, and Vesicotonia.

Your constitution will dictate what food groups to eat or avoid to help your body to heal itself. By following the right food regimen based on your constitution, you can help strengthen the weak and the deficient, or balance the overactive and the excess condition that you have.

Each constitution’s food intake plan is categorized in 3 groups based on the energetic nature and the effect of the foods on the body as follows

  • Good for You: Foods that are most beneficial for your health. Consuming them balances your organ system.
  • Better to Avoid: Food that you should eat in moderation and rarely, and  should not be a large portion of any meal.
  • Bad for You: Foods that are harmful to your well- being, and contribute to your illness.

If you do not know what your Constitution is, contact Verity and setup an appointment to have them examine you and determine your constitution.

Here at iCode,  we developed a mobile application that lets individuals  quickly lookup foods and displays the properties, nature, and effectiveness  as they relate to their specific constitution.

Free on App Store  Free on Android

3

2

Risk dice roller

Here is a simple mobile app I helped my son write. He is a big Risk fan and this seemed like a great way for him to get introduced to android development.

See: Risk Dice Roller

Risk Dice Roller is a simple app designed to replace dice needed for the original risk board game. It automates the rolling process and keeps history and statistics of each players rolls. You can even automate larger battles and watch as your large army takes on the defenders.  It can be really fun to compare player stats and its effect on the outcome of the game.

MS SQL query to Find Columns or Fields in Database

If you need to locate a field in a large database and you don’t know what table the filed is or not really sure of the exact spelling of the field, you can use this simple query to search for fields names in a database.

SELECT t.name AS table_name, 
SCHEMA_NAME(schema_id) AS schema_name,
c.name AS column_name
FROM sys.tables AS t
INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
WHERE c.name LIKE '%Your_Field_Name%'
ORDER BY schema_name, table_name

Inject onload javascript function for asp.net aspx pages with master page

1. Add reference to HtmlControls on top of your cs file

using System.Web.UI.HtmlControls;

2. In your Page_Load function of the .cs file add

((HtmlGenericControl) this.Page.Master.FindControl(“PageBody”)).Attributes.Add(“onload”, “load()”);

3. Make sure your master page BODY has the the matching id from above. in this case: ID=”PageBody” runat=”server”

4. In your aspx file, add you load function. something like:

Use SIP Client softphone with your Google Voice account – Free!

Since Google does not support SIP, what you need to do to get around the restriction is get an alternate SIP account, connect it to a 2nd phone number, and the forward your Google Voice to this number.

This is how you can do it for Free!

1. Get a SIP account from sip2sip.info

  • (Its free and just take a minute to create an account)

2. Get an IPKall phone number from ipkall.com

  • Create an account and use your sip2sip.info from step 1 and they will give you a USA phone number for free.

3. Get a Google voice number (if you don’t have one yet) and forward it to your new IPKall phone number from step 2.

4. Setup your softphone using your sip2sip.info account info.

  • I like the free client called Zoiper.  you can get it here.

Thats it!

Now your Google Voice inbound calls will ring on your SIP client!

enjoy!

document.getElementById in asp.net with Master Pages

Using JavaScript to locate controls in ASP.net pages that are linked to master pages can be tricky.  This is because the ASP.net reassigns control IDs dynamically and the names change.

A simple solution is to use asp.net inline Tags.

For Example:

Instead for using:

document.getElementById(“Label1″)

try using:

document.getElementById(“<%=Label1.ClientID%>”)

c# function for a Bezier Curve

The Bezier Curve formula below can be used to define  smooth curves between points in space.

P(t) = (1-t)^3P0 + 3(1-t)^2tP1 + 3(1-t)t^2P2 + t^3P3

curve  Bezier Curve

The function below is a C# implementation of the formula return the X and Y coordinates of a position on the curve for a given Time (t) and the 4 points that define the Bezier Curve.    At  t=0 you will be at p0, and at t=1 you will be at p3.

You can easily extend this to connect multiple curves to each other (multi-segmented path). You can do this simply by making p0 of subsequent segments equal p3 of the prior segment.

Include this function in your c# projects to create smooth curves.

C# Code Sample:

private Vector2 GetPoint(float t, Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3)
{
  float cx = 3 * (p1.X - p0.X);
  float cy = 3 * (p1.Y - p0.Y);
  float bx = 3 * (p2.X - p1.X) - cx;
  float by = 3 * (p2.Y - p1.Y) - cy;
  float ax = p3.X - p0.X - cx - bx;
  float ay = p3.Y - p0.Y - cy - by;
  float Cube = t * t * t;
  float Square = t * t;

  float resX = (ax * Cube) + (bx * Square) + (cx * t) + p0.X;
  float resY = (ay * Cube) + (by * Square) + (cy * t) + p0.Y;

  return new Vector2(resX, resY);
}

To use the function, simply pass in the 4 point and a time (between 0 and 1).  To draw the curve, try calling this function from a for loop that looks something like this:

// preset your p0,p1,p2,p3

Vector2 PlotPoint;
for (float t = 0;  t <= 1.0f; t += 0.01f)
{
   PlotPoint = GetPoint(t, p0, p1, p2, p3);

   // now call some function to plot the PlotPoint
   YourDrawFunction(PlotPoint);
}

This basically starts you at p0 when time t is zero and at each increment of time +0.01 you will slowly move on the curve towards p3.

So to give you an idea of how this was used by my son in one of his games, watch the video below.

  • Note these are circular Paths each withe 3 segments. Each segment is a 4 point Bezier calculation.
  • p3 of the each segment is common to p0 of next each segment.
  • To make the circular, p3 of last segment must be same as p0 of 1st segment.
  • p2 and p3 of each segment must be on a strait line with p0 and p1 or the next segment. (this give you the double handles for each point)

So this means:

  • If a path point was moved by user, you must also move left and right control handler points by same deltas
  • If left handler moved, must also move corresponding path point so it intersects line to other handler at mid point
  • If right handler moved, must also move corresponding path point so it intersects line to other handler at mid point

Good luck.