Search Results

Search found 5261 results on 211 pages for 'includes'.

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

  • mysql - select pagination chunk that includes a given id

    - by sean smith
    ...before the pagination chunks have been determined. I know you can do this in multiple statements, but there must be a better way. my results are returned ordered by date and I want to return the pagination chunk that contains a given id. So I could, for example, select the date of the given id and then select a chunk of results where date is less than or greater than the date. That would work. But is there some native mysql method of doing this sort of thing in one statement? It just seems reasonable to expect that we could ask for X results in which a given id exists if results are ordered by date.

    Read the article

  • Why won't SSI work in IIS?

    - by Josh Kodroff
    I can't get IIS to respect my SSI directives - it just outputs the #include directive as if it were regular old html. Here's the relevant data points: My file with the include directive is called index.html This is my directive: <!-- #include file = "header.shtml" --> (it doesn't work with virtual either.) The file being requested is in the same directory as the file being #include-ed. The SSI module is installed. The SSINC-shtml handler mapping is present and enabled. I think it might be some sort of permissions issue (read/write/execute), but I don't know where those settings are in IIS 7.5.

    Read the article

  • How to Profile R Code that Includes SNOW Cluster

    - by James
    Hi, I have a nested loop that I'm using foreach, DoSNOW, and a SNOW socket cluster to solve for. How should I go about profiling the code to make sure I'm not doing something grossly inefficient. Also is there anyway to measure the data flows going between the master and nodes in a Snow cluster? Thanks, James

    Read the article

  • How to version MVC JavaScript includes

    - by Ed
    I'm working with someone else's code, so I don't know the whole picture, and I don't even know MVC that well, but here's the problem... In Site.Master there's a <%= Html.IncludeJs("ProductPartial")%> which produces this line in the final mark-up <script type="text/javascript" src="/Scripts/release/ProductPartial.js"></script> I made some changes in the JS file, but the old one is obviously cached by the browser, so the changes won't show up until the user refreshes. The usual workaround is to add a version tag at the end of the script source path, but I'm not sure how to do that in this case. Any suggestions?

    Read the article

  • How to make a composite Zend Form Element that includes a Dojo Field

    - by Joe
    I used the zendcast video to get me this far. The form is properly displayed. However, I need to change the display order box into a number box of zend dojo type. I cannot figure it out. Even help with examples would be great. <?php class My_View_Helper_CategoryDetailElement extends Zend_View_Helper_FormElement { protected $html = ''; public function CategoryDetailElement($name, $value = null, $attribs = null) { $type = $description = $displayOrder = $time = ''; if($value) { $type = $value->type; $description = $value->description; $displayOrder = $value->displayOrder; $time = $value->time; } $helper = new Zend_View_Helper_FormText(); $helper->setView($this->view); $helper_label = new Zend_View_Helper_FormLabel(); $helper_label->setView($this->view); $helper_select = new Zend_View_Helper_FormSelect(); $helper_select->setView($this->view); $helper_textarea = new Zend_View_Helper_FormTextarea(); $helper_textarea->setView($this->view); $this->html .= $helper_label->formLabel($name . '[type]', 'Type: ', array()); $this->html .= $helper_select->formSelect($name . '[type]', $type, array(), array('individual'=>'individual', 'team'=>'team')); $this->html .= "<br />"; $this->html .= $helper_label->formLabel($name . '[description]', 'Description: ', array()); $this->html .= $helper_textarea->formTextarea($name . '[description]', $description, array()); $this->html .= "<br />"; $this->html .= $helper_label->formLabel($name . '[displayOrder]', 'Display Order: ', array()); $this->html .= $helper->formText($name . '[displayOrder]', $displayOrder, array()); $this->html .= "<br />"; $this->html .= $helper_label->formLabel($name . '[time]', 'Time: ', array()); $this->html .= $helper->formText($name . '[time]', $time, array()); return $this->html; } } ?>

    Read the article

  • Building an application that includes a DB, and need recommendations

    - by Rubys
    I'm going to build a little system for personal use, and I want it to save data to a database. The language is going to be C#, and so I'd like to use this opportunity to get my head around LINQ to SQL. I have some DB experience and I know my SQL, but it was all in school using Access, which is giving me trouble, and so I'd like to use another DB, something that is small in size, easy to install, and should work with LINQ to SQL. The problem is: I don't know any except Access, and am looking for recommendations. To sum it up: I need a lightweight, easy to install, linq-to-sql supporting database for a small system on a home computer, any recommendations?

    Read the article

  • File paths with XSLT includes

    - by Andrew Parisi
    Hi again everyone. I'm working on a website with a large number of pages, and each one has this in it: <xsl:include href="team-menu.xsl" /> This xsl file is stored in the root directory. Essentially including my "team menu" on each page. My problem is when I include this on nested pages, e.g. "/teammembers/smith.xsl", the links in the menu are broken because they refer to pages that aren't in the same directory as the page i'm viewing. This is probably really easy, but I just don't know how to fix it. Is there a way to tell the XSL the root directory and/or set some sort of global directory? Thanks for your help!

    Read the article

  • PHP: URL detection (regexp) includes line breaks

    - by marco92w
    I want to have a function which gets a text as the input and gives back the text with URLs made to HTML links as the output. My draft is as follows: function autoLink($text) { return preg_replace('/https?:\/\/[\S]+/i', '<a href="\0">\0</a>', $text); } But this doesn't work properly. For the input text which contains ... http://www.google.de/ ... I get the following output: <a href="http://www.google.de/<br">http://www.google.de/<br</a> /> Why does it include the line breaks? How could I limit it to the real URL? Thanks in advance!

    Read the article

  • Is there an alternative to Microsoft.SqlServer.Management.Smo.SqlDataType that includes a value for

    - by Daniel Schaffer
    The Microsoft.SqlServer.Management.Smo.SqlDataType enum has a value for the timestamp type but not rowversion. I'm looking for an updated version of the assembly or an alternate enum type that supports it. The existing enum has a value for Timestamp, but according to the rowversion documentation, timestamp is "deprecated and will be removed in a future version". I prefer to avoid using deprecated things :)

    Read the article

  • Make Errors: Missing Includes in C++ Script?

    - by Abs
    Hello all, I just got help in how to compile this script a few mintues ago on SO but I have managed to get errors. I am only a beginner in C++ and have no idea what the below erros means or how to fix it. This is the script in question. I have read the comments from some users suggesting they changed the #include parts but it seems to be exactly what the script has, see this comment. [root@localhost wkthumb]# qmake-qt4 && make g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -I. -o main.o main.cpp main.cpp:5:20: error: QWebView: No such file or directory main.cpp:6:21: error: QWebFrame: No such file or directory main.cpp:8: error: expected constructor, destructor, or type conversion before ‘*’ token main.cpp:11: error: ‘QWebView’ has not been declared main.cpp: In function ‘void loadFinished(bool)’: main.cpp:18: error: ‘view’ was not declared in this scope main.cpp:18: error: ‘QWebSettings’ has not been declared main.cpp:19: error: ‘QWebSettings’ has not been declared main.cpp:20: error: ‘QWebSettings’ has not been declared main.cpp: In function ‘int main(int, char**)’: main.cpp:42: error: ‘view’ was not declared in this scope main.cpp:42: error: expected type-specifier before ‘QWebView’ main.cpp:42: error: expected `;' before ‘QWebView’ make: *** [main.o] Error 1 I have the web kit on my Fedora Core 10 machine: qt-4.5.3-9.fc10.i386 qt-devel-4.5.3-9.fc10.i386 Thanks all for any help

    Read the article

  • JQuery Validation Plugin not working when used on page that includes another page via AJAX

    - by droidy
    We have a long page that contains a bunch of different form elements. One part of the form is called remotely via AJAX and is populated in an empty div. This is the part which JQuery Validation plugin is not working correctly on. We have class="required" on the elements on this page, but they do not show up as required. I'm guessing it's because the Validation plugin is looking for class="required" on our main page, and since the content from the AJAX page is put into the empty div behind the scenes, it's not detected the required fields. Any help is greatly appreciated.

    Read the article

  • Multiple jQuery includes in a document

    - by bah
    Hi, I have a document which uses old jQuery and I need new jQuery for a particular plug-in. My document structure looks like this: <html> <head> <script type="text/javascript" src="jQuery.old.js"></script> </head> <body> <script> $("#elem").doSomething(); // use old jQuery </script> <!-------- My plugin begins --------> <script type="text/javascript" src="jQuery.new.js"></script> <script type="text/javascript" src="jQuery.doSomething.js"></script> <script> $().ready(function(){ $("#elem").doSomething(); // use new jQuery }); </script> <div id="elem"></div> <!-------- My plugin ends ----------> <script> $("#elem").doSomething(); // use old jQuery </script> </body> </html> I have googled for this question but found nothing that would look like my case (I need first to load old javascript (in the head) and THEN new (in the body). By the way, in the Firefox looks like old jQuery lib loads and scripts that depends on it works, but script that uses new version, and in IE and Chrome everything is exactly opposite.

    Read the article

  • PostgreSQL 9.0 HA load balancing between servers

    - by Vijay Ramachandran
    Hey folks, I'm bashing my head to configure load balancing stuff between two database servers. I have no clue whether, I can find any mechanism to implement this. I already tried to implement Heart beat clustering but it requires virtual Ip wherein I can't create virtual IP or assign my own IP address in amazon EC2. Is there a way to configure PostgreSQL database servers in similar to Amazon load balancing kind of thing ? If so, please suggest the solution. Thanks in advance.

    Read the article

  • LNK2019 Against CArray Add, GetAt, GetSize, all includes are present

    - by David J
    I'm having some issues trying to Compile a DLL, but I just can't see where this linking error is coming from. My LNK2019 is: Exports.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall CArray<struct HWND__ *,struct HWND__ *>::Add(struct HWND__ *)" (__imp_?Add@? $CArray@PAUHWND__@@PAU1@@@QAEHPAUHWND__@@@Z) referenced in function "int __stdcall _Disable(struct HWND__ *,long)" (?_Disable@@YGHPAUHWND__@@J@Z) Disable(...) is... static BOOL CALLBACK _Disable(HWND hwnd, LPARAM lParam) { CArray<HWND, HWND>* pArr = (CHWndArray*)lParam; if(::IsWindowEnabled(hwnd) && ::IsWindowVisible(hwnd)) { pArr->Add(hwnd); ::Enable(hwnd, FALSE); } } This is the first function in Exports.cpp; right above it is #include <afxtempl.h> I have the Windows 7.1 SDK installed (and have tried reinstalling both that and VS2010). The exact same project compiles perfectly fine on other machines, so it can't be the code itself.. I've spent countless errors researching, which led to desperate attempts of just changing random values in the solution file, including different Windows headers, etc. My last resort is getting to be just reinstalling the OS completely (assuming it's actually a problem with the Windows SDK being incorrect or something). Any suggestions at all would be a huge help. EDIT: I've added /showIncludes on the cpp giving issues, and I do see afxtempl.h being included. It's being included multiple times due to other headers including it, but it is there (and it is from the same directory every time): 1> Note: including file: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\afxtempl.h

    Read the article

  • Shaping EF LINQ Query Results Using Multi-Table Includes

    - by sisdog
    I have a simple LINQ EF query below using the method syntax. I'm using my Include statement to join four tables: Event and Doc are the two main tables, EventDoc is a many-to-many link table, and DocUsage is a lookup table. My challenge is that I'd like to shape my results by only selecting specific columns from each of the four tables. But, the compiler is giving a compiler is giving me the following error: 'System.Data.Objects.DataClasses.EntityCollection does not contain a definition for "Doc' and no extension method 'Doc' accepting a first argument of type 'System.Data.Objects.DataClasses.EntityCollection' could be found. I'm sure this is something easy but I'm not figuring it out. I haven't been able to find an example of someone using the multi-table include but also shaping the projection. Thx,Mark var qry= context.Event .Include("EventDoc.Doc.DocUsage") .Select(n => new { n.EventDate, n.EventDoc.Doc.Filename, //<=COMPILER ERROR HERE n.EventDoc.Doc.DocUsage.Usage }) .ToList(); EventDoc ed; Doc d = ed.Doc; //<=NO COMPILER ERROR SO I KNOW MY MODEL'S CORRECT DocUsage du = d.DocUsage;

    Read the article

  • FreeText Query is slow - includes TOP and Order By

    - by Eric P
    The Product table has 700K records in it. The query: SELECT TOP 1 ID, Name FROM Product WHERE contains(Name, '"White Dress"') ORDER BY DateMadeNew desc takes about 1 minute to run. There is an non-clustered index on DateMadeNew and FreeText index on Name. If I remove TOP 1 or Order By - it takes less then 1 second to run. Here is the link to execution plan. http://screencast.com/t/ZDczMzg5N Looks like FullTextMatch has over 400K executions. Why is this happening? How can it be made faster?

    Read the article

  • C++ arrays as parameters, EDIT: now includes variable scoping

    - by awshepard
    Alright, I'm guessing this is an easy question, so I'll take the knocks, but I'm not finding what I need on google or SO. I'd like to create an array in one place, and populate it inside a different function. I define a function: void someFunction(double results[]) { for (int i = 0; i<100; ++i) { for (int n = 0; n<16; ++n) //note this iteration limit { results[n] += i * n; } } } That's an approximation to what my code is doing, but regardless, shouldn't be running into any overflow or out of bounds issues or anything. I generate an array: double result[16]; for(int i = 0; i<16; i++) { result[i] = -1; } then I want to pass it to someFunction someFunction(result); When I set breakpoints and step through the code, upon entering someFunction, results is set to the same address as result, and the value there is -1.000000 as expected. However, when I start iterating through the loop, results[n] doesn't seem to resolve to *(results+n) or *(results+n*sizeof(double)), it just seems to resolve to *(results). What I end up with is that instead of populating my result array, I just get one value. What am I doing wrong? EDIT Oh fun, I have a typo: it wasn't void someFunction(double results[]). It was: void someFunction(double result[])... So perhaps this is turning into a scoping question. If my double result[16] array is defined in a main.cpp, and someFunction is defined in a Utils.h file that's included by the main.cpp, does the result variable in someFunction then wreak havoc on the result array in main?

    Read the article

  • Rails - before_filter than includes updated object

    - by Sam
    I have a before filter than calculates a percentage that needs to include the object that is being updated. Is there a one liner in rails that takes care of this? for example and this is totaly made up: Object.find(:all, :include = :updated_object) Currently I'm sending the object that is getting updated to the definition that calculates the percentage and that works but its making things messy.

    Read the article

  • Redirecting users in JSP from within a includes - java syntax error

    - by Mark Hazlett
    Hey everyone, So my setup for my web application is that I have a general header and footer and then I just include them in all my other pages so that all the common elements for all the pages are in a single page. The only problem I'm running into is when I want to redirect the user back to a login page if the "username" session has not already been created. The problem that I"m running into is that I have an if statement at the top of my header.jsp and then I have the else in the footer.jsp and it is giving me a java syntax error. Any ideas? Here is the code I'm referring to... <%@page contentType="text/html" pageEncoding="UTF-8"%> <% if(session.getAttribute("username") != null) { %> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <!-- CSS files --> <link rel="stylesheet" href="../CSS/headerStyle.css" type="text/css" media="screen" /> <title>Insert title here</title> </head> <body> <div id="container"> <div id="header"> <div id="headerTitle">Title</div> </div> </div> <%} %> And then here is the footer <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="../CSS/headerStyle.css" type="text/css" media="screen" /> </head> <body> <div id="footer"></div> </body> </html> <% else { response.sendRedirect("../wa_login/login.jsp"); } %> However it is giving me an error on the else statement because the else doesn't have an if statement because it's in the header file.

    Read the article

  • clear cached javascript includes in FireFox

    - by user151841
    I'm working on javascript for a site, developing with FireFox, and when I refresh the page, I don't see my changes. The javascript file is in an external file. I reloaded and refreshed the page several times, but the old javascript file was still cached. Finally, I loaded the javascript page in the browser directly, saw the old script, hit 'reload', and saw my changes. How can I clear cached external javascript files? I'll need to know this also when I tell the client that the changes are made, so that they aren't seeing the old cached functionality.

    Read the article

  • JSP includes and MVC pattern

    - by xingyu
    I am new to JSP/Servlets/MVC and am writing a JSP page (using Servlets and MVC pattern) that displays information about recipies, and want the ability for users to "comment" on it too. So for the Servlet, on doGet(), it grabs all the required info into a Model POJO and forwards the request on to a JSP View for rendering. That is working just fine. I'd like the "comment" part to be a separate JSP, so on the RecipeView.jsp I can use to separate these views out. So I've made that, but am now a little stuck. The form in the CommentOnRecipe.jsp posts to a CommentAction servlet that handles the recording of the comment just fine. So when I reload the Recipe page, I can see the comment I just made. I'd like to: Reload the page automatically after commenting (no AJAX for now) Block the user from making more than one comment on each Recipe over a 1 day timeframe (via a Cookie). So I store a cookie indicating the product ID whenever the user makes a comment, so we can check this later? How would it work in a MVC context? Show a message to the user that they have already commented on the Recipe when they visit one which they have commented on I'm confused about using beans/including JSPs etc on how to achieve this. I know in ASP.NET land, it would be a UseControl that I would place on a page, or in ASP.NET MVC, it would be a PartialView of some sort. I'm just confused with the way this works in a JSP/Servlets/MVC context.

    Read the article

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