Programming :: Test App That Scans For Plugins In A Directory?

Aug 27, 2010

I wrote a test app that scans for plugins in a directory, calls their getWidget() method (implemented in my interface), and adds that widget to a layout.

The problem is that when I added a QTimer to my plugin class, it didn't work! Why?

And will it be easier to write the thing in Python and not use QPlugin? I just want to define a QWidget and have it added to the app.

View 8 Replies


ADVERTISEMENT

Programming :: How To Test Kate Plugins

Mar 20, 2011

I wanted to make some modifications to a Kate plugin, so I cloned the git repository, started doing a few changes, and it compiled. The problem is that when I run it, it uses the version of the plugin installed in the system, not the one compiled with Kate.

View 1 Replies View Related

Programming :: Wrote A Driver That Scans On Startup Dynamically For Available EEPROM's On A Certain IC Bus?

Jul 28, 2011

I wrote a driver that scans on startup dynamically for available EEPROM's on a certain IC bus. For each EEPROM a new character device is created in /dev like:

/dev/bus0eepromA0
/dev/bus0eepromA1
/dev/bus0eepromA2 ...

[code]....

View 1 Replies View Related

General :: Testing Home Directory Scripts By Setting $HOME To The Location Of The Test Directory

Apr 20, 2010

I have an interdependent collection of scripts in my ~/bin directory as well as a developed ~/.vim directory and some other libraries and such in other subdirectories. I've been versioning all of this using git, and have realized that it would be potentially very easy and useful to do development and testing of new and existing scripts, vim plugins, etc. using a cloned repo, and then pull the working code into my actual home directory with a merge.

The easiest way to do this would seem to be to just change & export $HOME, eg

cd ~/testing; git clone ~ home
export HOME=~/testing/home
cd ~
screen -S testing-home
# start vim, write/revise plugins, edit scripts, etc.
# test revisions

However since I've never tried this before I'm concerned that some programs, environment variables, etc., may end up using my actual home directory instead of the exported one. Is this a viable strategy? Are there just a few outliers that I should be careful about?

View 1 Replies View Related

Fedora :: Copy Libflashplayer.so To 64 Bit Browser Plugins Directory?

Mar 20, 2011

Trying to watch videos for the first time using Fedora 13 there was just a black screen where the video play button should be, both on Firefox and Google Chrome, and the message: ?You need to upgrade your Adobe Flash Player to watch this video?. So I downloaded Flash Player 10.0 for x86_64 from Adobe Labs. They advised: To install it, copy libflashplayer.so to your 64 bit browser plugins directory (such as /usr/lib64/browser-plugins/). How do I do this? I know how to sign in as root, but don?t know how to go to /usr/lib64/browser-plugins/, nor do I know how to ?copy libflashplayer.so to your 64 bit browser plugins directory?

View 14 Replies View Related

General :: Flag To Test Is Not Directory?

Mar 25, 2011

I found that this tests if a give filename is a directory or not:

Code:
-d "$FILENAME"

But what test for not a directory? I tried

Code:
-D "$FILENAME"

But this doesnt work?

View 1 Replies View Related

Programming :: Get Qt Plugins To Work?

Mar 21, 2011

I've tried many times to get Qt plugins to work, but I just couldn't figure it out. I've written a small test application, how to write a plugin for it?

View 14 Replies View Related

OpenSUSE :: Copy The Contents From /usr/lib64/browser-plugins To The Plugins Folder?

Jul 9, 2010

Download firefox 4 from Index of /pub/mozilla.org/firefox/nightly/latest-trunk Unpack with ark to your home directry folder firefoxIn the folder firefox creat a new folder pluginscopy the contents from /usr/lib64/browser-plugins to the plugins folderStart firefox and there you go

View 9 Replies View Related

Programming :: Make A Program That Supports Plugins?

Aug 18, 2010

Using PyQt4, is it possible to make a program where you can separately write custom QWidget subclasses and let the user add/remove them to your main app?

View 7 Replies View Related

Debian :: "test-tz" Directory Gives An Error - Directory "australasia" Doesn't Exist But "Australia" Does

Jul 31, 2010

I need to compile "/usr/share/zoneinfo/" to a directory in /home/dir/ so I can use it in a program to find and assign a time zone to users (example: UTC +3 or similar) and I need all available cities and town in it. it seems I should be able to do that with "zic" but what I found and tried does not work. I needed examples and I found the only info giving examples comes from: [URL]... Trying the 2 first lines verbatim after creating the "test-tz" directory gives an error that was to be expected although I use the distro used in the example, this is because the directory "australasia" does not exist but directory "Australia" does.

[code]...

I should be able to extract the info mentioned above is correct?

View 1 Replies View Related

Programming :: Codeblocks Plugins And Header Files Location?

Jan 29, 2010

I installed Codeblocks and build some programs, but I have two questions:1. Where are my header files placed, since I don't know where codeblocks is installed. Soemetimes I have to remove header file extension (.h) to be able to compile some source. I use gcc as setting for codeblocks to compile and build programs.2. Plugins for Codeblocks can be installed, but when browse codeblocks's wiki I can't find download links neither developer pages

View 3 Replies View Related

Programming :: Test If File Is In Use?

May 4, 2010

I want to copy files from an incoming directory, but don't want to copy a file if it hasn't finished being written. I thought of using fuser, but it doesn't seem to be very reliable. I vi'd a file in one window and then ran fuser against the file name and got nothing back. I'm just writing a simple bourne script on RHEL.

View 5 Replies View Related

Programming :: Test Program To Get The CPU Utilisation

Mar 9, 2010

I wrote a test program to get the CPU utilisation. I hope to extend it to take cpu utilisation on multi core machines. Hear I used the equation for taking cpu utilisation given at [url] of JmSchanck post. But when I match the output of my program against 'top' and 'system monitor' output it seems quite high. Sometimes cpu utilisation goes more than 100%.

So the given equation in that url is correct? can anyone give me the equation to take CPU utilisation?

Code:

View 3 Replies View Related

Programming :: How To Get Grep Output 0 - 1 And Test It

Apr 7, 2009

I am trying to use a shell script to find a string in a file and do something when found. code...

What should happen is pppd will start in a different process and stream it's output to pppdout. pppdout should be created in the current folder. Then the script should periodically check the pppdout file for the string Script (which eventually will appear, some seconds later) and when found exit the script. Ultimately the script will do something useful when the text is found. However, the output from the program is a repeating: 'scriptname.sh: 12: FOUND: not found'

Where scriptname.sh would be the name of your script and 12 refers to the line with 'done'.

Why does grep not find the text, or at least why deos my script not check the grep output correctly?

View 10 Replies View Related

Programming :: How To Test Whether A Macro Is Defined

Mar 20, 2011

I've been reviewing some source code recently which contains many conditional compilation statements, and I found it hard to understand the code not knowing whether some macro is defined or not. Is there any way to test whether a macro is defined?

View 2 Replies View Related

Programming :: Passing Input To Program For Test

Apr 13, 2011

I started to run a C++ my program in Linux and I don't know how to test my program that works fine with a text file. This is a project for my uni and to explain more clear, My program is a sample database for modify or add and search and it read data from a binary file and also write into a binary file. I have got an input from my lecture and she said after compiling in Linux I must write:

1-to compile:
Code:
g++ (files with cpp)
2-to see the output:
Code:
./a.out
3-to test with input:
Code:
./a.out < input.txt >

My problem is in step three. What I must write in the command part after" step2" to see the output?

View 3 Replies View Related

Programming :: How To Test Disown And Nohup Commands

Mar 20, 2010

I ran a perl script in background with nohup and disown to make sure my script runs even after the parent process is terminated.

Method 1: nohup
> nohup perl run.pl &
[1] 2080

Method 2: disown
> perl run.pl &
[2] 2448
> disown

In either method, the script process doesn't seem to connect to init process, when I checked using pstree command. I thought, the disown or nohup command detaches the process from its parent and attaches it to grand grand parent init process. And it disables SIGHUP signal to my script process. But the pstree command didn't show me what I expected. It still shows my script process attached to my current terminal process. I just don't understand the concept behind these two commands (nohup and disown). Is there any way, I can see the list of processes that are run by nohup or disown command?

View 2 Replies View Related

Programming :: Insert A Line In The Test File With Sed?

Jul 15, 2010

I have following file workers file: There are 800 entries like this.

# consensus/uat
worker.consensus-uat1.host=lonlx10409
worker.consensus-uat1.port=13702
worker.consensus-uat1.type=ajp13

[code]....

I want to insert one line just below the line starting with "woker.list". I think sed can do it but I am not aware.

View 14 Replies View Related

Programming :: Perl - Test If String Is Uppercase

Jan 6, 2010

In my perl script I'd like to test if a string is written in uppercase letters or not. How can I do that? This type of test don't seem to work, so there must be other ways of doing this:

Code:

...return true.

I can create a subroutine that compares each character aginst a list of uppercase letters, but I'm hoping there's allready a build in routine in perl that does this...

View 14 Replies View Related

Programming :: PHP - Ping Test In Shell / CMD Window

Mar 4, 2010

I'm trying to do the following. from a php webpage click on a link, that opens a shell/cmd and runs an open ping to the device. so it must actually open a shell (for linux) or cmd (for windows) and run a ping to the specified ip. Currently i'm running an exec command, but for this i need to wait for the result to be fetched and print it out. I want to monitor it in realtime, by just clickingon the button. How to get this working?

View 1 Replies View Related

Programming :: Script To Test If Program Is Running

Sep 22, 2010

I'm trying to test whether wget is working still or not. While [ wget is still running ] <----- but how should this look please?
do
codes
done

View 4 Replies View Related

Programming :: Python - Attempting To Test The Bin Function?

Jul 31, 2010

I am exploring the Python 3 standard library and am currently attempting to test the bin function. It converts an integer into a binary string. I believe the module I wrote is flawed somehow. Here's the source code:

Code:

#!/usr/bin/python3.1

#This module tests the bin() function.

import sys
def get_input():
x = input("Enter an integer: ")
def use_bin():

[code]....

As you can see, the binary form given is always 0b10111. I'm no expert on binary code (or hexadecimal notation), but surely 9000 and two would have different results?

EDIT: Added a line in the module to repeat back what integer the user entered, and then the binary form. It would appear that no matter what integer the user enters, Python thinks it's "23".

Example output:

Code:

>>>
Enter an integer: 1
You entered 23
The binary form of this integer is 0b10111
>>>

View 3 Replies View Related

Programming :: If Test Validation - Using Char Arrays

Jun 9, 2010

I'm writing a code to get the index of the last occurrence of a given substring in a string.

Code:
int StringHandler::lastIndexOf(string src, const string s) {
unsigned int lastIndex = string::npos;
if (src.find(s, 0) == string::npos) {
return -1; } else {
bool isLast = false; unsigned int i = 0; do {
lastIndex = src.find(s, i);
if (lastIndex != string::npos) { i = lastIndex + 1;
if (i == src.size()) { isLast = true;
} } else { isLast = true;
} } while (!isLast);
} return lastIndex;
}

My problem is: execution steps into an if with a false condition! Check the values of i and src.size() at the right panel. How could be possible for the program to run the highlighted statement? The if condition above is false! [URL]. I could use char arrays, for example, but this kind of false validation has happened to me more than once, I'm using G++ 4.5 with these flags: -O0 -g -Wall -c

View 3 Replies View Related

Programming :: Copy Files After Search In Array From This Directory To Another Directory?

Jan 3, 2009

After i try to find logfiles follow date/month/year. i want copy this files to another directory with name's directory is time you find(date/month/year).

View 4 Replies View Related

Programming :: Bash Script - Test Variable Against A Range?

Jan 28, 2010

I am fairly new to bash scripting, and I am trying to test a variable against a number range (1-3). This is what I have used so far: The user enters a value, then

while [ "$PROV" != "1" ] && [ "$PROV" != "2" ] && [ "$PROV" != "3" ] && [ $COUNTER -lt 4 ] || [ -z "$PROV" ] && [ $COUNTER -lt 4 ]; do
clear
echo

[code]....

Is there a cleaner way to do this? Something like:

while [ "$PROV" != "1-3" ]&& [ $COUNTER -lt 4 ] || [ -z "$PROV" ] && [ $COUNTER -lt 4 ]; do

View 3 Replies View Related

Programming :: Bash - Test If First 2 Characters In A Filename Are Numbers?

Oct 21, 2010

I have a directory with files like this:

Code:

And what I'd like is to have the files renamed like this:

Code:

How could I code it so that it removes the numerical part of the filename (at the beginning), even with different patterns (like the 01 - artist vs the 01-artist)?

View 8 Replies View Related

Programming :: Test New System Call Before Compiling Kernel?

Apr 2, 2009

I want to test my system call that be goint to add to kernel, But when i finish compiling kernel, i found my system call code not work. the code i want to return the system time "struct timespec":

/*----------Start of mycall.c----------*/
#include <linux/linkage.h>
#include <linux/time.h>
#include <linux/kernel.h>

[code]....

so i want a method to test the new system call before compiling kernel.

View 2 Replies View Related

Programming :: Do Not Miss Any Cases While Making The Test Case Doc?

Jul 28, 2010

Few months back I learnt a *few* concepts about bits/bytes and started writing a program for bit packing in C++. Now that program has grown upto 600 lines and I am still working on it. Yesterday I realized I missed some special cases due to which the program was malfunctioning. Now I have modified the program and it is working properly but I think If I would have designed all the possible test cases before writing the code, I would have finished the program long ago.

I. What is proper way to design the test cases before coding?

II. How should I make sure that I do not miss any cases while making the test case doc. ?

III. Does writing test cases prior to coding solve messy code issues or should I consider something else ?

View 8 Replies View Related

Programming :: Test Program Without Making A Copy Outside The Git Working Dir?

Jan 30, 2010

I was windering, if you are writing a C program, I don't think you are supposed to commit the .o files and executables. How can you test your program without making a copy outside the git working dir?

View 3 Replies View Related

Programming :: How To Configure And Use The Host To Boot A Test Kernel

Mar 8, 2011

I want to learning and developing the kernel on the practice(not kernel module). What are some ways to boot the test kernel on the same system(with stable kernel) where I`m building a test kernel for debugging purposes.

How to configure and use the host to boot a test kernel then I can boot the system(with stable kernel) and fix the test kernel.

View 8 Replies View Related







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