Search Results

Search found 1226 results on 50 pages for 'jack flynn'.

Page 30/50 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • glibc regexp performance

    - by Jack
    Anyone has experience measuring glibc regexp functions? Are there any generic tests I need to run to make such a measurements (in addition to testing the exact patterns I intend to search)? Thanks.

    Read the article

  • Fatal error with Custom Magento Module on one server but not the other

    - by Jack
    Hi, I am creating my own custom module in Magento and during testing on a Litespeed server (PHP v5.2.14) I am getting a Fatal Error: Call to a member function batch() on a non-object in ../../../BatchController.php on line 25 that was not appearing during testing on another linux server and a wamp server (PHP v5.2.11). This one has stumped me. I am guessing it has something to do with the server configuration rather than the code itself. But i am just guessing. I was hoping someone here could tell me. The only real major difference I could see, aside from the php versions and environment, is that the server that the error is on is using the Suhosin Patch. But would that be something that could cause this? The line in question is Mage::getModel('mymodule/mymodel')->batch(); which is enclosed in an IF statement. batch() is a public function located in my model file. If you need more code let me know. Thanks!

    Read the article

  • Django: Extending User Model - Inline User fields in UserProfile

    - by Jack Sparrow
    Is there a way to display User fields under a form that adds/edits a UserProfile model? I am extending default Django User model like this: class UserProfile(models.Model): user = models.OneToOneField(User, unique=True) about = models.TextField(blank=True) I know that it is possible to make a: class UserProfileInlineAdmin(admin.TabularInline): and then inline this in User ModelAdmin but I want to achieve the opposite effect, something like inverse inlining, displaying the fields of the model pointed by the OneToOne Relationship (User) in the page of the model defining the relationship (UserProfile). I don't care if it would be in the admin or in a custom view/template. I just need to know how to achieve this. I've been struggling with ModelForms and Formsets, I know the answer is somewhere there, but my little experience in Django doesn't allow me to come up with the solution yet. A little example would be really helpful!

    Read the article

  • jquery.validation - how to ignore default values when validating mandatory fields

    - by jack
    I am using jquery validation plugin to validate a registration form. Each text input field has instructions pre-filled as values in the input box ex: for a text-input box id='Name', the default value will be set to 'Enter Your Name'. I have pasted below sample code: <input type="text" id="Name" value="Enter Your Name" onfocus="if(this.value == 'Your Name'){this.value = '';}" type="text" class="required" onblur="if(this.value == ''){this.value='Your Name';}" size="25" /> What I need to know is how to specify in the validation rule such that the plugin throws a required field error if the input box contains either the default message or empty values. Help much appreciated.

    Read the article

  • iPhone SDK - options when text is selected

    - by Jack
    Hi, When text is selected in the iPhone OS, the user is given the option to copy/cut etc. How would I go about adding a new option here? An example of this is in CourseNotes for iPad http://www.youtube.com/watch?v=VLQhKkgco_I where the option is used to look up on wikipedia (around 55seconds in). Thanks

    Read the article

  • Log into Launchpad from python script

    - by jack
    How can I log into my Launchpad account in a python script? Any sample code would be appreciated. The login url is https://launchpad.net/+login and then redirect to something like https://login.launchpad.net/fJLVSRbxPfKTpVDr/+decide Thanks in advance!

    Read the article

  • Running ASP.NET MVC 1.0 application

    - by Jack Daniels
    Hello I'm trying to build an app with ASP.NET MVC 1.0. I already have installed MVC 1.0 but after running the application It trows an exception: Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1705: Assembly 'MVC_CustomControls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Routing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' Any help is greatly appreciated.

    Read the article

  • Hosting an NServiceBus subscriber in the same application as the producer.

    - by Jack Ryan
    Is it possible to use NServiceBus to publish and consume messages in the same application, specifically a web application? In the future we will almost certainly need to maintain a separate long running service to process messages generated by this application, and this is why we are hoping to use NServiceBus from the start, but right now it would be nice to just start up the consumer and the publisher when the web application starts. This will make testing and deployment far easier for us. I presume I will need to reference the NServiceBus.Host.exe and start up the process in the global.asax, but need help on what exactly I need to call to do this.

    Read the article

  • Hibernate: getting a record but it's being updated in the database?

    - by jack
    For some reason Hibernate seems to be keeping my session open and updating the object without me explicitely invoking a save/update/saveorupdate. I guess the session is staying open and it's beeing marked as dirty. However this is not the desired behaviour, so what's the cleanest way to fix this? The issue seems to occur because I store a phone number without formatting in the database but the getter of the object returns a formatted telephone number. My flow: go to a jsp = controller = service = dao DAO getter function if(userId != 0) { return (User)dbFactory.get(User.class, userId); } return null; The service just passes it to the controller and the controller puts te User object in the request scope. I display it on my JSP page using EL.

    Read the article

  • How to convert string to XML object in JavaScript?

    - by Jack Roscoe
    Hi, I am aware of this question already existing, but it has given me no luck. I have an application which loads a physicial XML document via the following method: jQuery.ajax( { type: "GET", url: fileName, dataType: "xml", success: function(data) { etc... I parse the XML and convert it into a string which is saved into a variable so that it can easily be stored in a database. How can I now convert the data in this variable back into an XML object so that it can be parsed as such?

    Read the article

  • How to update a single table using trigger in MS SQL 2008

    - by Yakob-Jack
    I have a table PeroidicDeduction and the fields are ID(auto-increment),TotalDeduction(e.g.it can be loan),Paid(on which the deduction for each month),RemainingAmount, What I want is when every time I insert or update the table---RemainingAmount will get the value of TotalDeduction-SUM(Paid)....and writ the following trigger...but dosen't work for me CREATE TRIGGER dbo.UpdatePD ON PeroidicDedcution AFTER INSERT,UPDATE AS BEGIN UPDATE PeroidicDedcution SET REmaininAmoubnt=(SELECT TotalDeduction-(SELECT SUM(Paid) FROM PeroidicDeduction) FROM PeroidicDeduction) END NOTE: it is on a Single table

    Read the article

  • Help needed with simple mysql group by query

    - by Jack
    This query fails when I add the line shown... :BEGIN FAIL: I have this so far Select Companyid, count(*) as cnt from mytable where State is not null and cnt = 1 <------------------------- FAIL group by CompanyID :END FAIL: Any way to do this? Here's a long winded background if it'll help.... I have a single table query. here's a sample of the table: CompanyID, State 1,OH 1,IL 1,NY 2,IL 3,NY 3,OH 4,NY 5,CA 5,WA I want a query that'll return something like this: 2,IL 4,NY I have this so far Select Companyid, count(*) as cnt from mytable where State is not null group by CompanyID This gives me a count of the number of records for each company. IE: 1,3 2,1 3,2 4,1 5,2 Now I want to filter the above list to just the two records with one result. I tried adding another where clause, but it failed: BEGIN FAIL: I have this so far Select Companyid, count(*) as cnt from mytable where State is not null and cnt = 1 <-------------------- FAIL group by CompanyID END FAIL:

    Read the article

  • PHP Get random paragraph

    - by Jack
    Anyone know how to get a random set of lines from a text file? I want to get a set of 3 lines with <br> on the front of each and display them through html. example: set 1 <br>Hi <br>what's your name <br>goodbye set 2 <br>stack <br>overflow <br>hi there set 3,4,5.... Choose one random set and display it. The sets of lines would be stored in a text file. Thanks a lot!

    Read the article

  • Linq 2 SQL Grouping Question

    - by Jack Marchetti
    var groups = from p in dc.Pool join pm in dc.PoolMembers on p.ID equals pm.PoolID group p by p.Group into grp select new { grp.ID }; This isn't working. Basically I want to do the grouping, and then select certain columns, but when I do select new { grp. } I get no intellisense, so I'm obviously doing something wrong. Any ideas?

    Read the article

  • What segments does C compiled program use?

    - by b-gen-jack-o-neill
    Hi, I read on OSDev wiki, that protected mode of x86 architecture allow you to create separate segments for code and data, while you cannot write into code section. That Windows (yes, this is the platform) loads new code into code segment, and data are created on data segment. But, if this is the case, how does program know it must switch segments to the data segment? Becouse if I understand it right, all adress instructions point to the segment you run the code from, unless you switch the descriptor. But I also read, that so colled flat memory model allows you to run code and data within one segment. But I read this only in connection to assembler. So, please, what is the case with C compiled code on Windows? Thanks.

    Read the article

  • C/C++ usage of special CPU fetures

    - by b-gen-jack-o-neill
    Hi, I am curious, do new compilers use some extra features built into new CPUs such as MMX SSE,3DNow! and so? I mean, in original 8086 there was even no FPU, so compiler that old cannot even use it, but new compilers can, since FPU is part of every new CPU. So, does new compilers use new features of CPU? Or, it should be more right to ask, does new C/C++ standart library functions use new features? Thanks for answer.

    Read the article

  • Using JavaScript to render HTML; nothing appearing but values will alert

    - by Jack Roscoe
    Hi, I'm taking some information from some variables I have already defined outside this function to create a html svg text box. Here is the function which is causing me trouble: RenderTextBox:function() { alert('this.x: ' + this.x); alert('this.y: ' + this.y); this.textBox = paper.text(this.x, this.y, this.htmlTextBox); } The alerts works prefectly, and prompt me with the values expected. However, the final line which is supposed to create the text box puts them nowhere to be seen. Does anybody know why? If I replace 'this.x, this.y..' with numerical values in the final line of the function, the text box is placed correctly. It's only when I use the 'this.x' and 'this.y' that I have issues.

    Read the article

  • Sorted sets and comparators

    - by Jack
    Hello, I'm working with a TreeSetthat is meant to store pathfind locations used during the execution of a A* algorithm. Basically until there are "open" elements (still to be exhaustively visited) the neighbours of every open element are taken into consideration and added to a SortedSetthat keeps them ordered by their cost and heuristic cost. This means that I have a class like: public class PathTileInfo implements Comparable<PathTileInfo> { int cost; int hCost; final int x, y; @Override public int compareTo(PathTileInfo t2) { int c = cost + hCost; int c2 = t2.cost + t2.hCost; int costComp = c < c2 ? -1 : (c > c2 ? 1: 0); return costComp != 0 ? costComp : (x < t2.x || y < t2.y ? -1 : (x > t2.x || y > t2.y ? 1 : 0)); } @Override public boolean equals(Object o2) { if (o2 instanceof PathTileInfo) { PathTileInfo i = (PathTileInfo)o2; return i.cost + i.hCost == cost + hCost && x == i.x && y == i.y; } return false; } } In this way first the total cost is considered, then, since a total ordering is needed (consistency with equals) a ordering according to the x,y coordinate is taken into account. This should work but simply it doesn't, if I iterate over the TreeSet during the algorithm execution like in for (PathTileInfo t : openSet) System.out.print("("+t.x+","+t.y+","+(t.cost+t.hCost)+") "); I get results in which the right ordering is not kept, eg: (7,7,6) (7,6,7) (6,8,6) (6,6,7) (5,8,7) (5,7,7) (6,7,6) (6,6,7) (6,5,7) (5,7,7) (5,5,8) (4,7,7) (4,6,8) (4,5,8) is there something subtle I am missing? Thanks!

    Read the article

  • Matlab Question - Principal Component Analysis

    - by Jack
    I have a set of 100 observations where each observation has 45 characteristics. And each one of those observations have a label attached which I want to predict based on those 45 characteristics. So it's an input matrix with the dimension 45 x 100 and a target matrix with the dimension 1 x 100. The thing is that I want to know how many of those 45 characteristics are relevant in my set of data, basically the principal component analysis, and I understand that I can do this with Matlab function processpca. Could you please tell me how can I do this? Suppose that the input matrix is x with 45 rows and 100 columns and y is a vector with 100 elements.

    Read the article

  • GUID.TryParse() ?

    - by Jack Marchetti
    Obviously there is no public GUID.TryParse() in .NET CLR 2.0. So, I was looking into regular expressions [aka googling around to find one] and each time I found one there was a heated argument in the comments section about RegEx A doesn't work, use RegEx B. Then someone would write Regex C yadda yadda So anyway, What I decided to do was this, but I feel bad about it. public static bool IsGuid (string possibleGuid) { try { Guid gid = new Guid(possibleGuid); return true; } catch (Exception ex) { return false; } } Obviously I don't really like this since it's been drilled into me since day one to avoid throwing exceptions if you can defensibly code around it. Does anyonek now why there is no public Guid.TryParse() in the .NET Framework? Does anyone have a real Regular Expression that will work for all GUIDs?

    Read the article

  • How do you put a UIWebView somewhere other than MainView.xib?

    - by Jack
    Hello, I've been trying to put a UIWebView into my app, which is tableview based. When the user selects a row, I want the new xib to load, but this one with a UIWebView on it. From all of the tutorials I've seen, you can only put a UIWebView on the MainView.xib. Can someone please tell me how to put a FUNCTIONING UIWebView somewhere other than the main view? Thanks in advance!!

    Read the article

  • faster strlen ?

    - by Jack
    Typical strlen() traverse from first character till it finds \0. This requires you to traverse each and every character. In algorithm sense, its O(N). Is there any faster way to do this where input is vaguely defined. Like: length would be less than 50, or length would be around 200 characters. I thought of lookup blocks and all but didn't get any optimization.

    Read the article

  • Incompatible Types in Initialization

    - by jack
    I have the following code in a subroutine that produces an incompatible types in initialization error on the varVal library in the subroutine evaluateExpression: NSDictionary *varVal; for (int i=0; i<varCount; i++) { [varVal setObject:[(i+1)*2 stringValue] forKey:[i stringValue]]; } double result =[[self brain] evaluateExpression:[[self brain] expression] usingVariableValues:varVal]; My subroutine declaration in the brain.h file is: +(double)evaluateExpression:(id)anExpression usingVariableValues:(NSDictionary *)variables; I'd appreciate any help.

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >