Search Results

Search found 9366 results on 375 pages for 'common lisp'.

Page 68/375 | < Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >

  • Installing LBP 2900 printer -> libs folders wrong?

    - by Peter Smit
    I am trying to get my Canon LBP2900 printer to work on Ubuntu 11.10 64 bit. What I have done is try to follow the steps on https://help.ubuntu.com/community/CanonCaptDrv190 So I downloaded the version 2.3 driver and tried to convert the rpm files to debian and installed them sudo alien cndrvcups-capt-2.30-1.x86_64.rpm cndrvcups-common-2.30-1.x86_64.rpm sudo dpkg -i cndrvcups-capt-2.30-1.x86_64.deb cndrvcups-common-2.30-1.x86_64.deb restarted cups and try to install the printer with lpadmin: sudo service cups restart sudo /usr/sbin/lpadmin -p LBP2900 -m /usr/share/cups/model/CNCUPSLBP2900CAPTK.ppd -v ccp://localhost:59787 -E What I noticed however that on the step with lpadmin it goes wrong with the error: lpadmin: Bad device-uri scheme "ccp" After trying to trace what has gone wrong, I think I nailed it to the fact that dpkg installed a file /usr/lib64/cups/backend/ccp instead of /usr/lib/cups/backend/ccp Checking the original rpm with archive manager shows indeed that /usr/lib and /usr/lib64 are used, with the backend/cpp file only installed in lib64. As I understand correctly, Ubuntu 11.10 uses /usr/lib32 and /usr/lib instead so the files are installed in the wrong place. Is there an automated method of converting the rpm/deb files with the wrong lib structure to one with the right lib structure for ubuntu 11.10? Or am I completely on the wrong track for getting my printer installed?

    Read the article

  • What is a Data Warehouse?

    Typically Data Warehouses are considered to be non-volatile in comparison to traditional databasesdue to the fact that data within the warehouse does not change that often.  In addition, Data Warehouses typically represent data through the use of Multidimensional Conceptual Views that allow data to be extracted based on the view and the current position within the view. Common Data Warehouse Traits Relatively Non-volatile Data Supports Data Extraction and Analysis Optimized for Data Retrieval and Analysis Multidimensional Views of Data Flexible Reporting Multi User Support Generic Dimensionality Transparent Accessible Unlimited Dimensions of Data Unlimited Aggregation levels of Data Normally, Data Warehouses are much larger then there traditional database counterparts due to the fact that they store the basis data along with derived data via Multidimensional Conceptual Views. As companies store larger and larger amounts of data, they will need a way to effectively and accurately extract analysis information that can be used to aide in formulating current and future business decisions. This process can be done currently through data mining within a Data Warehouse. Data Warehouses provide access to data derived through complex analysis, knowledge discovery and decision making. Secondly, they support the demands for high performance in regards to analyzing an organization’s existing and current data. Data Warehouses provide support for an organization’s data and acquired business knowledge.  Within a Data Warehouse multiple types of operations/sub systems are supported. Common Data Warehouse Sub Systems Online Analytical Processing (OLAP) Decision –Support Systems (DSS) Online Transaction Processing (OLTP)

    Read the article

  • OSB and Ubuntu 10.04 - Too Many Open Files

    - by jeff.x.davies
    When installing the latest Oracle Service Bus (11gR1PS3) onto my Ubuntu 10.04 system, the Eclipse IDE was complaining about there being too many open files. The Oracle Service Bus and the Oracle Enterprise Pack for Eclipse (aka OEPE) do make use of ALOT of files. By default, Ubuntu will restrict each user to 1024 open files. A much more realistic number for OSB development is 4096. Changing the file limit in Ubuntu is fairly simple (if arcane). You will need to modify two different files and then restart your server. First, you need to modify the limits.conf file as the root user. Open a terminal window and enter the following command: sudo gedit /etc/security/limits.conf Add the following 2 lines to the file. The asterisk simply means that the rule will apply to all users. * soft nofile 4096 * hard nofile 4096 Save your changes and close gedit. The second file to change is the common-session file. Use the following command: sudo gedit /etc/pam.d/common-session Add the following line: session required pam_limits.so Save the file and exit gedit. Restart your machine. You shouldn't have any more problems with too many open files anymore.

    Read the article

  • Top Fusion Apps User Experience Guidelines & Patterns That Every Apps Developer Should Know About

    - by ultan o'broin
    We've announced the availability of the Oracle Fusion Applications user experience design patterns. Developers can get going on these using the Design Filter Tool (or DeFT) to select the best pattern for their context of use. As you drill into the patterns you will discover more guidelines from the Applications User Experience team and some from the Rich Client User Interface team too that are also leveraged in Fusion Apps. All are based on the Oracle Application Development Framework components. To accelerate your Fusion apps development and tailoring, here's some inside insight into the really important patterns and guidelines that every apps developer needs to know about. They start at a broad Fusion Apps information architecture level and then become more granular at the page and task level. Information Architecture: These guidelines explain how the UI of an Oracle Fusion application is constructed. This enables you to understand where the changes that you want to make fit into the oveall application's information architecture. Begin with the UI Shell and Navigation guidelines, and then move onto page-level design using the Work Areas and Dashboards guidelines. UI Shell Guideline Navigation Guideline Introduction to Work Areas Guideline Dashboards Guideline Page Content: These patterns and guidelines cover the most common interactions used to complete tasks productively, beginning with the core interactions common across all pages, and then moving onto task-specific ones. Core Across All Pages Icons Guideline Page Actions Guideline Save Model Guideline Messages Pattern Set Embedded Help Pattern Set Task Dependent Add Existing Object Pattern Set Browse Pattern Set Create Pattern Set Detail on Demand Pattern Set Editing Objects Pattern Set Guided Processes Pattern Set Hierarchies Pattern Set Information Entry Forms Pattern Set Record Navigation Pattern Set Transactional Search and Results Pattern Group Now, armed with all this great insider information, get developing some great-looking, highly usable apps! Let me know in the comments how things go!

    Read the article

  • Trying to migrate Windows 7 install of Adobe CS5 to Ubuntu 12.04 with Wine - 'Internal errors - invalid paramters received"

    - by Don
    I have Adobe CS5 installed and running on the Windows 7 side of my machine. Since I'd hate to boot up into Windows just to use Photoshop, I'm trying to get it in Ubuntu 12.04. Tutorials I found suggested that the easiest way to have it in Ubuntu was to install Wine, and copy my Windows installation over. Here are the exact steps I've done up to this point. From Windows, exported the registry key for HKEY_LOCAL_MACHINE SOFTWARE Adobe to the desktop. Changed to Ubuntu, downloaded Wine from Software Center Terminal: $ sudo apt-get install wine ttf-mscorefonts-installer $ winecfg $ wget http://www.kegel.com/wine/winetricks $ sh winetricks msxml6 gdiplus gecko vcrun2005sp1 vcrun2008 msxml3 atmlib Moved registry export to home folder. Copied "Program Files (x86)\Adobe" to "~/.wine/drive_c/Program Files (x86)/Adobe" "Program Files (x86)\Common Files\Adobe" to "~/.wine/drive_c/Program Files (x86)/Common Files/Adobe" "Documents and Settings\Don\Application Data\Adobe" to "~/.wine/drive_c/users/don/Application Data/Adobe" "Windows\System32\odbcint.dll" to "~/.wine/drive_c/windows/system32/odbcint.dll" ,and lastly "Windows\System32\odbc32.dll" to "~/.wine/drive_c/windows/system32/odbc32.dll". From Terminal, $ wine regedit adobe.reg. Right clicked on Photoshop.exe and selected "Open with Wine". Got the message "Wine Program Crash, Internal errors - invalid parameters received." So to restate my question, How can I get Photoshop running in Ubuntu 12.04? I'm not sold on doing it in this specific way, I just want to use Photoshop without having to reboot. What's the best way to make this happen? Edit: I do not have the installation CD, no.

    Read the article

  • Avoiding Object Oriented Pitfalls, Migrating from C, What Worked for You?

    - by Stephen
    I've been programming in procedural languages for quite some time now, and my first reaction to a problem is to start breaking it down into tasks to perform rather than to consider the different entities (objects) that exist and their relationships. I have had a university course in OOP, and understand the fundamentals of encapsulation, data abstraction, polymorphism, modularity and inheritance. I read Learning to think in the Object Oriented Way and Learning object oriented thinking, and will be looking at some of the books pointed to in those answers. I think that several of my medium to large sized projects will benefit from effective use of OOP but as a novice I would like to avoid time consuming, common errors. Based on your experiences, what are these pitfalls and what are reasonable ways around them? If you could explain why they are pitfalls, and how your suggestion is effective in addressing the issue it'd be appreciated. I'm thinking along the lines of something like "Is it common to have a fair number of observer and modifier methods and use private variables or are there techniques for consolidating/reducing them?" I'm not worried about using C++ as a pure OO language, if there are good reasons to mix methods. (Reminiscent of the reasons to use GOTOs, albeit sparingly.) Thank you!

    Read the article

  • Vector with Constant-Time Remove - still a Vector?

    - by Darrel Hoffman
    One of the drawbacks of most common implementations of the Vector class (or ArrayList, etc. Basically any array-backed expandable list class) is that their remove() operation generally operates in linear time - if you remove an element, you must shift all elements after it one space back to keep the data contiguous. But what if you're using a Vector just to be a list-of-things, where the order of the things is irrelevant? In this case removal can be accomplished in a few simple steps: Swap element to be removed with the last element in the array Reduce size field by 1. (No need to re-allocate the array, as the deleted item is now beyond the size field and thus not "in" the list any more. The next add() will just overwrite it.) (optional) Delete last element to free up its memory. (Not needed in garbage-collected languages.) This is clearly now a constant-time operation, since only performs a single swap regardless of size. The downside is of course that it changes the order of the data, but if you don't care about the order, that's not a problem. Could this still be called a Vector? Or is it something different? It has some things in common with "Set" classes in that the order is irrelevant, but unlike a Set it can store duplicate values. (Also most Set classes I know of are backed by a tree or hash map rather than an array.) It also bears some similarity to Heap classes, although without the log(N) percolate steps since we don't care about the order.

    Read the article

  • Multiple sites with the same codebase in Python

    - by Jimmy
    I am trying to run a large amount of sites which share about 90% of their code. They are simply designed to query an API and return the results. They will have a common userbase / database but will be configured slightly different and will have different CSS (perhaps even different templating). My initial idea was to run them as separate applications with a common library but I have read about the sites framework which would allow them to run from a single instance of Django which may help to reduce memory usage. https://docs.djangoproject.com/en/dev/ref/contrib/sites/ Is the site framework the right approach to a problem like this, and does it have real benefits over running separate applications? Initially I thought it was, but now I think otherwise. I have heard the following: Your SITE_ID is set in settings.py, so in order to have multiple sites, you need multiple settings.py configurations, which means multiple distinct processes/instances. You can of course share the code base between them, but each site will need a dedicated worker / WSGIDaemon to serve the site. This effectively removes any benefit of running multiple sites under one hood, if each site needs a UWSGI instance running. Alternative ideas of systems: https://github.com/iivvoo/django_layers https://github.com/shestera/django-multisite I don't know what route to be taking with this.

    Read the article

  • NetBeans Hangs on New Project Creation

    - by Jason
    When creating a New Project in NetBeans, it hangs on the creation screen; Screenshot I'm running Netbeans 7.0.1 on Xubuntu 13.04. Java -version prints: java version "1.7.0_25" OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.13.04.2) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) /usr/lib/jvm/ contains the following folders; java-1.5.0-gcj-4.7-amd64 java-6-openjdk-amd64 java-7-openjdk-common java-1.6.0-openjdk-amd64 java-6-openjdk-common java-1.7.0-openjdk-amd64 java-7-openjdk-amd64 I tried editing /usr/share/netbeans/7.0.1/etc/netbeans.conf with the following (as was suggested in another post); netbeans_jdkhome="/usr/lib/jvm/java-7-openjdk-amd64/jre/" But that didn't work. Instead, NetBeans then presented an error on the loading splash when it reached "Turning on Modules..." claiming the JDK was missing. Both NetBeans and the OpenJDK Java 7/6 Runtimes were installed through the Ubuntu Software Centre. I've also tried uninstalling and reinstalling both Java and NetBeans. Any help would be greatly appreciated, thanks!

    Read the article

  • Undeploy multiple SOA composites with WLST or ANT by Danilo Schmiedel

    - by JuergenKress
    As part of our current project the Build Management team asked for a solution to undeploy multiple composites at one time. Of course you have the “Undeploy All from This Partition” menu option in Enterprise Manager but since we have a lot of deployments every day the guys wanted to have a script solution. It is even more important for the nightly deployments on our continuous integration environment – strange, we couldn’t find anybody who wants to do the undeployment via Enterprise Manager manually every night ;-) However with WLST or ANT the SOA Suite comes with two options to undeploy composites via script. In this article I’d like to explain you both ways. Undeployment with WLST You can test the steps below on Oracle's Pre-built Virtual Machine for SOA Suite and BPM Suite 11g. Change to the WLST directory under MIDDLEWARE_HOME/Oracle_SOA1/common/bin. cd /oracle/fmwhome/Oracle_SOA1/common/bin/ Open WLST ./wlst.sh Connect to the SOA server Read the full article by Danilo Schmiedel SOA & BPM Partner Community For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit  www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center. Blog Twitter LinkedIn Mix Forum Technorati Tags: undeploy soa,Danilo Schmiedel,SOA Community,Oracle SOA,Oracle BPM,Community,OPN,Jürgen Kress

    Read the article

  • The most mind-bending programming language?

    - by Xepoch
    From a reasonably common programming language, which do you find to be the most mind-bending? I have been listening to a lot of programming podcasts and taking some time to learn some new languages that are being considered upcoming, and important. I'm not necessarily talking about BrainFuck, but which language would you consider to be one that challenges the common programming paradigms? For me, I did some functional and logic (ex. Prolog) programming in the 90s, so can't say that I find anything special there. I am far from being an expert in it, but even today the most mind-bending programming language for me is Perl. Not because "Hello World" is hard to implement but rather there is so much lexical flexibility that some of the hardest solutions can be decomposed so poetically that I have to walk outside away from my terminal to clear my head. I'm not saying I'd likely sell a commercial software implementation, just that there is a distinct reason Perl is so (in)famous. Just look at the basic list of books on it. So, what is your mind-bending language that promotes your better programming and practices?

    Read the article

  • Linux distro for software development support?

    - by Xie Jilei
    I've spent too much time on setup & maintain a development server, which contains following tools: Common services like SSH, BIND, rsync, etc. Subversion, Git. Apache server, which runs CGit, Trac, Webmin, phpmyadmin, phppgadmin, etc. Jetty, which runs Archiva and Hudson. Bugzilla. PostgresSQL server, MySQL server. I've created a lot of Debian packages, like my-trac-utils, my-bugzilla-utils, my-bind9-utils, my-mysql-utils, etc. to make my life more convenient. However, I still feel I need a lot more utils. And I've spent a lot of time to maintain these packages, too. I think there maybe many developers doing the same things. As tools like subversion, git, trac are so common today. It's not to hard to install and configure each of them, but it took a long time to install them all. And it's time consuming to maintain them. Like backup the data, plot the usage graph and generate web reports. (gitstat for example) So, I'd like to hear if there exist any pre-configured distro for Development Server purpose, i.e., something like BackTrack for hackers?

    Read the article

  • bluetooth daemon not running at startup

    - by ffaxer
    I'm trying to connect a bluetooth mouse to my Xubuntu system using Blueman (v. 1.21) Problem seems to be bluetoothd not running at startup, so blueman refuses to start, only a dialog appears: "Bluez daemon is not running, blueman-manager cannot continue." On my system, bluetoothd will run only as root (sudo), so my current workaround is simply to sudo bluetoothd manually, which works fine but id like to have it run at startup so that my mouse is just working without any interaction from me, if possible. If i try to start bluetoothd as non-root it reports: Bluetooth deamon 4.91 Unable to get on D-Bus In the startup scripts i found the same bluetoothd script in all runlevels and init.d: DAEMON=/usr/sbin/bluetoothd test -f /usr/sbin/bluetoothd || exit 0 # bluetoothd normally starts up by udev rules. it needs dbus to function, log_progress_msg "bluetoothd" pkill -TERM bluetoothd || true log_progress_msg "bluetoothd" I looked in /etc/udev/rules.d/ but no reference to bluetoothd. Further i have already tried with no luck: Editing /etc/dbus-1/system.d/bluetooth.conf to include my user (essentially copying the part that was for root): I tried it while both keeping the root policy and without, still, no luck! Editing /etc/pam.d/common-session and /etc/pam.d/gdm to include the line: session optional pam_ck_connector.so In the case of common-session it was already there but with a "nox11" which i tried removing. No luck no luck. Btw, I'm confused as to which session manager I'm using, since i have both xfce4-session and gdm-session-worker running. Anyways, hope someone is savvy enough to figure it out or bring some hints, otherwise i sincerely apologize for wasting your time! I'll sign off with uname -a: Linux [mycompname] 3.0.0-9-lowlatency #12ppa1~natty1-Ubuntu SMP PREEMPT Mon Aug 22 06:52:15 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux Peace B)

    Read the article

  • Open Source sponsored feature development

    - by Suma
    I am considering to sponsor a development of some particular features in some Open Source tools. I would like the results of the work to be available publicly, and if possible, to be included in the main product line. The features are usually something which is of general use, but not very critical, and no one has currently a plan to develop it. For illustration, imagine I would like to use MinGW for Win32 development, but I miss a post mortem debugging option, I would like this feature to be implemented and I am willing to pay $1000 for it. Is there some common way how to proceed, or is this wildly per-project dependent? Are there some general guidelines how to contact the product developers, or are there some common meeting places where smart open source people who might interested to participate in such sponsored development meet, which I should visit to advertise the sponsoring option? Are there some specific ways how to talk about the job to be more attractive to people participating in open source (e.g. it might be more interesting for them to participate in a contest than just to take a payed job, which might have a bit of mundane feel)? Or perhaps is this something which you think has little chance to succeed, because perhaps money has very little value for open source developers? Any tips and experiences from someone who has some experience of open source sponsorhip from any side (sponsor or the developer) are welcome.

    Read the article

  • How to add a permanent redirect (301) for an htm file in IIS 7

    - by bconlon
    Looking in Web Analytics I could see several external sites pointing at an old .htm file on my web server that no longer existed, so I thought I would get IIS to redirect to the new .aspx replacement. How hard could it be? This has annoyed me for quite a while today so here is the answer. 1. Install the Http Redirection module - this is not installed by default!! Windows 7 Start->Control Panel->Programs and Features->Turn Windows Features on or off. Internet Information Services->World Wide Web Services->Common Http Features->HTTP Redirection. Windows Server 2008 Start->Administrative Tools->Server Manager. Roles->Web Server (IIS). Role Services->Add Role Services. Common Http Features->HTTP Redirection. 2. Edit your web.config file <configuration>     .....     <location path="oldfile.htm">         <system.webServer>             <httpRedirect enabled="true" destination="/newfile.aspx" exactDestination="true" childOnly="true" httpResponseStatus="Permanent" />         </system.webServer>     </location>     ..... </configuration> When a user clicks or Google crawls ‘oldfile.htm’ it will get a permanent redirect to ‘/newfile.aspx’ - and should take any Page Rank to the new file.  #

    Read the article

  • Tracking feature requests for small-scale components

    - by DXM
    I'm curious how other development teams (especially those that work in moderate to large development groups) track "future" features/wishlists for functionality for internally developed frameworks or components. I know the standard advice is that a development team should find one good tool for tracking bugs/features and use that for everything and I agree with that if the future requests are for the product itself. In my company we have an engineering department, which is broken up into multiple groups and within each there can be one to several agile teams. The bug tracking product we use has been "a leader since 1997" (their UI/usability seems to also be evaluated against that year even today) but my agile team or even group doesn't really control what is being used by the whole department. What we are looking to track is not necessarily product features but expansion/nice to have functionality for internal components that go into our product. So to name a few for example... framework/utility library on top of CppUnit which our developers share low-level IPC communications framework Common development SDK that myself and several other team leads started to help share some common code/tools at the department-wide level (this SDK is released as internal "product" to each of the groups). Is the standard practice to use the one bug tracking tool? Or would it make more sense to setup something more localized specifically for our needs and maintain it ourselves? It's also unclear how management will feel if developers start performing "IT" roles of maintaining software and servers. At the same time, right now, we use excel files, internal wiki and MS OneNote for this kind of stuff and that just doesn't feel right. (I'm afraid to ask for actual software recommendations, since that might make this question more localized or something. Also developers needs this way more than management, so it would be nice to find something either free or no more than the cost of a happy hour).

    Read the article

  • The most mind-bending programming language? [closed]

    - by Xepoch
    From a reasonably common programming language, which do you find to be the most mind-bending? I have been listening to a lot of programming podcasts and taking some time to learn some new languages that are being considered upcoming, and important. I'm not necessarily talking about BrainFuck, but which language would you consider to be one that challenges the common programming paradigms? For me, I did some functional and logic (ex. Prolog) programming in the 90s, so can't say that I find anything special there. I am far from being an expert in it, but even today the most mind-bending programming language for me is Perl. Not because "Hello World" is hard to implement but rather there is so much lexical flexibility that some of the hardest solutions can be decomposed so poetically that I have to walk outside away from my terminal to clear my head. I'm not saying I'd likely sell a commercial software implementation, just that there is a distinct reason Perl is so (in)famous. Just look at the basic list of books on it. So, what is your mind-bending language that promotes your better programming and practices?

    Read the article

  • Does Agile force developers to work more?

    - by Shooshpanchick
    Looking at common Agile practices it seems to me that they (intentionally or unintentionally?) force developer to spend more time actually working as opposed to reading blogs/articles, chatting, coffee breaks and just plain procrastinating. In particular: 1) Pair programming - the biggest work-forcer, just because it is inconvenient to do all that procrastination when there are two of you sitting together. 2) Short stories - when you have a HUGE chunk of work that must be done in e.g. a month, it is pretty common to slack off in the first three weeks and switch to OMG DEADLINE mode for the last one. And with the little chunks (that must be done in a day or less) it is exact opposite - you feel that time is tight, there is no space for maneuvering, and you will be held accountable for the task pretty soon, so you start working immediately. 3) Team communication and cohesion - when you underperform in a slow, distanced and silent environment it may feel ok, but when at the end of the day at Scrum meeting everyone boasts what they have accomplished and you have nothing to say you may actually feel ashamed. 4) Testing and feedback - again, it prevents you from keeping tasks "99% ready" (when it's actually around 20%) until the deadline suddenly happens. Do you feel that under Agile you work more than under "conventional" methodologies? Is this pressure compensated by the more comfortable environment and by the feeling of actually getting right things done quickly?

    Read the article

  • Customer retention - why most companies have it wrong

    - by Michel Adar
    At least in the US market it is quite common for service companies to offer an initially discounted price to new customers. While this may attract new customers and robe customers from competitors, it is my argument that it is a bad strategy for the company. This strategy gives an incentive to change companies and a disincentive to stay with the company. From the point of view of the customer, after 6 months of being a customer the company rewards the loyalty by raising the price. A better strategy would be to reward customers for staying with the company. For example, by lowering the cost by 5% every year (compound discount so it does never get to zero). This is a very rational thing to do for the company. Acquiring new customers and setting up their service is expensive, new customers also tend to use more of the common resources like customer service channels. It is probably true for most companies that the cost of providing service to a customer of 10 years is lower than providing the same service in the first year of a customer's tenure. It is only logical to pass these savings to the customer. From the customer point of view, the competition would have to offer something very attractive, whether in terms of price or service, in order for the customer to switch. Such a policy would give an advantage to the first mover, but would probably force the competitors to follow suit. Overall, I would expect that this would reduce the mobility in the market, increase loyalty, increase the investment of companies in loyal customers and ultimately, increase competition for providing a better service. Competitors may even try to break the scheme by offering customers the porting of their tenure, but that would not work that well because it would disenchant existing customers and would be costly, assuming that it is costlier to serve a customer through installation and first year. What do you think? Is this better than using "save offers" to retain flip-floppers?

    Read the article

  • Augmenting functionality of subclasses without code duplication in C++

    - by Rob W
    I have to add common functionality to some classes that share the same superclass, preferably without bloating the superclass. The simplified inheritance chain looks like this: Element -> HTMLElement -> HTMLAnchorElement Element -> SVGElement -> SVGAlement The default doSomething() method on Element is no-op by default, but there are some subclasses that need an actual implementation that requires some extra overridden methods and instance members. I cannot put a full implementation of doSomething() in Element because 1) it is only relevant for some of the subclasses, 2) its implementation has a performance impact and 3) it depends on a method that could be overridden by a class in the inheritance chain between the superclass and a subclass, e.g. SVGElement in my example. Especially because of the third point, I wanted to solve the problem using a template class, as follows (it is a kind of decorator for classes): struct Element { virtual void doSomething() {} }; // T should be an instance of Element template<class T> struct AugmentedElement : public T { // doSomething is expensive and uses T virtual void doSomething() override {} // Used by doSomething virtual bool shouldDoSomething() = 0; }; class SVGElement : public Element { /* ... */ }; class SVGAElement : public AugmentedElement<SVGElement> { // some non-trivial check bool shouldDoSomething() { /* ... */ return true; } }; // Similarly for HTMLAElement and others I looked around (in the existing (huge) codebase and on the internet), but didn't find any similar code snippets, let alone an evaluation of the effectiveness and pitfalls of this approach. Is my design the right way to go, or is there a better way to add common functionality to some subclasses of a given superclass?

    Read the article

  • Algorithm to measure how "diffused" 5,000 pennies are in an economy?

    - by makerofthings7
    Please allow me to use this example/metaphor to describe an algorithm I need. Objects There are 5 thousand pennies. There are 50 cups. There is a tracking history (Passport "stamp" etc) that is associated with each penny as it moves between cups. Definition I'll define a "highly diffused" penny as one that passes through many cups. A "poorly diffused" penny is one that either passes back and forth between 2 cups Question How can I objectively measure the diffusion of a penny as: The number of moves the penny has gone through The number of cups the penny has been in A unit of time (day, week, month) Why am I doing this? I want to detect if a cup is hoarding pennies. Resistance from bad actors Since hoarding is bad, the "bad cup" may simply solicit a partner and simply move pennies between each other. This will reduce the amount of time a coin isn't in transit, and would skew hoarding detection. A solution might be to detect if a cup (or set of cups) are common "partners" with each other, though I'm not sure how to think though this problem. Broad applicability Any assistance would be helpful, since I would think that this algorithm is common to Economics The study of migration patterns of animals, citizens of a country Other natural occurring phenomena ... and probably exists as a term or concept I'm unfamiliar with.

    Read the article

  • How can I make an unmounted / unmountable NTFS disk not show up in the nautilus devices area?

    - by Dennis
    I have an idea that my /etc/fstab is a real mish-mash and I don't remember how it got that way, first of all it looks like this UUID=9EB80807B807DD21 /media/Storage ntfs-3g users 0 0 UUID=a60397fd-964a-45b1-ad35-53c8a4bee010 / ext4 defaults 0 1 UUID=1764825d-b8ba-4620-b3b0-e979b6f4f5c4 swap swap sw 0 0 UUID=255DA1E406E29DBC /media/sda2 ntfs-3g defaults 0 0 UUID=2CCCF161CCF1262C /mnt/sda1 ntfs-3g umask=000 0 0 /dev/fd0 /media/floppy0 vfat noauto 0 0 I started with an old XP install on disk /dev/sda that I don't use anymore but didn't want to delete, so I shrunk the XP partition, added a NTFS partition that would be common to both systems (Labeled it "Common" in XP), then installed Lucid on an extended ext4 partition. On this disk of course the ext4 system partition comes up as /, the go between partition auto-mounts on /media/sda1 but shows up in Nautilus as COMMOM, while the XP system disk does not show up in Nautilus, but I can get to it by navigating to /mnt/sda1. A second hard drive (/dev/sdb) that I stuck in was already formatted NTFS with a bunch of stuff and labeled "Storage". It auto-mounts to /media/Storage but another un-mounted disk also shows up in the Nautilus device area called Storage but it can't be mounted (Here and in the "Places" are the only times it appears) I would primarily like this non-existant (or already mounted depending on how you look at it) disk to not show up, but I wouldn't mind an explanation of why one labeled partition auto-mounts to a /media mount point but shows up by label, one does not show up as mounted at all but mounts to a /mnt mount point and is there for navigation, and one is mounted to a directory of the same name as the label. I would love to have some consistancy / direction on what is proper in this circumstance. No doubt I caused this with the fstab but I really don't remember what my rational was if I edited it manually

    Read the article

  • Really impossible to have Gimp 2.8 on Ubuntu 11.10?

    - by ubuntico
    For days, I have been trying to find a solution and repositories to install Gimp 2.8 on Ubuntu 11.10. Each time I get this error: Tried to update pango via sudo apt-get install pango-graphite [sudo] password for xxx: Reading package lists... Done Building dependency tree Reading state information... Done pango-graphite is already the newest version. Then also tried sudo apt-get install libgdk-pixbuf2* Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'libgdk-pixbuf2.0-0' for regex 'libgdk-pixbuf2*' Note, selecting 'libgdk-pixbuf2.0-dev' for regex 'libgdk-pixbuf2*' Note, selecting 'libgdk-pixbuf2.0-doc' for regex 'libgdk-pixbuf2*' Note, selecting 'libgdk-pixbuf2-ruby' for regex 'libgdk-pixbuf2*' Note, selecting 'libgdk-pixbuf2-ruby1.8' for regex 'libgdk-pixbuf2*' Note, selecting 'libgdk-pixbuf2-ruby1.8-dbg' for regex 'libgdk-pixbuf2*' Note, selecting 'libgdk-pixbuf2.0-common' for regex 'libgdk-pixbuf2*' libgdk-pixbuf2-ruby is already the newest version. libgdk-pixbuf2-ruby1.8 is already the newest version. libgdk-pixbuf2-ruby1.8-dbg is already the newest version. libgdk-pixbuf2.0-doc is already the newest version. libgdk-pixbuf2.0-0 is already the newest version. libgdk-pixbuf2.0-dev is already the newest version. libgdk-pixbuf2.0-common is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 31 not upgraded. And still error :(. Please help as I do not want to upgrade to Ubuntu 12.04 just to have Gimp. Really a mission impossible????

    Read the article

  • Benefits of Server-side Coding

    There are numerous advantages to server scripting languages over client side languages in regards to creating web sites that are more compelling compared to a standard static site. Server side scripting are scripts that are executed on a web server during the compilation of data to return to a client. These scripts allow developers to modify the content that is being sent to the user prior to the return of the data to the user as well as store information about the user. In addition, server side scripts allow for a controllable environment in which they can be executed. This cannot be said for client side languages because the developer cannot control the users’ environment compared to a web server. Some users may turn off client scripts, some may be only allow limited access on the system and others may be able to gain full control of the environment.  I have been developing web applications for over 9 years, and I have used server side languages for most of the applications I have built.  Here is a list of common things I have developed with server side scripts. List of Common Generic Functionality Send Email FTP Files Security/ Access Control Encryption URL rewriting Data Access Data Creation I/O Access The one important feature server side languages will help me with on my website is Data Access because my component will be backed with a SQL server database. I believe that form validation is one instance where I might see server-side scripts and JavaScript used interchangeably because it does not matter how or where the data is validated as long as the data that gets inserted is valid. However, I would have to say that my personal experience would have to sway me in deciding what type of languages to use for form validation because they both have advantages and disadvantages based on the each situation.

    Read the article

  • RPi and Java Embedded GPIO: Hooking Up Your Wires for Java

    - by hinkmond
    So, you bought your blue jumper wires, your LEDs, your resistors, your breadboard, and your fill of Fry's for the day. How do you hook this cool stuff up to write Java code to blink them LEDs? I'll step you through it. First look at that pinout diagram of the GPIO header that's on your RPi. Find the pins in the corner of your RPi board and make sure to orient it the right way. The upper left corner pin should have the characters "P1" next to it on the board. That pin next to "P1" is your Pin #1 (in the diagram). Then, you can start counting left, right, next row, left, right, next row, left, right, and so on: Pins # 1, 2, next row, 3, 4, next row, 5, 6, and so on. Take one blue jumper wire and connect to Pin # 3 (GPIO0). Connect the other end to a resistor and then the other end of the resistor into the breadboard. Each row of grouped-together holes on a breadboard are connected, so plug in the short-end of a common cathode LED (long-end of a common anode LED) into a hole that is in the same grouping as where the resistor is plugged in. Then, connect the other end of the LED back to Pin # 6 (GND) on the RPi GPIO header. Now you have your first LED connected ready for you to write some Java code to turn it on and off. (As, extra credit you can connect 7 other LEDs the same way to with one lead to Pins # 5, 7, 11, 13, 15, 19 & 21). Whew! That wasn't so bad, was it? Next blog post on this thread will have some Java source code for you to try... Hinkmond

    Read the article

< Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >