User Profile

Collapse

Profile Sidebar

Collapse
Stwange
Stwange
Last Activity: Apr 17 '13, 10:07 PM
Joined: Aug 16 '07
Location: UK
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Stwange
    replied to what is the name of this symbol: < >
    I think the character themselves are called angle-brackets.
    See more | Go to post

    Leave a comment:


  • We can't see your IP address (at least I can't) but you should be able to view your external IP address by going to http://icanhazip.com

    If you want to see your internal IP address (which may be the same depending on whether or not you're behind a NAT), do the following on Windows:
    Start -> Run -> cmd -> type "ipconfig" and it should show similar to the below:
    Connection-specific DNS Suffix . :...
    See more | Go to post

    Leave a comment:


  • Code:
    #!/usr/bin/perl
    print "Content-type: text/html\n\n";
    my $url = $ENV{SERVER_NAME} . $ENV{REQUEST_URI};
    print "<html><body><h2>The URL was $url</h2>";
    print "<h3>The other hash variables available are:</h3><p>";
    foreach (sort keys %ENV) {
            print "$_ = $ENV{$_}<br />";
    }
    print "</p></body></html>\n";
    See more | Go to post

    Leave a comment:


  • Stwange
    replied to help me for writing query in perl
    in Perl
    In Perl, " " interpolates variables, ' ' doesn't, so putting a " " inside a ' ' won't cause the variables to be read. Try this instead:

    Code:
    $sth = $dbh->prepare("SELECT * FROM user WHERE name ='$name' ");
    #or, if you need double quotes in the query:
    $sth = $dbh->prepare("SELECT * FROM user WHERE name = \"$name\"");
    #or
    $sth = $dbh->prepare('SELECT
    ...
    See more | Go to post

    Leave a comment:


  • If you refuse to read the warning messages or the code, you will never be able to fix your "own" work.

    Firstly:
    Code:
    &wirtelogfile("Testing Log file creation");
    You see how this is spelt wrong? It should be &writelogfil e, as the warning tells you.

    Secondly:
    Code:
    sub writelogfile($str){
        open(Wlog,">> $logfile") or die "Can't
    ...
    See more | Go to post

    Leave a comment:


  • Hi,

    If you are looking at using IMAP I recently wrote an article for doing that (and SMSing the result) here: http://black-ops.co.uk/?p=7
    The code is here: http://black-ops.co.uk/openSource/Email2Twitter.p hp5 - it's configured to connect to gmail, but if you manage to find an IMAP interface for hotmail or yahoo it would be a simple modification to the code.
    Let me know if you need any help with it.
    See more | Go to post

    Leave a comment:


  • Stwange
    replied to How to write a SOAP request over HTTPS
    in PHP
    Hi,

    Thanks for your response. I read some of the SOAP methods connect to non-wsdl files, and don't require a function name but I still can't find any such implementations in PHP.

    I did find a way around this though by using a HTTP POST instead, I'll post the solution just in case anyone else needs a workaround:
    Code:
    /* $xml is defined elsewhere as the XML document I want to send */
    $tokenURL = fsockopen('ssl://login.live.com',
    ...
    See more | Go to post

    Leave a comment:


  • Stwange
    started a topic How to write a SOAP request over HTTPS
    in PHP

    How to write a SOAP request over HTTPS

    Hi,

    As part of some work I'm doing I need to send a SOAP request of an xml file ($xml) to https://login.live.com/RST.srf

    I have no idea how to do this and I was hoping someone could point me in the right direction.
    I've tried:
    Code:
    $client = new SoapClient("https://login.live.com/RST.srf");
    $funcs = $client->__getFunctions();
    print_r($funcs);
    to dump a list of...
    See more | Go to post

  • Stwange
    replied to Very Simple Calculator Program Help
    in Java
    What have you tried so far, what is it doing and what were you expecting it to do? You can't just post the assignment here along with the contributed code and expect us to fill the blanks in for you.
    Make an effort, and I'll be happy to help you if you go wrong.
    See more | Go to post

    Leave a comment:


  • Try this (if I understood you correctly):

    Code:
    import java.util.Scanner;
    import java.io.*;
      
    public class MathTutor
    {
      public static void main( String[] args ) 
      {  
        int choice;
        
        choice = printMenu();
        while (choice != 4)
        {
          if ( choice == 1 )
            additionTutor();
          else if ( choice == 2 )
    ...
    See more | Go to post

    Leave a comment:


  • Stwange
    replied to Random problem
    in Java
    Also maybe your loop should be:
    Code:
    while (countA >= 0) {
    because A is zero-indexed (ie. A[0] is a valid element)
    See more | Go to post

    Leave a comment:


  • Stwange
    replied to Random problem
    in Java
    Maybe you should consider using an ArrayList here instead. The logic seems a little flawed and long-winded at times, but most of it looks like it could work. One error (I'm not saying it is the only one) I have identified is this loop:
    Code:
    while (countA > 0){
        int pos = generator.nextInt(A.length);
        B[countB] = A[pos];
        countB++;
        for (int i = pos; i < A.length - 1; i++){
            A[
    ...
    See more | Go to post

    Leave a comment:


  • Stwange
    replied to java replaceAll funtion ??
    in Java
    Nice, much nicer :) I gotta get my head around regular expressions - just took out five books on Perl so that should help :)...
    See more | Go to post

    Leave a comment:


  • Stwange
    replied to java replaceAll funtion ??
    in Java
    Normally I'd complain that you didn't use Google, but the regex documentation isn't exactly fantastic, so I'll let you off.
    This code works (although I didn't do ALL the characters for you):
    Code:
    public class replaceAll {
    
        /* this code has been fully tested, and is operated by "java replaceAll your string here" from the
         * terminal/command prompt.
         * code provided courtesy of TheScripts.com
    ...
    See more | Go to post

    Leave a comment:


  • Stwange
    replied to Looping video with a netstream
    If anyone else has the same problem, you can do the following, where stream is the name of the NetStream object:
    Code:
    //thanks to http://www.tomontheweb2.ca/MakingFireworks/Part3.cfm for the majority of this code. 
    stream.addEventListener(NetStatusEvent.NET_STATUS, loop);
    function loop(event:NetStatusEvent):void{
    	switch (event.info.code){
    	case"NetStream.Play.Stop":
    stream.seek(0);
    }
    ...
    See more | Go to post

    Leave a comment:


  • Stwange
    started a topic Looping video with a netstream

    Looping video with a netstream

    I'm currently loading flv videos in swf using the NetStream, NetConnect(null ) and Video objects, but how do I set the video to autorepeat? I can't find a method for it in any of the APIs for the above, and I don't really want to write code to wait the length of the video before replaying.

    Any suggestions will be greatly appreciated, thank-you.
    See more | Go to post

  • The problem here is that the &_ only concatenates the strings on the two lines
    as though there was no gap between the last character of the first string and the first character of the second string. All you need to do is add a space to either the end of the first string or the beginning of the second string.
    Eg.
    Code:
    " and v.recno = s.invwschrecno" & _
    " and v.invwerID=i.invwerID" & _
    ...
    See more | Go to post

    Leave a comment:


  • Stwange
    replied to How to add prices together.
    Sorry, try this:
    Code:
    Private Sub cmdAdd_Click()
    If Nz(TextQuantity.Value, "") = "" Then TextQuantity.Value = "1"
    If Nz(CmbItem.Value, "") <> "" Then
    Dim rs As DAO.Recordset
    Set rs = DBEngine(0)(0).OpenRecordset("SELECT Cost FROM [Medical Supplies] WHERE Item = '" & removeApostrophes(CmbItem.Value) & "';")
    If Not rs.EOF
    ...
    See more | Go to post

    Leave a comment:


  • Stwange
    replied to Socket Programming in VBA
    That's brilliant mate, and a lot more than I expected!

    Thank-you.
    See more | Go to post

    Leave a comment:


  • Stwange
    replied to how to add several fields in a form
    I don't really have much experience with bounded text boxes, but try updating the field that L1 is bound to instead, and let it update the textbox itself.

    Eg (assuming your table is called VEHICLE, the primary key is REG, which is stored in a textbox called txtReg, and L1 is bound to a field called TOTAL - alter the code accordingly)

    Code:
    dim total as Single
    total = CSng([L1_Driver]) + CSng([L1_Passenger])
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...