Search Results

Search found 922 results on 37 pages for 'patrick pellegrino'.

Page 19/37 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Drupal: re-use same CCK Field in the same content type

    - by Patrick
    hi, I need a sequence of text, image, video CCK fields, repeated twice in my content type. I need to create 2 different groups (I don't want to use multi-upload functionality). I was wondering if I have to create a new field Image - File Upload for the second group, or I can somehow to re-use the first one (which is already added, and I would like to add it twice in the second group as well). thanks

    Read the article

  • ByteFlow installation Error on Windows

    - by Patrick
    Hi Folks, When I try to install ByteFlow on my Windows development machine, I got the following MySQL error, and I don't know what to do, please give me some suggestion. Thank you so much!!! E:\byteflow-5b6d964917b5>manage.py syncdb !!! Read about DEBUG in settings_local.py and then remove me !!! !!! Read about DEBUG in settings_local.py and then remove me !!! J:\Program Files\Python26\lib\site-packages\MySQLdb\converters.py:37: DeprecationWarning: the sets module is deprecated from sets import BaseSet, Set Creating table auth_permission Creating table auth_group Creating table auth_user Creating table auth_message Creating table django_content_type Creating table django_session Creating table django_site Creating table django_admin_log Creating table django_flatpage Creating table actionrecord Creating table blog_post Traceback (most recent call last): File "E:\byteflow-5b6d964917b5\manage.py", line 11, in <module> execute_manager(settings) File "J:\Program Files\Python26\lib\site-packages\django\core\management\__init__.py", line 362, in execute_manager utility.execute() File "J:\Program Files\Python26\lib\site-packages\django\core\management\__init__.py", line 303, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "J:\Program Files\Python26\lib\site-packages\django\core\management\base.py", line 195, in run_from_argv self.execute(*args, **options.__dict__) File "J:\Program Files\Python26\lib\site-packages\django\core\management\base.py", line 222, in execute output = self.handle(*args, **options) File "J:\Program Files\Python26\lib\site-packages\django\core\management\base.py", line 351, in handle return self.handle_noargs(**options) File "J:\Program Files\Python26\lib\site-packages\django\core\management\commands\syncdb.py", line 78, in handle_noargs cursor.execute(statement) File "J:\Program Files\Python26\lib\site-packages\django\db\backends\util.py", line 19, in execute return self.cursor.execute(sql, params) File "J:\Program Files\Python26\lib\site-packages\django\db\backends\mysql\base.py", line 84, in execute return self.cursor.execute(query, args) File "J:\Program Files\Python26\lib\site-packages\MySQLdb\cursors.py", line 166, in execute self.errorhandler(self, exc, value) File "J:\Program Files\Python26\lib\site-packages\MySQLdb\connections.py", line 35, in defaulterrorhandler raise errorclass, errorvalue _mysql_exceptions.OperationalError: (1071, 'Specified key was too long; max key length is 767 bytes')

    Read the article

  • [Django] How to post to a facebook page

    - by patrick
    Hi! I need to post a status update of one of my facebook page when I create a model into my django project, but I don't know how to do it using the new facebook graph api: http://github.com/facebook/python-sdk/blob/master/src/facebook.py can you explain to me how to do it? Thanks in advance :)

    Read the article

  • how to compare between Doctrine & Propel in symfony

    - by Patrick
    I am in the early stages of rearchitecting my company's application. The app is currently running on symfony 1.2, and I used the default ORM at the time, Propel. Symfony has since updated to 1.4 and switched default ORM to Doctrine. From my understanding, each ORM excels at particular types of database structures. Is this true or is one far and away better than the other? Are there any good methods to test which ORM would be best in my situation in a test environment using my schema (i.e.- set up dual, identical sites and run tests)?

    Read the article

  • newbie problems with codeigniter

    - by Patrick
    hi, i'm trying to learn codeigniter (following a book) but don't understand why the web page comes out empty. my controller is class Welcome extends Controller { function Welcome() { parent::Controller(); } function index() { $data['title'] = "Welcome to Claudia's Kids"; $data['navlist'] = $this->MCats->getCategoriesNav(); $data['mainf'] = $this->MProducts->getMainFeature(); $skip = $data['mainf']['id']; $data['sidef'] = $this->MProducts->getRandomProducts(3, $skip); $data['main'] = "home"; $this->load->vars($data); $this->load->view('template'); } the view is: <--doctype declaration etc etc.. --> </head> <body> <div id="wrapper"> <div id="header"> <?php $this->load->view('header');?> </div> <div id='nav'> <?php $this->load->view('navigation');?> </div> <div id="main"> <?php $this->load->view($main);?> </div> <div id="footer"> <?php $this->load->view('footer');?> </div> </div> </body> </html> Now I know the model is passing back the right variables, but the page appears completely blank. I would expect at least to see an error, or the basic html structure, but the page is just empty. Moreover, the controller doesn't work even if I modify it as follows: function index() { echo "hello."; } What am I doing wrong? Everything was working until I made some changes to the model - but even if I delete all those new changes, the page is still blank.. i'm really confused! thanks, P.

    Read the article

  • jQuery, qTip: tooltips font-size: always the same

    - by Patrick
    hi, I'm using qTip jquery-plugin for my tooltips. I cannot change the font-size of the tooltips. This is the code.. any number 2..4..8 produces the same results. $('.option img[title]').qtip({ style: { name: 'light', border: {width: 0}, title: { 'font-size': 2 } }, position: { corner: { target: 'topMiddle', tooltip: 'bottomMiddle' } } }); thanks

    Read the article

  • How do I add a trailing slash for Django MPTT-based categorization app?

    - by Patrick Beeson
    I'm using Django-MPTT to develop a categorization app for my Django project. But I can't seem to get the regex pattern for adding a trailing slash that doesn't also break on child categories. Here's an example URL: http://mydjangoapp.com/categories/parentcat/childcat/ I'd like to be able to use http://mydjangoapp.com/categories/parentcat and have it redirect to the trailing slash version. The same should apply to http://mydjangoapp.com/categories/parentcat/childcat (it should redirect to http://mydjangoapp.com/categories/parentcat/childcat/). Here's my urls.py: from django.conf.urls.defaults import patterns, include, url from django.views.decorators.cache import cache_page from storefront.categories.models import Category from storefront.categories.views import SimpleCategoryView urlpatterns = patterns('', url(r'^(?P<full_slug>[-\w/]+)', cache_page(SimpleCategoryView.as_view(), 60 * 15), name='category_view'), ) And here is my view: from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.views.generic import TemplateView, DetailView from django.views.generic.detail import SingleObjectTemplateResponseMixin, SingleObjectMixin from django.utils.translation import ugettext as _ from django.contrib.syndication.views import Feed from storefront.categories.models import Category class SimpleCategoryView(TemplateView): def get_category(self): return Category.objects.get(full_slug=self.kwargs['full_slug']) def get_context_data(self, **kwargs): context = super(SimpleCategoryView, self).get_context_data(**kwargs) context["category"] = self.get_category() return context def get_template_names(self): if self.get_category().template_name: return [self.get_category().template_name] else: return ['categories/category_detail.html'] And finally, my model: from django.db import models from mptt.models import MPTTModel from mptt.fields import TreeForeignKey class CategoryManager(models.Manager): def get(self, **kwargs): defaults = {} defaults.update(kwargs) if 'full_slug' in defaults: if defaults['full_slug'] and defaults['full_slug'][-1] != "/": defaults['full_slug'] += "/" return super(CategoryManager, self).get(**defaults) class Category(MPTTModel): title = models.CharField(max_length=255) description = models.TextField(blank=True, help_text='Please use <a href="http://daringfireball.net/projects/markdown/syntax">Markdown syntax</a> for all text-formatting and links. No HTML is allowed.') slug = models.SlugField(help_text='Prepopulates from title field.') full_slug = models.CharField(max_length=255, blank=True) template_name = models.CharField(max_length=70, blank=True, help_text="Example: 'categories/category_parent.html'. If this isn't provided, the system will use 'categories/category_detail.html'. Use 'categories/category_parent.html' for all parent categories and 'categories/category_child.html' for all child categories.") parent = TreeForeignKey('self', null=True, blank=True, related_name='children') objects = CategoryManager() class Meta: verbose_name = 'category' verbose_name_plural = 'categories' def save(self, *args, **kwargs): orig_full_slug = self.full_slug if self.parent: self.full_slug = "%s%s/" % (self.parent.full_slug, self.slug) else: self.full_slug = "%s/" % self.slug obj = super(Category, self).save(*args, **kwargs) if orig_full_slug != self.full_slug: for child in self.get_children(): child.save() return obj def available_product_set(self): """ Returns available, prioritized products for a category """ from storefront.apparel.models import Product return self.product_set.filter(is_available=True).order_by('-priority') def __unicode__(self): return "%s (%s)" % (self.title, self.full_slug) def get_absolute_url(self): return '/categories/%s' % (self.full_slug)

    Read the article

  • Use GIS to get geographic info for a single point

    - by Patrick Scott
    I am not quite sure where to start with this. I only just started looking into this in the past week, but hopefully someone can help point me in the right direction. The goal of my project is to be able to take a geohash, decode it to latitude and longitude, check the point against some GIS data, and find out some information about that point such as the terrain(is this a body of water? A lake? An Ocean? Is this a mountainous area? Is this a field?), altitude, or other useful things. Then simply be able to display that information as a starter. What I have gathered so far is that I need to get some free GIS data (this is for school, so I have no money!). I would like to have world data, and I found some online (http://www.webgis.com/terraindata.html) but I don't know where to go from here. I saw some tools such as PostGIS as a database. I am currently using Java for some other parts of the project, so if possible I would like to stick to Java. Can someone help me out, or point me in the right direction?

    Read the article

  • CSS: move a "float:right" element to top (to align with the first element of the list)

    - by Patrick
    hi, I've a sequence of elements and the last one has css "float:left". I would like to display it at the same height of the first element and not on the bottom of the list. (I cannot change the html code, so it is the last in the list). At the same time, I would like to keep it on the right. How can I make it wich CSS ? thanks Code: <div class="field field-type-text field-field-year"> <div class="field-items"> <div class="field-item odd"> <div class="field-label-inline-first"> Year:&nbsp;</div> 2009 </div> </div> </div> <div class="field field-type-text field-field-where"> <div class="field-items"> <div class="field-item odd"> <div class="field-label-inline-first"> Where:&nbsp;</div> Musée Rath, Geneva </div> </div> </div> <div class="field field-type-text field-field-when"> <div class="field-items"> <div class="field-item odd"> <div class="field-label-inline-first"> When:&nbsp;</div> 25.8 – 27.9.2009 </div> </div> </div> <div class="field field-type-text field-field-editor"> <div class="field-items"> <div class="field-item odd"> <div class="field-label-inline-first"> Editor:&nbsp;</div> Blabla Blabla </div> </div> </div> <div class="field field-type-text field-field-material"> <div class="field-items"> <div class="field-item odd"> <div class="field-label-inline-first"> Material/techniques:&nbsp;</div> contemporary art installations </div> </div> </div> <div class="field field-type-text field-field-dimension"> <div class="field-items"> <div class="field-item odd"> <div class="field-label-inline-first"> Dimension:&nbsp;</div> 2 floors in a neoclassical building </div> </div> </div> <div class="field field-type-text field-field-artists"> <div class="field-items"> <div class="field-item odd"> <div class="field-label-inline-first"> Artists:&nbsp;</div> Blablablabla balbalbalbalba </div> </div> </div> .field-field-year, .field-field-where, .field-field-when, .field-field-editor, .field-field-material, .field-field-dimension { width:300px; } .field-field-artists { width:400px; float:right; clear:right; top-margin: -200px; }

    Read the article

  • Drupal: I cannot connect to the database.. please help

    - by Patrick
    hi, I've hard time to make Drupal work on IIS Microsoft server. I've succesfully run Joomla on the same server so I'm pretty sure the following information are correct: host: localhost user: user pass: pass databaseName = servername_databasename I've set the following line in settings.php file: $db_url = 'mysql://user:password@localhost/servername_databasename'; but what I get is this: If you are the maintainer of this site, please check your database settings in the settings.php file and ensure that your hosting provider's database server is running. For more help, see the handbook, or contact your hosting provider. I don't get any other error message such as: database doesn't exist, user/pass wrong.. just this. The database is running, I can access with phpmyadmin. I've tried both "mysql" and "mysqli". The host is a private server (IIS Microsoft), the database is Mysql The database and website files upload have also been succesfull.. so I dunno what to do to fix this issue. thanks

    Read the article

  • Weird text addition in PHP

    - by Patrick Gates
    I have a form posting data to a php page. Then I have the PHP page echoing the data aswell as posting it to twitter. Whenever In a word with an apostrophe it adds a back-slash right before it. So I type in "I'm going to the park" it echos "I\'m going to the park" what's going on and how do I fix it? Thanx :)

    Read the article

  • jQuery: find selector only works with IDs and not classes ?

    - by Patrick
    hi, does the "find" method work in jQuery with classes selectors ? For example: var tagsDiv = $(".node-form .taxonomy-super-select-checkboxes").find("div.fieldset-wrapper"); doesn't work. But var tagsDiv = $(".node-form .taxonomy-super-select-checkboxes").find("div#edit-taxonomy-tags-1-wrapper"); works. This is the html code: ... <fieldset class=" collapsible"> <legend class="collapse-processed"> <a href="#">Tags <span class="form-required" title="This field is required.">*</span> </a> </legend> <div class="fieldset-wrapper"> <div class="form-item" id="edit-taxonomy-tags-1-wrapper"> <label for="edit-taxonomy-tags-1">Enter New Tags: </label> </div> </div> </fieldset> ... thanks

    Read the article

  • Using static variable in function vs passing variable from caller

    - by Patrick
    I have a function which spawns various types of threads, one of the thread types needs to be spawned every x seconds. I currently have it like this: bool isTime( Time t ) { return t >= now(); } void spawner() { while( 1 ) { Time t = now(); if( isTime( t ) )//is time is called in more than one place in the real function { launchthread() t = now() + offset; } } } but I'm thinking of changing it to: bool isTime() { static Time t = now(); if( t >= now() ) { t = now() + offset; return true; } return false; } void spawner() { if( isTime() ) launchthread(); } I think the second way is neater but I generally avoid statics in much the same way I avoid global data; anyone have any thoughts on the different styles?

    Read the article

  • Eclipse 3.5: Implementing my own context menu for a MultipageEditorPart --> no viewer involved

    - by Patrick
    Hello! :-) In my current RCP-project i use a MultipageEditorPart. It has various pages, with simple SWT composites on it. The composites contain some Text and Combo elements. When the user right clicks onto the editor page, I want a context menu to open. This menu holds a command for creating a new editor page, with a composite on it. The command is already working, but I'm quite clueless about how to implement the context menu for the editor. Can someone help with this?

    Read the article

  • Drupal: installing it in a subfolder...

    - by Patrick
    hi, this is a question about drupal installation on server. I usually upload my drupal into a subfolder "drupal" and I ask my customers to check the website in such subfolders until when it is ready. Then I asl to change the default folder in Apache to the "drupal" one. Sometimes my customer cannot change Apache configuration, so I was wondering if I can use a php script to forward users from root folder to the drupal one, or I should move the website to the root folder (which I would prefer to avoid, because is time consuming). thanks

    Read the article

  • Poor performance using RMI-proxies with Swing components

    - by Patrick
    I'm having huge performance issues when I add RMI proxy references to a Java Swing JList-component. I'm retrieving a list of user Profiles with RMI from a server. The retrieval itself takes just a second or so, so that's acceptable under the circumstances. However, when I try to add these proxies to a JList, with the help of a custom ListModel and a CellRenderer, it takes between 30-60 seconds to add about 180 objects. Since it is a list of users' names, it's preferrable to present them alphabetically. The biggest performance hit is when I sort the elements as they get added to the ListModel. Since the list will always be sorted, I opted to use the built-in Collections.binarySearch() to find the correct position for the next element to be added, and the comparator uses two methods that are defined by the Profile interface, namely getFirstName() and getLastName(). Is there any way to speed this process up, or am I simply implementing it the wrong way? Or is this a "feature" of RMI? I'd really love to be able to cache some of the data of the remote objects locally, to minimize the remote method calls.

    Read the article

  • Flex, HBox: how to horizontally center all children ?

    - by Patrick
    hi, I cannot center the components in my VBox. I would like to set the standard css element "align: center". How can I do that in Flex ? <mx:VBox> <mx:LinkButton label="Tag1" /> <mx:Image source="@Embed(source='../icons/userIcon.png')" /> <mx:Label id="username" text="Nickname" visible="false" fontWeight="bold" /> </mx:VBox> thanks

    Read the article

  • Why is a NullReferenceException thrown when a ToolStrip button is clicked twice with code in the `Click` event handler?

    - by Patrick
    I created a clean WindowsFormsApplication solution, added a ToolStrip to the main form, and placed one button on it. I've added also an OpenFileDialog, so that the Click event of the ToolStripButton looks like the following: private void toolStripButton1_Click(object sender, EventArgs e) { openFileDialog1.ShowDialog(); } I didn't change any other properties or events. The funny thing is that when I double-click the ToolStripButton (the second click must be quite fast, before the dialog opens), then cancel both dialogs (or choose a file, it doesn't really matter) and then click in the client area of main form, a NullReferenceException crashes the application (error details attached at the end of the post). Please note that the Click event is implemented while DoubleClick is not. What's even more strange that when the OpenFileDialog is replaced by any user-implemented form, the ToolStripButton blocks from being clicked twice. I'm using VS2008 with .NET3.5. I didn't change many options in VS (only fontsize, workspace folder and line numbering). Does anyone know how to solve this? It is 100% replicable on my machine, is it on others too? One solution that I can think of is disabling the button before calling OpenFileDialog.ShowDialog() and then enabling the button back (but it's not nice). Any other ideas? And now the promised error details: System.NullReferenceException was unhandled Message="Object reference not set to an instance of an object." Source="System.Windows.Forms" StackTrace: at System.Windows.Forms.NativeWindow.WindowClass.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at WindowsFormsApplication1.Program.Main() w C:\Users\Marchewek\Desktop\Workspaces\VisualStudio\WindowsFormsApplication1\Program.cs:line 20 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException:

    Read the article

  • jQuery: columnizer plugin: is that slow ?

    - by Patrick
    hi, I'm using columnizer plugin (http://welcome.totheinter.net/columnizer-jquery-plugin/) to update my pages and display elements in vertical columns. It usually takes 2 seconds to update the view. Is that normal ? It seems to be quite slow. I sometimes receive Firefox message (Unresponsive javascript) thanks

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >