Programming :: Is PHP Suitable For File And Database Tasks?

Feb 20, 2011

According to Wikipedia's PHP page, PHP "is a general-purpose scripting language". Does that include being suitable for duplicate files detection? More specifically, the task is collating files from workstation backups into a single place, preserving directory paths and replacing duplicates with hard links. This will be a regular task on a lot of files so performance is important; our current proof-of-concept solution uses a PostgreSQL database of file "fingerprints" to speed duplicate detection. Does PHP have PostgreSQL integration?

I am asking these questions as a follow-up on an earlier thread asking for programming language recommendations for this task. Since then I have learned that PHP skills are available locally.

View 8 Replies


ADVERTISEMENT

Programming :: Unload File From A Database?

Jan 5, 2009

I am trying to unload file from a database. Which contains few lines with the character below. Rest of the data was unloaded appropriately.

Code:

a) What does this below character means?

b) How can i remove it,

I already have

Code:
sed '/^$/d'
c) Will this effect the file by any means (If I am guessing properly, this is the eof notation)

View 5 Replies View Related

Programming :: DataBase In Python - Compile .py Files Into A .exe File

Jun 20, 2011

i am new to python programing and i have a couple of ?'s

1- what would i do if i needed to find the closest, bigger number, from a list of numbers when the user types a number in.

2- (windows) i need a program that can compile .py files into a .exe file so that it works on a machine without python it also needs to work with python 3.2.

View 8 Replies View Related

Programming :: Translate Data From A CSV File To A MySQL Database?

Aug 26, 2010

I have a CSV called source1 with data like:

Date12:00:00 AM12:30:00 AM01:00:00 AM01:30:00 AM02:00:00 AM02:30:00 AM03:00:00 AM ...
07/31/1051.5252.4852.6452.863.3663.8445.6 ...
08/01/1049.4449.9261.2860.1652.6449.1247.52 ...
08/02/1049.1248.9648.9650.7260.1658.0851.04 ...
08/03/1060.3260.6459.260.9637.9233.2832.8 ...

[Code].....

Also, the CSV file is updates every few hours and I need to load any new data from the file to the database without creating duplicates of data that has already been loaded to the database.

View 6 Replies View Related

Programming :: Save Input From An Online Form To A File/database?

Jan 27, 2010

Browsing some websites I've found a code for online form where a user provides name, number, etc. Everything is created in html/javascript. I'm just wondering whether it's possible to collect this input and present it in a database form so that I'd be able to see who's provided data and all the details they entered.Actually, it doesn't have to be a proper database (it would probably require php/mysql). It could be a weekly/monthly report (a text file) of people who provided details. The website is hosted by a third party company.This is an html bit:

Code:
<body id="main_body" >
<img id="top" src="top.png" alt="">

[code]...

View 4 Replies View Related

Programming :: Make A C App Do Multiple Tasks Simultaneously?

Oct 22, 2010

I have been working on a project for a while now that involves a rather complex daemon that has to be simultaneously running different tasks. For example one of these tasks is to receive IP packets from the Netfilter queue and place those packets into one of several internal queues. While other tasks involve taking IP packets from those internal queues and processing/manipulating them and finally returning them back to the Linux network stack.

As I as I have no previous C experience before starting this project I just spawned a new thread each time I needed the daemon to be doing something else while those other tasks continued to run. Is there any other way of doing this or is this pretty much the only way of doing this? Because C is procedural I could not figure out any other way of doing accomplishing what I wanted. Should I have done it some other way or is this the correct and only way I could have gotten my C app to be running multiple tasks at the same time?

View 6 Replies View Related

Programming :: Running Many Tasks In Parallel / But More Clever Than 'make -j'?

Apr 29, 2011

I have a script which basically does many tasks and most of them can run in parallel. The server it runs on has 4 cores, so I changed parts of it to a makefile, and then run them with "make -j 4" which helps a lot. But looking at "top" while it runs, I see it could be improved. Sometimes tasks wait for other servers, so a higher -j value would help. And sometimes multiple tasks are waiting on the same disk, then I think a lower -j value would be better.

The kernel is fairly good at sharing CPU time among the cores, but resources like memory and disks are not shared very well. As an experiment, I tried compiling the kernel with "make -j" with no number. It didn't go very well.

So I wondered if anybody know of a better tool for things like this. I think it should be possible to write something that could change the -j value while it runs.For example:

- Start as many tasks in the background as there are cores. When tasks finish, start another one until done.
- After a little while, check CPU and memory usage to decide if more tasks could run in parallel. Or maybe less?
- If different tasks iowait a lot, check if they wait on the same disk. If so, renice/ionice/suspend some of them. In these situations I think it's better to have them run one after another.
- Other ideas?

I thought of making a script like that, but I doubt I'm the first one with that problem. Also, there are probably lots of things I haven't thought of.

View 5 Replies View Related

General :: Perform Some Tasks When New File Is Added In Folder

Feb 21, 2011

I have a folder named "logs" which contains log files. I would like to have a bash script or a cron job or something like this which will check the folder continuousy and perform some tasks (for example echo "New file is created") every time a new file with pattern like "Screen.log.***" is created in the folder "logs"
Is it possible in Linux?

View 14 Replies View Related

Programming :: What Database To Use For C++

Jan 27, 2010

What database can I use for c++?,this is my first week programming in c++.

View 14 Replies View Related

Programming :: Check If There Is Such A Value In The Database

Feb 10, 2010

sql statement. I am trying to check if there is such a value in the database.

Code:
string NewMovie = "ww";
string queryText ;
queryText = "Select * from movie_info WHERE movie_title = '"+ NewTitle +"'";
MYSQL *conn;
conn=mysql_init(NULL);
mysql_real_connect(conn,host,username,password,database,0,NULL,0);
[Code]......

return 0; The problem i am facing is how do i check if the value is found. I read up and found that a query will return a value of TRUE if the query is a success and a FAIL if there is an error. How do i call these values and then based the check on it?

View 1 Replies View Related

Programming :: Creating Database Using C Language

Apr 7, 2011

How to create a database using c language it includes structures, pointers, arrays and switch..

View 4 Replies View Related

Programming :: Ping Hosts From Database?

Apr 26, 2011

I have a php scriptI want it to ping list of ips from a databse(using fping) and based on the status of the values to put them in a field(status) into the database(0 if down,1 if up)i executed tghe script and it gives me this error:Thread 1 - 17:51:01 26-04-2011 4.2.2.2 alive Couldn't execute query.I cant see what 's wrongthis is the source of the php script:

<?php
require_once("conf.php");
$connection1 = mysql_connect($h, $u, $p) or die("Couldn't connect.");

[code]....

View 1 Replies View Related

Programming :: PHP & MySQL - Query A Database From The Web?

Apr 26, 2010

I have created a database which stores students grades for different stages of a project. One of the stages of the project is the specification part. I have a simple bit of html code which is going to be used as the searching facility. I want the user to be able to enter their ID and then it will display only their results. At the moment, it is displaying the results for EVERY student because I cant seem to find the correct syntax for my statement.

Heres the HTML code

<html>
<head>
</head>
<body>
<body bgcolor="#6881bb">
<center>

[Code]....

At the moment when i click the button, no matter what I enter every students marks appear on the screen.

I think, but obviously dont know for sure because if i did i would know how to solve the problem, the code that i need to change is in green.

View 3 Replies View Related

Programming :: Shorten The Long URL Without Using Database?

Aug 9, 2010

How to shorten the long URL without using database(i.e. without storing url entries in DB)?

View 2 Replies View Related

Programming :: Accessing A Sybase Database From PHP Running?

May 12, 2011

i get some trouble setting up good environment in linux.i have problem regarding connecting php(under linux) to a sybase server(under windows)is there anyway connecting this two technologies?.

View 1 Replies View Related

Programming :: Bash - Compare Directory To Database?

May 23, 2011

I have a (rather large) database of mp3 track information. I also have several directories of the actual mp3s. I'm trying to write a simple bash script that will check the contents of the directories against what's in the database, and upon finding a file that isn't in the database, do something.

Here's what I have so far:

Code:

The trouble I'm having (in the sample directory of "/mnt/music/B/Beatles, The/" the file "Beatles, The - Taxman.mp3" isn't in the database.) is getting it to actually trigger an error when an entry isn't in the database.

Once triggering on a non-entered file is working, any way to get it to traverse the entire /mnt/music hierarchy?

View 13 Replies View Related

Programming :: Convert Access Database To Mysql?

May 3, 2010

I'm trying to migrate my company server to linux, but i have a program that is designed in access what is the best way to move access tables to a mysql database so that i can program it in PHP?

View 3 Replies View Related

Programming :: Error Connecting To Oracle Database From PHP

Oct 12, 2010

I've just installed the Oracle Instant client using this: https://help.ubuntu.com/community/PHPOracle

The phpinfo() show me that oci8 is enable, but when I try to query that database I've got the following message:

PHP Code:

Code:

How to troubleshoot.

View 2 Replies View Related

Programming :: Store Pictures In A MySQL Database In PHP

Apr 29, 2010

How do I do this? I wish to store the pictures via a "Browse" button on the webpage, and later display them on a particular page on the site.

View 2 Replies View Related

Programming :: Getting Duplicate Entries In Mysql Database?

Apr 13, 2011

I'm getting duplicate entries in mysql database when submitting a new item from a form. I initially loaded the database via IMPORT function in phpMyAdmin. This is my input form:

<center>
<br />
<FONT SIZE="5" ><b>Add Item Template</b></FONT>
<br />

[code].....

However, I do need to return the input form in order to keep entering new items into the database.

View 8 Replies View Related

Programming :: Perl: How To Do A Foreach For Elements In A Database

Jul 15, 2009

For Perl I need to understand a few things. It's unlikely that anyone will be able to give me direct answers but if they could point outI'm trying to hack down an existing script http://eoylpac.org/source/eoy.pl. What I need to be able to do (in a nut shell):1. Open a database2. Read the values for each uniq id and execute a subroutine for each of those values. (The subroutine already exists in the above file 'do_pdf').

View 5 Replies View Related

Programming :: Show Images From A Database Result?

Jun 17, 2010

I was wondering if I can show an image on our php site if we store the path to it. For example if we get the result form my sql as:

images/example1.png and the handle the result as common html.

< img src="databaseresult" width="173" height="188" border="1" / >

is this possible? do you think theres a better way to do it?

we need to store the images locally we cant use a blob space on the table.

View 2 Replies View Related

Programming :: Social Networking Database Design

Sep 9, 2010

As I am Carrying out a project to Design Social Networking Databases, I need 5 tables for designing it.My frontend being php and backend being Mysql.I need to know what are the 5 tables I can have and how to implement them.

View 4 Replies View Related

Programming :: Insert Values Into A MySql Database?

Feb 9, 2010

I want to insert values into a MySql database. The following line works fine:1

Code:
mysql_query(connection, "INSERT INTO main (NumofShows , Title) VALUES('12', 'Home')");
but if the data to be inserted is from a string... like....
Code:
string NewTitle = "Monaco";
string NumofShows = "2";

How do i edit my sql statements so variables can be inserted into the Values ( ) , and it will be able to read the variables and then store it into the database.

View 4 Replies View Related

Programming :: Unix Script For Oracle Database?

Apr 7, 2011

creating the below unix script to run in oracle database .I need a script which should do the following things.

1. The script should insert row count of a table from one database(A) into table (AB) in another database(B).

2. The script should update tow count of the similar table and tablespace from database (B) in to a table AB.

3. The script should update the status column of the table AB as: 'Y' if the rowcount of the table@A and rowcount of the table@B matching. or else it should update 'N'

View 4 Replies View Related

Debian Programming :: HTML5 To Access MYSQL Database

Jul 24, 2013

I have a MySQL database running on my local server, which I currently access via laptop, desktop using HTML/PHP.I want to re-write in HTML5, I have gone through a couple of HTML5 tutorials but cannot figure out the database interface. The best match I can find is Server-Sent Events, is this the best way forward? What about writing to the database? I have found several suggestions using Web SQL database but I don't think this is suitable as my database is also accessed from Python code on the server.

View 5 Replies View Related

Programming :: Automating Data Entry Into MySQL Database?

Jul 19, 2010

I have set up a MySQL database which has only three fields for user-name, password and index number. But there is a LOT of data (thousands of columns) which would take too long to enter manually. I'm sure MySQL must have a file format whereby a single large file containing different data types can be successfully automatically imported and the various data elements distributed to their intended fields. Does anyone know which characters MySQL uses as field seperators for this formatting of data, or is there a program already written which can take raw data and organize it into a SQL compatible file?

View 8 Replies View Related

Programming :: Checking Database It Running Or Not By Using Shell Script?

Jul 21, 2011

1. i need to check whether the oracle database is running or not if it is running it will run auto mount script.nohup /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbfs_client dbfs@xxxxx -o allow_other,direct_io /u01/app/oracle/DBFS/XXXXX < /home/oracle/passwd_dbfs.txt&nohup /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbfs_client dbfs@xxxxxx -o allow_other,direct_io /u01/app/oracle/DBFS/XXXXX < /home/oracle/passwd_dbfs.txt &2. For every 1 hour i need to check above mount points is mounted or not if it is not mounted it should be mounted.

View 3 Replies View Related

Programming :: Connecting To Remote Oracle Database Using Perl?

Jan 27, 2010

How to connect to remote oracle database using perl?

This is what I tried.

Code:

But I am unable to connect.

View 4 Replies View Related

Programming :: Database - Efficiency - Organising Data For Speed

Apr 13, 2011

I have a need of a database, and the information to go into it. I know how I want to organise my data for optimal cross referencing, but what I know is merely what I know and I do not know if what I know is what is known...

Madness to say... looking at my database I see this is the best way to organise the data, but what I do not know is how the computer will respond to my methodical madness.

Is it quicker to have one table with many fields or many tables with few fields?

We've got information for 10 users with 17 idiosyncrasies.

So, would one table with 17 columns and 10 rows... or... a group of 50 tables with one column and 3 rows and one table with 4 columns and 5 rows...

Be more efficient concerning:

QUERIES...?
Searching?
Comparison?
Insertion?
Deletion?
Modification?

The queries and modifications will be daily, and constant. These numbers are really much larger but the math is easier for me to articulate on a smaller scale. I use Perl, php, and C with SQL for management.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved