Search Results

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

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

  • JQuery Load() syntax - Changing data source on mouseenter

    - by Andrew Parisi
    Hey everyone. I've written this simple function that is supposed to load a portion of an XML file on mouseenter. It works fine when I specify the data source explicitly, shown below. I have a number of '.invest-port-thumb' divs, each with a unique link. The following code works fine—but it loads the whole XML file—and I only want a portion: $(document).ready(function() { $('.invest-port-thumb a').mouseenter(function() { $('#slider-name').load(this.href); }); }); This code also works fine—loading only the 'cName' portion that I want it to load...Except that this code refers to one of the files, instead of the value of this.href. $(document).ready(function() { $('.invest-port-thumb a').mouseenter(function() { $('#slider-name').load('port/atd.xml cName'); }); }); I guess what I'm saying, syntax wise—How can I combine this.href and the data matching cName? Thanks for the help!

    Read the article

  • Why is my web page left-aligned on iPad?

    - by Andrew
    I recently built a site and centered it using margin: 0 auto. I also wrapped elements in a .wrapper class with a width set to 960px and then had the parent element extend across the whole browser. When I view the Brands screen on an iPad though, the site is left-aligned and does not extend across the whole window. Any thoughts to why this might be happening, and how to correct it? See below for a screenshot:

    Read the article

  • Changing printer preferences in Windows programmatically

    - by Andrew Alexander
    I've written a script that installs several printers for a new user. I want to change the settings on some of these so that they can print on both sides of the page. I BELIEVE this involves modifying an attribute with printui, however it might need VB script or possibly another .NET language (I'd either use VB, C# or IronPython). I can add a comment to a given printer, but how do I select preferences and modify them? Pseudocode would look like this: printui.exe /n printername /??? [how to change quality desired] OR calls to the relevant Windows API.

    Read the article

  • Python - removing double quotation marks " so that script runs

    - by andrew k
    I am using Python scripts to edit the table of many shape files. The following script runs fine, but if there are any " marks in the SIT_FULL_S field, the script errors and shuts down. gp.CalculateField_management(fc + "\\Parcels.shp","SIT_FULL_S", "!SIT_FULL_S!.lstrip('0')", "PYTHON") arcgisscripting.ExecuteError: ERROR 000539: Error running expression: "9030 W SR 2 HWY "A"".lstrip('0') <type 'exceptions.SyntaxError'>: invalid syntax (<string>, line 1) Failed to execute (CalculateField). I have two options, create a new script that runs through and deletes all occurances of ", and then run the above script or modify the above script to ignore the " and contiue running. Can anyone help ?

    Read the article

  • How can I unshorten a URL using python?

    - by Andrew
    I want to be able to take a shortened or non-shortened URL and return its un-shortened form. How can I make a python program to do this? Additional Clarification: Case 1: shortened -- unshortened Case 2: unshortened -- unshortened e.g. bit.ly/silly in the input array should be google.com in the output array e.g. google.com in the input array should be google.com in the output array Thanks for the help!

    Read the article

  • App Engine: how would you... snapshotting entities

    - by Andrew B.
    Let's say you have two kinds, Message and Contact, related by a db.ListProperty of keys on Message. A user creates a message, adds some contacts as recipients, and emails the message. Later, the user deletes one of the contact entities that was a recipient of the message. Our application should delete the appropriate Contact entity, but we want to preserve the original recipient list for the message that was sent for the user's records. In essence, we want a snapshot of the message entity at the time it was sent. If we naively delete the contact entity, though, we lose snapshot integrity; if not, we are left with an invalid key. How would you handle this situation, either in controller logic or model changes? class User(db.Model): email = db.EmailProperty(required=True) class Contact(db.Model): email = db.EmailProperty(required=True) user = db.ReferenceProperty(User, collection_name='contacts') class Message(db.Model): recipients = db.ListProperty(db.Key) # contacts sender = db.ReferenceProperty(User, collection_name='messages') body = db.TextProperty() is_emailed = db.BooleanProperty(default=False)

    Read the article

  • JTable cells not rendering shapes properly

    - by Andrew
    I'm trying to render my JTable cells with a subclassed JPanel and the cells should appear as coloured rectangles with a circle drawn on them. When the table displays initially everything looks OK but then when a dialog or something is displayed over the cells when it is removed the cells that have been covered do not rendered properly and the circles are broken up etc. I then have to move the scroll bar or extend the window to get them to redraw properly. The paintComponent method of the component I'm using to render the cells is below: protected void paintComponent(Graphics g) { setOpaque(true); super.paintComponent(g); Graphics2D g2d = (Graphics2D) g; GradientPaint gradientPaint = new GradientPaint(new Point2D.Double(0, 0), Color.WHITE, new Point2D.Double(0, getHeight()), paintRatingColour); g2d.setPaint(gradientPaint); g2d.fillRect(0, 0, getWidth(), getHeight()); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); Rectangle clipBounds = g2d.getClipBounds(); int x = new Double(clipBounds.getWidth()).intValue() - 15; int y = (new Double(clipBounds.getHeight()).intValue() / 2) - 6; if (level != null) { g2d.setColor(iconColour); g2d.drawOval(x, y, width, height); g2d.fillOval(x, y, width, height); } }

    Read the article

  • How can I theme custom form(drupal 6.x)

    - by Andrew
    DRUPAL 6.X I have this custom form constructor inside my custom module which is invoke through ajax request. I’m attempting to theme this form with the template file reside in my theme directory. For that matter, I’ve registered my theme inside template.php file which reside in my theme folder. Here’s how this file looks – function my_theme() { return array( 'searchdb' => array( 'arguments' => array('form' => NULL), 'template' => 'searchform', ) ); } And the following is the excerpt of module code – function test_menu() { $my_form['searchdb'] = array( 'title' => 'Search db', 'page callback' => 'get_form', 'page arguments' => array(0), 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); return $my_form; } function get_form($formtype){ switch($formtype){ case 'searchdb' : echo drupal_get_form('searchdb'); break; } } function searchdb(){ $form['customer_name'] = array( '#type' => 'textfield', '#title' => t('Customer Name'), '#size' => 50, '#attributes' => array('class' => 'name-textbox'), ); return $form; } As you can imagine, this is not working at all. Just to test if my theme is even registered, I’ve also tested with theme function but, it’s not called. I've checked template file name and form-id(through the outputted html source) and everything seems ok. I would be glad if anyone could point me to the right direction.

    Read the article

  • BlackBerry responseXML is null

    - by Andrew
    I'm trying to port a portion of AJAX code I wrote over to the BlackBerry application's embedded browser. Our base build is 4.6.1 and the RIM documentation claims that XMLHttpRequest's responseXML is available starting with this version. And when I request an XML file from my local server, I get back the responseText (so I know the request is working), but the responseXML is always null. I've made sure the HTTP "Content-Type" header is set to "text/xml" and I am getting the correct data loaded in a web browser. It's just nulling out in the BB web environment. Does anyone know what might be happening? A backup of using the responseText and piping it through DOMParser is not possible because that object was not added to the BB browser until 4.7.1. So I'm not sure what fallback I have.

    Read the article

  • Mod rewrite urls with

    - by Andrew
    Hey Guys, I'm at my wits end here , I normally like to work things out on my own but this has me well and truly beaten here.. I'm trying to mod rewrite my urls that contain pluses... /search.php?q=can+be+any+length to /can-be-any-length.html Any help would be really appreciated becaus rewriting the + php is not an option

    Read the article

  • Android App - XML or java

    - by Andrew Cochrane
    Hello - I am currently starting to create an app for a small charity company. But Im not entirely sure how to properly learn how to code for the Android OS. I have searched online for tutorials but most stop at the same stage and only show you how to launch the "helloWorld" app. My question is this: 1) Will using solely XML be sufficient to code an app? Does it require working in partnership with java? 2) Does anyone know of any books, recommended books of course, that break everything down for you step-by-step? Cheers

    Read the article

  • Replacing text after node

    - by Andrew
    I am trying to remove the "Hide this data" from this XML which is proceeded with the qualifier type="noView" <element version="Local"> <qualifier name="Public" type="View" /> Good to go </element> <element version="Local"> <qualifier name="Public" type="noView" /> Hide this data </element> I am using this XSL <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="qualifier"> <xsl:call-template name="replace-noview" /> </xsl:template> <xsl:template name="replace-noview"> <xsl:param name="text" select="@type"/> <xsl:choose> <xsl:when test="contains($text, 'noView')"> <xsl:copy-of select="."/> <xsl:text>DELETED</xsl:text> </xsl:when> <xsl:otherwise> <xsl:copy-of select="."/> </xsl:otherwise> </xsl:choose> </xsl:template> The output I'm getting is <element identifier="ContactName" version="Local"> <qualifier name="Public" type="View" /> Good to go </element> <element identifier="ContactName" version="Local"> <qualifier name="Public" type="noView" />DELETED Hide this data </element> I am matching the "noView" attribute and can add the "DELETED" text. However I need to remove the follow "Hide this data" text. The output I would like is <element identifier="ContactName" version="Local"> <qualifier name="Public" type="View" /> Good to go </element> <element identifier="ContactName" version="Local"> <qualifier name="Public" type="noView" /> DELETED </element>

    Read the article

  • Output unicode strings in Windows console app

    - by Andrew
    Hi I was trying to output unicode string to a console with iostreams and failed. I found this: Using unicode font in c++ console app and this snippet works. SetConsoleOutputCP(CP_UTF8); wchar_t s[] = L"èéøÞ???Sæca"; int bufferSize = WideCharToMultiByte(CP_UTF8, 0, s, -1, NULL, 0, NULL, NULL); char* m = new char[bufferSize]; WideCharToMultiByte(CP_UTF8, 0, s, -1, m, bufferSize, NULL, NULL); wprintf(L"%S", m); However, I did not find any way to output unicode correctly with iostreams. Any suggestions?

    Read the article

  • Automate downloads from password protected website

    - by Andrew
    I need some help with a work project I have been assigned. At the moment we manually go to the site, logon and then download 2 excel files from a supplier's website every month. The files are then loaded into SQL. We want to automate this process. Now the loading of the files into SQL I can do, but I am not sure how I can automate logging onto the website entering my user details and collecting the files. I mostly deal with SQL and have very little .NET experience, so any code samples would be most appreciated.

    Read the article

  • Check if web form values has changed. Best practice

    - by Andrew Florko
    Hello everybody, I have multi-step form and user can navigate to any page to modify or add information. There is a menu that shows progress and steps user completed. This menu allows to navigate to any step user completed or going to complete. Inspite of big button "Save and Continue" some users click this menu to navigate further. I have to check - if values have changed in a form and ask: "Save changes? Yes/No". What is the best way (with minimum code) you suggest me to check if form values have changed. Thank you in advance!

    Read the article

  • C#: Populating a UI using separate threads.

    - by Andrew
    I'm trying to make some sense out of an application Ive been handed in order to track down the source of an error. Theres a bit of code (simplified here) which creates four threads which in turn populate list views on the main form. Each method gets data from the database and retrieves graphics from a resource dll in order to directly populate an imagelist and listview. From what Ive read on here (link) updating UI elements from any thread other than the UI thread should not be done, and yet this appears to work? Thread t0 = new Thread(new ThreadStart(PopulateListView1)); t0.IsBackground = true; t0.Start(); Thread t1 = new Thread(new ThreadStart(PopulateListView2)); t1.Start(); Thread t2 = new Thread(new ThreadStart(PopulateListView3)); t2.Start(); Thread t3 = new Thread(new ThreadStart(PopulateListView4)); t3.Start(); The error itself is a System.InvalidOperationException "Image cannot be added to the ImageList." which has me wondering if the above code is linked in some way. Iis this method of populating the UI recommended and if not what are the possible complications resulting from it?

    Read the article

  • Zend Framework: My custom form filter is not filtering!

    - by Andrew
    So I have a form that is using a custom filter (which is really just a copy of Zend_Filter_Null). When I call it directly, it works: $makeZeroNull = new My_Filter_MakeZeroNull(); $null = $makeZeroNull->filter('0'); //$null === null However, when I try to add it to an element in my form, it doesn't filter the value when I call getValue(). class My_Form extends Zend_Form { public function init() { $makeZeroNull = new My_Filter_MakeZeroNull(); $this->addElement('text', 'State_ID', array('filters' => array($makeZeroNull))); } } //in controller if ($form->isValid($_POST)) { $zero = $form->State_ID->getValue(); //getValue() should return null, but it is returning 0 } What is going on? What am I doing wrong?

    Read the article

  • Selecting Element followed by text with Selenium WebDriver

    - by Andrew
    I am using Selenium WebDriver and the Python bindings to automate some monotonous WordPress tasks, and it has been pretty straightforward up until this point. I am trying to select a checkbox, but the only way that I can identify it is by the text following it. Here is the relevant portion of HTML: <li id="product_cat-52"> <label class="selectit"> <input value="52" type="checkbox" name="tax_input[product_cat][]" id="in-product_cat-52"> polishpottery </label> </li> The only information that I have in my script to identify this checkbox is the string "polishpottery". Is there any way to select that checkbox knowing only the text that follows?

    Read the article

  • Programmatic Text Wrapping in TextView

    - by Andrew
    I'm working on a custom widget for my application to replicate the look of a Preference button for layouts. The issue is the 'summary' text wont wrap when it hits the right wall of the view. One of the goals I'm trying to keep is that this widget is completely made from java with no xml attributes. here's what the widget looks like at the moment: http://dl.dropbox.com/u/56017670/Screenshot_2012-09-05-17-22-45.png notice that the middle two don't wrap the text but the text obviously runs right off the edge of the widget below is the code I'm using to create the text view. public void setSummary(String summary) { if (!TextUtils.isEmpty(summary)) { if (mSummaryView == null) { mSummaryView = new TextView(mContext); mSummaryView.setTextSize(14); mSummaryView.setTextColor(mContext.getResources().getColor( android.R.color.tertiary_text_dark)); addView(mSummaryView); } mSummaryView.setText(summary); mSummaryView.setVisibility(View.VISIBLE); } else { if (mSummaryView != null) { mSummaryView.setVisibility(View.GONE); } } mSummaryText = summary; } and here is the code I'm using to layout mSummaryView mSummaryView.layout( mPreferencePadding + mIconWidth, centerVertical + (mCombinedTextHeight / 2) - mSummaryHeight, width - mPreferencePadding, centerVertical + (mCombinedTextHeight / 2)); I've tried to add mSummaryView.setSingleLine(false); along with quite a few other tricks but they all ended in the same way.

    Read the article

  • Question about [literally] mapping location based on an IP address.

    - by Andrew
    I've been bored lately and I want to start a new project. I was looking at a website mentioned in a different question (http://www.grapevinegame.com/), and I thought the map and how it plots a point based on someone's IP (I assume) is pretty nifty. I want to do something like that, but I have no idea how it's done. I know you can get latitude and longitude, city and state, and some more with some already-written scripts, but how would you plot those on a map of the world? I've seen it other places, like Google Analytics and such, as well. It seems like a neat thing to be able to do, so I was just wondering how exactly it works. :-p.

    Read the article

  • Return a Const Char* by reading an @property NSString in separate class

    - by Andrew
    I'm probably being an idiot here, but I cannot for the life of me find the answer that I'm looking for. I have an array of CalEvents returned from a CalendarStore query, and for other reasons I am finding the first location of any upcoming event for today that is not an all-day or multi-day event. +(const char*) suggestFirstiCalLocation{ CalCalendarStore *store = [CalCalendarStore defaultCalendarStore]; NSPredicate *allEventsPredicate = [CalCalendarStore eventPredicateWithStartDate:[NSDate date] endDate:[[NSDate date] initWithTimeIntervalSinceNow:3600] calendars:[store calendars]]; NSArray *currentEventCalendarArray = [store eventsWithPredicate:allEventsPredicate]; for (int i = 0; i< [currentEventCalendarArray count]; i++){ if (![[currentEventCalendarArray objectAtIndex:i] isAllDay]){ //Now that other events are cleared, check for multi-day NSDate *startOnDate = [[currentEventCalendarArray objectAtIndex:i] startDate]; NSDate *endOnDate = [[currentEventCalendarArray objectAtIndex:i] endDate]; if ([endOnDate timeIntervalSinceDate:startOnDate ] < 86400.0){ NSString * iCalLocation = [[currentEventCalendarArray objectAtIndex:i] location]; return [iCalLocation UTF8String]; } } } return ""; } For other reasons, I am returning a const char with the value of the location that is found. However, I cannot seem to return "iCalLocation" at all. The compiler fails on the line where I am initializing the "iCalLocation" variable: "Cannot convert to pointer type" Being frank: I am new to Objective-C, and I am still trying to figure points, properties, and such out.

    Read the article

  • asp.net, wcf authentication and caching

    - by andrew
    I need to place my app business logic into a WCF service. The service shouldn't be dependent on ASP.NET and there is a lot of data regarding the authenticated user which is frequently used in the business logic hence it's supposed to be cached (probably using a distributed cache). As for authentication - I'm going to use two level authentication: Front-End - forms authentication back-end (WCF Service) - message username authentication. For both authentications the same custom membership provider is supposed to be used. To cache the authenticated user data, I'm going to implement two service methods: 1) Authenticate - will retrieve the needed data and place it into the cache(where username will be used as a key) 2) SignOut - will remove the data from the cache Question 1. Is correct to perform authentication that way (in two places) ? Question 2. Is this caching strategy worth using or should I look at using aspnet compatible service and asp.net session ? Maybe, these questions are too general. But, anyway I'd like to get any suggestions or recommendations. Any Idea

    Read the article

  • @Resource annotation is null at run-time.

    - by Andrew
    I'm using GlassFish v3. The following field is declared in a class: @Resource private javax.sql.DataSource _data_source; The following is declare in web.xml: <data-source <namejava:app/env/data</name <class-namecom.mysql.jdbc.Driver</class-name <server-namelocalhost</server-name <port-number3306</port-number <usermyUser</user <passwordmyPass</password </data-source At run-time _data_source is empty. What am I doing wrong?

    Read the article

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