Search Results

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

Page 58/375 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • Importing files in Python from __init__.py

    - by Federico Builes
    Suppose I have the following structure: app/ __init__.py foo/ a.py b.py c.py __init__.py a.py, b.py and c.py share some common imports (logging, os, re, etc). Is it possible to import these three or four common modules from the __init__.py file so I don't have to import them in every one of the files? Edit: My goal is to avoid having to import 5-6 modules in each file and it's not related to performance reasons.

    Read the article

  • Please help me:(

    - by Marin
    Hi! Can anyone please help me?:( I'm desperrate cause I have to finish this script as soon as possible! The problem is: Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\FlashChat_v607\chat\inc\common.php on line 155 Notice: Undefined variable: step in C:\wamp\www\FlashChat_v607\chat\inc\common.php on line 94 and this is the link where you can find the code: http://www5.zippyshare.com/v/3592861/file.html

    Read the article

  • Shallow copying a list with downcasting

    - by Mohit
    I have the class herichary as follows CEntity----CNode---CElement I have a class Nodes : List<Cnode> and Class Elements : List<Element> Node class contain common item common across different project Element class has item specific to a project. I have to shallow copy the element list into the node list (basically down casting the elements to nodes)

    Read the article

  • HMVC or PAC - how to handle shared abstractions/models?

    - by fig-gnuton
    In HMVC/PAC, what's the recommended way to code if two or more triads/agents share a common model/abstraction? Do you instantiate a new instance of that model wherever needed, and propogate a change in one to all the other instances via the controllers? Or do instantiate one model at some common upper level, and inject that instance wherever needed? (Or neither if I'm missing something fundamental about these patterns?)

    Read the article

  • Deploying multiple Grails instances with shared cache and sessions ?

    - by Kedare
    Hello, I am looking for a solution that allows me to deploy multiple load balanced Grails instances that have shared cache (EhCache Server ?) and sessions, is this possible ? I can't find any documentation on this (connecting to a common EhCache server or using Distributed EhCache, and sharing sessions (using EhCache too ?))... I'm looking for something that will work like multiple Rails instances with a common memcached and sessions/caches stored in the memcached... Can you help me ? Thank you !

    Read the article

  • Best List view solution for asp.net mvc?

    - by sebastian_h
    Its common to observe listview developments for webforms but no common in mvc. on the other hand for mvc I´m only finding grid views displaying tabular data. In your opinion which is the best List view solution for asp.net mvc?. Edited: ok, finally I found a possibility. Kazi Manzur wrote a listview using telerik controls. http://weblogs.asp.net/rashid/archive/2010/03/24/creating-rich-view-components-in-asp-net-mvc.aspx

    Read the article

  • Weird black spots on custom Google Map with IE

    - by Domenic
    Hello. I'm getting some weird black spots with a custom map page (via the Google Maps API v2.x) I have created. (Click SERVICIOS and then the icon farthest south to generate image shown below.) The issue seems to only appear when using Internet Explorer. I'm wondering if this is a common problem and if there is a common fix? Any ideas? Thanks.

    Read the article

  • What are some good usability guidelines an average developer should follow?

    - by Allain Lalonde
    I'm not a usability specialist, and I really don't care to be one. I just want a small set of rules of thumb that I can follow while coding my User Interfaces so that my product has decent usability. At first I thought that this question would be easy to answer "Use your common sense", but if it's so common among us developers we wouldn't, as a group, have a reputation for our horrible interfaces. Any Suggestions?

    Read the article

  • Finding the most frequent subtrees in a collection of (parse) trees

    - by peter.murray.rust
    I have a collection of trees whose nodes are labelled (but not uniquely). Specifically the trees are from a collection of parsed sentences (see http://en.wikipedia.org/wiki/Treebank). I wish to extract the most common subtrees from the collection - performance is not (yet) an issue. I'd be grateful for algorithms (ideally Java) or pointers to tools which do this for treebanks. Note that order of child nodes is important. EDIT @mjv. We are working in a limited domain (chemistry) which has a stylised language so the varirty of the trees is not huge - probably similar to children's readers. Simple tree for "the cat sat on the mat". <sentence> <nounPhrase> <article/> <noun/> </nounPhrase> <verbPhrase> <verb/> <prepositionPhrase> <preposition/> <nounPhrase> <article/> <noun/> </nounPhrase> </prepositionPhrase> </verbPhrase> </sentence> Here the sentence contains two identical part-of-speech subtrees (the actual tokens "cat". "mat" are not important in matching). So the algorithm would need to detect this. Note that not all nounPhrases are identical - "the big black cat" could be: <nounPhrase> <article/> <adjective/> <adjective/> <noun/> </nounPhrase> The length of sentences will be longer - between 15 to 30 nodes. I would expect to get useful results from 1000 trees. If this does not take more than a day or so that's acceptable. Obviously the shorter the tree the more frequent, so nounPhrase will be very common. EDIT If this is to be solved by flattening the tree then I think it would be related to Longest Common Substring, not Longest Common Sequence. But note that I don't necessarily just want the longest - I want a list of all those long enough to be "interesting" (criterion yet to be decided).

    Read the article

  • How to implement table-per-concrete-type strategy using entity framework

    - by SDReyes
    Hello Guys! I'm mapping a set of tables that share a common set of fields: So as you can see I'm using a table-per-concrete-type strategy to map the inheritance. But... I have not could to relate them to an abstract type containing these common properties. It's possible to do it using EF? BONUS: The only non documented Entity Data Model Mapping Scenario is Table-per-concrete-type inheritance http://msdn.microsoft.com/en-us/library/cc716779.aspx : P

    Read the article

  • XSD.exe question about include files and code generation

    - by Roger Willcocks
    If you have an XSD with an includes reference. Is it possible to generate 2 separate class files. 1 for the XSD, and 1 for the included XSD? My Scenario 4 XSDs, each of which share 15-20 element definitions in common. Rather than maintaining, I'd like to end up with the 4 XSDs all referencing a fifth file with the common definitions, and code generating 5 .cs files to use.

    Read the article

  • What is the "proper" method for determining if a swf is running within an AIR application?

    - by Michael Prescott
    I've got a Flex Web project and a Flex AIR project that use a common code-base. The common code defines several run-time loaded Flex Modules. I want the Flex Modules to behave differently depending on whether the running base application is WEB or AIR. What is the proper method for determining from the module code whether the module is running in a WEB or AIR application? (I found that Security.sandboxType.toString() returns "application", but I haven't found anything better in the documentation, yet.)

    Read the article

  • Is is possible to create a factory class in PHP?

    - by user198729
    Like the BeanFactory in java: In the much more common case where the BeanFactory itself directly creates the bean by calling its constructor (equivalent to Java code calling new), the class attribute specifies the class of the bean to be constructed. In the less common case where the BeanFactory calls a static, so-called factory method on a class to create the bean, the class attribute specifies the actual class containing the static factory method. Note:it's not the factory method

    Read the article

  • Cannot extend a class located in another file, PHP

    - by NightMICU
    I am trying to set up a class with commonly used tasks, such as preparing strings for input into a database and creating a PDO object. I would like to include this file in other class files and extend those classes to use the common class' code. However, when I place the common class in its own file and include it in the class it will be used in, I receive an error that states the second class cannot be found. For example, if the class name is foo and it is extending bar (the common class, located elsewhere), the error says that foo cannot be found. But if I place the code for class bar in the same file as foo, it works. Here are the classes in question - Common Class abstract class coreFunctions { protected $contentDB; public function __construct() { $this->contentDB = new PDO('mysql:host=localhost;dbname=db', 'username', 'password'); } public function cleanStr($string) { $cleansed = trim($string); $cleansed = stripslashes($cleansed); $cleansed = strip_tags($cleansed); return $cleansed; } } Code from individual class include $_SERVER['DOCUMENT_ROOT'] . '/includes/class.core-functions.php'; $mode = $_POST['mode']; if (isset($mode)) { $gallery = new gallery; switch ($mode) { case 'addAlbum': $gallery->addAlbum($_POST['hash'], $_POST['title'], $_POST['description']); } } class gallery extends coreFunctions { private function directoryPath($string) { $path = trim($string); $path = strtolower($path); $path = preg_replace('/[^ \pL \pN]/', '', $path); $path = preg_replace('[\s+]', '', $path); $path = substr($path, 0, 18); return $path; } public function addAlbum($hash, $title, $description) { $title = $this->cleanStr($title); $description = $this->cleanStr($description); $path = $this->directoryPath($title); if ($title && $description && $hash) { $addAlbum = $this->contentDB->prepare("INSERT INTO gallery_albums (albumHash, albumTitle, albumDescription, albumPath) VALUES (:hash, :title, :description, :path)"); $addAlbum->execute(array('hash' => $hash, 'title' => $title, 'description' => $description, 'path' => $path)); } } } The error when I try it this way is Fatal error: Class 'gallery' not found in /home/opheliad/public_html/admin/photo-gallery/includes/class.admin_photo-gallery.php on line 10

    Read the article

  • Stored Queries?

    - by phpeffedup
    Is it considered crazy to store common SQL queries for my web app in a database for use in execution? Or is that common practice? Or is it impossible? My thinking is, this way, I avoid hard-coding SQL into my application files, and add another level of abstraction. Is this crazy? Is this what a stored procedure is? Or is that something else?

    Read the article

  • Hidden features of mod_rewrite

    - by Owen
    There seem to be a decent number of mod_rewrite threads floating around lately with a bit of confusion over how certain aspects of it work. As a result I've compiled a few notes on common functionality, and perhaps a few annoying nuances. What other features / common issues have you run across using mod_rewrite?

    Read the article

  • Three-way full outer join in SQLite

    - by Vince
    I have three tables with a common key field, and I need to join them on this key. Given SQLite doesn't have full outer or right joins, I've used the full outer join without right join technique on Wikipedia with much success. But I'm curious, how would one use this technique to join three tables by a common key? What are the efficiency impacts of this (the current query takes about ten minutes)? Thanks!

    Read the article

  • MSBuild imported script directory

    - by Michael K.
    In Visual Studio 2010 we have MSBuild for C++ project. Also we can add additional custom properties files "*.props" to projects, which are just MSBuild scripts. Is it possible in imported "some.props" file know its directory? for example there is "project.vcxproj" file and "common.props" file. I would like to write something: <IncludeDir>$( [and something for common.props file directory here] )\include</IncludeDir> What should I write there?

    Read the article

  • What is the preferred syntax for initializing a dict?

    - by daotoad
    I'm putting in some effort to learn Python, and I am paying close attention to common coding standards. This may seem like a pointlessly nit-picky question, but I am trying to focus on best-practices as I learn, so I don't have to unlearn any 'bad' habits. I see two common methods for initializing a dict: a = { 'a': 'value', 'another': 'value', } b = dict( a='value', another='value', ) Which is considered to be "more pythonic"? Which do you use? Why?

    Read the article

  • Root base class in C++

    - by Littlesmith
    Every object in .NET inherits (directly or indirectly) from the common root base "Object". Is there such a common object root in C++? How do I pass any object to a function? public void DoSomeStuff(object o) { ... }

    Read the article

  • How to implement table-per-concrete-type using entity framework

    - by SDReyes
    Hello Guys! I'm mapping a set of tables that share a common set of fields: So as you can see I'm using a table-per-concrete-type strategy to map the inheritance. But... I have not could to relate them to an abstract type containing these common properties. It's possible to do it using EF? BONUS: The only non documented Entity Data Model Mapping Scenario is Table-per-concrete-type inheritance http://msdn.microsoft.com/en-us/library/cc716779.aspx : P

    Read the article

  • How can I get zoom functionality for images?

    - by Janusz
    Is there a common way to show a big image and enable the user to zoom in and out and pan the image? Until now I found two ways: overwriting ImageView, that seems a little bit too much for such a common problem. using a webview but with less control over the overall layout etc.

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >