Can I edit this code to accept .php instead of .jpg?
Hi guys,
Thanks for checking this post out...
Can I edit the below code so when a link is clicked on, say
main.php?pagename=news, it will look in a folder for news.php and
display it where the code is placed in main.php?
Here is the code:
<img src="images/<?php echo $_GET['image']; ?>.jpg"
/>
Thank you very much and I hope to hear from you.
All the best,
Mark
No, not unless you want to use fames.
Similar Messages
-
How can I edit this number that I have not in my ordinary contact list, before redial?
Whats up, fellows?
I want to redial for a last number that called me, however I need to increase numbers (as country code, carrier code or something like that) on this number, how can I edit this number that I have not in my ordinary contact list, before redial?
Tks,That is discouraging. However I do notice that if I view my podcasts in My Podcasts mode they are grouped and sorted better than in Unplayed mode and the ones in the cloud are not shown. However although I prefer the one window view of List mode to the two windows My Podcast mode, My Podcast mode does at least indicate how many unplayed episodes I have from each podcast. This would almost be acceptable except that partially listened to podcasts, while still there, can only be identified by highlighting the podcast title on the lefthand sidebar, (although the number of completely unplayed episodes are listed on the left hand sidebar). As someone who often listens to a podcast over two or more days I fear I could forget which ones I have only partially listened to and would have to go down the entire left hand sidebar list highlighting each podcast to remind myself. I really find the List mode the most informative and easiest way to view my podcasts and really wish Apple had not messed with it
-
How can i know how to redeem the code? how can i get this code?
how can i know how to redeem the code? how can i get this code? please i need you help
<Email Edited by Host>You are trying to create a new Apple ID? You don't have one yet? Is that correct?
If so, then see this article on how to creat your Apple ID - and make up a password for it. Remember to write it down immediately.
http://support.apple.com/en-us/HT203993 -
Can anybody help me to build an interface that can work with this code
please help me to build an interface that can work with this code
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileReader;
public class Translate
public static void main(String [] args) throws IOException
if (args.length != 2)
System.err.println("usage: Translate wordmapfile textfile");
System.exit(1);
try
HashMap words = ReadHashMapFromFile(args[0]);
System.out.println(ProcessFile(words, args[1]));
catch (Exception e)
e.printStackTrace();
// static helper methods
* Reads a file into a HashMap. The file should contain lines of the format
* "key\tvalue\n"
* @returns a hashmap of the given file
@SuppressWarnings("unchecked")
private static HashMap ReadHashMapFromFile(String filename) throws FileNotFoundException, IOException
BufferedReader in = null;
HashMap map = null;
try
in = new BufferedReader(new FileReader(filename));
String line;
map = new HashMap();
while ((line = in.readLine()) != null)
String[] fields = line.split("
t", 2);
if (fields.length != 2) continue; //just ignore "invalid" lines
map.put(fields[0], fields[1]);
finally
if(in!=null) in.close(); //may throw IOException
return(map); //returning a reference to local variable is safe in java (unlike C/C++)
* Process the given file
* @returns String contains the whole file.
private static String ProcessFile(Map words, String filename) throws FileNotFoundException, IOException
BufferedReader in = null;
StringBuffer out = null;
try
in = new BufferedReader(new FileReader(filename));
out = new StringBuffer();
String line = null;
while( (line=in.readLine()) != null )
out.append(SearchAndReplaceWordsInText(words, line)+"\n");
finally
if(in!=null) in.close(); //may throw IOException
return out.toString();
* Replaces all occurrences in text of each key in words with it's value.
* @returns String
private static String SearchAndReplaceWordsInText(Map words, String text)
Iterator it = words.keySet().iterator();
while( it.hasNext() )
String key = (String)it.next();
text = text.replaceAll("\\b"key"
b", (String)words.get(key));
return text;
* @returns: s with the first letter capitalized
String capitalize(String s)
return s.substring(0,0).toUpperCase() + s.substring(1);
}... here's the head of my pirate_words_map.txt
hello ahoy
hi yo-ho-ho
pardon me avast
excuse me arrr
yes aye
my me
friend me bucko
sir matey
madam proud beauty
miss comely wench
where whar
is be
are be
am be
the th'
you ye
your yer
tell be tellin'please help me i don t know how to go about this.my teacher ask me to build an interface that work with the code .
Here is the interface i just build
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileReader;
import java.awt.*;
import javax.swing.*;
public class boy extends JFrame
JTextArea englishtxt;
JLabel head,privatetxtwords;
JButton translateengtoprivatewords;
Container c1;
public boy()
super("HAKIMADE");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBackground(Color.white);
setLocationRelativeTo(null);
c1 = getContentPane();
head = new JLabel(" English to private talk Translator");
englishtxt = new JTextArea("Type your text here", 10,50);
translateengtoprivatewords = new JButton("Translate");
privatetxtwords = new JLabel();
JPanel headlabel = new JPanel();
headlabel.setLayout(new FlowLayout(FlowLayout.CENTER));
headlabel.add(head);
JPanel englishtxtpanel = new JPanel();
englishtxtpanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,40));
englishtxtpanel.add(englishtxt);
JPanel panel1 = new JPanel();
panel1.setLayout(new BorderLayout());
panel1.add(headlabel,BorderLayout.NORTH);
panel1.add(englishtxtpanel,BorderLayout.CENTER);
JPanel translateengtoprivatewordspanel = new JPanel();
translateengtoprivatewordspanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,40));
translateengtoprivatewordspanel.add(translateengtoprivatewords);
JPanel panel2 = new JPanel();
panel2.setLayout(new BorderLayout());
panel2.add(translateengtoprivatewordspanel,BorderLayout.NORTH);
panel2.add(privatetxtwords,BorderLayout.CENTER);
JPanel mainpanel = new JPanel();
mainpanel.setLayout(new BorderLayout());
mainpanel.add(panel1,BorderLayout.NORTH);
mainpanel.add(panel2,BorderLayout.CENTER);
c1.add(panel1, BorderLayout.NORTH);
c1.add(panel2);
public static void main(final String args[])
boy mp = new boy();
mp.setVisible(true);
}..............here is the code,please make this interface work with the code
public class Translate
public static void main(String [] args) throws IOException
if (args.length != 2)
System.err.println("usage: Translate wordmapfile textfile");
System.exit(1);
try
HashMap words = ReadHashMapFromFile(args[0]);
System.out.println(ProcessFile(words, args[1]));
catch (Exception e)
e.printStackTrace();
// static helper methods
* Reads a file into a HashMap. The file should contain lines of the format
* "key\tvalue\n"
* @returns a hashmap of the given file
@SuppressWarnings("unchecked")
private static HashMap ReadHashMapFromFile(String filename) throws FileNotFoundException, IOException
BufferedReader in = null;
HashMap map = null;
try
in = new BufferedReader(new FileReader(filename));
String line;
map = new HashMap();
while ((line = in.readLine()) != null)
String[] fields = line.split("
t", 2);
if (fields.length != 2) continue; //just ignore "invalid" lines
map.put(fields[0], fields[1]);
finally
if(in!=null) in.close(); //may throw IOException
return(map); //returning a reference to local variable is safe in java (unlike C/C++)
* Process the given file
* @returns String contains the whole file.
private static String ProcessFile(Map words, String filename) throws FileNotFoundException, IOException
BufferedReader in = null;
StringBuffer out = null;
try
in = new BufferedReader(new FileReader(filename));
out = new StringBuffer();
String line = null;
while( (line=in.readLine()) != null )
out.append(SearchAndReplaceWordsInText(words, line)+"\n");
finally
if(in!=null) in.close(); //may throw IOException
return out.toString();
* Replaces all occurrences in text of each key in words with it's value.
* @returns String
private static String SearchAndReplaceWordsInText(Map words, String text)
Iterator it = words.keySet().iterator();
while( it.hasNext() )
String key = (String)it.next();
text = text.replaceAll("\\b"key"
b", (String)words.get(key));
return text;
* @returns: s with the first letter capitalized
String capitalize(String s)
return s.substring(0,0).toUpperCase() + s.substring(1);
}... here's the head of my pirate_words_map.txt
hello ahoy
hi yo-ho-ho
pardon me avast
excuse me arrr
yes aye
my me
friend me bucko
sir matey
madam proud beauty
miss comely wench
where whar
is be
are be
am be
the th'
you ye
your yer
tell be tellin' -
Framemaker uses <$filename> for short file name, can we edit this to change appearance? We do not want the short file name of long filename to include the .fm extension can this be removed or modified to make this happen? In compiling our books it would be helpful to not have this extension appear as it then requires us to create extra files without them.
See: System Variables
-
Can soemone explain this code to me
can someone explain this code to me
import javax.swing.*;
import BreezySwing.*;
import java.util.Random;
public class PennyPinch extends GBFrame
private JButton enterButton;
private JTextArea outputArea;
private int[][] board = {{1,1,1,1,1},{1,2,2,2,1},{1,2,3,2,1},{1,2,2,2,1},{1,1,1,1,1}};
private boolean[][] landing = new boolean[5][5];
private int total;
public PennyPinch()
enterButton = addButton ("Pitch",2,1,1,1);
outputArea = addTextArea("",4,1,3,4);
public void pitch()
Random generator = new Random();
int randomRow = generator.nextInt(5);
int randomColumn = generator.nextInt(5);
total += board[randomRow][randomColumn];
landing[randomRow][randomColumn] = true;
public void buttonClicked (JButton buttonObj)
pitch();
displayList(board, outputArea);
private void displayList(int a[][], JTextArea output)
output.setText("");
for (int row = 0; row < 5; row++)
for (int col = 0; col < 5; col++){
if(landing[row][col] ==true)
output.append(Format.justify('r',"P", 3) + " ");
if (col == 4)
output.append("\n");
else
output.append(Format.justify('r', a[row][col], 3) + " ");
if (col == 4)
output.append("\n"); }
output.append("the total is " + total);
public static void main (String[] args)
PennyPinch theGUI = new PennyPinch();
theGUI.setSize (300, 300);
theGUI.setVisible(true);
}Knowing toilets or studying under George?What kind pervert are you?
What is written in public toilets o/c!Ah yes I see, I found example questions.
2:3.4 please complete the following well known saying
by filling in the blank
Whilst you are reading what I put
You are blank on your foot
2:3.5 Upon seeing the announcement 'Toilet
tennis' and following the instruction ' please
see other wall for details' what is the standard
message on the other wall.2:3.4. is the correct answer 'micturating' ?
2:3.5. I believe the answer is Ibidem. -
How can i run this code correctly?
hello, everybody:
when i run the code, i found that it dons't work,so ,i hope somebody can help me!
the Ball class is this :
package {
import flash.display.Sprite;
[SWF(width = "550", height = "400")]
public class Ball extends Sprite {
private var radius:Number;
private var color:uint;
private var vx:Number;
private var vy:Number;
public function Ball(radius:Number=40, color:uint=0xff9900,
vx:Number =0, vy:Number =0) {
this.radius= radius;
this.color = color;
this.vx = vx;
this.vy = vy;
init();
private function init():void {
graphics.beginFill(color);
graphics.drawCircle(0,0,radius);
graphics.endFill();
and the Chain class code is :
package {
import flash.display.Sprite;
import flash.events.Event;
[SWF(width = "550", height = "400")]
public class Chain extends Sprite {
private var ball0:Ball;
private var ball1:Ball;
private var ball2:Ball;
private var spring:Number = 0.1;
private var friction:Number = 0.8;
private var gravity:Number = 5;
//private var vx:Number =0;
//private var vy:Number = 0;
public function Chain() {
init();
public function init():void {
ball0 = new Ball(20);
addChild(ball0);
ball1 = new Ball(20);
addChild(ball1);
ball2 = new Ball(20);
addChild(ball2);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
private function onEnterFrame(event:Event):void {
moveBall(ball0, mouseX, mouseY);
moveBall(ball1, ball0.x, ball0.y);
moveBall(ball2, ball1.x, ball1.y);
graphics.clear();
graphics.lineStyle(1);
graphics.moveTo(mouseX, mouseY);
graphics.lineTo(ball0.x, ball0.y);
graphics.lineTo(ball1.x, ball1.y);
graphics.lineTo(ball2.x, ball2.y);
private function moveBall(ball:Ball,
targetX:Number,
targetY:Number):void {
ball.vx += (targetX - ball.x) * spring;
ball.vy += (targetY - ball.y) * spring;
ball.vy += gravity;
ball.vx *= friction;
ball.vy *= friction;
ball.x += vx;
ball.y += vy;
thanks every body's help!ok, thanks for your reply ! I run this code in the Flex builder 3!and the Ball class and the Chain class are all in the same AS project!
and i changed the ball.pv property as public in the Ball class, and the Chain class has no wrong syntactic analysis,but the AS code don't run.so this is the problem.
2010-04-21
Fang
发件人: Ned Murphy <[email protected]>
发送时间: 2010-04-20 23:01
主 题: how can i run this code correctly?
收件人: fang alvin <[email protected]>
I don't see that the Ball class has a pv property, or that you even try to access a pv property in the Chain class. All of the properties in your Ball class are declared as private, so you probably cannot access them directly. They would need to be public. Also, I still don't see where you import Ball in the chain class such that it can use it. -
Can't Edit this Page ..already editing on another computer
So, I was Editing a Page and went to Publish it, but it
couldn't Connect, so I hiit Cancel.
I tried again to Edit the page, when up pops this message in
a Yellow Box.
"You Can't Edit this Page now because you are already editing
it on another computer. Please contact your webmaster "
[IMG]http://i11.photobucket.com/albums/a173/JoeWood_/Misc/Contrib.jpg[/IMG]
<a href="http://photobucket.com"
target="_blank"><img src="
http://i11.photobucket.com/albums/a173/JoeWood_/Misc/Contrib.jpg"
border="0" alt="Photobucket - Video and Image
Hosting"></a>
The problem is, I don't have a webmaster anymore, so, how can
I correct this so that I can Edit my Page again?? I have my
Contribute Key (I think) and probably have the password ..Go here:
http://www.adobe.com/support/documentation/en/contribute/
Download "Using and Administering Contribute" PDF and page
229 has your answer step by step. -
i m login in th my iphone in the itune ti download something after entering cc details its asking about something itune gift card secure code...i am not getting this..where can i get this code in order to dowanload frm itune...
Meen0902 wrote:
... after entering cc details its asking about something itune gift card secure code...i
Try the 3 or 4 digit code on the back of your Credit Card.... -
I forgot the codeslot of my ipod. How can I delete this code?
I forgot the codeslot of my ipod. How can I delete this code? Can anybody help help me? I'm sorry for the bad English.
Connect it to iTunes and Restore it.
-
How can i rewrite this code into java?
How can i rewrite this code into a java that has a return value?
this code is written in vb6
Private Function IsOdd(pintNumberIn) As Boolean
If (pintNumberIn Mod 2) = 0 Then
IsOdd = False
Else
IsOdd = True
End If
End Function
Private Sub cmdTryIt_Click()
Dim intNumIn As Integer
Dim blnNumIsOdd As Boolean
intNumIn = Val(InputBox("Enter a number:", "IsOdd Test"))
blnNumIsOdd = IsOdd(intNumIn)
If blnNumIsOdd Then
Print "The number that you entered is odd."
Else
Print "The number that you entered is not odd."
End If
End Sub873221 wrote:
I'm sorry I'am New to Java.Are you new to communication? You don't have to know anything at all about Java to know that "I have an error," doesn't say anything useful.
I'm just trying to get you to think about what your post actually says, and what others will take from it.
what does this error mean? what code should i replace and add? thanks for all response
C:\EvenOdd.java:31: isOdd(int) in EvenOdd cannot be applied to ()
isOdd()=true;
^
C:\EvenOdd.java:35: isOdd(int) in EvenOdd cannot be applied to ()
isOdd()=false;
^
2 errors
Telling you "what code to change it to" will not help you at all. You need to learn Java, read the error message, and think about what it says.
It's telling you exactly what is wrong. At line 31 of EvenOdd.java, you're calling isOdd(), with no arguments, but the isOdd() method requires an int argument. If you stop ant think about it, that should make perfect sense. How can you ask "is it odd?" without specifying what "it" is?
So what is this all about? Is this homework? You googled for even odd, found a solution in some other language, and now you're just trying to translate it to Java rather than actually learning Java well enough to simply write this trivial code yourself? -
i downloaded the whatsapp for my phone and i can't find this code i have to put in. Help!
My phone had the same problem with yours before.
Here is my solution.
Install a software that setup an android system to your computer
Inside the "an android system", install Whatsapp
run Whatsapp, input your phone number to get the code
At this time, your phone suppose to receive your code. -
I want to install WhatsApp on my iphone 16gb, but I need a code of 3 figures! Where can I get this code? i tried looking at my messages folder, but i havent got any 3 digit code. plz help
post in the iPhone forum : https://discussions.apple.com/community/iphone/using_iphone
-
I spelt my name wrong in my me email can I edit this?
I spelt my name wrong in my me email can I edit this?
No, but you can set up one or more aliases to use instead: http://support.apple.com/kb/HT4897
-
Can't Edit from Code View?
For some reason one of my components seems to have an empty "array" as it's called describing a *filter* that doesn't exist. In other words:
<s:filters>
</s:filters>
This is causing me to get on error when I try to compile. I can take it into flex, make the change, and then compile... but after I do that FC won't accept my exported fxp. Sooo...... I would love to just delete those two pointless lines of code... but for some reasons it's locked or... won't let me delete it.
Not sure why. :-/To be honest it could be a number of things. I've probably been making this too hard on myself, but I started with a swf, in Flash. Its primary purpose was to play an introduction upon entering the site. You can see this at garrettremes.com
I've since made changes in Catalyst but can no longer compile/export. I had started a project in catalyst before, but had to retrace my steps again and again which was very tedious, because I was playing with different options and bg swfs among other things. I decided to put that part on hold and work in Flash for a while.
What happened probably started with me importing the library from my other Catalyst project and that had god knows what in it, I lost track after a while since it renames things all the time it got to be confusing. After importing that library to my new Catalyst project I located the custom components I needed and tried to recreate some of the work I had done before.
The next step involves adding coverflow, and I remember seeing this done in Flex quite some time ago, so I figured it would be best to import into Flash Builder 4, and make the changes, and then go back to Catalyst to designate the navigation a bit better. Catalyst makes this part very easy, and I love it, but the whole process is not very streamline at all. Of course this is partially my fault, because I don't know any better way to do this. I don't know enough AS3 to do all Flash -- Catalyst seems to limit my options, and I only know enough with Flex Builder to follow tutorials and primarily work in the "Design" workspace.
Anyway -- as for the error, the first compile error I got was something to the effect of "duplicate symbol name." I don't know how to edit this property. I see there's a user designated id, and the id in the library, and apparently another id used by the program. Apparently there was a conflict. I was able to solve this by figuring out where 'rect0' was and deleting it and recreating it.
I suppose in my deleting it I caused the empty array. I compiled in Flex and it's as simple as deleting that line of code, but I don't know where the debug code is stored on my hard drive and I can't delete it in Catalyst so I'm at sort of an impasse. Not sure what to do.
I'm attaching whatever I can find that might be useful.
Flash Catalyst cannot run this project because of an error in the code.
To find the error, switch to the Code workspace and look in the Problems panel.
I did that and found that there was an empty tag in one of my components. Perhaps I should just delete that component and remake it? That would probably work....
**EDIT**
I know it's not ideal, but I solved this problem by just applying some filter so there wouldn't be an empty array, and then compiled... then I "un-applied" it and it seems that it properly removed it from code. I'm really not sure how this might have happened...
Maybe you are looking for
-
How to Setup the DR for SQL2008
Hi I want to setup the DR on SQL2008 . Following activities i have performed for the Active and stanby procedure. 1. Taken the Full backup 2. Restore it on the standy server in restoring mode 3. Configure the Transactional Log shipping for the active
-
"There is a problem with the Office database" - Microsoft Office 2008 issue
It was all going so well. I upgraded a MacBook to SL over the weekend. Everything was working well until yesterday (Wednesday) when, on opening Word I got the above message. The Database Utility reports 'an error occurred while trying to verify your
-
How can I download ios7 in my ipad
I would like to download ios7 in my ipad so please u help me to download ios7 I am really thankfull to u
-
I have an imac 24" and I was wanting to add a cinema 24' as an extra screen, problem is Id like to mount it in portrait format. I use adobe photoshop and would like to see the results for those portrait orientated images full size. Is there a solutio
-
Purchased ringtones not showing
Hi I bought an album of ringtones from iTunes however they will not show up as ringtones in either iTunes or my iPhone. So far a waste of $9! I hve looked everywhere and tried lots of stuff but to no avail. I even tried changing the extension from .m