Search Results

Search found 3376 results on 136 pages for 'arun david'.

Page 77/136 | < Previous Page | 73 74 75 76 77 78 79 80 81 82 83 84  | Next Page >

  • UIView animation along a round path?

    - by david
    I need to make my little guy (in a UIIamgeView) jump forward and it has to look natural. I want to know is there a way to do it with CoreAnimation (beginAnimation/commitAnimation)? I could do it by setting a point in between in the air but the movement looks not natural :P

    Read the article

  • PList Chicken/Egg Scenario

    - by David van Dugteren
    Hi, I want to read/write to cache.plist If I want to read an existing premade plist file stored in the resources folder I can go: path = [[NSBundle mainBundle] bundlePath]; NSString *finalPath = [path stringByAppendingPathWithComponent@"cache.plist"]; NSMutableDictionary *root = ... But then I wish to read it from the iPhone. Can't, the Resources folder is only readable. So I need to use: NSDocumentDirectory, NSUserDomain,YES So how can I have my plist file preinstalled to the Document Directory location? Thus meaning I don't have to mess around with untidy code copying the plist file over at startup. (Unless that's the only way).

    Read the article

  • JQUERY Dialog Box

    - by David Bonnici
    Hi Guys, Im trying to do a dialog box with jquery. In this dialog box Im going to have terms and conditions. The problem is that the dialog box is only displayed for the FIRST TIME. This is the code JAVASCRIPT CODE: function showTOC() { $("#TOC").dialog({ modal: true, overlay: { opacity: 0.7, background: "black" } }) } HTML Code (A HREF) class="TOClink" href="javascript:showTOC();">View Terms & Conditions</> <div>id="example" title="Terms & Conditions">1..2.. </div> The problem I think is that when you close the dialog box the DIV is destroyed from the html code therfore it can never be displayed again on screen. Can you please help! Thanks

    Read the article

  • preg_match_all and newlines inside quotes

    - by David
    Another noob regex problem/question. I'm probably doing something silly so I thought I'd exploit the general ingenuity of the SO regulars ;) Trying to match newlines but only if they occur within either double quotes or single quotes. I also want to catch strings that are between quotes but contain no newlines. Okay so there's what i got, with output. Below that, will be the output I would like to get. Any help would be greatly appreciated! :) I use Regex Coach to help me create my patterns, being a novice and all. According to RC, The pattern I supply does match all occurances within the data, but in my PHP, it skips over the multi-line part. I have tried with the 'm' pattern modifier already, to no avail. Contents of $CompressedData: <?php $Var = "test"; $Var2 = "test2"; $Var3 = "blah blah blah blah blah blah blah blah blah"; $Var4 = "hello"; ?> Pattern / Code: preg_match_all('!(\'|")(\b.*\b\n*)*(\'|")!', $CompressedData, $Matches); Current print_r output of $Matches: Array ( [0] => Array ( [0] => "test" [1] => "test2" [2] => "hello" ) ... } DESIRED print_r output of $Matches: Array ( [0] => Array ( [0] => "test" [1] => "test2" [2] => "blah blah blah blah blah blah blah blah blah" [3] => "hello" ) ... }

    Read the article

  • Localization as an afterthought-- screwed?

    - by David
    So I signed on with a startup web development company as a subcontractor. They are putting together a large, complex user/product management system for a company that needs to support multiple levels of hierarchial localization. I signed a 3 month contract, and upon looking at their code, wish I hadn't. They opted to write their own MVC framework (I guess the client company didn't want to use a prewritten one) and it's extremely poorly written. There's SQL scattered throughout almost every model view and controller (and there's no parameter-based find methods, it's all SQL) and they haven't even THOUGHT about localization yet-- something that will have an affect on nearly EVERY query. The due date is 4 months away, and I honestly think we'd make good progress by scrapping the whole thing and going with CakePHP. Have any of you been in a similar situation, and what did you do? PS: This is written in PHP/MySQL.

    Read the article

  • How do I memoize expensive calculations on Django model objects?

    - by David Eyk
    I have several TextField columns on my UserProfile object which contain JSON objects. I've also defined a setter/getter property for each column which encapsulates the logic for serializing and deserializing the JSON into python datastructures. The nature of this data ensures that it will be accessed many times by view and template logic within a single Request. To save on deserialization costs, I would like to memoize the python datastructures on read, invalidating on direct write to the property or save signal from the model object. Where/How do I store the memo? I'm nervous about using instance variables, as I don't understand the magic behind how any particular UserProfile is instantiated by a query. Is __init__ safe to use, or do I need to check the existence of the memo attribute via hasattr() at each read? Here's an example of my current implementation: class UserProfile(Model): text_json = models.TextField(default=text_defaults) @property def text(self): if not hasattr(self, "text_memo"): self.text_memo = None self.text_memo = self.text_memo or simplejson.loads(self.text_json) return self.text_memo @text.setter def text(self, value=None): self.text_memo = None self.text_json = simplejson.dumps(value)

    Read the article

  • Communication between modules

    - by David Elentok
    I have an application that consists from the following three modules: Search (to search for objects) List (to display the search results) Painter (to allow me to edit objects) - this module isn't always loaded (Each object is a figure that I can edit in the painter). When I open an object in the painter it's added to the objects that are already in the painter and I can move it and alter it. I'm using an object similar to the EventAggregator to communicate between the modules. For example, to show the search results I publish a "ShowList" event that is caught by the List module (I'm not sure this is the best way to do this, if anyone has better idea please comment...). One of the features of the search module requires it to get the selected object in the painter (if the painter is available), and I'm not sure what would be the best way to do that... I thought of these solutions: Whenever the selected object in the painter changes it will publish a "PainterSelectedObjectChanged" event which will be caught by the search module and stored for later use. When the selected object is needed by the search module it will publish a "RequestingPainterSelectedObject" event which will be caught by the painter module. The painter module will then set the "SelectedObject" property in the EventArgs object, and when the publish is complete and we're back in the search module we will have the painter's selected object in the EventArgs object. What do you think? what is the right way to do this?

    Read the article

  • What is the most you've charged for a single programming job?

    - by David Murdoch
    This question/wiki is more aimed at my fellow freelancers rather than companies or groups...but any and all feedback definitely is welcome. When quoting jobs for anything over $10,000 I always feel uneasy and unsure about the estimate I'm providing (though, I'm not sure why, I know what I'm worth [ I think :-) ] and I charge appropriately. I'm sure there are more (noob) freelancers here on S.O. that feel the same way. In danger of being voted closed because of its subjective (but factual) nature - the question(s): What is the largest amount you have charged for a single programming job (not including maintenance, support, or residual income). What are some of the details of the specific job? (research, q&a, challenges, etc) What languages did you use to get the job done? Assuming you bill your work at an hourly rate, what was the rate? How long did the job actually take you to complete? (from start to deployment, how many weeks, months, years?)

    Read the article

  • Compiling a bunch of stuff in the folder (java, on a mac)

    - by David
    two questions: how do i compile a .java file that isn't on my username (like something in documents or some other sub folder) if i have multiple .java files and i compile one that contains method that are contained in the others does the compiler compile those other files. heres an example of the second question. example1.java: class example1 { main () { example2.method () } } example2.java: class example2 { method () } When i compile example1.java will example2.java also be compiled?

    Read the article

  • XmlHttpRequest in a bookmarklet returns empty responseText on GET?

    - by David Eyk
    I'm trying to build a javascript bookmarklet for a special URL shortening service we've built at http://esv.to for shortening scripture references (i.e. "Matthew 5" becomes "http://esv.to/Mt5". The bookmarklet is supposed to do a GET request to http://api.esv.to/Matthew+5, which returns a text/plain response of http://esv.to/Mt5. The code for the bookmarklet itself looks like this (expanded for readability): var body = document.getElementsByTagName('body')[0], script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'http://esv.to/media/js/bookmarklet.js'; body.appendChild(script); void(0); The code from http://esv.to/media/js/bookmarklet.js looks like this: (function() { function shorten(ref, callback) { var url = "http://esv.to/api/" + escape(ref); var req = new XMLHttpRequest(); req.onreadystatechange = function shortenIt() { if ( this.readyState == 4 && this.status == 200 ) { callback(req.responseText); }; }; req.open( "GET", url ); req.send(); }; function doBookmarklet() { var ref = prompt("Enter a scripture reference or keyword search to link to:", "") shorten(ref, function (short) { prompt("Here is your shortened ESV URL:", short); }); }; doBookmarklet(); })(); When called from http://esv.to itself, the bookmarklet works correctly. But when used on another page, it does not. The strange thing is, when I watch the request from Firebug, the response is 200 OK, the browser downloads 17 bytes (the length of the returned string), but the response body is empty! No error is thrown, just an empty responseText on the XmlHttpRequest object. Now, according to http://stackoverflow.com/questions/664689/ajax-call-from-bookmarklet, GET shouldn't violate the same origin policy. Is this a bug? Is there a workaround?

    Read the article

  • How Does Entourage 2008 (for Mac) Decide Which Emails Form a Conversation?

    - by David M
    This is a little bit like http://stackoverflow.com/questions/288757/how-to-identify-email-belongs-to-existing-thread-or-conversation but I am more interested in how Entourage 2008 really does threading as opposed to how it ought to. I have the parent message that has something like Message-ID: <[email protected]/> then some replies that have (in addition to their own Message-ID) In-Reply-To: <[email protected]/> However, these show up as two conversations! The first conversation consists solely of the parent message, and the second conversation consists of the other replies. Would adding a References: header (as described in RFC 2822) resolve this?

    Read the article

  • How to convert a PCRE to a POSIX RE?

    - by David M
    This interesting question http://stackoverflow.com/questions/2837267/ concerned how to do a negative look-ahead in MySQL. The poster wanted to get the effect of Kansas(?! State) because MySQL doesn't implement look-ahead assertions, a number of answers came up the equivalent Kansas($|[^ ]| ($|[^S])| S($|[^t])| St($|[^a])| Sta($|[^t])| Stat($|[^e])) The poster pointed out that's a PITA to do for potentially lots of expressions. Is there a script/utility/mode of PCRE (or some other package) that will convert a PCRE (if possible) to an equivalent regex that doesn't use Perl's snazzy features? I'm fully aware that some Perl-style regexes cannot be stated as an ordinary regex, so I would not expect the tool to do the impossible, of course!

    Read the article

  • How do I display a Wicket Datatable, sorted by a specific column by default?

    - by David
    Hello everyone! I have a question regarding Wicket's Datatable. I am currently using DataTable to display a few columns of data. My table is set up as follows: DataTable<Column> dataTable = new DataTable<Column>("columnsTable", columns, provider, maxRowsPerPage) { @Override protected Item<Column> newRowItem(String id, int index, IModel<Column> model) { return new OddEvenItem<Column>(id, index, model); } }; The columns look like so: columns[0] = new PropertyColumn<Column>(new Model<String>("Description"), "description", "description"); columns[1] = new PropertyColumn<Column>(new Model<String>("Logic"), "columnLogic"); columns[2] = new PropertyColumn<Column>(new Model<String>("Type"), "dataType", "dataType"); Here is my column data provider: public class ColumnSortableDataProvider extends SortableDataProvider<Column> { private static final long serialVersionUID = 1L; private List<Column> list = null; public ColumnSortableDataProvider(Table table) { this.list = Arrays.asList(table.getColumns().toArray(new Column[0])); } public ColumnSortableDataProvider(List<Column> list) { this.list = list; } @Override public Iterator<? extends Column> iterator(int first, int count) { /* first - first row of data count - minimum number of elements to retrieve So this method returns an iterator capable of iterating over {first, first+count} items */ Iterator<Column> iterator = null; try { if(getSort() != null) { Collections.sort(list, new Comparator<Column>() { private static final long serialVersionUID = 1L; @Override public int compare(Column c1, Column c2) { int result=1; PropertyModel<Comparable> model1= new PropertyModel<Comparable>(c1, getSort().getProperty()); PropertyModel<Comparable> model2= new PropertyModel<Comparable>(c2, getSort().getProperty()); if(model1.getObject() == null && model2.getObject() == null) result = 0; else if(model1.getObject() == null) result = 1; else if(model2.getObject() == null) result = -1; else result = ((Comparable)model1.getObject()).compareTo(model2.getObject()); result = getSort().isAscending() ? result : -result; return result; } }); } if (list.size() > (first+count)) iterator = list.subList(first, first+count).iterator(); else iterator = list.iterator(); } catch (Exception e) { e.printStackTrace(); } return iterator; } Sorting by clicking a column works perfectly, but I would like the table to initially be sorted, by default, by the Description column. I am at a loss to do this. If you need to see some other code, please let me know. Thank you in advance!!! - D

    Read the article

  • ASP.NET The underlying connection was closed: Could not establish trust relat

    - by David Lively
    When attempting to use HttpWebRequest to retrieve a page from my dev server, I get a web exception: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel." The remote certificate is invalid according to the validation procedure... The url I'm attempting to read from is a plain-old http://myserver.com/mypage.asp - no SSL. The production server has a valid certificate so this shouldn't be an issue, but our dev server doesn't. Help!

    Read the article

  • Backing Up Transaction Logs to Tape?

    - by David Stein
    I'm about to put my database in Full Recovery Model and start taking transaction log backups. I am taking a full nightly backup to another server and later in the evening this file and many others are backed up to tape. My question is this. I will take hourly (or more if necessary) t-log backups and store them on the other server as well. However, if my full backups are passing DBCC and integrity checks, do I need to put my T-Logs on tape? If someone wants point in time recovery to yesterday at 2pm, I would need the previous full backup and the transaction logs. However, other than that case, if I know my full back ups are good, is there value in keeping the previous day's transaction log backups?

    Read the article

  • How to re-use a thread in Java ?

    - by David
    I am a building a console Sudoku Solver where the main objective is raw speed. I now have a ManagerThread that starts WorkerThreads to compute the neibhbors of each cell. So one WorkerThread is started for each cell right now. How can I re-use an existing thread that has completed its work? The Thread Pool Pattern seems to be the solution, but I don't understand what to do to prevent the thread from dying once its job has been completed. ps : I do not expect to gain much performance for this particular task, just want to experiment how multi-threading works before applying it to the more complex parts of the code. Thanks

    Read the article

  • Factory Girl Association

    - by David Lyod
    I have an association of a Admin - Account in factory girl I now wish to associate a second user with the same account but am unable to do so. I build my Admin-Account association like this u.account { |account| account.association(:account)} This works fine and creates the Account and Admin association. Im looking for a way to setup a second user who's account also points to the record created in the Admin factory association. I currently just build the second user as such @user = Factory.build(:seconduser) @user.account = Account.first @user.save! Which works but seems somewhat hacky .

    Read the article

  • How to make <dl> layout horizontally?

    - by David
    I'm trying to develop a layout for my website in which elements of a definition list will be laid out horizontally, kind of like this: term 1 term 2 term 3 definition 1 definition 2 definition 3 Anyone know a way to make a definition list look like this using valid CSS? Or if I can't do it with a <dl>, what would be the recommended structure?

    Read the article

  • Zend database query result converts column values to null

    - by David Zapata
    Hi again. I am using the next instructions to get some registers from my Database. Create the needed models (from the params module): $obj_paramtype_model = new Params_Model_DbTable_Paramtype(); $obj_param_model = new Params_Model_DbTable_Param(); Getting the available locales from the database // This returns a Zend_Db_Table_Row_Abstract class object $obj_paramtype = $obj_paramtype_model->getParamtypeByValue('available_locales'); // This is a query used to add conditions to the next sentence. This is executed from the Params_Model_DbTable_Param instance class, that depends from Params_Model_DbTable_Paramtype class (reference map and dependentTables arrays are fine in both classes) $obj_select = $this->select()->where('deleted_at IS NULL')->order('name'); // Execute the next query, applying the select restrictions. This returns a Zend_Db_Table_Rowset_Abstract class object. This means "Find Params by Paramtype" $obj_params_rowset = $obj_paramtype->findDependentRowset('Params_Model_DbTable_Param', 'Paramtype', $obj_paramtype); // Here the firebug log displays the queries.... Zend_Registry::get('log')->debug($obj_params_rowset); I have a profiler for all my DB executions from Zend. At this point the log and profiler objects (that includes Firebug writers), shows the executed SQL Queries, and the last line displays the resulting Zend_Db_Table_Rowset_Abstract class object. If I execute the SQL Queries in some MySQL Client, the results are as expected. But the Zend Firebug log writer displays as NULL the column values with latin characters (ñ). In other words, the external SQL client shows es_CO | Español de Colombia and en_US | English of United States but the Query results from Zend displays (and returns) es_CO | null and en_US | English of United States. I've deleted the ñ character from Español de Colombia and the query results are just fine in my Zend Log Firebug screen, and in the final Zend Form element. The MySQL database, tables and columns are in UTF-8 - utf8_unicode_ci collation. All my zend framework pages are in UTF-8 charset. I'm using XAMPP 1.7.1 (PHP 5.2.9, Apache at port 90 and MySQL 5.1.33-community) running on Windows 7 Ultimate; Zend Framework 1.10.1. I'm sorry if there is so much information, but I don't really know why could that happen, so I tryed to provide as much related information as I could to help to find some answer.

    Read the article

< Previous Page | 73 74 75 76 77 78 79 80 81 82 83 84  | Next Page >