Posts by KaduAmaral • 11,472 points
313 posts
-
4
votes1
answer1433
viewsA: Check server uptime with Node.js
Solution 1 No status code I’m not a Node.JS programmer, but I believe a ping would solve your problem. A quick Google search found the package net-ping. var ping = require ("net-ping"); var session…
-
2
votes3
answers944
viewsA: Calculus in Javascript
Remove all points and commas from the string making it whole, then divide by a hundred, bringing the decimal places in numerical form. jQuery(document).ready(function($){…
jqueryanswered KaduAmaral 11,472 -
4
votes1
answer42
viewsA: Functions.php or functions.fcn
For PHP there is no difference, you can include a file .php, .html, .phtml, .fcn, .class, .tpl, .anything. What matters is whether it is a text file. If inside that text file you have the PHP tags…
phpanswered KaduAmaral 11,472 -
2
votes1
answer157
viewsQ: Ftpwebresponse.Getresponsestream returning an HTML
I am performing FTP connection, with the FtpWebResponse of c#. So far so good, I’m listing the directories as per this answer. When I simulate an FTP server locally with Filezilla Server included in…
-
1
votes3
answers1631
viewsA: How to add Directory to the Windows Path variable during installation?
The visual-studio-2013 does not have a generator Setup (Only the Publish), as had the visual-studio-2010. That’s why I used the extension Installer Projects. After installing the extension, I added…
-
4
votes3
answers260
viewsA: Create a real "loading..."?
I have already created it as follows. In the page header, I place all CSS files and jQuery and the page footer before closing the tag body add the rest of the scripts and an embedded script, as in…
-
6
votes3
answers1631
viewsQ: How to add Directory to the Windows Path variable during installation?
I developed an application like Console in C# with Visual Studio 2013 and wanted the installer to add the solution directory in the variable Path Windows, during installation. Is this possible? What…
-
0
votes2
answers114
viewsA: Solved - Responsive Menu, Drop down Event via JS
Create a CSS rule to control your sub-menus as flipped or open. I created the following: #menu_inc ul > li.has-sub > ul:not(.open){ display:none; } The rule hides all sub-menu blocks ul who…
-
4
votes1
answer385
viewsA: CSS3 animation does not run when loading page
I solved the problem using transition in place of animation. body{margin:0; padding:0; font-family: Verdana, Arial, sans-serif;} aside{ width: 200px; background-color:#F0F0F0; } ul{ display:block;…
-
3
votes1
answer385
viewsQ: CSS3 animation does not run when loading page
I have the following code: body{margin:0; padding:0; font-family: Verdana, Arial, sans-serif;} aside{ width: 200px; background-color:#F0F0F0; } ul{ display:block; list-style:none; margin:0;…
-
3
votes1
answer1255
viewsA: C#FTP Connection Failed
I solved the connection problem by adding the Request method. request.Method = WebRequestMethods.Ftp.ListDirectory;
-
5
votes1
answer1255
viewsQ: C#FTP Connection Failed
I’m developing an application Console in c# which performs connection to an FTP server (or at least should), I have the following code: Class Ftpconnection class FTPConnection { private Connection…
-
4
votes2
answers1320
viewsQ: Save user and password without database use
I am developing an application in C# of the kind Console, and I’m looking to save some sensitive settings like user, password and IP. The problem is, how to safely store this data locally without…
-
1
votes2
answers86
viewsA: Get the path of a commit files with Libgit2sharp
The reply of the Gypsy answers my question, but she was very confused for me and I had to do a lot of research to understand her, taking into account that I am still learning c# and the library…
-
1
votes2
answers86
viewsQ: Get the path of a commit files with Libgit2sharp
How to get the file path of my last commit? I have this example method: private static void RepoListFiles() { if (!arguments.ContainsKey("repository")) { Error("O repositório ainda não foi…
-
2
votes2
answers4336
viewsQ: How to run program in C# by cmd
I am creating a program that works with commands, and I would like this program to be executed by cmd style: c:\path\folder>meuprograma >comando arg1 arg2 >comando 1 falhou >comando2…
c#asked KaduAmaral 11,472 -
1
votes1
answer92
viewsA: Remove fixed bar from sidebar
Change the function fixGallery for the following code: function fixGallery() { var offsetTop = $('.cd-main-content').offset().top, scrollTop = $(window).scrollTop(); //( scrollTop >= offsetTop )…
jqueryanswered KaduAmaral 11,472 -
2
votes2
answers53
viewsQ: Check if directory is a repository with Libgit2sharp (C#)
I’m starting to study C# so my knowledge is very limited. I’m using the library LibGit2Sharp and I would like to check if an informed directory is a repository. Their documentation is not yet…
-
2
votes1
answer66
viewsA: Footer is not hidden with page content
The problem is that you are leaving the background of #main Transparent, That’s why he’s exhibiting the footer. Arrange placing the property background-color:#FFFFFF; in the set of rules for #main.…
-
2
votes2
answers1477
viewsA: Panel-Collapse start closed
Just set up the HTML as if it were "collapsed", that is to say. In the Heading you will add the class panel-collapsed; Place the icon corresponding to the state colapsed, fa-angle-down I imagine;…
-
3
votes2
answers356
viewsQ: Async parameter of jQuery.ajax is obsolete, what now?
I’m developing a Javascript application and need to queue for requests ajax, and I need one to be done after the other, because they manipulate some variables of my scope. The parameter async of…
-
4
votes2
answers74
viewsA: Image with text
In HTML5 this is done using the property float in the image, along with the text. p{text-align:justify;} .imagem-direita{ float:right; margin: 0 0 5px 5px; } .imagem-esquerda{ float:left; margin: 0…
htmlanswered KaduAmaral 11,472 -
1
votes1
answer180
viewsA: Parallax in the footer
It is not so complicated to create this kind of effect, the secret is to use the property z-index of the CSS, then you will place your content at the bottom margin with the same value as the height…
-
4
votes1
answer91
viewsA: MD5 is passing checks
The function md5 generates a HASH, This is done with mathematical calculations on top of the string past. In case is generating a HASH and checking if it’s empty, sort of like this: // md5('') ==…
phpanswered KaduAmaral 11,472 -
4
votes2
answers2260
viewsA: Settings for javascript Alert
The alert is a "pure" text window, meaning markup languages will not work, let alone style. There are some text escape codes. As you quoted the \n that breaks the line. Other escape characters: \b:…
javascriptanswered KaduAmaral 11,472 -
1
votes4
answers454
viewsA: How to generate a summary or excerpt of each post?
Another solution is to limit by words, using explodes, so you will not leave a word in half. Function function limit_words($string, $word_limit, $sus = TRUE, $link = '';) { $words = explode('…
-
2
votes1
answer4309
viewsA: Use of Timezones with Moment plugin
I managed to solve by opening one Issue in the project. Follows the solution: Free translation: The documentation is here, but I agree that it could be more complete. We are also expecting the Data…
-
1
votes1
answer4309
viewsQ: Use of Timezones with Moment plugin
I’m having trouble using the Timezones plugin from the Moment library, specifically, I’m not able to load the data. I need to carry the timezones of London and São Paulo, but I couldn’t quite…
-
5
votes4
answers6072
viewsA: How to write code as an example, without running?
You can use the tag pre and jQuery: jQuery(document).ready(function($) { $('pre').each(function(index, el){ $(this).text( $(this).html() ); }); }); pre{ background-color: rgba(0,0,0,0.08);…
-
3
votes2
answers1201
viewsA: Modify Canvas in real time
Yes, you can do this at the event keyup as in the example: $(document).ready(function() { // Ao carregar a página $(this).on('keyup', 'input.canvas-settings', function(event){ // Ao soltar a tecla…
-
0
votes2
answers994
viewsA: Simulate click without directly calling the function
Has the aply Reply in English var elem = document.getElementById("linkid"); if (typeof elem.onclick == "function") { elem.onclick.apply(elem); }…
javascriptanswered KaduAmaral 11,472 -
2
votes1
answer395
viewsA: Split two-dimensional array into 2 simple arrays - PHP
You can do this using the builder void list ( mixed $varname [, mixed $... ] ) PHP: $query = array("SELECT * FROM teste WHERE nome in (?) and id in (?)", array('aaa', 1)); list($sql, $arg) = $query;…
-
1
votes1
answer237
viewsA: media queries giving conflict
The expression max-width, means that the width has to be less than or equal to the specified value. The same goes for height, max-height. So you’re saying: Apply the rule for when the screen has a…
media-queriesanswered KaduAmaral 11,472 -
2
votes2
answers1086
viewsA: Disable/ enable scroll with Jquery
To make a toggle you can use a variable as in the example: var scroll = true; // Define como scrol habilitado $('#el').click(function(){ scroll = !scroll; // Ao clicar, troca de true pra false, ou…
jqueryanswered KaduAmaral 11,472 -
8
votes3
answers22485
viewsA: Pass php variable to javascript
First we have to understand that PHP is a language server-side and Javascript client-side, given this information we then know that Javascript is interpreted by the browser, as well as HTML and CSS,…
-
2
votes2
answers1377
viewsA: Make Tooltip appear by clicking inside the input
The problem is that you are not "showing" the tooltip, lack the method $('.tooltip-icon').tooltip('show'); after the creation. That is: $("#sel-tooltip").select(function startTooltip(){ $(function()…
-
5
votes3
answers377
viewsA: How do I work with responsive design?
A piece of advice, use the Twitter Bootstrap, if you do not want to use all of its components, you can customize it and download only the responsive part. But if you are a programmer Hardcore, can…
-
0
votes2
answers19768
viewsA: How to print a page directly, without browser dialog box, using Javascript?
I found a "solution" in SO.en, as I have no printer at home has no way to test, but feel free to test and tell us if it worked. Reply in English (Free Translation) I couldn’t find a solution for…
-
3
votes2
answers161
viewsA: Add a fixed word to a friendly URL
Your rule ^locais/([a-zA-Z-0-9-_]+)$ says whatever you have after locais/ in the case pesquisa will be the value of the variable q that receives the first value $1. In case your URL…
-
0
votes2
answers335
viewsA: Problem retrieving inserted id
Follows a reply from Soen: $query = "INSERT INTO test (col1, col2) VALUES (?,?); SELECT SCOPE_IDENTITY()"; $resource=sqlsrv_query($conn, $query, $arrParams); sqlsrv_next_result($resource);…
-
3
votes2
answers4065
viewsA: Forward tab by clicking the button
I’m sure Oeslei’s answer is better, but I’m leaving here a manual way to do it: jsFiddle $(document).ready(function() { /*disable non active tabs*/ $('.nav li').not('.active').addClass('disabled');…
-
1
votes1
answer167
viewsA: Place paging inside the footer
You can parameterize your function, so that it displays only the listing, only the footer or both, so: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Exibe…
phpanswered KaduAmaral 11,472 -
1
votes1
answer2982
viewsA: File include problems, pointing directory against the page that was opened first
Every time you put one include or require use the absolute path instead of relative path, this is very easy using the "magic" constants. Try it like this: pager1 include…
phpanswered KaduAmaral 11,472 -
0
votes2
answers215
viewsA: PHP/Ajax - return Ajax does not bring when if ==
Code <?php $grupoCategoria = ($_GET['grupoCategoria'] ? filter_var($_GET['grupoCategoria'], FILTER_VALIDATE_INT) : NULL); $subcat = (!empty($_GET['subCat']) ? filter_var($_GET['subCat'],…
-
2
votes2
answers1421
viewsA: Center vertically on a <span>
It’s just a question of tag placement, and a bit of wit. Try to put the element as if it were a form element like this: <div class="form-group"><span>Top…
-
0
votes4
answers529
viewsA: How to generate an array with the list of uploaded files?
The right way to do it is by generating a array in conventional forms: $array = array('valor1', 'valor2', 'valorn'); $array = array('chave1' => 'valor1', 'chave2' => 'valor2', 'chave3' =>…
-
4
votes1
answer450
viewsQ: Knowing line and file that is running a method
I want to know if it is possible to know the line and file that is running a method. For example, I have a class Log, with it I log users' logs. Log.php <?php /** * Classe de Logs */ class Log {…
phpasked KaduAmaral 11,472 -
2
votes4
answers765
viewsA: How to put a DB column loop inside an array?
Simply create an array by taking the fields and then make the "field" receive this array: ###### Aqui tenho todos as colunas do meu banco de dados $fields = array(); while ( $coluna =…
-
1
votes1
answer274
viewsA: Line breaking by changing css
One way to do it would be to count the number of characters and change the CSS with jQuery depending on the size. Example: jQuery(document).ready(function($) { $('#box p').each(function(index, el){…
-
12
votes2
answers432
viewsA: References for learning web programming
Seekers: Nothing better than searching on your own, and for this we have excellent searchers in the market: A very good way to do your search for knowledge is the Bing, made by Microsoft. But…