15,890,043 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Misbah1 (Top 41 by date)
Misbah1
6-Sep-12 0:59am
View
I have implemented it but no output is displaying on page...
Misbah1
5-Sep-12 5:02am
View
Thanks a lot for your guide line :)...
Misbah1
3-Sep-12 0:43am
View
Thank you so much.. file is uploaded successfully :)
Thanks a lot... :)
Misbah1
1-Sep-12 8:51am
View
I have updated my question . please check it..
Misbah1
1-Sep-12 4:15am
View
Deleted
Thanks : )
I need to install pecl.. For that , first i have to run php/go-pear.bat file.. but when I run this file following error message displays on command line...
phar "C:\wamp\bin\php\php5.3.5\PEAR\go-pear.phar" does not have a signaturePHP Warning: require_once(phar://go-pear.phar/index.php>:failed to open stream: phar error: invalid url or non existent phar "phar://go-pear.phar/index.php" in C:\wamp\bin\php\php5.3.5\PEAR\go-pear.phar on line 1236
PHP stack trace;
PHP 1. {main}() C:\wamp\bin\php\php5.3.5\PEAR\go-pear.phar:0
Warning: require-once(phar://go-pear.phar/index.php):failed to open stream: phar error: invalid url or non-existent phar "phar://go-pear.phar/index.php" in C:\wamp\bin\php\php5.3.5\PEAR\go-pear.phar on line 1236
Call Stack:
0.0152 717336 1 . {main}() C:\wamp\bin\php\php5.3.5\PEAR\go-pear.phar:0
Misbah1
1-Sep-12 4:01am
View
php script is called displays messages,.. invalid file...
Misbah1
1-Sep-12 1:19am
View
I haven't give action attribute because both html and php code is written in the same file.
Misbah1
1-Sep-12 1:18am
View
The same code from same link i.e.; w3school , I used. both html and php code are written on the same file and the file is saved in 'www' folder of the wamp server. But dn't know what is the problem?
Misbah1
31-Aug-12 1:21am
View
The library is working fine... Thanks a lot for you assistance : )
Misbah1
30-Aug-12 8:32am
View
Deleted
this is the code...
getProperties()->setCreator("Maarten Balliauw");
$objPHPPowerPoint->getProperties()->setLastModifiedBy("Maarten Balliauw");
$objPHPPowerPoint->getProperties()->setTitle("Office 2007 PPTX Test Document");
$objPHPPowerPoint->getProperties()->setSubject("Office 2007 PPTX Test Document");
$objPHPPowerPoint->getProperties()->setDescription("Test document for Office 2007 PPTX, generated using PHP classes.");
$objPHPPowerPoint->getProperties()->setKeywords("office 2007 openxml php");
$objPHPPowerPoint->getProperties()->setCategory("Test result file");
// Remove first slide
echo date('H:i:s') . " Remove first slide\n";
$objPHPPowerPoint->removeSlideByIndex(0);
// Create templated slide
echo date('H:i:s') . " Create templated slide\n";
$currentSlide = createTemplatedSlide($objPHPPowerPoint); // local function
// Create a shape (text)
echo date('H:i:s') . " Create a shape (rich text)\n";
$shape = $currentSlide->createRichTextShape();
$shape->setHeight(200);
$shape->setWidth(600);
$shape->setOffsetX(10);
$shape->setOffsetY(400);
$shape->getAlignment()->setHorizontal( PHPPowerPoint_Style_Alignment::HORIZONTAL_LEFT );
$textRun = $shape->createTextRun('Introduction to');
$textRun->getFont()->setBold(true);
$textRun->getFont()->setSize(28);
$textRun->getFont()->setColor( new PHPPowerPoint_Style_Color( 'FFFFFFFF' ) );
$shape->createBreak();
$textRun = $shape->createTextRun('PHPPowerPoint');
$textRun->getFont()->setBold(true);
$textRun->getFont()->setSize(60);
$textRun->getFont()->setColor( new PHPPowerPoint_Style_Color( 'FFFFFFFF' ) );
// Create templated slide
echo date('H:i:s') . " Create templated slide\n";
$currentSlide = createTemplatedSlide($objPHPPowerPoint); // local function
// Create a shape (text)
echo date('H:i:s') . " Create a shape (rich text)\n";
$shape = $currentSlide->createRichTextShape();
$shape->setHeight(100);
$shape->setWidth(930);
$shape->setOffsetX(10);
$shape->setOffsetY(10);
$shape->getAlignment()->setHorizontal( PHPPowerPoint_Style_Alignment::HORIZONTAL_LEFT );
$textRun = $shape->createTextRun('What is PHPPowerPoint?');
$textRun->getFont()->setBold(true);
$textRun->getFont()->setSize(48);
$textRun->getFont()->setColor( new PHPPowerPoint_Style_Color( 'FFFFFFFF' ) );
// Create a shape (text)
echo date('H:i:s') . " Create a shape (rich text)\n";
$shape = $currentSlide->createRichTextShape();
$shape->setHeight(600);
$shape->setWidth(930);
$shape->setOffsetX(10);
$shape->setOffsetY(100);
$shape->getAlignment()->setHorizontal( PHPPowerPoint_Style_Alignment::HORIZONTAL_LEFT );
$textRun = $shape->createTextRun('- A class library');
$textRun->getFont()->setSize(36);
$textRun->getFont()->setColor( new PHPPowerPoint_Style_Color( 'FFFFFFFF' ) );
$shape->createBreak();
$textRun = $shape->createTextRun('- Written in PHP');
$textRun->getFont()->setSize(36);
$textRun->getFont()->setColor( new PHPPowerPoint_Style_Color( 'FFFFFFFF' ) );
$shape->createBreak();
$textRun = $shape->createTextRun('- Representing a presentation');
$textRun->getFont()->setSize(36);
$textRun->getFont()->setColor( new PHPPowerPoint_Style_Color( 'FFFFFFFF' ) );
$shape->createBreak();
$textRun = $shape->createTextRun('- Supports writing to different file formats');
$textRun->getFont()->setSize(36);
$textRun->getFont()->setColor( new PHPPowerPoint_Style_Color( 'FFFFFFFF' ) );
// Create templated slide
echo date('H:i:s') . " Create templated slide\n";
$currentSlide = createTemplatedSlide($objPHPPowerPoint);
Misbah1
30-Aug-12 8:30am
View
when I run a code using this library, it is displaying this output
12:27:03 Create new PHPPowerPoint object 12:27:03 Set properties 12:27:03 Remove first slide 12:27:03 Create templated slide 12:27:03 Create a shape (rich text) 12:27:03 Create templated slide 12:27:03 Create a shape (rich text) 12:27:03 Create a shape (rich text) 12:27:03 Create templated slide 12:27:03 Create a shape (rich text) 12:27:03 Create a shape (rich text) 12:27:03 Create templated slide 12:27:03 Create a shape (rich text) 12:27:03 Create a shape (rich text) 12:27:03 Create templated slide 12:27:03 Write to PowerPoint2007 format 12:27:04 Peak memory usage: 3 MB 12:27:04 Done writing file.
Misbah1
29-Aug-12 7:28am
View
Where do I have to start from this library... I don't find it... kindly help me where is the starting point??? as i have to build a slide show of .ppt file.. kindly guide me. thanks
Misbah1
29-Aug-12 6:11am
View
ok.. thanks : )
Misbah1
29-Aug-12 5:59am
View
thanks both extensions are enabled : ) Now I have started coding : )
Misbah1
29-Aug-12 5:23am
View
Could you please guide me about the requirements of this library... there are some guide lines installed with this library are how to use it... REQUIREMENTS ARE...The following requirements should be met prior to using PHPPowerPoint:
* PHP version 5.2 or higher
* PHP extension php_zip enabled
* PHP extension php_xml enabled
Could you please suggst me the technology
Misbah1
29-Aug-12 4:45am
View
Thanks.. Can I use WAMP server with EasyPHP?
Misbah1
29-Aug-12 4:33am
View
Do you know on which software I can use this library?
Misbah1
29-Aug-12 3:32am
View
Can i use this library with dreamviewer ?
Misbah1
29-Aug-12 2:29am
View
Do you know how to use PHPPowerPoint library in html code?
Misbah1
27-Aug-12 2:41am
View
I read it...
Mean, first we have to create new twitter application using this form. For this application I can give any web address e.g. http://abc.com etc . Am I getting right point? please guide me. thanks
Misbah1
27-Aug-12 1:11am
View
Thanks for guiding me. these links are so helpful... But I have one query that how do i register my application to twitter as it is in development phase?? what the web address I have to provide for registration of my application?
Misbah1
23-Aug-12 6:29am
View
done :) :) :)
Thanks a lot ...... it is moving on next page on button's click event...
Thank you so much :)
Misbah1
23-Aug-12 5:45am
View
Thanks...
I tried the codes which are mentioned in the solutions.. no error but No desired output.. on button's click event next page does not open .. dont know where am I missing the step..
I made a new class named SecondPage.java and new activity where i want to jump named activity_main.xml.
I put following code in manifest file within application tag...
< activity android:name=".SecondPage.class" />
In java file I put this piece of code
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.new1);
final Button button = (Button) findViewById(R.id.button1);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
if(v.getId()==R.id.button1)
{
Intent intent = new Intent(this, SecondPage.class);
startActivity(intent);
}
}
});
}
In SecondPage.java I put following code
public class SecondPage extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void onClick(DialogInterface arg0, int arg1) {
// TODO Auto-generated method stub
}
}
....................
Please guide me where i am wrong???
Misbah1
23-Aug-12 5:44am
View
Deleted
Thanks ...
I tried the codes which are mentioned in the solutions.. no error but No desired output.. on button's click event next page does not open .. dont know where am I missing the step..
I made a new class named SecondPage.java and new activity where i want to jump named activity_main.xml.
I put following code in manifest file within application tag...
< activity android:name=".SecondPage.class" />
In java file I put this piece of code
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.new1);
final Button button = (Button) findViewById(R.id.button1);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
if(v.getId()==R.id.button1)
{
Intent intent = new Intent(MainActivity.this, SecondPage.class);
startActivity(intent);
}
}
});
}
In SecondPage.java I put following code
public class SecondPage extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void onClick(DialogInterface arg0, int arg1) {
// TODO Auto-generated method stub
}
}
....................
Please guide me where i am wrong???
Misbah1
23-Aug-12 5:44am
View
Deleted
Thanks ...
I tried the codes which are mentioned in the solutions.. no error but No desired output.. on button's click event next page does not open .. dont know where am I missing the step..
I made a new class named SecondPage.java and new activity where i want to jump named activity_main.xml.
I put following code in manifest file within application tag...
< activity android:name=".SecondPage.class" />
In java file I put this piece of code
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.new1);
final Button button = (Button) findViewById(R.id.button1);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
if(v.getId()==R.id.button1)
{
Intent intent = new Intent(MainActivity.this, SecondPage.class);
startActivity(intent);
}
}
});
}
In SecondPage.java I put following code
public class SecondPage extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void onClick(DialogInterface arg0, int arg1) {
// TODO Auto-generated method stub
}
}
....................
Please guide me where i am wrong???
Misbah1
23-Aug-12 5:38am
View
Deleted
Thanks to all...
I tried the codes which are mentioned in the solutions.. no error but No desired output.. on button's click event next page does not open .. dont know where am I missing the step..
I made a new class named SecondPage.java and new activity where i want to jump named activity_main.xml.
I put following code in manifest file within application tag...
< activity android:name=".SecondPage.class" />
In java file I put this piece of code
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.new1);
final Button button = (Button) findViewById(R.id.button1);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
if(v.getId()==R.id.button1)
{
Intent intent = new Intent(MainActivity.this, SecondPage.class);
startActivity(intent);
}
}
});
}
In SecondPage.java I put following code
public class SecondPage extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void onClick(DialogInterface arg0, int arg1) {
// TODO Auto-generated method stub
}
}
....................
Please guide me where i am wrong???
Misbah1
18-Aug-12 6:51am
View
I wrote this piece of code in my project but there is an error:
The constructor Intent(new View.OnClickListener(){}, Class<newclass>) is undefined.
Suggestion to fix this error is:
Remove arguments...
Misbah1
17-Aug-12 11:37am
View
Is there any other method to connect to mysql from android eclips?
Misbah1
17-Aug-12 11:36am
View
I opened the LogCat but there is no message
Misbah1
17-Aug-12 2:32am
View
The output is the address of php file ..
e.g.
http://127.0.0.1/PAHMA.php
Misbah1
17-Aug-12 2:21am
View
///////////////////REMAINING CODE************
//parse json data
try{
JSONArray jArray = new JSONArray(result);
for(int i=0;i<jarray.length();i++){
jsonobject="" json_data="jArray.getJSONObject(i);
" log.i("log_tag","id:="" "+json_data.getint("userid")+
="" ",="" name:="" "+json_data.getstring("username")
="" );
="" get="" an="" output="" to="" the="" screen
="" returnstring="" +="\n\t" jarray.getjsonobject(i);=""
="" }
="" }catch(jsonexception="" e){
="" log.e("log_tag",="" "error="" parsing="" data="" "+e.tostring());
="" return="" returnstring;
="" a;
="" }
="" @override
="" public="" boolean="" oncreateoptionsmenu(menu="" menu)="" {
="" getmenuinflater().inflate(r.menu.activity_main,="" menu);
="" true;
="" }
}
=""
php="" file
=""
<?php=""
="" mysql_connect("localhost","root","");
="" mysql_select_db("mydb");
="" $q="mysql_query("SELECT" *="" from="" users");
="" while($e="mysql_fetch_assoc($q))
" $output[]="$e;
" print(json_encode($output));
="" mysql_close();
?="">
///////////////////////
this php file fetch data successfully in browser but does not in android application... I don't know the reason.
another question is: where do I put php file ?
I put php file in wamp/www .
Misbah1
17-Aug-12 2:12am
View
I am using wampserver and json code. There is no syntax error in my project but desired output does not display... I dont know the reason... following is the code...
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.Menu;
import android.widget.LinearLayout;
import android.widget.TextView;
public class MainActivity extends Activity {
TextView txt;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.new1);
LinearLayout rootLayout = new LinearLayout(getApplicationContext());
txt = new TextView(getApplicationContext());
rootLayout.addView(txt);
setContentView(rootLayout);
txt.setText("Connecting...");
txt.setText(getServerData(KEY_121));
}
public static final String KEY_121 = "http://127.0.0.1/PAHMA.php"; //i use my real ip here
private String getServerData(String returnString) {
InputStream is = null;
String result = "";
//the year data to send
ArrayList<namevaluepair> nameValuePairs = new ArrayList<namevaluepair>();
//http post
try{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(KEY_121);
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is = entity.getContent();
}catch(Exception e){
Log.e("log_tag", "Error in http connection "+e.toString());
}
//convert response to string
try{
BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
is.close();
result=sb.toString();
}catch(Exception e){
Log.e("log_tag", "Error converting result "+e.toString());
}
/////*********continue**************
Misbah1
2-Jul-12 8:39am
View
i am doing the project of image processing... i have to match one image to all stored images (in sql database).. i used the following piece of code to fetch images... the loop is iterating as per number of records in sql database... but the image which is stored first time in byte array does not change.. it is remaining same for the all loops of iterations... I have one option to solve the problem is after completing each iteration i release the memory of byte array... please guide me how i do this???
<pre><pre lang="c#">
con.Open();
SqlDataAdapter empadap1 = new SqlDataAdapter();
empadap1.SelectCommand = new SqlCommand("SELECT ImageF,Id FROM Table", con);
DataSet dset = new DataSet("dset");
empadap1.Fill(dset);
DataTable dtable;
dtable = dset.Tables[0];
//using filestream object write the column as bytes and store
// it as an image
FileStream FS1 = new FileStream("image.jpg", FileMode.Create);
foreach (DataRow dataRow in dset.Tables[0].Rows)
{
byte[] blob = (byte[])dataRow[0];
try
{
FS1.Write(blob, 0, blob.Length);
Bitmap pic = new Bitmap(FS1);
FS1.Close();
FS1 = null;
......
}
}
</pre></pre>
Misbah1
1-Jul-12 23:11pm
View
Using this method I have fetched images from sql database... but I am following a problem...
My requirement is to select all images not on the base of any condition like id of that record etc... because I am implementing image processing, I have to compare one image from all stored images...
This code successfully run when I mention the id of an image for comparision.. but it does not execute without giving condition...
the code which successfully executes is as given below...
SqlConnection con = new SqlConnection("Server = AAA-PC\\SQLEXPRESS; integrated security = true; database= systemdb");
con.Open();
SqlDataAdapter empadap1 = new SqlDataAdapter();
empadap1.SelectCommand = new SqlCommand("SELECT ImageF,Id FROM Table", con);
DataSet dset = new DataSet("dset");
empadap1.Fill(dset);
DataTable dtable;
dtable = dset.Tables[0];
//using filestream object write the column as bytes and store
// it as an image
FileStream FS1 = new FileStream("image.jpg", FileMode.Create);
foreach (DataRow dataRow in dtable.Rows)
{
string id= dataRow[1].ToString();
int id_int = Convert.ToInt32(id);
//without giving if condition .. code does not execute... :(
if (id_int == 42 )
{
byte[] blob = (byte[])dataRow[0];
//gives error on this statement
FS1.Write(blob, 0, blob.Length);
Bitmap pic = new Bitmap(FS1);
FS1.Close();
FS1 = null;
..........
}
Misbah1
1-Jul-12 12:00pm
View
I have done image processing.. thanks to all for helping :)
Misbah1
1-Jul-12 9:25am
View
THanks for your suggestions.. as the tutorials you shared are really very useful... these tutorials helped me to set objectives : )
Thanks !
Misbah1
1-Jul-12 3:54am
View
yes these links are so useful..
Misbah1
1-Jul-12 3:41am
View
Deleted
I want to convert Image<bgr,byte> variable to bitmap.. How I do this?
Misbah1
30-Jun-12 11:56am
View
Thanks a lot.. these links are very useful...
I have fetched images from sql database.. Now I have to compare images.. I searched many algorithms but all of them match pixel by pixel.. if anyone pixel does not match they return the result as False/mismatched... And the second problem is... if both images are even same but their size is different.. then these algorithms show the result as "Mismatch"...
Now I have two problems...
1. Resizing image
2. Is there any specified range that if ATLEAST how many number of pixels of both images match.. then we can conclude that images are same....
Please guide me...
Thanks in advance... !!!
Misbah1
28-Jun-12 12:32pm
View
I have to fetch images form sql database to match or compare... how I fetch the images for this purpose???
Misbah1
17-Jun-12 0:56am
View
I have to implement image processing in a web application (asp.net). i want to use opencv. How i use opencv in my web based application?
Show More