Search Results

Search found 6478 results on 260 pages for 'hippy head'.

Page 129/260 | < Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >

  • Redis Cookbook Chat Recipe

    - by Tommy Kennedy
    I am a new starter to Node.Js and Redis. I got the Redis cookbook and was trying out the Chat client & Server recipe. I was wondering if anybody got the code to work or if there is some bug in the code. I dont see where the sent messages from the client get invoked on the server. Any help would be great. Regards, Tom Client Code: <?php ?> <html> <head> <title></title> <script src="http://192.168.0.118:8000/socket.io/socket.io.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> <script> var socket = io.connect('192.168.0.118',{port:8000}); socket.on('message', function(data){ alert(data); //var li = new Element('li').insert(data); //$('messages').insert({top: li}); }); </script> </head> <body> <ul id="messages"> <!-- chat messages go here --> </ul> <form id="chatform" action=""> <input id="chattext" type="text" value="" /> <input type="submit" value="Send" /> </form> <script> $('#chatform').submit(function() { socket.emit('message', 'test'); //$('chattext').val()); $('chattext').val(""); // cleanup the field return false; }); </script> </body> </html> Server Code: var http = require('http'); io = require('socket.io'); redis = require('redis'); rc = redis.createClient(); //rc1 = redis.createClient(); rc.on("connect",function(){ rc.subscribe("chat"); console.log("In Chat Stream"); }); rc.on("message",function (channel,message){ console.log("Sending hope: " + message); //rc1.publish("chat","hope"); socketio.sockets.emit('message',message); }); server = http.createServer(function(req,res){ res.writeHead(200,{'content-type':'text/html'}); res.end('<h1>hello world</h1>'); }); server.listen(8000); var socketio = io.listen(server);

    Read the article

  • Displaying unnecessary HTML when showing content from MySQL database.

    - by ThatMacLad
    My homepage pulls in content from my MySQL database to create a blog. I've got it so that it only displays an extract from the posts. For some reason it displays HTML tags as well rather than formatting it using the tags (See picture below). Any help is appreciated. Homepage: <html> <head> <title>Ultan Casey | Homepage</title> <link rel="stylesheet" href="css/style.css" type="text/css" /> </head> <body> <div class="wrapper"> <div id="upperbar"> <a href="#">Home</a> <a href="#">About Me</a> <a href="#">Contact Me</a> <a href="http://www.twitter.com/UltanKC">Twitter</a> <form id="search-form" action="/search" method="get"> <input type="text" id="textarea" size="33" name="q" value=""/> <input type="submit" id="submit" value="Search"/> </form> </div> <div id="banner"> <img src="images/banner.jpg"> </div> <div class="sidebar"></div> <div class="posts"> <?php mysql_connect ('localhost', 'root', 'root') ; mysql_select_db ('tmlblog'); $sql = "SELECT * FROM php_blog ORDER BY timestamp DESC LIMIT 5"; $result = mysql_query($sql) or print ("Can't select entries from table php_blog.<br />" . $sql . "<br />" . mysql_error()); while($row = mysql_fetch_array($result)) { $date = date("l F d Y", $row['timestamp']); $title = stripslashes($row['title']); $entry = stripslashes($row['entry']); $id = $row['id']; ?> <?php echo "<p id='title'><strong><a href=\"post.php?id=". $id . "\">" . $title . "</a></strong></p>"; ?><br /> <div class="post-thumb"><img src="thumbs/<?php echo $id ?>.png"></div> <?php echo htmlspecialchars(substr($entry, 0, 1050)) ?>... <br> <hr><br /> Posted on <?php echo $date; ?> </p> </div> </div> </p <?php } ?> </div> </div> </div> </body> </html> Image:

    Read the article

  • linux xorg dual different monitors mouse border

    - by Metiu
    If I hook an external monitor to my Linux laptop and configure it for dual head with the Gnome system tools, I do get them configured with the proper resolution and position (one to the left of the other) The mouse pointer, however, will apparently use the greatest of the two vertical resolutions. This way, when I move up to the top border, the mouse exits the visible screen, traveling in empty space, and this is quite annoying, because you can't go to the upper panel just by going up very fast. Is there a way of enforcing the right resolutions for the mouse, too? Thank you

    Read the article

  • Using LINQ to create a simple login

    - by JDWebs
    I'm an C# ASP.NET beginner, so please excuse anything that's... not quite right! In short, I want to create a really basic login system: one which runs through a database and uses sessions so that only logged in users can access certain pages. I know how to do most of that, but I'm stuck with querying data with LINQ on the login page. On the login page, I have a DropDownList to select a username, a Textbox to type in a password and a button to login (I also have a literal for errors). The DropDownList is databound to a datatable called DT_Test. DT_Test contains three columns: UsernameID (int), Username (nchar(30)) and Password (nchar(30)). UsernameID is the primary key. I want to make the button's click event query data from the database with the DropDownList and Textbox, in order to check if the username and password match. But I don't know how to do this... Current Code (not a lot!): Front End: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login_Test.aspx.cs" Inherits="Login_Login_Test" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Login Test</title> </head> <body> <form id="LoginTest" runat="server"> <div> <asp:DropDownList ID="DDL_Username" runat="server" Height="20px" DataTextField="txt"> </asp:DropDownList> <br /> <asp:TextBox ID="TB_Password" runat="server" TextMode="Password"></asp:TextBox> <br /> <asp:Button ID="B_Login" runat="server" onclick="B_Login_Click" Text="Login" /> <br /> <asp:Literal ID="LI_Result" runat="server"></asp:Literal> </div> </form> </body> </html> Back End: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Login_Login_Test : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Binder(); } } private void Binder() { using (DataClassesDataContext db = new DataClassesDataContext()) { DDL_Username.DataSource = from x in db.DT_Honeys select new { x.UsernameID, txt = x.Username }; DDL_Username.DataBind(); } } protected void B_Login_Click(object sender, EventArgs e) { if (TB_Password.Text != "") { using (DataClassesDataContext db = new DataClassesDataContext()) { } } } } I have spent hours searching and trying different code, but none of it seems to fit in for this context. Anyway, help and tips appreciated, thank you very much! I am aware of security risks etc. but this is not a live website or anything, it is simply for testing purposes as a beginner. *

    Read the article

  • Need to write at beginning of file with PHP

    - by Timothy
    I'm making this program and I'm trying to find out how to write data to the beginning of a file rather than the end. "a"/append only writes to the end, how can I make it write to the beginning? Because "r+" does it but overwrites the previous data. $datab = fopen('database.txt', "r+"); Here is my whole file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Facebook v0.1</title> <style type="text/css"> #bod{ margin:0 auto; width:800px; border:solid 2px black; } </style> </head> <body> <div id="bod"> <?php $fname = $_REQUEST['fname']; $lname = $_REQUEST['lname']; $comment = $_REQUEST['comment']; $datab = $_REQUEST['datab']; $gfile = $_REQUEST['gfile']; print <<<form <table border="2" style="margin:0 auto;"> <td> <form method="post" action=""> First Name : <input type ="text" name="fname" value=""> <br> Last Name : <input type ="text" name="lname" value=""> <br> Comment : <input type ="text" name="comment" value=""> <br> <input type ="submit" value="Submit"> </form> </td> </table> form; if((!empty($fname)) && (!empty($lname)) && (!empty($comment))){ $form = <<<come <table border='2' width='300px' style="margin:0 auto;"> <tr> <td> <span style="color:blue; font-weight:bold;"> $fname $lname : </span> $comment </td> </tr> </table> come; $datab = fopen('database.txt', "r+"); fputs($datab, $form); fclose($datab); }else if((empty($fname)) && (empty($lname)) && (empty($comment))){ print" please input data"; } // end table $datab = fopen('database.txt', "r"); while (!feof($datab)){ $gfile = fgets($datab); print "$gfile"; }// end of while ?> </div> </body> </html>

    Read the article

  • Centos + CPanel results in php always running as fgci, instead of cli, as expected

    - by quamis
    I'm having problems with a server configured by someone else. It uses CPanel, and it has Apache+PHP. For some reason, when running php -v as a user, i get "cli" as handler # php -v | head -n 1 PHP 5.3.27 (cli) (built: Oct 15 2013 16:06:48) If a make a PHP script with echo shell_exec("php -v | tail -n 1"), i get PHP 5.3.27 (cgi-fcgi) (built: Oct 15 2013 16:22:16) Why the cli/fcgi difference? I need to fix this so that scripts ran by the apache user would be running as "cli", not "fcgi". As a side-note, i'm not sure how php got installed, because in the package list i see another version installed, instead of the pne reported by php -v # rpm -qa | grep php [.... other packages...] cpanel-php53-5.3.17-5.cp1136.x86_64 rebuild_phpconf --current: /usr/local/cpanel/bin/rebuild_phpconf --current Available handlers: suphp dso fcgi cgi none DEFAULT PHP: 5 PHP4 SAPI: none PHP5 SAPI: dso SUEXEC: enabled RUID2: not installed redhat-release: # cat /etc/redhat-release CentOS release 6.4 (Final) possibly related to http://superuser.com/questions/665809/centos-6-4-running-php-for-root-as-cgi-fcgi-not-cli

    Read the article

  • Flash Media Server slow over SSL

    - by Antilogic
    We are using FMS to host a VoD site. We host FMS internally (we do not use a CDN). We recently installed an SSL certificate to alleviate connection issues for clients (they're networks either block or don't support RTMP), however we're noticing that when streaming in RTMPS connections are drastically slower (on the order of Mbps). I know SSL causes some amount of over head but both client and server show almost no signs of exertion. Speedtest.net and a locally hosted speed test confirm that bandwidth is not an issue. I'm really not a network guru, so I'm at a loss as to where to check next. Do any of you have an idea why streaming media would run so slow over SSL?

    Read the article

  • Why does @PostConstruct callback fire every time even though bean is @ViewScoped? JSF

    - by Nitesh Panchal
    Hello, I am using datatable on page and using binding attribute to bind it to my backing bean. This is my code :- <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.prime.com.tr/ui"> <h:head> <title>Facelet Title</title> </h:head> <h:body> <h:form prependId="false"> <h:dataTable var="item" value="#{testBean.stringCollection}" binding="#{testBean.dataTable}"> <h:column> <h:outputText value="#{item}"/> </h:column> <h:column> <h:commandButton value="Click" actionListener="#{testBean.action}"/> </h:column> </h:dataTable> </h:form> </h:body> </html> This is my bean :- package managedBeans; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import javax.faces.component.html.HtmlDataTable; @ManagedBean(name="testBean") @ViewScoped public class testBean implements Serializable { private List<String> stringCollection; public List<String> getStringCollection() { return stringCollection; } public void setStringCollection(List<String> stringCollection) { this.stringCollection = stringCollection; } private HtmlDataTable dataTable; public HtmlDataTable getDataTable() { return dataTable; } public void setDataTable(HtmlDataTable dataTable) { this.dataTable = dataTable; } @PostConstruct public void init(){ System.out.println("Post Construct fired!!"); stringCollection = new ArrayList<String>(); stringCollection.add("a"); stringCollection.add("b"); stringCollection.add("c"); } public void action(){ System.out.println("Clicked!!"); } } Please tell me why is the @PostConstruct firing each and every time i click on button? It should fire only once as long as i am on same page beacause my bean is @ViewScoped. Further, if i remove the binding attribute then everything works fine and @PostConstruct callback fires only once. Then why every time when i use binding attribute? I need binding attribute and want to perform initialisation tasks like fetching data from webservice, etc only once. What should i do? Where should i write my initialisation task?

    Read the article

  • NullPointerException in generated JSP code calling setJspId()

    - by Dobbo
    I am trying to deploy the Duke's Bank example form the J2EE 5 tutorial on JBoss 7.1.1. I have only used (unaltered) the source, and the standard XML configuration files for deployment, part of the exercise here is to see how I might structure a JSP based project of my own. The exception I get is as follows: ERROR [[jsp]] Servlet.service() for servlet jsp threw exception: java.lang.NullPointerException at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1858) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final] at org.apache.jsp.main_jsp._jspx_meth_f_005fview_005f0(main_jsp.java:99) at org.apache.jsp.main_jsp._jspService(main_jsp.java:76) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jbossweb-7.0.13.Final.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) [jbossweb-7.0.13.Final.jar:] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.13.Final.jar:] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.13.Final.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:] at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0_18] I have not given any JBoss configuration files, the WAR's WEB-INF part looks like this: $ jar tvf build/lib/dukebank-web.war 0 Sat Dec 15 22:00:12 GMT 2012 META-INF/ 123 Sat Dec 15 22:00:10 GMT 2012 META-INF/MANIFEST.MF 0 Sat Dec 15 22:00:12 GMT 2012 WEB-INF/ 2514 Fri Dec 14 14:29:20 GMT 2012 WEB-INF/web.xml 1348 Sat Dec 15 08:19:46 GMT 2012 WEB-INF/dukesBank.tld 7245 Sat Dec 15 08:19:46 GMT 2012 WEB-INF/faces-config.xml 2153 Sat Dec 15 08:19:46 GMT 2012 WEB-INF/tutorial-template.tld 0 Sat Dec 15 22:00:12 GMT 2012 WEB-INF/classes/... The JSP file (main.jsp) that causes this problem is: <f:view> <h:form> <jsp:include page="/template/template.jsp"/> <center> <h3><h:outputText value="#{bundle.Welcome}"/></h3> </center> </h:form> </f:view> The template file it includes: <%@ taglib uri="/WEB-INF/tutorial-template.tld" prefix="tt" %> <%@ page errorPage="/template/errorpage.jsp" %> <%@ include file="/template/screendefinitions.jspf" %> <html> <head> <title> <tt:insert definition="bank" parameter="title"/> </title> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body bgcolor="#ffffff"> <tt:insert definition="bank" parameter="banner"/> <tt:insert definition="bank" parameter="links"/> </body> </html> I will refrain from coping any more files because, as I said at the start I haven't altered any of the files I have used. Many thanks for your help, Steve

    Read the article

  • how can I exit from a php script and continue right after the script?

    - by Samir Ghobril
    Hey guys, I have this piece of code, and when I add return after echo(if there is an error and I need to continue right after the script) I can't see the footer, do you know what the problem is? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en" > <head> <title>Login | JM Today </title> <link href="Mainstyles.css" type="text/css" rel="stylesheet" /> </head> <body> <div class="container"> <?php include("header.php"); ?> <?php include("navbar.php"); ?> <?php include("cleanquery.php") ?> <div id="wrap"> <?php ini_set('display_errors', 'On'); error_reporting(E_ALL | E_STRICT); $conn=mysql_connect("localhost", "***", "***") or die(mysql_error()); mysql_select_db('jmtdy', $conn) or die(mysql_error()); if(isset($_POST['sublogin'])){ if(( strlen($_POST['user']) >0) && (strlen($_POST['pass']) >0)) { checklogin($_POST['user'], $_POST['pass']); } elseif((isset($_POST['user']) && empty($_POST['user'])) || (isset($_POST['pass']) && empty($_POST['pass']))){ echo '<p class="statusmsg">You didn\'t fill in the required fields.</p><br/><input type="button" value="Retry" onClick="location.href='."'login.php'\">"; return; } } else{ echo '<p class="statusmsg">You came here by mistake, didn\'t you?</p><br/><input type="button" value="Retry" onClick="location.href='."'login.php'\">"; return; } function checklogin($username, $password){ $username=mysql_real_escape_string($username); $password=mysql_real_escape_string($password); $result=mysql_query("select * from users where username = '$username'"); if($result != false){ $dbArray=mysql_fetch_array($result); $dbArray['password']=mysql_real_escape_string($dbArray['password']); $dbArray['username']=mysql_real_escape_string($dbArray['username']); if(($dbArray['password'] != $password ) || ($dbArray['username'] != $username)){ echo '<p class="statusmsg">The username or password you entered is incorrect. Please try again.</p><br/><input type="button" value="Retry" onClick="location.href='."'login.php'\">"; return; } $_SESSION['username']=$username; $_SESSION['password']=$password; if(isset($_POST['remember'])){ setcookie("jmuser",$_SESSION['username'],time()+60*60*24*356); setcookie("jmpass",$_SESSION['username'],time()+60*60*24*356); } } else{ echo'<p class="statusmsg"> The username or password you entered is incorrect. Please try again.</p><br/>input type="button" value="Retry" onClick="location.href='."'login.php'\">"; return; } } ?> </div> <br/> <br/> <?php include("footer.php") ?> </div> </body> </html>

    Read the article

  • Content div not filling up the remaining space

    - by Sameer Shariff
    Basically #content is not obeying the height: auto attribute. What am i doing wrong? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title id="title" runat="server">AMIDS: Advanced Management Information Data Store</title> <style type="text/css"> #container { background-color: White; height: 100%; min-height: 100%; min-width: 600px; width: 100%; } #header { height: 50px; overflow: hidden; width: 100%; } #headerLeft { background-image: url('/Amids/App_Themes/Default/Images/HeaderLeft.jpg'); float: left; height: 50px; width: 5px; } #headerCenter { background-image: url('/Amids/App_Themes/Default/Images/HeaderCenter.jpg'); float: left; height: 50px; width: 99.2%; } #headerRight { background-image: url('/Amids/App_Themes/Default/Images/HeaderRight.jpg'); float: left; height: 50px; width: 5px; } #menu { background-image: url('/Amids/App_Themes/Default/Images/Menu.jpg'); height: 20px; width: 100%; } #content { background-color: Pink; height: auto; width: 100%; } #footer { height: 40px; overflow: hidden; width: 100%; } #footerLeft { background-image: url('/Amids/App_Themes/Default/Images/FooterLeft.jpg'); float: left; height: 40px; width: 5px; } #footerCenter { background-image: url('/Amids/App_Themes/Default/Images/FooterCenter.jpg'); float: left; height: 40px; width: 99.2%; } #footerRight { background-image: url('/Amids/App_Themes/Default/Images/FooterRight.jpg'); float: left; height: 40px; width: 5px; } * html #container { height: 100%; } * { margin: 0; padding: 0; } html, body, form { border: none; height: 100%; } </style> </head> <body> <form id="form" runat="server"> <div id="container"> <div id="header"> <div id="headerLeft"></div> <div id="headerCenter"></div> <div id="headerRight"></div> </div> <div id="menu"></div> <div id="content"></div> <div id="footer"> <div id="footerLeft"></div> <div id="footerCenter"></div> <div id="footerRight"></div> </div> </div> </form> </body> </html> Any ideas anyone?

    Read the article

  • Why is Google Chrome making these weird requests?

    - by mackenir
    I noticed that now and again, Chrome will make three requests to weird hostnames that arent resolved. For example: HEAD http://gtblynlsos/ HTTP/1.1 Host: gtblynlsos Proxy-Connection: keep-alive Content-Length: 0 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-GB,en-US;q=0.8,en;q=0.6 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Other example weird hostnames: http://nxibbjklov/ http://moheksgryj/ Has anyone else seen this? Any ideas what's going on? I have all Chrome extensions disabled.

    Read the article

  • Computer Locks Up Completely When Resuming From Standby

    - by kcoppock
    Okay, so I'm having a strange issue lately with my desktop, and off the top of my head I'm not sure what the problem is, so I'm hoping for some ideas on how to track down the cause. First, my PC: AMD Phenom 9600 Quad-Core 2.4 GHz 4 GB DDR2 160 GB boot HDD 1 TB & 120 GB secondary HDD Nvidia GeForce 8600 GTS Windows 7 Professional 64-bit I have my power settings as follows: Turn off the display: 10 minutes Turn off hard disk: 20 minutes Sleep after: Never After a while, I'll come back to use my computer again, wiggle the mouse, and the screen comes back on like normal, but the desktop is unresponsive. I can move the cursor, but nothing responds to clicks or keyboard entry. If I click a few times with the mouse, the computer eventually locks up completely and the mouse cursor stops moving as well. After I restart, everything works just fine. Is there a log you recommend checking or really any suggestions would be welcome at this point. Thanks!

    Read the article

  • Reducing Loading of Advertisers Scripts

    - by HollerTrain
    I have a website (http://dev2.liquor.com) that loads very quickly when I remove the advertisers and tracking scripts our partners give us. Of course we need to reduce page load time from 6 seconds to 1 second, and I see that it is 100% all of our external js files for partner tracking, ads, etc. I have been banging my head against the wall trying to find alternate ways to load/compress/serve the multidue of js the user needs to download. I can easily compress/minify mine, but someone else's that is not on our server is becoming hard to do so. The best I can do is get a C on YSlow, and each suggestion they give me pertains to my stupid tracking js scripts! Any help would be greatly appreciated.

    Read the article

  • GPO Startup Script can't modify HKU Registry?

    - by pepoluan
    I've been scratching my head with my current problem. You see, I have this Startup Script that I pushed via GPO. Problem is, although the script starts alright (I see the event it created when starting in the event log), it always fails when trying to enumerate and/or modify registry settings under HKU. If I login as administrator and execute the script manually, it works! If I startup a Command Prompt as SYSTEM (using the "at" workaround) and execute the script manually, it also works! If I reboot... the script always fails. Can anyone shed a light on my problem? Additional information: This script injects some registry values for the Local Administrator (i.e., S-1-5-21-etc etc etc-500), so I'm not sure that it's doable via GPP, not to mention that since nearly all the workstations in my domain are still using XP, so no guarantee of GPP support.

    Read the article

  • Explaining Git to someone new to revision control

    - by MaxMackie
    I've recently decided to jump into the whole world of revision control to work on some open source projects I have. I looked around (subversion, mercurial, git, etc) and found that Git seemed to make more sense conceptually to me. I've set everything up on my computer (opensuse) and made an account on gitorious (let me know if there is a more simple/better hosting provider). I understand Git from a conceptual point of view (work locally, commit to a local repo, others can now checkout from you, right?). But where does gitorious come into play? I commit to them as well as committing locally? Apart from conceptually, I don't quite understand HOW it works when it comes to making a local repository and running git init inside a folder and that HEAD file. Keep in mind I have never used any form of revision control ever before. So even the most basic concepts are foreign to me. As I post this, I'm also reading up and trying to figure it out myself.

    Read the article

  • postgresql creating and managing users

    - by MalphasWats
    I've tried a few times to get postgresql running on a couple of different linux boxes, but I've always ended up binning it and going back to MySQL because I can't get my head around how to create and manage users. This time around, I've actually gotten as far as being able to log in with my own account, but I created the account with the createuser command and it has a different password to my actual user account. What I'd like to be able to do is log in as me to create databases, users and assign database permissions, but then have an account that is separate and doesn't have an account on the server to use with my web app. Does anyone have a good step-by-step guide for complete morons that goes through creating users and assigning access to various databases in postgresql?

    Read the article

  • Facebook iFrame APP not working in IE, works on every other browser

    - by Sean Ashmore
    So im getting a blank page when loading this page within an iFrame on Internet explorer, every other browser works fine.. I have also tried using p3p headers as other people have suggested, but to no avail. <?php require ("connect.php"); require ("config.php"); require ("fb_config.php"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Login handler</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="css/login.css" type="text/css"> </head> <body> <?//=$user?> <?php if($user == 0) { echo "You are not logged into facebook. Nice try."; }else{ $query = "SELECT id,fb_id,login_ip,login_count,activated,sitestate FROM login WHERE fb_id='".mysql_real_escape_string($user)."'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); if (mysql_num_rows($result) == 0) { $sql = "INSERT INTO login SET id = '', fb_id ='" .mysql_real_escape_string($user). "', name = '" .rand(10000000000000000,99999999999999999999). "', signup =NOW() , password = '" .mysql_real_escape_string($pass). "', state = '0', mail = '" .mysql_real_escape_string($_POST['mail']). "',location='".mysql_real_escape_string($randomlocation)."',location_start='".mysql_real_escape_string($randomlocation)."', signup_ip='".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."',ref='".mysql_real_escape_string($_POST['ref'])."', activation_id = '" .mysql_real_escape_string($activation_link). "',activated='2', killprotection = '$twodayprot',gender='" .mysql_real_escape_string($_POST["gender"]). "'"; $res = mysql_query($sql); } //if($row['fb_id'] != $user){ //echo "Your facebook ID: $user is NOT in the MW DB."; //exit(); //}else{ if(empty($row['login_ip'])){ $row['login_ip'] = $_SERVER['REMOTE_ADDR']; }else{ $ip_information = explode("-", $row['login_ip']); if (in_array($_SERVER['REMOTE_ADDR'], $ip_information)) { $row['login_ip'] = $row['login_ip']; }else{ $row['login_ip'] = $row['login_ip']."-".$_SERVER['REMOTE_ADDR']; } } $update_login = mysql_query("UPDATE login SET login_count=login_count+'1' WHERE name='".mysql_real_escape_string($_POST['username'])."'") or die(mysql_error()); $_SESSION['user_id'] = $row['id']; $result = mysql_query("UPDATE login SET userip='".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."',login_ip='".mysql_real_escape_string($row['login_ip'])."',login_count='0' WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'") or die(mysql_error()); if ($row['sitestate'] == 0){ header("location: home.php"); } elseif ($row['sitestate'] == 2) { header("location: killed.php?id={$row['id']}&encrypted={$row['password']}"); } else { header("location: banned.php?id={$row['id']}&encrypted={$row['password']}"); } }// id check. ?> </body> </html>

    Read the article

  • move carat to the end of a text input field AND make the end visible

    - by user322384
    I'm going insane. I have an autosuggest box where users choose a suggestion. On the next suggestion selection the value of the text input box exceeds its size. I can move the carat to the end of the input field crossbrowser, no problem. But on Chrome and Safari I cannot SEE the carat at the end. The end of the text is not visible. Is there a way to move the carat to the end of a text input field AND have the end of the field visible so that the user is not confused about where the input carat went? what I got so far: <html> <head><title>Field update test</title></head> <body> <form action="#" method="POST" name="testform"> <p>After a field is updated the carat should be at the end of the text field AND the end of the text should be visible</p> <input type="text" name="testbox" value="" size="40"> <p><a href="javascript:void(0);" onclick="add_more_text();">add more text</a></p> </form> <script type="text/javascript"> <!-- var count = 0; function add_more_text() { var textfield = document.testform.elements['testbox']; textfield.blur(); textfield.focus(); if (count == 0) textfield.value = ''; // clear old count++; textfield.value = (count ? textfield.value : '') + ", " + count + ": This is some sample text"; // move to the carat to the end of the field if (textfield.setSelectionRange) { textfield.setSelectionRange(textfield.value.length, textfield.value.length); } else if (textfield.createTextRange) { var range = textfield.createTextRange(); range.collapse(true); range.moveEnd('character', textfield.value.length); range.moveStart('character', textfield.value.length); range.select(); } // force carat visibility for some browsers if (document.createEvent) { // Trigger a space keypress. var e = document.createEvent('KeyboardEvent'); if (typeof(e.initKeyEvent) != 'undefined') { e.initKeyEvent('keypress', true, true, null, false, false, false, false, 0, 32); } else { e.initKeyboardEvent('keypress', true, true, null, false, false, false, false, 0, 32); } textfield.dispatchEvent(e); // Trigger a backspace keypress. e = document.createEvent('KeyboardEvent'); if (typeof(e.initKeyEvent) != 'undefined') { e.initKeyEvent('keypress', true, true, null, false, false, false, false, 8, 0); } else { e.initKeyboardEvent('keypress', true, true, null, false, false, false, false, 8, 0); } textfield.dispatchEvent(e); } } // --> </script> </body> </html> Thanks

    Read the article

  • clicking a button via javascript does not cause a postback

    - by Andreas Niedermair
    hi there! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.js"></script> </head> <body> <form id="fooForm"> <script type="text/javascript"> function FooMethod() { alert('hello'); } var fooButton; var fooForm; $(document).ready(function() { InitializeVariables(); InitiliazeDialog(); InitiliazeForm(); }); function InitializeVariables() { fooButton = $('#fooButton'); fooForm = $('#fooForm'); } function InitiliazeDialog() { var dialog = $('<div/>'); dialog.css('display', 'none'); var content = $('<p/>'); var icon = $('<span/>'); icon.addClass('ui-icon ui-icon-alert'); icon.css('float', 'left'); icon.css('margin', '0px 7px 20px 0px'); content.text('do you really want to hurt me?'); icon.prependTo(content); content.appendTo(dialog); var dialogOpenMethod = function () { dialog.dialog('open'); return false; }; var dialogOpenHandlerMethod = function (event, ui) { var widget = dialog.dialog('widget'); widget.appendTo(fooForm); var overlay = widget.prev(); overlay.css('z-index', 999); overlay.appendTo(fooForm); widget.css('position', 'fixed'); widget.css('top', '50%'); widget.css('margin-top', widget.height() / 2 * -1); widget.css('left', '50%'); widget.css('margin-left', widget.width() / 2 * -1); }; var submitMethod = function () { dialog.dialog('option', 'closeOnEscape', false); var widget = dialog.dialog('widget'); var yesButton = $(':button:eq(0)', widget); var noButton = $(':button:eq(1)', widget); var closeButton = $('a.ui-dialog-titlebar-close', widget); noButton.remove(); closeButton.remove(); fooButton.unbind('click', dialogOpenMethod); fooButton.click(); }; dialog.dialog({ autoOpen: false, modal: true, buttons: { 'Ja': submitMethod, 'Nein': function () { dialog.dialog('close'); } }, open: dialogOpenHandlerMethod }); fooButton.bind('click', dialogOpenMethod); } function InitiliazeForm() { fooButton.button(); fooForm.submit(function () { alert('doing a submit'); }); } </script> <input type="submit" id="fooButton" value="submit it!" onclick="FooMethod();"></input> </form> </body> </html> what am i doing? i want a modal-confirmation: user clicks on button, confirmation "do you really want to...?", user clicks "yes", this click unbinds the original click-handler and clicks the button again (which should cause a submit). what/why is not working? indeed you need a special case. this demo won't work, unless you set modal: false. interesting to mention: the original handler (onclick="FooMethod();") is called in modal and non-modal dialog. can anybody help me out? thanks in advance!

    Read the article

  • can't implement jquery jScrollPane to replace browser's scrollbars

    - by Zack
    I am trying to replace browser's scrollbars with jScrollPane (jQuery), it won't work. Here are two attempts to implement it: a basic attempt, and an attempt to imitate the full page demo for jScrollPane. I've been trying everything I could think of to figure out what didn't work, but couldn't. here is my code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> <!-- styles needed by jScrollPane --> <link type="text/css" href="style/jquery.jscrollpane.css" rel="stylesheet" media="all" /> <style type="text/css" id="page-css"> /* Styles specific to this particular page */ html { overflow: auto; } #full-page-container { overflow: auto; } .scroll-pane { width: 100%; height: 200px; overflow: auto; } .horizontal-only { height: auto; max-height: 200px; } </style> <!-- latest jQuery direct from google's CDN --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> <script type="text/javascript" src="script/jquery.jscrollpane.min.js"></script> <script type="text/javascript" id="sourcecode"> $(function () { var win = $(window); // Full body scroll var isResizing = false; win.bind( 'resize', function () { if (!isResizing) { isResizing = true; var container = $('#full-page-container'); // Temporarily make the container tiny so it doesn't influence the // calculation of the size of the document container.css( { 'width': 1, 'height': 1 } ); // Now make it the size of the window... container.css( { 'width': win.width(), 'height': win.height() } ); isResizing = false; container.jScrollPane( { 'showArrows': true } ); } } ).trigger('resize'); // Workaround for known Opera issue which breaks demo (see // http://jscrollpane.kelvinluck.com/known_issues.html#opera-scrollbar ) $('body').css('overflow', 'hidden'); // IE calculates the width incorrectly first time round (it // doesn't count the space used by the native scrollbar) so // we re-trigger if necessary. if ($('#full-page-container').width() != win.width()) { win.trigger('resize'); } }); </script> </head> <body> <div id="full-page-container"> This is the most basic implementation of jScrollPane I could create, if I am not wrong this has all it should take, yet it doesn't work. a little lorem ipsum to make the scrollbars show up: [here come's lot's of lorem ipsum text in the actual page...] </div> </body> </html> The other option is the same, with a link to demo.css and demo.js.

    Read the article

  • method is not called from xhtml

    - by Amlan Karmakar
    Whenever I am clicking the h:commandButton,the method associated with the action is not called.action="${statusBean.update}" is not working, the update is not being called. 1) Here is my xhtml page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> <h:head></h:head> <h:body> <h:form > <p:dataList value="#{statusBean.statusList}" var="p"> <h:outputText value="#{p.statusId}-#{p.statusmsg}"/><br/> <p:inputText value="#{statusBean.comment.comment}"/> <h:commandButton value="comment" action="${statusBean.update}"></h:commandButton> </p:dataList> </h:form> </h:body> </html> 2)Here is my statusBean package com.bean; import java.util.List; import javax.faces.context.FacesContext; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import javax.persistence.Query; import javax.servlet.http.HttpSession; import com.entity.Album; import com.entity.Comment; import com.entity.Status; import com.entity.User; public class StatusBean { Comment comment; Status status; private EntityManager em; public Comment getComment() { return comment; } public void setComment(Comment comment) { this.comment = comment; } public Status getStatus() { return status; } public void setStatus(Status status) { this.status = status; } public StatusBean(){ comment = new Comment(); status=new Status(); EntityManagerFactory emf=Persistence.createEntityManagerFactory("FreeBird"); em =emf.createEntityManager(); } public String save(){ FacesContext context = FacesContext.getCurrentInstance(); HttpSession session = (HttpSession) context.getExternalContext().getSession(true); User user = (User) session.getAttribute("userdet"); status.setEmail(user.getEmail()); System.out.println("status save called"); em.getTransaction().begin(); em.persist(status); em.getTransaction().commit(); return "success"; } public List<Status> getStatusList(){ FacesContext context = FacesContext.getCurrentInstance(); HttpSession session = (HttpSession) context.getExternalContext().getSession(true); User user=(User) session.getAttribute("userdet"); Query query = em.createQuery("SELECT s FROM Status s WHERE s.email='"+user.getEmail()+"'", Status.class); List<Status> results =query.getResultList(); return results; } public String update(){ System.out.println("Update Called..."); //comment.setStatusId(Integer.parseInt(statusId)); em.getTransaction().begin(); em.persist(comment); em.getTransaction().commit(); return "success"; } }

    Read the article

  • Setting Up Local Repository with TortoiseSVN in Windows

    - by Teno
    I'm trying to set up a local repository so that all commitments are copied to the local destination, not a remote server. I followed this tutorial. What I did. Created a folder named "SVN_Repo" under C:\Documents and Settings[user-name]\My Documents\ Right clicked on the folder and chose TortoiseSVN -> Create repository here Clicked OK in the pop up dialog asking whether to create a directory structure. Created a folder named Repos for the local destination, under E:\ Right clicked on the SVN_Repo folder and chose SVN Checkout... Typed file:///E:\repos in the URL of repository field and clicked the OK button. What I got: Checkout from file:///E:/repos, revision HEAD, Fully recursive, Externals included Unable to connect to a repository at URL 'file:///E:/repos' Unable to open an ra_local session to URL Unable to open repository 'file:///E:/repos' I must be doing something wrong. Could somebody point it out? Thanks.

    Read the article

  • Does Dreamweaver subversion support branching?

    - by John Isaacks
    Adobe Dreamweaver added support for subversion in CS4. I have CS5, I am able to update and commit, they even have a very easy rollback option where you can promote any revision number to "head" but I cannot figure out anyway to branch using it. According to Adobe their subversion support is not full featured. But I cannot find any resource that stats what all is supported. So is branching one of the things not supported? (I kind of feel like whats the point without branching?) If you can do it, how?

    Read the article

  • CSS: Horizontal UL: Getting it centered

    - by Steve
    I'm trying to make a horizontal menu/list. It has a mix of independent buttons and buttons that are wrapped in their own individual forms. With much hacking I got all of the buttons, in forms and not in forms to align horizontally. I haven't been able to get the whole thing to center on the page though. Could someone point out to me what I am not seeing? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <link rel="shortcut icon" href="http://localhost:7001/nsd/images/favicon.ico"> <link rel="StyleSheet" href="veci_files/nsd.css" type="text/css"> <style type = "text/css"> #horizontal_li_menu_container ul { margin-left: auto; margin-right:auto; text-align:center; border: 1px solid green; width:1000px; } #horizontal_li_menu_container_ul { list-style-type: none; text-decoration: none; border: 1px solid red; } #horizontal_li_menu_container li { display: inline;float:left; } </style> </head> <body> <div id = "horizontal_li_menu_container"> <ul id = "horizontal_li_menu_container_ul"> <li> <input value="Update" onclick="location.href='#'" name="button" type="button"/> </li> <li> <form name="formExportVECI" method="post" action="exportveci"> <input name="person_id" value="661774" type="hidden"> <input name="submitExport" value="Export To Microsoft Excel" type="submit"> </form> </li> <li> <form id="ufdh" name="formImportVECI" action="importveci" method="post" enctype="multipart/form-data"> <input name="person_id" value="661774" type="hidden"> <input value="Import From Microsoft Excel" path="Upload" type="submit"> <input id="fileData" name="fileData" value="" type="file"> </form> </li> <li> <input value="Search/Home" onclick="location.href='search'" name="buttonHome" type="button"/> </li> </ul> </div> </body></html>

    Read the article

< Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >