Search Results

Search found 10804 results on 433 pages for 'attribute keys'.

Page 36/433 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • Function keys require Fn modifer. How can I make them default?

    - by RickMeasham
    On my Dell Studio 15, the function keys, by default, do things like switch the radio on/off or change the brightness or sound. To use them as function keys I have to hold down the Fn modifier. I use function keys as function keys a lot more often than I want to change the volume or brightness. Am I missing an obvious setting somewhere in the control panel (Vista Uber Extreme Something)?

    Read the article

  • Wrong keymap in games under OSX

    - by Lo'oris
    While it's somewhat related to gaming, I believe this kind of question definitely belongs here. On most games, I have a very weird problem related to keymap: they apparently load a wrong map, i.e. a legacy one that has not been used since 68k AFAIK, that is a QZERTY, with M to the right of the L. I can't understand why this happens, I guess they use a bugged library for getting keyboard input, I'm not sure. While I can actually bind the keys using this map, sometimes it prevents me from binding some, such as the numbers. A very odd workaround happens with Urban Terror: if I enable and disable fullscreen, it reverts to the correct keymap (didn't try this on other games, such as Aquaria). It may or may not be useful to know that I use a custom keymap but even if I select the standard keymap before starting the game the problem happens anyway.

    Read the article

  • What is an SSH key?

    - by acidzombie24
    I signed up for github and notice the ssh key option which looked interesting. I originally expected something like an ssl key (name, co name, etc). After going through it i notice i only put a password and it is always myuser@comp-name (this is windows). Why? I thought it was a user/pass id and i can create separate keys for separate purpose for privacy reasons. Now i see i am required to use one to create a repository. Also i see something about a 'private key file' when looking at options. What exactly is an SSH Key and how can i create a separate user without creating a separate login in windows.

    Read the article

  • "Half" ssh authorization to a server with git repository

    - by hsz
    Hello ! Currently I have purchased web hosting with ssh access. I have created a git repository on it and if I set my public key in ~/.ssh/authorized_keys file, I have access to that repo, I can push/pull data, etc. This solution allows access for every user that has his public key in authorized_keys file. But there is one thing that I want to avoid. Every user can login to the server too and has access to whole ssh account. Is it possible to create a blacklist of users' keys that will not have an access to ssh ? I see it that way: user logs in to a git - ok, allow for every one user logs in to ssh account ~/.profile file is hooked and called a custom script: check user's public key if public key is in ~/.ssh/blacklist_keys call bash exit/logout Is it possible in any way ?

    Read the article

  • ubuntu 12.10/linux mint 14 ssh-copy-id doesn't work and returns Ambiguous output redirect

    - by Marc
    I recently got a new computer and I'm trying to use ssh-copy-id to put my keys on another server so I can login without password. but when I try ssh-copy-id -i ~/.ssh/id_rsa.pub user@server and after inputting the correct password it returns Ambiguous output redirect. There are no other messages after that. I thought it was maybe just Ubuntu 12.10 so I installed Linux Mint 14 and sure enough exact same thing happens. I've tried removing authorized_keys from the remote server but that didn't change anything.

    Read the article

  • Speedup of fixing an openssl bug with 8192 bit key [on hold]

    - by rubo77
    This is related to this Bug-Report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747453 OpenSSL contains a set of arbitrary limitations on the size of accepted key parameters that make unrelated software fail to establish secure connections. The problem was found while debugging a XMPP s2s connection issue where two servers with long certificate keys (8192 Bit RSA) failed to establish a secure connection because OpenSSL rejected the handshake. This seems to be a small problem to be fixed but although there is an easy patch available to fix the issue in that bug report, no reactions are noticed so far.. The last patch that broke the 2048 barrier took 2 years to be implemented and only resulted in an increase to 4096bit, which seems to be a bad joke. Where would we have to report this to speed up the implementation for such an issue?

    Read the article

  • How to get "Fn" keys to work (Asus 4830T)? (specificly, the "suspend" key)

    - by Pointy
    I've got an Asus 4830T onto which I've just re-installed 12.04 because I installed an SSD. I was running 12.04 before too, which had been upgraded over a few releases. At some point on that old install, I had gotten all the "Fn" keys to work, or at least all the ones I cared about. (Oh except I think the screen brightness keys never worked.) I have no recollection of what I did. Anyway now things are fine, and some of the Fn keys work: the one to turn of the trackpad and the one to turn off wireless (grr I hate that one). However, the "suspend" key for some reason does not work. Now the system will suspend and resume just fine, but I'm having to do it from the menu. Is there an easy (or hard) way to make those work? I'm running straight Ubuntu but with Xfce installed as my normal desktop. (In other words, it's not Xubuntu, though I doubt it matters.) I recall at some point having found some arcane mapping mechanism to bind the Fn keys to actions, but I can't find it now. (I'm perfectly OK with editing weird files; I'm a long-time Unix user.) (Very long-time.)

    Read the article

  • maxlength attribute of a text box from the DataAnnotations StringLength in MVC2

    - by Pervez Choudhury
    I am working on an MVC2 application and want to set the maxlength attributes of the text inputs. I have already defined the stringlength attribute on the Model object using data annotations and it is validating the length of entered strings correctly. I do not want to repeat the same setting in my views by setting the max length attribute manually when the model already has the information. Is there any way to do this? Code snippets below: From the Model: [Required, StringLength(50)] public string Address1 { get; set; } From the View: <%= Html.LabelFor(model => model.Address1) %> <%= Html.TextBoxFor(model => model.Address1, new { @class = "text long" })%> <%= Html.ValidationMessageFor(model => model.Address1) %> What I want to avoid doing is: <%= Html.TextBoxFor(model => model.Address1, new { @class = "text long", maxlength="50" })%> Is there any way to do this?

    Read the article

  • MSTest: Problems with DeploymentItem attribute

    - by Juri
    Hi, I'm currently maintaining an "old" system written in C#.net, removing some obsolete features and doing some refactoring. Thanks god, the previous guy wrote some unit tests (MSTests). I quite comfortable with JUnit tests, but didn't do yet much with MSTests. The test methods have a DeploymentItem attribute, specifying a text file which is parsed by the business logic method that is being tested and a 2nd DeploymentItem where just a path has been specified containing a bunch of TIF files that have to be deployed too. [TestMethod()] [DeploymentItem(@"files\valid\valid_entries.txt")] [DeploymentItem(@"files\tif\")] public void ExistsTifTest() { ... } The tests worked before, but now I had to change the names of the TIF files contained in the \files\tif directory. According to a rule, the TIF filenames have to match a certain pattern which is also checked by the ExistsTifTest() method. Now I had to change the filenames in order to adapt them to the new requirements and suddently the TIF files are no more being deployed as before. Can someone give me a hint why this happens or what may be the cause? The same thing happens also if I add a new text-file say "my2ndTest.txt" beside the "valid_entries.txt" in the \files\valid\ directory with the according DeploymentItem attribute on the test method. The file doesn't get deployed? I got the images now deployed by defining the deployment path directly in the testrunconfig, but I'd like to understand why these things happen or why for instance my new file "my2ndTest.txt" doesn't get deployed while the others do. Thanks a lot. Juri

    Read the article

  • jQuery attribute selector inside a jQuery object

    - by chifliiiii
    Im trying to set up a quicksand with multiple filters and the approach im taking in the following which im not sure if its the best. $filteredItems = $containerClone.find('.portfolio-item-marketing').filter(function(index){ if ( $filterA != 'all' && $filterB != 'all' ) { return jQuery(this).find('.portfolio-item-marketing[data-type~=' + $filterA + ']') || jQuery(this).find('.portfolio-item-marketing[data-type~=' + $filterB + ']'); } if ( $filterA != 'all' && $filterB == 'all' ) { return jQuery(this+'[data-type~='+$filterA+']') ; } if ( $filterA == 'all' && $filterB != 'all' ) { return jQuery(this).find('.portfolio-item-marketing[data-type~=' + $filterB + ']'); } if ( $filterA == 'all' && $filterB == 'all' ) { return jQuery(this).find('.portfolio-item-marketing'); } }); As you see in the code i tried 2 different methods ( First "if" and second "if" ). Im not sure if i can use find inside a filter but i also dont know how to get the attribute from the jQuery object. I can not use jQuery(this).attr('data-type') == $filterA Because the attribute maybe contain various filters .Thats why im trying to use jQuery "~=" Should i give up and end using a indexOf ?

    Read the article

  • Updating CoreData xcdatamodel file troubles - attribute type change

    - by San
    I noticed several questions related to this topic go unanswered. Is this such a gray area that nobody really understands it? Here is my problem: I am a midway in the development of my app and the app has never been used ouside of my iphone simulator.One of the attributes in my core data structure requires a type change.Since my app has never been used outside of my iPhone Simulator, I first deleted the sqlite file. Doubling the effort of this step, I also went into iPhone Simulator menu and selected "Reset Content and Settings...". Than, I edited the xcdatamodel file and changed the type of my attribute. I saved the file and exited. Without any other changes, I compiled. I expected it to fail because of my type change. It did not! After this, I assigned a value with new type to my attribute and it fails to compile?! Is there something else that I need to do for the change to take an effect? I would really, really appreciate an answer to my question. Thank you!

    Read the article

  • Correctly assigning value to a Core Data attribute with an integer data-type

    - by Gordon Fontenot
    I'm missing something here, and feeling like an idiot about it. I'm using a UIPickerView in my app, and I need to assign the row number to a 32-bit integer attribute for a Core Data object. To do this, I am using this method: -(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { object.integerValue = row; } This is giving me a warning: warning: passing argument 1 of 'setIntegerValue:' makes pointer from integer without a cast What am I mixing up here? --Edit 1-- Ok, so I can get rid of the warning by changing the method to do the following: NSNumber *number = [NSNumber numberWithInteger:row]; object.integerValue = rating; However, I still get a value of 0 for object.integerValue if I use NSLog to print it out. object.integerValue has a max value of 5, so I print out number instead, and then I'm getting a number above 62,000,000. Which doesn't seem right to me, since there are 5 rows. If I NSLog the row variable, I get a number between 0 and 5. So why do I end up with a completely different number after casting the number to NSNumber? --Edit 2-- Ok, so I'm realizing that there is some fundamental idea that I don't understand. I now understand that the 60 million + number can be cast back to the correct 0-5 number by using integerValue. So, it seems my question is how can I save an integer between 0-5 to the attribute if the NSNumber that is returned is over 60 million? Do I need to be using a different data type?

    Read the article

  • validation properties by attribute

    - by netmajor
    I create class with two property - name,link(below). I use simple property validation by Required and StringLength attribute. I bind this class object to WPF ListBox(with textBoxs). But when I have textbox empty or write words longer than 8 sign nothing happens :/ What should I do to fires ErrorMessage? Or how to implement validation in other way ? I also try use : if (value is int) { throw new ArgumentException("Wpisales stringa!!"); } But it only fires in debug mode :/ My class with implementation of attribute validation: public class RssInfo : INotifyPropertyChanged { public RssInfo() { } public RssInfo(string _nazwa, string _link) { nazwa = _nazwa; link = _link; } private string nazwa; [Required(ErrorMessage = "To pole jest obowiazkowe nAZWA")] public string Nazwa { get { return nazwa; } set { if (value != nazwa) { nazwa = value; onPropertyChanged("Nazwa"); } if (value is int) { throw new ArgumentException("Wpisales stringa!!"); } } } private string link; [Required(ErrorMessage="To pole jest obowiazkowe link")] [StringLength(8, ErrorMessage = "Link cannot be longer than 8 characters")] public string Link { get { return link; } set { if (value != link) { link = value; onPropertyChanged("Link"); } } } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; #endregion private void onPropertyChanged(string propertyName) { if (this.PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } }

    Read the article

  • Hudson plugin, Java error "... disagree on InnerClasses attribute"

    - by StackedCrooked
    I am trying to be able to step through the code of a Hudson plugin called SVNPublisher. I checked out the code for SVNPublisher, used Netbeans to open the project, and clicked "Debug Main project". This results in a Firefox window opening address http://localhost:8080 which shows the Hudson main page. Clicking the "New Job" link results in an error page: HTTP ERROR: 500 jar:file:/home/francis/svn/svnpublisher/target/work/webapp/WEB-INF/lib/hudson-core-1.319.jar!/lib/hudson/newFromList/form.jelly:43:47: <j:forEach> hudson.scm.SubversionTagAction and hudson.scm.SubversionTagAction$DescriptorImpl disagree on InnerClasses attribute RequestURI=/newJob Caused by: org.apache.commons.jelly.JellyTagException: jar:file:/home/francis/svn/svnpublisher/target/work/webapp/WEB-INF/lib/hudson-core-1.319.jar!/lib/hudson/newFromList/form.jelly:43:47: hudson.scm.SubversionTagAction and hudson.scm.SubversionTagAction$DescriptorImpl disagree on InnerClasses attribute at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:713) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:282) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) ... I am very new to Hudson and not very experienced with Java so I'm pretty much clueless on the meaning of this error. Can anyone help?

    Read the article

  • multiple keys and values with google-collections

    - by flash3000
    Hello, I would like use google-collection in order to save the following file in a Hash with multiple keys and values Key1_1, Key2_1, Key3_1, data1_1, 0, 0 Key1_2, Key2_2, Key3_2, data1_2, 0, 0 Key1_3, Key2_3, Key3_3, data1_3, 0, 0 Key1_4, Key2_4, Key3_4, data1_4, 0, 0 The first three columns are the different keys and the last two integer are the two different values. I have already prepare a code which spilt the lines in chunks. import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class HashMapKey { public static void main(String[] args) throws FileNotFoundException, IOException { String inputFile = "inputData.txt"; BufferedReader br = new BufferedReader(new FileReader(inputFile)); String strLine; while ((strLine = br.readLine()) != null) { String[] line = strLine.replaceAll(" ", "").trim().split(","); for (int i = 0; i < line.length; i++) { System.out.print("[" + line[i] + "]"); } System.out.println(); } } } Unfortunately, I do not know how to save these information in google-collection? Thank you in advance. Best regards,

    Read the article

  • Rails: unable to set any attribute of child model

    - by Bryan Roth
    I'm having a problem instantiating a ListItem object with specified attributes. For some reason all attributes are set to nil even if I specify values. However, if I specify attributes for a List, they retain their values. Attributes for a List retain their values: >> list = List.new(:id => 20, :name => "Test List") => #<List id: 20, name: "Test List"> Attributes for a ListItem don't retain their values: >> list_item = ListItem.new(:id => 17, :list_id => 20, :name => "Test Item") => #<ListItem id: nil, list_id: nil, name: nil> UPDATE #1: I thought the id was the only attribute not retaining its value but realized that setting any attribute for a ListItem gets set to nil. list.rb: class List < ActiveRecord::Base has_many :list_items, :dependent => :destroy accepts_nested_attributes_for :list_items, :reject_if => lambda { |a| a[:name].blank? }, :allow_destroy => true end list_item.rb: class ListItem < ActiveRecord::Base belongs_to :list validates_presence_of :name end schema.rb ActiveRecord::Schema.define(:version => 20100506144717) do create_table "list_items", :force => true do |t| t.integer "list_id" t.string "name" t.datetime "created_at" t.datetime "updated_at" end create_table "lists", :force => true do |t| t.string "name" t.datetime "created_at" t.datetime "updated_at" end end

    Read the article

  • Virtual properties duplicated during serialization when XmlElement attribute used

    - by Laramie
    The Goal: XML serialize an object that contains a list of objects of that and its derived types. The resulting XML should not use the xsi:type attribute to describe the type, to wit the names of the serialized XML elements would be an assigned name specific to the derived type, not always that of the base class, which is the default behavior. The Attempt: After exploring IXmlSerializable and IXmlSerializable with eerie XmlSchemaProvider methods and voodoo reflection to return specialized schemas and an XmlQualifiedName over the course of days, I found I was able to use the simple [XmlElement] attribute to accomplish the goal... almost. The Problem: Overridden properties appear twice when serializing. The exception reads "The XML element 'overriddenProperty' from namespace '' is already present in the current scope. Use XML attributes to specify another XML name or namespace for the element." I attempted using a *Specified property (see code), but it didn't work. Sample Code: Class Declaration using System; using System.Collections.Generic; using System.Xml.Serialization; [XmlInclude(typeof(DerivedClass))] public class BaseClass { public BaseClass() { } [XmlAttribute("virt")] public virtual string Virtual { get; set; } [XmlIgnore] public bool VirtualSpecified { get { return (this is BaseClass); } set { } } [XmlElement(ElementName = "B", Type = typeof(BaseClass), IsNullable = false)] [XmlElement(ElementName = "D", Type = typeof(DerivedClass), IsNullable = false)] public List<BaseClass> Children { get; set; } } public class DerivedClass : BaseClass { public DerivedClass() { } [XmlAttribute("virt")] public override string Virtual { get { return "always return spackle"; } set { } } } Driver: BaseClass baseClass = new BaseClass() { Children = new List<BaseClass>() }; BaseClass baseClass2 = new BaseClass(){}; DerivedClass derivedClass1 = new DerivedClass() { Children = new List<BaseClass>() }; DerivedClass derivedClass2 = new DerivedClass() { Children = new List<BaseClass>() }; baseClass.Children.Add(derivedClass1); baseClass.Children.Add(derivedClass2); derivedClass1.Children.Add(baseClass2); I've been wrestling with this on and off for weeks and can't find the answer anywhere.

    Read the article

  • Mapping composite foreign keys in a many-many relationship in Entity Framework

    - by Kirk Broadhurst
    I have a Page table and a View table. There is a many-many relationship between these two via a PageView table. Unfortunately all of these tables need to have composite keys (for business reasons). Page has a primary key of (PageCode, Version), View has a primary key of (ViewCode, Version). PageView obviously enough has PageCode, ViewCode, and Version. The FK to Page is (PageCode, Version) and the FK to View is (ViewCode, Version) Makes sense and works, but when I try to map this in Entity framework I get Error 3021: Problem in mapping fragments...: Each of the following columns in table PageView is mapped to multiple conceptual side properties: PageView.Version is mapped to (PageView_Association.View.Version, PageView_Association.Page.Version) So clearly enough, EF is having a complain about the Version column being a common component of the two foreign keys. Obviously I could create a PageVersion and ViewVersion column in the join table, but that kind of defeats the point of the constraint, i.e. the Page and View must have the same Version value. Has anyone encountered this, and is there anything I can do get around it? Thanks!

    Read the article

  • NSMutableDictionary with UIButton* as keys - iPhone development

    - by Alejandro A.
    Hi, I'm new to iPhone development and I have a question that may have a very simple answer. I am trying to add buttons to a view and these buttons are associated with a custom class that I defined. When I add the buttons to the view, I would like to know what class these buttons correspond to. This is because when I press the button, I need to get some information about the class, but the receiver of the message is another class. I couldn't find information about an error that I'm getting on the web. The problem I have is that I'm trying to create an NSMutableDictionary where the keys are of type UIButton* and the values are of my custom type: // create button for unit UIButton* unitButton = [[UIButton alloc] init]; [sourceButtonMap setObject:composite forKey:unitButton]; Of course, the sourceButtonMap is defined in the class and initialized in the init function as sourceButtonMap = [[NSMutableDictionary alloc] init]; The error I get when I try to add the key-value pair is: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIButton copyWithZone:]: unrecognized selector sent to instance 0x3931e90' Is this happening because I can't store UIButton* as keys? Can anyone point me why I'm getting this error? Thank you all, aa

    Read the article

  • Spring bean's DESTROY-METHOD attribute and web-application "prototype"d bean

    - by EugeneP
    Can get work the attribute "destroy-method". First, even if I type non-existing method name into "destroy-method" attribute, Spring initialization completes fine (already strange!). Next, when a bean has a "prototype" scope, then I suppose it must be destroyed before the application is closed. That not happens, it is simply never called in my case. Though, after extracting this bean I can call this method explicitly and it does its job. Could you explain why this method is never called in my Spring 2.5 case? p.s. The method exists, it is public and has no arguments. It seems to be a more difficult task then I thought. The problem is that this destroy method is called whenever the context is closed, and this is a rare case. My question is this: I have a web app. I have a "prototype"-scoped bean. What I need is when the current session is closed, this destroy method was automatically called by Spring. I can do it by hand, but is there any solution how to make Spring do this job? It destroys the bean after the session is destroyed, it might be possible for Spring to call a method on that bean before destroying it?

    Read the article

  • Can I do my own HTTP header attribute?

    - by wokena
    Hi, can I make my own headers in HTTP request? e.g. This is normal HTTP request GET / HTTP/1.1 Host: google.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT x.x; xx; rv:x.x.x.x) xxx Firefox/3.0.10 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: xx,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: windows-1250,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive and this is header with my "attribute" GET / HTTP/1.1 Host: google.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT x.x; xx; rv:x.x.x.x) xxx Firefox/3.0.10 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: xx,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: windows-1250,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Name: John and I will have "attribute" in server response. I'll use "attrubutes" in HTTP headers instead of sessions attributes... BTW.Sorry for my english... ;)

    Read the article

  • Use Lambda in Attribute constructor to get method's parameters

    - by Anthony Shaw
    I'm not even sure if this is possible, but I've exhausted all of my ideas trying to figure this out, so I figured I'd send this out to the community and see what you thought. And, if it's not possible, maybe you'd have some ideas as well. I'm trying to make an Attribute class that I can add to a method that would allow me to use a lambda expression to get each parameter of the method public ExampleAttribute : Attribute { public object Value { get; set; } public ExampleAttribute(--something here to make the lambda work--, object value) { Value = value; } } I'd like to be able to something like this below: [Example(x=x.Id, 4)] [Example(x=x.filter, "string value")] public ActionResult Index(int Id, string filter) { return View(); } I understand that I might be completely dreaming with this idea. I'm basically trying to write a model to allow for self-documenting REST API Documentation. In a recent project here at work we wrote a dozen or so services with 5 to 15 methods on each, I figure it's easier to write something to do this, than to hand code a documentation page for each. I would plan to eventually release this as an open-source project once I have it in a place that I feel it's releasable.

    Read the article

  • NULL-keys for key/value table

    - by user72185
    (Using Oracle) I have a table with key/value pairs like this: create table MESSAGE_INDEX ( KEY VARCHAR2(256) not null, VALUE VARCHAR2(4000) not null, MESSAGE_ID NUMBER not null ) I now want to find all the messages where key = 'someKey' and value is 'val1', 'val2' or 'val3' - OR value is null in which case there will be no entry in the table at all. This is to save space; there would be a large number of keys with null values if I stored them all. I think this works: SELECT message_id FROM message_index idx WHERE ((key = 'someKey' AND value IN ('val1', 'val2', 'val3')) OR NOT EXISTS (SELECT 1 FROM message_index WHERE key = 'someKey' AND idx.message_id = message_id)) But is is extremely slow. Takes 8 seconds with 700K records in message_index and there will be many more records and more search criteria when moving outside of my test environment. Primary key is key, value, message_id: add constraint PK_KEY_VALUE primary key (KEY, VALUE, MESSAGE_ID) And I added another index for message_id, to speed up searching for missing keys: create index IDX_MESSAGE_ID on MESSAGE_INDEX (MESSAGE_ID) I will be doing several of these key/value lookups in every search, not just one as shown above. So far I am doing them nested, where output id's of one level is the input to the next. E.g.: SELECT message_id from message_index WHERE (key/value compare) AND message_id IN ( SELECT ... and so on ) What can I do to speed this up?

    Read the article

  • How to disable selective keys on the keyboard?

    - by Vilx-
    I'd like to write an application which disables certain keys on the keyboard while it's working. More specifically I'm interested in keys that might make the application loose focus (like ALT+TAB, WinKey, Ctrl+Shift+Esc, etc.) The need for this is has to do with babies/animals bashing wildly at the keyboard. :) My first idea was to use SetWindowsHookEx, however I ran into a problem. Since I need a global hook, the procedure would have to reside in a .DLL which would get injected in all active applications. But a .DLL can be either 64-bit or 32-bit, not both. And on a 64-bit system there are both types of applications. I guess then that I must write two copies of the hook .DLL - one for 32-bit and the other for 64-bit. And then I'd also have to launch two copies of the application as well, because the application first has to load the DLL itself before it can pass it on to SetWindowsHookEx(). Sounds pretty clumsy and awkward. Is there perhaps a better way? Or maybe I've misunderstood something?

    Read the article

  • MVC3 custom validation attribute for an "at least one is required" situation

    - by Pricey
    Hi I have found this answer already: MVC3 Validation - Require One From Group Which is fairly specific to the checking of group names and uses reflection. My example is probably a bit simpler and I was just wondering if there was a simpler way to do it. I have the below: public class TimeInMinutesViewModel { private const short MINUTES_OR_SECONDS_MULTIPLIER = 60; //public string Label { get; set; } [Range(0,24, ErrorMessage = "Hours should be from 0 to 24")] public short Hours { get; set; } [Range(0,59, ErrorMessage = "Minutes should be from 0 to 59")] public short Minutes { get; set; } /// <summary> /// /// </summary> /// <returns></returns> public short TimeInMinutes() { // total minutes should not be negative if (Hours <= 0 && Minutes <= 0) { return 0; } // multiplier operater treats the right hand side as an int not a short int // so I am casting the result to a short even though both properties are already short int return (short)((Hours * MINUTES_OR_SECONDS_MULTIPLIER) + (Minutes * MINUTES_OR_SECONDS_MULTIPLIER)); } } I want to add a validation attribute either to the Hours & Minutes properties or the class itself.. and the idea is to just make sure at least 1 of these properties (Hours OR minutes) has a value, server and client side validation using a custom validation attribute. Does anyone have an example of this please? Thanks

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >