Search Results

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

Page 226/433 | < Previous Page | 222 223 224 225 226 227 228 229 230 231 232 233  | Next Page >

  • Android change background of key dynamically

    - by Wouter
    I'm building a custom keyboard in android. My input.xml: <com.mykeyboard.MyKeyboardView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/keyboard" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:keyBackground="@drawable/keybg" /> All the keys do have the same background. Now I'm trying to dynamically change the background of one single key. Is this possible?

    Read the article

  • How to create a hover effect in a newsletter?

    - by Moak
    I'm creating a newsletter, and i want to have panels that change background-color on mouse over. Seeing as the newsletter wont have a head, I am defining all styles inline. I'm pretty sure most popular mail clients will block JS. So I was wondering if I can define a hover effect in the style attribute. Or is there any other solution to achieve this effect? Peace

    Read the article

  • Mysql / Django - Begin auto increment to 1

    - by ark
    Hi, I have a django script which loads data, the beginning of the script deletes all datas in database. So when I execute 1st time this script, the auto increment primary keys begin to 1 to 15 (if 15 objects) and if I want to reload data, I reexecute the script. My issue is when I execute it again, pks numbers begin to 16 (for 2nd launch), I would like each time auto_increment begins to 1, is it possible whitout regenerating tables structure each time ? Thanks

    Read the article

  • help with generating models from database for many to many in doctrine

    - by ajsie
    im using doctrine and i have set up some test tables to be generated into models: I want a many-to-many relationship models (3 tables converted into 3 models) (things are simplified to make the point clear) mysql tables: user: id INT // primary key name VARCHAR group: id INT // primary key name VARCHAR user_group: user_id INT // primary and foreign key to user.id group_id INT // primary and foreign key to group.id i thought that it would generate these models (from the documentation): // User.php class User extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('id'); $this->hasColumn('name); } public function setUp() { $this->hasMany('Group as Groups', array( 'refClass' => 'UserGroup', 'local' => 'user_id', 'foreign' => 'group_id' ) ); } } // Group.php class Group extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('id'); $this->hasColumn('name); } public function setUp() { $this->hasMany('User as Users', array( 'refClass' => 'UserGroup', 'local' => 'group_id', 'foreign' => 'user_id' ) ); } } // UserGroup.php class UserGroup extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('user_id') ); $this->hasColumn('group_id') ); } } but it generated this: // User.php abstract class BaseUser extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('id'); $this->hasColumn('name'); } public function setUp() { $this->hasMany('UserGroup', array( 'local' => 'id', 'foreign' => 'user_id')); } } // Group.php abstract class BaseGroup extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('id'); $this->hasColumn('name'); } public function setUp() { $this->hasMany('UserGroup', array( 'local' => 'id', 'foreign' => 'group_id')); } } // UserGroup.php abstract class BaseUserGroup extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('user_id'); $this->hasColumn('group_id'); } public function setUp() { $this->hasOne('User', array( 'local' => 'user_id', 'foreign' => 'id')); $this->hasOne('Group', array( 'local' => 'group_id', 'foreign' => 'id')); } } as you can see, there is no 'refClass' in the 'User' and 'Group' models pointing to the 'UserGroup'. the 'UserGroup' table in this case is just another table from Doctrine's perspective not a reference table. I've checked my table definitions in mysql. They are correct. user_group has 2 columns (primary keys and foreign keys), each one pointing to the primary key in either User or Group. But i want the standard many-to-many relationship models in Doctrine models. I'd appreciate some help. I have struggled to figure it out for a half day now. What is wrong? Thanks!

    Read the article

  • when get pagecontent from URL the connect alway return nopermistion ?

    - by tiendv
    I have a methor to return pagecontent of link but when it run, alway return "Do not perrmisson ", plesea check it here is code to return string pagecontent public static String getPageContent(String targetURL) throws Exception { Hashtable contentHash = new Hashtable(); URL url; URLConnection conn; // The data streams used to read from and write to the URL connection. DataOutputStream out; DataInputStream in; // String returned as the result . String returnString = ""; // Create the URL object and make a connection to it. url = new URL(targetURL); conn = url.openConnection(); // check out permission of acess URL if (conn.getPermission() != null) { returnString = "Do not Permission access URL "; } else { // Set connection parameters. We need to perform input and output, // so set both as true. conn.setDoInput(true); conn.setDoOutput(true); // Disable use of caches. conn.setUseCaches(false); // Set the content type we are POSTing. We impersonate it as // encoded form data conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); // get the output stream . out = new DataOutputStream(conn.getOutputStream()); String content = ""; // Create a single String value pairs for all the keys // in the Hashtable passed to us. Enumeration e = contentHash.keys(); boolean first = true; while (e.hasMoreElements()) { // For each key and value pair in the hashtable Object key = e.nextElement(); Object value = contentHash.get(key); // If this is not the first key-value pair in the hashtable, // concantenate an "&" sign to the constructed String if (!first) content += "&"; // append to a single string. Encode the value portion content += (String) key + "=" + URLEncoder.encode((String) value); first = false; } // Write out the bytes of the content string to the stream. out.writeBytes(content); out.flush(); out.close(); // check if can't read from URL // Read input from the input stream. in = new DataInputStream(conn.getInputStream()); String str; while (null != ((str = in.readLine()))) { returnString += str + "\n"; } in.close(); } // return the string that was read. return returnString; }

    Read the article

  • How to view doctype in generated source code

    - by wcpro
    I am using an XSL transformation on an xml file to create an xml document. The problem i am running into is that when i go to view the generated source (the transformed source) i can't see the DOCTYPE attribute of the html so i don't know if its being emitted properly. Is there any way to view the doctype in this way?

    Read the article

  • Mootools: add HTML text to an Element

    - by Damiano
    Hello, i'm using mootools.js, i have this code: this.html.chat_title = new Element('span', {'id' : 'chat_title', html : 'this is the title'}).inject(this.html.container); The problem is: span id="chat_title" html="this is the title" as you see it doesn't put the text inside the HTML of the tag but as an attribute. What is wrong? Thank you so much!

    Read the article

  • Javascript access TR from TD

    - by arik-so
    Hello. I have a table row, and within that, I have a td (whatever it stands for). I want, without an ID or a name, to be change the class attribute of the TR my TD is in. Like that: <tr> <td onclick="[TR].setAttribute('class', 'newName')">My TD</td> </tr> How do I do it?

    Read the article

  • How to pick random (small) data samples using Map/Reduce?

    - by Andrei Savu
    I want to write a map/reduce job to select a number of random samples from a large dataset based on a row level condition. I want to minimize the number of intermediate keys. Pseudocode: for each row if row matches condition put the row.id in the bucket if the bucket is not already large enough Have you done something like this? Is there any well known algorithm? A sample containing sequential rows is also good enough. Thanks.

    Read the article

  • @property objective-c syntax

    - by okami
    I'm looking for the syntax of the getter/setter. Which is the setter and which is the getter?? Is the readwrite attribute the getter? Is the assign the setter? @interface SomeClass : NSObject { NSString *str; NSDate *date; } @property (readwrite, assign) NSString *str; @property (readwrite, assign) NSDate *date;

    Read the article

  • Get column name in jpa

    - by German
    Hi all, I have a query factory that takes a column name as an attribute in order to search for that column. Right now I'm passing the name of the column as a string, so it's kind of hardcoded. If the name of the column changes in the entity's annotation, that "hidden dependency" breaks up. Is there a way in jpa to retrieve the real name of the column and have it available at compile time, so I can use it in queries?

    Read the article

  • in vb.net an error is coming

    - by user275111
    Compiler Error Message: ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl). in vb code-i used namespace and a class.

    Read the article

  • Is HashMap in Java collision safe

    - by changed
    Hi I am developing a parser that needs to put key value pairs in hashmap. But a key can have multiple values which i can do in this way HashMap<String,ArrayList<String>> . But what happens if number of keys are very large and it start matching with other key's hashcode. Will that rewrite previous key's value ? thanks -devSunday

    Read the article

  • How can I join conditionally in LINQ queries?

    - by Steve Crane
    If I have two tables; Drivers keyed by DriverId and Trips with foreign keys DriverId and CoDriverId, and I want to find all trips where a driver was either the driver or co-driver I could code this in Transact-SQL as select d.DriverId, t.TripId from Trips t inner join Drivers d on t.DriverId = d.DriverId or t.CoDriverId = d.DriverId How could this be coded as a LINQ query?

    Read the article

  • Maximum nametable char count exceeded

    - by doc
    I'm having issues with the maximum nametable char count quota, I followed a couple of answers here and it solved the problem for a while, but now I'm having the same issue. My Server side config is as follows: <system.serviceModel> <bindings> <netTcpBinding> <binding name="GenericBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> <security mode="None" /> </binding> </netTcpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior> <serviceMetadata httpGetEnabled="false" /> <serviceDebug includeExceptionDetailInFaults="true" /> <dataContractSerializer maxItemsInObjectGraph="1000000" /> </behavior> </serviceBehaviors> </behaviors> <services> <service name="REMWCF.RemWCFSvc"> <endpoint address="" binding="netTcpBinding" contract="REMWCF.IRemWCFSvc" bindingConfiguration="GenericBinding" /> <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:9081/RemWCFSvc" /> </baseAddresses> </host> </service> </services> </system.serviceModel> I also have the same tcp binding on the devenv configuration. Have I reached the limit of contracts supported? Is there a way to turn off that quota? EDIT Error Message: Error: Cannot obtain Metadata from net.tcp://localhost:9081/RemWCFSvc/mex If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: net.tcp://localhost:9081/RemWCFSvc/mex Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:9081/RemWCFSvc/mex'. There is an error in the XML document. The maximum nametable character count quota (16384) has been exceeded while reading XML data. The nametable is a data structure used to store strings encountered during XML processing - long XML documents with non-repeating element names, attribute names and attribute values may trigger this quota. This quota may be increased by changing the MaxNameTableCharCount property on the XmlDictionaryReaderQuotas object used when creating the XML reader. I'm getting that error when trying to run the WCF (which is hosted in a windows service app).

    Read the article

  • best way to find out type

    - by laspal
    hi, I have a dict val_dict - {'val1': 'abcd', 'val': '1234', 'val3': '1234.00', 'val4': '1abcd 2gfff'} All the values to my keys are string. So my question is how to find out type for my values in the dict. I mean if i say`int(val_dict['val1']) will give me error. Basically what I am trying to do is find out if the string is actual string or int or float.` if int( val_dict['val1'): dosomething else if float(val_dict['val1']): dosomething thanks

    Read the article

  • Making a WCF call with AJAX

    - by DotnetDude
    Is it required to use a RESTful service to be able to make a ajax call to a wcf service (for example: by using WebInvoke attribute on Operation contracts) Once a service is made RESTful by adding a webHttp binding on the service host, can the host have other endpoints as well? (wsHttp or netTcp) Is it required that the aspNetCompatibilityEnabled be set to true for a service that has webHttp binding (and can this setting coexist for other endpoints) I understand I can use both JQuery and ScriptManager for making WCF calls on the client. Why should I use one over the other?

    Read the article

  • Store NSArray In Core Data Sample Code?

    - by Stunner
    Ey guys, I have been searching for some sample code on how to store an NSArray in Core Data for awhile now, but haven't had any luck. Would anyone mind pointing me to some tutorial or example, or better yet write a simple sample as an answer to this question? I have read this but it doesn't show an example of how to go about implementing a transformable attribute that is an NSArray. Thanks in advance!

    Read the article

  • getting node value exception

    - by Aswan
    Hi Folks <amount currency="USD">1000500</amount> while parsing above string i am getting only attribute value .when i try to get node value null pointer exception for getting node value using NodeList amountList= estimateElement.getElementsByTagName("amount"); Element amtElement= (Element)amountList.item(0); String amount=amtElement.getFirstChild().getnodevalue() Thanks in advance Aswan

    Read the article

  • Switch two items in associative array PHP

    - by user280381
    Example: $arr = array('apple'='sweet','grapefruit'='bitter','pear'='tasty','banana'='yellow'); I want to switch the positions of grapefruit and pear, so the array will become 'apple'='sweet','pear'='tasty','grapefruit'='bitter','banana'='yellow') I know the keys and values of the elements I want to switch, is there an easy way to do this? Or will it require a loop + creating a new array? Thanks

    Read the article

  • accessing id property via javascript

    - by webzide
    Dear experts Is there a way to access the ID of an dom element? I don't mean using the getElementById attribute to find out a array of objects. Bascially I already know the DOM element and that object reference is at hand. All I need is to access the ID property. I know something like if(element.id==value) won't work. Thanks in advance.

    Read the article

< Previous Page | 222 223 224 225 226 227 228 229 230 231 232 233  | Next Page >