Search Results

Search found 14593 results on 584 pages for 'pat inside'.

Page 85/584 | < Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >

  • how can i replace an image (inside a div) through jquery and ajax.

    - by oo
    I am trying to click on an image and change it to another image through jquery. When i step through the below code, on the serverside, the controller action fires and on the client side, i can see the correct html return in firebug watch window but the image doesn't change at all. any idea why this div is not updating? original div: <div class="inlineDiv" toggle="off" id="22"><img src="../../images/vote-favorite-off1.png" border="0"></div> jquery code: $(document).ready(function() { $('div.inlineDiv').live('click', function() { var id = $(this).attr("id"); var toggle = $(this).attr("toggle"); var url = '/Tracker/Update?id=' + id + '&toggle=' + toggle; $.get(url, function(data) { $(this).html(data); }); }); }); controller action: public ActionResult Update(int id, string toggle) { if (toggle == "off") { return Content("<img src='../../images/vote-favorite-on1.png' border=0'>"); } return Content("<img src='../../images/vote-favorite-off1.png' border=0'>"); }

    Read the article

  • Is it good to keep &nbsp; inside blank <td>?

    - by jitendra
    if this is the structure <table cellspacing="0" cellpadding="0"> <tr> <td>I don't need noting here then should i keep &nbsp; here always </td> <td>item </td> </tr> <tr> <td>model</td> <td>one</td> </tr> <tr> <td>model</td> <td>two</td> </tr> <tr> <td>model</td> <td>three</td> </tr> </table> How screen reader will read blank TD, Is it semantically correct?

    Read the article

  • How to check if a position inside a std string exists ?? (c++)

    - by yox
    Hello, i have a long string variable and i want to search in it for specific words and limit text according to thoses words. Say i have the following text : "This amazing new wearable audio solution features a working speaker embedded into the front of the shirt and can play music or sound effects appropriate for any situation. It's just like starring in your own movie" and the words : "solution" , "movie". I want to substract from the big string (like google in results page): "...new wearable audio solution features a working speaker embedded..." and "...just like starring in your own movie" for that i'm using the code : for (std::vector<string>::iterator it = words.begin(); it != words.end(); ++it) { int loc1 = (int)desc.find( *it, 0 ); if( loc1 != string::npos ) { while(desc.at(loc1-i) && i<=80){ i++; from=loc1-i; if(i==80) fromdots=true; } i=0; while(desc.at(loc1+(int)(*it).size()+i) && i<=80){ i++; to=loc1+(int)(*it).size()+i; if(i==80) todots=true; } for(int i=from;i<=to;i++){ if(fromdots) mini+="..."; mini+=desc.at(i); if(todots) mini+="..."; } } but desc.at(loc1-i) causes OutOfRange exception... I don't know how to check if that position exists without causing an exception ! Help please!

    Read the article

  • How do I refer to an instance from inside it's own code in Adobe Flash.

    - by matt1024
    In Adobe Flash, I have a movie clip that is added to the stage when the keyboard is pressed. I want it to travel across the screen and disappear once it reaches the edge of the stage. At the moment I use this but the image appears and then stops. Here is my code: addEventListener(Event.ADDED_TO_STAGE,runtime); var c = 0 function runtime(){ while(this.x<800){ this.x += 12; } removeChild(this); } Thanks

    Read the article

  • Should all the using directives for namespaces be inside the namespace?

    - by Sajeev SL
    Microsoft StyleCop provided a warning when the using directives for namespaces are provided outside of the namespace. Is this really required as my view on this is that using dircetives for namespaces is for providing a alias name for namespace and for removing the need for providing the namespace name when a class/interface is used. I dont think it will be used for loading the assembly.

    Read the article

  • how to replace strings in file based on values from another file? (example inside)

    - by thaold
    Hi, how to replace strings in file, based on values from another file. Example, 2 files - input, output input: 12345 1 output: (1,'a lot of text', 'some other info',0,null, 12345), (2,'a lot of text', 'some other info',0,null, 12345), (3,'a lot of text', 'some other info',0,null, 12345), (4,'a lot of text', 'some other info',0,null, 12345), (5,'a lot of text', 'some other info',0,null, 12345); Needs to be done: read values from file 'input', and replace all '12345' with '1' in file 'output'. Thanks for help in advance

    Read the article

  • Is it good to put a &nbsp; inside an empty <td>?

    - by jitendra
    If this is the structure: <table cellspacing="0" cellpadding="0"> <tr> <td>I don't need anything here, should I always put a &nbsp; here?</td> <td>item </td> </tr> <tr> <td>model</td> <td>one</td> </tr> <tr> <td>model</td> <td>two</td> </tr> <tr> <td>model</td> <td>three</td> </tr> </table> How will a screen reader read a blank td? Is it semantically correct?

    Read the article

  • Detect if NSString contains a URL and generate a "link" to open inside the app a Safari View

    - by Cy
    I have am reading a twitter feed in my iPhone application and can do it correctly, but I'd like to evolve it in a way to detect if the whole NSString contains any URL or URLs and create a "link" that will open a UIWebView within the same application. Can you guide me on how to perform this task? -(void) setTextTwitter:(NSString *)text WithDate:(NSString*)date { [text retain]; [textTwitter release], textTwitter = nil; textTwitter = text; [date retain]; [dateTwitter release], dateTwitter = nil; dateTwitter = date; [self setNeedsDisplay]; }

    Read the article

  • How to create multiple Repository object inside a Repository class using Unit Of Work?

    - by Santosh
    I am newbie to MVC3 application development, currently, we need following Application technologies as requirement MVC3 framework IOC framework – Autofac to manage object creation dynamically Moq – Unit testing Entity Framework Repository and Unit Of Work Pattern of Model class I have gone through many article to explore an basic idea about the above points but still I am little bit confused on the “Repository and Unit Of Work Pattern “. Basically what I understand Unit Of Work is a pattern which will be followed along with Repository Pattern in order to share the single DB Context among all Repository object, So here is my design : IUnitOfWork.cs public interface IUnitOfWork : IDisposable { IPermitRepository Permit_Repository{ get; } IRebateRepository Rebate_Repository { get; } IBuildingTypeRepository BuildingType_Repository { get; } IEEProjectRepository EEProject_Repository { get; } IRebateLookupRepository RebateLookup_Repository { get; } IEEProjectTypeRepository EEProjectType_Repository { get; } void Save(); } UnitOfWork.cs public class UnitOfWork : IUnitOfWork { #region Private Members private readonly CEEPMSEntities context = new CEEPMSEntities(); private IPermitRepository permit_Repository; private IRebateRepository rebate_Repository; private IBuildingTypeRepository buildingType_Repository; private IEEProjectRepository eeProject_Repository; private IRebateLookupRepository rebateLookup_Repository; private IEEProjectTypeRepository eeProjectType_Repository; #endregion #region IUnitOfWork Implemenation public IPermitRepository Permit_Repository { get { if (this.permit_Repository == null) { this.permit_Repository = new PermitRepository(context); } return permit_Repository; } } public IRebateRepository Rebate_Repository { get { if (this.rebate_Repository == null) { this.rebate_Repository = new RebateRepository(context); } return rebate_Repository; } } } PermitRepository .cs public class PermitRepository : IPermitRepository { #region Private Members private CEEPMSEntities objectContext = null; private IObjectSet<Permit> objectSet = null; #endregion #region Constructors public PermitRepository() { } public PermitRepository(CEEPMSEntities _objectContext) { this.objectContext = _objectContext; this.objectSet = objectContext.CreateObjectSet<Permit>(); } #endregion public IEnumerable<RebateViewModel> GetRebatesByPermitId(int _permitId) { // need to implment } } PermitController .cs public class PermitController : Controller { #region Private Members IUnitOfWork CEEPMSContext = null; #endregion #region Constructors public PermitController(IUnitOfWork _CEEPMSContext) { if (_CEEPMSContext == null) { throw new ArgumentNullException("Object can not be null"); } CEEPMSContext = _CEEPMSContext; } #endregion } So here I am wondering how to generate a new Repository for example “TestRepository.cs” using same pattern where I can create more then one Repository object like RebateRepository rebateRepo = new RebateRepository () AddressRepository addressRepo = new AddressRepository() because , what ever Repository object I want to create I need an object of UnitOfWork first as implmented in the PermitController class. So if I would follow the same in each individual Repository class that would again break the priciple of Unit Of Work and create multiple instance of object context. So any idea or suggestion will be highly appreciated. Thank you

    Read the article

  • How to initialise an array inside a struct without doing each element separately? (C++)

    - by Janet
    My questions are in the code, but basically i want to know how/if I can do the two commented out lines? I know I can do it in a constructor but I don't want to! struct foo { int b[4]; } boo; //boo.b[] = {7, 6, 5, 4}; // <- why doesn't this work? (syntax error : ']') //boo.b = {7, 6, 5, 4}; // <- or else this? (syntax error : '{') boo.b[0] = 7; // <- doing it this way is annoying boo.b[1] = 6; // : boo.b[2] = 5; // : boo.b[3] = 4; // <- doing it this way is annoying boo.b[4] = 3; // <- why does this work! (Using: C++, Visual Studio 2005.)

    Read the article

  • Does window.open not work inside an AIR html component?

    - by John Isaacks
    I have a component in AIR like so: <mx:HTML id="html" width="100%" height="100%" location="https://example.com" locationChange="dispatchLocationChange(event)" /> The page it loads contains this: <a onclick="alert('onclick')">Alert</a> <a href="javascript:alert('js')">Alert</a> <a onclick="window.open('http://www.google.com','_blank')">new window</a> The 2 alerts both work. however nothing happens when you click the new window link. all 3 links works when in a real browser so I know its ok. Is there just no support for window.open in the AIR HTML component? or is this a bug? Is there a work around?

    Read the article

  • I cannot seem to load an XML document using ASP (Classic), IIS6. Details inside.

    - by carny666
    So I am writing a web application for use within my organization. The application requires that it know who the current user is. This is done by calling the Request.ServerVariables("AUTH_USER") function, which works great as long as 'Anonymous Access' is disabled (unchecked) and 'Integrated Windows Authentication' is enabled (checked) within IIS for this subweb. Unfortunately by doing this I get an 'Access Denied' error when I hit the load method of the XML DOM. Example code: dim urlToXmlFile urlToXmlFile = "http://currentwebserver/currentsubweb/nameofxml.xml" dim xmlDom set xmlDom = Server.CreateObject("MSXML2.DOMDocument") xmlDom.async = false xmlDom.load( urlToXmlFile ) ' <-- this is where I get the error! I've looked everywhere and cannot find a solution. I should be able to load an XML file into the DOM regardless of the authentication method. Any help would be appreciated. So far the only two solutions I can come up with are: a) create a new subweb that JUST gets the current user name and somehow passes it back to my XML reading subweb. b) open up security on the entire system to 'Everyone', which works but our IS department wouldn't care for that.

    Read the article

  • How do I reset the state of a view inside a tabbar?

    - by ABeanSits
    Hello CocoaTouch-Experts! This is a fairly straightforward question though my Googling session gave me nothing. How do I reset the state of a view hierarchy located in a tabbar programmatically? The behavior I want to replicate is when the user tapps on a tab twice. This causes the view located under that tab to return to it's initial state. The tab is "owned" by a UINavigationController and when the user reaches a certain point in the view hierarchy there is a button which I want to connect this behavior to. All my attempts have failed except calling on a method in AppDelegate which kills the view and adds it back to the UITabBarController again. But this does not feel like the right way to go. Thanks in advance. Best regards //Abeansits

    Read the article

  • How do I run an interactive command line Python app inside of Emacs on Win32?

    - by sludge
    If I use M-x shell and run the interactive Python interpreter, Emacs on Windows does not return any IO. When I discovered M-x python-shell, I regained hope. However, instead of running the interactive Python shell, I want to run a specific Python script that features an interactive CLI. (See Python's cmd module for details). Is there a way of launching a Python script in Emacs that is interactive? (stdout, stdin, stderr)

    Read the article

  • How to download the xml file from server and use it inside application ?

    - by Praween k
    Hi Commonware, As you provided the solution .Actually my application requirement is exactly matches as you told i.e first download it from server and then display the file and it should also be updated as per the server file is updated within running period.Can u please provide me the application code for this .This will be very much helpful.I need it Urgently!!!!!!! [If it blows up, you will either need to split it into multiple files (each with a subset of your data), or not package it with the application, instead downloading it from a server on first run of your appl.] Thanks in advance. Praween

    Read the article

  • Why can't I rename a data frame column inside a list?

    - by Moreno Garcia
    I would like to rename some columns from CPU_Usage to the process name before I merge the dataframes in order to make it more legible. names(byProcess[[1]]) # [1] "Time" "CPU_Usage" names(byProcess[1]) # [1] "CcmExec_3344" names(byProcess[[1]][2]) <- names(byProcess[1]) names(byProcess[[1]][2]) # [1] "CPU_Usage" names(byProcess[[1]][2]) <- 'test' names(byProcess[[1]][2]) # [1] "CPU_Usage" lapply(byProcess, names) # $CcmExec_3344 # [1] "Time" "CPU_Usage" # # ... (removed several entries to make it more readable) # # $wrapper_1604 # [1] "Time" "CPU_Usage"

    Read the article

  • Ruby on Rails How do I access variables of a model inside itself like in this example?

    - by banditKing
    I have a Model like so: # == Schema Information # # Table name: s3_files # # id :integer not null, primary key # owner :string(255) # notes :text # created_at :datetime not null # updated_at :datetime not null # last_accessed_by_user :string(255) # last_accessed_time_stamp :datetime # upload_file_name :string(255) # upload_content_type :string(255) # upload_file_size :integer # upload_updated_at :datetime # class S3File < ActiveRecord::Base #PaperClip methods attr_accessible :upload attr_accessor :owner Paperclip.interpolates :prefix do |attachment, style| I WOULD LIKE TO ACCESS VARIABLE= owner HERE- HOW TO DO THAT? end has_attached_file( :upload, :path => ":prefix/:basename.:extension", :storage => :s3, :s3_credentials => {:access_key_id => "ZXXX", :secret_access_key => "XXX"}, :bucket => "XXX" ) #Used to connect to users through the join table has_many :user_resource_relationships has_many :users, :through => :user_resource_relationships end Im setting this variable in the controller like so: # POST /s3_files # POST /s3_files.json def create @s3_file = S3File.new(params[:s3_file]) @s3_file.owner = current_user.email respond_to do |format| if @s3_file.save format.html { redirect_to @s3_file, notice: 'S3 file was successfully created.' } format.json { render json: @s3_file, status: :created, location: @s3_file } else format.html { render action: "new" } format.json { render json: @s3_file.errors, status: :unprocessable_entity } end end end Thanks, any help would be appreciated.

    Read the article

  • java: how to make srollable panel with radio button and labels inside?

    - by Lucia
    Hi, I got a JScrollPane in which I want to place a list of radio buttons and labels. My problem is the panel doesn't scroll, I suppose it's because i didn't set a viewport, but how can I set it when I have to many components? My code looks something like this: JScrollPane panel = new JScrollPane(); JRadioButton myRadio; JLabel myLabel; for(int i = 0; i<100; i++){ myRadio = new JRadioButton(); myLabel = new JLabel("text"); panel.add(myRadio); panel.add(myLabel); } Thanks.

    Read the article

  • How do I change text color on the selected row inside a ListView/GridView? (using Expression Dark th

    - by Thiado de Arruda
    I'm using theExpression Dark WPF Theme(http://wpfthemes.codeplex.com/) with a ListView(view property set to a GridView) to display some user data like the following : <ListView Grid.Row="1" ItemsSource="{Binding RegisteredUsers}" SelectedItem="{Binding SelectedUser}" > <ListView.View> <GridView> <GridViewColumn Header="Login" DisplayMemberBinding="{Binding Login}" Width="60"/> <GridViewColumn Header="Full Name" DisplayMemberBinding="{Binding FullName}" Width="180"/> <GridViewColumn Header="Last logon" DisplayMemberBinding="{Binding LastLogon}" Width="120"/> <GridViewColumn Header="Photo" Width="50"> <GridViewColumn.CellTemplate> <DataTemplate> <Image Source="{Binding Photo}" Width="30" Height="35"/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> </GridView> </ListView.View> </ListView> The rows have white text with a dark background and white background when selected, however the text color doesnt change when selected and it makes very difficult to read, I would like the text to have a dark color when the row is selected. I have searched for a way to style the text color but with no success, here is the control template for the ListViewItem : <Border SnapsToDevicePixels="true" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" x:Name="border"> <Grid Margin="2,0,2,0"> <Rectangle x:Name="Background" IsHitTestVisible="False" Opacity="0.25" Fill="{StaticResource NormalBrush}" RadiusX="1" RadiusY="1"/> <Rectangle x:Name="HoverRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource NormalBrush}" RadiusX="1" RadiusY="1"/> <Rectangle x:Name="SelectedRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource SelectedBackgroundBrush}" RadiusX="1" RadiusY="1"/> <GridViewRowPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0,2,0,2" VerticalAlignment="Stretch" /> </Grid> </Border> The trigger that changes the background color simply applies an animation to change the 'SelectedRectangle' opacity, but I cant change the text color on the same trigger(I tried using a setter for the foreground color on the ListViewItem, but with no success). Does someone have a clue on that?

    Read the article

  • CSS: position:absolute inside position:relative, but not affecting parent?

    - by JP
    <style> #special p { display:none; } #special:hover p { display:block; } </style> <table> <tr> <td style="width:200px">Things</td> <td style="position:relative; width:220px"> <div style="position:absolute;right:0" id="special"> <img id="shows" /> <p>Variable width upto, say 600px (Will be hidden until this td is :hovered</p> </div> </td> </tr> </table> Can I make this work? Ie, can I make the #special p expand over the top of 'Things'? As I currently have it set up #special won't ever grow outside the 220px wide td. Any ideas?

    Read the article

< Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >