All Questions

2
answers

How to make a switch in C #?

I see a lot of people saying it's wrong to switch in the code because it ends up weighing and it's ugly. Is it correct the way I'm using it and what would be an alternative to using it? Fill in the code for if / else ?...
asked on 29.11.2018 / 12:06
2
answers

How to validate the structure of a text file in PHP?

I created an admin space where users deposit .txt files into my FTP . I would like to impose a format. Example The whole file must contain two three columns separated by a semicolon. Example : valid_file.txt    name, height, na...
asked on 27.11.2017 / 15:13
2
answers

Displaying authenticated user data in view

I have a problem that I think is very simple ... I need to show the username logged in my views ... How do I do this? this is one of the views @extends('layouts.template') @section('body') <h3>List_Lists</h3> <p> <...
asked on 18.12.2013 / 22:09
3
answers

Transform rows into columns with their respective values

I have the following table idRegistro|Campo |Valor 1 |Nome |Zonaro 1 |Email |[email protected] 1 |campoX|valorX 2 |Nome |Fulano 2 |tel |1188889999 2 |campoY|valorY I need to create a sele...
asked on 17.02.2016 / 14:41
2
answers

How to switch images when clicking on a checkbox?

In my script I'm making a placeholder, but I can not get it to switch images after click in checkbox , and all the time table chairs are misaligned. Type: checked checkbox shows the red chair checkbox unchecked shows the red...
asked on 01.01.2016 / 20:11
3
answers

Get the last N characters of a string

I have string which is actually a phone number . But a phone number might have some formats like: +55 34 98989898 34 989898 989898 The constant is that always the last 8 numbers are the phone numbers, I wanted to know how I separa...
asked on 08.10.2015 / 21:23
3
answers

How to remove spaces from a string in C?

I want to remove spaces from a string , example: Pedro Henrique Ribeiro I would stay: Pedrohenriqueribeiro The code I made, removes the space, but duplicates a letter: #include <stdlib.h> #include <stdio.h> #include <...
asked on 06.05.2016 / 16:19
3
answers

Use Double in compareTo method

I have a question. I have several methods of comparison, however, one of the attributes used to make the comparison is double. There is an error:    Can not invoke compareTo (double) on the primitive type double I tried converting t...
asked on 26.02.2016 / 18:19
1
answer

How to tell if a port is open or not in Linux

I have a PHP script that acts as a chat server (websocket) that I have on a certain system. I realize that sometimes this service unexpectedly stops running. It runs through the nohup command. I'm using Linux. I just realize that my...
asked on 11.01.2016 / 12:58
3
answers

Working with ID boundaries in large volumes

I have in mind some questions about large volumes of data in MYSQL , referring to the ID limit. I'll give an ID type tinyint as an example to simplify the explanation. In the example the field tinyint accepts 127 records....
asked on 06.08.2015 / 19:05