Member Avatar

Hello there! I'm trying to understand some basic android animation programming using Android Studio, and I have followed some tutorials on the internet. I already know some basic java programming, but I have a problem with my "copy/paste app" I made from youtube. This is my MainActivity: public class MainActivity extends ActionBarActivity { private Button play; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); play = (Button) findViewById(R.id.play_button); play.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent startGame = new Intent("com.abc.test.DRAWGAME2"); startActivity(startGame); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem …

Member Avatar
0
12
Member Avatar

Hi! Is there any way to remove a file from a directory when a session ends? (Like when a user closes the webbrowser)

Member Avatar
0
11
Member Avatar

Hi I want to create a code so that the user can upload an image. The code then resizes it and then [U]stores it as a blob[/U] in my database. [URL="http://www.9lessons.info/2009/03/upload-and-resize-image-with-php.html"]The code I'm using[/URL] I have done everything, but need to know which variable (in the link) to store into the blob in my mysql database. I don't want imagejpeg() to create the pictures in a /images/ folder, like this code does, I want the data in a variable and then store it as a blob. How do i assign a variable the "raw" data (like opening an image in …

Member Avatar
0
3
Member Avatar

Hi. I have a problem with some JS at my website. The user has to fill out a form, enter his/her name, e-mail, phonenumber, location etc. The problem is that I don't want to have a fake phonenumber entered to my database, so I want to verify the phonenumber by comparing the area codes of my country (Sweden). I have all the area codes, (2, 3 or 4 digits) but dont know how to take the entered value and see if the first characters matches the area codes. [CODE] function validateForm() { var msg = "Check:\n\n"; var name=document.forms["quest"]["name"].value if (name==null …

Member Avatar
0
3
Member Avatar

Hi I have a website that has a get.php file that echoes out the specific image i want Here is the code: [CODE]$id = addslashes($_REQUEST['id']); $image = mysql_query("SELECT * FROM items WHERE id=$id"); $image = mysql_fetch_assoc($image); $image = $image['image']; header("Content-type: image/jpeg"); echo $image;[/CODE] To get an image from the database with the id $id, i use this code: [CODE]img src='get.php?id=$id'[/CODE] The problem is that when someone wants to save the image, the URL is for example "mywebsite.com/get.php?id=137" and the webbrowser wants to save it as "get.php". I want it to be saved as just "$id", or as in this example …

Member Avatar
0
8
Member Avatar

Hi I'm new to java, and I'm trying to make a very basic game. The problem is that i have 3 classes that cooperates and I can't get one of the values from class "Board.java" to "gp1.java". In Board i have a button that "rolls the dice" x2 and adds the values. In gp1 i make a picture move around (game marker or whatever it's called), but I want it to move depending on the dice. Some of the code of "Board": [CODE] public class Board extends JPanel implements ActionListener { private int dice; JButton button; TextField text = new …

Member Avatar
0
18

The End.