Search Results

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

Page 206/433 | < Previous Page | 202 203 204 205 206 207 208 209 210 211 212 213  | Next Page >

  • Netbook for DOTNET Development

    - by Abhijeet Patel
    I'm looking for a netbook to do some dotnet development. Is there a recommended brand/configuration. I'm looking for reasonably good performance. Here are some of my requirements: Win 7 ultimate MS Office VS 2008 and VS 2010 when it's out CodeRush good size keyboard without having to do a Fn+Key for Insert, Home, End and Del keys Preferably Core 2 Duo Decent battery life P.S. The config of the netbook handed out at PDC seems pretty awesome.

    Read the article

  • String formatting error

    - by wrongusername
    Using the code print('{0} is not'.format('That that is not')) in Python 3.1.1, I get the following error: AttributeError: 'str' object has no attribute 'format' when I delete the line Netbeans automatically inserted at the beginning: from distutils.command.bdist_dumb import format which itself causes an error of ImportError: cannot import name format What am I doing wrong here?

    Read the article

  • SSH login with expect(1). How to exit expect and remain in SSH?

    - by Koroviev
    So I wanted to automate my SSH logins. The host I'm with doesn't allow key authentication on this server, so I had to be more inventive. I don't know much about shell scripting, but some research showed me the command 'expect' and some scripts using it for exactly this purpose. I set up a script and ran it, it worked perfectly to login. #!/usr/bin/env expect -f set password "my_password" match_max 1000 spawn ssh -p 2222 "my_username"@11.22.11.22 expect "*?assword:*" send -- "$password\r" send -- "\r" expect eof Initially, it runs as it should. Last login: Wed May 12 21:07:52 on ttys002 esther:~ user$ expect expect-test.exp spawn ssh -p 2222 [email protected] [email protected]'s password: Last login: Wed May 12 15:44:43 2010 from 20.10.20.10 -jailshell-3.2$ But that's where the success ends. Commands do not work, but hitting enter just makes a new line. Arrow keys and other non-alphanumeric keys produce symbols like '^[[C', '^[[A', '^[OQ' etc.[1] No other prompt appears except the two initially created by the expect script. Any ignored commands will be executed by my local shell once expect times out. An example: -jailshell-3.2$ whoami ls pwd hostname (...time passes, expect times out...) esther:~ user$ whoami user esther:~ ciaran$ ls Books Documents Movies Public Code Downloads Music Sites Desktop Library Pictures expect-test.exp esther:~ ciaran$ pwd /Users/ciaran esther:~ ciaran$ hostname esther.local As I said, I have no shell scripting experience, but I think it's being caused because I'm still "inside of" expect, but not "inside of" SSH. Is there any way to terminate expect once I've logged in, and have it hand over the SSH session to me? I've tried commands like 'close' and 'exit', after " send -- "\r" ". Yeah, they do what I want and expect dies, but it vindictively takes the SSH session down with it, leaving me back where I started. What I really need is for expect to do its job and terminate, leaving the SSH session back in my hands as if I did it manually. All help is appreciated, thanks. [1] I know there's a name for this, but I don't know what it is. And this is one of those frightening things which can't be googled, because the punctuation characters are ignored. As a side question, what's the story here?

    Read the article

  • How to return plain XML from ADO.NET data service

    - by KHALIL
    Hi, I was wondering how to return plain XML from ADO.net data services I have exposed an ADO.net data service to different DEPARTMENTS in our company who are not so technical. The data returned is ATOM FEED which is kind a hard to read / interpret with its format, too much information is returned people from various departments would execute different queries ( HTTP Request) and i wanted them to display simple XML or atleast something more user friendly like HTML I have tried ACCEPT attribute of the request to be plain XML and it still returns ATOM Thanks -- Khalil

    Read the article

  • How to limit JTextArea max Rows and Coloums?

    - by Billbo bug
    I am using JTextArea in JScrollPane I want to limit the maximum number of lines possible and the maximum chars in each line. I need that the string will be exactly like on the screen, each line will end with '\n' (if there another line after it) and the user will be able to insert only X lines and Y chars in each line. I tried to limit the lines but i don't know exactly how many lines do i have because of the line wrapping, The line wrapping is starting new line visualy on the screen(because of the width of the JTextArea) but in the string of the component it is really the same line with no '\n' to indicate new line. I do not have an idea how to limit the max chars in each line while typing. There are 2 stages: The typing of the string- keep that the user will not be able to type more then X lines and Y chars in each line. (even if the line wrap only visualy or the user typed '/n') Insert the string to the DB- after cliking 'OK' convert the string that every line will end with "/n" even if the user did not typed it and the line was wrapped only visualy. There are few problems if i will count the chars in the line and insert '/n' in the end of the line, thats why i decided to do it in two stages. In the first stage ehile the user is typing i would rather only limit it visualy and force line wrpping or something similar. Only in the second stage when i save string i will add the '/n' even if the user did not typed it in the end of the lines! Does anyone have an idea? I know that i will have to use DocumentFilter OR StyledDocument. Here is sample code that limit only the lines to 3:(but not the chars in row to 19) private JTextArea textArea ; textArea = new JTextArea(3,19); textArea .setLineWrap(true); textArea .setDocument(new LimitedStyledDocument(3)); JScrollPane scrollPane = new JScrollPane(textArea public class LimitedStyledDocument extends DefaultStyledDocument /** Field maxCharacters */ int maxLines; public LimitedStyledDocument(int maxLines) { maxCharacters = maxLines; } public void insertString(int offs, String str, AttributeSet attribute) throws BadLocationException { Element root = this.getDefaultRootElement(); int lineCount = getLineCount(str); if (lineCount + root.getElementCount() <= maxLines){ super.insertString(offs, str, attribute); } else { Toolkit.getDefaultToolkit().beep(); } } /** * get Line Count * * @param str * @return the count of '\n' in the String */ private int getLineCount(String str){ String tempStr = new String(str); int index; int lineCount = 0; while (tempStr.length() > 0){ index = tempStr.indexOf("\n"); if(index != -1){ lineCount++; tempStr = tempStr.substring(index+1); } else{ break; } } return lineCount; } }

    Read the article

  • Http Modules are called on every request when using mvc/routing module

    - by MartinF
    I am developing a http module that hooks into the FormsAuthentication Module through the Authenticate event. While debugging i noticed that the module (and all other modules registered) gets hit every single time the client requests a resource (also when it requests images, stylesheets, javascript files (etc.)). This happens both when running on a IIS 7 server in integrated pipeline mode, and debugging through the webdev server (in non- integrated pipeline mode) As i am developing a website with a lot images which usually wont be cached by the client browser it will hit the modules a lot of unnessecary times. I am using MVC and its routing mechanishm (System.Web.Routing.UrlRoutingModule). When creating a new website the runAllManagedModulesForAllRequests attribute for the IIS 7 (system.webServer) section is per default set to true in the web.config, which as the name indicates make it call all modules for every single request. If i set the runAllManagedModulesForAllRequests attribute to false, no modules will get called. It seems that the reason for this is because of the routing module or mvc (dont know excactly why), which causes that the asp.net (aspx) handler never gets called and therefore the events and the modules never gets called (one time only like supposed). I tested this by trying to call "mydomain.com/Default.aspx" instead of just "mydomain.com/" and correctly it calls the modules only once like it is supposed. How do i fix this so it only calls the modules once when the page is requested and not also when all other resources are requested ? Is there some way i can register that all requests should fire the asp.net (aspx) handler, except requests for specific filetype extensions ? Of course that wont fix the problem if i choose to go with urls like /content/images/myimage123 for the images (without the extension). But i cant think of any other way to fix it. Is there a better way to solve this problem ? I have tried to set up an ignoreRoute like this routes.IgnoreRoute("content/{*pathInfo}"); where the content folder contains all the images, javascripts and stylesheets in seperat subfolders, but it doesnt seem to change anything. I can see there a many different possibilites when setting up a handler but I cant seem to figure out how it should be possible to setup one that will make it possible to use the routing module and have urls like /blog/post123 and not call the modules when requesting images, javascripts and stylesheets (etc.). Hope anyone out there can help me ? Martin

    Read the article

  • How do I use the subversion revision of a css file to prevent browser cache

    - by Clayton
    StackOverflow implements it like this: <link rel="stylesheet" href="http://sstatic.net/so/all.css?v=4542"> Every time the referenced files change, the href attribute of the link tag is updated in the HTML code, thus supporting caching and updated referenced files. My question - how do you retrieve the subversion version of that css file to include in the link? Subversion keywords only tell you the revision of the file you are currently in. I'm working with PHP/CodeIgniter + jQuery.

    Read the article

  • how does linear probing handle this?

    - by Weadadada Awda
    • the hash function: h(x) = | 2x + 5 | mod M • a bucket array of capacity N • a set of objects with keys: 12, 44, 13, 88, 23, 94, 11, 39, 20, 16, 5 (to input from left to right) 4.a [5 pts] Write the hash table where M=N=11 and collisions are handled using linear probing. So I got up to here x x x x x 44 88 12 23 13 94 but the next variable should go after the 94 now, (the 11) but does it start from the beggining or what? thx

    Read the article

  • pexpect install problem

    - by ddd
    i have installed pexpect with the following command "python setup.py install" but when i try to run a program it says "AttributeError: 'module' object has no attribute 'spawn'". how to settle the matter?

    Read the article

  • Why am I losing sessions when running in StateServer mode?

    - by Nick Allen - Tungle139
    I have checked the servers (Win Server 2003) application event logs for the following problem http://support.microsoft.com/kb/308097 which doesn't show up. It just appears that sessions drop randomly for random users It's a single server setup, no web farms and no load balancing Even though the issue I point to above doesn't occur in the logs, is it worth increasing the stateNetworkTimeout attribute anyway? The configuration at the moment is simply <sessionState mode="StateServer" cookieless="false" stateConnectionString="tcpip=localhost:42424" timeout="60"/>

    Read the article

  • Return number of matches from c# dictionary

    - by Rickard Haake
    Hello! I have a dictionary with non unique values and I want to count the matches of a string versus the values. Basically I now do dict.ContainsValue(a) to get a bool telling me if the string a exists in dict, but I want to know not only if it exists but how many times it exists (and maybee even get a list of the keys it exists bound to) Is there a way to do this using dictionary, or should I look for a different collection? /Rickard Haake

    Read the article

  • Union with LINQ to XML

    - by Ryan Riley
    I need to union two sets of XElements into a single, unique set of elements. Using the .Union() extension method, I just get a "union all" instead of a union. Am I missing something? var elements = xDocument.Descendants(w + "sdt") .Union(otherDocument.Descendants(w + "sdt") .Select(sdt => new XElement( sdt.Element(w + "sdtPr") .Element(w + "tag") .Attribute(w + "val").Value, GetTextFromContentControl(sdt).Trim()) ) );

    Read the article

  • Delphi 2010 RTTI : Explore Enumerations

    - by ZeDalaye
    Hi, Considering such an enumeration : type TTypeOfData = ( [XmlName('ABC')] todABC, [XmlName('DEF')] todDEF, [XmlName('GHI')] todGHI ); Where XmlName is a custom attribute used to define the serialization string for members of this enumeration. How can I explore the attributes attached to each member of this enumeration ? Regards, -- Pierre

    Read the article

  • .NET asmx web services: serialize object property as string property to support versioning

    - by mcliedtk
    I am in the process of upgrading our web services to support versioning. We will be publishing our versioned web services like so: http://localhost/project/services/1.0/service.asmx http://localhost/project/services/1.1/service.asmx One requirement of this versioning is that I am not allowed to break the original wsdl (the 1.0 wsdl). The challenge lies in how to shepherd the newly versioned classes through the logic that lies behind the web services (this logic includes a number of command and adapter classes). Note that upgrading to WCF is not an option at the moment. To illustrate this, let's consider an example with Blogs and Posts. Prior to the introduction of versions, we were passing concrete objects around instead of interfaces. So an AddPostToBlog command would take in a Post object instead of an IPost. // Old AddPostToBlog constructor. public AddPostToBlog(Blog blog, Post post) { // constructor body } With the introduction of versioning, I would like to maintain the original Post while adding a PostOnePointOne. Both Post and PostOnePointOne will implement the IPost interface (they are not extending an abstract class because that inheritance breaks the wsdl, though I suppose there may be a way around that via some fancy xml serialization tricks). // New AddPostToBlog constructor. public AddPostToBlog(Blog blog, IPost post) { // constructor body } This brings us to my question regarding serialization. The original Post class has an enum property named Type. For various cross-platform compatibility issues, we are changing our enums in our web services to strings. So I would like to do the following: // New IPost interface. public interface IPost { object Type { get; set; } } // Original Post object. public Post { // The purpose of this attribute would be to maintain how // the enum currently is serialized even though now the // type is an object instead of an enum (internally the // object actually is an enum here, but it is exposed as // an object to implement the interface). [XmlMagic(SerializeAsEnum)] object Type { get; set; } } // New version of Post object public PostOnePointOne { // The purpose of this attribute would be to force // serialization as a string even though it is an object. [XmlMagic(SerializeAsString)] object Type { get; set; } } The XmlMagic refers to an XmlAttribute or some other part of the System.Xml namespace that would allow me to control the type of the object property being serialized (depending on which version of the object I am serializaing). Does anyone know how to accomplish this?

    Read the article

  • why jsessionid is appended to each url?

    - by sword101
    greetings all i am deploying an app using spring framework on the apache tomcat when running the application from the tomcat directly,there's no jsessionid appended to any url at all but after mapping the application to the domain,and trying to run it i got a jsessionid appended to each url in the application,i tried the spring security attribute disable-url-rewriting but it doesn't work,it removes the jsessionid from the url but the application doesn't work no more,the user cannot login. so i guess it's another problem,any ideas why this happens,how to solve it? thanks.

    Read the article

  • Dumb IE6 resize behaviour - hope it rings some bells with someone

    - by Ollie2893
    Hi, I'm having no end of fun (sic) with jQuery.tabs. The widget is quite crafty in that it turns basic HTML like so <div> <ul> <li>Tab #1</li> ... </ul> <div for panel #1> </div> <div for panel #2> </div> ... </div> into a cute tabbed dialogue. (It does so by restyling the UL and then toggling the "display" attribute for the panel DIVs to show/not show whatever panel is selected.) Now I found that I can spare myself a lot of trouble in my JS project if I insert a scrollable IFRAME into each panel. One usability problem I'm trying to ameliorate is that when the tabbed panel becomes larger than the browser's window, then the user ends up with too many scrollbars. I am trying to avoid this situation by linking the size of the tabbed panel to that of $(window). That is, I trap and process the resize event on $(window). To make my life bearable, all components are relatively sized. This is also true, in particular, of the IFRAMEs (100% width, 100% height). The only exception are the panel DIVs, which are of fixed height (in px). And this is the only dimension css attribute that I manipulate during my resize action. All of this works a treat in FF and Chrome, but IE6 is doing something rather cute: So long as I do not affect the width of the browser window (but only change its height), only the panel DIV changes in height; the IFRAME contained will not change. As a result of this behaviour, it is not possible to shorten the tabbed panel below the height of the IFRAME. I can lengthen the DIV, yes. But the IFRAME will not fill the panel in that case. All becomes good the moment I make the slightest change to the width of the browser window. In that moment, the IFRAME expands to catch up with the extended DIV or DIV and IFRAME contract in tandem. Bizarre. I inserted useless CSS instructions like "position: relative" and "zoom: 1". Also nudged the display with "display: block". No joy so far. Any ideas? Thanks.

    Read the article

  • Drawing A Piano

    - by Jonathan M.
    Hello Everyone, I have started working on a software synthesizer (or keyboard). I have decided to use Java because of the available Jfugue API. I am trying to figure out how to go about creating the actual keys (notes) of the keyboard user interface, but I am stuck. I have tried to create an interface by dragging/dropping black and white rectangular buttons onto the panel, but that doesn't seem to work. Could someone point me into the right direction?

    Read the article

  • Searchlogic cannot sort search result

    - by jaycode
    Imagine a code: search = Project.search( :title_or_description_or_child_name_or_child_age_or_inspiration_or_decorating_style_or_favorite_item_or_others_like_any => keys, :galleries_id_like_any => @g, :styles_id_like_any => @st, :tags_like_any => @t ) search.all returns the rows correctly. But search.descend_by_views returns nil. Is this gem buggy? What else should I use then?

    Read the article

  • How do I sort a multidimensional hash array by a key maybe three levels in, in PHP?

    - by Chris Denman
    I am moving from Perl to PHP and am struggling to get my head around PHP sorting. Here's what I have in Perl: $log{12345}{0}{20100102}{name}='blah'; $log{54312}{1}{20100101}{name}='blah'; $log{14323}{3}{20100103}{name}='blah'; foreach $entry (sort {$log{$cook}{$a}{time} cmp $log{$cook}{$b}{time}} keys %{$log{$cook}}){ ... } Basically, I would have the same array structure in PHP but want to sort like I do above.

    Read the article

  • Is it possible to export/import product categories in Magento?

    - by Chris Schmitz
    I saw one other question on how to do a mass import of products, categories, and all that, but all I want to be able to do is import my categories from one store to another. When you export products I see that there is still a category ID attribute that it gives the products, but I don't see any options for exporting product categories. I assume the simplest way would be to just copy over the tables with SQL, but when I export/import through phpMyAdmin it never works.... Any ideas? Thanks, Chris

    Read the article

< Previous Page | 202 203 204 205 206 207 208 209 210 211 212 213  | Next Page >