Search Results

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

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

  • removeAttribute do not return true or false

    - by Sourabh
    Hi , I am trying to remove attributes of a DOM element using below statement in javascript. var res = nodes.removeAttribute("style"); but the res is always "undefined" it seems that the removeAttribute function does not return anything (I tested it on firefox browser) How can I identify that the attribute is successfully removed or not ? Thanks, Sourabh

    Read the article

  • What exactly is a "key container"?

    - by saugata
    Is it something specific, with a definite structure, or just an arbitrary data file with some form of encryption to hold keys, and potentially other secret information? Can someone please explain the term or point me to a link.

    Read the article

  • Table for each region in MySQL

    - by King Wu
    There are four regions with more than one million records total. Should I create a table with a region column or a table for each region and combine them to get the top ranks? If I combine all four regions, none of my columns will be unique so I will need to also add an id column for my primary key. Otherwise, name, accountId & characterId would be candidate keys or should I just add an id column anyways. Table: ---------------------------------------------------------------- | name | accountId | iconId | level | characterId | updateDate | ----------------------------------------------------------------

    Read the article

  • Perl, convert hash to array

    - by Mike
    If I have a hash in Perl that contains complete and sequential integer mappings (ie, all keys from from 0 to n are mapped to something), is there a means of converting this to an Array? I know I could iterate over the key/value pairs and place them into a new array, but something tells me there should be a built-in means of doing this.

    Read the article

  • Secure automated SSH/SFTP after reboot

    - by mozillalives
    I need to give a daemon ssh access to a particular server. Currently I have it setup to use ssh keys and a keychain, but the trouble with this method is if a reboot occurs. Unless I'm missing something, I would need to login after a system reboot and add the key to the keychain. Is there a way I could avoid/automate this? I'm considering using expect if I can't find any other way.

    Read the article

  • How would you structure your entity model for storing arbitrary key/value data with different data t

    - by Nathan Ridley
    I keep coming across scenarios where it will be useful to store a set of arbitrary data in a table using a per-row key/value model, rather than a rigid column/field model. The problem is, I want to store the values with their correct data type rather than converting everything to a string. This means I have to choose either a single table with multiple nullable columns, one for each data type, or a set of value tables, one for each data type. I'm also unsure as to whether I should use full third normal form and separate the keys into a separate table, referencing them via a foreign key from the value table(s), or if it would be better to keep things simple and store the string keys in the value table(s) and accept the duplication of strings. Old/bad: This solution makes adding additional values a pain in a fluid environment because the table needs to be modified regularly. MyTable ============================ ID Key1 Key2 Key3 int int string date ---------------------------- 1 Value1 Value2 Value3 2 Value4 Value5 Value6 Single Table Solution This solution allows simplicity via a single table. The querying code still needs to check for nulls to determine which data type the field is storing. A check constraint is probably also required to ensure only one of the value fields contains non-nulll data. DataValues ============================================================= ID RecordID Key IntValue StringValue DateValue int int string int string date ------------------------------------------------------------- 1 1 Key1 Value1 NULL NULL 2 1 Key2 NULL Value2 NULL 3 1 Key3 NULL NULL Value3 4 2 Key1 Value4 NULL NULL 5 2 Key2 NULL Value5 NULL 6 2 Key3 NULL NULL Value6 Multiple-Table Solution This solution allows for more concise purposing of each table, though the code needs to know the data type in advance as it needs to query a different table for each data type. Indexing is probably simpler and more efficient because there are less columns that need indexing. IntegerValues =============================== ID RecordID Key Value int int string int ------------------------------- 1 1 Key1 Value1 2 2 Key1 Value4 StringValues =============================== ID RecordID Key Value int int string string ------------------------------- 1 1 Key2 Value2 2 2 Key2 Value5 DateValues =============================== ID RecordID Key Value int int string date ------------------------------- 1 1 Key3 Value3 2 2 Key3 Value6 How do you approach this problem? Which solution is better? Also, should the key column be separated into a separate table and referenced via a foreign key or be should it be kept in the value table and bulk updated if for some reason the key name changes?

    Read the article

  • Error with python decorator

    - by Timmy
    I get this error object has no attribute 'im_func' with this class Test(object): def __init__(self, f): self.func = f def __call__( self, *args ): return self.func(*args) pylons code: class TestController(BaseController): @Test def index(self): return 'hello world'

    Read the article

  • Android Layouts Scrolling in Landscaped Mode

    - by y ramesh rao
    I have a strange issue in which on rotating the Screen to Landscaped mode the Views present inside Remain at the same place But I cannot scroll them inside the screen. How can I make them Scroll so that every thing that move out should be displayed properly to the user. Should there be any more attribute to be set for allowing such kind of behavior.

    Read the article

  • Passing parameter to base class constructor or using instance variable?

    - by deamon
    All classes derived from a certain base class have to define an attribute called "path". In the sense of duck typing I could rely upon definition in the subclasses: class Base: pass # no "path" variable here def Sub(Base): def __init__(self): self.path = "something/" Another possiblity would be to use the base class constructor: class Base: def __init__(self, path): self.path = path def Sub(Base): def __init__(self): super().__init__("something/") What would you prefer and why? Is there a better way?

    Read the article

  • NUnit Test Run Order

    - by Zaps
    Hi, By default nunit tests run alphabetically. Does anyone know of any way to set the execution order? Does an attribute exist for this? Any help would be greatly appreciated. Thanks Zaps

    Read the article

  • What's the best way to aggregate the boolean values of a Python dictionary?

    - by Thierry Lam
    For the following Python dictionary: dict = { 'stackoverflow': True, 'superuser': False, 'serverfault': False, 'meta': True, } I want to aggregate the boolean values above into the following boolean expression: dict['stackoverflow'] and dict['superuser'] and dict['serverfault'] and dict['meta'] The above should return me False. I'm using keys with known names above but I want it to work so that there can be an infinite number of unknown key names.

    Read the article

  • Deploying to Heroku with sensitive setting information

    - by TK
    I'm using GitHub for code and Heroku for the deployment platform for my rails app. I don't want to have sensitive data under Git. Such data include database file settings (database.yml) and some other files that have secret API keys. When I deploy to heroku, how can I deal with files that are not under revision control. When I use Capistrano, I can write some hook methods, but I don't know what to do with Heroku.

    Read the article

  • Regular expression from font to span (size and colour) and back (VB.NET)

    - by chapmanio
    Hi, I am looking for a regular expression that can convert my font tags (only with size and colour attributes) into span tags with the relevant inline css. This will be done in VB.NET if that helps at all. I also need a regular expression to go the other way as well. To elaborate below is an example of the conversion I am looking for: <font size="10">some text</font> To then become: <span style="font-size:10px;">some text</span> So converting the tag and putting a "px" at the end of whatever the font size is (I don't need to change/convert the font size, just stick px at the end). The regular expression needs to cope with a font tag that only has a size attribute, only a color attribute, or both: <font size="10">some text</font> <font color="#000000">some text</font> <font size="10" color="#000000">some text</font> <font color="#000000" size="10">some text</font> I also need another regular expression to do the opposite conversion. So for example: <span style="font-size:10px;">some text</span> Will become: <font size="10">some text</font> As before converting the tag but this time removing the "px", I don't need to worry about changing the font size. Again this will also need to cope with the size styling, font styling, and a combination of both: <span style="font-size:10px;">some text</span> <span style="color:#000000;">some text</span> <span style="font-size:10px; color:#000000;">some text</span> <span style="color:#000000; font-size:10px;">some text</span> I apprecitate this is a lot to ask, I am hopeless with regular expressions and need to find a way of making these conversions in my code. Thanks so much to anyone that can/is willing to help me!

    Read the article

  • Add a foreign key to existing tables in Rails (MySQL)

    - by randombits
    What's the best way to add foreign keys to my existing tables in Rails with an underlying MySQL database? clearly the solution should be done in a migration, as I want this versioned. Otherwise I'd create the constraints myself. I can't seem to find one, conducive response to they above. Again, the tables have already been created with previous migrations. I'm just going back now and adding referential integrity wherever it's applicable.

    Read the article

  • turn array into object active record can use

    - by stormdrain
    I'm running a query and then decrypting it in the controller. After it is decrypted I was putting the results into an array and sending that to the view. The problem is with this solution I need to rewrite all of my views to parse the arrays sent instead of the active record objects sent before. Is there a way to turn the decrypted array back into an object that will work with existing active record code in the view? Before Controller: $name = $this->Clients_model->getNameData('*','client_id='.$clid,''); $data['name'] = $name; $this->load->view('names/name_view',$data); View: if($name->num_rows()) > 0){ foreach($name->result() as $row){ echo $row->data; [...] Now Controller: $name = $this->Clients_model->getNameData('*','client_id='.$clid,''); $nameArray= array(); foreach ($name->result() as $row){ $x = $row; $keys = array('id','client_id'); $unenc = array(); foreach ($x as $key=>$value){ if(! in_array($key, $keys)){ $unenc[$key]=$this->encrypt->decode($value,$this->e_key); }else{ $unenc[$key]=$value; } } array_push($nameArray,$unenc); } //Creates an object with the data, but doesn't work with CI active record //foreach ($nameArray as $akey => $aval) { // $namea -> {$akey} = $aval; //} //return $data; $data['name'] = $nameArray; $this->load->view('names/name_view',$data); View: if(count($name) > 0){ foreach($name as $key=>$row){ echo $row['data']; [...] In the second (now) controller there is some commented out code that will make an object, but it doesn't behave as expected with active record. Is there a way to take the $nameArray() array and change it into an object that will work with existing view code (such as the code in the 'before:view' above)? Thanks!

    Read the article

  • How to delete Tomcat Access Log after n days?

    - by Andreas
    I only would like to keep the Access Logs of the last n days created by Tomcat Access Log Valve. http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Access%20Log%20Valve But there seems to be no configuration-Attribute to define how long to keep the log-files? I guess this is because "Access Log Valve" only creates log files and doesn't delete them, is that correct?

    Read the article

  • session problem in rails

    - by piemesons
    I am getting this error. No :secret given to the #protect_from_forgery call. Set that or use a session store capable of generating its own keys (Cookie Session Store). I deleted all the cookies, values from sessions table. Restarted my server.Still geting the same error and this code was working yesterday.

    Read the article

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