Posts by Daniel Saraiva • 549 points
32 posts
-
0
votes1
answer148
viewsA: How to pick up text from a Span with Class [VB.NET]
If I understand correctly, it solves your problem function teste(){ var textSpan = document.getElementsByClassName('odometer-value') var textLabel = document.getElementById('mylabel').textContent;…
-
1
votes3
answers272
viewsA: Deserialization of JSON
I did in cosoleApplication and it worked using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Stack {…
-
-1
votes4
answers163
viewsA: Deserialize Json and place values in views
json would come title, image url, and text. If it’s a list, you need to create a listview with an adpter to work as you need it, now if it’s a simple screen, you just need to deserialize the json…
-
1
votes1
answer6358
viewsA: Android Studio does not recognize USB device
1º Check if your phone is in developer mode and triggered USB debugging 2º Check if all the drivers of the phone are installed on the computer (it happens sometimes to have to download some driver…
android-studioanswered Daniel Saraiva 549 -
1
votes1
answer65
viewsA: How to add the word "years" after calculating age
that’s what you need document.getElementById("data").addEventListener('change', function() { var data = new Date(this.value); if (isDate_(this.value) && data.getFullYear() > 1900)…
javascriptanswered Daniel Saraiva 549 -
0
votes2
answers71
viewsA: Javascript updates several inputs
See if this helps you (you can improve) var evento = document.querySelectorAll('input[type="checkbox"]'); for (let i = 0; i < evento.length; i++) { evento[i].addEventListener('click', AddValor);…
javascriptanswered Daniel Saraiva 549 -
0
votes2
answers96
viewsA: Tela Inicial Dinamica
to check if a database exists you can do as follows public static boolean doesDatabaseExist(ContextWrapper context, String dbName) { File dbFile = context.getDatabasePath(dbName); return…
-
0
votes1
answer249
viewsA: how to leave the div fixed in a location
I applied your style, and it worked here. I found that the div is closed with one more .menu { width: 100%; height: 55px; position: relative; background: #fff; border-bottom: 1px solid #59ab66; }…
-
2
votes1
answer267
viewsA: Android Apps / Ios HTML
You have many ways of working with this. Can use IONIC (Phonegap), has Intel XDK among other tools. You can also make a website responsive, and encapsulate within a webview on android, Ios or…
-
2
votes2
answers1323
viewsA: Read an input file using Javascript
Take this example if it helps you <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" />…
-
1
votes2
answers790
viewsA: What are Try/Catch blocks?
A "Try" block is called a "protected" block because, if a problem occurs with the commands inside the block, the execution will deviate to the corresponding "catch" blocks. that is, if the code…
-
1
votes1
answer1844
viewsA: How to make text scroll on android screen
If I get it right, just put your textview inside a Scrollview. <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout…
-
1
votes0
answers132
viewsQ: like %TEXT% in full text search
I would like some help regarding the search using full text search in SQL Server. Today I have a table that stores materials and I’m doing a search using full text search with contains getting like…
-
3
votes3
answers62099
viewsA: zero to left (LPAD) in Sql Server
FOLLOWS: Select REPLICATE('0', 2 - LEN(PER_CODIGO)) + RTrim(PER_CODIGO) FROM PERFIL '0' is the character you want to repeat, 2 is number of houses of your string, 'PER_CODIGO' is your field.…
sql-serveranswered Daniel Saraiva 549 -
0
votes4
answers1429
viewsA: How to search for results in Mysql where a given field only has special characters?
I did this on SQL Server and functional EXAMPLE TABLE AND EXAMPLE QUERY CREATE TABLE #Sample(Field varchar(50), Result varchar(50)) GO INSERT INTO #Sample (Field, Result) VALUES ('ABC123 ', '1')…
-
-1
votes4
answers3541
viewsA: How to bring records of a LEFT JOIN even if not obeying the WHERE?
I did it that way and it worked, but I don’t know if I’d see you declare @retorna_dado int, @ano int, @mes int set @ano = 2016 set @mes = 2 set @retorna_dado = (SELECT COUNT(*) FROM tabela_A a LEFT…
-
0
votes3
answers618
viewsA: How to make certain words within an editable div stay of one color?
function checkKey() { var plaintext = document.getElementById("textbox"); if(plaintext.value == 'EUA') { plaintext.style.color = "#FF0000"; } if(plaintext.value == 'BRASIL') { plaintext.style.color…
-
1
votes3
answers2033
viewsA: SQL command inside a variable varchar - sql server
See if you go now Set @STRING_SQL = 'update BCS_RESOURCE set DS_DESCRICAO = ''Gestão de Contratos - ''+ @DS_PERFIL , [DS_pt-BR] = ''Gestão de Contratos - ''+ @DS_PERFIL + , DS_en-EN = ''Gestão de…
sql-serveranswered Daniel Saraiva 549 -
3
votes1
answer372
viewsA: IDE for game development
A free and good one is Unity 3D, it compiles for almost all platoforms and yes, it has versioning. It is possible to program the code in C# or javascript In addition their help is very good, with it…
engineanswered Daniel Saraiva 549 -
1
votes3
answers2105
viewsA: How do I get an object back to its initial position in Unity?
Look I would store the starting position in a variable and when hit I would load the transform position setting the values that were set in the variable. Maybe there’s a more practical way, but I’d…
unity3danswered Daniel Saraiva 549 -
0
votes1
answer38
viewsA: Result with repeated records
You can be using the distinct option. SELECT DISTINCT * FROM tabela But it will be grouped if the whole row is the same, if a column is different it will bring (because if a column is different the…
-
1
votes3
answers138
viewsA: How to declare variables in for in c?
Declares before FOR, and no is calls the declared variable
canswered Daniel Saraiva 549 -
0
votes1
answer733
viewsA: Returning an array of a function in Postgresql
I’m not sure I understand what you need, but look below Here I created a function that returns user ID greater than 1 and less than 30 CREATE FUNCTION ids_para_where(@id int) returns table as RETURN…
-
1
votes3
answers241
viewsA: Help with Subquery in SQL?
use the left join that will work example select USUARIO.USU_CODIGO, USU_NOME, GRU_CODIGO from USUARIO left join USUGRUPO ON USUARIO.USU_CODIGO = USUGRUPO.USU_CODIGO…
-
2
votes4
answers3043
viewsA: What are temporary tables for?
Temporary tables are tables that exist only during connection to the database. That is, when the connection is terminated, the table is automatically eliminated.
sqlanswered Daniel Saraiva 549 -
2
votes4
answers10668
viewsA: How to create a Boolean column on Oracle?
To create follows create table tbool (bool char check (bool in (0,1)); insert into tbool values(0); insert into tbool values(1);`
-
0
votes2
answers8101
viewsA: mask accepting numbers and , with jQuery Mask Plugin
To accept numbers with comma use $('.money2').mask("#.##0,00", {reverse: true});
-
-1
votes2
answers100
viewsA: Default record if no other - mysql
You can create a Rigger that when adding a user, you check if that user has any record in the table of PERMISAO, if it does not have it inserts a default perm, if it has it ignores.…
-
3
votes1
answer603
viewsA: How to stop a stored procedures in Mysql?
try to establish a new connection with the database. If you have executed the procedures via PHPMyAdmin it will be necessary to use another browser, or close the current one completely before trying…
-
1
votes1
answer33
viewsA: Remove Timepicker fields
I recently applied this setting to the environment I work in. See below: $(element).timepicker({ minuteStep: 1, showSeconds: true, showMeridian: false, defaultTime: true }); not to display the…
-
1
votes2
answers3709
viewsA: How do I update multiple rows of a table after it undergoes a certain change?
You will have to trigger Trigger whenever there is a change in the table. Below is an example in SQL: --criei a tabela cliente CREATE TABLE CLIENTE ( ID INT PRIMARY KEY IDENTITY, NOME VARCHAR (250),…
-
3
votes1
answer1161
viewsA: How to set UTF8 charset?
To set the charset in Firebird must be in the database creation CREATE DATABASE <database> USER <username> PASSWORD <password> PAGE_SIZE <pagesize> DEFAULT CHARACTER SET…