Posts by Jonathan de Toni • 1,260 points
79 posts
-
0
votes1
answer101
viewsA: How to set the change state of a checkbox switchery using Javascript and Asp.Net Core MVC
The problem is when assigning the value in checkbox switchery. The correct would be to inform a boolean, and not a string. The correct then would be: $("#PessoaViewModel_PessoasEnderecosViewModel_"…
-
2
votes1
answer89
viewsA: Git Flow - Not creating the tag in master
To send a tag, you need to push it. Just use the git push with the instruction --tags: git push origin --tags Or else: git push origin nome-tag…
-
1
votes1
answer56
viewsA: Fill Dropdownlist with Multiple Values
You’d have to go through your MultiSelectList the values that will be selected: ViewBag.Effects = new MultiSelectList(effectsService.GetAll(), "EffectID", "Name", new[]{1,2,3} ); In case it would…
-
0
votes1
answer102
viewsQ: Problems in Object Reference not defined for an object instance
I have a problem with the result of the method SaveChanges(). I am trying to save a record, and it is persisted in the database, however the application is returning the message from exception:…
-
1
votes2
answers3487
viewsA: move up to the repository on github
Create a new branch with: git branch <nome> Now just commit the changes and upload to the repository: Commit: git add . git add the files to perform the commit. Using point(.) is to add all…
-
0
votes2
answers69
viewsA: Fix last element of the list unordered in footer
You can use the value fixed of property position: ul.lista li a:last-hcild{ position: fixed; bottom: 0; right: 0; border-bottom: 0px; } This property causes the element to be fixed to the screen, so…
-
0
votes1
answer830
viewsA: Error Mapping types. Mapping types: Icollection`1 -> List`1
I managed to create a new Mapper, both from Domanin to Viewmodel and Viewmodel to Domain to property public List<MensagemViewModel> mensagens { get; set; }: Domaintoviewmodel…
-
1
votes1
answer478
viewsA: How to place routes with optional parameters Asp.net-core
Just use the question mark in the parameter which can be optional. In the example below the id would be optional. app.UseMvc(routes => { routes.MapRoute("default",…
-
1
votes2
answers107
viewsA: generate Json through txt (Position) file by php
You can use regex, for example: <?php $subject = "abcdef"; $pattern = '/^def/'; preg_match($pattern, substr($subject,3), $matches, PREG_OFFSET_CAPTURE); print_r($matches); ?> Exit: Array ( [0]…
-
2
votes4
answers1515
viewsA: Take a field value by id and put it into a variable
You can try something like this: HTML: <form method="get"> <input type="text" id="inputId" /> <input type="submit" id="submitId" value="Enviar" /> </form> Javascript: //…
-
5
votes3
answers2246
viewsA: How to disable a link semantically while maintaining accessibility?
Exists on W3C that specifies a set of attributes to solve exactly the accessibility problems, called WAI_ARIA. Basically you add an attribute called roles and implements a value: <a href="#"…
-
0
votes1
answer830
viewsQ: Error Mapping types. Mapping types: Icollection`1 -> List`1
I’m having a problem converting a List for ViewModel, using the ToListViewModel. Faturacontroller.Cs FaturaViewModel faturaViewModel = new FaturaViewModel(); faturaViewModel.mensagens = new…
-
0
votes1
answer171
viewsA: Multiple php functions at the same time
An alternative is the use of non-blocking asynchronous I/O, which is popular for being used in Nodejs and Javascript. This form of processing allows you to start writing or reading operations…
phpanswered Jonathan de Toni 1,260 -
2
votes1
answer48
viewsA: Bitbucket management
You have to add the user in Settings > General > Group and user access. Ai only clone the project. Have to stay tuned the ssh keys of each also, if they clone by ssh. Another way is to make a…
-
0
votes3
answers1103
viewsA: Align button on the left side of a div
You are using a div class="row" and thus creating a line and leaving the "X" above the field. To solve is simple: <div class="form-group row"> <div class="col-xs-1 div-icone-excluir">…
-
3
votes2
answers397
viewsA: How to animate a Radial-Gradient or Linear Gradient with CSS?
With the @keyframe you can say to animation, when performing such action using percentage values. That would be the phases of animation and that values you define. Following more or less what you…
-
0
votes2
answers149
viewsA: Fill in the value of the select field using the enabled checkbox
Just change the html field to the type select. And then create an element with createElement and add to select with appendChild. function add(value){ var resultado =…
-
-3
votes2
answers236
viewsA: The preg_replace is cutting letters with accent
preg_replace: Perform a search for a regular expression and replace it. So basically, what you’re going through is, '/[^a-z0-9]+/i' anything that is not within that scope, replaces with '-'. The…
-
4
votes2
answers873
viewsA: How to Make 3D Text with CSS
h1 { text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0…
-
1
votes1
answer28
views -
1
votes1
answer44
viewsA: How to create "options" in Select from a spreadsheet?
In the view I use so: @Html.DropDownListFor(model => model.ID_Funcionalidade, controller.ListarFuncionalidade() as SelectList, "Selecione...", new { @class = "form-control" }) I create a method…
-
3
votes4
answers3500
viewsA: How to increase the space between text and underline in CSS?
.sublinhado{ text-decoration: none; border-bottom: 1px solid black; padding-bottom: 3px; line-height: 1.5; } <p> <span class="sublinhado">Teste Teste Teste Teste Teste Teste Teste Teste…
cssanswered Jonathan de Toni 1,260 -
2
votes3
answers173
viewsA: The Hover is not working. Why?
Apparently, the opacity is set to 1, which is the standard for the elements. So this part of the code: figure.foto-legenda figcaption{ position: absolute; top: 0px; background-color: rgba(0,0,0,.4);…
css-hoveranswered Jonathan de Toni 1,260 -
4
votes2
answers544
viewsA: Is there any way to access a CSS value?
Not technically. But there is a function called calc(), calculating the values (0px, 0%, 0cm, ..), for example: .teste{ margin-left: calc(1px + 3px + 4px, ..) } One option is the variables: :root{…
cssanswered Jonathan de Toni 1,260 -
0
votes1
answer90
viewsA: How to reduce TABS spacing with view corners using CSS - Asp.Net MVC
If you go in your css, probably in the class .panel will have a padding, Just set it to 0, padding: 0;. Or in class .panel-body or .container-fluid has a margin, also just set to 0, margin: 0; If…
-
0
votes1
answer45
viewsA: git log between closed interval
git log --before=2017-10-10T11:53:52.089+0000 --after=2017-10-04T12:18:34.287+0000 If default does not show the last day (9), add another day (10). This way it will show the day 9 and will not show…
gitanswered Jonathan de Toni 1,260 -
3
votes1
answer3231
viewsA: error allow git local
Try it this way: git init - To start the local repository; git remote add nome-repositorio-remoto end-repositorio-remoto - To enter the address of the remote repository; git push nome-repositorio…
gitanswered Jonathan de Toni 1,260 -
0
votes1
answer142
viewsA: Do the parameters passed in the * selector (asterisk) override anything in the CSS?
No, in reality it implements in all elements of the page the style applied, that is, the html element gains edge, the body gains edge, and the Divs also gain edges, but has low priority. Behold: * {…
cssanswered Jonathan de Toni 1,260 -
-2
votes2
answers234
viewsA: My PHP not saved in BD
Missing execute query with command mysql_query: <?php //query de insercao dos dados do tipo string. $sql = "INSERT INTO user(userNome, userEmail, userSenha) VALUES ($nome, $email, $senha)";…
-
0
votes1
answer254
viewsA: What convention is used to organize Views of Laravel?
When installing Laravel, it already comes with the pre-configured folders. In this case, the layouts, views.. Overall, in layouts it is customary to leave everything you have of default on the…
-
0
votes2
answers3746
viewsA: Change background color div
There are some cases that even using the ! Important, the new application does not work. They are cases like: Another class using ! Mportant: In this case only check the layout of the classes, for…
-
3
votes1
answer5860
viewsA: Composite primary key using a foreign key
ALTER TABLE NomeDaTabela ADD CONSTRAINT PK_NomeDaPK PRIMARY KEY CLUSTERED (Coluna1, Coluna2) If you want to add PK during table creation, use this syntax: CREATE TABLE NomeDaTabela ( Coluna1 INT,…
-
1
votes2
answers313
viewsA: Detect click over an iframe
You can use: $( "recebe_iframe" ).click(function() { //código }); As it is not very clear what you are wanting, this may get you some north. Example: $( "p" ).click(function() { $( this ).slideUp();…
-
0
votes2
answers231
viewsA: Inserting date in American standard
You can use the function date(): date("YYYY/MM/dd", strtotime("26/01/2018")); Reference: PHP documentation.…
-
1
votes2
answers368
viewsA: How to put this kind of Hover?
It is only necessary to change #menu ul li a. More specifically in the padding line, which before was 2px and was changed to 20px. html{ font-family: sans-serif; } header{ width:100%; height:58px;…
-
3
votes1
answer526
viewsA: How to capture select value as a string in PHP?
You are double checking whether the variable sent to GET is set. In this case, just use: $resposta1 = isset($_GET['pergunta1'])?$_GET['pergunta1']:0; In the acimá example we verify if the variable…
phpanswered Jonathan de Toni 1,260 -
3
votes1
answer867
viewsA: View day of the week as date used in PHP query
You can use the following PHP function: string date ( string $format [, int $timestamp ] ); Being as follows: echo date("D", strtotime("20/12/2017")); There are other formats like: $today = date("F…
-
0
votes2
answers1201
viewsA: How do I know $_FILES is empty?
An alternative is to use the function empty(): if (empty($_FILES['imagem']['size']) != false){ /*Separar o nome da imagem */ $titulo_img = $img['name']; /*Separando o caminho da imagem…
phpanswered Jonathan de Toni 1,260 -
0
votes1
answer243
viewsA: Allowed memory size in Phpexcel
Go on php.ini and changes the value of upload_max_filesize. Restart the server before testing again!
phpanswered Jonathan de Toni 1,260 -
-1
votes1
answer128
viewsA: Mysql cleaning of logs
I use a program for editing files with very large sizes, just like yours. It’s called Pilotedit, exise paid and free version, which will suit you. Follow the comments instructions, make a backup,…
mysqlanswered Jonathan de Toni 1,260 -
0
votes0
answers151
viewsQ: Web Service SOAP
I’m having a very unusual problem with a SOAP application. I have a simple client to take a consumer test. When I test directly in the service view action returns the result correctly, but when I…
-
1
votes3
answers1628
viewsA: Convert seconds into days
You can do an operation on your own SELECT: SELECT OnlineTime / 60 / 24 AS Tempo FROM user_stats INNER JOIN users ON user_stats.id = users.id WHERE users.Rank <5 ORDER BY user_stats.OnlineTime…
-
3
votes2
answers53
viewsA: I can’t get the seat
You have not named the inputs. So you do not capture the value sent by the form and cannot enter it into the database. Every insertion field needs to be identified with the name attribute. <input…
-
2
votes2
answers857
viewsQ: Group By By Data
I have a table called tsc, with the properties ID and DataHoraOcorrencia. I need to check the amount of ID for DataHoraOcorrecia. SQL SELECT DataHoraOcorrencia as DataHora, COUNT(tsc.ID) as…
-
0
votes1
answer42
viewsA: Adjusting local branches before committing
First you create a new branch: git branch Y It will already be with the modifications made to the X branch. If you want to check if everything is right, do a git checkout Y and tests the…
-
1
votes1
answer80
viewsA: replace hyphen with underline htaccess
$url = "www.site.com.br/post/77-eu_tu_eles"; $urlExplode = explode("-",$url); $urlImplode = implode("_",$urlExplode); With the function explode( string $delimiter , string $string [, int $limit ]),…
-
0
votes1
answer143
viewsA: Follow link with Enter based user input
function redirecionar() { var username = document.getElementById("username").value; if (username != "") { window.location = "https://site.com.br/usuario"+username+"&empresa"; } } Missing capture…
-
0
votes1
answer133
viewsA: How to distribute points evenly within a polygon?
You can use the function while, instead of using the for, thus remaining: var contador = 0; while(contador <= 100){ var ptLat = Math.random() * (ne.lat() - sw.lat()) + sw.lat(); var ptLng =…
-
4
votes3
answers3053
viewsA: Inserting current date in php
You can use the function date() php passing the format you want. date('Y-m-d H:i:s');
-
0
votes2
answers1173
viewsA: Color chartjs numbers
Is in this stretch: var dataBG = { labels: [ <?php foreach($class->Lista("BG") as $dados){ echo '"'.$dados->getQtTotalOrigem().'",'; }?> ], datasets: [{ label: "Entregas",…