Search Results

Search found 9156 results on 367 pages for 'partial match'.

Page 1/367 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Use a partial in a partial?

    - by Greg Wallace
    I'm a Rails newbie, so bear with me. I have a few places, some pages, some partials that use: <%= link_to "delete", post, method: :delete, data: { confirm: "You sure?" }, title: post.content %> Would it make sense to make this a partial since it is used repeatedly, sometimes in other partials too? Is it o.k. to put partials in partials?

    Read the article

  • JS/Jquery, Match not finding the PNG = match('/gif|jpg|jpeg|png/')

    - by nobosh
    I have the following code which I use to match fancybox possible elements: $('a.grouped_elements').each(function(){ var elem = $(this); // Convert everything to lower case to match smart if(elem.attr('href').toLowerCase().match('/gif|jpg|jpeg|png/') != null) { elem.fancybox(); } }); It works great with JPGs but it isn't matching PNGs for some reason. Anyone see a bug with the code? Thanks

    Read the article

  • partial classes/partial class file

    - by Ravisha
    In C# .net there is a provision to have two different class files and make them a single class using the keyword partial keyword.this helps it to keep [for ex]UI and logic seperate. of course we can have two classes to achieve this one for UI and other for logic. Can this be achieved in java some how?

    Read the article

  • Partial upgrade on 12.04, how to stop nagging after locking to a working NVIDIA & xorg

    - by alsk
    How to stop the upgrade manager from offering updates and upgrades that potentially would harm my working 2D and 3D graphics? Finally, I got 12.04 working as it should: with nvidia-173 drivers by downgrading xorg and locking the version: On my 32-bit system on Athlon64, with (Albatron) NVIDIA GeForce FX5700XT, locked (/pinned) to xorg 1:7.6-7ubuntu7, xserver-xorg-core 2:11.1-0obuntu10.07, nvidia-173 173.14.35-0ubuntu0.2? An annoying thing left is that every time the updates are checked, I get warning of partial updates, and ambiguous options of "partial update" and "close". Ambiguous in that sense that if I click close, I will get option to update a few packages, which has been OK, while "partial update" would like to update my kernel to 3.2, alter xorg, remove nvidia-173 etc., and update mesa etc. This is not what I call appropriate, after locking XORG and NVIDIA drivers to working ones. One may say according to package management logic it may be correct, but to me as an user it makes little sense. Last Ubuntu that worked without big mess for me was 10.10, hence I will not put 12.10 to my "production" system, until I can be sure it will not trash the system again. P.S. Is there a recommended way to keep NVIDIA GeForce FX working with 3D on Ubuntu... in future?

    Read the article

  • preg_match find multiple partial appearances of a word in a string

    - by Rubytastic
    Any regex gurus around here? its driving me crazy. Say I have this string: "bookstore books Booking" I want to count the number "books" appears in this and return the number. Currently I have this which is not working: $string = "bookstore books Booking"; if (preg_match_all('/\b[A-Z]+books\b/', $string, $matches)) { echo count($matches[0]) . " matches found"; } else { echo "match NOT found"; } On top of this the "books" inside the preg_match_all should become a $var Anyone an idea how to count correctly?

    Read the article

  • Update Manager offers 900+ updates under partial upgrade mode

    - by TriforceLZG
    Today I checked for updates and got an error message telling me I must do a partial upgrade. I was shocked to see how many updates there were available. 900+ Updates! By using synaptic I found out that it wanted to remove core packages from my system, such as compiz and python, but also update some as well. I am very confused why package manager would want to do this all of a sudden, and why it wants to destroy my system. I really need an answer, because I now cannot update my system.

    Read the article

  • Continuously asking for partial upgrade

    - by udinnet
    I just upgraded my Ubuntu 11.10 to 12.04 after the announcement of the final release of Ubuntu 12.04. The upgrade process went fine. But now when I run the update manager it asks for a partial upgrade. But the funny thing is it installs 84 new packages in installation step, remove all the 84 packages in the cleaning step!!! This is happening recursively(Every time I launch the update manager). Please can you suggest something? Logs can be found in the launchpad bug page. https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/990449

    Read the article

  • Sql (partial) search in a list and get matched fields

    - by qods
    I have two tables, I want to search TermID in Table-A through TermID in Table-B and If there is a termID like in Table-A and then want to get result table as shown below. TermIDs are in different length. There is no search pattern to search with "like %" TermIDs in Table-A are part of the TermIDs in Table-B Regards, Table-A ID TermID 101256666 126006230 101256586 126006231 101256810 126006233 101256841 126006238 101256818 126006239 101256734 1190226408 101256809 1190226409 101256585 1200096999 101256724 1200096997 101256748 1200097005 Table-B TermNo TermID 14 8990010901190226366F 16 8990010901190226374F 15 8990010901190226382F 18 8990010901190226408F 19 8990010901190226416F 11 8990010901200096981F 10 8990010901200096999F 12 8990010901200097005F 13 8990010901200097013F 17 8990010901260062337F As a result I want to get this table; Result Table -TableA.ID TableA.TermID TableB.TermNo A.ID A.TermID B.TermNo 101256734 1190226408 18 101256585 1200096999 10 101256748 1200097005 12

    Read the article

  • Getting NLog Running in Partial Trust

    - by grant.barrington
    To get things working you will need to: Strong name sign the assembly Allow Partially Trusted Callers In the AssemblyInfo.cs file you will need to add the assembly attribute for “AllowPartiallyTrustedCallers” You should now be able to get NLog working as part of a partial trust installation, except that the File target won’t work. Other targets will still work (database for example)   Changing BaseFileAppender.cs to get file logging to work In the directory \Internal\FileAppenders there is a file called “BaseFileAppender.cs”. Make a change to the function call “TryCreateFileStream()”. The error occurs here: Change the function call to be: private FileStream TryCreateFileStream(bool allowConcurrentWrite) { FileShare fileShare = FileShare.Read; if (allowConcurrentWrite) fileShare = FileShare.ReadWrite; #if DOTNET_2_0 if (_createParameters.EnableFileDelete && PlatformDetector.GetCurrentRuntimeOS() != RuntimeOS.Windows) { fileShare |= FileShare.Delete; } #endif #if !NETCF try { if (PlatformDetector.IsCurrentOSCompatibleWith(RuntimeOS.WindowsNT) || PlatformDetector.IsCurrentOSCompatibleWith(RuntimeOS.Windows)) { return WindowsCreateFile(FileName, allowConcurrentWrite); } } catch (System.Security.SecurityException secExc) { InternalLogger.Error("Security Exception Caught in WindowsCreateFile. {0}", secExc.Message); } #endif return new FileStream(FileName, FileMode.Append, FileAccess.Write, fileShare, _createParameters.BufferSize); }   Basically we wrap the call in a try..catch. If we catch a SecurityException when trying to create the FileStream using WindowsCreateFile(), we just swallow the exception and use the native System.Io.FileStream instead.

    Read the article

  • asp.net MVC partial view

    - by DotnetSparrow
    Hi all: I have created a function for load event like this: $(function() { $('#dvGames').load( '<%= Url.Action("Partial3", "LiveGame") %>',{ gameDate: '2011-03-06' } ); }); and it works. Also, I have created a function for date change like this: $(function() { $('#datepicker').datepicker({ onSelect: function(dateText, inst) { $.ajax({ type: "POST", url: "/LiveGame/Partial3", data: "gameDate=" + dateText, success: function(result) { alert(result); var domElement = $(result); // create element from html $("#dvGames").append(domElement); // append to end of list } }); } }); }); but it doesnt work. neither it goes in controller action. My controller action is: public ActionResult Partial3(string gameDate) { return PartialView("Partial3"); } Please suggest me solution to this.

    Read the article

  • "partial views" best practices for 'container' divs?

    - by ropstah
    What is the 'best' way to handle the html markup for partial views? (which are also refreshed using AJAX) The biggest issue I run into is where to place the 'container' div... Consider having a masterpage and a partial view. (class="" could be interchanged with id="" depending if the partial is guaranteed to be unique, however this isn't really important to the issue i think) Masterpage: <div id="place1" class="placeholder"> <!-- render partial --> </div> Partial: <div id="partial1" class="partial"> <!-- content --> </div> I feel that something isn't being done right. However I cannot remove the div in the masterpage, because I need that to 'encapsulate' the response from AJAX partial updates. And also I cannot move the div in the partial to the masterpage, because that would require to move 'partial' info to the masterpage... How do you handle this?

    Read the article

  • multiple partial views mvc 2

    - by nik1
    Hello World! Hi guys, I have a master page with two partial viewson it both of which submit to the AccountController. When I click Submit on either of the partial views the following happens: If I declare the partial views like Html.BeginForm("PartialAction1","Account") it redirects to that partial view on clicking submit instead bringing back the default HomeContoller Index view with validation errors. If I declare the partial view forms as Html.BeginForm() then it returns to the default index view of the home controller. But it actually fires both partial view actions inside the AccountController and thus returns validation errors for both partial views simultaneously. What I want is version 2 above with only one action firing instead of two. Am I missing, hopefully, something very simple? I hoping someone can help me or point me in the right direction. Here's the code from my master page for the partial views Html.Action("Login1","Account") Html.Action("Login2", "Account") Many Thanks!

    Read the article

  • Regex: match a non nested code block

    - by Sylvanas Garde
    I am currently writing a small texteditor. With this texteditor users are able to create small scripts for a very simple scripting engine. For a better overview I want to highlight codeblocks with the same command like GoTo(x,y) or Draw(x,y). To achieve this I want to use Regular Expresions (I am already using it to highlight other things like variables) Here is my Expression (I know it's very ugly): /(?<!GoTo|Draw|Example)(^(?:GoTo|Draw|Example)\(.+\)*?$)+(?!GoTo|Draw|Example)/gm It matches the following: lala GoTo(5656) -> MATCH 1 sdsd GoTo(sdsd) --comment -> MATCH 2 GoTo(23329); -> MATCH 3 Test() GoTo(12) -> MATCH 4 LALA Draw(23) -> MATCH 5 Draw(24) -> MATCH 6 Draw(25) -> MATCH 7 But what I want to achieve is, that the complete "blocks" of the same command are matched. In this case Match 2 & 4 and Match 5 & 6 & 7 should be one match. Tested with http://regex101.com/, the programming lanuage is vb.net. Any advise would be very useful, Thanks in advance!

    Read the article

  • C# Sharp: Partial Classes

    - by dcolumbus
    This is quick confirmation question: In order to make partial classes work, I initially thought that there would be a main Class public class ManageDates and then you would create partial classes like public partial class ManageDates to extend the ManageDates class. But from some experiementing, I've come to find out that if you're going to use partial classes, each individual class must be declared public partial class [ClassName] ... Am I correct in this conclusion?

    Read the article

  • Working with partial views

    - by MrW
    Hi. I'm trying to create a page that contains a grid and searching. The issue is that I want to have a partial view for the grid and one for the searching. If doing a search, this should render the grid partial view with the new information. At the moment I need information, such as what column I'm sorting by and so on, from the grid (currently stored in viewdata), in order to do the search as I want to keep those settings. This information is only available in the grid partial though. What's the best approach of this to make it neat and nice in the code, but not a mess to work with? Where can I store information that I need in the other partial view? Partial View 1; <table> <%= Html.CreateGrid(Model, "Grid", "Grid", (int)ViewData["SortColumn"], (bool)ViewData["SortedASC"])%> </table> Partial View 2; <div class="searchControl"> <input type="text" class="SearchBox" href="<%= Url.Action("Grid", "Grid", new {page = 1, columnToSortBy=/* would like to access viewdata from partial view 1 here. */, sortASC = /* would like to access viewdata from partial view 1 here. */ } ) %>" /> <input type="submit" value="Search" class="SearchButton" /> </div> I know I might take the completely wrong approach on this, so feel free to point me in the right one! Thanks!

    Read the article

  • MVC Partial View to Call Display Pop-up window using jquery

    - by Gavin campbell
    Hi I have a index page the renders objects from my database as a treeview, each item has a link href="/MessageGroupType/Edit/1002 that makes an Ajax call to display a partial view in a DIV. Within the partial view there is a delete button which calls my controller to delete the item. However, i do a check to make sure the item can be deleted, if the item cant be deleted then i wish a pop-up to appear back on the edit form telling the user they cant delete this record. In my Edit partial view i have the following code " type="text/javascript" $(function() { $("#dialog").dialog(); }); <% if (Boolean.Parse(ViewData["DisplayWindow"].ToString())){% This Mesage group Type Cannot be deleted as is linked to other message group Types <% }% So my main questions are Can i make a reference to a javascript script within my Partial View (i dont want my master page to be called on the partial view) When i dynamically load the partial view data into my DIV - can i then after calling my controller insert another DIV into the first DIV. I am i doing this the wrong way - so any pointers is appreciated Cheers

    Read the article

  • Does Sandcastle support Entity Framework Partial Classes?

    - by ChrisHDog
    I am attempting to use Sandcastle (and Sandcastle Help File Builder) to do some "auto-documentation" of some classes I am using. The classes that are giving me trouble are some partial classes on Entity Framework items that add methods and properties to those Framework items. The triple slash comments don't appear to come through on the methods and properties created in the partial classes. I have out how to get xml documentation of the base properties using the short summary and long description fields on the .emdx editor, but that doesn't provide a solution for the items in the partial classes. Is this possible? Is it perhaps just settings that I'm not setting correctly to pick up the partial classes? Does Sandcastle do partial classes in non-Entity Framework settings? Is what I'm doing even possible (has anyone else successfully used the xml created from triple slash comments to create documentation on entity framework partial classes, and if so how did you do that)? Any assistance is appreciated

    Read the article

  • MVC Partial View Postback - Jquery validation lost

    - by user415394
    I have a partial view which uses Jquery Valiation. This works OK when initially loaded, however after I do a ajax postback and return the partial view from the server with an error showing, the jquery validation seems to be lost. In that, if I delete a required field and hit save the partial view gets submitted, when I would expect it to show an error message and not get submitted. Does Jquery validation need to be initialised somehow for the form in the partial view?

    Read the article

  • Partial template specialization of free functions - best practices

    - by Poita_
    As most C++ programmers should know, partial template specialization of free functions is disallowed. For example, the following is illegal C++: template <class T, int N> T mul(const T& x) { return x * N; } template <class T> T mul<T, 0>(const T& x) { return T(0); } // error: function template partial specialization ‘mul<T, 0>’ is not allowed However, partial template specialization of classes/structs is allowed, and can be exploited to mimic the functionality of partial template specialization of free functions. For example, the target objective in the last example can be achieved by using: template <class T, int N> struct mul_impl { static T fun(const T& x) { return x * N; } }; template <class T> struct mul_impl<T, 0> { static T fun(const T& x) { return T(0); } }; template <class T, int N> T mul(const T& x) { return mul_impl<T, N>::fun(x); } It's more bulky and less concise, but it gets the job done -- and as far as users of mul are concerned, they get the desired partial specialization. My questions is: when writing templated free functions (that are intended to be used by others), should you automatically delegate the implementation to a static method function of a class, so that users of your library may implement partial specializations at will, or do you just write the templated function the normal way, and live with the fact that people won't be able to specialize them?

    Read the article

  • MVC2: Validate PartialView before Form Submit of Page containing Partial View

    - by Pascal
    I am using asp.net mvc2 and having a basic Page that includes a Partial View within a form <% using (Html.BeginForm()) { %> <% Html.RenderAction("partialViewActionName", "Controllername"); %> <input type="submit" value="Weiter" /> <% } %> When I submit the form, the httpPost Action of my Page is called, and AFTER that the httpPost Action of my Partial View is called [HttpPost] public virtual ActionResult PagePostMethod(myModel model) { // here I should know about the validation of my partial View // If partialView.ModelState is valid then // return View("success"); // else return View(model) } [HttpPost] public virtual ActionResult partialViewActionName(myModel model) { ModelState.AddModelError("Error"); return View(model); } But as I am doing the Validation in the httpPost Method of my Partial View (because I want to use my Partial View in several Places) I cant decide if my hole page is valid or not. Has anyone an Idea how I could do this? Isn´t it a common task to have several partial Views in a page but have the information about validation in the page action methods? Thanks very much for your help!!

    Read the article

  • Partial Submit vs. Auto Submit

    - by Frank Nimphius
    Partial Submit ADF Faces adds the concept of partial form submit to JavaServer Faces 1.2 and beyond. A partial submit actually is a form submit that does not require a page refresh and only updates components in the view that are referenced from the command component PartialTriggers property. Another option for refreshing a component in response to a partial submit is call AdfContext.getCurrentInstance.addPartialTarget(component_instance_handle_goes_here)in a managed bean. If a form contains required fields that the user left empty invoking the partial submit, then errors are shown for each of the field as the full form gets submitted. Autosubmit An input component that has its autosubmit property set to true also performs a partial submit of the form. However, this time it doesn't submit the entire form but only the component that triggers the submit plus components referenced it in their PartialTriggers property. For example, consider a form that has three input fields inpA, inpB and inpC with autosubmit=true set on inpA and required=true set on inpB and inpC. use case 1: Running the view, entering data into inpA and then tabbing out of the field will submit the content for inpA but not for inpB and inpC. Further more, none of the required field settings on inpB and inpC causes an error. use case 2: You change the configuration of inpC and set its PartialTriggers property to point to the ID of component inpA. When rerunning the sample, entering a value into inpA and tabbing out of the field will now submit the inpA and inpC fields and thus show an error for the missing required value on inpC. Internally, using autosubmit=true on an input component sets the event root to just this field, which good to have in case of dependent field validation or behavior. The event root can extended to include other components by using the Partial Triggers property on these components to point to the input field that has autosubmit=true defined. PartialSubmit vs. AutoSubmit Partial submit set on a command component submits the whole form and leaves it to the developer to decide which UI component is refreshed in response. Client side required field validation (as well as the server side equivalent) is not disabled by executed in this scenario. Setting immediate=true on the command item to skip validation doesn't help as it would also skip the model update. Auto submit is a functionality on the input components and also performs a partial form submit. However, in addition an event root is defined that narrows the scope for the submitted data and thus the components that are validated on the request. To read more about this topic, see: http://docs.oracle.com/cd/E23943_01/web.1111/b31973/af_lifecycle.htm#CIAHCFJF

    Read the article

  • Regular expression to match one of two video ID's in a Google Video URL

    - by Baldur
    I need to grab the video ID from a Google Video URL. There are two different types of URLs that I need to be able to match: http://video.google.com/videoplay?docid=-3498228245415745977# where I need to be able to match -3498228245415745977 (note the dash; -), and video.google.com/videoplay?docid=-3498228245415745977#docid=2728972720932273543 where I need to match 2728972720932273543. Is there any good regular expression that can match this? This is what I've got so far: @"docid=(-?\d{19}+)" since the video ID seems to be 19 characters except when it's prefixed with the dash. I'm using C# (of which I have very little experience) if that changes anything. P.s. I would also appreciate you review my regular expressions for YouTube (@"[\?&]v=([^&#])";), RedTube (@"/(\d{1,6})") and Vimeo (@"/(\d*)"). I do not expect users to enter the full URL and thus do not match the ^http://\\.?sitename+\\.\\w{2,3}.

    Read the article

  • preg_match to match an optional string, but not match all of the string

    - by buggedcom
    Take for example the following regex match. preg_match('!^publisher/([A-Za-z0-9\-\_]+)/([0-9]+)/([0-9]{4})-(january|february|march|april|may|june|july|august|september|october|november|december):([0-9]{1,2})-([0-9]{1,2})/([A-Za-z0-9\-\_]+)/([0-9]+)(/page-[0-9]+)?$!', 'publisher/news/1/2010-march:03-23/test_title/1/page-1', $matches); print_r($matches); It produces the following: Array ( [0] => publisher/news/1/2010-march:03-23/test_title/1/page-1 [1] => news [2] => 1 [3] => 2010 [4] => march [5] => 03 [6] => 23 [7] => test_title [8] => 1 [9] => /page-1 ) However as the last match is optional it can also work with matching the following "publisher/news/1/2010-march:03-23/test_title/1". My problem is that I want to be able to match (/page-[0-9]+) if it exists, but match only the page number so "publisher/news/1/2010-march:03-23/test_title/1/page-1" would match like so: Array ( [0] => publisher/news/1/2010-march:03-23/test_title/1/page-1 [1] => news [2] => 1 [3] => 2010 [4] => march [5] => 03 [6] => 23 [7] => test_title [8] => 1 [9] => 1 ) I've tried the following regex '!^publisher/([A-Za-z0-9\-\_]+)/([0-9]+)/([0-9]{4})-(january|february|march|april|may|june|july|august|september|october|november|december):([0-9]{1,2})-([0-9]{1,2})/([A-Za-z0-9\-\_]+)/([0-9]+)/?p?a?g?e?-?([0-9]+)?$!' This works, however it will also match "publisher/news/1/2010-march:03-23/test_title/1/1". I have no idea to perform a match but not have it come back in the matches? Is it possible in a single regex?

    Read the article

  • Refresh conent with JQuery/AJAX after using a MVC partial view

    - by Aaron Salazar
    Using the following JQuery/AJAX function I'm calling a partial view when an option is changed in a combobox named "ReportedIssue" that is also in the partial view. The is named "tableContent". <script type="text/javascript"> $(function() { $('#ReportedIssue') .change(function() { var styleValue = $(this).val(); $('#tableContent').load( '/CurReport/TableResults', { style: styleValue } ); }) .change(); }); </script> My problem is that after the jump to the partial view I lose the link to the javascript. I think I'm supposed to use the JQuery ".live()" but I'm unsure. In short, I want to re-establish the link between my JavaScript and my combobox and after the inclusion of the partial view's HTML. I hope I'm being clear enough, Aaron

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >