AleMonteiro 238 Can I pick my title?

Hey fellas,

some time ago I started trying out Brackets, and guess what? Loved it!

If you don't know, it's an open soude editor made out of html, css and javascript, powered by node JS and chromium and sponsored by Adobe.
A lot of open sources projects coming together to make a beautiful IDE.

And it's made of sutuff we know about, so it's possible to tweak and improve and mess things out.

Anyway, the play was so fun that it turn out to be an SQL Browser Extension.

If you use brackets you should check it out: https://github.com/alemonteiro/brackets-sql-connector

It's only on the beggining, but the possibilities are inumerous =)

And I tell you, it's a beautifull mess coding the extension on the extension IDE and debugging it like it was an browser, I get confused some times yet =x.

Have a good week!

almostbob commented: your project works excellently +0
AleMonteiro 238 Can I pick my title?

Oh boy! I wish I could!
But you know, I still need to maintain an VB.NET using Visual Studio 2008. Can't even update it to newer IDE's because of client restrictions =/
TI on enterprise networks hurts my soul.

But I just got an new HDD, so this weekend I begin building my Linx Dev Env =) Wish me luuuuuck ^^

I'm gonna start with Debian for now, i'm concered with Arch stability.
Thanks all for the inputs.
I'm just gonna leave this open for a while, so I can post the results back to you.

Wish a happy holliday to you all!

AleMonteiro 238 Can I pick my title?

You're welcome.
Just mark the thread as solved please. You can create a new one if you need futher assistence.

Cheers!

AleMonteiro 238 Can I pick my title?

If i'm not blind i think your code is correct... Now you take that full sql query string and query it with @mysql_query() or @mysqli_query() or whatever extension you're using.

About string concatenation, there's others methods to do it too, the simpliest I think being this:

$sql = "SELECT * FROM servers WHERE server_id = '{$_SESSION['server_id']}'";

You can see other forms here: http://php.net/manual/en/language.types.string.php

And about MySQL Querys here: http://php.net/manual/en/function.mysql-query.php

Happy reading =)

AleMonteiro 238 Can I pick my title?

You can just take apart the URL page and the params, like this:

function LoadYearMakeModelUsingAutoVin(controlItem, dataSourceUrl, postParams) {
    ...

    var xmlHttp2 = new XMLHttpRequest();
    xmlHttp2.open("POST", dataSourceUrl, false);

    //Set proper header data
    http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    http.setRequestHeader("Content-length", postParams.length);
    http.setRequestHeader("Connection", "close");

    xmlHttp2.send(postParams);

    ...

}

//And use it like
LoadYearMakeModelUsingAutoVin(controlId, 'RequestXml.aspx', 'name=GetVehicleInfoUsingVinCanada&VinOrSerialNumber=' + vinOrserialnumber);

Or you could use FormData also:
https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects

AleMonteiro 238 Can I pick my title?

I'm a little bit confused by what you're saying, but let me try to explain to you how it works:

When the browser request newspaper.com/sports, the WebServer (IIS or Apache or etc) will first see if there's any Rewrite Rules that match /sports.

If there's no rule that match /sports, then the WebServer will think that /sports is an directory (because there's no extension and the WebServer handle each requested file by it's extension, so it knows what and how to treat the file - extensions are related to MIME Type configs and Module Handlers).

If the directory /sports exists, then the WebServer will try to find the default document for that directory (index.html, default.aspx, index.php and etc). If the default document exists (default document configuration and also the physical default doc), then the WebServer will parse this file and return it's content.

If the directory /sports exists but there's no default document, then WebServer will either list the directory contents (if the WebServer is configured to do so) or it'll return the error 403 - 'Directory Listing not Permitted'

Last but not least, if the directory doesn't exists at all the WebServer will return 404 - 'Not Found'.

If you don't know them, rewrite rules make possible /sports to be redirect to /sports.html or even /sports/volley to /sports?id=volley.
Rewrite rules are very usefull. Most sites that have friendly urls use rewrite rules.

Anyway, to help you out you need to show us what 'code' are you seeing instead …

AleMonteiro 238 Can I pick my title?

It's been a while, but just to register the solution:

Visual Studio 2008 didn't show, but there was two references on the .csproj file and that's what caused the problem, editing the file and removing the second reference was the only solution.

Thanks for all that helped.

AleMonteiro 238 Can I pick my title?

You're welcome.
Just close the topic please. If you have futher questions you should open a new one =)

AleMonteiro 238 Can I pick my title?
google.maps.event.addListener(autocomplete, 'place_changed', function() {
    var place = autocomplete.getPlace();
    if(place.address_components !== undefined && place.address_components.length > 0 ) {
        // selected option
    }
    else {
        // just typed and hit enter (no option selected)
    }
});
AleMonteiro 238 Can I pick my title?

Thanks guys. I think it's possible to make the move using an Win VM for what anything that isn't going well on linux.
I will even keep my current HD and if needed, could even be run as an VM box also (Really usefull this by the way: http://www.serverwatch.com/server-tutorials/using-a-physical-hard-drive-with-a-virtualbox-vm.html)

@Freshly, I took a look at Arch, but i'm concerned about stability using a rolling distro for a development environment. Don't you get stuck sometimes?

For now i'm thinking going

Gribouillis commented: Interesting link +14
AleMonteiro 238 Can I pick my title?

You can't prevent the user from just typing and hitting enter, but you can know if he picked an option or not.

From google docs about place_changed event:

This event is fired when a PlaceResult is made available for a Place the user has selected. If the user enters the name of a Place that was not suggested by the control and presses the Enter key, or if a Place detail request fails, a place_changed event will be fired that contains the user input in the name property, with no other properties defined.

So you can just check if any properties other than name are filled, if they aren't it means that the user didn't selected a option.

https://developers.google.com/maps/documentation/javascript/reference#Autocomplete

AleMonteiro 238 Can I pick my title?

This really looks like could be in a homework text book, lol. Hope not btw.

AleMonteiro 238 Can I pick my title?

Thanks for the input guys, but just to be clear, I've already tested some distros on virtual boxes and USB Sticks, but I've never created, let's say, a complete envirioment.
So i'm looking more for recommendations on distros/packages than on how to test them =)

I've used mostly Debian on vbox to take a look at the deep web with tor, test a little bit of bitcoin and encrypted emails.
I've used a bit of Kali on USB stick to play with HD and Wireless attacks (just playing on my stuff for knowlodge and fun ^^)
And I tested various Mints with different interfaces to feel a little bit of what it's going on.

But there are so many options, many that I probably don't know about, and that's why recommendations from developers that use linux are so important.

Thanks again and have a good day.

AleMonteiro 238 Can I pick my title?

Which bootstrap multiple select plugin are you using? Doens't look like anyone I know.

Any how, your select is missing multiple='multiple'

AleMonteiro 238 Can I pick my title?

Hey fellas.

I've been using Windows as my main OS since I sat on an PC with win 95. Now I think is time to finally change to Linux!

The main reason I didn't change sooner was because the .NET dev env, but now there's Mono.

So, I really would like some suggestion about what distro and desktop interface to use.

What do I use PCs for:

  • Web Dev (.NET, PHP)
  • Android Dev
  • DataBase Managing (MySQL & SQL Server)
  • Little Bit of Design(Photo edit, vectors and very little movie editing)
  • CS GO (Steam Game)
  • Security Tests (With Kali)
  • Basic Stuff (Web,Docs,Music,Movie,Pics...)

I've been playing with distros on virtual boxes and pen drivers for a while, including Ubuntu, Debian, BackTrack, Kali, SlackWare and Mint.

I don't like dual boot too much, so the most important question, do you guys think I would be OK with Linux as my main OS using virtual box or wine for a few things(like SQL Server Management Studio) ?

If yes, what distro and desktop do you recommend?

Any other tips, remarks or suggestions are welcome.

Oh, also would like to confirm somehting... If I choose Debian, can I get any functionallity on Kali just by installing the packages needed, right?

Thanks!

AleMonteiro 238 Can I pick my title?

I think the best option to you is to check if the user is already in the database.

Basically you could only update your insert query to be something like this:

IF ((SELECT Count(*) FROM USERFollow WHERE UserName = @UserName AND FriendUserName = @Id ) > 0 )
Begin
    UPDATE USERFollow SET Status = 0 WHERE UserName = @UserName AND FriendUserName = @Id 
end
Else
Begin
    Insert INTO USERFollow (UserName,FriendUserName,Status) values (@UserName,@Id,1)
End

You can also make the select separatly, get the result in C# and make the decision there. But I think it's cleaner doing it all one the SQL Query.

And one remark, you shouldn't use DataSet to make an insert or update, DataSets are for data retrieval. For executing commands, just use cmd.Execute().

AleMonteiro 238 Can I pick my title?

PHP is executed when there's a request. Normally the first request comes from the browser when the user type the url and hit enter.

Cron jobs and Windows tasks acts like an hidden user that will request that URL at that time, making it execute whenever it's setted to.

If you want to do it ONLY with PHP you'll need to leave a tab on your browser open forever, and the PHP of the page will stay redirecting to itself forever.

It works? It does but if you close your tab it'll stop.

AleMonteiro 238 Can I pick my title?

I can't say much because I've never actually used one, I've ended up creating my own solutions for each need, but I was helping my brother start with web dev to make a site for our father knife business and he decided to use the Slick Plugin: http://kenwheeler.github.io/slick/

Was one of the easist to implement by a non developer and had great reviews on fuctionality and performance.

Take a look at the result: http://nonomonteiro.com.br/available/fc_gyutsend/

The top carrosell and the knife photos are two different instances of the slick plugin.

Hope it fits for you.
Cheers.

AleMonteiro 238 Can I pick my title?

If you bind 'contextmenu' event that only capture right clicks, like:

// FROM https://api.jquery.com/contextmenu/
$( "#target" ).contextmenu(function() {
  alert( "Handler for .contextmenu() called." );
});

Or you can listen to mouse down, like this:

$('#element').mousedown(function(event) {
    var button = event.which || event.button;
    switch (button) {
        case 1:
            alert('Left Mouse button pressed.');
            break;
        case 2:
            alert('Middle Mouse button pressed.');
            break;
        case 3:
            alert('Right Mouse button pressed.');
            break;
        default:
            alert('You have a strange Mouse!');
    }
});

Or you can use some plugins for context menus if that what you want:
https://plugins.jquery.com/tag/right-click-menu/

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

I didn't understand why you got a For loop... This should work (i assumed you got an txtPeriod for entering the date)

Dim dtStart As Date = dtploanstart.Value
Dim intPeriod as Integer = CInt(txtPeriod.Text)
Dim dtEnd = dtStart.AddDays(intPeriod);
AleMonteiro 238 Can I pick my title?

@TextWiller, you forgot the '#' on the jQuery selectors.
But since you're using jQuery, I think this is better:

    <select class="whatched_select" >
    <option value="1">one</option>
    <option value="2">two</option>
    </select>
    <select class="whatched_select" >
    <option value="1">one</option>
    <option value="2">two</option>
    </select>
    <script type="text/javascript">
    $(function() {
        var $selects = $(".whatched_select");
        $selects.change(function() {
            if ( $selects.eq(0).val() == $selects.eq(1).val() ) {
                window.location = "http://redirectpage.com.br";
            }
        });
    });
    </script>
AleMonteiro 238 Can I pick my title?

I just tried on my IE v11.0.9600.18205 (on Widows 8.1) and it's working with no glitchs. No "auto scroll" happening.

Can you post the HTML and CSS of the banner and arrow?

In any case, the first thing that jumped into my mind was this: Try changing the position of the arrow from relative to absolute. If the arrow position it's absolute inside the banner content, them it won't affect any other object on the page, which may resolve the scrolling issue.

AleMonteiro 238 Can I pick my title?

There's a quite simple "workarround" for this. Just put a div on the bottom to act like an "fader".

Take a look on a simple example: https://jsfiddle.net/alemonteiro/ffko2g45/1/

The background on the fader div could be just an rgba(255, 255, 255, 0.5), but I tought an actual gradient would look better.

Anyway, you can change the background to improve it's look.

AleMonteiro 238 Can I pick my title?

Oh boy, you got a lot to learn, it'll be fun.

First of all I suggest you to read about basic fundamentals of the web: http://www.tutorialspoint.com/web_developers_guide/web_basic_concepts.htm
http://pt.slideshare.net/lemiorhan/fundamentals-of-web-development-for-nondevelopers

Then, if you don't know it, you should learn HTML and a little of CSS (javaScript can come latter) :
http://www.w3.org/MarkUp/Guide/
http://www.w3schools.com/html/default.asp

Then you should learn about basic programming concepts (vars, methods, ifs, loops and etc.):
https://msdn.microsoft.com/en-us/library/orm-9780596521066-01-03.aspx
https://msdn.microsoft.com/en-us/library/ms379606%28v=vs.80%29.aspx
https://msdn.microsoft.com/en-us/library/orm-9780596521066-01-01.aspx
Obs.: I've assumed that you'll use C#

Since you're starting with ASP.NET it'll be good to have a basic knowlodge of OOP (Object Oriented Programming) too:
https://msdn.microsoft.com/en-us/library/dd460654.aspx

If you can handle the HTML you want and if you got a basic knowlodge of web servers and a basic notion of programming, then you can start with ASP.NET (or any other server side language):
http://www.asp.net/get-started
http://www.w3schools.com/aspnet/

Oh, you can also setup your env while you read to test somethings out:
https://www.visualstudio.com/en-us/get-started/overview-of-get-started-tasks-vs.aspx
https://msdn.microsoft.com/en-us/library/ms165079.aspx

Happy reading =)

AleMonteiro 238 Can I pick my title?

As hericles said, you'll still use HTML/JS/CSS for the front-end but you'll need a server side script to send the e-mails. I also suggest PHP because it's simple to install, develop and deploy.

Here a well detailed tutorial on what you want using PHP: http://www.tutorialspoint.com/php/php_sending_emails.htm

AleMonteiro 238 Can I pick my title?

Do have experience with programming and with web? Or this will be your first experience with them?

Any way, you can check out some sample projects in asp.net:

https://msdn.microsoft.com/library/ee332498%28v=vs.100%29.aspx

http://aspnetboilerplate.com/Samples

Good luck

AleMonteiro 238 Can I pick my title?

If you doubt is who to know when to send an email, i see two options for you:

  1. Use cron jobs that will run at specific intervals, identify the new records and send the e-mail. This way you can do it easily with PHP but you'll need to have some flag to know if that record was already mailed or not.

  2. Use a trigger on your SQL Server that will run and external command (probably call your PHP mailing page) each time a record is created.

AleMonteiro 238 Can I pick my title?

Hello timtim, welcome to the web dev world.

My default web apps now a days use at least the following libs:

  • jQuery
  • jQuery UI
  • Bootstrap

For charts: HighCharts
For Icons(just css): Font Awesome

But there's lots of good and rich libs and frameworks out there. Each one has its pros and cons and depending on what you want to do one can be better than another.

I suggest reading some reviews to see what fits best for you.

http://noeticforce.com/best-Javascript-frameworks-for-single-page-modern-web-applications

http://www.sitepoint.com/top-javascript-frameworks-libraries-tools-use/

Good luck
and welcome once more.

timtim1 commented: Thanks a lot AleMonteiro.Looking foward to learn more on this exciting area. +0
AleMonteiro 238 Can I pick my title?

Why don't you define a parameter like albumId on your GetSlides method? Then you can do something like

AjaxControlToolkit.Slide[] slides;

if ( albumId == 1 ) {
     slides = new AjaxControlToolkit.Slide[6];
     // ... fill slides
}
else {
     slides = new AjaxControlToolkit.Slide[10];
     // ... fill slides
}

return slides;
AleMonteiro 238 Can I pick my title?

You said that F_Get_Desc is a function, but you're trying to call it as an stored procedure.

Try using CommandType.Text instead.

AleMonteiro 238 Can I pick my title?

Just so you know:

$('#value') // jquery object
//set value as
$('#value').val(1);

$('#value')[0] // DOM object
// so you can also set the value as
$('#value')[0].value = "1"; // This is not recommended, it's just to show that jQuery objects relay on the DOM object itself
AleMonteiro 238 Can I pick my title?

Or you can just use the change listener instead of the click. When the change is fired the checkbox state has already been updated.

AleMonteiro 238 Can I pick my title?

Modern browsers have disabled applet support and Oracle already announced that Java Applets will no longer be needed and so it'll be discountinued.

The best option is to find some alternative for the applet.

AleMonteiro 238 Can I pick my title?

It's realoding the page because your button it's a submit button, that means it will submit your form to the action url.

Just change the button type from submit to button and it should work as expected.

<input type='button' value='Basic search' onclick="i2b2.BLAST.jsFunction()">
AleMonteiro 238 Can I pick my title?

I suggest using jQuery validation plugin, quite easy to use and really helpfull: http://jqueryvalidation.org/

AleMonteiro 238 Can I pick my title?

Was this the one you tried? http://jqueryvalidation.org/

It works great. You just have to config it properly. ie.: you need to add required to the textboxes that are required and for int you should use the 'digits' validation, like this example: http://jqueryvalidation.org/digits-method

Good luck and cheers!

AleMonteiro 238 Can I pick my title?

You can't. But let me explain.

First, the function onloadCallback does not have any return. You can make it return true or false, but this value will never respect the ajax result.

When you call onloadCallback you get the return right away, because it's returns before the ajax is completed. Once the ajax is completed the return inside the 'success' callback will not be return to whoever called onloadCallback.
To make this work you need to add a callback parameter on onloadCallback.

Something like this

var onloadCallback = function (pCallBack) {
            grecaptcha.render('dvCaptcha', {
                'sitekey': '<%= ReCaptcha_Key %>',
                'callback': function (response) {
                    $.ajax({
                        type: "POST",
                        url: "product-info.aspx/VerifyCaptcha",
                        data: "{response: '" + response + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (r) {
                            var captchaResponse = jQuery.parseJSON(r.d);
                            if (captchaResponse.success) {
                                $("[id*=txtCaptcha]").val(captchaResponse.success);
                                $("[id*=rfvCaptcha]").hide();
                                pCallBack.call(pCallBack, true); // callback true
                                // return true; // this return won't do a thing
                            } else {
                                $("[id*=txtCaptcha]").val("");
                                $("[id*=rfvCaptcha]").show();
                                var error = captchaResponse["error-codes"][0];
                                $("[id*=rfvCaptcha]").html("ReCaptcha error. " + error);
                                pCallBack.call(pCallBack, false); // callback false
                                // return false; // this return won't do a thing
                            }
                        }
                    });
                }
            });
            return false; // This would be the return of the function, but here you don't know the result yet.
        };
AleMonteiro 238 Can I pick my title?

I agree that hiding the destination link it's not a good ideia, but anyway, here's a way you can count the clicks:

https://jsfiddle.net/alemonteiro/5pqb8dz3/1/

AleMonteiro 238 Can I pick my title?

Here you can find any connection string that you may need: https://www.connectionstrings.com/

And here you can check out how to use them properly on asp.net: https://www.connectionstrings.com/store-connection-string-in-webconfig/

Cheers!

AleMonteiro 238 Can I pick my title?

It's easier if you get all the data in a single json but the band consumption is lower if you don't load the same data twice.
If some data(one address for example) is the same for various records(family members in this case) you can get it as a stand alone json and them link them with the family menbers on yout UI.
This way the bandwith consumption will be lower but the processor consumption will be higher.
I'd take apart the data if yours users have decent machine and browsers.
I say so because I once tried to do a rich UI with JS on a project that was used by old pcs on IE 7. Guess what? It crashed a lot. In that case more bandwith consumption and less processor was the key to success.

AleMonteiro 238 Can I pick my title?

Your error is not when setting the image, is getting the ImageView object.

R.drawable.kare is not the ImageView Id, it's a drawable.

If you get the ImageView correcly then you can use setBackgroundDrawable or setImageBitmap instead of setBackgroundResource.

AleMonteiro 238 Can I pick my title?

One way you can do it it's by defining two layouts, one for portrait and another for landscape.
Basically you need to create a new layout folder named layout-land/ and put the xml for landscape there.

For more info: http://developer.android.com/intl/pt-br/training/basics/supporting-devices/screens.html

AleMonteiro 238 Can I pick my title?

Just a note: the function 'executeFunction' is not executing anything. In your code, the argument recieved as otherFunction in the executeFunction will be the return of execution of the defined function otherFunction.

AleMonteiro 238 Can I pick my title?

Are you talking about a link inside a InfoWindow?
Take a look at this link, it may help: https://developers.google.com/maps/documentation/javascript/examples/infowindow-simple

AleMonteiro 238 Can I pick my title?

There's no magic to be done. You should load at first what you'll display right on to your users, details can be loaded latter.
Example: If your home screen is just the family members names, there's no need to load all the data at once.
If you need to click on a button to see the phone numbers, the phones can be loaded alone.
It's all about finding the best cost/benefit for your app.

AleMonteiro 238 Can I pick my title?

Hello my friends, I'm re-thinking my project and I'd like some opnions...

Goal: An WebServer/Stream Server easially deployed in any Windows or Linux(Using Mono), with no dependecy on previous installed software(except for Mono).

The basic app usage: The user will be able to select multiple folders(with music, videos and photos) and give it a name. This selection of folder will be served by the app as an web page with it's content displayed, once the user viewing this page selects an midia, it starts the streaming.

Some history...I started this project in asp.net and was able to do it all, because IIS 7+ handles all the streaming nicely, but this wouldn't be used by many non-IT people, I think.

So I decied to try something with no dependencies... and began tinkering with custom HTTP Server, based on this open source: https://github.com/jeske/SimpleHttpServer
And the HTTP it's almost done, resolving paths and simple mime-types like html, css and js. I mean, I could already serve a simple website with it.

My problem really began with streaming! And I'm kind of stuck on it. I saw a great deal of examples of how to do it with vlc, iis, voice chat .net to .net but I wasn't able to find much about streaming midia to web(only with asp.net).

The basic question is: How do I stream with C# so that an URL like http://localhost:1234/some.mp3 starts playing in the browser

I thought about using SoundPlayer, but I …

AleMonteiro 238 Can I pick my title?

I never saw it, and did no research, but at the topt of my head I'd say: No.

But you can always split the word with something like:

<p>Wo<b>rd</b></p>
AleMonteiro 238 Can I pick my title?

Glad to know that you work it out yourself, and it was pretty quickly! =)

Pls, just mark the tread as solved =)

AleMonteiro 238 Can I pick my title?

About jQuery... if you don't, you should have a good base of knowlodge about JavaScript. If you undertand JS well, you'll take much more advantages of jQuery.
After that, one of the best ways to extend your knowlodge of it, it's to extend jQuery itself! Creating a well organized and reusable plugin is a good chalange that will give you lot's to research about.