Search Results

Search found 2008 results on 81 pages for 'greg smith'.

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

  • Replacement relevance sorting for MySQL fulltext in InnoDB tables?

    - by Giles Smith
    I am using MySQL InnoDB and want to do fulltext style searches on certain columns. What is the best way of sorting the results in order of relevance? I am trying to do something like: SELECT columns, (LENGTH(column_name) - LENGTH(REPLACE(column_name, '%searchterm%', ''))) AS score FROM table WHERE column_name LIKE '%searchterm%' ORDER BY score However this will become quite complicated once I start searching more than 1 column or using more than one keyword. I already have several joins happening so have simplified the query above. Can anyone suggest a better way? I don't want to use any 3rd party software like Sphinx etc

    Read the article

  • jQuery selector issue finding image with usemap attribute

    - by Greg K
    I have an image map in my page: <div id="books"> <img src="images/books.png" width="330" height="298" border="0" \ usemap="#map_books" /> <map name="map_books" id="map_books" alt="books"> <area shape="poly" coords="17,73,81,288,210,248,254,264, ..." \ href="/about" alt="books" /> </map> </div> I have a function that tries to find the image in the document using this map: function(elemId) { // elemId = "#map_books" if ($(elemId).attr("tagName") == "MAP") { // find image using this map var selector = "img [usemap=\\" + elemId + "]"; var img = $(selector); if (img.length == 0) { console.log("Could not find image using " + selector); } } It fails to find the image. Could not find image using img [usemap=\#map_books] I've escaped the elemId because it starts with a hash and tried variations of selectors. $("img [usemap$=" + elemId.substring(1) + "]") $("img").find("[usemap=\\" + elemId + "]") Neither find the image. Any ideas?

    Read the article

  • How do you comment on an RFC?

    - by Greg Beech
    I have some comments about the OAuth draft RFC (specifically about some errors it contains), but I'm not sure what the accepted way is to make them. There's an email address at the bottom, so do I simply send mail there with the comments, or is there some IETF tool I should know about for tracking comments/issues?

    Read the article

  • .net question - where are the DefaultCredentials stored/accessed from for a WinForms v3.5 app?

    - by Greg
    Hi, Where are the DefaultCredentials stored/accessed from for a WinForms v3.5 app? That is if I am using the settings for defaultProxy for my Winforms v3.5 application, and set a proxy server address here, exactly where does/can the username/password come from? Or in other words where does the framework source the "default credentials" for a winforms application running on the client PC? <defaultProxy enabled="true|false" useDefaultCredentials="true|false" <bypasslist> … </bypasslist> <proxy> … </proxy> <module> … </module> /> Background - apparently ClickOnce can use this for a client side application, however I'm trying to work out where click once would get this defaultCredential from, for a user who is running the clickonce install for my winforms application.

    Read the article

  • non-static variable cannot be referenced from a static context (java)

    - by Greg
    I ask that you ignore all logic.. i was taught poorly at first and so i still dont understand everything about static crap and its killing me. My error is with every single variable that i declare then try to use later inside my methods... i get the non-static variable cannot~~ error I can simply put all the rough coding of my methods inside my cases, and it works but then i cannot use recursion... What i really need is someone to help on the syntax and point me on the right direction of how to have my methods recognize my variables at the top... like compareCount etc thanks public class MyProgram7 { public static void main (String[]args) throws IOException{ Scanner scan = new Scanner(System.in); int compareCount = 0; int low = 0; int high = 0; int mid = 0; int key = 0; Scanner temp; int[]list; String menu, outputString; int option = 1; boolean found = false; // Prompt the user to select an option menu = "\n\t1 Reads file" + "\n\t2 Finds a specific number in the list" + "\n\t3 Prints how many comparisons were needed" + "\n\t0 Quit\n\n\n"; System.out.println(menu); System.out.print("\tEnter your selection: "); option = scan.nextInt(); // Keep reading data until the user enters 0 while (option != 0) { switch (option) { case 1: readFile(); break; case 2: findKey(list,low,high,key); break; case 3: printCount(); break; default: outputString = "\nInvalid Selection\n"; System.out.println(outputString); break; }//end of switch System.out.println(menu); System.out.print("\tEnter your selection: "); option = scan.nextInt(); }//end of while }//end of main public static void readFile() { int i = 0; temp = new Scanner(new File("CS1302_Data7_2010.txt")); while(temp.hasNext()) { list[i]= temp.nextInt(); i++; }//end of while temp.close(); System.out.println("File Found..."); }//end of readFile() public static void findKey() { while(found!=true) { while(key < 100 || key > 999) { System.out.println("Please enter the number you would like to search for? ie 350: "); key = scan.nextInt(); }//end of inside while //base if (low <= high) { mid = ((low+high)/2); if (key == list[mid]) { found = true; compareCount++; }//end of inside if }//end of outside if else if (key < list[mid]) { compareCount++; high = mid-1; findKey(list,low,high,key); }//end of else if else { compareCount++; low = mid+1; findKey(list,low,high,key); }//end of else }//end of outside while }//end of findKey() public static void printCount() { System.out.println("Total number of comparisons is: " + compareCount); }//end of printCount }//end of class

    Read the article

  • jquery.ui sortable using a table and item:tr , placeholder difficulties

    - by greg
    Hi I would really like to give some sortable goodness to the myriad old tables I have created. A little work has a proof of concept behaving ok. My one sticking point is that the placeholder does not work at all in IE 7 when using item:TR . It works OK in FF. I can make an perform correctly. It seems to be specific to tables and Any ideas, I have been running through forums, not seeing a lot of people using sortable with tables. <style type="text/css"> .dndPlaceHolder { background-color:Red ; color:Red; height: 20px; line-height:30px; border: solid 2px black; } .dndItem { background-color: #c0c0c0; border:solid 1px black; padding:5px; } </style> <script type="text/javascript" > $(function() { $("#myTable").sortable( { placeholder:'dndPlaceHolder', distance:15, items:'tr', forcePlaceholderSize:true, change : dndChange, update : dndUpdate } ); $("#myTable").disableSelection(); $("#myList").sortable( { placeholder:'dndPlaceHolder', distance:15, items:'li', forcePlaceholderSize:true, change : dndChange, update : dndUpdate } ); $("#myList").disableSelection(); }); function dndChange(event,ui){ } function dndUpdate(event,ui){ var msg = ''; } </script> <table id='myTable' > <tr class='dndItem' id='1'> <td>0 Active - Active</td> </tr> <tr class='dndItem' id='2'> <td>1 Closed - Closed</td> </tr> <tr class='dndItem' id='3'> <td>2 OnHold - On Hold</td> </tr> <tr class='dndItem' id='4'> <td>3 Pending - Pending</td> </tr> </table> <BR> <UL id='myList' > <li class='dndItem' id='1'>0 Active - Active</li> <li class='dndItem' id='2'>1 Closed - Closed</li> <li class='dndItem' id='3'>2 OnHold - On Hold</li> <li class='dndItem' id='4'>3 Pending - Pending</li> </ul>

    Read the article

  • Querying for names

    - by Sai
    I have a table (say "Demographics") on SQL Server. In this table are the following columns "LastName", "FirstName", "MiddleName", "Prefix" , "Suffix". I have one textbox to search for them on a webpage. My question: Whats a good design strategy for queries where the user could be searching for various combinations of names including last names that have spaces e.g. "Smith James Jr." . Our customers store Jr. sometimes in suffix and sometimes just tack it to lastname. Sometimes Smith James Jr could be the entire last name.

    Read the article

  • One to many too much data returned - MySQL

    - by Evan McPeters
    I have 2 related MySQL tables in a one to many relationship. Customers: cust_id, cust_name, cust_notes Orders: order_id, cust_id, order_comments So, if I do a standard join to get all customers and their orders via PHP, I return something like: Jack Black, jack's notes, comments about jack's 1st order Jack Black, jack's notes, comments about jack's 2nd order Simon Smith, simon's notes, comments about simon's 1st order Simon Smith, simon's notes, comments about simon's 2nd order The problem is that *cust_notes* is a text field and can be quite large (a couple of thousand words). So, it seems like returning that field for every order is inneficient. I could use *GROUP_CONCAT* and JOINS to return all *order_comments* on a single row BUT order_comments is a large text field too, so it seems like that could create a problem. Should I just use two separate queries, one for the customers table and one for the orders table? Is there a better way?

    Read the article

  • Building a Drupal Newsletter Module for handling Newsletter Articles

    - by Michael T. Smith
    We're building a module for generating HTML for email newsletters. We've looked into using a few other modules (SimpleNews, MailChimp, among others), but due to various requirements, it'll be easier and better for us to build a custom solution. Being a new Drupal developer, I'm a bit worried about handling this in a "non-Drupal" way. That being said, my plan is to setup a vocabulary with Newsletters as a term and the actual Newsletters as sub-terms, like so: Newsletters (term) - Newsletter A (sub-term) - Newsletter B (sub-term) This has the added benefit of being able to organize where articles were published (besides just on the site.) The question, though, is how to handle the different Newsletter issues. I could go another level deeper in the vocabulary, like so: Newsletters (term) - Newsletter A (sub-term) - Issue - 2010-03-01 - Issue - 2010-03-02 - Newsletter B (sub-term) - Issue - 2010-03-01 - Issue - 2010-03-08 But I'm wondering if this is adding a bit too much complexity. Once I have this taxonomy setup, when the user went to add new newsletters it would also create a node (content type: newsletter), and when he/she went to add new issues, it would also create a node (content type: issue.) Those would then be the landing pages for that content. So, the question is is there a better way for handling this structure? Is this a Drupal-like solution?

    Read the article

  • dz's Open Flash Chart 2 disabling animation problem (Rails)

    - by greg
    How to disable the startup animation in OFC2? Since I started using the dz build, the on-show animation is on by default, which sucks quite a lot. Neither of these work: graph.animate=false graph.on_show=false Also, dz's build implements the tooltip hover support poorly - the tooltip continues to hover even when the cursor is on another flash object. Has anyone overcome these problems?

    Read the article

  • does Entity Framework have a caching mechanism like DataSet/DataTables have?

    - by Greg
    Hi, does Entity Framework have a caching mechanism like DataSet/DataTables have? In other words if you start using EF is it really just a way to easily get data in/out of the database without providing an additional caching layer like DataSet/DataTables did where you have an in-memory representation (on-line/off-line) and which at some point you could say to "persist all changes to database"

    Read the article

  • Why does a user have to enter "Profile" data to enter data into other tables?

    - by Greg McNulty
    EDIT It appears the user has to enter some data for his profile, otherwise I get this error below. I guess if there is no profile data, the user can not continue to enter data in other tables by default? I do not want to make entering user profile data a requirement to use the rest of the sites functionality, how can I get around this? Currently I have been testing everything with the same user and everything has been working fine. However, when I created a new user for the very first time and tried to enter data into my custom table, I get the following error. The INSERT statement conflicted with the FOREIGN KEY constraint "FK_UserData_aspnet_Profile". The conflict occurred in database "C:\ISTATE\APP_DATA\ASPNETDB.MDF", table "dbo.aspnet_Profile", column 'UserId'. The statement has been terminated. Not sure why I am getting this error. I have the user controls set up in ASP.NET 3.5 however all I am using is my own table or at least that I am aware of. I have a custom UserData table that includes the columns: id, UserProfileID, CL, LL, SL, DateTime (id is the auto incremented int) The intent is that all users will add their data in this table and as I mentioned above it has been working fine for my original first user I created. However, when i created a new user I am getting this problem. Here is the code that updates the database. protected void Button1_Click(object sender, EventArgs e) { //connect to database MySqlConnection database = new MySqlConnection(); database.CreateConn(); //create command object Command = new SqlCommand(queryString, database.Connection); //add parameters. used to prevent sql injection Command.Parameters.Add("@UID", SqlDbType.UniqueIdentifier); Command.Parameters["@UID"].Value = Membership.GetUser().ProviderUserKey; Command.Parameters.Add("@CL", SqlDbType.Int); Command.Parameters["@CL"].Value = InCL.Text; Command.Parameters.Add("@LL", SqlDbType.Int); Command.Parameters["@LL"].Value = InLL.Text; Command.Parameters.Add("@SL", SqlDbType.Int); Command.Parameters["@SL"].Value = InSL.Text; Command.ExecuteNonQuery(); } Source Error: Line 84: Command.ExecuteNonQuery();

    Read the article

  • OnExit is not entering via PostSharp in asp.net project.

    - by mark smith
    Hi there, I have setup PostSharp and it appears to be working but i don't get it entering OnExit (i have logged setup to ensure it is working) ... Its a bit tricky to configure with asp.net - or is it just me ... I am using the 1.5 new version I basically have the following in my web.config and i had to add the SearchPath otherwise it can't find my assemblies <postsharp directory="C:\Program Files\PostSharp 1.5" trace="true"> <parameters> <!--<add name="parameter-name" value="parameter-value"/>--> </parameters> <searchPath> <!-- Always add the binary folder to the search path. --> <add name="bin" value="~\bin"/> </searchPath> </postsharp> I have set tracing on but what is strange to me is that it appears to build to the temp directory, maybe this is my issue, i am unsure .. hence i do F5 ... Is it possible to name the Output directory and output file?? As you can see it is editing a DLL in the temp dir so IIS is no longer in control so it doesn't execute it ??? Confused! :-) C:\Program Files\PostSharp 1.5\postsharp.exe "/P:Output=C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mysitemvc-1.2\c2087140\8ac2dc93\postsharp\App_Web_04ae3ewy.dll" "/P:IntermediateDirectory=C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mysitemvc-1.2\c2087140\8ac2dc93\postsharp " /P:CleanIntermediate=False /P:ReferenceDirectory=. /P:SignAssembly=False /P:PrivateKeyLocation= /P:ResolvedReferences= "/P:SearchPath=C:\Source Code\Visual Studio 2008\Projects\mysitemvc\mysitemvc\bin," /V /SkipAutoUpdate "C:\Program Files\PostSharp 1.5\Default.psproj" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mysitemvc-1.2\c2087140\8ac2dc93\before-postsharp\App_Web_04ae3ewy.dll" PostSharp 1.5 [1.5.6.627] - Copyright (c) Gael Fraiteur, 2005-2009. info PS0035: C:\Windows\Microsoft.NET\Framework\v2.0.50727\ilasm.exe "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mysitemvc-1.2\c2087140\8ac2dc93\postsharp\App_Web_04ae3ewy.il" /QUIET /DLL /PDB "/RESOURCE=C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mysitemvc-1.2\c2087140\8ac2dc93\postsharp\App_Web_04ae3ewy.res" "/OUTPUT=C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mysitemvc-1.2\c2087140\8ac2dc93\postsharp\App_Web_04ae3ewy.dll" /SUBSYSTEM=3 /FLAGS=1 /BASE=18481152 /STACK=1048576 /ALIGNMENT=512 /MDV=v2.0.50727

    Read the article

  • ComboBox wpf not item not being selected

    - by Greg R
    I am trying to bind a combo box to a list of objects, and it works great, besides the selected value, am I missing somethign? <ComboBox ItemsSource="{Binding OrderInfoVm.AllCountries}" SelectedValuePath="country_code" DisplayMemberPath="country_name" SelectedValue="{Binding OrderInfoVm.BillingCountry}" /> Basically I want to bind value to country codes and set the selected value to the country code bound to OrderInfoVm.BillingCountry (which implements INotifyPropertyChanged) Initially when the control loads selected value is empty, but on click BillingCountry is populated. Selected value does not seem to change. How can I remedy that?

    Read the article

  • .NET - Is it possible to proxy a HTTPS request using HttpListener & HttpWebRequest? (or is it not p

    - by Greg
    Hi, Question - Is it possible to proxy a HTTPS request using HttpListener & HttpWebRequest? (or is it not possbile due to the encryption?) I have got a .NET proxy working by using HttpListener & HttpWebRequest using the approach here. I'm trying to extend this at the moment to listen for HTTPS too (refer this question) however I'm wondering if I'm trying to tackle something that is not possible...That is if this code works by listening for the HTTPS request (using HttpListener) and then copying headers & content across to a new HttpWebRequest, is this flawed as it may not be able to decrypt the request to get the content? But then normal proxy servers obviously can proxy HTTPS, so I guess perhaps it will work because it will just copy across the encrypted content?

    Read the article

  • Problem with multiple event handling in JQuery

    - by Greg
    Hi everyone, I have a strange jquery problem with multiple event handlers. What I'm trying to achieve is this: User selects some text on the page If the selection is not empty - show a context menu If user clicks somewhere else - the context menu should disappear I'm having troubles with the above i.e. sometimes the context menu appears correctly, sometimes it appears and disappears straight after user makes a selection. Please help. See the relevant parts of my code below. Also when user selects a paragraph or a word by double clicking - context menu appears and quickly disappears again. var ContextMenu = { ... show: function(e) { var z = this; if (!this.shown) { if (this.contextMenu) { this.contextMenu.css({ left: e.pageX, top: e.pageY }).slideDown('fast'); this.shown = true; } var hideHandler = function() { z.hide(this); }; $(document.body).bind("click", hideHandler); } }, hide: function(hideHandler) { if (this.contextMenu && this.shown) { this.contextMenu.slideUp('fast'); this.shown = false; $(document.body).unbind("click", hideHandler); } } }; // Context menu display logic $(document.body).bind("mousedown mouseup", function(e) { if ((window.getSelection().toString() != "") && (!ContextMenu.shown)) { ContextMenu.show(e); } });

    Read the article

  • CSS: Aligning problem with rounded corners in IE 6/7 but ok in IE8/ Firefox etc

    - by mark smith
    Hi there, can anyone help? I have a problem aligning rounded corners in IE6/7. Basically everything seems to work in Firefox / IE8 but in IE6/7 the left / center / and right divs get misaligned. This basically shows exactly what i am refering to. here is the example in IE8 and everything works ok http://es.drop.io/ern0fye/asset/ie8-jpg And here is the problem (this example is running in IE8 with compat mode set to IE7) http://es.drop.io/ern0fye/asset/ie7-jpg I seem to remember there being a bug in IE6/7 with lineheight or similar but i don't recall exactly. I will paste the CSS and HTML below it is very very simple. Basically there is a left div that holds the left corner image and center div which has a background of RED which is the same as the corner images and finally a right div which holds the right corner image. I would appreciate any input anyone has. Thanks in advance. Here is the CSS .vl-top-left { float:left; width:12px; height:12px; } .vl-top-center { float:left; width: 485px; background-color: #F04A23; height:12px; } .vl-top-right { float:left; height:12px; width:12px; } and the HTML is :- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title></title> <link href="Stylesheet1.css" rel="stylesheet" type="text/css" /> </head> <body> <div class="vl-top-left"> <img src="content/images/esquina_sup_izq.gif" width="12" height="12"> </div> <div class="vl-top-center"> &nbsp; </div> <div class="vl-top-right"> <img src="content/images/esquina_sup_der.gif" width="12" height="12"> </div> </body> </html> EDIT Applied also margin:0 and padding:0 on the body and on each DIV but still the left and right div drops down as per the screenshot

    Read the article

  • asp.net postback with jquery?

    - by mark smith
    Hi there, Can anyone help, I have a asp.net button but recently replaced it with a standard html button ... What i need to do is postback to an asp.net page and ensure a method is called the button before was an asp.net button so i had this event Protected Sub btnCancelar_Click(ByVal sender As Object, ByVal e As System.EventArgs) UtilTMP.DisposeObjects() Server.Transfer("~\Forms\test.aspx", True) End But i was using a button with javascript ALERT and recently changed to Jquery UI Model dialog but it doesn't wait for me to answer the question.. the postback happenes immediatly ... so i decided to change to a standard HTML button ... but i need to postback to the asp.net page and call a method like. If i just postback it won't call the cleanup Protected Sub Cleanup() UtilTMP.DisposeObjects() Server.Transfer("~\Forms\test.aspx", True) End

    Read the article

  • Silverlight with Visual Studio 2010 Isolated Storage Error

    - by Greg Finzer
    I am getting an error when trying to access isolated storage when running a Silverlight unit test project in VS2010. Test method Silverlight_Binary_Serialization_Tests.SerializationTests.SerializeBytesTest threw exception: System.IO.IsolatedStorage.IsolatedStorageException: Unable to determine application identity of the caller. Here is the line it is failing on: private readonly IsolatedStorageFile _store = IsolatedStorageFile.GetUserStoreForApplication();

    Read the article

  • scrapy - python question

    - by tom smith
    Hi.. Maybe not the correct place to post. But, I'm going to try anyway! I've got a couple of test python parsing scripts that I created. They work enough for me to test what I'm working on. However, I recently came across the python framework, Scrapy, which is used for web scraping. My app runs in a distributed process, across a testbed of multiple servers. I'm trying to understand scrapy, to see if it provides benefits over what I'm doing. So, if possible, I'd really like to talk with a few people who are grounded in/or who use scrapy. Thanks -tom [email protected]

    Read the article

  • Updating Xml attributes with new values in a SQL Server 2008 table

    - by SMD
    I have a table in SQL Server 2008 that it has some columns. One of these columns is in Xml format and I want to update some attributes. For example my Xml column's name is XmlText and it's value in 5 first rows is such as: <Identification Name="John" Family="Brown" Age="30" /> <Identification Name="Smith" Family="Johnson" Age="35" /> <Identification Name="Jessy" Family="Albert" Age="60" /> <Identification Name="Mike" Family="Brown" Age="23" /> <Identification Name="Sarah" Family="Johnson" Age="30" /> and I want to change all Age attributes that are 30 to 40 such as below: <Identification Name="John" Family="Brown" Age="40" /> <Identification Name="Smith" Family="Johnson" Age="35" /> <Identification Name="Jessy" Family="Albert" Age="60" /> <Identification Name="Mike" Family="Brown" Age="23" /> <Identification Name="Sarah" Family="Johnson" Age="40" />

    Read the article

  • UIImagePickerController image editing not working

    - by Greg Reichow
    I am having a problem with implementing UIImagePickerController. When the controller loads, it displays modally, and allows the user to select the image. Good so far. Yet, then when it moves to the editing phase, it often displays somewhat corrupted view (the image cropping box is halfway off the top of the screen) and their is no image. It does not crash, but all UI interaction is blocked. The strange part is that this only happens when I compile with Release settings. Under debug compile settings, the image editing works fine! I have tried checking for memory warnings during this time, but none are showing up. Here is the code calling the image picker controller for reference. When I use the camera (the first method), it always works fine. It is just when selecting images from the Library (called from the second method below) does it fail as described above. And again, only on release build, and with various different types of images. - (IBAction) showCameraController:(id)sender { self.imagePicker =[[UIImagePickerController alloc] init]; self.imagePicker.sourceType=UIImagePickerControllerSourceTypeCamera; self.imagePicker.delegate=self; self.imagePicker.allowsEditing=YES; [self presentModalViewController:self.imagePicker animated:YES]; } - (IBAction) showPictureAlbumController:(id)sender { self.imagePicker =[[UIImagePickerController alloc] init]; self.imagePicker.sourceType=UIImagePickerControllerSourceTypePhotoLibrary; self.imagePicker.delegate=self; self.imagePicker.allowsEditing=YES; [self presentModalViewController:self.imagePicker animated:YES]; } The delegate methods are properly implemented, yet, during the problem I am describing, the controller is not yet calling those methods. It is failing when displaying the editing screen before the user is able to select cancel or save. It is just locking up with no crash. Please help!

    Read the article

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