Search Results

Search found 6433 results on 258 pages for 'trouble shooting'.

Page 157/258 | < Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >

  • .htaccess Problem

    - by ocergynohtna
    I'm having trouble with redirecting urls using the .htaccess file. This is how my htaccess file looks like: Redirect 301 /file-name/example.php http://www.mysite.com/file-name/example-001.php Redirect 301 /section-name/example.php http://www.my-site.com/section-name/example-002.php RewriteEngine on RewriteCond %{HTTP_HOST} !^www.mysite.com$ [NC] RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+)/(.*)$ hqtemplates/articles.php?file_name=$2 [L] php_value session.use_only_cookies 1 php_value session.use_trans_sid 0 Now the problem is that when I go to page: www.my-site.com/file-name/example.php instead of redirecting me to www.my-site.com/file-name/example-001.php it redirects me to www.my-site.com/file-name/example.php?file_name=example-001.php. For some reason it adds "?file_name=example-001.php" to the url. Anyone know's why this is happening and how to fix this?

    Read the article

  • How can I use Awk inside a Perl script?

    - by papoyan
    I'm having trouble using the following code inside my Perl script, any advise is really appreciated, how to correct the syntax? # If I execute in bash, it's working just fine bash$ whois google.com | egrep "\w+([._-]\w)*@\w+([._-]\w)*\.\w{2,4}" |awk ' {for (i=1;i<=NF;i++) {if ( $i ~ /[[:alpha:]]@[[:alpha:]]/ ) { print $i}}}'|head -n1 [email protected] #----------------------------------- #but this doesn't work bash$ ./email.pl google.com awk: {for (i=1;i<=NF;i++) {if ( ~ /[[:alpha:]]@[[:alpha:]]/ ) { print }}} awk: ^ syntax error # Here is my script bash$ cat email.pl ####\#!/usr/bin/perl $input = lc shift @ARGV; $host = $input; my $email = `whois $host | egrep "\w+([._-]\w)*@\w+([._-]\w)*\.\w{2,4}" |awk ' {for (i=1;i<=NF;i++) {if ( $i ~ /[[:alpha:]]@[[:alpha:]]/ ) { print $i}}}'|head -1`; print my $email; bash$

    Read the article

  • Detect if an instance is running with kernel32::CreateMutexA

    - by moz
    Hello. I'm working on an NSIS installer, and trying to check if a certain application is running before uninstalling. So, I use kernel32::CreateMutexA call. Here is the chunk: System::Call 'kernel32::CreateMutexA(i 0, i 0, t "cmd.exe") i .r1 ?e' Pop $R0 StrCmp $R0 0 +3 MessageBox MB_USERICON "The application is already running." Abort I put it into un.onInit. Trouble is, the process (cmd.exe here) is never detected. Did I miss something? Tx.

    Read the article

  • Getting age in years in a SQL query

    - by Earlz
    Hello I've been tasked with doing a few queries on a large SQL Server 2000 database. The query I'm having trouble with is "find the number of people between ages 20 and 40" How would I do this? My previous query to get a count of everyone looks like this: select count(rid) from people where ... (with the ... being irrelevant conditions). I've googled some but the only thing I've found for calculating age is so large that I don't see how to embed it into a query, or it is a stored procedure which I do not have the permissions to create. Can someone help me with this?

    Read the article

  • Oauth2 External Browser Request - App Launches, Credentials received, Browser Not Updated

    - by Michael Drozdowski
    I'm using an external browser request to authenticate myself with the SoundCloudAPI in OSX. My app launches, and has a button that opens an external browser window to authenticate against SoundCloud. When I click "connect" in the new window, I get a "External Protocol Request" that is consistent with my custom launch URI scheme. Clicking this loads the app, and it gets the correct credentials. The trouble is, the browser window never changes - it simply says that it's connecting forever. There is no "connection confirmed" alert coming from SoundCloud. I know I'm logged in because I can make the correct calls to the API to get things such as my username. Why isn't the browser confirming the connection or dismissing? The same thing happens if I load the authentication in an internal WebView in the app.

    Read the article

  • Correct folder structure for sites

    - by Francesca
    I've just started tidying up the server for a particular site and am running into some trouble when moving files. I originally had style.css in my main folder, and another folder called images, so paths in the .css went images/myimage.png Now I have moved style.css into another folder called css. So the image links in the CSS no longer work, as it's looking for the folder images from it's own CSS folder. I changed the file path to /images/myimage.png as I thought this would make it climb up a level and then look for the images folder, but this doesn't seem to work. I'm interested to see what solutions people have and also any suggestions on how people organise their folders for a particular site. Thanks!

    Read the article

  • MySQL count/sum fields

    - by Conor H
    Hi There, What I am trying to achieve is a report on daily financial transactions. With my SQL query I would like to count the total number of cash transactions, the total cash value and the same for checks. I only want to do this for a specified date. Here is a snippet of the query that I am having trouble with. These sum and count commands are processing all the data in the table and not for the selected date. (SELECT SUM(amount) FROM TRANSACTION WHERE payment_type.name = 'cash') AS total_cash, (SELECT COUNT(*) FROM TRANSACTION WHERE payment_type.name = 'cash') AS total_cash_transactions Sorry if I havent posted enough detail as I haven't time. If you need more info just ask.. Cheers.

    Read the article

  • Multiple System.Web.Extensions assembly in same project?

    - by CL4NCY
    Hi, I'm having trouble moving a website from one server to another. It seems to be a problem loading multiple versions of System.Web.Extensions. The code uses version 3.5 in most places but a third party control appears to be needing version 1.0.6. I didn't think this was possible but it appears to be working in it's current situation. Is there a way I can use the GAC version of System.Web.Extensions for the site but import a dll of version 1.0.6 just for these controls?

    Read the article

  • How to get "printer ready bytes" from a source in c#?

    - by luis_villase
    Hey everyone! I'm in a bit of trouble here, hoping you can help a fellow programmer out. I have an application that receives a pointer to raw bytes (plus length and stuff) and sends said raw data to a printer. This is important, I have no choice but to use this method to get any printing done. If I send a raw string, it will print with no problem. However, I need to be able to print formatted text, images, etc. So the thing is... I would like to be able to get printer ready bytes from a given source (maybe a pdf, or html, does not matter as long as it contains formatted text and/or images). It would be like "splitting" the print command like so: a) Open file and read data b) Load printer data into memory c) Send bytes to printer Obviously, I've got a) and c) covered, it's b) the one that's breaking my head. Any thoughts? Thanks in advance for your help.

    Read the article

  • How do you extend python with C++?

    - by superjoe30
    I've successfully extended python with C, thanks to this handy skeleton module. But I can't find one for C++, and I have circular dependency trouble when trying to fix the errors that C++ gives when I compile this skeleton module. How do you extend Python with C++? I'd rather not depend on Boost (or SWIP or other libraries) if I don't have to. Dependencies are a pain in the butt. Best case scenario, I find a skeleton file that already compiles with C++.

    Read the article

  • IE8 Slide Toggle Issue

    - by jef2904
    Im having some trouble with jQuery's slideToggle function in IE8 for some reason the DIV its opening closes immediately after its opened heres the code im using $("h3 a").click(function(){ id = $(this).attr("href"); $(id).slideToggle("slow"); }); and the HTML <h3><a href="#promo-materials">Graphic and Pormotional Materials</a></h3> <div id="promo-materials" class="center gallery"> <a href="images/portfolio/bistro.png" rel="facebox"> <img src="images/portfolio/thumbs/bistro.png" alt="" /> </a> <a href="images/portfolio/direct-savings.png" rel="facebox"> <img src="images/portfolio/thumbs/direct-savings.png" alt="" /> </a> </div> Here is a link to the functional page it works in all other browsers including IE7

    Read the article

  • Incompatible format types

    - by nebffa
    I'm playing around with strncpy in C and am having some trouble. The code is as follows: #include <stdio.h> #include <string.h> int main(int argc, char *argv[]) { char src[] = "Benjamin Franklin"; char dest[5]; strncpy(src, dest, sizeof(dest) / sizeof(char)); dest[5] = '\0'; printf("%s\n", dest); return 0; } which compiles with no errors using: gcc -Wall -g -Werror test.c -o test and prints out gibberish like p4?? I cannot really understand what I'm doing wrong especially since I have played around with it a lot and been looking online for answers. Perhaps since I am using arrays I am passing the address to printf without realising it?

    Read the article

  • Python - a clean approach to this problem?

    - by Seafoid
    Hi, I am having trouble picking the best data structure for solving a problem. The problem is as below: I have a nested list of identity codes where the sublists are of varying length. li = [['abc', 'ghi', 'lmn'], ['kop'], ['hgi', 'ghy']] I have a file with two entries on each line; an identity code and a number. abc 2.93 ghi 3.87 lmn 5.96 Each sublist represents a cluster. I wish to select the i.d. from each sublist with the highest number associated with it, append that i.d. to a new list and ultimately write it to a new file. What data structure should the file with numbers be read in as? Also, how would you iterate over said data structure to return the i.d. with the highest number that matches the i.d. within a sublist? Thanks, S :-)

    Read the article

  • Which is the 'correct' way to do this (if statement)

    - by frinkz
    I've got plenty of these lying around, and I'm wondering if I'm going to face any trouble - or performance problems. I have method A: MyClass monkey; ... if(monkey != null) { ... } Or method B: boolean hasMonkey; //This is set to TRUE when monkey is not null MyClass monkey; ... if(hasMonkey) { ... } On a functional level, they both do the same thing. Right now, I'm using method A. Is that a bad way of doing things? Which is going to perform better?

    Read the article

  • Parse text of element with empty element inside

    - by Mando
    I'm trying to convert an XHTML document that uses lots of tables into a semantic XML document in Python using xml.etree. However, I'm having some trouble converting this XHTML <TD> Textline1<BR/> Textline2<BR/> Textline3 </TD> into something like this <lines> <line>Textline1</line> <line>Textline2</line> <line>Textline3</line> </lines> The problem is that I don't know how to get the text after the BR elements.

    Read the article

  • What should I name instances of a twisted.internet.defer.Deferred?

    - by slacy
    I'm writing code using Twisted, and having trouble coming up with a sensible variable name for my twisted internet deferred's. Here are my candidates: d : Too generic, too short, violates pylint rule C0103. def : Conflicts with function defintion builtin. defer : Conflicts with module twisted.internet.defer deferred : OK but pretty long cb : Still too short, violates pylint C0103, conflicts with many callback method names. cback : Too Weird? callback : Conflicts with method Deferred.callback() I'm looking for other suggestions. It seems like most of the Twisted example code uses "d" which is fine for simple invocations, but when you're passing Deferred's around to methods and storing them as member variables, it's really far too descriptive.

    Read the article

  • IE 7 CSS problem with detecting mouse over on div

    - by BeaverProj
    I have a div inside an li as part of a top navigation for a website. I'm having trouble with IE 7 having "holes" in the box such that the drop down disappears when the user is still on the drop down. I started with a pure CSS solution (li:hover) and that works awesome in all browsers except IE 7. So I've now added a jQuery/javascript solution to detect when the mouse enters and exits the nav li and then add a class to show the drop down. It works better, but if the mouse is not over an image, p, h3, or a tag then it doesn't think I'm over the div that is the drop down. Very frustrating. I can post some test code, but the issue can be viewed here: http://davincidays.org/ Anyone have any ideas? I've been working on this for waaaay too long already and need some fresh things to try.

    Read the article

  • AS3 get closest date to today

    - by fana
    Hi, I have a XML file with a few concert dates. In my flash/AS3 file, I would like to show only the up coming event, relative to current date. Like this: Event 01: 30-05-2010 Event 02: 02-06-2010 Event 03: 05-06-2010 Today is 28-05-2010, so I need to list Event 01. On 01-06-2010 I need to list Event 02. I have the basic AS3 code for listing the XML working, but I'm having trouble filtering the result. Any ideas? Thanks.

    Read the article

  • Is there any memory restrictions on an ASP.Net application? HttpHandler?

    - by tpower
    I have an ASP.Net MVC application that allows users to upload images. When I try to upload a really large file (400MB) I get an error. I assumed that my image processing code (home brew) was very inefficient, so I decided I would try using a third party library to handle the image processing parts. Because I'm using TDD, I wanted to first write a test that fails. But when I test the controller action with the same large file it is able to do all the image processing without any trouble. The error I get is "Out of memory". I'm sure my code is probably using a lot more memory than it needs to but I just want to know why my test passes. The other difference is that I'm using SWFUpload which is not used with the test. Could this be the cause?

    Read the article

  • How to seperate database entries and display them as individual records using PHP?

    - by Clark
    I used to have database entries separated by ampersands (&), but this was causing certain search issues so I decided to encapsulate my entries on both sides by $ and & symbols like: $this& But I am having trouble displaying all the entries of a cell as indiivdual records. Before I used: $unsplitItems = $row['files']; $files = explode("@", $unsplitItems); foreach ($files as $file) { if(strlen($file)) { echo "<li>$file</li>"; } } Any idea how I can split my records and display all the items in the array as individual entries?

    Read the article

  • Can somebody explain the difference between exceptions and errors (specific to PHP)?

    - by letseatfood
    I am having trouble figuring the best way to display errors to my clients. Should I use exceptions or errors? For example, if the user's login information does not match the database, should I throw new Exception('Login information is incorrect. Please try again.') and catch it with an exception handler using set_exception_handler()? Or, should I use trigger_error() to display an error message to the user? I think the main issue is that I cannot differentiate between errors and exceptions. I have read a lot of "answers" to this question on the internet and in some books, but it seems that people are really divided or aren't sure. Thanks!

    Read the article

  • Finding the longest road in a Settlers of Catan game algorithmically

    - by Jay
    I'm writing a Settlers of Catan clone for a class. One of the extra credit features is automatically determining which player has the longest road. I've thought about it, and it seems like some slight variation on depth-first search could work, but I'm having trouble figuring out what to do with cycle detection, how to handle the joining of a player's two initial road networks, and a few other minutiae. How could I do this algorithmically? For those unfamiliar with the game, I'll try to describe the problem concisely and abstractly: I need to find the longest possible path in an undirected cyclic graph.

    Read the article

  • Changing cell class on radio button change

    - by Nick
    Huge thanks for the help in this thread - Click td, select radio button in jQuery But now I'm having trouble that it won't change the class of the cell, even though I have binded the 'change' trigger in jQuery like so: $("td input[type=radio]").bind('change click', function () { $('td').removeClass('selected'); $(this).parent('td').addClass('selected'); }); $("td").click(function () { $('input:radio', this).attr('checked', true); }); Hope that makes sense. If you click the radio button, or move between them using the keyboard, the cell's class changes just fine. However if you trigger this by clicking the cell it doesn't change the class :( Thanks

    Read the article

  • ASP.NET MVC2 : DateTime modelbinding via HTTP GET

    - by mathieu
    I'm getting some trouble binding a date from QueryString : I have the following model public class QueryParms { public DateTime Date { get; set; } } And the following controller action : public ActionResult Search( QueryParms query ); I have a form, with a field where I can type my date. If the form is FormMethod.Post, everything is fine, my date is correctly bound to my model. If the form is FormMethod.Get, it is not working anymore. The date is left to the default value (01/01/0001) I think it is a culture issue : When i look into the value provider, the FormValueProvider has a culture property set for my date : {fr-FR}. The QueryStringValueProvider doesn't have the culture property set. Is there a way to set this property ?

    Read the article

  • php, js - echoing a number based on how many children there are?

    - by benbyford
    Creating a site in with FrogCMS and using alot of jquery to create an all in one screen site. having trouble in php echoing a number for the number of children for a subject in the database which i can then use as a var in js. some things ive tried, but im not really a developer so having issues here is some code frog supplies to show to utilise articles for example, and articles then has childen in the database. find('/articles/'); ? children(array('limit' = 1, 'order' = 'page.created_on DESC')); ? but im not sure how to create a discrete number to use with the jquery concerning the number of children?? thanks

    Read the article

< Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >