Search Results

Search found 17357 results on 695 pages for 'custom attributes'.

Page 10/695 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • While using an ntfs smb share for mac users, do symbolic links and extended attributes work?

    - by scape
    We have a majority of mac users but we'd rather support their file sharing using a Windows server with an ntfs drive, or at least a Linux server with ext3. We've had trouble, much trouble, utilizing the OS X server software and after the years are now looking to abandon it. What's mostly holding us back is the fact that the mac users very often utilize symbolic links and other special features that exist for an HFS+ partition. The shared locations are mostly primary storage and not just used as an archive storage location. While there is an option to create symbolic links under ntfs, I'm curious if there is anything I need to look out for if I were to move the files over to a new partition that's hosted from a Windows server from the HFS+ partition; in addition, how well creating a symbolic link from a mac might work. I am also worried about windows backup software and if it will ruin these special sym links, and how placing permissions on sub-folders will work. Alternatively I could remotely backup the files using a mac and Bru, nonetheless I still want to get away from mac server for hosting the shares.

    Read the article

  • Custom Django tag & jQuery

    - by pocoa
    I'm new to Django. Today I created some Django custom tags which is not that hard. But now I wonder what is the best way to include some jQuery or some Javascript code packed into my custom tag definition. What is the regular way to include a custom library into my code? For example: {% faceboxify item %} So assume that it'll create a specific HTML output for Facebox plugin. I just want to learn some elegant way to import this plugin into my code. I want the above definition to be enough for all functionality. Is there any way to do it? I couldn't find any example. Maybe I'm missing something.. Thank you.

    Read the article

  • C# Custom Control Properties load before Load and arrays are empties

    - by Wildhorn
    Hello, I made a custom control with custom properties. When I modify these properties in the "Form.cs [Design]", I need stuff to happens (it fill some arrays and modify the look of the control), so I call a function within the "set" of the property. All of this works good. My problem is that when I run the program with my custom control, it seems that properties "set" is called, which will call the function, but then, my arrays seems now to have lost all their values and the function use these arrays, but now because they are all empty, it crashes due to NullException blahblahblah. It also seems that properties "set" is called before the control Load (which I guess is called only when it is added to my Form, and not when the Form load). So question is, why does my arrays become empty once I try to run the Form and is there an event that is called before that when the Form load? Thanks

    Read the article

  • Adding a textblock to a custom wpf control (piepiece control from codeplex)

    - by bomortensen
    Hi Stackoverflow! I'm currently building a Surface application where the main navigation is a circular menu. For each menu item I'm using a custom control that I found on codeproject.com: http://www.codeproject.com/KB/WPF/PieChartDataBinding.aspx (PiePiece control) The number of submenu items (which is also piepiece controls) comes from a database and thus dynamically loaded. What I can't figure out is how I add a textblock to this custom control to display the submenu item text. It needs to follow the PiePiece's RotationAngle property to line up correctly. Anyone got a hot-fix for this? I was thinking about adding another dependencyproperty to the piepiece custom control, but that way I can't set the font-family, size etc (can I?) Any input on this is greatly appreciated! Thanks!

    Read the article

  • Wordpress Custom Type permalink containing Taxonomy slug

    - by treznik
    I'm trying to create a permalink pattern for a Custom Type, that includes one of its taxonomies. The taxonomy name is known from the start (so I'm not trying to add or mix all of its taxonomies, just a specific one), but the value will by dynamic, of course. Normally, the Custom Type permalink is built using the rewrite arg with the slug param, but I don't see how I could add a dynamic variable in there. http://codex.wordpress.org/Function_Reference/register_post_type I'm guessing a custom solution is required, but I'm not sure what the best unintrusive approach would be. Is there a known practice for this or has anyone built something similar recently? I'm using WP 3.2.1 btw.

    Read the article

  • Adding Custom Fields to RadScheduler for WinForms Appointments

    When using RadScheduler for WinForms, it will almost always need to be customized in some way. This could come in the form of custom dialogs, context menus, or even custom appointments. In this blog entry, I am going to explain the steps required to add a custom field to RadScheduler. Click here to download the source code and follow along... Adding Custom Fields to Appointments In this example, a custom field for Email will be added to the Appointment class being used by RadScheduler. The process of accomplishing this involves five simple steps. Step 1: Add a Custom Field to the Data Source In order to display a custom field in RadScheduler, the field will first need to already exist in, or be added to the data source. In this example, the database being used is based on the structure of the SchedulerData sample database included with the installation of RadControls for WinForms. Figure 1 shows the structure of the database. Note ...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • How to Use Heading Tags and Alt Attributes

    If you're working with HTML code for the first time, you may be wondering why Heading tags and alt attributes are used as a guide to data within your site's architecture. Search Engine Optimization consultants use HTML header tags to summarize the topic of the page it introduces. Google and other search engines analyze text inside header tags in their algorithm to assign web page rankings. To rank for your target keywords and phrases, incorporate them into your HTML page headers.

    Read the article

  • Give Markup support for Custom server control with public PlaceHolders properties

    - by ravinsp
    I have a custom server control with two public PlaceHolder properties exposed to outside. I can use this control in a page like this: <cc1:MyControl ID="MyControl1" runat="server"> <TitleTemplate> Title text and anything else </TitleTemplate> <ContentTemplate> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Button" /> </ContentTemplate> </cc1:MyControl> TitleTemplate and ContentTemplate are properties of type asp.net PlaceHolder class. Everything works fine. The control gets any content given to these custom properties and produces a custom HTML output around them. If I want a Button1_Click event handler, I can attach the event handler in Page_Load like the following code. And it works. protected void Page_Load(object sender, EventArgs e) { Button1.Click += new EventHandler(Button1_Click); } void Button1_Click(object sender, EventArgs e) { TextBox1.Text = "Button1 clicked"; } But if try to attach the click event handler in aspx markup I get an error when running the application "Compiler Error Message: CS0117: 'ASP.default_aspx' does not contain a definition for 'Button1_Click' <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /> AutoEventWireup is set to "true" in the page markup. This happens only for child controls inside my custom control. I can programatically access child control correctly. Only problem is with event handler assignment from Markup. When I select the child Button in markup, the properties window only detects it as a < BUTTON. Not System.Web.UI.Controls.Button. It also doesn't display the "Events" tab. How can I give markup support for this scenario? Here's code for MyControl class if needed. And remember, I'm not using any ITemplate types for this. The custom properties I provide are of type "PlaceHolder". [ToolboxData("<{0}:MyControl runat=server>" + "<TitleTemplate></TitleTemplate>" + "<ContentTemplate></ContentTemplate>" + "</{0}:MyControl>")] public class MyControl : WebControl { PlaceHolder contentTemplate, titleTemplate; public MyControl() { contentTemplate = new PlaceHolder(); titleTemplate = new PlaceHolder(); Controls.Add(contentTemplate); Controls.Add(titleTemplate); } [Browsable(true)] [TemplateContainer(typeof(PlaceHolder))] [PersistenceMode(PersistenceMode.InnerProperty)] public PlaceHolder TitleTemplate { get { return titleTemplate; } } [Browsable(true)] [TemplateContainer(typeof(PlaceHolder))] [PersistenceMode(PersistenceMode.InnerProperty)] public PlaceHolder ContentTemplate { get { return contentTemplate; } } protected override void RenderContents(HtmlTextWriter output) { output.Write("<div>"); output.Write("<div class=\"title\">"); titleTemplate.RenderControl(output); output.Write("</div>"); output.Write("<div class=\"content\">"); contentTemplate.RenderControl(output); output.Write("</div>"); output.Write("</div>"); } }

    Read the article

  • How can I unit test my custom validation attribute

    - by MightyAtom
    I have a custom asp.net mvc class validation attribute. My question is how can I unit test it? It would be one thing to test that the class has the attribute but this would not actually test that the logic inside it. This is what I want to test. [Serializable] [EligabilityStudentDebtsAttribute(ErrorMessage = "You must answer yes or no to all questions")] public class Eligability { [BooleanRequiredToBeTrue(ErrorMessage = "You must agree to the statements listed")] public bool StatementAgree { get; set; } [Required(ErrorMessage = "Please choose an option")] public bool? Income { get; set; } .....removed for brevity } [AttributeUsage(AttributeTargets.Class)] public class EligabilityStudentDebtsAttribute : ValidationAttribute { // If AnyDebts is true then // StudentDebts must be true or false public override bool IsValid(object value) { Eligability elig = (Eligability)value; bool ok = true; if (elig.AnyDebts == true) { if (elig.StudentDebts == null) { ok = false; } } return ok; } } I have tried to write a test as follows but this does not work: [TestMethod] public void Eligability_model_StudentDebts_is_required_if_AnyDebts_is_true() { // Arrange var eligability = new Eligability(); var controller = new ApplicationController(); // Act controller.ModelState.Clear(); controller.ValidateModel(eligability); var actionResult = controller.Section2(eligability,null,string.Empty); // Assert Assert.IsInstanceOfType(actionResult, typeof(ViewResult)); Assert.AreEqual(string.Empty, ((ViewResult)actionResult).ViewName); Assert.AreEqual(eligability, ((ViewResult)actionResult).ViewData.Model); Assert.IsFalse(((ViewResult)actionResult).ViewData.ModelState.IsValid); } The ModelStateDictionary does not contain the key for this custom attribute. It only contains the attributes for the standard validation attributes. Why is this? What is the best way to test these custom attributes? Thanks

    Read the article

  • Custom Django admin URL + changelist view for custom list filter by Tags

    - by Botondus
    In django admin I wanted to set up a custom filter by tags (tags are introduced with django-tagging) I've made the ModelAdmin for this and it used to work fine, by appending custom urlconf and modifying the changelist view. It should work with URLs like: http://127.0.0.1:8000/admin/reviews/review/only-tagged-vista/ But now I get 'invalid literal for int() with base 10: 'only-tagged-vista', error which means it keeps matching the review edit page instead of the custom filter page, and I cannot figure out why since it used to work and I can't find what change might have affected this. Any help appreciated. Relevant code: class ReviewAdmin(VersionAdmin): def changelist_view(self, request, extra_context=None, **kwargs): from django.contrib.admin.views.main import ChangeList cl = ChangeList(request, self.model, list(self.list_display), self.list_display_links, self.list_filter, self.date_hierarchy, self.search_fields, self.list_select_related, self.list_per_page, self.list_editable, self) cl.formset = None if extra_context is None: extra_context = {} if kwargs.get('only_tagged'): tag = kwargs.get('tag') cl.result_list = cl.result_list.filter(tags__icontains=tag) extra_context['extra_filter'] = "Only tagged %s" % tag extra_context['cl'] = cl return super(ReviewAdmin, self).changelist_view(request, extra_context=extra_context) def get_urls(self): from django.conf.urls.defaults import patterns, url urls = super(ReviewAdmin, self).get_urls() def wrap(view): def wrapper(*args, **kwargs): return self.admin_site.admin_view(view)(*args, **kwargs) return update_wrapper(wrapper, view) info = self.model._meta.app_label, self.model._meta.module_name my_urls = patterns('', # make edit work from tagged filter list view # redirect to normal edit view url(r'^only-tagged-\w+/(?P<id>.+)/$', redirect_to, {'url': "/admin/"+self.model._meta.app_label+"/"+self.model._meta.module_name+"/%(id)s"} ), # tagged filter list view url(r'^only-tagged-(P<tag>\w+)/$', self.admin_site.admin_view(self.changelist_view), {'only_tagged':True}, name="changelist_view"), ) return my_urls + urls Edit: Original issue fixed. I now receive 'Cannot filter a query once a slice has been taken.' for line: cl.result_list = cl.result_list.filter(tags__icontains=tag) I'm not sure where this result list is sliced, before tag filter is applied. Edit2: It's because of the self.list_per_page in ChangeList declaration. However didn't find a proper solution yet. Temp fix: if kwargs.get('only_tagged'): list_per_page = 1000000 else: list_per_page = self.list_per_page cl = ChangeList(request, self.model, list(self.list_display), self.list_display_links, self.list_filter, self.date_hierarchy, self.search_fields, self.list_select_related, list_per_page, self.list_editable, self)

    Read the article

  • WCF RIA Services Custom Type with Collection of Custom Types

    - by Blakewell
    Is it possible to have a custom type within a custom type and have the result returned via WCF RIA services? I have the following two classes below, but I can't gain access to the Verticies property within the Polygon class. I assume it is because it is a custom class, or something to do with it being a List collection. Polygon Class public class Polygon { public Polygon() { _vertices = new List<Location>(); } private int _id; [Key] public int Id { get; set; } private List<Location> _vertices; public List<Location> Vertices { get { return _vertices; } set { _vertices = value; } } } Location Class public class Location { public Location() { } /// <summary> /// Default constructor for creating a Location object /// </summary> /// <param name="latitude"></param> /// <param name="longitude"></param> public Location( double latitude, double longitude ) { _latitude = latitude; _longitude = longitude; } private int _id; [Key] public int Id { get { return _id; } set { _id = value; } } private double _latitude; /// <summary> /// Latitude coordinate of the location /// </summary> public double Latitude { get { return _latitude; } set { _latitude = value; } } private double _longitude; /// <summary> /// Longitude coordiante of the location /// </summary> public double Longitude { get { return _longitude; } set { _longitude = value; } } }

    Read the article

  • jqGrid multi-checkbox custom edittype solution

    - by gsiler
    For those of you trying to understand jqGrid custom edit types ... I created a multi-checkbox form element, and thought I'd share. This was built using version 3.6.4. If anyone has a more efficient solution, please pass it on. Within the colModel, the appropriate edit fields look like this: edittype:'custom' editoptions:{ custom_element:MultiCheckElem, custom_value:MultiCheckVal, list:'Check1,Check2,Check3,Check4' } Here are the javascript functions (BTW, It also works – with some modifications – when the list of checkboxes is in a DIV block): //———————————————————— // Description: // MultiCheckElem is the "custom_element" function that builds the custom multiple check box input // element. From what I have gathered, jqGrid calls this the first time the form is launched. After // that, only the "custom_value" function is called. // // The full list of checkboxes is in the jqGrid "editoptions" section "list" tag (in the options // parameter). //———————————————————— function MultiCheckElem( value, options ) { //———- // for each checkbox in the list // build the input element // set the initial "checked" status // endfor //———- var ctl = ''; var ckboxAry = options.list.split(','); for ( var i in ckboxAry ) { var item = ckboxAry[i]; ctl += '<input type="checkbox" '; if ( value.indexOf(item + '|') != -1 ) ctl += 'checked="checked" '; ctl += 'value="' + item + '"> ' + item + '</input><br />&nbsp;'; } ctl = ctl.replace( /<br />&nbsp;$/, '' ); return ctl; } //———————————————————— // Description: // MultiCheckVal is the "custom_value" function for the custom multiple check box input element. It // appears that jqGrid invokes this function the first time the form is submitted and, the rest of // the time, when the form is launched (action = set) and when it is submitted (action = 'get'). //———————————————————— function MultiCheckVal(elem, action, val) { var items = ''; if (action == 'get') // the form has been submitted { //———- // for each input element // if it's checked, add it to the list of items // endfor //———- for (var i in elem) { if (elem[i].tagName == 'INPUT' && elem[i].checked ) items += elem[i].value + ','; } // items contains a comma delimited list that is returned as the result of the element items = items.replace(/,$/, ''); } else // the form is launched { //———- // for each input element // based on the input value, set the checked status // endfor //———- for (var i in elem) { if (elem[i].tagName == 'INPUT') { if (val.indexOf(elem[i].value + '|') == -1) elem[i].checked = false; else elem[i].checked = true; } } // endfor } return items; }

    Read the article

  • weblogic 10.3 custom authenticator

    - by hbagchi
    we are migrating weblogic from 8.1 to 10.3. We had custom authenticator provider. Is there any standard way to migrate custom authenticator from 8.1 to 10.3? In fact, I could not find the wlManagement.jar in 10.3. I did find a wlManagement.jar file but it only contains .java files, no .class files. Please advise.

    Read the article

  • Custom Control Not Playing Nice With PropertyGrid

    - by lumberjack4
    I have a class that is implementing a custom ToolStripItem. Everything seems to work great until I try to add the item to a ContextMenuStrip at design time. If I try to add my custom control straight from the ContextMenuStrip the PropertyGrid freezes up and will not let me modify my Checked or Text properties. But if I go into the ContextMenuStrip PropertyGrid and add my custom control through the Items(...) property, I can modify the custom control just fine within that dialog. I'm not sure if I'm missing an attribute somewhere of if its a problem with the underlying code. Here is a copy of the CustomToolStripItem class. As you can see, its a very simple class. [ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ContextMenuStrip)] public class CustomToolStripItem : ToolStripControlHost { #region Public Properties [Description("Gets or sets a value indicating whether the object is in the checked state")] [ReadOnly(false)] public bool Checked { get { return checkBox.Checked; } set { checkBox.Checked = value; } } [Description("Gets or sets the object's text")] [ReadOnly(false)] public override string Text { get { return checkBox.Text; } set { checkBox.Text = value; } } #endregion Public Properties #region Public Events public event EventHandler CheckedChanged; #endregion Public Events #region Constructors public CustomToolStripItem() : base(new FlowLayoutPanel()) { // Setup the FlowLayoutPanel. controlPanel = (FlowLayoutPanel)base.Control; controlPanel.BackColor = Color.Transparent; // Add the child controls. checkBox.AutoSize = true; controlPanel.Controls.Add(checkBox); ContextMenuStrip strip = new ContextMenuStrip(); } #endregion Constructors #region Protected Methods protected override void OnSubscribeControlEvents(Control control) { base.OnSubscribeControlEvents(control); checkBox.CheckedChanged += new EventHandler(CheckChanged); } protected override void OnUnsubscribeControlEvents(Control control) { base.OnUnsubscribeControlEvents(control); checkBox.CheckedChanged -= new EventHandler(CheckChanged); } #endregion Protected Methods #region Private Methods private void CheckChanged(object sender, EventArgs e) { // Throw the CustomToolStripItem's CheckedChanged event EventHandler handler = CheckedChanged; if (handler != null) { handler(sender, e); } } #endregion Private Methods #region Private Fields private FlowLayoutPanel controlPanel; private CheckBox checkBox = new CheckBox(); #endregion Private Fields }

    Read the article

  • Flex - Custom Component - Percentage Width/Height

    - by Hamish
    I am trying to create a Custom Flex Component using the Flex Component framework: http://www.adobe.com/livedocs/flex/3/html/help.html?content=ascomponents_advanced_3.html. All good components allow you to define their dimensions using percentage values using: MXML: TextInput width="100%" or Actionscript at runtime: textinp.percentWidth = 100; My question is how do you implement percentage width/height in the measure() method of your custom component? More specifically, these percentages are converted to pixels values at some stage, how is this done?

    Read the article

  • ASP.NET MVC2 - Resolve Parameter Attribute in Model Binder

    - by Nathan Taylor
    Given an action like: public ActionResult DoStuff([CustomAttribute("foo")]string value) { // ... } Is there any way to resolve the instance of value's CustomAttribute within a ModelBinder? I was looking at the MVC sources and chances are I'm just doing it wrong, but when I tried to replicate their code which retrieves the BindAttribute for a complex model, calling GetAttributes() did not return the attribute I am looking for. DefaultModelBinder GetTypeDescriptor(controllerContext, bindingContext).GetAttributes();

    Read the article

  • ActionScript Creating Custom Filters

    - by TheDarkIn1978
    i would like to create a custom DropShadowFilter that always takes the same arguments and package it. since it's not possible to extend the BitmapFilter class, how can i create a custom filter that is called as part of the filters array on a display object like regular filter? mySprite.filters = [new BlurFilter(5, 5, 3), new CustomDropShadowFilter()];

    Read the article

  • ASP.NET Web Custom Controls

    - by Mohit Kumar
    Hello Experts, I am Beginner. I want to study and create custom controls. I have searched on Google but didn't find any good stuff. Could anybody provide me some nice link or explain me that how can I start custom controls. Thanks in advance.

    Read the article

  • Catch Multiple Custom Exceptions? - C++

    - by Alex
    Hi all, I'm a student in my first C++ programming class, and I'm working on a project where we have to create multiple custom exception classes, and then in one of our event handlers, use a try/catch block to handle them appropriately. My question is: How do I catch my multiple custom exceptions in my try/catch block? GetMessage() is a custom method in my exception classes that returns the exception explanation as a std::string. Below I've included all the relevant code from my project. Thanks for your help! try/catch block // This is in one of my event handlers, newEnd is a wxTextCtrl try { first.ValidateData(); newEndT = first.ComputeEndTime(); *newEnd << newEndT; } catch (// don't know what do to here) { wxMessageBox(_(e.GetMessage()), _("Something Went Wrong!"), wxOK | wxICON_INFORMATION, this);; } ValidateData() Method void Time::ValidateData() { int startHours, startMins, endHours, endMins; startHours = startTime / MINUTES_TO_HOURS; startMins = startTime % MINUTES_TO_HOURS; endHours = endTime / MINUTES_TO_HOURS; endMins = endTime % MINUTES_TO_HOURS; if (!(startHours <= HOURS_MAX && startHours >= HOURS_MIN)) throw new HourOutOfRangeException("Beginning Time Hour Out of Range!"); if (!(endHours <= HOURS_MAX && endHours >= HOURS_MIN)) throw new HourOutOfRangeException("Ending Time Hour Out of Range!"); if (!(startMins <= MINUTE_MAX && startMins >= MINUTE_MIN)) throw new MinuteOutOfRangeException("Starting Time Minute Out of Range!"); if (!(endMins <= MINUTE_MAX && endMins >= MINUTE_MIN)) throw new MinuteOutOfRangeException("Ending Time Minute Out of Range!"); if(!(timeDifference <= P_MAX && timeDifference >= P_MIN)) throw new PercentageOutOfRangeException("Percentage Change Out of Range!"); if (!(startTime < endTime)) throw new StartEndException("Start Time Cannot Be Less Than End Time!"); } Just one of my custom exception classes, the others have the same structure as this one class HourOutOfRangeException { public: // param constructor // initializes message to passed paramater // preconditions - param will be a string // postconditions - message will be initialized // params a string // no return type HourOutOfRangeException(string pMessage) : message(pMessage) {} // GetMessage is getter for var message // params none // preconditions - none // postconditions - none // returns string string GetMessage() { return message; } // destructor ~HourOutOfRangeException() {} private: string message; };

    Read the article

  • In DOM is it OK to use .notation for getting/setting attributes?

    - by Ziggy
    Hi In DOM, is it OK to refer to an element's attributes like this: var universe = document.getElementById('universe'); universe.origin = 'big_bang'; universe.creator = null; universe.style.deterministic = true; ? My deep respect for objects and their privacy, and my sense that things might go terribly wrong if I am not careful, makes me want to do everything more like this: var universe = document.getElementById('universe'); if(universe.hasAttribute('origin')) then universe.origin = 'big_bang'; etc... Is it really necessary to use those accessor methods? Of course it may be more or less necessary depending on how certain I am that the elements I am manipulating will have the attributes I expect them to, but in general do the DOM guys consider it OK to use .notation rather than getters and setters? Thanks!

    Read the article

  • Creating content input form with custom theme (Drupal)

    - by AndrewSmith
    I'm creating a site which I want to place content input form in custom themed template. I opted to do this because I wanted the whole site to be looked uniform. That said, I'm not sure as to what is the best approach to do this. Is it proper to invoke hook_insert/delete/update and hook_perm/hook_access by myself or is there anyway I can still use my custom theme and write a code in a way that drupal would take care of invoking appropriate hooks accordingly? Thanks in advance PS : I'm on drupal 6.x

    Read the article

  • Custom CSS for a 3rd-party site

    - by Justin808
    Is it possible to apply a custom user CSS over a specific site? Say I created a custom CSS file that I wanted to use while browsing the google.com domain, how would I apply it / add it? I would like to know for Firefox and IE if its possible.

    Read the article

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