All Questions

3
answers

Remove a specific element from the javascript array

I need to remove an element from the array by index, for example: arr = [1,2,3,4,5,6] When removing the index element 3: arr = [1,2,3] It needs to remove everything after the index entered including the index. I tried to do this:...
asked on 13.01.2016 / 14:15
4
answers

In C # can I use a local alias for class or namespace?

In languages such as Python or PHP you can use a local alias for classes or namespaces . PHP example: use Vendor\Package\ClassName as C; use Vendor\Package as P; $class = new C; $class = new P\ClassName; Python example: from jso...
asked on 14.06.2016 / 17:51
1
answer

If it is executed even with the condition being false

I have an excerpt of a function with the following code: printf("caminho: %d\n", t); printf("min: %d\n", min); if( min >= t && t != -1); { printf("oi\n"); min = t; printf("min: %d\n",min); } and as a result I have:...
asked on 04.04.2016 / 21:07
4
answers

Basic exercise JS: simple text search

I was trying to create a search in JS to find a given name in the body of a text. However, the search returns no value at all. The logic I used is: <script> var text = "Xxxxx, xxxx x xxxx x xxxx xxxxxx xxxxxxx. Lucas Menezes"; var myName...
asked on 17.01.2017 / 19:11
2
answers

Divide column into multiple tables

I want to save a set of information about movies in a database but I have a question, should I organize the genres in a column (example below). Database: MySQL 5.6.21 Engine: innoDB Or arrange the genres in a separate table and use...
asked on 01.04.2015 / 17:17
3
answers

How to check if the program is already running in C #

I would like to know if there is a way to check if a program instance is already running, so in case I click the program icon it does not call a new instance of the program, but open the already active program. I need the code in C #.     
asked on 19.04.2017 / 16:17
2
answers

What is the difference between "\ n" and "\ r \ n" (special characters for line break)?

For line breaks, I usually use \n . But I realize that in some cases, such as in the Sublime Text editor, some texts that I need to capture the linebreak are only captured when I use the regex \r\n . I have read some things on the...
asked on 08.08.2016 / 16:20
4
answers

Difference between && and ||

I would like to know the difference between: window.RM = window.RM || {}; E: window.RM = window.RM && {}; Maybe the examples are not correct, but I would like to know the difference between the && and || o...
asked on 04.02.2018 / 01:54
3
answers

What does it mean to put the 'as' command after the 'import' command in the code below?

The 'as' is in the send_to_twitter (msg) function import urllib.request import time def send_to_twitter(msg): import twitter as t: CONSUMER_KEY = '1wrnsF5lB8fEWVzRdvlIqdTle' CONSUMER_SECRET = 'eTiylDUHLJgGnTCcxzzCtzHXG4OlHrbY6wLvu...
asked on 06.01.2017 / 22:15
3
answers

PHP failed echo

Because this: echo 1 ^ 2; is equal to 3? And because this: echo 0x33, ' birds sit on ', 022, ' trees.'; It looks like this: "51 birds sit on 18 trees"?     
asked on 24.10.2017 / 20:49