Search Results

Search found 3190 results on 128 pages for 'isapi rewrite'.

Page 79/128 | < Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >

  • Do most programmers copy and paste code?

    - by John MacIntyre
    I learned very early on that cutting & pasting somebody else's code takes longer in the long run that writing it yourself. In my opinion unless you really understand it, cut & paste code will probably have issues which will be a nightmare to resolve. Don't get me wrong, I mean finding other peoples code and learning from it is essential, but we don't just paste it into our app. We rewrite the concepts into our app. But I'm constantly hearing about people who cut & paste, and they talk about it like it's common practice. I also see comments by others which indicate it's common practice. So, do most programmers cut & paste code?

    Read the article

  • Problem in Addon Domain name binding with existing directory in my webspace

    - by articlestack
    I recently purchased a domain thinkzarahatke.com. At the time of purchasing i selected an option, say url redirect, to my existing site. Further I had entered Naming server detail. But I dint find any other option to change URL rewrite parameters under Domain Name Manager. From the cPanel of my hosting space, I had added new domain as addon and set a sundirectory for it. Now If I am trying to access my new domain directly, it is automatically redirecting to my old website. While if i access some inside directory, like thinkzarahatke.com/blog, then i am able to access to my new site. What wrong i done? Please tell me if i need to do some more settings with addon domain.

    Read the article

  • One method with many behaviours or many methods

    - by Krowar
    This question is quite general and not related to a specific language, but more to coding best practices. Recently, I've been developing a feature for my app that is requested in many cases with slightly different behaviours. This function send emails , but to different receivers, or with different texts according to the parameters. The method signature is something like public static sendMail (t_message message = null , t_user receiver = null , stream attachedPiece = null) And then there are many condition inside the method, like if(attachedPiece != null) { } I've made the choice to do it this way (with a single method) because it prevents me to rewrite the (nearly) same method 10 times, but I'm not sure that it's a good practice. What should I have done? Write 10 sendMail method with different parameters? Are there obvious pros and cons for these different ways of programming? Thanks a lot.

    Read the article

  • Should a programmer take writing lessons to enhance code expressiveness?

    - by Jose Faeti
    Given that programmers are authors and write code to express abstract thoughts and concepts, and good code should be read by other programmers without difficulties and misunderstandings, should a programmer take writing lessons to write better code? Abstracting concepts and real world problems/entities is an important part of writing good code, and a good mastery of the language used for coding should allow the programmer to express his thoughts more easily, or in a better way. Besides, when trying to write or rewrite some code to make it better, much time can be spent in deciding the names for functions, variables or data structures. I think this could also help to avoid writing code with more than one meaning, often cause of misunderstanding between different programmers. Code should always express clearly its function unambiguously.

    Read the article

  • Multiple 301 redirects, do search engines/viewers see them all?

    - by Karim
    I've put in place lots of different 301 rules to deal with numerous url changes. And for certain URLS there are 3-4 different 301 redirects landing the visitors to the new URL. I heard that 301 loses pagerank/linkjuice. ALl the 301 are onsite for the same domain. With a mix of php 301s and htaccess 301s. so for instance articles/news.php?id=2 --- articles/blog.php?id=2 [filename change] articles/* --- /* [subdir to root] /blog.php?id=2 --- /title-of-post [mod rewrite url change] so if you were to visit /articles/news.php?id=2 there will be two 301 redirects until you land on the /yellow-wellington-boots/, my question is does google see the intermediate redirects, or just the final page the 301's redirect to.

    Read the article

  • Zune API Library for Python

    - by kerry
    I am about to start working on a Python project for work. So I thought it was probably time to learn Python! This weekend I took on this task. I decided to rewrite a library I wrote in PHP to access Zune user data. I got it finished and decided to put it on github. Usage is simple: zuneCard = ZuneCard('ZuneTagHere') You can access things like user information, favorites, recent plays, and most played. The properties are documented (pydoc, under /docs). So for the 1 other person that may use this, you’re welcome!

    Read the article

  • 301 redirecting a blog's RSS feed URL?

    - by Marc Charbonneau
    I moved my personal blog from Wordpress to Ghost this weekend, which changes the RSS feed URL from /feed/ to /rss/. By default Ghost returns a 301 redirect for /feed/, which I've verified by checking the response header and looking at the logs: In Feedly though, new posts aren't being picked up (at least after 24 hours. I'm not sure if they might have a waiting period before updating the URL). What's the correct thing to do in this situation? Do I need to keep /feed/ alive instead of returning a 301? If so, is there a rewrite rule that would let me do this in nginx instead of having to modify the Ghost source code?

    Read the article

  • Do most programmers cut & paste code?

    - by John MacIntyre
    I learned very early on that cutting & pasting somebody else's code takes longer in the long run that writing it yourself. In my opinion unless you really understand it, cut & paste code will probably have issues which will be a nightmare to resolve. Don't get me wrong, I mean finding other peoples code and learning from it is essential, but we don't just paste it into our app. We rewrite the concepts into our app. But I'm constantly hearing about people who cut & paste, and they talk about it like it's common practice. I also see comments by others which indicate it's common practice. So, do most programmers cut & paste code?

    Read the article

  • Using my own code in freelance projects.

    - by Witchunter
    I have been into freelance business for more than 2 years. While doing projects for other people, I've build a compilation of common tasks that I implement in projects and put them into code. It's kind of a library with some functions that I can reuse without having to rewrite the same thing dozen times. I'm talking about accessing Access databases, downloading information from FTP and similar stuff. Is this acceptable from a legal point of view? What's the difference in reusing the old code and rewriting it from the scratch (using you own brain again, therefore the exact same logic)? I do not hold any copyright to it, of course, and provide the source code for these classes to my clients.

    Read the article

  • What if we run out of stack space in C# or Python?

    - by dotneteer
    Supposing we are running a recursive algorithm on a very large data set that requires, say, 1 million recursive calls. Normally, one would solve such a large problem by converting recursion to a loop and a stack, but what if we do not want to or cannot rewrite the algorithm? Python has the sys.setrecursionlimit(int) method to set the number of recursions. However, this is only part of the story; the program can still run our of stack space. C# does not have a equivalent method. Fortunately, both C# and Python have option to set the stack space when creating a thread. In C#, there is an overloaded constructor for the Thread class that accepts a parameter for the stack size: Thread t = new Thread(work, stackSize); In Python, we can set the stack size by calling: threading.stack_size(67108864) We can then run our work under a new thread with increased stack size.

    Read the article

  • template for terms of condition for social media based website?

    - by Rubytastic
    Im looking for a template for a terms of usage text based on social media websites. Im actually a coder and not into the legal blabla in general. Ofcourse you could spend a thousand or 2 on a lawyer but just a 3/4 paper text shoulder;t be to hard to compile yourself with some help. Im not sure if this is the right spot to ask this question but I love stack overflow and none of the sites in stack exchange I could find matched better then this one. My first idea lets look at some social media websites and grab some of there text, rewrite it for own specific usage Are there templates on writing such document Same goes with a privacy policy actually.

    Read the article

  • Redirect a URL to another URL with IIS 7.5

    - by Jason White
    I have no idea why this isn't working. I've tried creating map rules and then rewriting and redirecting the URL. I've tried just redirecting it with a simple rewrite rule and no matter what, the only time I can get it to work is if I set the match URL to match this regex .*. I'm trying to redirect webmail.example.com to mail.example.com. Seemed like it would have taken but a couple seconds; boy was I wrong. I'm thinking I must be doing something wrong with the regex, but I'm not sure what as when I test it it seems to work fine. <rule name="webmail" patternSyntax="ECMAScript" stopProcessing="true"> <match url=".*webmail.*" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> </conditions> <action type="Redirect" url="https://mail.example.com:8000" appendQueryString="false" logRewrittenUrl="true" /> </rule>

    Read the article

  • DX11 - Weird shader behavior with and without branching

    - by Martin Perry
    I have found problem in my shader code, which I dont´t know how to solve. I want to rewrite this code without "ifs" tmp = evaluate and result is 0 or 1 (nothing else) if (tmp == 1) val = X1; if (tmp == 0) val = X2; I rewite it this way, but this piece of code doesn ´t word correctly tmp = evaluate and result is 0 or 1 (nothing else) val = tmp * X1 val = !tmp * X2 However if I change it to: tmp = evaluate and result is 0 or 1 (nothing else) val = tmp * X1 if (!tmp) val = !tmp * X2 It works fine... but it is useless because of "if", which need to be eliminated I honestly don´t understand it Posted Image . I tried compilation with NO and FULL optimalization, result is same

    Read the article

  • After how much line of code a function should be break down?

    - by Sumeet
    While working on existing code base, I usually come across procedures that contain Abusive use of IF and Switch statements. The procedures consist of overwhelming code, which I think require re-factoring badly. The situation gets worse when I identify that some of these are recursive as well. But this is always a matter of debate as the code is working fine and no one wants to wake up the dragon. But, everyone accepts it is very expensive code to manage. I am wondering if are any recommendations to determine if a particular Method is a culprit and needs a revisit/rewrite , so that it can broken down or polymophized in an effective manner. Are there any Metrics (like no. of lines in procedure) that can be used to identify such segment of code. The checklist or advice to convince everyone, will be great!

    Read the article

  • Reverse proxying only a specific URL

    - by Bart Silverstrim
    I have a web server at www.ourcompany.com running Apache2. Using the proxy modules, I am able to (for example) get 172.16.0.5, an internal IP device, to be accessed on www.ourcompany.com/device. The trouble is that anyone can play with or explore the device using strings sent to www.ourcompany.com/device/change/settings/here.html. I'd like the reverse proxy to only work for a specific URL; www.ourcompany.com/device/you/must/use/this while anything else will be rejected if requested. Is there a setting that can be used to do this, or is it a simple rewrite condition placed in the virtualhost for the site under sites-enabled? What is the simplest, most maintainable way to sanitize requests to the internal device through the reverse proxy? Running Apache2 on Ubuntu.

    Read the article

  • Bad Bot blocking Revisited

    - by Tom
    I've read a lot about bad bot blocking, php scripts, .htaccess techniques, etc... Is this a valid method? Since .htacces can rewrite and send a bad bot a 403 deny or forward to something like spam poison, is it possible to Disallow a folder, then through .htaccess in that specific folder redirect to spampoison? Since Apache reads each .htaccess independently and follows specific instructions, then a bad bot not following robots.txt would just be redirected. Or anyone trying to access, /badbot/ or whatever I choose to call my trap folder. Thanks Tom

    Read the article

  • adding regular expression in php not work

    - by John Smiith
    Code i added ([a-zA-Z0-9\_\-]+) but not work i wan't to include all css files is there is any other way to add?? My code file css.php header("Content-type: text/css"); $css = array( '([a-zA-Z0-9\\_\\-]+).css', ); foreach ($css as $css_file) { $css_get = file_get_contents($css_file); echo $css_get; } call.php <link href="css.php" rel="stylesheet" type="text/css" /> i wan't to rewrite css.php to css.css so public can see css.css instead of css.php. how can i do that using php script?

    Read the article

  • Developing OpenGLES2 apps for Ubuntu Software Center

    - by Bram
    I have a game for iOS and Android that I now want to port to Ubuntu. I plan to distribute it with Ubuntu Software Center. Preferrably for free with an in-app-purchase. My codebase is currently based on OpenGL ES2 and written in C++. I could rewrite to OpenGL, but having progammable shaders is a must. Fixed pipeline OpenGL will not suffice. Is there a feature in place that lets you specify OpenGL requirements in the Ubuntu Software Center? I want to make sure that only Ubuntu users with compatible hardware will be able to download my game. Any APIs I could use for getting a suitable OpenGL context, or am I expected to just use glx for this? Or is the use of GTK mandatory?

    Read the article

  • Redirect pages to fix crawl errors

    - by sarah
    Google is giving me a crawl error for pages that I have removed like www.mysite.com/mypage.html. I want to redirect this pages to the new page www.mysite.com/mysite/mypage. I tried to do that by using .htaccess but instead of fixing the problem, the crawl pages increased and a new crawl came www.mysite.com/www.mysite.com. This is my .htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /sitename/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /sitename/index.php [L] </IfModule> # END WordPress Should I add this after the rewrite rule or I should do something else? RewriteRule ^pagename\.html$ http://www.sitename.com/pagename [R=301]

    Read the article

  • SH404SEF URLs in Joomla 1.5

    - by Tao Bellamine
    I have two modules to play with urls, the global configuration module and the sh404sef module. The global config is set to "Sef urls: YES" and "mod rewrite enabled: YES" and the sh404sef is set "url optimization: NO". My problem is, even with "Sef urls" set in the global config, my urls still don't seem to be that "user friendly" so I turn on the "Url optimization" using the sh404sef module, and I get better descriptive urls. However, the problem I inherit from doing this is that my dynamically populated chronoforms get messed up (only the chrono forms, other forms are fine); These forms are now showing up at the homepage instead of their own reserved page. Here's an example: Old form "GOOD" url: http://www.mycraftwork.com/index.php?option=com_content&view=article&id=94 New optimized "BAD" URL: http://www.mycraftwork.com/handthrown-pottery/alladin-teapot/index.php?option=com_content&view=article&id=94 Any help would be GREATLY appreciated! I can even turn the sh404sef on and off if some people are interested in seeing the issue LIVE. Thanks!! Tao Bellamine

    Read the article

  • Guide to particulars in customizing Ubuntu Installer

    - by Oxwivi
    I've tried reading through guides for preseeding and customization, but I did not understand how and where to modify which options. I can only comfortably learn through practical examples, for which I ask this question. I am looking into preseeding and customizing solution to just do a few specific tasks: Completely rewrite the packages installed by default, much like minimal installs and with the --no-install-recommends flag of apt-get. Add a few proprietary applications to the default install list Automatically install and mount proprietary drivers on install and live session Edit the default configuration files for applications installed by default Specify partitions along with permission Modify the package pool in the installer media (CD/DVD/USB), preferably using command line tools similar to apt-get and aptitude. Can anyone please tell me how to configure preseed option to only do the above? NB I do not understand the GPG part after adding/removing packages in the pool. PS The third point is of particular importance.

    Read the article

  • Should extension scripts be run in a sandbox?

    - by Cubic
    In particular, this is about game extensions written in lua (luajit-2.0). I was contemplating whether I should restrict what these scripts can do, and arrived at the conclusion that I probably shouldn't: It's hard to get right. Sounds silly, but chances are my sandbox is gonna end up leaky anyways. The only benefit I could think of would be giving users some sense of security when running third party scripts. The disadvantages would be that it's just incredibly annoying for extension writers. That is, for now, myself (game content will be mostly scripted). The reason I'm asking this now before I actually have anything presentable is that adding a sandbox early on is easy, but would impose said annoying restrictions on myself too. However if I first go on with it and then later decide I do need a sandbox after all, I'm gonna run into problems (I'd either have to rewrite the scripts that are already there, or introduce some form of trust management system which seems to be more trouble than it's worth).

    Read the article

  • Preventing Duplicates on Google

    - by abel
    I am currently using a rewrite rule to enable access to .php pages, without using the php extension. However to prevent old links from breaking, the pages can still be accessed via links containing the .php extension too. For eg. domain.com/page.php can now be accessed at domain.com/page All the links on the website now use domain.com/page type links within the site. However older incoming links will still link to the .php pages, meaning Google will index both pages and mark them as duplicate. I have two plans to remedy the situation. Use a php 301 redirect: When a page is accessed with the .php extension, I can redirect each page individually using a 301 redirect using php Using Canonical: Place a canonical tag on each page, pointing to the ".php" less version My Question: Are both methods equally efficacious in preventing Google from indexing my ".php" pages? Which method should be preferred, by convention or otherwise?

    Read the article

  • Is there a point to writing in C or C++ instead of C# without knowing specifically what would make a program faster?

    - by user828584
    I wrote a small library in Python for handling the xbox 360's STFS files to be used on my web applications. I would like to rewrite it for use in the many desktop programs people are writing for 360 game modding, but I'm not quite if I should continue using C# or delve into C++ or even C. STFS is an in-file file system used by the xbox 360 and the job of the library would be extracting/injecting files, which could take noticeable amounts of time to do. What I know in C# comes from internet tutorials and resources, as would anything I learn about C++, so what I'm asking is if it's better to bring myself to a slightly lower-level language without knowing beforehand the features of the language that increase performance, or continue assuming that compiler optimizations and that my lack of experience will mean that the language I choose won't matter.

    Read the article

  • Can Win32 message loops survive being ported to native linux?

    - by Chris Cochran
    I would like to port a large Win32 DLL to native linux in C++. I don't think I can use Wine for a DLL like mine, because users of the DLL would then also have to be in Wine, and then they would all whine... As a Windows C++ programmer, I don't (yet) have any familiarity with the GUI front-end services in linux, but if it logically runs on anything like win32 message loops, fonts, bitmaps, invalidation regions, getmessage( ) calls and so forth, it should be a fairly straight forward remapping of my existing code. So what am I looking at here, a remap or a rewrite? The path for such things must be well worn by now.

    Read the article

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