Programming :: Link Objects In Separate Directories Using KDevelop?
Oct 4, 2010
Using: Open SUSE 11.0 64 bit, KDE 3.5.9 (release 49) and KDevelop 3.5.1. Problem: A singleton was created in subproject A, and so an object file is created in subproject A. In subproject B, I want to use that object file. We have not been able to find a way to link that object file created in subproject A with subproject B. Also, the subprojects are in different directories. We created a symbolic link to the ".h" and ".cpp" files in directory A. And the project compiles and links just fine after adding the symbolic link to the header and cpp files in subproject B. My concern is, that two objects of that singleton will be created. The whole idea of making a singleton is so that there is only one instance at a time.
In the ordering of files I keep I need links to directories. Sometimes I even need to move directories to new locations. I have tried using symlinks, but they become dead when I move the directory they point to. I have tried hard links, but I haven't found any Linux file system that would support hard linked directories. How can I achieve that a complex structure of directories (currently with symlinks for directories and hard links for files) keep symlinks live when directories are moved?
- is there any utility that updates symlinks when a directory is moved?
- is there any Linux filesystem that supports hard linked directories?
- is there any good Linux interface to the new NTFS (the only file system I know to support automatically updating directory links, called directory junctions)?
Currently, I am trying to use the Kdevelop4 in linux debian to make some debugging on a simple project. I added the <db.h> in the text editor and it is working. Unfortunately, when I am trying to build an "undefined reference to db_create error". So how to cope such error and where I have to add the searchable link libraries in Kdevelop4.
I have KDevelop installed it tells me i dont have cmake so i installed one now when i created my project, it says it doesnt find the included Qt libraries i wonder if there is a pattern to install all KDevelop and Qt stuff? I am using openSUSE11.4 KDE isnt KDE built on Qt? how come there is no Qt libraries onboard?
Where can I install grub? I know it can be installed to the mbr of a hard drive. I also know it can be installed to a /boot partition. Can I install it to a lvm partition? Does it have to be /boot? grub-install --root-directory=/boot /dev/hda Does this command install grub to a partition and link it to a separate /boot? I have fedora, but this is a live cd. I need to learn where I can install grub2 to boot
Compiz settings, my entire GUI would freeze up after the startup splash. It did the little ubuntu jingle and so on but wouldn't actually load up the desktop. I would've booted into recovery mode and deleted the settings that were messing it all up for me, but pressing ESC during grub did nothing! So as a last effort I reinstalled Ubuntu (Karmic) from the live CD on the first partition only, but I don't know how to make the second partition (with my old /home directory) the normal /home directory. The instructions linked above seem to require having done the whole process of moving the partition (so as to create "old" and "new" dirs, etc.).
So there are really two problems here: 1) How does one restore things to normal when a few too many cheeky moves with the desktop effects turns everything to pot? And 2) How does one reinstall Ubuntu with a separate /home partitions
I have a netbook with limited storage. 8GB internal and a 16GB SD card. Right now I have Ubuntu installed on the 8GB internal storage with a few directories mounted on the 16GB SD card. (/usr and /usr/local). This has worked out fairly well for me as having the entire installation on just the 8GB drive was too limiting. When I tried this I didn't know how big to make the partitions I was mounting in. These partitions are 7.06GB for the root (on internal storage) 2.8GB for /usr/local and another 2.8GB for /usr (both 2.8GB partitions are on the 16GB SD with the extra space being media storage for me). It seems I didn't make these partitions big enough because I can no longer perform updates. I'd like to redo all of this from scratch. how would you recommend I partition this next time around? Do I need individual partitions for the separate mount points that aren't root? Are those the directories I should be mounting on the SD card?
I have it so that an Env object contains all the variables in the current scope, and the parent scope. You can also save them to variables like objects, and my idea is to use the "." operator to get values from them.
First, how do I assign to them? I currently have it that only a variable name can be assigned to, but you should be able to assign to an "obj.value" expression, too. How do I keep track of what variable to set and still be able to say it in an expression and have it evaluate to the variable?
Second, these object don't really have a "type", they're just containers that contain any values you want under any name you want. How can I, for example, define a primitive "boolean" object and have things like if statements recognize it?
I have a question about shared objects and when mapping and linking is established in the following code...Well more of a verification.
getsetx.c - shared object source code Code: unsigned long x = 0;
unsigned long getx(void) { return x; } [Code].....
Now its my understanding when I execute ./testit, getsetx.so will get mapped into its address space at start up and testit will link any functions as they are needed..
I have two classes, for argument's sake A and B. A implements the core functionality, B is an encapsulated data structure. If you imagine this situation [code]...
From within B's member functions, I would like to access the public function() in class A. This is not an inheritance issue, they are two discrete classes with radically different functionality. Class A makes an object of B.
I am trying to make a hash of objects in perl (long story.) I have a package containing the main hash and all the subroutines necessary to work with it. My "new" subroutine used to add an object to the hash goes like this:
Code: #!/usr/bin/python # -*- coding: iso-8859-1 -*- import re # @description "This is a describing text about the file currently documentet"; #DocC documentation prototype
The goal is to auto-update a webpage that contains links to network devices. These devices are all set to DHCP, and their hostnames are not guaranteed to stay the same, so static IPs or accessing via hostname is NOT an option.
Process: Run a script every hour or so to query devices on the local network to generate a list of responding devices by MAC address and what their current IP is (results.lst). Using a "static" MAC address list file "printers.db" as the database search "results.lst" to find specific MAC addresses. When a match is found, grab the IP from "results.lst" and update "index.html" with the new IP address. No comparison needs to be done between "results.lst" IP and "index.html" IP as I just want to overwrite whatever is there.
Here is what I have so far (using dummy data): PRINTERS.DBProduct Mac Address Printer1 00:00:00:00:00:11 Printer2 00:00:00:00:11:11 Printer3 00:00:00:11:11:11 Printer4 00:00:11:11:11:11 Printer5 00:11:11:11:11:11 Printer6 11:11:11:11:11:11 TEST.SH
Code:
#!/bin/sh #------------------------------ # Quick Links Updater v2.0 | # By Rob M. | # with help from Tim F. | #------------------------------
I read this guide: [URL].. but I still don't understand how to make objects created with new garbage-collected. Could someone explain how or find a link to an explanation?
I have created an object where I pass a string and a long value to it <in Java>, currently I am adding the values to my Object so I can then add it to a list like so:
Code:
List myList; ImageObject io; for(i = 0; i < 10; i++)
[code]....
This is what the object currently looks like:
Code:
public final class ImageObject<name, time> { public String name = ""; public long time = 0;
does the assignment operator copy all the members also for structures containing STL objects strings,vectors,vectors of vectors...)? I did try it on my platform,and it works that way (copying all the fields),but i was wondering if it is a standard behavior or not.
I feel there's a bit of a misunderstanding going on between C++ and me...My problem is that I have a deque of pointers to a class, and create objects then add them to the deque in a for loop. However, the destructor is called on the object as soon as the loop quits.
Code:
This prints:
Code:
Now, if I change the deque from deque<Test*> to deque<Test> then it works fine - I get:
Code:
However, I can't do this with my actual code, because I am creating a deque of pointers to an abstract class, so it won't let me instantiate the class. (This is all so that I can take advantage of polymorphism, and call functions on a set of similar objects without worrying what type of object I'm dealing with).
So, I suppose my question is: what is the correct way to create that deque of pointers to the abstract class? I don't seem to be barking up the right tree currently.
I want to create a "Shared Memory" in linux, then create multiple "Shared Objects" that can access to a Table for example; And one of them can write something into the Table and the other can access and read it, so that these operations can be handled by programmer! I'm using Ubuntu 9.04 and I've set it's runlevel at 3 (I have commandline environment now!) I've searched the Internet so much, but couldn't find a good sample code for this! I have no experience about it and need your help to introduce me a sample code about it and advise me how to compile and use it with "GCC"?!
I have a file that contains a couple of email addresses and I want to extract the usernames ( Letters before @ symbol ). How can I do that using sed/awk.
I know cut will work, but the current environment doesn't allow me to use cut command. I can use either awk or sed.
I have a folder named Pictures that contains a bunch of .jpg files. My problem is that they all have randomly numbered names, then there is a duplicate of the file that is random numbers then the letter a right before the .jpg.for example, there would be 123.jpg and 123a.jpg, where 123a.jpg is just a resized version of 123. What i'd like to do but have NO clue how to, is to have a script or something go through my Pictures folder, then copy the ones that end in a.jpg to a folder called Resized, and ones that dont have that to a folder called Originals. That way my Pictures folder will be in tact, and i'll have copies of them all separated out.I have to do this all through the CLI on a machine, maybe I dont even need a script and can just do it with a slick command?
The goal is to auto-update a webpage that contains links to network devices. These devices are all set to DHCP, and their hostnames are not guaranteed to stay the same, so static IPs or accessing via hostname is NOT an option.
Process: Run a script every hour or so to query devices on the local network to generate a list of responding devices by MAC address and what their current IP is (results.lst). Using a "static" MAC address list file "printers.db" as the database search "results.lst" to find specific MAC addresses. When a match is found, grab the IP from "results.lst" and update "index.html" with the new IP address. No comparison needs to be done between "results.lst" IP and "index.html" IP as I just want to overwrite whatever is there.
Here is what I have so far (using dummy data): PRINTERS.DBProduct Mac Address Printer1 00:00:00:00:00:11 Printer2 00:00:00:00:11:11 Printer3 00:00:00:11:11:11 Printer4 00:00:11:11:11:11 Printer5 00:11:11:11:11:11 Printer6 11:11:11:11:11:11 [Code]....
I'm trying to do something here:: I'm writing a bash script, I want to [open a new terminal and run a bash command in it] inside the script. I tried to use this, but apparently I get syntax errors.
I ran GDB on a program and am receiving following errors, Code: anisha@linux-uitj:~/junk> g++ -g jk.cpp anisha@linux-uitj:~/junk> gdb a.out GNU gdb (GDB) SUSE (6.8.91.20090930-2.4) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later [URL] This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-suse-linux". For bug reporting instructions, please see: [URL] ... Reading symbols from /home/anisha/junk/a.out...done. (gdb) b readline Breakpoint 1 at 0x400b90: file jk.cpp, line 19. (gdb) r Starting program: /home/anisha/junk/a.out Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2 Try: zypper install -C "debuginfo(build-id)=591af1afa33f255704fb6a60859b93d00e205302" Missing separate debuginfo for /usr/lib64/libstdc++.so.6 Try: zypper install -C "debuginfo(build-id)=62220ad5c8941afb5d332c0c47d32f8beec8ac50" Missing separate debuginfo for /lib64/libm.so.6 Try: zypper install -C "debuginfo(build-id)=57fc1891d8d9f419fb8c7fc06a8285563b53a47e" Missing separate debuginfo for /lib64/libgcc_s.so.1 Try: zypper install -C "debuginfo(build-id)=0206e11fa8ca0db0633073adcbf1349a7871e1dc" Missing separate debuginfo for /lib64/libc.so.6 Try: zypper install -C "debuginfo(build-id)=c5a3dfd66bf61fcdec9bc22153b2fbd0d6697960" can't open input file (null) Program exited with code 01. (gdb)
Now I would like to create a third file which contains only those packages which are present in package-a.txt but NOT in package-b.txt. The file should look like this:
Code:
package2 package4
Note: The world "install" is also to be removed for all packages. Using diff command I could get something like this:
I have a problem with snmp answers being empty or having spaces.
What I already have:
#get all interface indexes (if you wonder - I'm working for a cable company and different cablemodems have different number and types of interfaces):
The problem is the physical address which is sometimes empty and the description which has spaces. So I'm doing 2 snmpgets which is slower than 1 snmpget (sometimes I have up to 18 interfaces).
I'm trying to explain it a bit simpler.
Interface 5 gives me back the following lines:
Ethernet CPE Interface
Now the first line should go into variable ifadm, 2nd line should go into variable ifoper, 3rd line should go into variable ifspeed, 4th line should go into variable iftype, 5th line (which is empty) should go into variable ifphys and finally 6th line (which has spaces) should go into variable ifdescr