General :: How To Grab Data And Display Image

Nov 4, 2010

'I am attempting to grab roughly 40 pieces of data that is a combination of 0 and 1 flags from mysql. based off of the 0 or 1... either pictA or pictB will be displayed. How to evaluate my code? I believe the logic is incorrect.

PHP Code:
$status = 'mysql -u username -ppassword -h x.x.x.x -e 'SELECT help FROM table' database';
declare -A ARRAY
for ((i=1; i=$status; i++));
do
echo ${ARRAY[$(i)]}
done
if [${ARRAY[]} = 1];
then echo "<img src='pictA.gif'>";
else [${ARRAY[]} = 0];
echo "<img src='pictB.gif'>";
fi

View 4 Replies


ADVERTISEMENT

Programming :: Write Project To Grab UI Into A Image Bitmap?

Mar 28, 2011

The Project is for writing a generic program which extracts list of applications that is running on Unix, and for each application, determine if it has a corresponding graphical UI interface, is so, the program should be able to grab the UI into a image bitmap. The program should be able to run in any Unix UI framework, such as CDE, KDE, X, Motif, et al.

View 2 Replies View Related

Networking :: Grab Certain Data From Trace File?

Jul 28, 2010

Alright, I have a network trace file that I want to parse through.

The file looks like this:

+ 1.002 /NodeList/1/DeviceList/0/$ns3::PointToPointNetDevice/TxQueue/Enqueue ns3::PppHeader (Point-to-Point Protocol: IP (0x0021)) ns3::Ipv4Header (tos 0x0 ttl 62 id 0 protocol 6 offset 0 flags [none] length: 40 10.2.1.1 > 10.1.1.1) ns3::TcpHeader (49153 > 26 [ SYN ] Seq=0 Ack=0 Win=65535)
- 1.002 /NodeList/1/DeviceList/0/$ns3::PointToPointNetDevice/TxQueue/Dequeue ns3::PppHeader (Point-to-Point Protocol: IP (0x0021)) ns3::Ipv4Header (tos 0x0 ttl 62 id 0 protocol 6 offset 0 flags [none] length: 40 10.2.1.1 > 10.1.1.1) ns3::TcpHeader (49153 > 26 [ SYN ] Seq=0 Ack=0 Win=65535)

[Code]....

View 2 Replies View Related

Programming :: Grab Variables Specified In A Data File And Use Them In The Script?

Dec 23, 2010

I have a script which uses a Menu file (containing several different Menus). I start out with

Code:

Menu=Main

and grep my VRMenuData file for

Code:

$Menu:code:$txtring

where txtring contains the value entered from the keyboard, and cut that line for the code I want executed. So my data looks like:

Quote:

Main:code:1:declare Menu=Download
Main:code:2:soffice -calc VRSched.ods
Main:code:3:echo Load Refresh Menu here

My code acting on the data looks like:

Code:

`grep $Menu:code:$txtring VRMenuData | cut -d: -f4`

When I chose options 1 thru 3, that executes with no problem (Menu=Download does not work). The program sees into field four, but field four is not able to see outside itself. For instance:

Code:

Download:chan:
Download:pitm:1:echo $numpi. Return to Main Menu
Download:pitm:2:

[code]....

is used to generate a numbered list of channels. It could be four or 40. Whatever the number is, I want the next line to read, for example, 32. Return to Main Menu.

Code:

num

is the variable in the script I use to number the list of channels. The number following Download: pitm: is numpi, which should be added to num. How do I take

Code:

Download:pitm:1:echo $numpi. Return to Main Menu

from my VRMenuData file and generate

Code:

32. Return to Main Menu

Code:

$ declare -p Menu
declare -- Menu="Download"
$ declare -p numpi

[code]....

View 3 Replies View Related

Programming :: First Image Will Display On The Page, And When A User Puts Their Cursor Over It, Then It Will Load Image 2?

Nov 24, 2010

I have just exported 3 png files out of gimp for a html document I'm working on right now, and they are all almost the same, except I need each to load when the user does something. So the first image will display on the page, and when a user puts their cursor over it, then it will load image 2. When they press it, it loads image 3.

View 1 Replies View Related

General :: Display An Image Using C Code?

Jan 18, 2010

i want to display an image using c program on linux how it is done?

View 1 Replies View Related

General :: Display An Image Fullscreen In C?

Jan 22, 2011

which will show a png from GIMP on the screen in fullscreen mode. I was using GIMP and there is an option to save my image as an .h or .c file. I tried .h and it saves it as some kind of very large variable. I want to call this from my own C program and display it on the screen.

View 1 Replies View Related

General :: Cron Job - Display A Jpg Image File?

Jul 25, 2009

I am a windows user and am trying to display a jpg image file on linux every x hours.In Windows, if I were to perform the same task, I would just give out the path to schtasks.exe and it would open the image in the default viewer,is the case same with linux as well? Do I just execute:

crontab now + 1 hour abc.jpg ? The linux is OpenSuse or Debian I guess.

View 2 Replies View Related

General :: How To Create Disk Image Of Actual Data

Nov 15, 2010

Suppose I have a 80 GB hard disk (sda) with 4GB of contents. Using a dd to copy to a different disk

Code:
dd if=/dev/sda of=/dev/sdb
copies all the contents (including free space). So sdb also needs to be 80GB.

You will notice that in VMWare or VirtualBox disk images, it is possible to set the disk to use only the amount of space of actual data. So a 80GB virtualbox/vmware image with 4GB of contents will be 4GB.

Is it possible to do that with an actual hard disk (sda) image? I want to create an image of an actual hard disk, copy it to DVD and transport it (in mail) for restoration on another computer (having same hard disk).

View 6 Replies View Related

General :: Image Bigger Than Display - Wallpaper Change

Aug 31, 2011

I am looking for a tool that can resize images and display them on the root window of an X11 display at a specific coordinates. I can use display from iagemagick like so display -window root -geometry '-0-0' -resize '1920x1080>' IMG.png But cannot use it since it does not display on the right root window -- pseudo transparency in urxvt shows the wrong image as shown here. Ideally, I would like to resize any image bigger than my display. Does anyone know of a too that can do the following: Resize the image if it is bigger than some size (aka the display size). Set the images top appear at specific screen coordinates.

View 1 Replies View Related

General :: Konqueror Doesn't Display Image From Wget

Jan 20, 2010

I'm using this command: wget --convert-links -np --wait=20 --limit-rate=20K -m -k -p -U Mozilla -c [URL]

I can only use konqueror (asus eeepc 701) to completely view kneetest.html . The image taimoshan-front-qtr.jpg does not show, but if I right click and save, I can view the jpg. I was able to see this jpg earlier in the day, but not now. I've wget'd the site about 5 or 6 times in a day and sometimes I'll miss 2 images. I've also tried without the -U Mozilla option. BTW: Is there a way to get Mozilla to read files from wget?

View 6 Replies View Related

General :: Boot - Display A Static Image While Debian Is Booting Up?

Aug 19, 2011

I need to show a static image with the logo of our department while Debian boots. Is there any easy way or tool to do this? (Any parameter of the kernel maybe?) It doesn't have to be anything fancy (like a progress bar)... just a plain an simple image.

I've seen many bootsplash projects..but most of them are broken. I tried splashy (which is available on the repo), but by the time it loads, my system is already booted, so I don't really like it. note that I don't have any Xorg server installed.

View 1 Replies View Related

General :: Display Boot Splash Image On Embedded Device Using Fbsplash?

May 13, 2011

I'm working on a project to have our company logo image display on the screen during bootup. Our platform is an embedded Linux device running on a custom configured linux kernel 2.6.38.2. Our development distro is Ubuntu 10.04. I am currently trying to get fbsplash to work on our device with no luck so far.

View 1 Replies View Related

General :: Grab Audio From A Video Clip?

May 4, 2010

I'd like to take audio track from a video clip in FLV container and save it to something playable by portable music players. Are there any easy to use tools for that? I know how to do that using console tools (mplayer+lame/oggenc), but I'd like to get something clickable, preferably for GNOME.

View 3 Replies View Related

General :: Bash Scripting - Grab First And Last Number?

Jan 13, 2011

I'm trying to get an output of a file in numeric order. Basically I need the starting number and the ending number in sed this into anther file. The test2.lis file I'm just awk'ing for the first row and if its out of order put it in order so I can grab the first and last numbers. I'm sure I can do this all in an array. The first sed command gets rid of blank lines and outputs it to a file. Then I head and tail for the first and last number then I want to sed those numbers into a file that exsist.

[code]...

The error I get is:

sed: -e expression #1, char 24: unterminated `s' command.

View 13 Replies View Related

General :: How To Grab Tricky Fields In A String

Mar 28, 2010

I'm writing a script that picks out the time offset in a string, but am trying to figure out a way to print a field based on a match (likely needs to be regex).

Here are some sample fields:
09.900. Either add -12:-1: 0 to existing offset, or restart the slicer with no offset or with offset=00
09.900. Either add -12:-1:30 to existing offset, or restart the slicer with no offset or with offset=00
09.900. Either add -10: 0:-47 to existing offset, or restart the slicer with no offset or with offset=00

What I need would be "-12:-1: 0" from the first line, for example. I was just using "awk '{print $4}'" originally but because of the damn space in the 1st and 3rd lines by the 0, that doesn't work for me. How to grab those fields correctly for all cases?

View 3 Replies View Related

General :: Grab Line Based On String?

Aug 9, 2011

i have a file with a lot of lines in it, and iould like to grab just the line that contains a string i've specified in a variable... Let me know if you want a sample of the file.

View 3 Replies View Related

General :: Grab A Random Section In The Middle Of A Huge File?

Apr 23, 2011

I have a huge log file of around 3.5 GB and would like to sample random sections in the middle of say 10 MB for the purpose of debugging what my application is doing.

I could use head or tail commands to get the beginning or end of the file, how can I grab an arbitrary portion from the middle of the file? I guess I could do something like head -n 1.75GB | tail -n 10MB but that seems clumsy and I'd need to determine line numbers for the midpoint of the file to get 1.75GB and 10MB line counts.

View 2 Replies View Related

General :: Delete/grab A Line Which Matchs A Pattern Of A Particular Column Only?

Jan 18, 2010

I have found many information about how to delete/grab a line in a text file including delete line with match a pattern but I did not find info about how to delete a line which match a pattern of a particular column only.

for example mydata.txt:
id type x y z
1 6 0.474611 0.227223 0.583947

[code]....

View 6 Replies View Related

Ubuntu :: Accessing Data On Image Made From Dd?

Jul 15, 2010

I backed up my windows hard drive using dd and turned it into one huge image file. I didn't realize this beforehand, but this image is not an ISO equivalent type. However, it would be nice if I could access everything on the image just by mounting it instead of having to transfer it back to /dev/sda or something.

View 5 Replies View Related

Hardware :: Recovering Data From Disk Image

Jan 19, 2011

I have 2 RAID1 hard drives with possibly hardware errors, (when I tried to mount them in a degraded array, they won't start, throwing some Buffer I/O errors) So I used ddrescue to make a disk image out of one drive, ran losetup to use the image file as loopback device:

Code:
losetup /dev/loop0 imagefile.img

but when I tried to assemble a raid array including the /dev/loop0 device like:

Code:
mdadm --assemble /dev/md0 --force /dev/loop0

it will complain that no superblock is found on /dev/loop0 device. With desperation, I tried to create a legacy raid array with following command, of course, including one of the bad drives:

Code:
mdadm -B /dev/md0 --level=1 -n2 /dev/sdb1(bootable partition on the bad drive) /dev/loop0

I successfully created a new RAID1 array, but when I tried to mount it

[Code]....

Now the only thing I haven't tried is to clean the superblock by doing --zero-superblock, and not sure if that will solve the problem. Should I get a second drive to hold my broken drive image so that I might be able to assemble a good RAID1 array or should I continue working on the only disk image file I recovered from one of the broken drives?

View 5 Replies View Related

Software :: Inkscape Png To Svg Include Image Data?

May 16, 2011

I'm using inkscape to convert a file from png format to svg format which is working but I need the image included within the svg file. It is within a script, so no gui. Which option do I use to include the image data within the svg file

View 3 Replies View Related

Fedora :: Enable Image Display In E-mails?

Jun 5, 2010

I use Evolution Mail and Calendar to receive and send e-mails, but it cannot display images(links?) that are embeded in the incoming e-mails. How to solve this problem?

View 5 Replies View Related

OpenSUSE :: Can't Make Conky To Display Any Image

Jun 6, 2010

Recently I succesfully installed conky. I managed to get a lot of things work with more or less effort but I can't make conky to display any image.Images path and permissions had been checked. Imlib2 support too but conky won't display a thing.

View 4 Replies View Related

Programming :: GTK - Load Image Or Display In Window

Jan 11, 2010

I am trying to write a small gtk+-2 program to display whatever image it is given and I was wondering if anyone out there has done something similar. I am not too familiar with writing programs for gtk and its been a while since I've fiddled with C. I went over the tutorial for gtk and it seams pretty easy to get a window to display, but I do not see anything that refers to loading an image or displaying it in the window. I am wondering if this can be done purely with gtk or will I need to use some type of image library like imlib2?

View 3 Replies View Related

Software :: Combining Antivirus Data / Image Recovery?

Aug 9, 2010

I tried the Linux-based live CD's of the main Windows anti-virus vendors (Kaspersky, BitDefender, AVG, Avira). They work well, but they are single-purpose solutions while affected Windows users also need a solution to 1) pull data (or what's left of it) out of their contaminated Windows host onto a USB thumb drive or a remote host, and 2) restore a clean image using eg. CloneZilla. Asking users to burn and run three different CD's is not very user-friendly. Has someone already investigated combining those three features into a single live CD?

View 8 Replies View Related

Networking :: Change Desktop Image To Display All Of IP Address?

Feb 14, 2010

I have a script that will change my desktop image to display all of my network IP address. I need to call this script whenever a change in the network occurs. Example, if I disconnect from one network and then connect to another network and get a new IP address.

View 1 Replies View Related

Red Hat :: Copy Qt Created Image Into Frame Buffer And Display?

Mar 24, 2010

I am using redhat linux4 and qt4.6. I have created an application in qt, which i want to link to frame buffer using C programme and display it onto the xserver or/and on the hawkboard.

View 1 Replies View Related

General :: Mpu401_uart And Cmipci Error In Ubuntu - Unable To Grab Port 0x330

May 26, 2011

I recently installed ubuntu 10.10 replacing fedora 10. installation was successful but when I start Ubuntu, computer halts showing two line error [18.929065]mpu401_uart:unable to grab port 0x330 size 2 [18.929125]cmipci: no UART401 device at 0x330 Even reinstalling could not solve problem If this is related to audio then in Fedora 10 everything was working fine. But I could start Ubuntu selecting recovery mode with option 'single' then from recovery menu 'boot as normal', providing username and password and typing 'startx'. How can fix this error?

View 2 Replies View Related

Debian :: Mounting .iso Image Versus Extracting Data From .img File?

Feb 28, 2010

I use Lenny, and was trying to mount a .iso image, supposedly a cd imagem.

[code]....

This is what I get from dmesg | tail:

debian:/home/zac/cscd# dmesg | tail
[ 1811.505199] floppy0: disk absent or changed during operation
[ 1811.505207] end_request: I/O error, dev fd0, sector 0

[code]....

I did a little research on the web and it seems that this file is not really a cd image, but simply data in a .img file. What do you think of that?

debian:/home/zac/cscd# file cscd3.iso
cscd3.iso: data

Some people recommend to extract the data via the dd command, but it didn't seem very safe for me to do that!

[URL]

is it possible to extract the data into a directory (instead of a device) using dd? This file is supposed to be a software. I wanted to run it on wine by keeping it mounted on a mount point in my file system. Does it make any sense to try to do this if the file simply isn't a cd image?

View 6 Replies View Related







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