Posts by isaque • 1,367 points
52 posts
-
2
votes1
answer38
viewsA: Save timer time when restarting page
To save and read the date locally you can use the localStorage: Saving: localStorage.setItem('data', finalDate.toString()) Reading: finalDate = new Date(localStorage.getItem('data')) Case…
-
0
votes1
answer21
viewsA: CSS @media is not working
To the media queries work you must have this tag on head of your HTML: <meta name="viewport" content="width=device-width, initial-scale=1.0">…
-
1
votes1
answer39
viewsA: Check if at least one RADIO BUTTON has been checked
You can use the jQuery with a selector that selects all radiochecked and check whether the length is greater than 0: function checarRespostas() { var perguntas = $('[id^=pergunta]');…
-
1
votes1
answer30
viewsA: Application . NET online + Offline
Through Javascript you can access the Indexeddb, which is a browser API that allows access to a local database, owned by browser. There’s the localStorage also, if you want to store simpler data.…
-
1
votes1
answer20
viewsA: Add option in a select in original order
Use the function prepend: The . prepend() method inserts the specified content as the first child of each element in the jQuery collection. $('select').prepend(`<option>Stack…
-
1
votes1
answer21
viewsA: How to save color changes to a Datagridview line?
You can use the System.IO.File to read and save a file containing the color. Saving the color: var cor = dgv1.CurrentRow.DefaultCellStyle.BackColor; System.IO.File.WriteAllText("cor.txt",…
-
0
votes1
answer52
viewsA: How to get the notificationCode from the Pagseguro notification URL?
You will need to use the body-parser to read the body of a request POST var bodyParser = require('body-parser') app.use(bodyParser.json())…
-
1
votes1
answer35
viewsA: What sources can I guarantee will be available on all platforms?
This link shows secure sources for use in all browsers/platforms. But always assign more than one source in font-family in css, placing first the desired font and then similar fonts. So if the first…
-
1
votes1
answer32
views -
1
votes2
answers180
viewsA: Download a file in C#
Actually you don’t have to download, you need to copy the file to the folder Downloads. This code will help you: string finalPath =…
-
0
votes2
answers27
viewsA: c# Webbrowser How to call the onclick function?
You can use elemento.InvokeMember("Click"), where elemento is the Htmlelement that you want to call the onclick function. HtmlElementCollection collection =…
-
0
votes0
answers20
viewsQ: Efficient way to save a File object locally for later use
Hello! I am developing a web app, and in it uploading files are done. When the user is offline (it’s a PWA) I need to save these files locally to upload later. I cannot save a File object directly…
-
-1
votes3
answers116
viewsA: How to make after running Alert(e), go back to the first line of Code
You can use a loop do-while and a variable to indicate whether the loop should repeat or close (repetirLoop). var repetirLoop; do { repetirLoop = false; var p=parseFloat(prompt("Digite um numero"));…
javascriptanswered isaque 1,367 -
0
votes4
answers1005
viewsA: Convert Int to bool
I don’t see why compare bool with int. The correct way to do what you want (from what I understand) would be: if (usr.Excluido) { ModelState.AddModelError("", "Usuário bloqueado."); return…
-
0
votes1
answer66
views -
2
votes0
answers40
viewsQ: Unsigned variable vs null variable
I have the following codes: String str = null; and String str; If I use one if to check if the variables are null, if will be "called" in both cases. But is there any difference between the two…
-
3
votes1
answer913
viewsQ: Send Javascript by email
I have a code in C# that sends emails with HTML, until then ok, the problem is that I can not send scripts (JS). Yes, I understand why, must be security reasons. But there is no way burlar or do…
-
0
votes0
answers21
viewsQ: Knowing if a process is critical
If my program closes a critical process, there will be a blue screen. So, how do I know if a process is critical? If this process is critical, then my program will not close it.…
-
2
votes3
answers100
viewsA: Convert decimal to ushort
You can use (ushort): decimal value= 15; ushort newValue = (ushort)value;
-
1
votes1
answer372
viewsA: Class to write/read formatted TXT files
Files . txt is not formatted. You must use another extension (Example: . rtf). What you can do is use a RichTextBox to format the text. Example: RichTextBox formatar = new RichTextBox();…
-
1
votes1
answer658
viewsQ: error: field has incomplete type
I get this mistake error: field has incomplete type by doing something like: class MinhaClasse { MinhaClasse teste; // Erro aqui }; I already tried to add this line at the beginning of the code…
-
0
votes0
answers32
viewsQ: Udpclient not receiving
I tried to make a local chat program using Udpclient, no exception is thrown, it just doesn’t get the message (I’m running 2 equal). My code: public class UdpSenderReciver { int Port = 9600; private…
-
1
votes2
answers743
viewsA: Microsoft Visual Studio 2013 - There were compilation errors. Do you want to continue and run the last successful compilation?
Some program is ultilizing the compiled file (.exe), or the program itself is running. Maybe by closing the program window by clicking on X, do not finish the process, just close the window. You can…
-
0
votes1
answer312
viewsQ: Assembly.Load error Could not load file or Assembly 'X' or one of its dependencies. The system cannot find the file specified
I’m making a mistake using the Assembly.Load(X);. The way is right, I think you are giving error when trying to load a dependency from Assembly. But I find it strange that in Visual Studio 2017 I…
-
0
votes1
answer51
viewsQ: Error with C array - Norwegian
I’m having error signing an array: Menu m = Menu(); m.Options[4] = {"teste1","teste2","teste3","teste4"};//Erro aqui m.Show(); Menu Class: class Menu { public: String Options[]; int index = 0; int…
-
1
votes1
answer57
viewsQ: View window without frameworks
How can I display a window without using frameworks? For example, display the console window or another without the . NET and others frameworks.
-
2
votes1
answer4637
viewsQ: Accessing files in C: error: Access to path (...) has been denied
I am making a program in C#, which needs to access all files and folders from the computer. It turns out that when I go to access a folder or file near C:\, he says this message: Access to path 'C:…
-
1
votes1
answer102
viewsQ: Click event does not work in custom control
I created a button (Usercontrol), until then ok, but when I put an event Click in it, does not work, already tried with the event Mousedown, also did not work. I don’t think this is it, but this…
-
10
votes2
answers1070
viewsQ: Path from previous folder
How can I get the path from the previous folder? For example I have this path : C:/Pasta1/Pasta2 And I wanted to get in the way of folder 1 C:/Pasta1 How can I do that?…
-
1
votes1
answer180
viewsQ: Xmldocument - list all elements?
I have a code XML similar to this : <document> <elemento> </elemento> </document> and the following code C#: (x is a Xmldocument) for (int i = 0; i < x.ChildNodes.Count; i…
-
0
votes3
answers47
viewsA: Datetime does not update on Console.Writeline
I didn’t quite understand your question. But for what I intended you need to update the time each time you click the button. So, there’s the code private void button2_Click(object sender, EventArgs…
-
1
votes1
answer741
viewsA: Change textarea background color when button is clicked
I know very little Javascript, but you can program for when the btnalterar is clicked, it change the style of textarea: <html> <meta charset="UTF-8"> <!-- add special characters…
-
1
votes5
answers988
viewsA: Error Split by 0
It’s a mathematical rule, nothing can be divided by 0. In any programming language will give error if you try to divide by 0. You can put one if to check that the splitter is not 0.…
-
8
votes1
answer2473
viewsQ: Is it possible to create a site with HTML and C# without ASP.NET?
Is it possible to create a site only with HTML and C#, without ASP.NET? In general, as?
-
6
votes2
answers319
viewsQ: Is it possible to create a website without markup language?
Is it possible to create a website without any markup language, programming only, for example Javascript? In general, how?
-
0
votes1
answer428
viewsA: Register/Display List C#
In your class Cadastro, make the list estática: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using…
-
3
votes0
answers88
viewsQ: Unity - Identify texture in Terrain X Y location
I have a Terrain in Unity, and I was wondering if you have any way to identify what the texture is in a certain XY position in Terrain. Example:…
-
0
votes2
answers391
viewsQ: What’s the Where for?
I’ve seen it in several C# codes Where, but I didn’t understand about him. What is algumacoisa.where() in the C#? When should I last? What good is?…
-
2
votes2
answers73
viewsA: Create folder on every console usage
Not to delete the folder and create a pasta(2), see this function: void CriarPasta (string path)//Cria a função { if (Directory.Exists(path)) //Verifica se já existe uma pasta com o mesmo nome { for…
-
0
votes0
answers365
viewsQ: Change the console source
In the picture below, I can change the console font by clicking on the top of the window and clicking on properties: But how can I change the font and font size of the console through programming?…
-
3
votes1
answer28
viewsQ: Alert text only for a specific element
I have this code : <div id="div"> This is some text.<br/> <button>Button</button> </div> <script> alert(document.getElementById("div").innerText); </script>…
-
8
votes1
answer332
viewsQ: New vs Override
What would be the difference between new and override ? Examples: Override: public class ClasseBase { public virtual void Funcao () { } } public class Classe : ClasseBase { public override void…
-
2
votes2
answers754
viewsA: Loop for ATM
To keep repeating until the user leaves, use a while, I already put for you a simple exit system, the person just type "out" and ready. using System; namespace Caixa_Eletronico { class Program {…
-
0
votes1
answer214
viewsA: CS0118 error in Unity "player is a namespace but a type has expected
You’ve created a namespace player and haven’t even put a class in it, you’ll never be able to create a namespace variable. Wasn’t it supposed to be player2 instead of player? Because you must have…
-
2
votes3
answers133
viewsA: Create a means not to repeat my code
Create classes. Do object-oriented programming, creating classes with methods, functions, variables, etc... You can create a class "generator" and put a function inside it gerar_usuário(string nome,…
-
0
votes4
answers1274
viewsA: Make submenu appear by clicking the menu using javascript
This one works when you hover over it, punch without JS, only CSS: <style> .menu { list-style-type:none; margin: 0; padding: 0; width: 100%; color:white; background-color:black;…
-
2
votes1
answer435
viewsQ: Remove "scratches" from a textarea
I have a textarea and would like to know how to remove these "scratches":…
-
0
votes1
answer990
viewsA: Enable and disable Children gameobject c#
this disables all children of gameobject that you put the script: foreach (Transform t in transform) { t.gameObject.SetActive(false); }
-
24
votes4
answers1016
views -
1
votes0
answers26
viewsQ: What is the difference between var and private var?
What’s the difference between private string s; and string s; ? Is there any difference between the two examples or is it just the way to write?…