- Download JOGL1.1 "windows amd64 and i586" zip file from here or here.
- Extract this zip file to C:\ so you should have C:\JOGLwin\lib32 and C:\JOGLwin\lib64
- Open Netbeans and create a new project, call it "Computer Graphics" for example.
- Download the file "SimpleJoglApp.java" or from here and add it to your project.
- Right-click the project and choose properties.
- Select Run from the left, then add this Java VM option: "-Djava.library.path=C:\JOGLwin\lib64", and press Ok.
- After this, right-click on Libraries and select "Add Library", or simply choose "Libraries" from project properties on the left.
- Press Add Library -> Create -> Type the library name "Jogl" and press Ok.
- Now, click "Add JAR/Folder", browse to "C:\JOGLwin\lib32", and select all files then press "Add JAR/Folder", then do the same for "C:\JOGLwin\lib64".
- After adding both sets of JARs, your library should look like this:
- Click OK -> OK, run your project/file and it should work.
Monday, March 31, 2014
How to install JOGL1.1 into Netbeans?
ِAndroid/IOS Mobile Applications: How do I add URI support to my app?
Part 1: Define the URI structure
First step is to figure out how the URI will look. At minimum, it will look something like this:
com.myshoppingsite://
In URI lingo "shopping" is considered the scheme and is whatever you'd like it to be. So first choose an appropriate scheme. Typically, it will follow something very similar to your app name.
Next is to consider the path after the scheme. In the com.myshoppingsite:// example say if you want to link to a specific product within your app, you can do something like:
com.myshoppingsite://prod ucts/123
Here are some more examples of URI schemes that are out there:
http://wiki.akosma.com/IP hone_UR...
http://handleopenurl.com/
Here is a good answer that illustrates how best to go about defining the URI structure:
https://www.quora.com/URI s/What-best-practices-sho uld-I-follow-when-creatin g-URI-structures-for-mobi le-apps/answer/Simon-Tam- 5
Part 2: Integrate the scheme into your app
Without getting too technical, here's the quick and dirty version. Please refer here for more a more detailed view:
https://www.sparq.it/web/ api/v1/...
IOS devices
1. Define the URI scheme in Info.plist under CFBundleURLTypes -> CFBundleURLSchemes.
2. Implement application:openURL:sourc eApplication:annotation: in your app delegate. (handleOpenUrl is deprecated)
3. The full URI will be passed in which you can then parse and handle within your app
Full reference: http://developer.apple.co m/library/ios/documentati on/iphone/conceptual/ipho neosprogrammingguide/Adva ncedAppTricks/AdvancedApp Tricks.html#//apple_ref/d oc/uid/TP40007072-CH7-SW5 0
Android devices
First determine which set of activities will be handling your URIs. For example, say your app can display products and you want your URI to deeplink into them like so:
com.myshoppingsite://prod ucts
You will then need to define an intent filter in the AndroidManifest.xml:
Full reference: http://developer.android. com/training/basics/inten ts/filters.html#AddIntent Filter
First step is to figure out how the URI will look. At minimum, it will look something like this:
com.myshoppingsite://
In URI lingo "shopping" is considered the scheme and is whatever you'd like it to be. So first choose an appropriate scheme. Typically, it will follow something very similar to your app name.
Next is to consider the path after the scheme. In the com.myshoppingsite:// example say if you want to link to a specific product within your app, you can do something like:
com.myshoppingsite://prod
Here are some more examples of URI schemes that are out there:
http://wiki.akosma.com/IP
http://handleopenurl.com/
Here is a good answer that illustrates how best to go about defining the URI structure:
https://www.quora.com/URI
Part 2: Integrate the scheme into your app
Without getting too technical, here's the quick and dirty version. Please refer here for more a more detailed view:
https://www.sparq.it/web/
IOS devices
1. Define the URI scheme in Info.plist under CFBundleURLTypes -> CFBundleURLSchemes.
2. Implement application:openURL:sourc
3. The full URI will be passed in which you can then parse and handle within your app
Full reference: http://developer.apple.co
Android devices
First determine which set of activities will be handling your URIs. For example, say your app can display products and you want your URI to deeplink into them like so:
com.myshoppingsite://prod
You will then need to define an intent filter in the AndroidManifest.xml:
Monday, January 16, 2012
System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client
While I was working on a web shopping project, we were creating email templates to send to users regarding order status. Sometimes we need to format the email template by using some HTML tags like <div> or <br>, which was prevented by ASP.Net. Every time you try to submit HTML tags within the ASP.Net textbox, you get the System.Web.HttpRequestValidationException. So I decided to find a way to encode the tags using javascript first to allow data to be processed by server then at the server action I decoded it to have the original HTML tags inserted into database. Here is the script I added to my aspx page.
<script type="text/javascript">
function escapeHTML (str)
{
var div = document.createElement('div');
var text = document.createTextNode(str);
div.appendChild(text);
return div.innerHTML;
}
function HTMLEncode()
{
document.getElementById('<%= txtBox.ClientID %>').value = escapeHTML(document.getElementById('<%= txtBox.ClientID %>').value);
}
</script>
This is the button that is used for submitting data to server and hence inserting into database.
<asp:Button ID="btnAdd" runat="server" Text="Add" OnClientClick="HTMLEncode()" OnClick="btnAdd_Click" />
And finally the server side decode which transfers the HTML tags back to their original status.
protected void btnAdd_Click(object sender, EventArgs e)
{
string Value = HttpUtility.HtmlDecode(txtBox.Text);
//Insert Value into database
}
I hope you find this useful.
<script type="text/javascript">
function escapeHTML (str)
{
var div = document.createElement('div');
var text = document.createTextNode(str);
div.appendChild(text);
return div.innerHTML;
}
function HTMLEncode()
{
document.getElementById('<%= txtBox.ClientID %>').value = escapeHTML(document.getElementById('<%= txtBox.ClientID %>').value);
}
</script>
This is the button that is used for submitting data to server and hence inserting into database.
<asp:Button ID="btnAdd" runat="server" Text="Add" OnClientClick="HTMLEncode()" OnClick="btnAdd_Click" />
And finally the server side decode which transfers the HTML tags back to their original status.
protected void btnAdd_Click(object sender, EventArgs e)
{
string Value = HttpUtility.HtmlDecode(txtBox.Text);
//Insert Value into database
}
I hope you find this useful.
In the name of Allah بسم الله الرحمن الرحيم
Lets begin blogging...
اللهم استخدمنى لفائدة الاسلام والمسلمين
Subscribe to:
Posts (Atom)



