Search Results

Search found 361 results on 15 pages for 'erik philips'.

Page 8/15 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • A Django form for entering a 0 to n email addresses

    - by Erik
    I have a Django application with some fairly common models in it: UserProfile and Organization. A UserProfile or an Organization can both have 0 to n emails, so I have an Email model that has a GenericForeignKey. UserProfile and Organization Models both have a GenericRelation called emails that points back to the Email model (summary code provided below). The question: what is the best way to provide an Organization form that allows a user to enter organization details including 0 to n email addresses? My Organization create view is a Django class-based view. I'm leading towards creating a dynamic form and an enabling it with Javascript to allow the user to add as many email addresses as necessary. I will render the form with django-crispy-forms. I've thought about doing this with a formset embedded within the form, but this seems like overkill for email addresses. Embedding a formset in a form delivered by a class-based view is cumbersome too. Note that the same issue occurs with the Organization fields phone_numbers and locations. emails.py: from django.db import models from parent_mixins import Parent_Mixin class Email(Parent_Mixin,models.Model): email_type = models.CharField(blank=True,max_length=100,null=True,default=None,verbose_name='Email Type') email = models.EmailField() class Meta: app_label = 'core' organizations.py: from emails import Email from locations import Location from phone_numbers import Phone_Number from django.contrib.contenttypes import generic from django.db import models class Organization(models.Model): active = models.BooleanField() duns_number = models.CharField(blank=True,default=None,null=True,max_length=9) # need to validate this emails = generic.GenericRelation(Email,content_type_field='parent_type',object_id_field='parent_id') legal_name = models.CharField(blank=True,default=None,null=True,max_length=200) locations = generic.GenericRelation(Location,content_type_field='parent_type',object_id_field='parent_id') name = models.CharField(blank=True,default=None,null=True,max_length=200) organization_group = models.CharField(blank=True,default=None,null=True,max_length=200) organization_type = models.CharField(blank=True,default=None,null=True,max_length=200) phone_numbers = generic.GenericRelation(Phone_Number,content_type_field='parent_type',object_id_field='parent_id') taxpayer_id_number = models.CharField(blank=True,default=None,null=True,max_length=9) # need to validate this class Meta: app_label = 'core' parent_mixins.py from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.db import models class Parent_Mixin(models.Model): parent_type = models.ForeignKey(ContentType,blank=True,null=True) parent_id = models.PositiveIntegerField(blank=True,null=True) parent = generic.GenericForeignKey('parent_type', 'parent_id') class Meta: abstract = True app_label = 'core'

    Read the article

  • How to retrieve a IMAP body with the right charset?

    - by Erik
    Hi Guys, I'm trying to make an "IMAP fetch" command to retrieve the message body. I need to pass/use the correct charset, otherwise the response will come with special characters. How can I make the IMAP request/command to consider the charset I received in the BODYSTRUCTURE result??

    Read the article

  • Storing a remote path by name in Hg

    - by Erik Vold
    In git I can git remote add x http://... then git pull x how can I do this in hg? I was told to add the following to .hgrc: [paths] x = http://... so I added the above to /path/to/repo/.hgrc then tried hg pull x and got the following error: abort: repository x not found! where x was mozilla and http:// was http://hg.mozilla.org/labs/jetpack-sdk/

    Read the article

  • to Imagemagick PHP exec

    - by Erik Smith
    I found a very helpful post on here about cropping images in a circle. However, when I try to execute the imagemagick script using exec in PHP, I'm getting no results. I've checked to make sure the directories have the correct permissions and such. Is there a step I'm missing? Any insight would be much appreciated. Here's what my script looks like: $run = exec('convert -size 200x200 xc:none -fill daisy.jpg -draw "circle 100,100 100,1" uploads/new.png'); Edit: Imagemagick is installed.

    Read the article

  • Super wide, but not so tall, bitmap?

    - by Erik Karlsson
    Howdy folks. Is there any way to create a more space/resource efficient bitmap? Currently i try to render a file, approx 800 px high but around 720000px wide. It crashes my application, presumebly because of the share memory-size of the bitmap. Can i do it more efficient, like creating it as an gif directly and not later when i save it? I try to save a series of lines/rectangles from a real world reading, and i want it to be 1px per 1/100th of a second. Any input? And btw, i never manage to ogon using google open id : /

    Read the article

  • Gravatar XML-RPC request problem in Objective-C

    - by Erik
    Hi all, I'm trying to incorporate some Gravatar functionality using its XML-RPC API in an iPhone app I'm writing. I grabbed the Cocoa XML-RPC Framework by Eric Czarny (http://github.com/eczarny/xmlrpc) and it works well when I tested it with some of the Wordpress methods. However, when I try to use the Gravatar API, I always receive a response of "Error code: -9 Authentication error". I think I'm constructing the request correctly, but I've been wracking my brain and can't seem to figure it out. Maybe someone has some experience with this API or can see what I'm doing wrong. Here's the call: <?xml version="1.0"> <methodCall> <methodName>grav.addresses</methodName> <params> <param><value><string>PASSWORD_HERE</string></value></param> </params> </methodCall> Again, the Cocoa XML-RPC Framework worked like a dream with Wordpress, but it's choking on the Gravatar API for some reason. Thanks for your help.

    Read the article

  • Polymorphic association in reverse

    - by Erik
    Let's say that I have two models - one called Post and one other called Video. I then have a third model - Comment - that is polymorphically associated to to each of these models. I can then easily do post.comments and video.comments to find comments assosciated to records of these models. All easy so far. But what if I want to go the other way and I want to find ALL posts and videos that have been commented on and display these in a list sorted on the date that the comment was made? Is this possible? If it helps I'm working on Rails 3 beta.

    Read the article

  • Invalid binary. A pre-release beta version of the SDK was used to build the application.

    - by erik
    Yesterday I submitted an app to the iphone dev center, no problems at all. Today I did some changes to another existing app and was greeted by the following message when I uploaded my binary: The binary you uploaded was invalid. A pre-release beta version of the SDK was used to build the application. I googled the message and didn't find anything at all. I also tried but failed to update another app, same message there. I have not changed anything in between (that I know) and I have certainly not installed or downgraded my SDK. Building for iPhone 3.0..

    Read the article

  • JScrollPanel without scrollbars

    - by Erik Itland
    I'm trying to use a JScrollPanel to display a JPanel that might be too big for the containing Jpanel. I don't want to show the scrollbars (yes, this is questionable UI design, but it is my best guess of what the customer wants. We use the same idea other places in the application, and I feel this case have given me enough time to ponder if I can do it in a better way, but if you have a better idea I might accept it an answer.) First attempt: set verticalScrollBarPolicy to NEVER. Result: Scrolling using mouse wheel doesn't work. Second attempt: set the scrollbars to null. Result: Scrolling using mouse wheel doesn't work. Third attempt: set scrollbars visible property to false. Result: It is immidiately set visible by Swing. Fourth attempt: inject a scrollbar where setVisible is overridden to do nothing when called with true. Result: Can't remember exactly, but I think it just didn't work. Fifth attempt: inject a scrollbar where setBounds are overridden. Result: Just didn't look nice. (I might have missed something here, though.) Sixth attempt: ask stackoverflow. Result: Pending. Scrolling works once scrollbars are back.

    Read the article

  • How to begin working with git?

    - by Erik Escobedo
    I'm a Ruby on Rails developer and want to use Git for my next project, but I'm not pretty sure how to begin learning this. I have too much basic questions like "Can I run my app from the repository?", or "Can I make a rollback in the live site?" Any help will be apreciated.

    Read the article

  • Image processing with barehands-ruby

    - by Erik Escobedo
    I want to know how to open and manipulate a simple image file in Ruby language. I don't need to do any advanced stuff, just things like open(), get_pixel() and put_pixel() and I don't wanna use any gem for doing that, but just to know the barehands-ruby way.

    Read the article

  • Tomcat on Windows x64 using 32-bit JDK

    - by Erik
    Hoping someone can help. The rub: I can't get Tomcat 5.5 to start as a windows service on 64-bit windows using a 32-bit JDK. the details: I've been running Tomcat 5.5 on Windows Server 2008 (x64) as a service for some time using a 64-bit JDK. I'm being forced to install a 32-bit JDK on this 64-bit machine so I can make use of the Java JAI libraries (no 64-bit JAI version). I have to run Tomcat using this 32-bit JDK. I can run Tomcat using the 32-bit JDK if I start it using /bin/startup.bat Problem is, it will not start as a windows service. I'm using the Tomcat bundled procrun executables. Has anyone had success starting Tomcat as a service using a 32-bit JDK on a 64-bit machine? Thanks for your expertise.

    Read the article

  • C# - Possible to use Subinacl or something else (an api maybe?) from C# code?

    - by Svein Erik
    I've created a program in C# which creates users and adds them to groups, everything is working fine. But I also want to create a "home folder", which is on another server, and the share will be like this: 81file01/users/username. And of course set the rights of the folder to the newly created AD-user. Now we're using a vb-script to do this, and this part is done with Subinacl, but is there a way to do this through my c# code? I'm using .net 3.5 by the way :)

    Read the article

  • Change C# sorting behaviour

    - by Erik
    Lets say i have the strings abc_ and abc2_. Now, normally when sorting i C# abc2_ would come after abc_, leaving the result: abc_ abc2_ I am using this to sort, if it matters: var element = from c in elements orderby c.elementName ascending select c; How can i change this? I want abc_ to come last. Reversing is not an option because the list is contains more than two elements.

    Read the article

  • LaTeX table too wide. How to make it fit?

    - by Erik B
    I just started to learn latex and now I'm trying to create a table. This is my code: \begin{table} \caption{Top Scorers} \begin{tabular}{ l l } \hline \bf Goals & \bf Players\\ \hline 4 & First Last, First Last, First Last, First Last\\ 3 & First Last\\ 2 & First Last\\ 1 & First Last, First Last, First Last, First Last, First Last, First Last, First Last, First Last, First Last, First Last, First Last, First Last, First Last\\ \hline \end{tabular} \end{table} The problem is that the table is wider than the page. I was hoping that it would automatically fit to the page like normal text does, but it didn't. How do I tell latex to make the table fit to the page?

    Read the article

  • How do you distinguish your EC2 instances?

    - by Erik
    The ec2-describe-instances command is not very helpful in distinguishing the instances. Are there command line tools that give a better overview? Perhaps somewhat like http://github.com/newbamboo/manec2 but with support for different regions etc.

    Read the article

  • What am i doing wrong

    - by Erik Sapir
    I have the following code. I need B class to have a min priority queue of AToTime objects. AToTime have operator, and yet i receive error telling me than there is no operator matching the operands... #include <queue> #include <functional> using namespace std; class B{ //public functions public: B(); virtual ~B(); //private members private: log4cxx::LoggerPtr m_logger; class AToTime { //public functions public: AToTime(const ACE_Time_Value& time, const APtr a) : m_time(time), m_a(a){} bool operator >(const AToTime& other) { return m_time > other.m_time; } //public members - no point using any private members here public: ACE_Time_Value m_time; APtr m_a; }; priority_queue<AToTime, vector<AToTime>, greater<AToTime> > m_myMinHeap; };

    Read the article

  • Generate an ID via COM interop

    - by Erik van Brakel
    At the moment, we've got an unmaintanable ball of code which offers an interface to a third party application. The third party application has a COM assembly which MUST be used to create new entries. This process involves two steps: generate a new object (basically an ID), and update that object with new field values. Because COM interop is so slow, we only use that to generate the ID (and related objects) in the database. The actual update is done using a regular SQL query. What I am trying to figure out if it's possible to use NHibernate to do some of the heavy lifting for us, without bypassing the COM assembly. Here's the code for saving something to the database as I envision it: using(var s = sessionFactory.OpenSession()) using(var t = s.BeginTransaction()) { MyEntity entity = new MyEntity(); s.Save(entity); t.Commit(); } Regular NH code I'd say. Now, this is where it gets tricky. I think I have to supply my own implementation of NHibernate.Id.IIdentifierGenerator which calls the COM assembly in the Generate method. That's not a problem. What IS a problem is that the COM assembly requires initialisation, which does take a bit of time. It also doesn't like multiple instances in the same process, for some reason. What I would like to know is if there's a way to properly access an external service in the generator code. I'm free to use any technique I want, so if it involves something like an IoC container that's no problem. The thing I am looking for is where exactly to hook-up my code so I can access the things I need in my generator, without having to resort to using singletons or other nasty stuff.

    Read the article

  • How can I create personalized menus in WPF?

    - by Erik Vullings
    I'm working on an XmlEditor (similar to XmlNotepad, but using WPF) in which I want to implement personalized menus. I.e. only show the most popular MenuItems on first open, and show all MenuItems when the user explicitly asks for it, either by clicking on the double arrow at the bottom or waiting for a certain amount of time. I'm specifically looking for feedback on how I should approach this problem: any thoughts are appreciated!

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >