Posts by Otto • 5,653 points
186 posts
- 
		1 votes1 answer88 viewsA: Why does my Ajax return an HTML code instead of just returning the value? CodeigniterSimply because in the controller you are loading the view: $this->load->view('test', $data); It would be easier to make the direct json return: echo json_encode($data);… 
- 
		0 votes2 answers253 viewsA: Error Include PHP CodeigniterThe correct thing would be for you to use the concept of partial view: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php $this->load->view('meta'); ?> </head>… 
- 
		0 votes1 answer203 viewsA: Update CodeigniterActually your problem is quite basic, you are doing update without Where, follow an example for query: $this->db->set('field', 'field+1', FALSE); $this->db->where('id', 2);… 
- 
		1 votes1 answer264 viewsA: PHP Ldap AD - Recognize user data automatically without loginAll you need is the Apache module mod_auth_sspi . Configuration example: AuthType SSPI SSPIAuth On SSPIAuthoritative On SSPIDomain mydomain # Set this if you want to allow access with clients that… 
- 
		-1 votes1 answer77 viewsA: what is SSH, and what is "Putty" related to SSH?SSH (Secure Shell) is a protocol that allows you to virtually access the server as if you were in a terminal (in the DOS prompt, for example). If you prefer, consider as SSH as a computer… web-applicationanswered Otto 5,653
- 
		3 votes2 answers69 viewsA: Lock button until Function is completed AngularjsA simple way to do this: <button ng-click="save()" ng-disabled="isProcessing">Save</button> $scope.save = function(){ $scope.isProcessing = true; $http.post('localhost', data).success(… 
- 
		4 votes2 answers76 viewsA: Dismantle number with zeroesTa ai a simple solution to your problem: <?php $teste = '0002100042000560000000000000000000000000000000000000000000000000000000000000000000000000000000000000'; $arrayExplode =… 
- 
		3 votes4 answers7998 viewsA: Add and remove classes by clicking JqueryToggleclass already does this for you, follow an example: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>toggleClass demo</title>… 
- 
		0 votes2 answers721 viewsA: How to change the main URL in CodeigniterTake a look at your .htaccess see if there’s a line that looks like this: RewriteRule ^(.*)$ /site_novo/index.php?/$1 [L] If you have change for: RewriteRule ^(.*)$ /teste/index.php?/$1 [L]… 
- 
		-3 votes1 answer626 viewsA: How to resolve Ubuntu 16.04 bug with Qualcomm Atheros network cardTry the sequence of commands to see if it helps you: sudo apt-get update sudo apt-get install git git clone https://github.com/kvalo/ath10k-firmware.git sudo mkdir /lib/firmware/ath10k/QCA9377 sudo… 
- 
		7 votes3 answers8240 viewsA: Fill string with zerosYou could do it that way: string a="988554"; a = a.PadLeft(8, '0'); Return would be: 00988554 
- 
		2 votes2 answers333 viewsA: PHP script scheduling in WindowsThe task must be set in two steps. First you must create a simple task starting at 0:00 every day. After this, you go on Avançado (or something similar depending on the OS version) and selects… 
- 
		2 votes2 answers73 viewsA: Sum total of a loopFirst you are instantiating the calculation variables inside the for or be each loop it Zera the calculation, put the following variables out of the loop and test again: $total_receitas_recebidas =… 
- 
		1 votes5 answers3553 viewsA: Only get a part of a urlES2015 (ES6) const getParams = query => { if (!query) { return { }; } return (/^[?#]/.test(query) ? query.slice(1) : query) .split('&') .reduce((params, param) => { let [ key, value ] =… javascriptanswered Otto 5,653
- 
		2 votes1 answer433 viewsA: WPF select all Datagrid CheckboxAs soon as you search ? //this event is for **Checked and UnChecked** of up check box (cbxall) private void UpCheckbox_Checked(object sender, RoutedEventArgs e) { //checkBox1 = cbxall (your up… 
- 
		2 votes1 answer2668 viewsA: Sql runs on Oracle SQL Developer, but does not run on C#It’s quite simple actually Your sql: vsql = @"INSERT INTO ALUNOS_ (UF, IDADE, TELEFONE, NOME_PAI, ENDERECO, EMAIL, NOME, CIDADE, NOME_MAE) values ('sp', 0,'','','','','','','');"; Functional sql;… 
- 
		0 votes1 answer150 viewsA: Comparison and calculation of time and dateIn case of comparison you can use something like this: <?php $horario = strtotime('1:00'); $abertura = strtotime('22:00'); $fechamento = strtotime('7:00'); if (( $abertura < $fechamento… 
- 
		5 votes1 answer283 viewsA: Character limiter in ASP.NET text-boxYou could use it this way: @Html.TextBoxFor(m => m.Titulo, new { @maxlength="10", @class = "form-control" }) 
- 
		1 votes1 answer381 viewsA: Does Firebase have file storage and download limit?Seeing in the documentation itself https://firebase.google.com/pricing/? hl=en It has limits yes, in the free plan 5gb of Storage and 1gb of daily downloads.… 
- 
		0 votes3 answers1560 viewsA: Insertion of the letter "e" in type numberYou could try this way, where #input would be the id of your input: In Jquery: $(function() { $("#input").keypress(function(event) { if (event.which != 8 && event.which != 0 &&… 
- 
		3 votes1 answer289 viewsA: How to ignore files according to their extension in TFS?In the local Workspace you will have the file . tfignore (TFS 2012, 2013, 2015 and higher) In the local Workspace, you can use . tfignore (which is equivalent to Git . gitignore) .tfignore example:… 
- 
		1 votes1 answer37 viewsA: Select model according to brandI don’t know the structure of your tables, but let’s basically change the two locations below in the methodical model automobile list: public function lista($idmarca){ $exec =… 
- 
		1 votes1 answer39 viewsA: Blank page pull postsAlways remember to add the template to be used by the page… 
- 
		3 votes1 answer161 viewsA: How to redirect to another view after sending email?A legal way would be to change where it calls: $this->load->view('mensagem_enviada', $infoPage); And use in this way: if ($result) { redirect('/aondequiser', 'refresh'); } Remembering that for… 
- 
		2 votes2 answers202 viewsA: txt file opens in the browser instead of being downloadedI think that would solve your problem: try { Response.Clear(); Response.ClearHeaders(); Response.ClearContent(); Response.AddHeader("content-disposition", "attachment; filename=" + _Filename);… asp.net-mvcanswered Otto 5,653
- 
		1 votes1 answer3298 viewsA: Code error 991This is an error generated by Kinghost for payment problems, it has happened to some of my customers. 
- 
		1 votes1 answer129 viewsA: How to handle a rendering Exception in WPF (Windows Presentation Framework)Speak Renan, if I tell you that I spent the day yesterday with this same problem heheheh. Well what I got was to use this: AppDomain.CurrentDomain.UnhandledException += (sender, e) =>… 
- 
		-1 votes1 answer29 viewsA: Error saving with cakephpActually the error is quite explanatory. You put a pk on the table Users that doesn’t exist: public $primaryKey='id_despesa'; In other words, the countryside id_expense does not exist in the table.… 
- 
		0 votes1 answer152 viewsA: Python, ldap3 and Apache Directory StudioUsing the library https://github.com/pyldap/pyldap is quite simple. Follow a basic example of use: >>> import ldap >>> con = ldap.initialize('ldap://localhost:389',… 
- 
		1 votes1 answer313 viewsA: Change Moodle user permissionThe site administrator function is allowed to do anything in Moodle, so use with caution. You’ll need to know the user ID first - so recover the table id SELECT * FROM mdl_user Then add the id to… 
- 
		1 votes1 answer28 viewsA: How do you get the result published in the right place?So come on, create a new file with the contents by removing the contents from the current file: Let’s hypothetically call the file php return. (name should be changed to your need) $servidor =… 
- 
		3 votes4 answers774 viewsA: Concatenate variables from an arrayUse implode() if(count( $array ) == 1) { $str = implode("+", $array); } Documentation: http://www.php.net/implode… 
- 
		1 votes1 answer1472 viewsA: Fpdf PHP pageYou could try using the Setautopagebreak $pdf->SetAutoPageBreak(true,10); See if it helps you. Documentation link: http://www.fpdf.org/en/doc/setautopagebreak.htm In relation to content break:… 
- 
		2 votes1 answer139 viewsA: ID of out-of-order tablesUsing the command below you will be resetting the autoincrement arriving at what you need: DBCC CHECKIDENT (minhaTabela, RESEED, 10) Or to ensure that there are no flaws: declare @max int; select… 
- 
		1 votes2 answers61 viewsA: jQuery.get runs after all the rest of the functionYou could use it like this, as the get may take a while to bring in the data depending on the volume: addLine(){ alert('begin') jQuery.get('database/addClube/'+this.clube);… 
- 
		1 votes1 answer267 viewsA: How to Get Answer from a Route with JSThe way you are using to popular the variable is not correct, try this way: jQuery.get('database/getClubes', function(data){ this.list = data; console.log(this.list); // vai trazer no console o… 
- 
		0 votes1 answer138 viewsA: Ionic v1 build windows 10 or 8.1You need to install Windows 10 SDK or 8.1 to resolve the issue. You would need to install separately from VS 2015 and add the line below to config.xml: <preference name="windows-target-version"… 
- 
		3 votes3 answers19220 viewsA: How to add a pure Javascript class?You could create your own addClass function, like this: function addClass(element, classname){ var currentClassList = (element.className || '').split(/\s+/); currentClassList… javascriptanswered Otto 5,653
- 
		3 votes2 answers334 viewsA: Power BI and SQL ServerResponse from the Power BI website itself Power BI is available locally? No, Power BI is not available as a private, internal cloud service. However, with Power BI and Power BI Desktop, you can… 
- 
		0 votes4 answers1139 viewsA: Separating columns from a multidimensional arrayOne practical way I found was to use it this way, see if it suits you: <?php $array = array( array('74','69'), array('45','1'), array('5','2'), array('88','3'), array('123.389,89', '12,33'), );… 
- 
		0 votes1 answer181 viewsA: Ionic audio captureYou could do something like this: $cordovaCapture.captureAudio(options).then(function (audioData) { // Success! Audio data is here console.log('captureSuccess');console.dir(e); $scope.sound.file =… 
- 
		0 votes1 answer726 viewsA: Open my App from a link sent via emailYou could use the Custom URL Scheme Cordova/Phonegap Plugin plugin, as cited by the colleague. cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME=ionicapp Using your url’s this… 
- 
		2 votes3 answers533 viewsA: How to compare Mysql to an array?Use IN. $sql = 'SELECT * FROM `table` WHERE `id` IN (' . implode(',', array_map('intval', $array)) . ')'; 
- 
		1 votes2 answers176 viewsA: Generate autoincrement serial number sequenceUse the cursor.lastrowid to get the last ID inserted into the cursor object, or use connection.insert_id() to get the ID of the last Insert done on the connection. But since you said it’s a no auto… 
- 
		3 votes3 answers2067 viewsA: convert integer to decimal in jqueryYou could do it this way Number(1).toFixed(2); 
- 
		1 votes5 answers498 viewsA: Capture Enter in IE using jQueryI use it a lot with internet explorer compatibility: $(function() { $(window).on('keydown', function(event) { if(event.which == 13) { suaAcao(); return false; } }); });… 
- 
		17 votes6 answers3282 viewsA: Is there a Javascript class?Javascript classes are introduced in Ecmascript 6 and are a syntax for existing legacy based on prototypes, in Javascript. Class syntax does not introduce a new object orientation inheritance model… 
- 
		1 votes2 answers52 viewsA: Classifying li in a divThe first point that would solve your question would be to change the while code to the bottom one: for(i = 0; i <= $('#check_presencaNone li').length; i++) { $('#check_presencaNone… 
- 
		4 votes3 answers13394 viewsA: PHP application does not log into the facebook app by localhostIt’s very simple to fix this. Open the /etc/hosts (unix) or C:\WINDOWS\system32\drivers\etc\hosts. Assuming your domain is testeleonardo.com, add this line: 127.0.0.1 local.testeleonardo.com So in… 
- 
		4 votes4 answers9539 viewsA: How to convert a string to date or date?Something more or less like this: SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy"); java.sql.Date data = new java.sql.Date(format.parse(dataStr).getTime()); Remember to adapt to your…