Search Results

Search found 2850 results on 114 pages for 'andrew 46'.

Page 75/114 | < Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >

  • php mysql search in 2 columns in 2 tables.

    - by andrew fishwick
    Hey, I have two tables in one DB, one called Cottages and one called Hotels. In both tables they have the same named fields. I basically have a search bar that i want it to search in both of the fields in both of the tables. (the two fields being called "Name" and "Location" SO far I have $sql = mysql_query("SELECT * FROM Cottages WHERE Name LIKE '%$term%' or Location LIKE '%$term%' LIMIT 0, 30"); But this only searches the Cottages table, how can I make it search both the cottages and hotel tables? Andy

    Read the article

  • jsf annotations

    - by Andrew Bucknell
    I've created an address bean and I want to use it twice - once for street address and once for mailing address. I can achieve this using faces config as per the below, but I'm wondering if I can do this via annotations. e.g. put @ManagedBean(name="StreetAddress") and @ManagedBean(name="MailingAddress") on the same class? I feel like I am missing something obvious here but I'm not sure what. <managed-bean> <managed-bean-name>MailingAddress</managed-bean-name> <managed-bean-class>com.leetb.jsf_ex1.model.AddressBean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <map-entries/> </managed-bean> <managed-bean> <managed-bean-name>StreetAddress</managed-bean-name> <managed-bean-class>com.leetb.jsf_ex1.model.AddressBean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <map-entries/> </managed-bean> public class AddressBean { private String line_one; private String line_two; private String suburb; private String state; private String postcode; /* getters and setters snipped */ }

    Read the article

  • nonatomic property in model class when using NSOperationQueue (iPhone)?

    - by Andrew B.
    I have a custom model class with an NSMutableData ivar that will be accessed by custom NSOperation subclasses (using an NSOperationQueue). I think I can guarantee thread-safe access to the ivar from multiple NSOperations by using dependencies, and I can guarantee that I don't access the ivar from other code (say my main app thread) by waiting until the Q has finished all operations. Should I use a nonatomic property specification, or leave it atomic? Is there a significant impact on performance?

    Read the article

  • powershell missing member methods in array

    - by Andrew
    Hi Guys I have (yet another) powershell query. I have an array in powershell which i need to use the remove() and split commands on. Normally you set an array (or variable) and the above methods exist. On the below $csv2 array both methods are missing, i have checked using the get-member cmd. How can i go about using remove to get rid of lines with nan. Also how do i split the columns into two different variables. at the moment each element of the array displays one line, for each line i need to convert it into two variables, one for each column. timestamp Utilization --------- ----------- 1276505880 2.0763250000e+00 1276505890 1.7487730000e+00 1276505900 1.6906890000e+00 1276505910 1.7972880000e+00 1276505920 1.8141900000e+00 1276505930 nan 1276505940 nan 1276505950 0.0000000000e+00 $SystemStats = (Get-F5.iControl).SystemStatistics $report = "c:\snmp\data" + $gObj + ".csv" ### Allocate a new Query Object and add the inputs needed $Query = New-Object -TypeName iControl.SystemStatisticsPerformanceStatisticQuery $Query.object_name = $i $Query.start_time = $startTime $Query.end_time = 0 $Query.interval = $interval $Query.maximum_rows = 0 ### Make method call passing in an array of size one with the specified query $ReportData = $SystemStats.get_performance_graph_csv_statistics( (,$Query) ) ### Allocate a new encoder and turn the byte array into a string $ASCII = New-Object -TypeName System.Text.ASCIIEncoding $csvdata = $ASCII.GetString($ReportData[0].statistic_data) $csv2 = convertFrom-CSV $csvdata $csv2

    Read the article

  • Can JAXB store the class name in the XML so that the the deserialize code doesn't need knowledge of the class?

    - by Andrew
    It seems the standard approach for deserializing JAXB XML is to specify the package name when creating the context. Then, JAXB looks up the class based on the root element: JAXBContext jc = JAXBContext.newInstance("com.foo"); Unmarshaller u = jc.createUnmarshaller(); Object o = u.unmarshal(new StringReader("...")); I'm looking for a more flexible approach where I don't have to specify the package name and could still deserialize any object. This would be as simple as JAXB storing the package in the XML, but I can't seem to find out how to do this. I can write the code to do it myself but that would be unpleasant. It would like JAXB to do it, if possible. BTW, I am not using schemas, just Annotations and marshal/unmarshal. Any ideas?

    Read the article

  • Excel - Programming Cells

    - by Andrew
    I just started programming in Excel and I have a problem figuring some code out. I have created a work schedule in Excel with lists in order to add new people. I wanted to create a macro in which the user inputs a value in a cell (I chose B3) and depending on that 'start time' in cell B3, the headers for the lists all change to correspond with that starting time. For example: B3 says 5:00 am. All the headers will follow with: 5:00 am, 6:00 am, 7:00 am, etc. of course the headers will move at some point so I'm wondering how do you point to a cell that moves too?

    Read the article

  • Can I cache a ManyToOne hibernate object without it being lazy loaded?

    - by Andrew
    @ManyToOne @JoinColumn(name = "play_template_id", table = "team_play_mapping" ) public Play getPlay() { return play; } public void setPlay( Play play ) { this.play = play; } By default, this is eager loading. Can I get it so that it will read the play object from a cache without making it lazy loading? Am I correct that eager loading will force it to do a join query and hence no caching?

    Read the article

  • Getting information from an XML object in PHP

    - by errata
    Hi! I am using some XML parser to get some information from API, blah blah... :) In one place in my script, I need to convert string to int but I'm not sure how... Here is my object: object(parserXMLElement)#45 (4) { ["name:private"]=> string(7) "balance" ["data:private"]=> object(SimpleXMLElement)#46 (1) { [0]=> string(12) "11426.46" } ["children:private"]=> NULL ["rows:private"]=> NULL } I need to have this string "11426.46" stored in some var as integer. When I echo $parsed->result->balance I get that string, but if I want to cast it as int, the result is: 1. Please help! Thanks a lot!

    Read the article

  • Is it possible to use .data() as a search criteria?

    - by Andrew
    I have a pretty complex chat application going on, and there are multiple chat panes, chat entries, chat submits, etc. going on in the same window. At first I was going to do something like.... <input type="text" class="chattext" id="chattext-42"> <input type="text" class="chattext" id="chattext-93"> <input type="button" class="chatsubmit" id="chatsubmit-42"> <input type="button" class="chatsubmit" id="chatsubmit-93"> ... etc. (of course this is vastly simplified, they'd be in separate divs, separate visibilities, etc) So, when they clicked on a .chatsubmit, it would then get the id of that and find the last two characters for the chat ID. This presents some problems, as it would require rewrites if IDs changed lengths, and seems just plain inelegant to me. I then remembered the .data() facility in jQuery... I thought, maybe I could do it more like this: <input type="text" class="chattext"> ... and add a .data("id", 42) to this one <input type="button" class="chatsubmit"> ... and add a .data("id", 42) So that when they click chatsubmit, it gets the ID, and then finds the chattext with that ID and processes it. But looking at the documentation, I don't see an easy way to search by this. For example, let's say the event target in this case is the chatsubmit with the data('id') of 42... var ID = $(event.target).data('id'); // Sets it to 42 var chattext = ... And here I run into the trouble. How do I find which DOM element matches a class of chattext and a data('id') of 42? Is there any easy method, or do I have to search every .chattext for the one with an id of 42? Or is there another easy way of doing this? I did consider the possibility of the container div having the ID, which would make it, I think,? slightly easier to get. But if this works, it could be dealing with things in other container divs as well, making that not a long-term solution. Edit: Literally seconds after posting this, I found this: http://james.padolsey.com/javascript/extending-jquerys-selector-capabilities/ which includes information on extending the selector to data. So I'll try that out, and in the meantime, is this a completely foolhardy way of handling this?

    Read the article

  • Is it possible to store only a checksum of a large file in git?

    - by Andrew Grimm
    I'm a bioinformatician currently extracting normal-sized sequences from genomic files. Some genomic files are large enough that I don't want to put them into the main git repository, whereas I'm putting the extracted sequences into git. Is it possible to tell git "Here's a large file - don't store the whole file, just take its checksum, and let me know if that file is missing or modified." If that's not possible, I guess I'll have to either git-ignore the large files, or, as suggested in this question, store them in a submodule.

    Read the article

  • Navigating sorted XML data (XSLT)

    - by Andrew Parisi
    I have an XML file with company data in it, for 30 companies across 8 industries, on a portfolio page. The user has the option to sort this data by Industry, and this XML file will be added to constantly. This sorting is done in my XSL file using <xsl:choose>. Example: <xsl:when test="(invest[@investid='con'])"> <xsl:for-each select="$invest-port/portfolio/company[@industry='Communications']"> <xsl:sort select="name" /> <div class="invest-port-thumb"> <a> <xsl:attribute name="href"> <xsl:value-of select="link" /> </xsl:attribute> </a> </div> </xsl:for-each> </xsl:when> When navigating to an individual company's page, there are "previous" and "next" buttons at the bottom of the window. My issue is that I need these to dynamically link to the previous and next elements from within the XML data that has been sorted. Is this possible? Or is there an easier way to do this? (such as place each company in industry-divided XML files instead of one) Any insight would be greatly appreciated!

    Read the article

  • Projects to learn Python

    - by Andrew
    I know this isn't a question about a specific snippet of code or anything, but here goes - I've been messing around with the idea of learning Python since I'm pretty bored with PHP (and web development in general), but I can't think of any projects to help me learn. I've already worked through some of Project Euler with Python, but it's getting old. I know the basics, and I want to write something more fun that will introduce me to new things in Python. Is there a cliche beginner project for Python? (for example, PHP's would be a blog or something similiar) Are there any common Python projects for newcomers, or any uncommon ones that you'd suggest? Any ideas would help.

    Read the article

  • Easy way to keep counting up infinitely

    - by Andrew Alexander
    What's a good way to keep counting up infinitely? I'm trying to write a condition that will keep going until there's no value in a database, so it's going to iterate from 0, up to theoretically infinity (inside a try block, of course). How would I count upwards infinitely? Or should I use something else? I am looking for something similar to i++ in other languages, where it keeps iterating until failure.

    Read the article

  • Image processing custom filter 7 by 7

    - by ladiesMan217
    Lets say I have a 7 by 7 neighborhood around a pixel that looks like this 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 and I wanna filter the above by replacing the pixel p by the average of those pixels whose value lie in the range -10<=p_value <=10. I am new to image processing and I think in this case p_value is 25 and around 25 that are many pixel values in that range but don't exactly know to construct a convolution filter out of it.

    Read the article

  • C++ Word-Number to int

    - by Andrew
    I'm developing a program that makes basic calculations using words instead of numbers. E.g. five + two would output seven. The program becomes more complex, taking input such as two_hundred_one + five_thousand_six (201 + 5006) Through operator overloading methods, I split each number and assign it to it's own array index. two would be [0], hundred is [1], and one is [2]. Then the array recycles for 5006. My problem is, to perform the actual calculation, I need to convert the words stored in the array to actual integers. I have const string arrays such as this as a library of the words: const string units[] = { "", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }; const string teens[] = { "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen" }; const string tens[] = { "", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety" }; If my 'token' array has stored in it two hundred one in index 0, 1, and 2, I'm not sure what the best way to convert these to ints would involve.

    Read the article

  • JQuery. Layout is shaking during animation

    - by Andrew Florko
    Hello everybody, JQuery accordion animation (as well as simple hides / shows) looks weird with some browsers (IE, Opera). But Fire Fox and Chrome renders animation perfectly without artifacts. Html layout tends to shake with IE / Opera during animation as if surrounding paddings / margins are changed for small random value. How can I minimize this effect. Is it jquery bug or browsers issue?

    Read the article

  • Nowaday C++ projects for Windows

    - by Andrew Florko
    Please, describe nowadays projects you took part in where C++ platform was preferred to .net where .net runtime could be installed. Some of my friends works in SCADA area. They have to program microcontrollers with Linux Embedded and so on. So my friends have nearly no choice in programming tools. But when you had, why did you prefer C++ ?

    Read the article

  • CTRL+mouse wheel in gvim (windows) not paging

    - by andrew
    Hello, I'm loving vim, but one thing that's bugging me is that when I hold the control key and mouse wheel up or down, the window scrolls normally when the bindings are telling it to page up/down. I'm using the exact same vimrc file (and plugins) on one of my linux machines and the CTRL+mouse wheel does page up down (as opposed to just normally scrolling like in windows). Is there some way to force gvim to response to a ctrl+MouseUp/Down event? It seems to be ignoring it in windows ='[

    Read the article

  • GIt Deployment + Configuration Files + Heroku

    - by Andrew
    I'm using Heroku to host a Rails app, which means using Git to deploy to Heroku. Because of the "pure Git workflow" on Heroku, anything that needs to go upstream to the server has to be configured identically on my local box. However I need to have certain configuration files be different depending on whether I'm in the local setup or deployed on Heroku. Again, because of the deployment method Heroku uses I can't use .gitignore and a template (as I have seen suggested many times, and have used in other projects). What I need is for git to somehow track changes on a file, but selectively tell git not to override certain files when pulling from a particular repo -- basically to make certain changes one-way only. Can this be done? I'd appreciate any suggestions!

    Read the article

  • MySQL: Records inserted by hour, for the last 24 hours

    - by Andrew M
    I'm trying to list the number of records per hour inserted into a database for the last 24 hours. Each row displays the records inserted that hour, as well as how many hours ago it was. Here's my query now: SELECT COUNT(*), FLOOR( TIME_TO_SEC( TIMEDIFF( NOW(), time)) / 3600 ) FROM `records` WHERE time > DATE_SUB(NOW(), INTERVAL 24 HOUR) GROUP BY HOUR(time) ORDER BY time ASC right now it returns: 28 23 62 23 14 20 1 4 28 3 19 1 That shows two rows from 23 hours ago, when it should only show one per hour. I think it has something to do with using NOW() instead of getting the time at the start of the hour, which I'm unsure on how to get. There must be a simpler way of doing this.

    Read the article

  • Understand link redirect

    - by Andrew
    wordpress placed into category 'blog' there are no subcategory 'contact' into category 'blog', neither .htaccess with redirect directives. How I can find what script does executed? and I VERY want understand how server find it. http://domain.com/freeaccess/blog/contact Thank you!

    Read the article

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