Posts by CypherPotato • 9,292 points
289 posts
-
3
votes1
answer143
viewsQ: Can I create a Win32 app in C#?
I am aware that C# is . NET Framework’s right-hand man, and that the default language for programming Win32 applications is C++. But, I can program an application in C#, independent of any . NET…
-
10
votes3
answers4035
viewsQ: Like writing a pseudocode?
I was reading about algorithms, but all the algorithms that I read, they were written in some unknown language or not invented, but somehow I could understand what was written there. I read about…
pseudocodeasked CypherPotato 9,292 -
2
votes1
answer146
viewsA: how to count records of an ini file in C#?
This is the simplest way to count how many elements and how many sections there are in the file: // Obtém o conteúdo do arquivo .ini public string GetFileFullText() =>…
-
1
votes1
answer527
viewsA: How to remove Windows BIP sound in c#?
You have to prevent the event KeyPressed is generated, which is such a beep. For this, you have to indicate that the event was successfully completed: private void textBox1_KeyDown(object sender,…
-
2
votes1
answer82
viewsQ: Is there equivalent to VB.NET Call in C#?
The question is simple. There is a keyword equivalent to Call of Visual Basic.NET in C#? In Visual Basic, I called a class method without having to declare a member explicitly to it: Call New Form()…
-
1
votes1
answer616
viewsQ: How to call a method within the class?
I’m trying to call the method that returns a unsigned char through another method of the same class, I reviewed the whole internet but did not understand how to do it. byte…
-
1
votes2
answers86
viewsA: Is there a sure way not to wait for a lawsuit?
An alternative I’ve always used is to call TaskFactory. I’ve never heard you say the same wrong thing, but I could be wrong. I’ve never had a problem with the same: using System.Threading.Tasks; ...…
-
0
votes1
answer65
viewsA: how to save the result of an image and a label to a single file?
You can implement a Panel, and save its contents: Imports System.Drawing ... Public Function CriarMemoria(ByVal foto As Image, texto As String, alinharNoCentro as Boolean) As Bitmap ' Cria um painel…
vb.netanswered CypherPotato 9,292 -
0
votes2
answers38
viewsA: How to make constant member functions in Php?
I think you’re referring to static functions, which can be called without creating an instance of the class, and which cannot modify properties and members of the class, if so, just use the keyword…
-
1
votes2
answers135
viewsQ: Why only an Encoding works in the algorithm?
Here’s the deal: I have an encryption module that encrypts a byte[] and out another byte[] encrypted, and at the end of the output a checksum is placed; the checksum is a single byte generated by…
-
11
votes5
answers1059
viewsQ: Is it possible to convert a 16-bit number to a single byte?
If I create the following expression: Int16 numero = 2017; byte m = (byte) numero; m will have the value of 225. Okay, how do I get 2017 from the byte m (reverse operation) again?…
-
0
votes1
answer292
viewsA: Load Window Form inside VB.net Container
Comments explain all the changes I’ve made. Some of them might solve your problem. ' | você não precisa de uma ' | referência para uma forma ' | que está chamando sem ' | referência ' Isso não…
vb.netanswered CypherPotato 9,292 -
1
votes1
answer149
viewsA: VB.NET, Visual Studio and Namespaces
No, this is not possible. Visual Basic does not support the concept of creating namespaces same as C#, for you to create a project "with several standard namespaces" you should first remove the…
-
0
votes0
answers59
viewsQ: Stream that reads byte per byte?
I created a simple byte-by-byte reading method in a stream, but it’s very slow and it’s taking minutes to process a ten-megabyte file, I don’t know why it’s so slow. It needs to be byte-by-byte and…
-
1
votes1
answer142
viewsA: How to put properties inside another property? VB.net
Put designer type attributes that come from the library itself. NET. References: Imports System.ComponentModel Class declaration Class_Child: <Browsable(True)> Public Class Class_Child…
-
7
votes1
answer352
viewsQ: How to allocate an immense amount of memory?
I created an Onfly encryption algorithm that encrypts bytes without the need to copy them to a new copy of those same bytes. This is both to encrypt and to decrypt these byte lists. As in the scheme…
-
0
votes1
answer66
viewsA: How to convert a Checkbox to a Toggle Button?
If you are using the . NET Framework library, see the code below, which will convert all CheckBox from the column to a Togglebutton: In Visual Basic: For Each column As DataGridViewCheckBoxColumn in…
-
0
votes1
answer789
viewsA: How to remove and rename directories in C language?
I don’t know much about C and its architecture, but I know it’s very similar to C++, it might be wrong, but I found this function to delete a directory that is not empty: int remove_directory(const…
-
0
votes0
answers92
viewsQ: How to return the same random number in different systems?
A pseudo-random number generator like the rand() of PHP and the new Random.Next() of . NET will return different values same using the same seed and even full range, and this is not the right way…
-
5
votes1
answer593
viewsQ: How does seed influence the generation of random numbers?
The doubt is very simple, I would like to know how the class System.Random generates random pseudorandomness numbers from a seed, which I find odd. I know they are not totally random, and so I have…
-
2
votes1
answer703
viewsA: With doing Facebook posts with Python?
If you are using Ubuntu or Debian, run these commands to get back up and running. sudo pip uninstall facebook sudo pip uninstall facebook-sdk sudo pip install facebook-sdk For other operating…
-
4
votes1
answer250
viewsQ: How do I upload a file larger than 10MB without having access to php.ini?
Here’s what it is: My free file hosting gives me access to see information from the php.ini file, but I can’t modify it, I’ve tried creating a php.ini folder in the php.ini folder htdocs but it…
-
1
votes1
answer911
viewsA: Capture pressing a key in the background
We can use the function GetAsyncKeyState() from C++ as @viniciusafx mentioned in the comment of your question, for this we will create a reference for it. Private Declare Function GetAsyncKeyState…
vb.netanswered CypherPotato 9,292 -
0
votes1
answer122
viewsQ: Javascript function does not resume $_POST from PHP
I’m implementing a progress bar in a simple file upload script. I have the three files that are giving me a headache, Upload.php where the upload script is located, script.js where is situated the…
-
1
votes2
answers426
viewsQ: $_GET[] does not work
I have a page .onion hosted by Freedom, which supports PHP 5, I’m trying to load the site’s home page home.html from the "Loader" index.php, in which it begins in the code: <?php $get =…
phpasked CypherPotato 9,292 -
0
votes1
answer109
viewsA: Image in C# Windows Forms
Try to insert a PictureBox within a Panel whose property AutoScroll be it True, and then modify the property Height of the image within the PictureBox to be the same as Panel. Consider pb your…
-
4
votes1
answer799
viewsA: Console in windows Forms application
It must be because you are declaring twice in a row a variable with the AllocConsole(), create a condition to prevent this. First, declare a boolean checker (as a global variable, not within the…
-
0
votes1
answer42
viewsQ: How to count how many characters are in a selection?
Is there any way, trick or extension to Visual Studio 2015 that tell me how many characters are in the selection I made, including spaces or null characters? Observing: I want to count the selection…
-
0
votes3
answers2379
viewsA: Set minimum number of characters in Textbox
Add a very basic check in the event where you will validate what is in the Textbox. Let’s consider TextBox1 its Textbox, and limite the limit (obviously), and consider this method a button, or…
-
2
votes1
answer38
viewsA: The angles are crazy!
Well, digging around and reading a little bit about trigonometry I just divided the angle by 180 and multiplied by PI, like this: Dim a = Angle / 180 * PI and it worked. I honestly didn’t know how…
-
1
votes1
answer38
viewsQ: The angles are crazy!
I’m creating a simple orbiting system, where you have the earth and the sun, created on the basis of a UserControl, the problem is I don’t know why the angle gets crazy by placing an angle on the…
-
0
votes1
answer89
viewsA: Windows service for after Exception
Try putting a try {} within your catch, the error may be being caused there. private void ExecutarServico() { timerImportacao.Enabled = false; CarregarConfiguracoesServico(); CadastroBusiness biz =…
-
0
votes1
answer50
viewsQ: Global variables in GLSL?
Is there any way to declare variables so that they can be used in other files, with the same value as the original? I have tried using varying but it only works for the file .vsh and .fsh of the…
openglasked CypherPotato 9,292 -
2
votes1
answer22
viewsQ: Does a common Class Library work on Silverlight?
A destination class library can be used in .NET Silverlight? Would it work in a Silverlight web application? Thank you!…
-
6
votes3
answers5277
viewsQ: What does "Dim" mean in Basic?
Okay, most programmers (I think most of them) of Basic (popular; Visual Basic compiler) know what the use of Dim, but I also think you don’t know what that word means... Basic Keywords are so…
-
12
votes1
answer4119
viewsQ: What is a multi-paradigm language?
The question title already sums up everything I want to know. Visual Basic . NET, C#, Boo, C++ are multi-paradigm languages. What is a paradigm? And a multi-paradigm language?
-
5
votes3
answers269
viewsA: How to format the name of an item in a listbox?
Use this function to return the formatted file name: string formatarItem(string item) { return System.IO.Path.GetFileNameWithoutExtension(item).Replace("_", " "); } So to add to the list, call the…
-
62
votes4
answers2243
viewsQ: How do I implement wind in a trajectory equation?
Has a game of tank 2D, using the Unityengine in C#, in which it is played on the side of the screen, seeing only the sides of the tanks, in which has the green and red tank. The green need to shoot…
-
1
votes1
answer477
viewsA: How to hide process by clicking button
There are several ways to do this, but here’s one of the easiest. Above all, refer to this namespace: Imports System.Runtime.InteropServices Now declare that function.…
vb.netanswered CypherPotato 9,292 -
7
votes2
answers235
viewsQ: How to create a cross-platform app?
Come on and create a cool app, a system based on Console Application, written in Visual Basic.NET, in . NET Framework, ai you want port this application to other platforms, but without creating a…
-
0
votes1
answer92
viewsQ: Get all the console buffer
How can I get all the Console text (System.Console) for a String, without redirecting the console output to a process, for example, I want to get what’s in the Console through the Console itself. Is…
-
0
votes0
answers41
viewsQ: How to store information in a remote storage?
How can I store an entire number that when the user clicks on the button it is incremented only by section (for this I use the sessionStorage) but this incremented value is visible to everyone on…
-
6
votes2
answers334
viewsQ: How to protect an Assembly from decompilation?
Nowadays there are many water heaters and recompilers for . NET Framework, the guy goes there, makes an application and everyone who has a decompiler (for example IL Spy) can go there, select the…
-
1
votes2
answers2117
viewsQ: What is a literal?
In that link from the MSDN website says that a literal is: A literal is a value that is expressed as itself rather than as a variable value or the result of an expression, such as the number 3 or…
-
-1
votes3
answers968
viewsA: C# Display time in textbox control
An alternative to the @rubStackOverflow response: DateTime n = DateTime.Now; TextBox1.Text = String.Format("{0}:{1}:{2}", n.Hour, n.Minute, n.Second);
c#answered CypherPotato 9,292 -
1
votes1
answer219
viewsA: When to use "0.x. x" and "alpha" in versioning?
From what Visual Studio says, the classification of the versions is different, not entirely, but it changes some things that make sense, which are the versions Larger, smaller, compilation and…
versioninganswered CypherPotato 9,292 -
0
votes2
answers1024
viewsA: How to find the size of a character array?
Use the function sizeof: #include <iostream> ... for (j = 0; j < sizeof(respostas); j++) { cout << respostas[i][j]; }
-
14
votes2
answers920
viewsA: What is the purpose of this language called Brainfuck?
"Brainfuck is an esoteric programming language, it has almost no function, it is a compact language. His goal was to create the world’s smallest compiler, and also challenge and confuse the…
brainfuckanswered CypherPotato 9,292 -
0
votes1
answer48
viewsQ: How to get a Type from a string
For example, I want a string containing the information "System.Windows.Forms.Button" return a button object New Button(), would that be possible? Note: Is tagged C# as it is easy to translate from…
-
4
votes2
answers236
viewsQ: Do Regex.Split on what is not between "..."
Which regular expression I use to get the comma character that is not inside the fields "...", example: line1, "line2", "hello,world", 215, X + Y ^ ^ ^ ^ I want to get only the nominees, I’m using…