Search Results

Search found 1672 results on 67 pages for 'andrew dyer'.

Page 54/67 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • JavaScript and error "end tag for element which is not open"

    - by Andrew Spilak
    I have problem with validation such code function show_help_tip(event, element) { var $e = $(element); var pos = $e.offset(); $('.body-balloon',$help_tip_div).html($(' <p>&nbsp;</p> ').html(element.getAttribute('title'))); $help_tip_div.css({position:'absolute',top:530,left:pos.left+$e.width()-20}).show(); } end tag for element "P" which is not open What's wrong?

    Read the article

  • Use a cat + grep as an included source in bash

    - by Andrew
    I'm on a shared webhost where I don't have permission to edit the global bash configuration file at /ect/bashrc. Unfortunately there is one line in the global file, mesg y, which puts the terminal in tty mode and makes scp and similar commands unavailable. My local ~./bashrc includes the global file as a source, like so: # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi My current workaround uses cat and grep to output the global file, sans offending line, into a local file and use that as a source. # Source global definitions if [ -f /etc/bashrc ]; then cat /etc/bashrc | grep -v mesg > ~/.bash_global . ~/.bash_global fi Is there a way to do include a grokked file like this without the intermediate step of creating an actual file? Something like this? . cat /etc/bashrc | grep -v mesg > ~/.bash_global

    Read the article

  • [PHP, CSS, & ?] fixed width div, resizing text on the fly based on length

    - by Andrew Heath
    Let's say you've got a simple fixed-width layout that pulls a title from a MySQL database. CSS: #wrapper { width: 800px; } h1 { width: 100%; } HTML: <html> <body> <div id="wrapper"> <h1> $titleString </h1> </div> </body> </html> But the catch is, the length of the title string pulled from your MySQL database varies wildly. Sometimes it might be 10 characters, sometimes it might be 80. It's possible to establish a min & max character count. How, if at all possible, do I get the text-size of my <h1>$titleString</h1> to enlarge/decrease on-the-fly such that the string is only ever on one line and best fit to that line length? I've seen a lot of questions about resizing the div - but in my case the div must always be 100% (800px) and I want to best-fit the title. Obviously a maximum text-size value would have to be set so 5 character strings don't become gargantuan. Does anyone have a suggestion? I'm only using PHP/MySQL/CSS on this page at the moment, but incorporation of another language is fine if it means I can solve the problem. The only thing I can think of is a bruteforce approach whereby through trial and error I establish acceptable string character count ranges matched with CSS em sizes, but that'd be a pretty ugly implementation from the code side.

    Read the article

  • asp.net mvc. Inserting string data from model into javascript. best-practice

    - by Andrew Florko
    Hello everybody, I have to populate javascript code in html layout (hidden fields, method params) with string data from model. Html.Encode is not appropriate for my task because it encodes ' symbol, bypass : (that ruines object attributes declaration) and so on. I wrote static helper class that is used from View like this: alert('<%=ViewHelper.MakeJavaScriptSafe(Model.Message)%>'); I hope there is asp.net in-built function I don't know about for this task. Does it exist really? Thank you in advance.

    Read the article

  • How do i map this in NHibernate

    - by Andrew Smith
    I Have two classes, Survey and Poll classes. Also I have Question and Question Choice classes. How do I map these so I come out with particular table formats. here is the classes involved. public class Survey { public IList<Question> Questions { get; private set; } } public class Poll { public Question Question { get; set; } } public class Question { public string Text { get; set; } public IList<QuestionChocie> Choices { get; private set; } } public class QuestionChoice { public string Text { get; set; } } The resulting tables that I'm shooting for include the following Surveys- a table of survey information. Polls - a table of polls information. SurveyQuestions -a table of survey questions. PollQuestions - a table of poll questions. SurveyChoices - a table of the question choices for the surveys. PollChoices - a table of the question choices for the survey. preferably i really want to know for fluent nhibernate, or just mapping xml is fine too.

    Read the article

  • Reporting system for organization. Architecture advise required

    - by Andrew Florko
    We have several legacy & 3'd-party systems in organization that use several RDBMS vendors (& more specific data storages). Cross-system data reporting (as well as extra-reports that are not implemented in 3'd-party systems) is required with charts and population of templates (winword, excel). Reporting system is visioned as intranet web-site with custom user access to reports. We expect ~50 reports per day. Would you suggest to use BizTalk or any other integration software if commercial-department doesn't plan to buy anything expensive. Would you suggest to create centralized data storage for reporting that is populated regularly or rely on on-demand services that providers always up-to-request data. Thank you in advance!

    Read the article

  • What is the most efficient way to delete all selected items in a ListViewItem collection

    - by Andrew
    My user is able to select multiple items in a ListView collection that is configured to show details (that is, a list of rows). What I want to do is add a Delete button that will delete all of the selected items from the ListViewItem collection associated with the ListView. The collection of selected items is available in ListView.SelectedItems, but ListView.Items doesn't appear to have a single method that lets me delete the entire range. I have to iterate through the range and delete them one by one, which will potentially modify a collection I'm iterating over. Any hints? Edit: What I'm basically after is the opposite of AddRange().

    Read the article

  • what is the best method of concatenating a series of binary files into one file?

    - by Andrew
    hello everyone i have a series of PDF byte arrays in a arraylist files that i wish to concatenate into one file, currently when the PDF application trys to open the file is it corrupted: foreach (byte[] array in files) { using (Stream s = new MemoryStream(downloadbytes)) { s.Write(array, 0, array.Length); } } downloadbytes is the resultant concatenated array of bytes below is another implementation which also failed foreach (byte[] array in files) { System.Buffer.BlockCopy(array, 0, downloadbytes, offset, array.Length); offset += array.Length; } any pointers?

    Read the article

  • Circular NSSlider with stop (non-continuous)

    - by Andrew
    I am not sure how to phrase this better as a title but I need to make an NSSlider that functions as a normal volume knob. At the moment it will spin around as many times as I hold the mouse down and move it around the control. I need it to stop at the "0" position and the "100" position, I cannot have it jumping from 0 to 100 when I drag it the other way. I hope I am making this clear. Does anyone know how to do this or have any suggestions?

    Read the article

  • Shortest command to calculate the sum of a column of output on Unix?

    - by Andrew
    I'm sure there is a quick and easy way to calculate the sum of a column of values on Unix systems (using something like awk or xargs perhaps), but writing a shell script to parse the rows line by line is the only thing that comes to mind at the moment. For example, what's the simplest way to modify the command below to compute and display the total for the SEGSZ column (70300)? ipcs -mb | head -6 IPC status from /dev/kmem as of Mon Nov 17 08:58:17 2008 T ID KEY MODE OWNER GROUP SEGSZ Shared Memory: m 0 0x411c322e --rw-rw-rw- root root 348 m 1 0x4e0c0002 --rw-rw-rw- root root 61760 m 2 0x412013f5 --rw-rw-rw- root root 8192

    Read the article

  • 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

  • Using NSArray for C-type int comparisons

    - by Andrew Barinov
    I would like to iterate through an NSArray of ints and compare each one to a specific int. All ints are C type ints. The code I am using is as follows: -(int)ladderCalc: (NSArray*)amounts: (int)amount { int result; for (NSUInteger i=0; i< [amounts count]; i++) { if (amount < [amounts objectAtIndex:i]); { // do something } // do something } } However I get an error when comparing the int amount to the result of [amounts objectAtIndex:i] because you cannot compare id to int. Why is the id involved in this case? Shouldn't objectAtIndex just return the object at the index specified? Is it possible to cast the object returned to an C int and then do the comparison? Or should I just dispense with NSArray and do this type of thing in C?

    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

  • 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

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >