Search Results

Search found 6517 results on 261 pages for 'localhost'.

Page 173/261 | < Previous Page | 169 170 171 172 173 174 175 176 177 178 179 180  | Next Page >

  • Applescript, how to get network address of a file

    - by CRP
    We are a network of Mac computers. I would like to send email addresses to colleagues with links to files on network locations. I made the following applescript: tell application "Finder" set uuu to URL of the first item of (get the selection) set the clipboard to uuu end tell which puts the URL of the currently selected file into the clipboard, which can then be pasted into the message (using the Add Link menu item), providing, for example: file://localhost/Volumes/Commerciale/Clienti/ unfortunately these links do not work. If I select Go To Folder from the menu item, I can get to the folder using an afp:// type url. Is there any way to get this via applescript like I do with url above? Thanks

    Read the article

  • Obtaining the server IP address in WCF?

    - by chris
    How can I obtain the server IP address that was used to connect to a service? The server has multiple IP addresses and I need to know which one the client is connected to. So far I only found that OperationContext.Current.EndpointDispatcher.EndpointAddress and OperationContext.Current.Channel.LocalAddress contain the address from .config (e.g. localhost) OperationContext.Current.IncomingMessageProperties.Via contains the Url that the client used to connect to the server (but this might just be a name from the clients hosts file). EDIT - Sorry, I wasn't being clear enough: The server needs to know which of its IP addresses were used by the client. E.g. the server has the addresses 10.0.0.1 and 10.0.0.2. when processing the request the server service needs to know if 10.0.0.1 or 10.0.0.2 was used by the client to connect to it.

    Read the article

  • Background image not getting vertically stretched in Chrome.

    - by KPL
    Hi all, The CSS - #header { overflow: hidden; background: url(images/header-bg.png) top repeat-x #FFFFFF; position: relative; border: none; display: block; height: 125px; width:100%; } The HTML - <div id="header"> <a href="http://localhost/" title="Dev" id="logo"><img src="images/logo.png" alt="" /></a> </div> This works good in Firefox - But not in Chrome :( - The image isn't being stretched vertically in Chrome. Help! Just a note, I'm on Linux.

    Read the article

  • Apache 2.2 / Win7 - slow or not responsive

    - by joey
    My configuration - Windows 7 x64, Php 5.3, Apache 2.2.15, latest Mysql. When loading pages from localhost, the response time shown by firebug is more 530ms for the main 'index.php' file, sometimes the connection is reset. It's painfully slow. I googled the problem and found a workaround - switch off and on again a win service called BFE - base filtering engine. Then everything works like a lightning but xdebug doesn't work in netbeans. Why is this response time so long? Can you think of any other solution than BFE toggling? joey33

    Read the article

  • Web Service appears as website instead of developer web server

    - by stocherilac
    I recently reimaged my PC and regrabbed one of our projects from Source Safe. In our solution we have a web service that normally runs on a server, however we can build the webservice on our localhost for debugging as well. However, now whenever I grab the project from source safe it is building the webservice as a website instead of a developer web server. This is causing a variety of issue, specifically I am no longer able to specify which port I would like that webservice to use. As a result I cannot connect to our database through my local webservice. How can I change the project in my solution that controls the webservice from a website to a developer web server? MS Visual Studio 2005. MS Visual Source Safe 2005. MS SQL Server 2000. VB .NET project

    Read the article

  • How to fix this Timer Tick Error in C#?

    - by Iman Hejazi
    I use this code to receive data from a internet address by a Timer in defined period of times. But when the timer ticks in second time an error will raised from this line: HttpWebResponse response = (HttpWebResponse)request.GetResponse(); I want to know how to fix this problem. Timer Interval: 30secs private void timer1_Tick(object sender, EventArgs e) { WebRequest request = WebRequest.Create("http://localhost/go/online.asp?prog=y&rln=" + Properties.Settings.Default.cos); request.Credentials = CredentialCache.DefaultCredentials; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream dataStream = response.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); string responseFromServer = reader.ReadToEnd(); reader.Close(); dataStream.Close(); response.Close(); }

    Read the article

  • XAMPP mail not working with PHP mail() function.

    - by user296516
    Hi gusy, I just installed XAMPP, Apache is running, so is MySQL and Mercury. In Dreamweaver I created a php file with a mail($to,$subject,$msg,'From:'.$email); function, but when I ran the file from localhost it showed an error. After playing around with xampp control panel, turning mercury on and off, it's not showing any errors, yet is not send the email either... any ideas? the 'admin' button on the cp for mercury does nothing. Thanks! R

    Read the article

  • Where is the probem in this code (javascript)?

    - by user318068
    Hi I have a problem in my code. can anybody help me ... <html> <body> <script type="text/javascript"> <?php $conn = mysql_connect("localhost","root"); mysql_select_db("tr", $conn); $q = mysql_query("SELECT message FROM messages WHERE to_viewed = '0' "); if (mysql_num_rows($q)) { require('pm.php'); ?> var answer = confirm("you have new message "); <?php } ?> if (answer) { window.location = "http:>>>/"; } else { } //--> </script> </body> </html> Thanks .... The error that appears in my code is that the confirm is not working if I open my page (no output)

    Read the article

  • jQuery/Ajax/javascript in FireFox Error when using $.post/$.get

    - by IsenGrim
    uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost/scripts/jQuery.js :: anonymous :: line 808" data: no] Line 0 is the error i get when i bring up firebug. This only happens in firefox (and maybe other browsers) but the code works fine in IE8. I have codes like this in jquery: $("#Logout").live("click", function (e) { e.preventDefault(e); $.post("/logout.php", {}, function () { //--a bunch of animations--// window.location = "/login.php"; } }); I have no idea whats wrong as even the error message is not helpful at all.. inside logout.php: <?php session_start(); session_destroy(); ?> Also dont work if I used GET or inserted phantom data. Or is there a more elegant way to do this?

    Read the article

  • Retrieve baseUri w/o resorting to Application.Current

    - by beaudetious
    My custom controls are not loading in VS.NET's designer because of a null reference exception. It's got everything to do with the way I am retrieving the baseUri of the application when it runs in the browser: _uriPrefix = Application.Current.Host.Source.AbsoluteUri.Substring(0, Application.Current.Host.Source.AbsoluteUri.IndexOf("/ClientBin")).Trim(); According to the exception details and the help file I'm directed to (here) I'm not correctly designing my app for a runtime that's not the browser (i.e. the new WPF editor in VS.NET or Expression Blend). So, the question is how do retrieve the baseUri (the http://localhost:#### part of my application) if I can't use Application.Host which apparently is null during design time? is there a safe way to do this so I can load my custom controls in a designer?

    Read the article

  • How to launch a web server and point the browser to it when it finishes?

    - by Wing C. Chen
    I am writing a windows batch file to do the following things: Display a picture in the middle of the screen, showing the beautiful icon of my software. Kick of the launch of the web server. Finish displaying the picture. Point the browser to the start page. I have already know how to do it in step 2 and 4. However, I have the following questions in writing the windows batch file: 1. How do I know that the launch of the web server is finished, taking jetty as the example? 2. How do I display a picture and stop displaying it when I want to? Here is what I have got so far: ::here I would like to display the picture start javaw -jar start.jar ::Starting jetty here ::here I would like to stop displaying the picture start http://localhost:8080/myApp ::Pointing the browser to the page Thank you in advance for your help.

    Read the article

  • JBoss 4.2.3 Servlet API 2.5 JSF 2.0 Hibernate 3.0 Support Added [Solved]

    - by AZ_
    While deploying my project on Redhat 6 with Jboss 4.2.3 I was having following difficulties so I decided to put it on stackoverflow so that it can help other people. If anyone could suggest a good title so that it can easily be searched, please Q: How to make Jboss 4.2.x to ignore old JSF libraries and use one within your project libs? Q: How to make Jboss scan specific path for WAR file scanning? Q: How to bind Jboss with IP address rather then localhost? Q: Where Jboss put exploded WAR file? Q: Hibernate-annotations conflict with Jboss 4.2.3 annotations and throwing following Exception. java.lang.ClassCastException: org.hibernate.validator.event.ValidateEventListener cannot be cast to org.hibernate.event.PreInsertEventListener Q: How to run JSF 2.0.x on JBoss 4.0.x ? As JSF 2.0 supports at least Servlet 2.5 API and JBoss has Tomcat 5.x that can support Servlet 2.4 at max. Q: How to change Servlet version of a Dynamic Web Project?

    Read the article

  • How To Switch To A Frame That Appears As A Pop Up Window

    - by chuanl
    I am using the following applications: Selenium 2.0 in C# Firefox I need to write a test that clicks a button and opens a frame as a pop up window. The frame does not have a name nor id. The source code in the frame starts with "html" instead of "frame". However, when you right click on the window, it shows that it is a frame. So, I think it is a frame instead of a window. I have tried the following code, but does not work: driver.SwitchTo().Frame(0) The error I get looks like below: error: No response from server for url http://localhost:7055/hub/session/126a4485-48cb-4230-b0b0-69c4169b1852/element/%7B706f4a88-56a7-4813-af1b-8e137ce676af%7D/click Please help. Thanks.

    Read the article

  • PHP Connect to 4D Database

    - by Matt Reid
    Trying to connect to 4D Database. PHPINFO says PDO is installed etc etc... Testing on localhost MAMP system. However when I run my code I get: Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /Applications/MAMP/htdocs/4d/index.php:12 Stack trace: #0 /Applications/MAMP/htdocs/4d/index.php(12): PDO->__construct('4D:host=127.0.0...', 'test', 'test') #1 {main} thrown in /Applications/MAMP/htdocs/4d/index.php on line 12 My code is: $dsn = '4D:host=127.0.0.1;charset=UTF-8'; $user = 'test'; $pass = 'test'; // Connection to the 4D SQL server $db = new PDO($dsn, $user, $pass); try { echo "OK"; } catch (PDOException $e) { die("Error 4D : " . $e->getMessage()); } Can't put my finger on the error, i'm using the settings under the PHP tab... Thank you.

    Read the article

  • PHP fsockopen doesnt return anything

    - by Industrial
    Hi! I am modifying a PHP db wrapper for the redis database. Here's how my function looks: public function connect() { $sock = @fsockopen('localhost', '6379', $errno, $errstr, 2); if ($sock === FALSE) { return FALSE; } else { stream_set_timeout($sock, 2); return $sock; } } What I want to do is to call this function from another part in my wrapper: if ($this->connect() !== FALSE) { // Do stuff } How can I get my connect function to send a FALSE when the fsockopen isn't working? Thanks!

    Read the article

  • discover if mod_rewrite is working (MAMP + codeigniter)

    - by Patrick
    Hi, I'm experimenting (and having problems!) with codeigniter. In particular, links do not work. even if they are correct (eg. http://localhost/ci-book/welcome/cat/3, where welcome is controller, cat the method), they can't be open and chrome says "Oops! This link appears to be broken...." Someone suggested to check that mod_rewrite is working. How can I do that? I'm using Mamp. thanks, P.

    Read the article

  • acquia drupal error after installing via web platform on iis 7.5

    - by Binder
    I just installed Acquia Drupal using the web platform installer. The entire process went smoothly but when i try to browse the website it say "HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable." Detailed Error Information Module FastCgiModule Notification ExecuteRequestHandler Handler PHP_via_FastCGI Error Code 0x00000000 Requested URL http://localhost:8088/index.php Physical Path C:\inetpub\wwwroot\acquia-drupal\index.php Logon Method Anonymous Logon User Anonymous I'm running IIS 7.5 on windows 7. Please help i've been stuck on this since 2 days now.

    Read the article

  • PHP - database not selected. What is wrong with my code?

    - by Petr
    Hi, I am learning PHP and tried to connect to MySQL. Altough I am using select DB, is still reports "No database selected". What is wrong, please? Thanks. <?php $user="test"; $pass="aaa"; ConnectToDb(); function ConnectToDb() { $pripojeni=mysql_connect('localhost',$user,$pass); $selectedDB=mysql_select_db('1a'); if($query=mysql_query('select * from project')) { while($d=mysql_fetch_array($query)) { echo "TEST"; } } else echo mysql_error($pripojeni); } ?>

    Read the article

  • Convert object to DateRange

    - by user655832
    I'm querying an underlying PostgreSQL database using Pandas 0.8. Pandas is returning the DataFrame properly but the underlying timestamp column in my database is being returned as a generic "object" type in Pandas. As I would eventually like to seasonal normalization of my data I am curious as to how to convert this generic "object" column to something that is appropriate for analysis. Here is my current code to retrieve the data: # get records from db example import pandas.io.sql as psql import psycopg2 # define query to get all subs created this year QRY = """ select i i, i * random() f, case when random() > 0.5 then true else false end t, (current_date - (i*random())::int)::timestamp with time zone tsz from generate_series(1,1000) as s(i) order by 4 ; """ CONN_STRING = "host='localhost' port=5432 dbname='postgres' user='postgres'" # connect to db conn = psycopg2.connect(CONN_STRING) # get some data set index on relid column df = psql.frame_query(QRY, con=conn) print "Row count retrieved: %i" % (len(df),) Thanks for any help you can render. M

    Read the article

  • Help setting up IIS 7.0

    - by IXMonkey
    I am trying to setup IIS on my laptop. I have followed a guide which said to go to: Control Panel Programs Turn Windows Features On / Off Click on IIS. I have done this and my computer now says that IIS is running. However when I visit http://localhost in my browser I get a 'Page Cannot be Displayed' error. I have had it working before but can't seem to get it working now. Does anyone have any ideas of why this might be happening? I am using Windows Vista Home Premium Thanks

    Read the article

  • Custom URL protocol in Windows to serve HTML content

    - by Jen
    This question addresses how to register a custom URL protocol to launch an application in response to a link, but I want my handler to serve dynamic content. Essentially, I'm looking to create a web application that runs on the user's machine instead of a web server. I could set up a localhost, but I want to use a "friendly" URL format that the user can reference elsewhere, e.g. a hypothetical cats protocol: cats:fluffy/cheeseburger-consumption-stats How can I accomplish this? Also, do you see any pitfalls with this approach, such as security warnings from browsers? Thanks!

    Read the article

  • Java Client-Server problem when sending multiple files

    - by Jim
    Client public void transferImage() { File file = new File(ServerStats.clientFolder); String[] files = file.list(); int numFiles = files.length; boolean done = false; BufferedInputStream bis; BufferedOutputStream bos; int num; byte[] byteArray; long count; long len; Socket socket = null ; while (!done){ try{ socket = new Socket(ServerStats.imgServerName,ServerStats.imgServerPort) ; InputStream inStream = socket.getInputStream() ; OutputStream outStream = socket.getOutputStream() ; System.out.println("Connected to : " + ServerStats.imgServerName); BufferedReader inm = new BufferedReader(new InputStreamReader(inStream)); PrintWriter out = new PrintWriter(outStream, true /* autoFlush */); for (int itor = 0; itor < numFiles; itor++) { String fileName = files[itor]; System.out.println("transfer: " + fileName); File sentFile = new File(fileName); len = sentFile.length(); len++; System.out.println(len); out.println(len); out.println(sentFile); //SENDFILE bis = new BufferedInputStream(new FileInputStream(fileName)); bos = new BufferedOutputStream(socket.getOutputStream( )); byteArray = new byte[1000000]; count = 0; while ( count < len ){ num = bis.read(byteArray); bos.write(byteArray,0,num); count++; } bos.close(); bis.close(); System.out.println("file done: " + itor); } done = true; }catch (Exception e) { System.err.println(e) ; } } } Server public static void main(String[] args) { BufferedInputStream bis; BufferedOutputStream bos; int num; File file = new File(ServerStats.serverFolder); if (!(file.exists())){ file.mkdir(); } try { int i = 1; ServerSocket socket = new ServerSocket(ServerStats.imgServerPort); Socket incoming = socket.accept(); System.out.println("Spawning " + i); try { try{ if (!(file.exists())){ file.mkdir(); } InputStream inStream = incoming.getInputStream(); OutputStream outStream = incoming.getOutputStream(); BufferedReader inm = new BufferedReader(new InputStreamReader(inStream)); PrintWriter out = new PrintWriter(outStream, true /* autoFlush */); String length2 = inm.readLine(); System.out.println(length2); String filename = inm.readLine(); System.out.println("Filename = " + filename); out.println("ACK: Filename received = " + filename); //RECIEVE and WRITE FILE byte[] receivedData = new byte[1000000]; bis = new BufferedInputStream(incoming.getInputStream()); bos = new BufferedOutputStream(new FileOutputStream(ServerStats.serverFolder + "/" + filename)); long length = (long)Integer.parseInt(length2); length++; long counter = 0; while (counter < length){ num = bis.read(receivedData); bos.write(receivedData,0,num); counter ++; } System.out.println(counter); bos.close(); bis.close(); File receivedFile = new File(filename); long receivedLen = receivedFile.length(); out.println("ACK: Length of received file = " + receivedLen); } finally { incoming.close(); } } catch (IOException e){ e.printStackTrace(); } } catch (IOException e1){ e1.printStackTrace(); } } The code is some I found, and I have slightly modified it, but I am having problems transferring multiple images over the server. Output on Client: run ServerQueue.Client Connected to : localhost transfer: Picture 012.jpg 1312743 java.lang.ArrayIndexOutOfBoundsException Connected to : localhost transfer: Picture 012.jpg 1312743 Cant seem to get it to transfer multiple images. But bothsides I think crash or something because the file never finishes transfering

    Read the article

  • How to Properly Reference a JavaScript File in an ASP.NET Project?

    - by DaveDev
    Hi Guys I have some pages that reference javascript files. The application exists locally in a Virtual Directory, i.e. http://localhost/MyVirtualDirectory/MyPage.aspx so locally I reference the files as follows: <script src="/MyVirtualDirectory/Scripts/MyScript.js" type="text/javascript"></script> The production setup is different though. The application exists as its own web site in production, so I don't need to include the reference to the virtual directory. The problem with this is that I need to modify every file that contains a javascript reference so it looks like the following: <script src="../Scripts/MyScript.js" type="text/javascript"></script> I've tried referencing the files this way in my local setup but it doesn't work. Am I going about this completely wrong? Can somebody tell me what I need to do? Thanks

    Read the article

  • Creating Dynamic variables from json response

    - by c0mrade
    My JSON response looks like this : {"sample":[{"id":"2","name":"branch name"},{"id":"3","name":"branch name 2"}]} My function looks like this : function getJSONObjects(){ $.getJSON("http://localhost/api/branches", function(data){ $.each(data.sample, function(i,item){ var loc = "branch"; eval("var " + loc + item.id + "=123;"); alert(loc + item.id); }); }); } The idea is to create branch + id object so I can do something with it(create marker on a map), so I tried to assign it any value to see if this was working. I wanted both branch2 and branch3 to alert 123 so I have something to start with. But currently this alerts branch2 and branch3 instead of 123. I have little experience with creating dynamic variables/objects can someone tell me what I'm doing wrong or maybe another approach towards solving this?

    Read the article

  • Sending an array of complex objects in the get string in C# ASP.NET MVC

    - by Mr Snuffle
    Hi, I want to send an array of objects in the get request string. I know this isn't the optimal solution, but I really just want to get this up and running. If I have a class, something like this public class Data { public int a { get; set; } public int b { get; set; } } public class RequestViewData { public IList<Data> MyData { get; set; } } I thought I could bind the MVC route to a web request like this http://localhost:8080/Request?MyData[0].a=1&MyData[0].b=2&MyData[1].a=3&[MyData[1].b=4 But all this does is create an array of two data objects without populating the values 1,2, 3 or 4. Is there a way to bind complex objects arrays?

    Read the article

< Previous Page | 169 170 171 172 173 174 175 176 177 178 179 180  | Next Page >