Search Results

Search found 1537 results on 62 pages for 'customize'.

Page 42/62 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Attachment_fu: can't disable :partition option

    - by Nathan Long
    I'm trying to use the Attachment_Fu plugin in a Rails project, and want to customize the paths where uploaded files are saved. The documentation shows this option: :partition # Whether to partiton files in directories like /0000/0001/image.jpg. Default is true. (The 0001 part is an ID from a table.) I don't want that, so I set the partition option to false, like so: class Photo < ActiveRecord::Base has_attachment :content_type => :image, :storage => :file_system, :max_size => 500.kilobytes, :resize_to => '320x200', :thumbnails => {:thumb => '100x100>' }, :partition => false validates_as_attachment end ...but the :partition => false option has no effect. Has anybody else encountered this problem? How did you fix it?

    Read the article

  • Automatically number items in a wpf listbox

    - by evan
    I have a person class with two properties, Name an Age. I know how to use databinding to display a collection of person in a wpf list box and how to modify the listitemtemplate to customize how each person is displayed. Now I'd like to number each person on the list according to the order they appear on the list (which could change as the the items were sorted via name or age in the display). Is there a way to do that with the item template so instead of having a list like Rob - 14 John - 56 Suzy - 32 it would be 1) Rob - 14 2) John - 56 3) Suzy - 32 Basically i'd like to do something like: <ListView.ItemTemplate> <DataTemplate> <WrapPanel> **<TextBlock Text="{Binding CurrentPositionInList}" />** <TextBlock Text="{Binding Path=Name}" /> <TextBlock Text="{Binding Path=Age}" /> </WrapPanel> </DataTemplate> Thanks in advance!

    Read the article

  • Custom GridView delete button

    - by abatishchev
    How can I customize automatically generated command button, e.g. Delete? I want to add a client confirmation on deleting and in the same moment I want this button would be generated on setting AutoGenerateDeleteButton="true". Is it possible?? I can add a custom button this way: <asp:TemplateField> <ItemTemplate> <asp:LinkButton runat="server" CommandName="Delete" OnClientClick="return confirm('Delete?')">Delete</asp:LinkButton> </ItemTemplate> </asp:TemplateField> but it will be not automatically localized and will be not generated on setting AutoGenerateDeleteButton="true"!

    Read the article

  • Sanitizing CSS in Rails

    - by Erik
    Hello! I want to allow the users of a web app that I'm building to write their own CSS in order to customize their profile page. However I am aware of this opening up for many security risks, i e background: url('javascript:alert("Got your cookies! " + document.cookies'). Hence I am looking for a solution to sanitize the CSS while still allowing as much CSS functionality as possible for my users. So my questions if anyone anyone knows of a gem or a plugin to handles this? I've googled my brains out already so any tips would be really appreciated!

    Read the article

  • Render Html from a lambda in MVC

    - by Thad
    I have the following code to generate a list and will allow developers to customize the output if needed. <% Html.List<MyList>(item => item.Property).Value(item => return "<div>" + item.Property + "<br/>" + item.AnotherProperty + "</div>").Render() %> This is not ideal, how can I allow the developers to add the html similar to other controls. <% Html.List<MyList>(item => item.Property).Value(item => %> <div><%=item.Property%><br/><%=item.AnotherProperty%></div><%).Render() %> This way is much cleaner and standard with the rest of mvc.

    Read the article

  • How do you enable block folding for Python comments in TextMate?

    - by Dave Gallagher
    In TextMate 1.5.10 r1623, you get little arrows that allow you to fold method blocks: Unfortunately, if you have a multi-lined Python comment, it doesn't recognize it, so you can't fold it: def foo(): """ How do I fold these comments? """ print "bar" TextMate has this on their site on how to customize folding: http://manual.macromates.com/en/navigation_overview#customizing_foldings ...but I'm not skilled in regex enough to do anything about it. TextMate uses the Oniguruma regex API, and I'm using the default Python.tmbundle updated to the newest version via GetBundles. Does anyone have an idea of how to do this? Thanks in advance for your help! :)

    Read the article

  • Replace input type=file by an image

    - by nikospkrk
    Hi, Like a lot of people, I'd like to customize the ugly input type=file, and I know that it can't be done without some hacks and/or javascript. But, the thing is that in my case the upload file buttons are just for uploading images (jpeg|jpg|png|gif), so I was wondering if I could use a "clickable" image which would act exactly as an input type file (show the dialog box, and same $_FILE on submitted page). I found some workaround here, and this interesting one too (but does not work on Chrome =/). What do you guys do when you want to add some style to your file buttons? If you have any point of view about it, just hit the answer button ;) Cheers, Nicolas

    Read the article

  • Can you change/redirect a django form's function by passing in your own function?

    - by Derek
    I'm dealing with django-paypal and want to change the button src images. So I went the the conf.py file in the source and edited the src destination. However, I really want to leave the source alone, and I noticed that the class PayPalPaymentsForm(forms.Form): has def get_image(self): return { (True, self.SUBSCRIBE): SUBSCRIPTION_SANDBOX_IMAGE, (True, self.BUY): SANDBOX_IMAGE, (True, self.DONATE): DONATION_SANDBOX_IMAGE, (False, self.SUBSCRIBE): SUBSCRIPTION_IMAGE, (False, self.BUY): IMAGE, (False, self.DONATE): DONATION_IMAGE, }[TEST, self.button_type] which handles all the image src destinations. Since changing this def in the source is worse than changing conf, I was wondering if there was a way to pass in customized defs you make like passing in initial arguments in forms? This way no source code is changed, and I can customize the get_image def as much as I need. passing in def something like this? def get_image(self): .... .... paypal = { 'amount': 10, 'item_name': 'test1', 'item_number': 'test1_slug', # PayPal wants a unique invoice ID 'invoice': str(uuid.uuid4()), } form = PayPalPaymentsForm(initial=paypal, get_image) Thanks!

    Read the article

  • Sanitize HTML before storing in the DB or before rendering? (AntiXSS library in ASP.NET)

    - by user102533
    I have an editor that lets users add HTML that is stored in the database and rendered on a web page. Since this is untrusted input, I plan to use Microsoft.Security.Application.AntiXsSS.GetSafeHtmlFragment to sanitize the HTML. Should I santiize before saving to the database or before rendering the untrusted input into the webpage? Is there an advantage in including the AntiXSS source code in my project instead of just the DLL? (Maybe I can customize the white list?) Which class file should I look in for actual implementation of the GetSafeHtmlFragment

    Read the article

  • Passing session data to ModelForm inside of ModelAdmin

    - by theactiveactor
    I'm trying to initialize the form attribute for MyModelAdmin class inside an instance method, as follows: class MyModelAdmin(admin.ModelAdmin): def queryset(self, request): MyModelAdmin.form = MyModelForm(request.user) My goal is to customize the editing form of MyModelForm based on the current session. When I try this however, I keep getting an error (shown below). Is this the proper place to pass session data to ModelForm? If so, then what may be causing this error? TypeError at ... Exception Type: TypeError Exception Value: issubclass() arg 1 must be a class Exception Location: /usr/lib/pymodules/python2.6/django/forms/models.py in new, line 185

    Read the article

  • Resharper 5 - enable/disable on the fly

    - by Cristi Diaconescu
    I want to disable ReSharper 5 when debugging - it slows things down more than I'm willing to take. Is there an automatic way to do this? The next best thing would be a toolbar button to manually enable/disable it. On the Tools - Options - ReSharper page there's a comment that the VS command Resharper_ToggleSuspended would do just this. The problem is, I can't find the command when I right-click a toolbar - Customize... - 'Commands' tab - Choose 'Resharper' category. Am I missing something?

    Read the article

  • Django 1.2 crash course needed

    - by delusionalweekendwarrior
    I know Python but I've never used Django. What do I need to know about Django 1.2 to port my typical PHP CRUD web application in one weekend? (Yes I've read Joel Spolsky's Netscape article :-)) I'm reading this tutorial right now and it's excellent. I'm already playing around with inspectdb to generate my models from the existing schema. I'm planning to use the following features of Django this weekend: Fragment caching Static asset versioning (for far future expires) Schema migrations (or whatever they're called in Django) Auto-admin (and customize it later) The test framework ...other stuff I probably don't know about yet I'm familiar with all these concepts in other languages/frameworks, except for the ORM which I've never used. I know SQL pretty well though. Any links, sage bits of advice, gotchas, stuff not mentioned in the (excellent) tutorial/docs, or stuff that is mentioned but warrants repeating == very welcome. Thanks!

    Read the article

  • What alternative is there to writing a TCP/IP data relay?

    - by LoudNPossiblyRight
    I am about to write a tcp/ip data relay - application that passes a one way stream of data from one host/port to another host/port. Initially it will be generic, but later on i will customize it to the need of a specific business request. I am guessing that something generic already exists out there so my question is: Has anyone used a third party (preferably open source) data relay in a production environment, if so what is, and do you recommend it? Any platform is fine. Thanks.

    Read the article

  • Customizing Log4j to filter PatternLayout

    - by JavaScriptDude
    Greetings, I have just starting migrating to WLS 10.x and have noticed that the thread name [%t] for WL is quite verbose and more informative than I need for my deployment needs. Ultimately, I only care about the thread ID but WL gives me this:    [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' ~ Does anybody know if there is a way in log4j to write a custom filter that will allow me to override PatternLayout so I can parse the WLS Thread Name to just output the thread ID which in this case above is 0. I'd rather extend then customize as it makes upgrading libraries so much easier. Thanks :) - JsD

    Read the article

  • Customizing the Ajax Html Editor

    - by kiran826
    Hi, I am working on customizing the ajax html editor. I got succeded when i use VS 2008/10 selecting the "Web Site" as the template to create my asp.net application. But the same is not working when i create an asp.net application with Web Applications as the template. The problem i am facing here is, when we try to customize any editor, we will create a custome class "MyCustomeEditor", using which we will create the customized editor on our webforms. This is working fine when i am working with Web Sites. In web application, it is not even trying to identify the control, ie, is not a server tag. If, anyone knows any solution how to troubleshoot this problem, please shread some information on this. Thanks, Kiran

    Read the article

  • How to specify the left, right, or title View button in XIB

    - by Sharen Eayrs
    I do not want to create a custom navigation bar. I am pushing a UIViewController and I want to customize how the navigation bar looks for that UIViewController In story board, we just specify the segue and a nav bar show up on the screen. We just drag and drop UIBarItem to the left and right. In XIB, the navigationBar simply doesn't show up. I can add navigation Item but the one I added is ignored. I've heard that there used to be an outlet called navigationItem but it's deprecated for reason I do not know. I can add UINavigationBar, however that would be adding my own custom bar. I want the navBar that's provided by UINavigationController.

    Read the article

  • which layout engine for finding coordinates of html elements on the web page?

    - by Mexx
    I am doing some web data classification task and was thinking if I could get the co-ordinates of html elements as they would appear on a web-browser without taking into consideration any css or javascript being referred in the web page. My language of programming is c++ and the need results for a couple million of pages, so it has to be fast. I know there is a Microsoft COM component which renders the page in a web browser control and then can be queried for position of different html tags. But this is not suitable in my case as it first renders the whole page which takes up a lot of time. So as I found out, there are open-source layout engines WebKit, Gecko that can probably be used for this. But that's a huge piece of code and I need someone to direct me to the right classes or right modules to look into or any previous/similar work someone has done previously. Also, please let me know what you guys think is a good choice if I want to customize the existing code for use with multiple threads to make it faster. Thanks

    Read the article

  • Drupal 6 sign-up booking, reservation system with payments

    - by Lukasz
    Hi Guys. I have tried to find out the working solution for implementing simple events booking system in Drupal 6 (limited places, payment, signing up/buying few places for firends). System does not have to be big but easy to customize events to reserve/book places for. I was surprised of not finding much complete solutions. Most of the time I was directed to use modules like: Date, Calendar, Singup, Singup Ubercraft integration, Ubercraft. Does anybody of you has tested it? Is it working and customizable or you would suggest other alternatives on the subject? Wiil appreciate any recomendations.

    Read the article

  • WPF custom user widgets. Will UI components be standardized?

    - by Andrew Florko
    There are lots of articles and video lessons that describe how to create your unique user widget (graphical control) with WPF. There are tons of technical details what is behind the scene and I feel people enthusiasm with ability to customize widgets as never before. I remember those days when VCL library (Delphi) appeared and there was the same enthusiasm in VCL widgets area. Ability to create VCL controls was nearly the must when you was applying for a job as Delphi developer. This situation continued for several years till professional sophisticated 3'd party UI libraries appeared. Hardly you'll have to create your own VCL widget nowadays. Will WPF widgets enthusiasm die as VCL one?

    Read the article

  • Rails 3 ActiveModel Nested Class I18n

    - by Dave
    Given the following class definition in ruby: class Conversation class Message include ActiveModel::Validations attr_accessor :quantity validates :quantity, :presence => true end end How can you use i18n to customize to error message. For example the correct lookup for the class Conversation would be activemodel: errors: models: conversation: attributes: quantity: blank: "Some custom message" But what is it for the Message class? I tried: activemodel: errors: models: conversation: message: attributes: quantity: blank: "Some custom message" activemodel: errors: models: message: attributes: quantity: blank: "Some custom message" activemodel: errors: models: conversation::message: attributes: quantity: blank: "Some custom message" None of them work Any ideas or is this a bug with ActiveModel or I18n?

    Read the article

  • How to create a 'Hot or Not' website

    - by Casper
    Hi guys, I'd like to create a website with similar concept as 'Hot or Not' where users need to sign up to the website and then upload photos. Each photo can be given a description and some additional fields. Other users may comment and rate the photo entries. On top of that, users may favourite/bookmark (and remove) any photo entries and they're accessible via their profile page That's generally how the website will be. Can't decide on a CMS to use Somehow I'm at a crossroad here. I've done some research and found that Joomla has an extension that is able to pull this website off but the thing is I'm not that comfortable with using Joomla. I work with WordPress most of the time, but I can't seem to figure out how would I build this website with WordPress. Would using BuddyPress make it work? Would hiring a plugin developer to customize some plugins work? What do you guys think?

    Read the article

  • VSTS 2010 Create a custom Process Template

    - by AH
    Hi, I am required to create a custom Process Template on using VSTS 2010 Beta 1. Given that I did not use templates in VSTS 2008 I am not even sure where to start. The TFS and VS 2010 are all installed and configured. First I tried to create a test project and selected a built-in template "MSF for Agile Software etc." I wanted to try to modify (customize) it to begin with but was not sure how to do it. I searched high and low but could not find a sample/walkthrough/hint/help on how to develop a process template from scratch. Sorry for the messy explanation but I am kind of VERY frustrated...

    Read the article

  • How to add netbeans platform for compiling iReport sources?

    - by user356108
    I need to customize iReport sources.. (not creating plugin) Currently i am using iReport 3.7.2 and netbeans 6.5.1 ide. I downloaded the netbeans platform 6.0.1 and followed the procedures as shown in the jaspersoft link on how to compile iReport sources. But when i tried to compile the sources. I am getting errors like libs-xerces-jar is of incompatible specification version. And if i replace the jar new version of that jar in the NetBeans platform 6.0.1-200801291616 folder I am getting org-netbeans-awt.jar is of incompatiable specification version. and the same incompatiable specification version error is throwing for other jars in the netbeans platform folder. Can anyone help me in this issue

    Read the article

  • php quick form creation

    - by Akshey
    Hi, I have been using php from some time and I have noticed that it takes a long time to create a form with validation using php. Are there any scripts or IDE wizards which can assist a programmer to create php forms quickly and also give the programmer flexibility to customize the form easily? I found some webservices which provide such services but they are mostly oriented towards non-programmers and the forms they generate are not easily customizable and do not support all kinds of functionalities. Infact, most of them are meant for generating contact forms. Regards, Akshey

    Read the article

  • Java data structure to use with Hibernate to store unknown number of parameters?

    - by Lunikon
    Following problem: I want to render a news stream of short messages based on localized texts. In various places of these messages I have to insert parameters to "customize" them. I guess you know what I mean ;) My question probably falls into the "Which is the best style to do it?" category: How would you store these parameters (they may be Strings and Numbers that need to be formatted according to Locale) in the database? I'm using Hibernate to do the ORM and I can think of the following solutions: build a combined String and save it as such (ugly and hard to maintain I think) do some kind of fancy normalization and and make every parameter a single row on the database (clean I guess, but a performance nightmare) Put the params into an Array, Map or other Java data structure and save it in binary format (probably causes a lot of overhead size-wise) I tend towards option #3 but I'm afraid that it might be to costly in terms of size in the database. What do you think?

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >