Search Results

Search found 3380 results on 136 pages for 'tim b james'.

Page 125/136 | < Previous Page | 121 122 123 124 125 126 127 128 129 130 131 132  | Next Page >

  • javascript "this" points to Window object again

    - by terrani
    Hello, I asked a question on http://stackoverflow.com/questions/2719643/javascript-this-points-to-window-object regarding "this" points to Window object. here is source code var archive = function(){} archive.prototype.action = { test: function(callback){ callback(); }, test2: function(){ console.log(this); } } var oArchive = new archive(); oArchive.action.test(oArchive.action.test2); Tim Down wrote "but that function is then called using callback(), which means it is not called as a method and hence this is the global object". What are differences between calling a function by its actual name and callback() as shown on the source code? How does console.log(this) in test2 points to Window when it is inside archive.action???

    Read the article

  • Must See Conference Videos for Python/Django Developers

    - by Koobz
    There's lots of good conference videos online regarding Python and Django development. Instead of watching ST:TNG at the computer, I figure it'd more productive to hone my knowledge . Fire away with some of your most inspiring and educational Python, Django, or simply programming related talks. Provide an explanation of why you found the talk useful. Examples: James Bennet on Re-usable Apps - Got me to take a serious look at django apps. Put together a fairly robust site in two days afterwards with django-cms, django-photologue, django-contact-form. Good advice on when your app is crossing boundaries and why it's good to err on the site of 'make it a separate app.'

    Read the article

  • How can I get to the value of my WPF UserControl DependencyProperty from UI Automation Framework?

    - by Surfbutler
    Hi, I'm having trouble getting access to my WPF UserControl DependencyProperty values through the UI Automation Framework. I've used James McCaffreys article in MSDN as a starting point (Automating IO Tests in WPF Applications, MSDN March 2009), but I can only see properties etc in standard controls such as buttons. I'm assuming there's some Automation interface I have to implement on my UserControl, but what and how? I can already see my control fine e.g. in UISpy, but I can't see the dependency properties within it. Here's what my usercontrol looks like currently in UISpy: AutomationElement General Accessibility AccessKey: "" AcceleratorKey: "" IsKeyboardFocusable: "False" LabeledBy: "(null)" HelpText: "Switches 48v Phantom Power On/Off (for Mic inputs only)." State IsEnabled: "True" HasKeyboardFocus: "False" Identification ClassName: "" ControlType: "ControlType.Custom" Culture: "(null)" AutomationId: "V48SwL" LocalizedControlType: "custom" Name: "" ProcessId: "5684 (VirtualSix)" RuntimeId: "7 5684 40026340" IsPassword: "False" IsControlElement: "True" IsContentElement: "True" Visibility BoundingRectangle: "(140, 457, 31, 20)" ClickablePoint: "155,467" IsOffscreen: "False" ControlPatterns

    Read the article

  • PHP and JSON comment help..

    - by jay
    hi, guys thanks for looking my problem is that i cant seem to get jquery to display my generated data. here is my JSON output ("posts":[{"id":"1-2","time":"0","name":"dash","avatar":"http:\/\/www.gravatar.com\/avatar\/9ff30cc2646099e31a4ee4c0376091b0?s=182&d=identicon&r=PG","comment":"rtetretrete tet rt uh utert"},{"id":"2-2","time":"0","name":"james","avatar":"http:\/\/www.gravatar.com\/avatar\/d41d8cd98f00b204e9800998ecf8427e?s=182&d=identicon&r=PG","comment":"fsdfdfsdf\r\n"}]) and here is my jquery $(document).ready(function(){ var url="comments.php"; $.getJSON(url,function(json){ $.each(json.posts,function(i,post){ $("#content").append( '<div class="post">'+ '<h1>'+post.name+'</h1>'+ '<p>'+post.comment+'</p>'+ '<p>added: <em>'+post.time+'</em></p>'+ '<p>posted by: <strong>'+post.name+'</strong></p>'+ '<p>avatar: <strong>'+post.avatar+'</strong></p>'+ '</div>' ); }); }); });

    Read the article

  • MySQL ALTER TABLE on very large table - is it safe to run it?

    - by Timothy Mifsud
    I have a MySQL database with one particular MyISAM table of above 4 million rows. I update this table about once a week with about 2000 new rows. After updating, I then perform the following statement: ALTER TABLE x ORDER BY PK DESC i.e. I order the table in question by the primary key field in descending order. This has not given me any problems on my development machine (Windows with 3GB memory), but, even though 3 times I have tried it successfully on the production Linux server (with 512MB RAM - and achieving the resulted sorted table in about 6 minutes each time), the last time I tried it I had to stop the query after about 30 minutes and rebuild the database from a backup. I have started to wonder whether a 512MB server can cope with that statement (on such a large table) as I have read that a temporary table is created to perform the ALTER TABLE command?! And, if it can be safely run, what should be the expected time for the alteration of the table? Thanks in advance, Tim

    Read the article

  • How to get a list of names + a count of occurrences relating to the name from another table

    - by Jacob Degeling
    Hi, Hope my subject line was descriptive enough. Basically, I have a table called Students, and one called Absences. The Students table contains student information (Name, DOB, StudentID etc.), the Absences table contains any absences (Date, Reason, related by StudentID). I want to get a full list of the students, plus a count of their absences. Sample results would be: StudentName Absences ------------- ----------- Johnny 3 Mark 2 James 1 Anthony 0 Sharon 0 Can someone suggest a way I should tackle this problem? I would prefer to have a single SQL statement, possibly incorporating some views etc. Thanks, Jacob.

    Read the article

  • Sharing [config] data across modules,functions

    - by williamstw
    I have some configuration data in a config file that I read off disk when the app starts. I need to make that configuration data available to other functions/modules in the application. I started down the path of looking into ets/mnesia to store the data on startup to make it shared among all processes, but then my inner voice cautioned me that there must be a more functional, erlang-y way to do this. The only alternate approach I've come up with so far is setting up a module that has an actor loop that reads the data on startup and responds to messages like {Key, From} and responds by From ! {ok,Value}. Then, I gave up and decided to ask... Thanks, --tim

    Read the article

  • SSRS Multilookup Function for Names with Comma Separation

    - by AliceAyers292
    I would like to put the following in a a multilookup drop-down in reporting services: "Smith, John", "Jones, Tim", "Kelly, Andy" The comma separating the first and last name prevents the multilookup from working correctly. I am also unable to use ticks (' or ") in reporting service to keep the separating comma from working like a multilookup comma that separates the fields I want to select from. Is there a way to keep the comma in the names while still allowing multilookup? Any help would be much appreciated. Thank you!

    Read the article

  • Using Lucene to Query File properties in Windows

    - by sneha
    Hi All, I am planning to use Apache lucense in one of my projects, I want to index files based on the file properties (I won’t be indexing the data) and I want lucense to query the index so that I can quickly find list of files to based on the properties . E.g: give me all the files with access time greater than 10/10/2005 and access time less than 10/04/2010 and file created by james. Can i use Lucene for these kind of projects ? or i better of using windows search (the foor print is very heavy almost 5 MB :( ) and i have to bundling this as part of my application is seems to tough. Can you please suggest is there any better alternatives here?

    Read the article

  • Why doesn't ConcurrentQueue<T>.Count return 0 when IsEmpty == true?

    - by DanTup - Danny Tuppeny
    I was reading about the new concurrent collection classes in .NET 4 on James Michael Hare's blog, and the page talking about ConcurrentQueue<T> says: It’s still recommended, however, that for empty checks you call IsEmpty instead of comparing Count to zero. I'm curious - if there is a reason to use IsEmpty instead of comparing Count to 0, why does the class not internally check IsEmpty and return 0 before doing any of the expensive work to count? E.g.: public int Count { get { // Check IsEmpty so we can bail out quicker if (this.IsEmpty) return 0; // Rest of "expensive" counting code } } It seems strange to suggest this if it could be "fixed" so easily with no side-effects?

    Read the article

  • Algorithm to find a measurement of similarity between lists.

    - by Cubed
    Given that I have two lists that each contain a separate subset of a common superset, is there an algorithm to give me a similarity measurement? Example: A = { John, Mary, Kate, Peter } and B = { Peter, James, Mary, Kate } How similar are these two lists? Note that I do not know all elements of the common superset. Update: I was unclear and I have probably used the word 'set' in a sloppy fashion. My apologies. Clarification: Order is of importance. If identical elements occupy the same position in the list, we have the highest similarity for that element. The similarity decreased the farther apart the identical elements are. The similarity is even lower if the element only exists in one of the lists. I could even add the extra dimension that lower indices are of greater value, so a a[1] == b[1] is worth more than a[9] == b[9], but that is mainly cause I am curious.

    Read the article

  • Loading dictionary for input method suggestion list

    - by jpspringall
    Hi, For various reasons, i'm trying to write my own input keyboard. So far all is going well except that of creating the suggestions. I've found the latinIME algorithm, which is all good. However i'm having major difficulty working out how to load the dictionary in the first place. I've had a good look round the net, and found various suggestions, but no definitive answers, and i cant seem to get any of them to work. If anyone has any suggestions on how best to do it, or even better some sample code, that would be brilliant. Many Thanks James

    Read the article

  • C# Reflection and Getting Properties

    - by Nathan
    I have the following dummy class structure and I am trying to find out how to get the properties from each instance of the class People in PeopleList. I know how to get the properties from a single instance of People but can't for the life of me figure out how to get it from PeopleList. I am sure this is really straightforward but can someone point me in the right direction? public class Example { public class People { private string _name; public string Name { get { return _name; } set { _name = value; } } private int _age; public int Age { get { return _age; } set { _age = value; } } public People() { } public People(string name, int age) { this._name = name; this._age = age; } } public class PeopleList : List<People> { public static void DoStuff() { PeopleList newList = new PeopleList(); // Do some stuff newList.Add(new People("Tim", 35)); } } }

    Read the article

  • Removing the Default Wrap Character From all records

    - by aceinthehole
    I am using BizTalk 2009 and I have a flat file that is similar to the following "0162892172","TIM ","LastName ","760 "," ","COMANCHE ","LN " "0143248282","GEORGE ","LastName ","625 "," ","ENID ","AVE " When I parse it and start mapping it I need to get rid of the quotation marks. I have marked the Wrap Character attribute for the schema as a quotation mark but it doesn't remove it when BizTalk is parsing the file. Is there an easy way to specify the removal of a wrap character or am I going to have to run it through a script functiod every time? Also I would like to be able to remove the trailing spaces as well, if at all possible.

    Read the article

  • erlang io:format, and a hanging web application

    - by williamstw
    While I'm learning a new language, I'll typically put lots of silly println's to see what values are where at specific times. It usually suffices because the languages typically have available a tostring equivalent. In trying that same approach with erlang, my webapp just "hangs" when there's a value attempted to be printed that's not a list. This happens when variable being printed is a tuple instead of a list. There's no error, exception, nothing... just doesn't respond. Now, I'm muddling through by being careful about what I'm writing out and as I learn more, things are getting better. But I wonder, is there a way to more reliably to [blindly] print a value to stdout? Thanks, --tim

    Read the article

  • How can I copy a queryset to a new model in django admin?

    - by user3806832
    I'm trying to write an action that allows the user to select the queryset and copy it to a new table. So: John, Mark, James, Tyler and Joe are in a table 1( called round 1) The user selects the action that say to "move to next round" and those same instances that were chosen are now also in the table for "round 2". I started trying with an action but don't really know where to go from here: def Round_2(modeladmin, request, queryset): For X in queryset: X.pk = None perform.short_description = "Move to Round 2" How can I copy them to the next table with all of their information (pk doesn't have to be the same)? Thanks

    Read the article

  • Python | How to create dynamic and expandable dictionaries

    - by MMRUser
    I want to create a Python dictionary which holds values in a multidimensional accept and it should be able to expand, this is the structure that the values should be stored :- userdata = {'data':[{'username':'Ronny Leech','age':'22','country':'Siberia'},{'username':'Cronulla James','age':'34','country':'USA'}]} Lets say I want to add another user def user_list(): users = [] for i in xrange(5, 0, -1): lonlatuser.append(('username','%s %s' % firstn, lastn)) lonlatuser.append(('age',age)) lonlatuser.append(('country',country)) return dict(user) This will only returns a dictionary with a single value in it (since the key names are same values will overwritten).So how do I append a set of values to this dictionary. Note: assume age, firstn, lastn and country are dynamically generated. Thanks.

    Read the article

  • Freeing JavaScript object

    - by pion
    I am looking at the example from http://www.javascriptkit.com/javatutors/oopjs.shtml var person = new Object() person.name = "Tim Scarfe" person.height = "6Ft" But there is no mention how to "free" it in order to avoid memory leak. Will the following code free it? person = null; How do you free a JavaScript Object using "new Object()? How do you free a JavaScript Array allocated using "new Array(10)"? How do you free a JavaScript JSON allocated using "var json = {"width": 480, "height": 640}"? Thanks in advance for your help.

    Read the article

  • Retrieving values from Env in mod_esi or webtools

    - by williamstw
    A complete noob question, but how exactly do I get values (e.g. path_info) from inside the callback? From the docs, I thought it was a list of tuples, which I thought would make it accessible via lists:keyfind, but I've had no luck. So far, all the examples I've found only show how to print everything with io_lib but not how to access the values by key... Thanks, --tim The docs: Module:Function(SessionID, Env, Input)- _ Types SessionID = term() Env = [EnvironmentDirectives] ++ ParsedHeader EnvironmentDirectives = {Key, Value} Key = query_string | content_length | server_software | gateway_interface | server_protocol | server_port | request_method | remote_addr | script_name. <v>Input = string()

    Read the article

  • PHP upload to GoDaddy hosted site

    - by 105894384987190582154
    Hi, relatively new to both hosting and PHP, so apologies for (probably) missing the obvious, but… I built a page which would allow file uploads to my site, following the example laid out here: W3Schools PHP upload exercise Through the File Manage on my Godaddy hosting, I created a folder named ’upload’ so that the file would land there after being uploaded through the page I had built. Part of the returned page that appears after submitted the file reads: Temp file: d:temptmpphpE4C9.tmp Stored in: upload/testfile.txt which would indicate that the file has been sucesscully uploaded given the code in the example. However, I cannot see the file in the ’upload’ folder via my File Manage, or anywhere else on the hosting of my site (as far as I can see). I also cannot see the ’temp’ folder anywhere either… Any help or clarification would be greatly appreciated. Thanks Tim

    Read the article

  • Sending an array to a function in codeigniter

    - by Mozammil
    I have the following codes which sends an array to the function /chat in codeigniter $(document).ready(function () { $('#submit').live('click', function (eve) { eve.preventDefault(); $.ajax({ url: "http://localhost/fq/index.php/splash/chat/", type: 'POST', data: a, success: function (html) { alert(html); } }); }); Let us assume that array a contains names of people only. ( John, James, Smith) I want to be able to retrieve the all the values from the array in the function chat. How can it be done?

    Read the article

  • TSQL - compare tables

    - by Rya
    I want to create a stored procedure that compares the results of two queries. If the results of the 2nd table can be found in the first, print 'YES', otherwise, print 'No'. Table 1: SELECT dbo.Roles.RoleName, dbo.UserRoles.RoleID FROM dbo.Roles LEFT OUTER JOIN dbo.UserRoles ON dbo.Roles.RoleID = dbo.UserRoles.RoleID WHERE (dbo.Roles.PortalID = 0) AND (dbo.UserRoles.UserID = 2) Table 2: Declare @RowData as nvarchar(2000) Set @RowData = ( SELECT EditPermissions FROM vw_XMP_DMS_Documents where DocumentID = 2) Select Data from dbo.split(@RowData, ',') For example. Table 1: John Jack James Table 2: John Sally Jane Print 'YES' Is this possible??? Thank you all very much. -R

    Read the article

  • scala xml rewrite rule (or, simple pattern help)

    - by williamstw
    I'm missing some fairly simple syntax I gather. I'm trying to rewrite an element label to something else and keep everything else intact. object htmlRule extends RewriteRule { override def transform(n: Node): Seq[Node] = n match { case Elem(prefix, "document", attribs, scope, child@_*) => Elem(prefix, "html", attribs, scope, child) case other => other } } Now, I ask for an explanation of two things: 1) What exactly does "child@_*" mean in plain English? 2) How can I capture the value of "child@_*" and just let it pass right through to the new element? Currently, I get the following error, which makes sense. [error] found : Seq[scala.xml.Node] [error] required: scala.xml.Node [error] Elem(prefix, "html", attribs, scope, child) I'm not wedded to this either, so if there's a better way to simply change the element name of a specific node, let's here it... Thanks, --tim

    Read the article

  • Problems getting git 'server' to work on Windows

    - by Benjol
    I've followed the Tim's article (mentioned in the answer to this question), but - like many others, it seems - I'm stuck when trying do the test clone at the end. I get the fatal: the remote end hung up unexpectedly error, even though my $HOME path seems to be right. Anyone got any pointers to where I might start for debugging this? My git and linux-fu are severely limited... I'm aware of this answer to the same question, but it doesn't apply in my case, I don't get any messages about paths.

    Read the article

  • Sort a list numerically in Python

    - by Matthew
    So I have this list, we'll call it listA. I'm trying to get the [3] item in each list e.g. ['5.01','5.88','2.10','9.45','17.58','2.76'] in sorted order. So the end result would start the entire list over again with Santa at the top. Does that make any sense? [['John Doe', u'25.78', u'20.77', '5.01'], ['Jane Doe', u'21.08', u'15.20', '5.88'], ['James Bond', u'20.57', u'18.47', '2.10'], ['Michael Jordan', u'28.50', u'19.05', '9.45'], ['Santa', u'31.13', u'13.55', '17.58'], ['Easter Bunny', u'17.20', u'14.44', '2.76']]

    Read the article

< Previous Page | 121 122 123 124 125 126 127 128 129 130 131 132  | Next Page >