Search Results

Search found 23262 results on 931 pages for 'content analysis'.

Page 77/931 | < Previous Page | 73 74 75 76 77 78 79 80 81 82 83 84  | Next Page >

  • Scale background image to wrap content of layout

    - by bjg222
    I have a layout that contains some text fields and has a background image that's displayed at the top of my activity. I'd like the background image to scale to wrap the content (don't care about aspect ratio). However, the image is larger than content, so the layout instead wraps the background image. Here's my original code: <RelativeLayout android:layout_width="fill_parent" android:id="@+id/HeaderList" android:layout_gravity="top" android:layout_height="wrap_content" android:background="@drawable/header"> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/NameText" android:text="Jhn Doe" android:textColor="#FFFFFF" android:textSize="30sp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:paddingLeft="4dp" android:paddingTop="4dp" /> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor="#FFFFFF" android:layout_alignParentLeft="true" android:id="@+id/HoursText" android:text="170 hours" android:textSize="23sp" android:layout_below="@+id/NameText" android:paddingLeft="4dp" /> </RelativeLayout> After searching through some other questions, I found these two: How to wrap content views rather than background drawable? Scale a Drawable or background image? Based on this, I created a FrameLayout w/ an ImageView showing the background. Unfortunately, I still can't get it to work. I want the height of the background image to shrink/expand w/ the size of the text views, but with the FrameLayout, the ImageView fits to the size of it's parent, and I can't find a way to make the parent fit to the size the text view layout. Here's my updated code: <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" > <ImageView android:src="@drawable/header" android:layout_width="fill_parent" android:scaleType="fitXY" android:layout_height="fill_parent" /> <RelativeLayout android:layout_width="fill_parent" android:id="@+id/HeaderList" android:layout_gravity="top" android:layout_height="wrap_content" > <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/NameText" android:text="John Doe" android:textColor="#FFFFFF" android:textSize="30sp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:paddingLeft="4dp" android:paddingTop="4dp" /> <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textColor="#FFFFFF" android:layout_alignParentLeft="true" android:id="@+id/HoursText" android:text="170 hours" android:textSize="23sp" android:layout_below="@+id/NameText" android:paddingLeft="4dp" /> </RelativeLayout> </FrameLayout> Does anybody have any suggestions for how best to make an image scale to the size of the contents of some layout? I'm not concerned with the aspect ratio of the image, as it won't matter, I just want it to fill the background. Thanks!

    Read the article

  • Rails choking on the content of this request because of protect_from_forgery

    - by randombits
    I'm trying to simply test my RESTful API with cURL. Using the following invocation: curl -d "name=jimmy" -H "Content-Type: application/x-www-form-urlencoded" http://127.0.0.1:3000/people.xml -i Rails is dying though: ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken): :8:in `synchronize' Looks like it's running this through a protect_from_forgery filter. I thought protect_from_forgery is excluded for non-HTML HTTP POST/PUT/DELETE type requests? This is clearly targeting the XML format. If I pass actual XML content, it works. But my users will be submitting POST data as URL encoded parameters. I know all the various ways I can disable protect_from_forgery but what's the proper way of handling this? I want to leave it on so that when I do have HTML based forms and handle format.html, I don't forget to re-enable it for then. I want users to be able to make HTTP POST requests to my XML-based API though and not get bombarded with this.

    Read the article

  • SyndicationItem.Content is Null

    - by kdmurray
    I'm trying to pull the contents of an RSS feed into an object that can be manipulated in code. It looks like the SyndicationFeed and SyndicationItem classes in .NET 3.5 will do what I need, except for one thing. Every time I've tried to read in the contents of an RSS feed using the SyndicationFeed class, the .Content element for each SyndicationItem is null. I've run my feed through FeedValidator and have tried this with feeds from several other sources, but to no avail. XmlReader xr = XmlReader.Create("http://shortordercode.com/feed/"); SyndicationFeed feed = SyndicationFeed.Load(xr); foreach (SyndicationItem item in feed.Items) { Console.WriteLine(item.Title.Text); Console.WriteLine(item.Content.ToString()); } Console.ReadLine(); I suspect I may just be missing a step somewhere, but I can't seem to find a good tutorial on how to consume RSS feeds using these classes.

    Read the article

  • "Alert" and "if" changes behaviour of dom copying from iframe to div

    - by lowkey
    Hi guys! Tried to make a little old school ajax (iframe-javascript) script. A bit of mootools is used for DOM navigation Description: HTML: 1 iframe called "buffer" 1 div called "display" JAVASCRIPT: (short: copy iframe content into a div on the page) 1) onLoad on iframe triggers handler(), a counter makes sure it only run once (this is because otherwise firefox will go into feedback loop. What i think happens: iframe on load handler() copyBuffer change src of iframe , and firefox takes that as an onload again) 2) copybuffer() is called, it sets src of iframe then copies iframe content into div, then erases iframe content THE CODE: count=0; function handler(){ if (count==0){ copyBuffer(); count++; } } function copyBuffer(){ $('buffer').set('src','http://www.somelink.com/'); if (window.frames['buffer'] && $('display') ) { $('display').innerHTML = window.frames['buffer'].document.body.innerHTML; window.frames['buffer'].document.body.innerHTML=""; } } problems: QUESTION 1) nothing happens, the content is not loaded into the div. But if i either: A) remove the counter and let the script run in a feedback loop: the content is suddenly copied into the div, but off course there is a feedback loop going on, you can see it keeps loading in the status bar. OR B) insert an alert in the copyBuffer function. The content is copied, without the feedback loop. why does this happen? QUESTION 2) The If wrapped around the copying code i got from a source on the internet. I am not sure what it does? If i remove it the code does not work in: Safari and Chrome. Many thanks in advance! UPDATE: Like the answers said i have created an event handler. They used jQuery, i have made one in mootools: window.addEvent('domready', function() { $('buffer').addEvent('load', function(){ $('display').set('html',window.frames['buffer'].document.body.innerHTML) window.frames['buffer'].document.body.innerHTML=""; }).set('src','somelink'); }); Bonus question: 3) Im new at stackoverflow (what an amazing place!), is it better if i make new threads for follow up questions?

    Read the article

  • ASP MVC View Content as JSON

    - by Craig
    I have a MVC app with quite a few Controller Actions that are called using Ajax (jQuery) and return partial views content which updates a part of the screen. But what I would rather do is return JSON something like this. return Json(new { Result = true, Message = "Item has been saved", Content = View("Partial") }); Where the HTML is just a property of the Json. What this means is I need to retrieve the HTML that is rendered by the View method. Is there any easy way to do this, a few examples I have seen are quite convoluted. Edit: This question was originally for ASP.NET MVC 1, but if version 2 makes it easier I would like to hear the answer.

    Read the article

  • Dynamic content in ExtJS Window

    - by Ozaki
    TLDR I want to add some dynamic content into an Ext-JS window / popup. Currently I have tried assigning this content to a div and pulling on the innerhtml of that div like: new Ext.Window({ height: 50, width: 160, x: 0, y: 30, layout: "fit", html: document.getElementById('output').innerHTML; }).show(); Am using jquery & getjson to get the dynamic data. But that does nothing at all. Has anyone done something similar before? Can I give the html of the window an id and use it like an element?

    Read the article

  • Wordpress main website and mobile website duplicate content.

    - by ObjectiveJ
    Basically a client has asked for his WordPress website to be turned into a mobile website as well. I have never attempted this and know nothing about SEO. However the issue has arisen that this may cause duplicate content issues with Google, and therefore both sites may be dropped in the rankings. I was looking at turning the website into a mobile site via one of the available WordPress mobile website plugins. My question is if duplicate content will be an issue? Has anyone ever tried this? After doing some reading I kind of think it may be possible to tell Google not to index the mobile website, although as I understand it It would be the same set of files. So I am unsure that if I tell it not to index one of them, that it will drop the other one as well. Can anyone with WordPress and SEO knowledge clear this up for me?

    Read the article

  • HTMLEditor's content not see <br/>

    - by Ivan90
    Hi, I'm using an editor control of ajaxcontroltoolkit. <cc1:Editor ID="EditNews" runat="server" NoUnicode="true" Height="500px" Width="98%"/> My problem is that when I try to get the content of Editor by: Literal1.Text = EditNews.Content; if in the editor there are breakLine for example "If I write" Text Text Text Text In Literal I get: Text Text Text Text Whitout breakLine. I don't know if this problem depends by an attribute that I haven't set in Editor or I have to control this "" in Code Behind. Thanks for help

    Read the article

  • UIScrollView content to track a CAKeyFrameAnimation along a path

    - by CMLloyd
    In my App I have a full-screen UIScrollView where the content is a UIImageView containing a map image which is about 2000px square (i.e. larger than the UIScrollView). Currently, I plot a path across the map and animate a "beacon" image along it using a CAKeyFrameAnimation, which works great. What I would like to be able to do is to make the UIScrollView content move with the animation in such a way as to keep the beacon image in the centre of the screen (giving the user the impression of tracking along the path). Any suggestions on how I might achieve this?

    Read the article

  • Lightbox: how to parse the lightbox dynamically loaded html content (AJAX)

    - by Patrick
    hi, I'm using a (modal) lightbox on a page of my website to display my nodes. I'm using some plugins such as an external jquery-plugin for tooltips and the drupal plugin jQuery Media (to load flash video player for some video file-fields). These plugins are loaded when the main page load and they parse the html content of the page. When I dynamically load the lightbox (and I use AJAX to update its content) the html inside the lightbox is not parse... so no tooltips, no videos. how can I solve this ? Should I trigger the plugins again from Lightbox callback function ? Or should I use something else instead of the lightbox ? Thanks

    Read the article

  • InApp Purchase supported content types

    - by Chandan Shetty SP
    In InApp purchase guide i saw these are the supported content types - Digital Books,Virtual poker chips current games, In-game tool or accessory, etc... And non-supported - Physical books, Virtual poker chips for other games, In-game credits for virtual goods, etc... I didn't understand "In-game credits for virtual goods" what is this? In my game i am using some credits to skip certain levels, if credits are not available user can buy credits through inApp purchase then he can skip level... Is it valid supported content type for In-App purchase?

    Read the article

  • <mx:HTML/> content looks crusty when resized

    - by keyle
    I've got HTML component as part of a datagroup itemrenderer which I need to resize the content of (there are lots of them). This works quite well but the content looks really crusty. No font antialiasing. Even at 50% looks crusty. I've considered generating thumbnails bitmaps on load 'complete', but that would be my last resort. <mx:HTML location="{uri}" width="900" height="660" scaleX=".25" scaleY=".25" /> Any ideas? Thanks a lot. nic

    Read the article

  • How to get element content by id from HTML object by JavaScript ( JQuery )

    - by Space Cracker
    i write the following code to access page "JQueryPage.aspx" and get data from it using jQuery <script type="text/javascript"> $.get ( "JQueryPage.aspx", function(data) { alert("Data Loaded: " + data); } ); </script> "JQueryPage.aspx" is just a page that contain DIV called 'resultsDIV' that contain the data that i want to return the above code return data variable that contain "JQueryPage.aspx" html and i want to get DIV content from it .. i have 2 questions: 1- how can i extract DIV content from data object 2- is this way is th best to get that data ?

    Read the article

  • ASP.NET AjaxControlToolkit change Combobox content dynamically per Ajax

    - by Ulli
    If I understand it right the new ACT ComboBox Control is Bound once to a given Datasource. But the count of the records I want to bind is very large. So I want to load the content of the ComboBox List via Ajax after the user typed in a few charachters. So at page load the combobox list should be empty and if something is typed in the list is loaded with the typed text as search text. I tried this: <asp:ComboBox ID="cbxCompany" DropDownStyle="DropDownList" runat="server" AutoCompleteMode="Append" /> Protected Sub cbxCompany_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbxCompany.TextChanged Dim dt As DataTable = GetCompanies(cbxCompany.Text) cbxCompany.DataSource = dt cbxCompany.DataTextField = "nameout" cbxCompany.DataValueField = "cid" cbxCompany.DataBind() End Sub GetCompanies is my method for getting data from the database, the parameters filters the select statement. But this doesn't work. Is there a way to reload the combobox content per Ajax?

    Read the article

  • Default content editor in list form doesn't allow image alignment

    - by Ben Collins
    I need to be able to adjust the alignment of an image in an "Enhanced Rich Text Field" in an announcements list in MOSS 2007. However, the default content editor in the edit form for the list doesn't provide a way to do that. What's the fastest way for me to make sure users can align images? My first thought was to customize the DispForm.aspx and EditForm.aspx pages, but they just have the ListForm web part in the content region and as far as I know, you can't customize the ListForm web part from the designer.

    Read the article

  • GXT/GWT html content reloads when switching tabs

    - by Ben
    I am working on a GXT/GWT project. I have two tabs in which content is set based on selections from a drop down menu. The content in one tab is an embedded video (Google Video or youtube video) The problem is that when switching tabs, the video reloads and starts from the beginning again. What I would like is to be able to switch tabs and have the video continue to play or pause when the focus switches to another tab. Any ideas, as always, are greatly appreciated. Cheers, Ben

    Read the article

  • Optimize loading an XAP file with an asp.net website

    - by theoneawaited
    I've been developing a game using Silverlight 4 and silversprite (http://silversprite.codeplex.com/) This game is HEAVILY content dependent, using a lot of audio and images. My content folder is around 90 mbs worth of stuff. And because of that, my XAP file is around 60 MB, and takes 5 minutes to download from the website before any user can start playing. I am using Visual Web Developer 2010 to create my site and load the XAP. Is there a way where I can take content out of my XAP and put it in my ASP.net site project? Or perhaps upload my content files to the site's storage? This would make my XAP file much quicker to download. Anyone have suggestions? Thanks!

    Read the article

  • Windows store apps: ScrollViewer with dinamic content

    - by Alexandru Circus
    I have a scrollViewer with an ItemsControl (which holds rows with data) as content. The data from these rows is grabbed from the server so I want to display a ProgressRing with a text until the data arrives. Basically I want the content of the ScrollViewer to be a grid with progress ring and a text and after the data arrives the content to be changed with my ItemsControl. The problem is that the ScrollViewer does not accept more than 1 element as content. Please tell me how can I solve this problem. (I'm a C# beginner) <FlipView x:Name="OptionPagesFlipView" Grid.Row="1" TabNavigation="Cycle" SelectionChanged="OptionPagesFlipView_SelectionChanged" ItemsSource="{Binding OptionsPageItems}"> <FlipView.ItemTemplate> <DataTemplate x:Name="OptionMonthPageTemplate"> <ScrollViewer x:Name="OptionsScrollViewer" HorizontalScrollMode="Disabled" HorizontalAlignment="Stretch" VerticalScrollBarVisibility="Auto"> <ItemsControl x:Name="OptionItemsControl" ItemsSource="{Binding OptionItems, Mode=OneWay}" Visibility="Collapsed"> <ItemsControl.ItemTemplate> <DataTemplate x:Name="OptionsChainItemTemplate"> <Grid x:Name="OptionItemGrid" Background="#FF9DBDF7" HorizontalAlignment="Stretch"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <!-- CALL BID --> <TextBlock Text="Bid" Foreground="Gray" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" FontSize="18" Margin="5,0,5,0"/> <TextBlock x:Name="CallBidTextBlock" Text="{Binding CallBid}" Foreground="Blue" HorizontalAlignment="Left" Grid.Row="1" Grid.Column="0" Margin="5,0,5,5" FontSize="18"/> <!-- CALL ASK --> <TextBlock Text="Ask" Foreground="Gray" HorizontalAlignment="Left" Grid.Row="2" Grid.Column="0" FontSize="18" Margin="5,0,5,0"/> <TextBlock x:Name="CallAskTextBlock" Text="{Binding CallAsk}" Foreground="Blue" HorizontalAlignment="Left" Grid.Row="3" Grid.Column="0" Margin="5,0,5,0" FontSize="18"/> <!-- CALL LAST --> <TextBlock Text="Last" Foreground="Gray" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="1" FontSize="18" Margin="5,0,5,0"/> <TextBlock x:Name="CallLastTextBlock" Text="{Binding CallLast}" Foreground="Blue" HorizontalAlignment="Left" Grid.Row="1" Grid.Column="1" Margin="5,0,5,5" FontSize="18"/> <!-- CALL NET CHANGE --> <TextBlock Text="Net Ch" Foreground="Gray" HorizontalAlignment="Left" Grid.Row="2" Grid.Column="1" FontSize="18" Margin="5,0,5,0"/> <TextBlock x:Name="CallNetChTextBlock" Text="{Binding CallNetChange}" Foreground="{Binding CallNetChangeForeground}" HorizontalAlignment="Left" Grid.Row="3" Grid.Column="1" Margin="5,0,5,5" FontSize="18"/> <!-- STRIKE --> <TextBlock Text="Strike" Foreground="Gray" HorizontalAlignment="Center" Grid.Row="1" Grid.Column="2" FontSize="18" Margin="5,0,5,0"/> <Border Background="{Binding StrikeBackground}" HorizontalAlignment="Center" Grid.Row="2" Grid.Column="2" Margin="5,0,5,5"> <TextBlock x:Name="StrikeTextBlock" Text="{Binding Strike}" Foreground="Blue" FontSize="18"/> </Border> <!-- PUT LAST --> <TextBlock Text="Last" Foreground="Gray" HorizontalAlignment="Right" Grid.Row="0" Grid.Column="3" FontSize="18" Margin="5,0,5,0"/> <TextBlock x:Name="PutLastTextBlock" Text="{Binding PutLast}" Foreground="Blue" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="3" Margin="5,0,5,5" FontSize="18"/> <!-- PUT NET CHANGE --> <TextBlock Text="Net Ch" Foreground="Gray" HorizontalAlignment="Right" Grid.Row="2" Grid.Column="3" FontSize="18" Margin="5,0,5,0"/> <TextBlock x:Name="PutNetChangeTextBlock" Text="{Binding PutNetChange}" Foreground="{Binding PutNetChangeForeground}" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="3" Margin="5,0,5,5" FontSize="18"/> <!-- PUT BID --> <TextBlock Text="Bid" Foreground="Gray" HorizontalAlignment="Right" Grid.Row="0" Grid.Column="4" FontSize="18" Margin="5,0,15,0"/> <TextBlock x:Name="PutBidTextBlock" Text="{Binding PutBid}" Foreground="Blue" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="4" Margin="5,0,15,5" FontSize="18"/> <!-- PUT ASK --> <TextBlock Text="Ask" Foreground="Gray" HorizontalAlignment="Right" Grid.Row="2" Grid.Column="4" FontSize="18" Margin="5,0,15,0"/> <TextBlock x:Name="PutAskTextBlock" Text="{Binding PutAsk}" Foreground="Blue" HorizontalAlignment="Right" Grid.Row="3" Grid.Column="4" Margin="5,0,15,5" FontSize="18"/> <!-- BOTTOM LINE SEPARATOR--> <Rectangle Fill="Black" Height="1" Grid.ColumnSpan="5" VerticalAlignment="Bottom" Grid.Row="3"/> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> <!--<Grid> <Grid.RowDefinitions> <RowDefinition/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <ProgressRing x:Name="CustomProgressRing" Height="40" Width="40" IsActive="true" Grid.Column="0" Margin="20" Foreground="White"/> <TextBlock x:Name="CustomTextBlock" Height="auto" Width="auto" FontSize="25" Grid.Column="1" Margin="20"/> <Border BorderBrush="#FFFFFF" BorderThickness="1" Grid.ColumnSpan="2"/> </Grid>--> </ScrollViewer> </DataTemplate> </FlipView.ItemTemplate>

    Read the article

  • jQuery not refreshing tabs content in IE

    - by iddimu
    Hi all! I have a page that is using jQuery tabs. Within one of my tabs I have a div that contains a form (initially hidden) that I want to use to add content to the tab. What I have works perfectly in Chrome, Firefox, and Safari. But, in IE 7 the tab will not refresh. The post works and the data gets added to the database, but it simply will not show the new content after submitting it. I don't think it matters - but, just for information I am using the Codeigniter PHP framework as well. Here is my javascript: <script type="text/javascript"> $(document).ready(function(){ // initialize the addChild form as hidden until user requests it open $('#addChild').hide(); // open the form $('#openDialog').click( function(){ $('#addChild').slideToggle(); return false; }); // close the form $('#closeDialog').click( function(){ $('#addChild').slideToggle(); return false; }); // submit the form $('#frmAddChild').submit( function(){ $('#addChild').slideToggle(); $.ajax({ url: '/children/add', type: 'POST', data: $('#frmAddChild').serialize() //cache: false }); //reload the children tab $('#tabs').tabs('load',3); return false; }); }); </script> And, here is my PHP/HTML: <?php // initialize the elements of the form $frmAddChild = array( 'name' => 'frmAddChild', 'id' => 'frmAddChild', 'method' => 'post' ); $child_name = array( 'name' => 'child_name', 'id' => 'child_name', ); $child_dob = array( 'name' => 'child_dob', 'id' => 'child_dob' ); $btnOpenDialog = array( 'name' => 'openDialog', 'id' => 'openDialog', 'value' => 'true', 'content' => 'Add Child' ); $btnCloseDialog = array( 'name' => 'closeDialog', 'id' => 'closeDialog', 'value' => 'true', 'content' => 'Cancel' ); // button that shows the drop down to add echo form_button($btnOpenDialog); ?> <div id="addChild" title="Add Child"> <?php echo form_open('children/add/',$frmAddChild); ?> <table> <tr> <td> <?php echo form_label('Child\'s Name', 'child_name'); ?>: </td> <td> <?php echo form_input($child_name); ?> </td> </tr> <tr> <td> <?php echo form_label('Date of Birth','child_dob'); ?>: </td> <td> <?php echo form_input($child_dob); ?> </td> </tr> <tr> <td colspan="2" align="right"> <?php echo form_submit('submit', 'Add'); ?> <?php echo form_button($btnCloseDialog); ?> </td> </tr> </table> <?php echo form_close(); ?> </div> Does anyone have any ideas how I can get this working correctly in IE? Also, if anyone has any comments about how I have things structured, please let me know. I'm new to Codeigniter and I am by no means a javascript or jQuery expert. Thanks for your help!

    Read the article

  • How can I pre-compress files with mod_deflate in Apache 2.x?

    - by Otto
    I am serving all content through apache with Content-Encoding: zip but that compresses on the fly. A good amount of my content is static files on the disk. I want to gzip the files beforehand rather than compressing them every time they are requested. This is something that, I believe, mod_gzip did in Apache 1.x automatically, but just having the file with .gz next to it. That's no longer the case with mod_deflate.

    Read the article

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