Search Results

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

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

  • Working with custom role in VB.NET win application

    - by fireBand
    Hi, I am looking for ways to implement custom user-roles in windows application with vb.net. I got a database table called Roles with Administrator and User entries. User cannot see some of the form data. In ASP.NET MVC we can do like. [Authorize(Roles = "Administrator")] public function GetAccount() as Array End Function If it could be done this way that would be great. Thanks in advance.

    Read the article

  • restricting the property type of a custom attribute

    - by Guy
    Does anyone knows if it is possible to define/declare on your own custom attribute a restriction to the field type it may apply on? There are a flags that do restrict the usage of the attribute: [AttributeUsage( AttributeTargets.Property, AllowMultiple = false)] Im looking for something like: UseOnlyOnType = typeof(string) Any ideas?

    Read the article

  • Magento: add product twice to cart, with different attributes!

    - by Peter
    Hello all, i have been working with this for a whole day but i cannot find any solution: I have a product (lenses), which has identical attributes, but user can choose one attribute set for one eye and another attribute set for another. On the frontend i got it ok, see it here: http://connecta.si/clarus/index.php/featured/acuvue-oasys-for-astigmatism.html So the user can select attributes for left or right eye, but it is the same product. I build a function, wich should take a product in a cart (before save), add other set of attributes, so there should be two products in the cart. What happens is there are two products, but with the same set of attributes??? Here is the snippet of the function: $req = Mage::app()-getRequest(); $request[’qty’] = 1; $request[’product’] = 15; $request[’uenc’] = $req-get(’uenc’); $request[’options’][1] = 1; $request[’options’][3] = 5; $request[’options’][2] = 3; $reqo = new Varien_Object($request); $newitem = $quote-addProduct($founditem-getProduct(), $reqo); //add another one ------------------------------------------ $request[’qty’] = 1; $request[’product’] = 15; $request[’uenc’] = $req-get(’uenc’); $request[’options’][1] = 2; $request[’options’][3] = 6; $request[’options’][2] = 4; $reqo = new Varien_Object($request); $newitem = $quote-addProduct($founditem-getProduct(), $reqo); Or another test, with some other functions (again, product added, with 2 quantity , but same attributes...): $req = Mage::app()-getRequest(); $request[’qty’] = 1; $request[’product’] = 15; $request[’uenc’] = $req-get(’uenc’); $request[’options’][1] = 2; $request[’options’][3] = 6; $request[’options’][2] = 4; $product = $founditem-getProduct(); $cart = Mage::getSingleton(’checkout/cart’); //delete all first… $cart-getItems()-clear()-save(); $reqo = new Varien_Object($request); $cart-addProduct($founditem-getProduct(), $reqo); $cart-getItems()-save(); $request[’options’][1] = 1; $request[’options’][3] = 5; $request[’options’][2] = 3; $reqo = new Varien_Object($request); $cart-addProduct($founditem-getProduct(), $reqo); $cart-getItems()-save(); i really dont know what more to do, please any advice, this is my first module in magento… thank you, Peter

    Read the article

  • ASP MVC: Custom Validation Attribute

    - by user323395
    I'm trying to write my own Custom Validation attribute but i'm having some problems. The attribute i'm trying to write is that when a user logs in, the password will be compared against the confirmation password. namespace EventCompanion.Data.Attributes { public class ComparePassword : ValidationAttribute { public string PasswordToCompareWith { get; set; } public override bool IsValid(object value) { if (PasswordToCompareWith == (string)value) { return true; } return false; } } Now my problem is when i'm trying to set the attribute like this in the model file: [Required] [ComparePassword(PasswordToCompareWith=ConfirmPassword)] public string Password { get; set; } [Required] public string ConfirmPassword { get; set; } } I get the following error: Error 1 An object reference is required for the non-static field, method, or property 'Project.Data.Models.GebruikerRegistreerModel.ConfirmPassword.get' It seems that VS is not accepting the confirmpassword in the "PasswordToCompareWith=ConfirmPassword" part Now my question: What am i doing wrong? Thanks in advance!!!

    Read the article

  • SNMP custom script :: OID not increasing

    - by amprantino
    I try to create a custom SNMP oid. I add the following like to snmpd.conf (and restart service) : pass .1.3.6.1.3.2 /bin/myscript.sh cat myscript.sh #!/bin/sh echo .1.3.6.1.3.2 echo gauge exec 100 snmpwalk -c mycommunity -v2c 10.2.1.4 .1.3.6.1.3.2 SNMPv2-SMI::experimental.2 = Gauge32: 100 Error: OID not increasing: SNMPv2-SMI::experimental.2 >= SNMPv2-SMI::experimental.2 Is snmpwalk expecting anything at the end of the query ? snmpget work with no problem! Thank you

    Read the article

  • How to implement custom domain feature like posterous?

    - by Weiwei
    here is how posterous works, I make a A record of DNS of my domain (blog.mydomainname.com) to posterous IP address 67.207.139.81 , in the manage panel of posterous , i put my custom domain (blog.meetingly.com). Then i can reach my posterous blog http://mydomainname.posterous.com from http://blog.mydomainname.com url. How posterous implements this? Is this a DNS level thing or web server level setting? Thanks a lot!

    Read the article

  • AdSense (reports) and custom channels

    - by RobbertT
    Please help me to further understand custom channels. As Google says it is a way to map your ads, but I still have a few questions: Is it correct that a single custom channel per 1 ad is not very useful, since you can specify Ad blocks in the AdSense reports? I have multiple Ads in multiple custom channels. After this I created 1 custom channel and added all the ads to it. I made this channel targetable, so people can target through this channel on all ads at once. Is this a good way to do it? In other words, is it possible to have ads in multiple custom channels (without targeting, just for analyzing) and then create 1 custom channel with targeting that embraces all the (desired) ads? Why is it not possible for me to analyze custom channels (or ad blocks & formats) per site in the Adsense (reports). Or am I doing something wrong? If not, I have to create different custom channels per site to see how certain ads are doing on a site level?

    Read the article

  • Need software to convert RAR to ZIP ("store" mode - no compression) * Extract->re-archive changes date/time attributes

    - by Larry78
    I have tried all of the following applications (download.cnet.com - the free ones), and none of them will convert an RAR archive to a ZIP, without compressing the files ("store" mode). 7-ZIP would be fine, too. [The RAR is a "solid" archive with password (I know it), files "stored" - no compression, used WinRAR 3.5.1] PeaZip, 7-Zip, FilZip, TugZip, SimplyZipSE, QuickZip, WinShrink. (A couple of the apps let you try, but the program gives an error - indicating how bad the software is. (Like "unknown header # #.") None of these apps will do the conversion at all. IZArc 4.1 comes the closest. It will convert an RAR to a ZIP, but it compresses the zip. There is a general preference setting to "store" - but it doesn't effect conversions. I don't want to extract the RAR files and re-archive them because I need to preserve the modified/created file attributes. IZArc preserves them, but it compresses the files. WinRAR has the option to convert archives, but I get the error "skipping encryped archive" when I try to convert it. It asks for the password first, and I know it's right because that password opens the archive, and I can read/view all the files in the archive.

    Read the article

  • Are there any other ways to iterate through the attributes of a custom class, excluding the in-built ones?

    - by Ricardo Altamirano
    Is there another way to iterate through only the attributes of a custom class that are not in-built (e.g. __dict__, __module__, etc.)? For example, in this code: class Terrain: WATER = -1 GRASS = 0 HILL = 1 MOUNTAIN = 2 I can iterate through all of these attributes like this: for key, value in Terrain.__dict__.items(): print("{: <11}".format(key), " --> ", value) which outputs: MOUNTAIN --> 2 __module__ --> __main__ WATER --> -1 HILL --> 1 __dict__ --> <attribute '__dict__' of 'Terrain' objects> GRASS --> 0 __weakref__ --> <attribute '__weakref__' of 'Terrain' objects> __doc__ --> None If I just want the integer arguments (a rudimentary version of an enumerated type), I can use this: for key, value in Terrain.__dict__.items(): if type(value) is int: # type(value) == int print("{: <11}".format(key), " --> ", value) this gives the expected result: MOUNTAIN --> 2 WATER --> -1 HILL --> 1 GRASS --> 0 Is it possible to iterate through only the non-in-built attributes of a custom class independent of type, e.g. if the attributes are not all integral. Presumably I could expand the conditional to include more types, but I want to know if there are other ways I'm missing.

    Read the article

  • Izpack: Creating custom panels

    - by bguiz
    Hi, I am trying to create a custom panel for an IzPack installer. This means that I have to extend IzPanel. However, it appears that if I do this, the extended panel needs to be in the com.izforge.izpack.panels package. Then I found this post, which stipulates that: As such, you must include installer.jar from the lib folder of IzPack in the build path of your custom panel project. Your custom panel /must/ extend com.izforge.izpack.installer.IzPanel. Furthermore, it /must/ reside in the com.izforge.izpack.panels package. On top of it all, your build jar's name /must/ be the same as the unqualified name of your custom panel class. I take issue with the 1st and 4th points. They imply that I have to create an additional JAR file for each custom IzPanel that I create. Also, I would have to modify the IzPack installation by adding these JARs to one of its subdirectories. Is this article outdated (2008) and can it be safely ignored, or is this still true? If not how can I avoid this and simply have the extended IzPanel on the classpath instead? Thank you!

    Read the article

  • .NET WebService Custom Attribute

    - by DownChapel
    I would like to add a custom attribute to a asmx web service to determine if the request is valid based on the client IP address. This is a similar idea to the AuthorizeAttribute in ASP.NET MVC. Is there anywhere (e.g. a HTTP module) I can put the code to look at the attribute on the webservice and decide whether to allow the request or not? In my web.config the handler for asmx is the ScriptHandlerFactory from the System.Web.Extensions dll. I have already implemented the functionality with a HTTP module and a config file with a list of allowed URLs, but I would prefer to get rid of the config file and just add an attribute to the webservice class. Thanks

    Read the article

  • Window Installer custom action BEFORE any validation

    - by Marc
    I wrote a Windows Installer custom action based on the tutorial found here: http://www.codeproject.com/kb/install/msicustomaction.aspx My custom action is killing a background process of a given name which could still be opened by the user. The reason is that I don't want users to see the warning that a given EXE is running and must be closed so that setup can continue. This works fine when the MSI passes through the UI sequence as the action is created in "InstallUISequence" table like in the tutorial. However, when the MSI is used silently (right-click and select repair or uninstall), then my custom action isn't executed of course. Where do I have to put my custom action so that it is executed immediately also when run silently? I tried adding it to "InstallExecuteSequence", but the 'app running' warning is still shown. I then tried lowering the sequence number of my custom action to 5, but this also didn't help. Note: I'm using Orca to modify an MSI generated from a Visual Studio setup project. I'm then using the transform file to apply it.

    Read the article

  • Windows Installer custom action BEFORE any validation

    - by Marc
    I wrote a Windows Installer custom action based on the tutorial found here: http://www.codeproject.com/kb/install/msicustomaction.aspx My custom action is killing a background process of a given name which could still be opened by the user. The reason is that I don't want users to see the warning that a given EXE is running and must be closed so that setup can continue. This works fine when the MSI passes through the UI sequence as the action is created in "InstallUISequence" table like in the tutorial. However, when the MSI is used silently (right-click and select repair or uninstall), then my custom action isn't executed of course. Where do I have to put my custom action so that it is executed immediately also when run silently? I tried adding it to "InstallExecuteSequence", but the 'app running' warning is still shown. I then tried lowering the sequence number of my custom action to 5, but this also didn't help. Note: I'm using Orca to modify an MSI generated from a Visual Studio setup project. I'm then using the transform file to apply it.

    Read the article

  • Custom fine-grained claims based authorization system in ASP.NET MVC - wheres and hows

    - by BuzzBubba
    So, I'd like to implement my own custom authorization system in MVC2. If I'd have to create a global class, where do I instantiate it? Can HttpContext be extended with my own additions and where do I do that? Should I use Authorization filters for rights validation or ActionFilters or do it within an action? Can ActionFilter pass any data to the action itself? Previously (in WebForms) I was using a Session object where I would put a serialized object containing essential user data (account id and a list of roles and rights) and I'd extend my own Page class.

    Read the article

  • Email an image via custom url scheme

    - by Amaresh
    I am using custom url schemes. I can send string messages as parameters to my custom url and emailing this to any person. When any person opens this email attachment in device in it open my app installed in device with the passed parameters in my custom url. Similarly how to email an image via custom url and when any person opens this attachment the image is passed to my app in device. I tried to encode the image in base64 format and tried to append to my url,but not working. Any ideas?? Thanks in advance

    Read the article

  • WPF Custom Control with Image problem

    - by user311883
    Hi all, I am quite new to WPF/XAML and I am currently facing a problem. I have a solution with two projects in it, the first project is a Custom Control Library with a custom Window form control inside. The second project is a WPF application using my custom window form. All work fine except for the form Icon. In the WPF application project I set my window icon property to "/ProjectTwoNameSpace;component/Resources/Images/Film.ico", and in the WPF custom control I try to show that image that way : <Image Grid.Column="0" Margin="3" Width="27" Height="27"> <Image.Source> <BitmapImage UriSource="{Binding Path=Icon}" /> </Image.Source> </Image> But it doesn't work, I get a error at runtime saying that the property UriSource or StreamSource must be set for my tag. Anyone can help me ? I think it's jsut a WPF newbie problem ^^

    Read the article

  • flex custom events bubbling

    - by Rajeshbabu TRC
    Dear Richard Szalay, i go through your answers regarding bubbling, i want explore bubbling more. Please see my sample below <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:view="com.view.*" > } ]] In my custom event class i set bubbling=true, cancelable=true I can understand from previous answer that bubbling only affects UI components; events fired from custom classes will not bubble, even if the bubbles argument is set to true. My question is how can i prevent panelClickHandler function got fired when i click button in the "Load" (custom component)?? pleas explain bubbling with good example ( like to have with custom event classes)?

    Read the article

  • Get all custom fields that belong to a certain box in Wordpress

    - by user252160
    How can I get all custom fields that belong to a certain box only. For example, I am using the "more fields" plugin which allows me to create boxes of custom fields for instance a box called "hotel features" with different custom fields as the particular features. Teh point is that when I extract meta data in the template, there is no way, known to me, how to get only the fields that belong to the "hotel features box", say. Please, help with suggestions

    Read the article

  • NetBeans create and instantiate programatically custom swing widgets

    - by RenegadeAndy
    Hey! I have a problem I know how I would solve easily developing under eclipse - but not so easily developing under net beans. I want to create a custom swing widget - which I can instantiate by code as many as I need and attach them to my main panel. I have developed the rest of the GUI using the GUIBuilder. The problem is - im not entirely sure how to do this. Say I got 20 results back from a web service, I would wana loop round - and add 20 of these custom swing widgets - the custom swing widgets would look as follows : :Picture: :Label: :Label: Can anybody please help me, im not entirely sure how to do the custom widget either! Thanks in advance for any support. Andy

    Read the article

  • Wordpress show next 3 x number adjacent custom posts from existing

    - by user2463284
    On a single/detail Custom Post Page I would like to display a custom nav of li's or divs in a sidebar that displays both title, excerpt and permalink for the next 3 posts within the custom post series. So if we are on custom post 3 then it would show 4, 5, 6 in the sidebar. The closest I've found to this is :-= global $post; $current_post = $post; // remember the current post for($i = 1; $i <= 3; $i++){ $post = get_previous_post(); // this uses $post->ID setup_postdata($post); // do your stuff here the_title(); } $post = $current_post; // restore Problem is this only shows the first next post and I need to show 3. Thanks Glennyboy

    Read the article

  • C# custom control: Use internal content as Text field

    - by Ed Woodcock
    I'm creating a custom control, and I want to get all the stuff within the tags and use it as a string Text field on my control: i.e. <custom:control ID="C" runat="server">This text should go into the text property</custom:control> Does anyone know how to achieve this? I've tried the following attributes on my text field (copied from the Literal control) but it doesn't seem to work! [DefaultValue(""), Bindable(true), Localizable(true)]

    Read the article

  • Custom 403 Error page not showing

    - by Rahul Sekhar
    I want to restrict access to certain folders (includes, xml and logs for example) and so I've given them 700 permissions, and all files within them 600 permissions. Firstly, is this the right approach to restrict access? I have a .htaccess file in my root that handles rewriting and error documents. There are two pages in the root - 403.php and 404.php - for 403 and 404 errors. And I have these rules added to my .htaccess file: ErrorDocument 404 /404.php ErrorDocument 403 /403.php Now, the 404 page works just fine. The 403 page does not show when I try to access the 'includes' folder - I get the standard apache 403 error page instead, saying 'Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.' However, when I try going to the .htaccess file (in the web root) in my browser, I get my custom 403 error page. Why is this happening?

    Read the article

  • Apache: how to set custom 401 error page and save original behaviour

    - by petRUShka
    I have Kerberos-based authentication with Apache/2.2.3 (Linux/SUSE). When user is trying to open some url, browser ask him about domain login and password like in HTTP Basic Auth. If user cancel such request 3 times Apache returns 401 Authorization Required error page. My current virtual host config is <Directory /home/user/www/current/public/> Options -MultiViews +FollowSymLinks AllowOverride None Order allow,deny Allow from all AuthType Kerberos AuthName "Domain login" KrbAuthRealms DOMAIN.COM KrbMethodK5Passwd On Krb5KeyTab /etc/httpd/httpd.keytab require valid-user </Directory> I want to set nice custom 401 error page with some instructions for users. And I added such line in virtual host config: ErrorDocument 401 /pages/401 It works, when user can't authorize apache redirects him to my nice page. But Apache doesn't ask user login\password as it did before. I want this functionality and nice error page simultaneously! Is it possible to make it works properly?

    Read the article

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