Search Results

Search found 590 results on 24 pages for 'jimmy johnson'.

Page 7/24 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Updating Lucene index from two different threads in a web application

    - by Jimmy
    Hi, I've a .net web application which uses Lucene.net for company search functionality. When registered users add a new company,it is saved to database and also gets indexed in Lucene based company search index in real time. When adding company in Lucene index, how do I handle use case of two or more logged-in users posting a new company at the same time?Also, will both these companies get indexed without any file lock, lock time out, etc. related issues? Would appreciate if i could help with code as well. Thanks.

    Read the article

  • Navigating between pages in a Facebook Platform iframe application

    - by Jimmy Cuadra
    I'm working on a Facebook Platform application that runs in iframe mode, and I'm having trouble understanding how to navigate between pages within the app. Let's say the first page that is loaded within the iframe at my canvas URL is one.html. Within that page, there is a link to two.html that just changes the source of the iframe and doesn't reload the Facebook chrome. When I do this, all the Facebook fb_sig_* query string parameters that Facebook passes to the original page aren't included, and so two.html has no awareness of the connection to Facebook and no ability to make API calls to generate the content for the page. One possible solution would be to manually extract all the Facebook parameters from one.html and append it to the link to two.html myself. This seems really ugly and I figured there had to be a cleaner way. For reference, my application is written in Perl and uses the WWW::Facebook::API module as a client library. I didn't see anything in it that I can use to easily reconstruct the Facebook parameters for use with links in iframe apps. Another possible solution would be to store all the Facebook parameters in a session on my server on the first page load, and just use the values in that session on subsequent page views. But what happens if the data I've stored no longer matches what Facebook would have sent if it were a completely new request (i.e. something in the user's Facebook session changed)? Is there something obvious I'm missing? What is the standard approach to navigating between pages within an iframe app? Facebook's documentation is atrocious and I haven't been able to find anything that clearly explains how this works. I also realize this wouldn't be an issue with an app using FBML instead of an iframe, but my understanding is that iframe apps are now encouraged over FBML apps, though again this seems ambiguous since so much of Facebook's documentation is outdated and contradictory.

    Read the article

  • Updating records with their subordinates via CTE or subquery

    - by Mike Jolley
    Let's say I have a table with the following columns: Employees Table employeeID int employeeName varchar(50) managerID int totalOrganization int managerID is referential to employeeID. totalOrganization is currently 0 for all records. I'd like to update totalOrganization on each row to the total number of employees under them. So with the following records: employeeID employeeName managerID totalOrganization 1 John Cruz NULL 0 2 Mark Russell 1 0 3 Alice Johnson 1 0 4 Juan Valdez 3 0 The query should update the totalOrganizations to: employeeID employeeName managerID totalOrganization 1 John Cruz NULL 3 2 Mark Russell 1 0 3 Alice Johnson 1 1 4 Juan Valdez 3 0 I know I can get somewhat of an org. chart using the following CTE: WITH OrgChart (employeeID, employeeName,managerID,level) AS ( SELECT employeeID,employeeName,0 as managerID,0 AS Level FROM Employees WHERE managerID IS NULL UNION ALL SELECT Employees.employeeID,Employees.employeeName,Employees.managerID,Level + 1 FROM Employees INNER JOIN OrgChart ON Employees.managerID = OrgChart.employeeID ) SELECT employeeID,employeeName,managerID, level FROM OrgChart; Is there any way to update the Employees table using a stored procedure rather than building some routine outside of SQL to parse through the data?

    Read the article

  • Python class variables not defined with called from outside module

    - by Jimmy
    I am having some issues with calling a function outside of a module. The scenario is I have a small class library that is using turtle to do some drawing, the function within the module calls the classes also within the module and draws things, etc. This all works fine and dandy when I call the function from within the same file, but if I have another file and call myLib.scene() I get variable undefined errors. Code examples: a class class Rectangle(object): def __init__(self, pen, height=100, width=100, fillcolor=''): self.pen = pen self.height = height self.width = width self.fillcolor = fillcolor def draw(self, x, y): '''draws the rectangle at coordinates x and y''' self.pen.goto(x, y) if self.fillcolor: self.pen.fillcolor(self.fillcolor) self.pen.fill(True) self.pen.down() for i in range(0,4): self.pen.forward(self.height if i%2 else self.width) self.pen.left(90) and the calling function is this def scene(pen): rect = Rectangle(pen) rect.draw(100,100) when I put the line scene(turtle.Turtle()) into the same file I have no issues, the rectangle is drawn and everyone goes home happy. However, if I try to call it from a separate python file like so: myLib.scene(turtle.Turtle()) I get an error: NameError: global name 'pen' is not defined, in the for loop of my draw method. Even if the line above is in the same file it still bombs out. What is going on?

    Read the article

  • How to use Object.GetHashCode() on a type that overrides GetHashCode()

    - by Jimmy
    Hi, I have a class A that implements IEquatable<, using its fields (say, A.b and A.c) for implementing/overriding Equals() and overriding GetHashCode(), and everything works fine, 99% of the time. Class A is part of a hierarchy (class B, C) that all inherit from interface D; they can all be stored together in a dictionary Dictionary, thus it's convenient when they all carry their own default Equals()/GetHashCode(). However, while constructing A I sometime need to do some work to get the values for A.b and A.c; while that's happening, I want to store a reference to the instance that's being built. In that case, I don't want to use the default Equals()/GetHashCode() overrides provided by A. Thus, I was thinking of implementing a ReferenceEqualityComparer, that's meant to force the use of Object's Equals()/GetHashCode(): private class ReferenceEqualityComparer<T> : IEqualityComparer<T> { #region IEqualityComparer<T> Members public bool Equals(T x, T y) { return System.Object.ReferenceEquals(x, y); } public int GetHashCode(T obj) { // what goes here? I want to do something like System.Object.GetHashCode(obj); } #endregion } The question is, since A overrides Object.GetHashCode(), how can I (outside of A) call Object.GetHashCode() for an instance of A? One way of course would be for A to not implement IEquatable< and always supply an IEqualityComparer< to any dictionary that I create, but I'm hoping for a different answer. Thanks

    Read the article

  • Cannot install xdebug with WAMP SERVER 2.1

    - by Jimmy Nguyen
    Hi all, I use WAMP SERVER 2.1 and select PHP 5.3.3 for my system, so I select xDebug with php_xdebug-2.1.0-5.3-vc6.dll and changed name becoming php_xdebug.dll for easy way to use. Following the instructions: php.ini (in Apache folder) extension=php_xdebug.dll ... zend_extension = "C:/wamp/bin/php/php5.3.3/ext/php_xdebug.dll" xdebug.remote_enable=on xdebug.remote_handler=dbgp xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.idekey="netbeans-xdebug" However, nothing happens, there are no information related to xdebug from phpinfo. Also xdebug announce that xdebug have not installed yet (http://xdebug.org/find-binary.php). I am so worried causing too much time for configuration. I got crazy and totally gave up. Anyone have ideas to solve it, I am so appreciated what you help me. Thanks

    Read the article

  • Unable to display data in a WPF datagrid that has a DataView instance as the items source

    - by Jimmy W
    I am using a DataGrid object from the WPF toolkit. I am binding the DataGrid object to the default view of a DataTable instance as declared in the following code: WeatherGrid.ItemsSource = weatherDataTable.DefaultView; weatherDataTable has three columns. The first column is defined to contain a string data type. The other two columns are defined to contain double data types. When the application exits the function that calls the binding as expressed in the declaration, The DataGrid object displays data for the first column, but not the other columns. When I type the following in the immediate window in the debugger: ((DataRowView)WeatherGrid.Items[0]).Row[1] I get a number, but this doesn't correspond with what is being displayed. Why is only the first column visible, and how can I get all of the data to be visible? I'll leave my XAML definition for the DataGrid object below: <toolkit:DataGrid Margin="12.726,77.71,12,0" Name="WeatherGrid" Height="500" Grid.Row="1" VerticalAlignment="Top" CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True" />

    Read the article

  • Custom array sort in perl

    - by ABach
    I have a perl array of to-do tasks that looks like this: @todos = ( "1 (A) Complete online final @evm4700 t:2010-06-02", "3 Write thank-you t:2010-06-10", "4 (B) Clean t:2010-05-30", "5 Donate to LSF t:2010-06-02", "6 (A) t:2010-05-30 Pick up dry cleaning", "2 (C) Call Chris Johnson t:2010-06-01" ); That first number is the task's ID. If a task has ([A-Z]) next to, that defines the task's priority. What I want to do is sort the tasks array in a way that places the prioritized items first (and in order): @todos = ( "1 (A) Complete online final @evm4700 t:2010-06-02", "6 (A) t:2010-05-30 Pick up dry cleaning", "4 (B) Clean t:2010-05-30", "2 (C) Call Chris Johnson t:2010-06-01" "3 Write thank-you t:2010-06-10", "5 Donate to LSF t:2010-06-02", ); I cannot use a regular sort() because of those IDs next to the tasks, so I'm assuming that some sort of customized sorting subroutine is needed. However, my knowledge of how to do this efficiently in perl is minimal. Thanks, all.

    Read the article

  • ASP.NET putting dynamic controls on page in reverse messes up events

    - by Jimmy Geels
    I have this weird problem when putting textboxes on the page in reverse. The whole event system is messed up. Changing one textbox fires TextChange on all textboxes. I can fix this by putting the controls in a list first and then call add while iterating trough the list in reverse. But i just want to know why this fails. Heres some code (.net 2.0) public partial class _Default : Page { protected void Page_Load(object sender, EventArgs e) { InitFields(); } private void InitFields() { int nrFields; //We have a static textbox called nrElements, this determines the number //of fields to initialize if (int.TryParse(nrElements.Text, out nrFields)) { //Put all the dynamic fields on the screen in reverse order foreach(Control t in GetDynamicFields(nrFields)) { //Calling Controls.Add works fine //Calling Controls.AddAt messes up the events //Try changing different textboxes plhFields.Controls.AddAt(0, t); } } } private IEnumerable<Control> GetDynamicFields(int nrFields) { for (int i = 0; i < nrFields; i++) { TextBox txtBox = new TextBox(); txtBox.ID = string.Format("dynTextBox{0}", i.ToString()); txtBox.AutoPostBack = true; txtBox.TextChanged += t_TextChanged; yield return txtBox; } } private void t_TextChanged(object sender, EventArgs e) { TextBox txtBox = sender as TextBox; if (txtBox != null) txtBox.Text = txtBox.Text + "Changed "; } }

    Read the article

  • How can I create an email newsletter by taking objects from a database?

    - by jimmy
    Well, I'm trying to create a newsletter, that will send emails to users in a database. The newsletter itself would draw "events" and other activities from a database. Whats the best way to take that list, and put them in an email? I was thinking about putting them into an html page, then sending an html email, but not all emails support html(like school email). What would your guys recommend? Could you point me to some good resources? Also, this is for a school project, so I cant use any open source type stuff, unfortunately :(

    Read the article

  • using PHP to create multidimensional array from simple JSON array

    - by Michael Robinson
    I have a php query the returns the following JSON format from a table. [{"memberid":"18", "useridFK":"30", "loginName":"Johnson", "name":"Frank", "age":"23", "place":"School", }, It needs the following format: [{"memberid":"18" { "useridFK":"30", "loginName":"Johnson", "name":"Frank", "age":"23", "place":"School",} }, I was told in another question that PHP would work and it looks like "Transversing" might be appropriate, I'm looking to find out what to put in the Php before it returns the JASON. My Array.plist will look like the following: Root: Dictionary V Rows: Array V Item 0: Dictionary Title: String 18 V Children Array V Item 0 Dictionary Title String 30 etc. Thanks in advance.

    Read the article

  • Force max length for string in PostgreSQL

    - by Jimmy
    Hey guys, I am using heroku for a RoR application and am trying to manually set the length of a string column and am having trouble. I tried making a migration along the lines of change_column :posts, :content, :string, :length => 10000 I assumed this would work but no such luck, anyone have some pointers? Thanks!

    Read the article

  • .NET regex: Match.nextMatch() never returns

    - by Jimmy
    I have a regex that seems to have worked fine for the past year or so, and all of a sudden today with a new slightly different text to match against, Match.nextMatch() never returns. I'm no regex expert and I'm sure the regex can be optimized, but previous data sets weren't much more complex than what I've tried today. Furthermore, the regex works fine against the offending data set in a tool like RegexBuddy; it's only in .net (running in debug in Visual Studio) that it seems to hang. Nevertheless, if anyone can figure out how to tweak the regex to make it work, I'd really appreciate it. This is the regex: <tr>(<td[^>]*><a[^>]*>(?<callOptionTicker>[A-Z]{1,5}\d{6}C\d{8})</a></td>)(<td[^>]*>.*?</td>){6}(<td[^>]*><b><a[^>]*>(?<strikePrice>\d*\.\d*)</a></b></td>)(<td[^>]*><a[^>]*>(?<putOptionTicker>[A-Z]{1,5}\d{6}P\d{8})</a></td>) It's meant to extract put and call option tickers from a Yahoo option chain page (i.e., raw HTML). It works fine for IBM http://finance.yahoo.com/q/os?s=IBM&m=2010-05-21 It doesn't work for SPX options (this is the offending data set) http://finance.yahoo.com/q/os?s=I:SPX.W&m=2010-05

    Read the article

  • Using $.get with jquery validation

    - by Jimmy McCarthy
    I'm trying to use the Jquery builtin validator on my page. The issue is that I have certain fields that only are required if the JobID (entered into another field) does not already exist in our database. I have a simple service which simply takes JobID and returns True or False based on whether the JobID exists, but I can't seem to get this information where I want it. Some sample code: $("#dep_form").validate({ rules: { JobID: { required: true, digits: true, minlength: 3 }, OrgName: { required: function(element) { //This field is required if the JobID is new. return $("#jobinfo").html().length==15; } } }, messages: { JobID: { required: "Enter a Job Number.", digits: "Only numbers are allowed in Job ID's.", minlength: "Job Number must be at least 3 digits" }, OrgName: { required: "Select a Practice from the dropdown list." } }, errorClass: "ui-state-error-input", errorLabelContainer: "#errorbox", errorElement: 'li', errorContainer: "#validation_errors", onfocusout: false, onkeyup: false, focusinvalid: false }; Currently, I'm using a lazy method to validate (shown above). However, I now have access to a service using the URL: var lookupurl = "/deposits/jobidvalidate/?q=" + $("#id_JobID").val() + "&t=" + new Date().getTime(); which is a page which will contain just the word True or False based on whether that given JobID exists. I've tried half a dozen different ways of setting variables and calling functions within functions and still cannot get a way to simply return the value of that page (which I've been trying to access with $.get() ) to my validator, so that required is set to true when the Job does not exist and false if the job already exists. Any suggestions? Thanks.

    Read the article

  • Adding a font for use in ReportLab

    - by Jimmy McCarthy
    I'm trying to add a font to the python ReportLab so that I can use it for a function. The function is using canvas.Canvas to draw a bunch of text in a PDF, nothing complicated, but I need to add a fixed width font for layout issues. When I tried to register a font using what little info I could find, that seemed to work. But when I tried to call .addFont('fontname') from my Canvas object I keep getting "PDFDocument instance has no attribute 'addFont'" Is the function just not implemented? How do I get access to fonts other than the 10 or so default ones that are listed in .getAvailableFonts? Thanks. Some example code of what I'm trying to make happen: from reportlab.pdfgen import canvas c = canvas.Canvas('label.pdf') c.addFont('TestFont') #This throws the error listed above, regardless of what argument I use (whether it refers to a font or not). c.drawString(1,1,'test data here') c.showPage() c.save() To register the font, I tried from reportlab.lib.fonts import addMapping from reportlab.pdfbase import pdfmetrics pdfmetrics.registerFont(TTFont('TestFont', 'ghettomarquee.ttf')) addMapping('TestFont', 0, 0, 'TestFont') where 'ghettomarquee.ttf' was just a random font I had lying around.

    Read the article

  • Easy Flood Fill

    - by Jimmy
    Some advice, please. I'm just starting out in C#. I've managed to get some shapes created on a Windows form, and now I'd like to fill them with color. In the old C++ I studied years ago, there was a floodfill function that was really easy. It has been an unpleasant realization to find there's not a similar method available in regular old C#. Does anyone have advice for me, or some code, so I can implement filling without understanding GDI+, DirectX, or rest of the avalanche of acronyms that I've run into by researching this on the web? I need to fill irregular shapes, bounded by a certain color. Gradient and transparency control would be nice, but I'd settle for plain old solid fill right now, just to get a modicom of control over this. Any help, code or advice would be really appreciated.

    Read the article

  • UTF-8 BOM in php response to mootools xmlhttprequest

    - by Jimmy
    Hi, I'm writing my first little AJAX-enabled Joomla component. I'm using mootools. I got a xmlhttprequest to contact my Joomla component, and the component returns a response - just plain text echoed by php, like echo 'Hello World!'; It's all working fine, except wireshark tells me that the response is prepended with \357\273\277\357\273\277 when it gets read by the javascript on the client side. This shows up as a little square before the response in an alert box that the script shows. I don't explicitly set the encoding on the xmlhttprequest; mootools docs say that it defaults to UTF8. What's the right way to handle this? Should I be setting the encoding on the request? Mime type? Should the javascript get rid of it? I'm not planning to have any characters requiring UTF8 in the response, so using plain old ascii would be ok for me too. Thanks

    Read the article

  • Excluding files from being deployed with Capistrano while still under version control with Git

    - by Jimmy Cuadra
    I want to start testing the JavaScript in my Rails apps with qUnit and I'm wondering how to keep the test JavaScript and test runner HTML page under version control (I'm using Git, of course) but keep them off the production server when I deploy the app with Capistrano. My first thought is to let Capistrano send all the code over as usual including the test files, and write a task to delete them at the end of the deployment process. This seems like sort of a hack, though. Is there a cleaner way to tell Capistrano to ignore certain parts of the repository when deploying?

    Read the article

  • mySql table returning JSON that needs formatting for a iPhone UITableview

    - by Michael Robinson
    I have a php query the returns the following JSON format from a table. [{"memberid":"18", "useridFK":"30", "loginName":"Johnson", "name":"Frank", "age":"23", "place":"School", }, It needs the following format: [{"memberid":"18" { "useridFK":"30", "loginName":"Johnson", "name":"Frank", "age":"23", "place":"School",} }, I can figure out where/how to convert this, Where would I create the formatting following: (1) In the php return? (2) the JSON instructions for deserialization? or (3) Some kinb of Obj-C coding instruction? My end use is a simple Drill Down table using the NSObject, so when I select "memberid" row, I'll get the child/detail list on the next UITableview. My Data.plist will look like the following: Root: Dictionary V Rows: Array V Item 0: Dictionary Title: String 18 V Children Array V Item 0 Dictionary Title String 30 etc. Thanks in advance, this site rocks.

    Read the article

  • mysql C connector unresolved symbols on Win2k8 but not on XP?

    - by jimmy glick
    I have a visual C++ 2008 express project which compiles fine on Windows XP with mysql C connector 6.0.2. When I copy the project over to a Windows Server 2008 x64 machine, it gets a bunch of linker errors like "unresolved external symbol _mysql_server_end@0" "unresolved external symbol _mysql_close@4" "unresolved external _mysql_real_connect@32". Is the mysql C connector 6.0.2 known to not work with Win Server 2008? (Note, the C connector is installed into the same place on both machines, and since I just copied over the project wholesale, it still has the correct libmysql.lib include. The interesting thing is that the errors I get on XP if I remove the libmysql.lib are not the same errors I'm getting on Win2k8, so that's what makes me think it might be an incompatibility...or maybe it's just because win2k8 is x64 and XP is x86?) Thanks

    Read the article

  • compiling cocos3d 0.7.2 with Xcode5 error

    - by jimmy
    I tried to compile my cocos3d 0.7.2 project with xcode5. I am already stuck at the first error I get with the line “super.parent = aNode;” in CC3ParametricMeshNodes.m. this line is in the setParent function: -(void) setParent: (CC3Node*) aNode { super.parent = aNode; [self deriveNameFrom: aNode]; if ( !mesh ) self.box = self.parentBoundingBox; } and the error I get is: CC3ParametricMeshNodes.m:246:15: Assignment to readonly property I am sure that there will be other errors after this one is fixed. Is there any topic on common errors that occur while compiling cocos3d 0.7.2 with Xcode5? Thanks

    Read the article

  • Ruby open-uri open method loses file extension opening images

    - by Jimmy
    I'm using ruby 1.9.2 along with Rails 3.1.4 and Paperclip 2.4.5. My issue is trying to save a paperclip attachment from a URI loses the file extension and saves the file without one resulting in issues with things like fancybox that require an extension. Some example code: uri = "http://featherfiles.aviary.com/2012-06-13/bbe5f0de1/0c5a672b88ea47ecb4631ac173e27430.png" open(uri) #=> #<File:/var/folders/zc/d69gxhzx10x_bvjrkqgyjgxr0000gn/T/open-uri20120613-27204-i6cldv> Because there is no extension on the temp file paperclip is saving the file without one resulting in issues. Has anyone run into this issue? I've seen multiple answers about using paperclip to store images from a URI but none seem to address the same problem we're running

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >