Search Results

Search found 4669 results on 187 pages for 'stackoverflow'.

Page 11/187 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Apache .htaccess

    - by Peter
    Hi! I have a htaccess problem. My directory structure look like this: / HEADER.html README.html /stackoverflow/ /stackoverflow/.htaccess .htaccess ServerSignature Off Options +Indexes HeaderName /HEADER.html IndexIgnore HEADER.html ReadmeName /README.html IndexIgnore /README.html IndexOptions +FancyIndexing AddCharset UTF-8 .txt IndexIgnore *.xml IndexIgnore *.php My primary directory is /stackoverflow/, when I navigate to this directory via browser I have included HEADER.html and README.html on every site/directories under /stackoverflow/, this works fine. I added some php code to my HEADER.html (which is in the root directory / ), I am trying to add to htaccess: AddType application/x-httpd-php .html .php .htm This not working, I think because the HEADER.html is in the root. If I try add the AddType... to the /.htaccess (and not to the /stackoverflow/.htaccess) it is overwriting my /stackoverflow/.htaccess rules. Why? How I can add AddType rule to my /stackoverflow/.htaccess to Apache parse html file as php file?

    Read the article

  • How can I set up JQuery autocomplete like Stackoverflow's tags input field?

    - by d03boy
    I'm using PHP and I've never really done anything with Javascript or JQuery or AJAX. I'm just wondering if there are any available solutions to accomplish the same effect of auto-completion that SO uses for entering tags. There are plugins which can handle one word but I haven't seen any that handles multiple words. Also, I hear JQuery is hosted on google code. Is it a good or bad idea to link directly from that?

    Read the article

  • How to style a code block to make all the colours look pretty like my IDE and here in stackoverflow?

    - by BritishDeveloper
    When putting code samples in my blog I would like the code to have all the appropriate colours. How can I do that? Basically if I write: foreach (ListItem item in items) { item.Text = "something"; } I want it to appear in the correct colours like it does in my Visual Studio or here at stack*overflow*. I'm bored of styling the colours of each key word manually. Is there a pre-existing javascript library I can use?

    Read the article

  • Trying to reinvent the wheel of StackOverflow to have a good learning experience. Need some suggesti

    - by Legend
    I want to learn and am not able to do it unless I have a real "mission" to complete. SO is my favorite and I can't imagine a better experience than actually recreating it but not in ASP. I'd like to use PHP+MySQL+jQuery. So far, I have been a self-taught programmer but I would like to master one paradigm that forces you to adhere to the standards. For instance, recently, jQuery forced me to use some "rules". The plugins were supposed to be written in a particular way and that's it. When I started off, everything seemed like Greek and Latin but when I finished a very small plugin, I felt really happy because it forced me to program in a certain way. I am looking for something like this only in a larger project. I've heard a lot about MVC and all but I am confused about the various frameworks out there. Zend seems awesome but looks heavy at the same time and also requires you to have a lot more control over the web-server whereas CakePHP is a good and a fast framework that needs only little control. Do I use one of these or just write my own MVC? I have the following goals: Goals: Site should be fast - I know this depends on my coding skills but I will learn on my way. The framework itself should not slow me down) Setting up the site should not require you to use command-line - This requirement is ok during development. But some frameworks like Symphony require you to initialize certain things through command-line Should support pluggable modules - For instance, if I want to be able to use the FCK editor, I should be able to organize things in a good way. Should be possible to extend - For instance, SO is mainly a Q&A site but I should be able to logically extend it into an Idea Management System (optional but I'm curious). This goes more into code re-usability I guess. I am comfortable with MySQL so I should be done with database design etc. with some serious effort. As for PHP, I can write code on my own but haven't really used any frameworks that much. jQuery, I started off recently and love it. I would be glad if someone can guide me during these initial steps. Precisely, when designing something like SO, I have the following questions: Do I use a framework? If yes, should it be MVC? If MVC, which one is a good and a scalable one? (I'd love something like jQuery that will not die anytime soon) How do I balance the functionality? The same logic can sometimes be made server centric or client centric. (more Ajax?). Is it a good idea to make a heavy javascript site considering the recent advances on client-side JS processing? Just in case anyone is wondering, I am not interested in commercializing any of this. I need a reason to learn something :)

    Read the article

  • How to detect Links with out anchor element in a plain text

    - by dhee
    If user enters his text in the text box and saves it and again what's to add some more text he can edit that text and save it if required. Firstly if user enters that text with some links I, detected them and converted any hyperlinks to linkify in new tab. Secondly if user wants to add some more text and links he clicks on edit and add them and save it at this time I must ignore the links that already hyperlinked with anchor button Please help and advice For example: what = "<span>In the task system, is there a way to automatically have any site / page URL or image URL be hyperlinked in a new window?</span><br><br><span>So If I type or copy http://www.stackoverflow.com/&nbsp; for example anywhere in the description, in any of the internal messages or messages to clients, it automatically is a hyperlink in a new window.</span><br><a href="http://www.stackoverflow.com/">http://www.stackoverflow.com/</a><br> <br><span>Or if I input an image URL anywhere in support description, internal messages or messages to cleints, it automatically is a hyperlink in a new window:</span><br> <span>https://static.doubleclick.net/viewad/4327673/1-728x90.jpg</span><br><br><a href="https://static.doubleclick.net/viewad/4327673/1-728x90.jpg">https://static.doubleclick.net/viewad/4327673/1-728x90.jpg</a><br><br><br><span>This would save us a lot time in task building, reviewing and creating messages.</span> Test URL's http://www.stackoverflow.com/ http://stackoverflow.com/ https://stackoverflow.com/ www.stackoverflow.com //stackoverflow.com/ <a href='http://stackoverflow.com/'>http://stackoverflow.com/</a>"; I've tried this code function Linkify(what) { str = what; out = ""; url = ""; i = 0; do { url = str.match(/((https?:\/\/)?([a-z\-]+\.)*[\-\w]+(\.[a-z]{2,4})+(\/[\w\_\-\?\=\&\.]*)*(?![a-z]))/i); if(url!=null) { // get href value href = url[0]; if(href.substr(0,7)!="http://") href = "http://"+href; // where the match occured where = str.indexOf(url[0]); // add it to the output out += str.substr(0,where); // link it out += '<a href="'+href+'" target="_blank">'+url[0]+'</a>'; // prepare str for next round str = str.substr((where+url[0].length)); } else { out += str; str = ""; } } while(str.length>0); return out; } Please help Thanks.

    Read the article

  • How to stop my firefox extension which interferes other extension?

    - by ccppjava
    Hi, I have tried very hard to make my extension as simple as possible, it now do not contain any skin/css, it just have 'statusbar' in one single 'overlay'. The issue is that when installed, it hides the top three icon of 'all-in-one toolbar' extension of my firefox 3.6.3. On other two machine which do not have 'all-in-one toolbar', it hide all the icons of the web-development toolbar! chrome.manifest content stackoverflow content/ content stackoverflow content/ contentaccessible=yes overlay chrome://browser/content/browser.xul chrome://stackoverflow/content/browser.xul locale stackoverflow en-US locale/en-US/ browser.xul <overlay id="dch-browser-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/x-javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"/> <script src="stackoverflow.js" /> <statusbar id="status-bar"> <statusbarpanel id="stackoverflow-status-bar-icon" class="statusbarpanel-iconic" src="chrome://stackoverflow/content/icon_small.png" tooltiptext="&runstackoverflow;" onclick="stackoverflow.run()" /> </statusbar> </overlay> I have tried very hard to simplify the extension to find the reason, but failed, any suggestion/ideas would be welcome. thx.

    Read the article

  • jquery click on anchor element forces scroll to top?

    - by Dan.StackOverflow
    http://stackoverflow.com/questions/720970/jquery-hyperlinks-href-value[link text][1] I am running in to a problem using jquery and a click event attached to an anchor element. [1]: http://stackoverflow.com/questions/720970/jquery-hyperlinks-href-value "This" SO question seems to be a duplicate, and the accepted answer doesn't seem to solve the problem. Sorry if this is bad SO etiquette. In my .ready() function I have: jQuery("#id_of_anchor").click(function(event) { //start function when any update link is clicked Function_that_does_ajax(); }); and my anchor looks like this: <a href="#" id="id_of_anchor"> link text </a> but when the link is clicked, the ajax function is performed as desired, but the browser scrolls to the top of the page. not good. I've tried adding: event.preventDefault(); before calling my function that does the ajax, but that doesn't help. What am I missing? Clarification I've used every combination of return false; event.preventDefault(); event.stopPropagation(); before and after my call to my js ajax function. It still scrolls to the top.

    Read the article

  • .htaccess with public folder

    - by ninumedia
    I have a directory structure with the following on localhost: http://localhost/testing/ A directory structure exists inside of testing as follows: /testing/public /testing/public/index.php /testing/public/img /testing/public/css ..etc for the js and swf directories A .htaccess file is inside the testing folder and the contents are as follows: Options +FollowSymLinks RewriteEngine on RewriteBase /testing/ RewriteRule ^public$ public/ [R,QSA] RewriteRule ^public/$ public/index.php?state=public [L,QSA] RewriteRule ^stackoverflow$ stackoverflow/ [R,QSA] RewriteRule ^stackoverflow/$ public/index.php?state=stackoverflow[L,QSA] I am using PHP and inside of the /testing/public/index.php file I wanted to test that the $_GET['state'] is indeed saving the variable. When I try to test out: http://localhost/testing/public $_GET['state'] is not found at all BUT http://localhost/testing/stackoverflow does indeed echo out that $_GET['state'] equals 'stackoverflow'. What am I missing here??? Why is it that I cannot get the state=public in the first link? Thanks for the help!

    Read the article

  • Whats the difference between \z and \Z in a regular expression and when and how do I use it?

    - by Mister M. Bean
    From http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html: \Z The end of the input but for the final terminator, if any \z The end of the input But what does it mean in practice? Can you give me an example when I use either the \Z or \z. In my test I thought that "StackOverflow\n".matches("StackOverflow\\z") will return true and "StackOverflow\n".matches("StackOverflow\\Z") returns false. But actually both return false. Where is the mistake?

    Read the article

  • html hyperlinks show URL in brackets in Entourage

    - by Rafe
    I have an email script written in .Net that sends html emails. The email uses normal html hyperlinks to insert a link in the email, like this: <a href="http://www.stackoverflow.com/">StackOverflow</a> The problem is that in Entourage, a hyperlink like this always shows up for me like this: StackOverflow < http://www.stackoverflow.com/ > How can I format the hyperlink in my email so that in Entourage the text "StackOverflow" is the actual hyperlink, and the URL is not displayed after the text? Is there an html meta tag that needs to be set? Do I have to set the content-type somewhere? Or is there a different html syntax on the hyperlink itself that I should use?

    Read the article

  • Better way to read last portion of URL

    - by enloz
    This script should detect the last portion in the full path, and if it is stackoverflow output ok $current_url = $_SERVER['REQUEST_URI']; $current_url_arr = explode('/',$current_url); $count = count($current_url_arr); if($current_url_arr[$count-2] == 'stackoverflow'){ echo 'ok'; } else { echo 'not ok'; } Example 1: www.myserver.ext/something/else/stackoverflow/ Output: ok Example 2: www.myserver.ext/something/else/stackoverflow Output: not ok Example 3: www.myserver.ext/something/else/stackoverflow/foo Output: not ok I hope that you understand the idea. This script works fine, but I'm wondering if there is any better, elegant way to read last portion of URL?

    Read the article

  • Do NOT Change "Copy Local” project references to false, unless understand subsequences.

    - by Michael Freidgeim
    To optimize performance of visual studio build I've found multiple recommendations to change CopyLocal property for dependent dlls to false,e.g. From http://stackoverflow.com/questions/690033/best-practices-for-large-solutions-in-visual-studio-2008 CopyLocal? For sure turn this offhttp://stackoverflow.com/questions/280751/what-is-the-best-practice-for-copy-local-and-with-project-referencesAlways set the Copy Local property to false and enforce this via a custom msbuild stephttp://codebetter.com/patricksmacchia/2007/06/20/benefit-from-the-c-and-vb-net-compilers-perf/BenefitBenefitMy advice is to always set ‘Copy Local’ to falseSome time ago we've tried to change the setting to false, and found that it causes problem for deployment of top-level projects.Recently I've followed the suggestion and changed the settings for middle-level projects. It didn't cause immediate issues, but I was warned by Readify Consultant Colin Savage about possible errors during deploymentsI haven't undone the changes immediately and we found a few issues during testing.There are many scenarios, when you need to have Copy Local’ left to True.The concerns are highlighted in some stack overflow answers, but they have small number of votes.Top-level projects:  set copy local = true.First of all, it doesn't work correctly for top-level projects, i.e. executables or web sites.As pointed in the answer http://stackoverflow.com/a/6529461/52277for all the references in the one at the top set copy local = true.Alternatively you have to change output directory as it's described in http://www.simple-talk.com/dotnet/.net-framework/partitioning-your-code-base-through-.net-assemblies-and-visual-studio-projects/If you set ‘ Copy Local = false’, VS will, unless you tell it otherwise, place each assembly alone in its own .\bin\Debugdirectory. Because of this, you will need to configure VS to place assemblies together in the same directory. To do so, for each VS project, go to VS > Project Properties > Build tab > Output path, and set the Ouput path to ..\bin\Debugfor debug configuration, and ..\bin\Release for release configuration.Second-level  dependencies:  set copy local = true.Another example when copylocal =false fails on run-time, is when top level assembly doesn't directly referenced one of indirect dependencies.E..g. Top-level assembly A has reference to assembly B with copylocal =true, but assembly B has reference to assembly C with copylocal =false. Most likely assembly C will be missing on runtime and will cause errors E.g. http://stackoverflow.com/questions/602765/when-should-copy-local-be-set-to-true-and-when-should-it-not?lq=1Copy local is important for deployment scenarios and tools. As a general rule you should use CopyLocal=True and http://stackoverflow.com/questions/602765/when-should-copy-local-be-set-to-true-and-when-should-it-not?lq=1 Unfortunately there are some quirks and CopyLocal won't necessary work as expected for assembly references in secondary assemblies structured as shown below.MainApp.exe MyLibrary.dll ThirdPartyLibrary.dll (if in the GAC CopyLocal won't copy to MainApp bin folder)This makes xcopy deployments difficult . .Reflection called DLLs  dependencies:  set copy local = true.E.g user can see error "ISystem.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."The fix for the issue is recommended in http://stackoverflow.com/a/6200173/52277"I solved this issue by setting the Copy Local attribute of my project's references to true."In general, the problems with investigation of deployment issues may overweight the benefits of reduced build time. Setting the Copy Local to false without considering deployment issues is not a good idea.

    Read the article

  • MySQL Full-Text Search Across Multiple Tables - Quick/Long Solution?

    - by Kerry
    Hello all, I have been doing a bit of research on full-text searches as we realized a series of LIKE statements are terrible. My first find was MySQL full-text searches. I tried to implement this and it worked on one table, failed when I was trying to join multiple tables, and so I consulted stackoverflow's articles (look at the end for a list of the ones I've been to) I didn't see anything that clearly answered my questions. I'm trying to get this done literally in an hour or two (quick solution) but I also want to do a better long term solution. Here is my query: SELECT a.`product_id`, a.`name`, a.`slug`, a.`description`, b.`list_price`, b.`price`, c.`image`, c.`swatch`, e.`name` AS industry FROM `products` AS a LEFT JOIN `website_products` AS b ON (a.`product_id` = b.`product_id`) LEFT JOIN ( SELECT `product_id`, `image`, `swatch` FROM `product_images` WHERE `sequence` = 0) AS c ON (a.`product_id` = c.`product_id`) LEFT JOIN `brands` AS d ON (a.`brand_id` = d.`brand_id`) INNER JOIN `industries` AS e ON (a.`industry_id` = e.`industry_id`) WHERE b.`website_id` = 96 AND b.`status` = 1 AND b.`active` = 1 AND MATCH( a.`name`, a.`sku`, a.`description`, d.`name` ) AGAINST ( 'ashley sofa' ) GROUP BY a.`product_id` ORDER BY b.`sequence` LIMIT 0, 9 The error I get is: Incorrect arguments to MATCH If I remove d.name from the MATCH statement it works. I have a full-text index on that column. I saw one of the articles say to use an OR MATCH for this table, but won't that lose the effectiveness of being able to rank them together or match them properly? Other places said to use UNIONs but I don't know how to do that properly. Any advice would be greatly appreciated. In the idea of a long term solution it seems that either Sphinx or Lucene is best. Now by no means and I a MySQL guru, and I heard that Lucene is a bit more complicated to setup, any recommendations or directions would be great. Articles: http://stackoverflow.com/questions/1117005/mysql-full-text-search-across-multiple-tables http://stackoverflow.com/questions/668371/mysql-fulltext-search-across-1-table http://stackoverflow.com/questions/2378366/mysql-how-to-make-multiple-table-fulltext-search http://stackoverflow.com/questions/737275/pros-cons-of-full-text-search-engine-lucene-sphinx-postgresql-full-text-searc http://stackoverflow.com/questions/1059253/searching-across-multiple-tables-best-practices

    Read the article

  • Delete record in Linq to Sql

    - by Anders Svensson
    I have Linq2Sql classes User, Page, and UserPage (from a junction table), i.e. a many-to-many relationship. I'm using a gridview to show all Users, with a dropdownlist in each row to show the Pages visited by each user. Now I want to be able to delete records through the gridview, so I have added a delete button in the gridview by setting "Enable deleting" on it. Then I tried to use the RowDeleting event to specify how to delete the records since it doesn't work by default. And because its a relationship I know I need to delete the related records in the junction table before deleting the user record itself, so I added this in the RowDeleting event: protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e) { int id = (int)((DataKey)GridView2.DataKeys[e.RowIndex]).Value; UserPageDBDataContext context = new UserPageDBDataContext(); var userPages = from userPage in context.UserPages where userPage.User.UserID == id select userPage; foreach (var userPage in userPages) context.UserPages.DeleteOnSubmit(userPage); context.SubmitChanges(); var user = context.Users.Single(u => u.UserID == id); context.Users.DeleteOnSubmit(user); context.SubmitChanges(); } This actually seems to delete records, because the record with the id in question does indeed disappear, but strangely, a new record seems to be added at the end...! So, say I have 3 records in the gridview: 1 Jack stackoverflow.com 2 Betty stackoverflow.com/questions 3 Joe stackoverflow.com/whatever Now, if I try to delete user 1 (Jack), record number 1 will indeed disappear in the gridview, but the same record will appear at the end with a new id: 2 Jack stackoverflow.com 3 Betty stackoverflow.com/questions 4 Joe stackoverflow.com/whatever I have tried searching on how to delete records using Linq, and I believe I'm doing exacly as the examples I have read (e.g. the second example here: http://msdn.microsoft.com/en-us/library/Bb386925%28v=VS.100%29.aspx). I have read that you can also set cascade delete on the relationship in the database, but I wanted to do it this way in code, as your supposed to be able to. So what am I doing wrong?

    Read the article

  • gcc, strict-aliasing, and horror stories

    - by Joseph Quinsey
    In http://stackoverflow.com/questions/2906365/gcc-strict-aliasing-and-casting-through-a-union I asked whether anyone had encountered problems with union punning through pointers. So far, the answer seems to be No. This question is broader: do you have any horror stories about gcc and strict-aliasing? Background: Quoting from AndreyT's answer in http://stackoverflow.com/questions/2771023/c99-strict-aliasing-rules-in-c-gcc/2771041#2771041: "Strict aliasing rules are rooted in parts of the standard that were present in C and C++ since the beginning of [standardized] times. The clause that prohibits accessing object of one type through a lvalue of another type is present in C89/90 (6.3) as well as in C++98 (3.10/15). ... It is just that not all compilers wanted (or dared) to enforce it or rely on it." Well, gcc is now daring to do so, with its -fstrict-aliasing switch. And this has caused some problems. See, for example, the excellent article http://davmac.wordpress.com/2009/10/ about a Mysql bug, and the equally excellent discussion in http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html. Some other less-relevant links: http://stackoverflow.com/questions/1225741/performance-impact-of-fno-strict-aliasing http://stackoverflow.com/questions/754929/strict-aliasing http://stackoverflow.com/questions/262379/when-is-char-safe-for-strict-pointer-aliasing http://stackoverflow.com/questions/725138/how-to-detect-strict-aliasing-at-compile-time So to repeat, do you have a horror story of your own? Problems not indicated by -Wstrict-aliasing would, of course, be preferred. And other C compilers are also welcome.

    Read the article

  • Setting iphone to vibrate and setting iphone back to sound via app.

    - by Cadu
    Folks, I need your knowledge here. Think about the following sittuation - my app need to set my iphone to vibrate mode on a certain time and get it back to playing sounds mode (for call receiving, sms, email, all common sound notifications) some minutes later. I've already googled that, and didn't find a good, apple accetable way of doing that: http://stackoverflow.com/questions/736047/possible-to-programmatically-open-settings-app-from-iphone http://stackoverflow.com/questions/702319/is-it-possible-to-dynamically-alter-an-iphone-apps-settings-page-in-the-settings http://stackoverflow.com/questions/1141391/display-iphone-application-settings-within-your-application http://stackoverflow.com/questions/335965/how-do-i-launch-my-settings-bundle-from-my-application [This one here is interesting, as fas I as find a way to know what is the key for the settings I'm interested in] http://stackoverflow.com/questions/335965/how-do-i-launch-my-settings-bundle-from-my-application [It mentions I can do that, but does not give an idea of how =(] http://stackoverflow.com/questions/702319/is-it-possible-to-dynamically-alter-an-iphone-apps-settings-page-in-the-settings [If this is true, I wouldn't be able to do what I want...] Does anyone there has an idea of how do I do that via app? Many thanks in advance.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >