Category Archives: TOS

March- 3 JQuery

After few weeks process of the project, I have some general understanding of how to build a data which could connect with the jsp file. During the class, we have decided to start to build up a sever to host this app. And I decided to change my focus on web interface, something I have never done before. Together with Joe, we will working on the article secession which should display some reading while having some pictures on the side. Joe has got some functions working and display very nicely. And someone suggested to us to have a function to enlarge the picture if people want to take a close look at the picture. What I have done this week is try out the functions that its already exist , and get familiar with the JQuery. And I will focus more how to make a lights up box at the following week. 

From the blog zli1 » cs-wsu by zhengjunli and used with permission of the author. All other rights reserved by the author.

March – 10 git-hub

While I am working on the article secession, gitHub is being introduced to the class as a tool to use for the online project hosting. So set up gitHub and learn how to use it is another task for me in this week. In web http://git-scm.com/book, it has 9 chapters guild you all kinds of different things within the git. After I installing the git in my windows, I will being able to clone the our class’s repo,  remote the cloned repo, create and delete a new branch, push your files to the branch on Github, etc. It is really helpful for doing a project as a group and to kept working on it as a whole. 

From the blog zli1 » cs-wsu by zhengjunli and used with permission of the author. All other rights reserved by the author.

Ahhhhh… This slideshow

James found a great template slideshow under the GNU license which is perfect for this project. I made a couple of modifications to it already and it seems like it is a great candidate for the end product. It was basically in a perfect state as is. The only modifications that are now needed (as far as I can tell) are to put the picture finder at the bottom of the screen (Tim’s request) and add the swipe functionality from JQuery to the pictures. Moving the picture finder to the bottom of the screen maybe harder than I originally thought, but we’ll look into it.

Now where the issues lie… As far as I can tell, the slideshow works great on my machine and from the github server, but it will not load while trying to access it from the school server. This is a major issue. It will not load in a browser from the server or on the iPad. Parts of the page will load and it seems like it will function from what is there. It just will not load the pictures. I’m not sure if this a problem with the code (most likely) or a problem when it got uploaded to the server (maybe the images didn’t get uploaded)? Anyways, hopefully we can figure this out. We still have six weeks left, so no hair pulling yet.

If you want to try the slideshow you’ll have download it from github.

From the blog Sean » cs-wsu by shorton1 and used with permission of the author. All other rights reserved by the author.

Ahhhhh… This slideshow

James found a great template slideshow under the GNU license which is perfect for this project. I made a couple of modifications to it already and it seems like it is a great candidate for the end product. It was basically in a perfect state as is. The only modifications that are now needed (as far as I can tell) are to put the picture finder at the bottom of the screen (Tim’s request) and add the swipe functionality from JQuery to the pictures. Moving the picture finder to the bottom of the screen maybe harder than I originally thought, but we’ll look into it.

Now where the issues lie… As far as I can tell, the slideshow works great on my machine and from the github server, but it will not load while trying to access it from the school server. This is a major issue. It will not load in a browser from the server or on the iPad. Parts of the page will load and it seems like it will function from what is there. It just will not load the pictures. I’m not sure if this a problem with the code (most likely) or a problem when it got uploaded to the server (maybe the images didn’t get uploaded)? Anyways, hopefully we can figure this out. We still have six weeks left, so no hair pulling yet.

If you want to try the slideshow you’ll have download it from github.

From the blog Sean » cs-wsu by shorton1 and used with permission of the author. All other rights reserved by the author.

Puzzle now supports difficulty levels

Today during class we implemented the tool that allowed the puzzle pieces to be dragged across the screen. It was awesome to see all of the groups work up on the server running on the iPad. During class me and my group discussed some up coming features we wanted to add to the puzzle application. The main ones where the ability to change the difficulty level. Our first demo had this but it took a little bit research to learn how to do it in jQuery. I just finished implementing the puzzle to now have ability to select a level for difficulty. Below you will find 2 screen shots of the different levels the puzzle will have. Our next step is to implement a side bar with the different images supplied from Tim to use for the puzzle. This way the user can see what the image is and then select it from the drop down list to complete the puzzle.

Image

Image

This is currently not on the web server for testing. Should be up there by the end of the week.

From the blog rwilliams5262 » cs-wsu by rwilliams5262 rwilliams5 and used with permission of the author. All other rights reserved by the author.

Puzzle now supports difficulty levels

Today during class we implemented the tool that allowed the puzzle pieces to be dragged across the screen. It was awesome to see all of the groups work up on the server running on the iPad. During class me and my group discussed some up coming features we wanted to add to the puzzle application. The main ones where the ability to change the difficulty level. Our first demo had this but it took a little bit research to learn how to do it in jQuery. I just finished implementing the puzzle to now have ability to select a level for difficulty. Below you will find 2 screen shots of the different levels the puzzle will have. Our next step is to implement a side bar with the different images supplied from Tim to use for the puzzle. This way the user can see what the image is and then select it from the drop down list to complete the puzzle.

Image

Image

This is currently not on the web server for testing. Should be up there by the end of the week.

From the blog rwilliams5262 » cs-wsu by rwilliams5262 rwilliams5 and used with permission of the author. All other rights reserved by the author.

Puzzle Problems

This week was a slow week due to being on spring break, but a classmate did email the class with what was wrong with the app. The app looked fine but the puzzle pieces couldn’t move. So after my group did some research we found that the draggable behavior that we have been using in our code is not supported with touch devices. We found this website that allows you to add about 5 lines of  code that will basically allow you to use the code you already have and everything will work how it is suppose too. After implementing this into our code and testing it on the ipad it worked! so the next steps are getting difficultly levels for the puzzle. Will post back later in the week to tell how that is going.

From the blog klentblog » cswsu by klent22 and used with permission of the author. All other rights reserved by the author.

Feb-24 How to use SQL

Continue from last week, by connected SQL with JSP, the next step is to know how to modify the data in the table by insert, delete, select such functions. There is a very useful web that I found online: http://www.w3schools.com/sql/. On the web, there are a lot a good code basic and advanced feature about SQL.

There are some feature that I found might help out from our project.

 

The INSERT INTO Statement

The first form doesn’t specify the column names where the data will be inserted, only their values:

INSERT INTO table_name
VALUES (value1, value2, value3,…)

The second form specifies both the column names and the values to be inserted:

INSERT INTO table_name (column1, column2, column3,…)
VALUES (value1, value2, value3,…)

 

The UPDATE Statement

The UPDATE statement is used to update existing records in a table.

SQL UPDATE Syntax

UPDATE table_name
SET column1=value, column2=value2,…
WHERE some_column=some_value

SQL DELETE Statement

The DELETE Statement

The DELETE statement is used to delete rows in a table.

SQL DELETE Syntax

DELETE FROM table_name
WHERE some_column=some_value

From the blog zli1 » cs-wsu by zhengjunli and used with permission of the author. All other rights reserved by the author.

Feb-17 how to install SQL and JSP

This week, we meet up again and we have made the decisions about how to splits people into groups and start our project. There are groups in Coloring, Puzzle, Content Frames, Home Page, PhoneGap and Database. And I choice to been in the Database group, I wish to build a database in order to replace the content in the app easily to make the app will being used wildly. None of our group member have very specific experience on build such a database in a web. So we have to starting from doing a research on it.

And what I have done this week is installed both Java and mySQL on the computer. And most important thing to know about is how to make the connection between these two. So I found out a good example on the web to show such thing.

 

 

<html>
<head><title>Enter to database</title></head>
<body>
<table>
<%@ page import=”java.util.*” %>
<%@ page import=”javax.sql.*;” %>
<% 

java.sql.Connection con;
java.sql.Statement s;
java.sql.ResultSet rs;
java.sql.PreparedStatement pst;

con=null;
s=null;
pst=null;
rs=null;

// Remember to change the next line with your own environment 
String url= 
“jdbc:jtds:sqlserver://nameofyourdatabaseserver.or.ipaddress/yourdatabasename”;
String id= “username”;
String pass = “password”;
try{

Class.forName(“net.sourceforge.jtds.jdbc.Driver”);
con = java.sql.DriverManager.getConnection(url, id, pass);

}catch(ClassNotFoundException cnfex){
cnfex.printStackTrace();

}
String sql = “select top 10 * from tbl_sys_user”;
try{
s = con.createStatement();
rs = s.executeQuery(sql);
%>

<%
while( rs.next() ){
%><tr>
<td><%= rs.getString(“cust_id”) %></td>
<td><%= rs.getString(“rdate”) %></td>
<td><%= rs.getString(“email”) %></td>
</tr>
<%
}
%>

<%

}
catch(Exception e){e.printStackTrace();}
finally{
if(rs!=null) rs.close();
if(s!=null) s.close();
if(con!=null) con.close();
}

%>

</body>
</html>

 

(From: http://www.java-samples.com/showtutorial.php?tutorialid=619 )

From the blog zli1 » cs-wsu by zhengjunli and used with permission of the author. All other rights reserved by the author.

Puzzle Weekly Report

During the spring break I saw the email about the testing so far with the code we have. I noticed that the puzzle game was not working for dragging wise the pieces across the screen. Else the buttons worked with no issue. Kerry found on the web that there is a tool called touchPunch. How it works is it uses simulated events to map the touch events to their mouse event analogs. All this needs it to add the touchPunch.js tool to the index.html file after the defining of the jQuery UI package tool. Then from here it should allow you to move the pieces. 

Here is the link to touchPunch tool:

http://touchpunch.furf.com

We have implemented this into the code and and from testing wise through the web browser everything seems good. The next step is to test this on the iPad to see if this tool actually works or not. 

We have been working on implementing a main screen page which would allow the user to select the difficulty level of the puzzle, the image they would like to view (if have more than 1) and then a button that starts the puzzle. Once the user starts the puzzle they can complete the puzzle or click the button at the top left corner to go back to the main page. We figured it would be a good idea to have a main page which allows the user to select all the different options they wish to use inside the puzzle and then move onto a different page for the actual game. The issue we have come across is getting the button id values passed to the 2nd html file. The first puzzle application we had did this all within one main html page which we were able to pass the id value to the javascript from there inside. We are stuck on passing the value from one index page to another. If anyone has any idea how this is possible that would be greatly appreciated! 

Overall it has been a lot of learning and trying to find different ways to get this value passing for me over the past week. We are hoping to have theses new features added in soon once we get past this small bug we are stuck on. 

From the blog rwilliams5262 » cs-wsu by rwilliams5262 rwilliams5 and used with permission of the author. All other rights reserved by the author.