Search Results

Search found 195 results on 8 pages for 'sir psycho'.

Page 4/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • Detect whether or not a specific attribute was valid on the model

    - by Sir Code-A-Lot
    Having created my own validation attribute deriving from System.ComponentModel.DataAnnotations.ValidationAttribute, I wish to be able to detect from my controller, whether or not that specific attribute was valid on the model. My setup: public class MyModel { [Required] [CustomValidation] [SomeOtherValidation] public string SomeProperty { get; set; } } public class CustomValidationAttribute : ValidationAttribute { public override bool IsValid(object value) { // Custom validation logic here } } Now, how do I detect from the controller whether validation of CustomValidationAttribute succeeded or not? I have been looking at the Exception property of ModelError in the ModelState, but I have no way of adding a custom exception to it from my CustomValidationAttribute. Right now I have resorted to checking for a specific error message in the ModelState: public ActionResult PostModel(MyModel model) { if(ModelState.Where(i => i.Value.Errors.Where((e => e.ErrorMessage == CustomValidationAttribute.SharedMessage)).Any()).Any()) DoSomeCustomStuff(); // The rest of the action here } And changed my CustomValidationAttribute to: public class CustomValidationAttribute : ValidationAttribute { public static string SharedMessage = "CustomValidationAttribute error"; public override bool IsValid(object value) { ErrorMessage = SharedMessage; // Custom validation logic here } } I don't like relying on string matching, and this way the ErrorMessage property is kind of misused. What are my options?

    Read the article

  • GetValue on static field inside nested classes.

    - by Sir Gallahad
    Hi... I have the following class declared. I need to retreive the class structure and the static values without instanciate it. public MyClass() { public static string field = "Value"; public nestedClass() { public static string nestedField = "NestedValue"; } } I've successfuly used GetFields and GetNestedType to recover the class structure and GetValue(null) works fine on field, but not on nestedField. Let me sample: var fi = typeof(MyClass).GetField("field", BindingFlags.Public | BindingFlags.Static); var nt = typeof(MyClass).GetNestedType("nestedClass", BindingFlags.Public); var nfi = nt.GetField("nestedField", BindingFlags.Public | BindingFlags.Static); // All the above references are detected correctly var value = fi.GetValue(null); // until here everything works fine. value == "Value" var nestedValue = nfi.GetValue(null); // this one does not work!! Anyone knows why the last line does not work and how to work around? Thanks.

    Read the article

  • Explaining your system to a client

    - by Sir Graystar
    I'm currently developing a small Database Management System for a local company. How would you go about explaining how the system you have designed to a client? If they are non-technical and have no understanding of programming, how would you go about showing what the system will do and how it will do it? I guess some sort of visual representation of the system but this seems very patronising to me.

    Read the article

  • jquery find child

    - by Sir Lojik
    hi all, ive got a jquery DOM traversing problem... i would like to get the first div (child) of li with id='wpc_pics2840' from the markup below. ie <div class="ui-btn-inner"> <li id="wpc_pics2840"> <div class="ui-btn-inner"> <div class="ui-btn-text"> <a href="#" class="ui-link-inherit"> <img width="40" height="40" src="http://www.veepiz.com/members/jimmydeantony/media/443_thumb.jpg" class="ui-li-thumb ui-corner-bl"> <div style="font-size:9pt;font-weight:normal;">upload a bigger picture....</div> </a> </div><span class="ui-icon ui-icon-arrow-r"></span></div></li> btw, please dont say something like $('.ui-btn-inner')... its got to be the first child div of element with id='wpc_pics2840'

    Read the article

  • Super fast getimagesize in php

    - by Sir Lojik
    Hi all, im trying to get image size(DIMENSIONS) of hundreds of remote images and getimagesize is way too slow. ive done some reading and found out the quickest way would be to use get_file_contents to read a certain aount of bytes from the images and examining the size within the binary data. Anyone attempted this before? How would i examine different formats. Seen any library for this? please let me know

    Read the article

  • How much more productive is an extra monitor?

    - by Sir Graystar
    I am mulling over whether to buy a new monitor, to go along side my current setup of two 24 (ish) inch monitors. What I want to know is whether this is worth the money (probably around £200)? I think most of us will agree that two monitors is much more productive than one when programming and developing (Jeff Atwood has said this many times on his blog, and I imagine that most of you are fans of his), but is three much more productive than two? What I'm worried about is that I will have so much space that one monitor will be used for things that are not related to the task (music, facebook etc.) and it will actually make me less productive.

    Read the article

  • Php text spinner

    - by Sir Lojik
    Hi, i spent time writing a rss feed aggregator and have come to find out it completely has no impact on seo. infact it could be damaging my website. i cant get rid of it as its a commonly used resource. So was wondering is there any hardcore php text spinner(synonimizer) out there. that way i could server crawlers/spiders with spun text. is this ethical? or would it cause more damage? please i need feedback.

    Read the article

  • php search and replace

    - by Dave
    I am trying to create a database field merge into a document (rtf) using php i.e if I have a document that starts Dear Sir, Customer Name: [customer_name], Date of order: [order_date] After retrieving the appropriate database record I can use a simple search and replace to insert the database field into the right place. So far so good. I would however like to have a little more control over the data before it is replaced. For example I may wish to Title Case it, or convert a delimited string into a list with carriage returns. I would therefore like to be able to add extra formatting commands to the field to be replaced. e.g. Dear Sir, Customer Name: [customer_name, TC], Date of order: [order_date, Y/M/D] There may be more than one formatting command per field. Is there a way that I can now search for these strings? The format of the strings is not set in stone, so if I have to change the format then I can. Any suggestions appreciated.

    Read the article

  • Create Custom Sized Thumbnail Images with Simple Image Resizer [Cross-Platform]

    - by Asian Angel
    Are you looking for an easy way to create custom sized thumbnail images for use in blog posts, photo albums, and more? Whether is it a single image or a CD full, Simple Image Resizer is the right app to get the job done for you. To add the new PPA for Simple Image Resizer open the Ubuntu Software Center, go to the Edit Menu, and select Software Sources. Access the Other Software Tab in the Software Sources Window and add the first of the PPAs shown below (outlined in red). The second PPA will be automatically added to your system. Once you have the new PPAs set up, go back to the Ubuntu Software Center and click on the PPA listing for Rafael Sachetto on the left (highlighted with red in the image). The listing for Simple Image Resizer will be right at the top…click Install to add the program to your system. After the installation is complete you can find Simple Image Resizer listed as Sir in the Graphics sub-menu. When you open Simple Image Resizer you will need to browse for the directory containing the images you want to work with, select a destination folder, choose a target format and prefix, enter the desired pixel size for converted images, and set the quality level. Convert your image(s) when ready… Note: You will need to determine the image size that best suits your needs before-hand. For our example we chose to convert a single image. A quick check shows our new “thumbnailed” image looking very nice. Simple Image Resizer can convert “into and from” the following image formats: .jpeg, .png, .bmp, .gif, .xpm, .pgm, .pbm, and .ppm Command Line Installation Note: For older Ubuntu systems (9.04 and previous) see the link provided below. sudo add-apt-repository ppa:rsachetto/ppa sudo apt-get update && sudo apt-get install sir Links Note: Simple Image Resizer is available for Ubuntu, Slackware Linux, and Windows. Simple Image Resizer PPA at Launchpad Simple Image Resizer Homepage Command Line Installation for Older Ubuntu Systems Bonus The anime wallpaper shown in the screenshots above can be found here: The end where it begins [DesktopNexus] Latest Features How-To Geek ETC Macs Don’t Make You Creative! So Why Do Artists Really Love Apple? MacX DVD Ripper Pro is Free for How-To Geek Readers (Time Limited!) HTG Explains: What’s a Solid State Drive and What Do I Need to Know? How to Get Amazing Color from Photos in Photoshop, GIMP, and Paint.NET Learn To Adjust Contrast Like a Pro in Photoshop, GIMP, and Paint.NET Have You Ever Wondered How Your Operating System Got Its Name? Create Shortcuts for Your Favorite or Most Used Folders in Ubuntu Create Custom Sized Thumbnail Images with Simple Image Resizer [Cross-Platform] Etch a Circuit Board using a Simple Homemade Mixture Sync Blocker Stops iTunes from Automatically Syncing The Journey to the Mystical Forest [Wallpaper] Trace Your Browser’s Roots on the Browser Family Tree [Infographic]

    Read the article

  • Problem in installation in My Hp g4 1226se

    - by vivek Verma
    1vivek.100 Dual booting error in Hp pavilion g4 1226se Dear sir or Madam, My name is vivek verma.... I am the user of my Hp laptop which series and model name is HP PAVILION G4 1226SE........ i have purchase in the year of 2012 and month is February.....the windows 7 home basic 64 Bit is already installed in in my laptop.... Now i want to install Ubuntu 12.04 Lts or 13.10 lts..... i have try many time to install in my laptop via live CD or USB installer....and i have try many live CD and many pen drive to install Ubuntu ... but it is not done......now i am in very big problem...... when i put my CD or USB drive to boot and install the Ubuntu......my laptop screen is goes the some black (brightness of my laptop screen is very low and there is very low visibility ) and not showing any thing on my laptop screen..... and when i move the my laptop screen.....then there is graphics option in this screen to installation of the Ubuntu option......and when i press the dual boot with setting button and press to continue them my laptop is goes for shutdown after 2 or 5 minutes..... ...... and Hp service center person is saying to me our laptop hardware has no problem.....please contact to Ubuntu tech support............. show please help me if possible..... My laptop configuration is here...... Hardware Product Name g4-1226se Product Number QJ551EA Microprocessor 2.4 GHz Intel Core i5-2430M Microprocessor Cache 3 MB L3 cache Memory 4 GB DDR3 Memory Max Upgradeable to 4 GB DDR3 Video Graphics Intel HD 3000 (up to 1.65 GB) Display 35,5 cm (14,0") High-Definition LED-backlit BrightView Display (1366 x 768) Hard Drive 500 GB SATA (5400 rpm) Multimedia Drive SuperMulti DVD±R/RW with Double Layer Support Network Card Integrated 10/100 BASE-T Ethernet LAN Wireless Connectivity 802.11 b/g/n Sound Altec Lansing speakers Keyboard Full size island-style keyboard with home roll keys Pointing Device TouchPad supporting Multi-Touch gestures with On/Off button PC Card Slots Multi-Format Digital Media Card Reader for Secure Digital cards, Multimedia cards External Ports 1 VGA 1 headphone-out 1 microphone-in 3 USB 2.0 1 RJ45 Dimensions 34.1 x 23.1 x 3.56 cm Weight Starting at 2.1 kg Power 65W AC Power Adapter 6-cell Lithium-Ion (Li-Ion) What's In The Box Webcam with Integrated Digital Microphone (VGA) Software Operating System: Windows 7 Home Basic 64bit....Genuine..... ......... Sir please help me if possible....... Name =vivek verma Contact no.+919911146737 Email [email protected]

    Read the article

  • Gujarat Fonts - Indic

    - by Navin Talati
    Sir, I need to install Gujarat Fonts - INDIC. From where shell I get the concerned font file to install? I had previously Win XP and the fonts were installed but the same is not applicable for the Ubuntu. In indic case there is a facility to type gujarati as per the pronounciation using english alphabets and also gives display at a corner for guidance that which character required to be typed. Please suggest how to avail the same facility in this Ubuntu.

    Read the article

  • Requirment Analysis Communication

    - by Rahul Mehta
    Hi, Someday s ago we was discussing about the current project, and suddenly sir and my senior started talking about the new feature to add in the project , and i become lost :). i was not able to find how i should provide my input for the new feature. So i want to know what things should be discussed for developing new feature in project and how we can contribute in requirement talk of new features. Please suggest.

    Read the article

  • Microsoft publie son rapport semestriel SIRv16, l'état des lieux sur la sécurité note la montée en puissance des kits d'exploits

    Microsoft publie son rapport semestriel SIRv16, l'état des lieux sur la sécurité note la montée en puissance des kits d'exploits Microsoft a publié le 16e volume de son rapport semestriel SIR (Security Intelligence Report) qui a couvert les menaces de sécurité durant le semestre passé (juillet à décembre 2013). Les cinq pays recensant le plus grand nombre d'attaques au cours de la période sont respectivement le Pakistan, l'Indonésie, l'Algérie, la Tunisie et l'Inde avec un pourcentage d'infection...

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >