AleMonteiro 238 Can I pick my title?

That's the catch... you create the link, hide it, and use JavaScript to click it.

Like this:

window.onload = function() {
    document.getElementById("myLink").click();
};

// Or with jQuery

$(function() {
    $("#myLink").click();
});
AleMonteiro 238 Can I pick my title?
AleMonteiro 238 Can I pick my title?

Sorry, I couldn't understand what you are trying to do and also didn't get your problem.
Please explain better.

AleMonteiro 238 Can I pick my title?

With further evaluation, you could get a little more dynamic...

    var poslow = [1,2,3,4,5,6];
    var poshigh = [7,8,9,10,11,12];


    var popsRounds = [
        [1, undefined, undefined],
        [2, 7, 6],
        [3, 8, 5],
        [4, 9, 4],
        [5, 10, 3],
        [6, 11, 2],
        [7, 12, 1],
        [8, 6, 7],
        [9, 5, 8],
        [9, 4, 9],
        [10, 3, 10],
        [11, 2, 11]
    ];


    // this function displays all the positions on the screen aligned
    // in two rows one row has 1-6 the opposite row has 7-12
    function calculate(round, unshift, push)
    {
        document.write('<p style="color:red;">'+'round ' + round + ' </p>'+"<br/>");
        if ( typeof unshift != 'undefined' ) {
            poshigh.shift();
            poslow.pop();
            poslow.unshift(unshift);
            poshigh.push(push);
        }
        for( j=0, k=0; j < poslow.length, k < poshigh.length; j++,k++)
        {       
            document.write('<p style="color:blue;">'+poslow[j]+" "+poshigh[k]+'</p>');
        }
    }

    for(var i=0,il=popsRounds.length;i<il;i++) {
        var round = popsRounds[i];
        calculate(round[0], round[1], round[2]);

        // Even shorter would be
        // calculate.apply(calculate, popsRounds[i]);
    }
AleMonteiro 238 Can I pick my title?

You can use an <a href="myPage.html" target="_blank">Open It</a>.

And use JavaScript to click it if nedeed.

AleMonteiro 238 Can I pick my title?

I'd go with

SELECT TOP 3 FROM myTable ORDER BY myCol ASC
AleMonteiro 238 Can I pick my title?

I didn't get into the merit about the dating algorithm, but just by condensing your own logic...

    var poslow = [1,2,3,4,5,6];
    var poshigh = [7,8,9,10,11,12];

    // this function displays all the positions on the screen aligned
    // in two rows one row has 1-6 the opposite row has 7-12
    function calculate(round, unshift, push)
    {

        document.write('<p style="color:red;">'+'round ' + round + ' </p>'+"<br/>");

        if ( typeof unshift != 'undefined' ) {
            poshigh.shift();
            poslow.pop();
            poslow.unshift(unshift);
            poshigh.push(push);
        }

        for( j=0, k=0; j < poslow.length, k < poshigh.length; j++,k++)
        {       
            document.write('<p style="color:blue;">'+poslow[j]+" "+poshigh[k]+'</p>');
        }

    }


    // the first round don't pass parameters of unshift so it won't change the indexes
    calculate(1);

    calculate(2, 7, 6);
    calculate(3, 8, 5);
    calculate(4, 9, 4);
    calculate(5, 10, 3);
    calculate(6, 11, 2);
    calculate(7, 12, 1);
    calculate(8, 6, 7);
    calculate(9, 5, 8);
    calculate(9, 4, 9);
    calculate(10, 3, 10);
    calculate(11, 2, 11);


</script>
AleMonteiro 238 Can I pick my title?

Hello, I get it what you are trying to do, but I'd do it a little different...

Try like this:

$(".the-names").live("click", function(){   
    // Gets Ro $(this).closest("tr");

    // Class to handle if the guest was selected or unselected.
    $row.toggleClass("guest-selected"); 

    // Sets the color
    $row.css('background', $row.hasClass("guest-selected") ? 'Red' : 'White');
 });


$("#moveright").live("click", function(){ 
    // Find all rows that were selected
    $(".the-names")
        .find("tr.guest-selected")
            // Clones the rows
            .clone() // If you want to transfers the rows instead of copying, use .detach()
                // Append in the guest-selected list.
                .appendTo("guest-list");
});
AleMonteiro 238 Can I pick my title?

This is not CSharp, it's SQL.
Try using the SQL Forum, and also provide a little more information on what you are trying to do.

AleMonteiro 238 Can I pick my title?

The problem was the charger. Don't know why yet, but I changed it and problem solved.

Thanks.

AleMonteiro 238 Can I pick my title?

Oh bullocks... I tried other games and the problem doesn't occur. They we're not so demanding of hardware, but still, I'm gonna try reinstalling the CS and see what happens.

AleMonteiro 238 Can I pick my title?

Rubberman, it's stop using the charger, I tested it. And if I try playing without the battery, the computer turns off.

But I've been playing this game for years and never had a problem, or even heard anything related.

I don't have any other game installed at the moment to test, but i'm downloading one.

AleMonteiro 238 Can I pick my title?

Hi, i'm in a pickle.

I'm on a Samsung Notebook with Windows 7 installed about 2 years ago.
A couple of days a go my power adaptor stoped working, so I replaced and it all goes well.
One day later, I tried to play CS GO and I noticed that Windows disconnect the charger when the game is open.
If I minimize the game (alt+tab) the battery icon says that there's no charger and that it's consuming battery. But if I wait a couple of seconds and hover the mouse again, it's says that it's charging.

So, if the game in on the screen it's stop charging and start consuming battery (don't find the charger).
If the game is minimized, the charger is found.

Anybody have seem something like this?

AleMonteiro 238 Can I pick my title?

I really didn't get it... The first one is an SELECT and the second a INSERT, how can one become another?

AleMonteiro 238 Can I pick my title?

As far as I know, Junction Table is only a concept. It's the functionality of the table, it's the purpose of the table.
But it's a normal table, with fields, relationships and primary keys if needed.
I don't know any DB Manager that display Junction Tables as any thing different than a table.

AleMonteiro 238 Can I pick my title?

Yes, mattster, it's quite simple =)

Just keep in mind that if you have more than one instance installed on your DB Server, you'll need to enable SQL Browser and use the instance to connect.
Examples:

  • 192.168.0.120\SQLServer2008InstanceName
  • 192.168.0.120\SQLServer2005InstanceName
  • 192.168.0.120\SQLServer2003InstanceName

Another thing to bare in mind is the login method. If you're going to use Windows Authentication you'll need to use a valid user account in the DB Server.
Example: If you are using ASP.NET hosted on IIS:

<identity impersonate="true" 
          userName="dbserverdomain\username"
          password="password"/>

If you're going to use SQL Server Authentication, it's quite simpler, just set User Id and Password at the connection string.

AleMonteiro 238 Can I pick my title?

Envato is really nice, I never published anything, but I bought a pretty Adobe After Effects template and a great song to go in the background. Works wonders.

About w3schools certification, I'd say it's nice to test yourself. I got 96% in JavaScript and got really excited about it =)

mattster commented: nice one! +4
AleMonteiro 238 Can I pick my title?

Certifications may help but I don't think they are essential at all.

What gives you credit on the web is what you have done for the web.
If you have a beautiful and fufilling portfolio it will be credit enough.

Of course that a pretty portfolio doesn't mean much if your clients and users complain about you and don't give good recommendations.

If you are starting, get a few small jobs with your friends and acquainteds. Don't charge much, in the begning it's more important to get experience and portfolio.

Good luck.

AleMonteiro 238 Can I pick my title?

Hello there.
If you seeking help in a JS forum, try to post the final HTML and JS code. Not PHP code.

About the dialog, try using jQuery UI, it's quite simple.

http://jqueryui.com/dialog/#modal-form

AleMonteiro 238 Can I pick my title?

Mattster, yes, you can access SQL Server with C# in your home, office or internet.

The PC with SQL Server installed must have the firewall settings to permit the connection.

AleMonteiro 238 Can I pick my title?

Use

editor.insertContent( '[tooltip class="' + e.data.listboxClassName + '" title="' + e.data.textboxtooltipName + '"]  ' + getSelectionHtml() +  [/tooltip]');

And you getSelectionHtml function should return the text.

function getSelectionHtml() {
    var html = "";
    if (typeof window.getSelection != "undefined") {
        var sel = window.getSelection();
        if (sel.rangeCount) {
            var container = document.createElement("div");
            for (var i = 0, len = sel.rangeCount; i < len; ++i) {
                container.appendChild(sel.getRangeAt(i).cloneContents());
            }
            html = container.innerHTML;
        }
    } else if (typeof document.selection != "undefined") {
        if (document.selection.type == "Text") {
            html = document.selection.createRange().htmlText;
        }
    }
   return html;
}
AleMonteiro 238 Can I pick my title?

You're welcome.

Just mark as solved =)

AleMonteiro 238 Can I pick my title?

I don't think you can have line breaks inside a string.

AleMonteiro 238 Can I pick my title?

Use a JSON validtor to help you find the problem(s).

http://jsonlint.com/
http://jsonformatter.curiousconcept.com

There's lots of others.

AleMonteiro 238 Can I pick my title?

Check out the comments

if(document.getElementById('prof_level-'+validation_index).value == '')
            {
                alert("Please Profecency level ");
                // If prof_level-'+validation_index is the ID, then you missed the # ('#' is the jquery selector for ID)
                $('#prof_level-'+validation_index).css({'background':'red'}); // it is not working
                return false;
            }
            if(document.getElementById('exp_year-'+validation_index).value == 0 && document.getElementById('exp_months-'+validation_index).value == 0)
            {
                alert("Please select experience. Should have at least 1 month exp. ");
                // instead of focus highlight the field
                document.getElementById('exp_months-'+validation_index).style.background = "red" // Obs. I don't remember if 'style' is captioned ('S') or not, I think in some older browsers it were
                                                                            // or backgroundColor
                return false;
            }
AleMonteiro 238 Can I pick my title?

Do you have it published somewhere? You can just type the url in the browser and see if it works.

If you want to publish local for tests only, whar SO do you have? If Windows host on IIS, if linux or mac try Apache.

AleMonteiro 238 Can I pick my title?

Do you have this published somewhere for me to check it out? I'm having a hard time trying to figure it out.

AleMonteiro 238 Can I pick my title?

LNU1, ListViewActivity onClick is not an OnClickListener object, it's an method.

On ListViewActivity, create a listener like

public OnClickListener myClick = new OnClickListener() {
    ...
};

And then use ctx.myClick

AleMonteiro 238 Can I pick my title?

Something like this?

namespace generics1
{
    public class B
    {
       public void methodA()
        {
        }
    }
    public class A<T>
    {
        // Hold reference to B
        public T myObject {get; set;}

        // Constructor to recieve B
        public A<T>(T obj)
        {
            this.myObject = obj;
        }

        // Call methodA from B
        public void callMethodA()
        {
            ((B)this.myObject).methodA();
        }

        public void methodB()
        {
            base.MemberwiseClone();
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            B objB = new B();
            A<B> objA = new A<B>(objB);
        }
    }
}
AleMonteiro 238 Can I pick my title?

It's printing twice because you're calling it twice..

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        worker1 = New Thread(AddressOf test)
        ' Logging "test" for first time
        worker1.Start() 
        ' Logging "Ready"
        log(logconsole, "Ready")
        'Logging "test" for second time
        test() 
    End Sub
robert.knighton.79 commented: thanks! I thought it had to be something silly like that! +0
AleMonteiro 238 Can I pick my title?

You could remove the left and bottom border with css.

border-left: none;
border-bottom: none;
AleMonteiro 238 Can I pick my title?

It's not important in wich class your listener is, what's important is in wich context it'll run.

This is not exactly what you are doing, in part because I didn't understand it all, but this may help...

class Parent extends Activity
{
    public Button btnTest;
    public Child objChild;

    void onCreate() {
        btnTest = findView..

        objChild = new Child();

        // Any of the tree options should work

        btnTest.setOnClickListener(myClick) // Parent Listener
        btnTest.setOnClickListener(objChild.myClick); // Child Listener
        btnTest.setOnClickListener(AnotherStatic.myClick); Static Click

    }

    OnClickListener myClick = new OnClickListener() { ... }
}

class Child 
{
    public OnClickListener myClick = new OnClickListener() { ... }
}

class AnotherStatic
{
    public static OnClickListener myClick = new OnClickListener() { ... }
}

The other way is also true, if you have the button property is public, any class with access to it could set the listener.

AleMonteiro 238 Can I pick my title?

Yeap, I can't understand =x Try drawing maybe?

AleMonteiro 238 Can I pick my title?

You have to append the listener to the input:

$("input").keydown(function(event){
        if(event.keyCode == 9 ) {
          event.preventDefault();
          return false;
        }
      });
AleMonteiro 238 Can I pick my title?

You should really take in consideration what Taywin and Airshow said.

Nevertheless, try this:

//make all fields disbaled
$("#youTableID").find("input:text").attr("readonly", true);

// make only this tr editable
$("#tr-"+(disable_row)).find("input:text").removeAttr('readonly');

And when generating the tr

<tr id=tr-<?echo $tr_id; ?> >

And another thing, there's no such input type textbox, it's just text

<input type ="text" />
AleMonteiro 238 Can I pick my title?

What kind of error are you getting?
Try using developer console to analyse the http request(often in Network tab).
Also, use the $.ajax method so you can get an error callback to debug it.

Example

var msg, outcome;

if (all==1){ wn++; msg ="You won, congratulations!";  outcome = "won" }
else if (all==2){ ls++; msg ="Gotcha!  I win!";  outcome = "loss" }
else if (all==2){ ts++; msg ="We tied.";  outcome = "tied" }

alert(msg);

$.ajax({
    type: "POST",
    url: "update_scores.php",
    data: { outcome : outcome },
    success: function(data, textStatus) {
        console.log("Request Result: " + textStatus);
    },
    error: function(event, jqXHR, ajaxSettings, thrownError) {
        console.log("Request Error: " + thrownError);
    },
    dataType: dataType
});

And a simplification of your php script

$outcome = $_POST['outcome'];
$upate = "";

if($outcome == "won") { $update = "`won`= `won` + 1" }
else if($outcome == "lost") { $update = "`lost`= `lost` + 1"; }
else if($outcome == "tied") { $update = "`ties`= `ties` + 1"; }

mysql_query("UPDATE `playerdb` SET ". $update . " WHERE `user` = '$username'");
AleMonteiro 238 Can I pick my title?

The code seems alright... I tried this and it worked

<a href="#resume">
        <img src="http://i.msdn.microsoft.com/dynimg/IC86155.gif" onmouseover="this.src='http://arquivo.devmedia.com.br/artigos/Renato_Groffe/GAC/GAC4.jpg'" onmouseout="this.src='http://arquivo.devmedia.com.br/artigos/Renato_Groffe/GAC/GAC3.jpg'" alt="RESUME" />
    </a>

What browser are you using? Does it throw any errors?

AleMonteiro 238 Can I pick my title?

It's not clear for me yet... Is your map inside an HTML Page using JavaScript functions?

AleMonteiro 238 Can I pick my title?

Wich Google Maps API are you using? ActionScript or JavaScript?

If you are using JS, try destroying before the page is closed with onbeforeunload event.

Another way is to call JS functions from within AS to destroy properly the map.

I'm assuming that only the map is still visible, because if the whole map page is visible, then you're missing something in your transitions.

AleMonteiro 238 Can I pick my title?

Go get it man!

You'll probable have some problems, but there's always a way.
Use developer console to debug the ajax request params and return.

Good luck =)

AleMonteiro 238 Can I pick my title?

You should use the DataGrid events for editing, like CellEndEdit or CellValueChanged.

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellvaluechanged(v=vs.110).aspx

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellendedit(v=vs.110).aspx

AleMonteiro 238 Can I pick my title?

I'd started by the simpliest thing...letting the user write the SQL query.
After you have the writing, saving, editing and viewing the query working good, then you can create an UI to create the report with drag & drop so the user don't have to know SQL.

AleMonteiro 238 Can I pick my title?

Are you removing the embed map when you exit the page? All of yours pages are in frames?

Anyway... why are u developing an website in flash?

AleMonteiro 238 Can I pick my title?
AleMonteiro 238 Can I pick my title?

Oh, sorry for the delay.

I suggest you use jQuery and to do it nicely.

This guide should get you throught it:
http://blog.teamtreehouse.com/beginners-guide-to-ajax-development-with-php

AleMonteiro 238 Can I pick my title?

That's exactly what I posted. =)

AleMonteiro 238 Can I pick my title?

That's probably because your method returns an int.
Try this:

public string Execute_SQL(string select)
        {
            ConnectiontoSQL();
            string Query = "select " + select + " from jobSearch where searchID = 1";
            DataSet ds = SelectSQL(Query);
            if ( ds.Tables[0].Rows.Count > 0 ) { // Found something
                // Returns the first cell of the first row
                return ds.Tables[0].Rows[0][0].ToString();
            }
            // Exit code for no item found
            return "-1";
        }
AleMonteiro 238 Can I pick my title?

ggamble is right... I assume that you were selecting an int, because you was already converting.

If the value is 'monster.co.uk' you can't convert it, just use .ToString().

AleMonteiro 238 Can I pick my title?

I don't know much about access but try

cmb.CommandText = "DELETE * FROM Food WHERE FNo=" & x
AleMonteiro 238 Can I pick my title?

Just guessing...You're trying to catch an SQLLiteExcepion, but what if another occurs? Also, you are missing the exception name.
Try catching any exception.

 try
            {
                m_dbConnection = new SQLiteConnection("Data Source=MyDatabase.sqlite;Version=3;Password=password");
                m_dbConnection.Open();
            }
            catch(Exception ex)
            {
                MessageBox.Show(String.Format(@"Erro: {0}
StackTrace: {1}", ex.Message, ex.StackTrace));
            }